At the centre of PAC’s development was its use for real-time observation and assess- ment. This was seen as the primary advantage of the novel method, where it could be used not only as an analysis tool, but also to provide a system for the integration of real time detection and alleviation systems.
In order for this to be completed, equations defined within this chapter were used to create a real-time control system, using MATLAB SIMULINK. When used previously in this Chapter, during the development, observation of results were performed using MATLAB analysis scripts. However, these scripts were not programmed to allow for real-time analysis, as they were used only to post-process results from simulation. For real-time observation, SIMULINK is preferred, as it is widely used for the modelling of real-time applications, such as aerospace control systems. Within SIMULINK, it is also possible to create embedded MATLAB code, which can be used in real-time simulation. However, for this work, the equations were translated to the type of logic most commonly used in SIMULINK.
The ‘PAC block’, shown in Fig. 4.37, is intended for simple implementation into aircraft control systems. The complete system inside the ‘PAC block’ is shown in Fig. 4.38. The inputs to the system are results from the real-time information. The require- ment is only for the input of system time, pilot control (cyclic deflection), and vehicle output (vehicle rate in relevant axis). All inputs are fed directly into the Phase subsys- tem, whereas there is no direct requirement for the vehicle rate within the Aggression subsystem. Calculations are performed within subsystems and then output from the model to the MATLAB workspace. Results can also be imported back into the vehicle model, to provide alleviation or PIO warning.
Figure 4.37: PAC system block
Figure 4.39 displays logic within the Phase calculation block. The system consists of a number of logical elements, used to detect control and vehicle oscillations, and calculate the difference in phase between input and output of the system. Firstly, the ‘Peak Calculation’ blocks search for points for which maximum and minimum control or input displacement is found. These observe the sign of the derivative for the current time step and the previous time step. If the two signs are different, it shows that either a maximum or minimum has been found. Observing the signs of the two differentials allows one to determine whether it is a maximum (peak) or a minimum (trough). One system is used to calculate peaks in the pilot control input, whilst the other calculates peaks in the vehicle rate. For implementation with a higher resolution, it is also possible to incorporate the trough results, to provide double the amount of phase updates. If a peak is determined, it returns a digital value of unity. This is multiplied by the time of observation, to display the time of each peak.
Figure 4.38: Inside real-time PAC system
This results in spikes of data, with the return of zero when a peak is not detected. Particularly for alleviation measures, it is advantageous to hold the last value, to show the last time for which a peak was detected. This is achieved through the use of the ‘Hold Function’ blocks. The contents of this block are shown in Fig. 4.40. The block searches for zeros in the peak calculation output. If one is found, the previous peak is added to the current value (zero), returning a held value.
In Fig. 4.39, the peak calculation of the output (vehicle rate) is subtracted from the input (pilot input). In a normal operational situation, the pilot input will lead the vehicle output, by a margin defined by the vehicle dynamics, system delays, etc. Therefore, a positive result should be returned. Only results greater than zero are desired for further analysis, which is found through the use of a logic block followed by the hold function. This result is a difference in time between the vehicle input and output, which can be used to calculate the phase delay when the period of oscillation (frequency) is known. This is determined through determining the time difference be- tween peaks calculated from the pilot control input. Division of the phase difference by the period provides the phase distortion, which is output from the ‘Phase Calculation’ block. The result is also differentiated to determine the change in phase distortion. This is to observe when a new phase value is calculated, to allow for calculation of Aggression.
Calculation ofAGis performed using similar logic as used for the phase calculations.
As defined in PAC equations, AG calculations are returned following each new phase
cycle. Therefore, the differential of phase distortion is fed into theAG block to trigger
Figure 4.39: Phase subsystem.
Figure 4.40: Hold function subsystem.
Cumulative results are stored until the next phase calculation is performed. At this point, AG is divided by time. This results in the same amount of AG calculations as
phase calculations. The result is scaled using Hs, and output to the simulation model
alongside Phase distortion.
The SIMULINK blocks have been designed to allow them to be used as ‘plug-in’ elements, separate from the main vehicle model. If the user wants only to observe results ‘up-stream’, and provide no physical alleviation, the SIMULINK system can be easily added with just one simple connection. Furthermore, if the system is to be used for alleviation or warning, the outputs can be fed directly back to the simulation model.
Due to the observation of peaks only, the real-time code implemented has lower resolution than previously used code. To provide a robust measure for PAC in real- time simulation, the decision was to use only the peaks. The use of ‘troughs’ too would
require further modifications to the SIMULINK model, including a more complex peak detection logic. This is recommended for any future work completed using PAC for real-time analysis.