An example of state feedback for an unstable and uncontrollable but stabilizable system that has repeated eigenvalues and does not have a full set of regular eigenvectors

An example of state feedback for an unstable and uncontrollable but stabilizable system that has repeated eigenvalues and does not have a full set of regular eigenvectors - Description

Consider the state space system with the A matrix given by a 65000 05000 65000 65000 05000 55000 55000 55000 05000 05000 05000 65000 05000 05000 55000 05000 For this example consider when B is b1 0 1 0 2 1 2 3 4 3 3 2 3 Check the controllability o ID: 27929 Download Pdf

118K - views

An example of state feedback for an unstable and uncontrollable but stabilizable system that has repeated eigenvalues and does not have a full set of regular eigenvectors

Consider the state space system with the A matrix given by a 65000 05000 65000 65000 05000 55000 55000 55000 05000 05000 05000 65000 05000 05000 55000 05000 For this example consider when B is b1 0 1 0 2 1 2 3 4 3 3 2 3 Check the controllability o

Similar presentations


Download Pdf

An example of state feedback for an unstable and uncontrollable but stabilizable system that has repeated eigenvalues and does not have a full set of regular eigenvectors




Download Pdf - The PPT/PDF document "An example of state feedback for an unst..." is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.



Presentation on theme: "An example of state feedback for an unstable and uncontrollable but stabilizable system that has repeated eigenvalues and does not have a full set of regular eigenvectors"— Presentation transcript:


Page 1
An example of state feedback for an unstable and uncontrollable (but stabilizable) system that has repeated eigenvalues and does not have a full set of regular eigenvectors. Consider the state space system: with the A matrix given by: a = -6.5000 0.5000 6.5000 -6.5000 -0.5000 -5.5000 -5.5000 5.5000 -0.5000 0.5000 0.5000 -6.5000 -0.5000 0.5000 -5.5000 -0.5000 For this example, consider when B is: b1 = 0 1 0 2 1 2 3 4 3 3 2 3 Check the controllability of this system: » p=ctrb(a,b1) p = 0 1 0 1 7 1 -12 24 -12 108 324 108 2 1 2 -11 -17 -11 60 24 60 -324 -540 -324 3 4 3 -17 -11 -17

96 132 96 -540 -324 -540 3 2 3 -17 -23 -17 96 60 96 -540 -756 -540 It is hard to tell from p whether the system is controllable. But: » rank(p) ans = 3 Knowing that 'rank' is notoriously unreliable, let's check the singular values of p: » svd(p) ans = 1.5583e+003 3.3662e+002 1.2578e+001 8.2769e-015 15 orders of magnitude difference here is enough to conclude that the third one is zero. So the system is uncontrollable (3 controllable modes and one uncontrollable). Let's also use the Jordan form of A to consider controllability. The eigenvalues of A are: » eig(a) ans = -6.0000 + 0.0000i -6.0000

- 0.0000i -6.0000 6.0000 and the corresponding eigenvectors are (after removing the normalization):
Page 2
eigvec = 1.0000 1.0000 0 -1.0000 1.0000 1.0000 0 1.0000 1.0000 1.0000 0.1780 -1.0000 1.0000 1.0000 0.1780 1.0000 So the stable repeated eigenvalue at -6 has only two linearly independent eigenvectors, and the fourth eigenvalue at +6 is unstable. The matrix (a - (-6)I) is: » a_minus_m6i a_minus_m6i = -0.5000 0.5000 6.5000 -6.5000 -0.5000 0.5000 -5.5000 5.5000 -0.5000 0.5000 6.5000 -6.5000 -0.5000 0.5000 -5.5000 5.5000 and using its pseudoinverse we find that a POSSIBLE

