Is it possible to manually connect the ABCD matrices to obtain the ss representation

3 ビュー (過去 30 日間)
josue pareja
josue pareja 2021 年 3 月 12 日
回答済み: Paul 2021 年 3 月 13 日
I know that the ss of the ABC and D matrices can be obtained by using the comman ss, but it is possible to do it manually through connect, i tried to do this:
clc;
clear all;
k = 1;
m = 1;
b = 1;
A = [0 1; -k/m -b/m];
B = [0 1/m]';
C = [1 0];
D = [0];
a = tf(A);
a.u = 'x';
a.y = 'dxa';
b = tf(B);
b.u = 'uc';
b.y = 'dxb';
Sum1 = sumblk('dx = dxa + dxb');
c = tf(C);
c.u = 'x';
c.y = 'yc';
d = tf(D);
d.u = 'uc';
d.y = 'yd';
Sum2 = sumblk('y = yc + yd');
integrator = inv(tf('s'));
integrator.u = 'dx';
integrator.y = 'x';
T = connect(a,b,c,d,Sum1,Sum2,integrator,'uc','y');
Its block diagram is the common SS blocks interconection but I added my signals for reference:
but I get this warning message:
Warning: The following block inputs are not used: dxa,dxb,x(1),x(2).
> In DynamicSystem/connect (line 265)
In interconectando (line 45)
Warning: The following block outputs are not used: dxa(1),dxa(2),dxb(1),dxb(2),x.
> In DynamicSystem/connect (line 270)
In interconectando (line 45)
What could i be doing wrong? because the T system is empty, therefore the interconnection was wrong.

採用された回答

Paul
Paul 2021 年 3 月 13 日
Need to modify two lines of code as follows:
clc;
clear all;
k = 1;
m = 1;
b = 1;
A = [0 1; -k/m -b/m];
B = [0 1/m]';
C = [1 0];
D = [0];
a = tf(A);
a.u = 'x';
a.y = 'dxa';
b = tf(B);
b.u = 'uc';
b.y = 'dxb';
Sum1 = sumblk('dx = dxa + dxb',2); % need the second argument for vector signals.
c = tf(C);
c.u = 'x';
c.y = 'yc';
d = tf(D);
d.u = 'uc';
d.y = 'yd';
Sum2 = sumblk('y = yc + yd');
integrator = eye(2)/tf('s'); % two integrators for two states
integrator.u = 'dx';
integrator.y = 'x';
T = connect(a,b,c,d,Sum1,Sum2,integrator,'uc','y');

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAnalog Filters についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by