Emulating a PID Controller with Long Short-term Memory. Using the Temperature Control Lab to create Proportional-Integral-Derivative controller data
Do you ever just get really excited about an idea? Maybe it’s a new DIY project you’re tackling, or a cool assignment at work. Maybe you’re crazy like me and want to hike the Pacific Crest Trail (as I’m moving to Seattle soon, so I can’t help but get excited about the idea of flying down to San Diego and walking home). Well, this project is one of those types of ideas for me, and I hope you enjoy the ride!
Before I get started, though, I want to warn you that this is quite an extensive project, and so I’m breaking it up into parts. They will be as follows:
While working on a project for work one day, I came across a paper that introduced a novel idea. Some researchers had the idea to emulate the behavior of a model predictive control (MPC) strategy using a neural network. The idea was that some MPC problems are extremely computationally expensive, but the behavior is predictable;** if we could emulate that behavior by training a deep neural network, we could, in theory, replace the computationally expensive MPC with a much faster machine learning model.** The only computationally expensive part of the process would be the model training.
The really neat part of this is that I test the idea here at my desk. The Temperature Control Lab is perfectly designed to prototype this kind of problem. I introduced the TCLab and some basic anomaly detection you can do with machine learning in an earlier post. If you’re new to the TCLab, you can check out my article, or look at the abundant resources at APMonitor.com.
So here’s what I decided to try: I wanted to tune a Proportional-Integral-Derivative (PID) controller so I could set a temperature on the TCLab and the controller would adjust the heater until it hit that setpoint. Then, I wanted to see if I could emulate this behavior with a Long Short-term Memory neural network. If this prototype worked, it would open the doors for not only improving computational speed, but also applications such as anomaly detection.
This series is about the machine learning, so if you’re not familiar with PID controllers or control theory, that’s perfectly fine; we’ll just hit a few highlights so you understand the context. There are some amazing resources at APMonitor.com to help you understand PID controllers and how to tune them. These controllers are ubiquitous in engineering industry, and so the potential applications for this are numerous.
How To Plot A Decision Boundary For Machine Learning Algorithms in Python, you will discover how to plot a decision surface for a classification machine learning algorithm.
You got intrigued by the machine learning world and wanted to get started as soon as possible, read all the articles, watched all the videos, but still isn’t sure about where to start, welcome to the club.
What is neuron analysis of a machine? Learn machine learning by designing Robotics algorithm. Click here for best machine learning course models with AI
Python For Machine Learning | Machine Learning With Python, you will be working on an end-to-end case study to understand different stages in the Machine Learning (ML) life cycle. This will deal with 'data manipulation' with pandas and 'data visualization' with seaborn. After this an ML model will be built on the dataset to get predictions. You will learn about the basics of scikit-learn library to implement the machine learning algorithm.
Python for Machine Learning | Machine Learning with Python, you'll be working on an end-to-end case study to understand different stages in the ML life cycle. This will deal with 'data manipulation' with pandas and 'data visualization' with seaborn. After this, an ML model will be built on the dataset to get predictions. You will learn about the basics of the sci-kit-learn library to implement the machine learning algorithm.