generalized eigenvector generated by the first eigenvector for -6 is: » geneig geneig = -1.0000 1.0000 0 0 Checking that to see if this is the generalized eigenvector: » a_minus_m6i*geneig ans = 1.0000 1.0000 1.0000 1.0000 which is the regular eigenvector, so OK. The modal matrix is then constructed: » t=[eigvec(:,1) geneig [0 0 1 1]’ eigvec(:,4)] t = 1 -1 0 1 1 1 0 -1 1 0 1 1 1 0 1 -1 and the Jordan form of the A matrix is: » a_jordan a_jordan = -6 1 0 0 0 -6 0 0 0 0 -6 0 0 0 0 6 Convert the B matrix for this change of basis: » b1j=inv(t)*b1 b1j = 1 1 1 1 1 1 2 2 2 0 1 0 Clearly, the two

modes in the 2x2 Jordan block are controllable (2nd row is nonzero) and the mode corresponding to the (unstable) eigenvalue of +6 is controllable (last row is nonzero). But the third row of b1j is a linear multiple of the second row and
Page 3
they both correspond to Jordan blocks for the eigenvalue -6. Therefore, one of the modes contributing the two Jordan blocks with -6 as the eigenvalue is not controllable. We can see this more explicitly if we alter slightly the system description by defining a replacement for the modal state q_3 as: Then the state eqn. for the new modal state q

is: so that the new modal state is unaffected by the other modal states or the inputs. The transformation associated with this second change of basis we have just made is: » t_new=inv([1 0 0 0;0 1 0 0;0 -2 1 0;0 0 0 1]) t_new = 1 0 0 0 0 1 0 0 0 2 1 0 0 0 0 1 The new Jordan form after this second change of basis is then: » a_jordan=inv(t_new)*inv(t)*a*t*t_new a_jordan = -6 1 0 0 0 -6 0 0 0 0 -6 0 0 0 0 6 The same as before (as expected, right?). But now the transformed B is: » b1j_new=inv(t_new)*inv(t)*b1 b1j_new = 1 1 1 1 1 1 0 0 0 0 1 0 and notice the all-zero third row, indicating clearly

the uncontrollability of the associated mode. By re-ordering the modal states in this description (by flipping the order of q and q ), we can get the Kalman controllability form. This reordering of the modal states is included in the transformation representing the second change of basis as: » t_new t_new = 1 0 0 0 0 1 0 0 0 2 0 1 0 0 1 0 and the resulting Jordan form for A becomes: » a_jordan_new=inv(t_new)*inv(t)*a*t*t_new a_jordan_new = -6 1 0 0
Page 4
0 -6 0 0 0 0 6 0 0 0 0 -6 for which the transformed B matrix is: » b1j_new=inv(t_new)*inv(t)*b1 b1j_new = 1 1 1 1 1 1 0 1 0 0 0 0

and now the system representation is in Kalman controllability form with the last mode uncontrollable (and stable). Since the uncontrollable mode has a stable eigenvalue, the system is stabilizable. Now, let's design a state feedback system for this. Since it is multiple input in nature, we have to either limit our feedback to only one input (which is occasionally done to minimize cost or complexity) or we have to use a method that designs feedback to multiple inputs. For feedback purposes, we consider only the controllable part (because feedback is not going to affect the uncontrollable part

anyway): » a_cntrlable=a_jordan_new(1:3,1:3) a_cntrlable = -6 1 0 0 -6 0 0 0 6 » b1_cntrlable=b1j_new(1:3,:) b1_cntrlable = 1 1 1 1 1 1 0 1 0 There are many ways to choose the state feedback for this system. Essentially all of them require us to choose the “desired” closed loop eigenvalues (and some also allow us to at least partially choose the closed loop eigenvectors). Let's try to place the closed loop poles of the system at -1, -2.5 and -2.5. These three poles are all stable (negative real parts) and their time constants are slightly longer than the open loop poles at -6. One way to get

the feedback gain is to use directly MATLAB's 'place' command: » k_new_cntrlable=place(a_cntrlable,b1_cntrlable,p_desired) place: ndigits= 17 k_new_cntrlable = 17.5000 -26.0000 -8.5000 0.0000 -0.0000 8.5000 0 0 0 The ndigits result indicates that we have placed the closed loop poles very close to the desired values. To see this, we will form the closed loop system, for which the state dynamics matrix is: » ambk_cntrlable ambk_cntrlable = -23.5000 27.0000 0.0000 -17.5000 20.0000 0.0000 -0.0000 0.0000 -2.5000 which has eigenvalues of:
Page 5
» eig(ambk_cntrlable) ans = -2.5000 -1.0000

