Main Content

## Quadcopter Airframe

You can use one of these two approaches to implement the airframe model.

### Nonlinear Airframe

For a nonlinear airframe, the model computes gravity forces, profile drag, and the aerodynamic forces and moments.

The `AC Model` subsystem computes the total force using these equations:

Gravity: $F=mg$, where m is the quadcopter mass, and g is the acceleration due to gravity.

Profile drag: $D=\frac{1}{2}\rho {V}^{2}S{C}_{d}$, where ρ is the atmospheric density, V is the body velocity, S is the reference area, and Cd is the drag coefficient.

Aerodynamic forces and moments: Computed using the Multirotor block with the inclusion of flap effects.

The 6DOF (Quaternion) block integrates the equations of motion of the vehicle to obtain the states at each time instant.

The nonlinear workflow accurately represents the dynamic behavior of the drones in a three-dimensional space. The 6DOF (Quaternion) block represents the orientation and position of the drone in a 3D environment using quaternions, providing a more robust representation of its motion and orientation.

### Linear Airframe

For a linear airframe, the trim values for the actuator inputs, the environment parameter values, and the state space A,B,C,D matrices for the linearized model are saved in the MAT file `linearizedAirframe`. These values are calculated using the `trimLinearizeOpPoint` function, which linearizes the nonlinear model of the quadcopter using Simulink® Control Design™.