Pspice Tutorial Ac

89
1 AC Analysis ω=const, E(ω)=E I(ω)=I, U(ω)=U, α(ω)=α, etc PSPICE Simulation updated 2014.05.27

description

The Official Tutorial for PSPICE programme.

Transcript of Pspice Tutorial Ac

Page 1: Pspice Tutorial Ac

1

AC Analysis

ω=const, E(ω)=E

I(ω)=I,

U(ω)=U,

α(ω)=α, etc

PSPICE Simulation

updated 2014.05.27

Page 2: Pspice Tutorial Ac

PSpice AC Simulation -Content

1. Single-frequency Analysis

2. Parameter Sweep (ω = ω*= const)

3. Frequency Sweep (ω = var)

4. Frequency Sweep with Variable Parameter

5. Impedance Frequency Characteristic

6. Resonant Frequency

7. Amplitude Response

8. Bode Plot, cut-off Frequency

9. Bandwidth, Half-power Frequencies

10. Parameter Sweep (ω = var) – Performance Analysis

11. Commonly used Goal Functions

12. Coupled Coils

13. Ideal Transformer

14. 3-phase Circuit

Page 3: Pspice Tutorial Ac

Single-frequency Analysis

p pico 10-12

n nano 10-9

u micro 10-6

m mili 10-3

k kilo 103

meg mega 106

e.g. 50u=50 10-6

Netlist

Statements

xx

Rxx X Y Value (in [Ω] )

Vxx X Y AC Value1 Value2

Ixx X Y AC Value1 Value2

Passive Element

Description

.PRINT AC Vy(X) Vy(X,Y) Iy(Vxx)

.END

Title Statement

Description of Outputs

resistor

Cxx X Y Value (in [F] )

Lxx X Y Value (in [H] )

capacitor

inductor

or

Value1 = rms, in [A] or [V]

Value2 = phase, in [deg]

Value3 = frequency, in [Hz] .AC LIN 1 Value3 Value3

Source Description

single frequency analysis, f =ω/(2π) = const

Control

Statements

y=M (magnitude)

y=P (phase)

y=R (Re part)

y=I (Im part)

Calculation of the DC bias point is always the first step of a PSpice run !!! – see Problem AC2.0

Page 4: Pspice Tutorial Ac

4

Examplary Circuit

