/
An example of state feedback for an unstable and uncontrollable but stabilizable system An example of state feedback for an unstable and uncontrollable but stabilizable system

An example of state feedback for an unstable and uncontrollable but stabilizable system - PDF document

tawny-fly
tawny-fly . @tawny-fly
Follow
460 views
Uploaded On 2014-12-22

An example of state feedback for an unstable and uncontrollable but stabilizable system - PPT Presentation

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

Consider the state space

Share:

Link:

Embed:

Download Presentation from below link

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 Transcript

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 regularConsider the state space system:with the A matrix given by:a = -0.5000 -5.5000 -5.5000 5.5000For this example, consider when B is: 2 1 2Check the controllability of this system:» p=ctrb(a,b1)p = 2 1 2 -11 -17 -11 60 24 60 -324 -540 -324It is hard to tell from p whether the system is controllable. But:» rank(p)ans =» svd(p)ans = 3.3662e+00215 orders of magnitude difference here is enough to conclude that the third one iszero. So the system is uncontrollable (3 controllable modes and one uncontrollable). ans = -6.0000 - 0.0000iand the corresponding eigenvectors are (after removing the normalization): eigvec = 1.0000 1.0000 0 -1.0000 1.0000 1.0000 0 1.0000So the stable repeated eigenvalue at -6 has only two linearly independenteigenvectors, and the fourth eigenvalue at +6 is unstable. The matrix (a - (-6)I) is:a_minus_m6i = -0.5000 0.5000 -5.5000 5.5000and using its pseudoinverse we find that a POSSIBLE generalized eigenvector generatedby the first eigenvector for -6 is:geneig = 1.0000Checking that to see if this is the generalized eigenvector:» a_minus_m6i*geneigans = 1.0000which 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 -1and the Jordan form of the A matrix is:» a_jordana_jordan = 0 -6 0 0Convert the B matrix for this change of basis:» b1j=inv(t)*b1b1j = 1 1 1 1 1 1 0 1 0Clearly, 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 they both correspond to Jordan blocks for the eigenvalue -6. Therefore, one of themodes contributing the two Jordan blocks with -6 as the eigenvalue is notThen the state eqn. for the new modal state q3 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 = 0 1 0 0The new Jordan form after this second change of basis is then:» a_jordan=inv(t_new)*inv(t)*a*t*t_newa_jordan = 0 -6 0 0The same as before (as expected, right?). But now the transformed B is:» b1j_new=inv(t_new)*inv(t)*b1b1j_new = 1 1 1 0 0 0and notice the all-zero third row, indicating clearly the uncontrollability of theassociated mode. By re-ordering the modal states in this description (by flipping the3 and q4), we can get the Kalman controllability form. This reordering ofthe modal states is included in the transformation representing the second change oft_new = 0 1 0 0 0 2 0 1and the resulting Jordan form for A becomes:» a_jordan_new=inv(t_new)*inv(t)*a*t*t_newa_jordan_new = 0 -6 0 0 0 0 6 0for which the transformed B matrix is:» b1j_new=inv(t_new)*inv(t)*b1b1j_new = 1 1 1and now the system representation is in Kalman controllability form with the last modeuncontrollable (and stable). Since the uncontrollable mode has a stable eigenvalue,Now, let's design a state feedback system for this. Since it is multiple input innature, we have to either limit our feedback to only one input (which is occasionallyFor feedback purposes, we consider only the controllable part (because feedback is notgoing to affect the uncontrollable part anyway):a_cntrlable = 0 -6 0 0 0 6» b1_cntrlable=b1j_new(1:3,:) 1 1 1There are many ways to choose the state feedback for this system. Essentially all ofthem require us to choose the “desired” closed loop eigenvalues (and some also allowLet's try to place the closed loop poles of the system at -1, -2.5 and -2.5. Thesethree poles are all stable (negative real parts) and their time constants are slightlyOne 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= 17k_new_cntrlable = 0.0000 -0.0000 8.5000The ndigits result indicates that we have placed the closed loop poles very close tothe desired values. To see this, we will form the closed loop system, for which the» ambk_cntrlableambk_cntrlable = -17.5000 20.0000 0.0000which has eigenvalues of: » eig(ambk_cntrlable)ans = -1.0000as we desired. But we got the feedback matrix for the controllable part of the systemafter the change of basis to modal Kalman controllability form. What is the gaink_place = 0.0000 -0.0000 4.2500 -4.2500where we have added a fourth column of zeros (the 'zeros(3,1)’ above) to the gainmatrix for the modal form to reflect the fact that we do not feed back the» [v_place,lambda_place]=eig(a-b1*k_place) 0.6875 0.0000 0.6371 0.8702 1.0000 1.0000 0.9310 1.0000lambda_place = 0 -6.0000 0 0Notice that the uncontrollable mode of -6 is present with exactly the same eigenvectorthat it had in the open loop case. Responses for this system to, for instance, unitans = 15.2000From 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 isNow, let's use Brogan's method that assigns part of the closed loop eigenvectors andsee some of the differences. NOTE: We could use the controllable part of the systemm1 = 0.5000 4.5000 5.5000 -5.5000 2.0000 1.0000 2.0000 The closed loop eigenvectors we can achieve for the eigenvalue at -1 are spanned byall linear combinations of the top 4 elements of the 7-element vectors that span thev_s1 = -0.1973 -0.0829 0.5974 0.6471 -0.1136 -0.3666 -0.1769The last 3 columns of V (corresponding to the 3 zero singular values) span thenullspace of m1, and so our closed loop eigenvector associated with the eigenvalue atbasis_s1 = -0.1136 -0.3666 -0.1769A reciprocal basis for this basis is:recip_s1 = -0.1526 -0.3706 -0.8066 -0.5886We check whether these three vectors are linearly independent:» rank(basis_m1)ans =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.4751 -0.3781 0.7606 -0.2299s_m1_reduced = 0.8725 0 0 0 0.2180 0 0 0 0.0000v_m1_reduced = 0.0758 0.9971 0 0.8981 -0.0683 0.4345 The first two columns of u_m1_reduced then span the 2-dimensional space where ourclosed loop eigenvector must lie. Let's choose the closed loop eigenvector for -1» psi_1=u_m1_reduced(2,2)*u_m1_reduced(:,1)-u_m1_reduced(2,1)*u_m1_reduced...(:,2)psi_1 = 0In terms of the original three solution vectors, the coefficients for the expansion ofpsi_1 are:alpha_1 = -0.5380[Note: Since the columns of basis_m1 only spanned a two-dim. subspace, we could find atwo-coefficient expansion for our desired eigenvector, but we must keep in mind thatLet's check that this works:» basis_m1*alpha_1ans = 0.0000OK !! The corresponding bottom combination f is then found as the same linearcombination of the bottom partitions of the solution vectors:» f_1=v_m1(5:7,5:7)*alpha_1 1.5601Now we do essentially the same thing for the desired closed loop eigenvalues at -2.5: 0.5000 3.0000 5.5000 -5.5000 2.0000 1.0000 2.0000» [u_m2,s_m2,v_m2]=svd(m2) 0.6406 -0.1075 0.6887 -0.3222 -0.5270 -0.3397 0.6429 0.4399 s_m2 = 15.1670 0 0 0 0 0 0 0 8.6886 0 0 0 0 0v_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» basis_m2=v_m2(1:4,5:7) 0.0416 -0.4178 -0.1234The closed loop eigenvectors for the two eigenvalues at -2.5 can be any linearcombinations of these two vectors. Let's see how many directions are possible:» svd(basis_m2)ans = 0.1832Let us also check that these directions are linearly independent from the eigenvectordirection we have already chosen:ans = 0.4487Three nonzero SV’s, so not the greatest "separation" we could ask for, but OK. Sopick:psi_2 = 0.0416» psi_3=basis_m2(:,2) 0 -0.4178 -0.4874Therefore: » f_2=v_m2(5:7,5)f_2 = 0.7097» f_3=v_m2(5:7,6) 0.3946Now what about the fourth eigenvalue and eigenvector? Well, remember that the systemhad an uncontrollable mode at -6. The modal matrix that yielded the Kalmanans = 1 1 -1 0which can be checked as:» inv(t*t_new)*a*(t*t_new)ans = -6 1 0 0 0 -6 0 0» inv(t*t_new)*b1 1 1 1Therefore, the eigenvector associated with the uncontrollable mode is:» t*t_new(:,4)ans = 0We MUST select this eigenvector as our remaining closed loop eigenvector and we MUSTselect -6 as our remaining closed loop eigenvalue because the uncontrollability ofas a closed loop eigenvalue/eigenvector combination, so we sould not have needed topsi_4 = 0 0 1» m4=[-6*eye(4)-a b1] 0.5000 -0.5000 5.5000 -5.5000 2.0000 1.0000 2.0000» [u_m4,s_m4,v_m4]=svd(m4) -0.4569 -0.3687 0.4532 0.6708s_m4 = 17.1074 0 0 0 0 0 0 0 8.0545 0 0 0 0 0v_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» basis_m4=v_m4(1:4,4:7) -0.2664 0.6447 -0.1290 0.0368» svd(basis_m4)ans = 1.0000» recip_m4=pinv(basis_m4) 1.0318 0.2714 0.6451 -0.1152 3.4828 -3.6118 3.5208 -3.5738» svd(recip_m4)ans = 1.0000 1.0000 0» alpha_4=recip_m4*[0 0 1 1]' 0.5299Check:» basis_m4*alpha_4ans = -0.0000Check linear independence from previous eigenvectors:» svd([psi_1 psi_2 psi_3 psi_4])ans = 0.4434Again, not the greatest separation (as we already knew), but OK.» f_4=v_m4(5:7,4:7)*alpha_4f_4 = -0.4735We should have expected this because recall that we do not feed back uncontrollablemode components because they have no effect anyway.Now, let's calculate the feedback gain matrix. Put the selected closed loopeigenvectors together as G:G = 0 0.0416 -0.4178 0and put the corresponding “bottom parts” together as J:» J=[f_1 f_2 f_3 f_4]J = 1.5601 0.7097 0.3946 0Then, K = J * inv(G):» k_brogan=J*inv(G)k_brogan = 44.0000 -5.5000 -20.5000 20.5000 -17.7621 1.9089 7.3702 -7.3702Check the closed loop characteristics:» ambk_brogan=a-b1*k_broganambk_brogan = 0.0000 -2.5000 -0.0000 0.0000» eig(ambk_brogan)ans = -2.5000OK. Let’s check that each of the closed loop eigenvectors we picked is actually aclosed loop eigenvector for the corresponding closed loop eigenvalue:ans = -0.3642» (-1*eye(4)-ambk_brogan)*psi_1 -0.1150» (-2.5*eye(4)-ambk_brogan)*psi_2 1.0e-014 * -0.7031» (-2.5*eye(4)-ambk_brogan)*psi_3 -0.0986 0.1682 0.2125Now, since its columns are the closed loop eigenvectors, G should be a modal matrixfor the closed loop system: ans = -1.0000 -0.0000 -0.0000 -0.0000 -0.0000 -2.5000 0.0000 -0.0000Indeed ! The closed loop responses for this system will show that the “slow” modedoes not appear in the x_2(t) response.