LQR Robotic Arm

861 Views Asked by At

I have a robotic arm model in Simulink and I'd like to control the position of the end-effector such that it follows a given trajectory. This is done by inputting joint angles and comparing the output to see whether the desired angles have been reached.

From PID controller, I have moved on to an LQR controller which requires me to linearize the plant(Robot Arm) before being able to apply the controller.

My first questions is about linearization. If I were to do this, it would be around a fixed/ equilibrium point whereby the linearization would only be valid for that given region. How can I obtain a complete linearized model of my system which would be valid for all point as I would like to control the joint angles to manipulate the position of the end effector?

Second question is how would I derive a trajectory following Linear Quadratic Regulator control law. The laws I have seen only make sense for reaching a fixed point. I would like to continuously change that fixed point. Any ideas? https://i.stack.imgur.com/uIMlO.png

1

There are 1 best solutions below

4
On

By the definition of LQR (linear quadratic regulator) so you can't apply it to nonlinear systems. Namely "linear" refers to linear system (and "quadratic" refers to the cost function). You could generalize it to nonlinear systems, which turns it into a optimization problem. For nonlinear systems this might not have an unique solution, since the problem could be non-convex.

A better alternative might be input-output linearization. From the information you have given I assume the dynamics are of the form

$$ M\,\ddot{q} + C(q,\dot{q}) + K(q) = \tau. $$

This can also be written as

$$ M\,\ddot{q} = \tau - C(q,\dot{q}) - G(q) = -K\,q - D\,\dot{q} + \tau - f(q,\dot{q}) $$

where $K$ and $D$ capture all the linear terms in $q$ and $\dot{q}$ respectively and $f(q,\dot{q})$ capture all the remaining nonlinear dynamics. Now my defining a new input as

$$ v = \tau - f(q,\dot{q}) $$

then you can define the state space model as

$$ \dot{x} = \begin{bmatrix} 0 & I \\ -M^{-1}\,K & -M^{-1}\,D \end{bmatrix} x + \begin{bmatrix} 0 \\ M^{-1} \end{bmatrix} v $$

where $x = \begin{bmatrix}q^\top & \dot{q}^\top\end{bmatrix}^\top$. This can be solved with LQR, such that $v$ can be expressed as state feedback. However the quadratic term in $v$ of the cost function ($v^\top R\,v$) might not be as meaningful as when you define the cost function using $u$ instead.

And as for your second question about following a changing reference you could look at LQI. It is also worth mentioning that feedforward can do wonders in reference tracking also.