V5)0exp(5)( o jjUR

10)90exp(10)( o jjjU L

5)90exp(5)( o jjjUC

I( jω)=0.5 A exp180°= –1

(passive s.c.)

0

2 1 3

)( jI

)( jE

LjX R

CjX

m6420 LLX L

u31810/1 CCXC 10R

09.72/10V)45314sin(10 o Etef = 50

AC2 RLC

Circuit.cir

Page 5: Pspice Tutorial Ac

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

Examplary Circuit – Schematics

https://www.youtube.com/watch?v=65j8sH8MwXc

Page 6: Pspice Tutorial Ac

Set values of Circuit Parts

To enable PRINT (magnitude and phase) set:

AC=1, MAG=1, PHASE=1

Examplary Circuit – Schematics

Page 7: Pspice Tutorial Ac

AC Sweep in Analysis Setup

set Start=End Frequency

Examplary Circuit – Schematics

Page 8: Pspice Tutorial Ac

N1 N4 N2

N3

Save File, then Simulate

8

0

N4 N2 N1

e

L R

C

N3

Examplary Circuit – Schematics

Schematics assigns nodes automatically

The assignment can be found in the Netlist

(Analysis: Examine Netlist, Output File)

It is possible to assign another label

by double clicking on the node

Page 9: Pspice Tutorial Ac

9

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

0

2 1 3

e

L R

C

9

0

N4 N2 N1

e

L R

C

N3

Examplary Circuit – Schematics

Page 10: Pspice Tutorial Ac

10)90exp(10)( o jjjU L

AC ANALYSIS TEMPERATURE = 27.000 DEG C

******************************************************************************

FREQ VM($N_0002) VP($N_0002)

5.000E+01 4.994E+00 -9.028E+01

******************************************************************************

FREQ VM($N_0004) VP($N_0004)

5.000E+01 7.059E+00 -4.530E+01

******************************************************************************

FREQ VM($N_0001,$N_0004) VP($N_0001,$N_0004)

5.000E+01 1.003E+01 8.973E+01

******************************************************************************

FREQ VM($N_0004,$N_0002) VP($N_0004,$N_0002)

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

V5)0exp(5)( o jjUR

5)90exp(5)( o jjjUC

V)45exp(06.7)(N4 jjU

A5.0)( jI

10

0

N4 N2 N1

e

L R

C

N3

Examplary Circuit – Schematics

PSPICE Problems\TR\RLCall.sch

Page 11: Pspice Tutorial Ac

AC2.0 Find indication of the voltmeter, if C=1μF, R=2kΩ and . V1000sin10 tu

Ru Vu

C

C0

3

1

2

ERROR -- Node 2 is floating

ERROR -- Node 1 is floating

Ru Vu

C

C0

3

1

2

R

FREQ V(2,1) I(VIN)

1.592E+02 5.015E+00 2.507E-03

AC2.0 corrected

VIN 3 0 AC 7.09 0

R 2 1 2k

C2 2 3 1u

C1 0 1 1u

Rinf 0 1 10MEG

.AC LIN 1 159.24 159.24

.PRINT AC V(2,1) I(VIN)

.END

AC2.0

VIN 3 0 AC 7.09 0

R 2 1 2k

C2 2 3 1u

C1 0 1 1u

.AC LIN 1 159.24 159.24

.PRINT AC V(2,1) I(VIN)

.END

Calculation of the DC bias point is always the first step of a PSpice run !!!

Some large resistance,

eg. 10MEG, must be

connected in parallel

with one the capacitors

AC2.0.cir

AC2.0

corrected.cir

In DC analysis capacitor is an o.c.

Nodes with no DC path to ground aren't allowed in

PSpice !!!

Page 12: Pspice Tutorial Ac

AC2.14’’ Find the phase shift between the source voltage u and its current i, if R=2 kΩ, XL=2kΩ,

|XC |=1kΩ, u=10√2sin(10000t)V, time in seconds.

)()(111

)( j

LC

eYXX

jR

jY

12

45

11arctan

LC

iuXX

R

u

i

FREQ IP(Vin)

1.592E+03 -1.350E+02

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

45180135i

450 iu

Source satisfies passive

sign convention, then:

PSPICE Problems\AC\AC2.14''.cir

Page 13: Pspice Tutorial Ac

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)

Design parameter sweep in the Netlist

Z=var

Y(ω*)=y(Z) X(jω*)

E(jω*) or J(jω*)

.MODEL ZMOD ZZZ(Z=1)

.STEP DEC ZZZ ZMOD(Z) Start Stop Increments/Dec

Z n m ZMOD 1

-------------------------------------------------------------------

.AC LIN 1 F1 F2=F1

n m

Z= C or L or R

ZZZ=CAP or IND or RES

Page 14: Pspice Tutorial Ac

After pressing run Simulation, from Available Selections select All

Parameter Sweep (ω = ω*= const), cont.

Page 15: Pspice Tutorial Ac

Frequency sweep will appear, then select Performance Analysis.

Parameter Sweep (ω = ω*= const), cont.

Page 16: Pspice Tutorial Ac

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.

Page 17: Pspice Tutorial Ac

Press Add Trace, then complete Trace Expression:

single Simulation Output Variable or function built of Output Variables,

using Analog Operators and Functions

Parameter Sweep (ω = ω*= const), cont.

or

Page 18: Pspice Tutorial Ac

AC2 PFC C Sweep

Vin 1 0 AC 200

Rl 1 2 0.1 ………………. line resistance

.MODEL CMOD CAP(C=1) …............................. CAP MODEL coding

C 2 0 CMOD 1 ……………………………............ CAP MODEL invoking

.STEP DEC CAP CMOD(C) 0.1u 500u 1000 ……. CAP SWEEP specification

* Start Stop Points/Decade

L 2 3 32m

R 3 0 10

.AC LIN 1 50 50

.PROBE

.END

18

Sizing a capacitor for the PFC

mH32;10 LR

7.0,kW2,Hz50,V200 pfPfU

For properly sized Capacitor:

φ = αu – αi = 0

I=Imin, Pl=Pl,min

Lj

R

Cj

