Introduction to Machine Learning Based Model Predictive Control

Abebe S.
6 min readMar 13, 2023

--

Model Predictive Control (MPC) is a popular technique in control engineering for controlling complicated systems. As real-world systems are nonlinear dynamic systems, engineers frequently encounter difficulties while attempting to control complicated, nonlinear processes in current control systems. There are limitations on how conventional model predictive control (MPC) may solve these problems. Nevertheless, there has been a trend toward Machine Learning Based Model Predictive Control with the development of machine learning (ML) techniques and development of powerful and computationally efficient hardware's.

DALL·E — Robotic arm pilling an onion, digital art

In the previous blog, we discussed A Comparison of Model-Based MPC and Machine Learning MPC. In this article, we will discuss the importance and relevance of Machine Learning Based Model Predictive Control in modern control systems. We will see the concept of machine learning in control systems, define Machine Learning Based MPC and its main components, discuss the benefits of using Machine Learning Based MPC, address its challenges, and conclude by emphasizing the importance of Machine Learning Based MPC in modern control systems.

Model Predictive Control (MPC)

As discussed in a previous blog post, MPC is a control strategy that uses a model of the system to predict future behavior and optimize control actions. The model is typically based on mathematical equations that describe the system’s behavior. While Model based MPC has been widely used in control systems, it has limitations when dealing with complex, nonlinear processes. These limitations include the need for accurate models, the inability to adapt to changes in the process, and the difficulty in optimizing control actions.

Introduction to Machine Learning (ML) in Control Systems

Machine learning is a subfield of artificial intelligence that involves developing algorithms that can learn patterns from data without being explicitly programmed. ML has been used in a variety of applications, including control systems. Using ML in control systems allows for better accuracy in predicting future behavior and optimizing control actions. In addition, ML algorithms can adapt to changes in the process and learn from new data, making them a powerful tool for control systems.

Machine Learning Based MPC

Machine Learning Based MPC is an approach that combines traditional MPC with machine learning techniques. It involves using ML algorithms to improve the accuracy of the system model, predict future behavior, and optimize control actions. The main components of Machine Learning Based MPC include data collection, model training, and control optimization.

Data collection involves gathering data from sensors and other sources that provide information about the system’s behavior. This data is then used to train the ML algorithms to predict future behavior and optimize control actions. The ML algorithms can learn from new data and adapt to changes in the process, making them a powerful tool for control systems.

Control optimization involves using the ML algorithms to optimize control actions based on the predicted future behavior. The ML algorithms can find the optimal control actions that achieve the desired control objectives while taking into account constraints such as input and output limits.

Benefits of Machine Learning Based MPC

Using Machine Learning Based MPC in control systems has several benefits. One of the most significant benefits is improved accuracy in predicting future behavior and optimizing control actions. ML algorithms can learn from data and adapt to changes in the process, allowing for better accuracy in predictions and more efficient control actions. In addition, ML algorithms can handle complex, nonlinear processes that traditional MPC may not be able to handle.

Another benefit of Machine Learning Based MPC is the ability to automate the control system. With ML algorithms, the control system can learn from data and adjust control actions without the need for human intervention. This automation can lead to increased efficiency and cost savings.

Benefits of ML-MPC:

  • Improved accuracy in predicting future behavior and optimizing control actions
  • ML algorithms can learn from data and adapt to changes in the process, allowing for better accuracy in predictions and more efficient control actions
  • ML algorithms can handle complex, nonlinear processes that traditional MPC may not be able to handle
  • Ability to automate the control system, leading to increased efficiency and cost savings

Challenges in Machine Learning Based MPC

While Machine Learning Based MPC has many benefits, there are also challenges in implementing it. One of the biggest challenges is the need for large amounts of data to train the ML algorithms. In addition, ML algorithms can be complex and difficult to interpret, which can make it difficult to understand how the control system is making decisions. Finally, ML algorithms can be computationally intensive, requiring powerful computers to run the optimization algorithms in real time.

Another challenge is the selection and tuning of hyperparameters (Learning rate, Number of hidden layers, Number of neurons in each hidden layer, Activation functions, Dropout rate, Batch size, Number of epochs, Regularization parameters (e.g., L1, L2 regularization), Loss function, Optimizer (e.g., SGD, Adam, RMSprop) etc…). Hyperparameters are parameters of the ML algorithm that are not learned during training, but must be set beforehand. The selection of hyperparameters can significantly impact the performance of the ML-MPC algorithm, and there is no one-size-fits-all solution for choosing the optimal values.

Furthermore, the safety and robustness of ML-MPC systems can be a concern, as ML algorithms may not always generalize well to new situations, and may be susceptible to unexpected behaviors or disturbances. It is important to perform rigorous testing and validation of ML-MPC systems before deployment to ensure that they are safe and reliable.

In addition, there may be challenges in integrating ML-MPC systems with existing control architectures and infrastructure. This may require significant changes to the software and hardware of the control system, which can be costly and time-consuming.

Challenges in ML-MPC:

  • Need for large amounts of data to train ML algorithms
  • ML algorithms can be complex and difficult to interpret
  • Computationally intensive, requiring powerful computers to run optimization algorithms in real time
  • Selection and tuning of hyperparameters is a challenge
  • Safety and robustness concerns as ML algorithms may not always generalize well to new situations
  • Integration with existing control architectures and infrastructure may require significant changes

Despite these challenges, the potential benefits of Machine Learning Based MPC make it a promising approach for a wide range of control applications. As the field of ML-MPC continues to develop, it is likely that many of these challenges will be addressed through advances in data acquisition, algorithm development, and system integration.

Conclusion

In summary, in this blog post, we have covered the basics of machine learning-based model predictive control. We have discussed ML-MPC, the advantages of using machine learning in MPC, and the challenges in the ML-MPC formulation process.

In the next blog post, we will dive deeper into the ML-MPC algorithm and discuss how to train a neural network for prediction in MPC, including different techniques such as offline and online training, regularization, and cross-validation.

References

  1. Cutler, C. R., & Brewe, D. E. (2018). Machine learning in model predictive control: Recent developments and challenges.
  2. Zhang, W., & Tao, G. (2019). Machine learning for model predictive control: A review.
  3. Rawlings, J. B., Mayne, D. Q., & Diehl, M. (2017). Model predictive control: theory and design.
  4. Allerhand, E., Katrakazas, C., Mente, E., & Lymperopoulos, I. (2021). A comprehensive review of deep learning-based model predictive control for autonomous systems.

--

--

Abebe S.

Mechatronics | AI and Robotics | Model Predictive Control | Reinforcement Learning