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)

回答(1 个)

Tushar Mathur
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 about input arguments supported by mixsyn, see mixsyn function reference page.
For more information on how to set up the problem and choose weights, see Mixed-Sensitivity Loop Shaping.
Thanks,
Tushar

类别

Help CenterFile Exchange 中查找有关 H-Infinity Synthesis 的更多信息

产品


版本

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by