1

)( jI

)( jU

)( jI L)( jIC

Rl

• )( jUin

0

1

2

• 3

see AC2.40

)( jI )( jU

)( jIC

)( jI L

Page 19: Pspice Tutorial Ac

Lj

R

Cj

1

)( jI

)( jU

)( jI L)( jIC

Rline

)( jU in

0

1a

1

2

• 3

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

mH32;10 LR

1.0;Hz50,V200 linein RfU

P=Rline I(f)2=F(C)

C

Performance

Analysis

Add

Trace

Toggle

Cursor

Cursor

Min

Sizing a capacitor for the PFC

Page 20: Pspice Tutorial Ac

20

Sizing a capacitor for the PFC

Lj

R

Cj

1

)( jI

)( jU

)( jI L)( jIC

Rl

• )( jUin

0

1

2

• 3

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

.END

φ(C)=αu−αi(C)

AC2 PFC C Sweep

fi=0.cir

mH32;10 LR

7.0,kW2,Hz50,V200 pfPfU

see AC2.40

C

Page 21: Pspice Tutorial Ac

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)

Page 22: Pspice Tutorial Ac

22

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

Sizing a capacitor for the PFC: Schematics

Page 26: Pspice Tutorial Ac

Frequency Sweep (ω = var)

p pico 10-12

n nano 10-9

u micro 10-6

m mili 10-3

k kilo 103

meg mega 106

e.g. 50u=50 10-6

Netlist

Statements

xx

Rxx X Y Value (in [Ω] )

Passive Element

Description

.PRINT AC Vy(X) Vy(X,Y) Iy(Vxx)

or

.PLOT AC Vy(X) Vy(X,Y) Iy(Vxx)

.END

Title Statement

Description of Outputs

resistor

Cxx X Y Value (in [F] )

Lxx X Y Value (in [H] )

capacitor

inductor

Vxx X Y AC Value1 Value2

Ixx X Y AC Value1 Value2

or 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]

.AC LIN N F1 F2

or

.AC DEC ND F1 F2

Source Description

Control

Statements

y=M (magnitude)

y=P (phase)

y=R (Re part)

y=I (Im part) .PROBE

Remember: Calculation of the dc bias point is always the first step of a Pspice run !!!

Page 27: Pspice Tutorial Ac

27

RLC Circuit

.AC LIN N F1 F2

fi= F1+(F2−F1)(i −1)/(N−1); i=1,...,N

.AC DEC ND F1 F2

fi= F1·10 (i−1)/ND; i=1,...,N=0.1·F2/F1+1

5 intervals/decade

101

C

L

RQ

10 frequencies

AC4 Filter

RLC.cir AC4 Filter

RLCdec.cir

0

1 3 2

1V 10μF 0.1H

10Ω Hz1602

1

LCf r

Page 29: Pspice Tutorial Ac

Draw Wire Get New Part Create Circuit Diagram

using

Get New Part Browser and

Draw Wire

RLC Circuit: Schematics

Set values of Circuit Parts

https://www.youtube.com/watch?v=daJ3CSidBKI

Page 30: Pspice Tutorial Ac

AC Sweep in Analysis Setup

set Pts/Decade, Start & End Frequency

RLC Circuit: Schematics

Page 31: Pspice Tutorial Ac

N3

N1 N2

Save File, then Simulate

Schematics assigns nodes automatically

Assignment can be found in the Netlist

(Analysis: Examine Netlist or Output File)

0

N3 N1 N2

1V 10μF 0.1H

10Ω

RLC Circuit: Schematics

Page 32: Pspice Tutorial Ac

when Simulation is completed:

Netlist may be viewed in Output File

Frequency sweep displayed in PROBE

after adding Trace

0

1 3 2

1V 10μF 0.1H

0

N3 N1 N2

1V 10μF 0.1H

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

PSPICE

Problems\AC\RLC

sweep.sch

10Ω

10Ω

RLC Circuit: Schematics

Page 33: Pspice Tutorial Ac

33

0

N3 N1 N2

1V 10μF 0.1H

10Ω

** Analysis setup **

.ac DEC 500 10 10k

* From [PSPICE NETLIST] section of pspiceev.ini:

.lib "nom.lib„

.INC "RLC sweep.net"

**** INCLUDING "RLC sweep.net" ****

* Schematics Netlist *

C_C1 $N_0001 $N_0002 10uF

L_L1 $N_0003 $N_0001 0.1H

