0% found this document useful (0 votes)
18 views29 pages

Tutorial6 Delay Aware Controller Design Sol

Uploaded by

Ankur Mondal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views29 pages

Tutorial6 Delay Aware Controller Design Sol

Uploaded by

Ankur Mondal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 29

Tutorial 6

Discrete System and Delay-aware Controller Design


Dynamic Systems in Real World and CPS Domain
Pacific equatorial Jets
Any System that Changes w.r.t time is a Dynamic System.
We express them by the change of system variables w.r.t. time
i.e. dx/dt = f(x(t))

Change in the number of Vehicles


Change in the water flow at a traffic signal checkpoint
Horseshoes in hurricanes, 2010, Philip C Du’ Toit et al.

Harrier AV-8B military aircraft A Moving Vehicle / Traffic Flow in a Road

Change in the
Speed, Position of a
Vehicle

Change in the Speed,


Altitude of Jumper Jet
Feedback Systems, Karl J Astrom, R Murray
Automatic Cruise Control (ACC) System
• The purpose of a cruise control system is to maintain certain reference speed
despite external disturbances, such as changes in road traffic or road grade.
• This is accomplished by measuring the current vehicle speed and comparing
it to the desired or reference speed.
• This is also how a human driver drives, but there can be disturbances that can
lead to an unsafe situations (crashes).
• Automatic cruise control (ACC) intervenes and automatically adjusts the
throttle (and brakes) according to the implemented control law by observing
the current vehicle speed.
Physical Setup of ACC
• We simplify the model by assuming that we can control the force generated at road-tire surface directly and will
neglect the dynamics of the powertrain, tires, etc., that go into generating the force.
• A control force 𝑢 is applied on the vehicle, of mass 𝑚.
• The resistive forces, 𝑏𝑣, due to rolling resistance and wind drag, are assumed to vary linearly with the vehicle
velocity,𝑣.

• Summing forces in the x-direction and applying Newton's


2nd law, we arrive at the following system equation :
𝑚𝑣ሶ + 𝑏𝑣 = 𝑢
• The output equation is : 𝑦=𝑣
• We can consider 𝑣 as the changing state for this system
• Our Control Design Objective Should be reaching a
desired reference velocity 𝑣
State Space Modeling
• Usual Dynamic System is expressed using the following equation,
where 𝑓 is transfer function and 𝑔 is input to state transition function : 𝑥ሶ = 𝑓 (𝑥) + 𝑔(𝑥) ∗ 𝑢(𝑥, 𝑡)
• We can also Express it as : 𝑥ሶ = 𝐴(𝑥) + 𝐵(𝑥) ∗ 𝑢(𝑥, 𝑡)
• For linear time-invariant systems it can be expressed in State-Space Format
where we have A as state-transition matrix and B as input-to-state transition matrix : 𝑥ሶ = 𝐴𝑥 + 𝐵𝑢
[We can also linearize any polynomial transfer function at a certain expansion point, More on this later...]

State Space Model : 𝑥ሶ = 𝐴𝑥 + 𝐵𝑢;


Output: 𝑦 = 𝐶𝑥 + 𝐷𝑢;

−𝑏 1
𝑥ሶ = 𝑣ሶ = 𝑣 + 𝑢
𝑚 𝑚

𝑦= 1 𝑣

−𝑏 1
𝐴= ;𝐵 = ; 𝐶 = 1 ; 𝐷 = [0]
𝑚 𝑚
DC Motor Speed: System Modelling
R  armature resistance
L  armature inductance
K  electromotive force constant
J  moment of inertia
b  friction co-efficient
i  current
V  voltage is the input and
Ɵሶ  rotational speed of the shaft is the output

Following Newton's 2nd law and Kirchhoff's voltage law, we get

𝐽𝜃ሷ + 𝑏𝜃ሶ = 𝐾𝑖
𝑑𝑖
𝐿 + 𝑅𝑖 = 𝑉 − 𝐾 𝜃ሶ
𝑑𝑡

Q1. Model the State-space equations for the DC Motor Speed Control System?
DC Motor Speed: System Modelling
State space model format:
𝑥ሶ = 𝐴𝑥 + 𝐵𝑢
𝑦 = 𝐶𝑥 + 𝐷𝑢

x=  system state vector


y  output vector
u  input to the system

