Live data from Hacker News

Introduction to Model Predictive Control

arnavdhamija.com

1–10 of 16 posts

Re: Introduction to Model Predictive Control

#3
Can anyone more familiar with control theory recommend some simple projects / applications / simulations that might help learn more about this field? I've been interested in control theory for a while and I have a rough understanding of the math involved, but I feel like I need to tinker with something to really understand it!

Re: Introduction to Model Predictive Control

#4
post #3

Can anyone more familiar with control theory recommend some simple projects / applications / simulations that might help learn more about this field? I've been interested in control theory for a while and I have a rough understanding of the math involved, but I feel like I need to tinker with something to really understand it!

No post body was provided.

Re: Introduction to Model Predictive Control

#5
post #3

Can anyone more familiar with control theory recommend some simple projects / applications / simulations that might help learn more about this field? I've been interested in control theory for a while and I have a rough understanding of the math involved, but I feel like I need to tinker with something to really understand it!

simulating an inverted pendulum on a cart is a good starting point, introduced in basic control theory courses

Re: Introduction to Model Predictive Control

#6
post #3

Can anyone more familiar with control theory recommend some simple projects / applications / simulations that might help learn more about this field? I've been interested in control theory for a while and I have a rough understanding of the math involved, but I feel like I need to tinker with something to really understand it!

No post body was provided.

Re: Introduction to Model Predictive Control

#7
post #3

Can anyone more familiar with control theory recommend some simple projects / applications / simulations that might help learn more about this field? I've been interested in control theory for a while and I have a rough understanding of the math involved, but I feel like I need to tinker with something to really understand it!

First, control the speed of a DC Motor. Here you can learn about transfer functions and system dynamics, PID Controllers, pole allocation, Phase-lead/phase-lag and etc.

Then try to control the angle position of a DC Motor using a Cascade loop.

Then you can try to control an inverted pendulum on a cart using State Feedback. Here you can use pole allocation, or other methods to find your controller such as Optimal Control, or even MPC. I have a toy program in C to simulate and control an inverted pendulum using C. It is a Literate program and you can use it as a guide to implement in other languages: https://github.com/Accacio/pendulum.

If you are interested and have doubts, use the https://math.stackexchange.com and https://www.reddit.com/r/controlengineering/, we are eager to help

Re: Introduction to Model Predictive Control

#8
post #3

Can anyone more familiar with control theory recommend some simple projects / applications / simulations that might help learn more about this field? I've been interested in control theory for a while and I have a rough understanding of the math involved, but I feel like I need to tinker with something to really understand it!

The best demonstrations of control theory I've seen are water filling a tank (or water filling a tank that has a hole that fills another tank), balancing a ball on a rotating stick or tilting board, car cruise control (especially with hills added)...

In my opinion, the biggest obstacle is being able to sense your target. For the pendulum, you'll need a magnetic angle sensor or an encoder or a good/fast OpenCV angle identifier. For the water tank, you have different feedback options: resistive, floating ball (that can be tied to a regular sensor or identified by OpenCV), weight (although most household scales don't have a clean method of exporting to your controller), and more. I would only do a ball balancing demo with OpenCV.

The difficulty with OpenCV is having to run it on a computer and communicate with your motor controller OR having to run it on a fairly powerful evaluation board (e.g. Raspberry Pi). For this reason, I wouldn't recommend it unless you're comfortable connecting to your controller via USB/serial port.

Changing your goals will really highlight the differences between algorithms: getting to a stationary point, getting to a stationary point as accurately as possible, getting to a stationary point as quickly as possible, following a steadily changing predefined path as accurately as possible, traversing the same path as quickly as possible, following the path without overshooting any boundaries.

Just replace "path" with the appropriate physical system e.g. filling the double tank as quickly as possible without spilling from either tank; speeding up a motor with inertia as quickly as possible without exceeding some angular velocity.

When you want to move to really cool but reasonably difficult demos, look for videos and papers (Google Scholar) on "ball and plate", such as https://www.youtube.com/watch?v=wqmP-y-a2qY

Re: Introduction to Model Predictive Control

#9
post #3

Can anyone more familiar with control theory recommend some simple projects / applications / simulations that might help learn more about this field? I've been interested in control theory for a while and I have a rough understanding of the math involved, but I feel like I need to tinker with something to really understand it!

There's someone on reddit who is teaching a class on control theory looking for suitable references which may be of interest to you

https://old.reddit.com/r/math/comments/rws8b9/my_class_on_co...

Re: Introduction to Model Predictive Control

#10
Early in the article it introduces the A state transition matrix and B the input matrix. What is the intuition of those matrices and where do you get them from? It seems to assume a background in Optimal Control.

The article would be better if it explained those matrixes A and B more in detail with a few simple examples. (maybe it did, but I stopped reading after that, since it builds on top of those undefined concepts)

Post reply on HN