-2.5000 as we desired. But we got the feedback matrix for the controllable part of the system after the change of basis to modal Kalman controllability form. What is the gain matrix for the original system representation (which we need for implementation)? To form this, we “unwind” the changes of basis: » k_place=[k_new_cntrlable zeros(3,1)]*inv(t_new)*inv(t) k_place = 21.7500 -4.2500 -17.2500 17.2500 0.0000 -0.0000 4.2500 -4.2500 0 0 0 0 where we have added a fourth column of zeros (the 'zeros(3,1)’ above) to the gain matrix for the modal form to reflect the fact that we do not feed back the

uncontrollable mode. Let's check the closed loop eigenstructure: » [v_place,lambda_place]=eig(a-b1*k_place) v_place = 0.0625 0.0000 0.1185 -0.5364 0.6875 0.0000 0.6371 0.8702 1.0000 1.0000 1.0000 -0.1470 1.0000 1.0000 0.9310 1.0000 lambda_place = -1.0000 0 0 0 0 -6.0000 0 0 0 0 -2.5000 0 0 0 0 -2.5000 Notice that the uncontrollable mode of -6 is present with exactly the same eigenvector that it had in the open loop case. Responses for this system to, for instance, unit step commands for each input can be generated using the ‘step’ or ‘lsim’ commands. The steady state values for states when the

'place' feedback gain matrix is used: » -inv(a-b1*k_place)*b1*[1;1;1] ans = 1.6000 15.2000 23.2000 22.4000 From the close loop eigenvectors, note that all four state responses have the "slow" mode (from the closed loop eigenvalue at -1) affecting them so that steady state is not achieved by any of the states after 3 seconds. Now, let's use Brogan's method that assigns part of the closed loop eigenvectors and see some of the differences. NOTE: We could use the controllable part of the system as we did above, but in fact Brogan's method works even without this separation, so we will not make it

just to demonstrate this. For the desired closed loop eigenvalue at -1, we calculate: » m1=[-1*eye(4)-a b1] m1 = 5.5000 -0.5000 -6.5000 6.5000 0 1.0000 0 0.5000 4.5000 5.5000 -5.5000 2.0000 1.0000 2.0000 0.5000 -0.5000 -1.5000 6.5000 3.0000 4.0000 3.0000 0.5000 -0.5000 5.5000 -0.5000 3.0000 2.0000 3.0000
Page 6
The closed loop eigenvectors we can achieve for the eigenvalue at -1 are spanned by all linear combinations of the top 4 elements of the 7-element vectors that span the nullspace of m1. We find them using 'svd'. The singular value decomposition is U*S*V' where U is irrelevant

to us, S is 4x7 with four nonzero elements along the main diagonal, and V is: » v_s1 v_s1 = 0.2420 -0.1544 0.7346 -0.6042 0.1136 0 0 -0.1973 -0.0829 0.5974 0.6471 -0.1136 -0.3666 -0.1769 -0.6460 -0.3712 -0.1880 -0.3711 0.1136 -0.4583 -0.2211 0.6885 -0.3351 -0.2599 0.0242 -0.1136 -0.5194 -0.2506 -0.0499 -0.4947 0.0056 0.0385 -0.3976 0.5822 -0.5042 0.0780 -0.4793 -0.0243 0.2737 0.7951 0.2139 0.1032 -0.0499 -0.4947 0.0056 0.0385 -0.3976 -0.0322 0.7695 The last 3 columns of V (corresponding to the 3 zero singular values) span the nullspace of m1, and so our closed loop eigenvector associated with

the eigenvalue at -1 can be any linear combination of: » basis_s1=v_s1(1:4,5:7) basis_s1 = 0.1136 0 0 -0.1136 -0.3666 -0.1769 0.1136 -0.4583 -0.2211 -0.1136 -0.5194 -0.2506 A reciprocal basis for this basis is: » recip_s1=pinv(basis_s1) recip_s1 = 2.3779 -1.7708 3.1368 -1.5178 -0.1526 -0.3706 -0.8066 -0.5886 -0.0736 -0.1788 -0.3891 -0.2839 We check whether these three vectors are linearly independent: » rank(basis_m1) ans = 2 So we have only a two-dimensional space in which our desired closed loop eigenvector for eigenvalue -1 can lie. By using 'svd', we can find a basis for this space: »

[u_m1_reduced,s_m1_reduced,v_m1_reduced]=svd(basis_m1) u_m1_reduced = 0.0099 0.5196 0.4784 0.7078 -0.4751 -0.3781 0.7606 -0.2299 -0.5716 0.6966 -0.1353 -0.4119 -0.6689 -0.3191 -0.4175 0.5258 s_m1_reduced = 0.8725 0 0 0 0.2180 0 0 0 0.0000 0 0 0 v_m1_reduced = 0.0758 0.9971 0 0.8981 -0.0683 0.4345 0.4332 -0.0329 -0.9007
Page 7
The first two columns of u_m1_reduced then span the 2-dimensional space where our closed loop eigenvector must lie. Let's choose the closed loop eigenvector for -1 such that the second state response does not contain a term due to the mode associated with

eigenvalue -1 (i.e. the slowest mode). Thus, let's choose our eigenvector as .3781 times the first column minus .4751 times the second: » psi_1=u_m1_reduced(2,2)*u_m1_reduced(:,1)-u_m1_reduced(2,1)*u_m1_reduced... (:,2) psi_1 = 0.2431 0 0.5470 0.1013 In terms of the original three solution vectors, the coefficients for the expansion of psi_1 are: » alpha_1=recip_m1*psi_1 alpha_1 = 2.1404 -0.5380 -0.2595 [Note: Since the columns of basis_m1 only spanned a two-dim. subspace, we could find a two-coefficient expansion for our desired eigenvector, but we must keep in mind that the bottom partitions

of the solution vectors get used in determining the feedback gain matrix and therefore using the two-coefficient expansion will give a different result for the feedback gain.] Let's check that this works: » basis_m1*alpha_1 ans = 0.2431 0.0000 0.5470 0.1013 OK !! The corresponding bottom combination f is then found as the same linear combination of the bottom partitions of the solution vectors: » f_1=v_m1(5:7,5:7)*alpha_1 f_1 = -1.0333 1.5601 -1.0333 Now we do essentially the same thing for the desired closed loop eigenvalues at -2.5: » m2=[-2.5*eye(4)-a b1] m2 = 4.0000 -0.5000 -6.5000 6.5000

