Global Publishing Platform
Serving Researchers Since 2012

An End-to-End Framework for Dynamics Modeling, Simulation, and Control of Small Fixed-Wing UAVs

DOI : 10.17577/IJERTV15IS040311
Download Full-Text PDF Cite this Publication

Text Only Version

An End-to-End Framework for Dynamics Modeling, Simulation, and Control of Small Fixed-Wing UAVs

Filimon Mulugeta Tsegay

Mechatronics Engineering, Ethiopian Institute of Technology-Mekelle, Mekelle University

Abstract: – The advancement of miniature sensors, actuators, and processorsenabled by Micro and Nano-Electro-Mechanical Systems (MEMS/NEMS)has driven the development of small fixed-wing unmanned aerial vehicles (UAVs). Developing robust and reliable small fixed-wing unmanned aerial vehicles (UAVs) requires a systematic design approach, which is often bypassed in favor of trial-and-error methods. This paper presents a comprehensive and accessible methodology for the dynamic modeling, simulation, and autopilot design for small fixed-wing UAVs. The study begins by developing an accurate 6-Degrees-of-Freedom (6-DOF) nonlinear dynamic model for a UAV with a 1.30-meter wingspan and a mass of 0.170 kilogram. The open-source tool XFLR5 is utilized to perform aerodynamic analysis and extract the necessary stability and control derivatives from the UAVs geometric and airfoil data (NACA 2412 and NACA 0010). This aerodynamic data is then integrated into a complete 6-DOF simulation environment built from first principles in MATLAB/Simulink using Newton-Euler equations. The nonlinear model is verified through open-loop simulations of standard flight maneuvers. Subsequently, the model is linearized at a steady cruise flight condition to facilitate control design. A cascaded PID control architecture is implemented for both longitudinal and lateral autopilots. The longitudinal autopilot uses a PI controller for the pitch rate and a P controller for the pitch angle, while the lateral autopilot uses a PI controller for the roll angle and a P controller for the yaw angle. Simulation results demonstrate that the designed autopilot achieves stable and accurate tracking of commanded attitude angles, validating the effectiveness of the proposed end-to-end design framework.

