APPLICATION OF ANALYTICAL REDUNDANCY OF MEASUREMENTS TO INCREASE THE RELIABILITY OF AIRCRAFT ATTITUDE CONTROL

. This article presents basic methodology and some algorithms for estimating attitude and heading angles of an unmanned or optionally piloted aircraft in the event of a partial failure of the on-board measurement systems. The aim of the research is to develop effective estimation algorithms of non-measurable aircraft state variables. Correlation between quantities describing kinematics of the aircraft’s movement in space were used. Properties of the estimation algorithms are illustrated by exemplary calculations using real data recorded during test flights of the optionally controlled MP-02A Cza-jka airplane. Quality of the estimated signals allows to continue flight in case of a non-catastrophic failure of the measurement systems. Developed algorithms are used in control systems designed at the Department of Avionics and Control of the Rzeszów University of Technology, dedicated to unmanned and optionally controlled light aircraft.


Introduction
Measurements of parameters (state variables) describing current state of the aircraft are essential for automatic as well as for manual control of the aircraft.Achieving the assumed operational reliability of on-board measurement systems is required, especially for flights without ground visibility and for unmanned or optionally controlled aircraft.Pitch, roll and yaw (heading or track angle) are basic quantities necessary to stabilize an aircraft attitude in space.A typical way to meet required operational reliability is hardware redundancy.The multiplication of the measurement sub-systems leads to an increase in weight and production costs of the aircraft.Analytical redundancy is an alternative way to increase equipment reliability.It consists in analytical determination of nonmeasurable flight parameters (e.g., due to malfunction of some sensors) on the basis of the available, independent signals.Usually, it is possible to obtain less accurate information, but sufficient to verify proper functioning of active measurement systems and sufficient to control the aircraft in degraded conditions.This paper presents the main features of the non-measurable state variables estimation module of the aircraft (fixed-wing aircraft).Ex-ample calculations are related to the optionally controlled light aircraft MP-02A Czajka.The quality of estimated flight parameter values is illustrated by the comparison of flight parameters recorded in MP-02A Czajka test flight and the estimated values of these parameters calculated for the simulated failure of subsequent measuring sensors.The experiment allows us to evaluate the usability of the analytical redundancy mechanism for determining parameters describing attitude and heading angles (roll, pitch and yaw) and navigational quantities (airspeed, altitude and geographic coordinates) which are described in a separate paper (Dołęga et al., 2017).