0 1.0000 0 0.5000 3.0000 5.5000 -5.5000 2.0000 1.0000 2.0000 0.5000 -0.5000 -3.0000 6.5000 3.0000 4.0000 3.0000 0.5000 -0.5000 5.5000 -2.0000 3.0000 2.0000 3.0000 » [u_m2,s_m2,v_m2]=svd(m2) u_m2 = 0.6406 -0.1075 0.6887 -0.3222 -0.5270 -0.3397 0.6429 0.4399 0.4458 -0.7075 -0.3153 0.4485 -0.3364 -0.6102 -0.1137 -0.7082
Page 8
s_m2 = 15.1670 0 0 0 0 0 0 0 8.6886 0 0 0 0 0 0 0 3.5513 0 0 0 0 0 0 0 2.2041 0 0 0 v_m2 = 0.1552 -0.1449 0.8058 -0.5438 0.0991 0 0 -0.1290 -0.0353 0.5066 0.7308 0.0416 -0.4178 -0.1234 -0.6758 -0.2766 -0.1745 -0.3297 0.2633 -0.4874 -0.1440 0.7011 -0.2542 -0.2483

-0.0826 0.0963 -0.5803 -0.1714 -0.0478 -0.5332 -0.0003 0.0458 -0.4506 0.2874 -0.6524 0.0807 -0.5177 -0.0442 0.2248 0.7097 0.3946 0.1166 -0.0478 -0.5332 -0.0003 0.0458 -0.4506 -0.1133 0.7039 » basis_m2=v_m2(1:4,5:7) basis_m2 = 0.0991 0 0 0.0416 -0.4178 -0.1234 0.2633 -0.4874 -0.1440 0.0963 -0.5803 -0.1714 The closed loop eigenvectors for the two eigenvalues at -2.5 can be any linear combinations of these two vectors. Let's see how many directions are possible: » svd(basis_m2) ans = 0.9332 0.1832 0.0000 Let us also check that these directions are linearly independent from the eigenvector

