Problem with getting a closed loop Simulink LQR response same as with an m.file
이전 댓글 표시
Hi there, I've a problem with getting response for my LQR regulator. I attach a file with data, which You should run before running a model for creating a statespace matrixes. I get this error.

I'm trying to get a closed loop response similar to tha last model here: http://ctms.engin.umich.edu/CTMS/index.php?example=AircraftPitch§ion=SimulinkModeling
why is this error occuring when my matrixes are for 2 states? When in mdl I change in State Space a value of matrix A from A to A-B*K I get the same response as in mfile.
답변 (1개)
Sebastian Castro
2015년 12월 8일
편집: Sebastian Castro
2015년 12월 8일
0 개 추천
Recall that LQR is a full-state feedback approach, but your C matrix is 1-by-2, meaning it only produces one output even though there are 2 states. There is your dimension mismatch.
For this to work, you want your state-space block to return all the states in the system. To do this, your C matrix has to be the identity matrix eye(2) and the D matrix, to match dimensions, should be [0;0]. You can then use this in your feedback loop.
Between the model output and the Scope block, you can add another Gain block with its gain set to your C matrix. Same with the inputs and your D matrix. That'll let you see the right signal on the scope.
I've attached an updated model that matches the figure. Note that I also changed the simulation time and max step size in the solver settings so the output looks smooth.
- Sebastian
카테고리
도움말 센터 및 File Exchange에서 State-Space Control Design에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!