On-board measurement systems
Automated control of an aircraft's attitude on a given trajectory requires measurement of many variables.Typical set of modern on-board measurement systems consists of at least: Attitude and Heading Reference System (AHRS), Air Data Computer (ADC) and Global Positioning System (GPS) receiver.Depending on the aircraft type and its intended use, the required level of measurement reliability may vary.Usually, a single measuring system does not have required reliability, hence the standard solution is to multiplicate measuring systems.Figure 1 illustrates block diagrams of typical measurement system redundancy solutions.
Most often, measurement systems of transport category aircraft incorporate three measurement modules (sub-systems), whose output signals are compared in a supervising module (Figure 1, version A).Simplest decision-making algorithms selects module generating correct signals by voting or rejecting extreme values.Use of three measurement sub-systems means higher cost and higher weight of the measurement units, therefore it is more beneficial to use two hardware measurement modules and one module that calculates state variables on the basis of other available independent measurements (version B).The third module implements the principle of analytical redundancy.Estimated state variables values allow to assess the proper operation of the hardware modules and to select the correctly functioning one in case of inconsistency of their output signals.In the simplest solution (version C) the proper functioning of the only hardware module is evaluated by comparing it with the estimated signal value.In some cases, it is possible to replace the signal of the faulty measuring sensor (e.g., if the self-test shows fault) by the estimated value of the variable.
Analytical redundancy is an area of interest for many teams designing light aircraft control systems.Heller et al. (2003) estimate the angle of attack and angle of sideslip using navigation data, Schettini et al. (2016) use the Kalman filter to estimate the angles of attack and sideslip.Neural networks are a frequently used estimation method (Brandl et al., 2019;Dhayalan et al., 2018).Battipede et al. (2002) use the neuro-fuzzy calibration method, and Oosterom and Babuska (2006) proposed three estimation methods: linear time-varying model, nonlinear Takagi-Sugeno fuzzy model and a neural network compensator.Myschik and Sachs (2006) present the possibility of estimating the wind velocity and direction.Suarez et al. (2018) propose to use optical signals for the correction and estimation of immeasurable signals.The proposed methods require a relatively large amount of calculations, which is not always possible in UAV measurement systems and general aviation airplanes applications.
The team of the Department of Avionics and Control of the Rzeszow University of Technology was interested in this area from 2003 year.The main goal of the teams research is proposals methods, they are directed at a low-cost solution and a miniaturization of the hardware elements.The theoretical approach and hardware realization were made and many papers were published, for example: Kopecki and Tomczyk (2005), Tomczyk (2006), Kopecki et al. (2008), Kopecki et al. (2013), Dołęga et al. (2016).
All three variants of systems redundancy which increase the reliability of on-board control systems (Figure 1) are used in design of control and navigation systems of unmanned or optionally controlled aircraft.Whenever possible and reasonable, number of hardware measurement modules is reduced.This paper presents principles for estimating aircraft orientation in space in case of AHRS inefficiency or its equivalents such as artificial horizon and heading indicator failures.The Department of Avionics and Control has developed algorithms used for UAV control that estimates 14 state variables for 12 cases of measurement system failures (Dołęga et al., 2017).These algorithms were applied in small UAV experimental control system and were testing on the board of MP-02A Czajka aircraft.This paper presents part of the results of this experiments.
The basic angles of attitude and heading are defined as illustrated in Figure 2. The pitch and roll angles can be measured using a three degree of freedom gyroscope with a vertical spin axis, the yaw angle (heading) is measured using a three degree of freedom gyroscope with a horizontal spin axis.All three angles can be measured by means of a gimbal-free Attitude and Heading Reference System (AHRS), most often using Fiber Optic Gyros (FOG) or Micro-Electro-Mechanical Systems (MEMS).Nowadays, AHRS systems are widely used and angular rates in the body-fixed coordinate system (p, q, r) are directly measured and then the attitude and heading angles (Euler angles Θ, Φ, Ψ) are calculated using the transformation matrix (Equations ( 1), ( 2)) or quaternion algebra (Equations (3-5)).
All sensors of the AHRS are placed on the platform that is fixed to the aircraft.This way, the aircraft becomes a measurement platform.A computer must be used to transform the input signals to the Earth-fixed coordinate system.The measuring body-fixed (0x B y B z B ), Earth-fixed coordinate system (0x G y G z G ), respectively, and the relations between them are shown in Figure 2.
. Block diagrams of typical measurement system redundancy solutions, where: X -physical state variables, X 1 , X 2 , X 3 -measurement vectors, X E -estimated measurement vector, X P -output measurement vector (Dołęga et al., 2017) The angular rates trigonometric transformation to Euler angles can be shown as two versions of differential equations: ; (1) As we can see, we cannot calculate of dΨ/dt and dΦ/ dt if pitch angle Θ reaches ±90°.This obstacle can be overcome by using quaternion algebra for the transformations.The attitude quaternion Q is defined as the vector that contains four components: The propagation of the quaternion in time is described by the differential equations: 0 The Euler angles can be calculated as quaternion components function as follows: Detailed rules for determining spatial orientation angles are described in literature (Titterton & Weston, 1997).Relationships of angular rates and spatial orientation angles derived from transformation rules described by Equations (1-5) were used in the estimation algorithms.
Availability of measurement signals independent of hardware modules as a whole is a prerequisite for the application of analytical redundancy.Diagnostic systems of the supervising module should determine the reliability of individual signals and the type of the basic measuring systems malfunctions.On this basis, the appropriate algorithm for estimating non-measurable state variables is activated.

Analytical redundancy algorithms for attitude and heading angles
Analytical redundancy algorithms utilize different available signals, so that the same attitude and heading angles can be calculated using different formulas.The formulas used for the estimation of immeasurable signals result from the principles of flight mechanics and geometric relationships.These formulas are used in many computational algorithms for various purposes, here they were used to estimate selected flight parameters.The original formula is the airplane pitch angle estimation algorithm used in sub-chapter 2.2.If the angle of attack is not measured, its estimation is based on a simplified identification of the relationship between angle of attack, pitch angle and instrumental airspeed when pitch angle is measured correctly (before the malfunction).