KEYWORDS: – Small fixed-wing UAVs, Dynamic Modeling, Aerodynamic Analysis, Eigenvalue analysis , PID Controller, Stability and Control Derivatives, Simulation.

  1. INTRODUCTION

    In recent decades, Unmanned Aerial Vehicles (UAVs), particularly small fixed-wing platforms, have seen a surge in applications ranging from civilian surveillance and precision agriculture to military reconnaissance [1]. Their ability to cover large areas efficiently makes them invaluable tools. However, the flight control of small fixed-wing UAVs presents significant challenges due to their complex dynamics, low mass, and susceptibility to environmental disturbances [2]. The successful and safe operation of these systems relies heavily on an accurate understanding of their dynamic behavior, which is captured through mathematical modeling.

    The primary motivation for this research stems from the observation that many local and hobbyist UAV developers often bypass the crucial stages of modeling and simulation, leading to airframes with poor performance and functionality. This paper addresses this gap by presenting a comprehensive, low-cost, and accessible framework for the dynamic modeling, simulation, and autopilot design of a small fixed-wing UAV. The objective is to demonstrate a systematic process that enhances the stability, control, and overall performance of the aircraft. By leveraging freely available software like XFLR5 and the ubiquitous MATLAB/Simulink environment, this work aims to provide a valuable reference and a practical toolset for researchers, students, and engineers in the field. This study details the entire workflow, from aerodynamic analysis and the derivation of a 6-DOF model to the design and validation of a robust PID-based autopilot system.

  2. METHODOLOGY

    The methodology follows a structured approach, beginning with the airframe modeling and aerodynamic characterization of the airframe, followed by the development of the mathematical model, and concluding with the implementation of the simulation and control system design.

    1. Airframe Modeling and Aerodynamic Characterization

      The foundation of any flight control system is a well-understood airframe. Our target UAV, with specifications in Table 1, was modeled in XFLR5, an open-source tool ideal for low Reynolds number aerodynamics [3]. We used this tool to analyze the airframe, which employs a NACA 2412 airfoil for the main wing and a NACA 0010 for the tail surfaces. The primary output of this stage is the set of aerodynamic stability and control derivatives, which quantify how forces and moments change with the aircraft's state (e.g., angle of attack, side-slip) and control inputs (e.g., elevator deflection).

      Inserting and Analyzing Airfoils

      Before creating the geometry of the SFWUAV, the wing profile, fin, and control surfaces along with their respective airfoils are loaded into the XFLR software. The physical characteristics of the vehicle, such as airfoil data, geometric measurements, and the relative positions of its components, as well as mass and weight, are used to estimate the aerodynamic, stability, and control derivatives of the SFWUAV airframe model. The aerodynamic properties of the airfoil play a major role and affect directly on the aerodynamic properties of the overall vehicle [9].

      Figure 1. NACA2412 Airfoil Cambered [Airfoil Data Base], NACA 0010 (symmetrical), Trailing Edge Flap

      Figure 2. Geometric Airframe model of a SFWUAV

      Table 1. Key specifications of the SFWUAV model

      Parameter

      Symbol

      Value

      Wing span

      b

      1.30

      Wing Planform or Wing Area

      S

      0.129 m2

      Mean root chord of airfoil

      C

      0.102

      Total Mass (kg)

      M

      0.170 kg

      Wing mass , Engine mass and Additional point mass(like avionics, etc)

      Each 50 g

      Elevator mass and Fin

      mass

      Each 10g

      Elevator Position

      X-Elevator

      0.610 m

      Fin(Rudder) Position

      X-Fin

      0.610m

      Neutral Point

      X-NP

      0.098m

      Center of Gravity

      X-CG

      0.052m

      Dihedral Angle

      10 degree

      Since X-NP > X-CG, the SFWUAV designed using XFLR5 has stable configuration since neutral point position is behind the centre of gravity position.

      1. Longitudinal Stability and Control Derivatives

        Longitudinal dynamics are governed by forces and moments in the pitch plane. The distance between Center of gravity and the aerodynamic center affects the longitudinal dynamics stability; this distance is changed due to the change of the load. The key stability derivative, Cm (change in pitching moment with angle of attack), must be negative for static stability. The derivatives were computed from XFLR5 and are listed in Table 2. Figure 3 and Figure 4 shows the primary aerodynamic coefficients. The linear slope of the lift curve (Fig. 3) and the negative slope of the pitching moment curve (Fig. 5) confirm a predictable and statically stable longitudinal design.

        Figure 3. Lift coefficients vs. Alpha () Figure 4. Drag Coefficients vs. Alpha )

        Table 2. Longitudinal Stability and Control Derivatives

        Xu= -0.024557

        Cxu= -0.030998

        Xw= 0.05531

        Cxa= 0.069819

        Zu= -0.31879

        Czu= 0.00081956

        Zw= -4.446

        CLa= 5.6123

        Zq= -0.49715

        CLq= 12.354

        Mu= -0.0005437

        Cmu= -0.0067551

        Mw= -0.20608

        Cma= -2.5604

        Mq= -0.23896

        Cmq= -58.443

        Figure 5. shows the pitching moment coefficient (Cm) versus the angle of attack (). A negative slope (Cm < 0) is a critical requirement for longitudinal static stability [4]. Our design exhibits this characteristic, ensuring that if the aircraft is perturbed (e.g., a gust pitches the nose up), it will naturally generate a moment to restore its original attitude. This inherent stability is crucial, as it means the autopilot does not have to fight an unstable airframe.

        Figure 5. Pitching moment coefficient vs. angle of attack from XFLR5

      2. Lateral Stability and Control Derivatives

        Lateral-directional dynamics involve roll and yaw motions. Static stability requires a negative rolling moment derivative (Cl, dihedral effect) and a positive yawing moment derivative (Cn, weathercock stability) [6]. The derivatives are listed in Table 3, and the coefficient plots are in Figure 6,7,8. The results (Cl = -0.177, Cn = +0.157) confirm the aircraft is also statically stable in the lateral-directional axes.

        Figure 6. Side force coefficient vs. Beta() Figure 7. Yaw moment coefficient vs. Beta()

        Figure 8. Roll moment coefficient versus Beta ()

        Table 3. Lateral Stability and Control Derivatives

        Yv= -0.37819

        CYb= -0.47739

        Yp= -0.14997

        CYp= -0.31056

        Yr= 0.20797

        CYr= 0.43065

        Lv= -0.1711

        Clb= -0.17715

        Lp= -0.36695

        Clp= -0.62325

        Lr= 0.038271

        Clr= 0.065001

        Nv= 0.15199

        Cnb= 0.15736

        Np= -0.037695

        Cnp= -0.064023

        Nr= -0.10959

        Cnr= -0.18612

    2. 6-DOF Nonlinear Model and Open-Loop Verification

      The aircraft's motion in three-dimensional space is described by a 6-Degrees-of-Freedom (6-DOF) nonlinear model. This model consists of 12 coupled differential equations derived from the Newton-Euler equations of motion [5]. These equations govern the 12 states of the aircraft: position (pn, pe, pd), velocity (u, v, w), attitude (, , ), and angular rates (p, q, r). The model was implemented in MATLAB/Simulink, creating a simulation environment where external forces (gravity, propulsion, aerodynamics) are calculated at each time step to update the vehicle's state, as shown in the architecture of Figure 9.

      Figure 9. Overall structure of the SFWUAV simulation model in Simulink

      The derived aerodynamic coefficients were integrated into a 6-DOF nonlinear simulation model in Simulink, based on the Newton-Euler equations [7]. Before designing a controller, the model's fidelity was verified through open-loop "kick tests" to ensure it responded realistically to control inputs.

      An elevator input was applied to test the longitudinal dynamics. As shown in Figure 10, a negative elevator deflection (nose-up command) correctly results in an increase in pitch angle and altitude, while the lateral states (roll, yaw, sideslip) remain unaffected. This confirms the accuracy of the longitudinal model and proper decoupling in simulation.

      Figure 10. Open-Loop Response to an Elevator Deflection "Kick"

      Next, a rudder input was applied to test the lateral-directional dynamics. Figure 5 shows that the rudder deflection correctly induces a yawing motion and a change in heading. It also produces a secondary rolling motion (adverse roll), which is a well-known aerodynamic coupling effect [6]. This test validates the fidelity of the lateral model and its cross- coupling dynamics.

      Figure 11. Open-Loop Response to a Rudder Deflection "Kick"

  3. Analysis and Discussion

    1. Linearization and Stability Analysis

      Having verified the nonlinear model, it was linearized at a steady cruise condition to analyze its inherent dynamic modes. The eigenvalues (poles) of the linearized system are plotted in Figure 12 and tabulated in Table 4.

      Discussion: Figure 12 confirms that the aircraft is dynamically stable, as all poles lie in the left-half of the s-plane. The analysis reveals the classic aircraft flight modes [5]: the slow, lightly-damped Phugoid mode (long-period oscillation in speed and altitude) and the fast, well-damped Short Period mode (pitch oscillation). Laterally, the system exhibits a stable Dutch Roll mode (coupled roll-yaw oscillation), a stable, slow Spiral mode, and a fast Roll Subsidence mode. While the system is stable, the light damping of the Phugoid and Dutch Roll modes would result in poor handling qualities. This analysis provides a clear justification for designing an autopilot to add active damping and improve the dynamic response.

      Figure 12. Open-Loop Pole-Zero Map of the Linearized Aircraft Dynamics

      Table 4. Eigenvalue Analysis and Flight Modes

      Eigen value (Poles)

      Damping

      Frequency (rad/seconds)

      Time Constant

      Mode

      -6.04e-05

      1.00

      6.04e-05

      1.65e+04

      Zero

      -0.207

      1.00

      0.207

      4.82

      Spiral Mode

      -0.111+0.63i

      0.173

      0.64

      9.02

      Phugoid

      -0.111-0.63i

      0.173

      0.64

      9.02

      Phugoid

      -4.24+9.36i

      0.413

      10.3

      0.236

      Dutch Roll

      -4.24-9.36i

      0.413

      10.3

      0.236

      Dutch Roll

      -22.8+13.6i

      0.86

      26.5

      0.0438

      Short-Period

      -22.8-13.6i

      0.86

      26.5

      0.0438

      Short-Period

      -50.9

      1

      50.9

      0.0196

      Roll Mode

      The pitch damping derivative affects the natural frequency and damping ratio of the SFWUAV longitudinal dynamic model, which in turn affects the location of the poles As shown in the Figure 13.

      Figure 13. Effect of Cmq on the pole location of longitudinal Plant

    2. Autopilot Design

      While the nonlinear model is essential for high-fidelity simulation, it is too complex for classical control design. Therefore, the model was linearized around a steady, wings-level flight condition (trim point) to obtain linear state- space models for the decoupled longitudinal and lateral dynamics [6].

      Based on these linear models, a cascaded autopilot was designed (Figure 3). This is a standard and effective architecture in aerospace control [7].

      • Longitudinal Autopilot: A PI controller on the inner-loop pitch rate (q) provides active damping, quickly quelling oscillations. A P controller on the outer-loop pitch angle () provides acurate command tracking.

      • Lateral Autopilot: An inner-loop PI controller stabilizes the roll angle (). An outer-loop P controller tracks a yaw angle () command by commanding the necessary roll angle, executing a coordinated "roll-to-turn" maneuver.

      Figure 14. Simulink structure of the combined longitudinal and lateral autopilot

  4. Results and Discussion of Autopilot Design and Closed-Loop Performance

    The tuned autopilot was tested in the full nonlinear Simulink environment to verify its performance and robustness.

    A cascaded PID autopilot was designed to augment stability and provide command tracking [8]. The architecture uses inner loops for rate damping and outer loops for attitude tracking.

    1. Longitudinal Autopilot Performance

      The longitudinal autopilot was commanded with a -4 degree pitch step. The response in Figure 15 shows excellent tracking performance. The system achieves the target with a fast rise time, minimal overshoot, and zero steady-state error, as detailed in Table 5. This confirms the controller effectively overcomes the lightly damped Phugoid mode and provides crisp pitch control.

      • Figure 15 shows the response, with performance metrics detailed in Table 5 and Table ^. The system tracks the command with a rise time of 0.283s and only 1.19% overshoot.

      Figure 15. Closed-loop response for a commanded pitch angle step

      Table 5 Control Parameters, Performance and Robustness of Tuned Response Pitch rate PI inner loop controller

      P

      -0.0167

      I

      -0.0162

      Rise time

      21.5 seconds

      Settling time

      40.6 seconds

      Overshoot

      0

      Peak

      0.999

      Gain margin

      32.6 db @73.3 rad/s

      Phase margin

      68.9 deg @0.973 rad/s

      Closed loop stability

      Stable

      Table 6 Control Parameters, Performance and Robustness of Tuned Response Outer Loop Pitch angle P outer loop controller

      P

      4.2

      Rise time

      0.283 seconds

      Settling time

      0.859 seconds

      Overshoot

      1.19%

      Peak

      1.6

      Gain margin

      13.1 db @13.2 rad/s

      Phase margin

      60deg@4.01rad/s

      Closed loop stability

      Stable

      Discussion: The result demonstrates a high-performance longitudinal control system. The fast rise time without significant overshoot indicates a well-balanced response, avoiding both sluggishness and oscillations. The zero steady-state error is a direct consequence of the integral action in the inner-loop PI controller, which is crucial for rejecting steady disturbances like modeling inaccuracies or persistent wind. Practically, this precise pitch control is vital for missions requiring stable altitude-hold or a constant glide slope. Furthermore, the high gain and phase margins (13.1 dB and 60 degrees) indicate excellent robustness, meaning the controller will remain stable even with variations in the aircraft's mass or aerodynamic properties [8].

    2. Lateral Autopilot Performance

      The lateral autopilot was tested with a 5-degree yaw command. Figure 16 shows the coordinated roll-to-turn maneuver. The controller initiates a roll to start the turn, then levels the wings to lock in the new heading. The response is smooth and well-damped, demonstrating effective control over the Dutch Roll mode. Performance metrics are in Table 7 and Table 8. Figure 16. shows that the yaw angle smoothly tracks the reference.

      Figure 16. Closed-loop response for a commanded yaw angle step

      Table 7 Control Parameters, Performance and Robustness of Tuned Response Roll Angle PI inner loop controller

      P

      -0.85532

      I

      -0.8054

      Rise time

      0.524 seconds

      Settling time

      3.63 seconds

      Overshoot

      2.3%

      Peak

      1.17

      Gain margin

      12.7db @9.58rad/s

      Phase margin

      60 deg @2 rad/s

      Closed loop stability

      Stable

      Table 8 Control Parameters, Performance and Robustness of Tuned Response Yaw Angle P outer loop controller

      P

      0.76086

      Rise time

      1.91 seconds

      Settling time

      5.81 seconds

      Overshoot

      0.803%

      Peak

      1.01

      Gain margin

      18.9db @18.9 rad/s

      Phase margin

      77.6 deg @0.981 rad/s

      Closed loop stability

      Stable

      Discussion: The yaw response validates the effectiveness of the coordinated roll-to-turn strategy. The controller commands a roll to initiate the turn, then brings the wings level as the new heading is acquired. The settling time is longer than for pitch, which is expected as yawing is a more complex, coupled dynamic motion. The well-damped, non- oscillatory response is critical for path-following navigation, ensuring the UAV does not weave around its intended track. The extremely high stability margins (18.9 dB and 77.6 degrees) suggest a very robust lateral system, capable of maintaining heading and executing turns reliably even in the presence of lateral disturbances like crosswinds.

  5. CONCLUSION

