FlightGoggles makes use of the multicopterDynamicsSim library for simulation of multicopter flight dynamics. The library is released as part of FlightGoggles, but can be used independently. An overview of the vehicle dynamics model is given here.
Motor Dynamics
We model the dynamics of the motors using a first-order lag with time constant
, as follows:
(1) |
|
where is the rotor speed of motor
, with
(
in case of a quadcopter) and the subscript
indicates the commanded value. Rotor speed is defined such that
corresponds to positive thrust in the motor frame z-axis.
Force and Moment
We distinguish two deterministic external forces and moments acting on the vehicle body:
Thrust force and control moment due to the rotating propellers;
Aerodynamic drag and moment due to the vehicle linear and angular speed.
Stochastic force and moment contributions are discussed under Vehicle Dynamics.
Thrust force and control moment
We employ a summation of forces and moments over the propeller index in order to be able to be able to account for various vehicle and propeller configurations in a straightforward manner. The total thrust and control moment are given by
(2) |
|
with the constant rotation matrix from the motor reference frame to the vehicle-fixed reference frame, and
the position of the motor in the latter frame. The force and moment vector in the motor reference frame are given by
|
where is an indicator function for the set of propellers for which
corresponds to positive rotation rate around the motor frame z-axis;
is the rotor and propeller mass moment of inertia; and
and
indicate the propeller thrust and torque coefficients, respectively.
Aerodynamic drag and moment
Aerodynamic drag has magnitude proportional to the vehicle speed squared and acts in direction opposite the vehicle motion according to
|
with the
-norm,
the vehicle velocity relative to the world-fixed reference frame, and
the vehicle drag coefficient. Similarly, the aerodynamic moment is given by
|
where is the angular rate in vehicle-fixed reference frame, and
is a 3-by-3 matrix containing the aerodynamic moment coefficients.
Vehicle dynamics
The vehicle translational dynamics are given by
(3) |
|
where is the vehicle mass; and
,
, and
are the position, velocity, and gravitational acceleration in the world-fixed reference frame, respectively. The stochastic force vector
captures unmodeled dynamics, such as propeller vibrations and atmospheric turbulence. It is modeled as a continuous white-noise process with auto-correlation function
(with
the Dirac delta function), and can thus be sampled discretely according to
(4) |
|
where is the integration time step.
The rotation matrix from body-fixed to world frame is given by
|
where is the vehicle attitude unit quaternion vector. The corresponding attitude dynamics are given by
(5) |
|
with the vehicle moment of inertia tensor, and
the angular momentum given by
|
The stochastic moment contribution is modeled as a continuous white-noise process with auto-correlation function
, and sampled similarly to the stochastic force.
Numerical Integration
The vehicle state is updated at 960 Hz when using default settings, so that even high-bandwidth motor dynamics can be represented accurately. Both explicit Euler and 4th-order Runge-Kutta algorithms are provided for integration of motor and vehicle dynamics.
Attachments:
![](images/icons/bullet_blue.gif)
![](images/icons/bullet_blue.gif)
![](images/icons/bullet_blue.gif)
![](images/icons/bullet_blue.gif)
![](images/icons/bullet_blue.gif)
![](images/icons/bullet_blue.gif)