From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 2048/CH2/EX2.1/pend_model.sce | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100755 2048/CH2/EX2.1/pend_model.sce (limited to '2048/CH2/EX2.1') 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; -- cgit