Top Banner
Spring 2016 Lecture 11: Switching in RLC Circuits Question: Why circuits with switches and switching in general? Answer: (1) Circuits with switches, that do not switch, Are equivalent to circuits that have no SWITCH. And circuits with no SWITCH to switch, Cannot compete with those that switch. (2) Anything a non-switched circuit can do, a switched circuit can do and do better. (3) Switching circuits can do thing way beyond the world of non-switched circuits. Example 1. R 1 = R 2 = 10 Ω and C = 0.1 F. Compute v C (t ), t 0 , supposing that (1) v in (t ) = 20u( t ) + 20u(t ) 10u(t 10) V; (2) the switch S is closed for a long long time, opens at t = 0 and closes at t = 10 s. Spring 2016 Step 1. Compute v C (0 ) . (a) A constant –20 volts has excited the circuit for a long time before 0. A very long time!!! (b) The capacitor looks like an open circuit. (c) Since the switch S is closed during this time frame, by voltage division, v C (0 ) = 10 V. Step 2. Draw the equivalent s-domain circuit valid ONLY for 0 t 10 s. Then compute V C ( s) = V C , zi ( s) + V C , zs ( s) (a) Equivalent s-domain circuit. Note: over 0 t 10 s, v in (t ) = 20u(t ) V.
14

202 Lec 11 Sp16 - Purdue Engineeringee202/Lecture/S18... · Spring 2016 Lecture 11: Switching in RLC Circuits Question: Why circuits with switches and switching in general? Answer:

Jul 30, 2018

Download

Documents

trinhngoc
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 202 Lec 11 Sp16 - Purdue Engineeringee202/Lecture/S18... · Spring 2016 Lecture 11: Switching in RLC Circuits Question: Why circuits with switches and switching in general? Answer:

Spring 2016

Lecture 11: Switching in RLC Circuits

Question: Why circuits with switches and switching in

general?

Answer:

(1) Circuits with switches, that do not switch,

Are equivalent to circuits that have no SWITCH.

And circuits with no SWITCH to switch,

Cannot compete with those that switch.

(2) Anything a non-switched circuit can do, a switched

circuit can do and do better. ☺

(3) Switching circuits can do thing way beyond the world of

non-switched circuits.

Example 1. R1 = R2 = 10 Ω and C = 0.1 F. Compute

vC (t), t ≥ 0 , supposing that

(1) vin(t) = −20u(−t)+ 20u(t)−10u(t −10) V;

(2) the switch S is closed for a long long time, opens at t = 0

and closes at t = 10 s.

Spring 2016

Step 1. Compute vC (0− ) .

(a) A constant –20 volts has excited the circuit for a

long time before 0. A very long time!!!

(b) The capacitor looks like an open circuit.

(c) Since the switch S is closed during this time frame,

by voltage division, vC (0− ) = −10 V.

Step 2. Draw the equivalent s-domain circuit valid ONLY

for 0 ≤ t ≤10 s. Then compute

VC (s) =VC ,zi(s)+VC ,zs(s)

(a) Equivalent s-domain circuit. Note: over 0 ≤ t ≤10

s, vin(t) = 20u(t) V.

Page 2: 202 Lec 11 Sp16 - Purdue Engineeringee202/Lecture/S18... · Spring 2016 Lecture 11: Switching in RLC Circuits Question: Why circuits with switches and switching in general? Answer:

Spring 2016

(b) Zero-state response. Set vC (0− ) = 0 . Then

VC ,zs(s) =

10s

10+ 10s

× 20s= 20

s(s+1)= 20

s− 20

s+1

Conclusion:

vC ,zs(t) = 20u(t)− 20e−tu(t) V for 0 ≤ t <10 s.

(c) Zero-input response. Set vin(t) to zero. Source

becomes a short. Since CvC (0− ) = −1,

VC ,zi(s) =1010

s

10+ 10s

(−1) = − 10s+1

Conclusion: vC ,zi(t) = −10e−tu(t) V.

