Main Content

Tune Control Design for UAV in Transition

This example shows how to tune your VTOL aircraft control parameters during the Transition Flight Regime. During the transition, the aircraft changes from vertical to horizontal flight, and vice versa, which poses a challenge to stability and control due to significant changes in flight dynamics. Before deploying the controller to flight control hardware, you can tune the control parameters to verify the chosen parameters before flight test.

Getting Started

Open the VTOLRefApp project file.

prj = openProject("VTOLApp/VTOLRefApp.prj");

This example uses MATLAB Project shortcuts. Use the highlighted project shortcuts for setting up the transition configuration. You can use the other project shortcuts for tuning the hover, fixed-wing configurations, and setting up the photorealistic city mission. To see these shortcuts, you must open and view the Project editor tab.

Click the Getting Started button in the project shortcuts to set up the aircraft plant model and base controller.

setupPlant;
Initialized VTOL model.
Enabled hover configuration.
Enabled hover guidance mission.

Set Up Transition Experiment

The aircraft will begin the transition regime from the hover configuration, with rotors pointing upwards. Load the hover and fixed wing gains tuned in previous sections.

% Set up hover configuration.
FSState=flightState.Hover;
% Get initial velocity and tilt based on flight mode.
[vIni,tiltIni]=exampleHelperGetInitialConfiguration(FSState);
% Load in hover tuned gains.
load tunedHoverGains_BW50;
% Load in fixed wing tuned gains.
load tunedFixedWingGains_BW10.mat

Setup Simple Mission with Transition

A predefined mission with a short hover to fixed wing flight is provided in setupTransitionSensitivityMission.m. Leverage the guidance mission to speed up parameter study of UAV in transition regime. The guidance test bench allows the aircraft to execute maneuvers across hover, transition and fixed wing flight regime through a set of mission commands and to study their behavior.

setupTransitionSensitivityMission;
Enabled transition sensitivity mission.

Analyze Sensitivity of Transition to Parameters

In the previous sections, the control design of hover and fixed wing configuration was tuned. The aircraft switches between these two controllers based on transition parameters. During the transition, the parameters in mdl/Autopilot/Tilt Scheduler will be tuned in order to facilitate both forward and backward transition maneuvers. The transition parameters are chosen specific to this tiltrotor control design. However, you can use the mission test bench approach for studying transition sensitivity of a different control design. The automated mission setup can also be used to do a parameter study for a different control structure.

During forward transition, the following parameters impact the behavior of the current tiltrotor control design:

  1. Tilt Schedule Rate — The rate in which the front rotors start tilting forward.

  2. Critical Tilt Angle — Specifies the angle of tilt that once reached, the front rotors tilt forward as fast as physically possible.

  3. Wind down — Rate at which Back rotors gradually wind down until a complete stop.

Once a given velocity is reached, the UAV fully transitions to fixed wing flight. In the following subsections, study the impact of each effect on transition.

Study effect of Tilt Schedule Rate on Transition

You can control the tilt schedule rate by changing the TiltScheduleRate parameter. TiltScheduleRate affets the Tilt Scheduler within "..../Autopilot/Tilt Scheduler" as shown below. To view the effects of changing the tilt schedule rate, run the model three times with a transition rate of 15, 30, and 45 degrees per second.

tiltRateParam = getEntry(dDataSectObj,'TiltScheduleRate');
%Transition rate set to 15 deg/sec.
setValue(tiltRateParam,15*pi/180)
outTR15=sim(mdl);

Figure UAV Animation contains an axes object. The axes object with xlabel North, ylabel West contains 5 objects of type patch, line.

%Transition rate set to 30 deg/sec.
setValue(tiltRateParam,30*pi/180)
outTR30=sim(mdl);

Figure UAV Animation contains an axes object. The axes object with xlabel North, ylabel West contains 5 objects of type patch, line.

%Transition rate set to 45 deg/sec.
setValue(tiltRateParam,45*pi/180)
outTR45=sim(mdl);

Figure UAV Animation contains an axes object. The axes object with xlabel North, ylabel West contains 5 objects of type patch, line.

Plot results to compare simulation performance at each tilt schedule rate.

tLayout=tiledlayout(4,1);
exampleHelperPlotTransitionResults(tLayout,outTR15);
exampleHelperPlotTransitionResults(tLayout,outTR30);
exampleHelperPlotTransitionResults(tLayout,outTR45);
leg=legend({'Tilt Rate 15 deg/sec','Tilt Rate 30 deg/sec','Tilt Rate 45 deg/sec'});
leg.Layout.Tile='north';

Figure contains 4 axes objects. Axes object 1 with ylabel Altitude (m) contains 3 objects of type line. Axes object 2 with ylabel Pitch (deg) contains 3 objects of type line. Axes object 3 with ylabel Tilt (deg) contains 3 objects of type line. Axes object 4 with xlabel Time (sec), ylabel Airspeed (m/s) contains 3 objects of type line. These objects represent Tilt Rate 15 deg/sec, Tilt Rate 30 deg/sec, Tilt Rate 45 deg/sec.