V_V1 $N_0003 0 DC 0V AC 1V 0

R_R2 $N_0002 0 10

I(f)

RLC Circuit: Schematics

Page 34: Pspice Tutorial Ac

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)

Design parameter sweep and frequency sweep in the Netlist

Z=var

Y(ω) X(jω)

E(jω) or J(jω)

.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

n m

Z= C or L or R

ZZZ=CAP or IND or RES

Page 35: Pspice Tutorial Ac

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.

Page 36: Pspice Tutorial Ac

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

Page 37: Pspice Tutorial Ac

37

UR for: R=10: Q=10; R=20: Q=5; R=50: Q=2; R=100: Q=1

R=10

R=20

R=50

R=100

AC4 Filter

RLC,

Rvar.cir

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

0

1 3 2

1V 10μF 0.1H

R

RLC Circuit, UR : variable R

Page 38: Pspice Tutorial Ac

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

U1 (jω)

R

U2(jω) Rl

AC5.1c’ Find the gain K(ω)=U2(ω)/U1(ω) of the given band-pass filter: R=1kΩ, C=10µF,

L=100mH, loaded by the Rl=400, 4kΩ, 40kΩ resistance, at cut-off frequencies.

Filter R LCpar loaded,

var R.cir

Rl =40k Kmax=0.98

Rl =4k Kmax=0.8

Rl =0.4k

Kmax=0.29

l

l

RR

RK

max

Page 39: Pspice Tutorial Ac

39

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

.PROBE

.END

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

Filter R LCpar

C sweep.cir

10µF 1µF 0.1µF

L

C

GQ

1

quality factor

Q Q

Q

parallel RLC circuit:

0

2 1

U1 (jω)=1 U2 (jω)

K(f)

f

Page 40: Pspice Tutorial Ac

AC5.1c For the sketched tank filter study the bandwidth as a function of the capacitance.

Schematics: Parametric Analysis Setup

Page 42: Pspice Tutorial Ac

Schematics: Parametric Performance Analysis Setup

AC5.1c For the sketched tank filter study the bandwidth as a function of the capacitance.

Page 43: Pspice Tutorial Ac

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)

Page 46: Pspice Tutorial Ac

AC5.1k Find bandwidth of the RLC band-pass filter, in Hz, if C=10µF; L=0.1H; R=var.

Schematics: Parametric Analysis Setup

Page 48: Pspice Tutorial Ac

Practical Coil – Impedance

48

mAC4 Practical

Coil

CL=0.1 pF :

ωr=107 rad/sec, fr=1.6 MHz

L=0.1 H, RL=10 Ω

fr=1.6 MHz

LLR

LC

tR

1 0 2

3 •

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

Page 49: Pspice Tutorial Ac

LC

C RC

49

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

C=1 μF, RC=5 MΩ

AC4 Practical

Capacitor

Practical Capacitor - Impedance

RC=5MΩ

fr=1.6 MHz

Page 50: Pspice Tutorial Ac

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.

50

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)

477kHz

current leads voltage ≡ capacitive character

L

CR

0

i 2 1

Page 51: Pspice Tutorial Ac

51

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

AC3.1b cont imp.cir

minimum not exactly at the resonant frequency

477kHz

αi(f)

Z(f)

L

CR

0

i 2 1

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.

Page 53: Pspice Tutorial Ac

53

180/radiansin ii