(d) By superposition, for 0 ≤ t <10 s, the complete

response is:

vC (t) = vC ,zs(t)+ vC ,zi(t) = 20 1− e−t( )u(t)−10e−tu(t) V

Spring 2016

Note that at the next switching time, vC (10− ) ≅ 20 V. Why?

How many years, I mean, time constants have gone by?

Step 2. Draw the equivalent s-domain circuit valid ONLY

for 10 ≤ t s. Then compute

VC (s) =VC ,zi(s)+VC ,zs(s)

(a) Equivalent s-domain circuit. CvC (10− )e−10s = 2e−10s .

(b) Zero-state response. Set vC (10− ) = 0 . Here,

Vin(s) = e−10s 10

s. Then writing a simple node equation,

Page 3: 202 Lec 11 Sp16 - Purdue Engineeringee202/Lecture/S18... · Spring 2016 Lecture 11: Switching in RLC Circuits Question: Why circuits with switches and switching in general? Answer:

Spring 2016

(0.1s+ 0.1)VC + 0.1 VC − e−10s 10

s⎛⎝⎜

⎞⎠⎟= 0

in which case

VC ,zs(s) = e−10s 10

s(s+ 2)

and for t ≥10

vC ,zs(t) = 5u(t −10)−5e−2(t−10)u(t −10) V.

(c) Zero-input response. Set voltage source to zero.

CvC (0− ) = 2e−10s. Therefore,

VC ,zi(s) =510

s

5+ 10s

2e−10s( ) = 20e−10s

s+ 2

implying that vC ,zi(t) = 20e−2(t−10)u(t −10) V

(d) By superposition, for 10 ≤ t s,

Spring 2016

vC (t) = vC ,zs(t)+ vC ,zi(t)

= 5 1− e−2(t−10)( )u(t −10)+ 20e−2(t−10)u(t −10) V

Example 2. Compute vout (t) when

(i) R1 = R2 = 2 Ω, L = 1 H,

(ii) vin(t) = 4u(−t)+8u(t)+8u(t − 2) V,

(iii) the switch is initially OPEN and has been open for a

long time;

(iv) the switch CLOSES at t = 0 s, and

(v) OPENS again at t = 4 s.

Step 1. Compute iL(0− ) .

Page 4: 202 Lec 11 Sp16 - Purdue Engineeringee202/Lecture/S18... · Spring 2016 Lecture 11: Switching in RLC Circuits Question: Why circuits with switches and switching in general? Answer:

Spring 2016

For t < 0 , the input voltage has been 4 V for a very very

long time; the inductor looks like a short. Hence iL(0− ) = 1

A.

Step 2. Determine the s-domain equivalent circuit valid for

0 ≤ t < 4 s.

(a) Define the input Vin(s) valid for this time interval:

Vin(s) = 8

s+ 8

se−2s

(b) Draw s-domain equivalent.

Step 3. Compute vout (t) , 0 ≤ t < 4 s. By superposition,

Spring 2016

Vout (s) = s

s+ 2Vin(s)− 2s

s+ 2×

iL(0− )s

= 8

s+ 2+ 8e−2s

s+ 2− 2

s+ 2

CONCLUSION: for 0 ≤ t < 4 s,

vout (t) = vout ,zs(t)+ vout ,zi(t)

= 8e−2tu(t)+8e−2(t−2)u(t − 2)− 2e−2tu(t) V

Step 4. Determine s-domain equivalent valid for t ≥ 4 s.

(a) Vin(s) = 16

se−4s

V is now the “new” input seen by

the “new” circuit for t ≥ 4 s, and

(b) since iL(4− ) = −iR1(4− ) ,

iL(4− ) =

vin(4− )− vout (4− )

2

⎝⎜

⎠⎟ =

15.852

= 7.93 A

Page 5: 202 Lec 11 Sp16 - Purdue Engineeringee202/Lecture/S18... · Spring 2016 Lecture 11: Switching in RLC Circuits Question: Why circuits with switches and switching in general? Answer:

Spring 2016