To pick the rate, observe that a rate of 15 degrees per second resulted in low oscillations in pitch and without excessive time spent exceeding the transition velocity of 14 meters per second. Therefore, set the transition schedule rate to 15 degrees per second.

setValue(tiltRateParam,15*pi/180);

Study effect of Critical Tilt Angle on Transition

Once a critical tilt angle is reached, the UAV tilts rotors forward as fast as the servo dynamics allow. Prior to reaching this angle, the rate is slower and defined by TiltScheduleRate.

To examine how CriticalTiltAngle impacts the system, run the model .../Autopilot/Scheduler/Subsystem1/Switch Case Action/Transition.

criticalAngleParam = getEntry(dDataSectObj,'CriticalTiltAngle');
% Critical tilt set to 90 degrees (gradual tilt during the entire transition phase). 
setValue(criticalAngleParam,pi/2)
outTC90=sim(mdl);

Figure UAV Animation contains an axes object. The axes object with xlabel North, ylabel West contains 5 objects of type patch, line.

% Critical tilt set to 60 degrees.
setValue(criticalAngleParam,pi/3)
outTC60=sim(mdl);

Figure UAV Animation contains an axes object. The axes object with xlabel North, ylabel West contains 5 objects of type patch, line.

% Critical tilt set to 30 degrees.
setValue(criticalAngleParam,pi/6)
outTC30=sim(mdl);

Figure UAV Animation contains an axes object. The axes object with xlabel North, ylabel West contains 5 objects of type patch, line.

%Plot results for comparision.
tLayout=tiledlayout(4,1);
exampleHelperPlotTransitionResults(tLayout,outTC90);
exampleHelperPlotTransitionResults(tLayout,outTC60);
exampleHelperPlotTransitionResults(tLayout,outTC30);
leg=legend({'Critical Tilt Angle=90 deg','Critical Tilt Angle=60 deg','Critical Tilt Angle=30 deg'});
leg.Layout.Tile='north';

Figure contains 4 axes objects. Axes object 1 with ylabel Altitude (m) contains 3 objects of type line. Axes object 2 with ylabel Pitch (deg) contains 3 objects of type line. Axes object 3 with ylabel Tilt (deg) contains 3 objects of type line. Axes object 4 with xlabel Time (sec), ylabel Airspeed (m/s) contains 3 objects of type line. These objects represent Critical Tilt Angle=90 deg, Critical Tilt Angle=60 deg, Critical Tilt Angle=30 deg.

As the UAV approaches the fixed wing mode, the back rotors have more influence on pitch as the front rotor vector points forward. If the transition to fixed wing mode is too slow, this can lead to changes in pitch that need correction. Observe that 60 degrees of critical angle leads to low oscillation in pitch close to transition without causing a significant reduction in airspeed. Thus 60 degrees (pi/3 radian) is chosen as the critical angle.

setValue(criticalAngleParam,pi/3)

Study effect of Wind Down Rate on Transition

To control the tilt schedule rate, change the WindDownRate parameter. WindDownRate, specified in revolutions/sec2, is the rate at which the back rotors reduce their speed during transition. A fast rate would mean the back rotors lose authority to balance pitch of the aircraft as it transitions to fixed wing flight. A slow wind down rate will increase the period of transition for aircraft and consume additional battery. To examine the effect of wind down rate, run the exampleHelperWinddownStudy.m

exampleHelperWinddownStudy;

Back Transition

The mechanism of back transition uses the front rotors to tilt backwards until the aircraft has slowed down significantly. Once the UAV has transitioned to 0 velocity, the UAV switches to hover mode and executes a landing maneuver. The back transition is primarily controlled by setting the proportional gain for the forward velocity control. To examine the back transition, run mdl/Autopilot/TiltScheduler/Back Transition Scheduler.

.

Simulate Full Mission with Transition

Set up and simulate the transition guidance mission with the tuned transition parameters.

setupTransitionGuidanceMission;
Enabled transition guidance mission.
sim(mdl);

Figure UAV Animation contains an axes object. The axes object with xlabel North, ylabel West contains 5 objects of type patch, line.

% Discard changes
discardChanges(myDictionaryObj);

Next Steps

You can add GPS, IMU and airspeed sensors to the system and test how the UAV performs over the mission with sensors in the loop. To do so, run the following code section, then run the model.

% Set up manual mode.
TestMode=0;
% Set sensor flag (0/1 to disable/enable sensor).
SensorType=1;
SensorDelayRate=0.001;

The sensor subsystem can be found in 'VTOLTiltrotor/Digital Twin /Variant Subsystem/Sensors/SensorData.

References

[1] N., Pavan. (2020). Design of Tiltrotor VTOL and Development of Simulink Environment for Flight Simulations.

[2] Mathur, Akshay & Atkins, Ella. (2021). Design, Modeling and Hybrid Control of a QuadPlane.

[3] Ducard, Guillaume Jacques Joseph and Minh-Duc Hua (2014). Modeling of an unmanned hybrid aerial vehicle.

See Also