From fd4c1e23ab02c65d61d1b93baf8cdc69c461ce36 Mon Sep 17 00:00:00 2001 From: Wouter Horlings Date: Mon, 20 Jul 2020 15:35:11 +0200 Subject: [PATCH] Add Modern Robotics implementation and documentation --- .../SCARA/03_motor/MR_dynamics2.emx | 336 +- .../SCARA/03_motor/MR_dynamics3.emx | 7576 +++++++++++++++++ .../SCARA/03_motor/implementation.md | 53 + .../SCARA/03_motor/motor_physics.emx | 86 +- .../SCARA/03_motor/motor_physics2.emx | 4880 +++++++++++ 5 files changed, 12891 insertions(+), 40 deletions(-) create mode 100644 implementation/SCARA/03_motor/MR_dynamics3.emx create mode 100644 implementation/SCARA/03_motor/implementation.md create mode 100644 implementation/SCARA/03_motor/motor_physics2.emx diff --git a/implementation/SCARA/03_motor/MR_dynamics2.emx b/implementation/SCARA/03_motor/MR_dynamics2.emx index 62af5ae..9cc1a43 100644 --- a/implementation/SCARA/03_motor/MR_dynamics2.emx +++ b/implementation/SCARA/03_motor/MR_dynamics2.emx @@ -8,7 +8,7 @@ 0 False C:\users\wouter\My Documents\studie\ma\mahd\implementation\SCARA\03_motor\MR_dynamics2.emx - 2020-7-17 15:47:18 + 2020-7-19 14:01:30 '; type Mainmodel @@ -2165,6 +2165,324 @@ Integrate\init = InitialPos; uTbai\Rconstraint = Rconstraint; uTbai\Cconstraint = Cconstraint; +parameterrelations_end; + figures + text 'b = next link (body) +a = previous link (body) +i = Frame fixed in previous body, fixed in joint +j = Frame fixed in next body, fixed in joint + ' 680 488 color 0; + implementation_end; + Joint2 896.1 686 + description ' + + 4.8 +1 + False + True + Bond Graph\MR\joint-v2.emx + 2020-7-17 14:55:32 + +'; + type 'Submodel-rotz' + ports + power out p [6,1]; + power in p1; + power in p2 [6,1]; + signal in Hin [4,4]; + signal out Hout [4,4]; + signal out q; + end; + icon bg bottom + figures + rectangle 864.2 648 928 724 color 0 fill 14745599; + text 'Joint' 896 680 color 0; + terminals + p 864 664 fixed; + p1 896 648 fixed; + p2 928 664 fixed; + Hin 864 712 fixed; + Hout 928 712 fixed; + end; + implementation bg + submodels + AdHji 424 424 + description ' + 4.0 + 1 + False + Bond Graph\MTF.emx + 2007-9-25 12:3:3 + True +'; + type MTF + ports + power out p1 [6,1]; + power in p2 [6,1]; + signal in H [4,4]; + restrictions + causality constraint not_equal p1 p2; + end; + icon bg bottom + figures + text 'MTF' 424 424 color 0 18 bold; + end; + implementation eq +equations + p2.e = transpose(Adjoint(H)) * p1.e; + p1.f = Adjoint(H) * p2.f;implementation_end; + Integrate 320 176 + description ' + 4.0 + 1 + False + Signal\Block Diagram\Integrate.emx + 2007-9-26 12:3:23 + True +'; + type Integrate + ports + signal in input; + signal out output [4,4]; + signal out q; + parameters + real init = -2.9496; + end; + icon bg + figures + rectangle 304 160 336 192 color 0 fill 15132390; + text 'ò' 320 173.3 color 16711680 'SymbolProp BT' 21 symbol; + end; + implementation eq +parameters + real global joint; +variables + real R[3,3]; + real p[3]; + real qa[6]; + real temp [4,4]; +initialequations + qa = 0; +equations +q = -int(input,init); +qa[joint] = q; +R = dll('EulerAngles.dll','RotationMatrixFromEulXYZs',qa); +output = homogeneous(R,qa[4:6]);implementation_end; + MatrixMul 320 576 + description ' + 4.0 + 1 + False + Signal\Block Diagram\Gain.emx + 2007-9-26 12:15:12 + True +'; + type Gain + ports + signal in input1 [4,4]; + signal out output [4,4]; + signal in input2 [4,4]; + end; + icon bg bottom + figures + rectangle 304.1 560 335.9 592 color 0 fill 15132390; + text 'X' 320 576 color 16711680 16 bold; + end; + implementation eq +equations + output = input2*input1; implementation_end; + plug p1 240 40; + plug p2 496 424; + plug Hin 112 576; + plug Hout 504 576; + plug q 448 176; + plug p 112 424; + OneJunction2 240 176 + description ' + + 4.2 +1 + False + Bond Graph\FlowSensor.emx + 2011-11-29 15:50:53 + +'; + knot FlowSensor + ports + mechanical knot in p1 [1]; + power knot out p2 [1]; + signal knot out flow [1]; + restrictions + causality constraint not_equal p1 p2; + end; + icon bg ellipse + figures + ellipse 233.1 168.8 246.9 183.1 color 0 fill 16777215; + text 'f' 240 175.2 color 0; + end; + implementation eq +equations + p2.f = p1.f; + p1.e = p2.e; + flow = p1.f; +implementation_end; + Splitter2 320 312 + description '4.0 + Signal\Block Diagram\Splitter.emx + 2008-01-17 11:28:29 +1 + False +'; + knot Splitter + ports + signal knot duplicatable out output [4,4]; + signal knot in input [4,4]; + end; + icon bg ellipse + figures + ellipse 316.8 308.8 323.2 315.2 color -1 fill 0; + ellipse 315.7 307.7 324.3 316.3 color -1; + terminals + input 320 312 fixed; + end; + implementation eq +equations + collect (output) = input; +implementation_end; + Submodel1 240 312 + description '4.0 + Template\Submodel-Equation.emx +1 + False + 2007-11-1 22:32:1 + False +'; + type 'Submodel-Equation' + ports + power in p1 [6,1]; + signal out H [4,4]; + power out p2 [6,1]; + end; + implementation eq +variables + real q[4]; //quaternions + real W[3,4]; //Quaternion Rates Matrix + real R[3,3]; //Rotation Matrix +equations + q = int(transpose(W) * p1.f[1:3] ./ 2); + W = [-q[2], q[1], -q[4], q[3]; + -q[3], q[4], q[1], -q[2]; + -q[4], -q[3], q[2], q[1]]; + R = [q[1]^2+q[2]^2-q[3]^2-q[4]^2, 2*(q[2]*q[3]+q[1]*q[4]), 2*(q[2]*q[4]-q[1]*q[3]); + 2*(q[2]*q[3]-q[1]*q[4]), q[1]^2-q[2]^2+q[3]^2-q[4]^2, 2*(q[3]*q[4]+q[1]*q[2]); + 2*(q[2]*q[4]+q[1]*q[3]), 2*(q[3]*q[4]-q[1]*q[2]), q[1]^2-q[2]^2-q[3]^2+q[4]^2];implementation_end; + uTbai 240 248 + description ' + 4.0 + 1 + False + Bond Graph\TF.emx + 2007-9-25 12:4:2 + True +'; + type TF + ports + power in p1; + power out p2 [6,1]; + restrictions + causality constraint not_equal p1 p2; + causality fixed in p1; + causality fixed out p2; + parameters + real Cconstraint = 1.0e-4; + real Rconstraint = 1000.0; + end; + icon bg left + figures + text 'TF' 240 248 color 0 18 bold; + end; + implementation eq +parameters + real global joint; +variables + real i; + real state[6]; +equations + /*p2.e[1] = (Rconstraint*-p2.f[1] + int(-p2.f[1])/Cconstraint); + p2.e[2] = (Rconstraint*-p2.f[2] + int(-p2.f[2])/Cconstraint); + p2.e[3] = p1.e; + p2.e[4] = (Rconstraint*-p2.f[4] + int(-p2.f[4])/Cconstraint); + p2.e[5] = (Rconstraint*-p2.f[5] + int(-p2.f[5])/Cconstraint); + p2.e[6] = (Rconstraint*-p2.f[6] + int(-p2.f[6])/Cconstraint); + + p1.f = p2.f[3];*/ + state = int(p2.f); + for i = 1 to 6 do + if i == joint then + p1.f = p2.f[i]; + p2.e[i] = p1.e; + else + p2.e[i] = (Rconstraint*-p2.f[i] + -state[i]/Cconstraint); + end; + end; +implementation_end; + Wbai 240 424 + description ' + 4.0 + 1 + False + Bond Graph\ZeroJunction.emx + 2007-9-27 9:51:43 + True +'; + knot ZeroJunction + ports + power knot duplicatable none p [6,1]; + signal knot out effort [6,1]; + restrictions + causality constraint one_in p; + end; + icon bg bottom + figures + text '0' 240 424 color 0 18 bold; + end; + implementation eq +equations + sum (direct (p.f)) = 0; + equal (collect (p.e)); + effort = first (p.e); +implementation_end; + end; + connections + Hin -> MatrixMul\input2; + Integrate\output -> Splitter2\input; + Integrate\q -> q; + MatrixMul\output -> Hout; + OneJunction2\flow -> Integrate\input; + OneJunction2\p1 <= p1; + OneJunction2\p2 => uTbai\p1; + p <= Wbai\p; + p2 => AdHji\p2; + Splitter2\output -> AdHji\H 424 312; + Splitter2\output -> MatrixMul\input1; + Submodel1\p2 => Wbai\p; + uTbai\p2 => Submodel1\p1; + Wbai\p <= AdHji\p1; + end; + parameterrelations +EndstopMin\Rendstop = Rendstop; +EndstopMin\Cendstop = Cendstop; +EndstopMin\InitialPos = InitialPos; +EndstopMin\EndstopPos = MinEndstopPos; +EndstopMax\Rendstop = Rendstop; +EndstopMax\Cendstop = Cendstop; +EndstopMax\InitialPos = InitialPos; +EndstopMax\EndstopPos = MaxEndstopPos; +Rjoint\Rjoint= Rjoint; +Integrate\init = InitialPos; +uTbai\Rconstraint = Rconstraint; +uTbai\Cconstraint = Cconstraint; + parameterrelations_end; figures text 'b = next link (body) @@ -4206,9 +4524,21 @@ implementation_end; - - + + I + 3 + 1 + 0 0 0 + + + joint + 0 + + + m + 0 + diff --git a/implementation/SCARA/03_motor/MR_dynamics3.emx b/implementation/SCARA/03_motor/MR_dynamics3.emx new file mode 100644 index 0000000..6cc5889 --- /dev/null +++ b/implementation/SCARA/03_motor/MR_dynamics3.emx @@ -0,0 +1,7576 @@ + + + + + + 4.8 +0 + False + C:\users\wouter\My Documents\studie\ma\mahd\implementation\SCARA\03_motor\MR_dynamics3.emx + 2020-7-20 14:19:55 + +'; + type Mainmodel + end; + implementation bg + submodels + Base 392 296 + description ' + + 4.8 +1 + False + True + Z:\home\wouter\Documents\20-sim\library\Bond Graph\MR\link.emx + 2020-7-16 14:21:54 +Base + +'; + type Submodel + ports + power out p [6,1]; + signal in Hin [4,4]; + power in p1 [6,1]; + signal out Hout [4,4]; + parameters + real I[3,1] = [1.6399999999999998e-6; 4.7e-8; 1.61e-6] {N.m.s}; + real m = 0.00455 {kg}; + real COMdim[3,1] = [0.0; 0.0325; 0.0] {m}; + real dim[3,1] = [0.0; 0.065; 0.0] {m}; + end; + icon bg bottom + figures + rectangle 360 224 424 368 color 0 fill 10025880; + text 'Link' 392 296 color 0; + terminals + p 360 256 fixed; + Hin 360 336 fixed; + p1 424 256 fixed; + Hout 424 336 fixed; + end; + implementation bg + submodels + AdHi0 544 416 + description ' + 4.0 + 1 + False + Bond Graph\MTF.emx + 2007-9-25 12:3:3 + True +'; + type MTF + ports + power in p1 [6,1]; + power out p2 [6,1]; + signal in H [4,4]; + restrictions + causality constraint not_equal p1 p2; + end; + icon bg left + figures + text 'MTF' 544 416 color 0 18 bold; + end; + implementation eq +variables + real onlyRotH[4,4]; +code + //Only rotations with respect to the inertial system matter! + onlyRotH = H; + onlyRotH[1,4] = 0; + onlyRotH[2,4] = 0; + onlyRotH[3,4] = 0; + + p2.e = transpose(Adjoint(onlyRotH)) * p1.e; + p1.f = Adjoint(onlyRotH) * p2.f; +implementation_end; + AdHij 864 304 + description ' + 4.0 + 1 + False + Bond Graph\MTF.emx + 2007-9-25 12:3:3 + True +'; + type MTF + ports + power out p1 [6,1]; + power in p2 [6,1]; + signal in H [4,4]; + restrictions + causality constraint not_equal p1 p2; + end; + icon bg top + figures + text 'MTF' 864 304 color 0 18 bold; + end; + implementation eq +equations + //Only rotations with respect to the inertial system matter! + + p1.e = transpose(Adjoint(H)) * p2.e; + p2.f = Adjoint(H) * p1.f; +implementation_end; + AdHik 544 248 + description ' + 4.0 + 1 + False + Bond Graph\TF.emx + 2007-9-25 12:4:2 + True +'; + type TF + ports + power in p1 [6,1]; + power out p2 [6,1]; + restrictions + causality constraint not_equal p1 p2; + parameters + real COMdim[3,1] = [0.0; 0.0325; 0.0]; + end; + icon bg left + figures + text 'TF' 544 248 color 0 18 bold; + end; + implementation eq +//Frame in joint connected to port 1 +//Principal inertial frame connected in port 2 +variables + real d[3]; //distance between frames + real R[3,3]; //rotation between frames + + real H[4,4]; //homogeneous matrix + real AdH[6,6]; //Adjoint of homogeneous matrix +equations + d = COMdim; //distance of 1 in z direction of frames + R = eye(3); //no rotation + + H = homogeneous(R,d); + AdH = Adjoint(H); + + p1.f = AdH * p2.f; + p2.e = transpose(AdH) * p1.e; +implementation_end; + AdHik1 544 360 + description ' + 4.0 + 1 + False + Bond Graph\TF.emx + 2007-9-25 12:4:2 + True +'; + type TF + ports + power in p1 [6,1]; + power out p2 [6,1]; + restrictions + causality constraint not_equal p1 p2; + parameters + real COMdim[3,1] = [0.0; 0.0325; 0.0]; + end; + icon bg left + figures + text 'TF' 544 360 color 0 18 bold; + end; + implementation eq +//Frame in joint connected to port 1 +//Principal inertial frame connected in port 2 +variables + real d[3]; //distance between frames + real R[3,3]; //rotation between frames + + real H[4,4]; //homogeneous matrix + real AdH[6,6]; //Adjoint of homogeneous matrix +equations + d = COMdim; //distance of 1 in z direction of frames + R = eye(3); //no rotation + + H = homogeneous(R,d); + AdH = Adjoint(H); + + p1.f = AdH * p2.f; + p2.e = transpose(AdH) * p1.e; +implementation_end; + EJS 608 184 + description ' + 4.0 + 1 + False + Bond Graph\MGY.emx + 2007-10-31 11:43:6 + True +'; + type MGY + ports + power in p1 [6,1]; + parameters + real I[3,1] = [1.6399999999999998e-6; 4.7e-8; 1.61e-6]; + real m = 0.00455; + end; + icon bg top + figures + text 'MGY' 608 184 color 0 18 bold; + end; + implementation eq +//EJS / Gyroscopic effects +variables + real II[6,6]; //Inertial tensor + real Q[6,6]; + real QI[6,6]; + real v[3]; + real omega[3]; +equations + II = [ I[1],0, 0, 0, 0, 0; + 0, I[2],0, 0, 0, 0; + 0, 0, I[3],0, 0, 0; + 0, 0, 0, m, 0, 0; + 0, 0, 0, 0, m, 0; + 0, 0, 0, 0, 0, m]; + v[1:3] = p1.f[4:6]; + omega[1:3] = p1.f[1:3]; + + Q[1:3,1:3] = -skew(omega); + Q[1:3,4:6] = -skew(v); + Q[4:6,1:3] = [0,0,0;0,0,0;0,0,0];//matrix filled with zeros + Q[4:6,4:6] = -skew(omega); + QI = Q*II; + + p1.e = QI*p1.f;implementation_end; + Gravity 656 416 + description ' + 4.0 + 1 + False + Bond Graph\Se.emx + 2007-9-25 12:3:26 + True +'; + type Se + ports + power out p [6,1]; + restrictions + causality fixed out p; + parameters + real m = 0.00455; + end; + icon bg bottom + figures + text 'Se' 656 416 color 0 18 bold; + end; + implementation eq +variables + real effort[6]; +equations + effort = [0;0;0;0;0;-9.8*m]; + p.e = effort; +implementation_end; + Hij 864 496 + description ' + 4.1 +1 + False + H.emx + 2010-9-21 15:03:50 +True +'; + type Gain + ports + signal in input [4,4]; + signal out output [4,4]; + signal out Hab [4,4]; + parameters + real dim[3,1] = [0.0; 0.065; 0.0]; + end; + icon bg bottom + figures + rectangle 848.1 480 879.9 512 color 0 fill 15132390; + text 'H' 864 496 color 16711680 16 bold; + end; + implementation eq +equations + Hab = homogeneous(eye(3),dim); + output = input * Hab; + implementation_end; + InertialTensor 480 184 + description ' + 4.0 + 1 + False + Bond Graph\I.emx + 2007-9-25 12:2:12 + True +'; + type I + ports + power in p [6,1]; + signal out state [6,1]; + restrictions + causality preferred in p; + parameters + real m = 0.00455; + real I[3,1] = [1.6399999999999998e-6; 4.7e-8; 1.61e-6]; + end; + icon bg top + figures + text 'I' 480 184 color 0 18 bold; + end; + implementation eq +variables + real II[6,6]; //Inertial tensor +equations + II = [I[1],0, 0, 0, 0, 0; + 0, I[2],0, 0, 0, 0; + 0, 0, I[3],0, 0, 0; + 0, 0, 0, m, 0, 0; + 0, 0, 0, 0, m, 0; + 0, 0, 0, 0, 0, m]; + + state = int(p.e); //state = generalized momentum + p.f = inverse(II)*state; +implementation_end; + plug Hout 984 496; + plug p1 984 304; + plug Hin 472 496; + plug p 472 304; + Splitter1 544 496 + description '4.0 + Signal\Block Diagram\Splitter.emx + 2008-01-17 11:28:29 +1 + False +'; + knot Splitter + ports + signal knot duplicatable out output [4,4]; + signal knot in input [4,4]; + end; + icon bg ellipse + figures + ellipse 540.8 492.8 547.2 499.2 color -1 fill 0; + ellipse 539.7 491.7 548.3 500.3 color -1; + terminals + input 544 496 fixed; + end; + implementation eq +equations + collect (output) = input; +implementation_end; + Ta00 600 416 + description ' + 4.0 + 1 + False + Bond Graph\OneJunction.emx + 2007-9-27 9:51:18 + True +'; + knot OneJunction + ports + power knot duplicatable none p [6,1]; + signal knot out flow [6,1]; + restrictions + causality constraint one_out p; + end; + icon bg bottom + figures + text '1' 600 416 color 0 18 bold; + end; + implementation eq +equations + sum (direct (p.e)) = 0; + equal (collect (p.f)); + flow = first (p.f); +implementation_end; + Ta0j 544 304 + description ' + 4.0 + 1 + False + Bond Graph\OneJunction.emx + 2007-9-27 9:51:18 + True + +'; + knot OneJunction + ports + power knot duplicatable none p [6,1]; + signal knot out flow [6,1]; + restrictions + causality constraint one_out p; + end; + icon bg bottom + figures + text '1' 544 304 color 0 18 bold; + end; + implementation eq +equations + sum (direct (p.e)) = 0; + equal (collect (p.f)); + flow = first (p.f); +implementation_end; + Ta0k 544 184 + description ' + 4.0 + 1 + False + Bond Graph\OneJunction.emx + 2007-9-27 9:51:18 + True + +'; + knot OneJunction + ports + power knot duplicatable none p [6,1]; + signal knot out flow [6,1]; + restrictions + causality constraint one_out p; + end; + icon bg top + figures + text '1' 544 184 color 0 18 bold; + end; + implementation eq +equations + sum (direct (p.e)) = 0; + equal (collect (p.f)); + flow = first (p.f); +implementation_end; + end; + connections + AdHi0\p2 => AdHik1\p1; + AdHij\p1 => Ta0j\p; + AdHik\p2 => Ta0k\p; + AdHik1\p2 => Ta0j\p; + Gravity\p => Ta00\p; + Hij\Hab -> AdHij\H; + Hij\output -> Hout; + Hin -> Splitter1\input; + p <= Ta0j\p; + p1 => AdHij\p2; + Splitter1\output -> AdHi0\H; + Splitter1\output -> Hij\input; + Ta00\p => AdHi0\p1; + Ta0j\p => AdHik\p1; + Ta0k\p => EJS\p1; + Ta0k\p => InertialTensor\p; + end; + parameterrelations +InertialTensor\I = I; +InterialTensor\m = m; +EJS\I = I; +EJS\m = m; +AdHik\COMdim = COMdim; +AdHik1\COMdim = COMdim; +Hij\dim = dim; +Gravity\m=m;parameterrelations_end; + figures + text 'b = current link (body) +a = previous link (body) +i = Body fixed frame, fixed in joint with previous link +j = Body fixed frame, fixed in joint with next link +k = Body fixed frame, principal inertial frame +0 = inertial system + ' 288 280 color 0; + implementation_end; + Base1 584 296 + description ' + + 4.8 +1 + False + True + Z:\home\wouter\Documents\20-sim\library\Bond Graph\MR\link.emx + 2020-7-16 14:21:54 +Base + +'; + type Submodel + ports + power out p [6,1]; + signal in Hin [4,4]; + power in p1 [6,1]; + signal out Hout [4,4]; + parameters + real I[3,1] = [1.6399999999999998e-6; 4.7e-8; 1.61e-6] {N.m.s}; + real m = 0.00455 {kg}; + real COMdim[3,1] = [0.0; 0.025; 0.0] {m}; + real dim[3,1] = [0.0; 0.05; 0.0] {m}; + end; + icon bg bottom + figures + rectangle 552 224 616 368 color 0 fill 10025880; + text 'Link' 584 296 color 0; + terminals + p 552 256 fixed; + Hin 552 336 fixed; + p1 616 256 fixed; + Hout 616 336 fixed; + end; + implementation bg + submodels + AdHi0 664 416 + description ' + 4.0 + 1 + False + Bond Graph\MTF.emx + 2007-9-25 12:3:3 + True +'; + type MTF + ports + power in p1 [6,1]; + power out p2 [6,1]; + signal in H [4,4]; + restrictions + causality constraint not_equal p1 p2; + end; + icon bg left + figures + text 'MTF' 664 416 color 0 18 bold; + end; + implementation eq +variables + real onlyRotH[4,4]; +code + //Only rotations with respect to the inertial system matter! + onlyRotH = H; + onlyRotH[1,4] = 0; + onlyRotH[2,4] = 0; + onlyRotH[3,4] = 0; + + p2.e = transpose(Adjoint(onlyRotH)) * p1.e; + p1.f = Adjoint(onlyRotH) * p2.f; +implementation_end; + AdHij 816 304 + description ' + 4.0 + 1 + False + Bond Graph\MTF.emx + 2007-9-25 12:3:3 + True +'; + type MTF + ports + power out p1 [6,1]; + power in p2 [6,1]; + signal in H [4,4]; + restrictions + causality constraint not_equal p1 p2; + end; + icon bg top + figures + text 'MTF' 816 304 color 0 18 bold; + end; + implementation eq +equations + //Only rotations with respect to the inertial system matter! + + p1.e = transpose(Adjoint(H)) * p2.e; + p2.f = Adjoint(H) * p1.f; +implementation_end; + AdHik 664 248 + description ' + 4.0 + 1 + False + Bond Graph\TF.emx + 2007-9-25 12:4:2 + True +'; + type TF + ports + power in p1 [6,1]; + power out p2 [6,1]; + restrictions + causality constraint not_equal p1 p2; + parameters + real COMdim[3,1] = [0.0; 0.025; 0.0]; + end; + icon bg left + figures + text 'TF' 664 248 color 0 18 bold; + end; + implementation eq +//Frame in joint connected to port 1 +//Principal inertial frame connected in port 2 +variables + real d[3]; //distance between frames + real R[3,3]; //rotation between frames + + real H[4,4]; //homogeneous matrix + real AdH[6,6]; //Adjoint of homogeneous matrix +equations + d = COMdim; //distance of 1 in z direction of frames + R = eye(3); //no rotation + + H = homogeneous(R,d); + AdH = Adjoint(H); + + p1.f = AdH * p2.f; + p2.e = transpose(AdH) * p1.e; +implementation_end; + AdHik1 664 360 + description ' + 4.0 + 1 + False + Bond Graph\TF.emx + 2007-9-25 12:4:2 + True +'; + type TF + ports + power out p1 [6,1]; + power in p2 [6,1]; + restrictions + causality constraint not_equal p1 p2; + parameters + real COMdim[3,1] = [0.0; 0.025; 0.0]; + end; + icon bg left + figures + text 'TF' 664 360 color 0 18 bold; + end; + implementation eq +//Principal inertial frame connected in port 2 +variables + real d[3]; //distance between frames + real R[3,3]; //rotation between frames + + real H[4,4]; //homogeneous matrix + real AdH[6,6]; //Adjoint of homogeneous matrix +equations + d = COMdim; //distance of 1 in z direction of frames + R = eye(3); //no rotation + + H = homogeneous(R,d); + AdH = Adjoint(H); + + p1.f = AdH * p2.f; + p2.e = transpose(AdH) * p1.e; +implementation_end; + EJS 728 184 + description ' + 4.0 + 1 + False + Bond Graph\MGY.emx + 2007-10-31 11:43:6 + True +'; + type MGY + ports + power in p1 [6,1]; + parameters + real I[3,1] = [7.583e-7; 3.6458e-8; 7.364583e-7]; + real m = 0.0035; + end; + icon bg top + figures + text 'MGY' 728 184 color 0 18 bold; + end; + implementation eq +//EJS / Gyroscopic effects +variables + real II[6,6]; //Inertial tensor + real Q[6,6]; + real QI[6,6]; + real v[3]; + real omega[3]; +equations + II = [ I[1],0, 0, 0, 0, 0; + 0, I[2],0, 0, 0, 0; + 0, 0, I[3],0, 0, 0; + 0, 0, 0, m, 0, 0; + 0, 0, 0, 0, m, 0; + 0, 0, 0, 0, 0, m]; + v[1:3] = p1.f[4:6]; + omega[1:3] = p1.f[1:3]; + + Q[1:3,1:3] = -skew(omega); + Q[1:3,4:6] = -skew(v); + Q[4:6,1:3] = [0,0,0;0,0,0;0,0,0];//matrix filled with zeros + Q[4:6,4:6] = -skew(omega); + QI = Q*II; + + p1.e = QI*p1.f;implementation_end; + Gravity 776 416 + description ' + 4.0 + 1 + False + Bond Graph\Se.emx + 2007-9-25 12:3:26 + True +'; + type Se + ports + power out p [6,1]; + restrictions + causality fixed out p; + parameters + real m = 0.0035; + end; + icon bg bottom + figures + text 'Se' 776 416 color 0 18 bold; + end; + implementation eq +variables + real effort[6]; +equations + effort = [0;0;0;0;0;-9.8*m]; + p.e = effort; +implementation_end; + Hij 816 496 + description ' + 4.1 +1 + False + H.emx + 2010-9-21 15:03:50 +True +'; + type Gain + ports + signal in input [4,4]; + signal out output [4,4]; + signal out Hab [4,4]; + parameters + real dim[3,1] = [0.0; 0.05; 0.0]; + end; + icon bg bottom + figures + rectangle 800.1 480 831.9 512 color 0 fill 15132390; + text 'H' 816 496 color 16711680 16 bold; + end; + implementation eq +equations + Hab = homogeneous(eye(3),dim); + output = input * Hab; + implementation_end; + InertialTensor 600 184 + description ' + 4.0 + 1 + False + Bond Graph\I.emx + 2007-9-25 12:2:12 + True +'; + type I + ports + power in p [6,1]; + signal out state [6,1]; + restrictions + causality preferred in p; + parameters + real m = 0.0035; + real I[3,1] = [7.583e-7; 3.6458e-8; 7.364583e-7]; + end; + icon bg top + figures + text 'I' 600 184 color 0 18 bold; + end; + implementation eq +variables + real II[6,6]; //Inertial tensor +equations + II = [I[1],0, 0, 0, 0, 0; + 0, I[2],0, 0, 0, 0; + 0, 0, I[3],0, 0, 0; + 0, 0, 0, m, 0, 0; + 0, 0, 0, 0, m, 0; + 0, 0, 0, 0, 0, m]; + + state = int(p.e); //state = generalized momentum + p.f = inverse(II)*state; +implementation_end; + plug Hout 896 496; + plug p1 904 304; + plug Hin 592 496; + plug p 592 304; + Splitter1 664 496 + description '4.0 + Signal\Block Diagram\Splitter.emx + 2008-01-17 11:28:29 +1 + False +'; + knot Splitter + ports + signal knot duplicatable out output [4,4]; + signal knot in input [4,4]; + end; + icon bg ellipse + figures + ellipse 660.8 492.8 667.2 499.2 color -1 fill 0; + ellipse 659.7 491.7 668.3 500.3 color -1; + terminals + input 664 496 fixed; + end; + implementation eq +equations + collect (output) = input; +implementation_end; + Ta00 720 416 + description ' + 4.0 + 1 + False + Bond Graph\OneJunction.emx + 2007-9-27 9:51:18 + True +'; + knot OneJunction + ports + power knot duplicatable none p [6,1]; + signal knot out flow [6,1]; + restrictions + causality constraint one_out p; + end; + icon bg bottom + figures + text '1' 720 416 color 0 18 bold; + end; + implementation eq +equations + sum (direct (p.e)) = 0; + equal (collect (p.f)); + flow = first (p.f); +implementation_end; + Ta0j 664 304 + description ' + 4.0 + 1 + False + Bond Graph\OneJunction.emx + 2007-9-27 9:51:18 + True + +'; + knot OneJunction + ports + power knot duplicatable none p [6,1]; + signal knot out flow [6,1]; + restrictions + causality constraint one_out p; + end; + icon bg bottom + figures + text '1' 664 304 color 0 18 bold; + end; + implementation eq +equations + sum (direct (p.e)) = 0; + equal (collect (p.f)); + flow = first (p.f); +implementation_end; + Ta0k 664 184 + description ' + 4.0 + 1 + False + Bond Graph\OneJunction.emx + 2007-9-27 9:51:18 + True + +'; + knot OneJunction + ports + power knot duplicatable none p [6,1]; + signal knot out flow [6,1]; + restrictions + causality constraint one_out p; + end; + icon bg top + figures + text '1' 664 184 color 0 18 bold; + end; + implementation eq +equations + sum (direct (p.e)) = 0; + equal (collect (p.f)); + flow = first (p.f); +implementation_end; + end; + connections + AdHi0\p2 => AdHik1\p2; + AdHik\p2 => Ta0k\p; + Gravity\p => Ta00\p; + Hij\Hab -> AdHij\H; + Hij\output -> Hout; + Hin -> Splitter1\input; + p <= Ta0j\p; + p1 => AdHij\p2; + Splitter1\output -> AdHi0\H; + Splitter1\output -> Hij\input; + Ta00\p => AdHi0\p1; + Ta0j\p <= AdHij\p1; + Ta0j\p <= AdHik1\p1; + Ta0j\p => AdHik\p1; + Ta0k\p => EJS\p1; + Ta0k\p => InertialTensor\p; + end; + parameterrelations +InertialTensor\I = I; +InterialTensor\m = m; +EJS\I = I; +EJS\m = m; +AdHik\COMdim = COMdim; +AdHik1\COMdim = COMdim; +Hij\dim = dim; +Gravity\m=m;parameterrelations_end; + figures + text 'b = current link (body) +a = previous link (body) +i = Body fixed frame, fixed in joint with previous link +j = Body fixed frame, fixed in joint with next link +k = Body fixed frame, principal inertial frame +0 = inertial system + ' 288 280 color 0; + implementation_end; + Base2 888 504 + description '4.81FalseTrueBond Graph\MR\center_of_mass.emx2020-7-17 13:52:18Baseparameters + real I [3,1] = [1.6399999999999998e-6; 4.7e-8; 1.61e-6] {N.m.s}; + real m = 0.00455 {kg};'; + type Submodel + ports + power out p [6,1]; + signal in Hin [4,4]; + power in p1 [6,1]; + signal out Hout [4,4]; + end; + icon bg bottom + figures + rectangle 856 464 920 544 color 0 fill 255; + text 'COM' 888 488 color 0; + terminals + p 856 480 fixed; + Hin 856 528 fixed; + p1 920 480 fixed; + Hout 920 528 fixed; + end; + implementation bg + submodels + AdHi0 544 400 + description ' + 4.0 + 1 + False + Bond Graph\MTF.emx + 2007-9-25 12:3:3 + True +'; + type MTF + ports + power in p1 [6,1]; + power out p2 [6,1]; + signal in H [4,4]; + restrictions + causality constraint not_equal p1 p2; + end; + icon bg left + figures + text 'MTF' 544 400 color 0 18 bold; + end; + implementation eq +variables + real onlyRotH[4,4]; +code + //Only rotations with respect to the inertial system matter! + onlyRotH = H; + onlyRotH[1,4] = 0; + onlyRotH[2,4] = 0; + onlyRotH[3,4] = 0; + + p2.e = transpose(Adjoint(onlyRotH)) * p1.e; + p1.f = Adjoint(onlyRotH) * p2.f; +implementation_end; + EJS 616 256 + description ' + 4.0 + 1 + False + Bond Graph\MGY.emx + 2007-10-31 11:43:6 + True +'; + type MGY + ports + power in p1 [6,1]; + end; + icon bg top + figures + text 'MGY' 616 256 color 0 18 bold; + end; + implementation eq +//EJS / Gyroscopic effects +parameters + real global I[3]; + real global m; +variables + real II[6,6]; //Inertial tensor + real Q[6,6]; + real QI[6,6]; + real Ia[6]; +initialequations + Ia[1:3] = I; + Ia[4:6] = m; + II = diag(Ia); +equations + Q = transpose(adjoint(p1.f)); + QI = Q*II; + p1.e = QI*p1.f;implementation_end; + Gravity 616 400 + description ' + 4.0 + 1 + False + Bond Graph\Se.emx + 2007-9-25 12:3:26 + True +'; + type Se + ports + power out p [6,1]; + restrictions + causality fixed out p; + end; + icon bg bottom + figures + text 'Se' 616 400 color 0 18 bold; + end; + implementation eq +parameters + real global m; +variables + real effort[6]; +equations + effort = [0;0;0;0;0;-g_n*m]; + p.e = effort; +implementation_end; + InertialTensor 480 256 + description ' + 4.0 + 1 + False + Bond Graph\I.emx + 2007-9-25 12:2:12 + True +'; + type I + ports + power in p [6,1]; + signal out state [6,1]; + restrictions + causality preferred in p; + end; + icon bg top + figures + text 'I' 480 256 color 0 18 bold; + end; + implementation eq +parameters + real global I[3]; + real global m; +variables + real II[6,6]; //Inertial tensor + real Ia[6]; +initialequations + Ia[1:3] = I; + Ia[4:6] = m; + II = diag(Ia); +equations + state = int(p.e); //state = generalized momentum + p.f = inverse(II)*state; +implementation_end; + plug Hin 472 496; + plug p1 752 304; + plug Hout 768 496; + plug p 472 304; + Splitter1 544 496 + description '4.0 + Signal\Block Diagram\Splitter.emx + 2008-01-17 11:28:29 +1 + False +'; + knot Splitter + ports + signal knot duplicatable out output [4,4]; + signal knot in input [4,4]; + end; + icon bg ellipse + figures + ellipse 540.8 492.8 547.2 499.2 color -1 fill 0; + ellipse 539.7 491.7 548.3 500.3 color -1; + terminals + input 544 496 fixed; + end; + implementation eq +equations + collect (output) = input; +implementation_end; + Ta0j 544 304 + description ' + 4.0 + 1 + False + Bond Graph\OneJunction.emx + 2007-9-27 9:51:18 + True + +'; + knot OneJunction + ports + power knot duplicatable none p [6,1]; + signal knot out flow [6,1]; + restrictions + causality constraint one_out p; + end; + icon bg bottom + figures + text '1' 544 304 color 0 18 bold; + end; + implementation eq +equations + sum (direct (p.e)) = 0; + equal (collect (p.f)); + flow = first (p.f); +implementation_end; + Ta0k 544 256 + description ' + 4.0 + 1 + False + Bond Graph\OneJunction.emx + 2007-9-27 9:51:18 + True + +'; + knot OneJunction + ports + power knot duplicatable none p [6,1]; + signal knot out flow [6,1]; + restrictions + causality constraint one_out p; + end; + icon bg top + figures + text '1' 544 256 color 0 18 bold; + end; + implementation eq +equations + sum (direct (p.e)) = 0; + equal (collect (p.f)); + flow = first (p.f); +implementation_end; + end; + connections + AdHi0\p2 => Ta0j\p; + Gravity\p => AdHi0\p1; + Hin -> Splitter1\input; + p <= Ta0j\p; + p1 => Ta0j\p; + Splitter1\output -> AdHi0\H; + Splitter1\output -> Hout; + Ta0j\p => Ta0k\p; + Ta0k\p => EJS\p1; + Ta0k\p => InertialTensor\p; + end; + parameterrelations +InertialTensor\I = I; +InterialTensor\m = m; +EJS\I = I; +EJS\m = m; +AdHik\COMdim = COMdim; +AdHik1\COMdim = COMdim; +Hij\dim = dim; +Gravity\m=m;parameterrelations_end; + figures + text 'b = current link (body) +a = previous link (body) +i = Body fixed frame, fixed in joint with previous link +j = Body fixed frame, fixed in joint with next link +k = Body fixed frame, principal inertial frame +0 = inertial system + ' 288 280 color 0; + implementation_end; + Base3 544 504 + description ' + + 4.8 +1 + False + True + Bond Graph\MR\center_of_mass.emx + 2020-7-17 13:52:18 +Base + +'; + type Submodel + ports + power out p [6,1]; + signal in Hin [4,4]; + power in p1 [6,1]; + signal out Hout [4,4]; + end; + icon bg bottom + figures + rectangle 512 464 576 544 color 0 fill 255; + text 'COM' 544 488 color 0; + terminals + p 512 480 fixed; + Hin 512 528 fixed; + p1 576 480 fixed; + Hout 576 528 fixed; + end; + implementation bg + submodels + AdHi0 544 400 + description ' + 4.0 + 1 + False + Bond Graph\MTF.emx + 2007-9-25 12:3:3 + True +'; + type MTF + ports + power in p1 [6,1]; + power out p2 [6,1]; + signal in H [4,4]; + restrictions + causality constraint not_equal p1 p2; + end; + icon bg left + figures + text 'MTF' 544 400 color 0 18 bold; + end; + implementation eq +variables + real onlyRotH[4,4]; +code + //Only rotations with respect to the inertial system matter! + onlyRotH = H; + onlyRotH[1,4] = 0; + onlyRotH[2,4] = 0; + onlyRotH[3,4] = 0; + + p2.e = transpose(Adjoint(onlyRotH)) * p1.e; + p1.f = Adjoint(onlyRotH) * p2.f; +implementation_end; + EJS 616 256 + description ' + 4.0 + 1 + False + Bond Graph\MGY.emx + 2007-10-31 11:43:6 + True +'; + type MGY + ports + power in p1 [6,1]; + parameters + real I[3,1] = [1.6399999999999998e-6; 4.7e-8; 1.61e-6]; + real m = 0.00455; + end; + icon bg top + figures + text 'MGY' 616 256 color 0 18 bold; + end; + implementation eq +//EJS / Gyroscopic effects +variables + real II[6,6]; //Inertial tensor + real Q[6,6]; + real QI[6,6]; + real Ia[6]; +initialequations + Ia[1:3] = I; + Ia[4:6] = m; + II = diag(Ia); +equations + Q = transpose(adjoint(p1.f)); + QI = Q*II; + p1.e = QI*p1.f;implementation_end; + Gravity 616 400 + description ' + 4.0 + 1 + False + Bond Graph\Se.emx + 2007-9-25 12:3:26 + True +'; + type Se + ports + power out p [6,1]; + restrictions + causality fixed out p; + parameters + real m = 0.00455; + end; + icon bg bottom + figures + text 'Se' 616 400 color 0 18 bold; + end; + implementation eq +variables + real effort[6]; +equations + effort = [0;0;0;0;0;-g_n*m]; + p.e = effort; +implementation_end; + InertialTensor 472 256 + description ' + 4.0 + 1 + False + Bond Graph\I.emx + 2007-9-25 12:2:12 + True +'; + type I + ports + power in p [6,1]; + signal out state [6,1]; + restrictions + causality preferred in p; + parameters + real m = 0.00455; + real I[3,1] = [1.6399999999999998e-6; 4.7e-8; 1.61e-6]; + end; + icon bg top + figures + text 'I' 472 256 color 0 18 bold; + end; + implementation eq +variables + real II[6,6]; //Inertial tensor +equations + II = [I[1],0, 0, 0, 0, 0; + 0, I[2],0, 0, 0, 0; + 0, 0, I[3],0, 0, 0; + 0, 0, 0, m, 0, 0; + 0, 0, 0, 0, m, 0; + 0, 0, 0, 0, 0, m]; + + state = int(p.e); //state = generalized momentum + p.f = inverse(II)*state; +implementation_end; + plug Hin 472 496; + plug p1 616 304; + plug Hout 616 496; + plug p 472 304; + Splitter1 544 496 + description '4.0 + Signal\Block Diagram\Splitter.emx + 2008-01-17 11:28:29 +1 + False +'; + knot Splitter + ports + signal knot duplicatable out output [4,4]; + signal knot in input [4,4]; + end; + icon bg ellipse + figures + ellipse 540.8 492.8 547.2 499.2 color -1 fill 0; + ellipse 539.7 491.7 548.3 500.3 color -1; + terminals + input 544 496 fixed; + end; + implementation eq +equations + collect (output) = input; +implementation_end; + Ta0j 544 304 + description ' + 4.0 + 1 + False + Bond Graph\OneJunction.emx + 2007-9-27 9:51:18 + True + +'; + knot OneJunction + ports + power knot duplicatable none p [6,1]; + signal knot out flow [6,1]; + restrictions + causality constraint one_out p; + end; + icon bg bottom + figures + text '1' 544 304 color 0 18 bold; + end; + implementation eq +equations + sum (direct (p.e)) = 0; + equal (collect (p.f)); + flow = first (p.f); +implementation_end; + Ta0k 544 256 + description ' + 4.0 + 1 + False + Bond Graph\OneJunction.emx + 2007-9-27 9:51:18 + True + +'; + knot OneJunction + ports + power knot duplicatable none p [6,1]; + signal knot out flow [6,1]; + restrictions + causality constraint one_out p; + end; + icon bg top + figures + text '1' 544 256 color 0 18 bold; + end; + implementation eq +equations + sum (direct (p.e)) = 0; + equal (collect (p.f)); + flow = first (p.f); +implementation_end; + end; + connections + AdHi0\p2 => Ta0j\p; + Gravity\p => AdHi0\p1; + Hin -> Splitter1\input; + p <= Ta0j\p; + p1 => Ta0j\p; + Splitter1\output -> AdHi0\H; + Splitter1\output -> Hout; + Ta0j\p => Ta0k\p; + Ta0k\p => EJS\p1; + Ta0k\p => InertialTensor\p; + end; + parameterrelations +InertialTensor\I = I; +InterialTensor\m = m; +EJS\I = I; +EJS\m = m; +AdHik\COMdim = COMdim; +AdHik1\COMdim = COMdim; +Hij\dim = dim; +Gravity\m=m;parameterrelations_end; + figures + text 'b = current link (body) +a = previous link (body) +i = Body fixed frame, fixed in joint with previous link +j = Body fixed frame, fixed in joint with next link +k = Body fixed frame, principal inertial frame +0 = inertial system + ' 288 280 color 0; + implementation_end; + C 912 240 + description '4.01False + Bond Graph\3D\C-3.emx + 2007-9-25 12:12:8 +'; + type 'C-3' + ports + power in p [3,1]; + signal out state [3,1]; + restrictions + causality preferred out p; + end; + icon bg bottom + figures + text 'C' 912 240 color 0 18 bold; + end; + implementation eq +parameters + real c[3,3] = [0.1, 0.0, 0.0; 0.0, 0.1, 0.0; 0.0, 0.0, 0.1] {N/m}; +equations + state = int(p.f); + p.e = inverse(c) *state; +implementation_end; + C1 912 256 + description '4.01False + Bond Graph\2D\C-2.emx + 2007-9-25 12:7:27 +'; + type 'C-2' + ports + power in p [2,1]; + signal out state [2,1]; + restrictions + causality preferred out p; + end; + icon bg bottom + figures + text 'C' 912 256 color 0 18 bold; + end; + implementation eq +parameters + real c[2,2] = [0.1, 0.0; 0.0, 0.1] {mN.m/rad}; +equations + state = int(p.f); + p.e = inverse(c) *state; +implementation_end; + COM 888 408 + description '4.81FalseTrueBond Graph\MR\center_of_mass.emx2020-7-17 13:52:18Baseparameters + real I [3,1] = [1.6399999999999998e-6; 4.7e-8; 1.61e-6] {N.m.s}; + real m = 0.00455 {kg};'; + type Submodel + ports + power out p [6,1]; + signal in Hin [4,4]; + signal out Hout [4,4]; + end; + icon bg ellipse bottom + figures + ellipse 864 384 912 432 color 0 fill 16777215 width 2; + line 888 384 888 432 color 0 fill 16777215; + line 864 408 912 408 color 0 fill 16777215; + terminals + p 864 392 fixed; + Hin 864 424 fixed; + end; + implementation bg + submodels + AdHi0 544 400 + description ' + 4.0 + 1 + False + Bond Graph\MTF.emx + 2007-9-25 12:3:3 + True +'; + type MTF + ports + power in p1 [6,1]; + power out p2 [6,1]; + signal in H [4,4]; + restrictions + causality constraint not_equal p1 p2; + end; + icon bg left + figures + text 'MTF' 544 400 color 0 18 bold; + end; + implementation eq +variables + real onlyRotH[4,4]; +code + //Only rotations with respect to the inertial system matter! + onlyRotH = H; + onlyRotH[1,4] = 0; + onlyRotH[2,4] = 0; + onlyRotH[3,4] = 0; + + p2.e = transpose(Adjoint(onlyRotH)) * p1.e; + p1.f = Adjoint(onlyRotH) * p2.f; +implementation_end; + EJS 616 336 + description ' + 4.0 + 1 + False + Bond Graph\MGY.emx + 2007-10-31 11:43:6 + True +'; + type MGY + ports + power in p1 [6,1]; + end; + icon bg top + figures + text 'MGY' 616 336 color 0 18 bold; + end; + implementation eq +//EJS / Gyroscopic effects +parameters + real global I[3]; + real global m; +variables + real II[6,6]; //Inertial tensor + real Q[6,6]; + real QI[6,6]; + real Ia[6]; +initialequations + Ia[1:3] = I; + Ia[4:6] = m; + II = diag(Ia); +equations + Q = transpose(adjoint(p1.f)); + QI = Q*II; + p1.e = QI*p1.f;implementation_end; + Gravity 616 400 + description ' + 4.0 + 1 + False + Bond Graph\Se.emx + 2007-9-25 12:3:26 + True +'; + type Se + ports + power out p [6,1]; + restrictions + causality fixed out p; + end; + icon bg bottom + figures + text 'Se' 616 400 color 0 18 bold; + end; + implementation eq +parameters + real global m; +variables + real effort[6]; +equations + effort = [0;0;0;0;0;-g_n*m]; + p.e = effort; +implementation_end; + InertialTensor 544 288 + description ' + 4.0 + 1 + False + Bond Graph\I.emx + 2007-9-25 12:2:12 + True +'; + type I + ports + power in p [6,1]; + signal out state [6,1]; + restrictions + causality preferred in p; + end; + icon bg top + figures + text 'I' 544 288 color 0 18 bold; + end; + implementation eq +parameters + real global I[3]; + real global m; +variables + real II[6,6]; //Inertial tensor + real Ia[6]; +initialequations + Ia[1:3] = I; + Ia[4:6] = m; + II = diag(Ia); +equations + state = int(p.e); //state = generalized momentum + p.f = inverse(II)*state; +implementation_end; + plug p 472 336; + plug Hin 472 496; + plug Hout 640 496; + Splitter1 544 496 + description '4.0 + Signal\Block Diagram\Splitter.emx + 2008-01-17 11:28:29 +1 + False +'; + knot Splitter + ports + signal knot duplicatable out output [4,4]; + signal knot in input [4,4]; + end; + icon bg ellipse + figures + ellipse 540.8 492.8 547.2 499.2 color -1 fill 0; + ellipse 539.7 491.7 548.3 500.3 color -1; + terminals + input 544 496 fixed; + end; + implementation eq +equations + collect (output) = input; +implementation_end; + Ta0j 544 336 + description ' + 4.0 + 1 + False + Bond Graph\OneJunction.emx + 2007-9-27 9:51:18 + True + +'; + knot OneJunction + ports + power knot duplicatable none p [6,1]; + signal knot out flow [6,1]; + restrictions + causality constraint one_out p; + end; + icon bg bottom + figures + text '1' 544 336 color 0 18 bold; + end; + implementation eq +equations + sum (direct (p.e)) = 0; + equal (collect (p.f)); + flow = first (p.f); +implementation_end; + end; + connections + AdHi0\p2 => Ta0j\p; + Gravity\p => AdHi0\p1; + Hin -> Splitter1\input; + InertialTensor\p <= Ta0j\p; + p <= Ta0j\p; + Splitter1\output -> AdHi0\H; + Splitter1\output -> Hout; + Ta0j\p => EJS\p1; + end; + parameterrelations +InertialTensor\I = I; +InterialTensor\m = m; +EJS\I = I; +EJS\m = m; +AdHik\COMdim = COMdim; +AdHik1\COMdim = COMdim; +Hij\dim = dim; +Gravity\m=m;parameterrelations_end; + figures + text 'b = current link (body) +a = previous link (body) +i = Body fixed frame, fixed in joint with previous link +j = Body fixed frame, fixed in joint with next link +k = Body fixed frame, principal inertial frame +0 = inertial system + ' 288 280 color 0; + implementation_end; + Constant 168 336 + description ' + 4.0 + 1 + False + Signal\Sources\Constant.emx + 2007-10-19 14:48:44 + True +'; + type Constant + ports + signal out output [4,4]; + end; + icon bg bottom + figures + rectangle 152.1 320 183.9 352 color 0 fill 15132390; + line 156.9 331.6 178.9 331.6 color 16711680 width 2; + line 154.2 342.7 179.9 342.7 color 0; + line 156.5 326.7 156.5 345 color 0; + end; + implementation eq +equations + output = eye(4); + implementation_end; + Constant1 296 48 + description '4.01False + Signal\Sources\Constant.emx + 2007-10-19 14:48:44 +'; + type Constant + ports + signal out output; + end; + icon bg bottom + figures + rectangle 280.1 32 311.9 64 color 0 fill 15132390; + line 284.9 43.6 306.9 43.6 color 16711680 width 2; + line 282.2 54.7 307.9 54.7 color 0; + line 284.5 38.7 284.5 57 color 0; + end; + implementation eq +parameters + real C = 1.0; // output value +equations + output = C; + implementation_end; + Constant2 480 688 + description '4.01False + Signal\Sources\Constant.emx + 2007-10-19 14:48:44 +'; + type Constant + ports + signal out output; + end; + icon bg bottom + figures + rectangle 464.1 672 495.9 704 color 0 fill 15132390; + line 468.9 683.6 490.9 683.6 color 16711680 width 2; + line 466.2 694.7 491.9 694.7 color 0; + line 468.5 678.7 468.5 697 color 0; + end; + implementation eq +parameters + real C = 0.01; // output value +equations + output = C; + implementation_end; + Joint 384.1 502 + description ' + + 4.8 +1 + False + True + Bond Graph\MR\joint-v2.emx + 2020-7-17 15:47:03 + +'; + type 'Submodel-rotz' + ports + power out p [6,1]; + power in p1; + power in p2 [6,1]; + signal in Hin [4,4]; + signal out Hout [4,4]; + end; + icon bg bottom + figures + rectangle 352.2 464 416 540 color 0 fill 14745599; + text 'Joint' 384 496 color 0; + terminals + p 352 480 fixed; + p1 384 464 fixed; + p2 416 480 fixed; + Hin 352 528 fixed; + Hout 416 528 fixed; + end; + implementation bg + submodels + AdHji 416 328 + description ' + 4.0 + 1 + False + Bond Graph\MTF.emx + 2007-9-25 12:3:3 + True +'; + type MTF + ports + power out p1 [6,1]; + power in p2 [6,1]; + signal in H [4,4]; + restrictions + causality constraint not_equal p1 p2; + end; + icon bg bottom + figures + text 'MTF' 416 328 color 0 18 bold; + end; + implementation eq +equations + p2.e = transpose(Adjoint(H)) * p1.e; + p1.f = Adjoint(H) * p2.f;implementation_end; + JointType 232 216 + description '4.81FalseTrueparameters + real joint = 1;'; + type Submodel + ports + mechanical in p1; + signal out output [4,4]; + power out p2 [6,1]; + end; + implementation bg + submodels + Integrate 320 272 + description ' + 4.0 + 1 + False + Signal\Block Diagram\Integrate.emx + 2007-9-26 12:3:23 + True +'; + type Integrate + ports + signal in input; + signal out output [4,4]; + parameters + real init = -2.9496; + end; + icon bg + figures + rectangle 304 256 336 288 color 0 fill 15132390; + text 'ò' 320 269.3 color 16711680 'SymbolProp BT' 21 symbol; + end; + implementation eq +parameters + real global joint; +variables + real R[3,3]; + real p[3]; + real q; + real qa[6]; + real temp [4,4]; +initialequations + qa = 0; +equations +q = -int(input,init); +qa[joint] = q; +R = dll('EulerAngles.dll','RotationMatrixFromEulXYZs',qa); +output = homogeneous(R,qa[4:6]);implementation_end; + plug p1 240 188; + plug output 320 368; + plug p2 240 412; + OneJunction2 240 271.9 + description ' + + 4.2 +1 + False + Bond Graph\FlowSensor.emx + 2011-11-29 15:50:53 + +'; + knot FlowSensor + ports + mechanical knot in p1 [1]; + power knot out p2 [1]; + signal knot out flow [1]; + restrictions + causality constraint not_equal p1 p2; + end; + icon bg ellipse + figures + ellipse 233.1 264.8 246.9 279.1 color 0 fill 16777215; + text 'f' 240 271.2 color 0; + end; + implementation eq +equations + p2.f = p1.f; + p1.e = p2.e; + flow = p1.f; +implementation_end; + uTbai 240 328 + description ' + 4.0 + 1 + False + Bond Graph\TF.emx + 2007-9-25 12:4:2 + True +'; + type TF + ports + power in p1; + power out p2 [6,1]; + restrictions + causality constraint not_equal p1 p2; + causality fixed in p1; + causality fixed out p2; + parameters + real Cconstraint = 1.0e-4; + real Rconstraint = 1000.0; + end; + icon bg left + figures + text 'TF' 240 328 color 0 18 bold; + end; + implementation eq +parameters + real global joint; +variables + real i; + real state[6]; +equations + /*p2.e[1] = (Rconstraint*-p2.f[1] + int(-p2.f[1])/Cconstraint); + p2.e[2] = (Rconstraint*-p2.f[2] + int(-p2.f[2])/Cconstraint); + p2.e[3] = p1.e; + p2.e[4] = (Rconstraint*-p2.f[4] + int(-p2.f[4])/Cconstraint); + p2.e[5] = (Rconstraint*-p2.f[5] + int(-p2.f[5])/Cconstraint); + p2.e[6] = (Rconstraint*-p2.f[6] + int(-p2.f[6])/Cconstraint); + + p1.f = p2.f[3];*/ + state = int(p2.f); + for i = 1 to 6 do + if i == joint then + p1.f = p2.f[i]; + p2.e[i] = p1.e; + else + p2.e[i] = (Rconstraint*-p2.f[i] + -state[i]/Cconstraint); + end; + end; +implementation_end; + end; + connections + Integrate\output -> output; + OneJunction2\flow -> Integrate\input; + OneJunction2\p2 => uTbai\p1; + p1 => OneJunction2\p1; + uTbai\p2 => p2; + end; + implementation_end; + MatrixMul 312 480 + description ' + 4.0 + 1 + False + Signal\Block Diagram\Gain.emx + 2007-9-26 12:15:12 + True +'; + type Gain + ports + signal in input1 [4,4]; + signal out output [4,4]; + signal in input2 [4,4]; + end; + icon bg bottom + figures + rectangle 296.1 464 327.9 496 color 0 fill 15132390; + text 'X' 312 480 color 16711680 16 bold; + end; + implementation eq +variables + real temp[4,4]; +equations + output = input2*input1; + temp = input2*input1; implementation_end; + plug p 104 328; + plug p1 232 88; + plug p2 488 328; + plug Hin 104 480; + plug Hout 496 480; + Splitter2 312 216 + description '4.0 + Signal\Block Diagram\Splitter.emx + 2008-01-17 11:28:29 +1 + False +'; + knot Splitter + ports + signal knot duplicatable out output [4,4]; + signal knot in input [4,4]; + end; + icon bg ellipse + figures + ellipse 308.8 212.8 315.2 219.2 color -1 fill 0; + ellipse 307.7 211.7 316.3 220.3 color -1; + terminals + input 312 216 fixed; + end; + implementation eq +equations + collect (output) = input; +implementation_end; + Wbai 232 328 + description ' + 4.0 + 1 + False + Bond Graph\ZeroJunction.emx + 2007-9-27 9:51:43 + True +'; + knot ZeroJunction + ports + power knot duplicatable none p [6,1]; + signal knot out effort [6,1]; + restrictions + causality constraint one_in p; + end; + icon bg bottom + figures + text '0' 232 328 color 0 18 bold; + end; + implementation eq +equations + sum (direct (p.f)) = 0; + equal (collect (p.e)); + effort = first (p.e); +implementation_end; + end; + connections + Hin -> MatrixMul\input2; + JointType\output -> Splitter2\input; + JointType\p2 => Wbai\p; + MatrixMul\output -> Hout; + p <= Wbai\p; + p1 => JointType\p1; + p2 => AdHji\p2; + Splitter2\output -> AdHji\H 416 216; + Splitter2\output -> MatrixMul\input1; + Wbai\p <= AdHji\p1; + end; + parameterrelations +EndstopMin\Rendstop = Rendstop; +EndstopMin\Cendstop = Cendstop; +EndstopMin\InitialPos = InitialPos; +EndstopMin\EndstopPos = MinEndstopPos; +EndstopMax\Rendstop = Rendstop; +EndstopMax\Cendstop = Cendstop; +EndstopMax\InitialPos = InitialPos; +EndstopMax\EndstopPos = MaxEndstopPos; +Rjoint\Rjoint= Rjoint; +Integrate\init = InitialPos; +uTbai\Rconstraint = Rconstraint; +uTbai\Cconstraint = Cconstraint; + +parameterrelations_end; + figures + text 'b = next link (body) +a = previous link (body) +i = Frame fixed in previous body, fixed in joint +j = Frame fixed in next body, fixed in joint + ' 672 392 color 0; + implementation_end; + Joint1 728.1 502 + description ' + + 4.8 +1 + False + True + Bond Graph\MR\joint-v2.emx + 2020-7-17 14:55:32 + +'; + type 'Submodel-rotz' + ports + power out p [6,1]; + power in p1; + power in p2 [6,1]; + signal in Hin [4,4]; + signal out Hout [4,4]; + signal out q; + end; + icon bg bottom + figures + rectangle 696.2 464 760 540 color 0 fill 14745599; + text 'Joint' 728 496 color 0; + terminals + p 696 480 fixed; + p1 728 464 fixed; + p2 760 480 fixed; + Hin 696 528 fixed; + Hout 760 528 fixed; + end; + implementation bg + submodels + AdHji 424 424 + description ' + 4.0 + 1 + False + Bond Graph\MTF.emx + 2007-9-25 12:3:3 + True +'; + type MTF + ports + power out p1 [6,1]; + power in p2 [6,1]; + signal in H [4,4]; + restrictions + causality constraint not_equal p1 p2; + end; + icon bg bottom + figures + text 'MTF' 424 424 color 0 18 bold; + end; + implementation eq +equations + p2.e = transpose(Adjoint(H)) * p1.e; + p1.f = Adjoint(H) * p2.f;implementation_end; + JointType 240 312 + description '4.81FalseTrueparameters + real joint = 3;'; + type Submodel + ports + mechanical in p1; + signal out output [4,4]; + power out p2 [6,1]; + signal out q; + end; + implementation bg + submodels + Integrate 320 272 + description ' + 4.0 + 1 + False + Signal\Block Diagram\Integrate.emx + 2007-9-26 12:3:23 + True +'; + type Integrate + ports + signal in input; + signal out output [4,4]; + signal out q; + parameters + real init = -2.9496; + end; + icon bg + figures + rectangle 304 256 336 288 color 0 fill 15132390; + text 'ò' 320 269.3 color 16711680 'SymbolProp BT' 21 symbol; + end; + implementation eq +parameters + real global joint; +variables + real R[3,3]; + real p[3]; + real qa[6]; + real temp [4,4]; +initialequations + qa = 0; +equations +q = -int(input); +qa[joint] = q; +R = dll('EulerAngles.dll','RotationMatrixFromEulXYZs',qa); +output = homogeneous(R,qa[4:6]);implementation_end; + plug p1 240 188; + plug output 320 416; + plug p2 240 412; + plug q 320 184; + OneJunction2 240 271.9 + description ' + + 4.2 +1 + False + Bond Graph\FlowSensor.emx + 2011-11-29 15:50:53 + +'; + knot FlowSensor + ports + mechanical knot in p1 [1]; + power knot out p2 [1]; + signal knot out flow [1]; + restrictions + causality constraint not_equal p1 p2; + end; + icon bg ellipse + figures + ellipse 233.1 264.8 246.9 279.1 color 0 fill 16777215; + text 'f' 240 271.2 color 0; + end; + implementation eq +equations + p2.f = p1.f; + p1.e = p2.e; + flow = p1.f; +implementation_end; + uTbai 240 328 + description ' + 4.0 + 1 + False + Bond Graph\TF.emx + 2007-9-25 12:4:2 + True +'; + type TF + ports + power in p1; + power out p2 [6,1]; + restrictions + causality constraint not_equal p1 p2; + causality fixed in p1; + causality fixed out p2; + parameters + real Cconstraint = 1.0e-4; + real Rconstraint = 1000.0; + end; + icon bg left + figures + text 'TF' 240 328 color 0 18 bold; + end; + implementation eq +parameters + real global joint; +variables + real i; + real state[6]; +equations + /*p2.e[1] = (Rconstraint*-p2.f[1] + int(-p2.f[1])/Cconstraint); + p2.e[2] = (Rconstraint*-p2.f[2] + int(-p2.f[2])/Cconstraint); + p2.e[3] = p1.e; + p2.e[4] = (Rconstraint*-p2.f[4] + int(-p2.f[4])/Cconstraint); + p2.e[5] = (Rconstraint*-p2.f[5] + int(-p2.f[5])/Cconstraint); + p2.e[6] = (Rconstraint*-p2.f[6] + int(-p2.f[6])/Cconstraint); + + p1.f = p2.f[3];*/ + state = int(p2.f); + for i = 1 to 6 do + if i == joint then + p1.f = p2.f[i]; + p2.e[i] = p1.e; + else + p2.e[i] = (Rconstraint*-p2.f[i] + -state[i]/Cconstraint); + end; + end; +implementation_end; + end; + connections + Integrate\output -> output; + Integrate\q -> q; + OneJunction2\flow -> Integrate\input; + OneJunction2\p2 => uTbai\p1; + p1 => OneJunction2\p1; + uTbai\p2 => p2; + end; + implementation_end; + MatrixMul 320 576 + description ' + 4.0 + 1 + False + Signal\Block Diagram\Gain.emx + 2007-9-26 12:15:12 + True +'; + type Gain + ports + signal in input1 [4,4]; + signal out output [4,4]; + signal in input2 [4,4]; + end; + icon bg bottom + figures + rectangle 304.1 560 335.9 592 color 0 fill 15132390; + text 'X' 320 576 color 16711680 16 bold; + end; + implementation eq +equations + output = input2*input1; implementation_end; + plug p 112 424; + plug p1 240 40; + plug p2 496 424; + plug Hin 112 576; + plug Hout 504 576; + plug q 112 312; + Splitter2 320 312 + description '4.0 + Signal\Block Diagram\Splitter.emx + 2008-01-17 11:28:29 +1 + False +'; + knot Splitter + ports + signal knot duplicatable out output [4,4]; + signal knot in input [4,4]; + end; + icon bg ellipse + figures + ellipse 316.8 308.8 323.2 315.2 color -1 fill 0; + ellipse 315.7 307.7 324.3 316.3 color -1; + terminals + input 320 312 fixed; + end; + implementation eq +equations + collect (output) = input; +implementation_end; + Wbai 240 424 + description ' + 4.0 + 1 + False + Bond Graph\ZeroJunction.emx + 2007-9-27 9:51:43 + True +'; + knot ZeroJunction + ports + power knot duplicatable none p [6,1]; + signal knot out effort [6,1]; + restrictions + causality constraint one_in p; + end; + icon bg bottom + figures + text '0' 240 424 color 0 18 bold; + end; + implementation eq +equations + sum (direct (p.f)) = 0; + equal (collect (p.e)); + effort = first (p.e); +implementation_end; + end; + connections + Hin -> MatrixMul\input2; + JointType\output -> Splitter2\input; + JointType\p1 <= p1; + JointType\p2 => Wbai\p; + JointType\q -> q; + MatrixMul\output -> Hout; + p <= Wbai\p; + p2 => AdHji\p2; + Splitter2\output -> AdHji\H 424 312; + Splitter2\output -> MatrixMul\input1; + Wbai\p <= AdHji\p1; + end; + parameterrelations +EndstopMin\Rendstop = Rendstop; +EndstopMin\Cendstop = Cendstop; +EndstopMin\InitialPos = InitialPos; +EndstopMin\EndstopPos = MinEndstopPos; +EndstopMax\Rendstop = Rendstop; +EndstopMax\Cendstop = Cendstop; +EndstopMax\InitialPos = InitialPos; +EndstopMax\EndstopPos = MaxEndstopPos; +Rjoint\Rjoint= Rjoint; +Integrate\init = InitialPos; +uTbai\Rconstraint = Rconstraint; +uTbai\Cconstraint = Cconstraint; + +parameterrelations_end; + figures + text 'b = next link (body) +a = previous link (body) +i = Frame fixed in previous body, fixed in joint +j = Frame fixed in next body, fixed in joint + ' 680 488 color 0; + implementation_end; + JointBase1 488.2 296 + description ' + 4.1 +1 + False + True + Joint-roty.emx + 2011-1-18 17:30:05 +'; + type 'Submodel-roty' + ports + power out p [6,1]; + power in p1; + power in p2 [6,1]; + signal in Hin [4,4]; + signal out Hout [4,4]; + parameters + real Rconstraint = 1000.0; + real Cconstraint = 1.0e-4; + real Rendstop = 1000.0; + real Cendstop = 1.0e-4; + real InitialPos = -1.13; + real MaxEndstopPos = 1.57; + real MinEndstopPos = -1.131; + real Rjoint = 0.1; + end; + icon bg bottom + figures + rectangle 456.5 224 520 368 color 0 fill 14745599; + text 'Joint-roty' 488.5 299 color 0; + terminals + p 456 256 fixed; + p1 487.5 224 fixed; + p2 520 256 fixed; + Hin 456 336 fixed; + Hout 520 336 fixed; + end; + implementation bg + submodels + AdHji 424 424 + description ' + 4.0 + 1 + False + Bond Graph\MTF.emx + 2007-9-25 12:3:3 + True +'; + type MTF + ports + power out p1 [6,1]; + power in p2 [6,1]; + signal in H [4,4]; + restrictions + causality constraint not_equal p1 p2; + end; + icon bg bottom + figures + text 'MTF' 424 424 color 0 18 bold; + end; + implementation eq +equations + p2.e = transpose(Adjoint(H)) * p1.e; + p1.f = Adjoint(H) * p2.f;implementation_end; + Integrate 320 336 + description ' + 4.0 + 1 + False + Signal\Block Diagram\Integrate.emx + 2007-9-26 12:3:23 + True +'; + type Integrate + ports + signal in input; + signal out output [4,4]; + parameters + real init = -2.9496; + end; + icon bg + figures + rectangle 304 320 336 352 color 0 fill 15132390; + text 'ò' 320 333.3 color 16711680 'SymbolProp BT' 21 symbol; + end; + implementation eq +variables + real R[3,3]; + real p[3]; + real q; +equations +q = -int(input,init); +R = [ cos(q), -sin(q), 0; + sin(q), cos(q), 0; + 0, 0, 1]; +p = [0;0;0]; +output = homogeneous(R,p); + + implementation_end; + MatrixMul 320 496 + description ' + 4.0 + 1 + False + Signal\Block Diagram\Gain.emx + 2007-9-26 12:15:12 + True +'; + type Gain + ports + signal in input1 [4,4]; + signal out output [4,4]; + signal in input2 [4,4]; + end; + icon bg bottom + figures + rectangle 304.1 480 335.9 512 color 0 fill 15132390; + text 'X' 320 496 color 16711680 16 bold; + end; + implementation eq +equations + output = input2*input1; implementation_end; + plug p1 240 56; + plug p2 496 424; + plug Hin 112 496; + plug Hout 504 496; + plug p 112 424; + OneJunction 240 272 + description '4.01False + Bond Graph\OneJunction.emx + 2007-9-27 9:51:18 +'; + knot OneJunction + ports + power knot duplicatable none p [1]; + signal knot out flow [1]; + restrictions + causality constraint one_out p; + end; + icon bg + figures + text '1' 240 272 color 0 18 bold; + end; + implementation eq +equations + sum (direct (p.e)) = 0; + equal (collect (p.f)); + flow = first (p.f); +implementation_end; + Rjoint 192 272 + description ' + 4.0 + 1 + False + Bond Graph\R.emx + 2007-9-25 12:3:18 + True +'; + type R + ports + power in p; + parameters + real Rjoint = 0.1; + end; + icon bg bottom + figures + text 'R' 192 272 color 0 18 bold; + end; + implementation eq +equations + p.e = Rjoint * p.f; +implementation_end; + Splitter2 320 368 + description '4.0 + Signal\Block Diagram\Splitter.emx + 2008-01-17 11:28:29 +1 + False +'; + knot Splitter + ports + signal knot duplicatable out output [4,4]; + signal knot in input [4,4]; + end; + icon bg ellipse + figures + ellipse 316.8 364.8 323.2 371.2 color -1 fill 0; + ellipse 315.7 363.7 324.3 372.3 color -1; + terminals + input 320 368 fixed; + end; + implementation eq +equations + collect (output) = input; +implementation_end; + Tbai 240 384 + description ' + 4.0 + 1 + False + Bond Graph\OneJunction.emx + 2007-9-27 9:51:18 + True +'; + knot OneJunction + ports + power knot duplicatable none p [6,1]; + signal knot out flow [6,1]; + restrictions + causality constraint one_out p; + end; + icon bg left + figures + text '1' 240 384 color 0 18 bold; + end; + implementation eq +equations + sum (direct (p.e)) = 0; + equal (collect (p.f)); + flow = first (p.f); +implementation_end; + uTbai 240 328 + description ' + 4.0 + 1 + False + Bond Graph\TF.emx + 2007-9-25 12:4:2 + True +'; + type TF + ports + power in p1; + power out p2 [6,1]; + restrictions + causality constraint not_equal p1 p2; + causality fixed in p1; + causality fixed out p2; + parameters + real Cconstraint = 1.0e-4; + real Rconstraint = 1000.0; + end; + icon bg left + figures + text 'TF' 240 328 color 0 18 bold; + end; + implementation eq + +equations + p2.e[1] = (Rconstraint*-p2.f[1] + int(-p2.f[1])/Cconstraint); + p2.e[2] = (Rconstraint*-p2.f[2] + int(-p2.f[2])/Cconstraint); + p2.e[3] = p1.e; + p2.e[4] = (Rconstraint*-p2.f[4] + int(-p2.f[4])/Cconstraint); + p2.e[5] = (Rconstraint*-p2.f[5] + int(-p2.f[5])/Cconstraint); + p2.e[6] = (Rconstraint*-p2.f[6] + int(-p2.f[6])/Cconstraint); + + p1.f = p2.f[3]; +implementation_end; + Wbai 240 424 + description ' + 4.0 + 1 + False + Bond Graph\ZeroJunction.emx + 2007-9-27 9:51:43 + True +'; + knot ZeroJunction + ports + power knot duplicatable none p [6,1]; + signal knot out effort [6,1]; + restrictions + causality constraint one_in p; + end; + icon bg bottom + figures + text '0' 240 424 color 0 18 bold; + end; + implementation eq +equations + sum (direct (p.f)) = 0; + equal (collect (p.e)); + effort = first (p.e); +implementation_end; + ZeroJunction 240 104 + description '4.01False + Bond Graph\ZeroJunction.emx + 2007-9-27 9:51:43 +'; + knot ZeroJunction + ports + power knot duplicatable none p [1]; + signal knot out effort [1]; + restrictions + causality constraint one_in p; + end; + icon bg + figures + text '0' 240 104 color 0 18 bold; + end; + implementation eq +equations + sum (direct (p.f)) = 0; + equal (collect (p.e)); + effort = first (p.e); +implementation_end; + end; + connections + Hin -> MatrixMul\input2; + Integrate\output -> Splitter2\input; + MatrixMul\output -> Hout; + OneJunction\flow -> Integrate\input 320 272; + OneJunction\p => Rjoint\p; + OneJunction\p => uTbai\p1; + p <= Wbai\p; + p1 => ZeroJunction\p; + p2 => AdHji\p2; + Splitter2\output -> AdHji\H 424 368; + Splitter2\output -> MatrixMul\input1; + Tbai\p => Wbai\p; + uTbai\p2 => Tbai\p; + Wbai\p <= AdHji\p1; + ZeroJunction\p => OneJunction\p; + end; + parameterrelations +EndstopMin\Rendstop = Rendstop; +EndstopMin\Cendstop = Cendstop; +EndstopMin\InitialPos = InitialPos; +EndstopMin\EndstopPos = MinEndstopPos; +EndstopMax\Rendstop = Rendstop; +EndstopMax\Cendstop = Cendstop; +EndstopMax\InitialPos = InitialPos; +EndstopMax\EndstopPos = MaxEndstopPos; +Rjoint\Rjoint= Rjoint; +Integrate\init = InitialPos; +uTbai\Rconstraint = Rconstraint; +uTbai\Cconstraint = Cconstraint;parameterrelations_end; + figures + text 'b = next link (body) +a = previous link (body) +i = Frame fixed in previous body, fixed in joint +j = Frame fixed in next body, fixed in joint + ' 744 400 color 0; + implementation_end; + JointBase2 296.2 296 + description ' + 4.1 +1 + False + True + Joint-roty.emx + 2011-1-18 17:30:05 +'; + type 'Submodel-roty' + ports + power out p [6,1]; + power in p1; + power in p2 [6,1]; + signal in Hin [4,4]; + signal out Hout [4,4]; + parameters + real Rconstraint = 1000.0; + real Cconstraint = 1.0e-4; + real Rendstop = 1000.0; + real Cendstop = 1.0e-4; + real InitialPos = 0.0; + real MaxEndstopPos = 1.57; + real MinEndstopPos = -1.131; + real Rjoint = 0.1; + end; + icon bg bottom + figures + rectangle 264.5 224 328 368 color 0 fill 14745599; + text 'Joint-roty' 296.5 299 color 0; + terminals + p 264 256 fixed; + p1 295.5 224 fixed; + p2 328 256 fixed; + Hin 264 336 fixed; + Hout 328 336 fixed; + end; + implementation bg + submodels + AdHji 424 424 + description ' + 4.0 + 1 + False + Bond Graph\MTF.emx + 2007-9-25 12:3:3 + True +'; + type MTF + ports + power out p1 [6,1]; + power in p2 [6,1]; + signal in H [4,4]; + restrictions + causality constraint not_equal p1 p2; + end; + icon bg bottom + figures + text 'MTF' 424 424 color 0 18 bold; + end; + implementation eq +equations + p2.e = transpose(Adjoint(H)) * p1.e; + p1.f = Adjoint(H) * p2.f;implementation_end; + Integrate 320 328 + description ' + 4.0 + 1 + False + Signal\Block Diagram\Integrate.emx + 2007-9-26 12:3:23 + True +'; + type Integrate + ports + signal in input; + signal out output [4,4]; + parameters + real init = -2.9496; + end; + icon bg + figures + rectangle 304 312 336 344 color 0 fill 15132390; + text 'ò' 320 325.3 color 16711680 'SymbolProp BT' 21 symbol; + end; + implementation eq +variables + real R[3,3]; + real p[3]; + real q; +equations +q = -int(input,init); +R = [ cos(q), -sin(q), 0; + sin(q), cos(q), 0; + 0, 0, 1]; +p = [0;0;0]; +output = homogeneous(R,p); + + implementation_end; + MatrixMul 320 496 + description ' + 4.0 + 1 + False + Signal\Block Diagram\Gain.emx + 2007-9-26 12:15:12 + True +'; + type Gain + ports + signal in input1 [4,4]; + signal out output [4,4]; + signal in input2 [4,4]; + end; + icon bg bottom + figures + rectangle 304.1 480 335.9 512 color 0 fill 15132390; + text 'X' 320 496 color 16711680 16 bold; + end; + implementation eq +equations + output = input2*input1; implementation_end; + plug p1 240 56; + plug p2 496 424; + plug Hin 112 496; + plug Hout 504 496; + plug p 112 424; + OneJunction 240 272 + description '4.01False + Bond Graph\OneJunction.emx + 2007-9-27 9:51:18 +'; + knot OneJunction + ports + power knot duplicatable none p [1]; + signal knot out flow [1]; + restrictions + causality constraint one_out p; + end; + icon bg + figures + text '1' 240 272 color 0 18 bold; + end; + implementation eq +equations + sum (direct (p.e)) = 0; + equal (collect (p.f)); + flow = first (p.f); +implementation_end; + Rjoint 192 272 + description ' + 4.0 + 1 + False + Bond Graph\R.emx + 2007-9-25 12:3:18 + True +'; + type R + ports + power in p; + parameters + real Rjoint = 0.1; + end; + icon bg bottom + figures + text 'R' 192 272 color 0 18 bold; + end; + implementation eq +equations + p.e = Rjoint * p.f; +implementation_end; + Splitter2 320 368 + description '4.0 + Signal\Block Diagram\Splitter.emx + 2008-01-17 11:28:29 +1 + False +'; + knot Splitter + ports + signal knot duplicatable out output [4,4]; + signal knot in input [4,4]; + end; + icon bg ellipse + figures + ellipse 316.8 364.8 323.2 371.2 color -1 fill 0; + ellipse 315.7 363.7 324.3 372.3 color -1; + terminals + input 320 368 fixed; + end; + implementation eq +equations + collect (output) = input; +implementation_end; + Tbai 240 376 + description ' + 4.0 + 1 + False + Bond Graph\OneJunction.emx + 2007-9-27 9:51:18 + True +'; + knot OneJunction + ports + power knot duplicatable none p [6,1]; + signal knot out flow [6,1]; + restrictions + causality constraint one_out p; + end; + icon bg left + figures + text '1' 240 376 color 0 18 bold; + end; + implementation eq +equations + sum (direct (p.e)) = 0; + equal (collect (p.f)); + flow = first (p.f); +implementation_end; + uTbai 240 328 + description ' + 4.0 + 1 + False + Bond Graph\TF.emx + 2007-9-25 12:4:2 + True +'; + type TF + ports + power in p1; + power out p2 [6,1]; + restrictions + causality constraint not_equal p1 p2; + causality fixed in p1; + causality fixed out p2; + parameters + real Cconstraint = 1.0e-4; + real Rconstraint = 1000.0; + end; + icon bg left + figures + text 'TF' 240 328 color 0 18 bold; + end; + implementation eq + +equations + p2.e[1] = (Rconstraint*-p2.f[1] + int(-p2.f[1])/Cconstraint); + p2.e[2] = (Rconstraint*-p2.f[2] + int(-p2.f[2])/Cconstraint); + p2.e[3] = p1.e; + p2.e[4] = (Rconstraint*-p2.f[4] + int(-p2.f[4])/Cconstraint); + p2.e[5] = (Rconstraint*-p2.f[5] + int(-p2.f[5])/Cconstraint); + p2.e[6] = (Rconstraint*-p2.f[6] + int(-p2.f[6])/Cconstraint); + + p1.f = p2.f[3]; +implementation_end; + Wbai 240 424 + description ' + 4.0 + 1 + False + Bond Graph\ZeroJunction.emx + 2007-9-27 9:51:43 + True +'; + knot ZeroJunction + ports + power knot duplicatable none p [6,1]; + signal knot out effort [6,1]; + restrictions + causality constraint one_in p; + end; + icon bg bottom + figures + text '0' 240 424 color 0 18 bold; + end; + implementation eq +equations + sum (direct (p.f)) = 0; + equal (collect (p.e)); + effort = first (p.e); +implementation_end; + ZeroJunction 240 160 + description '4.01False + Bond Graph\ZeroJunction.emx + 2007-9-27 9:51:43 +'; + knot ZeroJunction + ports + power knot duplicatable none p [1]; + signal knot out effort [1]; + restrictions + causality constraint one_in p; + end; + icon bg + figures + text '0' 240 160 color 0 18 bold; + end; + implementation eq +equations + sum (direct (p.f)) = 0; + equal (collect (p.e)); + effort = first (p.e); +implementation_end; + end; + connections + Hin -> MatrixMul\input2; + Integrate\output -> Splitter2\input; + MatrixMul\output -> Hout; + OneJunction\flow -> Integrate\input 320 272; + OneJunction\p => Rjoint\p; + OneJunction\p => uTbai\p1; + p <= Wbai\p; + p1 => ZeroJunction\p; + p2 => AdHji\p2; + Splitter2\output -> AdHji\H 424 368; + Splitter2\output -> MatrixMul\input1; + Tbai\p => Wbai\p; + uTbai\p2 => Tbai\p; + Wbai\p <= AdHji\p1; + ZeroJunction\p => OneJunction\p; + end; + parameterrelations +EndstopMin\Rendstop = Rendstop; +EndstopMin\Cendstop = Cendstop; +EndstopMin\InitialPos = InitialPos; +EndstopMin\EndstopPos = MinEndstopPos; +EndstopMax\Rendstop = Rendstop; +EndstopMax\Cendstop = Cendstop; +EndstopMax\InitialPos = InitialPos; +EndstopMax\EndstopPos = MaxEndstopPos; +Rjoint\Rjoint= Rjoint; +Integrate\init = InitialPos; +uTbai\Rconstraint = Rconstraint; +uTbai\Cconstraint = Cconstraint;parameterrelations_end; + figures + text 'b = next link (body) +a = previous link (body) +i = Frame fixed in previous body, fixed in joint +j = Frame fixed in next body, fixed in joint + ' 744 400 color 0; + implementation_end; + Link 464 504 + description ' + + 4.8 + Z:\home\wouter\Documents\20-sim\library\Bond Graph\MR\link-v2.emx +1 + False + 2020-7-16 17:44:32 +False + +'; + type 'Submodel-Equation' + ports + signal in Hin [4,4]; + signal out Hout [4,4]; + power in Pin [6,1]; + power out Pout [6,1]; + restrictions + causality constraint not_equal Pin Pout; + end; + icon bg bottom + figures + rectangle 432 464 496 544 color 0 fill 8454041; + text 'name' 464 488 color 0 'Clear Sans' 16; + terminals + Hin 432 528 fixed; + Hout 496 528 fixed; + Pin 496 480 fixed; + Pout 432 480 fixed; + end; + implementation eq +parameters + real offset[3]= [0.0; 0.0325; 0.0]; //coordinates of joint_1 +variables + real Hab[4,4]; + real AdHab[6,6]; +equations + Hab = homogeneous(eye(3),offset); + AdHab = Adjoint(eye(3),offset); + Hout = Hin * Hab; + Pout.e = transpose(AdHab) * Pin.e; + Pin.f = AdHab * Pout.f; + + implementation_end; + Link1 624 504 + description ' + + 4.8 + Z:\home\wouter\Documents\20-sim\library\Bond Graph\MR\link-v2.emx +1 + False + 2020-7-16 17:44:32 +False + +'; + type 'Submodel-Equation' + ports + signal in Hin [4,4]; + signal out Hout [4,4]; + power in Pin [6,1]; + power out Pout [6,1]; + restrictions + causality constraint not_equal Pin Pout; + end; + icon bg bottom + figures + rectangle 592 464 656 544 color 0 fill 8454041; + text 'name' 624 488 color 0 'Clear Sans' 16; + terminals + Hin 592 528 fixed; + Hout 656 528 fixed; + Pin 656 480 fixed; + Pout 592 480 fixed; + end; + implementation eq +parameters + real offset[3]= [0.0; 0.0325; 0.0]; //coordinates of joint_1 +variables + real Hab[4,4]; + real AdHab[6,6]; +equations + Hab = homogeneous(eye(3),offset); + AdHab = Adjoint(eye(3),offset); + Hout = Hin * Hab; + Pout.e = transpose(AdHab) * Pin.e; + Pin.f = AdHab * Pout.f; + + implementation_end; + Link2 808 504 + description ' + + 4.8 + Z:\home\wouter\Documents\20-sim\library\Bond Graph\MR\link-v2.emx +1 + False + 2020-7-16 17:44:32 +False + +'; + type 'Submodel-Equation' + ports + signal in Hin [4,4]; + signal out Hout [4,4]; + power in Pin [6,1]; + power out Pout [6,1]; + restrictions + causality constraint not_equal Pin Pout; + end; + icon bg bottom + figures + rectangle 776 464 840 544 color 0 fill 8454041; + text 'name' 808 488 color 0 'Clear Sans' 16; + terminals + Hin 776 528 fixed; + Hout 840 528 fixed; + Pin 840 480 fixed; + Pout 776 480 fixed; + end; + implementation eq +parameters + real offset[3]= [0; 0.025; 0]; //coordinates of joint_1 +variables + real Hab[4,4]; + real AdHab[6,6]; +equations + Hab = homogeneous(eye(3),offset); + AdHab = Adjoint(eye(3),offset); + Hout = Hin * Hab; + Pout.e = transpose(AdHab) * Pin.e; + Pin.f = AdHab * Pout.f; + + implementation_end; + Link3 984 504 + description ' + + 4.8 + Z:\home\wouter\Documents\20-sim\library\Bond Graph\MR\link-v2.emx +1 + False + 2020-7-16 17:44:32 +False + +'; + type 'Submodel-Equation' + ports + signal in Hin [4,4]; + signal out Hout [4,4]; + power in Pin [6,1]; + power out Pout [6,1]; + restrictions + causality constraint not_equal Pin Pout; + end; + icon bg bottom + figures + rectangle 952 464 1016 544 color 0 fill 8454041; + text 'name' 984 488 color 0 'Clear Sans' 16; + terminals + Hin 952 528 fixed; + Hout 1016 528 fixed; + Pin 1016 480 fixed; + Pout 952 480 fixed; + end; + implementation eq +parameters + real offset[3]= [0; 0.025; 0]; //coordinates of joint_1 +variables + real Hab[4,4]; + real AdHab[6,6]; +equations + Hab = homogeneous(eye(3),offset); + AdHab = Adjoint(eye(3),offset); + Hout = Hin * Hab; + Pout.e = transpose(AdHab) * Pin.e; + Pin.f = AdHab * Pout.f; + + implementation_end; + Link4 808 408 + description ' + + 4.8 + Bond Graph\MR\link-v3.emx +1 + False + 2020-7-19 15:22:34 +False + +'; + type 'Submodel-Equation' + ports + signal in Hin [4,4]; + signal out Hout [4,4]; + power in Pin [6,1]; + power out Pout [6,1]; + restrictions + causality constraint not_equal Pin Pout; + end; + icon bg bottom + figures + rectangle 776 384 840 432 color 0 fill 8454041; + text 'Link' 808 408 color 0 'Clear Sans' 16; + terminals + Hin 776 424 fixed; + Hout 840 424 fixed; + Pin 840 392 fixed; + Pout 776 392 fixed; + end; + implementation eq +parameters + real offset[3]= [0; 0.025; 0]; //coordinates of joint_1 +variables + real Hab[4,4]; + real AdHab[6,6]; +equations + Hab = homogeneous(eye(3),offset); + AdHab = Adjoint(eye(3),offset); + Hout = Hin * Hab; + Pout.e = transpose(AdHab) * Pin.e; + Pin.f = AdHab * Pout.f; + + implementation_end; + new_joint1 672 592 + description '4.0 + Template\Submodel-Equation.emx +1 + False + 2007-11-1 22:32:1 + False +'; + type 'Submodel-Equation' + ports + signal in input [4,4]; + signal out output; + end; + implementation eq +variables + real position[3]; + real rotation[3]; + real R[3,3]; +equations + // start typing here + position = input[1:3,4]; + rotation = [input[3,2];input[1,3];input[2,1]]; + R = input[1:3,1:3];implementation_end; + new_joint2 936 624 + description '4.0 + Template\Submodel-Equation.emx +1 + False + 2007-11-1 22:32:1 + False +'; + type 'Submodel-Equation' + ports + signal in input [4,4]; + signal out output; + end; + implementation eq +variables + real position[3]; + real rotation[3]; + real R[3,3]; +equations + // start typing here + position = input[1:3,4]; + rotation = [input[3,2];input[1,3];input[2,1]]; + R = input[1:3,1:3];implementation_end; + new_joint3 1008 408 + description '4.0 + Template\Submodel-Equation.emx +1 + False + 2007-11-1 22:32:1 + False +'; + type 'Submodel-Equation' + ports + signal in input [4,4]; + signal out output; + end; + implementation eq +variables + real position[3]; + real rotation[3]; + real R[3,3]; +equations + // start typing here + position = input[1:3,4]; + rotation = [input[3,2];input[1,3];input[2,1]]; + R = input[1:3,1:3];implementation_end; + OneJunction 232 256 + description '4.01False + Bond Graph\OneJunction.emx + 2007-9-27 9:51:18 +'; + knot OneJunction + ports + power knot duplicatable none p [6,1]; + signal knot out flow [6,1]; + restrictions + causality constraint one_out p; + end; + icon bg + figures + text '1' 232 256 color 0 18 bold; + end; + implementation eq +equations + sum (direct (p.e)) = 0; + equal (collect (p.f)); + flow = first (p.f); +implementation_end; + OneJunction1 304 480 + description '4.01False + Bond Graph\OneJunction.emx + 2007-9-27 9:51:18 +'; + knot OneJunction + ports + power knot duplicatable none p [6,1]; + signal knot out flow [6,1]; + restrictions + causality constraint one_out p; + end; + icon bg + figures + text '1' 304 480 color 0 18 bold; + end; + implementation eq +equations + sum (direct (p.e)) = 0; + equal (collect (p.f)); + flow = first (p.f); +implementation_end; + OneJunction2 848 256 + description ' + + 4.2 +1 + False + Bond Graph\OneJunction.emx + 2011-11-29 16:17:51 + +'; + knot OneJunction + ports + power knot duplicatable none p [2,1]; + signal knot out flow [2,1]; + restrictions + causality constraint one_out p; + end; + icon bg + figures + text '1' 848 256 color 0 18 bold; + end; + implementation eq +equations + sum (direct (p.e)) = 0; + equal (collect (p.f)); + flow = first (p.f); +implementation_end; + OneJunction3 680 480 + description ' + + 4.2 +1 + False + Bond Graph\OneJunction.emx + 2011-11-29 16:17:51 + +'; + knot OneJunction + ports + power knot duplicatable none p [6,1]; + signal knot out flow [6,1]; + restrictions + causality constraint one_out p; + end; + icon bg + figures + text '1' 680 480 color 0 18 bold; + end; + implementation eq +equations + sum (direct (p.e)) = 0; + equal (collect (p.f)); + flow = first (p.f); +implementation_end; + OneJunction4 848 240 + description ' + + 4.2 +1 + False + Bond Graph\OneJunction.emx + 2011-11-29 16:17:51 + +'; + knot OneJunction + ports + power knot duplicatable none p [3,1]; + signal knot out flow [3,1]; + restrictions + causality constraint one_out p; + end; + icon bg + figures + text '1' 848 240 color 0 18 bold; + end; + implementation eq +equations + sum (direct (p.e)) = 0; + equal (collect (p.f)); + flow = first (p.f); +implementation_end; + ori_joint1 440 408 + description '4.0 + Template\Submodel-Equation.emx +1 + False + 2007-11-1 22:32:1 + False +'; + type 'Submodel-Equation' + ports + signal in input [4,4]; + signal out output; + end; + implementation eq +variables + real position[3]; + real rotation[3]; + real R[3,3]; +equations + // start typing here + position = input[1:3,4]; + rotation = [input[3,2];input[1,3];input[2,1]]; + R = input[1:3,1:3]; + implementation_end; + ori_joint2 672 336 + description '4.0 + Template\Submodel-Equation.emx +1 + False + 2007-11-1 22:32:1 + False +'; + type 'Submodel-Equation' + ports + signal in input [4,4]; + signal out output; + end; + implementation eq +variables + real position[3]; + real rotation[3]; + real R[3,3]; +equations + // start typing here + position = input[1:3,4]; + rotation = [input[3,2];input[1,3];input[2,1]]; + R = input[1:3,1:3];implementation_end; + PowerMux 810 240 + specifications active 'rot_x' + specification 'rot_x' + description ' + + 4.8 + Bond Graph\MR\PowerMux-Rotation.emx + 2020-7-20 14:19:51 +1 + False + True + +'; + type PowerMux + ports + power in input; + power out output [6,1]; + power in input_rot2 [2,1]; + power in input_pos3 [3,1]; + restrictions + causality constraint not_equal input output; + end; + icon bg bottom + figures + line 808 216 808 264 color 0 width 2; + rectangle 804 216 816 264 color -1; + text '1' 813 234 color 8421504 8; + terminals + input 808 224 fixed; + output 808 240 fixed; + input_rot2 808 256 fixed; + input_pos3 808 240 fixed; + end; + implementation eq +equations + output.e[1] = input.e; + output.e[2:3] = input_rot2.e; + output.e[4:6] = input_pos3.e; + output.f[1] = input.f; + output.f[2:3] = input_rot2.f; + output.f[4:6] = input_pos3.f;implementation_end; +specification_end; + specification 'rot_y' + description ' + 4.1 + Bond Graph\PowerMux.emx + 2011-3-4 15:12:50 +1 + False + True +'; + type PowerMux + ports + power in input; + power out output [6,1]; + power in input_rot2 [2,1]; + power in input_pos3 [3,1]; + restrictions + causality constraint not_equal input output; + end; + icon bg bottom + figures + line 808 216 808 264 color 0 width 2; + rectangle 804 216 816 264 color -1; + text '1' 813 234 color 8421504 8; + terminals + input 808 224 fixed; + output 808 240 fixed; + input_rot2 808 256 fixed; + input_pos3 808 240 fixed; + end; + implementation eq +equations + output.e[1] = input_rot2.e[1]; + output.e[2] = input.e; + output.e[3] = input_rot2.e[2]; + output.e[4:6] = input_pos3.e; + output.f[1] = input_rot2.f[1]; + output.f[2] = input.f; + output.f[3] = input_rot2.f[2]; + output.f[4:6] = input_pos3.f;implementation_end; +specification_end; + specification 'rot_z' + description ' + 4.1 + Bond Graph\PowerMux.emx + 2011-3-4 15:12:50 +1 + False + True +'; + type PowerMux + ports + power in input; + power out output [6,1]; + power in input_rot2 [2,1]; + power in input_pos3 [3,1]; + restrictions + causality constraint not_equal input output; + end; + icon bg bottom + figures + line 808 216 808 264 color 0 width 2; + rectangle 804 216 816 264 color -1; + text '1' 813 234 color 8421504 8; + terminals + input 808 224 fixed; + output 808 240 fixed; + input_rot2 808 256 fixed; + input_pos3 808 240 fixed; + end; + implementation eq +equations + output.e[3] = input.e; + output.e[1:2] = input_rot2.e; + output.e[4:6] = input_pos3.e; + output.f[3] = input.f; + output.f[1:2] = input_rot2.f; + output.f[4:6] = input_pos3.f;implementation_end; +specification_end; + end; + R 848 312 + description '4.01False + Bond Graph\2D\R-2.emx + 2007-9-25 12:6:54 +'; + type 'R-2' + ports + power in p [2,1]; + end; + icon bg bottom + figures + text 'R' 848 312 color 0 18 bold; + end; + implementation eq +parameters + real r[2,2] = [1.0, 0.0; 0.0, 1.0] {kN.m.s/rad}; +equations + p.e = r * p.f; +implementation_end; + R1 848 184 + description '4.01False + Bond Graph\3D\R-3.emx + 2007-9-25 12:11:54 +'; + type 'R-3' + ports + power in p [3,1]; + end; + icon bg bottom + figures + text 'R' 848 184 color 0 18 bold; + end; + implementation eq +parameters + real r[3,3] = [1.0, 0.0, 0.0; 0.0, 1.0, 0.0; 0.0, 0.0, 1.0] {kN.s/m}; +equations + p.e = r * p.f; +implementation_end; + Sf 160 256 + description '4.01False + Bond Graph\3D\Sf-3.emx + 2007-9-25 12:11:58 +'; + type 'Sf-3' + ports + power out p [6,1]; + restrictions + causality fixed in p; + end; + icon bg bottom + figures + text 'Sf' 160 256 color 0 18 bold; + end; + implementation eq +parameters + real flow[6,1] = 0; +variables + real effort [6]; +equations + p.f = flow; + effort = p.e; +implementation_end; + Sf1 256 480 + description '4.01False + Bond Graph\3D\Sf-3.emx + 2007-9-25 12:11:58 +'; + type 'Sf-3' + ports + power out p [6,1]; + restrictions + causality fixed in p; + end; + icon bg bottom + figures + text 'Sf' 256 480 color 0 18 bold; + end; + implementation eq +parameters + real flow[6,1] = 0; +variables + real effort [6]; +equations + p.f = flow; + effort = p.e; +implementation_end; + Splitter1 296 96 + description '4.0 + Signal\Block Diagram\Splitter.emx + 2008-01-17 11:28:29 +1 + False +'; + knot Splitter + ports + signal knot duplicatable out output [1]; + signal knot in input [1]; + end; + icon bg ellipse + figures + ellipse 292.8 92.8 299.2 99.2 color -1 fill 0; + ellipse 291.7 91.7 300.3 100.3 color -1; + terminals + input 296 96 fixed; + end; + implementation eq +equations + collect (output) = input; +implementation_end; + Splitter2 232 336 + description '4.0 + Signal\Block Diagram\Splitter.emx + 2008-01-17 11:28:29 +1 + False +'; + knot Splitter + ports + signal knot duplicatable out output [4,4]; + signal knot in input [4,4]; + end; + icon bg ellipse + figures + ellipse 228.8 332.8 235.2 339.2 color -1 fill 0; + ellipse 227.7 331.7 236.3 340.3 color -1; + terminals + input 232 336 fixed; + end; + implementation eq +equations + collect (output) = input; +implementation_end; + Splitter3 480 640 + description '4.0 + Signal\Block Diagram\Splitter.emx + 2008-01-17 11:28:29 +1 + False +'; + knot Splitter + ports + signal knot duplicatable out output [1]; + signal knot in input [1]; + end; + icon bg ellipse + figures + ellipse 476.8 636.8 483.2 643.2 color -1 fill 0; + ellipse 475.7 635.7 484.3 644.3 color -1; + terminals + input 480 640 fixed; + end; + implementation eq +equations + collect (output) = input; +implementation_end; + Splitter4 232 528 + description '4.0 + Signal\Block Diagram\Splitter.emx + 2008-01-17 11:28:29 +1 + False +'; + knot Splitter + ports + signal knot duplicatable out output [4,4]; + signal knot in input [4,4]; + end; + icon bg ellipse + figures + ellipse 228.8 524.8 235.2 531.2 color -1 fill 0; + ellipse 227.7 523.7 236.3 532.3 color -1; + terminals + input 232 528 fixed; + end; + implementation eq +equations + collect (output) = input; +implementation_end; + Splitter5 440 336 + description '4.0 + Signal\Block Diagram\Splitter.emx + 2008-01-17 11:28:29 +1 + False +'; + knot Splitter + ports + signal knot duplicatable out output [4,4]; + signal knot in input [4,4]; + end; + icon bg ellipse + figures + ellipse 436.8 332.8 443.2 339.2 color -1 fill 0; + ellipse 435.7 331.7 444.3 340.3 color -1; + terminals + input 440 336 fixed; + end; + implementation eq +equations + collect (output) = input; +implementation_end; + Splitter6 672 528 + description '4.0 + Signal\Block Diagram\Splitter.emx + 2008-01-17 11:28:29 +1 + False +'; + knot Splitter + ports + signal knot duplicatable out output [4,4]; + signal knot in input [4,4]; + end; + icon bg ellipse + figures + ellipse 668.8 524.8 675.2 531.2 color -1 fill 0; + ellipse 667.7 523.7 676.3 532.3 color -1; + terminals + input 672 528 fixed; + end; + implementation eq +equations + collect (output) = input; +implementation_end; + Splitter7 632 640 + description '4.0 + Signal\Block Diagram\Splitter.emx + 2008-01-17 11:28:29 +1 + False +'; + knot Splitter + ports + signal knot duplicatable out output [1]; + signal knot in input [1]; + end; + icon bg ellipse + figures + ellipse 628.8 636.8 635.2 643.2 color -1 fill 0; + ellipse 627.7 635.7 636.3 644.3 color -1; + terminals + input 632 640 fixed; + end; + implementation eq +equations + collect (output) = input; +implementation_end; + Splitter8 936 528 + description '4.0 + Signal\Block Diagram\Splitter.emx + 2008-01-17 11:28:29 +1 + False +'; + knot Splitter + ports + signal knot duplicatable out output [4,4]; + signal knot in input [4,4]; + end; + icon bg ellipse + figures + ellipse 932.8 524.8 939.2 531.2 color -1 fill 0; + ellipse 931.7 523.7 940.3 532.3 color -1; + terminals + input 936 528 fixed; + end; + implementation eq +equations + collect (output) = input; +implementation_end; + Submodel1 296 144 + description ' + 4.8 + 1 + '; + type Submodel + ports + signal in input; + power out p2; + end; + implementation bg + submodels + Gain1 552 88 + description '4.01False + Signal\Block Diagram\Gain.emx + 2007-9-26 12:15:12 +'; + type Gain + ports + signal in input; + signal out output; + end; + icon bg bottom + figures + rectangle 536.1 72 567.9 104 color 0 fill 15132390; + text 'K' 552 88 color 16711680 16 bold; + end; + implementation eq +parameters + real K = 12.0; // gain +equations + output = K * input; + implementation_end; + GY 624 184 + description ' + + 4.2 +1 + False + Bond Graph\GY.emx + 2011-11-29 15:53:45 + +'; + type GY + ports + power in p1; + power out p2; + restrictions + causality constraint equal p1 p2; + end; + icon bg bottom + figures + text 'GY' 624 184 color 0 18 bold; + end; + implementation eq +parameters + real r = 0.127; +equations + p1.e = r * p2.f; + p2.e = r * p1.f; +implementation_end; + MSe 624 88 + description ' + + 4.2 +1 + False + Bond Graph\MSe.emx + 2011-11-29 16:12:33 + +'; + type MSe + ports + power out p; + signal in effort; + restrictions + causality fixed out p; + end; + icon bg bottom + figures + text 'MSe' 624 88 color 0 18 bold; + end; + implementation eq +variables + real flow; +equations + p.e = effort; + flow = p.f; +implementation_end; + plug input 424 88; + plug p2 624 220; + OneJunction2 624 136 + description ' + + 4.2 +1 + False + Bond Graph\OneJunction.emx + 2011-11-29 16:17:51 + +'; + knot OneJunction + ports + power knot duplicatable none p [1]; + signal knot out flow [1]; + restrictions + causality constraint one_out p; + end; + icon bg + figures + text '1' 624 136 color 0 18 bold; + end; + implementation eq +equations + sum (direct (p.e)) = 0; + equal (collect (p.f)); + flow = first (p.f); +implementation_end; + R 664 136 + description ' + + 4.2 +1 + False + Bond Graph\R.emx + 2011-11-29 16:35:37 + +'; + type R + ports + power in p; + end; + icon bg bottom + figures + text 'R' 664 136 color 0 18 bold; + end; + implementation eq +parameters + real r = 0.08; +equations + p.e = r * p.f; +implementation_end; + SignalLimiter2 488 88 + description '4.01False + Signal\Block Diagram Non-Linear\SignalLimiter-Limit.emx + 2007-9-26 12:47:40 +'; + type 'SignalLimiter-Limit' + ports + signal in input; + signal out output; + end; + icon bg bottom + figures + group + rectangle 472 72 504 104 color 0 fill 15132390; + line 487.9 76.5 487.9 101 color 0 fill 15132390; + line 475 88.2 500.7 88.2 color 0 fill 15132390; + spline 481.9 95.1 493.9 81.4 color 16711680 fill 15132390 width 2; + spline 493.3 82.2 501.9 81.8 color 16711680 fill 15132390 width 2; + spline 475 95.6 481.9 95.1 color 16711680 fill 15132390 width 2; + end; + end; + implementation eq +parameters + real maximum = 1; + real minimum = -1; +equations + output = limit (input, minimum, maximum); + implementation_end; + end; + connections + Gain1\output -> MSe\effort; + GY\p2 => p2; + input -> SignalLimiter2\input; + MSe\p => OneJunction2\p; + OneJunction2\p => GY\p1; + R\p <= OneJunction2\p; + SignalLimiter2\output -> Gain1\input; + end; + implementation_end; + Submodel2 488 96 + description ' + 4.8 + 1 + '; + type Submodel + ports + signal in input; + power out p2; + end; + implementation bg + submodels + Gain1 552 88 + description '4.01False + Signal\Block Diagram\Gain.emx + 2007-9-26 12:15:12 +'; + type Gain + ports + signal in input; + signal out output; + end; + icon bg bottom + figures + rectangle 536.1 72 567.9 104 color 0 fill 15132390; + text 'K' 552 88 color 16711680 16 bold; + end; + implementation eq +parameters + real K = 12.0; // gain +equations + output = K * input; + implementation_end; + GY 624 184 + description ' + + 4.2 +1 + False + Bond Graph\GY.emx + 2011-11-29 15:53:45 + +'; + type GY + ports + power in p1; + power out p2; + restrictions + causality constraint equal p1 p2; + end; + icon bg bottom + figures + text 'GY' 624 184 color 0 18 bold; + end; + implementation eq +parameters + real r = 0.127; +equations + p1.e = r * p2.f; + p2.e = r * p1.f; +implementation_end; + MSe 624 88 + description ' + + 4.2 +1 + False + Bond Graph\MSe.emx + 2011-11-29 16:12:33 + +'; + type MSe + ports + power out p; + signal in effort; + restrictions + causality fixed out p; + end; + icon bg bottom + figures + text 'MSe' 624 88 color 0 18 bold; + end; + implementation eq +variables + real flow; +equations + p.e = effort; + flow = p.f; +implementation_end; + plug input 424 88; + plug p2 624 220; + OneJunction2 624 136 + description ' + + 4.2 +1 + False + Bond Graph\OneJunction.emx + 2011-11-29 16:17:51 + +'; + knot OneJunction + ports + power knot duplicatable none p [1]; + signal knot out flow [1]; + restrictions + causality constraint one_out p; + end; + icon bg + figures + text '1' 624 136 color 0 18 bold; + end; + implementation eq +equations + sum (direct (p.e)) = 0; + equal (collect (p.f)); + flow = first (p.f); +implementation_end; + R 664 136 + description ' + + 4.2 +1 + False + Bond Graph\R.emx + 2011-11-29 16:35:37 + +'; + type R + ports + power in p; + end; + icon bg bottom + figures + text 'R' 664 136 color 0 18 bold; + end; + implementation eq +parameters + real r = 0.08; +equations + p.e = r * p.f; +implementation_end; + SignalLimiter2 488 88 + description '4.01False + Signal\Block Diagram Non-Linear\SignalLimiter-Limit.emx + 2007-9-26 12:47:40 +'; + type 'SignalLimiter-Limit' + ports + signal in input; + signal out output; + end; + icon bg bottom + figures + group + rectangle 472 72 504 104 color 0 fill 15132390; + line 487.9 76.5 487.9 101 color 0 fill 15132390; + line 475 88.2 500.7 88.2 color 0 fill 15132390; + spline 481.9 95.1 493.9 81.4 color 16711680 fill 15132390 width 2; + spline 493.3 82.2 501.9 81.8 color 16711680 fill 15132390 width 2; + spline 475 95.6 481.9 95.1 color 16711680 fill 15132390 width 2; + end; + end; + implementation eq +parameters + real maximum = 1; + real minimum = -1; +equations + output = limit (input, minimum, maximum); + implementation_end; + end; + connections + Gain1\output -> MSe\effort; + GY\p2 => p2; + input -> SignalLimiter2\input; + MSe\p => OneJunction2\p; + OneJunction2\p => GY\p1; + R\p <= OneJunction2\p; + SignalLimiter2\output -> Gain1\input; + end; + implementation_end; + Submodel3 1040 224 + description ' + 4.8 + 1 + '; + type Submodel + ports + signal in input; + power out p2; + end; + implementation bg + submodels + Gain1 552 88 + description '4.01False + Signal\Block Diagram\Gain.emx + 2007-9-26 12:15:12 +'; + type Gain + ports + signal in input; + signal out output; + end; + icon bg bottom + figures + rectangle 536.1 72 567.9 104 color 0 fill 15132390; + text 'K' 552 88 color 16711680 16 bold; + end; + implementation eq +parameters + real K = 12.0; // gain +equations + output = K * input; + implementation_end; + GY 624 184 + description ' + + 4.2 +1 + False + Bond Graph\GY.emx + 2011-11-29 15:53:45 + +'; + type GY + ports + power in p1; + power out p2; + restrictions + causality constraint equal p1 p2; + end; + icon bg bottom + figures + text 'GY' 624 184 color 0 18 bold; + end; + implementation eq +parameters + real r = 0.127; +equations + p1.e = r * p2.f; + p2.e = r * p1.f; +implementation_end; + MSe 624 88 + description ' + + 4.2 +1 + False + Bond Graph\MSe.emx + 2011-11-29 16:12:33 + +'; + type MSe + ports + power out p; + signal in effort; + restrictions + causality fixed out p; + end; + icon bg bottom + figures + text 'MSe' 624 88 color 0 18 bold; + end; + implementation eq +variables + real flow; +equations + p.e = effort; + flow = p.f; +implementation_end; + plug input 424 88; + plug p2 624 220; + OneJunction2 624 136 + description ' + + 4.2 +1 + False + Bond Graph\OneJunction.emx + 2011-11-29 16:17:51 + +'; + knot OneJunction + ports + power knot duplicatable none p [1]; + signal knot out flow [1]; + restrictions + causality constraint one_out p; + end; + icon bg + figures + text '1' 624 136 color 0 18 bold; + end; + implementation eq +equations + sum (direct (p.e)) = 0; + equal (collect (p.f)); + flow = first (p.f); +implementation_end; + R 664 136 + description ' + + 4.2 +1 + False + Bond Graph\R.emx + 2011-11-29 16:35:37 + +'; + type R + ports + power in p; + end; + icon bg bottom + figures + text 'R' 664 136 color 0 18 bold; + end; + implementation eq +parameters + real r = 0.08; +equations + p.e = r * p.f; +implementation_end; + SignalLimiter2 488 88 + description '4.01False + Signal\Block Diagram Non-Linear\SignalLimiter-Limit.emx + 2007-9-26 12:47:40 +'; + type 'SignalLimiter-Limit' + ports + signal in input; + signal out output; + end; + icon bg bottom + figures + group + rectangle 472 72 504 104 color 0 fill 15132390; + line 487.9 76.5 487.9 101 color 0 fill 15132390; + line 475 88.2 500.7 88.2 color 0 fill 15132390; + spline 481.9 95.1 493.9 81.4 color 16711680 fill 15132390 width 2; + spline 493.3 82.2 501.9 81.8 color 16711680 fill 15132390 width 2; + spline 475 95.6 481.9 95.1 color 16711680 fill 15132390 width 2; + end; + end; + implementation eq +parameters + real maximum = 1; + real minimum = -1; +equations + output = limit (input, minimum, maximum); + implementation_end; + end; + connections + Gain1\output -> MSe\effort; + GY\p2 => p2; + input -> SignalLimiter2\input; + MSe\p => OneJunction2\p; + OneJunction2\p => GY\p1; + R\p <= OneJunction2\p; + SignalLimiter2\output -> Gain1\input; + end; + implementation_end; + Submodel4 384 640 + description ' + 4.8 + 1 + '; + type Submodel + ports + signal in input; + power out p2; + end; + implementation bg + submodels + Gain1 552 88 + description '4.01False + Signal\Block Diagram\Gain.emx + 2007-9-26 12:15:12 +'; + type Gain + ports + signal in input; + signal out output; + end; + icon bg bottom + figures + rectangle 536.1 72 567.9 104 color 0 fill 15132390; + text 'K' 552 88 color 16711680 16 bold; + end; + implementation eq +parameters + real K = 12.0; // gain +equations + output = K * input; + implementation_end; + GY 624 184 + description ' + + 4.2 +1 + False + Bond Graph\GY.emx + 2011-11-29 15:53:45 + +'; + type GY + ports + power in p1; + power out p2; + restrictions + causality constraint equal p1 p2; + end; + icon bg bottom + figures + text 'GY' 624 184 color 0 18 bold; + end; + implementation eq +parameters + real r = 0.127; +equations + p1.e = r * p2.f; + p2.e = r * p1.f; +implementation_end; + MSe 624 88 + description ' + + 4.2 +1 + False + Bond Graph\MSe.emx + 2011-11-29 16:12:33 + +'; + type MSe + ports + power out p; + signal in effort; + restrictions + causality fixed out p; + end; + icon bg bottom + figures + text 'MSe' 624 88 color 0 18 bold; + end; + implementation eq +variables + real flow; +equations + p.e = effort; + flow = p.f; +implementation_end; + plug input 424 88; + plug p2 624 220; + OneJunction2 624 136 + description ' + + 4.2 +1 + False + Bond Graph\OneJunction.emx + 2011-11-29 16:17:51 + +'; + knot OneJunction + ports + power knot duplicatable none p [1]; + signal knot out flow [1]; + restrictions + causality constraint one_out p; + end; + icon bg + figures + text '1' 624 136 color 0 18 bold; + end; + implementation eq +equations + sum (direct (p.e)) = 0; + equal (collect (p.f)); + flow = first (p.f); +implementation_end; + R 664 136 + description ' + + 4.2 +1 + False + Bond Graph\R.emx + 2011-11-29 16:35:37 + +'; + type R + ports + power in p; + end; + icon bg bottom + figures + text 'R' 664 136 color 0 18 bold; + end; + implementation eq +parameters + real r = 0.08; +equations + p.e = r * p.f; +implementation_end; + SignalLimiter2 488 88 + description '4.01False + Signal\Block Diagram Non-Linear\SignalLimiter-Limit.emx + 2007-9-26 12:47:40 +'; + type 'SignalLimiter-Limit' + ports + signal in input; + signal out output; + end; + icon bg bottom + figures + group + rectangle 472 72 504 104 color 0 fill 15132390; + line 487.9 76.5 487.9 101 color 0 fill 15132390; + line 475 88.2 500.7 88.2 color 0 fill 15132390; + spline 481.9 95.1 493.9 81.4 color 16711680 fill 15132390 width 2; + spline 493.3 82.2 501.9 81.8 color 16711680 fill 15132390 width 2; + spline 475 95.6 481.9 95.1 color 16711680 fill 15132390 width 2; + end; + end; + implementation eq +parameters + real maximum = 1; + real minimum = -1; +equations + output = limit (input, minimum, maximum); + implementation_end; + end; + connections + Gain1\output -> MSe\effort; + GY\p2 => p2; + input -> SignalLimiter2\input; + MSe\p => OneJunction2\p; + OneJunction2\p => GY\p1; + R\p <= OneJunction2\p; + SignalLimiter2\output -> Gain1\input; + end; + implementation_end; + Submodel5 728 640 + description ' + 4.8 + 1 + '; + type Submodel + ports + signal in input; + power out p2; + end; + implementation bg + submodels + Gain1 552 88 + description '4.01False + Signal\Block Diagram\Gain.emx + 2007-9-26 12:15:12 +'; + type Gain + ports + signal in input; + signal out output; + end; + icon bg bottom + figures + rectangle 536.1 72 567.9 104 color 0 fill 15132390; + text 'K' 552 88 color 16711680 16 bold; + end; + implementation eq +parameters + real K = 12.0; // gain +equations + output = K * input; + implementation_end; + GY 624 184 + description ' + + 4.2 +1 + False + Bond Graph\GY.emx + 2011-11-29 15:53:45 + +'; + type GY + ports + power in p1; + power out p2; + restrictions + causality constraint equal p1 p2; + end; + icon bg bottom + figures + text 'GY' 624 184 color 0 18 bold; + end; + implementation eq +parameters + real r = 0.127; +equations + p1.e = r * p2.f; + p2.e = r * p1.f; +implementation_end; + MSe 624 88 + description ' + + 4.2 +1 + False + Bond Graph\MSe.emx + 2011-11-29 16:12:33 + +'; + type MSe + ports + power out p; + signal in effort; + restrictions + causality fixed out p; + end; + icon bg bottom + figures + text 'MSe' 624 88 color 0 18 bold; + end; + implementation eq +variables + real flow; +equations + p.e = effort; + flow = p.f; +implementation_end; + plug input 424 88; + plug p2 624 220; + OneJunction2 624 136 + description ' + + 4.2 +1 + False + Bond Graph\OneJunction.emx + 2011-11-29 16:17:51 + +'; + knot OneJunction + ports + power knot duplicatable none p [1]; + signal knot out flow [1]; + restrictions + causality constraint one_out p; + end; + icon bg + figures + text '1' 624 136 color 0 18 bold; + end; + implementation eq +equations + sum (direct (p.e)) = 0; + equal (collect (p.f)); + flow = first (p.f); +implementation_end; + R 664 136 + description ' + + 4.2 +1 + False + Bond Graph\R.emx + 2011-11-29 16:35:37 + +'; + type R + ports + power in p; + end; + icon bg bottom + figures + text 'R' 664 136 color 0 18 bold; + end; + implementation eq +parameters + real r = 0.08; +equations + p.e = r * p.f; +implementation_end; + SignalLimiter2 488 88 + description '4.01False + Signal\Block Diagram Non-Linear\SignalLimiter-Limit.emx + 2007-9-26 12:47:40 +'; + type 'SignalLimiter-Limit' + ports + signal in input; + signal out output; + end; + icon bg bottom + figures + group + rectangle 472 72 504 104 color 0 fill 15132390; + line 487.9 76.5 487.9 101 color 0 fill 15132390; + line 475 88.2 500.7 88.2 color 0 fill 15132390; + spline 481.9 95.1 493.9 81.4 color 16711680 fill 15132390 width 2; + spline 493.3 82.2 501.9 81.8 color 16711680 fill 15132390 width 2; + spline 475 95.6 481.9 95.1 color 16711680 fill 15132390 width 2; + end; + end; + implementation eq +parameters + real maximum = 1; + real minimum = -1; +equations + output = limit (input, minimum, maximum); + implementation_end; + end; + connections + Gain1\output -> MSe\effort; + GY\p2 => p2; + input -> SignalLimiter2\input; + MSe\p => OneJunction2\p; + OneJunction2\p => GY\p1; + R\p <= OneJunction2\p; + SignalLimiter2\output -> Gain1\input; + end; + implementation_end; + Submodel6 728 408 + description ' + + 4.8 +1 + Bond Graph\MR\joint-v3.emx + 2020-7-19 15:19:27 + +'; + type Submodel + ports + power in p2 [6,1]; + signal in input2 [4,4]; + power in p1 [6,1]; + signal out output [4,4]; + power out p [6,1]; + end; + icon bg bottom + figures + rectangle 704 376 752 440 color 0 fill 14745599; + text 'Joint' 728 408 color 0 'Clear Sans' 16; + terminals + p2 752 392 fixed; + input2 704 424 fixed; + p1 728 376 fixed; + output 752 424 fixed; + p 704 392 fixed; + end; + implementation bg + submodels + AdHji 424 424 + description ' + 4.0 + 1 + False + Bond Graph\MTF.emx + 2007-9-25 12:3:3 + True +'; + type MTF + ports + power out p1 [6,1]; + power in p2 [6,1]; + signal in H [4,4]; + restrictions + causality constraint not_equal p1 p2; + end; + icon bg bottom + figures + text 'MTF' 424 424 color 0 18 bold; + end; + implementation eq +equations + p2.e = transpose(Adjoint(H)) * p1.e; + p1.f = Adjoint(H) * p2.f;implementation_end; + FlowSensor2 240 271.9 + description ' + + 4.2 +1 + False + Bond Graph\FlowSensor.emx + 2011-11-29 15:50:53 + +'; + knot FlowSensor + ports + power knot in p1 [6,1]; + power knot out p2 [6,1]; + signal knot out flow [6,1]; + restrictions + causality constraint not_equal p1 p2; + end; + icon bg ellipse + figures + ellipse 233.1 264.8 246.9 279.1 color 0 fill 16777215; + text 'f' 240 271.2 color 0; + end; + implementation eq +equations + p2.f = p1.f; + p1.e = p2.e; + flow = p1.f; +implementation_end; + Hmatrix 320 272 + description '4.0Template\Submodel-Equation.emx1False2007-11-1 22:32:1False'; + type 'Submodel-Equation' + ports + signal in flow [6,1]; + signal out H [4,4]; + end; + implementation eq +parameters + real init[4] = [1;0;0;0]; +variables + real q[4]; //quaternions + real W[3,4]; //Quaternion Rates Matrix + real R[3,3]; //Rotation Matrix + real p[3]; //Position Vector +equations + ddt(q,init) = transpose(W) * flow[1:3] ./ 2; + p = int(flow[4:6]); + W = [-q[2], q[1], -q[4], q[3]; + -q[3], q[4], q[1], -q[2]; + -q[4], -q[3], q[2], q[1]]; + R = [q[1]^2+q[2]^2-q[3]^2-q[4]^2, 2*(q[2]*q[3]+q[1]*q[4]), 2*(q[2]*q[4]-q[1]*q[3]); + 2*(q[2]*q[3]-q[1]*q[4]), q[1]^2-q[2]^2+q[3]^2-q[4]^2, 2*(q[3]*q[4]+q[1]*q[2]); + 2*(q[2]*q[4]+q[1]*q[3]), 2*(q[3]*q[4]-q[1]*q[2]), q[1]^2-q[2]^2-q[3]^2+q[4]^2]; + H = homogeneous(R,p); + implementation_end; + MatrixMul 320 576 + description ' + 4.0 + 1 + False + Signal\Block Diagram\Gain.emx + 2007-9-26 12:15:12 + True +'; + type Gain + ports + signal in input1 [4,4]; + signal out output [4,4]; + signal in input2 [4,4]; + end; + icon bg bottom + figures + rectangle 304.1 560 335.9 592 color 0 fill 15132390; + text 'X' 320 576 color 16711680 16 bold; + end; + implementation eq +equations + output = input2*input1; implementation_end; + plug input2 121.4 576; + plug p1 240 220; + plug output 491.2 576; + plug p 119.4 424; + plug p2 485.6 424; + Splitter2 320 312 + description '4.0 + Signal\Block Diagram\Splitter.emx + 2008-01-17 11:28:29 +1 + False +'; + knot Splitter + ports + signal knot duplicatable out output [4,4]; + signal knot in input [4,4]; + end; + icon bg ellipse + figures + ellipse 316.8 308.8 323.2 315.2 color -1 fill 0; + ellipse 315.7 307.7 324.3 316.3 color -1; + terminals + input 320 312 fixed; + end; + implementation eq +equations + collect (output) = input; +implementation_end; + Wbai 240 424 + description ' + 4.0 + 1 + False + Bond Graph\ZeroJunction.emx + 2007-9-27 9:51:43 + True +'; + knot ZeroJunction + ports + power knot duplicatable none p [6,1]; + signal knot out effort [6,1]; + restrictions + causality constraint one_in p; + end; + icon bg bottom + figures + text '0' 240 424 color 0 18 bold; + end; + implementation eq +equations + sum (direct (p.f)) = 0; + equal (collect (p.e)); + effort = first (p.e); +implementation_end; + end; + connections + FlowSensor2\flow -> Hmatrix\flow; + FlowSensor2\p2 => Wbai\p; + Hmatrix\H -> Splitter2\input; + input2 -> MatrixMul\input2; + MatrixMul\output -> output; + p1 => FlowSensor2\p1; + p2 => AdHji\p2; + Splitter2\output -> AdHji\H 424 312; + Splitter2\output -> MatrixMul\input1; + Wbai\p <= AdHji\p1; + Wbai\p => p; + end; + implementation_end; + Wtip0 760 256 + description ' + 4.0 + 1 + False + Bond Graph\Se.emx + 2007-9-25 12:3:26 + True +'; + type Se + ports + power out p [6,1]; + restrictions + causality fixed out p; + end; + icon bg bottom + figures + text 'Se' 760 256 color 0 18 bold; + end; + implementation eq +parameters + real effort = 0.0; +variables + real flow[6]; +equations + p.e = effort; + flow = p.f; +implementation_end; + Wtip1 1064 480 + description ' + 4.0 + 1 + False + Bond Graph\Se.emx + 2007-9-25 12:3:26 + True +'; + type Se + ports + power out p [6,1]; + restrictions + causality fixed out p; + end; + icon bg bottom + figures + text 'Se' 1064 480 color 0 18 bold; + end; + implementation eq +parameters + real effort = 0.0; +variables + real flow[6]; +equations + p.e = effort; + flow = p.f; +implementation_end; + end; + connections + Base\Hout -> Splitter5\input; + Base\p => JointBase2\p2; + Base1\Hout -> ori_joint2\input; + Base1\p => JointBase1\p2; + Base2\Hout -> Splitter8\input; + Base2\p1 <= Link3\Pout; + Base3\Hout -> Link1\Hin; + Base3\p1 <= Link1\Pout; + C\p <= OneJunction4\p; + COM\Hin <- Link4\Hout; + COM\Hout -> new_joint3\input; + Constant\output -> Splitter2\input; + Constant1\output -> Splitter1\input; + Constant2\output -> Splitter3\input; + Joint\Hout -> Link\Hin; + Joint\p2 <= Link\Pout; + Joint1\Hout -> Link2\Hin; + Joint1\p2 <= Link2\Pout; + JointBase1\Hout -> Base1\Hin; + JointBase1\p => Base\p1; + JointBase2\Hout -> Base\Hin; + JointBase2\p => OneJunction\p; + Link\Hout -> Base3\Hin; + Link\Pin <= Base3\p; + Link1\Hout -> Splitter6\input; + Link1\Pin <= OneJunction3\p; + Link2\Hout -> Base2\Hin; + Link2\Pin <= Base2\p; + Link3\Pin <= Wtip1\p; + Link4\Pin <= COM\p; + OneJunction\p <= Sf\p; + OneJunction1\p <= Joint\p; + OneJunction1\p <= Sf1\p; + OneJunction2\p => C1\p; + OneJunction2\p => PowerMux\input_rot2; + OneJunction2\p => R\p; + OneJunction3\p <= Joint1\p; + OneJunction4\p => PowerMux\input_pos3; + OneJunction4\p => R1\p; + Splitter1\output -> Submodel1\input; + Splitter1\output -> Submodel2\input; + Splitter2\output -> JointBase2\Hin; + Splitter2\output -> Splitter4\input; + Splitter3\output -> Splitter7\input; + Splitter3\output -> Submodel4\input; + Splitter4\output -> Joint\Hin; + Splitter5\output -> JointBase1\Hin; + Splitter5\output -> ori_joint1\input; + Splitter6\output -> Joint1\Hin; + Splitter6\output -> new_joint1\input; + Splitter6\output -> Submodel6\input2; + Splitter7\output -> Submodel3\input; + Splitter7\output -> Submodel5\input; + Splitter8\output -> Link3\Hin; + Splitter8\output -> new_joint2\input; + Submodel1\p2 => JointBase2\p1; + Submodel2\p2 => JointBase1\p1; + Submodel3\p2 => PowerMux\input; + Submodel4\p2 => Joint\p1; + Submodel5\p2 => Joint1\p1; + Submodel6\output -> Link4\Hin; + Submodel6\p => OneJunction3\p; + Submodel6\p1 <= PowerMux\output; + Submodel6\p2 <= Link4\Pout; + Wtip0\p => Base1\p1; + end; + implementation_end; +]]> + + + + + + + Experiment 1 + + + + 4.8 + + + + + + + + + + + Base1\InertialTensor\state_initial + 6 + 1 + 0 0 0 0 0 0 + + + Base2\InertialTensor\state_initial + 6 + 1 + 0 0 0 0 0 0 + + + Base3\InertialTensor\state_initial + 6 + 1 + 0 0 0 0 0 0 + + + Base\InertialTensor\state_initial + 6 + 1 + 0 0 0 0 0 0 + + + C1\state_initial + 2 + 1 + 0 0 + + + COM\InertialTensor\state_initial + 6 + 1 + 0 0 0 0 0 0 + + + C\state_initial + 3 + 1 + 0 0 0 + + + Joint1\JointType\Integrate\input_int_initial + 0 + + + Joint1\JointType\uTbai\state_initial + 6 + 1 + 0 0 0 0 0 0 + + + Joint\JointType\uTbai\state_initial + 6 + 1 + 0 0 0 0 0 0 + + + new_state1_initial + 0 + + + new_state10_initial + 0 + + + new_state2_initial + 0 + + + new_state3_initial + 0 + + + new_state4_initial + 0 + + + new_state5_initial + 0 + + + new_state6_initial + 0 + + + new_state7_initial + 0 + + + new_state8_initial + 0 + + + new_state9_initial + 0 + + + Submodel6\Hmatrix\p_initial + 3 + 1 + 0 0 0 + + + Submodel4\R\p.f_initial + 0 + + + Submodel5\R\p.f_initial + 0 + + + + + + time + ori_joint1\position[1] + ori_joint1\position[2] + ori_joint1\position[3] + new_joint1\position[1] + new_joint1\position[2] + new_joint1\position[3] + ori_joint2\position[1] + ori_joint2\position[2] + ori_joint2\position[3] + ori_joint1\R[1,3] + ori_joint1\R[2,3] + ori_joint1\R[3,3] + ori_joint1\R[1,2] + ori_joint1\R[2,2] + ori_joint1\R[3,2] + ori_joint2\R[1,3] + ori_joint2\R[2,3] + ori_joint2\R[3,3] + ori_joint2\R[1,2] + ori_joint2\R[2,2] + ori_joint2\R[3,2] + new_joint2\position[1] + new_joint2\position[2] + new_joint2\position[3] + new_joint3\position[1] + new_joint3\position[2] + new_joint3\position[3] + + + + GraphPlot + + 1 + false + 16777215 + true + + + true + 15780518 + 12624260 + 0 + 10 + 10 + 10 + false + + 16777215 + true + 1 + model + true + + + Arial + 12 + 34 + 400 + 0 + 0 + 0 + 0 + + + Arial + 12 + 34 + 400 + 0 + 0 + 0 + 0 + + + Arial + 10 + 34 + 400 + 0 + 0 + 0 + 0 + + + Arial + 12 + 34 + 400 + 0 + 0 + 0 + 0 + + + true + true + false + + + 0.0 + 3.5084366483139475 + true + 3 + + + + + + -0.1 + 0.1 + true + 1 + + + + -0.1 + 0.1 + true + 1 + + + + -0.1 + 0.1 + true + 1 + + + + -0.1 + 0.1 + true + 1 + + + + -0.1 + 0.1 + true + 1 + + + + -0.1 + 0.1 + true + 1 + + + + + + + + 3355111 + 1 + 3355111 + 0 + true + 1 + 1 + 1 + true + + true + time + + + true + ori_joint1\position[1] + + + + 6076255 + 1 + 6076255 + 0 + true + 1 + 1 + 1 + true + + true + time + + + true + ori_joint1\position[2] + + + + 12553035 + 1 + 12553035 + 0 + true + 1 + 1 + 1 + true + + true + time + + + true + ori_joint1\position[3] + + + + 15086320 + 1 + 15086320 + 0 + true + 1 + 1 + 1 + true + + true + time + + + true + new_joint1\position[1] + + + + 15790150 + 1 + 15790150 + 0 + true + 1 + 1 + 1 + true + + true + time + + + true + new_joint1\position[2] + + + + 1696255 + 1 + 1696255 + 0 + true + 1 + 1 + 1 + true + + true + time + + + true + new_joint1\position[3] + + + + + true + 0 + 16777215 + + + + D3DPlot + + 2 + false + 16777215 + true + + 3D Animation + 137 + true + false + 4294967295 + Gradients\BlueWhite.png + true + 1.0 + 1.0 + + + + + 1 + + + 1 + + + 1 + + + true + Reference Frame + + + + + + Bryant + + false + false + false + false + false + false + + + + + 1 + + + 1 + + + 1 + + + false + Default Lights and Cameras + + + + + + Bryant + + false + false + false + false + false + false + + + false + Ambient + + + + + + 1 + + + + + 1 + + + Direct3D + + false + false + false + false + false + false + + + 0 + + + + 0.3 + + + 0.3 + + + 0.3 + + + + + + + 1 + + + 1 + + + 1 + + + true + + + + + 0.3 + + + 0.3 + + + 0.3 + + + + + + + 1 + + + 1 + + + 1 + + + true + + true + false + false + + + false + Parallel + + + -3 + + + 5 + + + 3 + + + + + + 0.457495710997814 + + + -0.762492851663023 + + + -0.457495710997814 + + + + + 0.235379601434674 + + + -0.392299335724456 + + + 0.889211827642101 + + + Direct3D + + false + false + false + false + false + false + + + 3 + + + + 0.5 + + + 0.5 + + + 0.5 + + + + + + + 1 + + + 1 + + + 1 + + + true + + + + 1.0 + + + 0.0 + + + 0.0 + + + + + + 0.5 + + + 0.5 + + + 0.5 + + + + + + + 1 + + + 1 + + + 1 + + + true + + + + + 0.5 + + + 0.5 + + + 0.5 + + + + + + + 1 + + + 1 + + + 1 + + + true + + false + true + true + + + false + Spot Light 1 + + + -3 + + + -5 + + + 1 + + + + + + 0.50709255283711 + + + 0.845154254728517 + + + -0.169030850945703 + + + + + 0.0869656553478673 + + + 0.144942758913112 + + + 0.985610760609162 + + + Direct3D + + false + false + false + false + false + false + + + 2 + + + + 0.5 + + + 0.5 + + + 0.5 + + + + + + + 1 + + + 1 + + + 1 + + + true + + + + 1.0 + + + 0.05 + + + 0.05 + + + + 1.0471975511965976 + + + 1.0471975511965976 + + 0.0 + + + + 0.5 + + + 0.5 + + + 0.5 + + + + + + + 1 + + + 1 + + + 1 + + + true + + + + + 0.5 + + + 0.5 + + + 0.5 + + + + + + + 1 + + + 1 + + + 1 + + + true + + false + true + true + + + false + Spot Light 2 + + + 2 + + + -3 + + + -1 + + + + + + -0.534522483824849 + + + 0.801783725737273 + + + 0.267261241912424 + + + + + 0.14824986333222 + + + -0.22237479499833 + + + 0.963624111659432 + + + Direct3D + + false + false + false + false + false + false + + + 2 + + + + 1 + + + 1 + + + 1 + + + + + + + 1 + + + 1 + + + 1 + + + true + + + + 1.0 + + + 0.05 + + + 0.05 + + + + 1.5707963267948966 + + + 1.5707963267948966 + + 0.0 + + + + 1 + + + 1 + + + 1 + + + + + + + 1 + + + 1 + + + 1 + + + true + + + + + 0.5 + + + 0.5 + + + 0.5 + + + + + + + 1 + + + 1 + + + 1 + + + true + + false + true + true + + + false + Camera Looking at Origin + + + 5.66443922345846 + + + -1.87918322175823 + + + 8.35361970698833 + + + + + + -0.551742297648959 + + + 0.183041043883461 + + + -0.813680780920319 + + + + + -0.77229119625168 + + + 0.256208355506313 + + + 0.581311953051802 + + + Direct3D + + false + false + false + false + false + false + + + 0.01 + 100.0 + true + 0.003926990816987242 + 45.0 + -10.0 + 10.0 + 10.0 + -10.0 + true + + + true + + + 1 + + + true + true + true + + + false + Front(XY)-Camera + + + 10 + + + + + + -1 + + + + + 1 + + + Direct3D + + false + false + false + false + false + false + + + 0.01 + 100.0 + true + 9.999999999999998 + 45.0 + -9.999999999999998 + 9.999999999999998 + 9.999999999999998 + -9.999999999999998 + true + + + true + + + 1 + + + true + false + false + + + false + Side(YZ)-Camera + + + 10 + + + + + + -1 + + + + + 1 + + + Direct3D + + false + false + false + false + false + false + + + 0.01 + 100.0 + true + 9.999999999999998 + 45.0 + -9.999999999999998 + 9.999999999999998 + 9.999999999999998 + -9.999999999999998 + true + + + true + + + 1 + + + true + false + false + + + false + Top(XZ)-Camera + + + 10 + + + + + + -1 + + + + + 1 + + + Direct3D + + false + false + false + false + false + false + + + 0.01 + 100.0 + true + 9.999999999999998 + 45.0 + -9.999999999999998 + 9.999999999999998 + 9.999999999999998 + -9.999999999999998 + true + + + true + + + 1 + + + true + false + false + + + + + + + 10 + + + 10 + + + 10 + + + false + Scenery + + + + + + Bryant + + false + false + false + false + false + false + + + + + 1 + + + 1 + + + 1 + + + false + Reference Frame + + + + + + Bryant + + false + false + false + false + false + false + + + 5.0 + + + ori_joint1\position[1] + -0.06224205228866393 + + + ori_joint1\position[2] + 0.018733043716791603 + + + ori_joint1\position[3] + 0.0 + + + 15 + true + true + 0.1 + 15 + true + + + 0.1 + + + 0.1 + + + 0.0649999976158142 + + + true + + + 1 + + + 1 + + + 1 + + + 1.0 + + + 1 + + + 1 + + + 1 + + + + + true + + + 0.5 + + + 0.5 + + + 0.5 + + + + + + 15 + + false + false + Line + + + + + + -0.957570035210214 + + + 0.288200672566025 + + + + + 1 + + + Direct3D + + false + false + false + false + false + false + + + + + 1.0 + + + ori_joint2\position[1] + -0.09037504007630096 + + + ori_joint2\position[2] + -0.022601385009642573 + + + ori_joint2\position[3] + 0.0 + + + 15 + true + true + 0.1 + 15 + true + + + 0.1 + + + 0.1 + + + 0.0500000007450581 + + + true + + + 1 + + + 1 + + + 1 + + + 1.0 + + + 1 + + + 1 + + + 1 + + + + + true + + + 0.5 + + + 0.5 + + + 0.5 + + + + + + 15 + + false + false + Line + + + ori_joint1\position[1] + -0.06224205228866393 + + + ori_joint1\position[2] + 0.018733043716791603 + + + ori_joint1\position[3] + 0.0 + + + + + + -0.56265975575274 + + + -0.826688574528684 + + + + + 1 + + + Direct3D + + false + false + false + false + false + false + + + + + + + 1 + + + 1 + + + 1 + + + false + Reference Frame + + + ori_joint1\position[1] + -0.06224205228866393 + + + ori_joint1\position[2] + 0.018733043716791603 + + + ori_joint1\position[3] + 0.0 + + + + + + ori_joint1\R[1,3] + 0.0 + + + ori_joint1\R[2,3] + 0.0 + + + ori_joint1\R[3,3] + 1.0 + + + + + ori_joint1\R[1,2] + -0.9575700352102143 + + + ori_joint1\R[2,2] + 0.28820067256602466 + + + ori_joint1\R[3,2] + 0.0 + + + Matrix + + false + false + false + false + false + false + + + + + + + 1 + + + 1 + + + 1 + + + false + Reference Frame + + + ori_joint2\position[1] + -0.09037504007630096 + + + ori_joint2\position[2] + -0.022601385009642573 + + + ori_joint2\position[3] + 0.0 + + + + + + ori_joint2\R[1,3] + 0.0 + + + ori_joint2\R[2,3] + 0.0 + + + ori_joint2\R[3,3] + 1.0 + + + + + ori_joint2\R[1,2] + -0.5626597557527404 + + + ori_joint2\R[2,2] + -0.8266885745286835 + + + ori_joint2\R[3,2] + 0.0 + + + Matrix + + false + false + false + false + false + false + + + + + + + + + + + + + GraphPlot + + 3 + false + 16777215 + true + + + true + 15780518 + 12624260 + 0 + 10 + 10 + 10 + false + + 16777215 + true + 1 + model(1) + true + + + Arial + 12 + 34 + 400 + 0 + 0 + 0 + 0 + + + Arial + 12 + 34 + 400 + 0 + 0 + 0 + 0 + + + Arial + 10 + 34 + 400 + 0 + 0 + 0 + 0 + + + Arial + 12 + 34 + 400 + 0 + 0 + 0 + 0 + + + true + true + false + + + 0.0 + 3.5084366483139475 + true + 3 + + + + + + -0.25 + 0.25 + true + 2 + + + + -0.25 + 0.25 + true + 2 + + + + -0.25 + 0.25 + true + 2 + + + + -0.25 + 0.25 + true + 2 + + + + -0.25 + 0.25 + true + 2 + + + + -0.25 + 0.25 + true + 2 + + + + + + + + 3355111 + 1 + 3355111 + 0 + true + 1 + 1 + 1 + true + + true + time + + + true + ori_joint2\position[1] + + + + 6076255 + 1 + 6076255 + 0 + true + 1 + 1 + 1 + true + + true + time + + + true + ori_joint2\position[2] + + + + 12553035 + 1 + 12553035 + 0 + true + 1 + 1 + 1 + true + + true + time + + + true + ori_joint2\position[3] + + + + 15086320 + 1 + 15086320 + 0 + true + 1 + 1 + 1 + true + + true + time + + + true + new_joint2\position[1] + + + + 15790150 + 1 + 15790150 + 0 + true + 1 + 1 + 1 + true + + true + time + + + true + new_joint2\position[2] + + + + 1696255 + 1 + 1696255 + 0 + true + 1 + 1 + 1 + true + + true + time + + + true + new_joint2\position[3] + + + + + true + 0 + 16777215 + + + + GraphPlot + + 4 + false + 16777215 + true + + + true + 15780518 + 12624260 + 0 + 10 + 10 + 10 + false + + 16777215 + true + 1 + Plot + true + + + Arial + 12 + 34 + 400 + 0 + 0 + 0 + 0 + + + Arial + 12 + 34 + 400 + 0 + 0 + 0 + 0 + + + Arial + 10 + 34 + 400 + 0 + 0 + 0 + 0 + + + Arial + 12 + 34 + 400 + 0 + 0 + 0 + 0 + + + true + true + false + + + 0.0 + 3.5084366483139475 + true + 3 + + + + + + -0.1 + 0.1 + true + 2 + + + + -0.103526690098587 + 0.0 + true + 2 + + + + -0.103526690098587 + 0.0 + true + 2 + + + + -0.103526690098587 + 0.0 + true + 2 + + + + -0.103526690098587 + 0.0 + true + 2 + + + + -0.103526690098587 + 0.0 + true + 2 + + + + + + + + 3355111 + 1 + 3355111 + 0 + true + 1 + 1 + 1 + true + + true + time + + + true + new_joint2\position[1] + + + + 6076255 + 1 + 6076255 + 0 + true + 1 + 1 + 1 + true + + true + time + + + true + new_joint2\position[2] + + + + 12553035 + 1 + 12553035 + 0 + true + 1 + 1 + 1 + true + + true + time + + + true + new_joint2\position[3] + + + + 15086320 + 1 + 15086320 + 0 + true + 1 + 1 + 1 + true + + true + time + + + true + new_joint3\position[1] + + + + 15790150 + 1 + 15790150 + 0 + true + 1 + 1 + 1 + true + + true + time + + + true + new_joint3\position[2] + + + + 1696255 + 1 + 1696255 + 0 + true + 1 + 1 + 1 + true + + true + time + + + true + new_joint3\position[3] + + + + + true + 0 + 16777215 + + + + + + 1 + true + Window 1 + 0 + + 1 + 3 + + Base + + + 2 + true + Window 2 + 0 + + 2 + + Base + + + 3 + true + Window 3 + 0 + + 4 + + Base + + + + +0.200521 0.191667 0.840104 0.771296 + + +0.0901042 0.0287037 0.839583 0.77037 + + +0.1875 0.142593 0.789583 0.823148 + + + + + + 0.0 + 10.0 + false + true + false + false + 0.1 + 1.0e-6 + 1.0e-7 + false + true + + + + Euler + 0.01 + false + + + BackwardEuler + 1.0e-5 + 1.0e-5 + 1.0e-5 + 1.0e-5 + 0.01 + 1.0 + + + AdamsBashforth + 0.01 + false + + + RungeKutta2 + 0.01 + false + + + RungeKutta4 + 0.01 + false + + + RungeKutta8 + false + 0.0 + false + 0.0 + 1.0e-6 + 1.0e-6 + 0.9 + 0.33 + 6.0 + 0.0 + false + 100000 + false + 1000 + + + RungeKuttaFehlberg + false + 0.0 + false + 0.0 + 1.0e-6 + 1.0e-6 + + + VodeAdams + false + 0.0 + false + 0.0 + 1.0e-6 + 1.0e-6 + true + true + + + BDFMethod + 1.0e-5 + 1.0e-5 + 1.0e-5 + 1.0e-5 + false + 0.0 + false + 0.0 + + + MeBDFiMethod + 1.0e-5 + 1.0e-5 + 1.0e-5 + 1.0e-5 + false + 0.0 + false + 0.0 + + 7 + + + + 10 + false + true + true + false + true + 0 + 0.0 + true + MultipleRun + true + + UseEndValue + 0.001 + BroydonFletcherGoldfarbShanno + + + + + true + true + true + true + + + false + + + + + + + + + 1.0 + + + + + diff --git a/implementation/SCARA/03_motor/implementation.md b/implementation/SCARA/03_motor/implementation.md new file mode 100644 index 0000000..7aabb8e --- /dev/null +++ b/implementation/SCARA/03_motor/implementation.md @@ -0,0 +1,53 @@ +#Motor Physics. + +This is a small iteration from the last level of detail. +The following are some motor physics. + +So I researched some different types of motors. +For this application AC-drives are not suitable, they have a fixed speed or are very expensive. +We are then left with DC-motors, stepper and servo. +There are more types but these three are the most common in use. + +### DC-motor +This is probably the most simple motor. +Feeding a current trough the motor gives a torque at the mechanical axis. +These motors rotate at a high velocity and often require a mechanical reduction. +They are cheap though. + +The problem is in the control. +A constant current is required to compensate for any gravitational pull on the load. +Furthermore, there is no feedback on the system. Therefore, we need an angle sensor. +Adding to the complexity. + +Another choice we have to make in the type of motor is the brushed or brushless. +But both options still require some elaborate control. + +### Stepper +A steppermotor is a brushless DC motor that is split in a number of multiple equal steps. +Where a brushless DC would have 6 steps. A stepper motor can have 60 steps. or 120. +By applying voltage to the next step we can move the rotor a single step. +They run best up to 1200 RPM. +The torque they can deliver is dependent on the current speed. +The stall torque can be around the 0.2 Nm. +But that drops off at higher velocities. +[Stepper motor on Wikipedia](https://en.wikipedia.org/wiki/Stepper_motor) + +### Servo +A servomotor is especially a motor with a build in controller. +Often the motor itself is a simple DC-motor with permanent magnets. +And then there is a angle sensor and a small feedback controller to control the position. +The angle is communicated by PWM signal. And the servo will do the rest of the work. +Although the servo is simpler to control, it is often more expensive to get a motor that is similar to the stepper. + +## Decission. +From our earlier model I concluded that a velocity of 25 rad/s and a torque of 0.01 Nm is required. +This should be doable with a stepper motor. +Furthermore, the fixed position is a very nice option. +For now I will go with the Steppermotor. They are more affordable and above all have fairly decent datasheets. + + +## Current model state +This model does not yet implement a steppermotor implementation. +But it does implement simple DC motor. +For the next step it is important to have some controller that is better suited. + diff --git a/implementation/SCARA/03_motor/motor_physics.emx b/implementation/SCARA/03_motor/motor_physics.emx index 172735d..d61d196 100644 --- a/implementation/SCARA/03_motor/motor_physics.emx +++ b/implementation/SCARA/03_motor/motor_physics.emx @@ -8,7 +8,7 @@ 0 False C:\users\wouter\My Documents\studie\ma\mahd\implementation\SCARA\03_motor\motor_physics.emx - 2020-7-17 18:39:03 + 2020-7-18 12:37:59 True @@ -1617,7 +1617,7 @@ equations p1.e = p2.e; flow = p1.f; implementation_end; - uTbai 240 328 + uTbai 240 312 description ' 4.0 1 @@ -1640,7 +1640,7 @@ implementation_end; end; icon bg left figures - text 'TF' 240 328 color 0 18 bold; + text 'TF' 240 312 color 0 18 bold; end; implementation eq parameters @@ -5019,6 +5019,18 @@ implementation_end; 0 + + + Joint1\JointType\uTbai\state + 6 + 1 + 0 + 0 + + + Joint1\JointType\Integrate\q + + @@ -5045,10 +5057,6 @@ implementation_end; PlusMinus3\output Integrate\output[2] Integrate\output[1] - MSe1\effort - MSe2\effort - MSe2\flow - MSe1\flow new_joint1\position[1] new_joint1\position[2] new_joint1\position[3] @@ -5071,6 +5079,10 @@ implementation_end; PID3\error new_joint3\position[3] new_joint3\position[2] + MSe1\effort + MSe2\effort + MSe2\flow + MSe1\flow @@ -5144,7 +5156,7 @@ implementation_end; 0.0 - 2.0512133912317303 + 0.10311339559032781 true 3 @@ -5341,7 +5353,7 @@ implementation_end; 0.0 - 2.0512133912317303 + 0.10311339559032781 true 3 @@ -6033,13 +6045,13 @@ implementation_end; - -0.646203434499504 + -0.646203434499502 - -0.628938588548313 + -0.628938588548314 - -0.432270023337152 + -0.432270023337153 @@ -6047,7 +6059,7 @@ implementation_end; -0.309771185077498 - -0.301494918649692 + -0.301494918649693 0.901744213690389 @@ -6377,18 +6389,18 @@ implementation_end; Submodel3\body_position[2] - -0.01915326984592884 + -0.009158353632383561 Submodel3\body_position[3] - 0.02623393923392464 + 0.03118053280824738 Submodel3\body_angle[1] - 2.2010448489940284 + 1.8564889888314844 Submodel3\body_angle[2] @@ -6482,18 +6494,18 @@ implementation_end; Submodel4\body_position[2] - -0.013315183118204434 + 0.0013903741642251554 Submodel4\body_position[3] - 0.05268450409359094 + 0.07774345829579168 Submodel4\body_angle[1] - 0.008626014952555631 + 0.66277054304191 Submodel4\body_angle[2] @@ -6620,11 +6632,11 @@ implementation_end; new_joint1\position[2] - -0.01914237844052437 + -0.009202768540009312 new_joint1\position[3] - 0.026264412189115294 + 0.031169842014341604 @@ -6635,11 +6647,11 @@ implementation_end; new_joint1\R[2,3] - -0.8081357596650859 + -0.9590720619797416 new_joint1\R[3,3] - -0.588996259708442 + -0.2831621089233634 @@ -6649,11 +6661,11 @@ implementation_end; new_joint1\R[2,2] - -0.588996259708442 + -0.2831621089233634 new_joint1\R[3,2] - 0.8081357596650859 + 0.9590720619797416 Matrix @@ -6739,11 +6751,11 @@ implementation_end; new_joint2\position[2] - -0.013304570144791548 + 0.0027085042716763867 new_joint2\position[3] - 0.0515337009578849 + 0.07572614202917434 @@ -6754,11 +6766,11 @@ implementation_end; new_joint2\R[2,3] - 0.03980493681382746 + -0.5354583200196454 new_joint2\R[3,3] - 0.9992074694502875 + 0.8445616540678004 @@ -6768,11 +6780,11 @@ implementation_end; new_joint2\R[2,2] - 0.9992074694502875 + 0.8445616540678004 new_joint2\R[3,2] - -0.03980493681382746 + 0.5354583200196454 Matrix @@ -6864,7 +6876,7 @@ implementation_end; false - 0.008778601272032657 + 0.021097455593261694 0.115 true 3 @@ -7006,7 +7018,7 @@ implementation_end; 0.0 - 2.0512133912317303 + 0.10311339559032781 true 3 @@ -7092,7 +7104,7 @@ implementation_end; 2 - true + false Window 2 0 @@ -7102,7 +7114,7 @@ implementation_end; 3 - true + false Window 3 0 @@ -7113,13 +7125,13 @@ implementation_end; --0.00208333 0.00462963 1.00208 1.0037 +0.149479 0.0675926 0.908333 0.847222 0.138021 0.169444 0.777604 0.862963 -0.295833 0.327778 0.692187 0.765741 +0.526042 0.287963 0.922396 0.725926 diff --git a/implementation/SCARA/03_motor/motor_physics2.emx b/implementation/SCARA/03_motor/motor_physics2.emx new file mode 100644 index 0000000..95cabf0 --- /dev/null +++ b/implementation/SCARA/03_motor/motor_physics2.emx @@ -0,0 +1,4880 @@ + + + + + + 4.8 +0 + False + C:\users\wouter\My Documents\studie\ma\mahd\implementation\SCARA\03_motor\motor_physics2.emx + 2020-7-20 15:06:45 +True + + + parameters + real A = 0.05 {m}; + real B = 0.05 {m}; +variables + real J0_1_BF1[2]; + real J1_2_BF1[2]; + real J1_2_BF2[2]; + real EE1_BF2[2]; +initialequations + J0_1_BF1 = [A/2;0]; + J1_2_BF1 = [-A/2;0]; + J1_2_BF2 = [B/2;0]; + EE1_BF2 = [-B/2;0]; + +'; + type Mainmodel + end; + implementation bg + submodels + Base1 720 184 + description '4.81FalseTrueBond Graph\MR\center_of_mass_v2.emx2020-7-20 14:44:13Baseparameters + real I [3,1] = [1.6399999999999998e-6;4.7e-8;1.61e-6] {N.m.s}; + real m = 0.00455 {kg};'; + type Submodel + ports + power out p [6,1]; + signal in Hin [4,4]; + signal out Hout [4,4]; + end; + icon bg ellipse bottom + figures + ellipse 696 160 744 208 color 0 fill 16777215 width 2; + line 696 184 744 184 color 0 fill 16777215; + line 720 160 720 208 color 0 fill 16777215; + terminals + p 704 160 fixed; + Hin 736 160 fixed; + Hout 744 216 fixed; + end; + implementation bg + submodels + AdHi0 544 400 + description ' + + 4.2 +1 + False + Bond Graph\MTF.emx + 2011-11-29 16:15:31 + +'; + type MTF + ports + power in p1; + power out p2; + signal in r; + restrictions + causality constraint not_equal p1 p2; + end; + icon bg left + figures + text 'MTF' 544 400 color 0 18 bold; + end; + implementation eq +equations + p1.e = r * p2.e; + p2.f = r * p1.f; +implementation_end; + EJS 616 336 + description ' + + 4.2 +1 + False + Bond Graph\MGY.emx + 2011-11-29 16:03:53 + +'; + type MGY + ports + power in p1; + power out p2; + signal in r; + restrictions + causality constraint equal p1 p2; + end; + icon bg top + figures + text 'MGY' 616 336 color 0 18 bold; + end; + implementation eq +equations + p1.e = r * p2.f; + p2.e = r * p1.f; +implementation_end; + Gravity 616 400 + description ' + + 4.2 +1 + False + Bond Graph\Se.emx + 2011-11-29 16:36:49 + +'; + type Se + ports + power out p; + restrictions + causality fixed out p; + end; + icon bg bottom + figures + text 'Se' 616 400 color 0 18 bold; + end; + implementation eq +parameters + real effort = 1; +variables + real flow; +equations + p.e = effort; + flow = p.f; +implementation_end; + InertialTensor 544 288 + description ' + + 4.2 +1 + False + Bond Graph\I.emx + 2011-11-29 15:55:55 + +'; + type I + ports + power in p; + signal out state; + restrictions + causality preferred in p; + end; + icon bg top + figures + text 'I' 544 288 color 0 18 bold; + end; + implementation eq +parameters + real i = 1; +equations + state = int(p.e); + p.f = state / i; +implementation_end; + plug p 472 336; + plug Hin 472 496; + plug Hout 640 496; + Splitter1 544 496 + description '4.0 + Signal\Block Diagram\Splitter.emx + 2008-01-17 11:28:29 +1 + False +'; + knot Splitter + ports + signal knot duplicatable out output [4,4]; + signal knot in input [4,4]; + end; + icon bg ellipse + figures + ellipse 540.8 492.8 547.2 499.2 color -1 fill 0; + ellipse 539.7 491.7 548.3 500.3 color -1; + terminals + input 544 496 fixed; + end; + implementation eq +equations + collect (output) = input; +implementation_end; + Ta0j 544 336 + description ' + + 4.2 +1 + False + Bond Graph\OneJunction.emx + 2011-11-29 16:17:51 + +'; + knot OneJunction + ports + power knot duplicatable none p [1]; + signal knot out flow [1]; + restrictions + causality constraint one_out p; + end; + icon bg bottom + figures + text '1' 544 336 color 0 18 bold; + end; + implementation eq +equations + sum (direct (p.e)) = 0; + equal (collect (p.f)); + flow = first (p.f); +implementation_end; + end; + connections + AdHi0\p2 => Ta0j\p; + Gravity\p => AdHi0\p1; + Hin -> Splitter1\input; + InertialTensor\p <= Ta0j\p; + p <= Ta0j\p; + Splitter1\output -> Hout; + Ta0j\p => EJS\p1; + end; + parameterrelations +InertialTensor\I = I; +InterialTensor\m = m; +EJS\I = I; +EJS\m = m; +AdHik\COMdim = COMdim; +AdHik1\COMdim = COMdim; +Hij\dim = dim; +Gravity\m=m;parameterrelations_end; + figures + text 'b = current link (body) +a = previous link (body) +i = Body fixed frame, fixed in joint with previous link +j = Body fixed frame, fixed in joint with next link +k = Body fixed frame, principal inertial frame +0 = inertial system + ' 288 280 color 0; + implementation_end; + Base2 912 120 + description '4.81FalseTrueBond Graph\MR\center_of_mass_v2.emx2020-7-20 14:44:13Baseparameters + real I [3,1] = [1.6399999999999998e-6;4.7e-8;1.61e-6] {N.m.s}; + real m = 0.00455 {kg};'; + type Submodel + ports + power out p [6,1]; + signal in Hin [4,4]; + signal out Hout [4,4]; + end; + icon bg ellipse bottom + figures + ellipse 888 96 936 144 color 0 fill 16777215 width 2; + line 912 96 912 144 color 0 fill 16777215; + line 888 120 936 120 color 0 fill 16777215; + terminals + p 888 104 fixed; + Hin 888 136 fixed; + Hout 936 152 fixed; + end; + implementation bg + submodels + AdHi0 544 400 + description ' + + 4.2 +1 + False + Bond Graph\MTF.emx + 2011-11-29 16:15:31 + +'; + type MTF + ports + power in p1; + power out p2; + signal in r; + restrictions + causality constraint not_equal p1 p2; + end; + icon bg left + figures + text 'MTF' 544 400 color 0 18 bold; + end; + implementation eq +equations + p1.e = r * p2.e; + p2.f = r * p1.f; +implementation_end; + EJS 616 336 + description ' + + 4.2 +1 + False + Bond Graph\MGY.emx + 2011-11-29 16:03:53 + +'; + type MGY + ports + power in p1; + power out p2; + signal in r; + restrictions + causality constraint equal p1 p2; + end; + icon bg top + figures + text 'MGY' 616 336 color 0 18 bold; + end; + implementation eq +equations + p1.e = r * p2.f; + p2.e = r * p1.f; +implementation_end; + Gravity 616 400 + description ' + + 4.2 +1 + False + Bond Graph\Se.emx + 2011-11-29 16:36:49 + +'; + type Se + ports + power out p; + restrictions + causality fixed out p; + end; + icon bg bottom + figures + text 'Se' 616 400 color 0 18 bold; + end; + implementation eq +parameters + real effort = 1; +variables + real flow; +equations + p.e = effort; + flow = p.f; +implementation_end; + InertialTensor 544 288 + description ' + + 4.2 +1 + False + Bond Graph\I.emx + 2011-11-29 15:55:55 + +'; + type I + ports + power in p; + signal out state; + restrictions + causality preferred in p; + end; + icon bg top + figures + text 'I' 544 288 color 0 18 bold; + end; + implementation eq +parameters + real i = 1; +equations + state = int(p.e); + p.f = state / i; +implementation_end; + plug p 472 336; + plug Hin 472 496; + plug Hout 640 496; + Splitter1 544 496 + description '4.0 + Signal\Block Diagram\Splitter.emx + 2008-01-17 11:28:29 +1 + False +'; + knot Splitter + ports + signal knot duplicatable out output [4,4]; + signal knot in input [4,4]; + end; + icon bg ellipse + figures + ellipse 540.8 492.8 547.2 499.2 color -1 fill 0; + ellipse 539.7 491.7 548.3 500.3 color -1; + terminals + input 544 496 fixed; + end; + implementation eq +equations + collect (output) = input; +implementation_end; + Ta0j 544 336 + description ' + + 4.2 +1 + False + Bond Graph\OneJunction.emx + 2011-11-29 16:17:51 + +'; + knot OneJunction + ports + power knot duplicatable none p [1]; + signal knot out flow [1]; + restrictions + causality constraint one_out p; + end; + icon bg bottom + figures + text '1' 544 336 color 0 18 bold; + end; + implementation eq +equations + sum (direct (p.e)) = 0; + equal (collect (p.f)); + flow = first (p.f); +implementation_end; + end; + connections + AdHi0\p2 => Ta0j\p; + Gravity\p => AdHi0\p1; + Hin -> Splitter1\input; + InertialTensor\p <= Ta0j\p; + p <= Ta0j\p; + Splitter1\output -> Hout; + Ta0j\p => EJS\p1; + end; + parameterrelations +InertialTensor\I = I; +InterialTensor\m = m; +EJS\I = I; +EJS\m = m; +AdHik\COMdim = COMdim; +AdHik1\COMdim = COMdim; +Hij\dim = dim; +Gravity\m=m;parameterrelations_end; + figures + text 'b = current link (body) +a = previous link (body) +i = Body fixed frame, fixed in joint with previous link +j = Body fixed frame, fixed in joint with next link +k = Body fixed frame, principal inertial frame +0 = inertial system + ' 288 280 color 0; + implementation_end; + Base3 376 184 + description ' + + 4.8 +1 + False + True + Bond Graph\MR\center_of_mass_v2.emx + 2020-7-20 14:44:13 +Base + + + parameters + real I [3,1] = [1.6399999999999998e-6; 4.7e-8; 1.61e-6] {N.m.s}; + real m = 0.00455 {kg}; + +'; + type Submodel + ports + power out p [6,1]; + signal in Hin [4,4]; + signal out Hout [4,4]; + end; + icon bg ellipse bottom + figures + ellipse 352 160 400 208 color 0 fill 16777215 width 2; + line 352 184 400 184 color 0 fill 16777215; + line 376 160 376 208 color 0 fill 16777215; + terminals + p 360 160 fixed; + Hin 392 160 fixed; + end; + implementation bg + submodels + AdHi0 544 400 + description ' + 4.0 + 1 + False + Bond Graph\MTF.emx + 2007-9-25 12:3:3 + True +'; + type MTF + ports + power in p1 [6,1]; + power out p2 [6,1]; + signal in H [4,4]; + restrictions + causality constraint not_equal p1 p2; + end; + icon bg left + figures + text 'MTF' 544 400 color 0 18 bold; + end; + implementation eq +variables + real onlyRotH[4,4]; +code + //Only rotations with respect to the inertial system matter! + onlyRotH = H; + onlyRotH[1,4] = 0; + onlyRotH[2,4] = 0; + onlyRotH[3,4] = 0; + + p2.e = transpose(Adjoint(onlyRotH)) * p1.e; + p1.f = Adjoint(onlyRotH) * p2.f; +implementation_end; + EJS 616 336 + description ' + 4.0 + 1 + False + Bond Graph\MGY.emx + 2007-10-31 11:43:6 + True +'; + type MGY + ports + power in p1 [6,1]; + end; + icon bg top + figures + text 'MGY' 616 336 color 0 18 bold; + end; + implementation eq +//EJS / Gyroscopic effects +parameters + real global I[3]; + real global m; +variables + real II[6,6]; //Inertial tensor + real Q[6,6]; + real QI[6,6]; + real Ia[6]; +initialequations + Ia[1:3] = I; + Ia[4:6] = m; + II = diag(Ia); +equations + Q = transpose(adjoint(p1.f)); + QI = Q*II; + p1.e = QI*p1.f;implementation_end; + Gravity 616 400 + description ' + 4.0 + 1 + False + Bond Graph\Se.emx + 2007-9-25 12:3:26 + True +'; + type Se + ports + power out p [6,1]; + restrictions + causality fixed out p; + end; + icon bg bottom + figures + text 'Se' 616 400 color 0 18 bold; + end; + implementation eq +parameters + real global m; +variables + real effort[6]; +equations + effort = [0;0;0;0;0;-g_n*m]; + p.e = effort; +implementation_end; + InertialTensor 544 288 + description ' + 4.0 + 1 + False + Bond Graph\I.emx + 2007-9-25 12:2:12 + True +'; + type I + ports + power in p [6,1]; + signal out state [6,1]; + restrictions + causality preferred in p; + end; + icon bg top + figures + text 'I' 544 288 color 0 18 bold; + end; + implementation eq +parameters + real global I[3]; + real global m; +variables + real II[6,6]; //Inertial tensor + real Ia[6]; +initialequations + Ia[1:3] = I; + Ia[4:6] = m; + II = diag(Ia); +equations + state = int(p.e); //state = generalized momentum + p.f = inverse(II)*state; +implementation_end; + plug p 472 336; + plug Hin 472 496; + plug Hout 640 496; + Splitter1 544 496 + description '4.0 + Signal\Block Diagram\Splitter.emx + 2008-01-17 11:28:29 +1 + False +'; + knot Splitter + ports + signal knot duplicatable out output [4,4]; + signal knot in input [4,4]; + end; + icon bg ellipse + figures + ellipse 540.8 492.8 547.2 499.2 color -1 fill 0; + ellipse 539.7 491.7 548.3 500.3 color -1; + terminals + input 544 496 fixed; + end; + implementation eq +equations + collect (output) = input; +implementation_end; + Ta0j 544 336 + description ' + 4.0 + 1 + False + Bond Graph\OneJunction.emx + 2007-9-27 9:51:18 + True + +'; + knot OneJunction + ports + power knot duplicatable none p [6,1]; + signal knot out flow [6,1]; + restrictions + causality constraint one_out p; + end; + icon bg bottom + figures + text '1' 544 336 color 0 18 bold; + end; + implementation eq +equations + sum (direct (p.e)) = 0; + equal (collect (p.f)); + flow = first (p.f); +implementation_end; + end; + connections + AdHi0\p2 => Ta0j\p; + Gravity\p => AdHi0\p1; + Hin -> Splitter1\input; + InertialTensor\p <= Ta0j\p; + p <= Ta0j\p; + Splitter1\output -> AdHi0\H; + Splitter1\output -> Hout; + Ta0j\p => EJS\p1; + end; + parameterrelations +InertialTensor\I = I; +InterialTensor\m = m; +EJS\I = I; +EJS\m = m; +AdHik\COMdim = COMdim; +AdHik1\COMdim = COMdim; +Hij\dim = dim; +Gravity\m=m;parameterrelations_end; + figures + text 'b = current link (body) +a = previous link (body) +i = Body fixed frame, fixed in joint with previous link +j = Body fixed frame, fixed in joint with next link +k = Body fixed frame, principal inertial frame +0 = inertial system + ' 288 280 color 0; + implementation_end; + C1 640 264 + description '4.01False + Bond Graph\3D\C-3.emx + 2007-9-25 12:12:8 +'; + type 'C-3' + ports + power in p [3,1]; + signal out state [3,1]; + restrictions + causality preferred out p; + end; + icon bg bottom + figures + text 'C' 640 264 color 0 18 bold; + end; + implementation eq +parameters + real c[3,3] = [0.1, 0.0, 0.0; 0.0, 0.1, 0.0; 0.0, 0.0, 0.1] {N/m}; +equations + state = int(p.f); + p.e = inverse(c) *state; +implementation_end; + C2 304 272 + description '4.01False + Bond Graph\3D\C-3.emx + 2007-9-25 12:12:8 +'; + type 'C-3' + ports + power in p [3,1]; + signal out state [3,1]; + restrictions + causality preferred out p; + end; + icon bg bottom + figures + text 'C' 304 272 color 0 18 bold; + end; + implementation eq +parameters + real c[3,3] = [0.1, 0.0, 0.0; 0.0, 0.1, 0.0; 0.0, 0.0, 0.1] {N/m}; +equations + state = int(p.f); + p.e = inverse(c) *state; +implementation_end; + C3 304 224 + description '4.01False + Bond Graph\2D\C-2.emx + 2007-9-25 12:7:27 +'; + type 'C-2' + ports + power in p [2,1]; + signal out state [2,1]; + restrictions + causality preferred out p; + end; + icon bg bottom + figures + text 'C' 304 224 color 0 18 bold; + end; + implementation eq +parameters + real c[2,2] = [0.1, 0.0; 0.0, 0.1] {mN.m/rad}; +equations + state = int(p.f); + p.e = inverse(c) *state; +implementation_end; + C4 640 216 + description '4.01False + Bond Graph\2D\C-2.emx + 2007-9-25 12:7:27 +'; + type 'C-2' + ports + power in p [2,1]; + signal out state [2,1]; + restrictions + causality preferred out p; + end; + icon bg bottom + figures + text 'C' 640 216 color 0 18 bold; + end; + implementation eq +parameters + real c[2,2] = [0.1, 0.0; 0.0, 0.1] {mN.m/rad}; +equations + state = int(p.f); + p.e = inverse(c) *state; +implementation_end; + Integrate 176 288 + description ' + + 4.3 +1 + False + Signal\Block Diagram\Integrate.emx + 2013-3-8 14:47:42 + +'; + type Integrate + ports + signal in input; + signal out output; + end; + icon bg bottom + figures + rectangle 160 272 192 304 color 0 fill 15132390; + text '∫' 176 288.3 color 16711680 'Lucida Sans' 21 italic; + end; + implementation eq +parameters + real initial = 0; // initial value +equations + output = int (input, initial); + implementation_end; + Integrate1 520 352 + description ' + + 4.3 +1 + False + Signal\Block Diagram\Integrate.emx + 2013-3-8 14:47:42 + +'; + type Integrate + ports + signal in input; + signal out output; + end; + icon bg bottom + figures + rectangle 504 336 536 368 color 0 fill 15132390; + text '∫' 520 352.3 color 16711680 'Lucida Sans' 21 italic; + end; + implementation eq +parameters + real initial = 0; // initial value +equations + output = int (input, initial); + implementation_end; + inverse_kinematics1 272 520 + description ' + + 4.8 + SCARA\inverse_kinematics_v1.emx +1 + False + 2020-7-10 12:26:18 +False + +'; + type 'Submodel-Equation' + ports + signal in input [2,1] {m} ; + signal out angle1 {rad} ; + signal out angle2 {rad} ; + signal out a {rad} ; + signal out b {rad} ; + signal out c {rad} ; + signal out phi {rad} ; + signal out abs_angle2; + end; + implementation eq +parameters + real A_length = 0.065 {m}; // length of first arm + real B_length = 0.05 {m}; // length of second arm + real to_rad = 1 {rad}; +variables + real x {m}, y {m}; + real C_length {m}; // length to x and y. + real angle_sum {rad}; // test angle +equations + x = input[1]; + y = input[2]; + phi = atan2(y, x); + C_length = sqrt(x^2 + y^2); + a = arccos ((B_length^2 + C_length^2 - A_length^2) / (2 * B_length * C_length)); + b = arccos ((A_length^2 + C_length^2 - B_length^2) / (2 * A_length * C_length)); + c = arccos ((A_length^2 + B_length^2 - C_length^2) / (2 * A_length * B_length)); + angle1 = b + phi; + abs_angle2 = angle1 - pi * to_rad + c; + angle2 = c - pi * to_rad; + + + + implementation_end; + Joint1 200 120 + description ' + + 4.8 +1 + Bond Graph\MR\joint-v3.emx + 2020-7-20 14:25:50 + +'; + type 'Submodel-v3' + ports + power in Pin [6,1]; + signal in Hin [4,4]; + power in Pdiff [6,1]; + signal out Hout [4,4]; + power out Pout [6,1]; + end; + icon bg bottom + figures + rectangle 176 88 224 152 color 0 fill 14745599; + text 'Joint' 200 120 color 0 'Clear Sans' 16; + terminals + Pin 224 104 fixed; + Hin 176 136 fixed; + Hout 224 136 fixed; + Pout 176 104 fixed; + end; + implementation bg + submodels + AdHji 424 424 + description ' + 4.0 + 1 + False + Bond Graph\MTF.emx + 2007-9-25 12:3:3 + True +'; + type MTF + ports + power out p1 [6,1]; + power in p2 [6,1]; + signal in H [4,4]; + restrictions + causality constraint not_equal p1 p2; + end; + icon bg bottom + figures + text 'MTF' 424 424 color 0 18 bold; + end; + implementation eq +equations + p2.e = transpose(Adjoint(H)) * p1.e; + p1.f = Adjoint(H) * p2.f;implementation_end; + FlowSensor2 240 271.9 + description ' + + 4.2 +1 + False + Bond Graph\FlowSensor.emx + 2011-11-29 15:50:53 + +'; + knot FlowSensor + ports + power knot in p1 [6,1]; + power knot out p2 [6,1]; + signal knot out flow [6,1]; + restrictions + causality constraint not_equal p1 p2; + end; + icon bg ellipse + figures + ellipse 233.1 264.8 246.9 279.1 color 0 fill 16777215; + text 'f' 240 271.2 color 0; + end; + implementation eq +equations + p2.f = p1.f; + p1.e = p2.e; + flow = p1.f; +implementation_end; + Hmatrix 320 272 + description '4.0Template\Submodel-Equation.emx1False2007-11-1 22:32:1False'; + type 'Submodel-Equation' + ports + signal in flow [6,1]; + signal out H [4,4]; + end; + implementation eq +parameters + real init[4] = [1;0;0;0]; +variables + real q[4]; //quaternions + real W[3,4]; //Quaternion Rates Matrix + real R[3,3]; //Rotation Matrix + real p[3]; //Position Vector +equations + ddt(q,init) = transpose(W) * flow[1:3] ./ 2; + p = int(flow[4:6]); + W = [-q[2], q[1], -q[4], q[3]; + -q[3], q[4], q[1], -q[2]; + -q[4], -q[3], q[2], q[1]]; + R = [q[1]^2+q[2]^2-q[3]^2-q[4]^2, 2*(q[2]*q[3]+q[1]*q[4]), 2*(q[2]*q[4]-q[1]*q[3]); + 2*(q[2]*q[3]-q[1]*q[4]), q[1]^2-q[2]^2+q[3]^2-q[4]^2, 2*(q[3]*q[4]+q[1]*q[2]); + 2*(q[2]*q[4]+q[1]*q[3]), 2*(q[3]*q[4]-q[1]*q[2]), q[1]^2-q[2]^2-q[3]^2+q[4]^2]; + H = homogeneous(R,p); + implementation_end; + MatrixMul 320 576 + description ' + 4.0 + 1 + False + Signal\Block Diagram\Gain.emx + 2007-9-26 12:15:12 + True +'; + type Gain + ports + signal in input1 [4,4]; + signal out output [4,4]; + signal in input2 [4,4]; + end; + icon bg bottom + figures + rectangle 304.1 560 335.9 592 color 0 fill 15132390; + text 'X' 320 576 color 16711680 16 bold; + end; + implementation eq +equations + output = input2*input1; implementation_end; + plug Hin 121.4 576; + plug Pdiff 240 220; + plug Hout 491.2 576; + plug Pout 119.4 424; + plug Pin 485.6 424; + Splitter2 320 312 + description '4.0 + Signal\Block Diagram\Splitter.emx + 2008-01-17 11:28:29 +1 + False +'; + knot Splitter + ports + signal knot duplicatable out output [4,4]; + signal knot in input [4,4]; + end; + icon bg ellipse + figures + ellipse 316.8 308.8 323.2 315.2 color -1 fill 0; + ellipse 315.7 307.7 324.3 316.3 color -1; + terminals + input 320 312 fixed; + end; + implementation eq +equations + collect (output) = input; +implementation_end; + Wbai 240 424 + description ' + 4.0 + 1 + False + Bond Graph\ZeroJunction.emx + 2007-9-27 9:51:43 + True +'; + knot ZeroJunction + ports + power knot duplicatable none p [6,1]; + signal knot out effort [6,1]; + restrictions + causality constraint one_in p; + end; + icon bg bottom + figures + text '0' 240 424 color 0 18 bold; + end; + implementation eq +equations + sum (direct (p.f)) = 0; + equal (collect (p.e)); + effort = first (p.e); +implementation_end; + end; + connections + FlowSensor2\flow -> Hmatrix\flow; + FlowSensor2\p2 => Wbai\p; + Hin -> MatrixMul\input2; + Hmatrix\H -> Splitter2\input; + MatrixMul\output -> Hout; + Pdiff => FlowSensor2\p1; + Pin => AdHji\p2; + Splitter2\output -> AdHji\H 424 312; + Splitter2\output -> MatrixMul\input1; + Wbai\p <= AdHji\p1; + Wbai\p => Pout; + end; + parameterrelations +EndstopMin\Rendstop = Rendstop; +EndstopMin\Cendstop = Cendstop; +EndstopMin\InitialPos = InitialPos; +EndstopMin\EndstopPos = MinEndstopPos; +EndstopMax\Rendstop = Rendstop; +EndstopMax\Cendstop = Cendstop; +EndstopMax\InitialPos = InitialPos; +EndstopMax\EndstopPos = MaxEndstopPos; +Rjoint\Rjoint= Rjoint; +Integrate\init = InitialPos; +uTbai\Rconstraint = Rconstraint; +uTbai\Cconstraint = Cconstraint; + +parameterrelations_end; + implementation_end; + Joint2 536 120 + description ' + + 4.8 +1 + Bond Graph\MR\joint-v3.emx + 2020-7-20 14:25:50 + +'; + type 'Submodel-v3' + ports + power in Pin [6,1]; + signal in Hin [4,4]; + power in Pdiff [6,1]; + signal out Hout [4,4]; + power out Pout [6,1]; + end; + icon bg bottom + figures + rectangle 512 88 560 152 color 0 fill 14745599; + text 'Joint' 536 120 color 0 'Clear Sans' 16; + terminals + Pin 560 104 fixed; + Hin 512 136 fixed; + Hout 560 136 fixed; + Pout 512 104 fixed; + end; + implementation bg + submodels + AdHji 424 424 + description ' + 4.0 + 1 + False + Bond Graph\MTF.emx + 2007-9-25 12:3:3 + True +'; + type MTF + ports + power out p1 [6,1]; + power in p2 [6,1]; + signal in H [4,4]; + restrictions + causality constraint not_equal p1 p2; + end; + icon bg bottom + figures + text 'MTF' 424 424 color 0 18 bold; + end; + implementation eq +equations + p2.e = transpose(Adjoint(H)) * p1.e; + p1.f = Adjoint(H) * p2.f;implementation_end; + FlowSensor2 240 271.9 + description ' + + 4.2 +1 + False + Bond Graph\FlowSensor.emx + 2011-11-29 15:50:53 + +'; + knot FlowSensor + ports + power knot in p1 [6,1]; + power knot out p2 [6,1]; + signal knot out flow [6,1]; + restrictions + causality constraint not_equal p1 p2; + end; + icon bg ellipse + figures + ellipse 233.1 264.8 246.9 279.1 color 0 fill 16777215; + text 'f' 240 271.2 color 0; + end; + implementation eq +equations + p2.f = p1.f; + p1.e = p2.e; + flow = p1.f; +implementation_end; + Hmatrix 320 272 + description '4.0Template\Submodel-Equation.emx1False2007-11-1 22:32:1False'; + type 'Submodel-Equation' + ports + signal in flow [6,1]; + signal out H [4,4]; + end; + implementation eq +parameters + real init[4] = [1;0;0;0]; +variables + real q[4]; //quaternions + real W[3,4]; //Quaternion Rates Matrix + real R[3,3]; //Rotation Matrix + real p[3]; //Position Vector +equations + ddt(q,init) = transpose(W) * flow[1:3] ./ 2; + p = int(flow[4:6]); + W = [-q[2], q[1], -q[4], q[3]; + -q[3], q[4], q[1], -q[2]; + -q[4], -q[3], q[2], q[1]]; + R = [q[1]^2+q[2]^2-q[3]^2-q[4]^2, 2*(q[2]*q[3]+q[1]*q[4]), 2*(q[2]*q[4]-q[1]*q[3]); + 2*(q[2]*q[3]-q[1]*q[4]), q[1]^2-q[2]^2+q[3]^2-q[4]^2, 2*(q[3]*q[4]+q[1]*q[2]); + 2*(q[2]*q[4]+q[1]*q[3]), 2*(q[3]*q[4]-q[1]*q[2]), q[1]^2-q[2]^2-q[3]^2+q[4]^2]; + H = homogeneous(R,p); + implementation_end; + MatrixMul 320 576 + description ' + 4.0 + 1 + False + Signal\Block Diagram\Gain.emx + 2007-9-26 12:15:12 + True +'; + type Gain + ports + signal in input1 [4,4]; + signal out output [4,4]; + signal in input2 [4,4]; + end; + icon bg bottom + figures + rectangle 304.1 560 335.9 592 color 0 fill 15132390; + text 'X' 320 576 color 16711680 16 bold; + end; + implementation eq +equations + output = input2*input1; implementation_end; + plug Hin 121.4 576; + plug Pdiff 240 220; + plug Hout 491.2 576; + plug Pout 119.4 424; + plug Pin 485.6 424; + Splitter2 320 312 + description '4.0 + Signal\Block Diagram\Splitter.emx + 2008-01-17 11:28:29 +1 + False +'; + knot Splitter + ports + signal knot duplicatable out output [4,4]; + signal knot in input [4,4]; + end; + icon bg ellipse + figures + ellipse 316.8 308.8 323.2 315.2 color -1 fill 0; + ellipse 315.7 307.7 324.3 316.3 color -1; + terminals + input 320 312 fixed; + end; + implementation eq +equations + collect (output) = input; +implementation_end; + Wbai 240 424 + description ' + 4.0 + 1 + False + Bond Graph\ZeroJunction.emx + 2007-9-27 9:51:43 + True +'; + knot ZeroJunction + ports + power knot duplicatable none p [6,1]; + signal knot out effort [6,1]; + restrictions + causality constraint one_in p; + end; + icon bg bottom + figures + text '0' 240 424 color 0 18 bold; + end; + implementation eq +equations + sum (direct (p.f)) = 0; + equal (collect (p.e)); + effort = first (p.e); +implementation_end; + end; + connections + FlowSensor2\flow -> Hmatrix\flow; + FlowSensor2\p2 => Wbai\p; + Hin -> MatrixMul\input2; + Hmatrix\H -> Splitter2\input; + MatrixMul\output -> Hout; + Pdiff => FlowSensor2\p1; + Pin => AdHji\p2; + Splitter2\output -> AdHji\H 424 312; + Splitter2\output -> MatrixMul\input1; + Wbai\p <= AdHji\p1; + Wbai\p => Pout; + end; + parameterrelations +EndstopMin\Rendstop = Rendstop; +EndstopMin\Cendstop = Cendstop; +EndstopMin\InitialPos = InitialPos; +EndstopMin\EndstopPos = MinEndstopPos; +EndstopMax\Rendstop = Rendstop; +EndstopMax\Cendstop = Cendstop; +EndstopMax\InitialPos = InitialPos; +EndstopMax\EndstopPos = MaxEndstopPos; +Rjoint\Rjoint= Rjoint; +Integrate\init = InitialPos; +uTbai\Rconstraint = Rconstraint; +uTbai\Cconstraint = Cconstraint; + +parameterrelations_end; + implementation_end; + Link 280 120 + description ' + + 4.8 + Bond Graph\MR\link-v3.emx +1 + False + 2020-7-19 15:22:34 +False + +'; + type 'Submodel-Equation' + ports + signal in Hin [4,4]; + signal out Hout [4,4]; + power in Pin [6,1]; + power out Pout [6,1]; + restrictions + causality constraint not_equal Pin Pout; + end; + icon bg bottom + figures + rectangle 248 96 312 144 color 0 fill 8454041; + text 'Link' 280 120 color 0 'Clear Sans' 16; + terminals + Hin 248 136 fixed; + Hout 312 136 fixed; + Pin 312 104 fixed; + Pout 248 104 fixed; + end; + implementation eq +parameters + real offset[3]= [0;0.0325;0]; //coordinates of joint_1 +variables + real Hab[4,4]; + real AdHab[6,6]; +equations + Hab = homogeneous(eye(3),offset); + AdHab = Adjoint(eye(3),offset); + Hout = Hin * Hab; + Pout.e = transpose(AdHab) * Pin.e; + Pin.f = AdHab * Pout.f; + + implementation_end; + Link1 456 120 + description ' + + 4.8 + Bond Graph\MR\link-v3.emx +1 + False + 2020-7-19 15:22:34 +False + +'; + type 'Submodel-Equation' + ports + signal in Hin [4,4]; + signal out Hout [4,4]; + power in Pin [6,1]; + power out Pout [6,1]; + restrictions + causality constraint not_equal Pin Pout; + end; + icon bg bottom + figures + rectangle 424 96 488 144 color 0 fill 8454041; + text 'Link' 456 120 color 0 'Clear Sans' 16; + terminals + Hin 424 136 fixed; + Hout 488 136 fixed; + Pin 488 104 fixed; + Pout 424 104 fixed; + end; + implementation eq +parameters + real offset[3]= [0;0.0325;0]; //coordinates of joint_1 +variables + real Hab[4,4]; + real AdHab[6,6]; +equations + Hab = homogeneous(eye(3),offset); + AdHab = Adjoint(eye(3),offset); + Hout = Hin * Hab; + Pout.e = transpose(AdHab) * Pin.e; + Pin.f = AdHab * Pout.f; + + implementation_end; + Link2 624 120 + description ' + + 4.8 + Bond Graph\MR\link-v3.emx +1 + False + 2020-7-19 15:22:34 +False + +'; + type 'Submodel-Equation' + ports + signal in Hin [4,4]; + signal out Hout [4,4]; + power in Pin [6,1]; + power out Pout [6,1]; + restrictions + causality constraint not_equal Pin Pout; + end; + icon bg bottom + figures + rectangle 592 96 656 144 color 0 fill 8454041; + text 'Link' 624 120 color 0 'Clear Sans' 16; + terminals + Hin 592 136 fixed; + Hout 656 136 fixed; + Pin 656 104 fixed; + Pout 592 104 fixed; + end; + implementation eq +parameters + real offset[3]= [0;0.025;0]; //coordinates of joint_1 +variables + real Hab[4,4]; + real AdHab[6,6]; +equations + Hab = homogeneous(eye(3),offset); + AdHab = Adjoint(eye(3),offset); + Hout = Hin * Hab; + Pout.e = transpose(AdHab) * Pin.e; + Pin.f = AdHab * Pout.f; + + implementation_end; + Link3 800 120 + description ' + + 4.8 + Bond Graph\MR\link-v3.emx +1 + False + 2020-7-19 15:22:34 +False + +'; + type 'Submodel-Equation' + ports + signal in Hin [4,4]; + signal out Hout [4,4]; + power in Pin [6,1]; + power out Pout [6,1]; + restrictions + causality constraint not_equal Pin Pout; + end; + icon bg bottom + figures + rectangle 768 96 832 144 color 0 fill 8454041; + text 'Link' 800 120 color 0 'Clear Sans' 16; + terminals + Hin 768 136 fixed; + Hout 832 136 fixed; + Pin 832 104 fixed; + Pout 768 104 fixed; + end; + implementation eq +parameters + real offset[3]= [0;0.025;0]; //coordinates of joint_1 +variables + real Hab[4,4]; + real AdHab[6,6]; +equations + Hab = homogeneous(eye(3),offset); + AdHab = Adjoint(eye(3),offset); + Hout = Hin * Hab; + Pout.e = transpose(AdHab) * Pin.e; + Pin.f = AdHab * Pout.f; + + implementation_end; + Negate1 272 448 + description '4.01False + Signal\Block Diagram\Negate.emx + 2007-9-26 12:14:11 +'; + type Negate + ports + signal in input; + signal out output; + end; + icon bg bottom + figures + rectangle 256 432 288 464 color 0 fill 15132390; + text '-1' 272 448 color 16711680 16 bold; + end; + implementation eq +equations + output = - input; + implementation_end; + Negate2 520 520 + description '4.01False + Signal\Block Diagram\Negate.emx + 2007-9-26 12:14:11 +'; + type Negate + ports + signal in input; + signal out output; + end; + icon bg bottom + figures + rectangle 504 504 536 536 color 0 fill 15132390; + text '-1' 520 520 color 16711680 16 bold; + end; + implementation eq +equations + output = - input; + implementation_end; + new_joint1 376 256 + description '4.0 + Template\Submodel-Equation.emx +1 + False + 2007-11-1 22:32:1 + False +'; + type 'Submodel-Equation' + ports + signal in input [4,4]; + signal out output; + end; + implementation eq +variables + real position[3]; + real rotation[3]; + real R[3,3]; +equations + position = input[1:3,4]; + rotation = dll('EulerAngles.dll','EulXYZsFromHMatrix',input); + //[input[3,2];input[1,3];input[2,1]]; + R = input[1:3,1:3];implementation_end; + new_joint2 824 288 + description '4.0 + Template\Submodel-Equation.emx +1 + False + 2007-11-1 22:32:1 + False +'; + type 'Submodel-Equation' + ports + signal in input [4,4]; + signal out output; + end; + implementation eq +variables + real position[3]; + real rotation[3]; + real R[3,3]; +equations + // start typing here + position = input[1:3,4]; + rotation = [input[3,2];input[1,3];input[2,1]]; + R = input[1:3,1:3];implementation_end; + new_joint3 1008 152 + description '4.0 + Template\Submodel-Equation.emx +1 + False + 2007-11-1 22:32:1 + False +'; + type 'Submodel-Equation' + ports + signal in input [4,4]; + signal out output; + end; + implementation eq +variables + real position[3]; + real rotation[3]; + real R[3,3]; +equations + position = input[1:3,4]; + rotation = [input[3,2];input[1,3];input[2,1]]; + R = input[1:3,1:3];implementation_end; + OneJunction1 360 104 + description ' + + 4.2 +1 + False + Bond Graph\OneJunction.emx + 2011-11-29 16:17:51 + +'; + knot OneJunction + ports + power knot duplicatable none p [6,1]; + signal knot out flow [6,1]; + restrictions + causality constraint one_out p; + end; + icon bg + figures + text '1' 360 104 color 0 18 bold; + end; + implementation eq +equations + sum (direct (p.e)) = 0; + equal (collect (p.f)); + flow = first (p.f); +implementation_end; + OneJunction17 520 288 + description ' + + 4.2 +1 + False + Bond Graph\OneJunction.emx + 2011-11-29 16:17:51 + +'; + knot OneJunction + ports + power knot duplicatable none p [1]; + signal knot out flow [1]; + restrictions + causality constraint one_out p; + end; + icon bg + figures + text '1' 520 288 color 0 18 bold; + end; + implementation eq +equations + sum (direct (p.e)) = 0; + equal (collect (p.f)); + flow = first (p.f); +implementation_end; + OneJunction2 120 104 + description ' + + 4.2 +1 + False + Bond Graph\OneJunction.emx + 2011-11-29 16:17:51 + +'; + knot OneJunction + ports + power knot duplicatable none p [6,1]; + signal knot out flow [6,1]; + restrictions + causality constraint one_out p; + end; + icon bg + figures + text '1' 120 104 color 0 18 bold; + end; + implementation eq +equations + sum (direct (p.e)) = 0; + equal (collect (p.f)); + flow = first (p.f); +implementation_end; + OneJunction3 704 104 + description ' + + 4.2 +1 + False + Bond Graph\OneJunction.emx + 2011-11-29 16:17:51 + +'; + knot OneJunction + ports + power knot duplicatable none p [6,1]; + signal knot out flow [6,1]; + restrictions + causality constraint one_out p; + end; + icon bg + figures + text '1' 704 104 color 0 18 bold; + end; + implementation eq +equations + sum (direct (p.e)) = 0; + equal (collect (p.f)); + flow = first (p.f); +implementation_end; + OneJunction4 593 232 + description ' + + 4.2 +1 + False + Bond Graph\OneJunction.emx + 2011-11-29 16:17:51 + +'; + knot OneJunction + ports + power knot duplicatable none p [2,1]; + signal knot out flow [2,1]; + restrictions + causality constraint one_out p; + end; + icon bg + figures + text '1' 593 232 color 0 18 bold; + end; + implementation eq +equations + sum (direct (p.e)) = 0; + equal (collect (p.f)); + flow = first (p.f); +implementation_end; + OneJunction5 257 240 + description ' + + 4.2 +1 + False + Bond Graph\OneJunction.emx + 2011-11-29 16:17:51 + +'; + knot OneJunction + ports + power knot duplicatable none p [2,1]; + signal knot out flow [2,1]; + restrictions + causality constraint one_out p; + end; + icon bg + figures + text '1' 257 240 color 0 18 bold; + end; + implementation eq +equations + sum (direct (p.e)) = 0; + equal (collect (p.f)); + flow = first (p.f); +implementation_end; + OneJunction6 257 256 + description ' + + 4.2 +1 + False + Bond Graph\OneJunction.emx + 2011-11-29 16:17:51 + +'; + knot OneJunction + ports + power knot duplicatable none p [3,1]; + signal knot out flow [3,1]; + restrictions + causality constraint one_out p; + end; + icon bg + figures + text '1' 257 256 color 0 18 bold; + end; + implementation eq +equations + sum (direct (p.e)) = 0; + equal (collect (p.f)); + flow = first (p.f); +implementation_end; + OneJunction7 593 248 + description ' + + 4.2 +1 + False + Bond Graph\OneJunction.emx + 2011-11-29 16:17:51 + +'; + knot OneJunction + ports + power knot duplicatable none p [3,1]; + signal knot out flow [3,1]; + restrictions + causality constraint one_out p; + end; + icon bg + figures + text '1' 593 248 color 0 18 bold; + end; + implementation eq +equations + sum (direct (p.e)) = 0; + equal (collect (p.f)); + flow = first (p.f); +implementation_end; + PID2 200 384 + description ' + 4.0 + 1 + False + Signal\Control\PID Control\Continuous\PID.emx + 2008-1-17 10:49:30 +'; + type PID + ports + signal in error; + signal out output; + end; + icon bg bottom + figures + rectangle 184 368 216 400 color 0 fill 15132390; + text 'PID' 200 383.5 color 16711680 18 bold; + end; + implementation eq +parameters + real kp = 0.05 {}; // Proportional gain + real tauD = 1.0 {s}; // Derivative time constant: tauD > 0 + real beta = 0.001 {}; // Tameness constant: 0 < beta << 1 + real tauI = 0.05{s}; // Integral time constant: tauI > 0 +variables + real pdout, pdrate, pdstate; + real pirate, pistate; +equations + pdrate = (kp * error - pdout) / (beta * tauD); + pdstate = int (pdrate); + pdout = pdstate + (kp * error / beta); + pirate = pdout / tauI; + pistate = int (pirate); + output = pistate + pdout; + implementation_end; + PID3 576 432 + description ' + 4.0 + 1 + False + Signal\Control\PID Control\Continuous\PID.emx + 2008-1-17 10:49:30 +'; + type PID + ports + signal in error; + signal out output; + end; + icon bg bottom + figures + rectangle 560 416 592 448 color 0 fill 15132390; + text 'PID' 576 431.5 color 16711680 18 bold; + end; + implementation eq +parameters + real kp = 0.02 {}; // Proportional gain + real tauD = 2 {s}; // Derivative time constant: tauD > 0 + real beta = 0.001 {}; // Tameness constant: 0 < beta << 1 + real tauI = 0.05 {s}; // Integral time constant: tauI > 0 +variables + real pdout, pdrate, pdstate; + real pirate, pistate; +equations + pdrate = (kp * error - pdout) / (beta * tauD); + pdstate = int (pdrate); + pdout = pdstate + (kp * error / beta); + pirate = pdout / tauI; + pistate = int (pirate); + output = pistate + pdout;implementation_end; + PlusMinus4 272 384 + description '4.01False + Signal\Block Diagram\PlusMinus.emx + 2007-9-27 10:15:13 +'; + knot PlusMinus + ports + signal knot duplicatable in plus [1]; + signal knot duplicatable in minus [1]; + signal knot out output [1]; + end; + icon bg ellipse + figures + ellipse 264 376 280 392 color 0 fill 16777215; + end; + implementation eq +equations + output = sum (collect (plus)) - sum (collect (minus)); + implementation_end; + PlusMinus5 520 432 + description '4.01False + Signal\Block Diagram\PlusMinus.emx + 2007-9-27 10:15:13 +'; + knot PlusMinus + ports + signal knot duplicatable in plus [1]; + signal knot duplicatable in minus [1]; + signal knot out output [1]; + end; + icon bg ellipse + figures + ellipse 512 424 528 440 color 0 fill 16777215; + end; + implementation eq +equations + output = sum (collect (plus)) - sum (collect (minus)); + implementation_end; + PowerMux 200 214 + specifications active 'rot_x' + specification 'rot_x' + description ' + + 4.8 + Bond Graph\MR\PowerMux-Rotation.emx + 2020-7-20 14:35:23 +1 + False + True + +'; + type 'PowerMux-Rotation' + ports + power in input; + power out output [6,1]; + power in input_rot2 [2,1]; + power in input_pos3 [3,1]; + restrictions + causality constraint not_equal input output; + causality constraint not_equal input_rot2 output; + causality constraint not_equal input_pos3 output; + end; + icon bg bottom + figures + line 176 216 224 216 color 0 width 2; + rectangle 176 208 224 220 color -1; + text '1' 194 211 color 8421504 8; + terminals + input 184 216 fixed; + output 200 216 fixed; + input_rot2 216 216 fixed; + input_pos3 200 216 fixed; + end; + implementation eq +equations + output.e[1] = input.e; + output.e[2:3] = input_rot2.e; + output.e[4:6] = input_pos3.e; + output.f[1] = input.f; + output.f[2:3] = input_rot2.f; + output.f[4:6] = input_pos3.f;implementation_end; +specification_end; + specification 'rot_y' +description ' + 4.1 + Bond Graph\PowerMux.emx + 2011-3-4 15:12:50 +1 + False + True +'; + type PowerMux + ports + power in input; + power out output [6,1]; + power in input_rot2 [2,1]; + power in input_pos3 [3,1]; + restrictions + causality constraint not_equal input output; + end; + icon bg bottom + figures + line 808 216 808 264 color 0 width 2; + rectangle 804 216 816 264 color -1; + text '1' 813 234 color 8421504 8; + terminals + input 808 224 fixed; + output 808 240 fixed; + input_rot2 808 256 fixed; + input_pos3 808 240 fixed; + end; + implementation eq +equations + output.e[1] = input_rot2.e[1]; + output.e[2] = input.e; + output.e[3] = input_rot2.e[2]; + output.e[4:6] = input_pos3.e; + output.f[1] = input_rot2.f[1]; + output.f[2] = input.f; + output.f[3] = input_rot2.f[2]; + output.f[4:6] = input_pos3.f;implementation_end; +specification_end; + specification 'rot_z' +description ' + 4.1 + Bond Graph\PowerMux.emx + 2011-3-4 15:12:50 +1 + False + True +'; + type PowerMux + ports + power in input; + power out output [6,1]; + power in input_rot2 [2,1]; + power in input_pos3 [3,1]; + restrictions + causality constraint not_equal input output; + end; + icon bg bottom + figures + line 808 216 808 264 color 0 width 2; + rectangle 804 216 816 264 color -1; + text '1' 813 234 color 8421504 8; + terminals + input 808 224 fixed; + output 808 240 fixed; + input_rot2 808 256 fixed; + input_pos3 808 240 fixed; + end; + implementation eq +equations + output.e[3] = input.e; + output.e[1:2] = input_rot2.e; + output.e[4:6] = input_pos3.e; + output.f[3] = input.f; + output.f[1:2] = input_rot2.f; + output.f[4:6] = input_pos3.f;implementation_end; +specification_end; + end; + PowerMux1 536 206 + specifications active 'rot_x' + specification 'rot_x' + description ' + + 4.8 + Bond Graph\MR\PowerMux-Rotation.emx + 2020-7-20 14:35:23 +1 + False + True + +'; + type 'PowerMux-Rotation' + ports + power in input; + power out output [6,1]; + power in input_rot2 [2,1]; + power in input_pos3 [3,1]; + restrictions + causality constraint not_equal input output; + causality constraint not_equal input_rot2 output; + causality constraint not_equal input_pos3 output; + end; + icon bg bottom + figures + line 512 208 560 208 color 0 width 2; + rectangle 512 200 560 212 color -1; + text '1' 530 203 color 8421504 8; + terminals + input 520 208 fixed; + output 536 208 fixed; + input_rot2 552 208 fixed; + input_pos3 536 208 fixed; + end; + implementation eq +equations + output.e[1] = input.e; + output.e[2:3] = input_rot2.e; + output.e[4:6] = input_pos3.e; + output.f[1] = input.f; + output.f[2:3] = input_rot2.f; + output.f[4:6] = input_pos3.f;implementation_end; +specification_end; + specification 'rot_y' +description ' + 4.1 + Bond Graph\PowerMux.emx + 2011-3-4 15:12:50 +1 + False + True +'; + type PowerMux + ports + power in input; + power out output [6,1]; + power in input_rot2 [2,1]; + power in input_pos3 [3,1]; + restrictions + causality constraint not_equal input output; + end; + icon bg bottom + figures + line 808 216 808 264 color 0 width 2; + rectangle 804 216 816 264 color -1; + text '1' 813 234 color 8421504 8; + terminals + input 808 224 fixed; + output 808 240 fixed; + input_rot2 808 256 fixed; + input_pos3 808 240 fixed; + end; + implementation eq +equations + output.e[1] = input_rot2.e[1]; + output.e[2] = input.e; + output.e[3] = input_rot2.e[2]; + output.e[4:6] = input_pos3.e; + output.f[1] = input_rot2.f[1]; + output.f[2] = input.f; + output.f[3] = input_rot2.f[2]; + output.f[4:6] = input_pos3.f;implementation_end; +specification_end; + specification 'rot_z' +description ' + 4.1 + Bond Graph\PowerMux.emx + 2011-3-4 15:12:50 +1 + False + True +'; + type PowerMux + ports + power in input; + power out output [6,1]; + power in input_rot2 [2,1]; + power in input_pos3 [3,1]; + restrictions + causality constraint not_equal input output; + end; + icon bg bottom + figures + line 808 216 808 264 color 0 width 2; + rectangle 804 216 816 264 color -1; + text '1' 813 234 color 8421504 8; + terminals + input 808 224 fixed; + output 808 240 fixed; + input_rot2 808 256 fixed; + input_pos3 808 240 fixed; + end; + implementation eq +equations + output.e[3] = input.e; + output.e[1:2] = input_rot2.e; + output.e[4:6] = input_pos3.e; + output.f[3] = input.f; + output.f[1:2] = input_rot2.f; + output.f[4:6] = input_pos3.f;implementation_end; +specification_end; + end; + R 64 288 + description ' + + 4.2 +1 + False + Bond Graph\R.emx + 2011-11-29 16:35:37 + +'; + type R + ports + power in p; + end; + icon bg bottom + figures + text 'R' 64 288 color 0 18 bold; + end; + implementation eq +parameters + real r = 0.01; +equations + p.e = r * p.f; +implementation_end; + R1 464 288 + description ' + + 4.2 +1 + False + Bond Graph\R.emx + 2011-11-29 16:35:37 + +'; + type R + ports + power in p; + end; + icon bg bottom + figures + text 'R' 464 288 color 0 18 bold; + end; + implementation eq +parameters + real r = 0.01; +equations + p.e = r * p.f; +implementation_end; + R2 257 184 + description '4.01False + Bond Graph\2D\R-2.emx + 2007-9-25 12:6:54 +'; + type 'R-2' + ports + power in p [2,1]; + end; + icon bg bottom + figures + text 'R' 257 184 color 0 18 bold; + end; + implementation eq +parameters + real r[2,2] = [1.0, 0.0; 0.0, 1.0] {kN.m.s/rad}; +equations + p.e = r * p.f; +implementation_end; + R3 257 312 + description '4.01False + Bond Graph\3D\R-3.emx + 2007-9-25 12:11:54 +'; + type 'R-3' + ports + power in p [3,1]; + end; + icon bg bottom + figures + text 'R' 257 312 color 0 18 bold; + end; + implementation eq +parameters + real r[3,3] = [1.0, 0.0, 0.0; 0.0, 1.0, 0.0; 0.0, 0.0, 1.0] {kN.s/m}; +equations + p.e = r * p.f; +implementation_end; + R4 593 176 + description '4.01False + Bond Graph\2D\R-2.emx + 2007-9-25 12:6:54 +'; + type 'R-2' + ports + power in p [2,1]; + end; + icon bg bottom + figures + text 'R' 593 176 color 0 18 bold; + end; + implementation eq +parameters + real r[2,2] = [1.0, 0.0; 0.0, 1.0] {kN.m.s/rad}; +equations + p.e = r * p.f; +implementation_end; + R5 593 304 + description '4.01False + Bond Graph\3D\R-3.emx + 2007-9-25 12:11:54 +'; + type 'R-3' + ports + power in p [3,1]; + end; + icon bg bottom + figures + text 'R' 593 304 color 0 18 bold; + end; + implementation eq +parameters + real r[3,3] = [1.0, 0.0, 0.0; 0.0, 1.0, 0.0; 0.0, 0.0, 1.0] {kN.s/m}; +equations + p.e = r * p.f; +implementation_end; + rectanglepath 272 584 + description ' + + 4.8 + setpoint\rectanglepath.emx +1 + False + 2020-7-10 12:30:38 +False + +'; + type 'Submodel-Equation' + ports + signal out output [2,1]; + end; + implementation eq +/* +This will generate coordinates for the box that has to be drawn +*/ +parameters + real w = 0.07{m} ; + real h = 0.05 {m}; + real t = 0.5 {s}; + real origin[2] = [0.01,0.03]{m}; +variables + real v {m/s}; + real t_w {s}; + real t_h {s}; + real period {s}; + real test1, test2, test3; +initialequations + v = (2*w + 2*h)/t; + t_w = w / v; + t_h = h / v; +equations + period = floor(time / t) * t; + output[1] = v*(ramp(period+t_h) - ramp(period + t_w+t_h) - ramp(period + t_w + t_h + t_h)) + origin[1]; + output[2] = v*(ramp(period) - ramp(period + t_h) - ramp(period + t_h + t_w) + ramp(period + 2 * t_h + t_w))+ origin[2]; +implementation_end; + Sf2 64 104 + description '4.01False + Bond Graph\2D\Sf-2.emx + 2007-9-25 12:7:5 +'; + type 'Sf-2' + ports + power out p [6,1]; + restrictions + causality fixed in p; + end; + icon bg bottom + figures + text 'Sf' 64 104 color 0 18 bold; + end; + implementation eq +parameters + real flow[6,1] = 0; +variables + real effort [6]; +equations + p.f = flow; + effort = p.e; +implementation_end; + Splitter1 392 136 + description '4.0 + Signal\Block Diagram\Splitter.emx + 2008-01-17 11:28:29 +1 + False +'; + knot Splitter + ports + signal knot duplicatable out output [4,4]; + signal knot in input [4,4]; + end; + icon bg ellipse + figures + ellipse 388.8 132.8 395.2 139.2 color -1 fill 0; + ellipse 387.7 131.7 396.3 140.3 color -1; + terminals + input 392 136 fixed; + end; + implementation eq +equations + collect (output) = input; +implementation_end; + Splitter2 736 136 + description '4.0 + Signal\Block Diagram\Splitter.emx + 2008-01-17 11:28:29 +1 + False +'; + knot Splitter + ports + signal knot duplicatable out output [4,4]; + signal knot in input [4,4]; + end; + icon bg ellipse + figures + ellipse 732.8 132.8 739.2 139.2 color -1 fill 0; + ellipse 731.7 131.7 740.3 140.3 color -1; + terminals + input 736 136 fixed; + end; + implementation eq +equations + collect (output) = input; +implementation_end; + Submodel2 112 384 + description ' + 4.8 + 1 + '; + type Submodel + ports + signal in input; + power out p2; + end; + implementation bg + submodels + Gain1 552 88 + description '4.01False + Signal\Block Diagram\Gain.emx + 2007-9-26 12:15:12 +'; + type Gain + ports + signal in input; + signal out output; + end; + icon bg bottom + figures + rectangle 536.1 72 567.9 104 color 0 fill 15132390; + text 'K' 552 88 color 16711680 16 bold; + end; + implementation eq +parameters + real K = 12.0; // gain +equations + output = K * input; + implementation_end; + GY 624 184 + description ' + + 4.2 +1 + False + Bond Graph\GY.emx + 2011-11-29 15:53:45 + +'; + type GY + ports + power in p1; + power out p2; + restrictions + causality constraint equal p1 p2; + end; + icon bg bottom + figures + text 'GY' 624 184 color 0 18 bold; + end; + implementation eq +parameters + real r = 0.127; +equations + p1.e = r * p2.f; + p2.e = r * p1.f; +implementation_end; + MSe 624 88 + description ' + + 4.2 +1 + False + Bond Graph\MSe.emx + 2011-11-29 16:12:33 + +'; + type MSe + ports + power out p; + signal in effort; + restrictions + causality fixed out p; + end; + icon bg bottom + figures + text 'MSe' 624 88 color 0 18 bold; + end; + implementation eq +variables + real flow; +equations + p.e = effort; + flow = p.f; +implementation_end; + plug input 424 88; + plug p2 624 220; + OneJunction2 624 136 + description ' + + 4.2 +1 + False + Bond Graph\OneJunction.emx + 2011-11-29 16:17:51 + +'; + knot OneJunction + ports + power knot duplicatable none p [1]; + signal knot out flow [1]; + restrictions + causality constraint one_out p; + end; + icon bg + figures + text '1' 624 136 color 0 18 bold; + end; + implementation eq +equations + sum (direct (p.e)) = 0; + equal (collect (p.f)); + flow = first (p.f); +implementation_end; + R 664 136 + description ' + + 4.2 +1 + False + Bond Graph\R.emx + 2011-11-29 16:35:37 + +'; + type R + ports + power in p; + end; + icon bg bottom + figures + text 'R' 664 136 color 0 18 bold; + end; + implementation eq +parameters + real r = 0.08; +equations + p.e = r * p.f; +implementation_end; + SignalLimiter2 488 88 + description '4.01False + Signal\Block Diagram Non-Linear\SignalLimiter-Limit.emx + 2007-9-26 12:47:40 +'; + type 'SignalLimiter-Limit' + ports + signal in input; + signal out output; + end; + icon bg bottom + figures + group + rectangle 472 72 504 104 color 0 fill 15132390; + line 487.9 76.5 487.9 101 color 0 fill 15132390; + line 475 88.2 500.7 88.2 color 0 fill 15132390; + spline 481.9 95.1 493.9 81.4 color 16711680 fill 15132390 width 2; + spline 493.3 82.2 501.9 81.8 color 16711680 fill 15132390 width 2; + spline 475 95.6 481.9 95.1 color 16711680 fill 15132390 width 2; + end; + end; + implementation eq +parameters + real maximum = 1; + real minimum = -1; +equations + output = limit (input, minimum, maximum); + implementation_end; + end; + connections + Gain1\output -> MSe\effort; + GY\p2 => p2; + input -> SignalLimiter2\input; + MSe\p => OneJunction2\p; + OneJunction2\p => GY\p1; + R\p <= OneJunction2\p; + SignalLimiter2\output -> Gain1\input; + end; + implementation_end; + Submodel5 664 432 + description ' + 4.8 + 1 + '; + type Submodel + ports + signal in input; + power out p2; + end; + implementation bg + submodels + Gain1 552 88 + description '4.01False + Signal\Block Diagram\Gain.emx + 2007-9-26 12:15:12 +'; + type Gain + ports + signal in input; + signal out output; + end; + icon bg bottom + figures + rectangle 536.1 72 567.9 104 color 0 fill 15132390; + text 'K' 552 88 color 16711680 16 bold; + end; + implementation eq +parameters + real K = 12.0; // gain +equations + output = K * input; + implementation_end; + GY 624 184 + description ' + + 4.2 +1 + False + Bond Graph\GY.emx + 2011-11-29 15:53:45 + +'; + type GY + ports + power in p1; + power out p2; + restrictions + causality constraint equal p1 p2; + end; + icon bg bottom + figures + text 'GY' 624 184 color 0 18 bold; + end; + implementation eq +parameters + real r = 0.127; +equations + p1.e = r * p2.f; + p2.e = r * p1.f; +implementation_end; + MSe 624 88 + description ' + + 4.2 +1 + False + Bond Graph\MSe.emx + 2011-11-29 16:12:33 + +'; + type MSe + ports + power out p; + signal in effort; + restrictions + causality fixed out p; + end; + icon bg bottom + figures + text 'MSe' 624 88 color 0 18 bold; + end; + implementation eq +variables + real flow; +equations + p.e = effort; + flow = p.f; +implementation_end; + plug input 424 88; + plug p2 624 220; + OneJunction2 624 136 + description ' + + 4.2 +1 + False + Bond Graph\OneJunction.emx + 2011-11-29 16:17:51 + +'; + knot OneJunction + ports + power knot duplicatable none p [1]; + signal knot out flow [1]; + restrictions + causality constraint one_out p; + end; + icon bg + figures + text '1' 624 136 color 0 18 bold; + end; + implementation eq +equations + sum (direct (p.e)) = 0; + equal (collect (p.f)); + flow = first (p.f); +implementation_end; + R 664 136 + description ' + + 4.2 +1 + False + Bond Graph\R.emx + 2011-11-29 16:35:37 + +'; + type R + ports + power in p; + end; + icon bg bottom + figures + text 'R' 664 136 color 0 18 bold; + end; + implementation eq +parameters + real r = 0.08; +equations + p.e = r * p.f; +implementation_end; + SignalLimiter2 488 88 + description '4.01False + Signal\Block Diagram Non-Linear\SignalLimiter-Limit.emx + 2007-9-26 12:47:40 +'; + type 'SignalLimiter-Limit' + ports + signal in input; + signal out output; + end; + icon bg bottom + figures + group + rectangle 472 72 504 104 color 0 fill 15132390; + line 487.9 76.5 487.9 101 color 0 fill 15132390; + line 475 88.2 500.7 88.2 color 0 fill 15132390; + spline 481.9 95.1 493.9 81.4 color 16711680 fill 15132390 width 2; + spline 493.3 82.2 501.9 81.8 color 16711680 fill 15132390 width 2; + spline 475 95.6 481.9 95.1 color 16711680 fill 15132390 width 2; + end; + end; + implementation eq +parameters + real maximum = 1; + real minimum = -1; +equations + output = limit (input, minimum, maximum); + implementation_end; + end; + connections + Gain1\output -> MSe\effort; + GY\p2 => p2; + input -> SignalLimiter2\input; + MSe\p => OneJunction2\p; + OneJunction2\p => GY\p1; + R\p <= OneJunction2\p; + SignalLimiter2\output -> Gain1\input; + end; + implementation_end; + Zero 112 136 + description '4.01False + Signal\Sources\Zero.emx + 2007-9-27 15:54:36 + +'; + type Zero + ports + signal out output [4,4]; + end; + icon bg bottom + figures + rectangle 96.1 120 127.9 152 color 0 fill 15132390; + text '0' 112 136 color 16711680 18 bold; + end; + implementation eq +equations + output = eye(4);implementation_end; + ZeroJunction7 112 288 + description ' + + 4.2 +1 + False + Bond Graph\OneJunction.emx + 2011-11-29 16:17:51 + +'; + knot OneJunction + ports + power knot duplicatable none p [1]; + signal knot out flow [1]; + restrictions + causality constraint one_out p; + end; + icon bg + figures + text '1' 112 288 color 0 18 bold; + end; + implementation eq +equations + sum (direct (p.e)) = 0; + equal (collect (p.f)); + flow = first (p.f); +implementation_end; + end; + connections + Base1\Hout -> new_joint2\input; + Base2\Hout -> new_joint3\input; + Base3\Hin <- Splitter1\output; + Base3\Hout -> new_joint1\input; + C1\p <= OneJunction7\p; + C2\p <= OneJunction6\p; + Integrate\input <- ZeroJunction7\flow; + Integrate\output -> PlusMinus4\minus; + Integrate1\output -> PlusMinus5\minus; + inverse_kinematics1\angle1 -> Negate1\input; + inverse_kinematics1\angle2 -> Negate2\input; + Joint1\Hout -> Link\Hin; + Joint1\Pdiff <= PowerMux\output; + Joint1\Pin <= Link\Pout; + Joint1\Pout => OneJunction2\p; + Joint2\Hout -> Link2\Hin; + Joint2\Pdiff <= PowerMux1\output; + Joint2\Pin <= Link2\Pout; + Link\Pin <= OneJunction1\p; + Link1\Hout -> Joint2\Hin; + Link1\Pin <= Joint2\Pout; + Link1\Pout => OneJunction1\p; + Link2\Hout -> Splitter2\input; + Link2\Pin <= OneJunction3\p; + Link3\Hout -> Base2\Hin; + Link3\Pin <= Base2\p; + Link3\Pout => OneJunction3\p; + Negate1\output -> PlusMinus4\plus; + Negate2\output -> PlusMinus5\plus; + OneJunction1\p <= Base3\p; + OneJunction17\flow -> Integrate1\input; + OneJunction3\p <= Base1\p; + OneJunction4\p => C4\p; + OneJunction4\p => R4\p; + OneJunction5\p => C3\p; + OneJunction5\p => R2\p; + OneJunction6\p => R3\p; + OneJunction7\p => R5\p; + PID2\output -> Submodel2\input; + PID3\output -> Submodel5\input; + PlusMinus4\output -> PID2\error; + PlusMinus5\output -> PID3\error; + PowerMux\input_pos3 <= OneJunction6\p; + PowerMux\input_rot2 <= OneJunction5\p; + PowerMux1\input <= OneJunction17\p; + PowerMux1\input_pos3 <= OneJunction7\p; + PowerMux1\input_rot2 <= OneJunction4\p; + R\p <= ZeroJunction7\p; + R1\p <= OneJunction17\p; + rectanglepath\output -> inverse_kinematics1\input; + Sf2\p => OneJunction2\p; + Splitter1\input <- Link\Hout; + Splitter1\output -> Link1\Hin; + Splitter2\output -> Base1\Hin; + Splitter2\output -> Link3\Hin; + Submodel2\p2 => ZeroJunction7\p; + Submodel5\p2 => OneJunction17\p; + Zero\output -> Joint1\Hin; + ZeroJunction7\p => PowerMux\input; + end; + implementation_end; +]]> + + + + + + + Experiment 1 + + + + 4.8 + + + + + + + + + + + + Base1\InertialTensor\state_initial + 6 + 1 + 0 0 0 0 0 0 + + + Base3\InertialTensor\state_initial + 6 + 1 + 0 0 0 0 0 0 + + + C1\state_initial + 3 + 1 + 0 0 0 + + + C2\state_initial + 3 + 1 + 0 0 0 + + + C3\state_initial + 2 + 1 + 0 0 + + + C4\state_initial + 2 + 1 + 0 0 + + + Joint1\Hmatrix\p_initial + 3 + 1 + 0 0 0 + + + Joint2\Hmatrix\p_initial + 3 + 1 + 0 0 0 + + + PID2\pdstate_initial + 0 + + + PID2\pistate_initial + 0 + + + PID3\pdstate_initial + 0 + + + PID3\pistate_initial + 0 + + + Base2\InertialTensor\p.e_initial + 6 + 1 + 0 0 0 0 0 0 + + + + + + time + Submodel3\body_position[1] + Submodel3\body_position[2] + Submodel3\body_position[3] + Submodel3\body_angle[1] + Submodel3\body_angle[2] + Submodel3\body_angle[3] + Submodel3\dimension[1] + Submodel3\dimension[2] + Submodel3\dimension[3] + Submodel4\dimension[1] + Submodel4\dimension[2] + Submodel4\dimension[3] + Submodel4\body_angle[1] + Submodel4\body_angle[2] + Submodel4\body_angle[3] + Submodel4\body_position[1] + Submodel4\body_position[2] + Submodel4\body_position[3] + new_joint1\position[1] + new_joint1\position[2] + new_joint1\position[3] + new_joint1\R[1,3] + new_joint1\R[2,3] + new_joint1\R[3,3] + new_joint1\R[1,2] + new_joint1\R[2,2] + new_joint1\R[3,2] + new_joint2\R[1,3] + new_joint2\R[2,3] + new_joint2\R[3,3] + new_joint2\R[1,2] + new_joint2\R[2,2] + new_joint2\R[3,2] + new_joint2\position[1] + new_joint2\position[2] + new_joint2\position[3] + PID2\error + PID3\error + new_joint3\position[3] + new_joint3\position[2] + rectanglepath\output[2] + rectanglepath\output[1] + + + + D3DPlot + + 3 + false + 16777215 + true + + 3D Animation + 137 + true + false + 4294967295 + Gradients\BlueWhite.png + true + 1.0 + 1.0 + + + + + 1 + + + 1 + + + 1 + + + true + Reference Frame + + + + + + Bryant + + false + false + false + false + false + false + + + + + 1 + + + 1 + + + 1 + + + false + Default Lights and Cameras + + + + + + Bryant + + false + false + false + false + false + false + + + false + Ambient + + + + + + 1 + + + + + 1 + + + Direct3D + + false + false + false + false + false + false + + + 0 + + + + 0.3 + + + 0.3 + + + 0.3 + + + + + + + 1 + + + 1 + + + 1 + + + true + + + + + 0.3 + + + 0.3 + + + 0.3 + + + + + + + 1 + + + 1 + + + 1 + + + true + + true + false + false + + + false + Parallel + + + -3 + + + 5 + + + 3 + + + + + + 0.457495710997814 + + + -0.762492851663023 + + + -0.457495710997814 + + + + + 0.235379601434674 + + + -0.392299335724456 + + + 0.889211827642101 + + + Direct3D + + false + false + false + false + false + false + + + 3 + + + + 0.5 + + + 0.5 + + + 0.5 + + + + + + + 1 + + + 1 + + + 1 + + + true + + + + 1.0 + + + 0.0 + + + 0.0 + + + + + + 0.5 + + + 0.5 + + + 0.5 + + + + + + + 1 + + + 1 + + + 1 + + + true + + + + + 0.5 + + + 0.5 + + + 0.5 + + + + + + + 1 + + + 1 + + + 1 + + + true + + false + true + true + + + false + Spot Light 1 + + + -3 + + + -5 + + + 1 + + + + + + 0.50709255283711 + + + 0.845154254728517 + + + -0.169030850945703 + + + + + 0.0869656553478673 + + + 0.144942758913112 + + + 0.985610760609162 + + + Direct3D + + false + false + false + false + false + false + + + 2 + + + + 0.5 + + + 0.5 + + + 0.5 + + + + + + + 1 + + + 1 + + + 1 + + + true + + + + 1.0 + + + 0.05 + + + 0.05 + + + + 1.0471975511965976 + + + 1.0471975511965976 + + 0.0 + + + + 0.5 + + + 0.5 + + + 0.5 + + + + + + + 1 + + + 1 + + + 1 + + + true + + + + + 0.5 + + + 0.5 + + + 0.5 + + + + + + + 1 + + + 1 + + + 1 + + + true + + false + true + true + + + false + Spot Light 2 + + + 2 + + + -3 + + + -1 + + + + + + -0.534522483824849 + + + 0.801783725737273 + + + 0.267261241912424 + + + + + 0.14824986333222 + + + -0.22237479499833 + + + 0.963624111659432 + + + Direct3D + + false + false + false + false + false + false + + + 2 + + + + 1 + + + 1 + + + 1 + + + + + + + 1 + + + 1 + + + 1 + + + true + + + + 1.0 + + + 0.05 + + + 0.05 + + + + 1.5707963267948966 + + + 1.5707963267948966 + + 0.0 + + + + 1 + + + 1 + + + 1 + + + + + + + 1 + + + 1 + + + 1 + + + true + + + + + 0.5 + + + 0.5 + + + 0.5 + + + + + + + 1 + + + 1 + + + 1 + + + true + + false + true + true + + + false + Camera Looking at Origin + + + 3.45165288156629 + + + 0.132202570606362 + + + 1.10375172903332 + + + + + + -0.951853185182918 + + + -0.0364571532071126 + + + -0.304378694781954 + + + + + -0.304155680683107 + + + -0.0116495384184135 + + + 0.952551106325972 + + + Direct3D + + false + false + false + false + false + false + + + 0.01 + 100.0 + true + 0.003926990816987242 + 45.0 + -10.0 + 10.0 + 10.0 + -10.0 + true + + + -9.99200722162641e-016 + + + 1.76247905159244e-015 + + + -3.05678199886544e-015 + + + true + + + 1 + + + true + true + true + + + false + Front(XY)-Camera + + + 10 + + + + + + -1 + + + + + 1 + + + Direct3D + + false + false + false + false + false + false + + + 0.01 + 100.0 + true + 9.999999999999998 + 45.0 + -9.999999999999998 + 9.999999999999998 + 9.999999999999998 + -9.999999999999998 + true + + + true + + + 1 + + + true + false + false + + + false + Side(YZ)-Camera + + + 10 + + + + + + -1 + + + + + 1 + + + Direct3D + + false + false + false + false + false + false + + + 0.01 + 100.0 + true + 9.999999999999998 + 45.0 + -9.999999999999998 + 9.999999999999998 + 9.999999999999998 + -9.999999999999998 + true + + + true + + + 1 + + + true + false + false + + + false + Top(XZ)-Camera + + + 10 + + + + + + -1 + + + + + 1 + + + Direct3D + + false + false + false + false + false + false + + + 0.01 + 100.0 + true + 9.999999999999998 + 45.0 + -9.999999999999998 + 9.999999999999998 + 9.999999999999998 + -9.999999999999998 + true + + + true + + + 1 + + + true + false + false + + + + + + + 1 + + + 1 + + + 1 + + + false + Scenery + + + + + + Bryant + + false + false + false + false + false + false + + + + + 10 + + + 10 + + + 10 + + + false + Reference Frame + + + + + + Bryant + + false + false + false + false + false + false + + +
Center
+ 1.0 + true + 4 + + + Submodel3\dimension[1] + 0.005 + + + Submodel3\dimension[2] + 0.065 + + + Submodel3\dimension[3] + 0.01 + + + true + + + 1 + + + 1 + + + 1 + + + 1.0 + + + 1 + + + 1 + + + 1 + + + + + true + + + 0.498039215686275 + + + 0.498039215686275 + + + 0.498039215686275 + + + + + + 14.298713684082 + + false + false + Block + + + Submodel3\body_position[1] + 0.0 + + + Submodel3\body_position[2] + -0.009158353632383561 + + + Submodel3\body_position[3] + 0.03118053280824738 + + + + + + Submodel3\body_angle[1] + 1.8564889888314844 + + + Submodel3\body_angle[2] + 0.0 + + + Submodel3\body_angle[3] + 0.0 + + + Euler + + false + false + false + false + false + false + + +
+ +
Center
+ 1.0 + true + 4 + + + Submodel4\dimension[1] + 0.005 + + + Submodel4\dimension[2] + 0.05 + + + Submodel4\dimension[3] + 0.01 + + + true + + + 1 + + + 1 + + + 1 + + + 1.0 + + + 1 + + + 1 + + + 1 + + + + + true + + + 0.5 + + + 0.5 + + + 0.5 + + + + + + 15 + + false + false + Block + + + Submodel4\body_position[1] + 0.0 + + + Submodel4\body_position[2] + 0.0013903741642251554 + + + Submodel4\body_position[3] + 0.07774345829579168 + + + + + + Submodel4\body_angle[1] + 0.66277054304191 + + + Submodel4\body_angle[2] + 0.0 + + + Submodel4\body_angle[3] + 0.0 + + + Euler + + false + false + false + false + false + false + + +
+
+ + + + + 10 + + + 10 + + + 10 + + + false + Reference Frame + + + 0.5 + + + + + + Bryant + + false + false + false + false + false + false + + +
Center
+ 1.0 + true + 4 + + + Submodel3\dimension[1] + 0.005 + + + Submodel3\dimension[2] + 0.065 + + + Submodel3\dimension[3] + 0.01 + + + true + + + 1 + + + 1 + + + 1 + + + 1.0 + + + 1 + + + 1 + + + 1 + + + + + true + + + 0.498039215686275 + + + 0.498039215686275 + + + 0.498039215686275 + + + + + + 14.298713684082 + + false + false + Block + + + new_joint1\position[1] + 0.0 + + + new_joint1\position[2] + -0.013912384738414135 + + + new_joint1\position[3] + 0.03060231153051999 + + + + + + new_joint1\R[1,3] + 0.0 + + + new_joint1\R[2,3] + -0.906373184815434 + + + new_joint1\R[3,3] + -0.4224779874118024 + + + + + new_joint1\R[1,2] + 0.0 + + + new_joint1\R[2,2] + -0.4224779874118024 + + + new_joint1\R[3,2] + 0.906373184815434 + + + Matrix + + false + false + false + false + false + false + + +
+ +
Center
+ 1.0 + true + 4 + + + Submodel4\dimension[1] + 0.005 + + + Submodel4\dimension[2] + 0.05 + + + Submodel4\dimension[3] + 0.01 + + + true + + + 1 + + + 1 + + + 1 + + + 1.0 + + + 1 + + + 1 + + + 1 + + + + + true + + + 0.5 + + + 0.5 + + + 0.5 + + + + + + 15 + + false + false + Block + + + new_joint2\position[1] + 0.0 + + + new_joint2\position[2] + -0.007082947566976128 + + + new_joint2\position[3] + 0.0476258741006878 + + + + + + new_joint2\R[1,3] + 0.0 + + + new_joint2\R[2,3] + 0.5291132430096096 + + + new_joint2\R[3,3] + 0.8485512218315721 + + + + + new_joint2\R[1,2] + 0.0 + + + new_joint2\R[2,2] + 0.8485512218315721 + + + new_joint2\R[3,2] + -0.5291132430096096 + + + Matrix + + false + false + false + false + false + false + + +
+
+ +
+ +
+ +
+
+ + GraphPlot + + 4 + false + 16777215 + true + + + true + 15780518 + 12624260 + 0 + 10 + 10 + 10 + false + + 16777215 + true + 1 + model(2) + true + + + Arial + 12 + 34 + 400 + 0 + 0 + 0 + 0 + + + Arial + 12 + 34 + 400 + 0 + 0 + 0 + 0 + + + Arial + 10 + 34 + 400 + 0 + 0 + 0 + 0 + + + Arial + 12 + 34 + 400 + 0 + 0 + 0 + 0 + + + true + true + false + + + -0.04000000000000001 + 0.15999999999999998 + true + 1 + + + + + + -0.010000000000000009 + 0.09 + true + 1 + + + + -0.01 + 0.09 + true + 1 + + + + + + + + 3355111 + 1 + 3355111 + 0 + true + 1 + 1 + 1 + true + + true + new_joint3\position[2] + + + true + new_joint3\position[3] + + + + 6076255 + 1 + 6076255 + 0 + true + 1 + 1 + 1 + true + + true + rectanglepath\output[1] + + + true + rectanglepath\output[2] + + + + + true + 0 + 16777215 + + + + GraphPlot + + 5 + false + 16777215 + true + + + true + 15780518 + 12624260 + 0 + 10 + 10 + 10 + false + + 16777215 + true + 1 + Plot + true + + + Arial + 12 + 34 + 400 + 0 + 0 + 0 + 0 + + + Arial + 12 + 34 + 400 + 0 + 0 + 0 + 0 + + + Arial + 10 + 34 + 400 + 0 + 0 + 0 + 0 + + + Arial + 12 + 34 + 400 + 0 + 0 + 0 + 0 + + + true + true + false + + + 0.0 + 10.0 + true + 3 + + + + + + -5.0 + 5.0 + true + 2 + + + + -1885.20460252739 + 0.0 + true + 2 + + + + + + + + 3355111 + 1 + 3355111 + 0 + true + 1 + 1 + 1 + true + + true + time + + + true + PID2\error + + + + 6076255 + 1 + 6076255 + 0 + true + 1 + 1 + 1 + true + + true + time + + + true + PID3\error + + + + + true + 0 + 16777215 + + +
+ + + 1 + true + Window 1 + 0 + + 4 + + Base + + + 2 + true + Window 2 + 0 + + 3 + + Base + + + 3 + true + Window 3 + 0 + + 5 + + Base + + + + +-0.00208333 0.00462963 1.00208 1.0037 + + +0.138021 0.169444 0.777604 0.862963 + + +0.526042 0.287963 0.922396 0.725926 + + +
+ + + 0.0 + 10.0 + false + false + false + false + 0.1 + 1.0e-6 + 1.0e-7 + false + true + + + + Euler + 0.01 + false + + + BackwardEuler + 1.0e-5 + 1.0e-5 + 1.0e-5 + 1.0e-5 + 0.01 + 1.0 + + + AdamsBashforth + 0.01 + false + + + RungeKutta2 + 0.01 + false + + + RungeKutta4 + 0.01 + false + + + RungeKutta8 + false + 0.0 + false + 0.0 + 1.0e-6 + 1.0e-6 + 0.9 + 0.33 + 6.0 + 0.0 + false + 100000 + false + 1000 + + + RungeKuttaFehlberg + false + 0.0 + false + 0.0 + 1.0e-6 + 1.0e-6 + + + VodeAdams + false + 0.0 + false + 0.0 + 1.0e-6 + 1.0e-6 + true + true + + + BDFMethod + 1.0e-5 + 1.0e-5 + 1.0e-5 + 1.0e-5 + false + 0.0 + false + 0.0 + + + MeBDFiMethod + 1.0e-5 + 1.0e-5 + 1.0e-5 + 1.0e-5 + false + 0.0 + false + 0.0 + + 8 + + + + 10 + false + true + true + false + true + 0 + 0.0 + true + MultipleRun + true + + UseEndValue + 0.001 + BroydonFletcherGoldfarbShanno + + + + + true + true + true + true + + + false + + + + + + + +
+
+
+