How to run an H-infinity controller in an inverted pendulum?
조회 수: 6 (최근 30일)
이전 댓글 표시
Hello,
I try to run this code but mixsyn doesn't work. Do you have any solution or suggestion?
And what wheights do you suggest in this problem?
Thank you!
syms s
A=[0 1 0 0; 0 0 0 0; 0 0 0 1; 0 0 29.4 0];
B=[0;1;0;3];
C=[1 0 0 0; 0 0 1 0];
D=[0; 0];
sys = s*eye(4,4)-A;
sys_1 = inv(sys);
SyS = C*sys_1*B+D;
W1 = makeweight(10,[0.25,5],0.1)
W2 = makeweight(10,[0.25,5],0.1)
W3 = makeweight(10,[0.25,5],0.1)
[K,CL,gamma] = mixsyn(SyS,W1,W2,W3)
댓글 수: 0
답변 (1개)
Tushar Mathur
2021년 2월 5일
Hello,
I understand that you are trying to perform mixed-sensitivity loop shaping to design an H-infinity controller for a system specified as a symbolic expression. Following is your code snippet to create the model.
syms s
A=[0 1 0 0; 0 0 0 0; 0 0 0 1; 0 0 29.4 0];
B=[0;1;0;3];
C=[1 0 0 0; 0 0 1 0];
D=[0; 0];
sys = s*eye(4,4)-A;
sys_1 = inv(sys);
SyS = C*sys_1*B+D;
Here, SysS will be created as a symbolic expression.
mixsyn only supports a dynamic system model, such as a state space (ss) or a transfer function (tf), as an input argument. To create a transfer function model, replace symbolic variable s with the variable created using the tf command as shown in the following code snippet.
s = tf('s')
A=[0 1 0 0; 0 0 0 0; 0 0 0 1; 0 0 29.4 0];
B=[0;1;0;3];
C=[1 0 0 0; 0 0 1 0];
D=[0; 0];
sys = s*eye(4,4)-A;
sys_1 = inv(sys);
SyS = C*sys_1*B+D;
You can then use mixsyn function to design your controller.
For more information on how to set up the problem and choose weights, see Mixed-Sensitivity Loop Shaping.
Thanks,
Tushar
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 H-Infinity Synthesis에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!