TP3 Commande MAC - MPC 2024
TP3 Commande MAC - MPC 2024
1. Adaptive Control:
Adaptive control allows the controller to adjust in real-time to handle system uncertainties. Unlike traditional
fixed-gain controllers, adaptive controllers continuously adjust their parameters to ensure optimal performance.
MRAC is a specific approach where the goal is to make the plant's behavior match that of a reference model.
The reference model represents the desired response of the system. MRAC continuously adjusts the controller
parameters based on the error between the plant output and the reference model output.
2. Predictive Control:
Model Predictive Control (MPC) computes control inputs by predicting the future system behavior and
minimizing a cost function over a finite prediction horizon. The goal of MPC is to drive the system’s output to
track a desired trajectory while considering system dynamics and control constraints.
• Methodology:
1. System Model
The system is simulated over 𝑡 ∈ [0,10] seconds with a time step of 𝑑𝑡 = 0.01 The reference trajectory is:
𝑟(𝑡) = 𝑠𝑖𝑛(0.5𝑡)
2. Adaptive Control
The controller uses real-time error 𝑒(𝑡) = 𝑟(𝑡) − 𝑥(𝑡) to compute the control input:
𝑢𝑎𝑑𝑎𝑝𝑡𝑖𝑣𝑒 = 𝐾𝑎𝑑𝑎𝑝𝑡𝑖𝑣𝑒 ∙ 𝑒(𝑡).
𝐾𝑎𝑑𝑎𝑝𝑡𝑖𝑣𝑒 = 𝑘𝑎𝑑𝑎𝑝𝑡𝑖𝑣𝑒 + 𝑔𝑎𝑚𝑚𝑎 ∗ 𝑒(𝑡) ∗ 𝑢(𝑡) ∗ 𝑑𝑡
System dynamics are updated using the nonlinear equation.
• Step-by-Step Procedure:
Step 1: Generate Desired Sinusoidal Trajectory
Define the time vector and a sinusoidal trajectory as the desired output. This trajectory will be used as a reference
that the system aims to follow.
1
❖ Question 1: Make a plot figure for this system.
❖ Question 2: Make a plot figure for this control including reference trajectory to compare.
❖ Question 4:
❖ Plot the figure between ‘Reference', 'Adaptive Control', and 'Predictive Control'.
❖ Explain the figure, which control is better for tracking trajectories.
2