Presentation is loading. Please wait.

Presentation is loading. Please wait.

INTRODUCTION Spice Excel.

Similar presentations


Presentation on theme: "INTRODUCTION Spice Excel."— Presentation transcript:

1 INTRODUCTION Spice Excel

2 Simulation Program with Integrated Circuit Emphasis
SPICE Simulation Program with Integrated Circuit Emphasis

3 SPICE is a program which can be used to simulate analog electronic circuits

4 Analog filter circuits have a parameter called a ‘Transfer Function’ which maps input to output with relation to frequency v_in circuit v_out

5 Analog filter circuits have a parameter called a ‘Transfer Function’ which maps input to output with relation to frequency

6 Analog filter circuits have a parameter called a ‘Transfer Function’ which maps input to output with relation to frequency

7 Analog filter circuits have a parameter called a ‘Transfer Function’ which maps input to output with relation to frequency

8 Analog filter circuits have a parameter called a ‘Transfer Function’ which maps input to output with relation to frequency

9 Analog filter circuits have a parameter called a ‘Transfer Function’ which maps input to output with relation to frequency

10 A netlist is a text version of the circuit which describes the components and values for the computer to interpret and solve

11 A netlist is a text version of the circuit which describes the components and values for the computer to interpret and solve

12 A netlist is a text version of the circuit which describes the components and values for the computer to interpret and solve

13 A netlist is a text version of the circuit which describes the components and values for the computer to interpret and solve

14 A netlist is a text version of the circuit which describes the components and values for the computer to interpret and solve

15 A netlist is a text version of the circuit which describes the components and values for the computer to interpret and solve

16 A netlist is a text version of the circuit which describes the components and values for the computer to interpret and solve * Basic DC circuit V R k R k V R k .OP .END

17 A netlist is a text version of the circuit which describes the components and values for the computer to interpret and solve * Series_RLC Circuit V1 1 0 SIN(0 5 1k) AC 1 R L mH C uF .AC DEC k .END

18 WHAT IS SPICE? Spice is a software program that simulates electronic circuits and outputs the circuits’ basic characteristics such as: Voltage Current Resistance at any location in the circuit HSpice is a version used in Unix PSpice is a version used in Windows T-Spice simpler tool meant for smaller circuits – this is what you will use in the lab LT spice is free OptiSPICE is the best because it was written by your professor.

19 WORKFLOW Create an Spice input file that describes the circuit
Run Spice Inspect the output

20 THE NETLIST - A netlist describes the circuit to the program
- Node 0 is always GROUND node name value R_R C_C u V_V dc ac 1.0 sin( )

21 THE INPUT FILE Title “my filter circuit” .options ingold=2
R_R C_C u IC=0 V_V1 2 0 dc 0.0 ac 1.0 sin( ) .print ac V(1) .ac LIN e+06 .op .END The title must be the first line in the netlist (in order to recognize the options command) - R1 = 100Ω (Ohms) - C1 = uF (micro Farads) with initial condition of 0 - V1 = sine wave with 1Hz frequency, 0 to 1V magnitude - Print ac voltage at node 1 - Want 100 frequency points from to 1e+06

22 LTSpice – demo later

23 Others might be available
Hspice (not likely and difficult to use) Instructions likely obsolete PSpice Not sure we have full licence Tspice Might be ok – netlist based I think. OptiSpice – the best (it’s mine).

24 RUN T-SPICE All Programs ->Tanner EDA -> T-Spice...

25 VIEWING OUTPUT

26 Using PSpice

27 Using HSPICE

28

29

30 For HSPICE and PSPICE use Excel to generate the plots
TRANSFER FUNCTION Magnitude Plot - DB vs Hz (log scale) Phase Plot - Degrees vs Hz Together these plots show the transfer function of the circuit at different frequencies For HSPICE and PSPICE use Excel to generate the plots

31 BIPOLAR JUNCTION TRANSISTOR
Input Voltage Output Voltage 3-terminals: Collector, Base, and Emitter Common Emitter Amplifier input = base with respect to the emitter output = collector with respect to the emitter Most commonly used configuration for transistor-based amplifiers as it produces the highest voltage, current, and power gain.

32 BJT

33 OUTPUT FROM HSPICE

34 SOME USEFUL NETLIST STATEMENTS
Analysis Types: Operating Point (.OC) - Voltage at each node and current from voltage sources AC Analysis (.AC) - Small signal model output at different frequencies Transient (.TRAN) - Circuit output as time passes Scale factors: T : E+12 G : E+9 MEG : E+6 K : E+3 M : E-3 U: E-3 N: E-9 P: E-12 F: E-15

35 SOME USEFUL NETLIST STATEMENTS
Components: SOME USEFUL NETLIST STATEMENTS Netlist Name Component Type Example Rname Resistor Rname N+ N- Value Cname Capacitor Cname N+ N- Value <IC=Initial Condition> Lname Inductor Lname N+ N- Value <IC=Initial Condition> Vname Voltage Source Voltage source: Vname N+ N- <DC=> DCValue Iname Current Source Current source: Iname N+ N- <DC=> DCValue Qname Bipolar Transistor Qname C B E BJT_modelName Mname MOSFET Mname ND NG NS <NB> ModName <L=VAL> <W=VAL> Sweep Distributions: - DEC : Log distributions of points - LIN: Linear distribution of points

36 LTSpice - demo

37 TIPS IN EXCEL

38 Scientific Notation: 0 decimals
FORMAT CELLS In the menu, choose Format Cells Time [s] Vout [V] 0.E+00 0.000 1.E-10 -0.008 2.E-10 -0.007 3.E-10 0.034 4.E-10 0.140 5.E-10 0.322 6.E-10 0.588 7.E-10 0.934 8.E-10 1.355 9.E-10 1.839 1.E-09 2.373 Scientific Notation: 0 decimals Number: 3 decimals

39 Excel can split text from one column into multiple columns using the command “Text to Columns”

40 $ $ is used with cell coordinates, signifies leaving that coordinate constant Example: rearrange v=d/t to give d=v*t The code

41 PASTE SPECIAL Example: Make a row of data negative
Copy cell with -1 value, highlight cells that you want to become negative of the current values, Edit Paste Special Multiply Positive “not yet Negative” 0.400 -1 -0.008 -0.007 Positive Negative 0.400 -0.400 -0.008 0.008 -0.007 0.007 Other: transpose, add…

42 BEST FIT LINE Right-click on a data point, choose Add Trendline using type: Linear, options: display equation on chart and R squared value.

43 Regression Statistics
must have the Analysis Toolpak (go to Tools Add-ins, and install). tools - data analysis - regression - x and y ranges - click residuals SUMMARY OUTPUT Regression Statistics Multiple R R Square Adjusted R Square Standard Error Observations 4 End

44 NOW TO APPLY YOUR KNOWLEDGE!


Download ppt "INTRODUCTION Spice Excel."

Similar presentations


Ads by Google