Multiloop Control of a Helicopter - MATLAB & Simulink (2024)

This example uses:

  • Control System ToolboxControl System Toolbox
  • Simulink Control DesignSimulink Control Design
  • SimulinkSimulink

Open Script

This example shows how to use slTuner and systune to tune a multiloop controller for a rotorcraft.

Helicopter Model

This example uses an 8-state helicopter model at the hovering trim condition. The state vector x = [u,w,q,theta,v,p,phi,r] consists of

  • Longitudinal velocity u (m/s)

  • Lateral velocity v (m/s)

  • Normal velocity w (m/s)

  • Pitch angle theta (deg)

  • Roll angle phi (deg)

  • Roll rate p (deg/s)

  • Pitch rate q (deg/s)

  • Yaw rate r (deg/s).

The controller generates commands ds,dc,dT in degrees for the longitudinal cyclic, lateral cyclic, and tail rotor collective using measurements of theta, phi, p, q, and r.

Control Architecture

The following Simulink model depicts the control architecture:

open_system('rct_helico')

Multiloop Control of a Helicopter- MATLAB & Simulink (1)

The control system consists of two feedback loops. The inner loop (static output feedback) provides stability augmentation and decoupling. The outer loop (PI controllers) provides the desired setpoint tracking performance. The main control objectives are as follows:

  • Track setpoint changes in theta, phi, and r with zero steady-state error, rise times of about 2 seconds, minimal overshoot, and minimal cross-coupling

  • Limit the control bandwidth to guard against neglected high-frequency rotor dynamics and measurement noise

  • Provide strong multivariable gain and phase margins (robustness to simultaneous gain/phase variations at the plant inputs and outputs, see diskmargin for details).

We use lowpass filters with cutoff at 40 rad/s to partially enforce the second objective.

Controller Tuning

You can jointly tune the inner and outer loops with the systune command. This command only requires models of the plant and controller along with the desired bandwidth (which is function of the desired response time). When the control system is modeled in Simulink, you can use the slTuner interface to quickly set up the tuning task. Create an instance of this interface with the list of blocks to be tuned.

ST0 = slTuner('rct_helico',{'PI1','PI2','PI3','SOF'});

Each tunable block is automatically parameterized according to its type and initialized with its value in the Simulink model (Multiloop Control of a Helicopter- MATLAB & Simulink (2) for the PI controllers and zero for the static output-feedback gain). Simulating the model shows that the control system is unstable for these initial values:

Multiloop Control of a Helicopter- MATLAB & Simulink (3)

Mark the I/O signals of interest for setpoint tracking, and identify the plant inputs and outputs (control and measurement signals) where the stability margin are measured.

addPoint(ST0,{'theta-ref','phi-ref','r-ref'}) % setpoint commandsaddPoint(ST0,{'theta','phi','r'}) % corresponding outputsaddPoint(ST0,{'u','y'});

Finally, capture the design requirements using TuningGoal objects. We use the following requirements for this example:

  • Tracking requirement: The response of theta, phi, r to step commands theta_ref, phi_ref, r_ref must resemble a decoupled first-order response with a one-second time constant

  • Stability margins: The multivariable gain and phase margins at the plant inputs u and plant outputs y must be at least 5 dB and 40 degrees

  • Fast dynamics: The magnitude of the closed-loop poles must not exceed 25 to prevent fast dynamics and jerky transients

% Less than 20% mismatch with reference model 1/(s+1)TrackReq = TuningGoal.StepTracking({'theta-ref','phi-ref','r-ref'},{'theta','phi','r'},1);TrackReq.RelGap = 0.2;% Gain and phase margins at plant inputs and outputsMarginReq1 = TuningGoal.Margins('u',5,40);MarginReq2 = TuningGoal.Margins('y',5,40);% Limit on fast dynamicsMaxFrequency = 25;PoleReq = TuningGoal.Poles(0,0,MaxFrequency);

You can now use systune to jointly tune all controller parameters. This returns the tuned version ST1 of the control system ST0.

AllReqs = [TrackReq,MarginReq1,MarginReq2,PoleReq];ST1 = systune(ST0,AllReqs);
Final: Soft = 1.12, Hard = -Inf, Iterations = 71

The final value is close to 1 so the requirements are nearly met. Plot the tuned responses to step commands in theta, phi, r:

T1 = getIOTransfer(ST1,{'theta-ref','phi-ref','r-ref'},{'theta','phi','r'});step(T1,5)

