Main Content

Guidance Model

Reduced-order model for UAV

  • UAV Guidance Model block

Libraries:
UAV Toolbox / Algorithms

Description

The Guidance Model block represents a small unmanned aerial vehicle (UAV) guidance model that estimates the UAV state based on control and environmental inputs. The model approximates the behavior of a closed-loop system consisting of an autopilot controller and a fixed-wing or multirotor kinematic model for 3-D motion. Use this block as a reduced-order guidance model to simulate your fixed-wing or multirotor UAV. Specify the ModelType to select your UAV type. Use the Initial State tab to specify the initial state of the UAV depending on the model type. The Configuration tab defines the control parameters and physical parameters of the UAV.

Ports

Input

expand all

Control commands sent to the UAV model, specified as a bus. The name of the input bus is specified in Input/Output Bus Names.

For multirotor UAVs, the model is approximated as separate PD controllers for each command. The elements of the bus are control command:

  • Roll - Roll angle in radians.

  • Pitch - Pitch angle in radians.

  • YawRate - Yaw rate in radians per second. (D = 0. P only controller)

  • Thrust - Vertical thrust of the UAV in Newtons. (D = 0. P only controller)

For fixed-wing UAVs, the model assumes the UAV is flying under the coordinated-turn condition. The guidance model equations assume zero side-slip. The elements of the bus are:

  • Height - Altitude above the ground in meters.

  • Airspeed - UAV speed relative to wind in meters per second.

  • RollAngle - Roll angle along body forward axis in radians. Because of the coordinated-turn condition, the heading angular rate is based on the roll angle.

Environmental inputs, specified as a bus. The model compensates for these environmental inputs when trying to achieve the commanded controls.

For fixed-wing UAVs, the elements of the bus are WindNorth, WindEast,WindDown, and Gravity. Wind speeds are in meters per second and negative speeds point in the opposite direction. Gravity is in meters per second squared.

For multirotor UAVs, the only element of the bus is Gravity in meters per second squared.

Data Types: bus

Output

expand all

Simulated UAV state, returned as a bus. The block uses the Control and Environment inputs with the guidance model equations to simulate the UAV state.

For multirotor UAVs, the state is a five-element bus:

  • WorldPosition - [x y z] in meters.

  • WorldVelocity - [vx vy vz] in meters per second.

  • EulerZYX - [psi theta phi] Euler angles in radians.

  • BodyAngularRateRPY - [r p q] in radians per second along the xyz-axes of the UAV.

  • Thrust - F in Newtons.

For fixed-wing UAVs, the state is an eight-element bus:

  • North - Position in north direction in meters.

  • East - Position in east direction in meters.

  • Height - Height above ground in meters.

  • AirSpeed - Speed relative to wind in meters per second.

  • HeadingAngle - Angle between ground velocity and north direction in radians.

  • FlightPathAngle - Angle between ground velocity and north-east plane in radians.

  • RollAngle - Angle of rotation along body x-axis in radians per second.

  • RollAngleRate - Angular velocity of rotation along body x-axis in radians per second.

Data Types: bus

Parameters

expand all

UAV guidance model type, specified as MultirotorGuidance or FixedWingGuidance. The model type determines the elements of the UAV State and the required Control and Environment inputs.

Tunable: No

Input and output numeric data types, specified as either double or single. Choose the data type based on possible software or hardware limitations.

Tunable: No

  • Code generation — Simulate model using generated C code. The first time you run a simulation, Simulink® generates C code for the block. The C code is reused for subsequent simulations, as long as the model does not change. This option requires additional startup time, but the speed of the subsequent simulations is comparable to Interpreted execution.

  • Interpreted execution — Simulate model using the MATLAB® interpreter. This option shortens startup time but has a slower simulation speed than Code generation. In this mode, you can debug the source code of the block.

Tunable: No

Initial UAV state tab, specified as multiple table entries. All entries on this tab are nontunable.

For multirotor UAVs, the initial state is:

  • World Position - [x y z] in meters.

  • World Velocity - [vx vy vz] in meters per second.

  • Euler Angles (ZYX) - [psi theta phi] in radians.

  • Body Angular Rates - [p q r] in radians per second.

  • Thrust - F in Newtons.

For fixed-wing UAVs, the initial state is:

  • North - Position in north direction in meters.

  • East - Position in east direction in meters.

  • Height - Height above ground in meters.

  • Air Speed - Speed relative to wind in meters per second.

  • Heading Angle - Angle between ground velocity and north direction in radians.

  • Flight Path Angle - Angle between ground velocity and north-east plane in radians.

  • Roll Angle - Angle of rotation along body x-axis in radians per second.

  • Roll Angle Rate - Angular velocity of rotation along body x-axis in radians per second.

Tunable: No

UAV controller configuration tab, specified as multiple table entries. This tab allows you to configure the parameters of the internal control behaviour of the UAV. Specify the proportional (P) and derivative (D) gains for the dynamic model and the UAV mass in kilograms (for multirotor).

For multirotor UAVs, the parameters are:

  • PD Roll

  • PD Pitch

  • P YawRate

  • P Thrust

  • Mass(kg)

For fixed-wing UAVs, the parameters are:

  • P Height

  • P Flight Path Angle

  • PD Roll

  • P Air Speed

  • Min/Max Flight Path Angle ([min max] angle in radians)

Tunable: No

Simulink bus signal names tab, specified as multiple entries of character vectors. These buses have a default name based on the UAV model and input type. To use multiple guidance models in the same Simulink model, specify different bus names that do not intersect. All entries on this tab are nontunable.

More About

expand all

References

[1] Randal W. Beard and Timothy W. McLain. "Chapter 9." Small Unmanned Aircraft Theory and Practice, NJ: Princeton University Press, 2012.

[2] Mellinger, Daniel, and Nathan Michael. "Trajectory Generation and Control for Precise Aggressive Maneuvers with Quadrotors." The International Journal of Robotics Research. 2012, pp. 664-74.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Version History

Introduced in R2018b