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

30 ビュー (過去 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 Center および File ExchangeSchedule Model Components についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by