Estimate of the pitch angle Θ E -measurement of the longitudinal acceleration a x
In quasi-established flight states, the pitch angle Θ can be estimated based on the gravitational acceleration component projected onto the lengthwise axis of the aircraft's system of reference a X .The estimation error may be reduced by taking into consideration a change of the true airspeed V T : g -gravitational acceleration. (6)

Estimate of the pitch angle Θ E -based on the flight path angle and the angle of attack
If signals from the system of reference and heading are not available, the value of the pitch angle may be estimated based on the calculated flight path angle g E and based on the measured or calculated angle of attack a E : The flight path angle g E is calculated based on the vertical speed (derivative of the altitude H B ) and true airspeed V T : ) and Earth-fixed coordinate system (0x G y G z G ): p, q, r -angular rates in the bodyfixed coordinate system, Θ -pitch angle, Φ -bank angle, Ψ -heading, g -acceleration of gravity The angle of attack a E can be estimated based on the approximated formula resulting from the dependency between flight path angle, the angle of attack and the instrument airspeed: ( ) The parameter B is calculated in-flight, when the pitch angle Θ is measured correctly; its value, averaged with a recursive filter, is used for estimation of the angle of attack following the AHRS system failure:

Roll angle estimate Φ E -measurement of the roll rate
The equilibrium of forces in a steady turn implies a relation between the roll angle Φ, the roll rate (r) and the ground speed V GS = GS, which permits estimation of the roll angle Φ E :

Roll angle estimate Φ E -measurement of the course
When the yaw rate cannot be measured, in order to determine the estimated roll angle Φ E one may use a derivative of the track angle: ; g -gravitational acceleration. (13)

Estimate of the roll angle Φ E -measurement of the magnetic heading Ψ M
If the yaw rate is not measured correctly and if no information from the GPS receiver is available, the approximated value of the roll angle Φ E may be calculated based on the true airspeed V T = TAS and based on the derivative of the magnetic heading Ψ M : ; g -gravitational acceleration.( 14)

The track angle KD E and ground speed GS E estimates
If GPS receiver signals are not available, the ground speed is calculated as the sum of the true airspeed TAS = V T and the average wind speed.It is most convenient to perform these calculations using TAS and wind speed components in geographic system of reference.Current estimated track angle KD E can be calculated from the following dependency: where: Ψ -heading, U EE and U NE are the East and the Nord components of wind speed which can be calculated before malfunctions of measuring equipment.
In each case when navigation angles (course, heading) are calculated, it is necessary to use a function that will standardize the angle value to the (0; 359.9) range.

Calculation of the geographic heading Ψ E based on GPS measurements
In case of a faulty magnetometer and lack of angular rates, the geographic heading can be determined using the method described in the case 2.6, using the ground speed, the track angle and wind speed components.

