Upload
rednaxela35
View
221
Download
0
Embed Size (px)
Citation preview
8/6/2019 Mac Pro 02
1/6
1
Elective 3 ECE Computer Aided Design
Name: Date:
Section: Rating:
Machine Problem #02
Semiconductor Devices Analysis Using WinSpice (Part 1)
Objectives
1. Simulate active devices such as diodes and bipolar transistor circuits using WinSpice.
2. Use the transient, DC and AC analysis tools of WinSpice
Introduction
As stated before, WinSpice can simulate semiconductor devices such as diodes, BJTs,
MOSFETs, etc. These devices require two pieces of information to be described in a netlist. First is the
node information, where, just like the passive components, you assign nodes at the terminals of these
devices. Refer to the Spice Manual for specific details. The second piece of information is the model
statement. The model statement describes internal device parameters and physics which determines the
small and large signal behavior of these devices.
WinSpice can perform different types of analysis: DC, AC and transient. The DC analysis portion
of SPICE determines the DC operating point of the circuit with inductors shorted and capacitors opened.
The DC analysis options are specified on the .DC, .TF, and .OP control lines. A DC analysis is
automatically performed prior to a transient analysis to determine the transient initial conditions, and prior
to an AC small-signal analysis to determine the linearized, small-signal models for non-linear devices. If
requested, the DC small-signal value of a transfer function (ratio of output variable to input source), input
resistance, and output resistance is also computed as a part of the DC solution. The DC analysis can
also be used to generate DC transfer curves: a specified independent voltage or current source is
stepped over a user-specified range and the DC output variables are stored for each sequential source
value.
The AC small-signal portion of SPICE computes the AC output variables as a function of
frequency. The program first computes the DC operating point of the circuit and determines linearized,
small-signal models for all of the non-linear devices in the circuit. The resultant linear circuit is then
analysed over a user-specified range of frequencies. The desired output of an AC small-signal analysis is
usually a transfer function (voltage gain, transimpedance, etc.). If the circuit has only one AC input, it is
convenient to set that input to unity and zero phase, so that output variables have the same value as the
transfer function of the output variable with respect to the input.
The transient analysis portion of SPICE computes the transient output variables as a function of
time over a user-specified time interval. The initial conditions are automatically determined by a DC
8/6/2019 Mac Pro 02
2/6
2
analysis. All sources which are not time dependent (for example, power supplies) are set to their DC
value. The transient time interval is specified on a .TRAN control line.
There are other analysis that can be performed using WinSpice but we will concentrate mostly on
these three analyses.
This is the first of the two parts on the exercises on semiconductor analysis using WinSpice. Inthis particular exercise, we will simulate diode and obtain the current-voltage characteristics of a bipolar
junction transistor.
Procedure:
A. Diode circuit Transient analysis
1. Create the SPICE netlist of the circuit shown below.
Refer to the SPICE manual on the details of defining source voltages and resistors. Note that the
voltage source is a sinusoidal source, hence its SPICE card must be
V1 SIN(0 10 1k 0 0)
Interpret the SPICE card above.
________________________________________________________________________________
________________________________________________________________________________
____________________________________________________________________________
2. For the diode, use the following syntax:
D
where NA is the node assigned to the anode, NK to the cathode, model name is the reference
name to be used by the diode in the .model statement and the rest are optional parameters, details
V1
10 Vpk
1kHz
0
D1
1N4001
R1
5
V210 V
R210
D21N4001
R3
5
8/6/2019 Mac Pro 02
3/6
3
of which are in the manual. Use 1N4001 as the model name and supply this model statement to the
SPICE netlist.
.MODEL 1N4001 d (
+IS=3.19824e-08 RS=0.0428551 N=2 EG=0.784216
+XTI=0.504749 BV=53 IBV=0.0001 CJO=4.67862e-11+VJ=0.4 M=0.469632 FC=0.5 TT=8.86839e-06
+KF=0 AF=1 )
Although the circuit uses two diodes, you do not need to specify two .model statements. Just use identical
model names for the two diodes in their circuit description and the model statement will be applied to both.
3. Obtain the waveform across R2 using transient analysis. The syntax for transient analysis
.tran
tstep is the printing or plotting increment for line printer output; tstop is the final time and tstart
is the initial time; uic is used when you want your transient analysis to start at the initial conditions
defined for components. For details of the usage, refer to manual. For this exercise use the syntax
.tran 1u 6m
What does this SPICE card mean?
__________________________________________________________________________________________
__________________________________________________________________________________________
__________________________________________________________________________________________
4. To obtain the waveform across R2, use the .plot or .print function of the SPICE. Add the following SPICE
card to your netlist.
.plot tran V(2) *this is assuming that you assigned R2 at nodes 2 and 0
This causes the SPICE to plot the results of the transient analysis at the specified node. V(2) is the output variable
in this case. You can place as many output variables as you like, separated by spaces.
What is the difference between the .plot and .print command?
____________________________________________________________________________________________________________________________________________________________________________________
______________________________________________________________________________________
5. Save your netlist, not forgetting the .end statement at the last line. Then run the netlist using WinSpice.
6. WinSpice would then compute for the results of the analysis. If this takes long, just press the ESC button. Then a
8/6/2019 Mac Pro 02
4/6
4
plot will appear. This is the output voltage waveform at the node you have specified in your netlist. Copy and
paste the waveform on a separate sheet of paper. To copy and paste the plot on an open word processor
document, on the plot itself, click on Edit, Copy, and then paste this on the open word processor document. Based
on this plot, what kind of circuit is this?________________________________.
Briefly discuss the operation of the circuit in relation to its output waveform.
__________________________________________________________________________________________
__________________________________________________________________________________________
__________________________________________________________________________________________
__________________________________________________________________________________________
______________________________________________________________________________________
7. Determine the peak value of the voltage at this node. This can be done by zooming in to the peak of the waveform
or printing the results in an external file. Record the value below:
Peak Voltage Value
8. Edit your netlist to obtain the waveform of the current passing through R2. To do this, insert a voltage source in
series to R2. Name this VR2. Then assign your output variable as I(VR2). The plot that will come out is the
waveform of the current flowing through R2. Copy and paste this waveform on a separate sheet. Then obtain the
peak current value from this waveform. Record the value below.
Peak Current Value
9. On a separate netlist, repeat steps 6 through 8 with D2 reversed in polarity. How does this compare to the
previous results. Why is this so?
__________________________________________________________________________________________
__________________________________________________________________________________________
______________________________________________________________________________________
Peak Voltage Value
Peak Current Value
8/6/2019 Mac Pro 02
5/6
5
10. Discuss the use of transient analysis in WinSpice.
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
______________________________________________________________________________________________________________________________________________________________.
11. Do a research on diode parameters as stated in the model statement. Attach this on a separate sheet
of paper.
B. Bipolar Junction Transistor Simulation Current-Voltage Characteristics
12. Write a SPICE netlist for the circuit below
Use the following model statement for the transistor
.MODEL 2N2222A npn
+IS=2.04566e-13 BF=296.463 VAF=10 BR=0.481975
+RB=3.99688 RE=0.0857267 RC=0.428633
+CJE=1.09913e-11 VJE=0.99 MJE=0.23
+TF=2.96787e-10 CJC=3.1941e-11 VJC=0.4
+MJC=0.85 CJS=0 VJS=0.75 MJS=0.5
Leave the value of VCC blank. Set the value of IBB to 10 uA and RB to 10 megaohms. Also add a
zero-voltage source called Vic to measure the collector current.
13. Do a DC analysis on the circuit to obtain its voltage-current characteristics. To do this, add the SPICE
card below.
.dc VCC 0 5 0.1
8/6/2019 Mac Pro 02
6/6
6
This will cause the SPICE to vary the values of VCC while computing for the output variable. The
current voltage characteristic of a BJT is identified by the relationship between the collector-emitter
voltage (VCE) and the collector current (IC). In the circuit, VCC = VCE and therefore we can plot the
VCE versus IC transfer function by adding the SPICE card
.plot DC I(VIc)
14. Run the simulation. Paste the plot on a separate sheet of paper. Interpret this plot.
________________________________________________________________________________
________________________________________________________________________________
________________________________________________________________________________
________________________________________________________________________________
________________________________________________________________________________
________________________________________________________________________________________________________________________________________________________________
____________________________________________________________________________
15. We can obtain this current-voltage characteristics for various values of the base current. Edit your
netlist to do this, obtaining the current-voltage characteristics for 10 uA, 20 uA, 30 uA, 40 uA and 50
uA base currents. Write the SPICE card for the DC analysis below and paste the resulting plot on a
separate sheet of paper.
________________________________________________________________________________
____________________________________________________________________________
16. Do a research on the different parameters of the BJT as stated in the model statement. Include the
things you found out about these parameters and relate them to the plots you obtained in steps 14
and 15. Attach this on a separate sheet of paper.
References
WinSpice3 Users Manual by Mike Smith, 2004