1. Homework 10 MAE4310 Due April 28, 2015
This assignment is help you prepare for exam 3. You are not allowed to work or talk with
other students but can consult with Professor Hullender as much as needed.
Name_____Michael Clifford Davis_
The center-of-pressure on high performance aircraft is in front of the center-of-gravity; such an
aerodynamic design causes the pitch dynamics of the aircraft to be unstable if there is no
feedback control.
For a specific aircraft a simplified transfer function for the pitch angle ๐ for an elevator input
angle โ is provided below.
๐ = [
0.05
๐ 2 โ 4
]โ
(a) From examination of the transfer function relating ๐ to โ , explain why it is obvious that
the pitch dynamics for this aircraft are unstable if there is no feedback control loop to
stabilize the pitch angle.
If you factor the denominator you see that you have a positive Eigen value which would mean
the system is unstable.
2. (b) The control signal u is the input to a hydraulic actuator which adjusts the angular position
of the elevator โ , i.e.
โ = 5 ๐ข
where ๐( ๐ ) = ๐บ๐( ๐ ) ๐ธ( ๐ ); E is the pitch angle error.
Design a cascade controller achieving a NSSE of zero for a desired pitch angle step input
of 10 degrees. The step response should reach steady state within 1% in no more than 1
second and with no more that 10% overshoot. Simulate the time response of your system
and plot pitch angle and elevator angle.
4. Using your controller, repeat the simulation but this time for the case where the pilot wants to
maintain level flight (step input of zero) but wind turbulence has created an initial pitch rate of
10 degrees/second. How effective is your controller at bringing the pitch angle and pitch angle
rate back to zero?
0 0.005 0.01 0.015 0.02 0.025 0.03 0.035 0.04 0.045 0.05
-0.5
0
0.5
1
1.5
2
2.5
x 10
6
Homework 10 problem 1(b)
time, seconds
elevatorangle๏ฆdegrees
6. The values for the system response for pitch angle and pitch angle rate under this
disturbance are within the error requirements for the required setting time.
Design an operational amplifier circuit for implementing your controller (see page 504 in Nise).
Using excel solver for the non linear system of equations I was able to obtain values for
the resistors and capacitors for a PID controller with the given PID gains from the
developed controller and guessing at one of the unknown variables. I chose to give the
C2 capacitor a value of .1 microFarads and then proceeded:
๐พ๐ = 307.3033 = (
๐ 2
๐ 1
+
๐ถ1
๐ถ2
)
๐พ ๐ท = 43.28215 = ๐ 2 ๐ถ1
๐พ๐ผ = 454.463 =
1
๐ 1 ๐ถ2
R1 = 22 kohms
R2 = 2 Mohms
C1 = 21.6 microFarad
C2 = 0.1 microFarad
7. Design digital code for implementing your controller (see Section 6.6 in the notebook).
Be sure to specify the sample rate by calculating an appropriate value for T.
Code:
%Digital PID control example
%Gc(s)=Kp+Ki/s+Kds
%Gc(z)=Kp-TKi/(z^-1 -1)-Kd(z^-1 -1)/T
Kp=307.3033;Ki=454.463;Kd=43.28215;
Gc=tf([Kd Kp Ki],[1 0 0])%extra s in denominator to be cancelled with extra s
in num of G
G=tf([0.05*5 0],[1 0 -4]);%extra s in the numerator of G
GGc=series(G,Gc)
GGc1=minreal(GGc)%Cancels the extra s in the num and denominator
GGcCL=feedback(GGc,1);
damp(GGcCL)%gives eigenvalues of the analog system
step(GGcCL,'r')%gives step response of the analog system
hold
T=0.01;
Gcd = c2d(Gc,T)
Gcd = zpk(Gcd)
Results:
g =
0.25 s
-------
s^2 - 4
Continuous-time transfer function.
G =
0.25 s
-----------
(s-2) (s+2)
Continuous-time zero/pole/gain model.
Gc =
43.28 s^2 + 307.3 s + 454.5
---------------------------
s^2
8. Continuous-time transfer function.
GGc =
10.82 s^3 + 76.83 s^2 + 113.6 s
-------------------------------
s^4 - 4 s^2
Continuous-time transfer function.
GGc1 =
10.82 s^2 + 76.83 s + 113.6
---------------------------
s^3 - 8.882e-16 s^2 - 4 s
Continuous-time transfer function.
Eigenvalue Damping Frequency
0.00e+00 -1.00e+00 0.00e+00
-2.08e+00 1.00e+00 2.08e+00
-4.37e+00 + 5.96e+00i 5.91e-01 7.39e+00
-4.37e+00 - 5.96e+00i 5.91e-01 7.39e+00
(Frequencies expressed in rad/seconds)
Current plot held
Gcd =
43.28 z^2 - 83.47 z + 40.23
---------------------------
z^2 - 2 z + 1
Sample time: 0.01 seconds
9. Discrete-time transfer function.
Gcd =
43.282 (z-0.9794) (z-0.9491)
----------------------------
(z-1)^2
Sample time: 0.01 seconds
Discrete-time zero/pole/gain model.
๐ =
1
10๐
โถ ๐คโ๐๐๐ ๐ ๐๐ ๐กโ๐ ๐๐๐๐๐๐ ๐ก ๐๐๐๐๐๐ก๐ข๐๐ ๐๐๐๐๐ ๐ฃ๐๐๐ข๐
๐ =
1
10 ร 7.49
= 0.01353 โถ ๐ค๐๐๐ ๐ข๐ ๐ ๐ = 0.01
Since we addeded an extra โsโ to the controller for matlab I will manually solve the digital code
buy using the simplified function given in the handbook from section 6.6.3(Digital
Implementation of a PID controller) with known T and Kp, Ki and Kd:
๐ข ๐ = ๐ข ๐โ1 + (๐พ ๐ + ๐๐พ๐ + ๐พ ๐ / ) ๐ ๐ โ (๐พ ๐ + 2๐พ ๐/ ๐ ) ๐ ๐โ1 + ๐พ ๐ / ๐ ๐ ๐โ2
๐ข ๐ = ๐ข ๐โ1 + ( 4640.063) ๐ ๐ โ (8963.734) ๐ ๐โ1 + (4328.215)๐ ๐โ2