Professional Documents
Culture Documents
P Spice Tutorial
P Spice Tutorial
10
10 100 1
.
10
3
1
.
10
4
1
.
10
5
1
.
10
6
2
1
0
phase vs. radian frequency
radian frequency
p
h
a
s
e
0.014
1.57
arg Gvd ( ) ( )
1 10
6
10
As you can see the answer of the boost circuit that provided by MathCAD and Pspice
software are very close. However, the Pspice simulation is plot all the behavior of the circuit and
MathCAD only estimate and calculate the value of the circuit. Therefore, the plots not look
exactly the same but the answers are very close.
Next the Buck-Boost circuit, again use the same idea as the other two circuits. I used
student version of Pspice to build a Buck-boost circuit. The figure below is a Buck-Boost
circuit.
The figure below is shown the result of my Buck- boost circuit.
Again, in order to proved that the result of my circuit by using Pspice is correct. I used
MathCAD software to calculate and plot the frequency response. The following is the
MathCAD calculation and plot of the transfer function and phase of the Buck- boost circuit.
fz 2.653 10
3
= fz
z
2
:=
z 1.667 10
4
= z
1 D ( )
2
R
D L
:=
20 log Gdo ( ) 45.46 =
Gdo 187.5 =
Gdo
V
D 1 D ( )
:=
fs 1 10
5
=
fs
1
Ts
:=
Re 88.889 = Re
2 L
D
2
Ts
:=
20 log Ggo ( ) 3.522 =
Ggo 1.5 = Ggo
D
1 D
:=
I 11.25 = I
V
1 D ( ) R
:=
V 45 =
V
D
1 D ( )
Vg :=
Basic formula
Calculate the output voltage
D 0.6 := Vg 30 :=
Ts 10 10
6
:= C 160 10
6
:= L 160 10
6
:= R 10 :=
j 1 :=
Q 1 D ( ) R
C
L
:= Q 4 =
fo
1 D ( )
2 L C
:= fo 397.887 =
10 100 , 100 10
4
.. :=
Gvd ( ) Gdo
1
j
z
\
|
|
.
1
j
Q 2 fo
+
j
2fo
|
\
|
|
.
2
+
(
(
:=
10 100 1
.
10
3
1
.
10
4
1
.
10
5
1
.
10
6
50
0
50
100
Gvd Vs. radian frequency for buck_boost
raidan frequency
G
v
d
57.643
23.058
20 log Gvd ( ) ( )
1 10
6
10
)
1
10 100 1
.
10
3
1
.
10
4
1
.
10
5
1
.
10
6
4
2
0
phase for buck_boost
radian frequency
p
h
a
s
e
1 10
3
3.141
arg Gvd1 ( ) ( )
1 10
6
10
As you can see that the results in both MathCAD and Pspice software are the same,
which prove that the result of my buck-boost using Pspice is correct.
Apply the same idea and buck example in page 355 of the Fundamental of Power
Electronics 2
nd
edition textbook, I design a buck converter and uses the given values in the
example to test my design. The figure below is buck converter.
The figure below is the results of buck converter
Gvd2 ( )
V
D
1
1 j
L
15
+ j ( )
2
L C +
:=
Gvd3 ( )
V
D
1
1 j
L
25
+ j ( )
2
L C +
:= Gvd1 ( )
V
D
1
1 j
L
5
+ j ( )
2
L C +
:=
Gvd4 ( )
V
D
1
1 j
L
1
+ j ( )
2
L C +
:=
Gvd ( )
V
D
1
1 j
L
3
+ j ( )
2
L C +
:=
Gvd ( )
V
D
1
1 j
L
R
+ j ( )
2
L C +
:=
1 10 , 100 10
3
.. :=
j 1 :=
D 0.536 =
D
V
Vg
:=
R 3 :=
L 50 10
6
:=
C 500 10
6
:=
fs 100 10
3
:=
V 15 := Vg 28 :=
The calculation of Buck converter
1 10 100 1
.
10
3
1
.
10
4
1
.
10
5
50
0
50
transfer function for buck
radian frequency
t
r
a
n
s
f
e
r
f
u
n
c
t
i
o
n
i
n
d
B
R
=
3
20 log
V
D
1
1 j
L
3
+ j ( )
2
L C +
(
(
(
1 10 100 1
.
10
3
1
.
10
4
1
.
10
5
4
2
0
phase for buck
radian frequency
p
h
a
s
e
f
o
r
R
=
3
arg Gvd ( ) ( )
The transfer function and phase plots of buck converter for R = 3, 5, 15 and 25.
1 10 100 1
.
10
3
1
.
10
4
1
.
10
5
20
0
20
40
60
80
transfer function of buck
radian frequency
T
r
a
n
f
e
r
f
u
n
c
t
i
o
n
d
B
66.865
18.981
20 log
V
D
1
1 j
L
3
+ j ( )
2
L C +
(
(
(
20 log
V
D
1
1 j
L
5
+ j ( )
2
L C +
(
(
(
20 log
V
D
1
1 j
L
15
+ j ( )
2
L C +
(
(
(
20 log
V
D
1
1 j
L
25
+ j ( )
2
L C +
(
(
(
1 10
5
1
1 10 100 1
.
10
3
1
.
10
4
1
.
10
5
3.5
3
2.5
2
1.5
1
0.5
0
phase for buck
radian frequency
p
h
a
s
e
(
R
=
3
,
5
,
1
5
,
2
5
)
2 10
6
3.141
arg
V
D
1
1 j
L
3
+ j ( )
2
L C +
(
(
(
arg
V
D
1
1 j
L
5
+ j ( )
2
L C +
(
(
(
arg
V
D
1
1 j
L
15
+ j ( )
2
L C +
(
(
(
arg
V
D
1
1 j
L
25
+ j ( )
2
L C +
(
(
(
1 10
5
1
I also use the buck voltage regulator example in the Appendix B of the Fundamental of Power
Electronics 2
nd
edition textbook to build the circuit in Pspice software. However, I test all the
different values for load resistors. Here is the circuit and it output.
At this moment, you know how to apply the student version of Pspice to build and run
simulation of your circuit. And you have some idea what is Pspice professional is. Let use a
professional Pspice to design a hearing aid or heart pacemaker. The figure below is a model of
your hearing aid circuit.
Since you are a professional design and your job or project is design a hearing aid. As a
design engineer have to design a circuit that work and especially meet your customer
specifications. If your circuit is not work correctly and not complete the requirements of your
customer then your customer will not satisfy with work design. Here are your customer
specifications.
An amplifier is to be realized that meets the following specifications:
1. A differential to single-ended voltage gain Ad > 30,000 (open loop, low-frequency, small-
signal) driving an off-chip load resistor RL of 5 kohms.
2. A output voltage swing: >3.5 V peak-to-peak driving RL = 5 kohms.
3. A unity gain bandwidth of > 16 MHz, with RL.
4. The input offset voltage Vos must satisfy VosAd < 100mV for your value of Ad, without RL.
5. The phase margin > 0 (i.e., ac stable) for the unity gain closed-loop configuration, with RL.
6. DC power dissipation and chip area should be minimized.
7. Your circuit should not depend on a precise value of supply voltage or temperature, but should
work properly with small variations in either (+/- 5%).
8. Veff should be no smaller than 150 mV, use Veff = 200 mV or larger if power consumption is
not a problem.
10. The minimum feature size (lambda) is 0.8 microns.
11. Calculate the total area of your design by adding the area of each transistor gate (LxW)
to the area of the resistors. The width and length of the transistors and resistors must be
multiples of 0.8 microns.
12. The minimum channel length is 1.6 microns and the minimum width is 2.4 microns.
Assume the minimum width of a resistor is 3.2 microns, with a sheet resistance of 80
ohms/square.
13. No capacitors are available. However, a MOSFET can be used as a capacitor.
14. All components are to be on chip, except the load RL and CL. No voltage or current
sources can appear on-chip.
15. Since this is a n-well process, you can tie the well (i.e, body) of a pMOSFET to the
source if you want. However, the area of that device is doubled (i.e., 2xLxW).
16. For purposes of calculating MOSFET capacitance, the area and perimeter of the active
regions of the transistors should be taken as follows (not counted as part of total area of
your design):
AS = AD = Wx(4.0 microns)
PS = PD = W+(8.0 microns)
To design a hearing aid by applies only an amplifier, which meets all the specification
above. You must use two stages amplifier that you learned in Electronic class (EE332) or analog
design circuit class (EE534). Since the gain is bigger than 30000V/V, the differential for the first
stage must bigger or equal to 100V/V and the second stage 300V/V. The first stage is a diff amp
stage and the second stage is a buffer stage. The buffer stage is applied a push and pull circuit
that explain very clearly in topic10 of analog design circuit class note or in any the micro-
Electronic circuit textbook. The unity gain bandwidth is greater than 16MHz. To able to make
the circuit stable and frequency is bigger than 16Mhz. Use the compensation capacitor or
feedback capacitor C in the second stage. The compensation capacitor calculated and apply value
should be less than 3pF. The circuit is a stable circuit, when the phase is less than or equal to
negative180 degree. The figure below is the complete of two stages ideal model design an
operational amplifier hearing aid.
When you have a circuit, which have more than 10 transistors. You must use the
Pspice_pro to build your circuit. As you remember at Colorado State University only had 15
licenses, and you can only open the professional window less than 15 minute. You can start build
your small circuit on the student version and run the simulation to check make sure your circuit
worked. After you completed all the small circuit and it simulation worked, put all your small
circuits into a Pspice_pro schematic page, save and run the simulation of the whole circuit. The
steps of save and run the simulations are the same as the student version of Pspice. The design
above is meets all the specification of the customer required. The figure below is the result of the
hearing aid design.
The figure below is the result of Pspice for transistor 10,11,15,and 14 of the circuit
NAME M_M11 M_M15 M_M14 M_M10
MODEL pMOS-JM nMOS-JM nMOS-JM pMOS-JM
ID -6.26E-06 5.87E-06 5.87E-06 -5.87E-06
VGS -1.14E+00 9.82E-01 1.02E+00 -1.14E+00
VDS -2.92E+00 1.00E+00 2.80E+00 -1.14E+00
VBS 0.00E+00 -5.87E-02 0.00E+00 0.00E+00
VTH -9.00E-01 8.17E-01 8.00E-01 -9.00E-01
VDSAT -2.40E-01 1.65E-01 2.19E-01 -2.40E-01
Lin0/Sat1 -1.00E+00 -1.00E+00 -1.00E+00 -1.00E+00
if -1.00E+00 -1.00E+00 -1.00E+00 -1.00E+00
ir -1.00E+00 -1.00E+00 -1.00E+00 -1.00E+00
TAU -1.00E+00 -1.00E+00 -1.00E+00 -1.00E+00
GM 5.22E-05 7.11E-05 5.35E-05 4.88E-05
GDS 2.24E-07 4.34E-07 3.83E-07 2.24E-07
GMB 2.49E-05 2.04E-05 1.60E-05 2.34E-05
CBD 1.12E-14 6.61E-15 3.04E-15 1.49E-14
CBS 2.17E-14 9.03E-15 5.44E-15 2.17E-14
CGSOV 1.92E-15 1.28E-15 6.40E-16 1.92E-15
CGDOV 1.92E-15 1.28E-15 6.40E-16 1.92E-15
CGBOV 0.00E+00 0.00E+00 0.00E+00 0.00E+00
CGS 1.80E-14 1.20E-14 5.99E-15 1.80E-14
CGD 0.00E+00 0.00E+00 0.00E+00 0.00E+00
CGB 0.00E+00 0.00E+00 0.00E+00 0.00E+00
Below is The Pspice result for the gain of the hearing aid and the answer is not in DB.
**** SMALL-SIGNAL CHARACTERISTICS
V(Vo)/V_Vin = 4.473E+04
INPUT RESISTANCE AT V_Vin = 1.000E+20
OUTPUT RESISTANCE AT V(Vo) = 4.830E+03
TOTAL POWER DISSIPATION 5.86E-04 WATTS
The calculation of hearing aid use MathCAD software
I11 It
w11
w5
|
\
|
|
.
:= I11 8.32 10
6
=
veff11
2 I11 ( )
upCox
w1
L
:=
veff11 0.344 =
VDS11 VDD veff11 Vtp0 + :=
VDS11 1.256 =
VGS11 VDS11 :=
VGS11 1.256 =
gm11
2 I11
veff11
:=
gm11 4.837 10
5
=
Av1 gm3
ro2 ro4
ro2 ro4 +
|
\
|
|
.
:=
Av1 52.957 =
Av2 gm6
ro6 ro7
ro6 ro7 +
|
\
|
|
.
:=
Av2 112.976 =
Av3 gm17 gm17 + ( ) RL :=
Av3 7.3 =
AV Av1 Av2 Av3 :=
AV 4.368 10
4
=
f3db
1
2 Rout Cc
:=
f3db 3.976 10
5
=
PM 90
1
tan
Wta
weq
|
\
|
|
.
:=
PM 86.084 =
fta 16 10
6
:= Hz
Wta 2 fta := Wta 1.005 10
8
=
weq 4 Wta := weq 4.021 10
8
=
Rout
ro16 ro17
ro16 ro17 +
:=
Rout 1.142 10
5
=
Power VDDI VSS I :=
Power 6.25 10
4
=
The Output swing voltage and DC Sweep voltage for Hearing aid circuit. The DC sweep uses to
determine the offset voltage of the circuit.
This design is more meets all require of the customer. The power is very small and area
of the chip is equal to 3.55E-10
m
2
. Therefore, this circuit is satisfying the customer.
After spend hours to design a beautiful circuit, sometime the circuit did not run. You
dont know what to check or do with your circuit. And sometime you went mad. Here are some
tips that you can do:
Making Sure You Have a GND: This is very important. You cannot do any simulation
on the circuit if you don't have a ground. If you aren't sure where to put it, place it near the
negative side of your voltage source.
Make sure Circuit wire correctly.
Make all the files that require are contain in your u. Check your setup of Pspice files.
Check the error message in the examine output file
For example, you dont have GND on your circuit. When you run the circuit, the errors
will appearance on your ORCAD Pspice A/D demo window. It is very easy to recognize,
because the red button is on and you have no result of graph or value. The figure below is
shown the error message on the ORCAD Pspice A/D demo window.
When this happened open your examine output file and read the error message
and correct your error. The error message are play at the end of the examine output file.
Here is a figure show error message in the examine output file.
The uses of a simulation software is an essential requirement to teaching electrical
engineering: Simulation technique gives results, when lacking sophisticated hardware for tasks
such as: current measurement in a transistor, calculation for Fourier transform of a signal,
measurement of magnetic fluxes. Students being what they are (and not what they should),
many phenomena are too complex for a theoretical presentation. Simulation allows the
presentation of findings when time is short for explanation. Simulation is increasingly used in
the industry; familiarizing student with its uses is therefore mandatory.
Since PSpice's strong point is that it helps the user simulate the circuit design
graphically on the computer before building a physical circuit. The designer can make any
necessary changes on the prototype without modifying any hardware. As soon as the test design
is completed. PSpice can help you run a check on it before deciding to commit yourself to
building a hard model. PSpice allows you to check the operability of the circuit model in real
life simulations to validate its viability. Since all the tests, designs and modifications are made
over a terminal, the designer can save a lot of money that would have otherwise been spent on
the building of models and modifying them.
Today, I have explained to you what the Pspice software is, and show you step by
steps how to create and run a circuit using Pspice software. Also show you step by steps how to
calculate the transfer and reasons why the Pspice used in circuit design. I hope that my paper will
help you understand more what the Pspice software is. And when someone ask you what is the
Pspice software, you can answer him/her question easily. Especially, when you interview for a
job.
Reference:
http://www.engr.colostate.edu/EE534/spice/spice_list.htm
http://www.engr.colostate.edu/academic/ece/PSpice/
http://denethor.wlu.ca/pc300/PSpice/pspice_tutorial.html#IIIE
http://rock.uta.edu/dillon/pspice/
http://www.glue.umd.edu/~oramahi/PSPICE-TUTORIAL.pdf
http://www.te.rl.ac.uk/europractice/vendors/cadence_pspice.pdf
http://www.yk.psu.edu/~dec147/eet101/pspqrc.pdf
http://www.stanford.edu/class/ee122/Spice_Decks/pspicedemo.pdf
http://www2.elen.utah.edu/~ee3110/Intro_to_Spice.pdf