Main Site Documentation

LQR controller


Has anyone implemented LQR controller on his robot?
I have been doing research on this LQR stuff and i still can’t understand how it work.

Any useful link for me to refer?? ???





LQR = linear quadratic regulator

Clear now? ;D


Still a strange post.
No code, no reference, no nothing…

Oh no, -there is your problem…


This is an advanced control system question. This forum is probably not the place to go for help. However MIT did have a online lecture series that touched on this about 3 years ago. Drink 2 or three Red Bulls and pop 4 Advils before you attempt to watch it.


LOL, I guess this doesn’t help…

From Wikipedia:


You should check Matlab help. There is a nice explanation about how to calculate the LQR control of a system. By the way, you have a lot of constraints on sample time using FEZ, there would be little benefit of using an LQR control over a simple PID… except if your system is a little tricky…


Can you explain more about the constraints on sample time?


The FEZ isn’t real time, but I haven’t had any issues with this, and I am running a headinghold autopilot. See my PID class on FEZZer.


So is it meaning that LQR controller would only perform better if we implementing it in real time?
Otherwise, it is almost the same as PID?


So having some clue here. What are you planning on implementing a LQG(Linear quadratic Gaussian) system on that needs LQR(Linear quadratic regulator). LQG does not have to be real time. So that would mean LQR does not also. The real question is what white noise are you trying to filter? Since this style of system is all about that. Gyro drift? Slippage acceleration misreadings?

The question you post about PID scare me in to believing you need to work with the simpler forums of closed loop control like that before you step into LQR. Which creates multiple layers of filtering to account for the unknown/known white noise effect. Just fill me in with some of the blanks and i will see what we can do to help you in the right direction.


I am actually trying to balance the robot when climbing stairs.
The input will be the data from accelerometer.


Is it a 2 wheel robot like a Segway ?

If it is you should consider to use a giro to measure angular velocity…


Its a tracked robot…