direction we have already chosen: » svd([basis_m2 psi_1]) ans = 1.0352 0.4487 0.0028 0.0000 Three nonzero SV’s, so not the greatest "separation" we could ask for, but OK. So pick: » psi_2=basis_m2(:,1) psi_2 = 0.0991 0.0416 0.2633 0.0963 » psi_3=basis_m2(:,2) psi_3 = 0 -0.4178 -0.4874 -0.5803 Therefore:
Page 9
» f_2=v_m2(5:7,5) f_2 = -0.4506 0.7097 -0.4506 » f_3=v_m2(5:7,6) f_3 = 0.2874 0.3946 -0.1133 Now what about the fourth eigenvalue and eigenvector? Well, remember that the system had an uncontrollable mode at -6. The modal matrix that yielded the Kalman controllability Jordan

form for the system was: » t*t_new ans = 1 -1 1 0 1 1 -1 0 1 2 1 1 1 2 -1 1 which can be checked as: » inv(t*t_new)*a*(t*t_new) ans = -6 1 0 0 0 -6 0 0 0 0 6 0 0 0 0 -6 » inv(t*t_new)*b1 ans = 1 1 1 1 1 1 0 1 0 0 0 0 Therefore, the eigenvector associated with the uncontrollable mode is: » t*t_new(:,4) ans = 0 0 1 1 We MUST select this eigenvector as our remaining closed loop eigenvector and we MUST select -6 as our remaining closed loop eigenvalue because the uncontrollability of this mode means that it will be there anyway. [If we had done our feedback gain calculation using just the

controllable part of the system, then we could have added a column of zeros to the modal feedback gain as we did above, and the uncontrollable eigenvalue at -6 and its corresponding eigenvector would have automatically wound up as a closed loop eigenvalue/eigenvector combination, so we sould not have needed to consider this.] » psi_4=ans psi_4 = 0 0 1
Page 10
1 » m4=[-6*eye(4)-a b1] m4 = 0.5000 -0.5000 -6.5000 6.5000 0 1.0000 0 0.5000 -0.5000 5.5000 -5.5000 2.0000 1.0000 2.0000 0.5000 -0.5000 -6.5000 6.5000 3.0000 4.0000 3.0000 0.5000 -0.5000 5.5000 -5.5000 3.0000 2.0000 3.0000 »

[u_m4,s_m4,v_m4]=svd(m4) u_m4 = 0.5397 -0.0834 0.8073 -0.2236 -0.4569 -0.3687 0.4532 0.6708 0.5397 -0.7207 -0.3733 0.2236 -0.4569 -0.5811 0.0596 -0.6708 s_m4 = 17.1074 0 0 0 0 0 0 0 8.0545 0 0 0 0 0 0 0 0.6808 0 0 0 0 0 0 0 0.0000 0 0 0 v_m4 = 0.0048 -0.1089 0.6954 -0.2663 0.6585 0 0 -0.0048 0.1089 -0.6954 -0.2664 0.6447 -0.1290 0.0368 -0.7039 0.0003 -0.0016 0.6550 0.2719 0.0380 -0.0108 0.7039 -0.0003 0.0016 0.6550 0.2580 -0.0910 0.0259 -0.0389 -0.5764 -0.0508 -0.0001 -0.0415 -0.5808 -0.5697 0.0776 -0.5583 -0.1664 0.0003 0.0829 0.7740 -0.2206 -0.0389 -0.5764 -0.0508 -0.0001 -0.0415 -0.1932

