EE3002 Part2
EE3002 Part2
Fall 2020
September 9, 2020
Today
Disturbances
r e u y
Controller System
−
ym
Measurements
Objective
I Analyze plant models
I Design dynamic models for particular systems
I Simulate in MATLAB and Simulink
Introduction
Physics-based derivation
I Newton’s Law of Motion:
F = ma
u − fb ẋ = mẍ
Equivalently:
fb u
ẍ + ẋ =
m m
Our variable of interest is the velocity v. Rewriting yields:
fb u
v̇ + v=
m m
Example: Cruise Control Model
We will use the following form to denote the fact that the variables
are transformed to another domain:
1
V (s)
= m fb
U (s) s+ m
1
V (s)
= m fb
U (s) s+ m
Fs = ks (y − x)
Fb = b(ẏ − ẋ)
Example: Car Suspension System
Fs = ks (y − x)
Fb = b(ẏ − ẋ)
Fw = kw (x − r)
Example: Car Suspension System
Fs = ks (y − x)
Fb = b(ẏ − ẋ)
Fw = kw (x − r)
b(ẏ − ẋ) + ks (y − x) − kw (x − r) = m1 ẍ
−ks (y − x) − b(ẏ − ẋ) = m2 ÿ
b ks kw kw
s2 X(s) + s (X(s) − Y (s)) + (X(s) − Y (s)) + X(s) = R(s)
m1 m1 m1 m1
b ks
s2 Y (s) + s (Y (s) − X(s)) + (Y (s) − X(s)) = 0
m2 m2
Example: Car Suspension System
b ks kw kw
s2 X(s) + s (X(s) − Y (s)) + (X(s) − Y (s)) + X(s) = R(s)
m1 m1 m1 m1
b ks
s2 Y (s) + s (Y (s) − X(s)) + (Y (s) − X(s)) = 0
m2 m2
I Rearranging yields:
Y (s)
=?
R(s)
Example: Pendulum
Equations of motion
Example: Pendulum
Equations of motion
I Torque: Tc
I Mass concentrated at the tip m
I Gravitational acceleration: g
I Output: The angle θ
Example: Pendulum
Equations of motion
I Torque: Tc
I Mass concentrated at the tip m
I Gravitational acceleration: g
I Output: The angle θ
I Applied torque is equal to the sum of moments at the tip:
Tc − mgl sin(θ) = I θ̈
g Tc
θ̈ + sin(θ) =
l ml2
Example: Pendulum
g Tc
θ̈ + sin(θ) =
l ml2
Example: Pendulum
θ̈ = −9.81θ + 1
θ̈ = −9.81θ + 1
I
Exercise: Simulation
I Simulate the behavior of the output θ for step input on MATLAB
I m = 1 kg, l = 1 m, g = 9.81 m/sec2 . System becomes:
θ̈ = −9.81θ + 1
θ̈ = −9.81θ + 1
Exercise: Simulation
I Repeat the same simulation in Simulink in continuous time
θ̈ = −9.81θ + 1
θ̈ = −9.81θ + 1
I Dynamics become:
Fc d + Md = I θ̈
I Dynamics become:
Fc d + Md = I θ̈
Fc d + Md = I θ̈
Θ(s) 1 1
=
U (s) I s2
Exercise: Simulation
Fc d + Md = I θ̈
Θ(s) 1 1
=
U (s) I s2
I Simulate for 10 seconds
Exercise: Simulation
Fc d + Md = I θ̈
Θ(s) 1 1
=
U (s) I s2
I Simulate for 10 seconds
I
Exercise: Simulation
Fc d + Md = I θ̈
Θ(s) 1 1
=
U (s) I s2
I Simulate for 10 seconds
I v4 = 0 → v1 = vi
Bridged Tee Circuit
I v4 = 0 → v1 = vi
I v2 = v1 − R1 i1 , etc.
Bridged Tee Circuit
I v4 = 0 → v1 = vi
I v2 = v1 − R1 i1 , etc.
I Node 2:
v1 − v2 v2 − v3 dv2
− + + C1 =0
R1 R3 dt
Node 3:
v3 − v2 d(v3 − v1 )
+ C2 =0
R2 dt
Bridged Tee Circuit
I v4 = 0 → v1 = vi
I v2 = v1 − R1 i1 , etc.
I Node 2:
v1 − v2 v2 − v3 dv2
− + + C1 =0
R1 R3 dt
Node 3:
v3 − v2 d(v3 − v1 )
+ C2 =0
R2 dt
I HW: Find the relation
between the input vi and
output v3
Opamp Circuit Model
I Assume an ideal opamp
Opamp Circuit Model
I Assume an ideal opamp
I For the opamp circuit shown,
derive the equations of motion
Opamp Circuit Model
I Assume an ideal opamp
I For the opamp circuit shown,
derive the equations of motion
I Positive node connected to
ground: v− = 0
I Thus,
v1
i1 =
R1
v2
i2 =
R2
vo
io =
Rf
I Note that i1 + i2 + i0 = 0. So
Rf Rf
vo = − v1 − v2
R1 R2
Opamp Integrator Model
I Ideal opamp
Opamp Integrator Model
I Ideal opamp
I For the opamp circuit shown,
derive the equations of motion
Opamp Integrator Model
I Ideal opamp
I For the opamp circuit shown,
derive the equations of motion
I iin + iout = 0. Thus
vin dvout
+C =0
Rin dt
Opamp Integrator Model
I Ideal opamp
I For the opamp circuit shown,
derive the equations of motion
I iin + iout = 0. Thus
vin dvout
+C =0
Rin dt
I Again, using the derivative
d
operator (s ≡ ):
dt
Vo (s) 1
=−
Vin (s) Rin Cs
DC Motor Model
Jm θ̈m + bθ̇m = Kt ia
DC Motor Model
Jm θ̈m + bθ̇m = Kt ia
I Combining yields
Θm Kt
=
Va (s) s ((Jm s + b)(La s + Ra ) + Kt Ke )
DC Motor Model