Monday, December 14, 2009

Properties and State Feedback

Properties

There are three essential properties identified in my last post that I must know about my platform before proceeding: l, the distance from the axle to the center of gravity, m, the mass of the platform with the axle and wheels, and M, the mass of the axel and wheels alone. It was easy to determine the center of gravity. I placed the platform flat on the edge of a table and slid it to the point of just about falling off. I measured the distance from this point to the axle.

The weight proved to be a bit of an issue though. My bathroom scale wasn't sensitive enough to pick up the whole platform on its own or with my help. I could have purchased a mail scale from Staples or a small shop scale from a hardware store for $40 or so, but this was outrageous just to weigh it once and be done with it. Instead, my little platform and I visited our local Shaw's and used the produce scales! :) I weighed the unit with and without the wheel and axles to find both measurements.



Plugging in the values above into the slightly modified matrices from my last post produces



Notice that the sensor matrix, C, has changed to include the change in angle. More on this in a moment.


Reachability

Before designing a state feedback control, to be certain that it can be controlled in the first place, it's good practice to determine that the steady state system is in fact reachable. To do this, we examine the rank of the reachability matrix Wr.



The rank of Wr for the model is 2 and is equal to the system matrix and is therefore controllable. Yay!


State Feedback Control

A typical state feedback control system can be diagrammed as below with reference input r, controller elements kr and K, disturbance d, and output y.



Using the basic blocks found in Simulink I was able to mirror this design with the following diagram. Note that the stabilisation block should read "-K*uvec" with a negative sign in front of the K.



I had some trouble running basic simulations with my old steady state matrices. I missed a subtlety that designing this sort of control is based off the assumption that all components of the state vector are measured. In other words, y is the output of the next x. Without this, my simulations never settled or would oscillate. Altering the C matrix to pass along the change in angle state fixed the problem.

The response of this system to an initial offset of 5 is graphed below with poles arbitrarily set to -1+i and -1-i. y1 is the angle of the platform, y2 is the change in angle.



Looking forward, I'd like to identify more appropriate poles, test the controller against a non-linear simulation, and if that succeeds, install the controller on the platform.

No comments: