APR600 - MPC January 8, 2024
Draft Report of MODEL PREDICTIVE CONTROL
Submitted by , TIGY VARUGHESE
Master of AI & Automation
University West
[email protected]
Model Predictive Control
Model predictive control (MPC) is an optimal control technique in which the calculated control
actions minimize a cost function for a constrained dynamical system over a finite, receding, horizon.
At every time step, an MPC controller gets or estimates the current state of the system. It then
figures out a series of control actions to minimize the cost over a certain period by solving a
constrained optimization problem. This relies on an internal model of the system and depends on
the current state. The controller only uses the first calculated control action on the system and
ignores the rest. This process repeats in the next time step.
Fig-1 : MPC Basic control loop
History of MPC
The first-generation MPC systems emerged independently in the 1970s from two pioneering
industrial research groups. Shell Oil introduced Dynamic Matrix Control (DMC) in 1980, while a
similar approach was developed by ADERSA (Richalet et al., 1978). Another noteworthy technique,
Generalized Predictive Control (GPC), with adaptive MPC capabilities, was introduced by Clarke et al.
in 1987 and garnered considerable attention. The impact of model predictive control on industrial
practices has been substantial. A survey conducted by Qin and Badgwell in 2003 revealed that by the
end of 1999, there were over 4,500 MPC applications worldwide, primarily in oil refineries and
petrochemical plants. MPC has become the preferred method for challenging multivariable control
problems that involve inequality constraints in these industries.
The field of automatic control has a rich history that spans several decades. The development of
automatic control concepts can be traced back to the early 20th century. Below is a brief overview:
1
APR600 - MPC January 8, 2024
Pioneer and Early Developments:
1. Nikola Tesla (1856-1943)
Although not specifically focused on control theory, Tesla's work in the late 19th and early
20th centuries laid some groundwork for later developments. He explored feedback control
in the context of automatic regulation in electrical systems.
2. Nicolas Minorsky (1885-1970)
Often considered the father of modern control theory, Minorsky made significant
contributions in the 1920s. In 1922, he wrote a paper titled "Directional Stability of
Automatically Steered Bodies," which introduced the concept of feedback control.
Minorsky's work was applied to ship steering systems.
Introduction to Scientific Society:
The concept of feedback control was introduced to the scientific society in the early 20th century
through various publications and conferences. The term "cybernetics" was later coined by Norbert
Wiener in the 1940s to describe the study of communication and control in living organisms and
machines.
Developments Over the Years:
a. 1940s-1950s
The development of control theory accelerated with the advent of World War II, where engineers
worked on problems related to military systems. This led to advancements in linear control theory,
including stability analysis and frequency domain methods.
b. 1960s-1970s
The introduction of digital computers revolutionized control systems engineering. The field of
control theory expanded to include optimal control, state-space analysis, and the development of
computational techniques for solving control problems.
c. 1980s-Present
Robust control, nonlinear control, adaptive control, and model predictive control (MPC) emerged as
prominent areas of research. These approaches aimed to handle more complex and nonlinear
systems, and they found applications in diverse industries.
Motivations for Development:
i. Technological Advances: Advances in computing power and algorithms allowed for the
development of more sophisticated control methods, enabling the handling of complex
systems.
2
APR600 - MPC January 8, 2024
ii. Industry Needs: As technology evolved, industries faced the challenge of controlling
increasingly complex processes. Control theory provided solutions to improve system
performance, stability, and efficiency.
Applications:
Model Predictive Control (MPC) has found widespread acceptance and application in various
industrial and non-industrial areas. The reasons for its popularity lie in its ability to handle complex,
multivariable systems with constraints while optimizing performance over a predictive horizon. Here
are some application areas where MPC has been successfully adopted.
i. Chemical Process Industries:
MPC is extensively used in chemical plants for controlling processes with multiple interacting
variables. It can optimize reactor temperatures, concentrations, and other parameters while
considering constraints on safety, quality, and efficiency.
ii. Oil and Gas Industry:
MPC is applied in oil refineries and gas processing plants to control key variables such as
temperature, pressure, and composition. The ability to handle multivariable systems and constraints
is crucial in these processes.
iii. Power Systems and Energy Management:
MPC is used for optimal energy management in power plants and smart grids. It helps balance
electricity generation, storage, and distribution, considering constraints and variations in demand.
iv. Automotive Industry:
MPC is employed in advanced driver assistance systems (ADAS) and autonomous vehicles. It assists
in trajectory planning, vehicle stability control, and optimal energy management for hybrid and
electric vehicles.
v. Aerospace and Flight Control:
MPC is applied in aircraft and spacecraft control systems. It is used for trajectory tracking, altitude
control, and fuel-efficient flight path planning.
vi. Manufacturing Processes:
MPC is used in various manufacturing processes, such as semiconductor manufacturing and metal
processing. It optimizes production variables to improve quality and efficiency while adhering to
equipment and safety constraints.
vii. Building Automation and HVAC Systems:
MPC is applied in building management systems to optimize heating, ventilation, and air
conditioning (HVAC) systems. It helps in maintaining indoor comfort while minimizing energy
consumption.
viii. Water and Wastewater Treatment:
MPC is used in water treatment plants to optimize chemical dosing and control water quality
variables. In wastewater treatment, it assists in maintaining effluent quality within regulatory limits.
3
APR600 - MPC January 8, 2024
Method Behind Model Predictive Control (MPC):
Model Predictive Control is based on predictive models of the system's behavior. The method
involves:
I. System Modelling
Begin by developing a mathematical model of the system dynamics. The model should represent
how the system evolves over time in response to control inputs and disturbances.The model can
be based on first principles, empirical data, or a combination of both. It should capture the
essential dynamics of the system.
II. Discretization
Discretize the continuous-time model to obtain a discrete-time representation suitable for
discrete control actions. This is often done using numerical integration or discretization
techniques.
III. Prediction Horizon and Control Horizon
Define the prediction horizon (N) and the control horizon (M). The prediction horizon is the
number of future time steps over which the system behavior is predicted, while the control
horizon is the number of future time steps for which control inputs are optimized.
IV. Objective Function Formulation
Formulate an objective function that captures the control objectives. The objective function
typically includes terms related to setpoint tracking, disturbance rejection, and control effort
minimization.
The general form of the objective function is:
Where xk is the predicted state, xsp,k is the setpoint, uk is the control input, and Q and R are
positive definite weighting matrices.
V. Constraints Formulation:
Define constraints on the system states, control inputs, and other relevant variables. Constraints
may include bounds on states, control inputs, and terminal state constraints.
VI. Optimization Problem
Formulate the MPC problem as an optimization problem, seeking the control inputs that
minimize the objective function while satisfying the system constraints over the prediction
horizon. The optimization problem can be written as:
This will subject to system dynamics, state constraints, and input constraints.
4
APR600 - MPC January 8, 2024
VII. Real-Time Implementation
Implement the MPC algorithm in real-time. At each time step, solve the optimization problem to
obtain the optimal control inputs based on the current state and setpoints.
Apply the first element of the optimal control sequence to the system.
Update the state measurements and repeat the process at the next time step.
VIII. Iterative Process
MPC is an iterative process where the optimization problem is solved at each time step. As the
system evolves, the optimization is recalculated, and the control inputs are adjusted to account
for changes in the system dynamics.
IX. Adaptability
MPC is inherently adaptable to changes in the system, disturbances, and setpoint variations. The
predictive nature of MPC allows for proactive adjustments to optimize performance.
In summary, MPC involves the formulation of an optimization problem that minimizes a cost
function while considering system dynamics and constraints over a specified prediction horizon.
The real-time implementation of the MPC algorithm enables adaptive and optimal control of
complex systems.
Adaptive Cruise Control System(ACC)
The Adaptive Cruise Control System block emulates the functionality of an adaptive cruise
control (ACC) system. This system is designed to follow a specified velocity and ensure a secure
gap from a leading vehicle by regulating the longitudinal acceleration of the ego vehicle.
Employing model predictive control (MPC), the block calculates optimal control actions, ensuring
adherence to safety constraints related to distance, velocity, and acceleration.
5
APR600 - MPC January 8, 2024
Input Output
Set velocity Longitudinal Acceleration
Time gap
Longitudinal velocity
Relative distance
Relative velocity
Minimum longitudinal acceleration
Maximum longitudinal acceleration
Enable optimization.
Parameters
1. Ego Vehicle Model
• Linear model from longitudinal acceleration to longitudinal velocity
• Initial condition for longitudinal velocity
• Default spacing
• Maximum velocity
2. Adaptive Cruise Controller Constraints
• Minimum longitudinal acceleration
• Maximum longitudinal acceleration
3. Model Predictive Controller Settings
• Sample time
• Prediction horizon
• Controller behavior
Pending works
Extraction of graphical results from the Simulink model and modification of report on the basis of
IEEE standards.