(此文档为word格式,下载后您可任意编辑修改!)一、对最简单的角位移系统的评价1、某低速飞机本身具有较好的短周期阻尼,采用这种简单的控制规律是可行的。
它的传递函数为:open p3_6系统根轨迹为:nem1=-12.5;den1=[1 12.5];sys1=tf(nem1,den1);nem2=[-1 -3.1];den2=[1 2.8 3.24 0];sys2=tf(nem2,den2);sys=series(sys1,sys2);rlocus(sys)随着k的增大,该系统的一对闭环复极点的震荡阻尼逐渐减小。
但由于飞机本身的阻尼较大,所以当k增大致1.34时,系统的震荡阻尼比仍有0.6。
k增大到6.2时系统才开始不稳定。
2、现代高速飞机的短周期运动自然阻尼不足,若仍采用上述单回路控制系统则不能胜任自动控制飞机的要求。
open p3_10系统根轨迹为:nem1=-10;den1=[1 10];sys1=tf(nem1,den1);nem2=[-4.3 -4.3*0.33];den2=[1 0.61 3.3 0];sys2=tf(nem2,den2);sys=series(sys1,sys2);rlocus(sys)随着k增大,系统阻尼迅速下降。
当k=1.06时,处于临界稳定。
所以无法选择合适的k值以满足系统动静态性能。
为了使系统在选取较大的k值基础上仍有良好的动态阻尼,引入俯仰角速度反馈。
二、具有俯仰角速率反馈的角位移自动驾驶仪参数设计open p3_161、系统内回路根轨迹为:nem1=-10;den1=[1 10];sys1=tf(nem1,den1);nem2=[-4.3 -4.3*0.33];den2=[1 0.61 3.3];sys2=tf(nem2,den2);sys=series(sys1,sys2);rlocus(sys)按物理概念似乎速率陀螺的作用越强,阻尼效果越显著。
但根轨迹分析告诉我们,只有在一定范围内这种概念才是正确的,否则会得到相反的效果。
这种现象是由舵回路的惯性造成的。
舵回路具有不同时间常数时的内回路根轨迹图:Tδ=0sys1=-1;nem2=[-4.3 -4.3*0.33];den2=[1 0.61 3.3];sys2=tf(nem2,den2);sys=series(sys1,sys2);rlocus(sys)Tδ=0.1nem1=-10;den1=[1 10];sys1=tf(nem1,den1);nem2=[-4.3 -4.3*0.33];den2=[1 0.61 3.3];sys2=tf(nem2,den2);sys=series(sys1,sys2);rlocus(sys)Tδ=0.25nem1=-4;den1=[1 4];sys1=tf(nem1,den1);nem2=[-4.3 -4.3*0.33];den2=[1 0.61 3.3];sys2=tf(nem2,den2);sys=series(sys1,sys2);rlocus(sys)结论:1)、为了确保角稳定回路的性能,不能单纯地增加速率陀螺信号强度,必须同时设法减小舵回路的惯性,使舵回路具有足够宽的通频带。
2)、一般舵回路时间常数限制在0.03~0.1秒内,接近飞机自然频率的5倍。
这就是舵回路频带一般比飞行器的频带宽3至5倍的理由。
2、角稳定回路的设计系统角稳定回路根轨迹为:nem1=-10;den1=[1 10];sys1=tf(nem1,den1);nem2=[-4.3 -4.3*0.33];den2=[1 0.61 3.3];sys2=tf(nem2,den2);sys=series(sys1,sys2);sys=feedback(sys,0);sys3=tf([1],[1 0]);figurerlocus(sys)hold onnem1=-10;den1=[1 10];sys1=tf(nem1,den1); nem2=[-4.3 -4.3*0.33]; den2=[1 0.61 3.3];sys2=tf(nem2,den2); sys=series(sys1,sys2); sys=feedback(sys,0.4); sys3=tf([1],[1 0]); sys=series(sys,sys3); rlocus(sys)hold onnem1=-10;den1=[1 10];sys1=tf(nem1,den1); nem2=[-4.3 -4.3*0.33]; den2=[1 0.61 3.3];sys2=tf(nem2,den2); sys=series(sys1,sys2); sys=feedback(sys,0.7); sys3=tf([1],[1 0]); sys=series(sys,sys3); rlocus(sys)hold onnem1=-10;den1=[1 10];sys1=tf(nem1,den1); nem2=[-4.3 -4.3*0.33]; den2=[1 0.61 3.3];sys2=tf(nem2,den2); sys=series(sys1,sys2);sys3=tf([1],[1 0]);sys=series(sys,sys3); rlocus(sys)hold onnem1=-10;den1=[1 10];sys1=tf(nem1,den1);nem2=[-4.3 -4.3*0.33];den2=[1 0.61 3.3];sys2=tf(nem2,den2);sys=series(sys1,sys2);sys=feedback(sys,1.56); sys3=tf([1],[1 0]);sys=series(sys,sys3); rlocus(sys)系统选不同的与值时的阶跃响应图:nem1=-10;den1=[1 10];sys1=tf(nem1,den1);nem2=[-4.3 -4.3*0.33];den2=[1 0.61 3.3];sys2=tf(nem2,den2);sys=series(sys1,sys2);sys=feedback(sys,0);sys3=tf([1],[1 0]);sys4=tf([1.06]);sys=series(sys,sys3);sys=series(sys,sys4);sys13=feedback(sys,1);nem1=-10;den1=[1 10];sys1=tf(nem1,den1); nem2=[-4.3 -4.3*0.33]; den2=[1 0.61 3.3];sys2=tf(nem2,den2); sys=series(sys1,sys2); sys=feedback(sys,0.4); sys3=tf([1],[1 0]); sys4=tf([0.14]);sys=series(sys,sys3); sys=series(sys,sys4); sys14=feedback(sys,1); nem1=-10;den1=[1 10];sys1=tf(nem1,den1); nem2=[-4.3 -4.3*0.33]; den2=[1 0.61 3.3];sys2=tf(nem2,den2); sys=series(sys1,sys2); sys=feedback(sys,0.7); sys3=tf([1],[1 0]); sys4=tf([1.08]);sys=series(sys,sys3); sys=series(sys,sys4); sys12=feedback(sys,1); nem1=-10;den1=[1 10];sys1=tf(nem1,den1); nem2=[-4.3 -4.3*0.33]; den2=[1 0.61 3.3];sys2=tf(nem2,den2); sys=series(sys1,sys2); sys=feedback(sys,1.3); sys3=tf([1],[1 0]);sys4=tf([1.9]);sys=series(sys,sys3);sys=series(sys,sys4);sys11=feedback(sys,1);step(sys11,sys12,sys13,sys14);3、自动驾驶仪参数与飞机特性的关系:用根轨迹法选择参数时,若要求一定的振荡阻尼比,参数与之间有这样的规律:当所选择的较大时,才能得到较大的值,它们之间的比值存在一定的规律:当参数与选得比较合理时,比值ωAP=/总是落在飞机短周期运动自然频率ωd的附近。
三、Control Design Using Simulink®This demonstration illustrates how to use the Control System Toolbox™and Simulink® Control Design™ to interact with Simulink to design a digital pitch control for the U.S. Navy's F-14 Tomcat aircraft. In this example, we will design the controller to permit the aircraft to operate at a high angle of attack with minimal pilot workload.Our example takes you through the first pass at designing a digital autopilot for a high angle of attack controller. To run everything in this demo you must have the Control System Toolbox, Simulink Control Design, Simulink, and Real-Time Workshop®. If you don't have all of these products, you can still run portions of the demo using cell execution mode of the MATLAB® editor.Below is a Simulink model of the F-14. The control systems in the Controllers block can be switched in the model to allow you to see the analog response and then to switch to a design created using the Control System Toolbox's Linear Time Invariant (LTI) objects. A controller is also included that is a discrete implementation of the analog design that is similar to the algorithm that would go into anon-board flight computer. Take a few moments to explore the model.Open the f14_digital modelf14dat_digital;f14_digitalsim('f14_digital');Figure 1: Simulink model of the F-14 flight control system.Trim and LinearizationThe model can be linearized in the Control and Estimation Tools Manager launched from f14autopilot Simulink model. In the Tools menu, select Control Design > Linear Analysis.When the Control and Estimation Tools Manager opens, select an operating point and click the Linearize Model button. An LTI Viewer can be created showing a step plot of the linearization. To browse around the LTI Viewer, right click on the graph window to see your options.For help type help slcontrol or help ltiview or look at the Control System Toolbox and Simulink Control Design product documentation.Open the f14autopilot modelapmdl = 'f14autopilot';open_system(apmdl)op = operpoint(apmdl);io = getlinio(apmdl);contap = linearize(apmdl,op,io)a =Alpha-sensor Pitch Rate L Proportional Stick Prefil Alpha-sensor -2.526 0 0 0 Pitch Rate L 0 -4.144 0 0 Proportional -1.71 0.9567 0 10 Stick Prefil 0 0 0 -10b =Stick (pt. 1 Alpha Sensed q Sensed (ptAlpha-sensor 0 1 0Pitch Rate L 0 0 1Proportional 0 0 -0.8156Stick Prefil 1 0 0c =Alpha-sensor Pitch Rate L Proportional Stick Prefil Sum (pt. 1) 2.986 -1.67 -3.864 -17.46d =Stick (pt. 1 Alpha Sensed q Sensed (ptSum (pt. 1) 0 0 1.424Continuous-time model.Figure 2: Original analog autopilot.Linear Time-Invariant (LTI) SystemsThere are three types of LTI objects you can use to develop a linear model:State Space (SS), Transfer Function (TF), and Zero-Pole-Gain (ZPG) objects.The variable contap is a State Space object. You can then get one of the other types with the other commands. When you create the object in MATLAB, you can manipulate it using operations such as *, +, -, etc. This is called "overloading" the MATLAB operators. Try creating an object of your own and see what happens when adding, multiplying, etc. with the contap object.To see exactly what is stored in the LTI object, type get(contap) or contap.InputName for example.contap = tf(contap);contap = zpk(contap)Zero/pole/gain from input "Stick (pt. 1)" to output "Sum (pt. 1)":-17.46 (s+2.213)s (s+10)Zero/pole/gain from input "Alpha Sensed (pt. 1)" to output "Sum (pt.1)":2.9857 (s+2.213)s (s+2.526)Zero/pole/gain from input "q Sensed (pt. 1)" to output "Sum (pt. 1)": 1.424 (s+2.971) (s+2.213)s (s+4.144)Discretized Controller Using Zero-Order HoldNow the LTI object will be used to design the digital autopilot that will replace the analog autopilot. The analog system is coded into the LTI object called contap (CONtinuous AutoPilot).The first attempt at creating a digital autopilot will use a zero-order hold with a sample time of 0.1 seconds. Note that the discrete object maintains the type (ss, tf, or zpk).It is clear from Bode plot below that the systems do not match in phase from 3 rad/sec to the half sample frequency (the vertical black line) for the pilot stick input and the angle of attack sensor. This design has poorer response than the analog system. Go to the Simulink model and start the simulation (make sure you can see the scope windows). While the simulation is running, double-click the manual switch labeled Analog or Digital.Does the simulation verify the conclusion reached by interpreting the Bode diagram?discap = c2d(contap, 0.1, 'zoh');get(discap)bode(contap,discap)z: {1x3 cell}p: {1x3 cell}k: [-1.25 0.294 1.42]ioDelay: [0 0 0]DisplayFormat: 'roots'Variable: 'z'Ts: 0.1InputDelay: [3x1 double]OutputDelay: 0InputName: {3x1 cell}OutputName: {'Sum (pt. 1)'}InputGroup: [1x1 struct]OutputGroup: [1x1 struct]Name: ''Notes: {}UserData: []Figure 3: Bode diagram comparing analog and ZOH controllers.Tustin (Bilinear) DiscretizationNow try different conversion techniques. You can use the Tustin transformation. In the command window type the commands above.It should be clear that the systems still do not match in phase from 3 rad/sec to the half sample frequency, the Tustin transformation does better. The simulation uses the LTI object as it is designed. To see how the object is used look in the Controllers subsystem by using the browser or by double clicking the icon. The LTI block picks up an LTIobject from the workspace. You can change the object name used in the block to any LTI object in the workspace. Try using "discap1", the Tustin discretization of the analog design:discap1 = c2d(contap,0.1,'tustin');bode(contap,discap,discap1)Figure 4: Bode diagram comparing analog and 0.1 sec Tustin controllers. Selecting a Sample TimeThe Tustin transform performs better than the zero-order hold from the analysis so far. The sample time of 0.1 second appears to be too slowfor the discrete system to track the performance of the analog systemat half the sample frequency.Now transform the analog design using the Tustin transform with a 0.05 second sample period.discap = c2d(contap,0.05,'tustin')bode(contap,discap)Zero/pole/gain from input "Stick (pt. 1)" to output "Sum (pt. 1)":-0.36852 (z-0.8951) (z+1)(z-1) (z-0.6)Zero/pole/gain from input "Alpha Sensed (pt. 1)" to output "Sum (pt. 1)":0.074094 (z-0.8951) (z+1)(z-1) (z-0.8812)Zero/pole/gain from input "q Sensed (pt. 1)" to output "Sum (pt. 1)":1.4629 (z-0.8617) (z-0.8951)(z-1) (z-0.8123)Sampling time: 0.05Figure 5: Bode diagram comparing analog and 0.05 sec Tustin controllers.Real-World ConsiderationsNow that we have what appears to be a workable design, we need to implement it in a form that will include some of the necessary elements that were ignored in the linear analysis. For example, if you look atthe analog autopilot that is in the Controllers subsystem, you will see some logic that stops the integrator from winding up when the actuator saturates:Open the AnalogControl subsystemopen_system('f14_digital/Controllers/AnalogControl');Figure 6: AnalogControl subsystem.Implementation of the Full DesignThe integrator wind-up is only one of the practical issues that needs to be addressed. Another is the need to eliminate aliased high frequency signals that could enter at measurement points. These aliased signals can be prevented by specifying analog filters in front of the sample and hold (ZOH) blocks that model the analog-to-digital converter (ADC) devices typically used for measuring signals in an embedded application. Additionally, the filters in the digital section of the autopilot operate at a higher sampling rate than the compensator to provide a conditioned signal to the compensator. The analog filters are necessary because once a signal is aliased, there is no way to separate the valid in-band frequency content from aliased content.This new controller is called Digital Control. The filters have a sample time of deltat1 (set to be 1/10 of deltat). The zero-order hold blocks specify these sample times for various downstream blocks through sample time inheritance.The switches in the f14_digital model are set up so you can switch between the analog autopilot, the digital LTI object, and the digital autopilot that could be implemented using software.Try simulating the system again and switch among the three autopliot designs. You should see that the designs are not significantly affected by which autopilot is active. You can also increase the amplitude ofthe wind gust and verify that the anti-aliasing filters are working satisfactorily. To increase the gust amplitude, open the Dryden Wind Gust subsystem and change (by double clicking the icon) the noise variance of the White Noise that drives the gust simulation.Open the DigitalControl subsystem:open_system('f14_digital/Controllers/DigitalControl');Figure 7: DigitalControl subsystem.Configurable Subsystems for Design VariantsThe actuators in the Simulink model use a feature of Simulink called Configurable Subsystems to access a library of actuators. This library was opened by the command shown in the window above.To make the simulation change, use the nonlinear actuator instead ofthe linear one, double click the actuator block in the f14_digtal model, and follow the instructions.Note that Simulink must be stopped in order to reconfigure the actuator selection. You should also note that the nonlinear actuator has saturations on position and rate.Open the f14actuator model:f14actuatorFigure 8: The f14actuator model.Code GenerationThe autopilot design can be transformed into embeddable code usingReal-Time Workshop. A separate model of the digital autopilot, f14_dap, is open below; it was coded into a host-based standalone program using Real-Time Workshop and the compiler specified using the mex -setup configuration. The simulation results can be used as a validation baseline for the functional correctness of the generated code.The executable file resulting from code generation and compilation isf14_dap.exe. If you create it, it can be run from the OS shell (DOS) command line directly or from MATLAB by typing:>> !f14_dap.exeThe executable program creates a file called f14_dap.mat that you can load by typing load f14_dap.Two variables called rt_tout and rt_yout will be in the workspace and their variance against the simulation baseline can be plotted. Notethat the variance is effectively zero for this model on this host. Some small numeric variance is to be expected in more complex calculations due to differing compiler optimizations and use of intermediateregister variables having higher precision than the 64-bit storage format of a double. Significant variances should be examined as theycould indicate a numerical stability problem in your model's algorithms, a compiler or run-time library bug, or other problems.Open the f14_dap model:f14_dapload f14_dapsim('f14_dap')f1 = figure;subplot(211); plot(tout,yout,'r-',rt_tout,rt_yout,'b-'); gridtitle('Comparison of simulation and code generation results')yvar = rt_yout - yout;subplot(212); plot(tout,yvar); gridtitle('Variance of code generation results vs. simulation baseline')Figure 9: Comparison of simulation and code generation results. Behavior of the First Pass DesignHere is the time response of the high angle of attack mode digital pitch controller design:close(f1)f2 = figure;plot(tout,yout); gridtitle('Response of the F-14 Digital Pitch Control Design')Figure 10: Response of the F-14 Digital Pitch Control Design.SummaryFurther work on this design might include incorporating and analyzing more of the real-world effects on the compensator such as the effect of the anti-aliasing filter dynamics and computational delay of the embedded digital computer on the overall "plant" seen by the digital computations. The combination of the real plant, the computational delay, the anti-aliasing filters, and the sample-and-hold delay arejust a few of the additional items that might affect the design of the digital compensator parameters.bdclose('f14_digital')bdclose('f14autopilot')bdclose('f14actuator')bdclose('f14_dap')。