|
|
|
Designing the full-state feedback
controller
Plotting the closed-loop response
From the main problem, the dynamic equations in state-space form are the
following:

For the original problem setup and the derivation of the above equations, please refer to the main problem.
We want to design a feedback controller so that when the road disturbance (W) is simulated by a unit step input, the output (X1-X2) has a settling time less than 5 seconds and an overshoot less than 5%. For example, when the bus runs onto a 10 cm high step, the bus body will oscillate within a range of +/- 5 mm and will stop oscillating within 5 seconds.
The system model can be represented in Matlab by creating a new m-file and entering the following commands (refer to main problem for the details of getting those commands). We need to define the A, B, C, D matrices by entering the following into the m-file:
m1=2500; m2=320; k=10000; b=140000; A=[0 1 0 0 -k/m1 -b/m1 k/m1 b/m1 0 0 0 1 k/m2 b/m2 -2*k/m2 -b/m2]; B=[0 0 1 0 0 0 0 k/m2]; C=[1 0 -1 0]; D=[0 0];
First, let's design a full-state feedback controller for the system. Assuming for now that all the states can be measured (this assumption is probably not true but is sufficient for this problem), the schematic of the system should be:

Since A and B*[1,0]'*K are all 4x4 matrices, there should be 4 closed-loop poles for the system. We might want to place the two dominant poles at -5 + 5i and -5 - 5i (this corresponds to zeta = 0.7 which gives 5% overshoot and sigma = 5 which leads to a 1 sec rise time). For the other two poles, we want to place them far to the left so that they won't affect the response too much. For now, let's try placing them at -20 and -100. Once we determine the closed-loop poles we want, Matlab can find the K matrix for us. Simply add the following code into the m-file:
p1 = -5 + 5i; p2 = -5 - 5i; p3 = -20; p4 = -100; K = place(A,B*[1,0]',[p1 p2 p3 p4]);
Looking at the schematic above again, we see that after adding the K matrix into the system, the state-space equations become:

t=0:0.01:10; step(A-B*[1,0]'*K,0.1*B,C,D,2,t) axis([0 10 -.01 .01])Running the m-file in the command window, you should see the following plot:

p1=-10+10i; p2=-10-10i; p3=-50; p4=-200;Rerunning the program should yield the following plot:

Now the steady-state error is smaller than 1 mm. Since the overshoot is smaller than 1%, the settling time is about 0.5 sec and the steady-state error is smaller than 1%, we will determine that the response is satisfactory.
You might ask, can we eliminate the steady-state error? It is possible to build an estimater which will estimate not only the states but also the value of the step disturbance. A controller can then be designed which will drive all the states to zero even in the presence of this disturbance. This type of solution is beyond the scope of these tutorials and will not be introduced in detail here, but if you are interested, you may wish to consult Linear System Theory by W. J. Rugh, 2nd edition, p. 280, or another book on linear systems.
Tutorials