Examples of measurement and calculation results
The ultimate validation of prepared procedures for estimation of non-measurable state variables are flight tests.Real data recorded during test flights of optionally controlled MP-02A Czajka aircraft were used to perform the tests (Figure 3).Several models for manned and unmanned aircraft have been developed at the Department of Avionics and Control at Rzeszow University of Technology, and further versions of models are in progress.The presented study is foreseen to be used in the next version of the MP-02A Czajka autopilot software and family of unmanned aerial vehicles weighing less than 25.0 kg.The scripts of MATLAB package have been transposed to the software installed in control microcomputers.
During the test flights the output signals of the measuring systems (AHRS with magnetometer, air data computer, satellite navigation receiver) were recorded with a frequency of 10.0 Hz.Flights were conducted in a traffic pattern and in the flight zones.Recorded data were used to generate a sequence of measurements imitating the information stream occurring in real flight.At any time, it was possible to simulate the failure of the selected measurement sensor, which caused activation of the appropriate function for estimation of lost variable.Flights were taken in moderate turbulence conditions, which is evident in the form of random disturbances of the measured aircraft state variables.In particular, measurements of aerodynamic quantities (speed, altitude, vertical speed) are susceptible to the influence of atmospheric turbulence.The magnitude of external disturbances affects the accuracy of spatial orientation angle estimation, since a quasi-static flight state is assumed for most computational algorithms.The quality of the estimation can be evaluated by comparing the actual measured quantity and its estimated value.The evaluation was conducted by directly comparing the values of the variables and by calculating the mean squared estimation error.
The results of measurements in flight and the results of calculations will be presented in the form of graphs of states variables as a function of time [sec].Figures 4-9 show a comparison of the recorded values of attitude and heading angles ("Pomiar" -Measurement) and the estimated values of these angles ( "Estymata" -Estimate) calculated in real time using the formulas presented in Chapter 2. The roll angle is estimated in three ways, depending on the availability of the yaw rate and airspeed measurement.The best result was obtained for the use of satellite navigation signals (algorithm 2.4), i.e. for the measurement of the track angle and ground speed.
The pitch angle is calculated on the basis of the measurement of the horizontal component of gravitational acceleration projected on the axes of the reference system associated with the airplane (algorithm 2.1) and using the measurements performed by the air data computer (algorithm 2.2).In both cases, it is necessary to calculate of the derivative of the measured variable (true airspeed and pressure altitude), which generates errors in the estimation of the pitch angle due to errors (noise of sensors) and discretization (and quantization) of the measurements.
The course and track angle estimation algorithms use information about wind velocity and direction, calculated during the flight with properly operating measuring instruments (before malfunction).As these values change with the change of the plane's position and flight altitude, the errors in the estimation of the course and the track angle will increase with time.The similarity of Figure 8 and Figure 9 is due to the fact that for a small value of speed and constant wind direction, the values of track angle and heading angle differ slightly.
The quality of state variable estimation can be assessed by the mean square error value of the estimation.For the data recorded in the flight tests, the average error of estimation presented in Table 1 was calculated.From a practical point of view, the value of pitch, roll and heading angles errors allows for automatic stabilization of the spatial orientation of the aircraft, as well as for manual piloting of the aircraft in the absence of external visibility.However, the stabilization quality will be degraded.The value of this error can be reduced by using appropriately selected filtration of measurement data and the calculation result.The parameters of filtration will depend on the flight parameters (speed, altitude) and the state of turbulence of the atmosphere.Therefore, adaptive methods of filtering the variables should be applied, which will be the subject of further research.The paper describes only the estimation of the angles of attitude and heading as the basic signals necessary for the stabilization of the aircraft in space, and therefore determining the possibility of safe flight continuation.The full set of algorithms covers the estimation of 14 state variables, including geographic orientation, path angle, aircraft angular velocity, speed and flight altitude, etc. (Dołęga et al., 2017).The quality of the estimation varies, but is sufficient to detect a malfunctioning measurement sensor (version B in Figure 1), and in many cases the estimated signals can be used to control the aircraft during emergency conditions (Nowak et al., 2016).Simulations of the automatic control process of the MP-02A Czajka plane allow to conclude that it is possible to continue the flight safely.In necessary cases, the use of estimated state variables will be combined with reconfiguration of the control system taking into account the reduced precision of measurements.The flights without ground visibility (instrument flight) with the participation of a pilot are also planned, when only estimated indications of on-board instruments are available, for various cases of simulated damage to measuring sensors.Adaptive filtering algorithms for measured and estimated state variables are currently being analyzed and tested.The first results are promising, but the calculation methodology requires further refinement.The estimation algorithms are continuously improved by using an adaptation mechanism that takes into account the nature of external disturbances and flight conditions (speed, altitude, configuration, etc.) Modification results of computational algorithms will be presented in the next publication.The application of analytical redundancy makes it possible to achieve an acceptable level of operational reliability of measurement systems without the need for hardware expansion of the system.Analytical calculations can be performed by on-board microcomputers dedicated to existing on-board systems (e.g., digital autopilot) or by superior diagnostic systems supervising on-board instrument operation and managing reconfiguration of measuring systems.Thus, by using analytical redundancy we increase the reliability of measurement systems without significant increase in weight and cost of these systems.The proposed computational algorithms can be used in UAV control systems and on board of optionally controlled light airplanes.

Figure 2 .
Figure2.Body-fixed (0x B y B z B ) and Earth-fixed coordinate system (0x G y G z G ): p, q, r -angular rates in the bodyfixed coordinate system, Θ -pitch angle, Φ -bank angle, Ψ -heading, g -acceleration of gravity

Table 1 .
Mean square error of estimationConclusionsPrinciples of estimation of non-measurable state variables presented in this paper allow to implement analytical redundancy to calculate values of non-measurable quantities on the basis of available signals.The main assumption was to use simple methods of estimating aircraft state variables so that the computational algorithms could be used in measurement systems of small UAVs and cheap airplanes.