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 R1 2 1 50 L1 2 3 100mH C1 3 0 1uF.AC DEC 100 1 10k.END
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 OptiSPICE is the best because it was written by your professor. WHAT IS SPICE?
Create an Spice input file that describes the circuit Run Spice Inspect the output WORKFLOW
R_R1 1 0 100 C_C1 1 2 0.01592u V_V1 2 0 dc 0.0 ac 1.0 sin(0.0 1.0 1.0 0 0) node value - A netlist describes the circuit to the program - Node 0 is always GROUND name THE NETLIST
-The title must be the first line in the netlist (in order to recognize the options command) - R1 = 100Ω (Ohms) - C1 = 0.01592uF (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 0.001 to 1e+06 Title “my filter circuit”.options ingold=2 R_R1 1 0 100 C_C1 1 2 0.01592u IC=0 V_V1 2 0 dc 0.0 ac 1.0 sin(0.0 1.0 1.0 0 0).print ac V(1).ac LIN 100 0.001 1e+06.op.END THE INPUT FILE
Using PSPICE Create a netlist file using notepad (Make sure you have a.probe) Save as “.cir” file on desktop Start up PSPICE Open the file in PSPICE Simulate “big green triangle” Use trace to bring up the plot window and pick things to show.
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
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. Input Voltage Output Voltage BIPOLAR JUNCTION TRANSISTOR
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
Components: SOME USEFUL NETLIST STATEMENTS Netlist NameComponent TypeExample RnameResistor Rname N+ N- Value CnameCapacitor Cname N+ N- Value LnameInductor Lname N+ N- Value VnameVoltage Source Voltage source: Vname N+ N- DCValue InameCurrent Source Current source: Iname N+ N- DCValue QnameBipolar Transistor Qname C B E BJT_modelName MnameMOSFET Mname ND NG NS ModName Sweep Distributions: - DEC : Log distributions of points - LIN: Linear distribution of points
In the menu, choose Format Cells Time [s]Vout [V] 0.E+000.000 1.E-10-0.008 2.E-10-0.007 3.E-100.034 4.E-100.140 5.E-100.322 6.E-100.588 7.E-100.934 8.E-101.355 9.E-101.839 1.E-092.373 Scientific Notation: 0 decimals Number: 3 decimals FORMAT CELLS
Excel can split text from one column into multiple columns using the command “Text to Columns”
$ is used with cell coordinates, signifies leaving that coordinate constant Example: rearrange v=d/t to give d=v*t The code $
Other: transpose, add… 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 -0.008 -0.007 PositiveNegative 0.400-0.400 -0.0080.008 -0.0070.007 PASTE SPECIAL
Right-click on a data point, choose Add Trendline using type: Linear, options: display equation on chart and R squared value. BEST FIT LINE
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 R0.999997109 R Square0.999994218 Adjusted R Square0.999991328 Standard Error1182.326494 Observations4 End STATISTICS