Introduction to SPICE EEL 102 Spice Introduction Spice
- Slides: 15
Introduction to SPICE EEL 102
Spice – Introduction Spice is a short form of : Simulated Program with Integrated Circuit Emphasis Used for circuit analysis Many varieties of SPICE – WINSPICE, PSPICE, HSPICE….
Download instructions Student Version @ http: //www. electronicslab. com/downloads/schematic/013/
INSTRUCTIONS for running
Steps before running the simulation… Draw the circuit and Label all nodes and elements Circuit described in terms of its elements and properties
Syntax rules Not case-sensitive First line of code is ALWAYS the TITLE and ignored . End -> Last Line of code Comment within a line should be followed by ; Comment lines start with *
Circuit elements Resistor: R<name> <node 1> <node 2> <value> Rx 1 4 5 100 k Capacitor: C<name> <node 1> <node 2> <value> C 1 3 9 10 u Inductor: L<name> <node 1> <node 2> <value> Lxy 4 5 1 m
Voltage and current sources 3 types : DC, AC, Transient Voltage Sources: V<name> <+venode> <-venode> [[DC] <value>] [[AC] <mag> <phase>] [transient + specs] Current Sources: I<name> <+venode> <-venode> [[DC] <value>] [[AC] <mag> [phase]] [transient + specs] DC source: V 1 3 0 5 V 1 3 0 DC 6 AC source: V 1 3 0 AC 25 180
Transient Sources Pulse V<name> <+node> <-node> PULSE(V 1 V 2 Td Tr Tf Tw Period) V 1: Value when pulse is not on V 2: Value when pulse is fully on Td: Time delay ; can be zero Tr : Rise Time; Zero causes some simulation problems Tf : Fall time Tw : Pulse Width Period Total time in seconds of pulse Ex: Vs 1 0 PULSE(0 V 10 V 0 s 100 ms 900 ms 2 s) Sin : Damped Sine V<name> <+node> <-node> SIN(V 0 Va fr Td Df theta) V 0: DC Offset value Va: Undamped amplitude. Peak measured from zero if no DC offset fr: frequency in Hz Td: time delay in seconds Df : Damping factor Theta: Phase advance in degrees Ex: Vs 1 0 SIN(2 V 5 V 2 Hz 200 ms 2 Hz 30 d)
Dependant Sources Ebar 17 8 42 18 24. 0; VCVS E<name> <n+> <n-> <nc+> <nc-> <multfactor> Glab 23 17 8 3 2. 5 ; VCCS G<name> <n+> <n-> <nc+> <nc-> <mult. factor> Hvx 20 12 Vhx 50. 0 ; CCVS H<name> <n+> <n-> <Vmonitor> <mult. factor> Ftrn 81 19 Vctl 50. 0 ; CCCS F<name> <n+> <n-> <Vmonitor> <Gain>
Analysis DC Analysis: . DC <source> <vstart> <vstop> <vincr> [src 2 start 2 stop 2 incr 2]. DC Vds 0 10 0. 5 Vgs 0 5 1 AC Analysis: . AC <sweeptype> <ptsvalue> <startfreq> <end freq> Sweep is either LIN, OCT, DEC. AC DEC 20 1 Hz 10 k. Hz. AC LIN 11 100 200; Transient Analysis . Tran <print step> <final time>. TRAN 1 n 1000 n
OUTPUT Text Output: . PRINT Graph Output: . PROBE command generates a. dat file
Example Firstorder lowpass Rcfilter Vin 1 0 AC 1. 0 V Rf 1 2 1. 59 Cf 2 0 100 u. F. AC DEC 20 100 Hz 100 k. Hz. PROBE. END
References http: //www. uta. edu/ee/hw/pspice/ http: //www. engr. colostate. edu/ECE 562/Pspicetutor ial. pdf http: //cobweb. ecn. purdue. edu/~ee 255/lecturesupp _files/PSpice-Tutorial. pdf http: //www. ecircuitcenter. com/About. SPICE. htm
THANK YOU!!! Questions?