AC Analysis
PSPICE Simulation
I()=I,
U()=U,
()=, etc
=const, E()=E
1
updated 2014.05.27
PSpice AC Simulation -Content
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
Single-frequency Analysis
Parameter Sweep ( = *= const)
Frequency Sweep ( = var)
Frequency Sweep with Variable Parameter
Impedance Frequency Characteristic
Resonant Frequency
Amplitude Response
Bode Plot, cut-off Frequency
Bandwidth, Half-power Frequencies
Parameter Sweep ( = var) Performance Analysis
Commonly used Goal Functions
Coupled Coils
Ideal Transformer
3-phase Circuit
Single-frequency Analysis
p
n
u
m
k
meg
Title Statement
xx
resistor Rxx X Y Value (in [] )
capacitor Cxx X Y Value (in [F] )
inductor Lxx X Y Value (in [H] )
Passive Element
Description
pico 10-12
nano 10-9
micro 10-6
mili 10-3
kilo 103
mega 106
e.g. 50u=50 10-6
Netlist
Statements
Vxx X Y AC Value1 Value2
or
Ixx X Y AC Value1 Value2
.AC LIN 1 Value3 Value3
Control
Statements
Source Description
Value1 = rms, in [A] or [V]
Value2 = phase, in [deg]
Value3 = frequency, in [Hz]
.PRINT AC Vy(X) Vy(X,Y) Iy(Vxx)
.END
y=M (magnitude)
y=P (phase)
Description of Outputs y=R (Re part)
y=I (Im part)
single frequency analysis, f =/(2) = const
Calculation of the DC bias point is always the first step of a PSpice run !!! see Problem AC2.0
Examplary Circuit
3
I ( j ) jX L
R
jX C
E ( j )
0
e 10 sin(314t 45o ) V E 10 / 2 7.09
f = 50
X L L 20 L 64m
X C 1 / C 10 C 318u
R 10
AC2 RLC
Circuit.cir
U R ( j ) 5 exp( j 0o ) 5 V
U L ( j ) 10 exp( j90 o ) j10
U C ( j ) 5 exp( j90 o ) j5
I( j)=0.5 A
exp180= 1
(passive s.c.)
4
Examplary Circuit Schematics
Draw Wire Get New Part
Create Circuit Diagram
using
Get New Part Browser and
Draw Wire
To enable PRINT add Printpoints:
VPRINT1: node voltage
VPRINT2: voltage between two nodes
IPRINT: current
https://www.youtube.com/watch?v=65j8sH8MwXc
Examplary Circuit Schematics
Set values of Circuit Parts
To enable PRINT (magnitude and phase) set:
AC=1, MAG=1, PHASE=1
Examplary Circuit Schematics
AC Sweep in Analysis Setup
set Start=End Frequency
Examplary Circuit Schematics
Save File, then
N1
Simulate
Schematics assigns nodes automatically
The assignment can be found in the Netlist
(Analysis: Examine Netlist, Output File)
N4
N2
N3
It is possible to assign another label
by double clicking on the node
N1
N4
N2
C
8
N3
Examplary Circuit Schematics
when Simulation is completed:
Netlist and Results may be viewed in
Output File
AC2 RLC Circuit
VIN 3 0 AC 7.09 45
R1 1 2 10
L1 2 3 64m
C1 0 1 318u
.AC LIN 1 50 50
.PRINT AC V(3,2) VP(3,2) V(2,1) V(1,0) V(2,0) I(VIN) IP(VIN)
.END
3
L
N1
N4
N2
C
9
N3
Examplary Circuit Schematics
AC ANALYSIS
TEMPERATURE = 27.000 DEG C
******************************************************************************
FREQ
VM($N_0002) VP($N_0002)
U C ( j ) 5 exp( j90 o ) j5
5.000E+01 4.994E+00
-9.028E+01
******************************************************************************
FREQ
VM($N_0004) VP($N_0004)
U N4 ( j ) 7.06 exp( j 45)V
5.000E+01 7.059E+00
-4.530E+01
******************************************************************************
FREQ
VM($N_0001,$N_0004) VP($N_0001,$N_0004)
U L ( j ) 10 exp( j 90o ) j10
5.000E+01
1.003E+01
8.973E+01
******************************************************************************
FREQ
VM($N_0004,$N_0002) VP($N_0004,$N_0002)
U R ( j ) 5 exp( j 0o ) 5 V
5.000E+01
4.989E+00
-2.750E-01
******************************************************************************
FREQ
IM(V_PRINT10) IP(V_PRINT10)
5.000E+01
4.989E-01
-2.750E-01
N1
N4
N2
I ( j ) 0.5A
PSPICE Problems\TR\RLCall.sch
10
N3
AC2.0 Find indication of the voltmeter, if C=1F, R=2k and u 10 sin 1000t V.
3
uV
AC2.0
VIN 3 0 AC 7.09 0
R 2 1 2k
AC2.0.cir
C2 2 3 1u
C1 0 1 1u
.AC LIN 1 159.24 159.24
.PRINT AC V(2,1) I(VIN)
.END
ERROR -- Node 2 is floating
ERROR -- Node 1 is floating
Some large resistance,
eg. 10MEG, must be
connected in parallel
with one the capacitors
uV
R
AC2.0 corrected
VIN 3 0 AC 7.09 0
R 2 1 2k
AC2.0
C2 2 3 1u
corrected.cir
C1 0 1 1u
Rinf 0 1 10MEG
.AC LIN 1 159.24 159.24
.PRINT AC V(2,1) I(VIN)
.END
In DC analysis capacitor is an o.c.
FREQ
V(2,1)
I(VIN)
Nodes with no DC path to ground aren't allowed in
1.592E+02 5.015E+00 2.507E-03
PSpice !!!
Calculation of the DC bias point is always the first step of a PSpice run !!!
AC2.14 Find the phase shift between the source voltage u and its current i, if R=2 k, XL=2k,
|XC |=1k, u=102sin(10000t)V, time in seconds.
i
1
Y ( j )
R
1
Y ( )e j ( )
j
X
X
C
L
1
45
u i arctan R
X C X L
u 0 i 45
PSPICE Problems\AC\AC2.14''.cir
AC2.14''
Vin 1a 0 AC 10 0
Rt 1a 1 0.001
R 1 0 2k
L 1 0 0.2
C 1 0 0.1u
.AC LIN 1 1592 1592
.PRINT AC IP(Vin)
.END
FREQ
IP(Vin)
1.592E+03 -1.350E+02
Source satisfies passive
sign convention, then:
i 135 180 45
12
Parameter Sweep ( = *= const)
It is possible to visually verify, in PROBE, the Circuit response Y(*)=y(Z) :
Output Variable or function built of Variables, using Analog Operators and Functions,
by performing a sweep of a parameter Z (R, C or L)
X(j*)
Y(*)=y(Z)
E(j*) or J(j*)
n
m
Z=var
Design parameter sweep in the Netlist
.MODEL ZMOD ZZZ(Z=1)
Z= C or L or R
.STEP DEC ZZZ ZMOD(Z) Start Stop Increments/Dec ZZZ=CAP or IND or RES
Z n m ZMOD 1
------------------------------------------------------------------.AC LIN 1 F1 F2=F1
Parameter Sweep ( = *= const), cont.
After pressing run Simulation, from Available Selections select All
Parameter Sweep ( = *= const), cont.
Frequency sweep will appear, then select Performance Analysis.
Parameter Sweep ( = *= const), cont.
Frequency sweep will appear, then select Performance Analysis. Frequency will be
replaced by ZMOD (Z); Z=C or L or R
Parameter Sweep ( = *= const), cont.
Press Add Trace, then complete Trace Expression:
single Simulation Output Variable or function built of Output Variables,
using Analog Operators and Functions
or
Sizing a capacitor for the PFC
U 200V, f 50Hz, P 2kW, pf 0.7
see AC2.40
R 10 ; L 32mH
I ( j )
I L ( j )
I C ( j )
jL
Rl
1 U ( j )
U in ( j )
AC2 PFC C Sweep
Vin 1 0 AC 200
Rl 1 2 0.1 . line resistance
.MODEL CMOD CAP(C=1) .............................
C 2 0 CMOD 1 ............
.STEP DEC CAP CMOD(C) 0.1u 500u 1000 .
*
Start Stop Points/Decade
L 2 3 32m
R 3 0 10
.AC LIN 1 50 50
.PROBE
.END
For properly sized Capacitor:
= u i = 0
I=Imin, Pl=Pl,min
1
C
R
0
CAP MODEL coding
CAP MODEL invoking
CAP SWEEP specification
I ( j )
U ( j )
I C ( j )
I L ( j )
18
Sizing a capacitor for the PFC
U in 200V, f 50Hz; Rline 0.1
R 10 ; L 32mH
I ( j )
Rline
1a
I L ( j )
I C ( j )
jL
U ( j )
U in ( j )
P=Rline I(f)2=F(C)
Performance
Analysis
Add
Trace
1
C
Toggle
Cursor
Cursor
Min
AC2 PFC C Sweep
Vin 1 0 AC 200
Rt 1 2 0.1
.MODEL CMOD CAP(C=1)
C 2 0 CMOD 1
.STEP DEC CAP CMOD(C) 0.1u 500u 1000
L 2 3 32m
R 3 0 10
.AC LIN 1 50 50
.PROBE
.END
AC2 PFC C Sweep.cir
Sizing a capacitor for the PFC
U 200V, f 50Hz, P 2kW, pf 0.7
see AC2.40
R 10 ; L 32mH
(C)=ui(C)
I ( j )
I L ( j )
jL
Rl
U in ( j )
1 U ( j )
I C ( j )
1
C
R
0
AC2 PFC C Sweep fi=0
Vin 1 0 AC 200
Rt 1 2 0.1
.MODEL CMOD CAP(C=1)
C 2 0 CMOD 1
.STEP DEC CAP CMOD(C) 0.1u 500u 1000
L 2 3 32m
R 3 0 10
.AC LIN 1 50 50
.PROBE
AC2 PFC C Sweep
.END
fi=0.cir
20
Sizing a capacitor for the PFC: Schematics
1. Create Circuit Diagram using Get New Part Browser and Draw Wire
2. Set values of Circuit Parts, for C1 set {Cvar}
3. Get PARAM Part and set NAME1=Cvar, VALUE1=1u (arbitrary)
Sizing a capacitor for the PFC: Schematics
4. Analysis Setup
AC Sweep:Total Pts=1; Start=End Frequency=50
Parametric: Global; Name=Cvar; Decade; Start=0.1u End=500u, Pts/Dec=1000
5. Save File
6. Simulate,
when completed select All
7. Analysis: Examine Netlist
22
Sizing a capacitor for the PFC: Schematics
8. Add Plot to Window, Add Traces: P(V1(C1)) P(I(Rl)) and I(Rl), then, for
=P(V1(C1)) P(I(Rl)): Cursor Search and search forward level (0);
I=I(Rl): Cursor Min
I(C)
PSPICE Problems\PSpice Schematics\PFC Capacitor.sch
(C)=ui(C)
C
23
AC4.6c For the RC circuit sketch the gain K()=U2()/U1() in terms of C (frequency and
resistance are fixed). Size C, such that the cut-off frequency fc=1kHz for R=1592.
1
1
fc
C
100nF
2 RC
2f c R
K(1kHz)
U 1 ( j ) 1
1
j C
U 2 ( j )
0
AC5 Filter RC var C
VIN 1 0 AC 1 0
R 2 1 1592
.MODEL CMOD CAP(C=1)
.STEP DEC CAP CMOD(C) 0.01u 99u 100
C 2 0 CMOD 1
.AC LIN 1 1k 1k
.PROBE
.END
PSPICE
Problems\AC\AC5
Filters\AC5 Filter
RC var C.cir
24
AC4.6d For the CR circuit sketch the gain K()=U2()/U1() in terms of C (frequency and
resistance are fixed). Size C, such that the cut-off frequency fc=1kHz for R=1592.
1
1
j C
U 1 ( j ) 1
U 2 ( j )
R
fc
1
1
C
100nF
2 RC
2f c R
K(1kHz)
PSPICE
Problems\AC\AC5
Filters\AC5 Filter
CR var C.cir
AC5 Filter CR var C
VIN 1 0 AC 1 0
R 2 0 1592
.MODEL CMOD CAP(C=1)
.STEP DEC CAP CMOD(C) 1n 9.9u 100
C 2 1 CMOD 1
.AC LIN 1 1k 1k
.PROBE
.END
25
Frequency Sweep ( = var)
Title Statement
xx
p
n
u
m
k
meg
resistor Rxx X Y Value (in [] )
capacitor Cxx X Y Value (in [F] )
inductor Lxx X Y Value (in [H] )
Passive Element
Description
pico 10-12
nano 10-9
micro 10-6
mili 10-3
kilo 103
mega 106
e.g. 50u=50 10-6
Vxx X Y AC Value1 Value2
or
Ixx X Y AC Value1 Value2
.AC LIN
F1
F2
.AC DEC ND F1
F2
or
.PRINT AC Vy(X) Vy(X,Y) Iy(Vxx)
or
.PLOT AC Vy(X) Vy(X,Y) Iy(Vxx)
Control
Statements .PROBE
Source Description
Value1 = rms, in [A] or [V]
Value2 = phase, in [deg]
N=number of frequencies
ND=number of frequencies in decade
F1,F2 = frequencies, in [Hz]
Description of Outputs
Netlist
Statements
y=M (magnitude)
y=P (phase)
y=R (Re part)
y=I (Im part)
.END
Remember: Calculation of the dc bias point is always the first step of a Pspice run !!!
RLC Circuit
1
3
0.1H
1V
10F
10
Q
fr
1 L
10
R C
1
2 LC
160 Hz
AC4 Filter
RLC.cir
AC4 Filter
RLCdec.cir
10 frequencies
5 intervals/decade
.AC LIN N
F1 F2
fi= F1+(F2F1)(i 1)/(N1); i=1,...,N
.AC DEC ND
F1 F2
27
fi= F110 (i1)/ND; i=1,...,N=0.1F2/F1+1
RLC Circuit
PSPICE
Problems\AC\AC4
Filter RLCdec
PROBE.cir
3
0.1H
1V
10F
10
I(f)
Filter RLC PROBE
VIN 1 0 AC 1 0
R 2 0 10
L 1 3 0.1
C 3 2 10u
.AC DEC 500 10 10k
.PROBE
.END
28
RLC Circuit: Schematics
Draw Wire Get New Part
Create Circuit Diagram
using
Get New Part Browser and
Draw Wire
Set values of Circuit Parts
https://www.youtube.com/watch?v=daJ3CSidBKI
RLC Circuit: Schematics
AC Sweep in Analysis Setup
set Pts/Decade, Start & End Frequency
RLC Circuit: Schematics
Save File, then
Simulate
N3
N2
N1
N3
N1
0.1H
1V
N2
10F
10
Schematics assigns nodes automatically
Assignment can be found in the Netlist
(Analysis: Examine Netlist or Output File)
RLC Circuit: Schematics
when Simulation is completed:
Netlist may be viewed in Output File
Frequency sweep displayed in PROBE
after adding Trace
N3
PSPICE
Problems\AC\RLC
sweep.sch
N1
0.1H
1V
N2
10F
10
0
Filter RLC PROBE
VIN 1 0 AC 1 0
R 2 0 10
L 1 3 0.1
C 3 2 10u
.AC DEC 500 10 10k
.PROBE
.END
3
0.1H
1V
10F
10
RLC Circuit: Schematics
** Analysis setup **
.ac DEC 500 10 10k
* From [PSPICE NETLIST] section of pspiceev.ini:
.lib "nom.lib
.INC "RLC sweep.net"
I(f)
N1
N3
0.1H
1V
N2
10F
10
**** INCLUDING "RLC sweep.net" ****
* Schematics Netlist *
C_C1
L_L1
V_V1
R_R2
$N_0001 $N_0002 10uF
$N_0003 $N_0001 0.1H
$N_0003 0 DC 0V AC 1V 0
$N_0002 0 10
33
Frequency Sweep with Variable Parameter
It is possible to visually verify, in PROBE, the Circuit frequency response Y():
Output Variable or function built of Variables, using Analog Operators and Functions,
for few values of the Circuit parameter Z (R, C or L)
X(j)
Y()
E(j) or J(j)
n
m
Z=var
Design parameter sweep and frequency sweep in the Netlist
.MODEL ZMOD ZZZ(Z=1)
.STEP LIN ZZZ ZMOD(Z) Start Stop Increment; or
.STEP DEC ZZZ ZMOD(Z) Start Stop Incr/Dec
Z n m ZMOD 1
-------------------------------------------------------------.AC LIN N F1 F2; or .AC DEC ND F1 F2
Z= C or L or R
ZZZ=CAP or IND or RES
Frequency Sweep with Variable Parameter, cont.
After pressing run Simulation, from Available Selections select few values: for
LIN: Start, Stop and selectected values designated by the Increment,
set Increment such that these values are available or
DEC: Start, Stop and selectected values for the set Incr/Dec=1
Frequency Sweep with Variable Parameter, cont.
Press Add Trace, then complete Trace Expression:
single Simulation Output Variable or function built of Output Variables,
using Analog Operators and Functions
or
RLC Circuit, UR : variable R
UR for:
R=10: Q=10; R=20: Q=5; R=50: Q=2; R=100: Q=1
Filter RLC
VIN 1 0 AC 1 0
.MODEL RMOD RES(R=1)
.STEP RES RMOD(R) 10 100 10
R 2 0 RMOD 1
L 1 3 0.1
C 3 2 10u
.AC LIN 100 40 400
.PROBE
.END
AC4 Filter
RLC,
Rvar.cir
3
0.1H
1V
10F
R
R=100
R=50
R=20
R=10
37
AC5.1c Find the gain K()=U2()/U1() of the given band-pass filter: R=1k, C=10F,
L=100mH, loaded by the Rl=400, 4k, 40k resistance, at cut-off frequencies.
R
U1 (j)
Filter R LCpar loaded, var R
VIN 1 0 AC 1 0
.MODEL RMOD RES(R=1)
.STEP DEC RES RMOD(R) 400 40k 1
R 1 2 1k
L 2 0 0.1
C 2 0 10u
Rl 2 0 RMOD 1
.AC DEC 1000 10 1000
.PROBE
.END
Filter R LCpar loaded,
var R.cir
U2(j)
Rl
K max
Rl =40k
Kmax=0.98
Rl =4k
Kmax=0.8
Rl =0.4k
Kmax=0.29
Rl
R Rl
AC5.1c For the sketched tank filter study the bandwidth as a function of the capacitance.
Parameter (capacitance) sweep: C=0.1, 1, 10 F
1
2
U2 (j)
U1 (j)=1
Filter R LCpar C sweep
Vin 1 0 AC 1 0
R 1 2 100
L 2 0 0.1
.MODEL CMOD CAP(C=1)
.STEP DEC CAP CMOD(C) 0.1u 10u 1
C 2 0 CMOD 1
.AC DEC 100 1 100k
Q
.PROBE
.END
K(f)
parallel RLC circuit:
quality factor
Q
1 C
G L
10F
Q
1F
0.1F
Filter R LCpar
C sweep.cir
f
39
AC5.1c For the sketched tank filter study the bandwidth as a function of the capacitance.
Schematics: Parametric Analysis Setup
AC5.1c For the sketched tank filter study the bandwidth as a function of the capacitance.
K(f)
10F
1F
0.1F
PSPICE Problems\PSpice Schematics\Tank Filter.sch
AC5.1c For the sketched tank filter study the bandwidth as a function of the capacitance.
Schematics: Parametric Performance Analysis Setup
AC5.1c For the sketched tank filter study the bandwidth as a function of the capacitance.
Performance Analysis
Add Trace, Goal Function: Bandwidth(V$N_0001),3)
AC5.1c For the sketched tank filter study the bandwidth as a function of the capacitance.
f(C)
1
f
2CR
PSPICE Problems\PSpice Schematics\Tank Filter Bandwidth.sch
C F
0.1
10
f kHz
15.9
1.59
0.159
AC5.1k Find bandwidth of the RLC band-pass filter, in Hz, if C=10F; L=0.1H; R=100.
PSPICE
Problems\AC\AC4
Filter RLC
bandwidth, L=var.cir
R
u l
Q L
R
159 Hz
2L
C=0.1F:
fr=1592Hz
C=1F:
fr=505Hz
3
0.1H
1V
10F
R=100
0
Filter RLC bandwidth, L=var
VIN 1 0 AC 1 0
R 2 0 100
.MODEL CMOD CAP(C=1)
.STEP DEC CAP CMOD(C) 0.1u 10u 1
C 3 2 CMOD 1
L 1 3 0.1
.AC LIN 1000 40 400
.PROBE
.END
C=10F:
fr=159Hz
45
AC5.1k Find bandwidth of the RLC band-pass filter, in Hz, if C=10F; L=0.1H; R=var.
Schematics: Parametric Analysis Setup
AC5.1k Find bandwidth of the RLC band-pass filter, in Hz, if C=10F; L=0.1H; R=var.
R
f
2L
f(R)
PSPICE Problems\PSpice
Schematics\CLRvarfvar.sch
K(f)
1k f Hz
100
316
1000
159
502
1590
316
100
f
47
Practical Coil Impedance
2
1
RL
CL
Rt
mAC4 Practical
Coil
AC4 Practical Coil
VIN 3 0 AC 1 0
Rt 3 1 10
L 2 0 100m
CL 1 0 0.1p
RL 1 2 10
.AC DEC 1000 0.01 10000MEG
.PROBE
.END
L=0.1 H, RL=10
CL=0.1 pF :
r=107 rad/sec, fr=1.6 MHz
fr=1.6 MHz
48
Practical Capacitor - Impedance
C=1 F, RC=5 M
LC
C
RC
AC4 Practical
Capacitor
RC=5M
AC4 Practical Capacitor
VIN 1 0 AC 1 0
L 1 2 0.01u
C 2 0 1u
Rl 2 0 5MEG
.AC DEC 1000 0.001 1000MEG
.PROBE
.END
LC=10 nH :
r=107 rad/sec, fr=1.6 MHz
fr=1.6 MHz
49
AC3.1b For the circuit shown: C=1nF; L=0.1mH; R=1k, find 1) the resonant frequency r ;
2) impedance Z(r) ; 3) rms current I(r), for the rms supply voltage of 1V.
1
L
C
AC3.1b cont
VIN 1 0 AC 1 0
L 1 2 0.1m
C 2 0 1n
R 2 0 1k
.AC DEC 100 10k 1MEG
.PROBE
.END
i(f)
current leads voltage capacitive character
50
477kHz
AC3.1b For the circuit shown: C=1nF; L=0.1mH; R=1k, find 1) the resonant frequency r ;
2) impedance Z(r) ; 3) rms current I(r), for the rms supply voltage of 1V.
1
AC3.1b cont imp.cir
L
C
AC3.1b cont
VIN 1 0 AC 1 0
L 1 2 0.1m
C 2 0 1n
R 2 0 1k
.AC DEC 100 10k 1MEG
.PROBE
.END
Z(f)
minimum not exactly at the resonant frequency
i(f)
51
477kHz
AC3.1b For the circuit shown: C=1nF; L=0.1mH; R=1k, find 1) the resonant frequency r ;
2) impedance Z(r) ; 3) rms current I(r), for the rms supply voltage of 1V.
1
L
C
PSPICE
Problems\AC\AC3.1
b cont rms
current.cir
AC3.1b cont rms current
VIN 1 0 AC 1 0
L 1 2 0.1m
C 2 0 1n
R 2 0 1k
.AC DEC 1000 10k 1MEG
.PROBE
.END
I(f)
i(f)
52
AC3.7a The series RLC circuit, R=10, L=100mH, C=10F is connected to 10V rms source of
adjustable frequency. Determine the source frequency for unity power factor.
PSPICE
Problems\AC\AC4.7
Filter RLC pf'.cir
I ( j )
1
3
jL
U ( j )
j1 /(C )
2
R
AC4.7 Filter RLC pf'
VIN 1 0 AC 10 0
R 2 0 10
L 1 3 0.1
C 3 2 10u
.AC LIN 400 1 400
.PROBE
.END
pf ( f r ) 1
i in radians i / 180
pf ( f ) cos[arctan ( X ( f ) / R)] cos[i ( f ) / 180]
leading power factor
capacitive character
i ( f ) in degrees
lagging power factor
inductive character
53
AC3.7b The series RLC circuit, R=10, L=100mH, C=10F is connected to 10V rms source of
adjustable frequency. Determine the maximum real power supplied by the source, in W.
PSPICE
Problems\AC\AC4.7
Filter RLC P,Q.cir
I ( j )
1
3
jL
U ( j )
j1 /(C )
AC4.7 Filter RLC pf'
VIN 1 0 AC 10 0
R 2 0 10
L 1 3 0.1
C 3 2 10u
.AC LIN 400 1 400
.PROBE
.END
P( f ) max
U
U
2
P( f r ) I max
R R
10W
R
R
P( f )
U2
R 2 (L 1 / C ) 2
I ( f ) 2 R I ( f )U
54
Multiple-resonance - Examplary Circuit
r1
1
10 4 rad/s f r1 1590 Hz
L2C
r 2
L1 L2
104 2 rad/s f r 2 2250 Hz
L1L2C
5 7
U()/I()=Z())
1
jX L1
I ( j )
U ( j )
jX L1
jX C
0
AC4 Multiple-resonance
I 0 1 AC 1 0
R 1 0 1k
AC4 MultipleL1 1 2 10m
resonance.cir
C 2 0 1u
L2 2 0 10m
.AC LIN 1000 10 10k
.PROBE
.END
55
Frequency Response of RC Circuit, LIN
U1(f)=1
K(f)=U2(f)
U 2 ( )
1
K ( )
; 2f
2
U1 ( )
1 (T )
f
U2(f)
fc=159.2
1/ 2
AC5 Filter RC.cir
1
R
U1 ( j )
1
j C
U 2 ( j )
0
R 1 k, C 1F f c
1
1
159.2 Hz
2T 2RC
AC5 Filter RC
VIN 1 0 AC 1 0
R 2 1 1k
C 2 0 1u
.AC LIN 100 10 2k
.PLOT AC VM(2)
.PROBE
.END
56
Frequency Response of RC Circuit, DEC
1
K ( )
U1(f)=1
1 (T )
K(f)=U2(f)
; 2f
AC5 Filter RCdec.cir
1
R
U1 ( j )
1
j C
U1 ( j )
0
f
U2(f)
fc=159.2
1/ 2
AC5 Filter RC.dec
VIN 1 0 AC 1 0
R 2 1 1k
C 2 0 1u
.AC DEC 10 10 10k
.PLOT AC VM(2)
.PROBE
.END
R 1 k, C 1F f c 159.2 Hz
57
Bode Plot of RC Circuit, cut-off frequency
K dB ( f ) 20 log
U2 ( f )
20 log 1 (2fT ) 2 20 log U 2 ( f ) U1 ( f )1
U1 ( f )
3dB
U 2 ( j )
R
U1 ( j )
1
j C
0
AC5 Filter RC
Bode.cir
20dB/Dec
R 1592, C 1F f c
1
1
100Hz
2T 2RC
AC5 Filter RC Bode
VIN 1 0 AC 1 0
R 2 1 1592
C 2 0 1u
.AC DEC 10 10 10k
.PLOT AC VM(2)
.PROBE
.END
58
AC4.10d For the given RC circuit, find a) the cut-off frequency and b) the dB gain at 1KHz
frequency: KdB(1kHz).
22
1
1
R
U1 ( j )
1
j C
K ( j )
U 2 ( j )
R
fc
1/ 2
, T RC / 2
1 jT
c
1
1
318 Hz
2 2 T RC
K ( )
1/ 2
1 (T ) 2
R 1k, C 1F
AC4.10d Filter RC.dec
VIN 1 0 AC 1 0
R 2 1 1k
C 2 0 1u
Rout 2 0 1k
.AC DEC 10 10 10k
.PROBE
.END
6dB
KdB ( ) 20 log 1 / 2 20 log 1 (T ) 2
Logaritmic (dB) scale
or
AC4.10d For the given RC circuit, find a) the cut-off frequency and b) the dB gain at 1KHz
frequency: KdB(1kHz).
2
1
AC4.10d Filter RC.dec
1/ 2
R
U 2 ( j )
VIN 1 0 AC 1 0
K ( )
1
R 2 1 1k
R
1 (T ) 2
U
(
j
)
j C
1
C 2 0 1u
K (0) K max 0.5
K ( fc )
Rout 2 0 1k
.AC DEC 10 10 10k
.PROBE
.END
1/ 2
0.353
2
Linear scale
fc
c
1
1
318 Hz
2 2 T RC
0
PSPICE
Problems\AC\AC4.10d
Filter RC dec.cir
AC4.10e For the given RC circuit, find the cut-off frequency. C=1F, R=Rl=1k.
I in 0
U in ( )
C
U1 ( )
+
U out ( ) U 2 ( )
I in 0
Rl
k=1
U1 ( )
U out ( ) U 2 ( )
U in ( )
Rl
The op-amps low output impedance prevents the filters cut-off frequency point
from being affected by changes in the impedance of the load
AC4.10e For the given RC circuit, find the cut-off frequency. C=1F, R=Rl=1k.
U1 ( )
1a
U in ( )
U 2 ( )
U in ( )
Rl
K () K max 1
fc
1
2 T
1
159 Hz
2 RC
AC4.10e Filter CR oa
VIN 1 0 AC 1 0
R 1a 0 1k
C 1 1a 1u
E 2 0 1a 0 1
Rout 2 0 1k
.AC DEC 10 10 10k
.PROBE
.END
The load resistance does not affect neither, the maximum gain and the cut-off
62
frequency
AC5.1a Find bandwidth of the RLC band-stop filter, in Hz, if C=10F; L=0.1H; R=100.
Filter RLC B-s bandwidth
VIN 1 0 AC 1 0
R 1 2 100
L 0 3 0.1
C 3 2 10u
.AC LIN 1000 40 400
.PROBE
.END
R
u l
Q L
2
U1(j)=1
R
f
159 Hz
2L
AC4 Filter RLC B-s
bandwidth.cir
U2(j)
K(f)=U2(f)
Linear scale
63
AC5.1a Find bandwidth of the RLC band-stop filter, in Hz, if C=10F; L=0.1H; R=100.
Filter RLC B-s bandwidth
VIN 1 0 AC 1 0
R 1 2 100
L 0 3 0.1
C 3 2 10u
.AC LIN 1000 40 400
.PROBE
.END
R
u l
Q L
2
U1(j)=1
R
f
159 Hz
2L
U2(j)
KdB(f)=20logU2(f)
dB scale
AC4 Filter RLC B-s
bandwidth db.cir
64
AC5.1k Find bandwidth of the RLC band-pass filter, in Hz, if C=10F; L=0.1H; R=100.
Filter RLC bandwidth
VIN 1 0 AC 1 0
R 2 0 100
L 1 3 0.1
C 3 2 10u
.AC LIN 1000 40 400
.PROBE
.END
R
u l
Q L
R
159 Hz
2L
3
0.1H
1V
10F
R=100
0
AC4 Filter RLC
bandwidth GF.cir
dB scale
65
Parameter Sweep ( = var) Performance Analysis
It is possible to visually verify, in PROBE, the Goal Function as function of the Circuit
parameter: g=h(Z); Z=R, C or L, by performing a parameter sweep for a frequency sweep
design specification (optional)
X(j)
g=h(Z)
E(j) or J(j)
n
Z=var
Design parameter sweep and frequency sweep in the Netlist
.MODEL ZMOD ZZZ(Z=1)
Z= C or L or R
.STEP DEC ZZZ ZMOD(Z) Start Stop Increments/Dec ZZZ=CAP or IND or RES
Z n m ZMOD 1
-----------------------------------------------------------------.AC LIN N F1 F2; or .AC DEC ND F1 F2
Parameter Sweep Performance Analysis, cont.
After pressing run Simulation, from Available Selections select All
Parameter Sweep Performance Analysis, cont.
Frequency sweep will appear, then select Performance Analysis.
Parameter Sweep Performance Analysis, cont.
Frequency sweep will appear, then select Performance Analysis. Frequency will be
replaced by ZMOD (Z); Z=C or L or R
Parameter Sweep ( = *= const), cont.
Press Add Trace, then select Goal Function and complete Trace Expression, using
the selected Simulation Output Variable and the design specification, optionally
or
Commonly used Goal Functions
XatNthY(Y,value,n)
Determines the X position(s), usualy time or frequency, at which the
trace crosses a given threshold the n-th time if n=1, then the 1st time
YatX(X,value)
Determines the Y position, at which the trace argument, usualy time or
frequency, is equal the set value
ZPBW(Y,3); Z=L(ow), H(igh), B(and)
Determines the 3dB bandwidth of the ZPass Filter, where Y=K=Vout
is the voltage gain (Vin=1)
Bandwidth(Y,3), same as BPBW
CenterFreq(Y,3)
Determines the Center frequency of the 3dB Pass Band
AC4.6d For the CR circuit sketch the cut-off frequency in terms of R (capacitance is fixed:
C=100nF). Size R, such that the cut-off frequency fc=1kHz .
1
1
j C
U1 ( j ) 1
U 2 ( j )
R
0
fc(R)=XatNthY(V(2),0.7071,1)
PSPICE
Problems\AC\AC5
Filters\AC5 Filter CR
var R'.cir
1
fc
f K 0.7071
fc=1kHzR=1.592k
2 RC
AC5 Filter CR var R
VIN 1 0 AC 1 0
R 2 0 RMOD 1
.MODEL RMOD RES(R=1)
.STEP DEC RES RMOD(R) 0.1k 99k 100
C 2 1 100n
.AC DEC 100 10 20k
.PROBE
.END
R
72
AC4.6d For the CR circuit sketch the cut-off frequency in terms of R (capacitance is fixed:
C=100nF). Size R, such that the cut-off frequency fc=1kHz .
Schematics:
Parametric Analysis Setup
AC4.6d For the CR circuit sketch the cut-off frequency in terms of R (capacitance is fixed:
C=100nF). Size R, such that the cut-off frequency fc=1kHz .
Performance Analysis
Add Trace, Select Goal Function: fc(R)=XatNthY(V($N_0001),0.7071,1)
AC4.6d For the CR circuit sketch the cut-off frequency in terms of R (capacitance is fixed:
C=100nF). Size R, such that the cut-off frequency fc=1kHz .
Search Cursor
search forward level (1k)
fc(R)=XatNthY(V($N_0001),0.7071,1)
PSPICE Problems\PSpice Schematics\CRvarfvar.sch
AC5.1k Find bandwidth of the RLC band-pass filter, in Hz, if C=10F; L=0.1H; R=100.
PSPICE
Problems\AC\AC4
Filter RLC
bandwidth, C=var.cir
R
u l
Q L
f=BPBW(V(2),3)
R
159 Hz
2L
3
0.1H
1V
10F
R=100
0
Filter RLC bandwidth, C=var
VIN 1 0 AC 1 0
R 2 0 100
.MODEL CMOD CAP(C=1)
.STEP DEC CAP CMOD(C) 0.1u 10u 100
C 3 2 CMOD 1
L 1 3 0.1
.AC DEC 1000 10 10k
.PROBE
.END
76
AC5.1k Find bandwidth of the RLC band-pass filter, in Hz, if C=10F; L=0.1H; R=100.
PSPICE
Problems\AC\AC4
Filter RLC
bandwidth, var L.cir
R
u l
Q L
f=BPBW(V(2),3)
R
159 Hz
2L
3
0.1H
1V
10F
R=100
0
Filter RLC bandwidth,var L
VIN 1 0 AC 1 0
R 2 0 100
.MODEL LMOD IND(L=1)
.STEP DEC IND LMOD(L) 0.001 0.99 100
C 3 2 10u
L 1 3 LMOD 1
.AC DEC 1000 10 100k
.PROBE
.END
77
AC5.1c Find the gain K()=U2()/U1() of the given band-pass filter: R=1k, C=10F,
L=100mH, loaded by the Rl=4k resistance, at cut-off frequencies.
R
U1 (j)
K max
Rl
/ 2
0.8 / 2 V/V
2 ( R Rl )
U2(j)
Rl
Filter R LCpar
loaded.cir
Coupled Coils
3
1
Z t ( j )
I1 ( j )
U1 ( j )
jL1
Eo ( j )
jM
I 2 ( j ) 2
U 2 ( j )
Z l ( j )
jL2
L1=10 mH, L2=2.5 mH, M=3 mH
The coupling coefficient k (k must be larger than 0 but smaller than 1):
k M / L1L2 0.6
The DOTS are always associated with the first node of the inductances
(i.e. node no. 1 of L1 and no. 2 of L2).
L1 1 0 10m
L2 2 0 2.5m
k L1 L2 0.6
PSpice will assign the positive node voltage to the first node of the inductance (i.e. the
DOT) and use the passive sign convention for the current direction.
Coupled Coils
Examplary Circuit
3
I1 ( j )
jM
I 2 ( j ) 2
Coupled Coils
Vo 3 0 AC 10 0
Rt
U 2 ( j )
U1 ( j )
Rt 3 1 0.01
Rl
jL2
jL1
Rl 2 0 500
Eo ( j )
Coupled
L1 1 0 10m
Coils.cir
L2 2 0 2.5m
0
0
k L1 L2 0.6
L1=10mH, L2=2.5 mH, M=3 mH, Rt =0.01 , Rl =500 , .AC LIN 1 100 100
eo =14.1sin(2100t) V
.PRINT AC V(1) V(2), I(Vo)
.END
Remarks:
SPICE always needs a reference node numbered 0. One can never leave any node floating. For
that reason we have connected the two coils together to node 0 (or put a large resistor between
it). As there is no current flowing through this section, the circuit will not change by connecting
these nodes.
SPICE does not allow to connect a voltage source in parallel with an inductor, as it thinks that
the voltage source is short circuited. You can place a small resistor (ex. 0.001 Ohm) in series
with the voltage source to overcome this problem.
Coupled Coils Basic Transformer
Examplary Circuit
3
1
Rt
I1 ( j )
U1 ( j )
jL1
Eo ( j )
jM
I 2 ( j ) 2
U 2 ( j )
Rl
jL2
L1=10mH, L2=2.5 mH, M=3 mH,
Rt =0.01 , Rl =500 , eo =14.1sin(2100t) V
Coupled Coils
f=100Hz.cir
FREQ
V(1)
Coupled Coils
Vo 3 0 AC 10 0
Rt 3 1 0.01
Rl 2 0 500
L1 1 0 10m
L2 2 0 2.5m
k L1 L2 0.6
.AC LIN 1 100 100
.PRINT AC V(1) VP(1), I(Vo) IP(Vo)
.END
VP(1)
I(Vo)
IP(Vo)
1.000E+02 1.000E+01 9.119E-02 1.592E+00 9.016E+01
U1 ( j )
2M 2
Z1 ( j )
jL1
I1 ( j )
Z l ( j ) jL2
Z1 ( )
U1 ( )
10
6.28
I1 ( ) 1.592
1 () U 1 () I 1 () 0 (90) 90
628232106
3.55
Z1 ( j ) j 6.28
j 6.28
j 6.28
500 j 6.28 / 4
500 j1.57
Coupled Coils Basic Transformer
Examplary Circuit, f=var
Rl 500 M K ( )
K (c )
U 2 ( )
M
L
k 2 n 0.3
U1 ( ) ( L1 M ) M
L1
Coupled Coils
Vo 3 0 AC 10 0
Rt 3 1 0.01
Rl 2 0 500
L1 1 0 10m
L2 2 0 2.5m
k L1 L2 0.6
.AC DEC 1 1 10MEG
.PROBE
.END
0.3
0.213V/V
2
213m
I1 ( j )
U 1 ( j )
j ( L1 M )
Coupled Coils
Gain.cir
I 2 ( j ) 0
j ( L2 M )
U ( j )
jM 2
fc
82
Ideal Transformer
Ideal Transformer Model using dependent sources
3
Eo ( j )
Rt
I1 ( j ) 1
U 1 ( j )
Vc 0
2 I 2 ( j )
U 2 ( j )
nI 2 ( j ) nU1 ( j )
0
Assume: Rt=0.001, Rl=500, n=0.1
Z1 ( j )
FREQ
Z l ( j ) 500
2 50000 50 k
2
n
0.1
V(1)
VP(1)
V(2)
Rl
Ideal Transformer
Contr S'ces
Ideal Transformer
Vo 3 0 AC 100 0
Rt 3 1 0.001
F 0 1 Vc 0.1
E 4 0 1 0 0.1
Vc 2 4 0
Rl 2 0 500
.AC LIN 1 50 50
.PRINT AC V(1) VP(1)
V(2) I(Vo) IP(Vo)
.END
I(Vo)
IP(Vo)
5.000E+01 1.000E+02 0.000E+00 1.000E+01 2.000E-03 1.800E+02
Z1 ( )
100
50 k
0.002
1 () 0 (180 180) 0
passive sign convention
Practical (Iron-Core) Transformer
Examplary Circuit with Parasitic Capacitances
C12
Rt
Eo ( j )
R1
jL1
1a
U 1 ( j )
1b
2c
2b
jLm
nI 2 ( j ) nU1 ( j )
Rt =10 , Rl =500 , n=0.1, eo =141sin(250t) V
L1=L2=0.1m, Lm=100m
R1=R2=10
C1=C2=C12=100pF
jL2
Vc 0
2a
R2
U 2 ( j )
Rl
Practial Transformer
Vo 3 0 AC 100 0
.........................
C1 1 0 100p
C2 2 0 100p
C12 1 2 100p
Rl 2 0 500
.AC DEC 10 1 100k
.PROBE
.END
Practical (Iron-Core) Transformer
Examplary Circuit, Frequency Response
Caution: A PSpice model may have very limited range of usefulness be sure that the parameters
of the model closely match the simulated conditions !!!
Effect of Lm
Practical Trafo
HFGain.cir
Effect of L1, L2
and C1, C2, C12
fenomenon of
resonance appears
85
AC7.4 For the balanced wye-delta system: E=100V, Z(j)=100, find rms value of a line
current.
1(A) J 1 ( j ) A
E1 ( j )
0(N)
Z1 ( j )
2(B)
J 2 ( j ) B
E2 ( j )
I1 ( j )
Z 2 ( j )
Z 3 ( j )
I 3 ( j )
I 2 ( j )
E3 ( j )
3(C) J 3 ( j ) C
FREQ
I(V1)
IP(V1)
I(V2)
IP(V2)
AC7.4
V1 1 0 AC 100 0
V2 2 0 AC 100 -120
V3 3 0 AC 100 120
R1 1 2 100
R2 2 3 100
R3 1 3 100
.AC LIN 1 50 50
.PRINT AC I(V1) IP(V1)
+ I(V2) IP(V2) I(V3) IP(V3)
.END
I(V3)
IP(V3)
5.000E+01 3.000E+00 1.800E+02 3.000E+00 6.000E+01 3.000E+00 -6.000E+01
AC7.4.cir
AC7.11a Given the three-phase 3-wire balanced system in Y-Y configuration (1=0, 2=120,
3=120): E=100V, Z(j)=10. The 1st phase is shorted. What is the 2nd phase current?
1(A) I 1 ( j ) A
E1 ( j )
Z1 ( j )
2(B)
I 2 ( j ) B
N
Z 2 ( j )
E2 ( j )
Z 3 ( j )
E3 ( j )
I 3 ( j )
3(C)
AC7.11a
V1 1 0 AC 100 0
V2 2 0 AC 100 -120
V3 3 0 AC 100 120
R1 1 N 0.00001
R2 2 N 10
R3 1 N 10
.AC LIN 1 50 50
.PRINT AC I(V2) IP(V2)
.END
AC7.11a.cir
E3 ( j )
FREQ
I(V2)
IP(V2)
5.000E+01 1.732E+01 3.000E+01
0
E2 ( j )
E1 ( j )
V2 ( j )
1,N
A. 10 3 exp( j 210)
30+180=210
AC7.11b Given the three-phase 3-wire balanced system in Y-Y configuration (1=0, 2=120,
3=120): E=100V, Z(j)=10. The 1st phase is opened. What is the 2nd phase current?
1(A) I 1 ( j ) A
E1 ( j )
2(B)
E2 ( j )
I 2 ( j ) B
U 23 ( j )
E3 ( j )
I 3 ( j )
3(C)
AC7.11b
V1 1 0 AC 100 0
V2 2 0 AC 100 -120
Z1 ( j )
V3 3 0 AC 100 120
V2 ( j )
R1 1 N 1MEG
R2 2 N 10
N
Z 2 ( j )
R3 1 N 10
.AC LIN 1 50 50
Z 3 ( j )
V3 ( j ) .PRINT AC I(V2) IP(V2)
.END
AC7.11b.cir
FREQ
E3 ( j )
I(V2)
IP(V2)
5.000E+01 8.660E+00 9.000E+01
N U 23 ( j )
V2 ( j )
E2 ( j )
E1 ( j )
A. 5 3 exp( j 270)
90+180=270
copyright J.Rutkowski
any suggestions and remarks to
jrutkowski@polsl.pl
Silesian University of Technology Gliwice, 2014
89