(c) For the s-domain equivalent circuit we will use the

voltage source model for the inductor. Note, that the voltage

source value needs to be corrected to LiL(0− )e−4s = 7.93e−4s .

Step 5. By superposition

Vout (s) = s+ 2

s+ 4Vin(s)− 2

s+ 4⎛⎝⎜

⎞⎠⎟

LiL(4− )e−4s( )

= 8

s+ 8

s+ 4⎡

⎣⎢⎤

⎦⎥e−4s − 15.85

s+ 4e−4s

CONCLUSION: for 4 ≤ t ,

Spring 2016

vout (t) = 8 1+ e−4(t−4)( )u(t − 4)−15.85e−4(t−4)u(t − 4) V

Appendix—The Boost Converter Example:

DATA: Switch closes at t = 0, opens at t = 1, closes at t = 2,

and the process repeats for ever and ever and ever.

The following circuit represents a CHARGER for a

SUPERCAPACITOR used on a bus in Shanghai for example.

Different parameter values for the real charger and cap, but

the same type of circuit. For this analysis vin (t) = 10u(t) V.

Equivalent Circuit in s-world when switch is closed in which

k represents a non-negative integer consistent with the

Page 6: 202 Lec 11 Sp16 - Purdue Engineeringee202/Lecture/S18... · Spring 2016 Lecture 11: Switching in RLC Circuits Question: Why circuits with switches and switching in general? Answer:

Spring 2016

switch opening or closing. The above switch closes on even

integer values and opens on odd integer values.

Remarks:

IL(s) = 1

Ls+ R1

Ke−sk

s+ LiL(k− )e−sk⎡

⎣⎢⎢

⎦⎥⎥

and the capacitor voltage is unchanged.

Equivalent circuit in s-world when switch is open, odd

integers.

Spring 2016

With L = 2 H, C = 0.5 F, R1 = 1 Ω, and R2 = 3 Ω:

VC (s) = 1

s2 + 2s+1Ke−sk

s+ LiL(k− )e−sk⎡

⎣⎢⎢

⎦⎥⎥+ 2s+ 4

s2 + 2s+1CvC (k− )e−sk

IL(s) = s

2s2 + 4s+ 2Ke−sk

s+ LiL(k− )e−sk −

vC (k− )e−sk

s

⎣⎢⎢

⎦⎥⎥

Solution in MATLAB’s Symbolic Toolbox.

syms t s Vin VC Z1 Z2 IL vc il H

Vin = 10/s; L=2; C = 0.5; R1 = 1; R2 = 3;

Z1 = L*s + R1;

Page 7: 202 Lec 11 Sp16 - Purdue Engineeringee202/Lecture/S18... · Spring 2016 Lecture 11: Switching in RLC Circuits Question: Why circuits with switches and switching in general? Answer:

Spring 2016

% Part 1: Analyze Circuit over the interval 0 ≤ t < 1.

IL = Vin/Z1

IL =

10/(s*(2*s + 1))

IL = collect(IL)

IL =

10/(2*s^2 + s)

il = ilaplace(IL)

il =

10 - 10/exp(t/2)

PLOTTING

t = 0:0.01:1;

f = 10*(1 - exp(-0.5*t));

Spring 2016

plot(t,f)

grid

ylabel('iL(t) A')

xlabel('time in sec')

Remark: vC(t) = 0 over this interval.

% Calculate Initial Condition on Inductor at t = 1-:

>> iL1 = 10 - 10/exp(0.5)

iL1 = 3.9347e+00

Page 8: 202 Lec 11 Sp16 - Purdue Engineeringee202/Lecture/S18... · Spring 2016 Lecture 11: Switching in RLC Circuits Question: Why circuits with switches and switching in general? Answer:

Spring 2016

% Part 2: Analyze Circuit over the interval 1 ≤ t < 2 NOTE:

we need the initial condition on the inductor and will

assume that the initial capacitor voltage at t = 1- is ZERO.

Also, I will not use the exp(–sT) to compute the responses

over the different intevals but will insert the time shift

later—i.e. I will refer everything to t = 0, and then after

solving, will insert the “t – T”.

% Compute Transfer Function from Vin(s) to VC(s) which

also works for the V-source s-domain model of an initialized

inductor.

H = (1/(C*s))/(R1 + R2 + L*s + 1/(C*s));

H = collect(H)

H =

1/(s^2 + 2*s + 1)

% Compute vc(t)

Spring 2016

VC = H*Vin + L*iL1*H

VC =

1107517733937437/(140737488355328*(s^2 + 2*s + 1)) +

10/(s*(s^2 + 2*s + 1))

Remark: using MATLAB we can simplify the numbers as

follows:

>> 1107517733937437/140737488355328

ans =7.8694

Thus we have

>> VC = 7.8694/(s^2 + 2*s + 1) + 10/(s*(s^2 + 2*s + 1));

>> vc = ilaplace(VC)

vc =

10 - (10653*t*exp(-t))/5000 - 10*exp(-t)

>> 10653/5000

ans = 2.1306

Page 9: 202 Lec 11 Sp16 - Purdue Engineeringee202/Lecture/S18... · Spring 2016 Lecture 11: Switching in RLC Circuits Question: Why circuits with switches and switching in general? Answer:

Spring 2016

% Hence, after time shifting to the right by 1 second, the

capacitor voltage is given by the equation:

vC (t) = 10−10e−(t−1) − 2.1306(t −1)e−(t−1)⎡

⎣⎤⎦u(t −1)

REMARK: Because the switch closes at 2, we need vc(2).

Because

of the diode, the capacitor will NOT discharge (our goal is to

charge up the “super cap”

to some desired voltage. Hence vc(3)= vc(2) which is the

needed initial condition on the capacitor when the switch

reopens at t = 3 s.

>> vc2 = 10 -10*exp(-1) -2.1306*1*exp(-1)

vc2 =

Spring 2016

5.5374e+00

>>

>> vc3 = vc2

vc3 = 5.5374e+00

PLOTTING THE CAPACITOR VOLTAGE SO FAR

% Now because the switch closes at t = 2, we need to

compute the inductor current at t = 2 s. This is done by

Page 10: 202 Lec 11 Sp16 - Purdue Engineeringee202/Lecture/S18... · Spring 2016 Lecture 11: Switching in RLC Circuits Question: Why circuits with switches and switching in general? Answer:

Spring 2016

considering the impedance seen by the voltage sources in

the s-domain circuit for 1 ≤ t < 2 s. Voltage/Impedance =

Current:

>> Z2 = L*s + R1 +R2 + 1/(C*s);

>> Z2 = collect(Z2)

Z2 =

(2*s^2 + 4*s + 2)/s

>> IL = Vin/Z2 + L*iL1/Z2

IL =

(1107517733937437*s)/(140737488355328*(2*s^2 + 4*s + 2)) +

10/(2*s^2 + 4*s + 2)

>> iL = ilaplace(IL)

iL =

3.9347/exp(t) + 1.0653*t/exp(t))

% I fixed the numbers in the above expression.

Hence, the actual inductor current for 1 ≤ t ≤ 2 s is:

Spring 2016

iL(t) = 3.9347e−(t−1)u(t −1)+1.0653te−(t−1)u(t −1)

>> iL2 = 3.9347/exp(1)+1.0653*1/exp(1)

iL2 =

1.8394e+00

PLOTTING WE HAVE

Page 11: 202 Lec 11 Sp16 - Purdue Engineeringee202/Lecture/S18... · Spring 2016 Lecture 11: Switching in RLC Circuits Question: Why circuits with switches and switching in general? Answer:

Spring 2016

Part 3 2 ≤ t < 3: We now analyze the circuit for this new time

period when the switch (a transistor) closes at t = 2,

recharging the inductor with energy.

>> IL = Vin/Z1 + L*iL2/Z1

IL =

2070977142721217/(562949953421312*(2*s + 1)) + 10/(s*(2*s +

1))

