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

조회 수: 6 (최근 30일)
Tenzing Thiley
Tenzing Thiley 2022년 2월 15일
편집: Bhavana Ravirala 2022년 2월 18일
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');

답변 (1개)

Bhavana Ravirala
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!

카테고리

Help CenterFile Exchange에서 Schedule Model Components에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by