WOLFRAM SYSTEM MODELER

Quadrotor

Interface for the complete quadrotor model

Diagram

Wolfram Language

In[1]:=
SystemModel["Aircraft.Physical.RotaryWing.MultiRotor.Quadrotor"]
Out[1]:=

Information

The Quadrotor model represents the complete drone model, consisting of the QuadrotorBody (representing mass and inertia of the drone), sensors and propulsion system (including DC motor, gear and propeller). It takes input commands from the controller, and the outputs of the model are the translational and rotational position/angle and velocities.

Parameters

The Quadrotor model declares the primary parameters that significantly influence quadrotor design. This declaration is intended to simplify the process of parameter adjustments, making it easier to modify key aspects of the quadrotor's design.

Propulsion System

The propulsion system consists of an electric motor that generates the required torques mounted on each propulsion system inside the QuadrotorBody model, and each one is connected to a gearbox that scales the torques to the propellers. The propeller produces lift force for each propulsive body and the DC motor generates angular rotation. Force and torque signals are introduced in QuadrotorBody and mounted on each corresponding propulsion system.

System Inputs

The inputs to the system consist of the voltages for the four DC motors, and these voltages are determined by the controllers.

 
Sensors: 

Two Sensors from the Modelica standard library has been used for this model. An AbsoluteVelocity (named gpsVel) and an AbsolutePosition (gpsPos) sensor are connected to the frame of the center of the QuadrotorBody. They measure the linear velocity and position of the quadrotor in the Earth's reference frame. Note that negative gain (zVel and zPos) are used to change the direction of the position and velocity in the z direction to be in accordance with the world reference frame of the Aircraft library. All measurements pass to the output translationalM which is a vector of [ x, y, z, u, v, w].

An AbsoluteAngularVelocity sensor is connected to the same frame and models a gyroscope. It records angular velocities in the quadrotor's body reference frame, denoted as p, q and r, and corresponding to rotations around the x, y and z axes. By applying an integrator, the quadrotor's rotational angles, roll, pitch and yaw can be derived. Taking into account the small angle assumption, these angles are equivalent to the Euler angles, φ, θ and ψ. All measurements pass to the output rotationalM which is a vector of [roll, pitch, yaw, p, q, r].

Connectors

This model contains real inputs for the commanded voltage from the control system, and two real outputs from the translational and rotational sensor measurement, which is used as feedback to the control system. The drone features a frame connector located at its center of mass. This connector enables the attachment of loads for package delivery or the connection of mechanical components, as illustrated in the VerticalMotion example.

Parameters (13)

centralMass

Value: 0.38

Type: Mass (kg)

Description: Mass of rigid body (bodyCenter.m) (quadrotorBody.centralMass)

propulsionMass

Value: 0.01

Type: Mass (kg)

Description: Mass of each propulsion system (quadrotorBody.propulsionMass)

IxxP

Value: 0.001

Type: Inertia (kg⋅m²)

Description: Moment of inertia of each propulsion system around x axis (quadrotorBody.IxxP)

IyyP

Value: 0.001

Type: Inertia (kg⋅m²)

Description: Moment of inertia of each propulsion system around y axis (quadrotorBody.IyyP)

IzzP

Value: 0.001

Type: Inertia (kg⋅m²)

Description: Moment of inertia of each propulsion system around z axis (quadrotorBody.IzzP)

IxxC

Value: 0.01

Type: Inertia (kg⋅m²)

Description: Moment of inertia of the central mass of the quadrotor around x axis (quadrotorBody.IxxC)

IyyC

Value: 0.01

Type: Inertia (kg⋅m²)

Description: Moment of inertia of the central mass of the quadrotor around y axis (quadrotorBody.IyyC)

IzzC

Value: 0.01

Type: Inertia (kg⋅m²)

Description: Moment of inertia of the central mass of the quadrotor around z axis (quadrotorBody.IzzC)

armLength

Value: 0.192

Type: Real

Description: Arm length of the quadrotor (quadrotorBody.armLength)

propellerGain

Value: 0.00045

Type: Real

Description: Relation between lift force of propeller and rpm (propeller2.p)

gearRatio

Value: 28000.0 / 3300.0

Type: Real

Description: Transmission ratio (flange_a.phi/flange_b.phi) (idealGear2.ratio)

motorResistance

Value: 2.25

Type: Resistance (Ω)

Description: Resistance at temperature T_ref (resistor.R) (motor1.resistance)

motorInductance

Value: 0.01

Type: Inductance (H)

Description: Inductance (inductor.L) (motor1.inductance)

Connectors (4)

voltage

Type: RealInput[4]

Description: Vector of the voltage input of the electric motors

center

Type: Frame_b

Description: Coordinate system fixed to the component with one cut-force and cut-torque (non-filled rectangular icon)

translationalM

Type: RealOutput[6]

Description: Measured position of the quadrotor

rotationalM

Type: RealOutput[6]

Description: Measured angles and angular rates of the quadrotor

Components (19)

quadrotorBody

Type: QuadrotorBody

Description: 6DOF quadrotor base body

motor3

Type: Motor

Description: Third electric motor

motor1

Type: Motor

Description: First electric motor

motor2

Type: Motor

Description: Second electric motor

propeller3

Type: Propeller

Description: Third propeller generates force and rotor rotation

propeller2

Type: Propeller

Description: Second propeller generates force and rotor rotation

propeller1

Type: Propeller

Description: First propeller generates force and rotor rotation

idealGear2

Type: IdealGear

Description: Second gear

idealGear3

Type: IdealGear

Description: Third gear

idealGear1

Type: IdealGear

Description: First gear

gpsVel

Type: AbsoluteVelocity

Description: Sensor to measure absolute position of the quadrotor

gyroscope

Type: AbsoluteAngularVelocity

Description: Sensor measures the angular velocity of the quadrotor

idealGear4

Type: IdealGear

Description: Fourth gear

motor4

Type: Motor

Description: Fourth electric motor

propeller4

Type: Propeller

Description: Fourth propeller generates force and rotor rotation

angles

Type: Integrator[3]

Description: Output the integral of the input signal with optional reset

gpsPos

Type: AbsolutePosition

Description: Measure absolute position vector of the origin of a frame connector

zPos

Type: Gain

Description: Gain converts the height measurement direction

zVel

Type: Gain

Description: Gain converts the height measurement direction

Used in Examples (3)

VerticalMotion

Aircraft.Examples

Vertical motion of quadrotor system in 3DOF, constrained in z axis

CircularTrajectoryTracking

Aircraft.Examples

Circular path tracking by a quadrotor

ControllerComparison

Aircraft.Examples

Compare the impact of two types of controller structures on the motion of the quadrotor