How to use MATLAB's lqi.m function?
69 ビュー (過去 30 日間)
古いコメントを表示
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.
0 件のコメント
回答 (1 件)
Sam Chak
2023 年 5 月 8 日
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
sys = ss(A-B*K, B, C, D);
N = 1/dcgain(sys) % scale at the reference input
sys = ss(A-B*K, B*N, C, D) % closed-loop system with scaled input
step(sys), grid on
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!