MATLAB SIMULATIONS FOR GARNELL's ROLL AUTOPILOT
MATLAB SIMULATIONS FOR GARNELL's ROLL AUTOPILOT
MATLAB SIMULATIONS FOR GARNELL's ROLL AUTOPILOT
Introduction
1. An autopilot is a closed loop system and it is a minor loop inside the main guidance
loop; not all missile systems require an autopilot. In a roll stabilised missile, the function of
the roll autopilot is to maintain the roll position constant or zero so that roll rate is zero. This
simplifies the design of pitch and yaw autopilot.
(a) The roll position demand (φ d), in the case of Twist and Steer
control, is compared with the actual roll position (φ ), sensed by the
roll gyro.
(b) The error is amplified and fed to the servos, which in turn
move the ailerons.
(c) The movement of the ailerons, results in the change in the roll
orientation of the missile airframe.
(e) The controlling action (feed back) continues till the demanded
roll orientation is achieved.
function.
.
p − l p p = lξ ξ ;
LaplaceTranform ⇒ p( s) s − lp = lξ ξ ( s)
p( s) l −l / l
= ξ = ξ p
ξ ( s ) s − l p Ta s + 1
. p( s ) sφ ( s ) −lξ / l p
Since.φ = p ⇒ sφ ( s) = p( s) ⇒ = =
ξ ( s) ξ ( s) Ta s + 1
φ (s) −lξ / l p
=
ξ ( s ) s (Ta s + 1)
ξ ( s) K sωns 2
= 2
ξc ( s ) s + 2µs ωns s + ωns 2
ξ ( s) Ks
=
ξc ( s) s
2
2µ
+ s s +1
ωns 2
ωns
5. Dynamics of Roll Gyro. The roll gyro also will take some time to
come to its steady state value after some change has been applied.
However the time constant of roll gyro is quite small when compared to
the time constant of the rest of the open loop system; hence it can be
assumed that the roll gyro comes to steady state in no time at all and
gives an output amplified by the steady state gain Kg.
-1/ Lp
φ (s) s(1 + Ta s )
=
L( s)
1/ L p Lξ Kg Ks
1+
s2
s (1 + T s
a µ
ω 2 + 2 ω s + 1
s
ns ns
8. In order to design the roll loop one must know the maximum anticipated induced
rolling moment and the desired roll position accuracy.
1 13,500
− Lξ
2 37.3
−lP
3 0.0257
−1 − A
Ta = =
lp LP
4 362
lξ Lξ
=
lp Lp
(a) The aerodynamicist estimates that the largest rolling moments will occur at M=2.8
due to unequal incidence in pitch and yaw and will have a maximum value of 1000 Nm.
(b) If the maximum missile roll angle permissible is 1/20 rad then
the stiffness of the loop must be not less than 1000 x 20 = 20,000
Nm/rad.
(d) The block diagram above shows the roll position control loop with demanded
roll position equal to zero.
(e) The actual servo steady state gain – ks has to be negative in order to ensure a
negative feedback system. Since the steady state roll angle φOSS for a constant
disturbing torque L is given by
ϕOSS 0.05 1
= =
L 1000 − kg ks Lξ
(f) If kg is set at unity then ks must be 1.48. The open loop gain is now fixed at
=535.
1.48 Lξ / L p
Lξ K g K s / Lp
GH = ; Substituting.values
s(1 + Ta s)
535
GH =
s(1 + 0.026s )
(g) The corresponding frequency response function will be
535
GH =
( jω )(1 + j 0.026ω )
(i) The gain of the system will be given by the modulus of this
transfer function GH i.e.,
535
GH =
ω (1 + 0.026ω 2 )
535
GH = = 1 ⇒ ω gc 2 (38.52 + (ωgc )2 ) = (535 / 0.026)2
ω gc (1 + (0.026ωgc ) )2
(iii) The phase margin is calculated from the phase angle at the
gain cross-over frequency i.e.,
Numr
φ= = Numr −( Denr1 + Denr 2)
Denr1 Denr 2
φ = 0o − ( 90o + tan −1 (0.026*143)) = −( 90 o + 75 o) = −165 o
10. If the dynamics of the servo are included and we are given the
values of ωns = 180 rad/sec and μs = 0.5, the loop transfer function will be
suitably modified. Considering the phase margin at gain cross-over
frequency alone since the gain cross-over frequency will not be altered
much, the phase of the transfer function at gain cross-over frequency is
calculated as: -
Numr
φ= = Numr − ( Denr1 + Denr 2 + Denr 3)
Denr1 Denr 2 Denr 3
−1 2 µ s / ωns
φ = 0 − ( 90 + tan (0.026*143) + tan
o o −1
ω2
1 −
ωns2
2(0.5) /180
φ = 0o − ( 90o + tan −1 (0.026*143) + tan−1 ( ))
1432
1−
1802
1
φ = 0o − ( 90o + 75o + tan −1 ( ))
0.4*180
φ = −230o
Thus it is seen that by ignoring the servo dynamics, PM was +15 and when servo
dynamics was included, the PM has gone negative and that too, by a large value, -50.
Hence in a practical system, the servo dynamics is going to make the closed loop
system unstable when included.
For the example being considered let us introduce a lag compensator with
the transfer function
(b)But the gain cross over frequency has reduced to 32.6 rad/sec
thus reducing the bandwidth of the system.
11. A lead compensator can be added further to push the phase margin
to a higher value. Hence let us now introduce a lead compensator with the
transfer function
Tc s + 1
; where.α = 0.07; Tc = 0.026
α Tc s + 1
0.026 s + 1 0.026 s + 1
⇒ =
(0.07 *0.026) s + 1 0.00182 s + 1
(b) The gain margin is 11.2 db at 147 rad/sec i.e., gain cross over
frequency also has improved as also the bandwidth.
12. The Bode plots of the above step-by-step procedure of building the
roll autopilot were obtained by using MATLAB. The plots are as shown in
the graphs below: -
FIG (a) UNMODELLED DYNAMICS OF ROLL AUTOPILOT
13. The time response plots for the various stages of design of roll
autopilot are as shown below:-
(a) The first diagram shows the time response of the roll autopilot when
unmodeled dynamics of actuator and gyro are not considered. Though the
system is underdamped it meets the transient response and steady state
error requirements.
(b) The second diagram shows the time response when the second
actuator dynamics are included. It shows that the system becomes
unstable.
(c) The third diagram shows the time response when a lead-lag
compensator is included to compensated for the second order unmodeled
actuator dynamics. The desired transient response characteristics are met
with satisfactory settling time though the overshoot has become nearly
25.
num1=[0.05 1];
den1=[0.75 1];
num2=[0.0257 1];
den2=[0.0018 1];
num3=[0 0 535]
den3=[0.026 1 0];
sys=tf(num3,den3);
subplot(2,2,1)
margin(sys)
% [Gm,pm,wcp,wcg]=margin(sys);
% GmdB=20*log10(Gm);
omegans=180.0;
mus=0.5;
num4=[1.48];
[num5,den5]=series(num3,den3,num4,den4);
sys1=tf(num5,den5);
subplot(2,2,3)
margin(sys1)
% [Gm,pm,wcp,wcg]=margin(sys1);
% GmdB=20*log10(Gm);
[num6,den6]=series(num5,den5,num1,den1);
% [num6,den6]=parallel(num5,den5,num1,den1);
sys2=tf(num6,den6);
subplot(2,2,2)
margin(sys2)
% [Gm,pm,wcp,wcg]=margin(sys2);
% GmdB=20*log10(Gm);
%[num7,den7]=feedback(num6,den6,num2,den2);
[num7,den7]=series(num6,den6,num2,den2);
% [num7,den7]=parallel(num6,den6,num2,den2);
sys3=tf(num7,den7);
subplot(2,2,4)
margin(sys3)
[Gm,pm,wcp,wcg]=margin(sys3);
%GmdB=20*log10(Gm);
15. The MATLAB program for time response plots is as shown below:-
%--------------------------------------------------------------------------
%--------------------------------------------------------------------------
global num1 den1 num2 den2 num3 den3 num4 den4 omegans mus ks kg Cn1 C1 C2
den3=[0.026 1];
sys=tf(num3,den3);
omegans=180.0;
mus=0.5;kg=1.0;ks=1.48;Cn1=kg*ks*omegans^2
num4=[Cn1];C1=omegans^2;
C2=2*mus*omegans;
den4=[1 C2 C1];
num1=[0.05 1];
den1=[0.75 1];
num2=[0.0257 1];
den2=[0.0018 1];
sim('rollapoct09');
subplot(2,2,1)
plot(t,yo)
subplot(2,2,2)
plot(t,yo1)
subplot(2,2,3)
plot(t,yo2)
subplot(2,2,4);%figure
plot(t,yo,'r',t,yo2,'b');