PRÁCTICA 4 (2017)Apunte Inglés
Vista previa del texto
UNIVERSITAT POLITÈCNICA DE CATALUNYA
Matlab Tutorial #5: Auto-pilot:
Altitude hold mode
Control & Guidance
June 11, 2017
Matlab Tutorial #5
2 Simple Pitch Control System
2.1 System’s Performance Study . . . . . . . . . . . . . . . . . . . . .
2.2 System’s Performance Enhancement . . . . . . . . . . . . . . . . .
2.3 Corroborated analysis using Simulink Simulation . . . . . . . . .
5 5 6 7 3 Inner Loop Correction for Pitch Control System 8 4 Altitude Hold Control System 11 5 Conclusions 16 6 Annex 17 List of Figures 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 Block Diagram of the altitude hold mode . . . . . . . . . . . . . .
Elevator Servo and Aircraft Dynamics System Root Locus. . . . .
Simple Pitch Control System with Additional Lead Controller. . .
Simulink Block Diagram of the simple pitch controller. . . . . . .
Comparison between the Step response on Simulink and on Matlab for θref = 1°. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
New Block Diagram on Simulink. . . . . . . . . . . . . . . . . . .
Step Response of the Inner Loop Correction for Pitch Control System for Kva =1 (left) and Kva =10 (right) with a step entry of θref = 1°. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Step Response of the Inner Loop Correction for Pitch Control System for Kva =20 with a step entry of θref = 1°. . . . . . . . . .
Inner Loop and Total Control System Root Locus for Kva =1. . .
Total Control System Root Locus for Kva =10 (left) and Kva =20 (right). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Altitude Hold Control Block Diagram on Simulink. . . . . . . . .
Step responses for P=1, Kva =1, Kh =1 . . . . . . . . . . . . . . .
Step responses for P=1, D=1, Kva =1, Kh =1 . . . . . . . . . . . .
Step responses for P=1, D=7, Kva =1, Kh =2 (left) and for P=1, D=7, Kva =1, Kh =1 (right) . . . . . . . . . . . . . . . . . . . . .
Step responses for P=1, D=7, Kva =20, Kh =1 . . . . . . . . . . .
Step responses for P=1, D=13, Kva =20, Kh =1 (left) and for P=1, D=15, Kva =30, Kh =1 (left) . . . . . . . . . . . . . . . . . . . . .
1 3 5 6 7 7 8 8 9 9 10 11 12 13 13 14 15 LIST OF TABLES Matlab Tutorial #5 List of Tables 1 2 Comparative table of Kc values for different Kva and for different types of systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Overview table of the treated values . . . . . . . . . . . . . . . . . 16 2 Introduction 1 Matlab Tutorial #5 Introduction This hands-on activity is intended to study the altitude hold mode of a jet’s autopilot cruising at 600ft/s at 40000ft. This altitude hold mode can be represented by the following block diagram.
Figure 1: Block Diagram of the altitude hold mode The main target is to identify the appropriate values of Kva , Kh and set the adequate PD Controller, as seen in the block diagram above, in order to get a height response for a reference of 200 ft with no error, no overshoot and settling time of about a minute.
To reach this aim, firstly a simple pitch angle system is going to be analysed. This system can be modelled by a transfer function between the elevator displacement δe and the pitch angle θ (1) and a transfer function modelling the servo (2). That is: −1.39(s + 0.306) θ(s) = (1) δe (s) s(s2 + 0.805s + 1.325) δe (s) −10 = eδe (s) s + 10 (2) Subsequently, an inner loop correction for pitch control system is going to be applied by changing the first of the previous equations by its derivative called Aircraft Dynamic 1 which is a relation between the elevator displacement δe and the pitch rate θ˙ expressed as: ˙ θ(s) −1.39(s + 0.306) = 2 δe (s) s + 0.805s + 1.325 (3) As a consequence of deriving the pitch angle transfer function, an integrator must be added in the outer loop. The servo is maintained in the inner loop placed before the Aircraft Dynamic 1. Giving different values to Kva and keeping a unit gain in the outer loop, this system is going to be analysed.
Finally, by adding a lead controller previously to the inner loop and by exchanging the previous integrator of the outer loop by a second transfer function, the altitude hold control system is going to be evaluated. This second transfer func3 Introduction Matlab Tutorial #5 tion is the one between the pitch rate θ˙ and the altitude h which is associated to the Aircraft Dynamic 2 modelled below: h(s) −0.135(s − 4.89)(s + 4.89) = ˙ s2 (s + 0.306) θ(s) (4) Thus, the final system will be assessed by giving different values to Kva and different values to the PID situated in the feedback of the outer loop.
All angles and angular rates are in degrees and in degrees per second respectively while the altitude in feet.
4 Simple Pitch Control System 2 2.1 Matlab Tutorial #5 Simple Pitch Control System System’s Performance Study As explained before, as a first approach of the altitude hold mode, a simple pitch control system composed by the plant (1) and the elevator servo (2) will be implement so to study its behaviour. Besides, we are asked to find out how to improve stability of the whole system.
Therefore, the first step is depicting the Root Locus corresponding to the aforementioned transfer functions (1) and (2) and getting the step response for θref = 1°.
Figure 2: Elevator Servo and Aircraft Dynamics System Root Locus.
As we can see in the root locus of the Figure 2, the stable zone is really scarce and almost non-existing. The current value of the critical gain is approximately Kc = 4.48. The complex poles located close to the origin makes the complete system unstable as their branches emerge from them and grow to the right plane.
Thus, it is adequate to use a controller so to shift the root locus branches to the left plane increasing hence the stability of the system and the critical gain value.
Concerning the step response, we can affirm that the response is undesirable (nevertheless not infinite) because an awful lot of oscillations are present, however, the precision is good as, after 30 seconds which is the settling time, it tends to 1 without appreciable oscillations meaning there is no error when determining the final value of the step. Consequently it can be said that the system needs to be improved as we are far from the initial requirements expected for the altitude hold mode system.
5 2.2 System’s Performance Enhancement 2.2 Matlab Tutorial #5 System’s Performance Enhancement As it has been prior mentioned, if we want to increase the range of gain values in which the system is stable, we have to design a controller able to shift the branches of the root locus to the lest plane that is designing a lead controller.
Figure 3: Simple Pitch Control System with Additional Lead Controller.
Paying attention to the previous figure, now the current value of the critical gain is approximately Kc = 65.3 being almost 15 times the previous one. This gain value corresponds to the pink points indicating the intersection between the imaginary axis and the branches of the complex poles going to the right plane.
Besides, this gain value has the corespondent step response shown at right with a lot of decreasing oscillations that will become into increasing oscillations if crossing the imaginary axis towards the right part. This fact proves that the critical gain found is correctly associated to the improved system proposed.
Moreover, by introducing a zero in the left plane, it has acted by attraction and has moved the branches of the complex poles which were going directly to the right plane a little bit to the left plane. This fact as explained before, leads to a more stable system. Concerning the added pole (as a controller can not be only conformed by a zero because that is an unfeasible system), the more it is located to the left, the more the branches of the complex poles close to the origin shift to the left side; the repulsion diminishes with the distance.
Concluding, there are innumerable lead controllers that can be implemented in that system. The closer the zeros to the origin and the further the pole from the origin too, the more stable the designed system and the greater the critical gain are.
6 2.3 Corroborated analysis using Simulink Simulation 2.3 Matlab Tutorial #5 Corroborated analysis using Simulink Simulation Finally, we are asked to use Simulink to design the same simple pitch controller and check whether the results bear a resemblance to the first section or not. Note that Pitch Angle is the plant and Servo is the first order elevator servo.
Figure 4: Simulink Block Diagram of the simple pitch controller.
Undoubtedly, the response is exactly the same than in the first section as it can be seen below. The number of oscillations is equal for both cases as well as the final value, reached for amplitude equal to 1 and the settling time, established at 30 seconds. Besides, upper and lower peaks have the same corresponding amplitude value. Therefore, we can ensure that the block diagram implementation on Simulink is the adequate leading to proceed with the design fulfilling the initial requirements.
Figure 5: Comparison between the Step response on Simulink and on Matlab for θref = 1°.
7 Inner Loop Correction for Pitch Control System 3 Matlab Tutorial #5 Inner Loop Correction for Pitch Control System As already said in the introduction, after having deeply analysed the simple pitch control system, it is time to improve its performance by adding an inner loop acting on the pitch rate. Once again, the block diagram will be implemented by means of Simulink.
Figure 6: New Block Diagram on Simulink.
Looking at the previous figure which details the components of the evaluated system, it is noticed that the plant has been modified since we want to act on the pitch rate, thus we have to derive the transfer function corresponding to the pitch angle to get the one corresponding to the pitch rate. Hence, jointly with the elevator servo, they conform the inner loop system. However, this change on the initial plant needs to be compensated by the addition of an integrator in the outer loop after the output of the inner one.
In order to evaluate this system, different values of Kva are given for which the step responses of θref = 1° adopt different shapes. As it can be observed in the next figures, 3 valuesnhave been chosen which are Kva =1, Kva =10 and Kva =20.
Figure 7: Step Response of the Inner Loop Correction for Pitch Control System for Kva =1 (left) and Kva =10 (right) with a step entry of θref = 1°.
8 Inner Loop Correction for Pitch Control System Matlab Tutorial #5 Figure 8: Step Response of the Inner Loop Correction for Pitch Control System for Kva =20 with a step entry of θref = 1°.
As we can see in the figures above, the bigger the value of Kva , the smoother and slower the response being less aggressive and abrupt. For Kva =1, there is little oscillations at the beginning while for Kva =10 and Kva =20 they have completely disappeared. The previous facts allow us to say that for controlling this system if it were implemented into an aircraft, great values of Kva , as 10 or 20 would be selected as the response is progressive leading to a slow change on the pitch hardly noticeable by the passengers. Hence, we have to take heed of the value we select to avoid too slow responses.
In addition, it seems appropriate to get the root locus for both the inner loop (elevator servo and pitch rate transfer functions) and the total control system (with additional integrator) to assess the overall behaviour in closed loop. So, this is what is done below.
Figure 9: Inner Loop and Total Control System Root Locus for Kva =1.
9 Inner Loop Correction for Pitch Control System Matlab Tutorial #5 As seen in Figure 9, the inner loop is stable for every single value of Kva whereas the total control system is not as the branches of the complex poles go to the right plane of the Root Locus. Despite that, it is essential to take notice of the improvement of stability in comparison to the simple control system since Kcnew = 15.9 (i.e Kc has approximately improved by a factor of 4).
Now, to finally assess the behaviour of the studied system, let’s determine the corresponding critical K for the previous selected values of Kva .
Figure 10: Total Control System Root Locus for Kva =10 (left) and Kva =20 (right).
Taking a look to the figures above, it can be notice that if we keep on improving the value of Kva , the value of Kc increases linearly. If Kva1 and Kva2 are to different gains and Kva1 <Kva2 , the increase of the Kc2 can be expressed as Kva2 /Kva1 times the value of the Kc1 .The other parameters are shown within the yellow boxes in the figures.
The next table summarises the aforementioned tendency of the critical gain value.
Inner Loop Gain Kva Simple Controller None Enhanced Controller 1 Enhanced Controller 10 Enhanced Controller 20 Types of systems Inner Loop Critical Gain Kc 4.4 15.9 114 221 Table 1: Comparative table of Kc values for different Kva and for different types of systems 10 Altitude Hold Control System 4 Matlab Tutorial #5 Altitude Hold Control System Finally, the altitude hold control mode of an autopilot will be implemented in order to control an altitude climb of 200 ft. The obtained response must fulfil the following requirements: • No steady state error.
• No overshoot.
• Settling time ≈ 60 seconds.
Moreover, this system can be modelled by the following characteristic Block Diagram. Starting from the left, the first element is the step set to 200 ft of amplitude (as required) corresponding to the input of the outer loop. This outer loop has a gain Kh and a simple lead controller after which there is the same inner loop as the previous case with the feedback gain Kva . Replacing the the simple integrator of the previous section, at the output of this inner loop, there is a second transfer function called Dynamic 2 associated directly to the behaviour of the altitude hold mode. Finally, the outer loop feedback is implemented by a PID controller. By placing a scope at the output of the system, it is possible to see its behaviour graphically.
Figure 11: Altitude Hold Control Block Diagram on Simulink.
Therefore, through this Block Diagram, tuning the values of Kh , Kva and of the PID Controller, the system will be analysed and thus the desired response obtained.
First, considering that we have Kva =1, Kh =1 and a simple unit proportional gain in the feedback of the outer loop instead of a complete PID Controller, the corresponding output is the next one.
11 Altitude Hold Control System Matlab Tutorial #5 Figure 12: Step responses for P=1, Kva =1, Kh =1 Looking to the previous figure, we can see that the response oscillates more and more going to infinity. Therefore, something has to be done to stabilise this system as with a simple gain it is not enough. Let’s adjust the PID Controller.
One can think about adding an integrator in the PID Controller; however this means making the system more precised introducing more oscillations and thus making the system closer to the instability. Nevertheless, the system is already unstable and what we are looking for is not precision but a stable system without oscillations. Consequently, no integrator will be considered.
Furthermore, one can also think about adding a derivative. Although a derivative makes the system less accurate, it introduces stability to the system. So, from now, we are going to work with a PD Controller to get the desired response.
That is (where N=100 by default), PD = P + D N 1 + N 1s (5) However, even when the PD is deployed for P=1 and D=1, the response is far from the one required as seen in the right figure below. There are too much oscillations and the settling time is 50 seconds being thus, before the desired one. Nevertheless, now the system is stable meaning that we are right track.
12 Altitude Hold Control System Matlab Tutorial #5 Figure 13: Step responses for P=1, D=1, Kva =1, Kh =1 Once we have decided that we have to deploy a PD controller, we can proceed to asses the influence of Kh and shift the position of the derivative. All of a sudden, when the value of Kh is set to 2, the response goes to infinity no matter the PD controller. This may take place due to the fact that the loop keeps summing greater and greater values of altitude triggering a divergence to infinity. Therefore, it seems adequate not to change the value of Kh but to shift the derivative. Indeed, when the derivative is D=7, the response almost fits the imposed requirements having a final value of 200 ft in amplitude but the response is not as smoother as we would like yet. In other words, there are still some unwanted small oscillations and the settling time is get for a too early time.
Figure 14: Step responses for P=1, D=7, Kva =1, Kh =2 (left) and for P=1, D=7, Kva =1, Kh =1 (right) 13 Altitude Hold Control System Matlab Tutorial #5 In view of the previous results, maintaining the derivative in the same place, we have increased Kva from 1 to 20 to see its influence. As it can be noticed in the next figure, by rising the value of Kva compared to the case when its value was unitary, the oscillations have increased but the settling time seems to be reached later (at 60 seconds approximately) hence fulfilling one of the requirements. Consequently, the value of Kva has an important role and must be considered in order to get the desired response.
Figure 15: Step responses for P=1, D=7, Kva =20, Kh =1 Once noticed the importance of Kva and D, it is time to tune them to get the expected response. Subsequently, we have placed the derivative further (i.e.
D=15) maintaining the previous value of Kva (i.e. Kva =20) which has removed those light oscillations at the beginning when D=7. Moreover, it can be seen that the settling time is reached for 60 seconds approximately and the final value is the expected one. This allows us to say that this specific system fulfils perfectly the initial requirement and consequently gives the desired response.
If we increase the value of Kva and D to 30 and 15 respectively, the settling time is reached after 60 seconds breaching the requirement concerning this characteristic.
This fact reaffirms that the previously found response is one of the possible solutions to this design.
14 Altitude Hold Control System Matlab Tutorial #5 Figure 16: Step responses for P=1, D=13, Kva =20, Kh =1 (left) and for P=1, D=15, Kva =30, Kh =1 (left) 15 Conclusions 5 Matlab Tutorial #5 Conclusions Therefore, the selected values are the following: Kva = 20 Kh = 1 Derivative = 13 P roportional = 1 After having built and analysed the Altitude Hold Mode System, we would like to point out some relevant aspects.
On the one hand, only considering the effect of Kva , the larger the Kva value, the higher the number of oscillations and their corresponding value are and the later the settling time of the response is reached having hence a slower and less precise response.
On the other hand, only considering the effect of the derivative of the PID Controller (with proportional unit gain), the larger the D value is, the less oscillations the system have and the earlier the system reaches the settling time having thus, a response relatively more abrupt.
Considering both effects at the same time, selecting correct values of Kva and D, the derivative is capable of eliminating the oscillations triggered by the Kva and the Kva can extend the settling time having then a smooth and natural response which can be perfectly linked to the pitch behaviour of an aircraft.
The following table summarises all the studied cases.
Kva Kd P 1 1 1 1 20 20 30 1 1 1 2 1 1 1 1 1 1 1 1 1 1 Settling Time 0 0 Increasingly None 1 0 Big overshoot 60 s 7 0 Small undershoot None 7 0 Increasingly 50 s 7 0 Little overshoot 60 s 13 0 None 60 s 15 0 None 70 s D I Oscillations Stability Table 2: Overview table of the treated values 16 Unstable Stable Unstable Stable Stable Stable Stable Annex 6 Matlab Tutorial #5 Annex Main code of the practice 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 %% PART 1.a Servo=tf([−10], [1 10]); Num=−1.39*[1 0.306]; Den=[1 0.805 1.325 0]; G_elevator=tf(Num,Den); Num_2=−0.135*[1 0 4.89^2]; Den_2=[1 0.306 0 0]; G_pitchrate=tf(Num_2,Den_2); figure rlocus(G_elevator*Servo); title('Root Locus of the Simple pitch control system'); %% PART 1.b G_elev_feed=feedback(G_elevator*Servo,1); step(G_elev_feed); title('Step response of the pitch angle \theta'); % %% PART 1.c sisotool(G_elevator*Servo); %% PART 1.d SIMULINK %% PART 2.b G_elevator_deriv=tf(−1.39*[1 0.306],[1 0.805 1.325]); figure rlocus(G_elevator_deriv*Servo); title('Root Locus of the Inner Loop') A=feedback(G_elevator_deriv*Servo,1); integrador=tf(1,[1,0]); figure rlocus(integrador*A); title('Root Locus of the Total Pitch Control System'); % sisotool(G_elevator_deriv*Servo); %% PART 2.c G_elevator_deriv=tf(−1.39*[1 0.306],[1 0.805 1.325]); figure rlocus(G_elevator_deriv*Servo); title('Root Locus of the Inner Loop') A=feedback(G_elevator_deriv*Servo,20); integrador=tf(1,[1,0]); figure 17 Annex Matlab Tutorial #5 43 rlocus(integrador*A); 44 title('Root Locus of the Total Pitch Control System for K=20'); 45 46 %% PART 3 SIMULINK 18 ...