degreesin)( fileading power factor

capacitive character

lagging power factor

inductive character

PSPICE

Problems\AC\AC4.7

Filter RLC pf'.cir

]180/)(cos[)]/)((cos[arctan)( fRfXfpf i

)( jI

)( jU)/(1 Cj

R

Lj

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 0

1 3

2

AC3.7a The series RLC circuit, R=10Ω, L=100mH, C=10μF is connected to 10V rms source of

adjustable frequency. Determine the source frequency for unity power factor.

1)( rfpf

Page 54: Pspice Tutorial Ac

54

)( jI

)( jU)/(1 Cj

R

Lj

AC3.7b The series RLC circuit, R=10Ω, L=100mH, C=10μF 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

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

W10)()(22

2

maxmax

R

UR

R

URIfPfP r

UfIRfICLR

UfP )()(

)/1()( 2

22

2

0

1 3

2

Page 55: Pspice Tutorial Ac

55

Multiple-resonance - Examplary Circuit

)( jI

)( jU

1LjX

CjXR

0

1 2 1LjX

Hz2250rad/s210 2

4

21

212

rr f

CLL

LLHz1590rad/s10

11

4

2

1 rr fCL

U(ω)/I(ω)=Z(ω))

AC4 Multiple-resonance

I 0 1 AC 1 0

R 1 0 1k

L1 1 2 10m

C 2 0 1u

L2 2 0 10m

.AC LIN 1000 10 10k

.PROBE

.END

AC4 Multiple-

resonance.cir

7 1

2

3 4

5

6

Page 56: Pspice Tutorial Ac

Frequency Response of RC Circuit, LIN

56

)(1 jUCj

1 )(2 jU

R

2

0

1 f 0 fc=159.2 ∞

U2(f) 1 0 2/1

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

AC5 Filter RC.cir

Hz2.1592

1

2

1μF1,1

RCTfCkR c

fTU

UK

2;

)(1

1

)(

)()(

21

2

K(f)=U2(f)

U1(f)=1

Page 57: Pspice Tutorial Ac

57

Frequency Response of RC Circuit, DEC

)(1 jUCj

1 )(1 jU

R

2

0

1

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

f 0 fc=159.2 ∞

U2(f) 1 0 2/1

AC5 Filter RCdec.cir fT

K

2;)(1

1)(

2

Hz2.159μF1,1 cfCkR

K(f)=U2(f)

U1(f)=1

Page 58: Pspice Tutorial Ac

Bode Plot of RC Circuit, cut-off frequency

58

)(1 jUCj

1

)(2 jUR 2

0

1

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 Hz100

2

1

2

1μF1,1592

RCTfCR c

20dB/Dec

−3dB

AC5 Filter RC

Bode.cir

1)(2

2

1

2dB

1)(log20)2(1log20

)(

)(log20)(

fUfUfT

fU

fUfK

Page 59: Pspice Tutorial Ac

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

Hz3181

2

1

2

RCTf cc

2

dB )(1log202/1log20)( TK

–6dB

μF1,k1 CR

2/,1

2/1)( RCT

TjjK

2)(1

2/1)(

TK

1 2

)(1 jU Cj

1)(2 jUR

R

0

1 2

or

Logaritmic (dB) scale

AC4.10d’ For the given RC circuit, find a) the cut-off frequency and b) the dB gain at 1KHz

frequency: KdB(1kHz).

Page 60: Pspice Tutorial Ac

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

2)(1

2/1)(

TK

Hz3181

2

1

2

RCTf cc

353.02

2/1)( cfK

AC4.10d’ For the given RC circuit, find a) the cut-off frequency and b) the dB gain at 1KHz

