Bode Plot & AC sweep in PSPICE A/D

Thread Starter

bluegreenpurple

Joined Apr 20, 2014
2
Good day,

Can someone assist me with my code? I am working in PSPICE A/D (no schematics). I am trying to obtain a bode plot from the following code:

------------------------------------------------------------------------
V3 1 0 DC 12V
V2 2 0 DC -12V
V1 3 0 SIN(0 100m 10k 0 0)
C1 3 4 47uF
R1 1 4 75k
R2 4 2 750k
Q1 1 4 5 npn
R3 5 2 3k
C2 5 6 47uF
R4 1 6 500k
R5 6 2 600k
Q2 7 6 8 npn
R6 1 7 1.9k
R7 8 2 65
C3 7 9 47uF
R8 1 9 185k
R9 9 2 700k
Q3 10 9 11 npn
R10 1 10 100
Q4 1 11 12 Q2N3055
R11 12 2 10
C4 12 13 47uF
R12 13 0 8
.tran 1ns 4ms
.MODEL npn NPN(BF=120 CJC=20pF CJE=20pF)
.MODEL Q2N3055 NPN(IS=4.66E-12 BF=360 VAF=100 IKF=0.25 ISE=3.339E-11
+ BR=2 ISC=5E-9 RB=3 IRB=0.001 RBM=0.4 RC=0.04 CJE=5.802E-10 VJE=1.2
+ MJE=0.45 TF=8E-8 XTF=1 ITF=3 PTF=120 CJC=2.121E-10 MJC=0.4 TR=2.55E-6
+ XTB=1 )
.probe
.op
.end
---------------------------------------------------------------------------------


I tried to do the AC sweep but my Vin which is labeled V1 is zero when I do the AC sweep... Here is what I coded for the AC sweep:


--------------------------------------------------------------------------------
V3 1 0 AC 12V
V2 2 0 AC -12V
V1 3 0 SIN(0 100m 10k 0 0)
C1 3 4 47uF
R1 1 4 75k
R2 4 2 750k
Q1 1 4 5 npn
R3 5 2 3k
C2 5 6 47uF
R4 1 6 500k
R5 6 2 600k
Q2 7 6 8 npn
R6 1 7 1.9k
R7 8 2 65
C3 7 9 47uF
R8 1 9 185k
R9 9 2 700k
Q3 10 9 11 npn
R10 1 10 100
Q4 1 11 12 Q2N3055
R11 12 2 10
C4 12 13 47uF
R12 13 0 8
*.tran 1ns 4ms
.MODEL npn NPN(BF=120 CJC=20pF CJE=20pF)
.MODEL Q2N3055 NPN(IS=4.66E-12 BF=360 VAF=100 IKF=0.25 ISE=3.339E-11
+ BR=2 ISC=5E-9 RB=3 IRB=0.001 RBM=0.4 RC=0.04 CJE=5.802E-10 VJE=1.2
+ MJE=0.45 TF=8E-8 XTF=1 ITF=3 PTF=120 CJC=2.121E-10 MJC=0.4 TR=2.55E-6
+ XTB=1 )
.AC DEC 20 20Hz 100megHz
.Print AC VM(13) VP(13)
.probe
.op
.end
-------------------------------------------------------------------------------------------------------------------------------------------------


I believe that I am missing something or coding Vin incorrectly, could someone please direct me into the right direction? I would greatly appreciate it. Thanks in advance for your help.
 

mvaseem

Joined Jan 31, 2014
48
You don't have AC source in your circuit. This is required to do AC analysis.
Change V1 to AC source. Also don't chnage the bias voltages V2, V3. Leave them DC.
See below code -

V3 1 0 DC 12V
V2 2 0 DC -12V
*V1 3 0 SIN(0 100m 10k 0 0)
V1 3 0 AC 1V
C1 3 4 47uF
R1 1 4 75k
R2 4 2 750k
Q1 1 4 5 npn
R3 5 2 3k
C2 5 6 47uF
R4 1 6 500k
R5 6 2 600k
Q2 7 6 8 npn
R6 1 7 1.9k
R7 8 2 65
C3 7 9 47uF
R8 1 9 185k
R9 9 2 700k
Q3 10 9 11 npn
R10 1 10 100
Q4 1 11 12 Q2N3055
R11 12 2 10
C4 12 13 47uF
R12 13 0 8
*.tran 1ns 4ms
.MODEL npn NPN(BF=120 CJC=20pF CJE=20pF)
.MODEL Q2N3055 NPN(IS=4.66E-12 BF=360 VAF=100 IKF=0.25 ISE=3.339E-11
+ BR=2 ISC=5E-9 RB=3 IRB=0.001 RBM=0.4 RC=0.04 CJE=5.802E-10 VJE=1.2
+ MJE=0.45 TF=8E-8 XTF=1 ITF=3 PTF=120 CJC=2.121E-10 MJC=0.4 TR=2.55E-6
+ XTB=1 )
.AC DEC 20 20Hz 100megHz
.Print AC VM(13) VP(13)
.probe
.op
.end
 

Thread Starter

bluegreenpurple

Joined Apr 20, 2014
2
Thanks for responding.

In order to change V1 to an AC source would I code as follows:

V1 3 0 AC 100mV

OR would I just leave the sinusoidal source out in order to do the AC sweep and produce the Bode Plot?

Thank you.
 

mvaseem

Joined Jan 31, 2014
48
AC analysis is a small signal analysis where the circuit is linearized about bias point. Having correct bias point is important in case of AC analysis, not the AC amplitude.
The AC source amplitude would act only a multiplier, but would not change the shape of output curve (bode plot -gain curve).

If you directly want to see the gain wrt freq, just leave the amplitude of AC as 1 and plot the output.
If you provide it something else, like 100mv, would need to divide the output plot by 100mv. This would lead to same curve as with 1V.
 
Top