Final Project FinalReport VikasYADAV

Download as pdf or txt
Download as pdf or txt
You are on page 1of 12

EECS_X497.

4: Applied Control Theory for Embedded Systems (SPRING 2013)


Vikas YADAV, Final Project

I. OVERVIEW

The goal of this project is to study the pitch attitude control of an F4-E fighter aircraft (shown below)
based on the model given in Cavallo, A., De Maria, G., and Verde, L. Robust Flight Control Systems: A
Parameter Space Design. Journal of Guidance, Control, and Dynamics, vol. 15, no. 5, September–October
1992, pp. 1207–1215. The figure below shows the side view (top) and the bottom view of the aircraft.

Figure 1: Mac Donnell F-4E Phantom airplane

The pitch of an aircraft is defined as rotation of the plane about Y-axis (lateral axis). The X-axis is the
longitudinal axis, passing through the nose of the plane. The Z-axis is (X-Y-Z forms a right hand system)
pointing outward from the paper (towards up direction). The pitch angle, θ rad, is defined as angle made
by the nose of the plane with horizon. The clockwise rotation is taken as positive direction. The pitch
rate, q rad/sec, is defined as the rate of change of pitch angle with time. The pitch angle can be obtained
()

by integrating pitch rate. In terms of Laplace transformation: θ(s) = .

Page 1 of 12
II. SYSTEM MODELING

Figure 2: Elevator deflection and canard deflection to cause pitch and normal acceleration change

The pitch angle can be controlled by moving the elevators, located in the tail of the aircraft, as shown in
the above figure. The pilot issues a command for desired change in elevator angle, δcom, which causes
the elevators to move by δe and the canards by δc through actuators which can be modeled as low pass
transfer functions with a time constant, τ, as shown in the following open loop system:

Figure 3: Aircraft dynamics model

This elevator deflection, δe, and the canard deflection, δc, leads to change in the pitch angle through the
aircraft's longitudinal dynamics, which is modeled by Cavallo as follows:

 −1.702 50.72 263.38  −272.06


  =  0.22 −1.418 −31.99   +  0 
%&'

 
0 0 −14 !

14 
" $


 1 0 0
( )=( ) 
!  0 
1 
0


* +

Page 2 of 12
Eigen-values of the system matrix, A, are -4.9034, 1.7834, and -14. There is one value in right half plane,
thus, the open loop system is unstable. However, (A, B) is a controllable pair; thus, a suitable controller
can be designed to control the system. From the state-space model, the open loop transfer function
from the commanded deflection to the change in pitch rate, q, can be obtained as follows:

G(s) = C(sI-A)-1B + D, where D = 0. This results in the following:

3040.. 56 3 784.9 5 3 00:;8


- (/)
G(s) = , . 1 = 5 = .4..0 5
< 6 = 9>.;> 5 3 .00.>
-0 (/) 3784.4  3 4:;
5< = .4..0 56 = 9>.;> 5 3 .00.>

G2(s) is the open-loop transfer function from the commanded deflection to the change in pitch rate, q.
5< = .4..0 56 = 9>.;> 5 3 .00.> =.> =>.;89 3..4:9.
 3784.4  3 4:; 3784.4=..77>
That is, G2(s) = ?
@AB 

Note that the poles of open-loop transfer function G2 are same as the eigen-values of system matrix A.
Due to an unstable pole at 1.783, the open loop system is unstable. Moreover, there is no pole-zero
cancellation in G2 implying that the system is controllable. The negative sign in the transfer function
implies that for any positive change in elevator deflection, the pith rate is negative, i.e., in the opposite
direction as that of the deflection. Thus, a downward deflection (positive δcom) of elevator causes a pitch
down (negative q).

The step response of the open-loop plant G2 is shown below, as expected the output (pitch rate) grows
exponentially and becomes out of control.

Figure 4: Block diagram of open loop system for pitch rate

Step Response
0

-50

-100

-150
Amplitude

-200

-250

-300

-350
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
Time (seconds)

Figure 5: Step response of G2, change in pitch rate q due to unit step change in commanded deflection

Page 3 of 12
III. CONTROL OBJECTIVE:

The objective of this project is to design suitable control strategy to achieve proper pitch attitude
control for an unstable aircraft dynamics, G2(s), with (1) a desired percent overshoot of 10%, (2) settling
time of 1 sec, and (3) unit step steady state error to pitch rate < 0.001.

The design is based on a second order approximation of the close loop system. Thus, the requirements
can be specified in terms of dampnig ratio and natural frequency as: desired ζ = 0.591, ωn = 6.768
rad/sec, and ess(∞) < 0.001. In other words: The desired second order system closed loop poles are at -
4 ± j 5.46.

