View
203
Download
10
Category
Preview:
Citation preview
Model-Based Controller Design
Optimal linear quadratic (LQ) control Given the LTI plant model, with directly measurable state ๐ฅ:
๐ฅ (๐ก) = ๐ด๐ฅ(๐ก) + ๐ต๐ข(๐ก)๐ฆ(๐ก) = ๐ถ๐ฅ(๐ก) + ๐ท๐ข(๐ก)
; ๐ฅ โ ๐ ๐, ๐ข โ ๐ ๐ , ๐ฆ โ ๐ ๐
Find the control ๐ข to minimize the performance index (cost): ๐ฝ =
1
2๐ฅ๐ ๐ก๐ ๐๐ฅ ๐ก๐ +
1
2 ๐ฅ๐ ๐ก ๐๐ฅ ๐ก + ๐ข๐ ๐ก ๐ ๐ข ๐ก ๐๐ก๐ก๐๐ก0
where ๐ = ๐ ๐ > 0, ๐ = ๐๐ โฅ 0, ๐ = ๐๐ โฅ 0 are weight matrices
โข The optimal LQR control is found by minimizing the Hamiltonian function: ๐ป =
1
2๐ฅ๐ ๐ก ๐๐ฅ ๐ก + ๐ข๐ ๐ก ๐ ๐ข ๐ก + ๐๐(๐ก) ๐ด๐ฅ(๐ก) + ๐ต๐ข(๐ก)
where ๐(๐ก) is the Lagrangian multiplier
So, let
๐๐ป
๐๐ข= 0
๐๐ป
๐๐ฅ= ๐ (๐ก)
๐๐ป
๐๐= ๐ฅ (๐ก)
๐ ๐ข ๐ก + ๐ต๐๐ ๐ก = 0
๐๐ฅ ๐ก + ๐ด๐๐ ๐ก = ๐ (๐ก)
๐ด๐ฅ ๐ก + ๐ต๐ข ๐ก = ๐ฅ ๐ก
๐ข ๐ก = โ๐ โ1๐ต๐๐ ๐ก
๐ ๐ก = ๐ด๐๐ ๐ก + ๐๐ฅ ๐ก
๐ฅ ๐ก = ๐ด๐ฅ ๐ก + ๐ต๐ข ๐ก
โข For LTI systems ๐ ๐ก = ๐ ๐ก ๐ฅ(๐ก)
Optimal LQ control: ๐ข(๐ก) = โ๐พ(๐ก)๐ฅ(๐ก) where ๐พ(๐ก) = ๐ โ1๐ต๐๐(๐ก) and ๐(๐ก) is the solution of the differential Riccati equation (DRE):
๐ ๐ก = ๐ด๐๐(๐ก) + ๐(๐ก)๐ด + ๐ โ ๐(๐ก)๐ต๐ โ1๐ต๐๐(๐ก) , ๐ ๐ก๐ = ๐
Plant -
u r=0 x
K
Linear quadratic regulator (LQR)
Given the plant model:
๐ฅ (๐ก) = ๐ด๐ฅ(๐ก) + ๐ต๐ข(๐ก)๐ฆ(๐ก) = ๐ถ๐ฅ(๐ก) + ๐ท๐ข(๐ก)
; ๐ฅ โ ๐ ๐, ๐ข โ ๐ ๐, ๐ฆ โ ๐ ๐
Minimize the performance index (cost), for ๐ก๐ = โ (steady-state case):
๐ฝ =1
2 ๐ฅ๐ ๐ก ๐๐ฅ ๐ก + ๐ข๐ ๐ก ๐ ๐ข ๐ก ๐๐กโ
๐ก0
where ๐ = ๐ ๐ > 0, ๐ = ๐๐ โฅ 0 are weight matrices
โข For ๐ก๐ = โ, ๐ ๐ก = ๐ (constant)
LQR control: ๐ข(๐ก) = โ๐พ๐ฅ(๐ก) where ๐พ = ๐ โ1๐ต๐๐ and ๐ is the solution of the algebraic Riccati equation (ARE): ๐ด๐๐ ๐ก + ๐ ๐ก ๐ด + ๐ โ ๐ ๐ก ๐ต๐ โ1๐ต๐๐ ๐ก = 0
Closed-loop system equation (๐ = 0):
๐ฅ ๐ก = ๐ด โ ๐ต๐พ ๐ฅ ๐ก + ๐ต๐๐ฆ ๐ก = ๐ถ๐ฅ ๐ก + ๐ท๐
Or, equivalently, the quadruple ๐ด โ ๐ต๐พ ,๐ต, ๐ถ, ๐ท
Optimal Linear Quadratic (LQ) Control
Plant -
u r=0 x
K
Linear quadratic regulator (LQR)
Given the plant model:
๐ฅ (๐ก) = ๐ด๐ฅ(๐ก) + ๐ต๐ข(๐ก)๐ฆ(๐ก) = ๐ถ๐ฅ(๐ก) + ๐ท๐ข(๐ก)
; ๐ฅ โ ๐ ๐, ๐ข โ ๐ ๐, ๐ฆ โ ๐ ๐
Let ๐ข ๐ก = โ๐พ๐ฅ ๐ก + ๐๐ LQR state feedback control gain: ๐พ = ๐ โ1๐ต๐๐
and ๐ is the solution of the algebraic Riccati equation (ARE): ๐ด๐๐ ๐ก + ๐ ๐ก ๐ด + ๐ โ ๐ ๐ก ๐ต๐ โ1๐ต๐๐ ๐ก = 0
Choose N so that the closed-loop DC-gain is equal to one. Closed-loop system equation:
๐ฅ ๐ก = ๐ด โ ๐ต๐พ ๐ฅ ๐ก + ๐ต๐๐๐ฆ ๐ก = ๐ถ๐ฅ ๐ก + ๐ท๐๐
Or, equivalently, ๐บ ๐ = ๐ถ ๐ ๐ผ โ ๐ด โ ๐ต๐พโ1๐ต + ๐ท ๐
Or, the quadruple ๐ด โ ๐ต๐พ , ๐ต๐, ๐ถ, ๐ท๐
dc-Gain: ๐บ 0 = โ ๐ถ ๐ด โ ๐ต๐พ โ1๐ต + ๐ท ๐ = 1
Feedforward control gain: ๐ = โ ๐ถ ๐ด โ ๐ต๐พ โ1๐ต + ๐ท โ1
Optimal Linear Quadratic (LQ) Control
Plant -
u r x
K
N +
Linear quadratic regulator (LQR) Matlab functions: are(), lqr(), care(), dcgain(),
โข For example: P= are(A,B*inv(R)*Bโ,Q);
[K,P]=lqr(A,B,Q,R);
[P,L,K]=care(A,B,Q,R,S,E);
Example: Let ๐ฅ (๐ก) = ๐ด๐ฅ(๐ก) + ๐ต๐ข(๐ก)๐ฆ(๐ก) = ๐ถ๐ฅ(๐ก) + ๐ท๐ข(๐ก)
, with ๐ด =
โ0.2 0.50 โ0.5
0 0 01.6 0 0
0 00 00 0
โ14.3 85.8 00 โ33.3 1000 0 โ10
,
๐ต =
000030
, ๐ถ = 1 0 0 0 0 , ๐ท = 0 .
โข Find the LQR control ๐ข(๐ก) = โ๐พ๐ฅ(๐ก) and plot the closed-loop step response for ๐ = 1, ๐ = ๐๐๐๐ ๐, 0,0,0,0 , and ๐ = 1,5,10,50,100.
โข Also, for =100, plot the closed-loop states
Plant -
u r=0 x
K
Linear quadratic regulator (LQR) Matlab code:
A=[-0.2,0.5,0,0,0; 0,-0.5,1.6,0,0;
0,0,-14.3,85.8,0; 0,0,0,-33.3,100;
0,0,0,0,-10]; B=[0;0;0;0;30];
C=[1,0,0,0,0]; D=0; rho=1;
R=1; Q=diag([rho,0,0,0,0]);
for rho=[1,5,10,50,100],
Q(1,1)=rho; [K,P] =lqr(A,B,Q,R),
step(ss(A-B*K,B,C,D)); hold on;
end, hold off;
โข Or, instead of lqr(), use: P=are(A,B*inv(R)*B',Q),
K=inv(R)*B'*P,
โข Closed-loop states Q(1,1)=100; [K,P] =lqr(A,B,Q,R); Ac=A-B*K;
[y,t,x]=step(ss(Ac,B,C,D)); plot(t,x(:,2:5)); grid;
Optimal solution: P = 0.3563 0.0326 0.0026 0.0056 0.0309 0.0326 0.0044 0.0004 0.0009 0.0056 0.0026 0.0004 0.0000 0.0001 0.0005 0.0056 0.0009 0.0001 0.0002 0.0012 0.0309 0.0056 0.0005 0.0012 0.0088 K = 0.9260 0.1678 0.0157 0.0371 0.2653
๐ ๐ = โ๐ฒ๐ ๐ + ๐
Plant -
u r x
K
0 0.5 1 1.50
0.2
0.4
0.6
0.8
1
1.2
1.4Step Response
Time (sec)
Am
plitu
de
=1
=5
Closed-loop Step Response
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1-6
-4
-2
0
2
4
6
States x2, โฆ, x5
Discrete-time LQ control
Given the plant model:
๐ฅ(๐ + 1) = ๐ด๐ฅ(๐) + ๐ต๐ข(๐)๐ฆ(๐ก) = ๐ถ๐ฅ(๐ก) + ๐ท๐ข(๐ก)
; ๐ฅ โ ๐ ๐, ๐ข โ ๐ ๐, ๐ฆ โ ๐ ๐
Minimize the performance index (cost): ๐ฝ =
1
2 ๐ฅ๐ ๐ ๐๐ฅ ๐ + ๐ข๐ ๐ ๐ ๐ข ๐๐๐=0
where ๐ = ๐ ๐ > 0, ๐ = ๐๐ โฅ 0 are weight matrices
Discrete LQ control: ๐ข(๐) = โ๐พ๐ฅ(๐) where ๐พ = ๐ โ1๐ต๐๐(๐) and ๐(๐) is the solution of the dynamic/difference Riccati equation (DRE): ๐ ๐ = ๐ด๐ ๐ ๐ + 1 โ ๐ ๐ + 1 ๐ต๐ โ1๐ต๐๐ ๐ + 1 ๐ด + ๐ , ๐ ๐ = ๐
For steady-state case (๐ = โ) โข P is a constant matrix
Discrete LQR ๐ข(๐) = โ๐พ๐ฅ(๐)
where ๐พ = ๐ + ๐ต๐๐๐ต โ1๐ต๐๐๐ด and ๐ = ๐ด๐ ๐ โ ๐๐ต๐ โ1๐ต๐๐ ๐ด + ๐
LQR for Discrete-Time Systems
Matlab functions: dlqr(), dare(),
Selection of Weighting Matrices Single-input, single-output (SISO) case: โข LQR control (a possible choice for weight matrices)
โข ๐ = 1, ๐ = ๐๐๐๐(๐ฅ1๐๐๐ฅ , โฆ , ๐ฅ๐๐๐๐ฅ), where ๐ฅ๐๐๐๐ฅ is the maximum expected value of state ๐ฅ๐(๐ก)
โข Cheap control (control effort is inexpensive)
โข ๐ = 1, ๐ = ๐๐0, where ๐0 = ๐0๐ โฅ 0 and ๐ > 0 is a large number
โข Expensive control (control effort is expensive)
โข ๐ = 1, ๐ = ๐๐0, where ๐0 = ๐0๐ โฅ 0 and ๐ > 0 is a small number
โข Terminal control (terminal state must tend to zero)
โข ๐ = 0, ๐ = ๐๐0, where ๐0 = ๐0๐ โฅ 0 and ๐ tends to infinity
โข Here, the DRE changes to:
โ๐ ๐ก = ๐ด๐๐(๐ก) + ๐(๐ก)๐ด โ ๐(๐ก)๐ต๐ โ1๐ต๐๐(๐ก) , ๐ ๐ก๐ = ๐๐0
Equivalently, let ฮ ๐ก = ๐โ1(๐ก)
ฮ (๐ก) = ฮ (๐ก)๐ด๐ + ๐ดฮ (๐ก) โ ๐ต๐ โ1๐ต๐ , ฮ ๐ก๐ = 0
Plant model: ๐ฅ (๐ก) = ๐ด๐ฅ(๐ก) + ๐ต๐ข(๐ก)๐ฆ(๐ก) = ๐ถ๐ฅ(๐ก) + ๐ท๐ข(๐ก)
Degree of stability ๐ผ โข All closed-loop poles are to the left of โ๐ผ โข Define a new performance index (cost)
๐ฝ =1
2 ๐2๐ผ๐ก ๐ฅ๐ ๐ก ๐๐ฅ ๐ก + ๐ข๐ ๐ก ๐ ๐ข ๐ก ๐๐กโ
๐ก0
where ๐ = ๐ ๐ > 0, ๐ = ๐๐ โฅ 0 are weight matrices
โข Define a new state variable and control ๐(๐ก) = ๐๐ผ๐ก๐ฅ(๐ก)
๐ฃ(๐ก) = ๐๐ผ๐ก๐ข(๐ก)
New state equation and performance index (cost) ๐ (๐ก) = ๐ด + ๐ผ๐ผ ๐(๐ก) + ๐ต๐ฃ(๐ก)
๐ฝ =1
2 ๐๐ ๐ก ๐๐ ๐ก + ๐ฃ๐ ๐ก ๐ ๐ฃ ๐ก ๐๐กโ
๐ก0
LQR with degree of stability ๐ข(๐ก) = โ๐พ๐ฅ(๐ก)
where ๐พ = ๐ โ1๐ต๐๐ and the modified ARE is: (๐ด + ๐ผ๐ผ)๐๐ + ๐ ๐ด + ๐ผ๐ผ + ๐ โ ๐๐ต๐ โ1๐ตโฒ๐ = 0
LQR with Degree of Stability
Matlab code: P=are((A_a*eye(size(A)))โ,B*inv(R)*Bโ,Q); k=inv(R)*Bโ*P; u=-k*x;
or use lqr() with A replaced with (A+I)
Observer Design
LQR assumptions: 1. Plant model is perfectly known: ๐ฅ (๐ก) = ๐ด๐ฅ(๐ก) + ๐ต๐ข(๐ก)
๐ฆ(๐ก) = ๐ถ๐ฅ(๐ก) + ๐ท๐ข(๐ก)
2. All states are directly measurable โข If assumption 1 is not true (the model has uncertainties), use robust control โข If assumption 2 is not true (only the output is measurable), use an observer
โข System must be observable
Observer (state estimator) design: โข Create a copy of the plant model with corrective term
๐ฅ = ๐ด๐ฅ + ๐ต๐ข + ๐พ๐(๐ฆ โ ๐ฆ )๐ฆ = ๐ถ๐ฅ + ๐ท๐ข
โข Choose the observer gain ๐พ๐ so that all eigenvalues of ๐ด โ ๐พ๐๐ถ are in LHP
๐ฅ (๐ก) = ๐ด๐ฅ(๐ก) + ๐ต๐ข(๐ก)๐ฆ(๐ก) = ๐ถ๐ฅ(๐ก) + ๐ท๐ข(๐ก)
u y
๐ฅ ๐ก = ๐ด โ ๐พ๐๐ถ ๐ฅ ๐ก + ๐ต โ ๐พ๐๐ท ๐ข ๐ก + ๐พ๐๐ฆ ๐ฅ
Plant
Observer
For plant model, (assuming that the state vector ๐ฅ is not measured):
๐ฅ = ๐ด๐ฅ + ๐ต๐ข๐ฆ = ๐ถ๐ฅ + ๐ท๐ข
An observer-based controller has the form:
๐ฅ = ๐ด๐ฅ + ๐ต๐ข + ๐พ๐(๐ฆ โ ๐ถ๐ฅ โ ๐ท๐ข)๐ข = โ๐พ๐ฅ + ๐๐
โข The observer can be written as: ๐ฅ = ๐ด โ ๐พ๐๐ถ ๐ฅ + ๐ต โ ๐พ๐๐ท ๐ข + ๐พ๐๐ฆ
โข Or, by superposition:
๐ฅ ๐ข = ๐ด โ ๐พ๐๐ถ ๐ฅ ๐ข + ๐ต โ ๐พ๐๐ท ๐ข
๐ฅ ๐ฆ = ๐ด โ ๐พ๐๐ถ ๐ฅ ๐ฆ + ๐พ๐๐ฆ
๐ฅ = ๐ฅ ๐ข + ๐ฅ ๐ฆ
Observer-based controller, (๐ฅ = ๐ฅ ๐ข + ๐ฅ ๐ฆ):
๐ฅ ๐ข = ๐ด โ ๐พ๐๐ถ ๐ฅ ๐ข + ๐ต โ ๐พ๐๐ท ๐ข๐ข๐ข = ๐พ๐ฅ ๐ข
โ ๐บ๐ข(๐ )
๐ฅ ๐ฆ = ๐ด โ ๐พ๐๐ถ ๐ฅ ๐ฆ + ๐พ๐๐ฆ
๐ข๐ฆ = ๐พ๐ฅ ๐ฆ โ ๐บ๐ฆ ๐
๐ข = ๐๐ โ ๐ข๐ข โ ๐ข๐ฆ
Observer-Based Controller Design
Plant u y
Observer ๐ฅ
N
K
r
-
G(s) u y
N r
-
Gy(s)
Guc(s)
G(s) u y
N r
-
Gy(s)
Gu(s) - uu
uy
๐บ๐ข๐(๐ ) = ๐ผ + ๐บ๐ข(๐ )โ1
Matlab function: reg(), Syntax: [Ac,Bc,Cc,Dc]=reg(A,B,C,D,K,Ko);
Or: Gc=-reg(G,K,Ko)
Example: Let ๐ฅ (๐ก) = ๐ด๐ฅ(๐ก) + ๐ต๐ข(๐ก)๐ฆ(๐ก) = ๐ถ๐ฅ(๐ก) + ๐ท๐ข(๐ก)
, with ๐ด =
โ0.2 0.50 โ0.5
0 0 01.6 0 0
0 00 00 0
โ14.3 85.8 00 โ33.3 1000 0 โ10
, ๐ต =
000030
,
๐ถ = 1 0 0 0 0 , ๐ท = 0 .
Find the observer-based LQR control ๐ข ๐ก = โ๐พ๐ฅ ๐ก + ๐ for ๐ = 1, ๐ = ๐๐๐๐ 1,0,0,0,0 , using an observer gain ๐พ๐ = โ8.3 979.24 โ19367.61 4293.85 0 ๐, and then plot the closed-loop step response.
Matlab code: A=[-0.2,0.5,0,0,0; 0,-0.5,1.6,0,0; 0,0,-14.3,85.8,0; 0,0,0,-33.3,100; 0,0,0,0,-10]; B=[0;0;0;0;30]; C=[1,0,0,0,0]; D=0; R=1; Q=diag([1,0,0,0,0]); G=ss(A,B,C,D); [K,P] =lqr(A,B,Q,R); Ko=[-8.3,979.24,-19367.61,4293.85,0]'; Gc=-reg(G,K,Ko); zpk(Gc), Gcl1=ss(A-B*K,B,C,D); Gcl2=feedback(Gc*G,1,-1); step(Gcl1,Gcl2);
Observer-Based Controller Design
G(s) Gc(s) -
e u r y
0 0.5 1 1.5 2 2.50
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6From: In(1) To: u1
Step Response
Time (sec)
Am
plitu
de
Full-state feedback LQR
Observer-based LQR
๐บ๐(๐ ) =11.4839 (s+33.34) (s+14.3) (s+10) (s+1.792)
(s+20.92) (s^2 + 30.19s + 328.1) (s^2 + 6.845s + 120)
Pole Placement Design Technique
Given the system ๐ฅ = ๐ด๐ฅ + ๐ต๐ข๐ฆ = ๐ถ๐ฅ + ๐ท๐ข
with a state feedback control ๐ข = โ๐พ๐ฅ + ๐๐
โข If ๐ด, ๐ต is controllable and ๐ฅ is directly measurable, the closed-loop poles (eigenvalues of ๐ด โ ๐ต๐พ ) can be arbitrarily assigned โ Imaginary poles, however, must come in conjugate pairs
โข The systemโs open-loop characteristic equation is:
๐ ๐ = ๐๐๐ก ๐ ๐ผ โ ๐ด = ๐ ๐ + ๐1๐ ๐โ1 +โฏ+ ๐๐โ1๐ + ๐๐
โข The systemโs closed-loop characteristic equation is:
๐ฟ ๐ = ๐๐๐ก ๐ ๐ผ โ ๐ด + ๐ต๐พ = ๐ ๐ + ๐1 ๐พ ๐ ๐โ1 +โฏ+ ๐๐โ1 ๐พ ๐ + ๐๐(๐พ)
โข Let the desired closed-loop poles be: ๐๐, ๐ = 1, โฆ , ๐
โ The desired closed-loop characteristic equation can be written as :
๐ผ ๐ = ๐ โ ๐๐ = ๐ ๐ + ๐ผ1๐ ๐โ1 +โฏ+ ๐ผ๐โ1๐ + ๐ผ๐
๐๐=1
Feedback gain ๐พ = ๐1 โฏ ๐๐ can be found, by equating ๐ฟ ๐ and ๐ผ ๐ , as
๐ฟ ๐ = ๐ผ ๐
๐1 ๐พ = ๐ผ1โฎ
๐๐โ1 ๐พ = ๐ผ๐โ1๐๐ ๐พ = ๐ผ๐
๐พ = ๐1 โฏ ๐๐ = ?
Pole Placement Control Algorithms โข Bass-Gura algorithm ๐พ = ๐ โ ๐ผ ๐๐ฟโ1๐โ1
where ๐ โ ๐ผ ๐ = ๐1 โ ๐ผ1 โฏ ๐๐ โ ๐ผ๐ , ๐ = ๐ต ๐ด๐ต โฏ ๐ด๐โ1๐ต , and ๐ฟ =
๐๐โ1 ๐๐โ2๐๐โ2 ๐๐โ3
โฏ ๐1 1โฏ 1
โฎ โฎ๐1 11
โฑ
is the non-singular Hankel matrix
โข Ackermannโs algorithm โ Can be applied only to SISO systems
๐พ = 0 โฏ 0 1 ๐โ1๐ผ where ๐ผ๐ = ๐ผ1 โฏ ๐ผ๐ , ๐ = ๐ต ๐ด๐ต โฏ ๐ด๐โ1๐ต
โข Numerically robust pole-placement algorithm (place) โ Can be applied to MIMO systems โ Desired poles must all be distinct
Matlab functions: bass_pp(), acker(), place(), K=bass_pp(A,B,pdes) K=acker(A,B,pdes) K=place(A,B,pdes) where pdes = desired closed-loop poles
Matlab function for Bass-Gura algorithm function K=bass_pp(A,B,p) n=length(B); a1=poly(p); alpha=[a1(n:-1:2),1]; C=ctrb(A,B); a=poly(A); aa=[a(n:-1:2),1]; L=hankel(aa); K=(a1(n+1:-1:2)-a(n+1:-1:2))*inv(L)*inv(C);
Pole Placement Control Design
Example: Consider the multivariable system model ๐ฅ = ๐ด๐ฅ + ๐ต๐ข๐ฆ = ๐ถ๐ฅ + ๐ท๐ข
with
๐ด =
0 2 01 0 00 1 0
0 โ2 0 0 0 โ1 0 0 0
0 0 0 2 0 0 0 0 โ1
3 0 01 0 00 1 0
, ๐ต =
1 20 00 10 โ10 10 0
, ๐ถ = 1 0 0 0 0 0 , ๐ท = 0
โข Design a state feedback control ๐ข = โ๐พ๐ฅ + ๐๐ so the closed-loop poles are at: ๐๐ = โ1, โ2, โ3, โ4, โ1j. Also draw the closed-loop step response.
Matlab code: A=[0,2,0,0,-2,0; 1,0,0,0,0,-1; 0,1,0,0,0,0; 0,0,0,3,0,0; 2,0,0,1,0,0; 0,0,-1,0,1,0];
B=[1,2; 0,0; 0,1; 0,-1; 0,1; 0,0]; C=[1,0,0,0,0,0]; D=0;
pdes=[-1,-2,-3,-4,-1+i,-1-i];
K=place(A,B,pdes), N=inv(diag(dcgain(ss((A-B*K),B,C,D)))),
eig(A-B*K), sys_cl=ss((A-B*K),B*N,C,D); dcgain(sys_cl);
step(sys_cl);
Control gains:
๐พ =8.0037 โ26.0056 โ26.11220.1759 โ3.0018 โ3.1317
16.3759 23.2324 28.7704โ7.7366 2.0396 2.6613
๐ =โ10.9884 0
0 13.6388 0 2 4 6
-1
-0.5
0
0.5
1
1.5
2
2.5
3
3.5From: In(1)
0 2 4 6
From: In(2)
Step Response
Time (sec)
Am
plitu
de Response to u1 Response to u2
โข Observer design using pole placement technique
โ Dual of control design problem
โข Matlab functions: place(), acker(),
Example: Given the plant ๐ฅ = ๐ด๐ฅ + ๐ต๐ข๐ฆ = ๐ถ๐ฅ + ๐ท๐ข
with ๐ด =
0 10 0
0 0โ1 0
0 00 0
0 111 0
, ๐ต =
010โ1
,
๐ถ = 1 2 3 4 , ๐ท = 0
โข Design an observer with poles at: ๐ 1,2,3,4 = โ1,โ2,โ1 ยฑ ๐
Matlab code:
A=[0,1,0,0; 0,0,-1,0; 0,0,0,1; 0,0,11,0];
B=[0; 1; 0; -1]; C=[1,2,3,4]; D=0;
pdes=[-1, -2, -1+i, -1-i];
Ko=place(A',C',pdes)', eig(A-Ko*C),
Pole Placement Control Design Technique
Observer gain:
๐พ๐ =
โ0.2203โ0.47500.42381.2247
Observer-based controller design using pole placement
Plant: ๐ฅ = ๐ด๐ฅ + ๐ต๐ข๐ฆ = ๐ถ๐ฅ + ๐ท๐ข
Controller: ๐ฅ = ๐ด๐ฅ + ๐ต๐ข + ๐พ๐(๐ฆ โ ๐ถ๐ฅ โ ๐ท๐ข)๐ข = โ๐พ๐ฅ + ๐๐
Equivalently:
โข ๐บ๐ ๐ =๐๐ฆ(๐ )
๐(๐ )=
๐ด โ ๐ต๐พ โ ๐พ๐๐ถ + ๐พ๐๐ท๐พ ๐พ๐๐พ 0
โข ๐บ๐๐ ๐ =๐๐(๐ )
๐ (๐ )=
๐ด โ ๐ต๐พ โ ๐พ๐๐ถ + ๐พ๐๐ท๐พ ๐ต โ ๐พ๐๐ท ๐โ๐พ ๐
Closed-loop system:
๐ฅ ๐ฅ
=๐ด โ๐ต๐พ๐พ๐๐ถ ๐ด โ ๐ต๐พ โ ๐พ๐๐ถ
๐ฅ๐ฅ +
๐ต๐ต
๐๐
๐ฆ = ๐ถ โ๐ท๐พ๐ฅ๐ฅ + ๐ท ๐๐
๐บ๐๐ ๐ = ๐ถ โ๐ท๐พ ๐ ๐ผ โ๐ด โ๐ต๐พ๐พ๐๐ถ ๐ด โ ๐ต๐พ โ ๐พ๐๐ถ
โ1๐ต๐ต
+ ๐ท ๐
DC-gain = ๐บ๐๐(0) = 1 ๐ = โ ๐ถ โ๐ท๐พ๐ด โ๐ต๐พ๐พ๐๐ถ ๐ด โ ๐ต๐พ โ ๐พ๐๐ถ
โ1๐ต๐ต
+ ๐ท
โ1
Pole Placement Control Design Technique
G(s) u y r
-
Gc(s)
Grc(s)
uy
ur
Plant u y
Observer ๐ฅ
N
K
r
-
Observer-based controller design using pole placement
Example: Given the plant ๐ฅ = ๐ด๐ฅ + ๐ต๐ข๐ฆ = ๐ถ๐ฅ + ๐ท๐ข
with ๐ด =โ0.3 0.1 โ0.051 0.1 0
โ1.5 โ8.9 โ0.05, ๐ต =
204
,
๐ถ = 1 2 3 , ๐ท = 0 โข Design an observer-based controller ๐ข = โ๐พ๐ฅ + ๐๐ so the closed-loop poles are
at: ๐1,2,3 = โ1,โ2,โ3 and the observer poles are at ๐ 1,2,3 = โ10,โ20,โ30
Matlab code: A=[-0.3,0.1,-0.05; 1,0.1,0; -1.5,-8.9,-0.05];
B=[2; 0; 4]; C=[1,2,3]; D=0;
pcdes=[-1, -2, -3]; podes=[-10, -20, -30];
K=place(A,B,pcdes), Ko=place(A',C',podes)',
N=inv(dcgain(ss([A,-B*K;Ko*C,A-B*K-Ko*C],[B;B],[C,-D*K],D))),
Gcl=ss([A,-B*K;Ko*C,A-B*K-Ko*C],[B;B]*N,[C,-D*K],D*N);
Step(Gcl);
Pole Placement Control Design Technique
Controller gains: ๐พ = 3.6496 5.7189 โ0.3873 ,
๐พ๐ =โ225.8203โ17.9695107.1698
,
๐ = โ0.1106
0 2 4 6 8-0.2
0
0.2
0.4
0.6
0.8
1
1.2Step Response
Time (sec)
Am
plitu
de
Decoupling Control of Multivariable Systems
Decoupling control with state feedback โข Plant (A,B,C,D) with m inputs and m outputs
โข State feedback control: ๐ข = ๐๐ฃ โ ๐พ๐ฅ
For each row ๐๐๐ of ๐ถ , let ๐๐ โ 0,1,โฏ , ๐ โ 1 be the smallest integer where ๐๐
๐๐ด๐๐๐ต โ 0
Decoupler gains: ๐ = ๐ต1โ1, ๐พ = ๐
๐1๐๐ด๐1+1
โฎ๐๐
๐๐ด๐๐+1 , (if ๐ต1 =
๐1๐๐ด๐1๐ตโฎ
๐๐๐๐ด๐๐๐ต
is nonsingular)
Decoupled model:
๐บ1 ๐ = ๐๐๐๐1
๐ ๐1+1, โฏ ,
1
๐ ๐๐+1
Now, design a controller ๐บ๐๐ for each ๐บ1๐:
๐บ๐ ๐ = ๐๐๐๐ ๐บ๐1 ๐ ,โฏ , ๐บ๐๐ ๐
Matlab function: decoupler(),
Syntax: [G1,K,d,N]=decoupler(G) where G and G1 are the plant and decoupled models,
K and N are the feedback and feedforward gains,
d is the vector of djโs
Matlab code for decoupler function: function [G1,K,d,Gam]=decoupler(G) A=G.a; B=G.b; C=G.c; [n,m]=size(G.b); B1=[]; K0=[]; for j=1:m,
for k=0:n-1, if norm(C(j,:)*A^k*B)>eps, d(j)=k; break; end,
end, B1=[B1; C(j,:)*A^d(j)*B]; K0=[K0; C(j,:)*A^(d(j)+1)];
end, Gam=inv(B1); K=Gam*K0; G1=minreal(tf(ss(A-B*K,B,C,G.d))*inv(B1));
G(s) u y r
-
K
Gc(s) v
N -
Decoupled Model G1(s)
x
Decoupling Control of Multivariable Systems
Pole placement decoupling control with state feedback โข State feedback control: ๐ข = ๐๐ โ ๐พ๐ฅ
Define: ๐ธ =๐1
๐๐ด๐1๐ตโฎ
๐๐๐๐ด๐๐๐ต
and ๐น =
๐1๐ ๐ด๐1+1 + ๐1,1๐ด
๐1 +โฏ+ ๐1,๐1+1๐ผ
โฎ๐๐
๐ ๐ด๐๐+1 + ๐๐,1๐ด๐๐ +โฏ+ ๐๐,๐๐+1๐ผ
Pole placement: Assign control gains so that the transfer function of the jth subsystem is equal to
the nj-th-order optimal ITAE standard TF: ๐๐๐ ๐ =1
๐ ๐๐+๐1๐
๐๐โ1+โฏ+๐๐๐โ1๐ +๐๐๐
, ๐๐ = ๐๐+1, with parameters:
Decoupled transfer function: ๐บ1 ๐ = ๐๐๐๐๐1,๐1+1
๐ ๐1+1+๐1,1๐ ๐1+โฏ+๐1,๐1+1
, โฏ ,๐๐,๐๐+1
๐ ๐๐+1+๐๐,1๐ ๐๐+โฏ+๐๐,๐๐+1
Control gains: ๐พ = ๐ธโ1๐น, ๐ = ๐ธโ1๐, with ๐ = ๐๐๐๐(๐1,๐1+1, โฏ ,+๐๐,๐๐+1), (if ๐ธ is nonsingular)
G(s) u y
-
K
r N
Decoupled System
x
n Mp nts Denominator of ๐๐ ๐ with ๐๐ = ๐๐๐
1 ๐ + ๐๐
2 4.6% 6.0 ๐ 2 + 1.41๐๐๐ + ๐๐2
3 2% 7.6 ๐ 3 + 1.75๐๐๐ 2 + 2.15๐๐
2๐ + ๐๐3
4 1.9% 5.4 ๐ 4 + 2.1๐๐๐ 3 + 2.4๐๐
2๐ 2 + 2.7๐๐3๐ + ๐๐
4
5 2.1% 6.6 ๐ 5 + 2.8๐๐๐ 4 + 5.0๐๐
2๐ 3 + 5.5๐๐3๐ 2 + 2.4๐๐
4๐ + ๐๐5
6 5% 7.8 ๐ 6 + 2.25๐๐๐ 5 + 6.6๐๐
2๐ 4 + 8.6๐๐3๐ 3 + 7.45๐๐
4๐ 2 + 2.95๐๐5๐ + ๐๐
6
Matlab code for std_tf function: function G=std_tf(wn,n) if n>6, disp('n must be less than 7'); end M=[1,1,0,0,0,0,0; 1,1.4,1,0,0,0,0; 1,1.75,2.15,1,0,0,0; 1,2.1,3.4,2.7,1,0,0; 1,2.8,5,5.5,3.4,1,0; 1,3.25,6.6,8.6,7.45,3.95,1]; G=tf(wn^n,M(n,1:n+1).*(wn*ones(1,n+1)).^[0:n]);
Pole placement decoupling control with state feedback Matlab functions: std_tf(), decouple_pp(),
Syntax: G=std_tf(wn,n);
[G1,K,d,N]=decouple_pp(G,wn)
Pole Placement Control Design Technique
Controller gains: ๐พ =
โ0.125 2.1250.625 โ0.875
โ0.375 โ4.375โ0.125 2.125
,
๐ =โ7.5 1.252.5 0
Decoupled TF:
๐บ1 ๐ =
5
๐ +50
05
๐ +5
Matlab code for decouple_pp function: function [G1,K,d,N]=decouple_pp(G,wn) A=G.a; B=G.b; C=G.c; [n,m]=size(G.b); E=[]; F=[]; for j=1:m,
for i=0:n-1, if norm(C(j,:)*A^i*B)>eps, d(j)=i; break; end,
end, g1=std_tf(wn,d(j)+1); [~,cc]=tfdata(g1,'v'); F=[F; C(j,:)*polyvalm(cc,A)]; E=[E; C(j,:)*A^d(j)*B];
end, Gam=inv(E); K=Gam*F; G0=tf(ss(A-B*K,B,C,G.d)); N=Gam*inv(dcgain(G0*Gam)); G1=minreal(G0*N);
Example: For plant ๐ฅ = ๐ด๐ฅ + ๐ต๐ข๐ฆ = ๐ถ๐ฅ + ๐ท๐ข
with
๐ด =
2.25 โ52.25 โ4.25
โ1.25 โ0.5โ1.25 โ0.25
0.25 โ0.51.25 โ1.75
โ1.25 โ1โ0.25 โ0.75
, ๐ต =
4 62 42 20 2
, ๐ถ =0 00 2
0 10 2
,
๐ท =0 00 0
โข Design an observer-based controller ๐ข = โ๐พ๐ฅ + ๐๐ so the closed-loop poles are defined by the optimal ITAE standard transfer function with ๐๐ = 5 rad/sec
Matlab code: A=[2.25,-5,-1.25,-0.5; 2.25,-4.25,-1.25,-0.25; 0.25,-0.5,-1.25,-1; 1.25,-1.75,-0.25,-0.75]; B=[4,6; 2,4; 2,2; 0,2]; C=[0,0,0,1; 0,2,0,2]; D=[0,0; 0,0]; G=ss(A,B,C,D); [G1,K,d,N]=decouple_pp(G,5), step(G1);
-1
-0.5
0
0.5
1From: In(1)
To
: O
ut(
1)
0 1 2 30
0.5
1
To
: O
ut(
2)
From: In(2)
0 1 2 3
Step Response
Time (sec)
Am
plitu
de
Recommended