Hello,
I'm trying to figure out how to use MATLAB's lqi.m function, but the documentation of the function is somewhat vague and unfortunately does not run through an exmaple. I have the following system that I would like to implement:
, , ,
As for the weighting matrices Q, and R, I will end up choosing and modifying them based on results. They're important, but they aren't the issue I'm experiencing. I would like to try and use the lqi function on the above system to track the output to be 1. How can I do this? I know I need to use the lqi.m function but I don't know how to use it. How do I specify the input r? Or how do I design for this at all? Can someone give me an in-depth example of this?
Thank you for your patience and time
edit: I forgot to mention the system is in discrete time with a step interval of Ts = 1. Apologies.

답변 (1개)

Sam Chak
Sam Chak 2023년 5월 8일

0 개 추천

I'm unfamiliar with you system. So, I tested with the LQR first.
It seems that a properly scaled step input can make the control system track it.
A = [1.1 2.0;
0.0 0.95];
B = [0;
0.0787];
C = [-1 1];
D = 0;
K = lqr(A, B, eye(2), 1) % control gain matrix
K = 1×2
28.8132 52.2105
sys = ss(A-B*K, B, C, D);
N = 1/dcgain(sys) % scale at the reference input
N = -4.3461
sys = ss(A-B*K, B*N, C, D) % closed-loop system with scaled input
sys = A = x1 x2 x1 1.1 2 x2 -2.268 -3.159 B = u1 x1 0 x2 -0.342 C = x1 x2 y1 -1 1 D = u1 y1 0 Continuous-time state-space model.
step(sys), grid on

댓글 수: 1

Craig Chambers
Craig Chambers 2023년 5월 8일
Hello Sam, thanks! This is an interesting approach using the DC gain of the system. Not the solution I had in mind but this is also something else to consider. Truth be told I was only looking at LQI since other posts pointed to it.
I forgot to mention the system is discrete with time step interval of 1 but I don’t think that changes the approach as much. I’ll make an edit. Thanks.

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

질문:

2023년 5월 8일

편집:

2023년 5월 8일

Community Treasure Hunt

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

Start Hunting!

Translated by