How to run an H-infinity controller in an inverted pendulum?
6 views (last 30 days)
Show older comments
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 Comments
Answers (1)
Tushar Mathur
on 5 Feb 2021
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 Comments
See Also
Categories
Find more on H-Infinity Synthesis in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!