This translates to frequency domain requirement of (1a) phase margin of 59 degrees and (2a) a closed
loop bandwidth of 1.25 Hz.

IV. CONTROLLER DESIGN:

Pitch rate, q, can be measured via rate-gyroscopes installed on the aircraft, which measures the angular
rate of rotation of plane along its axes. The pitch rate measurement can be integrated to obtain pitch
angle, θ.

The design process is to try to add cascade controller such that closed loop characteristic equation have
desired roots. The design is based on a second order approximation of the close loop system, with
desired closed loop poles to be at -4 ± j 5.46.

IV. SIMPLEST CONTROL, PROPORTIONAL CONTROL:

The first step in design is trying the simplest proportional controller shown below:

Figure 6: Proportional controller in cascade with the plant

C D 
6
The closed loop transfer function T(s) is given by: T(s) = .=C D
6 

The root locus of G2(s) contains all the closed loop poles for various values of gain K as shown below,
where the dotted radial lines on root locus graph are constant damping ratio lines and dotted curve lines
are constant natural frequency:

Page 4 of 12
Figure 7: Root locus of G2(s) for K < 0

By looking at the graph, it is clear that the desired closed loop poles (shown by green cross marks on the
graph) do not lie on the root locus, thus, it is not possible to achieve the objective just by using the
proportional controller. The maximum that can be done in this case of proportional controller is to find a
value of K such that the closed loop damping ratio is same as desired value of 0.591. From the root locus
plot as shown above, the gain value K = -0.34 corresponds to ζ=0.591, the corresponding complex roots
are: -8.1906 ± j11.2515. The third root is located at -0.74. The closed loop transfer function is given by:

.48.:7 =..77> 
T(s) =  =8.49:;  6= .E.9:=.;9.4 

Thus, the closed loop is stable, unlike the open loop. However, due to third root being more dominant
than complex roots, the closed loop system cannot be approximated with a second order system for the
purpose of overshoot and settling time calculations. These values can be determined by simulating the
unit step response in Matlab as shown in the following figure.

Page 5 of 12
Step Response
2

1.8

1.6

1.4

1.2
Amplitude

0.8

0.6

0.4

0.2

0
0 1 2 3 4 5 6
Time (seconds)

Figure 8: Step response of closed loop system with proportional controller, K=-0.34

From the unit step response, we can compute the settling time as 4.5 sec, and percent overshoot as 0%.
The steady state error due to unit step is 0.85, which is pretty high.

V. SOPHISTICATED CONTROLLER, PID CONTROLLER:

As seen in the previous section, it is not possible to achieve desired closed loop response just by using a
proportional controller as the desired roots are not in the root locus of G2(s). Since, the objective is to
modify transient behavior as well as stead state behavior; the next thing to try would be a Proportional-
Integral-Derivative (PID) controller as shown below.

Figure 9: Proportional-Integral-Derivative (PID) controller in cascade with the plant

The PID controller is designed in two steps, (1) a PD controller, which modifies the transient behavior, is
designed to obtain the location of controller zero and (2) followed by PI controller design, which
modifies the steady-state behavior, to place the controller pole and zero.

This design is done using SISOTOOL application of MATLAB, which allows inserting poles and zeros in the
open loop and seeing the closed loop response.

The following is the SISOTOOL manager used to select the control architecture to be cascade controller.

Page 6 of 12
Figure 10: Matlab SISOTOOL configuration manager to select control architecture

The cascade controller to be designed is shown as C. The plant is shown as G, which is set to G2(s) via
System Data tab. The sensor transfer function H is set to 1 and the forward input transfer function F is
set to 1. The following root locus plot is created by adding two complex zeros and one pole at origin
[which corresponds to the PID controller: (Kps2+Kds+Ki)/s] to the root locus of the G2(s).

Figure 11: SISOTOOL design task window to insert and move poles/zeros to meet system requirement

Page 7 of 12
The SISOTOOL provides the exact values of gain, poles, and zeros for the PID controller as follows:

= −L. MNF − H. FFG J −


3FF.GHI (H.HG JK= H.KG J=G ) 3FF.GHI
J J
Gc(s) =

Figure 12: Resultant controller value in terms of transfer function and pole/zeros

The closed loop step input response is shown below. The settling time is 0.1 sec, which is well below
requirement of 1 sec. The overshoot is 0% well below the 10% requirement. The steady state error is
also 0.

Figure 13: Unit step response of the close loop system with chosen PID controller

Page 8 of 12
VI. MULTI-LOOP FEEDBACK CONTROL METHOD:

