commit 45930b6b4e539299ab46c3e1b83c5d388c1eac06 Author: Gwenn Durpoix-Espinasson Date: Sun Jan 22 11:06:49 2023 +0100 screenshots added diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..9424a16 Binary files /dev/null and b/.DS_Store differ diff --git a/labcontroltheory2b/.DS_Store b/labcontroltheory2b/.DS_Store new file mode 100644 index 0000000..4286827 Binary files /dev/null and b/labcontroltheory2b/.DS_Store differ diff --git a/labcontroltheory2b/lab_controltheory2b.m b/labcontroltheory2b/lab_controltheory2b.m new file mode 100755 index 0000000..cf83d6b --- /dev/null +++ b/labcontroltheory2b/lab_controltheory2b.m @@ -0,0 +1,64 @@ +clc; +close all; +clear all; + +Q0=3.7958e-5; +C10=11.08e-5; +C20=8.43e-5; +C30=8.28e-5; +H10=(Q0/C10)^2; +H20=(Q0/C20)^2; +H30=(Q0/C30)^2; +s=0.25*0.035; + +A=[-C10*(1/(2*s*sqrt(H10))), 0, 0; C10*(1/(2*s*sqrt(H10))), -C20*(1/(2*s*sqrt(H20))), 0; 0, C20*(1/(2*s*sqrt(H20))), -C30*(1/(2*s*sqrt(H30)))]; +B=[-sqrt(H10)*(1/s), 0, 0; sqrt(H10)*(1/s), -sqrt(H20)*(1/s), 0; 0, sqrt(H20)*(1/s), -sqrt(H30)*(1/s)]; +C=[1,0,0;0,1,0;0,0,1]; +D=zeros(3, 3); +A +B +C +D +I=[1 0 0; 0 1 0; 0 0 1]; + +model=ss(A, B, C, D) +[NUM1, den1]=ss2tf(A,B,C,D,1); +[NUM2, den2]=ss2tf(A,B,C,D,2); +[NUM3, den3]=ss2tf(A,B,C,D,3); + +TFM(1,1)=tf(NUM1(1,:),den1); +TFM(2,1)=tf(NUM1(2,:),den1); +TFM(3,1)=tf(NUM1(3,:),den1); +TFM(1,2)=tf(NUM2(1,:),den2); +TFM(2,2)=tf(NUM2(2,:),den2); +TFM(3,2)=tf(NUM2(3,:),den2); +TFM(1,3)=tf(NUM3(1,:),den3); +TFM(2,3)=tf(NUM3(2,:),den3); +TFM(3,3)=tf(NUM3(3,:),den3); +TFM; + +if rank([B, B*A, B*A^2])==3 + disp('is completely state controllable'); +end + +if rank([C*B, C*A*B, C*(A^2)*B, D])==3 + disp('is completely output controllable'); +end + +if rank([C', A'*C', ((A')^2)*C'])==3 + disp('is completely observable'); +end + +% u is composed of C1 C2 C3 +% u = -k x(t) +% K = k11 k12 k13; k21 k22 k23.. +% X is H1-H10 ; H2-H20.. +P=eig(A); +% p=[P(1,1); P(2,1); P(3,1)]; +% unstable pole should be stabilized +% real part of the pole should be negative time domain or in discrete pole should be in the unit circle +p=[-14.5;-9.0;-23]; +K = place(A,B,p); +eig(A-B*K) +% q=[]; +% L = place(A',C',q).'; \ No newline at end of file diff --git a/labcontroltheory2b/lab_controltheory2b_2.slx b/labcontroltheory2b/lab_controltheory2b_2.slx new file mode 100755 index 0000000..2720a86 Binary files /dev/null and b/labcontroltheory2b/lab_controltheory2b_2.slx differ diff --git a/labcontroltheory2b/lab_controltheory2b_2.slxc b/labcontroltheory2b/lab_controltheory2b_2.slxc new file mode 100755 index 0000000..3ea7ccc Binary files /dev/null and b/labcontroltheory2b/lab_controltheory2b_2.slxc differ diff --git a/labcontroltheory2b/slprj/.DS_Store b/labcontroltheory2b/slprj/.DS_Store new file mode 100644 index 0000000..3a1b13f Binary files /dev/null and b/labcontroltheory2b/slprj/.DS_Store differ diff --git a/labcontroltheory2b/slprj/sim/.DS_Store b/labcontroltheory2b/slprj/sim/.DS_Store new file mode 100644 index 0000000..3b393c0 Binary files /dev/null and b/labcontroltheory2b/slprj/sim/.DS_Store differ diff --git a/labcontroltheory2b/slprj/sim/varcache/lab_controltheory2b_2/checksumOfCache.mat b/labcontroltheory2b/slprj/sim/varcache/lab_controltheory2b_2/checksumOfCache.mat new file mode 100755 index 0000000..8ec570b Binary files /dev/null and b/labcontroltheory2b/slprj/sim/varcache/lab_controltheory2b_2/checksumOfCache.mat differ diff --git a/labcontroltheory2b/slprj/sim/varcache/lab_controltheory2b_2/tmwinternal/simulink_cache.xml b/labcontroltheory2b/slprj/sim/varcache/lab_controltheory2b_2/tmwinternal/simulink_cache.xml new file mode 100755 index 0000000..e779e45 --- /dev/null +++ b/labcontroltheory2b/slprj/sim/varcache/lab_controltheory2b_2/tmwinternal/simulink_cache.xml @@ -0,0 +1,6 @@ + + + + HE6zaEkiwR7uetv5MNrOWg== + + \ No newline at end of file diff --git a/labcontroltheory2b/slprj/sim/varcache/lab_controltheory2b_2/varInfo.mat b/labcontroltheory2b/slprj/sim/varcache/lab_controltheory2b_2/varInfo.mat new file mode 100755 index 0000000..717b43f Binary files /dev/null and b/labcontroltheory2b/slprj/sim/varcache/lab_controltheory2b_2/varInfo.mat differ diff --git a/screenshots/ClosedLoop H1.PNG b/screenshots/ClosedLoop H1.PNG new file mode 100755 index 0000000..e68bb3f Binary files /dev/null and b/screenshots/ClosedLoop H1.PNG differ diff --git a/screenshots/OpenLoop H1.PNG b/screenshots/OpenLoop H1.PNG new file mode 100755 index 0000000..067ac40 Binary files /dev/null and b/screenshots/OpenLoop H1.PNG differ diff --git a/screenshots/c1.PNG b/screenshots/c1.PNG new file mode 100755 index 0000000..7119ea0 Binary files /dev/null and b/screenshots/c1.PNG differ diff --git a/screenshots/c2.PNG b/screenshots/c2.PNG new file mode 100755 index 0000000..5a275c3 Binary files /dev/null and b/screenshots/c2.PNG differ diff --git a/screenshots/c3.PNG b/screenshots/c3.PNG new file mode 100755 index 0000000..7de33e7 Binary files /dev/null and b/screenshots/c3.PNG differ diff --git a/screenshots/disturbed with poles.PNG b/screenshots/disturbed with poles.PNG new file mode 100755 index 0000000..5a6af5a Binary files /dev/null and b/screenshots/disturbed with poles.PNG differ diff --git a/screenshots/disturbed.PNG b/screenshots/disturbed.PNG new file mode 100755 index 0000000..5736dee Binary files /dev/null and b/screenshots/disturbed.PNG differ diff --git a/screenshots/first_try.PNG b/screenshots/first_try.PNG new file mode 100755 index 0000000..21e6db9 Binary files /dev/null and b/screenshots/first_try.PNG differ diff --git a/screenshots/subss1.PNG b/screenshots/subss1.PNG new file mode 100755 index 0000000..9706c7d Binary files /dev/null and b/screenshots/subss1.PNG differ diff --git a/screenshots/subss2.PNG b/screenshots/subss2.PNG new file mode 100755 index 0000000..5f7c7cf Binary files /dev/null and b/screenshots/subss2.PNG differ diff --git a/screenshots/subss3.PNG b/screenshots/subss3.PNG new file mode 100755 index 0000000..124df8f Binary files /dev/null and b/screenshots/subss3.PNG differ diff --git a/screenshots/subsss1.PNG b/screenshots/subsss1.PNG new file mode 100755 index 0000000..3290390 Binary files /dev/null and b/screenshots/subsss1.PNG differ diff --git a/screenshots/subsystem.PNG b/screenshots/subsystem.PNG new file mode 100755 index 0000000..28d323f Binary files /dev/null and b/screenshots/subsystem.PNG differ diff --git a/screenshots/system.PNG b/screenshots/system.PNG new file mode 100755 index 0000000..a690dca Binary files /dev/null and b/screenshots/system.PNG differ