File Exchange

image thumbnail

Simulink Block of LQR

version 1.0.0.0 (16.1 KB) by Gurkan KAVURAN
Simulink Block of LQR

33 Downloads

Updated 09 May 2018

View License

It is easy to optimize Q and R matrices with online process.
Please see the help file to define the block parameters.

Cite As

Gurkan KAVURAN (2020). Simulink Block of LQR (https://www.mathworks.com/matlabcentral/fileexchange/67268-simulink-block-of-lqr), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (3)

I made this work and got rid of the ''To RESHAPE the number of elements must not change.'' error by going under the mask of the LQR block, double clicking the mRicatti block to open the function in MATLAB, and then commented out the line "X = reshape(X, size(A)); %Convert from "n^2"-by-1 to "n"-by-"n" ", then saved it. Compared the K values from the block to the actual MATLAB LQR function and they were identical.

Merhaba,

Tam olarak aradığım şey buydu. Çok teşekkürler. Ancak ben bunu çalıştırınca hata veriyor. ''To RESHAPE the number of elements must not change.'' şeklinde bir hata alıyorum. Matrislerim 'A(4x4), B(4x2), Q(4x4), R(2x2)' şeklinde. Yardımcı olabilir misiniz?

Updates

1.0.0.0

-screen shot added

MATLAB Release Compatibility
Created with R2014a
Compatible with any release
Platform Compatibility
Windows macOS Linux