frequency: KdB(1kHz).

)(1 jU Cj

1)(2 jUR

R

0

1 2

Linear scale

PSPICE

Problems\AC\AC4.10d

Filter RC dec.cir

5.0)0( max KK

Page 61: Pspice Tutorial Ac

0inI

)(1 U

+

lR0inI

)()( 2 UUout

)(inU

R

C

)(1 U

lR

)()( 2 UUout )(inUR

C

k=1

AC4.10e’ For the given RC circuit, find the cut-off frequency. C=1µF, R=Rl=1kΩ.

The op-amps low output impedance prevents the filter’s cut-off frequency point

from being affected by changes in the impedance of the load

Page 62: Pspice Tutorial Ac

62

)(1 U

lR

)(2 U)(inUR

C

)(inU

0

2 1a 1

AC4.10e’ For the given RC circuit, find the cut-off frequency. C=1µF, R=Rl=1kΩ.

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

Hz1592

1

2

1

RCTfc

1)( max KK

The load resistance does not affect neither, the maximum gain and the cut-off

frequency

Page 63: Pspice Tutorial Ac

AC5.1a Find bandwidth of the RLC band-stop filter, in Hz, if C=10µF; L=0.1H; R=100Ω.

63

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

L

R

Q

rlu

AC4 Filter RLC B-s

bandwidth.cir

1 2

0

• 3 U1(jω)=1 U2(jω)

Hz1592

L

Rf

K(f)=U2(f)

Linear scale

Page 64: Pspice Tutorial Ac

64

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

L

R

Q

rlu

AC4 Filter RLC B-s

bandwidth db.cir

Hz1592

L

Rf

AC5.1a Find bandwidth of the RLC band-stop filter, in Hz, if C=10µF; L=0.1H; R=100Ω.

KdB(f)=20logU2(f)

dB scale

1 2

0

• 3 U1(jω)=1 U2(jω)

Page 65: Pspice Tutorial Ac

65

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

L

R

Q

rlu

AC4 Filter RLC

bandwidth GF.cir

AC5.1k Find bandwidth of the RLC band-pass filter, in Hz, if C=10µF; L=0.1H; R=100Ω.

Hz1592

L

Rf

0

1 3 2

1V 10μF 0.1H

R=100Ω

dB scale

Page 66: Pspice Tutorial Ac

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 parameter sweep and frequency sweep in the Netlist

.MODEL ZMOD ZZZ(Z=1)

.STEP DEC ZZZ ZMOD(Z) Start Stop Increments/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

Z=var

design specification (optional)

X(jω)

E(jω) or J(jω)

n m

g=h(Z)

Page 67: Pspice Tutorial Ac

After pressing run Simulation, from Available Selections select All

Parameter Sweep – Performance Analysis, cont.

Page 68: Pspice Tutorial Ac

Frequency sweep will appear, then select Performance Analysis.

Parameter Sweep – Performance Analysis, cont.

Page 69: Pspice Tutorial Ac

Frequency sweep will appear, then select Performance Analysis. Frequency will be

replaced by ZMOD (Z); Z=C or L or R

Parameter Sweep – Performance Analysis, cont.

Page 70: Pspice Tutorial Ac

Press Add Trace, then select Goal Function and complete Trace Expression, using

the selected Simulation Output Variable and the design specification, optionally

Parameter Sweep (ω = ω*= const), cont.

or

Page 71: Pspice Tutorial Ac

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

Page 73: Pspice Tutorial Ac

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

Page 74: Pspice Tutorial Ac

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)

Page 75: Pspice Tutorial Ac

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)

PSPICE Problems\PSpice Schematics\CRvarfvar.sch

fc(R)=XatNthY(V($N_0001),0.7071,1)

R

Page 78: Pspice Tutorial Ac

AC5.1c’ Find the gain K(ω)=U2(ω)/U1(ω) of the given band-pass filter: R=1kΩ, C=10µF,

L=100mH, loaded by the Rl=4kΩ resistance, at cut-off frequencies.

Filter R LCpar

loaded.cir

V/V2/8.0)(2

2/max

l

l

RR

RK

U1 (jω)

R

U2(jω) Rl

Page 79: Pspice Tutorial Ac

L1=10 mH, L2=2.5 mH, M=3 mH

The coupling coefficient k (k must be larger than 0 but smaller than 1):

The DOTS are always associated with the first node of the inductances

(i.e. node no. 1 of L1 and no. 2 of L2).

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.

6.0/ 21 LLMk

0 0

)( jZ t

)(1 jI Mj )(2 jI

)( jEo 2Lj

)(2 jU

)( jZ l

1Lj

)(1 jU

1 3 2

L1 1 0 10m

L2 2 0 2.5m

k L1 L2 0.6

Coupled Coils

Page 80: Pspice Tutorial Ac

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) 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 Examplary Circuit

L1=10mH, L2=2.5 mH, M=3 mH, Rt =0.01 Ω, Rl =500 Ω,

eo =14.1sin(2π100t) V

Coupled

Coils.cir

