Error using InputOutputModel/feedback (line 137)
28 次查看(过去 30 天)
显示 更早的评论
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');
0 个评论
回答(1 个)
Bhavana Ravirala
2022-2-18
编辑:Bhavana Ravirala
2022-2-18
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!
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Schedule Model Components 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!