Q1. Model the State-space equations for the DC Motor Speed Control System
V  voltage is the input and
Sol. Ɵሶ  rotational speed of the shaft is the output
𝐽𝜃ሷ + 𝑏𝜃ሶ = 𝐾𝑖
𝑏ሶ 𝐾 𝑏 𝐾
⇒ 𝜃 = − 𝜃ሶ + 𝑖
ሷ 𝑑 𝜃ሶ − 0
𝐽 𝐽 𝐽 𝐽 𝜃ሶ
= + 1 𝑉
𝑑𝑖 𝑑𝑡 𝑖 𝐾 𝑅 𝑖
𝐿 + 𝑅𝑖 = 𝑉 − 𝐾 𝜃ሶ − − 𝐿
𝑑𝑡 𝐿 𝐿
𝑑𝑖 −𝐾 𝑅 1 𝜃ሶ
⇒ = 𝜃ሶ − 𝑖 + 𝑣 𝑦 = 10
𝑑𝑡 𝐿 𝐿 𝐿 𝑖
DC Motor Speed: System Modelling
V  voltage is the input and
Ɵሶ  rotational speed of the shaft is the output

𝑏 𝐾
𝑑 𝜃ሶ − 0
𝐽 𝐽 𝜃ሶ
= + 1 𝑉
𝑑𝑡 𝑖 𝐾 𝑅 𝑖
− − 𝐿
𝐿 𝐿
𝜃ሶ
𝑦 = 10
𝑖
Q2. Consider the following values of the constants and comment on the stability of the continuous-time system
J = 0.01;
b = 0.1;
K = 0.01;
R = 1;
L = 0.5;
DC Motor Speed: System Modelling
V  voltage is the input and
Ɵሶ  rotational speed of the shaft is the output

𝑏 𝐾
𝑑 𝜃ሶ − 0
𝐽 𝐽 𝜃ሶ
= + 1 𝑉
𝑑𝑡 𝑖 𝐾 𝑅 𝑖
− − 𝐿
𝐿 𝐿
𝜃ሶ
𝑦 = 10
𝑖
Q2. Consider the following values of the constants and comment on the stability of the continuous-time system
J = 0.01; b = 0.1; K = 0.01; R = 1; L = 0.5;

Sol. Real part of the poles must on left-side for the system to be stable. Poles are nothing but the eigen values of the
system matrix A. Using the above constants, we get,
𝑏 𝐾

𝐽 𝐽 −10 1
𝐴= =
𝐾 𝑅 −0.02 −2
− −
𝐿 𝐿
And, Eigen values of A are -10, -2. Therefore, the system is stable.
DC Motor Speed: System Modelling
V  voltage is the input and
Ɵሶ  rotational speed of the shaft is the output

𝑏 𝐾
𝑑 𝜃ሶ − 0
𝐽 𝐽 𝜃ሶ
= + 1 𝑉
𝑑𝑡 𝑖 𝐾 𝑅 𝑖
− − 𝐿
𝐿 𝐿
𝜃ሶ
𝑦 = 10
𝑖
Q3. Consider the following values of the constants and implement a pole-placement based controller using
Ackerman’s Method [poles at -12].
DC Motor Speed: System Modelling
Q3. Consider the following values of the constants and implement a pole-placement based controller using
Ackerman’s Method [poles at -12].

Sol. Using the above constants, we get,


𝑏 𝐾

𝐽 𝐽 −10 1 0
𝐴= = ,𝐵 =
𝐾 𝑅 −0.02 −2 2
− −
𝐿 𝐿
Step 1: Check the state controllability of the system
0 2
𝐶𝑀 = 𝐵 𝐴𝐵 𝐴2 𝐵 … 𝐴𝑛−1 𝐵 = 𝐵 𝐴𝐵 =
2 −4
Rank of CM is 2. Therefore, the system is controllable
Step 2: Compute K following
−1
𝐾 = 0 0 0 … 1 𝐵 𝐴𝐵 𝐴2 𝐵 … 𝐴𝑛−1 𝐵 𝜙 𝐴
𝜙 𝐴 = 𝐴𝑛 + 𝛼1 𝐴𝑛−1 + … + 𝛼𝑛−1 𝐴 + 𝛼𝑛 𝐼
Solve 𝑠 − 𝜇1 𝑠 − 𝜇2 = 0 to get 𝛼1 and 𝛼2 where 𝜇1 = 𝜇2 = −12
3.98 12
𝜙 𝐴 = 𝐴2 + 2𝐴 + 2𝐼 =
−0.24 99.98
1 0.5
𝐶𝑀1 =
0.5 0
𝐾 = [1.99 6]
DC Motor Speed: System Modelling
Q4. Discretize the system with sampling period = 0.6 sec
DC Motor Speed: System Modelling
Q4. Discretize the system with sampling period = 0.6 sec

Sol.
2 2
𝐴 ℎ
𝐴𝑑 = 𝑒 𝐴×ℎ = 𝐼 + 𝐴ℎ + + … ≈ 𝐼 + 𝐴ℎ
2!
ℎ ℎ 2𝑠2
𝐴
𝐵𝑑 = න 𝑒 𝐴×𝑠 𝐵 𝑑𝑠 = න 𝐵(𝐼 + 𝐴𝑠 + + … ) 𝑑𝑠 ≈ 𝐵ℎ
0 0 2!