0.7903 » basis_m4=v_m4(1:4,4:7) basis_m4 = -0.2663 0.6585 0 0 -0.2664 0.6447 -0.1290 0.0368 0.6550 0.2719 0.0380 -0.0108 0.6550 0.2580 -0.0910 0.0259 » svd(basis_m4) ans = 1.0000 1.0000 0.1348 0.0000 » recip_m4=pinv(basis_m4) recip_m4 = -0.2651 -0.2677 0.6563 0.6537 1.0318 0.2714 0.6451 -0.1152 3.4828 -3.6118 3.5208 -3.5738 -0.9926 1.0294 -1.0034 1.0185 » svd(recip_m4) ans = 7.4162 1.0000
Page 11
1.0000 0 » alpha_4=recip_m4*[0 0 1 1]' alpha_4 = 1.3100 0.5299 -0.0530 0.0151 Check: » basis_m4*alpha_4 ans = 0.0000 -0.0000 1.0000 1.0000 Check linear independence from previous

eigenvectors: » svd([psi_1 psi_2 psi_3 psi_4]) ans = 1.7019 0.4434 0.3387 0.0022 Again, not the greatest separation (as we already knew), but OK. » f_4=v_m4(5:7,4:7)*alpha_4 f_4 = 1.0e-014 * 0.2291 -0.4735 0.2164 We should have expected this because recall that we do not feed back uncontrollable mode components because they have no effect anyway. » f_4=zeros(4,1); Now, let's calculate the feedback gain matrix. Put the selected closed loop eigenvectors together as G: G = 0.2431 0.0991 0 0 0 0.0416 -0.4178 0 0.5470 0.2633 -0.4874 1.0000 0.1013 0.0963 -0.5803 1.0000 and put the corresponding

“bottom parts” together as J: » J=[f_1 f_2 f_3 f_4] J = -1.0333 -0.4506 0.2874 0 1.5601 0.7097 0.3946 0 -1.0333 -0.4506 -0.1133 0 Then, K = J * inv(G): » k_brogan=J*inv(G) k_brogan = -4.4879 -0.6589 0.1298 -0.1298
Page 12
44.0000 -5.5000 -20.5000 20.5000 -17.7621 1.9089 7.3702 -7.3702 Check the closed loop characteristics: » ambk_brogan=a-b1*k_brogan ambk_brogan = -50.5000 6.0000 27.0000 -27.0000 0.0000 -2.5000 -0.0000 0.0000 -109.7500 18.7500 60.0000 -66.0000 -21.7500 7.7500 13.0000 -19.0000 » eig(ambk_brogan) ans = -1.0000 -2.5000 -6.0000 -2.5000 OK. Let’s check that each of the

closed loop eigenvectors we picked is actually a closed loop eigenvector for the corresponding closed loop eigenvalue: » (-6*eye(4)-ambk_brogan)*psi_4 ans = 1.0e-013 * 0.2132 -0.3642 0 -0.4619 » (-1*eye(4)-ambk_brogan)*psi_1 ans = 1.0e-013 * 0.0760 -0.1150 0.0191 -0.1310 » (-2.5*eye(4)-ambk_brogan)*psi_2 ans = 1.0e-014 * 0.3929 -0.7031 0.0369 -0.8186 » (-2.5*eye(4)-ambk_brogan)*psi_3 ans = 1.0e-013 * -0.0986 0.1682 0.0033 0.2125 Now, since its columns are the closed loop eigenvectors, G should be a modal matrix for the closed loop system: » inv(G)*ambk_brogan*G
Page 13
ans = -1.0000

-0.0000 -0.0000 -0.0000 -0.0000 -2.5000 0.0000 -0.0000 -0.0000 -0.0000 -2.5000 -0.0000 -0.0000 -0.0000 -0.0000 -6.0000 Indeed ! The closed loop responses for this system will show that the “slow” mode does not appear in the x_2(t) response.