Model I/O dimensions must agree in feedback(Using struct file to find Robustness in a control system)
12 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Johnathon Street
el 30 de Ag. de 2020
Comentada: Johnathon Street
el 5 de Sept. de 2020
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.
0 comentarios
Respuesta aceptada
Uday Pradhan
el 3 de Sept. de 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.
Más respuestas (0)
Ver también
Categorías
Más información sobre Robust Control Toolbox en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!