Is it possible to manually connect the ABCD matrices to obtain the ss representation
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponse acceptée
Paul
le 13 Mar 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 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Analog Filters dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!