Pole Placement Approach - DSpace@MIT Home
Transcript of Pole Placement Approach - DSpace@MIT Home
Topic #14
16.31 Feedback Control Systems
State-Space Systems
• Full-state Feedback Control
• How do we change the poles of the state-space system?
• Or, even if we can change the pole locations.
• Where do we put the poles?
– Heuristics
– Linear Quadratic Regulator
• How well does this approach work?
Cite as: Jonathan How, course materials for 16.31 Feedback Control Systems, Fall 2007. MIT OpenCourseWare(http://ocw.mit.edu), Massachusetts Institute of Technology. Downloaded on [DD Month YYYY].
Fall 2007 16.31 14–1
Pole Placement Approach
• So far we have looked at how to pick K to get the dynamics to
have some nice properties (i.e. stabilize A)
λi(A) � λi(A−BK)
• Classic Question: where should we put these closed-loop poles?
• Approach #1: use time-domain specifications to locate domi-
nant poles – roots of:
s2 + 2ζωns + ω2n = 0
– Then place rest of the poles so they are “much faster” than the
dominant behavior.
� Example: could keep the same damped frequency wd and
then move the real part to be 2–3 times faster than real part
of dominant poles ζωn
� Just be careful moving the poles too far to the left because
it takes a lot of control effort
• Rules of thumb for 2nd order response:
10-90% rise time tr =1 + 1.1ζ + 1.4ζ2
ωn
Settling time (5%) ts = 3ζωn
Time to peak amplitude tp = πωn�
1− ζ2
Peak overshoot Mp = e−ζωntp
October 20, 2007
Cite as: Jonathan How, course materials for 16.31 Feedback Control Systems, Fall 2007. MIT OpenCourseWare(http://ocw.mit.edu), Massachusetts Institute of Technology. Downloaded on [DD Month YYYY].
Fall 2007 16.31 14–2
• Approach #2: Could also choose closed-loop poles to mimic a
system that has performance similar to what you want
– Just set pole locations equal to those of the prototype system.
– Various options exist
• Bessel Polynomial Systems of order k → Gp(s) = 1
Bk(s)
Figure 1: Bessel root locations.
• All scaled to give settling times of 1 second, which you can change
to ts by dividing the poles by ts.
October 20, 2007
k = 1 2
1.2
1
0.8
0.6
0.4
0.2
0
Time (sec)
Step response ofGp for various k
Step
resp
onse
G
0 0.5 1 1.5 2 2.5 3
10
Pole locations of B1(s)k-4.6200-4.0530 j2.3400±-5.0093, - 3.9668 j3.7845±-4.0156 j5.0723, - 5.5281 j1.6553±±-6.4480, - 4.1104 j6.3142 - 5.9268 j3.0813±±-4.2169 j7.5300, - 6.2613 j4.4018, - 7.1205 j1.4540±±±-8.0271, - 4.3361 j8.7519, - 6.5714 j5.6786, - 7.6824 j2.8081±±±-4.4554 j9.9715, - 6.8554 j6.9278, - 8.1682 j4.1057, - 8.7693 j1.3616±±±±9.6585, - 4.5696 j11.1838, - 7.1145 j8.1557, - 8.5962 j5.3655, - 9.4013 j2.6655±±±±
j1.3071±-4.6835 j-12.4022, - 7.3609 j9.3777, - 8.9898 j6.6057, - 9.9657 j3.9342, - 10.4278 ± ± ± ±
123456789
10
Roots of normalized bessel polynomials corresponding to a settling time of 1 second
Figure by MIT OpenCourseWare.
Cite as: Jonathan How, course materials for 16.31 Feedback Control Systems, Fall 2007. MIT OpenCourseWare(http://ocw.mit.edu), Massachusetts Institute of Technology. Downloaded on [DD Month YYYY].
Fall 2007 16.31 14–3
• Procedure for an nth order system:
– Determine the desired settling time ts
– Find the k = n polynomial from the table.
– Divide pole locations by ts
– Form desired characteristic polynomial Φd(s) and use acker/place
to determine the feedback gains.
– Simulate to check performance and control effort.
• Example:
G(s) =1
s(s + 4)(s + 1)
with
A =
⎡⎣ −5 −4 0
1 0 0
0 1 0
⎤⎦ B =
⎡⎣ 1
0
0
⎤⎦so that n = k = 3.
– Want ts = 2 sec. So there are 3 poles at:
−5.0093/2 = −2.5047 and
(−3.9668± 3.7845i)/2 = −1.9834± 1.8922i
– Use these to form Φd(s) and find the gains using acker
• The Bessel approach is fine, but the step response is a bit slow
(little overshoot allowed)
October 20, 2007
Cite as: Jonathan How, course materials for 16.31 Feedback Control Systems, Fall 2007. MIT OpenCourseWare(http://ocw.mit.edu), Massachusetts Institute of Technology. Downloaded on [DD Month YYYY].
Fall 2007 16.31 14–4
• Approach #3: Select the poles to match the nth order polyno-
mial that was designed to minimize the ITAE “integral of the time
multiplied by the absolute value of the error”
JITAE =
� ∞
0
t |e(t)| dt
in response to a step function.
• Both Bessel and ITAE are tabulated in FPE-508.
– Comparison for k = 3 (Given for ω0 = 1 rad/sec, so slightly
different than numbers given on previous page)
φBd = (s + 0.9420)(s + 0.7465± 0.7112i)
φITAEd = (s + 0.7081)(s + 0.5210± 1.068i)
– So the ITAE poles are not as heavily damped.
� Some overshoot
� Faster rise-times.
• Problem with both of these approaches is that they completely
ignore the control effort required – the designer must iterate.
October 20, 2007
Cite as: Jonathan How, course materials for 16.31 Feedback Control Systems, Fall 2007. MIT OpenCourseWare(http://ocw.mit.edu), Massachusetts Institute of Technology. Downloaded on [DD Month YYYY].
Fall 2007 16.31 14–5
Linear Quadratic Regulator
• An alternative approach is to place the pole locations so that the
closed-loop system optimizes the cost function:
JLQR =
� ∞
0
�y(t)TQy(t) + u(t)TRu(t)
�dt
where:
– yTQy = xT (CTQC)x {assume D = 0} is the State Cost
– uTRu is called the Control Cost with penalty R
– Basic form of Linear Quadratic Regulator problem.
• State cost written using output yTQy, but we could define a new
system output z = Czx that is not based on a physical sensor
measurement.
⇒ JLQR =
� ∞
0
�xT (t)(CT
z Q̃Cz)x(t) + ρ u(t)Tu(t)�dt
– Selection of z used to isolate the system states you are most
concerned about, and thus would like to be regulated to “zero”.
– R = ρI effectively sets the controller bandwidth
• MIMO Optimal control is a time invariant linear state feedback
u(t) = −Klqrx(t)
where Klqr found by solving an Algebraic Riccati Equation(ARE)
0 = ATP + PA + CTQC − PBR−1BTP
Klqr = R−1BTP
– Details to follow.
October 20, 2007
Cite as: Jonathan How, course materials for 16.31 Feedback Control Systems, Fall 2007. MIT OpenCourseWare(http://ocw.mit.edu), Massachusetts Institute of Technology. Downloaded on [DD Month YYYY].
Fall 2007 16.31 14–6
Figure 2: Example #1: G(s) = 8·14·20(s+8)(s+14)(s+20) with control penalty ρ and 10ρ
October 20, 2007
Cite as: Jonathan How, course materials for 16.31 Feedback Control Systems, Fall 2007. MIT OpenCourseWare(http://ocw.mit.edu), Massachusetts Institute of Technology. Downloaded on [DD Month YYYY].
Fall 2007 16.31 14–7
Figure 3: Example #2: G(s) = 0.94s2−0.0297 with control penalty ρ and 10ρ
October 20, 2007
Cite as: Jonathan How, course materials for 16.31 Feedback Control Systems, Fall 2007. MIT OpenCourseWare(http://ocw.mit.edu), Massachusetts Institute of Technology. Downloaded on [DD Month YYYY].
Fall 2007 16.31 14–8
Figure 4: Example #3: G(s) = 8·14·20(s−8)(s−14)(s−20) with control penalty ρ and 10ρ
October 20, 2007
Cite as: Jonathan How, course materials for 16.31 Feedback Control Systems, Fall 2007. MIT OpenCourseWare(http://ocw.mit.edu), Massachusetts Institute of Technology. Downloaded on [DD Month YYYY].
Fall 2007 16.31 14–9
Figure 5: Example #4: G(s) = (s−1)(s+1)(s−3) with control penalty ρ and 10ρ
October 20, 2007
Cite as: Jonathan How, course materials for 16.31 Feedback Control Systems, Fall 2007. MIT OpenCourseWare(http://ocw.mit.edu), Massachusetts Institute of Technology. Downloaded on [DD Month YYYY].
Fall 2007 16.31 14–10
Figure 6: Example #5: G(s) = (s−2)(s−4)(s−1)(s−3)(s2+0.8s+4)s2 with control penalty ρ and
10ρ
October 20, 2007
Cite as: Jonathan How, course materials for 16.31 Feedback Control Systems, Fall 2007. MIT OpenCourseWare(http://ocw.mit.edu), Massachusetts Institute of Technology. Downloaded on [DD Month YYYY].
Fall 2007 16.31 14–11
Regulator Summary
• Dominant second and prototype design approaches (Bessel and
ITAE) place the closed-loop pole locations with no regard tothe amount of control effort required.
– Designer must iterate on the selected bandwidth (ωn) to ensure
that the control effort is reasonable.
• LQR selects closed-loop poles that balance between state errors
and control effort.
– Easy design iteration using R
– Sometimes difficult to relate the desired transient response to
the LQR cost function.
– Key thing is that the designer is focused on system performance
issues rather than the mechanics of the design process
October 20, 2007
Cite as: Jonathan How, course materials for 16.31 Feedback Control Systems, Fall 2007. MIT OpenCourseWare(http://ocw.mit.edu), Massachusetts Institute of Technology. Downloaded on [DD Month YYYY].
Fall 2007 16.31 14–12
LQR Examples - (step4.m)
1 % LQR examples for 16.31
2 % Fall 2007
3 % Jonathan How, MIT
4 set(0,’DefaultLineLineWidth’,2)
5
6 if 1
7 clear all;fig=1;
8 % system
9 G=tf(8*14*20,conv([1 8],conv([1 14],[1 20])));
10 [a,b,c,d]=ssdata(G);
11 R=1e-3;
12 k=lqr(a,b,c’*c,R);
13 k2=lqr(a,b,c’*c,10*R);
14
15 figure(fig);clf;fig=fig+1;
16 % find the feedforward gains
17 Nbar=inv(-c*inv(a-b*k)*b);
18 Nbar2=inv(-c*inv(a-b*k2)*b);
19
20 sys1=ss(a-b*k,b*Nbar,c,d);
21 sys2=ss(a-b*k2,b*Nbar2,c,d);
22
23 t=[0:.005:1];
24 [y,t,x]=step(sys1,t);
25 [y2,t2,x2]=step(sys2,t);
26
27 figure(fig);clf;fig=fig+1;
28 plot(t,y,’--’,t2,y2,’LineWidth’,2);axis([0 1 0 1.2])
29 grid;
30 legend([’\rho= ’,num2str(R)],[’\rho= ’,num2str(10*R)],’Location’,’SouthEast’)
31 xlabel(’time (sec)’,’FontSize’,14);ylabel(’Y output’,’FontSize’,14);
32 title(’Step Response’,’FontSize’,14)
33 hold on
34 plot(t2([1 end]),[.1 .1]*y2(end),’r--’);
35 plot(t2([1 end]),[.1 .1]*9*y2(end),’r--’);
36 hold off
37
38 text(.4,.6,[’K=’,num2str(k)],’FontSize’,14)
39 text(.4,.8,[’Nbar=’,num2str(Nbar)],’FontSize’,14)
40 set(gca,’FontSize’,14)
41 print -dpng -r300 srl12.png
42
43 if 1
44 figure(fig);clf;fig=fig+1;
45 f=logspace(-1,2,400);
46 gcl1=freqresp(sys1,f);
47 gcl2=freqresp(sys2,f);
48 loglog(f,abs(squeeze(gcl1)),f,abs(squeeze(gcl2)),’LineWidth’,2);%grid
49 axis([.1 100 .01 2])
50 xlabel(’Freq (rad/sec)’,’FontSize’,14);ylabel(’G_{cl}’,’FontSize’,14)
51 title(’Closed-loop Freq Response’,’FontSize’,14)
52 legend([’\rho= ’,num2str(R)],[’\rho= ’,num2str(10*R)],’Location’,’SouthWest’)
53 set(gca,’FontSize’,14)
54 print -dpng -r300 srl13.png
55 end
56
57 end % if 0
58
59 %%%%%%%%%
60 if 1
61 clear all
62 fig=4;
63
64 G=tf(8*14*20,conv([1 -8],conv([1 -14],[1 -20])))
65 [a,b,c,d]=ssdata(G);
66 R=.1
67 k=lqr(a,b,c’*c,R);
68 k2=lqr(a,b,c’*c,10*R);
October 20, 2007
Cite as: Jonathan How, course materials for 16.31 Feedback Control Systems, Fall 2007. MIT OpenCourseWare(http://ocw.mit.edu), Massachusetts Institute of Technology. Downloaded on [DD Month YYYY].
Fall 2007 16.31 14–13
69
70 % find the feedforward gains
71 Nbar=inv(-c*inv(a-b*k)*b);
72 Nbar2=inv(-c*inv(a-b*k2)*b);
73
74 sys1=ss(a-b*k,b*Nbar,c,d);
75 sys2=ss(a-b*k2,b*Nbar2,c,d);
76
77 t=[0:.005:1];
78 [y,t,x]=step(sys1,t);
79 [y2,t2,x2]=step(sys2,t);
80
81 figure(fig);clf;fig=fig+1;
82 plot(t,y,’--’,t2,y2,’LineWidth’,2);axis([0 1 0 1.2])
83 grid;
84 legend([’\rho= ’,num2str(R)],[’\rho= ’,num2str(10*R)],’Location’,’SouthEast’)
85 xlabel(’time (sec)’,’FontSize’,14);ylabel(’Y output’,’FontSize’,14);
86 title(’Step Response’,’FontSize’,14)
87 hold on
88 plot(t2([1 end]),[.1 .1]*y2(end),’r--’);
89 plot(t2([1 end]),[.1 .1]*9*y2(end),’r--’);
90 hold off
91
92 text(.4,.6,[’K=’,num2str(k)],’FontSize’,14)
93 text(.4,.8,[’Nbar=’,num2str(Nbar)],’FontSize’,14)
94 set(gca,’FontSize’,14)
95 print -dpng -r300 srl22.png
96
97 if 1
98 figure(fig);clf;fig=fig+1;
99 f=logspace(-1,2,400);
100 gcl1=freqresp(sys1,f);
101 gcl2=freqresp(sys2,f);
102 loglog(f,abs(squeeze(gcl1)),f,abs(squeeze(gcl2)),’LineWidth’,2);%grid
103 axis([.1 100 .01 2])
104 xlabel(’Freq (rad/sec)’,’FontSize’,14);ylabel(’G_{cl}’,’FontSize’,14)
105 title(’Closed-loop Freq Response’,’FontSize’,14)
106 legend([’\rho= ’,num2str(R)],[’\rho= ’,num2str(10*R)],’Location’,’SouthWest’)
107 set(gca,’FontSize’,14)
108 print -dpng -r300 srl23.png
109 end
110
111 end % if 0
112 %%%%%%%%%%%%%%
113
114 if 1
115 clear all
116 fig=7;
117
118 G=tf(.94,[1 0 -0.0297]);
119 [a,b,c,d]=ssdata(G);
120 R=.1
121 k=lqr(a,b,c’*c,R);
122 k2=lqr(a,b,c’*c,10*R);
123
124 % find the feedforward gains
125 Nbar=inv(-c*inv(a-b*k)*b);
126 Nbar2=inv(-c*inv(a-b*k2)*b);
127
128 sys1=ss(a-b*k,b*Nbar,c,d);
129 sys2=ss(a-b*k2,b*Nbar2,c,d);
130
131 t=[0:.01:30];
132 [y,t,x]=step(sys1,t);
133 [y2,t2,x2]=step(sys2,t);
134
135 figure(fig);clf;fig=fig+1;
136 plot(t,y,’--’,t2,y2,’LineWidth’,2);axis([0 30 0 1.2])
137 grid;
138 legend([’\rho= ’,num2str(R)],[’\rho= ’,num2str(10*R)],’Location’,’SouthEast’)
139 xlabel(’time (sec)’,’FontSize’,14);ylabel(’Y output’,’FontSize’,14);
140 title(’Step Response’,’FontSize’,14)
141 hold on
142 plot(t2([1 end]),[.1 .1]*y2(end),’r--’);
October 20, 2007
Cite as: Jonathan How, course materials for 16.31 Feedback Control Systems, Fall 2007. MIT OpenCourseWare(http://ocw.mit.edu), Massachusetts Institute of Technology. Downloaded on [DD Month YYYY].
Fall 2007 16.31 14–14
143 plot(t2([1 end]),[.1 .1]*9*y2(end),’r--’);
144 hold off
145
146 text(15,.6,[’K=’,num2str(k)],’FontSize’,14)
147 text(15,.8,[’Nbar=’,num2str(Nbar)],’FontSize’,14)
148 set(gca,’FontSize’,14)
149 print -dpng -r300 srl32.png
150
151 if 1
152 figure(fig);clf;fig=fig+1;
153 f=logspace(-3,3,400);
154 gcl1=freqresp(sys1,f);
155 gcl2=freqresp(sys2,f);
156 loglog(f,abs(squeeze(gcl1)),f,abs(squeeze(gcl2)),’LineWidth’,2);%grid
157 axis([.1 100 .01 2])
158 xlabel(’Freq (rad/sec)’,’FontSize’,14);ylabel(’G_{cl}’,’FontSize’,14)
159 title(’Closed-loop Freq Response’,’FontSize’,14)
160 legend([’\rho= ’,num2str(R)],[’\rho= ’,num2str(10*R)],’Location’,’SouthWest’)
161 set(gca,’FontSize’,14)
162 print -dpng -r300 srl33.png
163 end
164
165 end % if 0
166
167 %%%%%%%%%%%%
168 if 1
169 clear all
170 fig=10;
171
172 G=tf([1 -1],conv([1 1],[1 -3]));
173 [a,b,c,d]=ssdata(G);
174 R=.1
175 k=lqr(a,b,c’*c,R);
176 k2=lqr(a,b,c’*c,10*R);
177
178 % find the feedforward gains
179 Nbar=inv(-c*inv(a-b*k)*b);
180 Nbar2=inv(-c*inv(a-b*k2)*b);
181
182 sys1=ss(a-b*k,b*Nbar,c,d);
183 sys2=ss(a-b*k2,b*Nbar2,c,d);
184
185 t=[0:.01:10];
186 [y,t,x]=step(sys1,t);
187 [y2,t2,x2]=step(sys2,t);
188
189 figure(fig);clf;fig=fig+1;
190 plot(t,y,’--’,t2,y2,’LineWidth’,2);axis([0 10 -1 1.2])
191 grid;
192 legend([’\rho= ’,num2str(R)],[’\rho= ’,num2str(10*R)],’Location’,’SouthEast’)
193 xlabel(’time (sec)’,’FontSize’,14);ylabel(’Y output’,’FontSize’,14);
194 title(’Unstable, NMP system Step Response’,’FontSize’,14)
195 hold on
196 plot(t2([1 end]),[.1 .1]*y2(end),’r--’);
197 plot(t2([1 end]),[.1 .1]*9*y2(end),’r--’);
198 hold off
199
200 text(5,.6,[’K=’,num2str(k)],’FontSize’,14)
201 text(5,.8,[’Nbar=’,num2str(Nbar)],’FontSize’,14)
202 set(gca,’FontSize’,14)
203 print -dpng -r300 srl42.png
204
205 if 1
206 figure(fig);clf;fig=fig+1;
207 f=logspace(-2,2,400);
208 gcl1=freqresp(sys1,f);
209 gcl2=freqresp(sys2,f);
210 loglog(f,abs(squeeze(gcl1)),f,abs(squeeze(gcl2)),’LineWidth’,2);%grid
211 axis([.1 100 .01 2])
212 xlabel(’Freq (rad/sec)’,’FontSize’,14);ylabel(’G_{cl}’,’FontSize’,14)
213 title(’Closed-loop Freq Response’,’FontSize’,14)
214 legend([’\rho= ’,num2str(R)],[’\rho= ’,num2str(10*R)],’Location’,’SouthWest’)
215 set(gca,’FontSize’,14)
216 print -dpng -r300 srl43.png
October 20, 2007
Cite as: Jonathan How, course materials for 16.31 Feedback Control Systems, Fall 2007. MIT OpenCourseWare(http://ocw.mit.edu), Massachusetts Institute of Technology. Downloaded on [DD Month YYYY].
Fall 2007 16.31 14–15
217 end
218
219 end % if 0
220
221 %%%%%%%%%%%%
222 clear all
223 fig=13;
224
225 G=tf(conv([1 -2],[1 -4]),conv(conv([1 -1],[1 -3]),[1 2*.2*2 2^2 0 0]));
226 [a,b,c,d]=ssdata(G);
227 R=.1
228 k=lqr(a,b,c’*c,R);
229 k2=lqr(a,b,c’*c,10*R);
230
231 % find the feedforward gains
232 Nbar=inv(-c*inv(a-b*k)*b);
233 Nbar2=inv(-c*inv(a-b*k2)*b);
234
235 sys1=ss(a-b*k,b*Nbar,c,d);
236 sys2=ss(a-b*k2,b*Nbar2,c,d);
237
238 t=[0:.01:10];
239 [y,t,x]=step(sys1,t);
240 [y2,t2,x2]=step(sys2,t);
241
242 figure(fig);clf;fig=fig+1;
243 plot(t,y,’--’,t2,y2,’LineWidth’,2);axis([0 10 -1 1.2])
244 grid;
245 legend([’\rho= ’,num2str(R)],[’\rho= ’,num2str(10*R)],’Location’,’SouthEast’)
246 xlabel(’time (sec)’,’FontSize’,14);ylabel(’Y output’,’FontSize’,14);
247 title(’Unstable, NMP system Step Response’,’FontSize’,14)
248 hold on
249 plot(t2([1 end]),[.1 .1]*y2(end),’r--’);
250 plot(t2([1 end]),[.1 .1]*9*y2(end),’r--’);
251 hold off
252
253 text(1,.6,[’K=’,num2str(k)],’FontSize’,14)
254 text(1,.8,[’Nbar=’,num2str(Nbar)],’FontSize’,14)
255 set(gca,’FontSize’,14)
256 print -dpng -r300 srl52.png
257
258 if 1
259 figure(fig);clf;fig=fig+1;
260 f=logspace(-2,2,400);
261 gcl1=freqresp(sys1,f);
262 gcl2=freqresp(sys2,f);
263 loglog(f,abs(squeeze(gcl1)),f,abs(squeeze(gcl2)),’LineWidth’,2);%grid
264 axis([.1 100 .01 2])
265 xlabel(’Freq (rad/sec)’,’FontSize’,14)
266 ylabel(’G_{cl}’,’FontSize’,14)
267 title(’Closed-loop Freq Response’,’FontSize’,14)
268 legend([’\rho= ’,num2str(R)],[’\rho= ’,num2str(10*R)],’Location’,’SouthWest’)
269 set(gca,’FontSize’,14)
270 print -dpng -r300 srl53.png
271 end
October 20, 2007
Cite as: Jonathan How, course materials for 16.31 Feedback Control Systems, Fall 2007. MIT OpenCourseWare(http://ocw.mit.edu), Massachusetts Institute of Technology. Downloaded on [DD Month YYYY].