The rise time is about two seconds with no overshoot and little cross-coupling. You can use viewGoal for a more thorough validation of each requirement, including a visual assessment of the multivariable stability margins (see diskmargin for details):

figure('Position',[100,100,900,474])viewGoal(AllReqs,ST1)

Multiloop Control of a Helicopter- MATLAB & Simulink (5)

Inspect the tuned values of the PI controllers and static output-feedback gain.

showTunable(ST1)
Block 1: rct_helico/PI1 = 1 Kp + Ki * --- s with Kp = 1.04, Ki = 2.07 Name: PI1Continuous-time PI controller in parallel form.-----------------------------------Block 2: rct_helico/PI2 = 1 Kp + Ki * --- s with Kp = -0.099, Ki = -1.35 Name: PI2Continuous-time PI controller in parallel form.-----------------------------------Block 3: rct_helico/PI3 = 1 Kp + Ki * --- s with Kp = 0.135, Ki = -2.2 Name: PI3Continuous-time PI controller in parallel form.-----------------------------------Block 4: rct_helico/SOF = D = u1 u2 u3 u4 u5 y1 2.211 -0.3103 -0.003338 0.7856 -0.01516 y2 -0.1919 -1.292 0.01823 -0.0851 -0.1195 y3 -0.02014 -0.01633 -1.894 -0.002402 0.068 Name: SOFStatic gain.

Benefit of the Inner Loop

You may wonder whether the static output feedback is necessary and whether PID controllers aren't enough to control the helicopter. This question is easily answered by re-tuning the controller with the inner loop open. First break the inner loop by adding a loop opening after the SOF block:

addOpening(ST0,'SOF')

Then remove the SOF block from the tunable block list and re-parameterize the PI blocks as full-blown PIDs with the correct loop signs (as inferred from the first design).

PID = pid(0,0.001,0.001,.01); % initial guess for PID controllersremoveBlock(ST0,'SOF');setBlockParam(ST0,... 'PI1',tunablePID('C1',PID),... 'PI2',tunablePID('C2',-PID),... 'PI3',tunablePID('C3',-PID));

Re-tune the three PID controllers and plot the closed-loop step responses.

ST2 = systune(ST0,AllReqs);
Final: Soft = 4.94, Hard = -Inf, Iterations = 67
T2 = getIOTransfer(ST2,{'theta-ref','phi-ref','r-ref'},{'theta','phi','r'});figure, step(T2,5)

Multiloop Control of a Helicopter- MATLAB & Simulink (6)

The final value is no longer close to 1 and the step responses confirm the poorer performance with regard to rise time, overshoot, and decoupling. This suggests that the inner loop has an important stabilizing effect that should be preserved.

See Also

systune (slTuner) (Simulink Control Design) | slTuner (Simulink Control Design) | TuningGoal.StepTracking | TuningGoal.Margins | TuningGoal.Poles

Related Topics

  • Fixed-Structure Autopilot for a Passenger Jet

MATLAB Command

You clicked a link that corresponds to this MATLAB command:

 

Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.

Multiloop Control of a Helicopter- MATLAB & Simulink (7)

Select a Web Site

Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

You can also select a web site from the following list:

Americas

  • América Latina (Español)
  • Canada (English)
  • United States (English)

Europe

  • Belgium (English)
  • Denmark (English)
  • Deutschland (Deutsch)
  • España (Español)
  • Finland (English)
  • France (Français)
  • Ireland (English)
  • Italia (Italiano)
  • Luxembourg (English)
  • Netherlands (English)
  • Norway (English)
  • Österreich (Deutsch)
  • Portugal (English)
  • Sweden (English)
  • Switzerland
    • Deutsch
    • English
    • Français
  • United Kingdom (English)

Asia Pacific

Contact your local office

Multiloop Control of a Helicopter
- MATLAB & Simulink (2024)
Top Articles
Latest Posts
Article information

Author: Clemencia Bogisich Ret

Last Updated:

Views: 6199

Rating: 5 / 5 (80 voted)

Reviews: 87% of readers found this page helpful

Author information

Name: Clemencia Bogisich Ret

Birthday: 2001-07-17

Address: Suite 794 53887 Geri Spring, West Cristentown, KY 54855

Phone: +5934435460663

Job: Central Hospitality Director

Hobby: Yoga, Electronics, Rafting, Lockpicking, Inline skating, Puzzles, scrapbook

Introduction: My name is Clemencia Bogisich Ret, I am a super, outstanding, graceful, friendly, vast, comfortable, agreeable person who loves writing and wants to share my knowledge and understanding with you.