This third method is a modified way of applying proportional controller. As we have already seen in
section IV, a proportional controller is not enough to meet the desired specification. This third method
makes use of two proportional controllers. The first one is used to change the open-loop pole location
on the root locus of the plant G2(s), this is called the minor/inner loop. The second one is used to bring
the closed loop poles close to the desired specification; this is called the major/outer loop. The minor
loop controls the pitch rate by sensing pitch rate information and feeding it back for the control signal.
This is exactly same as the proportional controller discusses in the section IV. The pitch rate output is
integrated to obtain the pitch angle information. The pitch angle can be fed back to further tune the
closed loop design, in order to achieve the desired specification.

Figure 14: Multiple loop control feedback method for pitch angle control

The inner loop is designed first to obtain the gain K1. Since, the inner loop is identical to the proportional
controller discussed in the section IV, the results from section IV can be applied here to obtain K1 = -
0.34, and the inner loop closed loop transfer function T(s) as:
.48.:7 =..77> 
T(s) =  =8.49:;  6
= .E.9:=.;9.4 

The resultant reduced closed loop system is shown below:

Figure 15: The outer loop using position feedback with inner closed loop system and integrator

The closed loop system transfer function from the commanded pitch angle, θc, to the pitch angle, θ, is
given by (this is a Type-1 system due to integrator, thus, making steady state error in position go to 0):

C O/
6 C O
6 .48.:7 =..77> C 6
M(s) = .= C
6 O/
= = C
6 O
=  =8.49:;  6 = .E.9:=.;9.4  = .48.:7 =..77> C
6

Page 9 of 12
/ / + 0.7389 )( / 0 + 16.38/ + 193.7 ) + 170.85( / + 1.554 )Q0 = 0
The characteristic equation of the closed loop transfer function is:

The appropriate value of K2 can be obtained by plotting root locus of T(s)/s, which is shown below:

Figure 16: The root locus of T(s)/s for K2>0

As seen from the root locus of T(s)/s shown above, with the current chosen value of K1 (inner loop), it is
not possible to achieve both 0.5 damping ratio and 1 sec settling time. The best we can do is to get a
damping ratio of 0.5, which happens at a gain K2 = 5.3128 (shown by magenta dots). This still has one
more pair of complex roots closer to zero (with slower dynamics but lot heavier damping).

One more iteration of design using multiple-loops should be done to try to get better gain values. This
time, it is done using the SISOTOOL. The multi-loop control architecture is selected via the SISOTOOL
manager as shown below (where H1=H2=F=1 and C1=K2 and C2 = K1):

Figure 17: The SISOTOOL configuration manager

Page 10 of 12
Root Locus Editor for Open Loop 1(OL1) Root Locus Editor f or Open Loop 2(OL2)
14 30
0.66 0.52 0.4 0.28 0.18 0.09

12

10
10 20
0.8
8

5 10
0.94 4

2
Imag Axis

Imag Axis
0 0

0.94 4 -10
-5

8
0.8
-20
-10
10

12
0.52 0.4 0.28 0.18 0.09
0.66
14 -30
-12 -10 -8 -6 -4 -2 0 2 -14 -12 -10 -8 -6 -4 -2 0 2
Real Axis Real Axis

Figure 18: The root locus of outer-loop (left) and inner-loop (right)

With the help of SISOTOOL, the root locus of both inner loop and outer loop can be drawn side by side.
The inner loop gain can be changed which will change the starting and end points in outer loop root
locus. This is followed by changing gain in outer loop root locus. The closed loop unit step response can
also be seen in real time. The following closed loop response is obtained for K1=-0.7272 and K2=4.7067,
which has settling time very close to 1 sec and overshoot less than 10%, stead state error almost 0.
From: r1 To: Out(1)
1.4

1.2
Amplitude

0.8

0.6

0.4

0.2

0
0 0.5 1 1.5 2 2.5

Time (sec onds)

Figure 19: Unit step response of the closed loop system (actual pitch angle vs. commanded pitch
angle)

Page 11 of 12
VII. CONCLUSION

1. Several iterations of control design are required to come up with a final design which comes close to
the desired specifications.

2. PID controller can do a very good job but a presence of differentiator makes it prone to noise effects.

3. The multi-loop feedback control is a great strategy if both position and rate of change of position are
available. It avoids the explicit use of a differentiator and still has all advantages of differentiator effect
due to presence of rate of change signal.

4. Matlab has a very power design tool, called SISOTOOL. This can be used to design and tune all kind of
control architectures using various graphics tools based on root locus method.

Page 12 of 12

You might also like