>> iL = ilaplace(IL)

iL =

10 – 8.0616/exp(t/2)

% The correct expression shifted in time is:

iL(t) = 10u(t − 2)−8.0616e−0.5(t−2)u(t − 2)

>> iL3 = 10 - 8.0616/exp(0.5)

iL3 = 5.1104e+00

Spring 2016

% Notice that the whole point of the above analysis is to

compute the initial inductor current at t = 3 s which will

then charge the capacitor up to a higher voltage over the

next interval.

PLOTTING

Part 4 3 ≤ t < 4: Now we have a source, a re-charged

inductor, and an initialized capacitor to deal with.

Page 12: 202 Lec 11 Sp16 - Purdue Engineeringee202/Lecture/S18... · Spring 2016 Lecture 11: Switching in RLC Circuits Question: Why circuits with switches and switching in general? Answer:

Spring 2016

% Because it is necessary to compute the cap voltage, the s-

domain current source model is used for the capacitor. This

requires the computation of the impedance seen by that

current source. Z3 is that impedance.

>> syms Z3

>> Z3 = ((R1 + R2 + L*s)/(C*s))/(R1 + R2 + L*s + 1/(C*s));

>> Z3 = collect(Z3)

Z3 =

(2*s + 4)/(s^2 + 2*s + 1)

>> VC = H*Vin + L*iL3*H + C*vc3*Z3

VC =

5753790364987759/(562949953421312*(s^2 + 2*s + 1)) +

10/(s*(s^2 + 2*s + 1)) + (389660000182965*(2*s +

4))/(140737488355328*(s^2 + 2*s + 1))

>> vc = ilaplace(VC)

vc = ilaplace(VC)

vc =

5.7582*t/exp(t) – 4.4626/exp(t) + 10

Spring 2016

% Again as before, the actual correct expression must be

shifted in time.

vC (t) = 10u(t − 3)+5.7582(t − 3)e−(t−3)u(t − 3)− 4.4626e−(t−3)u(t − 3)

% Again as before, we need to compute the capacitor

voltage at t = 4 which is the same

as the capacitor voltage at t = 5 because the diode will not let

the capacitor discharge when the switch recloses at t = 4.

>> vc4 = 5.7582/exp(1) - 4.4626/exp(1)+10

vc4 =1.0477e+01

Page 13: 202 Lec 11 Sp16 - Purdue Engineeringee202/Lecture/S18... · Spring 2016 Lecture 11: Switching in RLC Circuits Question: Why circuits with switches and switching in general? Answer:

Spring 2016

% The new capacitor voltage is now bigger than 10 V which

is larger than the

value at t = 2 s. Hence the capacitor is charging up as it is

supposed to do.

% As before we need the inductor current at t = 4 so that we

can analyze

the circuit when the switch is closed over the interval 4 ≤ t <

5 s.

>> IL = Vin/Z2 + L*iL3/Z2 + (vc3/s)/Z2

IL =

(6388*s)/(625*(2*s^2 + 4*s + 2)) + 77687/(5000*(2*s^2 + 4*s +

2))

>> iL = ilaplace(IL)

iL =

Spring 2016

(3194*exp(-t))/625 + (26583*t*exp(-t))/10000

% Fix the numbers:

>> 3194/625

ans =5.1104

% Write the expression for iL:

iL =

5.1104*exp(-t) + 2.6583*t*exp(-t)

% The correct expression is given by changing t in the above

to t-3 and

multiplying the expression by u(t-3):

iL(t) = 5.1104e−(t−3)u(t − 3)+ 2.6583(t − 3)e−(t−3)u(t − 3)

>> iL4 =5.1104*exp(-1) + 2.6583*exp(-1)

iL4 =

2.8579e+00

Page 14: 202 Lec 11 Sp16 - Purdue Engineeringee202/Lecture/S18... · Spring 2016 Lecture 11: Switching in RLC Circuits Question: Why circuits with switches and switching in general? Answer:

Spring 2016

ETC