Is it possible to manually connect the ABCD matrices to obtain the ss representation
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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.
0 Kommentare
Akzeptierte Antwort
Paul
am 13 Mär. 2021
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 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Analog Filters finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!