🛩️ Aircraft System Identification Toolbox
" A MATLAB-Based Tool for Stability Derivatives Estimation "
" A MATLAB-Based Tool for Stability Derivatives Estimation "
This project delves into the fascinating field of system identification, specifically applying it to estimate crucial aerodynamic parameters for an aircraft. Imagine an engineer needing to understand how a new airplane design will behave in flight, or how an existing aircraft's components affect its stability and control. Instead of relying solely on complex theoretical models, system identification uses actual flight data (or simulated data, as in our case) to build and refine mathematical models of the aircraft's dynamics.
The core objective of this project is to present a robust and generalizable methodology, implemented in MATLAB code, for identifying all stability derivatives of any airplane using flight test data. These coefficients describe how forces and moments acting on an aircraft change with respect to its motion, such as changes in angle of attack or pitch rate. Accurate stability derivatives are fundamental for designing flight control systems, flight simulators, and predicting aircraft performance.
This project demonstrates a robust methodology, which utilizes the capabilities of the Aircraft System Identification Toolbox (ASIT), developed in-house, to extract these derivatives from dynamic response data. While the methodology is broadly applicable to various aircraft and all their modes (longitudinal, lateral-directional) using both time and frequency domain analyses, we utilize "The Golf airplane" as a specific verification case to validate the code's capability for identifying stability derivatives.
The core of our approach involves several key stages: data generation and pre-processing, spectral analysis, and optimization.
1. Data Generation: Creating Realistic 'Flight Test' Data
To ensure our identification process is consistent and can be rigorously tested, we first generate simulated flight test data for "The Golf airplane." This means we create an artificial set of "measurements" that perfectly represent the aircraft's known, or "true," aerodynamic characteristics.
Instead of using simple, fixed-frequency inputs, we employ a sophisticated logarithmic frequency sweep for the elevator deflection (the aircraft's primary pitching control). This type of input signal is vital because it systematically excites all relevant frequencies within the aircraft's dynamic range. This comprehensive excitation is crucial for ensuring that the collected data contains enough information to accurately estimate all the stability derivatives. The simulated data for angle of attack and pitch rate is then generated by passing this elevator input through a high-fidelity mathematical model of the aircraft's true dynamics. This guarantees that the "measured" outputs are perfectly consistent with the underlying "true" stability derivatives we aim to recover.
Figure 1: Detrending
2. Data Pre-processing: Preparing for Analysis
Real-world flight data is often messy, contaminated with noise and biases. Even our simulated data benefits from careful preparation. We apply two main pre-processing steps:
Detrending: This process removes any constant offsets (bias) or linear trends from the data. For example, if the aircraft has a slight nose-up attitude or a slow, steady change in pitch over time, detrending removes these artifacts to focus purely on the dynamic response caused by the control input. We do this by analyzing a "dead zone" period at the beginning of the flight where no specific maneuvers are performed, and then subtracting the average values from this period. The effect of detrending on the elevator input can be seen in Figure 1.
Filtering: A Butterworth low-pass filter is applied to the data. This helps remove high-frequency noise that might obscure the true aircraft dynamics or cause issues during spectral analysis. The filter's cutoff frequency is carefully chosen to retain the important low and mid-frequency dynamics of the aircraft, while rejecting unwanted high-frequency components.
3. Spectral Analysis: Unveiling Frequency-Domain Relationships
A cornerstone of modern system identification is analyzing data in the frequency domain. This allows us to understand how the aircraft responds to different frequencies of control inputs.
Chirp Z-Transform (CZT): Instead of a standard Fast Fourier Transform (FFT), we use the Chirp Z-Transform (CZT). CZT is particularly powerful because it allows us to precisely focus on specific frequency ranges, providing higher resolution in areas of interest without needing excessively long data records. This is critical for accurately capturing the characteristics of specific aircraft modes, like the short period. The frequency content of the angle of attack and pitch rate outputs after the CZT is shown in Figure 2.
Frequency Response Function (FRF): From the processed input and output data in the frequency domain, we compute the aircraft's frequency response function (FRF). The FRF describes how the amplitude and phase of an aircraft's output (e.g., angle of attack or pitch rate) change in response to a given input (e.g., elevator deflection) at various frequencies. It's effectively the aircraft's "frequency fingerprint."
Coherence Function: The coherence function is a vital diagnostic tool. It quantifies the linear relationship between the input and output signals at each frequency. A coherence value close to 1 indicates a strong, linear relationship, meaning the output is primarily caused by the input at that frequency. Values closer to 0 suggest noise or non-linear effects dominating the response. Figure 3 displays the coherence function, and our script includes a warning if coherence is low, indicating that the identification results at those frequencies might be unreliable.
Multi-Windowing (Welch's Method): To improve the accuracy and reduce the variance of our spectral estimates, especially in the presence of noise, we employ multi-windowing with 50% overlapping Hanning windows. This technique, similar to Welch's method, divides the data into multiple overlapping segments, applies a Hanning window (to reduce spectral leakage), and then averages the power spectral densities of these segments. This averaging process smooths out noise and provides more statistically reliable FRF and coherence estimates.
4. Optimization: Identifying the Stability Derivatives
With the frequency response function computed from our "measured" data, the next step is to find the set of stability derivatives that make a mathematical model of the aircraft best match this measured response. This is an optimization problem: we want to minimize the "error" between the model's predicted frequency response and the actual measured frequency response.
Objective Function: We define an objective function that quantifies this error. It calculates the sum of the squared differences between the predicted and measured frequency responses (both magnitude and phase components) across the entire frequency range.
fminunc Optimizer: We use MATLAB's fminunc function, which is a local optimizer. This algorithm starts with an initial guess for the stability derivatives and iteratively adjusts them in directions that reduce the objective function value (i.e., reduce the error). It continues this process until it finds a "local minimum," a point where no small change in the derivatives will further reduce the error.
Parameter Scaling: To help the optimizer converge more effectively, we apply scaling to the stability derivatives. This ensures that all parameters, regardless of their original magnitude, contribute relatively equally to the optimization process, preventing one large derivative from dominating the error calculation.
After running the identification process using "The Golf airplane" as a verification case with the logarithmic frequency sweep input and the fminunc optimizer, we observed the following results for this specific demonstration:
Our results showed:
Pitching Moment Derivatives (Mα, MQ, Mδe): For this verification case, these derivatives were identified with remarkably high accuracy, with percentage errors typically below 1% (see figure 4). This excellent fit indicates the methodology's strong capability in capturing dynamics related to pitching motion. The close match between the measured and estimated frequency responses for these outputs is clearly visible in Figure 5, both in terms of magnitude and phase.
Z-Force Derivatives (Zα, Zδe): In this specific "Golf airplane" verification, these derivatives exhibited higher percentage errors (e.g., in the range of 30-40%). This outcome highlights that while the overall methodology is designed to identify all derivatives, the accuracy of less sensitive parameters can depend on the excitation quality and the specific flight condition. For this particular verification test, the logarithmic pitch sweep primarily excites the pitching dynamics, making pitching moment derivatives more readily identifiable. For flight tests aimed at accurately identifying Z-force derivatives, specific input signals (e.g., doublet maneuvers or multi-axis inputs) designed to excite those particular force dynamics more strongly would typically be employed.
The objective function value, which represents the overall fit quality for this verification, dropped dramatically from previous values in the hundreds to just above 2. This is a strong indicator of a much better match between our identified model and the simulated "measured" data for the parameters predominantly excited. The time-domain fit, comparing the measured, detrended, and estimated responses for angle of attack and pitch rate, is presented in Figure 6, further illustrating the model's accuracy for this verification.
The estimated short period modes (natural frequency ωSP and damping ratio ζSP) also showed values consistent with typical aircraft longitudinal dynamics, further validating the identified model in this verification scenario.
Figure 4: Matlab Workspace Output
Note: Short Period characteristics are sensitive to pitching moment derivatives, but less sensitive to Z-force derivatives. So, the Z-force derivatives (Z_Alpha, Z_Delta) may not be identified with as good accuracy as pitching moment derivatives (M_Alpha, M_Q, M_Delta).
The ASIT, as developed in-house, is a comprehensive tool designed to address a wide range of system identification challenges for aircraft. Its capabilities extend beyond this specific verification case:
Tailored Input Design for All Derivatives: ASIT incorporates advanced techniques for designing optimal input signals that comprehensively excite all aircraft dynamics. This ensures robust identification of all stability derivatives, including those that are less sensitive or require specific excitation to be accurately determined.
Global Optimization Algorithms: The toolbox integrates various optimization algorithms, including global optimizers (such as Genetic Algorithms), which are particularly effective at avoiding local minima and finding the most accurate parameters in complex, highly coupled systems across various aircraft types.
Noise Robustness and Data Handling: ASIT is built with robust filtering, windowing, and statistical techniques to handle real-world flight test data that is inherently noisy and subject to various measurement uncertainties. This ensures reliable identification even from imperfect data.
Real-World Flight Data Integration: The primary application of ASIT is to process and analyze actual flight test data from diverse aircraft, providing a powerful tool for practical aerospace engineering applications, from flight control system design to aerodynamic model validation.
This project provides a solid foundation for understanding and applying advanced system identification techniques in aerospace engineering, demonstrating how mathematical tools, particularly those within the ASIT, can reveal crucial insights into complex physical systems.