CMU
UM


Example: State-space method for the Pitch Controller

Controllability and Observability
Control design via pole placement
Reference input

In the Pitch Controller Modeling page, the state-space model was derived as

The input (elevator deflection angle, delta e) will be 0.2 rad (11 degrees), and the output is the pitch angle (theta).

The design requirements are

To see the original problem setup, please refer to the Pitch Controller Modeling page.

If you are interested in running an animation of this example based on the control techniques used in the state-space tutorial please go to the Pitch Controller Animation page after completing this tutorial.

Controllability and Observability

The first thing to do in designing a system via state-space method is to check the controllability and observability of the system. For the system to be completely state controllable, the controllability matrix

must have the rank of n. The rank of the matrix is the number of independent rows (or columns). In the same token, for the system to be completely state observable, the observability matrix

must also have the rank of n. Since our controllability matrix and observability matrix are 3x3, the rank for both matrices must be 3. The Matlab command rank can give you the ranks of both matrices. Create a new m-file and enter the following commands:

If you run this m-file in the Matlab command window, you should see
This proves that our system is both completely state controllable and completely state observable.

Control design via pole placement

The schematic of a full-state feedback system is shown below:

where

Recall from the State-Space Tutorial page, the "pole placement" technique should be used to find the control matrix (K). Since the determinate of [sI-(A-BK)] matrix is a third-order polynomial, there are three poles we can place.

In the State-Space Tutorial, the dominant second-order pole placement method was introduced. However for this example, we will use another method called Linear Quadratic Regulator (LQR) method. This method allows you to find the optimal control matrix that results in some balance between system errors and control effort. Please consult your control textbook for details. To use this LQR method, we need to find three parameters: performance index matrix (R), state-cost matrix (Q), and weighting factor (p). For simplicity, we will choose the performance index matrix equals 1 (R=1), and the state-cost matrix (Q) equals to C' x C. The weighting factor (p) will be varied as we see the step response. To see the structure of the Q matrix, type in the following commands to an m-file and run it in the Matlab command window (or you can simply type them directly into the command window).

You should see the following Q matrix in the command window:

	Q  =

		0 	0	0
		0	0	0
		0	0	1

Now we are ready to find the control matrix (K) and see the response of the system. First, let the weighting factor (p) equal 50. Enter the following commands to a new m-file and run it in the Matlab command window.

After you run this m-file, you should see the step response similar to the one shown below:

The rise time, overshoot, and settling time looks satisfactory. However, there is a large steady-state error. This can be easily corrected by introducing the feedforwarding scaling factor (Nbar).

Reference input

Unlike other design methods, the full-state feedback system does not compare the output to the reference; instead, it compares all states multiplied by the control matrix (K*x) to the reference (see the schematic shown above). Thus, we should not expect to see the output equal to the input. To obtain the desired output, we need to scale the reference input so that the output equals the reference. This can be easily done by introducing a feed-forwarding scaling factor called Nbar. The basic schematic with the scaling factor (Nbar) is shown below:

We can easily find Nbar from the Matlab function rscale. Since this rscale is a user-defined function, you need to copy and save the rscale m-file to your directory. For further assistance in using user-defined functions, refer to Function. After you have saved the rscale m-file to your directory, enter the following commands to a new m-file and run it in the Matlab command window. You should see the response shown below:

Now the steady-state error has been eliminated and all design requirements are satisfied.

If you are interested in running an animation of the pitch controller example based on the control techniques used in this tutorial please go to the Pitch Controller Animation page.


User Feedback

We would like to hear about difficulties you had with the tutorials, suggestions you have for improvement, errors that you found, or any other comments that you have. This feedback is anonymous; include your email address if you want a reply.


State-Space Examples
Cruise Control | Motor Speed | Motor Position | Bus Suspension | Inverted Pendulum | Pitch Control | Ball and Beam

Pitch Control Examples
Modeling | PID | Root Locus | Frequency Response | State Space | Digital Control: SS | Animation

Tutorials

Basics | Modeling | PID | Root Locus | Frequency Response | State Space | Digital Control | Examples

HOME INDEX COMMAND

8/26/97 DK