Continuous-time system matrices:


𝑏 𝐾

𝐽 𝐽 −10 1 0
𝐴= = ,𝐵 =
𝐾 𝑅 −0.02 −2 2
− −
𝐿 𝐿
DC Motor Speed: System Modelling
Q4. Discretize the system with sampling period = 0.6 sec

Sol.
2 2
𝐴 ℎ
𝐴𝑑 = 𝑒 𝐴×ℎ = 𝐼 + 𝐴ℎ + + … ≈ 𝐼 + 𝐴ℎ
2!
ℎ ℎ 2𝑠2
𝐴
𝐵𝑑 = න 𝑒 𝐴×𝑠 𝐵 𝑑𝑠 = න 𝐵(𝐼 + 𝐴𝑠 + + … ) 𝑑𝑠 ≈ 𝐵ℎ
0 0 2!

Continuous-time system matrices:


𝑏 𝐾

𝐽 𝐽 −10 1 0
𝐴= = ,𝐵 =
𝐾 𝑅 −0.02 −2 2
− −
𝐿 𝐿

Discrete-time system matrices:

−5 0.6 0
𝜙= Γ=
−0.012 −0.2 1.2
DC Motor Speed: System Modelling
Q5. Implement a pole-placement based controller using Ackerman’s Method [poles at 0.2]
Sol.
Discrete-time system matrices:
−5 0.6 0
𝜙= Γ=
−0.012 −0.2 1.2
DC Motor Speed: System Modelling
Q5. Implement a pole-placement based controller using Ackerman’s Method [poles at 0.2]
Sol.
Discrete-time system matrices:
−5 0.6 0
𝜙= Γ=
−0.012 −0.2 1.2
Step 1: Controllability check
𝛾 = Γ 𝜙Γ 𝜙 2 Γ … 𝜙 𝑛−1 Γ
DC Motor Speed: System Modelling
Q5. Implement a pole-placement based controller using Ackerman’s Method [poles at 0.2]
Sol.
Discrete-time system matrices:
−5 0.6 0
𝜙= Γ=
−0.012 −0.2 1.2
Step 1: Controllability check
𝛾 = Γ 𝜙Γ 𝜙 2 Γ … 𝜙 𝑛−1 Γ
0 0.72
= Γ 𝜙Γ =
1.2 −0.24
Rank(𝛾) = 2 The discrete system is controllable
DC Motor Speed: System Modelling
Q5. Implement a pole-placement based controller using Ackerman’s Method [poles at 0.2]
Sol.
Discrete-time system matrices:
−5 0.6 0
𝜙= Γ=
−0.012 −0.2 1.2
Step 1: Controllability check
𝛾 = Γ 𝜙Γ 𝜙 2 Γ … 𝜙 𝑛−1 Γ
0 0.72
= Γ 𝜙Γ =
1.2 −0.24
Rank(𝛾) = 2 The discrete system is controllable
Step 2: Apply Ackermann’s formula
𝐾 = − 0 0 0 … 1 𝛾 −1 𝐻(𝜙)
DC Motor Speed: System Modelling
Q5. Implement a pole-placement based controller using Ackerman’s Method [poles at 0.2]
Sol.
Discrete-time system matrices:
−5 0.6 0
𝜙= Γ=
−0.012 −0.2 1.2
Step 1: Controllability check
𝛾 = Γ 𝜙Γ 𝜙 2 Γ … 𝜙 𝑛−1 Γ
0 0.72
= Γ 𝜙Γ =
1.2 −0.24
Rank(𝛾) = 2 The discrete system is controllable
Step 2: Apply Ackermann’s formula
𝐾 = − 0 0 0 … 1 𝛾 −1 𝐻(𝜙)
𝐻 𝜙 = 𝜙 − 𝛼1 𝐼 𝜙 − 𝛼2 𝐼 … (𝜙 − 𝛼𝑛 𝐼) where 𝛼1 , 𝛼2 , … , 𝛼𝑛 are closed loop poles
DC Motor Speed: System Modelling
Q5. Implement a pole-placement based controller using Ackerman’s Method [poles at 0.2]
Sol.
Discrete-time system matrices:
−5 0.6 0
𝜙= Γ=
−0.012 −0.2 1.2
Step 1: Controllability check
𝛾 = Γ 𝜙Γ 𝜙 2 Γ … 𝜙 𝑛−1 Γ
0 0.72
= Γ 𝜙Γ =
1.2 −0.24
Rank(𝛾) = 2 The discrete system is controllable
Step 2: Apply Ackermann’s formula
𝐾 = − 0 0 0 … 1 𝛾 −1 𝐻(𝜙)
𝐻 𝜙 = 𝜙 − 𝛼1 𝐼 𝜙 − 𝛼2 𝐼 … (𝜙 − 𝛼𝑛 𝐼) where 𝛼1 , 𝛼2 , … , 𝛼𝑛 are closed loop poles
27.0328 -3.36
𝐻 𝜙 = 𝜙 − 0.2𝐼 𝜙 − 0.2𝐼 =
0.0672 0.1528
0.2778 0.8333
𝛾 −1 =
1.3889 0
𝐾 = [37.5456 − 4.6667]
DC Motor Speed: System Modelling
Q6. Derive a feed forward Gain
Sol.
DC Motor Speed: System Modelling
Q6. Derive a feed forward Gain
Sol.
1
𝐹 = 𝐶 𝐼 −𝜙−𝜏𝐾 −1𝜏 (note: C=[1 0])
DC Motor Speed: System Modelling
Q6. Derive a feed forward Gain
Sol.
1
𝐹 = 𝐶 𝐼 −𝜙−𝜏𝐾 −1𝜏 (note: C=[1 0])
𝐹 = 19.1311
DC Motor Speed: System Modelling
Q6. Derive a feed forward Gain
Sol.
1
𝐹 = 𝐶 𝐼 −𝜙−𝜏𝐾 −1𝜏 (note: C=[1 0])

𝐹 = 19.1311

Q7. Consider a delay of 0.3 sec and derive the state-space model of the delayed system
Sol.
DC Motor Speed: System Modelling
Q7. Consider a delay of 0.3 sec and derive the state-space model of the delayed system
Sol.
DC Motor Speed: System Modelling
Q7. Consider a delay of 0.3 sec and derive the state-space model of the delayed system
Sol.

𝜙 ≈ 𝐼 + 𝐴ℎ Γ1 𝐷𝑐 = 𝐷𝑐 𝐵 Γ0 = ℎ − 𝐷𝑐 𝐵
DC Motor Speed: System Modelling
Q7. Consider a delay of 0.3 sec and derive the state-space model of the delayed system
Sol.

𝜙 ≈ 𝐼 + 𝐴ℎ Γ1 𝐷𝑐 = 𝐷𝑐 𝐵 Γ0 = ℎ − 𝐷𝑐 𝐵

−5 0.6 0 0
𝜙𝑎𝑢𝑔 = −0.012 −0.2 0.6 Γ𝑎𝑢𝑔 = 0.6 𝐶𝑎𝑣𝑔 = [1 0 0]
0 0 0 1
DC Motor Speed: System Modelling
Q7. Consider a delay of 0.3 sec and derive the state-space model of the delayed system
Sol.

𝜙 ≈ 𝐼 + 𝐴ℎ Γ1 𝐷𝑐 = 𝐷𝑐 𝐵 Γ0 = ℎ − 𝐷𝑐 𝐵

−5 0.6 0 0
𝜙𝑎𝑢𝑔 = −0.012 −0.2 0.6 Γ𝑎𝑢𝑔 = 0.6 𝐶𝑎𝑣𝑔 = [1 0 0]
0 0 0 1

Q8. Derive a pole-placement based controller gain for the delayed system with poles at 0.2.
Follow the same steps and formula as discrete controller design only instead of 𝜙 and Γ, use 𝜙𝑎𝑢𝑔 and Γ𝑎𝑢𝑔 . Also, note
that, now the system’s dimension has increased by 1.
DC Motor Speed: System Modelling
Q7. Consider a delay of 0.3 sec and derive the state-space model of the delayed system
Sol.

𝜙 ≈ 𝐼 + 𝐴ℎ Γ1 𝐷𝑐 = 𝐷𝑐 𝐵 Γ0 = ℎ − 𝐷𝑐 𝐵

−5 0.6 0 0
𝜙𝑎𝑢𝑔 = −0.012 −0.2 0.6 Γ𝑎𝑢𝑔 = 0.6 𝐶𝑎𝑣𝑔 = [1 0 0]
0 0 0 1

Q8. Derive a pole-placement based controller gain for the delayed system with poles at 0.2.
Follow the same steps and formula as discrete controller design only instead of 𝜙 and Γ, use 𝜙𝑎𝑢𝑔 and Γ𝑎𝑢𝑔 . Also, note
that, now the system’s dimension has increased by 1.

Sol. Controllability matrix 𝛾𝑎𝑢𝑔 = [0 0.3600 -1.5120; 0.6000 0.4800 -0.1003; 1.0000 0 0]

𝐻(𝜙𝑎𝑢𝑔 ) = [27.0328 -3.3600 0.3600; 0.0672 0.1528 -0.3600; 0 0 0.0400]

−1 𝐻 𝜙
𝐾 = − 0 0 1 𝛾𝑎𝑢𝑔 𝑎𝑢𝑔 = [18.7800 -2.4184 0.4510]

You might also like