
![]()
LQR
(Pseudo State Feedback)
The Linear Quadratic Regulator design is represented by the computation of the optimal gain matrix Ksf such that the state feedback law u(t) = -Ksf x(t) minimizes the cost function J
J
= integral{ xT(t) Q x(t) + uT(t) R u(t) }dt
where x(t) and u(t) are respectively the state and input vector. Q and R, which are the square matrices of the weighs for the plant state and input, must be symmetric and respectively positive semi definite and positive definite.
The LQR subsection is made up of the only following window

If a matrix has size less or equal to 10x10, the relative button allows to visualize all its coefficients, and the user is able to modify any of them; instead if a matrix can't be displayed on the window, it's possible to fix only the value T such that mat_name = T*eye(size(mat_name)). The changes introduced become effective only through the function associated with the SAVE MATRIX button that, if the matrix is correct, save it modifying the string of the relative button in [mat_name].
When both the matrices have been saved, the button COMPUTE LQR appears so the user can start the controller computation pressing it. The activation of the two buttons EVALUATION and SIMULATION notifies that the state feedback gain matrix Ksf has been correctly computed and remapped in the output feedback controller Kof.
![]()
![]()