# 2 Order Ckts &amp; MATLAB nd

```Engineering 43
nd
2
Order
Ckts &amp; MATLAB
Bruce Mayer, PE
Registered Electrical &amp; Mechanical Engineer
BMayer@ChabotCollege.edu
Engineering-43: Engineering Circuit Analysis
1
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-43_Lec-04b_2nd_Order_Ckts.pptx
ReCall RLC VI Relationships
Resistor
Capacitor
vR t   R  iR t 
iR t   G  vR t 
dv t 
iC t   C C
dt
Engineering-43: Engineering Circuit Analysis
2
t
1
vC t    iC u du vC 0
C0
Inductor
vL t   L
t
diL t 
dt
1
iL t    vL u du  iL 0
L0
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-43_Lec-04b_2nd_Order_Ckts.pptx
Second Order Circuits
 Single Node-Pair
 Single Loop
 vC 
 vR 
iR
iL
vL
iC
 v S  v R  vC  v L  0
 iS  iR  iL  iC  0
v (t )
1t
dv
iR 
; i L   v ( x )dx  i L (t0 ); iC  C (t )
R
L t0
dt
t
v 1
dv
  v ( x )dx  i L (t0 )  C (t )  i S
R L t0
dt
d 2v 1 dv v di S
C 2
 
R dt L dt
dt
Engineering-43: Engineering Circuit Analysis

• By KVL
• By KCL
3

1 t
di
v R  Ri ; vC   i ( x )dx  vC (t0 ); v L  L (t )
C t0
dt
1 t
di
Ri   i ( x )dx  vC (t0 )  L (t )  v S
C t0
dt
Differentiating
d 2i
di i dv
L 2 R   S
dt C
dt
dt
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-43_Lec-04b_2nd_Order_Ckts.pptx
KEY to 2nd Order → [dx/dt]t=0+
 Most Confusion in 2nd
Order Ckts comes in
the form of the FirstDerivative IC
dx dt t 0  X 1
 If x = iL, Then Find vL
diL
L
dt
 vL 0  
t 0
or X 1  vL 0   L
Engineering-43: Engineering Circuit Analysis
4
 If x = vC, Then Find iC
dvC
C
dt
 iC 0  
t 0
or X 1  iC 0   C
 MUST Find at t=0+
vL OR iC
 Note that THESE
Quantities CAN Change
Instantaneously
• iC (but NOT vC)
• vL (but NOT iL)
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-43_Lec-04b_2nd_Order_Ckts.pptx
Hand Example  Simple No.s
 Solve this Equation for io
i0 (t)
iL (t)
t=0
1A
1
1H
2/5 F
5
 Do on WhiteBoard, Plot with MSExcel
 Some Findings for this Single Node-Pair
i0 (t )  0; t  0


1A  t 2  5 t 2
i0 (t ) 
e e
;t0
4
di0 (t ) 1A 5t 2 t 2


5e
 e ; t  0
dt
8S
Engineering-43: Engineering Circuit Analysis
5
di0 (t )
1S
 0  t max  ln 5  0.8047 S
dt
2
i0,max  i0 t max   0.1337 A
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-43_Lec-04b_2nd_Order_Ckts.pptx
The Single-Node Pair
 Assume that the SWITCH is a BETTER
Short-Circuit than the INDUCTOR for
i0 (t)
iL (t)
t=0
1A
1
1H
iL
2
5
2/5 F
 Start WhiteBoard Work using Above
as Template
Engineering-43: Engineering Circuit Analysis
6
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-43_Lec-04b_2nd_Order_Ckts.pptx
Engineering-43: Engineering Circuit Analysis
7
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-43_Lec-04b_2nd_Order_Ckts.pptx
Engineering-43: Engineering Circuit Analysis
8
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-43_Lec-04b_2nd_Order_Ckts.pptx
Engineering-43: Engineering Circuit Analysis
9
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-43_Lec-04b_2nd_Order_Ckts.pptx
Engineering-43: Engineering Circuit Analysis
10
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-43_Lec-04b_2nd_Order_Ckts.pptx
Engineering-43: Engineering Circuit Analysis
11
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-43_Lec-04b_2nd_Order_Ckts.pptx
Engineering-43: Engineering Circuit Analysis
12
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-43_Lec-04b_2nd_Order_Ckts.pptx
Engineering-43: Engineering Circuit Analysis
13
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-43_Lec-04b_2nd_Order_Ckts.pptx
133.75 mA
Parallel RLC Circuit Forced Transient Response
140
iO,max
i(t) (mA)
120
Current (mA)
100
i0 (t )  0; t  0

80

1A t 2 5t 2
i0 (t ) 
e e
;t0
4
60
40
20
0
-1
0
1
804.7 mS
2
file = Engr44_Lec_06-1_Last_example_Fall03..xls
Engineering-43: Engineering Circuit Analysis
14
3
4
5
6
7
8
Time (s)
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-43_Lec-04b_2nd_Order_Ckts.pptx
9
10
Parallel RLC Circuit Forced Transient Response
500
i(t) (mA)
450
400
Current (mA)
350
di0
dt
300
t 0
500 mA 1


1s
2
As
250
200
150
100
50
0
-1
0
file = Engr44_Lec_06-1_Last_example_Fall03..xls
Engineering-43: Engineering Circuit Analysis
15
1
2
Time (s)
3
4
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-43_Lec-04b_2nd_Order_Ckts.pptx
5
Parallel RLC Circuit Forced Response (P 6.69)
0.14
i0,max = 133.7 mA
i(t) (A)
0.12
Current (A)
0.10
di0
dt
0.08
t 0
1

2
As
0.06
i0 (t )  0; t  0
0.04
i0 (t ) 


1A  t 2  5 t 2
e e
;t0
4
0.02
0.00
-1
0
1
2
file = Engr44_Lec_06-1_Last_example_Fall03..xls
Engineering-43: Engineering Circuit Analysis
16
3
4
5
6
7
8
Time (s)
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-43_Lec-04b_2nd_Order_Ckts.pptx
9
10
MATLAB Example  Real No.s
 Solve this Equation for io
vt 
i0 (t)
iL (t)
t=0
IS
1A
R
1
1
1H
L
iL
2
R2
C
2/5 F
I S  Ket
 The Parameter values
R1 = 5.6 kΩ
R2 = 8.2 kΩ
L = 10 mH
C = 22 nF
K = 50mA
α = 2/s
• Again Assume that the Switch is a
Better DC-Short than the Inductor
Engineering-43: Engineering Circuit Analysis
17
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-43_Lec-04b_2nd_Order_Ckts.pptx
5
Engineering-43: Engineering Circuit Analysis
18
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-43_Lec-04b_2nd_Order_Ckts.pptx
1st
Engineering-43: Engineering Circuit Analysis
19
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-43_Lec-04b_2nd_Order_Ckts.pptx
1st
1st
Engineering-43: Engineering Circuit Analysis
20
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-43_Lec-04b_2nd_Order_Ckts.pptx
Engineering-43: Engineering Circuit Analysis
21
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-43_Lec-04b_2nd_Order_Ckts.pptx
0th
Engineering-43: Engineering Circuit Analysis
22
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-43_Lec-04b_2nd_Order_Ckts.pptx
Engineering-43: Engineering Circuit Analysis
23
1st
Check Estimate for vparticular
Check Estimate for vparticular
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-43_Lec-04b_2nd_Order_Ckts.pptx
Engineering-43: Engineering Circuit Analysis
24
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-43_Lec-04b_2nd_Order_Ckts.pptx
Engineering-43: Engineering Circuit Analysis
25
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-43_Lec-04b_2nd_Order_Ckts.pptx
Engineering-43: Engineering Circuit Analysis
26
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-43_Lec-04b_2nd_Order_Ckts.pptx
Engineering-43: Engineering Circuit Analysis
27
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-43_Lec-04b_2nd_Order_Ckts.pptx
Check Particular
Engineering-43: Engineering Circuit Analysis
28
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-43_Lec-04b_2nd_Order_Ckts.pptx
Solve Using
MATLAB
 See MATLAB file:
E43_Chp4_2nd_Order_D
epSrc_Parrallel_LCR_Ex
ample_1107.mn
Engineering-43: Engineering Circuit Analysis
29
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-43_Lec-04b_2nd_Order_Ckts.pptx
 Lots to e to some complex no.s
• Use Euler Rln to convert to Sin’s &amp; CoSin’s
vNoS := combine(vNo, sincos)
Engineering-43: Engineering Circuit Analysis
30
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-43_Lec-04b_2nd_Order_Ckts.pptx
DeCaying Sinusoid
 For Solution to the Ckt shown below
see MSWord file
• ENGR-43_Lec04c_Sp16_2nd_Order_Examples_MATLA
B_DeCaying_Sinusoid.docx
iL
+
vC
−
Engineering-43: Engineering Circuit Analysis
31
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-43_Lec-04b_2nd_Order_Ckts.pptx
General Ckt Solution Strategy
 Apply KCL or KVL depending on Nature
of ckt (single: node-pair? loop?)
 Convert between VI using
• Ohm’s Law
v R  iR R
iR  v R R
• Cap Law
ic  C
dvc
dt
1 t
vc   ic  x dx vc t0 
C t0
• Ind Law
diL
vL  L
dt
1 t
iL   vL  x dx iL t0 
L t0
 Solve Resulting Ckt Analytical-Model
using Any &amp; All MATH Methods
Engineering-43: Engineering Circuit Analysis
32
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-43_Lec-04b_2nd_Order_Ckts.pptx
2nd Order ODE SuperSUMMARY-1
 Find ANY Particular Solution to the
ODE, xp (often a CONSTANT)
 Homogenize ODE → set RHS = 0
 Assume xc = Kest; Sub into ODE
 Find Characteristic Eqn for xc 
a 2nd order Polynomial
d 2v 1 dv v diS
C 2
 
dt R dt L dt
Differentiating
Engineering-43: Engineering Circuit Analysis
33
d 2i
di i dv
L 2 R   S
dt
dt C
dt
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-43_Lec-04b_2nd_Order_Ckts.pptx
2nd Order ODE SuperSUMMARY-2
 Find Roots to Char Eqn Using
 Examine Nature of Roots to Reveal
form of the Eqn for the Complementary
Solution:
• Real &amp; Unequal Roots → xc = Decaying
Constants
• Real &amp; Equal Roots → xc = Decaying Line
• Complex Roots → xc = Decaying Sinusoid
Engineering-43: Engineering Circuit Analysis
34
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-43_Lec-04b_2nd_Order_Ckts.pptx
2nd Order ODE SuperSUMMARY-3
 Then the Complete Solution: x = xc + xp
 All TOTAL Solutions for x(t) includes
2 Unknown Constants
 Use the Two INITIAL Conditions to
generate two Eqns for the 2 unknowns
st
s t
x

K
e

K
e
 xp
 Solve for the 2
1
2
Unknowns to
x  e st mt  b   x p
Complete the x  e t  A1 cos nt  A2 sin nt   x p
Solution Process
1
Engineering-43: Engineering Circuit Analysis
35
2
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-43_Lec-04b_2nd_Order_Ckts.pptx
All Done for Today
st
1
Order
IC is
Critical!
Series 
diL
 L
Case 
dt
 vL 0  
t 0
Engineering-43: Engineering Circuit Analysis
36
Parallel 
dvC
 C
Case 
dt
 iC 0  
t 0
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-43_Lec-04b_2nd_Order_Ckts.pptx
WhiteBoard Work
t=0
i0 (t)
iL (t)
1A
1
1H
iL
2
 Let’s Work This Prob
• Some Findings
i0 (t )  0; t  0


1A  t 2  5 t 2
i0 (t ) 
e e
;t0
4
di0 (t ) 1A 5t 2 t 2


5e
 e ; t  0
dt
8S
di0 (t )
1S
 0  t max  ln 5  0.8047 S
dt
2
i0,max  i0 t max   0.1337 A
Engineering-43: Engineering Circuit Analysis
37
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-43_Lec-04b_2nd_Order_Ckts.pptx
2/5 F
5
Complete the Square -1
 Consider the General
2nd Order Polynomial
 Next, Divide by “a” to
give the second order
term the coefficient of 1
b
c
x  x
a
a
ax  bx  c  0
2
• Where a, b, c are
CONSTANTS
 Solve This Eqn for x by
Completing the Square
 First; isolate the Terms
involving x
ax  bx  c
2
Engineering-43: Engineering Circuit Analysis
38
2
 Now add to both Sides of
supplement” of (b/2a)2
2
2
b
b a b a c
x  x
 
 
a
 2   2  a
2
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-43_Lec-04b_2nd_Order_Ckts.pptx
Complete the Square -2
 Now the Left-Hand-Side  Use the Perfect Sq
(LHS) is a PERFECT
Expression
2
2
Square
b   b  c

2
2
x    
b
b a b a c
2
x  x
 
 
2a   2a  a

a
 2   2  a
2
2
b   b  c

x    
2a   2a  a

 Solve for x; but first let
2
b a c

   RHS  D
 2  a
b 2a  F
Engineering-43: Engineering Circuit Analysis
39
or
x  F 2  D
 Finally Find the Roots of
x  F 
2
D
x  F   D or
x1 , x2   F  D
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-43_Lec-04b_2nd_Order_Ckts.pptx
PERFECT SQUARE
Expression
2
2
b   b  c

x    
2a   2a  a

 Take the Square Root
of Both Sides
2
b
 b  c
x
   
2a
 2a  a
Engineering-43: Engineering Circuit Analysis
40
 Combine Terms inside
Common Denom
b
b2 c
x


2
2a
4a
a
b
b 2 c 4a
x


2
2a
4a
a 4a
b
b 2  4ac
x

2a
4a 2
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-43_Lec-04b_2nd_Order_Ckts.pptx
 Note that Denom is,
itself, a PERFECT SQ
b
b 2  4ac
x

2a
4a 2
b
b 2  4ac
x

2a
2a
 Next, Isolate x
b
b 2  4ac
x 
2a
2a
Engineering-43: Engineering Circuit Analysis
41
 Now Combine over
Common Denom
 b  b  4ac
x
2a
2
 But this the Renowned