Error using InputOutpu​tModel/fee​dback (line 137)

29 visualizaciones (últimos 30 días)
Tenzing Thiley
Tenzing Thiley el 15 de Feb. de 2022
Editada: Bhavana Ravirala el 18 de Feb. de 2022
Error using InputOutputModel/feedback (line 137)
The first and second arguments of the "feedback"
command must have compatible I/O sizes.
A = [-0.040493 9.8689 0 -9.81;
-0.0021967 -0.030908 1 0;
-0.013639 -0.015207 -0.42801 0;
0 0 1 0];
B = [3.2952 0;
0 -0.0020488;
0 -0.068204;
0 0];
C = [1 0 0 0;0 1 0 0;0 0 1 0;0 0 0 1];
D = [0 0;0 0;0 0;0 0];
hzpk = zpk(ss(A,B,C,D))
pole(hzpk);
t = [0:0.01:10];
step(0.2*hzpk,t);
axis([0 10 0 0.8]);
ylabel('pitch angle (rad)');
title('Open-loop Step Response');
sys_cl = feedback(hzpk,1);
step(0.2*sys_cl);
ylabel('pitch angle (rad)');
title('Closed-loop Step Response');

Respuestas (1)

Bhavana Ravirala
Bhavana Ravirala el 18 de Feb. de 2022
Editada: Bhavana Ravirala el 18 de Feb. de 2022
Hi Tenzing,
From my understanding, you are trying to give positive feedback to your system and gain of feedback block is one. But your system has 2 inputs and 4 outputs. So, you need to mention from which output you would like to give feedback to which input of the system.
For example:
feedin=[1]; % feedback should be given to 1st input of the block
feedout=[1]; %feedback is taken from 1st output of the block
sys_cl=feedback(hzpk,1,feedin,feedout,1); % first one represents the gain of the feedback block and the other one represents the positive feedback
For knowing no.of inputs and outputs of the system
size(hzpk);
For more information refer the documentation below:
Hope this helps!

Categorías

Más información sobre Schedule Model Components en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by