WOLFRAM SYSTEM MODELER

CircularTrajectoryTracking

Circular path tracking by a quadrotor

Diagram

Wolfram Language

In[1]:=
SystemModel["Aircraft.Examples.CircularTrajectoryTracking"]
Out[1]:=

Information

Circular trajectory tracking 

This example demonstrates the quadrotor's path tracking using the ReferenceTrajectories pre-planned path component for defining the reference position. As the RegerenceTrajectories does not include yaw this has to be set separately. Various trajectory types can be selected within the reference trajectory, where amplitude and period determine the maximum distance from the origin and the time required for a complete path (so higher period means slower path generation), respectively. The inputs are connected to the controller, and the controller command is then connected to the quadrotor body. While the default controller values work adequately for both trajectories, achieving more precise path tracking entails tuning the PID controllers for x and y positions for each trajectory type.

The plots reveal an initial overshoot, but as time progresses, the oscillations gradually diminish. This phenomenon is attributed to the Integrator, which integrates the position error over time and remove the steady state error.

Reference

[1]: Wang, Pengcheng, et al. "Dynamics modelling and linear control of quadcopter." 2016 International Conference on Advanced Mechatronic Systems (ICAMechS). IEEE, 2016.

Parameters (10)

startTimeYaw

Value: 0

Type: Time (s)

Description: Start time of the yaw angle reference command

amplitudeYaw

Value: 0

Type: Real (°)

Description: Amplitude of trapezoid for yaw angle reference command

trajectoryType

Value: Aircraft.Utilities.Trajectories.ReferenceTrajectories.TrajectoryType.circular

Type: TrajectoryType

Description: Type of the trajectory

heightAmplitude

Value: 1

Type: Length (m)

Description: Final vertical height

heightStartTime

Value: 0

Type: Time (s)

Description: Take off start time

radius

Value: 2.908

Type: Length (m)

Description: Radius of the trajectory

period

Value: 30

Type: Period (s)

Description: Time required to trace one complete shape (cycle)

startTime

Value: 10

Type: Time (s)

Description: Time to start the generation of the plannar shape path

circularElapseTime

Value: 5

Type: Time (s)

Description: Time to move from center to lateral position in circular motion

netMass

Value: quadrotor.quadrotorBody.quadrotorMass

Type: Mass (kg)

Components (7)

quadrotor

Type: Quadrotor

Description: Quadrotor model

controller

Type: PositionAttitudePID

Description: Position and attitude controller

yawRef

Type: Trapezoid

Description: Reference yaw angle command

degToRad

Type: From_deg

Description: Convert yaw angle from degree to radian

world

Type: World

Description: World coordinate system used in aircraft libray

visualization

Type: VisualizationPoint

Description: Draws the reference 3D trajectory as a parametric curve

reference

Type: ReferenceTrajectories

Description: Planned trajectories for quadrotor position