diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /2048/CH2/EX2.1 | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '2048/CH2/EX2.1')
-rwxr-xr-x | 2048/CH2/EX2.1/pend_model.sce | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/2048/CH2/EX2.1/pend_model.sce b/2048/CH2/EX2.1/pend_model.sce new file mode 100755 index 000000000..1181fc69f --- /dev/null +++ b/2048/CH2/EX2.1/pend_model.sce @@ -0,0 +1,33 @@ +// Model of inverted pendulum
+// 2.1
+
+Km = 0.00767;
+Kg = 3.7;
+Rm = 2.6;
+r = 0.00635;
+M = 0.522;
+m = 0.231;
+g = 9.81;
+L = 0.305;
+J = 0;
+
+D1 = (J+m*L^2)*(M+m)-m^2*L^2;
+alpha = m*g*L*(M+m)/D1;
+beta1 = m*L/D1;
+gamma1 = m^2*g*L^2/D1;
+delta = (J+m*L^2)/D1;
+
+alpha1 = Km*Kg/Rm/r;
+alpha2 = Km^2*Kg^2/Rm/r^2;
+
+A = zeros(4,4);
+A(1,3) = 1;
+A(2,4) = 1;
+A(3,2) = -gamma1;
+A(3,3) = -alpha2*delta;
+A(4,2) = alpha;
+A(4,3) = alpha2*beta1;
+
+B = zeros(4,1);
+B(3) = alpha1*delta;
+B(4) = -alpha1*beta1;
|