This paper successfully demonstrated a comprehensive, end-to-end framework for the dynamic modeling, simulation, and autopilot design of a small fixed-wing UAV using accessible software tools. A high-fidelity 6-DOF nonlinear model was developed from first principles and validated through simulation. By linearizing this model, a robust PID-based autopilot was designed and shown to provide excellent tracking performance for both longitudinal and lateral control axes.

The key contribution of this work is the presentation of a systematic and low-cost methodology that can be adopted by researchers, students, and hobbyists to significantly improve the design quality and functional performance of UAVs. By emphasizing the foundational importance of modeling and simulation, this study provides a clear pathway to developing more reliable and capable autonomous systems, moving beyond trial-and-error and towards principled engineering design. Future work could involve implementing more advanced control algorithms and validating the simulation results with real-world flight tests.

This paper presented a complete, principled methodology for the design of a small fixed-wing UAV autopilot. By integrating aerodynamic analysis from XFLR5 with a 6-DOF dynamic model in Simulink, we created a high-fidelity simulation testbed. A cascaded PI/P autopilot was designed and demonstrated to provide robust, high-performance control over the aircraft's longitudinal and lateral axes.

This work successfully bridges the gap between complex aerospace theory and practical implementation, offering a low- cost, replicable methodology for the complete design cycle of a small fixed-wing UAV autopilot. The results underscore the value of a model-based design approach over ad-hoc methods. Future work should focus n two key areas: first, implementing more advanced control strategies like Model Predictive Control (MPC) for handling constraints and optimizing performance; and second, validating these simulation results through hardware-in-the-loop (HIL) testing followed by real-world flight experiments.

