This commit is contained in:
2018-11-27 11:24:39 +01:00
parent 53592c05a3
commit f08cba548e
6 changed files with 118 additions and 59 deletions

View File

@@ -163,12 +163,59 @@ open('stage_closed_loop.slx')
controlSystemDesigner('bode',sys);
controlSystemDesigner(1,sys); % <<<<<<<<< This opens a transferfiûnction that can be edited
1
num=[8.32795069e-11, 1.04317228e-08, 6.68431323e-05, 3.31861324e-03, 7.32824533e+00];
den=[5.26156641e-18, 1.12897840e-14, 7.67853031e-12, 1.03201301e-08, 2.05154780e-06, 1.34279894e-03, 7.19229912e-02, 1.00000000e+00];
mot2=tf(num,den);
controlSystemDesigner('bode',mot2);
end
m1=10; d1=10; k1=0;
m2=.3; d2=0.15; k2=100;
m3=1.2; d3=.04; k3=10;
%k2 determines resonance frequency k2 higher -> resfrq higher
%d2 determines the damping d2=0 no damping d2=10 strong damping
%m2 determines how much energy is in the resonance
%m1 is big compared to the other masses
%d1 is the speed dependant friction
%k1 can be set to 0, because these is no position for no force
%-> but this means for 1/s^2 the system is not observable any more
ks=k1+k2+k3;
ds=d1+d2+d3;
A=[ 0 1 0 0 0 0 ;
-ks/m1 -ds/m1 k2/m1 d2/m1 k3/m1 d3/m1 ;
0 0 0 1 0 0 ;
k2/m2 d2/m2 -k2/m2 -d2/m2 0 0 ;
0 0 0 0 0 1 ;
k3/m1 d3/m1 0 0 -k3/m3 -d3/m3 ];
B=[ 0 1 0 0 0 0]';
C=[ 1 0 0 0 0 0];
D=[0];
ss1=ss(A,B,C,D);
bodeplot(ss1,{.1,1000});
tf(ss1)
%simplified no resonance
A=[ 0 1 ;
-k1/m1 -d1/m1 ];
B=[ 0 1 ]';
C=[ 1 0 ];
D=[0];
ss1=ss(A,B,C,D);
bodeplot(ss1,{.1,1000});
tf(ss1)
chkCtrlObsv(ss1,'')
%but with k1=0 or d1=0 the system is neither controllable nor observable
%-> the
p = eig(A);
disp(p);
K = place(A,B,[-5 -10]);
end