tR

)(1 jI Mj )(2 jI

)( jEo 2Lj

)(2 jU

lR

1Lj

)(1 jU

1 3 2

0 0 •

Page 81: Pspice Tutorial Ac

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

Coupled Coils – Basic Transformer Examplary Circuit

L1=10mH, L2=2.5 mH, M=3 mH,

Rt =0.01 Ω, Rl =500 Ω, eo =14.1sin(2π100t) V

Coupled Coils

f=100Hz.cir

2

22

1

1

11

)()(

)()(

LjjZ

MLj

jI

jUjZ

l

28.657.1500

55.328.6

4/28.6500

10362828.6)(

622

1 jj

jj

jjZ

28.6592.1

10

)(

)()(

1

11

I

UZ

90)90(0)()()( 111 IU

FREQ V(1) VP(1) I(Vo) IP(Vo)

1.000E+02 1.000E+01 9.119E-02 1.592E+00 9.016E+01

tR

)(1 jI Mj )(2 jI

)( jEo 2Lj

)(2 jU

lR

1Lj

)(1 jU

1 3 2

0 0 •

Page 82: Pspice Tutorial Ac

82

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

Coupled Coils

Gain.cir

213m

fc

3.0)()(

)()(500

1

2

11

2

nL

Lk

MML

M

U

UKMRl

)( 1 MLj )(1 jU

)(2 jU

)(1 jI 0)(2 jI

)( 2 MLj

Mj

V/V213.02

3.0)( cK

Coupled Coils – Basic Transformer Examplary Circuit, f=var

Page 83: Pspice Tutorial Ac

)( jEo

)(1 jItR )(2 jI

)(1 jU lR)(2 jU

● ●

)(2 jnI )(1 jnU

0cV

0

1 2 3 4

Ideal Transformer Model using dependent sources

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

Assume: Rt=0.001, Rl=500, n=0.1

FREQ V(1) VP(1) V(2) I(Vo) IP(Vo)

5.000E+01 1.000E+02 0.000E+00 1.000E+01 2.000E-03 1.800E+02

k50500001.0

500)()(

221n

jZjZ l

k50002.0

100)(1 Z 0)180180(0)(1

passive sign convention

Ideal Transformer

Contr S'ces

Ideal Transformer

Page 84: Pspice Tutorial Ac

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 with Parasitic Capacitances

Rt =10 Ω, Rl =500 Ω, n=0.1, eo =141sin(2π50t) V

L1=L2=0.1m, Lm=100m

R1=R2=10 Ω

C1=C2=C12=100pF

)(1 jU lR)(2 jU

● ●

)(2 jnI )(1 jnU

0cV

0

1b 2

)( jEo

tR3 2c 1R

2R

• • • • 1

1a

2b 2a

• • 0

1Lj 2Lj

mLj

● ●

C12

Page 85: Pspice Tutorial Ac

85

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 Effect of L1, L2

and C1, C2, C12

fenomenon of

resonance appears

Practical Trafo

HFGain.cir

Page 86: Pspice Tutorial Ac

)(3 jJ

)(1 jJ

)(2 jJ

)(3 jI

)(2 jI

)(3 jZ

)(1 jZ

)(1 jI

)(2 jZ

A

B

C

)(1 jE

)(2 jE

)(3 jE

1(A)

2(B)

3(C)

0(N)

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

FREQ I(V1) IP(V1) I(V2) IP(V2) 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.4 For the balanced wye-delta system: E=100V, Z(jω)=100, find rms value of a line

current.

Page 87: Pspice Tutorial Ac

)(3 jI

)(2 jI

)(3 jZ

)(1 jZ

)(1 jI

)(2 jZ

A

B

C

)(1 jE

)(2 jE

)(3 jE

1(A)

2(B)

3(C)

0

N

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

FREQ I(V2) IP(V2)

5.000E+01 1.732E+01 3.000E+01

)210exp(310A. j

30+180=210

1,N

3

2

0

)(3 jE

)(1 jE

)(2 jV)(2 jE

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?

Page 88: Pspice Tutorial Ac

)(3 jI

)(2 jI

)(3 jZ

)(1 jZ

)(1 jI

)(2 jZ

A

B

C

)(1 jE

)(2 jE

)(3 jE

1(A)

2(B)

3(C)

0

N

)(23 jU

)(2 jV

)(3 jV

AC7.11b

V1 1 0 AC 100 0

V2 2 0 AC 100 -120

V3 3 0 AC 100 120

R1 1 N 1MEG

R2 2 N 10

R3 1 N 10

.AC LIN 1 50 50

.PRINT AC I(V2) IP(V2)

.END

AC7.11b.cir

)270exp(35A. j

90+180=270

1

3

2

0

)(3 jE

)(1 jE)(23 jU

)(2 jE

N

)(2 jV

FREQ I(V2) IP(V2)

5.000E+01 8.660E+00 9.000E+01

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?

Page 89: Pspice Tutorial Ac

89

© copyright J.Rutkowski

any suggestions and remarks to

[email protected]

Silesian University of Technology – Gliwice, 2014