Funding Statement

The authors did not receive financing for the development of this research.

Data Availability

The data that support the findings of this study, including the Simulink model and airfoil files, are available from the corresponding author upon reasonable request.

Conflict of Interest

The authors declare that there is no conflict of interest.

REFERENCES

  1. Austin, R. (2010). Unmanned Aircraft Systems: UAVS Design, Development and Deployment. John Wiley & Sons.

  2. Valavanis, K. P., & Vachtsevanos, G. J. (Eds.). (2015). Handbook of Unmanned Aerial Vehicles. Springer.

  3. Deperrois, A. (2011). XFLR5: Analysis of foils and wings operating at low Reynolds numbers. Retrieved from http://www.xflr5.tech/xflr5.htm

  4. Nelson, R. C. (1998). Flight Stability and Automatic Control (2nd ed.). McGraw-Hill.

  5. Beard, R. W., & McLain, T. W. (2012). Small unmanned aircraft: Theory and practice. Princeton University Press.

  6. Stevens, B. L., Lewis, F. L., & Johnson, E. N. (2015). Aircraft Control and Simulation (3rd ed.). John Wiley & Sons.

  7. Frazzoli, E., Dahleh, M. A., & Feron, E. (2000). A hybrid control architecture for aggressive maneuvering of autonomous helicopters. In Proceedings of the 39th IEEE Conference on Decision and Control.

  8. Ogata, K. (2010). Modern Control Engineering (5th ed.). Prentice Hall.

  9. Anderson, J. D. (2010). Fundamentals of Aerodynamics (5th ed.). New York: McGraw-Hill.