Simulink design LQR controller

조회 수: 4 (최근 30일)
Alfred Darling
Alfred Darling 2016년 4월 29일
댓글: Drill Be 2017년 8월 14일
I need control this model with LQR controller.
I implemented the cost function with:
x=[Pm w] u=[a]
where, Pm is manifold pressure, w is the speed and a is the trhottle angle.
First step I have linearized the model with:
[a b c d]=linmod('Engine');
subsequently I use
K=lqr(a,b,q,r)
where I choose
q=[0.1 0 0 0;0 0.1 0 0;0 0 0.1 0;0 0 0 1] and r=500.
I have create the controller block in this mode:
I have an errors for this block : Error in port widths or dimensions. Output port 1 of 'eng1/Subsystem/Gain1' has 4 elements. This port does not accept the dimensions (or orientation) specified by the output signal.
Someone can you help me?
Thank you so much in advance.
  댓글 수: 1
Drill Be
Drill Be 2017년 8월 14일
How did you define the system matrices (a,b, c,d), what are the dimensions? It seems you q and r matrices are not appropriate size with system matrices.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 State-Space Control Design and Estimation에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by