Model I/O dimensions must agree in feedback(Using struct file to find Robustness in a control system)

29 vues (au cours des 30 derniers jours)
Hello,
New to the Robust Control System toolbox. Watching some videos to guide me. I am following his code and get the error below that is commented out. Why is this and what can i do to correct this? The matrix Gunc*k is a 4x1 uncertain state space model and eye(4) is the 4x4 identity matrix. His program seems to work so im not sure what i am doing wrong. Thank you.
video link: https://youtu.be/Oq4qbp-vKt0
>> k = ureal('k',1,'percent',30);
>> m1 = ureal('m1',1,'percent',10);
>> m2 = ureal('m2',1,'percent',20);
>> A = [0, 1, 0, 0; -k/m1, 0, k/m1 0; 0, 0, 0, 1; k/m2, 0, -k/m2, 0];
>> B = [0; 1/m1; 0; 0];
>> C = eye(4);
>> D = [0;0;0;0];
>> Gunc = ss(A, B, C, D)
>> gcl = feedback(Gunc*k,eye(4))
% Error using InputOutputModel/feedback (line 137)
% The first and second arguments of the "feedback" command must
% have compatible I/O sizes.

Réponse acceptée

Uday Pradhan
Uday Pradhan le 3 Sep 2020
Hello Johnathon,
The error is due to the incorrect usage of variable "k". According to the video you referred, the correct line should be
gcl = feedback(Gunc*K,eye(4)); % where K is the optimal gain matrix not the uncertain parameter k
You can access the full live script shown in the video tutorial here. Please refer to the "Design an LQR controller" section of this script to find the definition of "K".
Hope this resolves the issue.

Plus de réponses (0)

Catégories

En savoir plus sur Robust Control Toolbox dans Help Center et File Exchange

Produits


Version

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by