Aircraft Control Lecture 9
Aircraft Control Lecture 9
Fall 2004
16.333 81
Goal: analyze aircraft longitudinal dynamics to determine if the be havior is acceptable, and if not, then modify it using feedback control.
Note that we could (and will) work with the full dynamics model, but for now, lets focus on the short period approximate model from lecture 75. xsp = Aspxsp + Bspe
where e is the elevator input, and
Zw /m U0
w xsp =
, Asp = 1 1 Iyy (Mw + Mw Zw /m) Iyy (Mq + Mw U0) q Ze /m Bsp = 1 Iyy (Me + Mw Ze /m) Add that = q, so s = q
Take the output as , input is e, then form the transfer function (s) 1 q(s) = = 0 1 (sI Asp)1Bsp e(s) s e(s)
As shown in the code, for the 747 (40Kft, M = 0.8) this reduces to: (s) 1.1569s + 0.3435 = 2 Ge (s) e(s) s(s + 0.7410s + 0.9272) so that the dominant roots have a frequency of approximately 1 rad/sec and damping of about 0.4
Fall 2004
PoleZero Map 1 0.68 0.54 0.42 0.3 0.2 0.09 0.8 1
16.333 82
0.8 0.84
0.6
0.6
0.4
0.2
0.2
0.4
0.6
0.84
0.6
0.8 0.68 0.9 0.8 0.7 0.54 0.6 0.5 0.42 0.4 Real Axis 0.3 0.3 0.2 0.2 0.09 0.1
0.8
1 1
1 0
0.1
Basic problem is that there are vast quantities of empirical data to show that pilots do not like the ying qualities of an aircraft with this combination of frequency and damping What do they prefer?
7
5 Poor 4 Acceptable
Satisfactory
Damping ratio s
This criterion has been around since the 1950s, but it is still valid. Good target: frequency 3 rad/sec and damping of about 0.6 Problem is that the short period dynamics are no where near these numbers, so we must modify them.
Fall 2004
16.333 83
0.84 2
0.95
Imaginary Axis
3.5 0
2.5
1.5
0.5
0.95
2 0.84
3 3.5
0.7 3 2.5
0.44 1.5
0.32 1
0.2 0.5
0.1 0
Of course there are plenty of other things that we will consider when we design the controllers Small steady state error to commands e within limits No oscillations Speed control
Fall 2004
16.333 84
First attempt to control the vehicle response: measure and feed it back to the elevator command e. Unfortunately the actuator is slow, so there is an apparent lag in the response that we must model
c e
O /
4 s+4
a e
/
Ge (s)
o o
a c Dynamics: e is the actual elevator deection, e is the actuator command created by our controller 4 a a c = Ge (s)e ; e = H(s)e ; H(s) = s+4
Looks good, but how do we analyze what is going on? Need to be able to predict where the poles are going as a function of k Root Locus
Fall 2004
16.333 85
Gc(s)
u
/
y Gp(s)
/
Assume that the plant transfer function is of the form Np (s zpi) G p = Kp = Kp i Dp i (s ppi ) and the controller transfer function is Nc (s zci) Gc(s) = Kc = Kc i Dc i (s pci )
This is the unity feedback form. We could add the controller Gc in the feedback path without changing the pole locations.
Fall 2004
16.333 86
Basic questions:
Analysis: Given Nc and Dc, where do the closed loop poles go as a function of Kc?
Synthesis: Given Kp, Np and Dp, how should we chose Kc, Nc, Dc to put the closed loop poles in the desired locations?
Block diagram analysis: Since y = GpGce and e = r y, then easy to show that y Gc Gp = Gcl (s) r 1 + Gc Gp where K c Kp N c N p Dc Dp + K c K p N c N p is the closed loop transfer function Gcl (s) =
The denominator is called the characteristic equation c(s) and the roots of c(s) = 0 are called the closedloop poles (CLP) .
The CLP are clearly functions of Kc for a given Kp, Np, Dp, Nc, Dc a locus of roots [Evans, 1948]
Fall 2004
16.333 87
General root locus is hard to determine by hand and requires Matlab tools such as rlocus(num,den) to obtain full result, but we can get some important insights by developing a short set of plotting rules. Full rules in FPE, page 260. Basic questions: 1. What points are on the root locus? 2. Where does the root locus start? 3. Where does the root locus end? 4. When/where is the locus on the real line? 5. Given that s0 is found to be on the locus, what gain is need for that to become the closedloop pole location?
Question #1: is point s0 on the root locus? Assume that Nc and Dc are known, let Nc Np Ld = Dc Dp and K = KcKp then c(s) = 1 + KLd(s) = 0 or equivalently for values of s for which Ld(s) = 1/K, with K real. For K positive, s0 is on the root locus if
Ld(s0) = 180 l 360, If K negative, s0 is on the root locus if Ld(s0) = 0 l 360, l = 0, 1, . . .
[0 locus]
l = 0, 1, . . .
Fall 2004
16.333 88
DcDp + KNcNp = 0 So if K 0, then locus starts at solutions of DcDp = 0 which are the poles of the plant and compensator.
Question #3: Where does the root locus end? Already shown that for s0 to be on the locus, must have 1 Ld(s0) = K
So if K , the poles must satisfy:
Ld = NcNp
=0 Dc D p
1. Poles are located at values of s for which NcNp = 0, which are the zeros of the plant and the compensator
2. If Loop Ld(s) has more poles than zeros As |s| , |Ld(s)| 0, but we must ensure that the phase condition is still satised.
Fall 2004
16.333 89
More details as K : Assume there are n zeros and p poles of Ld(s) Then for large |s|, Ld(s) 1 (s )pn
So the root locus degenerates to: 1 1+ =0 (s )pn So n poles head to the zeros of Ld(s) Remaining p n poles head to |s| = along asymptotes dened by the radial lines 180 + 360 (l 1) l = pn l = 1, 2, . . .
so that the number of asymptotes is governed by the number of poles compared to the number of zeros (relative degree). If zi are the zeros if Ld and pj are the poles, then the centroid of the asymptotes is given by:
p
= Example: L(s) = s4
0.8 0.6 0.4 0.2 Imaginary Axis Root Locus
pj
zi
pn
0.2
0.4
0.6
0.8 0.8
0.6
0.4
0.2
0 Real Axis
0.2
0.4
0.6
0.8
Fall 2004
16.333 810
Question #4: When/where is the locus on the real line? Locus points on the real line are to the left of an odd number of real axis poles and zeros [K positive]. Explanation a bit too detailed and not that relevant
Question #5: Given that s0 is found to be on the locus, what gain is needed for that to become the closedloop pole location? Need Dp(s0)Dc(s0)
1 = K
Np(s0)Nc(s0)
|Ld(s0)|
Since K = KpKc, sign of Kc depends on sign of Kp 3 e.g., assume that Ld(s0) = 180, then need Kc and Kp to be same sign so that K > 0
Fall 2004
16.333 811
Figure 4: Basic
Fall 2004
16.333 812
Root Locus 1
Root Locus 5
0.8
0.6
0.4
Imaginary Axis
Imaginary Axis
0.2
0.2
0.4
0.6
0.8
1 5
1 Real Axis
5 2.5
1.5
0.5
0 Real Axis
0.5
1.5
2.5
Fall 2004
16.333 813
Dynamic Compensation
For a given plant, can draw a root locus versus K. But if desired pole locations are not on that locus, then need to modify it using dynamic compensation. Basic root locus plots give us an indication of the eect of adding compensator dynamics. But need to know what to add to place the poles where we want them. New questions: What type of compensation is required? How do we determine where to put the additional dynamics? There are three classic types of controllers u = Gc(s)e
1. Proportional feedback: Gc Kg a gain, so that Nc = Dc = 1 Same case we have been looking at.
e( )d Gc(s) =
Ki s
Used to reduce/eliminate steadystate error If e( ) is approximately constant, then u(t) will grow to be very large and thus hopefully correct the error.
Fall 2004
16.333 814
Consider error response of Gp(s) = 1/(s + a)(s + b) (a > 0, b > 0) to a step, r(t) = 1(t) r(s) = 1/s where e 1 = r 1 + Gc Gp e(s) = r(s) (1 + GcGp)
so that with proportional control, s 1 1 lim ess = lim = K t s0 s 1 + Kg Gp (s) 1 + abg so can make ess small, but only with a very large Kg
Integral control improves the steady state, but this is at the expense of the transient response (typically gets worse because the system is less well damped)
Fall 2004
16.333 815
1 Imaginary Axis
4 6
2 Real Axis
Increasing Ki to increase speed of the response pushes the poles towards the imaginary axis more oscillatory response. Combine proportional and integral (PI) feedback: K2 K1 s + K2 = s s which introduces a pole at the origin and zero at s = K2/K1 G c = K1 + PI solves many of the problems with just integral control (I).
Root Locus 5 4
1 Imaginary Axis
5 3
2.5
0.5
Fall 2004
16.333 816
3. Derivative Feedback u = Kde so that Gc(s) = Kds Does not help with the steady state Provides feedback on the rate of change of e(t) so that the control can anticipate future errors.
0.5
Imaginary Axis
0.5
1.5 2
1.5
0.5
0 Real Axis
0.5
1.5
Derivative feedback is very useful for pulling the root locus into the LHP increases damping and more stable response.
Typically used in combination with proportional feedback to form proportionalderivative feedback PD Gc(s) = K1 + K2s which moves the zero from the origin.
Fall 2004
16.333 817
Controller Synthesis
First determine where the poles should be located Will proportional feedback do the job? What types of dynamics need to be added? Typically use main build ing block (s + z) GB (s) = Kc (s + p) Can be made to look like various controllers, depending on how we pick Kc, p, and z If we pick z > p, with p small, then GB (s) Kc (s + z) s
which is essentially a PI compensator, called a lag. If we pick p z, then at low frequency, the impact of p/(s + p) is small, so GB (s) Kc(s + z)
which is essentially PD compensator, called a lead. Various algorithms exist to design the components of the lead and lag compensators (see 16.31 course notes online)
Fall 2004
16.333 818
Pole Placement
One option for simple systems is called pole placement. Consider a simple system Gp = s2 for which we want the closed loop poles to be at 1 2i Proportional control clearly not sucient, so use a compensator with 1 pole. (s + z) Gc = K (s + p) So there are 3 CLP. Know that the desired characteristic equation is d(s) = (s2 + 2s + 5)(s + ) = 0 The actual closed loop poles solve: c(s) = 1 + GpGc = 0 s2(s + p) + K(s + z) = 0 s3 + s2p + Ks + Kz = 0 Clearly need to pull the poles at the origin into the LHP, so need a lead compensator Good rule of thumb is to take p = 10z as a starting point. Compare the characteristic equations: c(s) = s2 + 10zs2 + Ks + Kz = 0 d(s) = (s2 + 2s + 5)(s + )
= s3 + s2
( + 2) + s(2 + 5) + 5 = 0 gives s2 + 2=10z s 2 + 5=K s0 5=zK
Fall 2004
16.333 819
15
10
5 Imaginary Axis
10
15
20 25
20
15 Real Axis
10
Fall 2004
16.333 820
Autopilot
Back to the problem on 94: feedback to e to control short period model c(s) = 1 + Ge (s)H(s)k = 0 with Ge (s) = Pole/zero map: 1.1569s + 0.3435 , s3 + 0.7410s2 + 0.9272s H(s) = 4 s+4
Figure 15: Pole/zero map of the short period autopilot with feedback
Note: Kp < 0, so if k > 0, then we would have to draw a 0 locus Pole at origin would move to right along real axis unstable.
SP Autopilot with FB: k > 0
4
1 Imaginary Axis
4 4 3 2 1 0 Real Axis 1 2 3 4
Fall 2004
16.333 821
1 Imaginary Axis
4 4 3 2 1 0 Real Axis 1 2 3 4
Clear from the plot that feedback alone is not going to work par ticularly well. Need to increase the gain to move the pole from the origin, but in doing so the SP poles start to move very close to the imaginary axis making the response worse
Fall 2004
16.333 822
Could use a rate gyro as the sensor instead and feedback q 1.1569s + 0.3435 4
Gqe (s) = 2 , H(s) = s + 0.7410s + 0.9272 s + 4
Again, pick the gain kq < 0. Note locus for the real pole.
SP Autopilot with q FB: kq < 0
4
1 Imaginary Axis
4 4 3 2 Real Axis 1 0 1
Fall 2004
16.333 823
Can get an even better result if we combine the q and feedback like PD on the measurement .
O O
c e
/
4 s+4
a e
/
q Gqe
/
1 s
kq
o o
c
a c e = H(s)e
c e = kq q k ( c) q = s
1 a a = Gqe e = Ge e s = Ge H [(k + kq s) k c] Ge Hk = c 1 + Ge H(k + kq s) Now pick kq = k , and do RL versus k c(s) = 1 + Ge H(1 + s)k = 0 Places a zero at s = 1/ Step response is reasonable, but now need to pick the k and kq to get the desired sp and sp
Fall 2004
16.333 824
1 Imaginary Axis
step response to c 1
0.9
0.8
0.7
0.5
0.4
0.3
0.2
0.1
10
15 Time (sec)
20
25
30
35
Fall 2004
16.333 825
1 Imaginary Axis
0.9
0.8
0.7
0.5
0.4
0.3
0.2
0.1
10
15 Time (sec)
20
25
30
35
Fall 2004
16.333 826
Summary
Presented only basics of control design and analysis, but this is enough for us to get started Working with smaller models is good for design, but need to conrm that the full model still stable Could work with the full model, but that is much easier with state space tools
Fall 2004
16.333 827
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
% % Fall 2004 % 16.333 % Codes to investigate control for the SP % close all figure(1);clf set(gcf,DefaultLineLineWidth,2) set(gcf,DefaultlineMarkerSize,10) rlocus([1],conv([1 0],[1 3 2])) print depsc rl_pi1 load b747 Asp Bsp figure(10);pzmap(ss(Asp,Bsp,[0 1],0));grid on; hh=get(10,children);hhh=get(hh(1),children) set(hhh(1),MarkerSize,24);set(hhh(1),LineWidth,2) set(hhh(2),MarkerSize,24);set(hhh(2),LineWidth,2) axis([1 0.1 1 1]) print depsc pz_sp jpdf(pz_sp) figure(10);clf test=[% thumbnail data from Nelson 167 .5 .4; .8 .4; 1 .55; .7 .6] test(:,2)=test(:,2)*2*pi; stest=[test(:,1).*test(:,2) test(:,2).*sqrt(1test(:,1).^2)] fill(stest(:,1),stest(:,2),blue,stest(:,1),stest(:,2),blue) hold on pzmap(ss(Asp,Bsp,[0 1],0));grid on; hh=get(10,children);hhh=get(hh(1),children) set(hhh(1),MarkerSize,24);set(hhh(1),LineWidth,2) set(hhh(2),MarkerSize,24);set(hhh(2),LineWidth,2) hold off print depsc pz_sp2 jpdf(pz_sp2) figure(1);clf set(gcf,DefaultLineLineWidth,2) set(gcf,DefaultlineMarkerSize,10) rlocus([1],conv([1 0],[1 3 2])) print depsc rl_pi1 figure(2); set(gcf,DefaultLineLineWidth,2) set(gcf,DefaultlineMarkerSize,12) rlocus([1 3],conv([1 0],[1 3 2])) print depsc rl_pi2 figure(2); set(gcf,DefaultLineLineWidth,2) set(gcf,DefaultlineMarkerSize,12) rlocus([1 0],conv([1 2],[1 1])) print depsc rl_d1 %Example: G(s)=1/2^2 %Design Gc(s) to put the clp poles at 1 + 2j z=roots([20 49 10]);z=max(z),k=25/(52*z),alpha=5*z/(52*z), num=1;den=[1 0 0]; knum=k*[1 z];kden=[1 10*z]; rlocus(conv(num,knum),conv(den,kden)); hold;plot(alpha+eps*j,d);plot([1+2*j,12*j],d);hold off r=rlocus(conv(num,knum),conv(den,kden),1) print depsc rl_pp
Fall 2004
67
68 69 70 71 72
73 74 75 76 77 78 79 80 81
82 83 84 85 86 87
88 89 90 91 92 93 94 95 96 97 98 99 100
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118
119 120 121 122 123 124 125 126 127 128
16.333 828
jpdf(rl_pi1)
jpdf(rl_pi2)
jpdf(rl_d1)
jpdf(rl_pp)
load b747 Asp Bsp
G=tf(ss(Asp,Bsp,[0 1],0))*tf(1,[1 0]);
H=tf(4,[1 4]);
rlocus(G*H)
axis([3 3 3 3]*1.5)
title(SP Autopilot with \theta FB: k_\theta
> 0,FontSize,16) print depsc sp_ap1
jpdf(sp_ap1)
rlocus(G*H)
axis([3 3 3 3]*1.5)
title(SP Autopilot with \theta FB: k_\theta
< 0,FontSize,16) print depsc sp_ap2
jpdf(sp_ap2)
load b747 Asp Bsp
G=tf(ss(Asp,Bsp,[0 1],0));
H=tf(4,[1 4]);
rlocus(G*H)
rr=rlocus(G*H,1)
hold on
plot(rr+sqrt(1)*eps,d,MarkerFaceColor,b)
hold off
axis([3 1 3 3]*1.5)
title(SP Autopilot with q FB: k_q < 0,FontSize,16)
print depsc sp_ap3
jpdf(sp_ap3)
load b747 Asp Bsp
zeta=1;
k_th=1;
PD=tf([zeta 1],1);
G=tf(ss(Asp,Bsp,[0 1],0))*tf(1,[1 0]);
H=tf(4,[1 4]);
rlocus(G*H*PD)
rr=rlocus(G*H*PD,k_th)
hold on
plot(rr+sqrt(1)*eps,d,MarkerFaceColor,b)
plot(1.8+2.4*sqrt(1),s,MarkerFaceColor,r)
plot(1.82.4*sqrt(1),s,MarkerFaceColor,r)
hold off
axis([3 0 3 3]*1.5)
title(SP PD Autopilot with \zeta=1 FB: k_\theta
< 0,FontSize,16) print depsc sp_pd1
jpdf(sp_pd1)
figure(2);
set(gcf,DefaultLineLineWidth,2)
set(gcf,DefaultlineMarkerSize,12)
G_cl=G*H*(k_th)/(1+G*H*PD*(k_th));
step(G_cl,35)
h=get(gcf,children);hh=get(h(1),children);set(hh(1),LineWidth,2) title(\theta step response to \theta_c) ylabel(\theta(t) rads) print depsc tstep jpdf(tstep)
Fall 2004
16.333 829
% 16.333 Fall 2004 % SP design meeting the performance goals a bit better % load b747 Asp Bsp G=tf(ss(Asp,Bsp,[0 1],0))*tf(1,[1 0]); H=tf(4,[1 4]); zeta=1.95; k_th=1; PD=tf([zeta 1],1); rlocus(G*H*PD) rr=rlocus(G*H*PD,k_th) hold on plot(rr+sqrt(1)*eps,d,MarkerFaceColor,b)
plot(1.8+2.4*sqrt(1),s,MarkerFaceColor,r)
plot(1.82.4*sqrt(1),s,MarkerFaceColor,r)
hold off
axis([3 0 3 3]*1.5)
title([SP PD Autopilot with \zeta=,num2str(zeta),
FB: k_\theta < 0],FontSize,16) print depsc sp_pd2
jpdf(sp_pd2)
figure(2);
set(gcf,DefaultLineLineWidth,2)
set(gcf,DefaultlineMarkerSize,12)
G_cl=G*H*(k_th)/(1+G*H*PD*(k_th));
step(G_cl,35)
h=get(gcf,children);hh=get(h(1),children);set(hh(1),LineWidth,2) title(\theta step response to \theta_c) ylabel(\theta(t) rads) print depsc tstep2 jpdf(tstep2) load b747 A B Gf=tf(ss(A,B(:,1),[0 0 0 1],0)); H=tf(4,[1 4]); zeta=1.95; k_th=1; PD=tf([zeta 1],1); rlocus(Gf*H*PD) rrf=rlocus(Gf*H*PD,k_th) hold on plot(rrf+sqrt(1)*eps,s,MarkerFaceColor,b) plot(rr+sqrt(1)*eps,rd,MarkerFaceColor,r) hold off axis([3 0 3 3]*1.5) title([SP PD Autopilot with \zeta=,num2str(zeta), print depsc sp_f1 jpdf(sp_f1)
Fall 2004
16.333 830
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
clear all prt=1; % % B747 longitudinal dynamics % 16.333 Fall 2004 % % B747 at Mach 0.8, 40,000ft, levelflight % From Etkin and Reid % % metric Xu=1.982e3;Xw=4.025e3; Zu=2.595e4;Zw=9.030e4;Zq=4.524e5;Zwd=1.909e3; Mu=1.593e4;Mw=1.563e5;Mq=1.521e7;Mwd=1.702e4; g=9.81;theta0=0;S=511;cbar=8.324; U0=235.9;Iyy=.449e8;m=2.83176e6/g;cbar=8.324;rho=0.3045; Xdp=.3*m*g;Zdp=0;Mdp=0; Xde=3.818e6*(1/2*rho*U0^2*S);Zde=0.3648*(1/2*rho*U0^2*S); Mde=1.444*(1/2*rho*U0^2*S*cbar);; A=[Xu/m Xw/m 0 g*cos(theta0);[Zu Zw Zq+m*U0 m*g*sin(theta0)]/(mZwd); [Mu+Zu*Mwd/(mZwd) Mw+Zw*Mwd/(mZwd) Mq+(Zq+m*U0)*Mwd/(mZwd) ... m*g*sin(theta0)*Mwd/(mZwd)]/Iyy; [ 0 0 1 0]]; B=[Xde/m Xdp/m;Zde/(mZwd) Zdp/(mZwd);(Mde+Zde*Mwd/(mZwd))/Iyy ... (Mdp+Zdp*Mwd/(mZwd))/Iyy;0 0]; % Shortperiod Approx Asp=[Zw/m U0; [Mw+Zw*Mwd/m Mq+U0*Mwd]/Iyy]; Bsp=[Zde/m;(Mde+Zde/m*Mwd)/Iyy]; [nsp,dsp]=ss2tf(Asp,Bsp,eye(2),zeros(2,1)); [Vsp,evsp]=eig(Asp);evsp=diag(evsp); %rifd(evsp) % % CONTROL % % actuator dynamics are a lag at 4 actn=4;actd=[1 4]; % H(s) in notes % % use the short period model since that is all we are trying to control % [nsp,dsp]=ss2tf(Asp,Bsp,eye(2),zeros(2,1)); [nfull,dfull]=ss2tf(A,B(:,1),eye(4),zeros(4,1)); % % form num and den for the "plant" = act_dyn*G == N/D % % short period model N=conv(actn,nsp(2,:));% q is second state D=conv(actd,dsp); % full model Nqfull=conv(actn,nfull(3,:));% q is third state Ntfull=conv(actn,nfull(4,:));% theta is fourth state Dfull=conv(actd,dfull); % % add an extra pole to get the integrator for the \dot theta = q % Ntheta=conv(N,1);Dtheta=conv(D,[1 0]); figure(1);clf; K_th0=1; rlocus(sign(K_th0)*Ntheta,Dtheta); r_th0=rlocus(Ntheta,Dtheta,K_th0);hold on;plot(r_th0+eps*sqrt(1),v); hold off sgrid(.6,3); % gives target damping and freqs
Fall 2004
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138
16.333 831
axis([5 .5 4 4]);grid title(Closedloop poles using only theta FB) if prt print depsc ac_th0 end figure(2);clf; K_q=1; rlocus(sign(K_q)*N,D); r_q=rlocus(N,D,K_q);hold on;plot(r_q+eps*sqrt(1),v); hold off sgrid(.6,3); axis([5 .5 4 4]);grid title(Closedloop poles using q FB) if prt print depsc ac_q end % %closedloop dynamics with q FB in place (inner loop) % GH/(1+k_q GH) = (N/D) / (1+k_q N/D) = N/(D+k_q N) % Nq=N;Dq=K_q*[0 N]+D; % % add integrator for q ==> theta % K_th=1; % figure(3);clf; rlocus(sign(K_q)*Nq,conv(Dq,[1 0]));grid r_th=rlocus(Nq,conv(Dq,[1 0]),K_th);hold on; plot(r_q+eps*sqrt(1),v);plot(r_th+eps*sqrt(1),^); hold off sgrid(.6,3); axis([5 .5 4 4]);grid title(Closedloop poles also using theta FB) if prt print depsc ac_th end % % as a final check, form the closedloop dynamics % using the original short period model Ncl=Ntheta*K_th; Dcl=Dtheta+conv([0 N],[K_q K_th]); roots(Dcl) % SPcl=tf(Ncl,Dcl); [y,t]=step(SPcl); figure(4) plot(t,y);xlabel(time);ylabel(\theta rad,FontSize,12) if prt print depsc ac_th_step end % % as a final check, form the closedloop dynamics % using the full dynamics from del_e to theta Nfcl=Ntfull*K_th; Dfcl=Dfull+conv(Ntfull,[K_q K_th]); roots(Dfcl) figure(3) hold on;plot(roots(Dfcl)+eps*sqrt(1),r*);hold off axis([3 .5 2 2]);grid title(Closedloop poles with q and th FB on FULL model) if prt print depsc ac_full end %return % % add theta state to the short period approx model %
Fall 2004
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170
16.333 832
Ksp=place(Asp,Bsp,[roots([1 2*.6*3 3^2])]) Asp2=[Asp [0 0];0 1 0];Bsp2=[Bsp;0]; Ksp2=place(Asp2,Bsp2,[roots([1 2*.6*3 3^2]),.25]) % % add actuator model to SP with theta % Plist=[roots([1 2*.6*3 3^2]),.25,3]; At2=[Asp2 Bsp2(:,1);zeros(1,3) 4];Bt2=[zeros(3,1);4]; Kt2=place(At2,Bt2,[Plist]) step(ss(At2Bt2*Kt2,Bt2,[0 0 1 0],0),35) hh=get(gcf,children);hhh=get(hh(1),children) set(hhh(1),MarkerSize,24);set(hhh(1),LineWidth,2) ylabel(\theta rads,FontSize,12) print depsc fsfb_step.eps jpdf(fsfb_step) % ev=eig(A); % dampe short period, but leave the phugoid where it is Plist=[roots([1 2*.6*3 3^2]) ev([3 4],1)]; K1=place(A,B(:,1),Plist) % % add actuator model % At=[A B(:,1);zeros(1,4) 4];Bt=[zeros(4,1);4]; Kt=place(At,Bt,[Plist 3]) save b747 A B Asp Bsp %!eps2pdf /f="ac7_fig1.eps" %!mv c:\ac7_fig1.pdf ./ac7_fig1.pdf