<?xml version="1.0" encoding="UTF-8"?>
<Document>
 <Model version="4.8" build="4.8.2.10124">
  <Sidops><![CDATA[model 128 184
 description '<Information>
 <Description>
    <Version>4.8</Version>
<IsMainModel>0</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>C:\users\wouter\My Documents\studie\ma\mahd\implementation\SCARA\07_marker_height\arm_model.emx</LibraryPath>
  <TimeStamp>2020-7-27 16:14:10</TimeStamp>
<AllowLibraryUpdate>True</AllowLibraryUpdate>
 </Description>
</Information>';
 type 'Mainmodel-v2'
 end;
 implementation bg
  submodels
   Body1 472 336
    description '<Description><Version>4.0</Version>
   <LibraryPath>Template\Submodel-Equation.emx</LibraryPath>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
   <TimeStamp>2007-11-1 22:32:1</TimeStamp>
   <AllowLibraryUpdate>False</AllowLibraryUpdate>
</Description>';
    type 'Submodel-Equation'
     ports
      signal in input [4,4];
    end;
    implementation eq
parameters
	real dimension[3] = [0.0048;0.009;0.065] {m};
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;
   Body2 360 512
    description '<Description><Version>4.0</Version>
   <LibraryPath>Template\Submodel-Equation.emx</LibraryPath>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
   <TimeStamp>2007-11-1 22:32:1</TimeStamp>
   <AllowLibraryUpdate>False</AllowLibraryUpdate>
</Description>';
    type 'Submodel-Equation'
     ports
      signal in input [4,4];
    end;
    implementation eq
parameters
	real dimension[3] = [0.005;0.025;0.01] {m};
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;
   Body3 104 312
    description '<Description><Version>4.0</Version>
   <LibraryPath>Template\Submodel-Equation.emx</LibraryPath>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
   <TimeStamp>2007-11-1 22:32:1</TimeStamp>
   <AllowLibraryUpdate>False</AllowLibraryUpdate>
</Description>';
    type 'Submodel-Equation'
     ports
      signal in input [4,4];
    end;
    implementation eq
parameters
	real dimension[3] = [0.0045;0.01;0.065] {m};
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;
   Body4 480 64
    description '<Description><Version>4.0</Version>
   <LibraryPath>Template\Submodel-Equation.emx</LibraryPath>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
   <TimeStamp>2007-11-1 22:32:1</TimeStamp>
   <AllowLibraryUpdate>False</AllowLibraryUpdate>
</Description>';
    type 'Submodel-Equation'
     ports
      signal in input [4,4];
    end;
    implementation eq
parameters
	real dimension[3] = [0.005;0.05;0.01] {m};
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;
   Body5 992 48
    description '<Description><Version>4.0</Version>
   <LibraryPath>Template\Submodel-Equation.emx</LibraryPath>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
   <TimeStamp>2007-11-1 22:32:1</TimeStamp>
   <AllowLibraryUpdate>False</AllowLibraryUpdate>
</Description>';
    type 'Submodel-Equation'
     ports
      signal in input [4,4];
    end;
    implementation eq
parameters
	real dimension[3] = [0.005;0.025;0.01] {m};
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;
   Body6 1416 184
    description '<Description><Version>4.0</Version>
   <LibraryPath>Template\Submodel-Equation.emx</LibraryPath>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
   <TimeStamp>2007-11-1 22:32:1</TimeStamp>
   <AllowLibraryUpdate>False</AllowLibraryUpdate>
</Description>';
    type 'Submodel-Equation'
     ports
      signal in input [4,4];
    end;
    implementation eq
parameters
	real dimension[3] = [0.005;0.025;0.01] {m};
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;
   COM_body1 624 352
    description '<Information><Description><Version>4.8</Version><IsMainModel>1</IsMainModel><LibraryPath>Bond Graph\MR\center_of_mass_v2.emx</LibraryPath><TimeStamp>2020-7-21 12:24:38</TimeStamp></Description><Attributes><GlobalRelations>parameters
	real I [3,1] = [1.6399999999999998e-6; 4.7e-8; 1.61e-6] {N.m.s};
	real m = 0.00455 {kg};</GlobalRelations></Attributes></Information>';
    type Submodel
     ports
      signal in Hin [4,4];
      signal out Hout [4,4];
      power out p [6,1];
    end;
    icon bg bottom
     figures
      rectangle 608 320 640 384 color 0 fill 139;
      text 'COM' 624 352 color 0 'Clear Sans' 16;
     terminals
      Hin 608 336 fixed;
      p 608 368 fixed;
    end;
    implementation bg
     submodels
      AdHi0 544 400
       description '<Information><Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues><LibraryPath></LibraryPath><TimeStamp>2007-9-25 12:3:3</TimeStamp><AllowLibraryUpdate>True</AllowLibraryUpdate></Description></Information>';
       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 '<Information><Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues><LibraryPath></LibraryPath><TimeStamp>2007-10-31 11:43:6</TimeStamp><AllowLibraryUpdate>True</AllowLibraryUpdate></Description></Information>';
       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 624 400
       description '<Information><Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues><LibraryPath></LibraryPath><TimeStamp>2007-9-25 12:3:26</TimeStamp><AllowLibraryUpdate>True</AllowLibraryUpdate></Description></Information>';
       type Se
        ports
         power out p [6,1];
        restrictions
         causality fixed out p;
       end;
       icon bg bottom
        figures
         text 'Se' 624 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 272
       description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\3D\I-3.emx</LibraryPath>
  <TimeStamp>2007-9-25 12:12:14</TimeStamp>
</Description>';
       type 'I-3'
        ports
         power in p [6,1];
         signal out state [6,1];
        restrictions
         causality preferred in p;
       end;
       icon bg bottom
        figures
         text 'I' 544 272 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 433.4 496;
      plug Hout 691.2 496;
      plug p 439.4 336;
      Splitter1 544 496
       description '<Description><Version>4.0</Version>
   <LibraryPath>Signal\Block Diagram\Splitter.emx</LibraryPath>
  <TimeStamp>2008-01-17 11:28:29</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
       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 '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
 <TimeStamp>2007-9-27 9:51:18</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
   <Description></Description>
</Description>';
       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;
      ZeroJunction1 504 336
       description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\ZeroJunction.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:45:16</TimeStamp>
</Description>
</Information>';
       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
        figures
         text '0' 504 336 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
      AdHi0\p2 => Ta0j\p;
      Gravity\p => AdHi0\p1;
      Hin -> Splitter1\input;
      Splitter1\output -> AdHi0\H;
      Splitter1\output -> Hout;
      Ta0j\p => EJS\p1;
      Ta0j\p => InertialTensor\p;
      ZeroJunction1\p => p;
      ZeroJunction1\p => Ta0j\p;
     end;
    implementation_end;
   COM_body2 344 672
    description '<Information><Description><Version>4.8</Version><IsMainModel>1</IsMainModel><LibraryPath>Bond Graph\MR\center_of_mass_v2.emx</LibraryPath><TimeStamp>2020-7-21 12:24:38</TimeStamp></Description><Attributes><GlobalRelations>parameters
	real density = 1400 {kg/m3};
	real dimension[3] = [0.005;0.025;0.01] {m};
variables
	real I[3,1] {N.m.s};
	real m {kg}; 
initialequations
	m = dimension[1] *  dimension[2] * dimension[3] * density;
	I[1] = m/12 * ( dimension[2]^2 + dimension[3]^2);
	I[2] = m/12 * ( dimension[1]^2 + dimension[3]^2);
	I[3] = m/12 * ( dimension[1]^2 + dimension[2]^2);</GlobalRelations></Attributes></Information>';
    type Submodel
     ports
      signal in Hin [4,4];
      signal out Hout [4,4];
      power out p [6,1];
    end;
    icon bg bottom
     figures
      rectangle 312 656 376 688 color 0 fill 139;
      text 'COM' 344 672 color 0 'Clear Sans' 16;
     terminals
      Hin 360 656 fixed;
      p 328 656 fixed;
    end;
    implementation bg
     submodels
      AdHi0 544 400
       description '<Information><Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues><LibraryPath></LibraryPath><TimeStamp>2007-9-25 12:3:3</TimeStamp><AllowLibraryUpdate>True</AllowLibraryUpdate></Description></Information>';
       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 624 336
       description '<Information><Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues><LibraryPath></LibraryPath><TimeStamp>2007-10-31 11:43:6</TimeStamp><AllowLibraryUpdate>True</AllowLibraryUpdate></Description></Information>';
       type MGY
        ports
         power in p1 [6,1];
       end;
       icon bg top
        figures
         text 'MGY' 624 336 color 0 18 bold;
       end;
       implementation eq
//EJS / Gyroscopic effects
variables
	real global I[3];
	real global m;
	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 624 400
       description '<Information><Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues><LibraryPath></LibraryPath><TimeStamp>2007-9-25 12:3:26</TimeStamp><AllowLibraryUpdate>True</AllowLibraryUpdate></Description></Information>';
       type Se
        ports
         power out p [6,1];
        restrictions
         causality fixed out p;
       end;
       icon bg bottom
        figures
         text 'Se' 624 400 color 0 18 bold;
       end;
       implementation eq
variables
	real global m;
	real effort[6];
equations
	effort = [0;0;0;0;0;-g_n*m];
	p.e = effort;
implementation_end;
      InertialTensor 544 256
       description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\3D\I-3.emx</LibraryPath>
  <TimeStamp>2007-9-25 12:12:14</TimeStamp>
</Description>';
       type 'I-3'
        ports
         power in p [6,1];
         signal out state [6,1];
        restrictions
         causality preferred in p;
       end;
       icon bg bottom
        figures
         text 'I' 544 256 color 0 18 bold;
       end;
       implementation eq
variables
	real global I[3];
	real global m;
	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 433.4 496;
      plug Hout 691.2 496;
      plug p 439.4 336;
      Splitter1 544 496
       description '<Description><Version>4.0</Version>
   <LibraryPath>Signal\Block Diagram\Splitter.emx</LibraryPath>
  <TimeStamp>2008-01-17 11:28:29</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
       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 '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
 <TimeStamp>2007-9-27 9:51:18</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
   <Description></Description>
</Description>';
       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;
      ZeroJunction1 504 336
       description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\ZeroJunction.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:45:16</TimeStamp>
</Description>
</Information>';
       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
        figures
         text '0' 504 336 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
      AdHi0\p2 => Ta0j\p;
      Gravity\p => AdHi0\p1;
      Hin -> Splitter1\input;
      Splitter1\output -> AdHi0\H;
      Splitter1\output -> Hout;
      Ta0j\p => EJS\p1;
      Ta0j\p => InertialTensor\p;
      ZeroJunction1\p => p;
      ZeroJunction1\p => Ta0j\p;
     end;
    implementation_end;
   COM_body3 272 328
    description '<Information><Description><Version>4.8</Version><IsMainModel>1</IsMainModel><LibraryPath>Bond Graph\MR\center_of_mass_v2.emx</LibraryPath><TimeStamp>2020-7-21 12:24:38</TimeStamp></Description><Attributes><GlobalRelations>parameters
	real I [3,1] = [1.6399999999999998e-6; 4.7e-8; 1.61e-6] {N.m.s};
	real m = 0.00455 {kg};</GlobalRelations></Attributes></Information>';
    type Submodel
     ports
      signal in Hin [4,4];
      signal out Hout [4,4];
      power out p [6,1];
    end;
    icon bg bottom
     figures
      rectangle 256 296 288 360 color 0 fill 139;
      text 'COM' 272 328 color 0 'Clear Sans' 16;
     terminals
      Hin 256 312 fixed;
      p 256 344 fixed;
    end;
    implementation bg
     submodels
      AdHi0 544 400
       description '<Information><Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues><LibraryPath></LibraryPath><TimeStamp>2007-9-25 12:3:3</TimeStamp><AllowLibraryUpdate>True</AllowLibraryUpdate></Description></Information>';
       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 '<Information><Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues><LibraryPath></LibraryPath><TimeStamp>2007-10-31 11:43:6</TimeStamp><AllowLibraryUpdate>True</AllowLibraryUpdate></Description></Information>';
       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 624 400
       description '<Information><Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues><LibraryPath></LibraryPath><TimeStamp>2007-9-25 12:3:26</TimeStamp><AllowLibraryUpdate>True</AllowLibraryUpdate></Description></Information>';
       type Se
        ports
         power out p [6,1];
        restrictions
         causality fixed out p;
       end;
       icon bg bottom
        figures
         text 'Se' 624 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 272
       description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\3D\I-3.emx</LibraryPath>
  <TimeStamp>2007-9-25 12:12:14</TimeStamp>
</Description>';
       type 'I-3'
        ports
         power in p [6,1];
         signal out state [6,1];
        restrictions
         causality preferred in p;
       end;
       icon bg bottom
        figures
         text 'I' 544 272 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 433.4 496;
      plug Hout 691.2 496;
      plug p 439.4 336;
      Splitter1 544 496
       description '<Description><Version>4.0</Version>
   <LibraryPath>Signal\Block Diagram\Splitter.emx</LibraryPath>
  <TimeStamp>2008-01-17 11:28:29</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
       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 '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
 <TimeStamp>2007-9-27 9:51:18</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
   <Description></Description>
</Description>';
       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;
      ZeroJunction1 504 336
       description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\ZeroJunction.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:45:16</TimeStamp>
</Description>
</Information>';
       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
        figures
         text '0' 504 336 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
      AdHi0\p2 => Ta0j\p;
      Gravity\p => AdHi0\p1;
      Hin -> Splitter1\input;
      Splitter1\output -> AdHi0\H;
      Splitter1\output -> Hout;
      Ta0j\p => EJS\p1;
      Ta0j\p => InertialTensor\p;
      ZeroJunction1\p => p;
      ZeroJunction1\p => Ta0j\p;
     end;
    implementation_end;
   COM_body4 712 48
    description '<Information><Description><Version>4.8</Version><IsMainModel>1</IsMainModel><LibraryPath>Bond Graph\MR\center_of_mass_v2.emx</LibraryPath><TimeStamp>2020-7-21 12:24:38</TimeStamp></Description><Attributes><GlobalRelations>parameters
	real density = 1400 {kg/m3};
	real dimension[3] = [0.005;0.075;0.01] {m};
	real servoweight = 5 {g};
variables
	real I[3,1] {N.m.s};
	real m {kg};
	real mass;
initialequations
	mass = dimension[1] *  dimension[2] * dimension[3] * density;
	I[1] = mass/12 * ( dimension[2]^2 + dimension[3]^2);
	I[2] = mass/12 * ( dimension[1]^2 + dimension[3]^2);
	I[3] = mass/12 * ( dimension[1]^2 + dimension[2]^2);
	m = mass + servoweight;</GlobalRelations></Attributes></Information>';
    type Submodel
     ports
      signal in Hin [4,4];
      signal out Hout [4,4];
      power out p [6,1];
    end;
    icon bg bottom
     figures
      rectangle 680 32 744 64 color 0 fill 139;
      text 'COM' 712 48 color 0 'Clear Sans' 16;
     terminals
      Hin 728 64 fixed;
      p 696 64 fixed;
    end;
    implementation bg
     submodels
      AdHi0 544 400
       description '<Information><Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues><LibraryPath></LibraryPath><TimeStamp>2007-9-25 12:3:3</TimeStamp><AllowLibraryUpdate>True</AllowLibraryUpdate></Description></Information>';
       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 624 336
       description '<Information><Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues><LibraryPath></LibraryPath><TimeStamp>2007-10-31 11:43:6</TimeStamp><AllowLibraryUpdate>True</AllowLibraryUpdate></Description></Information>';
       type MGY
        ports
         power in p1 [6,1];
       end;
       icon bg top
        figures
         text 'MGY' 624 336 color 0 18 bold;
       end;
       implementation eq
//EJS / Gyroscopic effects
variables
	real global I[3];
	real global m;
	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 624 400
       description '<Information><Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues><LibraryPath></LibraryPath><TimeStamp>2007-9-25 12:3:26</TimeStamp><AllowLibraryUpdate>True</AllowLibraryUpdate></Description></Information>';
       type Se
        ports
         power out p [6,1];
        restrictions
         causality fixed out p;
       end;
       icon bg bottom
        figures
         text 'Se' 624 400 color 0 18 bold;
       end;
       implementation eq
variables
	real global m;
	real effort[6];
equations
	effort = [0;0;0;0;0;-g_n*m];
	p.e = effort;
implementation_end;
      InertialTensor 544 256
       description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\3D\I-3.emx</LibraryPath>
  <TimeStamp>2007-9-25 12:12:14</TimeStamp>
</Description>';
       type 'I-3'
        ports
         power in p [6,1];
         signal out state [6,1];
        restrictions
         causality preferred in p;
       end;
       icon bg bottom
        figures
         text 'I' 544 256 color 0 18 bold;
       end;
       implementation eq
variables
	real global I[3];
	real global m;
	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 433.4 496;
      plug Hout 691.2 496;
      plug p 439.4 336;
      Splitter1 544 496
       description '<Description><Version>4.0</Version>
   <LibraryPath>Signal\Block Diagram\Splitter.emx</LibraryPath>
  <TimeStamp>2008-01-17 11:28:29</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
       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 '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
 <TimeStamp>2007-9-27 9:51:18</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
   <Description></Description>
</Description>';
       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;
      ZeroJunction1 504 336
       description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\ZeroJunction.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:45:16</TimeStamp>
</Description>
</Information>';
       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
        figures
         text '0' 504 336 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
      AdHi0\p2 => Ta0j\p;
      Gravity\p => AdHi0\p1;
      Hin -> Splitter1\input;
      Splitter1\output -> AdHi0\H;
      Splitter1\output -> Hout;
      Ta0j\p => EJS\p1;
      Ta0j\p => InertialTensor\p;
      ZeroJunction1\p => p;
      ZeroJunction1\p => Ta0j\p;
     end;
    implementation_end;
   COM_body5 1472 128
    description '<Information><Description><Version>4.8</Version><IsMainModel>1</IsMainModel><LibraryPath>Bond Graph\MR\center_of_mass_v2.emx</LibraryPath><TimeStamp>2020-7-21 12:24:38</TimeStamp></Description><Attributes><GlobalRelations>parameters
	real I [3,1] = [0.018;0.159;0.159] {mN.m.s};
	real m = 0.015 {kg};</GlobalRelations></Attributes></Information>';
    type Submodel
     ports
      signal in Hin [4,4];
      signal out Hout [4,4];
      power out p [6,1];
    end;
    icon bg bottom
     figures
      rectangle 1456 96 1488 160 color 0 fill 139;
      text 'COM' 1472 128 color 0 'Clear Sans' 16;
     terminals
      Hin 1456 144 fixed;
      p 1456 112 fixed;
    end;
    implementation bg
     submodels
      AdHi0 544 400
       description '<Information><Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues><LibraryPath></LibraryPath><TimeStamp>2007-9-25 12:3:3</TimeStamp><AllowLibraryUpdate>True</AllowLibraryUpdate></Description></Information>';
       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 '<Information><Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues><LibraryPath></LibraryPath><TimeStamp>2007-10-31 11:43:6</TimeStamp><AllowLibraryUpdate>True</AllowLibraryUpdate></Description></Information>';
       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 624 400
       description '<Information><Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues><LibraryPath></LibraryPath><TimeStamp>2007-9-25 12:3:26</TimeStamp><AllowLibraryUpdate>True</AllowLibraryUpdate></Description></Information>';
       type Se
        ports
         power out p [6,1];
        restrictions
         causality fixed out p;
       end;
       icon bg bottom
        figures
         text 'Se' 624 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 272
       description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\3D\I-3.emx</LibraryPath>
  <TimeStamp>2007-9-25 12:12:14</TimeStamp>
</Description>';
       type 'I-3'
        ports
         power in p [6,1];
         signal out state [6,1];
        restrictions
         causality preferred in p;
       end;
       icon bg bottom
        figures
         text 'I' 544 272 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 433.4 496;
      plug Hout 691.2 496;
      plug p 439.4 336;
      Splitter1 544 496
       description '<Description><Version>4.0</Version>
   <LibraryPath>Signal\Block Diagram\Splitter.emx</LibraryPath>
  <TimeStamp>2008-01-17 11:28:29</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
       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 '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
 <TimeStamp>2007-9-27 9:51:18</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
   <Description></Description>
</Description>';
       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;
      ZeroJunction1 504 336
       description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\ZeroJunction.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:45:16</TimeStamp>
</Description>
</Information>';
       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
        figures
         text '0' 504 336 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
      AdHi0\p2 => Ta0j\p;
      Gravity\p => AdHi0\p1;
      Hin -> Splitter1\input;
      Splitter1\output -> AdHi0\H;
      Splitter1\output -> Hout;
      Ta0j\p => EJS\p1;
      Ta0j\p => InertialTensor\p;
      ZeroJunction1\p => p;
      ZeroJunction1\p => Ta0j\p;
     end;
    implementation_end;
   Ground1 564 647.5
    description '<Information>
 <Description>
    <Version>4.8</Version>
<IsMainModel>1</IsMainModel>
    <LibraryPath>Bond Graph\MR\Ground.emx</LibraryPath>
  <TimeStamp>2020-7-23 09:30:51</TimeStamp>
</Description>
</Information>';
    type Submodel
     ports
      power in p [6,1];
      signal out output [4,4];
    end;
    icon bg bottom
     figures
      line 528 640 544 656 color 0 fill 15132390;
      line 536 640 552 656 color 0 fill 15132390;
      line 520 640 536 656 color 0 fill 15132390;
      line 560 656 544 640 color 0 fill 15132390;
      line 568 656 552 640 color 0 fill 15132390;
      line 576 656 560 640 color 0 fill 15132390;
      line 592 656 576 640 color 0 fill 15132390;
      line 584 656 568 640 color 0 fill 15132390;
      line 600 656 584 640 color 0 fill 15132390;
      line 608 656 592 640 color 0 fill 15132390;
      line 520 640 608 640 color 0 fill 15132390 width 2;
      line 600 640 608 648 color 0 fill 15132390;
      line 520 648 528 656 color 0 fill 15132390;
     terminals
      p 544 640 fixed;
      output 576 640 fixed;
    end;
    implementation bg
     submodels
      plug p 240 88;
      plug output 240 120;
      OneJunction2 192 88
       description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:17:51</TimeStamp>
</Description>
</Information>';
       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' 192 88 color 0 18 bold;
       end;
       implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
      Sf2 136 88
       description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\2D\Sf-2.emx</LibraryPath>
  <TimeStamp>2007-9-25 12:7:5</TimeStamp>
</Description>';
       type 'Sf-2'
        ports
         power out p [6,1];
        restrictions
         causality fixed in p;
       end;
       icon bg bottom
        figures
         text 'Sf' 136 88 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;
      Zero 144 120
       description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
  <LibraryPath>Signal\Sources\Zero.emx</LibraryPath>
  <TimeStamp>2007-9-27 15:54:36</TimeStamp>
</Description>
';
       type Zero
        ports
         signal out output [4,4];
       end;
       icon bg bottom
        figures
         rectangle 128.1 104 159.9 136 color 0 fill 15132390;
         text '0' 144 120 color 16711680 18 bold;
       end;
       implementation eq
equations
	output = eye(4);implementation_end;
     end;
     connections
      p => OneJunction2\p;
      Sf2\p => OneJunction2\p;
      Zero\output -> output;
     end;
    implementation_end;
   inverse_kinematics 712 752
    description '<Information>
 <Description>
    <Version>4.8</Version>
  <LibraryPath>SCARA\inverse_kinematics_v1.emx</LibraryPath>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <TimeStamp>2020-7-10 12:26:18</TimeStamp>
<AllowLibraryUpdate>False</AllowLibraryUpdate>
 </Description>
</Information>';
    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} ;
    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.
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;
	angle2 =  angle1 - pi * to_rad + c;
	
	

 implementation_end;
   JointA 560 512
    description '<Information>
 <Description>
    <Version>4.8</Version>
<IsMainModel>1</IsMainModel>
    <LibraryPath>Bond Graph\MR\joint-v3.emx</LibraryPath>
  <TimeStamp>2020-7-21 12:08:53</TimeStamp>
</Description>
</Information>';
    type 'Submodel-v3'
     ports
      power in Pin [6,1];
      power in Pdiff [6,1];
      signal in Hin [4,4];
      signal out Hout [4,4];
      signal out Hdiff [4,4];
      power out Pout [6,1];
    end;
    icon bg bottom
     figures
      rectangle 528 488 592 536 color 0 fill 14745599;
      text 'Joint' 560 512 color 0 'Clear Sans' 16;
     terminals
      Pin 544 536 fixed;
      Hin 576 488 fixed;
      Hout 576 536 fixed;
      Pout 544 488 fixed;
    end;
    implementation bg
     submodels
      AdHji 424 424
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\MTF.emx</LibraryPath>
 <TimeStamp>2007-9-25 12:3:3</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       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 184 311.9
       description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\FlowSensor.emx</LibraryPath>
  <TimeStamp>2011-11-29 15:50:53</TimeStamp>
</Description>
</Information>';
       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 177.1 304.8 190.9 319.1 color 0 fill 16777215;
         text 'f' 184 311.2 color 0;
       end;
       implementation eq
equations
	p2.f = p1.f;
	p1.e = p2.e;
	flow = p1.f;
implementation_end;
      Hmatrix 256 312
       description '<Information><Description><Version>4.0</Version><LibraryPath>Template\Submodel-Equation.emx</LibraryPath><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues><TimeStamp>2007-11-1 22:32:1</TimeStamp><AllowLibraryUpdate>False</AllowLibraryUpdate></Description></Information>';
       type 'Submodel-Equation'
        ports
         signal in flow [6,1];
         signal out H [4,4];
       end;
       icon bg
        figures
         rectangle 224 296 288 328 color 0 fill 15132390;
         text 'name' 256 312 color 0 'Clear Sans' 16;
       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
	real dq[4];
	real Wb[3,4];
equations
	dq = transpose(Wb) * flow[1:3] ./ 2;
	q = int(dq,init);
	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]];
	Wb = [	-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 '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Signal\Block Diagram\Gain.emx</LibraryPath>
 <TimeStamp>2007-9-26 12:15:12</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       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 Pin 492.1 424;
      plug Pdiff 184 225;
      plug Hin 130.8 576;
      plug Hout 478.4 576;
      plug Hdiff 320 222;
      plug Pout 134.7 424;
      Splitter2 320 312
       description '<Description><Version>4.0</Version>
   <LibraryPath>Signal\Block Diagram\Splitter.emx</LibraryPath>
  <TimeStamp>2008-01-17 11:28:29</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
       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 184 424
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\ZeroJunction.emx</LibraryPath>
 <TimeStamp>2007-9-27 9:51:43</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       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' 184 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 -> Hdiff;
      Splitter2\output -> MatrixMul\input1;
      Wbai\p <= AdHji\p1;
      Wbai\p => Pout;
     end;
    implementation_end;
   JointB 560 192
    description '<Information>
 <Description>
    <Version>4.8</Version>
<IsMainModel>1</IsMainModel>
    <LibraryPath>Bond Graph\MR\joint-v3.emx</LibraryPath>
  <TimeStamp>2020-7-21 12:08:53</TimeStamp>
</Description>
</Information>';
    type 'Submodel-v3'
     ports
      power in Pin [6,1];
      power in Pdiff [6,1];
      signal in Hin [4,4];
      signal out Hout [4,4];
      signal out Hdiff [4,4];
      power out Pout [6,1];
    end;
    icon bg bottom
     figures
      rectangle 528 168 592 216 color 0 fill 14745599;
      text 'Joint' 560 192 color 0 'Clear Sans' 16;
     terminals
      Pin 544 216 fixed;
      Hin 576 168 fixed;
      Hout 576 216 fixed;
      Pout 544 168 fixed;
    end;
    implementation bg
     submodels
      AdHji 424 424
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\MTF.emx</LibraryPath>
 <TimeStamp>2007-9-25 12:3:3</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       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 184 311.9
       description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\FlowSensor.emx</LibraryPath>
  <TimeStamp>2011-11-29 15:50:53</TimeStamp>
</Description>
</Information>';
       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 177.1 304.8 190.9 319.1 color 0 fill 16777215;
         text 'f' 184 311.2 color 0;
       end;
       implementation eq
equations
	p2.f = p1.f;
	p1.e = p2.e;
	flow = p1.f;
implementation_end;
      Hmatrix 256 312
       description '<Information><Description><Version>4.0</Version><LibraryPath>Template\Submodel-Equation.emx</LibraryPath><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues><TimeStamp>2007-11-1 22:32:1</TimeStamp><AllowLibraryUpdate>False</AllowLibraryUpdate></Description></Information>';
       type 'Submodel-Equation'
        ports
         signal in flow [6,1];
         signal out H [4,4];
       end;
       icon bg
        figures
         rectangle 224 296 288 328 color 0 fill 15132390;
         text 'name' 256 312 color 0 'Clear Sans' 16;
       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
	real dq[4];
	real Wb[3,4];
equations
	dq = transpose(Wb) * flow[1:3] ./ 2;
	q = int(dq,init);
	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]];
	Wb = [	-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 '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Signal\Block Diagram\Gain.emx</LibraryPath>
 <TimeStamp>2007-9-26 12:15:12</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       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 Pin 492.1 424;
      plug Pdiff 184 225;
      plug Hin 130.8 576;
      plug Hout 478.4 576;
      plug Hdiff 320 222;
      plug Pout 134.7 424;
      Splitter2 320 312
       description '<Description><Version>4.0</Version>
   <LibraryPath>Signal\Block Diagram\Splitter.emx</LibraryPath>
  <TimeStamp>2008-01-17 11:28:29</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
       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 184 424
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\ZeroJunction.emx</LibraryPath>
 <TimeStamp>2007-9-27 9:51:43</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       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' 184 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 -> Hdiff;
      Splitter2\output -> MatrixMul\input1;
      Wbai\p <= AdHji\p1;
      Wbai\p => Pout;
     end;
    implementation_end;
   JointC 480 584
    description '<Information>
 <Description>
    <Version>4.8</Version>
<IsMainModel>1</IsMainModel>
    <LibraryPath>Bond Graph\MR\joint-v3.emx</LibraryPath>
  <TimeStamp>2020-7-21 12:08:53</TimeStamp>
</Description>
</Information>';
    type 'Submodel-v3'
     ports
      power in Pin [6,1];
      power in Pdiff [6,1];
      signal in Hin [4,4];
      signal out Hout [4,4];
      signal out Hdiff [4,4];
      power out Pout [6,1];
    end;
    icon bg bottom
     figures
      rectangle 456 552 504 616 color 0 fill 14745599;
      text 'Joint' 480 584 color 0 'Clear Sans' 16;
     terminals
      Pin 456 600 fixed;
      Hin 504 568 fixed;
      Hout 456 568 fixed;
      Pout 504 600 fixed;
    end;
    implementation bg
     submodels
      AdHji 424 424
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\MTF.emx</LibraryPath>
 <TimeStamp>2007-9-25 12:3:3</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       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 184 311.9
       description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\FlowSensor.emx</LibraryPath>
  <TimeStamp>2011-11-29 15:50:53</TimeStamp>
</Description>
</Information>';
       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 177.1 304.8 190.9 319.1 color 0 fill 16777215;
         text 'f' 184 311.2 color 0;
       end;
       implementation eq
equations
	p2.f = p1.f;
	p1.e = p2.e;
	flow = p1.f;
implementation_end;
      Hmatrix 256 312
       description '<Information><Description><Version>4.0</Version><LibraryPath>Template\Submodel-Equation.emx</LibraryPath><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues><TimeStamp>2007-11-1 22:32:1</TimeStamp><AllowLibraryUpdate>False</AllowLibraryUpdate></Description></Information>';
       type 'Submodel-Equation'
        ports
         signal in flow [6,1];
         signal out H [4,4];
       end;
       icon bg
        figures
         rectangle 224 296 288 328 color 0 fill 15132390;
         text 'name' 256 312 color 0 'Clear Sans' 16;
       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
	real dq[4];
	real Wb[3,4];
equations
	dq = transpose(Wb) * flow[1:3] ./ 2;
	q = int(dq,init);
	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]];
	Wb = [	-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 '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Signal\Block Diagram\Gain.emx</LibraryPath>
 <TimeStamp>2007-9-26 12:15:12</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       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 Pin 492.1 424;
      plug Pdiff 184 225;
      plug Hin 130.8 576;
      plug Hout 478.4 576;
      plug Hdiff 320 222;
      plug Pout 134.7 424;
      Splitter2 320 312
       description '<Description><Version>4.0</Version>
   <LibraryPath>Signal\Block Diagram\Splitter.emx</LibraryPath>
  <TimeStamp>2008-01-17 11:28:29</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
       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 184 424
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\ZeroJunction.emx</LibraryPath>
 <TimeStamp>2007-9-27 9:51:43</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       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' 184 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 -> Hdiff;
      Splitter2\output -> MatrixMul\input1;
      Wbai\p <= AdHji\p1;
      Wbai\p => Pout;
     end;
    implementation_end;
   JointD 200 488
    description '<Information>
 <Description>
    <Version>4.8</Version>
<IsMainModel>1</IsMainModel>
    <LibraryPath>Bond Graph\MR\joint-v3.emx</LibraryPath>
  <TimeStamp>2020-7-21 12:08:53</TimeStamp>
</Description>
</Information>';
    type 'Submodel-v3'
     ports
      power in Pin [6,1];
      power in Pdiff [6,1];
      signal in Hin [4,4];
      signal out Hout [4,4];
      signal out Hdiff [4,4];
      power out Pout [6,1];
    end;
    icon bg bottom
     figures
      rectangle 168 464 232 512 color 0 fill 14745599;
      text 'Joint' 200 488 color 0 'Clear Sans' 16;
     terminals
      Pin 184 464 fixed;
      Hin 216 512 fixed;
      Hout 216 464 fixed;
      Pout 184 512 fixed;
    end;
    implementation bg
     submodels
      AdHji 424 424
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\MTF.emx</LibraryPath>
 <TimeStamp>2007-9-25 12:3:3</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       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 184 311.9
       description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\FlowSensor.emx</LibraryPath>
  <TimeStamp>2011-11-29 15:50:53</TimeStamp>
</Description>
</Information>';
       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 177.1 304.8 190.9 319.1 color 0 fill 16777215;
         text 'f' 184 311.2 color 0;
       end;
       implementation eq
equations
	p2.f = p1.f;
	p1.e = p2.e;
	flow = p1.f;
implementation_end;
      Hmatrix 256 312
       description '<Information><Description><Version>4.0</Version><LibraryPath>Template\Submodel-Equation.emx</LibraryPath><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues><TimeStamp>2007-11-1 22:32:1</TimeStamp><AllowLibraryUpdate>False</AllowLibraryUpdate></Description></Information>';
       type 'Submodel-Equation'
        ports
         signal in flow [6,1];
         signal out H [4,4];
       end;
       icon bg
        figures
         rectangle 224 296 288 328 color 0 fill 15132390;
         text 'name' 256 312 color 0 'Clear Sans' 16;
       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
	real dq[4];
	real Wb[3,4];
equations
	dq = transpose(Wb) * flow[1:3] ./ 2;
	q = int(dq,init);
	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]];
	Wb = [	-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 '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Signal\Block Diagram\Gain.emx</LibraryPath>
 <TimeStamp>2007-9-26 12:15:12</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       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 Pin 492.1 424;
      plug Pdiff 184 225;
      plug Hin 130.8 576;
      plug Hout 478.4 576;
      plug Hdiff 320 222;
      plug Pout 134.7 424;
      Splitter2 320 312
       description '<Description><Version>4.0</Version>
   <LibraryPath>Signal\Block Diagram\Splitter.emx</LibraryPath>
  <TimeStamp>2008-01-17 11:28:29</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
       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 184 424
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\ZeroJunction.emx</LibraryPath>
 <TimeStamp>2007-9-27 9:51:43</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       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' 184 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 -> Hdiff;
      Splitter2\output -> MatrixMul\input1;
      Wbai\p <= AdHji\p1;
      Wbai\p => Pout;
     end;
    implementation_end;
   JointE 200 168
    description '<Information>
 <Description>
    <Version>4.8</Version>
<IsMainModel>1</IsMainModel>
    <LibraryPath>Bond Graph\MR\joint-v3.emx</LibraryPath>
  <TimeStamp>2020-7-21 12:08:53</TimeStamp>
</Description>
</Information>';
    type 'Submodel-v3'
     ports
      power in Pin [6,1];
      power in Pdiff [6,1];
      signal in Hin [4,4];
      signal out Hout [4,4];
      signal out Hdiff [4,4];
      power out Pout [6,1];
    end;
    icon bg bottom
     figures
      rectangle 168 144 232 192 color 0 fill 14745599;
      text 'Joint' 200 168 color 0 'Clear Sans' 16;
     terminals
      Pin 184 144 fixed;
      Hin 216 192 fixed;
      Hout 216 144 fixed;
      Pout 184 192 fixed;
    end;
    implementation bg
     submodels
      AdHji 424 424
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\MTF.emx</LibraryPath>
 <TimeStamp>2007-9-25 12:3:3</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       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 184 311.9
       description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\FlowSensor.emx</LibraryPath>
  <TimeStamp>2011-11-29 15:50:53</TimeStamp>
</Description>
</Information>';
       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 177.1 304.8 190.9 319.1 color 0 fill 16777215;
         text 'f' 184 311.2 color 0;
       end;
       implementation eq
equations
	p2.f = p1.f;
	p1.e = p2.e;
	flow = p1.f;
implementation_end;
      Hmatrix 256 312
       description '<Information><Description><Version>4.0</Version><LibraryPath>Template\Submodel-Equation.emx</LibraryPath><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues><TimeStamp>2007-11-1 22:32:1</TimeStamp><AllowLibraryUpdate>False</AllowLibraryUpdate></Description></Information>';
       type 'Submodel-Equation'
        ports
         signal in flow [6,1];
         signal out H [4,4];
       end;
       icon bg
        figures
         rectangle 224 296 288 328 color 0 fill 15132390;
         text 'name' 256 312 color 0 'Clear Sans' 16;
       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
	real dq[4];
	real Wb[3,4];
equations
	dq = transpose(Wb) * flow[1:3] ./ 2;
	q = int(dq,init);
	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]];
	Wb = [	-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 '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Signal\Block Diagram\Gain.emx</LibraryPath>
 <TimeStamp>2007-9-26 12:15:12</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       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 Pin 492.1 424;
      plug Pdiff 184 225;
      plug Hin 130.8 576;
      plug Hout 478.4 576;
      plug Hdiff 320 222;
      plug Pout 134.7 424;
      Splitter2 320 312
       description '<Description><Version>4.0</Version>
   <LibraryPath>Signal\Block Diagram\Splitter.emx</LibraryPath>
  <TimeStamp>2008-01-17 11:28:29</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
       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 184 424
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\ZeroJunction.emx</LibraryPath>
 <TimeStamp>2007-9-27 9:51:43</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       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' 184 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 -> Hdiff;
      Splitter2\output -> MatrixMul\input1;
      Wbai\p <= AdHji\p1;
      Wbai\p => Pout;
     end;
    implementation_end;
   JointF 864 128
    description '<Information>
 <Description>
    <Version>4.8</Version>
<IsMainModel>1</IsMainModel>
    <LibraryPath>Bond Graph\MR\joint-v3.emx</LibraryPath>
  <TimeStamp>2020-7-21 12:08:53</TimeStamp>
</Description>
</Information>';
    type 'Submodel-v3'
     ports
      power in Pin [6,1];
      power in Pdiff [6,1];
      signal in Hin [4,4];
      signal out Hout [4,4];
      signal out Hdiff [4,4];
      power out Pout [6,1];
    end;
    icon bg bottom
     figures
      rectangle 840 96 888 160 color 0 fill 14745599;
      text 'Joint' 864 128 color 0 'Clear Sans' 16;
     terminals
      Pin 888 112 fixed;
      Hin 840 144 fixed;
      Hout 888 144 fixed;
      Pout 840 112 fixed;
    end;
    implementation bg
     submodels
      AdHji 424 424
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\MTF.emx</LibraryPath>
 <TimeStamp>2007-9-25 12:3:3</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       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 184 311.9
       description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\FlowSensor.emx</LibraryPath>
  <TimeStamp>2011-11-29 15:50:53</TimeStamp>
</Description>
</Information>';
       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 177.1 304.8 190.9 319.1 color 0 fill 16777215;
         text 'f' 184 311.2 color 0;
       end;
       implementation eq
equations
	p2.f = p1.f;
	p1.e = p2.e;
	flow = p1.f;
implementation_end;
      Hmatrix 256 312
       description '<Information><Description><Version>4.0</Version><LibraryPath>Template\Submodel-Equation.emx</LibraryPath><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues><TimeStamp>2007-11-1 22:32:1</TimeStamp><AllowLibraryUpdate>False</AllowLibraryUpdate></Description></Information>';
       type 'Submodel-Equation'
        ports
         signal in flow [6,1];
         signal out H [4,4];
       end;
       icon bg
        figures
         rectangle 224 296 288 328 color 0 fill 15132390;
         text 'name' 256 312 color 0 'Clear Sans' 16;
       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
	real dq[4];
	real Wb[3,4];
equations
	dq = transpose(Wb) * flow[1:3] ./ 2;
	q = int(dq,init);
	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]];
	Wb = [	-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 '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Signal\Block Diagram\Gain.emx</LibraryPath>
 <TimeStamp>2007-9-26 12:15:12</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       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 Pin 492.1 424;
      plug Pdiff 184 225;
      plug Hin 130.8 576;
      plug Hout 478.4 576;
      plug Hdiff 320 222;
      plug Pout 134.7 424;
      Splitter2 320 312
       description '<Description><Version>4.0</Version>
   <LibraryPath>Signal\Block Diagram\Splitter.emx</LibraryPath>
  <TimeStamp>2008-01-17 11:28:29</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
       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 184 424
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\ZeroJunction.emx</LibraryPath>
 <TimeStamp>2007-9-27 9:51:43</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       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' 184 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 -> Hdiff;
      Splitter2\output -> MatrixMul\input1;
      Wbai\p <= AdHji\p1;
      Wbai\p => Pout;
     end;
    implementation_end;
   Joint_dynA 712 512
    description '<Description>
	<Version>4.8</Version>
	<IsMainModel>1</IsMainModel>
	</Description>';
    type Submodel
     ports
      power out output [6,1];
      signal in angle {rad} ;
    end;
    implementation bg
     submodels
      C 264 200
       description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\C.emx</LibraryPath>
  <TimeStamp>2011-11-29 15:58:35</TimeStamp>
</Description>
</Information>';
       type C
        ports
         power in p;
         signal out state;
        restrictions
         causality preferred out p;
       end;
       icon bg bottom
        figures
         text 'C' 264 200 color 0 18 bold;
       end;
       implementation eq
parameters
	real c = 0.001;
equations
	state = int(p.f);
	p.e = state / c;
implementation_end;
      C1 191.8 216.2
       description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\3D\C-3.emx</LibraryPath>
  <TimeStamp>2007-9-25 12:12:8</TimeStamp>
</Description>';
       type 'C-3'
        ports
         power in p [3,1];
         signal out state [3,1];
        restrictions
         causality preferred out p;
       end;
       icon bg top
        figures
         text 'C' 191.8 216.2 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] {mN/m};
equations
    state = int(p.f);
    p.e = inverse(c) *state;
implementation_end;
      C4 191.8 232.2
       description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\2D\C-2.emx</LibraryPath>
  <TimeStamp>2007-9-25 12:7:27</TimeStamp>
</Description>';
       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' 191.8 232.2 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;
      plug output 468 216;
      plug angle 224 80;
      OneJunction5 239.8 232.2
       description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:17:51</TimeStamp>
</Description>
</Information>';
       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' 239.8 232.2 color 0 18 bold;
       end;
       implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
      OneJunction7 239.8 216.2
       description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:17:51</TimeStamp>
</Description>
</Information>';
       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' 239.8 216.2 color 0 18 bold;
       end;
       implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
      OneJunction8 312 200
       description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:17:51</TimeStamp>
</Description>
</Information>';
       knot OneJunction
        ports
         rotation knot duplicatable none p [1];
         signal knot out flow [1];
        restrictions
         causality constraint one_out p;
       end;
       icon bg
        figures
         text '1' 312 200 color 0 18 bold;
       end;
       implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
      PowerMux 402 216
						specifications active 'rot_x'
							specification 'rot_x'
 description '<Information>
 <Description>
    <Version>4.8</Version>
  <LibraryPath>Bond Graph\MR\PowerMux-Rotation.emx</LibraryPath>
  <TimeStamp>2020-7-20 14:35:23</TimeStamp>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
  <AllowLibraryUpdate>True</AllowLibraryUpdate>
 </Description>
</Information>';
 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 400 192 400 240 color 0 width 2;
   rectangle 396 192 408 240 color -1;
   text '1' 405 210 color 8421504 8;
  terminals
   input 400 200 fixed;
   output 400 216 fixed;
   input_rot2 400 232 fixed;
   input_pos3 400 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 '<Description>
   <Version>4.1</Version>
  <LibraryPath>Bond Graph\PowerMux.emx</LibraryPath>
  <TimeStamp>2011-3-4 15:12:50</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
 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;
   causality constraint not_equal input_rot2 output;
   causality constraint not_equal input_pos3 output;
 end;
 icon bg bottom
  figures
   line 242 274 290 274 color 0 width 2;
   rectangle 242 266 290 278 color -1;
   text '1' 260 269 color 8421504 8;
  terminals
   input 250 274 fixed;
   output 266 274 fixed;
   input_rot2 282 274 fixed;
   input_pos3 266 274 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 '<Information>
 <Description>
    <Version>4.8</Version>
  <LibraryPath>Bond Graph\MR\PowerMux-Rotation.emx</LibraryPath>
  <TimeStamp>2020-7-21 12:05:13</TimeStamp>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
  <AllowLibraryUpdate>True</AllowLibraryUpdate>
 </Description>
</Information>';
 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;
   causality constraint not_equal input_rot2 output;
   causality constraint not_equal input_pos3 output;
 end;
 icon bg bottom
  figures
   line 242 274 290 274 color 0 width 2;
   rectangle 242 266 290 278 color -1;
   text '1' 260 269 color 8421504 8;
  terminals
   input 250 274 fixed;
   output 266 274 fixed;
   input_rot2 282 274 fixed;
   input_pos3 266 274 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 312 152
       description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\R.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:35:37</TimeStamp>
</Description>
</Information>';
       type R
        ports
         power in p;
       end;
       icon bg bottom
        figures
         text 'R' 312 152 color 0 18 bold;
       end;
       implementation eq
parameters
	real r = 100;
equations
	p.e = r * p.f;
implementation_end;
      R4 239.8 288.2
       description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\2D\R-2.emx</LibraryPath>
  <TimeStamp>2007-9-25 12:6:54</TimeStamp>
</Description>';
       type 'R-2'
        ports
         power in p [2,1];
       end;
       icon bg bottom
        figures
         text 'R' 239.8 288.2 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 239.8 168.2
       description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\3D\R-3.emx</LibraryPath>
  <TimeStamp>2007-9-25 12:11:54</TimeStamp>
</Description>';
       type 'R-3'
        ports
         power in p [3,1];
       end;
       icon bg top
        figures
         text 'R' 239.8 168.2 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;
      stepper_model 360 80
       description '<Information><Description><Version>4.8</Version><IsMainModel>1</IsMainModel><LibraryPath>Motor\stepper_model.emx</LibraryPath><TimeStamp>2020-7-23 10:54:47</TimeStamp></Description><Attributes><GlobalRelations>parameters 
	real I_phase = 3.4 {mH};
	real R_phase = 2.9 {ohm};
	real u_max = 3.4 {V};
	real RotorInertia = 5.6e-6 {kg.m2};
	real StepperMass = 0.29 {kg};
	real angle_step = 1.8 {deg};
	real n_phase = 2 {none};
	real fluxLinkage = 0.0022 {Wb};
	real detentTorque = 0.01 {N.m};
variables
	real omega;
	real p; // rotor division
initialequations
	p = 2 * pi / (2 * n_phase * angle_step);
	omega = 200;</GlobalRelations></Attributes></Information>';
       type Submodel
        ports
         signal in angle;
         rotation out p;
       end;
       implementation bg
        submodels
         I 560 104
          description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\I.emx</LibraryPath>
  <TimeStamp>2011-11-29 15:55:55</TimeStamp>
</Description>
</Information>';
          type I
           ports
            power in p;
            signal out state;
           restrictions
            causality preferred in p;
          end;
          icon bg bottom
           figures
            text 'I' 560 104 color 0 18 bold;
          end;
          implementation eq
parameters
	real global I_phase;
equations
    state = int(p.e);
    p.f = state / I_phase;
implementation_end;
         I1 608 328
          description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\I.emx</LibraryPath>
  <TimeStamp>2011-11-29 15:55:55</TimeStamp>
</Description>
</Information>';
          type I
           ports
            power in p;
            signal out state;
           restrictions
            causality preferred in p;
          end;
          icon bg bottom
           figures
            text 'I' 608 328 color 0 18 bold;
          end;
          implementation eq
parameters
	real global I_phase;
equations
    state = int(p.e);
    p.f = state / I_phase;
implementation_end;
         I2 752 160
          description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\I.emx</LibraryPath>
  <TimeStamp>2011-11-29 15:55:55</TimeStamp>
</Description>
</Information>';
          type I
           ports
            power in p;
            signal out state;
           restrictions
            causality preferred in p;
          end;
          icon bg bottom
           figures
            text 'I' 752 160 color 0 18 bold;
          end;
          implementation eq
parameters
	real global RotorInertia;
equations
    state = int(p.e);
    p.f = state / (RotorInertia);
implementation_end;
         MGY_a 656 160
          description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\MGY.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:03:53</TimeStamp>
</Description>
</Information>';
          type MGY
           ports
            power in p1;
            power out p2;
            signal in r;
           restrictions
            causality constraint equal p1 p2;
          end;
          icon bg bottom
           figures
            text 'MGY' 656 160 color 0 18 bold;
          end;
          implementation eq
equations
	p1.e = r * p2.f;
	p2.e = r * p1.f;
implementation_end;
         MGY_b 656 272
          description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\MGY.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:03:53</TimeStamp>
</Description>
</Information>';
          type MGY
           ports
            power in p1;
            power out p2;
            signal in r;
           restrictions
            causality constraint equal p1 p2;
          end;
          icon bg bottom
           figures
            text 'MGY' 656 272 color 0 18 bold;
          end;
          implementation eq
equations
	p1.e = r * p2.f;
	p2.e = r * p1.f;
implementation_end;
         MSe_a 512 160
          description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\MSe.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:12:33</TimeStamp>
</Description>
</Information>';
          type MSe
           ports
            electric out p;
            signal in effort;
           restrictions
            causality fixed out p;
          end;
          icon bg bottom
           figures
            text 'MSe' 512 160 color 0 18 bold;
          end;
          implementation eq
variables
	real flow;
equations
	p.e = effort;
	flow = p.f;
implementation_end;
         MSe_b 512 272
          description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\MSe.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:12:33</TimeStamp>
</Description>
</Information>';
          type MSe
           ports
            electric out p;
            signal in effort;
           restrictions
            causality fixed out p;
          end;
          icon bg bottom
           figures
            text 'MSe' 512 272 color 0 18 bold;
          end;
          implementation eq
variables
	real flow;
equations
	p.e = effort;
	flow = p.f;
implementation_end;
         plug angle 200 216;
         plug p 1472 216;
         OneJunction1 840 216
          description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:17:51</TimeStamp>
</Description>
</Information>';
          knot OneJunction
           ports
            rotation knot duplicatable none p [1];
            signal knot out flow [1];
           restrictions
            causality constraint one_out p;
          end;
          icon bg
           figures
            text '1' 840 216 color 0 18 bold;
          end;
          implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
         OneJunction2 584 160
          description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:17:51</TimeStamp>
</Description>
</Information>';
          knot OneJunction
           ports
            electric knot duplicatable none p [1];
            signal knot out flow [1];
           restrictions
            causality constraint one_out p;
          end;
          icon bg
           figures
            text '1' 584 160 color 0 18 bold;
          end;
          implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
         OneJunction3 584 272
          description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:17:51</TimeStamp>
</Description>
</Information>';
          knot OneJunction
           ports
            electric knot duplicatable none p [1];
            signal knot out flow [1];
           restrictions
            causality constraint one_out p;
          end;
          icon bg
           figures
            text '1' 584 272 color 0 18 bold;
          end;
          implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
         OneJunction4 752 216
          description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:17:51</TimeStamp>
</Description>
</Information>';
          knot OneJunction
           ports
            rotation knot duplicatable none p [1];
            signal knot out flow [1];
           restrictions
            causality constraint one_out p;
          end;
          icon bg
           figures
            text '1' 752 216 color 0 18 bold;
          end;
          implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
         phase_control 512 216
          description '<Description><Version>4.0</Version>
   <LibraryPath>Template\Submodel-Equation.emx</LibraryPath>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
   <TimeStamp>2007-11-1 22:32:1</TimeStamp>
   <AllowLibraryUpdate>False</AllowLibraryUpdate>
</Description>';
          type Submodel
           ports
            signal in angle;
            signal out a;
            signal out b;
          end;
          icon bg
           figures
            rectangle 472 200 552 232 color 0 fill 15132390;
            text 'name' 512 216 color 0 'Clear Sans' 16;
          end;
          implementation eq
parameters
	real global u_max {V};
variables
	real global p;
	boolean hidden eventa, eventb;
equations
	a = u_max * (cos (p*angle));
	eventa = event(a);
	b = u_max * -(sin (p*angle));
	eventb = event(b);

	
	
 implementation_end;
         R 608 104
          description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\R.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:35:37</TimeStamp>
</Description>
</Information>';
          type R
           ports
            power in p;
          end;
          icon bg bottom
           figures
            text 'R' 608 104 color 0 18 bold;
          end;
          implementation eq
parameters
	real global R_phase;
equations
	p.e = R_phase * p.f;
implementation_end;
         R1 560 328
          description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\R.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:35:37</TimeStamp>
</Description>
</Information>';
          type R
           ports
            power in p;
          end;
          icon bg bottom
           figures
            text 'R' 560 328 color 0 18 bold;
          end;
          implementation eq
parameters
	real global R_phase;
equations
	p.e = R_phase * p.f;
implementation_end;
         R2 824 264
          description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\R.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:35:37</TimeStamp>
</Description>
</Information>';
          type R
           ports
            power in p;
          end;
          icon bg bottom
           figures
            text 'R' 824 264 color 0 18 bold;
          end;
          implementation eq
parameters
	real r = 1.0e-3;
equations
	p.e = r * p.f;
implementation_end;
         RotorAngle 656 216
          description '<Description><Version>4.0</Version>
   <LibraryPath>Template\Submodel-Equation.emx</LibraryPath>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
   <TimeStamp>2007-11-1 22:32:1</TimeStamp>
   <AllowLibraryUpdate>False</AllowLibraryUpdate>
</Description>';
          type Submodel
           ports
            signal out output_b;
            signal out output_a;
            signal in omega {rad/s} ;
            signal out output_d;
          end;
          icon bg
           figures
            rectangle 616 200 696 232 color 0 fill 15132390;
            text 'name' 656 216 color 0 'Clear Sans' 16;
          end;
          implementation eq
parameters
	real global fluxLinkage;
	real global detentTorque;
variables
	real global p;
	real angle {rad};
equations
	angle = int(omega,1.570796);
	output_a = -p * fluxLinkage * sin(p * angle);
	output_b =  p * fluxLinkage * sin(p * angle - pi / 2);
	output_d =  detentTorque * sin(2 * p * angle);
 implementation_end;
         Se 752 272
          description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\MSe.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:12:33</TimeStamp>
</Description>
</Information>';
          type MSe
           ports
            power out p;
            signal in effort;
           restrictions
            causality fixed out p;
          end;
          icon bg bottom
           figures
            text 'MSe' 752 272 color 0 18 bold;
          end;
          implementation eq

variables
	real flow;
equations
	p.e = effort;
	flow = p.f;
implementation_end;
        end;
        connections
         angle -> phase_control\angle;
         I2\p <= OneJunction4\p;
         MGY_a\p2 => OneJunction4\p;
         MGY_b\p2 => OneJunction4\p;
         MSe_b\p => OneJunction3\p;
         OneJunction1\p => p;
         OneJunction2\p <= MSe_a\p;
         OneJunction2\p => I\p;
         OneJunction2\p => MGY_a\p1;
         OneJunction2\p => R\p;
         OneJunction3\p => I1\p;
         OneJunction3\p => MGY_b\p1;
         OneJunction3\p => R1\p;
         OneJunction4\flow -> RotorAngle\omega;
         OneJunction4\p => OneJunction1\p;
         OneJunction4\p => R2\p;
         phase_control\a -> MSe_a\effort;
         phase_control\b -> MSe_b\effort;
         RotorAngle\output_a -> MGY_a\r;
         RotorAngle\output_b -> MGY_b\r;
         RotorAngle\output_d -> Se\effort;
         Se\p => OneJunction4\p;
        end;
       implementation_end;
      ZeroJunction1 360 200
       description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\ZeroJunction.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:45:16</TimeStamp>
</Description>
</Information>';
       knot ZeroJunction
        ports
         rotation knot duplicatable none p [1];
         signal knot out effort [1];
        restrictions
         causality constraint one_in p;
       end;
       icon bg
        figures
         text '0' 360 200 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
      angle -> stepper_model\angle;
      C\p <= OneJunction8\p;
      C1\p <= OneJunction7\p;
      OneJunction5\p => C4\p;
      OneJunction5\p => PowerMux\input_rot2;
      OneJunction5\p => R4\p;
      OneJunction7\p => PowerMux\input_pos3;
      OneJunction7\p => R5\p;
      OneJunction8\p => R\p;
      OneJunction8\p => ZeroJunction1\p;
      PowerMux\input <= ZeroJunction1\p;
      PowerMux\output => output;
      ZeroJunction1\p <= stepper_model\p;
     end;
    implementation_end;
   Joint_dynB 456 192
    description '<Description>
	<Version>4.8</Version>
	<IsMainModel>1</IsMainModel>
	</Description>';
    type Submodel
     ports
      power out output [6,1];
    end;
    icon bg
     figures
      rectangle 416 176 496 208 color 0 fill 55295;
      text 'name' 456 192 color 0 'Clear Sans' 16;
    end;
    implementation bg
     submodels
      C1 191.8 216.2
       description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\3D\C-3.emx</LibraryPath>
  <TimeStamp>2007-9-25 12:12:8</TimeStamp>
</Description>';
       type 'C-3'
        ports
         power in p [3,1];
         signal out state [3,1];
        restrictions
         causality preferred out p;
       end;
       icon bg top
        figures
         text 'C' 191.8 216.2 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] {mN/m};
equations
    state = int(p.f);
    p.e = inverse(c) *state;
implementation_end;
      C4 191.8 232.2
       description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\2D\C-2.emx</LibraryPath>
  <TimeStamp>2007-9-25 12:7:27</TimeStamp>
</Description>';
       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' 191.8 232.2 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;
      plug output 396 216;
      OneJunction5 239.8 232.2
       description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:17:51</TimeStamp>
</Description>
</Information>';
       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' 239.8 232.2 color 0 18 bold;
       end;
       implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
      OneJunction7 239.8 216.2
       description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:17:51</TimeStamp>
</Description>
</Information>';
       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' 239.8 216.2 color 0 18 bold;
       end;
       implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
      OneJunction8 288 200
       description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:17:51</TimeStamp>
</Description>
</Information>';
       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' 288 200 color 0 18 bold;
       end;
       implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
      PowerMux 330 216
						specifications active 'rot_x'
							specification 'rot_x'
 description '<Information>
 <Description>
    <Version>4.8</Version>
  <LibraryPath>Bond Graph\MR\PowerMux-Rotation.emx</LibraryPath>
  <TimeStamp>2020-7-20 14:35:23</TimeStamp>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
  <AllowLibraryUpdate>True</AllowLibraryUpdate>
 </Description>
</Information>';
 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 328 192 328 240 color 0 width 2;
   rectangle 324 192 336 240 color -1;
   text '1' 333 210 color 8421504 8;
  terminals
   input 328 200 fixed;
   output 328 216 fixed;
   input_rot2 328 232 fixed;
   input_pos3 328 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 '<Description>
   <Version>4.1</Version>
  <LibraryPath>Bond Graph\PowerMux.emx</LibraryPath>
  <TimeStamp>2011-3-4 15:12:50</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
 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;
   causality constraint not_equal input_rot2 output;
   causality constraint not_equal input_pos3 output;
 end;
 icon bg bottom
  figures
   line 242 274 290 274 color 0 width 2;
   rectangle 242 266 290 278 color -1;
   text '1' 260 269 color 8421504 8;
  terminals
   input 250 274 fixed;
   output 266 274 fixed;
   input_rot2 282 274 fixed;
   input_pos3 266 274 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 '<Information>
 <Description>
    <Version>4.8</Version>
  <LibraryPath>Bond Graph\MR\PowerMux-Rotation.emx</LibraryPath>
  <TimeStamp>2020-7-21 12:05:13</TimeStamp>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
  <AllowLibraryUpdate>True</AllowLibraryUpdate>
 </Description>
</Information>';
 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;
   causality constraint not_equal input_rot2 output;
   causality constraint not_equal input_pos3 output;
 end;
 icon bg bottom
  figures
   line 242 274 290 274 color 0 width 2;
   rectangle 242 266 290 278 color -1;
   text '1' 260 269 color 8421504 8;
  terminals
   input 250 274 fixed;
   output 266 274 fixed;
   input_rot2 282 274 fixed;
   input_pos3 266 274 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 288 152
       description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\R.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:35:37</TimeStamp>
</Description>
</Information>';
       type R
        ports
         power in p;
       end;
       icon bg top
        figures
         text 'R' 288 152 color 0 18 bold;
       end;
       implementation eq
parameters
	real r = 0.0001;
equations
	p.e = r * p.f;
implementation_end;
      R4 239.8 288.2
       description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\2D\R-2.emx</LibraryPath>
  <TimeStamp>2007-9-25 12:6:54</TimeStamp>
</Description>';
       type 'R-2'
        ports
         power in p [2,1];
       end;
       icon bg bottom
        figures
         text 'R' 239.8 288.2 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 239.8 168.2
       description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\3D\R-3.emx</LibraryPath>
  <TimeStamp>2007-9-25 12:11:54</TimeStamp>
</Description>';
       type 'R-3'
        ports
         power in p [3,1];
       end;
       icon bg top
        figures
         text 'R' 239.8 168.2 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;
     end;
     connections
      C1\p <= OneJunction7\p;
      OneJunction5\p => C4\p;
      OneJunction5\p => PowerMux\input_rot2;
      OneJunction5\p => R4\p;
      OneJunction7\p => PowerMux\input_pos3;
      OneJunction7\p => R5\p;
      OneJunction8\p => PowerMux\input;
      PowerMux\output => output;
      R\p <= OneJunction8\p;
     end;
    implementation_end;
   Joint_dynC 480 696
    description '<Description>
	<Version>4.8</Version>
	<IsMainModel>1</IsMainModel>
	</Description>';
    type Submodel
     ports
      power out output [6,1];
      signal in angle {rad} ;
    end;
    icon bg
     figures
      rectangle 440 680 520 712 color 0 fill 15132390;
      text 'name' 480 696 color 0 'Clear Sans' 16;
    end;
    implementation bg
     submodels
      C 264 200
       description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\C.emx</LibraryPath>
  <TimeStamp>2011-11-29 15:58:35</TimeStamp>
</Description>
</Information>';
       type C
        ports
         power in p;
         signal out state;
        restrictions
         causality preferred out p;
       end;
       icon bg bottom
        figures
         text 'C' 264 200 color 0 18 bold;
       end;
       implementation eq
parameters
	real c = 0.001;
equations
	state = int(p.f);
	p.e = state / c;
implementation_end;
      C1 191.8 216.2
       description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\3D\C-3.emx</LibraryPath>
  <TimeStamp>2007-9-25 12:12:8</TimeStamp>
</Description>';
       type 'C-3'
        ports
         power in p [3,1];
         signal out state [3,1];
        restrictions
         causality preferred out p;
       end;
       icon bg top
        figures
         text 'C' 191.8 216.2 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] {mN/m};
equations
    state = int(p.f);
    p.e = inverse(c) *state;
implementation_end;
      C4 191.8 232.2
       description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\2D\C-2.emx</LibraryPath>
  <TimeStamp>2007-9-25 12:7:27</TimeStamp>
</Description>';
       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' 191.8 232.2 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;
      plug output 468 216;
      plug angle 224 80;
      OneJunction5 239.8 232.2
       description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:17:51</TimeStamp>
</Description>
</Information>';
       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' 239.8 232.2 color 0 18 bold;
       end;
       implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
      OneJunction7 239.8 216.2
       description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:17:51</TimeStamp>
</Description>
</Information>';
       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' 239.8 216.2 color 0 18 bold;
       end;
       implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
      OneJunction8 312 200
       description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:17:51</TimeStamp>
</Description>
</Information>';
       knot OneJunction
        ports
         rotation knot duplicatable none p [1];
         signal knot out flow [1];
        restrictions
         causality constraint one_out p;
       end;
       icon bg
        figures
         text '1' 312 200 color 0 18 bold;
       end;
       implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
      PowerMux 402 216
						specifications active 'rot_x'
							specification 'rot_x'
 description '<Information>
 <Description>
    <Version>4.8</Version>
  <LibraryPath>Bond Graph\MR\PowerMux-Rotation.emx</LibraryPath>
  <TimeStamp>2020-7-20 14:35:23</TimeStamp>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
  <AllowLibraryUpdate>True</AllowLibraryUpdate>
 </Description>
</Information>';
 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 400 192 400 240 color 0 width 2;
   rectangle 396 192 408 240 color -1;
   text '1' 405 210 color 8421504 8;
  terminals
   input 400 200 fixed;
   output 400 216 fixed;
   input_rot2 400 232 fixed;
   input_pos3 400 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 '<Description>
   <Version>4.1</Version>
  <LibraryPath>Bond Graph\PowerMux.emx</LibraryPath>
  <TimeStamp>2011-3-4 15:12:50</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
 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;
   causality constraint not_equal input_rot2 output;
   causality constraint not_equal input_pos3 output;
 end;
 icon bg bottom
  figures
   line 242 274 290 274 color 0 width 2;
   rectangle 242 266 290 278 color -1;
   text '1' 260 269 color 8421504 8;
  terminals
   input 250 274 fixed;
   output 266 274 fixed;
   input_rot2 282 274 fixed;
   input_pos3 266 274 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 '<Information>
 <Description>
    <Version>4.8</Version>
  <LibraryPath>Bond Graph\MR\PowerMux-Rotation.emx</LibraryPath>
  <TimeStamp>2020-7-21 12:05:13</TimeStamp>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
  <AllowLibraryUpdate>True</AllowLibraryUpdate>
 </Description>
</Information>';
 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;
   causality constraint not_equal input_rot2 output;
   causality constraint not_equal input_pos3 output;
 end;
 icon bg bottom
  figures
   line 242 274 290 274 color 0 width 2;
   rectangle 242 266 290 278 color -1;
   text '1' 260 269 color 8421504 8;
  terminals
   input 250 274 fixed;
   output 266 274 fixed;
   input_rot2 282 274 fixed;
   input_pos3 266 274 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 312 152
       description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\R.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:35:37</TimeStamp>
</Description>
</Information>';
       type R
        ports
         power in p;
       end;
       icon bg bottom
        figures
         text 'R' 312 152 color 0 18 bold;
       end;
       implementation eq
parameters
	real r = 100;
equations
	p.e = r * p.f;
implementation_end;
      R4 239.8 288.2
       description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\2D\R-2.emx</LibraryPath>
  <TimeStamp>2007-9-25 12:6:54</TimeStamp>
</Description>';
       type 'R-2'
        ports
         power in p [2,1];
       end;
       icon bg bottom
        figures
         text 'R' 239.8 288.2 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 239.8 168.2
       description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\3D\R-3.emx</LibraryPath>
  <TimeStamp>2007-9-25 12:11:54</TimeStamp>
</Description>';
       type 'R-3'
        ports
         power in p [3,1];
       end;
       icon bg top
        figures
         text 'R' 239.8 168.2 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;
      stepper_model 360 80
       description '<Information><Description><Version>4.8</Version><IsMainModel>1</IsMainModel><LibraryPath>Motor\stepper_model.emx</LibraryPath><TimeStamp>2020-7-23 10:54:47</TimeStamp></Description><Attributes><GlobalRelations>parameters 
	real I_phase = 3.4 {mH};
	real R_phase = 2.9 {ohm};
	real u_max = 3.4 {V};
	real RotorInertia = 5.6e-6 {kg.m2};
	real StepperMass = 0.29 {kg};
	real angle_step = 1.8 {deg};
	real n_phase = 2 {none};
	real fluxLinkage = 0.0022 {Wb};
	real detentTorque = 0.01 {N.m};
variables
	real omega;
	real p; // rotor division
initialequations
	p = 2 * pi / (2 * n_phase * angle_step);
	omega = 200;</GlobalRelations></Attributes></Information>';
       type Submodel
        ports
         signal in angle;
         rotation out p;
       end;
       implementation bg
        submodels
         I 560 104
          description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\I.emx</LibraryPath>
  <TimeStamp>2011-11-29 15:55:55</TimeStamp>
</Description>
</Information>';
          type I
           ports
            power in p;
            signal out state;
           restrictions
            causality preferred in p;
          end;
          icon bg bottom
           figures
            text 'I' 560 104 color 0 18 bold;
          end;
          implementation eq
parameters
	real global I_phase;
equations
    state = int(p.e);
    p.f = state / I_phase;
implementation_end;
         I1 608 328
          description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\I.emx</LibraryPath>
  <TimeStamp>2011-11-29 15:55:55</TimeStamp>
</Description>
</Information>';
          type I
           ports
            power in p;
            signal out state;
           restrictions
            causality preferred in p;
          end;
          icon bg bottom
           figures
            text 'I' 608 328 color 0 18 bold;
          end;
          implementation eq
parameters
	real global I_phase;
equations
    state = int(p.e);
    p.f = state / I_phase;
implementation_end;
         I2 752 160
          description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\I.emx</LibraryPath>
  <TimeStamp>2011-11-29 15:55:55</TimeStamp>
</Description>
</Information>';
          type I
           ports
            power in p;
            signal out state;
           restrictions
            causality preferred in p;
          end;
          icon bg bottom
           figures
            text 'I' 752 160 color 0 18 bold;
          end;
          implementation eq
parameters
	real global RotorInertia;
equations
    state = int(p.e);
    p.f = state / (RotorInertia);
implementation_end;
         MGY_a 656 160
          description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\MGY.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:03:53</TimeStamp>
</Description>
</Information>';
          type MGY
           ports
            power in p1;
            power out p2;
            signal in r;
           restrictions
            causality constraint equal p1 p2;
          end;
          icon bg bottom
           figures
            text 'MGY' 656 160 color 0 18 bold;
          end;
          implementation eq
equations
	p1.e = r * p2.f;
	p2.e = r * p1.f;
implementation_end;
         MGY_b 656 272
          description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\MGY.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:03:53</TimeStamp>
</Description>
</Information>';
          type MGY
           ports
            power in p1;
            power out p2;
            signal in r;
           restrictions
            causality constraint equal p1 p2;
          end;
          icon bg bottom
           figures
            text 'MGY' 656 272 color 0 18 bold;
          end;
          implementation eq
equations
	p1.e = r * p2.f;
	p2.e = r * p1.f;
implementation_end;
         MSe_a 512 160
          description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\MSe.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:12:33</TimeStamp>
</Description>
</Information>';
          type MSe
           ports
            electric out p;
            signal in effort;
           restrictions
            causality fixed out p;
          end;
          icon bg bottom
           figures
            text 'MSe' 512 160 color 0 18 bold;
          end;
          implementation eq
variables
	real flow;
equations
	p.e = effort;
	flow = p.f;
implementation_end;
         MSe_b 512 272
          description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\MSe.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:12:33</TimeStamp>
</Description>
</Information>';
          type MSe
           ports
            electric out p;
            signal in effort;
           restrictions
            causality fixed out p;
          end;
          icon bg bottom
           figures
            text 'MSe' 512 272 color 0 18 bold;
          end;
          implementation eq
variables
	real flow;
equations
	p.e = effort;
	flow = p.f;
implementation_end;
         plug angle 200 216;
         plug p 1472 216;
         OneJunction1 840 216
          description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:17:51</TimeStamp>
</Description>
</Information>';
          knot OneJunction
           ports
            rotation knot duplicatable none p [1];
            signal knot out flow [1];
           restrictions
            causality constraint one_out p;
          end;
          icon bg
           figures
            text '1' 840 216 color 0 18 bold;
          end;
          implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
         OneJunction2 584 160
          description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:17:51</TimeStamp>
</Description>
</Information>';
          knot OneJunction
           ports
            electric knot duplicatable none p [1];
            signal knot out flow [1];
           restrictions
            causality constraint one_out p;
          end;
          icon bg
           figures
            text '1' 584 160 color 0 18 bold;
          end;
          implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
         OneJunction3 584 272
          description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:17:51</TimeStamp>
</Description>
</Information>';
          knot OneJunction
           ports
            electric knot duplicatable none p [1];
            signal knot out flow [1];
           restrictions
            causality constraint one_out p;
          end;
          icon bg
           figures
            text '1' 584 272 color 0 18 bold;
          end;
          implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
         OneJunction4 752 216
          description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:17:51</TimeStamp>
</Description>
</Information>';
          knot OneJunction
           ports
            rotation knot duplicatable none p [1];
            signal knot out flow [1];
           restrictions
            causality constraint one_out p;
          end;
          icon bg
           figures
            text '1' 752 216 color 0 18 bold;
          end;
          implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
         phase_control 512 216
          description '<Description><Version>4.0</Version>
   <LibraryPath>Template\Submodel-Equation.emx</LibraryPath>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
   <TimeStamp>2007-11-1 22:32:1</TimeStamp>
   <AllowLibraryUpdate>False</AllowLibraryUpdate>
</Description>';
          type Submodel
           ports
            signal in angle;
            signal out a;
            signal out b;
          end;
          icon bg
           figures
            rectangle 472 200 552 232 color 0 fill 15132390;
            text 'name' 512 216 color 0 'Clear Sans' 16;
          end;
          implementation eq
parameters
	real global u_max {V};
variables
	real global p;
	boolean hidden eventa, eventb;
equations
	a = u_max * (cos (p*angle));
	eventa = event(a);
	b = u_max * -(sin (p*angle));
	eventb = event(b);

	
	
 implementation_end;
         R 608 104
          description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\R.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:35:37</TimeStamp>
</Description>
</Information>';
          type R
           ports
            power in p;
          end;
          icon bg bottom
           figures
            text 'R' 608 104 color 0 18 bold;
          end;
          implementation eq
parameters
	real global R_phase;
equations
	p.e = R_phase * p.f;
implementation_end;
         R1 560 328
          description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\R.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:35:37</TimeStamp>
</Description>
</Information>';
          type R
           ports
            power in p;
          end;
          icon bg bottom
           figures
            text 'R' 560 328 color 0 18 bold;
          end;
          implementation eq
parameters
	real global R_phase;
equations
	p.e = R_phase * p.f;
implementation_end;
         R2 824 264
          description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\R.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:35:37</TimeStamp>
</Description>
</Information>';
          type R
           ports
            power in p;
          end;
          icon bg bottom
           figures
            text 'R' 824 264 color 0 18 bold;
          end;
          implementation eq
parameters
	real r = 1.0e-3;
equations
	p.e = r * p.f;
implementation_end;
         RotorAngle 656 216
          description '<Description><Version>4.0</Version>
   <LibraryPath>Template\Submodel-Equation.emx</LibraryPath>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
   <TimeStamp>2007-11-1 22:32:1</TimeStamp>
   <AllowLibraryUpdate>False</AllowLibraryUpdate>
</Description>';
          type Submodel
           ports
            signal out output_b;
            signal out output_a;
            signal in omega {rad/s} ;
            signal out output_d;
          end;
          icon bg
           figures
            rectangle 616 200 696 232 color 0 fill 15132390;
            text 'name' 656 216 color 0 'Clear Sans' 16;
          end;
          implementation eq
parameters
	real global fluxLinkage;
	real global detentTorque;
variables
	real global p;
	real angle {rad};
equations
	angle = int(omega);
	output_a = -p * fluxLinkage * sin(p * angle);
	output_b =  p * fluxLinkage * sin(p * angle - pi / 2);
	output_d =  detentTorque * sin(2 * p * angle);
 implementation_end;
         Se 752 272
          description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\MSe.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:12:33</TimeStamp>
</Description>
</Information>';
          type MSe
           ports
            power out p;
            signal in effort;
           restrictions
            causality fixed out p;
          end;
          icon bg bottom
           figures
            text 'MSe' 752 272 color 0 18 bold;
          end;
          implementation eq

variables
	real flow;
equations
	p.e = effort;
	flow = p.f;
implementation_end;
        end;
        connections
         angle -> phase_control\angle;
         I2\p <= OneJunction4\p;
         MGY_a\p2 => OneJunction4\p;
         MGY_b\p2 => OneJunction4\p;
         MSe_b\p => OneJunction3\p;
         OneJunction1\p => p;
         OneJunction2\p <= MSe_a\p;
         OneJunction2\p => I\p;
         OneJunction2\p => MGY_a\p1;
         OneJunction2\p => R\p;
         OneJunction3\p => I1\p;
         OneJunction3\p => MGY_b\p1;
         OneJunction3\p => R1\p;
         OneJunction4\flow -> RotorAngle\omega;
         OneJunction4\p => OneJunction1\p;
         OneJunction4\p => R2\p;
         phase_control\a -> MSe_a\effort;
         phase_control\b -> MSe_b\effort;
         RotorAngle\output_a -> MGY_a\r;
         RotorAngle\output_b -> MGY_b\r;
         RotorAngle\output_d -> Se\effort;
         Se\p => OneJunction4\p;
        end;
       implementation_end;
      ZeroJunction1 360 200
       description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\ZeroJunction.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:45:16</TimeStamp>
</Description>
</Information>';
       knot ZeroJunction
        ports
         rotation knot duplicatable none p [1];
         signal knot out effort [1];
        restrictions
         causality constraint one_in p;
       end;
       icon bg
        figures
         text '0' 360 200 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
      angle -> stepper_model\angle;
      C\p <= OneJunction8\p;
      C1\p <= OneJunction7\p;
      OneJunction5\p => C4\p;
      OneJunction5\p => PowerMux\input_rot2;
      OneJunction5\p => R4\p;
      OneJunction7\p => PowerMux\input_pos3;
      OneJunction7\p => R5\p;
      OneJunction8\p => R\p;
      OneJunction8\p => ZeroJunction1\p;
      PowerMux\output => output;
      stepper_model\p => ZeroJunction1\p;
      ZeroJunction1\p => PowerMux\input;
     end;
    implementation_end;
   Joint_dynD 88 488
    description '<Description>
	<Version>4.8</Version>
	<IsMainModel>1</IsMainModel>
	</Description>';
    type Submodel
     ports
      power out output [6,1];
    end;
    icon bg
     figures
      rectangle 48 472 128 504 color 0 fill 55295;
      text 'name' 88 488 color 0 'Clear Sans' 16;
    end;
    implementation bg
     submodels
      C1 191.8 216.2
       description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\3D\C-3.emx</LibraryPath>
  <TimeStamp>2007-9-25 12:12:8</TimeStamp>
</Description>';
       type 'C-3'
        ports
         power in p [3,1];
         signal out state [3,1];
        restrictions
         causality preferred out p;
       end;
       icon bg top
        figures
         text 'C' 191.8 216.2 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] {mN/m};
equations
    state = int(p.f);
    p.e = inverse(c) *state;
implementation_end;
      C4 191.8 232.2
       description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\2D\C-2.emx</LibraryPath>
  <TimeStamp>2007-9-25 12:7:27</TimeStamp>
</Description>';
       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' 191.8 232.2 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;
      plug output 396 216;
      OneJunction5 239.8 232.2
       description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:17:51</TimeStamp>
</Description>
</Information>';
       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' 239.8 232.2 color 0 18 bold;
       end;
       implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
      OneJunction7 239.8 216.2
       description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:17:51</TimeStamp>
</Description>
</Information>';
       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' 239.8 216.2 color 0 18 bold;
       end;
       implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
      OneJunction8 288 200
       description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:17:51</TimeStamp>
</Description>
</Information>';
       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' 288 200 color 0 18 bold;
       end;
       implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
      PowerMux 330 216
						specifications active 'rot_x'
							specification 'rot_x'
 description '<Information>
 <Description>
    <Version>4.8</Version>
  <LibraryPath>Bond Graph\MR\PowerMux-Rotation.emx</LibraryPath>
  <TimeStamp>2020-7-20 14:35:23</TimeStamp>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
  <AllowLibraryUpdate>True</AllowLibraryUpdate>
 </Description>
</Information>';
 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 328 192 328 240 color 0 width 2;
   rectangle 324 192 336 240 color -1;
   text '1' 333 210 color 8421504 8;
  terminals
   input 328 200 fixed;
   output 328 216 fixed;
   input_rot2 328 232 fixed;
   input_pos3 328 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 '<Description>
   <Version>4.1</Version>
  <LibraryPath>Bond Graph\PowerMux.emx</LibraryPath>
  <TimeStamp>2011-3-4 15:12:50</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
 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;
   causality constraint not_equal input_rot2 output;
   causality constraint not_equal input_pos3 output;
 end;
 icon bg bottom
  figures
   line 242 274 290 274 color 0 width 2;
   rectangle 242 266 290 278 color -1;
   text '1' 260 269 color 8421504 8;
  terminals
   input 250 274 fixed;
   output 266 274 fixed;
   input_rot2 282 274 fixed;
   input_pos3 266 274 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 '<Information>
 <Description>
    <Version>4.8</Version>
  <LibraryPath>Bond Graph\MR\PowerMux-Rotation.emx</LibraryPath>
  <TimeStamp>2020-7-21 12:05:13</TimeStamp>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
  <AllowLibraryUpdate>True</AllowLibraryUpdate>
 </Description>
</Information>';
 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;
   causality constraint not_equal input_rot2 output;
   causality constraint not_equal input_pos3 output;
 end;
 icon bg bottom
  figures
   line 242 274 290 274 color 0 width 2;
   rectangle 242 266 290 278 color -1;
   text '1' 260 269 color 8421504 8;
  terminals
   input 250 274 fixed;
   output 266 274 fixed;
   input_rot2 282 274 fixed;
   input_pos3 266 274 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 288 152
       description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\R.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:35:37</TimeStamp>
</Description>
</Information>';
       type R
        ports
         power in p;
       end;
       icon bg top
        figures
         text 'R' 288 152 color 0 18 bold;
       end;
       implementation eq
parameters
	real r = 0.0001;
equations
	p.e = r * p.f;
implementation_end;
      R4 239.8 288.2
       description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\2D\R-2.emx</LibraryPath>
  <TimeStamp>2007-9-25 12:6:54</TimeStamp>
</Description>';
       type 'R-2'
        ports
         power in p [2,1];
       end;
       icon bg bottom
        figures
         text 'R' 239.8 288.2 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 239.8 168.2
       description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\3D\R-3.emx</LibraryPath>
  <TimeStamp>2007-9-25 12:11:54</TimeStamp>
</Description>';
       type 'R-3'
        ports
         power in p [3,1];
       end;
       icon bg top
        figures
         text 'R' 239.8 168.2 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;
     end;
     connections
      C1\p <= OneJunction7\p;
      OneJunction5\p => C4\p;
      OneJunction5\p => PowerMux\input_rot2;
      OneJunction5\p => R4\p;
      OneJunction7\p => PowerMux\input_pos3;
      OneJunction7\p => R5\p;
      OneJunction8\p => PowerMux\input;
      PowerMux\output => output;
      R\p <= OneJunction8\p;
     end;
    implementation_end;
   Joint_dynE 88 168
    description '<Description>
	<Version>4.8</Version>
	<IsMainModel>1</IsMainModel>
	</Description>';
    type Submodel
     ports
      power out output [6,1];
    end;
    icon bg
     figures
      rectangle 48 152 128 184 color 0 fill 55295;
      text 'name' 88 168 color 0 'Clear Sans' 16;
    end;
    implementation bg
     submodels
      C1 191.8 216.2
       description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\3D\C-3.emx</LibraryPath>
  <TimeStamp>2007-9-25 12:12:8</TimeStamp>
</Description>';
       type 'C-3'
        ports
         power in p [3,1];
         signal out state [3,1];
        restrictions
         causality preferred out p;
       end;
       icon bg top
        figures
         text 'C' 191.8 216.2 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] {mN/m};
equations
    state = int(p.f);
    p.e = inverse(c) *state;
implementation_end;
      C4 191.8 232.2
       description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\2D\C-2.emx</LibraryPath>
  <TimeStamp>2007-9-25 12:7:27</TimeStamp>
</Description>';
       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' 191.8 232.2 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;
      plug output 396 216;
      OneJunction5 239.8 232.2
       description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:17:51</TimeStamp>
</Description>
</Information>';
       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' 239.8 232.2 color 0 18 bold;
       end;
       implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
      OneJunction7 239.8 216.2
       description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:17:51</TimeStamp>
</Description>
</Information>';
       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' 239.8 216.2 color 0 18 bold;
       end;
       implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
      OneJunction8 288 200
       description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:17:51</TimeStamp>
</Description>
</Information>';
       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' 288 200 color 0 18 bold;
       end;
       implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
      PowerMux 330 216
						specifications active 'rot_x'
							specification 'rot_x'
 description '<Information>
 <Description>
    <Version>4.8</Version>
  <LibraryPath>Bond Graph\MR\PowerMux-Rotation.emx</LibraryPath>
  <TimeStamp>2020-7-20 14:35:23</TimeStamp>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
  <AllowLibraryUpdate>True</AllowLibraryUpdate>
 </Description>
</Information>';
 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 328 192 328 240 color 0 width 2;
   rectangle 324 192 336 240 color -1;
   text '1' 333 210 color 8421504 8;
  terminals
   input 328 200 fixed;
   output 328 216 fixed;
   input_rot2 328 232 fixed;
   input_pos3 328 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 '<Description>
   <Version>4.1</Version>
  <LibraryPath>Bond Graph\PowerMux.emx</LibraryPath>
  <TimeStamp>2011-3-4 15:12:50</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
 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;
   causality constraint not_equal input_rot2 output;
   causality constraint not_equal input_pos3 output;
 end;
 icon bg bottom
  figures
   line 242 274 290 274 color 0 width 2;
   rectangle 242 266 290 278 color -1;
   text '1' 260 269 color 8421504 8;
  terminals
   input 250 274 fixed;
   output 266 274 fixed;
   input_rot2 282 274 fixed;
   input_pos3 266 274 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 '<Information>
 <Description>
    <Version>4.8</Version>
  <LibraryPath>Bond Graph\MR\PowerMux-Rotation.emx</LibraryPath>
  <TimeStamp>2020-7-21 12:05:13</TimeStamp>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
  <AllowLibraryUpdate>True</AllowLibraryUpdate>
 </Description>
</Information>';
 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;
   causality constraint not_equal input_rot2 output;
   causality constraint not_equal input_pos3 output;
 end;
 icon bg bottom
  figures
   line 242 274 290 274 color 0 width 2;
   rectangle 242 266 290 278 color -1;
   text '1' 260 269 color 8421504 8;
  terminals
   input 250 274 fixed;
   output 266 274 fixed;
   input_rot2 282 274 fixed;
   input_pos3 266 274 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 288 152
       description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\R.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:35:37</TimeStamp>
</Description>
</Information>';
       type R
        ports
         power in p;
       end;
       icon bg top
        figures
         text 'R' 288 152 color 0 18 bold;
       end;
       implementation eq
parameters
	real r = 0.0001;
equations
	p.e = r * p.f;
implementation_end;
      R4 239.8 288.2
       description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\2D\R-2.emx</LibraryPath>
  <TimeStamp>2007-9-25 12:6:54</TimeStamp>
</Description>';
       type 'R-2'
        ports
         power in p [2,1];
       end;
       icon bg bottom
        figures
         text 'R' 239.8 288.2 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 239.8 168.2
       description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\3D\R-3.emx</LibraryPath>
  <TimeStamp>2007-9-25 12:11:54</TimeStamp>
</Description>';
       type 'R-3'
        ports
         power in p [3,1];
       end;
       icon bg top
        figures
         text 'R' 239.8 168.2 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;
     end;
     connections
      C1\p <= OneJunction7\p;
      OneJunction5\p => C4\p;
      OneJunction5\p => PowerMux\input_rot2;
      OneJunction5\p => R4\p;
      OneJunction7\p => PowerMux\input_pos3;
      OneJunction7\p => R5\p;
      OneJunction8\p => PowerMux\input;
      PowerMux\output => output;
      R\p <= OneJunction8\p;
     end;
    implementation_end;
   Joint_dynF 864 48
    description '<Description>
	<Version>4.8</Version>
	<IsMainModel>1</IsMainModel>
	</Description>';
    type Submodel
     ports
      power out output [6,1];
    end;
    icon bg
     figures
      rectangle 824 32 904 64 color 0 fill 55295;
      text 'name' 864 48 color 0 'Clear Sans' 16;
    end;
    implementation bg
     submodels
      C1 191.8 216.2
       description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\3D\C-3.emx</LibraryPath>
  <TimeStamp>2007-9-25 12:12:8</TimeStamp>
</Description>';
       type 'C-3'
        ports
         power in p [3,1];
         signal out state [3,1];
        restrictions
         causality preferred out p;
       end;
       icon bg top
        figures
         text 'C' 191.8 216.2 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] {mN/m};
equations
    state = int(p.f);
    p.e = inverse(c) *state;
implementation_end;
      C4 191.8 232.2
       description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\2D\C-2.emx</LibraryPath>
  <TimeStamp>2007-9-25 12:7:27</TimeStamp>
</Description>';
       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' 191.8 232.2 color 0 18 bold;
       end;
       implementation eq
parameters
	real c[2,2] = [1, 0.0; 0.0, 1]  {uN.m/rad};
equations
    state = int(p.f);
    p.e = inverse(c) *state;
implementation_end;
      plug output 396 216;
      OneJunction5 239.8 232.2
       description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:17:51</TimeStamp>
</Description>
</Information>';
       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' 239.8 232.2 color 0 18 bold;
       end;
       implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
      OneJunction7 239.8 216.2
       description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:17:51</TimeStamp>
</Description>
</Information>';
       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' 239.8 216.2 color 0 18 bold;
       end;
       implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
      OneJunction8 304 200
       description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:17:51</TimeStamp>
</Description>
</Information>';
       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' 304 200 color 0 18 bold;
       end;
       implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
      PowerMux 330 216
						specifications active 'rot_z'
							specification 'rot_x'
description '<Information>
 <Description>
    <Version>4.8</Version>
  <LibraryPath>Bond Graph\MR\PowerMux-Rotation.emx</LibraryPath>
  <TimeStamp>2020-7-20 14:35:23</TimeStamp>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
  <AllowLibraryUpdate>True</AllowLibraryUpdate>
 </Description>
</Information>';
 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 328 192 328 240 color 0 width 2;
   rectangle 324 192 336 240 color -1;
   text '1' 333 210 color 8421504 8;
  terminals
   input 328 200 fixed;
   output 328 216 fixed;
   input_rot2 328 232 fixed;
   input_pos3 328 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 '<Description>
   <Version>4.1</Version>
  <LibraryPath>Bond Graph\PowerMux.emx</LibraryPath>
  <TimeStamp>2011-3-4 15:12:50</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
 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;
   causality constraint not_equal input_rot2 output;
   causality constraint not_equal input_pos3 output;
 end;
 icon bg bottom
  figures
   line 242 274 290 274 color 0 width 2;
   rectangle 242 266 290 278 color -1;
   text '1' 260 269 color 8421504 8;
  terminals
   input 250 274 fixed;
   output 266 274 fixed;
   input_rot2 282 274 fixed;
   input_pos3 266 274 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 '<Information>
 <Description>
    <Version>4.8</Version>
  <LibraryPath>Bond Graph\MR\PowerMux-Rotation.emx</LibraryPath>
  <TimeStamp>2020-7-21 12:05:13</TimeStamp>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
  <AllowLibraryUpdate>True</AllowLibraryUpdate>
 </Description>
</Information>';
 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;
   causality constraint not_equal input_rot2 output;
   causality constraint not_equal input_pos3 output;
 end;
 icon bg bottom
  figures
   line 328 192 328 240 color 0 width 2;
   rectangle 324 192 336 240 color -1;
   text '1' 333 210 color 8421504 8;
  terminals
   input 328 200 fixed;
   output 328 216 fixed;
   input_rot2 328 232 fixed;
   input_pos3 328 216 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 304 152
       description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\R.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:35:37</TimeStamp>
</Description>
</Information>';
       type R
        ports
         power in p;
       end;
       icon bg top
        figures
         text 'R' 304 152 color 0 18 bold;
       end;
       implementation eq
parameters
	real r = 0.001;
equations
	p.e = r * p.f;
implementation_end;
      R4 239.8 288.2
       description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\2D\R-2.emx</LibraryPath>
  <TimeStamp>2007-9-25 12:6:54</TimeStamp>
</Description>';
       type 'R-2'
        ports
         power in p [2,1];
       end;
       icon bg bottom
        figures
         text 'R' 239.8 288.2 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 239.8 168.2
       description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\3D\R-3.emx</LibraryPath>
  <TimeStamp>2007-9-25 12:11:54</TimeStamp>
</Description>';
       type 'R-3'
        ports
         power in p [3,1];
       end;
       icon bg top
        figures
         text 'R' 239.8 168.2 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;
     end;
     connections
      C1\p <= OneJunction7\p;
      OneJunction5\p => C4\p;
      OneJunction5\p => PowerMux\input_rot2;
      OneJunction5\p => R4\p;
      OneJunction7\p => PowerMux\input_pos3;
      OneJunction7\p => R5\p;
      OneJunction8\p => PowerMux\input;
      PowerMux\output => output;
      R\p <= OneJunction8\p;
     end;
    implementation_end;
   LiftingArm 912 240
    description '<Description>
	<Version>4.8</Version>
	<IsMainModel>1</IsMainModel>
	</Description>';
    type Submodel
     ports
      signal in Hin [4,4];
      power in Pin [6,1];
      power out Pout [6,1];
    end;
    icon bg bottom
     figures
      rectangle 840 208 984 272 color 0 fill 6008319;
      text 'name' 880 232 color 0 'Clear Sans' 16;
     terminals
      Hin 840 256 fixed;
      Pin 984 224 fixed;
      Pout 840 224 fixed;
    end;
    implementation bg
     submodels
      Body_Lift1 208 272
       description '<Description><Version>4.0</Version>
   <LibraryPath>Template\Submodel-Equation.emx</LibraryPath>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
   <TimeStamp>2007-11-1 22:32:1</TimeStamp>
   <AllowLibraryUpdate>False</AllowLibraryUpdate>
</Description>';
       type 'Submodel-Equation'
        ports
         signal in input [4,4];
       end;
       implementation eq
parameters
	real dimension[3] = [0.02;0.02;0.02] {m};
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;
      Body_Lift2 488 272
       description '<Description><Version>4.0</Version>
   <LibraryPath>Template\Submodel-Equation.emx</LibraryPath>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
   <TimeStamp>2007-11-1 22:32:1</TimeStamp>
   <AllowLibraryUpdate>False</AllowLibraryUpdate>
</Description>';
       type 'Submodel-Equation'
        ports
         signal in input [4,4];
       end;
       implementation eq
parameters
	real dimension[3] = [0.01;0.003;0.002] {m};
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;
      Body_Lift3 872 272
       description '<Description><Version>4.0</Version>
   <LibraryPath>Template\Submodel-Equation.emx</LibraryPath>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
   <TimeStamp>2007-11-1 22:32:1</TimeStamp>
   <AllowLibraryUpdate>False</AllowLibraryUpdate>
</Description>';
       type 'Submodel-Equation'
        ports
         signal in input [4,4];
       end;
       implementation eq
parameters
	real dimension[3] = [0.003;0.025;0.001] {m};
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;
      Body_Lift4 1232 272
       description '<Description><Version>4.0</Version>
   <LibraryPath>Template\Submodel-Equation.emx</LibraryPath>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
   <TimeStamp>2007-11-1 22:32:1</TimeStamp>
   <AllowLibraryUpdate>False</AllowLibraryUpdate>
</Description>';
       type 'Submodel-Equation'
        ports
         signal in input [4,4];
       end;
       implementation eq
parameters
	real dimension[3] = [0.0159;0.003;0.002] {m};
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;
      COM 504 112
       description '<Information><Description><Version>4.8</Version><IsMainModel>1</IsMainModel><LibraryPath>Bond Graph\MR\center_of_mass_v2.emx</LibraryPath><TimeStamp>2020-7-21 12:24:38</TimeStamp></Description><Attributes><GlobalRelations>parameters
	real density = 1400 {kg/m3};
	real dimension[3] = [0.01;0.003;0.002] {m};
variables
	real I[3,1] {N.m.s};
	real m {kg};
initialequations
	m = dimension[1] *  dimension[2] * dimension[3] * density;
	I[1] = m/12 * ( dimension[2]^2 + dimension[3]^2);
	I[2] = m/12 * ( dimension[1]^2 + dimension[3]^2);
	I[3] = m/12 * ( dimension[1]^2 + dimension[2]^2);</GlobalRelations></Attributes></Information>';
       type Submodel
        ports
         signal in Hin [4,4];
         signal out Hout [4,4];
         power out p [6,1];
       end;
       icon bg bottom
        figures
         rectangle 472 96 536 128 color 0 fill 139;
         text 'COM' 504 112 color 0 'Clear Sans' 16;
        terminals
         Hin 488 128 fixed;
         p 520 128 fixed;
       end;
       implementation bg
        submodels
         AdHi0 544 400
          description '<Information><Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues><LibraryPath></LibraryPath><TimeStamp>2007-9-25 12:3:3</TimeStamp><AllowLibraryUpdate>True</AllowLibraryUpdate></Description></Information>';
          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 624 336
          description '<Information><Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues><LibraryPath></LibraryPath><TimeStamp>2007-10-31 11:43:6</TimeStamp><AllowLibraryUpdate>True</AllowLibraryUpdate></Description></Information>';
          type MGY
           ports
            power in p1 [6,1];
          end;
          icon bg top
           figures
            text 'MGY' 624 336 color 0 18 bold;
          end;
          implementation eq
//EJS / Gyroscopic effects
variables
	real global I[3];
	real global m;
	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 624 400
          description '<Information><Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues><LibraryPath></LibraryPath><TimeStamp>2007-9-25 12:3:26</TimeStamp><AllowLibraryUpdate>True</AllowLibraryUpdate></Description></Information>';
          type Se
           ports
            power out p [6,1];
           restrictions
            causality fixed out p;
          end;
          icon bg bottom
           figures
            text 'Se' 624 400 color 0 18 bold;
          end;
          implementation eq
variables
	real global m;
	real effort[6];
equations
	effort = [0;0;0;0;0;-g_n*m];
	p.e = effort;
implementation_end;
         InertialTensor 544 256
          description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\3D\I-3.emx</LibraryPath>
  <TimeStamp>2007-9-25 12:12:14</TimeStamp>
</Description>';
          type 'I-3'
           ports
            power in p [6,1];
            signal out state [6,1];
           restrictions
            causality preferred in p;
          end;
          icon bg bottom
           figures
            text 'I' 544 256 color 0 18 bold;
          end;
          implementation eq
variables
	real global I[3];
	real global m;
	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 433.4 496;
         plug Hout 691.2 496;
         plug p 439.4 336;
         Splitter1 544 496
          description '<Description><Version>4.0</Version>
   <LibraryPath>Signal\Block Diagram\Splitter.emx</LibraryPath>
  <TimeStamp>2008-01-17 11:28:29</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
          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 '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
 <TimeStamp>2007-9-27 9:51:18</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
   <Description></Description>
</Description>';
          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;
         ZeroJunction1 504 336
          description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\ZeroJunction.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:45:16</TimeStamp>
</Description>
</Information>';
          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
           figures
            text '0' 504 336 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
         AdHi0\p2 => Ta0j\p;
         Gravity\p => AdHi0\p1;
         Hin -> Splitter1\input;
         Splitter1\output -> AdHi0\H;
         Splitter1\output -> Hout;
         Ta0j\p => EJS\p1;
         Ta0j\p => InertialTensor\p;
         ZeroJunction1\p => p;
         ZeroJunction1\p => Ta0j\p;
        end;
       implementation_end;
      COM1 888 112
       description '<Information><Description><Version>4.8</Version><IsMainModel>1</IsMainModel><LibraryPath>Bond Graph\MR\center_of_mass_v2.emx</LibraryPath><TimeStamp>2020-7-21 12:24:38</TimeStamp></Description><Attributes><GlobalRelations>parameters
	real density = 1400 {kg/m3};
	real dimension[3] = [0.003;0.025;0.001] {m};
variables
	real I[3,1] {N.m.s};
	real m {kg};
initialequations
	m = dimension[1] *  dimension[2] * dimension[3] * density;
	I[1] = m/12 * ( dimension[2]^2 + dimension[3]^2);
	I[2] = m/12 * ( dimension[1]^2 + dimension[3]^2);
	I[3] = m/12 * ( dimension[1]^2 + dimension[2]^2);</GlobalRelations></Attributes></Information>';
       type Submodel
        ports
         signal in Hin [4,4];
         signal out Hout [4,4];
         power out p [6,1];
       end;
       icon bg bottom
        figures
         rectangle 856 96 920 128 color 0 fill 139;
         text 'COM' 888 112 color 0 'Clear Sans' 16;
        terminals
         Hin 872 128 fixed;
         p 904 128 fixed;
       end;
       implementation bg
        submodels
         AdHi0 544 400
          description '<Information><Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues><LibraryPath></LibraryPath><TimeStamp>2007-9-25 12:3:3</TimeStamp><AllowLibraryUpdate>True</AllowLibraryUpdate></Description></Information>';
          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 624 336
          description '<Information><Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues><LibraryPath></LibraryPath><TimeStamp>2007-10-31 11:43:6</TimeStamp><AllowLibraryUpdate>True</AllowLibraryUpdate></Description></Information>';
          type MGY
           ports
            power in p1 [6,1];
          end;
          icon bg top
           figures
            text 'MGY' 624 336 color 0 18 bold;
          end;
          implementation eq
//EJS / Gyroscopic effects
variables
	real global I[3];
	real global m;
	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 624 400
          description '<Information><Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues><LibraryPath></LibraryPath><TimeStamp>2007-9-25 12:3:26</TimeStamp><AllowLibraryUpdate>True</AllowLibraryUpdate></Description></Information>';
          type Se
           ports
            power out p [6,1];
           restrictions
            causality fixed out p;
          end;
          icon bg bottom
           figures
            text 'Se' 624 400 color 0 18 bold;
          end;
          implementation eq
variables
	real global m;
	real effort[6];
equations
	effort = [0;0;0;0;0;-g_n*m];
	p.e = effort;
implementation_end;
         InertialTensor 544 256
          description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\3D\I-3.emx</LibraryPath>
  <TimeStamp>2007-9-25 12:12:14</TimeStamp>
</Description>';
          type 'I-3'
           ports
            power in p [6,1];
            signal out state [6,1];
           restrictions
            causality preferred in p;
          end;
          icon bg bottom
           figures
            text 'I' 544 256 color 0 18 bold;
          end;
          implementation eq
variables
	real global I[3];
	real global m;
	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 433.4 496;
         plug Hout 691.2 496;
         plug p 439.4 336;
         Splitter1 544 496
          description '<Description><Version>4.0</Version>
   <LibraryPath>Signal\Block Diagram\Splitter.emx</LibraryPath>
  <TimeStamp>2008-01-17 11:28:29</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
          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 '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
 <TimeStamp>2007-9-27 9:51:18</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
   <Description></Description>
</Description>';
          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;
         ZeroJunction1 504 336
          description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\ZeroJunction.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:45:16</TimeStamp>
</Description>
</Information>';
          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
           figures
            text '0' 504 336 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
         AdHi0\p2 => Ta0j\p;
         Gravity\p => AdHi0\p1;
         Hin -> Splitter1\input;
         Splitter1\output -> AdHi0\H;
         Splitter1\output -> Hout;
         Ta0j\p => EJS\p1;
         Ta0j\p => InertialTensor\p;
         ZeroJunction1\p => p;
         ZeroJunction1\p => Ta0j\p;
        end;
       implementation_end;
      Joint 296 184
       description '<Information>
 <Description>
    <Version>4.8</Version>
<IsMainModel>1</IsMainModel>
    <LibraryPath>Bond Graph\MR\joint-v3.emx</LibraryPath>
  <TimeStamp>2020-7-21 12:08:53</TimeStamp>
</Description>
</Information>';
       type 'Submodel-v3'
        ports
         power in Pin [6,1];
         power in Pdiff [6,1];
         signal in Hin [4,4];
         signal out Hout [4,4];
         signal out Hdiff [4,4];
         power out Pout [6,1];
       end;
       icon bg bottom
        figures
         rectangle 272 152 320 216 color 0 fill 14745599;
         text 'Joint' 296 184 color 0 'Clear Sans' 16;
        terminals
         Pin 320 168 fixed;
         Hin 272 200 fixed;
         Hout 320 200 fixed;
         Pout 272 168 fixed;
       end;
       implementation bg
        submodels
         AdHji 424 424
          description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\MTF.emx</LibraryPath>
 <TimeStamp>2007-9-25 12:3:3</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
          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 184 311.9
          description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\FlowSensor.emx</LibraryPath>
  <TimeStamp>2011-11-29 15:50:53</TimeStamp>
</Description>
</Information>';
          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 177.1 304.8 190.9 319.1 color 0 fill 16777215;
            text 'f' 184 311.2 color 0;
          end;
          implementation eq
equations
	p2.f = p1.f;
	p1.e = p2.e;
	flow = p1.f;
implementation_end;
         Hmatrix 256 312
          description '<Information><Description><Version>4.0</Version><LibraryPath>Template\Submodel-Equation.emx</LibraryPath><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues><TimeStamp>2007-11-1 22:32:1</TimeStamp><AllowLibraryUpdate>False</AllowLibraryUpdate></Description></Information>';
          type 'Submodel-Equation'
           ports
            signal in flow [6,1];
            signal out H [4,4];
          end;
          icon bg
           figures
            rectangle 224 296 288 328 color 0 fill 15132390;
            text 'name' 256 312 color 0 'Clear Sans' 16;
          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
	real dq[4];
	real Wb[3,4];
equations
	dq = transpose(Wb) * flow[1:3] ./ 2;
	q = int(dq,init);
	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]];
	Wb = [	-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 '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Signal\Block Diagram\Gain.emx</LibraryPath>
 <TimeStamp>2007-9-26 12:15:12</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
          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 Pin 492.1 424;
         plug Pdiff 184 225;
         plug Hin 130.8 576;
         plug Hout 478.4 576;
         plug Hdiff 320 222;
         plug Pout 134.7 424;
         Splitter2 320 312
          description '<Description><Version>4.0</Version>
   <LibraryPath>Signal\Block Diagram\Splitter.emx</LibraryPath>
  <TimeStamp>2008-01-17 11:28:29</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
          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 184 424
          description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\ZeroJunction.emx</LibraryPath>
 <TimeStamp>2007-9-27 9:51:43</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
          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' 184 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 -> Hdiff;
         Splitter2\output -> MatrixMul\input1;
         Wbai\p <= AdHji\p1;
         Wbai\p => Pout;
        end;
       implementation_end;
      Joint1 712 184
       description '<Information>
 <Description>
    <Version>4.8</Version>
<IsMainModel>1</IsMainModel>
    <LibraryPath>Bond Graph\MR\joint-v3.emx</LibraryPath>
  <TimeStamp>2020-7-21 12:08:53</TimeStamp>
</Description>
</Information>';
       type 'Submodel-v3'
        ports
         power in Pin [6,1];
         power in Pdiff [6,1];
         signal in Hin [4,4];
         signal out Hout [4,4];
         signal out Hdiff [4,4];
         power out Pout [6,1];
       end;
       icon bg bottom
        figures
         rectangle 688 152 736 216 color 0 fill 14745599;
         text 'Joint' 712 184 color 0 'Clear Sans' 16;
        terminals
         Pin 736 168 fixed;
         Hin 688 200 fixed;
         Hout 736 200 fixed;
         Pout 688 168 fixed;
       end;
       implementation bg
        submodels
         AdHji 424 424
          description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\MTF.emx</LibraryPath>
 <TimeStamp>2007-9-25 12:3:3</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
          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 184 311.9
          description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\FlowSensor.emx</LibraryPath>
  <TimeStamp>2011-11-29 15:50:53</TimeStamp>
</Description>
</Information>';
          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 177.1 304.8 190.9 319.1 color 0 fill 16777215;
            text 'f' 184 311.2 color 0;
          end;
          implementation eq
equations
	p2.f = p1.f;
	p1.e = p2.e;
	flow = p1.f;
implementation_end;
         Hmatrix 256 312
          description '<Information><Description><Version>4.0</Version><LibraryPath>Template\Submodel-Equation.emx</LibraryPath><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues><TimeStamp>2007-11-1 22:32:1</TimeStamp><AllowLibraryUpdate>False</AllowLibraryUpdate></Description></Information>';
          type 'Submodel-Equation'
           ports
            signal in flow [6,1];
            signal out H [4,4];
          end;
          icon bg
           figures
            rectangle 224 296 288 328 color 0 fill 15132390;
            text 'name' 256 312 color 0 'Clear Sans' 16;
          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
	real dq[4];
	real Wb[3,4];
equations
	dq = transpose(Wb) * flow[1:3] ./ 2;
	q = int(dq,init);
	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]];
	Wb = [	-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 '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Signal\Block Diagram\Gain.emx</LibraryPath>
 <TimeStamp>2007-9-26 12:15:12</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
          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 Pin 492.1 424;
         plug Pdiff 184 225;
         plug Hin 130.8 576;
         plug Hout 478.4 576;
         plug Hdiff 320 222;
         plug Pout 134.7 424;
         Splitter2 320 312
          description '<Description><Version>4.0</Version>
   <LibraryPath>Signal\Block Diagram\Splitter.emx</LibraryPath>
  <TimeStamp>2008-01-17 11:28:29</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
          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 184 424
          description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\ZeroJunction.emx</LibraryPath>
 <TimeStamp>2007-9-27 9:51:43</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
          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' 184 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 -> Hdiff;
         Splitter2\output -> MatrixMul\input1;
         Wbai\p <= AdHji\p1;
         Wbai\p => Pout;
        end;
       implementation_end;
      Joint2 1064 184
       description '<Information>
 <Description>
    <Version>4.8</Version>
<IsMainModel>1</IsMainModel>
    <LibraryPath>Bond Graph\MR\joint-v3.emx</LibraryPath>
  <TimeStamp>2020-7-21 12:08:53</TimeStamp>
</Description>
</Information>';
       type 'Submodel-v3'
        ports
         power in Pin [6,1];
         power in Pdiff [6,1];
         signal in Hin [4,4];
         signal out Hout [4,4];
         signal out Hdiff [4,4];
         power out Pout [6,1];
       end;
       icon bg bottom
        figures
         rectangle 1040 152 1088 216 color 0 fill 14745599;
         text 'Joint' 1064 184 color 0 'Clear Sans' 16;
        terminals
         Pin 1088 168 fixed;
         Hin 1040 200 fixed;
         Hout 1088 200 fixed;
         Pout 1040 168 fixed;
       end;
       implementation bg
        submodels
         AdHji 424 424
          description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\MTF.emx</LibraryPath>
 <TimeStamp>2007-9-25 12:3:3</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
          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 184 311.9
          description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\FlowSensor.emx</LibraryPath>
  <TimeStamp>2011-11-29 15:50:53</TimeStamp>
</Description>
</Information>';
          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 177.1 304.8 190.9 319.1 color 0 fill 16777215;
            text 'f' 184 311.2 color 0;
          end;
          implementation eq
equations
	p2.f = p1.f;
	p1.e = p2.e;
	flow = p1.f;
implementation_end;
         Hmatrix 256 312
          description '<Information><Description><Version>4.0</Version><LibraryPath>Template\Submodel-Equation.emx</LibraryPath><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues><TimeStamp>2007-11-1 22:32:1</TimeStamp><AllowLibraryUpdate>False</AllowLibraryUpdate></Description></Information>';
          type 'Submodel-Equation'
           ports
            signal in flow [6,1];
            signal out H [4,4];
          end;
          icon bg
           figures
            rectangle 224 296 288 328 color 0 fill 15132390;
            text 'name' 256 312 color 0 'Clear Sans' 16;
          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
	real dq[4];
	real Wb[3,4];
equations
	dq = transpose(Wb) * flow[1:3] ./ 2;
	q = int(dq,init);
	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]];
	Wb = [	-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 '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Signal\Block Diagram\Gain.emx</LibraryPath>
 <TimeStamp>2007-9-26 12:15:12</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
          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 Pin 492.1 424;
         plug Pdiff 184 225;
         plug Hin 130.8 576;
         plug Hout 478.4 576;
         plug Hdiff 320 222;
         plug Pout 134.7 424;
         Splitter2 320 312
          description '<Description><Version>4.0</Version>
   <LibraryPath>Signal\Block Diagram\Splitter.emx</LibraryPath>
  <TimeStamp>2008-01-17 11:28:29</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
          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 184 424
          description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\ZeroJunction.emx</LibraryPath>
 <TimeStamp>2007-9-27 9:51:43</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
          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' 184 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 -> Hdiff;
         Splitter2\output -> MatrixMul\input1;
         Wbai\p <= AdHji\p1;
         Wbai\p => Pout;
        end;
       implementation_end;
      Joint_dynF1 296 80
       description '<Description>
	<Version>4.8</Version>
	<IsMainModel>1</IsMainModel>
	</Description>';
       type Submodel
        ports
         power out output [6,1];
       end;
       icon bg
        figures
         rectangle 256 64 336 96 color 0 fill 15132390;
         text 'name' 296 80 color 0 'Clear Sans' 16;
       end;
       implementation bg
        submodels
         C 344 160
          description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\C.emx</LibraryPath>
  <TimeStamp>2011-11-29 15:58:35</TimeStamp>
</Description>
</Information>';
          type C
           ports
            power in p;
            signal out state;
           restrictions
            causality preferred out p;
          end;
          icon bg bottom
           figures
            text 'C' 344 160 color 0 18 bold;
          end;
          implementation eq
parameters
	real c = 0.001;
equations
	state = int(p.f);
	p.e = state / c;
implementation_end;
         C1 191.8 216.2
          description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\3D\C-3.emx</LibraryPath>
  <TimeStamp>2007-9-25 12:12:8</TimeStamp>
</Description>';
          type 'C-3'
           ports
            power in p [3,1];
            signal out state [3,1];
           restrictions
            causality preferred out p;
          end;
          icon bg top
           figures
            text 'C' 191.8 216.2 color 0 18 bold;
          end;
          implementation eq
parameters
	real c[3,3] = [1, 0.0, 0.0; 0.0, 1, 0.0; 0.0, 0.0, 1] {mN/m};
equations
    state = int(p.f);
    p.e = inverse(c) *state;
implementation_end;
         C4 191.8 232.2
          description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\2D\C-2.emx</LibraryPath>
  <TimeStamp>2007-9-25 12:7:27</TimeStamp>
</Description>';
          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' 191.8 232.2 color 0 18 bold;
          end;
          implementation eq
parameters
	real c[2,2] = [1, 0.0; 0.0, 1]  {mN.m/rad};
equations
    state = int(p.f);
    p.e = inverse(c) *state;
implementation_end;
         plug output 444 216;
         OneJunction3 288 160
          description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:17:51</TimeStamp>
</Description>
</Information>';
          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' 288 160 color 0 18 bold;
          end;
          implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
         OneJunction5 239.8 232.2
          description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:17:51</TimeStamp>
</Description>
</Information>';
          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' 239.8 232.2 color 0 18 bold;
          end;
          implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
         OneJunction7 239.8 216.2
          description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:17:51</TimeStamp>
</Description>
</Information>';
          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' 239.8 216.2 color 0 18 bold;
          end;
          implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
         OneJunction8 288 200
          description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\ZeroJunction.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:45:16</TimeStamp>
</Description>
</Information>';
          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' 288 200 color 0 18 bold;
          end;
          implementation eq
equations
	sum (direct (p.f)) = 0;
	equal (collect (p.e));
	effort = first (p.e);
implementation_end;
         PowerMux 378 216
									specifications active 'rot_z'
										specification 'rot_x'
description '<Information>
 <Description>
    <Version>4.8</Version>
  <LibraryPath>Bond Graph\MR\PowerMux-Rotation.emx</LibraryPath>
  <TimeStamp>2020-7-20 14:35:23</TimeStamp>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
  <AllowLibraryUpdate>True</AllowLibraryUpdate>
 </Description>
</Information>';
 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 328 192 328 240 color 0 width 2;
   rectangle 324 192 336 240 color -1;
   text '1' 333 210 color 8421504 8;
  terminals
   input 328 200 fixed;
   output 328 216 fixed;
   input_rot2 328 232 fixed;
   input_pos3 328 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 '<Description>
   <Version>4.1</Version>
  <LibraryPath>Bond Graph\PowerMux.emx</LibraryPath>
  <TimeStamp>2011-3-4 15:12:50</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
 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;
   causality constraint not_equal input_rot2 output;
   causality constraint not_equal input_pos3 output;
 end;
 icon bg bottom
  figures
   line 328 192 328 240 color 0 width 2;
   rectangle 324 192 336 240 color -1;
   text '1' 333 210 color 8421504 8;
  terminals
   input 328 200 fixed;
   output 328 216 fixed;
   input_rot2 328 232 fixed;
   input_pos3 328 216 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 '<Information>
 <Description>
    <Version>4.8</Version>
  <LibraryPath>Bond Graph\MR\PowerMux-Rotation.emx</LibraryPath>
  <TimeStamp>2020-7-21 12:05:13</TimeStamp>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
  <AllowLibraryUpdate>True</AllowLibraryUpdate>
 </Description>
</Information>';
 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;
   causality constraint not_equal input_rot2 output;
   causality constraint not_equal input_pos3 output;
 end;
 icon bg bottom
  figures
   line 376 192 376 240 color 0 width 2;
   rectangle 372 192 384 240 color -1;
   text '1' 381 210 color 8421504 8;
  terminals
   input 376 200 fixed;
   output 376 216 fixed;
   input_rot2 376 232 fixed;
   input_pos3 376 216 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 288 112
          description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\R.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:35:37</TimeStamp>
</Description>
</Information>';
          type R
           ports
            power in p;
          end;
          icon bg top
           figures
            text 'R' 288 112 color 0 18 bold;
          end;
          implementation eq
parameters
	real r = 10;
equations
	p.e = r * p.f;
implementation_end;
         R4 239.8 288.2
          description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\2D\R-2.emx</LibraryPath>
  <TimeStamp>2007-9-25 12:6:54</TimeStamp>
</Description>';
          type 'R-2'
           ports
            power in p [2,1];
          end;
          icon bg bottom
           figures
            text 'R' 239.8 288.2 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 239.8 168.2
          description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\3D\R-3.emx</LibraryPath>
  <TimeStamp>2007-9-25 12:11:54</TimeStamp>
</Description>';
          type 'R-3'
           ports
            power in p [3,1];
          end;
          icon bg top
           figures
            text 'R' 239.8 168.2 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;
         SG90 288 368
          description '<Information>
 <Description>
    <Version>4.8</Version>
<IsMainModel>1</IsMainModel>
    <LibraryPath>Motor\SG90.emx</LibraryPath>
  <TimeStamp>2020-7-27 10:46:51</TimeStamp>
</Description>
</Information>';
          type Submodel
           ports
            signal in effort;
            power out p;
          end;
          implementation bg
           submodels
            C 784 96
             description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\C.emx</LibraryPath>
  <TimeStamp>2011-11-29 15:58:35</TimeStamp>
</Description>
</Information>';
             type C
              ports
               power in p;
               signal out state;
              restrictions
               causality preferred out p;
             end;
             icon bg bottom
              figures
               text 'C' 784 96 color 0 18 bold;
             end;
             implementation eq
parameters
	real c = 0.001;
equations
	state = int(p.f);
	p.e = state / c;
implementation_end;
            Gain1 456 448
             description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Signal\Block Diagram\Gain.emx</LibraryPath>
  <TimeStamp>2007-9-26 12:15:12</TimeStamp>
</Description>';
             type Gain
              ports
               signal in input;
               signal out output;
             end;
             icon bg bottom
              figures
               rectangle 440.1 432 471.9 464 color 0 fill 15132390;
               text 'K' 456 448 color 16711680 16 bold;
             end;
             implementation eq
parameters
	real K = 5;		// gain
equations
	output = K * input;
    implementation_end;
            GY1 592 296
             description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\GY.emx</LibraryPath>
  <TimeStamp>2011-11-29 15:53:45</TimeStamp>
</Description>
</Information>';
             type GY
              ports
               power in p1;
               power out p2;
              restrictions
               causality constraint equal p1 p2;
             end;
             icon bg bottom
              figures
               text 'GY' 592 296 color 0 18 bold;
             end;
             implementation eq
parameters
	real r = 0.4;
equations
	p1.e = r * p2.f;
	p2.e = r * p1.f;
implementation_end;
            I 536 352
             description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\I.emx</LibraryPath>
  <TimeStamp>2011-11-29 15:55:55</TimeStamp>
</Description>
</Information>';
             type I
              ports
               power in p;
               signal out state;
              restrictions
               causality preferred in p;
             end;
             icon bg bottom
              figures
               text 'I' 536 352 color 0 18 bold;
             end;
             implementation eq
parameters
	real i = 0.1 {mH};
equations
    state = int(p.e);
    p.f = state / i;
implementation_end;
            Integrate 728 448
             description '<Information>
 <Description>
    <Version>4.3</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Signal\Block Diagram\Integrate.emx</LibraryPath>
  <TimeStamp>2013-3-8 14:47:42</TimeStamp>
</Description>
</Information>';
             type Integrate
              ports
               signal in input;
               signal out output;
             end;
             icon bg bottom
              figures
               rectangle 712 432 744 464 color 0 fill 15132390;
               text '∫' 728 448.3 color 16711680 'Lucida Sans' 21 italic;
             end;
             implementation eq
parameters
	real initial = 0;		// initial value
equations
	output = int (input, initial);
     implementation_end;
            MSe 456 296
             description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\MSe.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:12:33</TimeStamp>
</Description>
</Information>';
             type MSe
              ports
               power out p;
               signal in effort;
              restrictions
               causality fixed out p;
             end;
             icon bg bottom
              figures
               text 'MSe' 456 296 color 0 18 bold;
             end;
             implementation eq
variables
	real flow;
equations
	p.e = effort;
	flow = p.f;
implementation_end;
            plug effort 656 536;
            plug p 768 296;
            OneJunction 728 96
             description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:17:51</TimeStamp>
</Description>
</Information>';
             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' 728 96 color 0 18 bold;
             end;
             implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
            OneJunction1 536 296
             description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:17:51</TimeStamp>
</Description>
</Information>';
             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' 536 296 color 0 18 bold;
             end;
             implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
            OneJunction2 728 296
             description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:17:51</TimeStamp>
</Description>
</Information>';
             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' 728 296 color 0 18 bold;
             end;
             implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
            OneJunction4 680 160
             description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:17:51</TimeStamp>
</Description>
</Information>';
             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' 680 160 color 0 18 bold;
             end;
             implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
            PD 608 448
             description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Signal\Control\PID Control\Continuous\PD.emx</LibraryPath>
  <TimeStamp>2008-1-17 10:49:7</TimeStamp>
</Description>';
             type PD
              ports
               signal in error;
               signal out output;
             end;
             icon bg bottom
              figures
               rectangle 592 432 624 464 color 0 fill 15132390;
               text 'PD' 608.5 448.1 color 16711680 18 bold;
             end;
             implementation eq
parameters
	real kp = 2.0 {};			// Proportional gain
	real tauD = 1.0 {s};		// Derivative time constant: tauD > 0
	real beta = 0.1 {};		// Tameness constant: 0 < beta << 1
variables
	real state, rate;
equations
	rate = (kp * error - output) / (beta * tauD);
	state = int (rate);
	output = state + kp * error /  beta;
      implementation_end;
            PlusMinus1 656 448
             description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Signal\Block Diagram\PlusMinus.emx</LibraryPath>
  <TimeStamp>2007-9-27 10:15:13</TimeStamp>
</Description>';
             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 648 440 664 456 color 0 fill 16777215;
             end;
             implementation eq
equations
    output = sum (collect (plus)) - sum (collect (minus));
    implementation_end;
            R 536 240
             description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\R.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:35:37</TimeStamp>
</Description>
</Information>';
             type R
              ports
               power in p;
             end;
             icon bg bottom
              figures
               text 'R' 536 240 color 0 18 bold;
             end;
             implementation eq
parameters
	real r = 7.84 {ohm};
equations
	p.e = r * p.f;
implementation_end;
            R1 728 40
             description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\R.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:35:37</TimeStamp>
</Description>
</Information>';
             type R
              ports
               power in p;
             end;
             icon bg bottom
              figures
               text 'R' 728 40 color 0 18 bold;
             end;
             implementation eq
parameters
	real r = 10;
equations
	p.e = r * p.f;
implementation_end;
            Sf 632 160
             description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\Sf.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:38:03</TimeStamp>
</Description>
</Information>';
             type Sf
              ports
               power out p;
              restrictions
               causality fixed in p;
             end;
             icon bg bottom
              figures
               text 'Sf' 632 160 color 0 18 bold;
             end;
             implementation eq
parameters
	real flow = 1;
variables
	real effort;
equations
	p.f = flow;
	effort = p.e;
implementation_end;
            SignalLimiter1 536 448
             description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Signal\Block Diagram Non-Linear\SignalLimiter-Limit.emx</LibraryPath>
  <TimeStamp>2007-9-26 12:47:40</TimeStamp>
</Description>';
             type 'SignalLimiter-Limit'
              ports
               signal in input;
               signal out output;
             end;
             icon bg bottom
              figures
               group
                rectangle 520 432 552 464 color 0 fill 15132390;
                line 535.9 436.5 535.9 461 color 0 fill 15132390;
                line 523 448.2 548.7 448.2 color 0 fill 15132390;
                spline 529.9 455.1 541.9 441.4 color 16711680 fill 15132390 width 2;
                spline 541.3 442.2 549.9 441.8 color 16711680 fill 15132390 width 2;
                spline 523 455.6 529.9 455.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;
            Splitter2 680 448
             description '<Description><Version>4.0</Version>
   <LibraryPath>Signal\Block Diagram\Splitter.emx</LibraryPath>
  <TimeStamp>2008-01-17 11:28:29</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
             knot Splitter
              ports
               signal knot duplicatable out output [1];
               signal knot in input [1];
             end;
             icon bg ellipse
              figures
               ellipse 676.8 444.8 683.2 451.2 color -1 fill 0;
               ellipse 675.7 443.7 684.3 452.3 color -1;
              terminals
               input 680 448 fixed;
             end;
             implementation eq
equations
    collect (output) = input;
implementation_end;
            Submodel1 680 248
             description '<Description><Version>4.0</Version>
   <LibraryPath>Template\Submodel-Equation.emx</LibraryPath>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
   <TimeStamp>2007-11-1 22:32:1</TimeStamp>
   <AllowLibraryUpdate>False</AllowLibraryUpdate>
</Description>';
             type 'Submodel-Equation'
              ports
               signal in input;
               signal out output;
             end;
             implementation eq
parameters
	real angle = 90 {deg};
equations
	// start typing here
	output = abs(input) > angle;
 implementation_end;
            TF1 648 296
             description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\TF.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:43:47</TimeStamp>
</Description>
</Information>';
             type TF
              ports
               power in p1;
               power out p2;
              restrictions
               causality constraint not_equal p1 p2;
             end;
             icon bg bottom
              figures
               text 'TF' 648 296 color 0 18 bold;
             end;
             implementation eq
parameters
	real r = 0.008333;
equations
	p1.e = r * p2.e;
	p2.f = r * p1.f;
implementation_end;
            X0 728 160
             description '<Information>
 <Description>
  <IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\SwitchingZeroJunction.emx</LibraryPath>
  <TimeStamp>2012-12-21 14:27:32</TimeStamp>
  <Version>4.3</Version>
</Description>
</Information>';
             type X0
              ports
               power in p1;
               power out p2;
               power out p12;
               signal boolean in condition;
              restrictions
               causality fixed out p1;
               causality fixed out p2;
               causality fixed in p12;
             end;
             icon bg bottom
              figures
               text 'X0' 728 160 color 8388608 18 bold;
             end;
             implementation eq
equations
	p1.e = if condition then p12.e else 0 end;
	p2.e = p1.e;
	p12.f = if condition then p1.f-p2.f else 0 end;
 implementation_end;
           end;
           connections
            effort -> PlusMinus1\plus;
            Gain1\output -> MSe\effort;
            GY1\p2 => TF1\p1;
            Integrate\output -> Splitter2\input;
            MSe\p => OneJunction1\p;
            OneJunction\p => C\p;
            OneJunction\p => R1\p;
            OneJunction1\p => GY1\p1;
            OneJunction1\p => I\p;
            OneJunction1\p => R\p;
            OneJunction2\flow -> Integrate\input;
            OneJunction2\p => p;
            OneJunction4\p <= Sf\p;
            PD\output -> SignalLimiter1\input;
            PlusMinus1\output -> PD\error;
            SignalLimiter1\output -> Gain1\input;
            Splitter2\output -> PlusMinus1\minus;
            Splitter2\output -> Submodel1\input;
            Submodel1\output -> X0\condition 680 200;
            TF1\p2 => OneJunction2\p;
            X0\p1 <= OneJunction2\p;
            X0\p12 => OneJunction\p;
            X0\p2 => OneJunction4\p;
           end;
          implementation_end;
         Square 288 544
          description '<Description>
   <Version>4.0</Version>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Signal\Sources\WaveGenerator-Square.emx</LibraryPath>
  <TimeStamp>2009-3-5 16:05:33</TimeStamp>
</Description>';
          type 'WaveGenerator-Square'
           ports
            signal out output;
          end;
          icon bg bottom
           figures
            rectangle 272.1 528 303.9 560 color 0 fill 15132390;
            line 276.1 531.9 275.9 558.2 color 0 fill 0;
            line 273.9 556.1 299.9 556.1 color 0 fill 0;
            line 276.1 556.1 280 556.1 280 544 color 16711680 fill 0;
            line 288 544 280 544 288 544 color 16711680 fill 0;
            line 288 556.1 288 544 288 556.1 color 16711680 fill 0;
            line 296 544 296 556.1 296 544 color 16711680 fill 0;
            line 299.9 544.1 295.7 544.1 color 16711680 fill 0;
            line 288 556.1 296 556.1 color 16711680 fill 0;
          end;
          implementation eq
parameters
	real amplitude = 45 {deg};			// amplitude of the wave
	real omega = 0.31415926535898 {rad/s};		// angular frequency of the wave
variables					
	real hidden s, half;
	boolean hidden change;
equations
	"calculate at least 2 points per period 
	(just after the change in sign)"
	half = pi / omega;
	change = frequencyevent (half, 1e-14);

	"calculate the square wave"
	s = sign (sin (omega * time));
	output = if( s == 0 ) then
		amplitude
	else
		(amplitude / 2) * (s + 1)
	end;
implementation_end;
        end;
        connections
         C\p <= OneJunction3\p;
         C1\p <= OneJunction7\p;
         OneJunction3\p <= OneJunction8\p;
         OneJunction5\p => C4\p;
         OneJunction5\p => PowerMux\input_rot2;
         OneJunction5\p => R4\p;
         OneJunction7\p => PowerMux\input_pos3;
         OneJunction7\p => R5\p;
         OneJunction8\p <= SG90\p;
         OneJunction8\p => PowerMux\input;
         PowerMux\output => output;
         R\p <= OneJunction3\p;
         Square\output -> SG90\effort;
        end;
       implementation_end;
      Joint_dynF2 712 80
       description '<Description>
	<Version>4.8</Version>
	<IsMainModel>1</IsMainModel>
	</Description>';
       type Submodel
        ports
         power out output [6,1];
       end;
       icon bg
        figures
         rectangle 672 64 752 96 color 0 fill 15132390;
         text 'name' 712 80 color 0 'Clear Sans' 16;
       end;
       implementation bg
        submodels
         C1 191.8 216.2
          description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\3D\C-3.emx</LibraryPath>
  <TimeStamp>2007-9-25 12:12:8</TimeStamp>
</Description>';
          type 'C-3'
           ports
            power in p [3,1];
            signal out state [3,1];
           restrictions
            causality preferred out p;
          end;
          icon bg top
           figures
            text 'C' 191.8 216.2 color 0 18 bold;
          end;
          implementation eq
parameters
	real c[3,3] = [1, 0.0, 0.0; 0.0, 1, 0.0; 0.0, 0.0, 1] {mN/m};
equations
    state = int(p.f);
    p.e = inverse(c) *state;
implementation_end;
         C4 191.8 232.2
          description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\2D\C-2.emx</LibraryPath>
  <TimeStamp>2007-9-25 12:7:27</TimeStamp>
</Description>';
          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' 191.8 232.2 color 0 18 bold;
          end;
          implementation eq
parameters
	real c[2,2] = [1, 0.0; 0.0, 1]  {mN.m/rad};
equations
    state = int(p.f);
    p.e = inverse(c) *state;
implementation_end;
         plug output 396 216;
         OneJunction5 239.8 232.2
          description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:17:51</TimeStamp>
</Description>
</Information>';
          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' 239.8 232.2 color 0 18 bold;
          end;
          implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
         OneJunction7 239.8 216.2
          description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:17:51</TimeStamp>
</Description>
</Information>';
          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' 239.8 216.2 color 0 18 bold;
          end;
          implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
         OneJunction8 288 200
          description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:17:51</TimeStamp>
</Description>
</Information>';
          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' 288 200 color 0 18 bold;
          end;
          implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
         PowerMux 330 216
									specifications active 'rot_z'
										specification 'rot_x'
description '<Information>
 <Description>
    <Version>4.8</Version>
  <LibraryPath>Bond Graph\MR\PowerMux-Rotation.emx</LibraryPath>
  <TimeStamp>2020-7-20 14:35:23</TimeStamp>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
  <AllowLibraryUpdate>True</AllowLibraryUpdate>
 </Description>
</Information>';
 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 328 192 328 240 color 0 width 2;
   rectangle 324 192 336 240 color -1;
   text '1' 333 210 color 8421504 8;
  terminals
   input 328 200 fixed;
   output 328 216 fixed;
   input_rot2 328 232 fixed;
   input_pos3 328 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 '<Description>
   <Version>4.1</Version>
  <LibraryPath>Bond Graph\PowerMux.emx</LibraryPath>
  <TimeStamp>2011-3-4 15:12:50</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
 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;
   causality constraint not_equal input_rot2 output;
   causality constraint not_equal input_pos3 output;
 end;
 icon bg bottom
  figures
   line 242 274 290 274 color 0 width 2;
   rectangle 242 266 290 278 color -1;
   text '1' 260 269 color 8421504 8;
  terminals
   input 250 274 fixed;
   output 266 274 fixed;
   input_rot2 282 274 fixed;
   input_pos3 266 274 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 '<Information>
 <Description>
    <Version>4.8</Version>
  <LibraryPath>Bond Graph\MR\PowerMux-Rotation.emx</LibraryPath>
  <TimeStamp>2020-7-21 12:05:13</TimeStamp>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
  <AllowLibraryUpdate>True</AllowLibraryUpdate>
 </Description>
</Information>';
 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;
   causality constraint not_equal input_rot2 output;
   causality constraint not_equal input_pos3 output;
 end;
 icon bg bottom
  figures
   line 328 192 328 240 color 0 width 2;
   rectangle 324 192 336 240 color -1;
   text '1' 333 210 color 8421504 8;
  terminals
   input 328 200 fixed;
   output 328 216 fixed;
   input_rot2 328 232 fixed;
   input_pos3 328 216 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 288 152
          description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\R.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:35:37</TimeStamp>
</Description>
</Information>';
          type R
           ports
            power in p;
          end;
          icon bg top
           figures
            text 'R' 288 152 color 0 18 bold;
          end;
          implementation eq
parameters
	real r = 0.0001;
equations
	p.e = r * p.f;
implementation_end;
         R4 239.8 288.2
          description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\2D\R-2.emx</LibraryPath>
  <TimeStamp>2007-9-25 12:6:54</TimeStamp>
</Description>';
          type 'R-2'
           ports
            power in p [2,1];
          end;
          icon bg bottom
           figures
            text 'R' 239.8 288.2 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 239.8 168.2
          description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\3D\R-3.emx</LibraryPath>
  <TimeStamp>2007-9-25 12:11:54</TimeStamp>
</Description>';
          type 'R-3'
           ports
            power in p [3,1];
          end;
          icon bg top
           figures
            text 'R' 239.8 168.2 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;
        end;
        connections
         C1\p <= OneJunction7\p;
         OneJunction5\p => C4\p;
         OneJunction5\p => PowerMux\input_rot2;
         OneJunction5\p => R4\p;
         OneJunction7\p => PowerMux\input_pos3;
         OneJunction7\p => R5\p;
         OneJunction8\p => PowerMux\input;
         PowerMux\output => output;
         R\p <= OneJunction8\p;
        end;
       implementation_end;
      Joint_dynF3 1064 80
       description '<Description>
	<Version>4.8</Version>
	<IsMainModel>1</IsMainModel>
	</Description>';
       type Submodel
        ports
         power out output [6,1];
       end;
       icon bg
        figures
         rectangle 1024 64 1104 96 color 0 fill 15132390;
         text 'name' 1064 80 color 0 'Clear Sans' 16;
       end;
       implementation bg
        submodels
         C1 191.8 216.2
          description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\3D\C-3.emx</LibraryPath>
  <TimeStamp>2007-9-25 12:12:8</TimeStamp>
</Description>';
          type 'C-3'
           ports
            power in p [3,1];
            signal out state [3,1];
           restrictions
            causality preferred out p;
          end;
          icon bg top
           figures
            text 'C' 191.8 216.2 color 0 18 bold;
          end;
          implementation eq
parameters
	real c[3,3] = [1, 0.0, 0.0; 0.0, 1, 0.0; 0.0, 0.0, 1] {mN/m};
equations
    state = int(p.f);
    p.e = inverse(c) *state;
implementation_end;
         C4 191.8 232.2
          description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\2D\C-2.emx</LibraryPath>
  <TimeStamp>2007-9-25 12:7:27</TimeStamp>
</Description>';
          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' 191.8 232.2 color 0 18 bold;
          end;
          implementation eq
parameters
	real c[2,2] = [1, 0.0; 0.0, 1]  {mN.m/rad};
equations
    state = int(p.f);
    p.e = inverse(c) *state;
implementation_end;
         plug output 396 216;
         OneJunction5 239.8 232.2
          description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:17:51</TimeStamp>
</Description>
</Information>';
          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' 239.8 232.2 color 0 18 bold;
          end;
          implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
         OneJunction7 239.8 216.2
          description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:17:51</TimeStamp>
</Description>
</Information>';
          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' 239.8 216.2 color 0 18 bold;
          end;
          implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
         OneJunction8 288 200
          description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:17:51</TimeStamp>
</Description>
</Information>';
          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' 288 200 color 0 18 bold;
          end;
          implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
         PowerMux 330 216
									specifications active 'rot_z'
										specification 'rot_x'
description '<Information>
 <Description>
    <Version>4.8</Version>
  <LibraryPath>Bond Graph\MR\PowerMux-Rotation.emx</LibraryPath>
  <TimeStamp>2020-7-20 14:35:23</TimeStamp>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
  <AllowLibraryUpdate>True</AllowLibraryUpdate>
 </Description>
</Information>';
 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 328 192 328 240 color 0 width 2;
   rectangle 324 192 336 240 color -1;
   text '1' 333 210 color 8421504 8;
  terminals
   input 328 200 fixed;
   output 328 216 fixed;
   input_rot2 328 232 fixed;
   input_pos3 328 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 '<Description>
   <Version>4.1</Version>
  <LibraryPath>Bond Graph\PowerMux.emx</LibraryPath>
  <TimeStamp>2011-3-4 15:12:50</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
 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;
   causality constraint not_equal input_rot2 output;
   causality constraint not_equal input_pos3 output;
 end;
 icon bg bottom
  figures
   line 242 274 290 274 color 0 width 2;
   rectangle 242 266 290 278 color -1;
   text '1' 260 269 color 8421504 8;
  terminals
   input 250 274 fixed;
   output 266 274 fixed;
   input_rot2 282 274 fixed;
   input_pos3 266 274 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 '<Information>
 <Description>
    <Version>4.8</Version>
  <LibraryPath>Bond Graph\MR\PowerMux-Rotation.emx</LibraryPath>
  <TimeStamp>2020-7-21 12:05:13</TimeStamp>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
  <AllowLibraryUpdate>True</AllowLibraryUpdate>
 </Description>
</Information>';
 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;
   causality constraint not_equal input_rot2 output;
   causality constraint not_equal input_pos3 output;
 end;
 icon bg bottom
  figures
   line 328 192 328 240 color 0 width 2;
   rectangle 324 192 336 240 color -1;
   text '1' 333 210 color 8421504 8;
  terminals
   input 328 200 fixed;
   output 328 216 fixed;
   input_rot2 328 232 fixed;
   input_pos3 328 216 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 288 152
          description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\R.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:35:37</TimeStamp>
</Description>
</Information>';
          type R
           ports
            power in p;
          end;
          icon bg top
           figures
            text 'R' 288 152 color 0 18 bold;
          end;
          implementation eq
parameters
	real r = 0.0001;
equations
	p.e = r * p.f;
implementation_end;
         R4 239.8 288.2
          description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\2D\R-2.emx</LibraryPath>
  <TimeStamp>2007-9-25 12:6:54</TimeStamp>
</Description>';
          type 'R-2'
           ports
            power in p [2,1];
          end;
          icon bg bottom
           figures
            text 'R' 239.8 288.2 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 239.8 168.2
          description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\3D\R-3.emx</LibraryPath>
  <TimeStamp>2007-9-25 12:11:54</TimeStamp>
</Description>';
          type 'R-3'
           ports
            power in p [3,1];
          end;
          icon bg top
           figures
            text 'R' 239.8 168.2 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;
        end;
        connections
         C1\p <= OneJunction7\p;
         OneJunction5\p => C4\p;
         OneJunction5\p => PowerMux\input_rot2;
         OneJunction5\p => R4\p;
         OneJunction7\p => PowerMux\input_pos3;
         OneJunction7\p => R5\p;
         OneJunction8\p => PowerMux\input;
         PowerMux\output => output;
         R\p <= OneJunction8\p;
        end;
       implementation_end;
      Link1 608 184
       description '<Information>
 <Description>
    <Version>4.8</Version>
  <LibraryPath>Bond Graph\MR\link-v3.emx</LibraryPath>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <TimeStamp>2020-7-21 11:14:41</TimeStamp>
<AllowLibraryUpdate>False</AllowLibraryUpdate>
 </Description>
</Information>';
       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 576 160 640 208 color 0 fill 8454041;
         text 'Link' 608 184 color 0 'Clear Sans' 16;
        terminals
         Hin 576 200 fixed;
         Hout 640 200 fixed;
         Pin 640 168 fixed;
         Pout 576 168 fixed;
       end;
       implementation eq
parameters
	real offset[6]= [0;0;0;0.005;0;0]; //coordinates of joint_1
variables
	real Hab[4,4];
	real AdHab[6,6];
	real R[3,3];
	real omega[3];
initialequations
	omega = offset[1:3];
	R = dll('EulerAngles.dll','RotationMatrixFromEulXYZs',omega);
	Hab = homogeneous(R,offset[4:6]);
	AdHab = Adjoint(Hab);
equations
	Hout = Hin * Hab;
	Pout.e = transpose(AdHab) * Pin.e;
	Pin.f = AdHab * Pout.f;

    implementation_end;
      Link12 152 184
       description '<Information>
 <Description>
    <Version>4.8</Version>
  <LibraryPath>Bond Graph\MR\link-v3.emx</LibraryPath>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <TimeStamp>2020-7-21 11:14:41</TimeStamp>
<AllowLibraryUpdate>False</AllowLibraryUpdate>
 </Description>
</Information>';
       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 120 160 184 208 color 0 fill 8454041;
         text 'Link' 152 184 color 0 'Clear Sans' 16;
        terminals
         Hin 120 200 fixed;
         Hout 184 200 fixed;
         Pin 184 168 fixed;
         Pout 120 168 fixed;
       end;
       implementation eq
parameters
	real offset[6]= [0;0;0;0.0059;0;0]; //coordinates of joint_1
variables
	real Hab[4,4];
	real AdHab[6,6];
	real R[3,3];
	real omega[3];
initialequations
	omega = offset[1:3];
	R = dll('EulerAngles.dll','RotationMatrixFromEulXYZs',omega);
	Hab = homogeneous(R,offset[4:6]);
	AdHab = Adjoint(Hab);
equations
	Hout = Hin * Hab;
	Pout.e = transpose(AdHab) * Pin.e;
	Pin.f = AdHab * Pout.f;implementation_end;
      Link13 400 184
       description '<Information>
 <Description>
    <Version>4.8</Version>
  <LibraryPath>Bond Graph\MR\link-v3.emx</LibraryPath>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <TimeStamp>2020-7-21 11:14:41</TimeStamp>
<AllowLibraryUpdate>False</AllowLibraryUpdate>
 </Description>
</Information>';
       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 368 160 432 208 color 0 fill 8454041;
         text 'Link' 400 184 color 0 'Clear Sans' 16;
        terminals
         Hin 368 200 fixed;
         Hout 432 200 fixed;
         Pin 432 168 fixed;
         Pout 368 168 fixed;
       end;
       implementation eq
parameters
	real offset[6]= [0;0;0;0.005;0;0]; //coordinates of joint_1
variables
	real Hab[4,4];
	real AdHab[6,6];
	real R[3,3];
	real omega[3];
initialequations
	omega = offset[1:3];
	R = dll('EulerAngles.dll','RotationMatrixFromEulXYZs',omega);
	Hab = homogeneous(R,offset[4:6]);
	AdHab = Adjoint(Hab);
equations
	Hout = Hin * Hab;
	Pout.e = transpose(AdHab) * Pin.e;
	Pin.f = AdHab * Pout.f;

    implementation_end;
      Link14 816 184
       description '<Information>
 <Description>
    <Version>4.8</Version>
  <LibraryPath>Bond Graph\MR\link-v3.emx</LibraryPath>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <TimeStamp>2020-7-21 11:14:41</TimeStamp>
<AllowLibraryUpdate>False</AllowLibraryUpdate>
 </Description>
</Information>';
       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 784 160 848 208 color 0 fill 8454041;
         text 'Link' 816 184 color 0 'Clear Sans' 16;
        terminals
         Hin 784 200 fixed;
         Hout 848 200 fixed;
         Pin 848 168 fixed;
         Pout 784 168 fixed;
       end;
       implementation eq
parameters
	real offset[6]= [0;0;0;0;0.0125;0]; //coordinates of joint_1
variables
	real Hab[4,4];
	real AdHab[6,6];
	real R[3,3];
	real omega[3];
initialequations
	omega = offset[1:3];
	R = dll('EulerAngles.dll','RotationMatrixFromEulXYZs',omega);
	Hab = homogeneous(R,offset[4:6]);
	AdHab = Adjoint(Hab);
equations
	Hout = Hin * Hab;
	Pout.e = transpose(AdHab) * Pin.e;
	Pin.f = AdHab * Pout.f;

    implementation_end;
      Link15 1168 184
       description '<Information>
 <Description>
    <Version>4.8</Version>
  <LibraryPath>Bond Graph\MR\link-v3.emx</LibraryPath>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <TimeStamp>2020-7-21 11:14:41</TimeStamp>
<AllowLibraryUpdate>False</AllowLibraryUpdate>
 </Description>
</Information>';
       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 1136 160 1200 208 color 0 fill 8454041;
         text 'Link' 1168 184 color 0 'Clear Sans' 16;
        terminals
         Hin 1136 200 fixed;
         Hout 1200 200 fixed;
         Pin 1200 168 fixed;
         Pout 1136 168 fixed;
       end;
       implementation eq
parameters
	real offset[6]= [0;0;0;-0.00795;0;0]; //coordinates of joint_1
variables
	real Hab[4,4];
	real AdHab[6,6];
	real R[3,3];
	real omega[3];
initialequations
	omega = offset[1:3];
	R = dll('EulerAngles.dll','RotationMatrixFromEulXYZs',omega);
	Hab = homogeneous(R,offset[4:6]);
	AdHab = Adjoint(Hab);
equations
	Hout = Hin * Hab;
	Pout.e = transpose(AdHab) * Pin.e;
	Pin.f = AdHab * Pout.f;

    implementation_end;
      Link2 976 184
       description '<Information>
 <Description>
    <Version>4.8</Version>
  <LibraryPath>Bond Graph\MR\link-v3.emx</LibraryPath>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <TimeStamp>2020-7-21 11:14:41</TimeStamp>
<AllowLibraryUpdate>False</AllowLibraryUpdate>
 </Description>
</Information>';
       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 944 160 1008 208 color 0 fill 8454041;
         text 'Link' 976 184 color 0 'Clear Sans' 16;
        terminals
         Hin 944 200 fixed;
         Hout 1008 200 fixed;
         Pin 1008 168 fixed;
         Pout 944 168 fixed;
       end;
       implementation eq
parameters
	real offset[6]= [0;0;0;0;0.0125;0]; //coordinates of joint_1
variables
	real Hab[4,4];
	real AdHab[6,6];
	real R[3,3];
	real omega[3];
initialequations
	omega = offset[1:3];
	R = dll('EulerAngles.dll','RotationMatrixFromEulXYZs',omega);
	Hab = homogeneous(R,offset[4:6]);
	AdHab = Adjoint(Hab);
equations
	Hout = Hin * Hab;
	Pout.e = transpose(AdHab) * Pin.e;
	Pin.f = AdHab * Pout.f;

    implementation_end;
      Link3 1304 184
       description '<Information>
 <Description>
    <Version>4.8</Version>
  <LibraryPath>Bond Graph\MR\link-v3.emx</LibraryPath>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <TimeStamp>2020-7-21 11:14:41</TimeStamp>
<AllowLibraryUpdate>False</AllowLibraryUpdate>
 </Description>
</Information>';
       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 1272 160 1336 208 color 0 fill 8454041;
         text 'Link' 1304 184 color 0 'Clear Sans' 16;
        terminals
         Hin 1272 200 fixed;
         Hout 1336 200 fixed;
         Pin 1336 168 fixed;
         Pout 1272 168 fixed;
       end;
       implementation eq
parameters
	real offset[6]= [0;0;0;-0.00795;0;0]; //coordinates of joint_1
variables
	real Hab[4,4];
	real AdHab[6,6];
	real R[3,3];
	real omega[3];
initialequations
	omega = offset[1:3];
	R = dll('EulerAngles.dll','RotationMatrixFromEulXYZs',omega);
	Hab = homogeneous(R,offset[4:6]);
	AdHab = Adjoint(Hab);
equations
	Hout = Hin * Hab;
	Pout.e = transpose(AdHab) * Pin.e;
	Pin.f = AdHab * Pout.f;

    implementation_end;
      plug Hin 72 200;
      plug Pin 1392 168;
      plug Pout 72 168;
      OneJunction1 520 168
       description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:17:51</TimeStamp>
</Description>
</Information>';
       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' 520 168 color 0 18 bold;
       end;
       implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
      OneJunction2 904 168
       description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:17:51</TimeStamp>
</Description>
</Information>';
       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' 904 168 color 0 18 bold;
       end;
       implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
      Splitter1 488 200
       description '<Description><Version>4.0</Version>
   <LibraryPath>Signal\Block Diagram\Splitter.emx</LibraryPath>
  <TimeStamp>2008-01-17 11:28:29</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
       knot Splitter
        ports
         signal knot duplicatable out output [4,4];
         signal knot in input [4,4];
       end;
       icon bg ellipse
        figures
         ellipse 484.8 196.8 491.2 203.2 color -1 fill 0;
         ellipse 483.7 195.7 492.3 204.3 color -1;
        terminals
         input 488 200 fixed;
       end;
       implementation eq
equations
    collect (output) = input;
implementation_end;
      Splitter2 208 200
       description '<Description><Version>4.0</Version>
   <LibraryPath>Signal\Block Diagram\Splitter.emx</LibraryPath>
  <TimeStamp>2008-01-17 11:28:29</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
       knot Splitter
        ports
         signal knot duplicatable out output [4,4];
         signal knot in input [4,4];
       end;
       icon bg ellipse
        figures
         ellipse 204.8 196.8 211.2 203.2 color -1 fill 0;
         ellipse 203.7 195.7 212.3 204.3 color -1;
        terminals
         input 208 200 fixed;
       end;
       implementation eq
equations
    collect (output) = input;
implementation_end;
      Splitter3 872 200
       description '<Description><Version>4.0</Version>
   <LibraryPath>Signal\Block Diagram\Splitter.emx</LibraryPath>
  <TimeStamp>2008-01-17 11:28:29</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
       knot Splitter
        ports
         signal knot duplicatable out output [4,4];
         signal knot in input [4,4];
       end;
       icon bg ellipse
        figures
         ellipse 868.8 196.8 875.2 203.2 color -1 fill 0;
         ellipse 867.7 195.7 876.3 204.3 color -1;
        terminals
         input 872 200 fixed;
       end;
       implementation eq
equations
    collect (output) = input;
implementation_end;
      Splitter4 1232 200
       description '<Description><Version>4.0</Version>
   <LibraryPath>Signal\Block Diagram\Splitter.emx</LibraryPath>
  <TimeStamp>2008-01-17 11:28:29</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
       knot Splitter
        ports
         signal knot duplicatable out output [4,4];
         signal knot in input [4,4];
       end;
       icon bg ellipse
        figures
         ellipse 1228.8 196.8 1235.2 203.2 color -1 fill 0;
         ellipse 1227.7 195.7 1236.3 204.3 color -1;
        terminals
         input 1232 200 fixed;
       end;
       implementation eq
equations
    collect (output) = input;
implementation_end;
     end;
     connections
      COM1\Hin <- Splitter3\output;
      COM1\p => OneJunction2\p;
      Hin -> Link12\Hin;
      Joint_dynF1\output => Joint\Pdiff;
      Joint_dynF2\output => Joint1\Pdiff;
      Joint_dynF3\output => Joint2\Pdiff;
      Joint\Hout -> Link13\Hin;
      Joint\Pin <= Link13\Pout;
      Joint1\Hout -> Link14\Hin;
      Joint1\Pin <= Link14\Pout;
      Joint2\Hout -> Link15\Hin;
      Joint2\Pin <= Link15\Pout;
      Link1\Hout -> Joint1\Hin;
      Link1\Pin <= Joint1\Pout;
      Link12\Hout -> Splitter2\input;
      Link12\Pin <= Joint\Pout;
      Link12\Pout => Pout;
      Link13\Hout -> Splitter1\input;
      Link13\Pin <= OneJunction1\p;
      Link14\Hout -> Splitter3\input;
      Link14\Pin <= OneJunction2\p;
      Link15\Hout -> Splitter4\input;
      Link15\Pin <= Link3\Pout;
      Link2\Hout -> Joint2\Hin;
      Link2\Pin <= Joint2\Pout;
      Link3\Pin <= Pin;
      OneJunction1\p <= COM\p;
      OneJunction1\p <= Link1\Pout;
      OneJunction2\p <= Link2\Pout;
      Splitter1\output -> Body_Lift2\input;
      Splitter1\output -> COM\Hin;
      Splitter1\output -> Link1\Hin;
      Splitter2\output -> Body_Lift1\input;
      Splitter2\output -> Joint\Hin;
      Splitter3\output -> Body_Lift3\input;
      Splitter3\output -> Link2\Hin;
      Splitter4\output -> Body_Lift4\input;
      Splitter4\output -> Link3\Hin;
     end;
    implementation_end;
   Link1 632 128
    description '<Information>
 <Description>
    <Version>4.8</Version>
  <LibraryPath>Bond Graph\MR\link-v3.emx</LibraryPath>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <TimeStamp>2020-7-21 11:14:41</TimeStamp>
<AllowLibraryUpdate>False</AllowLibraryUpdate>
 </Description>
</Information>';
    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 600 104 664 152 color 0 fill 8454041;
      text 'Link' 632 128 color 0 'Clear Sans' 16;
     terminals
      Hin 600 144 fixed;
      Hout 664 144 fixed;
      Pin 664 112 fixed;
      Pout 600 112 fixed;
    end;
    implementation eq
parameters
	real offset[6]= [0;0;0;0;0.0125;0]; //coordinates of joint_1
variables
	real Hab[4,4];
	real AdHab[6,6];
	real R[3,3];
	real omega[3];
initialequations
	omega = offset[1:3];
	R = dll('EulerAngles.dll','RotationMatrixFromEulXYZs',omega);
	Hab = homogeneous(R,offset[4:6]);
	AdHab = Adjoint(Hab);
equations
	Hout = Hin * Hab;
	Pout.e = transpose(AdHab) * Pin.e;
	Pin.f = AdHab * Pout.f;

    implementation_end;
   Link10 944 128
    description '<Information>
 <Description>
    <Version>4.8</Version>
  <LibraryPath>Bond Graph\MR\link-v3.emx</LibraryPath>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <TimeStamp>2020-7-21 11:14:41</TimeStamp>
<AllowLibraryUpdate>False</AllowLibraryUpdate>
 </Description>
</Information>';
    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 912 104 976 152 color 0 fill 8454041;
      text 'Link' 944 128 color 0 'Clear Sans' 16;
     terminals
      Hin 912 144 fixed;
      Hout 976 144 fixed;
      Pin 976 112 fixed;
      Pout 912 112 fixed;
    end;
    implementation eq
parameters
	real offset[6]= [0;0;0;0;0.0125;0]; //coordinates of joint_1
variables
	real Hab[4,4];
	real AdHab[6,6];
	real R[3,3];
	real omega[3];
initialequations
	omega = offset[1:3];
	R = dll('EulerAngles.dll','RotationMatrixFromEulXYZs',omega);
	Hab = homogeneous(R,offset[4:6]);
	AdHab = Adjoint(Hab);
equations
	Hout = Hin * Hab;
	Pout.e = transpose(AdHab) * Pin.e;
	Pin.f = AdHab * Pout.f;

    implementation_end;
   Link11 784 128
    description '<Information>
 <Description>
    <Version>4.8</Version>
  <LibraryPath>Bond Graph\MR\link-v3.emx</LibraryPath>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <TimeStamp>2020-7-21 11:14:41</TimeStamp>
<AllowLibraryUpdate>False</AllowLibraryUpdate>
 </Description>
</Information>';
    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 752 104 816 152 color 0 fill 8454041;
      text 'Link' 784 128 color 0 'Clear Sans' 16;
     terminals
      Hin 752 144 fixed;
      Hout 816 144 fixed;
      Pin 816 112 fixed;
      Pout 752 112 fixed;
    end;
    implementation eq
parameters
	real offset[6]= [0;0;0;0;0.0125;0]; //coordinates of joint_1
variables
	real Hab[4,4];
	real AdHab[6,6];
	real R[3,3];
	real omega[3];
initialequations
	omega = offset[1:3];
	R = dll('EulerAngles.dll','RotationMatrixFromEulXYZs',omega);
	Hab = homogeneous(R,offset[4:6]);
	AdHab = Adjoint(Hab);
equations
	Hout = Hin * Hab;
	Pout.e = transpose(AdHab) * Pin.e;
	Pin.f = AdHab * Pout.f;

    implementation_end;
   Link2 384 128
    description '<Information>
 <Description>
    <Version>4.8</Version>
  <LibraryPath>Bond Graph\MR\link-v3.emx</LibraryPath>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <TimeStamp>2020-7-21 11:14:41</TimeStamp>
<AllowLibraryUpdate>False</AllowLibraryUpdate>
 </Description>
</Information>';
    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 352 104 416 152 color 0 fill 8454041;
      text 'Link' 384 128 color 0 'Clear Sans' 16;
     terminals
      Hin 352 144 fixed;
      Hout 416 144 fixed;
      Pin 416 112 fixed;
      Pout 352 112 fixed;
    end;
    implementation eq
parameters
	real offset[6]= [0;0;0;0;0.025;0]; //coordinates of joint_1
variables
	real Hab[4,4];
	real AdHab[6,6];
	real R[3,3];
	real omega[3];
initialequations
	omega = offset[1:3];
	R = dll('EulerAngles.dll','RotationMatrixFromEulXYZs',omega);
	Hab = homogeneous(R,offset[4:6]);
	AdHab = Adjoint(Hab);
equations
	Hout = Hin * Hab;
	Pout.e = transpose(AdHab) * Pin.e;
	Pin.f = AdHab * Pout.f;

    implementation_end;
   Link3 560 424
    description '<Information>
 <Description>
    <Version>4.8</Version>
  <LibraryPath>Bond Graph\MR\link-v3.emx</LibraryPath>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <TimeStamp>2020-7-21 11:14:41</TimeStamp>
<AllowLibraryUpdate>False</AllowLibraryUpdate>
 </Description>
</Information>';
    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 536 392 584 456 color 0 fill 8454041;
      text 'Link' 560 424 color 0 'Clear Sans' 16;
     terminals
      Hin 576 392 fixed;
      Hout 576 456 fixed;
      Pin 544 456 fixed;
      Pout 544 392 fixed;
    end;
    implementation eq
parameters
	real offset[6]= [0;0;0;0;0;-0.0325]; //coordinates of joint_1
variables
	real Hab[4,4];
	real AdHab[6,6];
	real R[3,3];
	real omega[3];
initialequations
	omega = offset[1:3];
	R = dll('EulerAngles.dll','RotationMatrixFromEulXYZs',omega);
	Hab = homogeneous(R,offset[4:6]);
	AdHab = Adjoint(Hab);
equations
	Hout = Hin * Hab;
	Pout.e = transpose(AdHab) * Pin.e;
	Pin.f = AdHab * Pout.f;

    implementation_end;
   Link4 200 256
    description '<Information>
 <Description>
    <Version>4.8</Version>
  <LibraryPath>Bond Graph\MR\link-v3.emx</LibraryPath>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <TimeStamp>2020-7-21 11:14:41</TimeStamp>
<AllowLibraryUpdate>False</AllowLibraryUpdate>
 </Description>
</Information>';
    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 176 224 224 288 color 0 fill 8454041;
      text 'Link' 200 256 color 0 'Clear Sans' 16;
     terminals
      Hin 216 288 fixed;
      Hout 216 224 fixed;
      Pin 184 224 fixed;
      Pout 184 288 fixed;
    end;
    implementation eq
parameters
	real offset[6]= [0;0;0;0;0;0.0325]; //coordinates of joint_1
variables
	real Hab[4,4];
	real AdHab[6,6];
	real R[3,3];
	real omega[3];
initialequations
	omega = offset[1:3];
	R = dll('EulerAngles.dll','RotationMatrixFromEulXYZs',omega);
	Hab = homogeneous(R,offset[4:6]);
	AdHab = Adjoint(Hab);
equations
	Hout = Hin * Hab;
	Pout.e = transpose(AdHab) * Pin.e;
	Pin.f = AdHab * Pout.f;

    implementation_end;
   Link5 408 584
    description '<Information>
 <Description>
    <Version>4.8</Version>
  <LibraryPath>Bond Graph\MR\link-v3.emx</LibraryPath>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <TimeStamp>2020-7-21 11:14:41</TimeStamp>
<AllowLibraryUpdate>False</AllowLibraryUpdate>
 </Description>
</Information>';
    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 376 560 440 608 color 0 fill 8454041;
      text 'Link' 408 584 color 0 'Clear Sans' 16;
     terminals
      Hin 440 568 fixed;
      Hout 376 568 fixed;
      Pin 376 600 fixed;
      Pout 440 600 fixed;
    end;
    implementation eq
parameters
	real offset[6]= [0;0;0;0;-0.0125;0]; //coordinates of joint_1
variables
	real Hab[4,4];
	real AdHab[6,6];
	real R[3,3];
	real omega[3];
initialequations
	omega = offset[1:3];
	R = dll('EulerAngles.dll','RotationMatrixFromEulXYZs',omega);
	Hab = homogeneous(R,offset[4:6]);
	AdHab = Adjoint(Hab);
equations
	Hout = Hin * Hab;
	Pout.e = transpose(AdHab) * Pin.e;
	Pin.f = AdHab * Pout.f;

    implementation_end;
   Link6 560 280
    description '<Information>
 <Description>
    <Version>4.8</Version>
  <LibraryPath>Bond Graph\MR\link-v3.emx</LibraryPath>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <TimeStamp>2020-7-21 11:14:41</TimeStamp>
<AllowLibraryUpdate>False</AllowLibraryUpdate>
 </Description>
</Information>';
    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 536 248 584 312 color 0 fill 8454041;
      text 'Link' 560 280 color 0 'Clear Sans' 16;
     terminals
      Hin 576 248 fixed;
      Hout 576 312 fixed;
      Pin 544 312 fixed;
      Pout 544 248 fixed;
    end;
    implementation eq
parameters
	real offset[6]= [0;0;0;0;0;-0.0325]; //coordinates of joint_1
variables
	real Hab[4,4];
	real AdHab[6,6];
	real R[3,3];
	real omega[3];
initialequations
	omega = offset[1:3];
	R = dll('EulerAngles.dll','RotationMatrixFromEulXYZs',omega);
	Hab = homogeneous(R,offset[4:6]);
	AdHab = Adjoint(Hab);
equations
	Hout = Hin * Hab;
	Pout.e = transpose(AdHab) * Pin.e;
	Pin.f = AdHab * Pout.f;

    implementation_end;
   Link7 272 584
    description '<Information>
 <Description>
    <Version>4.8</Version>
  <LibraryPath>Bond Graph\MR\link-v3.emx</LibraryPath>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <TimeStamp>2020-7-21 11:14:41</TimeStamp>
<AllowLibraryUpdate>False</AllowLibraryUpdate>
 </Description>
</Information>';
    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 240 560 304 608 color 0 fill 8454041;
      text 'Link' 272 584 color 0 'Clear Sans' 16;
     terminals
      Hin 304 568 fixed;
      Hout 240 568 fixed;
      Pin 240 600 fixed;
      Pout 304 600 fixed;
    end;
    implementation eq
parameters
	real offset[6]= [0;0;0;0;-0.0125;0]; //coordinates of joint_1
variables
	real Hab[4,4];
	real AdHab[6,6];
	real R[3,3];
	real omega[3];
initialequations
	omega = offset[1:3];
	R = dll('EulerAngles.dll','RotationMatrixFromEulXYZs',omega);
	Hab = homogeneous(R,offset[4:6]);
	AdHab = Adjoint(Hab);
equations
	Hout = Hin * Hab;
	Pout.e = transpose(AdHab) * Pin.e;
	Pin.f = AdHab * Pout.f;

    implementation_end;
   Link8 1360 128
    description '<Information>
 <Description>
    <Version>4.8</Version>
  <LibraryPath>Bond Graph\MR\link-v3.emx</LibraryPath>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <TimeStamp>2020-7-21 11:14:41</TimeStamp>
<AllowLibraryUpdate>False</AllowLibraryUpdate>
 </Description>
</Information>';
    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 1328 104 1392 152 color 0 fill 8454041;
      text 'Link' 1360 128 color 0 'Clear Sans' 16;
     terminals
      Hin 1328 144 fixed;
      Hout 1392 144 fixed;
      Pin 1392 112 fixed;
      Pout 1328 112 fixed;
    end;
    implementation eq
parameters
	real offset[6]= [0;0;0;0;0.0125;0]; //coordinates of joint_1
variables
	real Hab[4,4];
	real AdHab[6,6];
	real R[3,3];
	real omega[3];
initialequations
	omega = offset[1:3];
	R = dll('EulerAngles.dll','RotationMatrixFromEulXYZs',omega);
	Hab = homogeneous(R,offset[4:6]);
	AdHab = Adjoint(Hab);
equations
	Hout = Hin * Hab;
	Pout.e = transpose(AdHab) * Pin.e;
	Pin.f = AdHab * Pout.f;

    implementation_end;
   Link9 200 400
    description '<Information>
 <Description>
    <Version>4.8</Version>
  <LibraryPath>Bond Graph\MR\link-v3.emx</LibraryPath>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <TimeStamp>2020-7-21 11:14:41</TimeStamp>
<AllowLibraryUpdate>False</AllowLibraryUpdate>
 </Description>
</Information>';
    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 176 368 224 432 color 0 fill 8454041;
      text 'Link' 200 400 color 0 'Clear Sans' 16;
     terminals
      Hin 216 432 fixed;
      Hout 216 368 fixed;
      Pin 184 368 fixed;
      Pout 184 432 fixed;
    end;
    implementation eq
parameters
	real offset[6]= [0;0;0;0;0;0.0325]; //coordinates of joint_1
variables
	real Hab[4,4];
	real AdHab[6,6];
	real R[3,3];
	real omega[3];
initialequations
	omega = offset[1:3];
	R = dll('EulerAngles.dll','RotationMatrixFromEulXYZs',omega);
	Hab = homogeneous(R,offset[4:6]);
	AdHab = Adjoint(Hab);
equations
	Hout = Hin * Hab;
	Pout.e = transpose(AdHab) * Pin.e;
	Pin.f = AdHab * Pout.f;

    implementation_end;
   Negate2 608 752
    description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Signal\Block Diagram\Negate.emx</LibraryPath>
  <TimeStamp>2007-9-26 12:14:11</TimeStamp>
</Description>';
    type Negate
     ports
      signal in input;
      signal out output;
    end;
    icon bg bottom
     figures
      rectangle 592 736 624 768 color 0 fill 15132390;
      text '-1' 608 752 color 16711680 16 bold;
    end;
    implementation eq
equations
	output = - input;
     implementation_end;
   OneJunction1 328 600
    description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:17:51</TimeStamp>
</Description>
</Information>';
    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' 328 600 color 0 18 bold;
    end;
    implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
   OneJunction2 544 368
    description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:17:51</TimeStamp>
</Description>
</Information>';
    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' 544 368 color 0 18 bold;
    end;
    implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
   OneJunction3 544 112
    description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:17:51</TimeStamp>
</Description>
</Information>';
    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' 544 112 color 0 18 bold;
    end;
    implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
   OneJunction4 184 344
    description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:17:51</TimeStamp>
</Description>
</Information>';
    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' 184 344 color 0 18 bold;
    end;
    implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
   OneJunction5 544 600
    description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:17:51</TimeStamp>
</Description>
</Information>';
    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' 544 600 color 0 18 bold;
    end;
    implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
   OneJunction6 696 112
    description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:17:51</TimeStamp>
</Description>
</Information>';
    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' 696 112 color 0 18 bold;
    end;
    implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
   OneJunction7 1264 112
    description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:17:51</TimeStamp>
</Description>
</Information>';
    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' 1264 112 color 0 18 bold;
    end;
    implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
   rectanglepath 864 752
    description '<Information>
 <Description>
    <Version>4.8</Version>
  <LibraryPath>setpoint\rectanglepath.emx</LibraryPath>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <TimeStamp>2020-7-10 12:30:38</TimeStamp>
<AllowLibraryUpdate>False</AllowLibraryUpdate>
 </Description>
</Information>';
    type 'Submodel-Equation'
     ports
      signal out output [2,1];
    end;
    icon bg
     figures
      rectangle 808 736 920 768 color 0 fill 15132390;
      text 'name' 864 752 color 0 'Clear Sans' 16;
    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  = 1 {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};
	boolean y;
initialequations
	v = (2*w + 2*h)/t;
	t_w = w / v;
	t_h = h / v;
code
y = frequencyevent (t,0);
period = (time - floor(time / t) * t);

if period < t_w or time < t then
	output = origin;
else
	if period < t_w + t_h then
		output = origin + [w;0];
	else	
		if period < 2 * t_w + t_h then
			output = origin + [w;h];
		else
			output = origin + [0;h];
		end;
	end;
end;



	//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;
   Splitter1 360 568
    description '<Description><Version>4.0</Version>
   <LibraryPath>Signal\Block Diagram\Splitter.emx</LibraryPath>
  <TimeStamp>2008-01-17 11:28:29</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
    knot Splitter
     ports
      signal knot duplicatable out output [4,4];
      signal knot in input [4,4];
    end;
    icon bg ellipse
     figures
      ellipse 356.8 564.8 363.2 571.2 color -1 fill 0;
      ellipse 355.7 563.7 364.3 572.3 color -1;
     terminals
      input 360 568 fixed;
    end;
    implementation eq
equations
    collect (output) = input;
implementation_end;
   Splitter10 1416 144
    description '<Description><Version>4.0</Version>
   <LibraryPath>Signal\Block Diagram\Splitter.emx</LibraryPath>
  <TimeStamp>2008-01-17 11:28:29</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
    knot Splitter
     ports
      signal knot duplicatable out output [4,4];
      signal knot in input [4,4];
    end;
    icon bg ellipse
     figures
      ellipse 1412.8 140.8 1419.2 147.2 color -1 fill 0;
      ellipse 1411.7 139.7 1420.3 148.3 color -1;
     terminals
      input 1416 144 fixed;
    end;
    implementation eq
equations
    collect (output) = input;
implementation_end;
   Splitter11 480 144
    description '<Description><Version>4.0</Version>
   <LibraryPath>Signal\Block Diagram\Splitter.emx</LibraryPath>
  <TimeStamp>2008-01-17 11:28:29</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
    knot Splitter
     ports
      signal knot duplicatable out output [4,4];
      signal knot in input [4,4];
    end;
    icon bg ellipse
     figures
      ellipse 476.8 140.8 483.2 147.2 color -1 fill 0;
      ellipse 475.7 139.7 484.3 148.3 color -1;
     terminals
      input 480 144 fixed;
    end;
    implementation eq
equations
    collect (output) = input;
implementation_end;
   Splitter2 576 336
    description '<Description><Version>4.0</Version>
   <LibraryPath>Signal\Block Diagram\Splitter.emx</LibraryPath>
  <TimeStamp>2008-01-17 11:28:29</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
    knot Splitter
     ports
      signal knot duplicatable out output [4,4];
      signal knot in input [4,4];
    end;
    icon bg ellipse
     figures
      ellipse 572.8 332.8 579.2 339.2 color -1 fill 0;
      ellipse 571.7 331.7 580.3 340.3 color -1;
     terminals
      input 576 336 fixed;
    end;
    implementation eq
equations
    collect (output) = input;
implementation_end;
   Splitter3 216 312
    description '<Description><Version>4.0</Version>
   <LibraryPath>Signal\Block Diagram\Splitter.emx</LibraryPath>
  <TimeStamp>2008-01-17 11:28:29</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
    knot Splitter
     ports
      signal knot duplicatable out output [4,4];
      signal knot in input [4,4];
    end;
    icon bg ellipse
     figures
      ellipse 212.8 308.8 219.2 315.2 color -1 fill 0;
      ellipse 211.7 307.7 220.3 316.3 color -1;
     terminals
      input 216 312 fixed;
    end;
    implementation eq
equations
    collect (output) = input;
implementation_end;
   Splitter4 576 144
    description '<Description><Version>4.0</Version>
   <LibraryPath>Signal\Block Diagram\Splitter.emx</LibraryPath>
  <TimeStamp>2008-01-17 11:28:29</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
    knot Splitter
     ports
      signal knot duplicatable out output [4,4];
      signal knot in input [4,4];
    end;
    icon bg ellipse
     figures
      ellipse 572.8 140.8 579.2 147.2 color -1 fill 0;
      ellipse 571.7 139.7 580.3 148.3 color -1;
     terminals
      input 576 144 fixed;
    end;
    implementation eq
equations
    collect (output) = input;
implementation_end;
   Splitter6 728 144
    description '<Description><Version>4.0</Version>
   <LibraryPath>Signal\Block Diagram\Splitter.emx</LibraryPath>
  <TimeStamp>2008-01-17 11:28:29</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
    knot Splitter
     ports
      signal knot duplicatable out output [4,4];
      signal knot in input [4,4];
    end;
    icon bg ellipse
     figures
      ellipse 724.8 140.8 731.2 147.2 color -1 fill 0;
      ellipse 723.7 139.7 732.3 148.3 color -1;
     terminals
      input 728 144 fixed;
    end;
    implementation eq
equations
    collect (output) = input;
implementation_end;
   Splitter9 992 144
    description '<Description><Version>4.0</Version>
   <LibraryPath>Signal\Block Diagram\Splitter.emx</LibraryPath>
  <TimeStamp>2008-01-17 11:28:29</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
    knot Splitter
     ports
      signal knot duplicatable out output [4,4];
      signal knot in input [4,4];
    end;
    icon bg ellipse
     figures
      ellipse 988.8 140.8 995.2 147.2 color -1 fill 0;
      ellipse 987.7 139.7 996.3 148.3 color -1;
     terminals
      input 992 144 fixed;
    end;
    implementation eq
equations
    collect (output) = input;
implementation_end;
   stepper_control 712 592
			specifications active 'P_only'
				specification 'default'
description '<Information><Description><Version>4.8</Version><IsMainModel>1</IsMainModel><LibraryPath>Z:\home\wouter\Documents\studie\ma\mahd\implementation\library\Motor\stepper_control.emx</LibraryPath><TimeStamp>2020-7-23 13:09:57</TimeStamp></Description><Attributes><GlobalRelations>parameters
	real max_acceleration = 250 {rad/s2};
	real max_velocity = 25 {rad/s};
	real initial_velocity = 0 {rad/s};
	real initial_angle = -1.570796 {rad};</GlobalRelations></Attributes></Information>';
 type Submodel
  ports
   signal in setpoint {rad} ;
   signal out output {rad} ;
 end;
 icon bg bottom
  figures
   rectangle 648 576 760 608 color 0 fill 15132390;
   text 'name' 704 592 color 0 'Clear Sans' 16;
 end;
 implementation bg
  submodels
   Acceleration_int 648 336
    description '<Information>
 <Description>
    <Version>4.3</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Signal\Block Diagram\Integrate.emx</LibraryPath>
  <TimeStamp>2013-3-8 14:47:42</TimeStamp>
</Description>
</Information>';
    type Integrate
     ports
      signal in input;
      signal out output;
    end;
    icon bg bottom
     figures
      rectangle 632 320 664 352 color 0 fill 15132390;
      text '∫' 648 336.3 color 16711680 'Lucida Sans' 21 italic;
    end;
    implementation eq
parameters
	real global initial_velocity;		// initial value
equations
	output = int (input, initial_velocity);
     implementation_end;
   Acceleration_limit 568 336
    description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Signal\Block Diagram Non-Linear\SignalLimiter-Limit.emx</LibraryPath>
  <TimeStamp>2007-9-26 12:47:40</TimeStamp>
</Description>';
    type 'SignalLimiter-Limit'
     ports
      signal in input;
      signal out output;
    end;
    icon bg bottom
     figures
      group
       rectangle 552 320 584 352 color 0 fill 15132390;
       line 567.9 324.5 567.9 349 color 0 fill 15132390;
       line 555 336.2 580.7 336.2 color 0 fill 15132390;
       spline 561.9 343.1 573.9 329.4 color 16711680 fill 15132390 width 2;
       spline 573.3 330.2 581.9 329.8 color 16711680 fill 15132390 width 2;
       spline 555 343.6 561.9 343.1 color 16711680 fill 15132390 width 2;
      end;
    end;
    implementation eq
parameters
	real global max_acceleration {rad/s2};
equations
	output = limit (input, -max_acceleration, max_acceleration);
  implementation_end;
   plug setpoint 136 336;
   plug output 791 336;
   PlusMinus1 240 336
    description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Signal\Block Diagram\PlusMinus.emx</LibraryPath>
  <TimeStamp>2007-9-27 10:15:13</TimeStamp>
</Description>';
    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 232 328 248 344 color 0 fill 16777215;
    end;
    implementation eq
equations
    output = sum (collect (plus)) - sum (collect (minus));
    implementation_end;
   PlusMinus2 432 336
    description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Signal\Block Diagram\PlusMinus.emx</LibraryPath>
  <TimeStamp>2007-9-27 10:15:13</TimeStamp>
</Description>';
    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 424 328 440 344 color 0 fill 16777215;
    end;
    implementation eq
equations
    output = sum (collect (plus)) - sum (collect (minus));
    implementation_end;
   Position_control 296 336
    description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Signal\Control\PID Control\Continuous\PD.emx</LibraryPath>
  <TimeStamp>2008-1-17 10:49:7</TimeStamp>
</Description>';
    type PD
     ports
      signal in error;
      signal out output;
    end;
    icon bg bottom
     figures
      rectangle 280 320 312 352 color 0 fill 15132390;
      text 'PD' 296.5 336.1 color 16711680 18 bold;
    end;
    implementation eq
parameters
	real kp = 4 {};			// Proportional gain
	real tauD = 100 {s};		// Derivative time constant: tauD > 0
	real beta = 0.4 {};		// Tameness constant: 0 < beta << 1
variables
	real state, rate;
equations
	rate = (kp * error - output) / (beta * tauD);
	state = int (rate);
	output = state + kp * error /  beta;
      implementation_end;
   Splitter3 688 336
    description '<Description><Version>4.0</Version>
   <LibraryPath>Signal\Block Diagram\Splitter.emx</LibraryPath>
  <TimeStamp>2008-01-17 11:28:29</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
    knot Splitter
     ports
      signal knot duplicatable out output [1];
      signal knot in input [1];
    end;
    icon bg ellipse
     figures
      ellipse 684.8 332.8 691.2 339.2 color -1 fill 0;
      ellipse 683.7 331.7 692.3 340.3 color -1;
     terminals
      input 688 336 fixed;
    end;
    implementation eq
equations
    collect (output) = input;
implementation_end;
   Splitter4 752 336
    description '<Description><Version>4.0</Version>
   <LibraryPath>Signal\Block Diagram\Splitter.emx</LibraryPath>
  <TimeStamp>2008-01-17 11:28:29</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
    knot Splitter
     ports
      signal knot duplicatable out output [1];
      signal knot in input [1];
    end;
    icon bg ellipse
     figures
      ellipse 748.8 332.8 755.2 339.2 color -1 fill 0;
      ellipse 747.7 331.7 756.3 340.3 color -1;
     terminals
      input 752 336 fixed;
    end;
    implementation eq
equations
    collect (output) = input;
implementation_end;
   Velocity_control 480 336
    description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Signal\Control\PID Control\Continuous\PD.emx</LibraryPath>
  <TimeStamp>2008-1-17 10:49:7</TimeStamp>
</Description>';
    type PD
     ports
      signal in error;
      signal out output;
    end;
    icon bg bottom
     figures
      rectangle 464 320 496 352 color 0 fill 15132390;
      text 'PD' 480.5 336.1 color 16711680 18 bold;
    end;
    implementation eq
parameters
	real kp = 12 {};			// Proportional gain
	real tauD = 10 {s};		// Derivative time constant: tauD > 0
	real beta = 0.4 {};		// Tameness constant: 0 < beta << 1
variables
	real state, rate;
equations
	rate = (kp * error - output) / (beta * tauD);
	state = int (rate);
	output = state + kp * error /  beta;
      implementation_end;
   Velocity_int 720 336
    description '<Information>
 <Description>
    <Version>4.3</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Signal\Block Diagram\Integrate.emx</LibraryPath>
  <TimeStamp>2013-3-8 14:47:42</TimeStamp>
</Description>
</Information>';
    type Integrate
     ports
      signal in input;
      signal out output;
    end;
    icon bg bottom
     figures
      rectangle 704 320 736 352 color 0 fill 15132390;
      text '∫' 720 336.3 color 16711680 'Lucida Sans' 21 italic;
    end;
    implementation eq
parameters
	real global initial_angle;		// initial value
equations
	output = int (input, initial_angle);
     implementation_end;
   Velocity_limit 376 336
    description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Signal\Block Diagram Non-Linear\SignalLimiter-Limit.emx</LibraryPath>
  <TimeStamp>2007-9-26 12:47:40</TimeStamp>
</Description>';
    type 'SignalLimiter-Limit'
     ports
      signal in input;
      signal out output;
    end;
    icon bg bottom
     figures
      group
       rectangle 360 320 392 352 color 0 fill 15132390;
       line 375.9 324.5 375.9 349 color 0 fill 15132390;
       line 363 336.2 388.7 336.2 color 0 fill 15132390;
       spline 369.9 343.1 381.9 329.4 color 16711680 fill 15132390 width 2;
       spline 381.3 330.2 389.9 329.8 color 16711680 fill 15132390 width 2;
       spline 363 343.6 369.9 343.1 color 16711680 fill 15132390 width 2;
      end;
    end;
    implementation eq
parameters
	real global max_velocity {rad/s};
equations
	output = limit (input, -max_velocity, max_velocity);
  implementation_end;
  end;
  connections
   Acceleration_int\output -> Splitter3\input;
   Acceleration_limit\output -> Acceleration_int\input;
   PlusMinus1\output -> Position_control\error;
   PlusMinus2\output -> Velocity_control\error;
   Position_control\output -> Velocity_limit\input;
   setpoint -> PlusMinus1\plus;
   Splitter3\output -> PlusMinus2\minus 688 288 432 288;
   Splitter3\output -> Velocity_int\input;
   Splitter4\output -> output;
   Splitter4\output -> PlusMinus1\minus 752 400 240 400;
   Velocity_control\output -> Acceleration_limit\input;
   Velocity_int\output -> Splitter4\input;
   Velocity_limit\output -> PlusMinus2\plus;
  end;
 implementation_end;
specification_end;
				specification 'P_only'
 description '<Information><Description><Version>4.8</Version><IsMainModel>1</IsMainModel><LibraryPath>Z:\home\wouter\Documents\studie\ma\mahd\implementation\library\Motor\stepper_control.emx</LibraryPath><TimeStamp>2020-7-23 13:09:57</TimeStamp></Description><Attributes><GlobalRelations>parameters
	real max_acceleration = 200 {rad/s2};
	real max_velocity = 25 {rad/s};
	real initial_velocity = 0 {rad/s};
	real initial_angle = 1.570796 {rad};</GlobalRelations></Attributes></Information>';
 type Submodel
  ports
   signal in setpoint {rad} ;
   signal out output {rad} ;
 end;
 icon bg bottom
  figures
   rectangle 656 576 768 608 color 0 fill 15132390;
   text 'name' 712 592 color 0 'Clear Sans' 16;
 end;
 implementation bg
  submodels
   Acceleration_int 648 336
    description '<Information>
 <Description>
    <Version>4.3</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Signal\Block Diagram\Integrate.emx</LibraryPath>
  <TimeStamp>2013-3-8 14:47:42</TimeStamp>
</Description>
</Information>';
    type Integrate
     ports
      signal in input;
      signal out output;
    end;
    icon bg bottom
     figures
      rectangle 632 320 664 352 color 0 fill 15132390;
      text '∫' 648 336.3 color 16711680 'Lucida Sans' 21 italic;
    end;
    implementation eq
parameters
	real global initial_velocity;		// initial value
equations
	output = int (input, initial_velocity);
     implementation_end;
   Acceleration_limit 568 336
    description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Signal\Block Diagram Non-Linear\SignalLimiter-Limit.emx</LibraryPath>
  <TimeStamp>2007-9-26 12:47:40</TimeStamp>
</Description>';
    type 'SignalLimiter-Limit'
     ports
      signal in input;
      signal out output;
    end;
    icon bg bottom
     figures
      group
       rectangle 552 320 584 352 color 0 fill 15132390;
       line 567.9 324.5 567.9 349 color 0 fill 15132390;
       line 555 336.2 580.7 336.2 color 0 fill 15132390;
       spline 561.9 343.1 573.9 329.4 color 16711680 fill 15132390 width 2;
       spline 573.3 330.2 581.9 329.8 color 16711680 fill 15132390 width 2;
       spline 555 343.6 561.9 343.1 color 16711680 fill 15132390 width 2;
      end;
    end;
    implementation eq
parameters
	real global max_acceleration {rad/s2};
equations
	output = limit (input, -max_acceleration, max_acceleration);
  implementation_end;
   plug setpoint 136 336;
   plug output 791 336;
   PlusMinus1 240 336
    description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Signal\Block Diagram\PlusMinus.emx</LibraryPath>
  <TimeStamp>2007-9-27 10:15:13</TimeStamp>
</Description>';
    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 232 328 248 344 color 0 fill 16777215;
    end;
    implementation eq
equations
    output = sum (collect (plus)) - sum (collect (minus));
    implementation_end;
   PlusMinus2 432 336
    description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Signal\Block Diagram\PlusMinus.emx</LibraryPath>
  <TimeStamp>2007-9-27 10:15:13</TimeStamp>
</Description>';
    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 424 328 440 344 color 0 fill 16777215;
    end;
    implementation eq
equations
    output = sum (collect (plus)) - sum (collect (minus));
    implementation_end;
   Position_control 296 336
    description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Signal\Control\PID Control\Continuous\P.emx</LibraryPath>
  <TimeStamp>2008-1-17 10:48:8</TimeStamp>
</Description>';
    type P
     ports
      signal in error;
      signal out output;
    end;
    icon bg bottom
     figures
      rectangle 280 320 312 352 color 0 fill 15132390;
      text 'P' 296.5 336.1 color 16711680 18 bold;
    end;
    implementation eq
parameters
	real kp = 26.0 {};			// Proportional gain
equations
	output = kp * error;
    implementation_end;
   Splitter3 688 336
    description '<Description><Version>4.0</Version>
   <LibraryPath>Signal\Block Diagram\Splitter.emx</LibraryPath>
  <TimeStamp>2008-01-17 11:28:29</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
    knot Splitter
     ports
      signal knot duplicatable out output [1];
      signal knot in input [1];
    end;
    icon bg ellipse
     figures
      ellipse 684.8 332.8 691.2 339.2 color -1 fill 0;
      ellipse 683.7 331.7 692.3 340.3 color -1;
     terminals
      input 688 336 fixed;
    end;
    implementation eq
equations
    collect (output) = input;
implementation_end;
   Splitter4 752 336
    description '<Description><Version>4.0</Version>
   <LibraryPath>Signal\Block Diagram\Splitter.emx</LibraryPath>
  <TimeStamp>2008-01-17 11:28:29</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
    knot Splitter
     ports
      signal knot duplicatable out output [1];
      signal knot in input [1];
    end;
    icon bg ellipse
     figures
      ellipse 748.8 332.8 755.2 339.2 color -1 fill 0;
      ellipse 747.7 331.7 756.3 340.3 color -1;
     terminals
      input 752 336 fixed;
    end;
    implementation eq
equations
    collect (output) = input;
implementation_end;
   Velocity_control 480 336
    description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Signal\Control\PID Control\Continuous\P.emx</LibraryPath>
  <TimeStamp>2008-1-17 10:48:8</TimeStamp>
</Description>';
    type P
     ports
      signal in error;
      signal out output;
    end;
    icon bg bottom
     figures
      rectangle 464 320 496 352 color 0 fill 15132390;
      text 'P' 480.5 336.1 color 16711680 18 bold;
    end;
    implementation eq
parameters
	real kp = 66.0 {};			// Proportional gain
equations
	output = kp * error;
    implementation_end;
   Velocity_int 720 336
    description '<Information>
 <Description>
    <Version>4.3</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Signal\Block Diagram\Integrate.emx</LibraryPath>
  <TimeStamp>2013-3-8 14:47:42</TimeStamp>
</Description>
</Information>';
    type Integrate
     ports
      signal in input;
      signal out output;
    end;
    icon bg bottom
     figures
      rectangle 704 320 736 352 color 0 fill 15132390;
      text '∫' 720 336.3 color 16711680 'Lucida Sans' 21 italic;
    end;
    implementation eq
parameters
	real global initial_angle;		// initial value
equations
	output = int (input, initial_angle);
     implementation_end;
   Velocity_limit 376 336
    description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Signal\Block Diagram Non-Linear\SignalLimiter-Limit.emx</LibraryPath>
  <TimeStamp>2007-9-26 12:47:40</TimeStamp>
</Description>';
    type 'SignalLimiter-Limit'
     ports
      signal in input;
      signal out output;
    end;
    icon bg bottom
     figures
      group
       rectangle 360 320 392 352 color 0 fill 15132390;
       line 375.9 324.5 375.9 349 color 0 fill 15132390;
       line 363 336.2 388.7 336.2 color 0 fill 15132390;
       spline 369.9 343.1 381.9 329.4 color 16711680 fill 15132390 width 2;
       spline 381.3 330.2 389.9 329.8 color 16711680 fill 15132390 width 2;
       spline 363 343.6 369.9 343.1 color 16711680 fill 15132390 width 2;
      end;
    end;
    implementation eq
parameters
	real global max_velocity {rad/s};
equations
	output = limit (input, -max_velocity, max_velocity);
  implementation_end;
  end;
  connections
   Acceleration_int\output -> Splitter3\input;
   Acceleration_limit\output -> Acceleration_int\input;
   PlusMinus1\output -> Position_control\error;
   PlusMinus2\output -> Velocity_control\error;
   Position_control\output -> Velocity_limit\input;
   setpoint -> PlusMinus1\plus;
   Splitter3\output -> PlusMinus2\minus 688 288 432 288;
   Splitter3\output -> Velocity_int\input;
   Splitter4\output -> output;
   Splitter4\output -> PlusMinus1\minus 752 400 240 400;
   Velocity_control\output -> Acceleration_limit\input;
   Velocity_int\output -> Splitter4\input;
   Velocity_limit\output -> PlusMinus2\plus;
  end;
 implementation_end;
specification_end;
			end;
   stepper_control1 480 752
			specifications active 'P_only'
				specification 'default'
description '<Information><Description><Version>4.8</Version><IsMainModel>1</IsMainModel><LibraryPath>Z:\home\wouter\Documents\studie\ma\mahd\implementation\library\Motor\stepper_control.emx</LibraryPath><TimeStamp>2020-7-23 13:09:57</TimeStamp></Description><Attributes><GlobalRelations>parameters
	real max_acceleration = 250 {rad/s2};
	real max_velocity = 25 {rad/s};
	real initial_velocity = 0 {rad/s};
	real initial_angle = -1.570796 {rad};</GlobalRelations></Attributes></Information>';
 type Submodel
  ports
   signal in setpoint {rad} ;
   signal out output {rad} ;
 end;
 icon bg bottom
  figures
   rectangle 648 576 760 608 color 0 fill 15132390;
   text 'name' 704 592 color 0 'Clear Sans' 16;
 end;
 implementation bg
  submodels
   Acceleration_int 648 336
    description '<Information>
 <Description>
    <Version>4.3</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Signal\Block Diagram\Integrate.emx</LibraryPath>
  <TimeStamp>2013-3-8 14:47:42</TimeStamp>
</Description>
</Information>';
    type Integrate
     ports
      signal in input;
      signal out output;
    end;
    icon bg bottom
     figures
      rectangle 632 320 664 352 color 0 fill 15132390;
      text '∫' 648 336.3 color 16711680 'Lucida Sans' 21 italic;
    end;
    implementation eq
parameters
	real global initial_velocity;		// initial value
equations
	output = int (input, initial_velocity);
     implementation_end;
   Acceleration_limit 568 336
    description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Signal\Block Diagram Non-Linear\SignalLimiter-Limit.emx</LibraryPath>
  <TimeStamp>2007-9-26 12:47:40</TimeStamp>
</Description>';
    type 'SignalLimiter-Limit'
     ports
      signal in input;
      signal out output;
    end;
    icon bg bottom
     figures
      group
       rectangle 552 320 584 352 color 0 fill 15132390;
       line 567.9 324.5 567.9 349 color 0 fill 15132390;
       line 555 336.2 580.7 336.2 color 0 fill 15132390;
       spline 561.9 343.1 573.9 329.4 color 16711680 fill 15132390 width 2;
       spline 573.3 330.2 581.9 329.8 color 16711680 fill 15132390 width 2;
       spline 555 343.6 561.9 343.1 color 16711680 fill 15132390 width 2;
      end;
    end;
    implementation eq
parameters
	real global max_acceleration {rad/s2};
equations
	output = limit (input, -max_acceleration, max_acceleration);
  implementation_end;
   plug setpoint 136 336;
   plug output 791 336;
   PlusMinus1 240 336
    description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Signal\Block Diagram\PlusMinus.emx</LibraryPath>
  <TimeStamp>2007-9-27 10:15:13</TimeStamp>
</Description>';
    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 232 328 248 344 color 0 fill 16777215;
    end;
    implementation eq
equations
    output = sum (collect (plus)) - sum (collect (minus));
    implementation_end;
   PlusMinus2 432 336
    description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Signal\Block Diagram\PlusMinus.emx</LibraryPath>
  <TimeStamp>2007-9-27 10:15:13</TimeStamp>
</Description>';
    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 424 328 440 344 color 0 fill 16777215;
    end;
    implementation eq
equations
    output = sum (collect (plus)) - sum (collect (minus));
    implementation_end;
   Position_control 296 336
    description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Signal\Control\PID Control\Continuous\PD.emx</LibraryPath>
  <TimeStamp>2008-1-17 10:49:7</TimeStamp>
</Description>';
    type PD
     ports
      signal in error;
      signal out output;
    end;
    icon bg bottom
     figures
      rectangle 280 320 312 352 color 0 fill 15132390;
      text 'PD' 296.5 336.1 color 16711680 18 bold;
    end;
    implementation eq
parameters
	real kp = 4 {};			// Proportional gain
	real tauD = 100 {s};		// Derivative time constant: tauD > 0
	real beta = 0.4 {};		// Tameness constant: 0 < beta << 1
variables
	real state, rate;
equations
	rate = (kp * error - output) / (beta * tauD);
	state = int (rate);
	output = state + kp * error /  beta;
      implementation_end;
   Splitter3 688 336
    description '<Description><Version>4.0</Version>
   <LibraryPath>Signal\Block Diagram\Splitter.emx</LibraryPath>
  <TimeStamp>2008-01-17 11:28:29</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
    knot Splitter
     ports
      signal knot duplicatable out output [1];
      signal knot in input [1];
    end;
    icon bg ellipse
     figures
      ellipse 684.8 332.8 691.2 339.2 color -1 fill 0;
      ellipse 683.7 331.7 692.3 340.3 color -1;
     terminals
      input 688 336 fixed;
    end;
    implementation eq
equations
    collect (output) = input;
implementation_end;
   Splitter4 752 336
    description '<Description><Version>4.0</Version>
   <LibraryPath>Signal\Block Diagram\Splitter.emx</LibraryPath>
  <TimeStamp>2008-01-17 11:28:29</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
    knot Splitter
     ports
      signal knot duplicatable out output [1];
      signal knot in input [1];
    end;
    icon bg ellipse
     figures
      ellipse 748.8 332.8 755.2 339.2 color -1 fill 0;
      ellipse 747.7 331.7 756.3 340.3 color -1;
     terminals
      input 752 336 fixed;
    end;
    implementation eq
equations
    collect (output) = input;
implementation_end;
   Velocity_control 480 336
    description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Signal\Control\PID Control\Continuous\PD.emx</LibraryPath>
  <TimeStamp>2008-1-17 10:49:7</TimeStamp>
</Description>';
    type PD
     ports
      signal in error;
      signal out output;
    end;
    icon bg bottom
     figures
      rectangle 464 320 496 352 color 0 fill 15132390;
      text 'PD' 480.5 336.1 color 16711680 18 bold;
    end;
    implementation eq
parameters
	real kp = 12 {};			// Proportional gain
	real tauD = 10 {s};		// Derivative time constant: tauD > 0
	real beta = 0.4 {};		// Tameness constant: 0 < beta << 1
variables
	real state, rate;
equations
	rate = (kp * error - output) / (beta * tauD);
	state = int (rate);
	output = state + kp * error /  beta;
      implementation_end;
   Velocity_int 720 336
    description '<Information>
 <Description>
    <Version>4.3</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Signal\Block Diagram\Integrate.emx</LibraryPath>
  <TimeStamp>2013-3-8 14:47:42</TimeStamp>
</Description>
</Information>';
    type Integrate
     ports
      signal in input;
      signal out output;
    end;
    icon bg bottom
     figures
      rectangle 704 320 736 352 color 0 fill 15132390;
      text '∫' 720 336.3 color 16711680 'Lucida Sans' 21 italic;
    end;
    implementation eq
parameters
	real global initial_angle;		// initial value
equations
	output = int (input, initial_angle);
     implementation_end;
   Velocity_limit 376 336
    description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Signal\Block Diagram Non-Linear\SignalLimiter-Limit.emx</LibraryPath>
  <TimeStamp>2007-9-26 12:47:40</TimeStamp>
</Description>';
    type 'SignalLimiter-Limit'
     ports
      signal in input;
      signal out output;
    end;
    icon bg bottom
     figures
      group
       rectangle 360 320 392 352 color 0 fill 15132390;
       line 375.9 324.5 375.9 349 color 0 fill 15132390;
       line 363 336.2 388.7 336.2 color 0 fill 15132390;
       spline 369.9 343.1 381.9 329.4 color 16711680 fill 15132390 width 2;
       spline 381.3 330.2 389.9 329.8 color 16711680 fill 15132390 width 2;
       spline 363 343.6 369.9 343.1 color 16711680 fill 15132390 width 2;
      end;
    end;
    implementation eq
parameters
	real global max_velocity {rad/s};
equations
	output = limit (input, -max_velocity, max_velocity);
  implementation_end;
  end;
  connections
   Acceleration_int\output -> Splitter3\input;
   Acceleration_limit\output -> Acceleration_int\input;
   PlusMinus1\output -> Position_control\error;
   PlusMinus2\output -> Velocity_control\error;
   Position_control\output -> Velocity_limit\input;
   setpoint -> PlusMinus1\plus;
   Splitter3\output -> PlusMinus2\minus 688 288 432 288;
   Splitter3\output -> Velocity_int\input;
   Splitter4\output -> output;
   Splitter4\output -> PlusMinus1\minus 752 400 240 400;
   Velocity_control\output -> Acceleration_limit\input;
   Velocity_int\output -> Splitter4\input;
   Velocity_limit\output -> PlusMinus2\plus;
  end;
 implementation_end;
specification_end;
				specification 'P_only'
 description '<Information><Description><Version>4.8</Version><IsMainModel>1</IsMainModel><LibraryPath>Z:\home\wouter\Documents\studie\ma\mahd\implementation\library\Motor\stepper_control.emx</LibraryPath><TimeStamp>2020-7-23 13:09:57</TimeStamp></Description><Attributes><GlobalRelations>parameters
	real max_acceleration = 200 {rad/s2};
	real max_velocity = 25 {rad/s};
	real initial_velocity = 0 {rad/s};
	real initial_angle = 0 {rad};</GlobalRelations></Attributes></Information>';
 type Submodel
  ports
   signal in setpoint {rad} ;
   signal out output {rad} ;
 end;
 icon bg
  figures
   rectangle 424 736 536 768 color 0 fill 15132390;
   text 'name' 480 752 color 0 'Clear Sans' 16;
 end;
 implementation bg
  submodels
   Acceleration_int 648 336
    description '<Information>
 <Description>
    <Version>4.3</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Signal\Block Diagram\Integrate.emx</LibraryPath>
  <TimeStamp>2013-3-8 14:47:42</TimeStamp>
</Description>
</Information>';
    type Integrate
     ports
      signal in input;
      signal out output;
    end;
    icon bg bottom
     figures
      rectangle 632 320 664 352 color 0 fill 15132390;
      text '∫' 648 336.3 color 16711680 'Lucida Sans' 21 italic;
    end;
    implementation eq
parameters
	real global initial_velocity;		// initial value
equations
	output = int (input, initial_velocity);
     implementation_end;
   Acceleration_limit 568 336
    description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Signal\Block Diagram Non-Linear\SignalLimiter-Limit.emx</LibraryPath>
  <TimeStamp>2007-9-26 12:47:40</TimeStamp>
</Description>';
    type 'SignalLimiter-Limit'
     ports
      signal in input;
      signal out output;
    end;
    icon bg bottom
     figures
      group
       rectangle 552 320 584 352 color 0 fill 15132390;
       line 567.9 324.5 567.9 349 color 0 fill 15132390;
       line 555 336.2 580.7 336.2 color 0 fill 15132390;
       spline 561.9 343.1 573.9 329.4 color 16711680 fill 15132390 width 2;
       spline 573.3 330.2 581.9 329.8 color 16711680 fill 15132390 width 2;
       spline 555 343.6 561.9 343.1 color 16711680 fill 15132390 width 2;
      end;
    end;
    implementation eq
parameters
	real global max_acceleration {rad/s2};
equations
	output = limit (input, -max_acceleration, max_acceleration);
  implementation_end;
   plug setpoint 136 336;
   plug output 791 336;
   PlusMinus1 240 336
    description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Signal\Block Diagram\PlusMinus.emx</LibraryPath>
  <TimeStamp>2007-9-27 10:15:13</TimeStamp>
</Description>';
    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 232 328 248 344 color 0 fill 16777215;
    end;
    implementation eq
equations
    output = sum (collect (plus)) - sum (collect (minus));
    implementation_end;
   PlusMinus2 432 336
    description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Signal\Block Diagram\PlusMinus.emx</LibraryPath>
  <TimeStamp>2007-9-27 10:15:13</TimeStamp>
</Description>';
    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 424 328 440 344 color 0 fill 16777215;
    end;
    implementation eq
equations
    output = sum (collect (plus)) - sum (collect (minus));
    implementation_end;
   Position_control 296 336
    description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Signal\Control\PID Control\Continuous\P.emx</LibraryPath>
  <TimeStamp>2008-1-17 10:48:8</TimeStamp>
</Description>';
    type P
     ports
      signal in error;
      signal out output;
    end;
    icon bg bottom
     figures
      rectangle 280 320 312 352 color 0 fill 15132390;
      text 'P' 296.5 336.1 color 16711680 18 bold;
    end;
    implementation eq
parameters
	real kp = 31.0 {};			// Proportional gain
equations
	output = kp * error;
    implementation_end;
   Splitter3 688 336
    description '<Description><Version>4.0</Version>
   <LibraryPath>Signal\Block Diagram\Splitter.emx</LibraryPath>
  <TimeStamp>2008-01-17 11:28:29</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
    knot Splitter
     ports
      signal knot duplicatable out output [1];
      signal knot in input [1];
    end;
    icon bg ellipse
     figures
      ellipse 684.8 332.8 691.2 339.2 color -1 fill 0;
      ellipse 683.7 331.7 692.3 340.3 color -1;
     terminals
      input 688 336 fixed;
    end;
    implementation eq
equations
    collect (output) = input;
implementation_end;
   Splitter4 752 336
    description '<Description><Version>4.0</Version>
   <LibraryPath>Signal\Block Diagram\Splitter.emx</LibraryPath>
  <TimeStamp>2008-01-17 11:28:29</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
    knot Splitter
     ports
      signal knot duplicatable out output [1];
      signal knot in input [1];
    end;
    icon bg ellipse
     figures
      ellipse 748.8 332.8 755.2 339.2 color -1 fill 0;
      ellipse 747.7 331.7 756.3 340.3 color -1;
     terminals
      input 752 336 fixed;
    end;
    implementation eq
equations
    collect (output) = input;
implementation_end;
   Velocity_control 480 336
    description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Signal\Control\PID Control\Continuous\P.emx</LibraryPath>
  <TimeStamp>2008-1-17 10:48:8</TimeStamp>
</Description>';
    type P
     ports
      signal in error;
      signal out output;
    end;
    icon bg bottom
     figures
      rectangle 464 320 496 352 color 0 fill 15132390;
      text 'P' 480.5 336.1 color 16711680 18 bold;
    end;
    implementation eq
parameters
	real kp = 69.0 {};			// Proportional gain
equations
	output = kp * error;
    implementation_end;
   Velocity_int 720 336
    description '<Information>
 <Description>
    <Version>4.3</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Signal\Block Diagram\Integrate.emx</LibraryPath>
  <TimeStamp>2013-3-8 14:47:42</TimeStamp>
</Description>
</Information>';
    type Integrate
     ports
      signal in input;
      signal out output;
    end;
    icon bg bottom
     figures
      rectangle 704 320 736 352 color 0 fill 15132390;
      text '∫' 720 336.3 color 16711680 'Lucida Sans' 21 italic;
    end;
    implementation eq
parameters
	real global initial_angle;		// initial value
equations
	output = int (input, initial_angle);
     implementation_end;
   Velocity_limit 376 336
    description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Signal\Block Diagram Non-Linear\SignalLimiter-Limit.emx</LibraryPath>
  <TimeStamp>2007-9-26 12:47:40</TimeStamp>
</Description>';
    type 'SignalLimiter-Limit'
     ports
      signal in input;
      signal out output;
    end;
    icon bg bottom
     figures
      group
       rectangle 360 320 392 352 color 0 fill 15132390;
       line 375.9 324.5 375.9 349 color 0 fill 15132390;
       line 363 336.2 388.7 336.2 color 0 fill 15132390;
       spline 369.9 343.1 381.9 329.4 color 16711680 fill 15132390 width 2;
       spline 381.3 330.2 389.9 329.8 color 16711680 fill 15132390 width 2;
       spline 363 343.6 369.9 343.1 color 16711680 fill 15132390 width 2;
      end;
    end;
    implementation eq
parameters
	real global max_velocity {rad/s};
equations
	output = limit (input, -max_velocity, max_velocity);
  implementation_end;
  end;
  connections
   Acceleration_int\output -> Splitter3\input;
   Acceleration_limit\output -> Acceleration_int\input;
   PlusMinus1\output -> Position_control\error;
   PlusMinus2\output -> Velocity_control\error;
   Position_control\output -> Velocity_limit\input;
   setpoint -> PlusMinus1\plus;
   Splitter3\output -> PlusMinus2\minus 688 288 432 288;
   Splitter3\output -> Velocity_int\input;
   Splitter4\output -> output;
   Splitter4\output -> PlusMinus1\minus 752 400 240 400;
   Velocity_control\output -> Acceleration_limit\input;
   Velocity_int\output -> Splitter4\input;
   Velocity_limit\output -> PlusMinus2\plus;
  end;
 implementation_end;
specification_end;
			end;
  end;
  connections
   Body1\input <- Splitter2\output;
   Body3\input <- Splitter3\output;
   COM_body3\p => OneJunction4\p;
   COM_body4\p => OneJunction6\p;
   COM_body5\p => Link8\Pin;
   Ground1\output -> JointC\Hin 576 568;
   Ground1\p <= OneJunction5\p;
   inverse_kinematics\angle1 -> stepper_control\setpoint;
   inverse_kinematics\angle2 -> Negate2\input;
   inverse_kinematics\input <- rectanglepath\output;
   Joint_dynB\output => JointB\Pdiff;
   Joint_dynC\output => JointC\Pdiff;
   Joint_dynD\output => JointD\Pdiff;
   Joint_dynE\output => JointE\Pdiff;
   Joint_dynF\output => JointF\Pdiff;
   JointA\Pdiff <= Joint_dynA\output;
   JointA\Pout => Link3\Pin;
   JointB\Hin <- Splitter4\output;
   JointB\Hout -> Link6\Hin;
   JointB\Pin <= Link6\Pout;
   JointB\Pout => OneJunction3\p;
   JointC\Hout -> Link5\Hin;
   JointC\Pin <= Link5\Pout;
   JointD\Hin <- Link7\Hout 216 568;
   JointD\Hout -> Link9\Hin;
   JointD\Pin <= Link9\Pout;
   JointD\Pout => Link7\Pin 184 600;
   JointE\Pout => Link4\Pin;
   JointF\Hout -> Link10\Hin;
   JointF\Pout => Link11\Pin;
   LiftingArm\Hin <- Splitter6\output 728 256;
   LiftingArm\Pin <= OneJunction7\p 1264 224;
   LiftingArm\Pout => OneJunction6\p 696 224;
   Link1\Hout -> Splitter6\input;
   Link10\Hout -> Splitter9\input;
   Link10\Pout => JointF\Pin;
   Link11\Hout -> JointF\Hin;
   Link11\Pout => OneJunction6\p;
   Link2\Hin <- JointE\Hout;
   Link2\Hout -> Splitter11\input;
   Link2\Pin <= OneJunction3\p;
   Link2\Pout => JointE\Pin 184 112;
   Link3\Hout -> JointA\Hin;
   Link4\Hout -> JointE\Hin;
   Link5\Hout -> Splitter1\input;
   Link5\Pin <= OneJunction1\p;
   Link6\Hout -> Splitter2\input;
   Link6\Pin <= OneJunction2\p;
   Link8\Hout -> Splitter10\input;
   Link8\Pout => OneJunction7\p;
   Link9\Hout -> Splitter3\input;
   Link9\Pin <= OneJunction4\p;
   Negate2\output -> stepper_control1\setpoint;
   OneJunction1\p <= COM_body2\p;
   OneJunction1\p <= Link7\Pout;
   OneJunction2\p <= COM_body1\p;
   OneJunction2\p <= Link3\Pout;
   OneJunction3\p <= Link1\Pout;
   OneJunction4\p <= Link4\Pout;
   OneJunction5\p <= JointC\Pout;
   OneJunction5\p => JointA\Pin;
   OneJunction6\p => Link1\Pin;
   OneJunction7\p => Link10\Pin;
   Splitter1\output -> Body2\input;
   Splitter1\output -> COM_body2\Hin;
   Splitter1\output -> Link7\Hin;
   Splitter10\output -> Body6\input;
   Splitter10\output -> COM_body5\Hin;
   Splitter11\output -> Body4\input;
   Splitter11\output -> Splitter4\input;
   Splitter2\output -> COM_body1\Hin;
   Splitter2\output -> Link3\Hin;
   Splitter3\output -> COM_body3\Hin;
   Splitter3\output -> Link4\Hin;
   Splitter4\output -> Link1\Hin;
   Splitter6\output -> COM_body4\Hin;
   Splitter6\output -> Link11\Hin;
   Splitter9\output -> Body5\input;
   Splitter9\output -> Link8\Hin;
   stepper_control\output -> Joint_dynA\angle;
   stepper_control1\output -> Joint_dynC\angle;
  end;
 implementation_end;
]]>
</Sidops>
 </Model>
 <Experiments>
     <DefaultExperiment><![CDATA[Experiment 1]]>
</DefaultExperiment>
  <Experiment>
    <Name>Experiment 1</Name>
    <CreatedBy></CreatedBy>
    <Info></Info>
<ExpData>
  <VersionNumber>4.8</VersionNumber>
  <ModelProperties>
    <ModelProperty section="processing" entry="checkForStaticExpressions" value="1"/>
    <ModelProperty section="processing" entry="debug_checkForStaticExpressions" value="1"/>
    <ModelProperty section="processing" entry="checkForDuplicateExpressions" value="1"/>
    <ModelProperty section="processing" entry="debug_checkForDuplicateExpressions" value="1"/>
    <ModelProperty section="processing" entry="showresult" value="1"/>
    <ModelProperty section="processing" entry="debug_showresult" value="1"/>
  </ModelProperties>
  <Variables>
   <Constants>
   </Constants>
   <Parameters>
   </Parameters>
   <Initials>
    <Variable>
     <Name>COM_body1\InertialTensor\state_initial</Name>
     <Rows>6</Rows>
     <Columns>1</Columns>
     <Value>0 0 0 0 0 0</Value>
    </Variable>
    <Variable>
     <Name>COM_body2\InertialTensor\state_initial</Name>
     <Rows>6</Rows>
     <Columns>1</Columns>
     <Value>0 0 0 0 0 0</Value>
    </Variable>
    <Variable>
     <Name>COM_body3\InertialTensor\state_initial</Name>
     <Rows>6</Rows>
     <Columns>1</Columns>
     <Value>0 0 0 0 0 0</Value>
    </Variable>
    <Variable>
     <Name>COM_body4\InertialTensor\state_initial</Name>
     <Rows>6</Rows>
     <Columns>1</Columns>
     <Value>0 0 0 0 0 0</Value>
    </Variable>
    <Variable>
     <Name>COM_body5\InertialTensor\state_initial</Name>
     <Rows>6</Rows>
     <Columns>1</Columns>
     <Value>0 0 0 0 0 0</Value>
    </Variable>
    <Variable>
     <Name>JointA\Hmatrix\p_initial</Name>
     <Rows>3</Rows>
     <Columns>1</Columns>
     <Value>0 0 0</Value>
    </Variable>
    <Variable>
     <Name>JointB\Hmatrix\p_initial</Name>
     <Rows>3</Rows>
     <Columns>1</Columns>
     <Value>0 0 0</Value>
    </Variable>
    <Variable>
     <Name>JointC\Hmatrix\p_initial</Name>
     <Rows>3</Rows>
     <Columns>1</Columns>
     <Value>0 0 0</Value>
    </Variable>
    <Variable>
     <Name>JointD\Hmatrix\p_initial</Name>
     <Rows>3</Rows>
     <Columns>1</Columns>
     <Value>0 0 0</Value>
    </Variable>
    <Variable>
     <Name>JointE\Hmatrix\p_initial</Name>
     <Rows>3</Rows>
     <Columns>1</Columns>
     <Value>0 0 0</Value>
    </Variable>
    <Variable>
     <Name>JointF\Hmatrix\p_initial</Name>
     <Rows>3</Rows>
     <Columns>1</Columns>
     <Value>0 0 0</Value>
    </Variable>
    <Variable>
     <Name>Joint_dynA\C1\state_initial</Name>
     <Rows>3</Rows>
     <Columns>1</Columns>
     <Value>0 0 0</Value>
    </Variable>
    <Variable>
     <Name>Joint_dynA\C4\state_initial</Name>
     <Rows>2</Rows>
     <Columns>1</Columns>
     <Value>0 0</Value>
    </Variable>
    <Variable>
     <Name>Joint_dynA\C\state_initial</Name>
     <Value>0</Value>
    </Variable>
    <Variable>
     <Name>Joint_dynA\stepper_model\I1\state_initial</Name>
     <Value>0</Value>
    </Variable>
    <Variable>
     <Name>Joint_dynA\stepper_model\I2\state_initial</Name>
     <Value>0</Value>
    </Variable>
    <Variable>
     <Name>Joint_dynA\stepper_model\I\state_initial</Name>
     <Value>0</Value>
    </Variable>
    <Variable>
     <Name>Joint_dynB\C1\state_initial</Name>
     <Rows>3</Rows>
     <Columns>1</Columns>
     <Value>0 0 0</Value>
    </Variable>
    <Variable>
     <Name>Joint_dynB\C4\state_initial</Name>
     <Rows>2</Rows>
     <Columns>1</Columns>
     <Value>0 0</Value>
    </Variable>
    <Variable>
     <Name>Joint_dynC\C1\state_initial</Name>
     <Rows>3</Rows>
     <Columns>1</Columns>
     <Value>0 0 0</Value>
    </Variable>
    <Variable>
     <Name>Joint_dynC\C4\state_initial</Name>
     <Rows>2</Rows>
     <Columns>1</Columns>
     <Value>0 0</Value>
    </Variable>
    <Variable>
     <Name>Joint_dynC\C\state_initial</Name>
     <Value>0</Value>
    </Variable>
    <Variable>
     <Name>Joint_dynC\stepper_model\I1\state_initial</Name>
     <Value>0</Value>
    </Variable>
    <Variable>
     <Name>Joint_dynC\stepper_model\I2\state_initial</Name>
     <Value>0</Value>
    </Variable>
    <Variable>
     <Name>Joint_dynC\stepper_model\I\state_initial</Name>
     <Value>0</Value>
    </Variable>
    <Variable>
     <Name>Joint_dynC\stepper_model\RotorAngle\angle_initial</Name>
     <Unit>rad</Unit>
     <Value>0</Value>
    </Variable>
    <Variable>
     <Name>Joint_dynD\C1\state_initial</Name>
     <Rows>3</Rows>
     <Columns>1</Columns>
     <Value>0 0 0</Value>
    </Variable>
    <Variable>
     <Name>Joint_dynD\C4\state_initial</Name>
     <Rows>2</Rows>
     <Columns>1</Columns>
     <Value>0 0</Value>
    </Variable>
    <Variable>
     <Name>Joint_dynE\C1\state_initial</Name>
     <Rows>3</Rows>
     <Columns>1</Columns>
     <Value>0 0 0</Value>
    </Variable>
    <Variable>
     <Name>Joint_dynE\C4\state_initial</Name>
     <Rows>2</Rows>
     <Columns>1</Columns>
     <Value>0 0</Value>
    </Variable>
    <Variable>
     <Name>Joint_dynF\C1\state_initial</Name>
     <Rows>3</Rows>
     <Columns>1</Columns>
     <Value>0 0 0</Value>
    </Variable>
    <Variable>
     <Name>Joint_dynF\C4\state_initial</Name>
     <Rows>2</Rows>
     <Columns>1</Columns>
     <Value>0 0</Value>
    </Variable>
    <Variable>
     <Name>LiftingArm\COM1\InertialTensor\state_initial</Name>
     <Rows>6</Rows>
     <Columns>1</Columns>
     <Value>0 0 0 0 0 0</Value>
    </Variable>
    <Variable>
     <Name>LiftingArm\COM\InertialTensor\state_initial</Name>
     <Rows>6</Rows>
     <Columns>1</Columns>
     <Value>0 0 0 0 0 0</Value>
    </Variable>
    <Variable>
     <Name>LiftingArm\Joint1\Hmatrix\p_initial</Name>
     <Rows>3</Rows>
     <Columns>1</Columns>
     <Value>0 0 0</Value>
    </Variable>
    <Variable>
     <Name>LiftingArm\Joint2\Hmatrix\p_initial</Name>
     <Rows>3</Rows>
     <Columns>1</Columns>
     <Value>0 0 0</Value>
    </Variable>
    <Variable>
     <Name>LiftingArm\Joint\Hmatrix\p_initial</Name>
     <Rows>3</Rows>
     <Columns>1</Columns>
     <Value>0 0 0</Value>
    </Variable>
    <Variable>
     <Name>LiftingArm\Joint_dynF1\C1\state_initial</Name>
     <Rows>3</Rows>
     <Columns>1</Columns>
     <Value>0 0 0</Value>
    </Variable>
    <Variable>
     <Name>LiftingArm\Joint_dynF1\C4\state_initial</Name>
     <Rows>2</Rows>
     <Columns>1</Columns>
     <Value>0 0</Value>
    </Variable>
    <Variable>
     <Name>LiftingArm\Joint_dynF1\C\state_initial</Name>
     <Value>0</Value>
    </Variable>
    <Variable>
     <Name>LiftingArm\Joint_dynF1\SG90\C\state_initial</Name>
     <Value>0</Value>
    </Variable>
    <Variable>
     <Name>LiftingArm\Joint_dynF1\SG90\I\state_initial</Name>
     <Value>0</Value>
    </Variable>
    <Variable>
     <Name>LiftingArm\Joint_dynF1\SG90\PD\state_initial</Name>
     <Value>0</Value>
    </Variable>
    <Variable>
     <Name>LiftingArm\Joint_dynF2\C1\state_initial</Name>
     <Rows>3</Rows>
     <Columns>1</Columns>
     <Value>0 0 0</Value>
    </Variable>
    <Variable>
     <Name>LiftingArm\Joint_dynF2\C4\state_initial</Name>
     <Rows>2</Rows>
     <Columns>1</Columns>
     <Value>0 0</Value>
    </Variable>
    <Variable>
     <Name>LiftingArm\Joint_dynF3\C1\state_initial</Name>
     <Rows>3</Rows>
     <Columns>1</Columns>
     <Value>0 0 0</Value>
    </Variable>
    <Variable>
     <Name>LiftingArm\Joint_dynF3\C4\state_initial</Name>
     <Rows>2</Rows>
     <Columns>1</Columns>
     <Value>0 0</Value>
    </Variable>
   </Initials>
  </Variables>
  <PlotSpecs>
   <VarNames>
    <VarName>time</VarName>
    <VarName>Body2\dimension[1]</VarName>
    <VarName>Body2\dimension[2]</VarName>
    <VarName>Body2\dimension[3]</VarName>
    <VarName>Body2\position[1]</VarName>
    <VarName>Body2\position[2]</VarName>
    <VarName>Body2\position[3]</VarName>
    <VarName>Body2\R[1,3]</VarName>
    <VarName>Body2\R[2,3]</VarName>
    <VarName>Body2\R[3,3]</VarName>
    <VarName>Body2\R[1,2]</VarName>
    <VarName>Body2\R[2,2]</VarName>
    <VarName>Body2\R[3,2]</VarName>
    <VarName>Body3\dimension[1]</VarName>
    <VarName>Body3\dimension[2]</VarName>
    <VarName>Body3\dimension[3]</VarName>
    <VarName>Body3\position[1]</VarName>
    <VarName>Body3\position[2]</VarName>
    <VarName>Body3\position[3]</VarName>
    <VarName>Body3\R[1,3]</VarName>
    <VarName>Body3\R[2,3]</VarName>
    <VarName>Body3\R[3,3]</VarName>
    <VarName>Body3\R[1,2]</VarName>
    <VarName>Body3\R[2,2]</VarName>
    <VarName>Body3\R[3,2]</VarName>
    <VarName>Body4\dimension[1]</VarName>
    <VarName>Body4\dimension[2]</VarName>
    <VarName>Body4\dimension[3]</VarName>
    <VarName>Body4\R[1,3]</VarName>
    <VarName>Body4\R[2,3]</VarName>
    <VarName>Body4\R[3,3]</VarName>
    <VarName>Body4\R[1,2]</VarName>
    <VarName>Body4\R[2,2]</VarName>
    <VarName>Body4\R[3,2]</VarName>
    <VarName>Body4\position[1]</VarName>
    <VarName>Body4\position[2]</VarName>
    <VarName>Body4\position[3]</VarName>
    <VarName>Body5\dimension[1]</VarName>
    <VarName>Body5\dimension[2]</VarName>
    <VarName>Body5\dimension[3]</VarName>
    <VarName>Body5\position[1]</VarName>
    <VarName>Body5\position[2]</VarName>
    <VarName>Body5\position[3]</VarName>
    <VarName>Body5\R[1,3]</VarName>
    <VarName>Body5\R[2,3]</VarName>
    <VarName>Body5\R[3,3]</VarName>
    <VarName>Body5\R[1,2]</VarName>
    <VarName>Body5\R[2,2]</VarName>
    <VarName>Body5\R[3,2]</VarName>
    <VarName>Joint_dynA\stepper_model\RotorAngle\angle</VarName>
    <VarName>Joint_dynC\stepper_model\RotorAngle\angle</VarName>
    <VarName>Body6\position[3]</VarName>
    <VarName>Body6\position[2]</VarName>
    <VarName>rectanglepath\output[2]</VarName>
    <VarName>rectanglepath\output[1]</VarName>
    <VarName>stepper_control\Acceleration_int\input</VarName>
    <VarName>stepper_control\Velocity_int\output</VarName>
    <VarName>stepper_control\Velocity_int\input</VarName>
    <VarName>stepper_control1\Acceleration_int\input</VarName>
    <VarName>stepper_control1\Velocity_int\output</VarName>
    <VarName>stepper_control1\Velocity_int\input</VarName>
    <VarName>Body6\R[1,3]</VarName>
    <VarName>Body6\R[2,3]</VarName>
    <VarName>Body6\R[3,3]</VarName>
    <VarName>Body6\R[1,2]</VarName>
    <VarName>Body6\R[2,2]</VarName>
    <VarName>Body6\R[3,2]</VarName>
    <VarName>Body6\position[1]</VarName>
    <VarName>Body1\position[1]</VarName>
    <VarName>Body1\position[2]</VarName>
    <VarName>Body1\R[1,3]</VarName>
    <VarName>Body1\R[2,3]</VarName>
    <VarName>Body1\R[3,3]</VarName>
    <VarName>Body1\R[1,2]</VarName>
    <VarName>Body1\R[2,2]</VarName>
    <VarName>Body1\R[3,2]</VarName>
    <VarName>Body1\dimension[1]</VarName>
    <VarName>Body1\dimension[2]</VarName>
    <VarName>Body1\dimension[3]</VarName>
    <VarName>Body1\position[3]</VarName>
    <VarName>LiftingArm\Body_Lift2\dimension[1]</VarName>
    <VarName>LiftingArm\Body_Lift2\dimension[2]</VarName>
    <VarName>LiftingArm\Body_Lift2\dimension[3]</VarName>
    <VarName>LiftingArm\Body_Lift2\position[1]</VarName>
    <VarName>LiftingArm\Body_Lift2\position[2]</VarName>
    <VarName>LiftingArm\Body_Lift2\position[3]</VarName>
    <VarName>LiftingArm\Body_Lift2\R[1,3]</VarName>
    <VarName>LiftingArm\Body_Lift2\R[2,3]</VarName>
    <VarName>LiftingArm\Body_Lift2\R[3,3]</VarName>
    <VarName>LiftingArm\Body_Lift2\R[1,2]</VarName>
    <VarName>LiftingArm\Body_Lift2\R[2,2]</VarName>
    <VarName>LiftingArm\Body_Lift2\R[3,2]</VarName>
    <VarName>LiftingArm\Body_Lift3\dimension[1]</VarName>
    <VarName>LiftingArm\Body_Lift3\dimension[2]</VarName>
    <VarName>LiftingArm\Body_Lift3\dimension[3]</VarName>
    <VarName>LiftingArm\Body_Lift3\position[1]</VarName>
    <VarName>LiftingArm\Body_Lift3\position[2]</VarName>
    <VarName>LiftingArm\Body_Lift3\position[3]</VarName>
    <VarName>LiftingArm\Body_Lift3\R[1,3]</VarName>
    <VarName>LiftingArm\Body_Lift3\R[2,3]</VarName>
    <VarName>LiftingArm\Body_Lift3\R[3,3]</VarName>
    <VarName>LiftingArm\Body_Lift3\R[1,2]</VarName>
    <VarName>LiftingArm\Body_Lift3\R[2,2]</VarName>
    <VarName>LiftingArm\Body_Lift3\R[3,2]</VarName>
    <VarName>LiftingArm\Body_Lift4\dimension[1]</VarName>
    <VarName>LiftingArm\Body_Lift4\dimension[2]</VarName>
    <VarName>LiftingArm\Body_Lift4\dimension[3]</VarName>
    <VarName>LiftingArm\Body_Lift4\position[1]</VarName>
    <VarName>LiftingArm\Body_Lift4\position[2]</VarName>
    <VarName>LiftingArm\Body_Lift4\position[3]</VarName>
    <VarName>LiftingArm\Body_Lift4\R[1,3]</VarName>
    <VarName>LiftingArm\Body_Lift4\R[2,3]</VarName>
    <VarName>LiftingArm\Body_Lift4\R[3,3]</VarName>
    <VarName>LiftingArm\Body_Lift4\R[1,2]</VarName>
    <VarName>LiftingArm\Body_Lift4\R[2,2]</VarName>
    <VarName>LiftingArm\Body_Lift4\R[3,2]</VarName>
    <VarName>stepper_control\setpoint</VarName>
    <VarName>Joint_dynA\stepper_model\angle</VarName>
    <VarName>stepper_control1\setpoint</VarName>
    <VarName>Joint_dynC\angle</VarName>
    <VarName>Body_Lift2\position[2]</VarName>
    <VarName>Body_Lift2\position[3]</VarName>
    <VarName>Joint_dynA\stepper_model\p.T</VarName>
    <VarName>Joint_dynC\stepper_model\p.T</VarName>
   </VarNames>
   <Plots>
    <Plot>
     <PlotType>GraphPlot</PlotType>
     <BasePlot>
       <PlotId>1</PlotId>
       <UseWindowsBGColor>false</UseWindowsBGColor>
       <BGColor>16777215</BGColor>
       <PlotIsVisible>true</PlotIsVisible>
     </BasePlot>
     <Grid>
      <DrawGrid>true</DrawGrid>
      <GridColor>15780518</GridColor>
      <GridBorderLineColor>12624260</GridBorderLineColor>
      <GridZeroLineColor>0</GridZeroLineColor>
      <XTicks>10</XTicks>
      <YTicks>10</YTicks>
      <ZTicks>10</ZTicks>
      <Use3DLook>false</Use3DLook>
     </Grid>
     <PlotBGColor>16777215</PlotBGColor>
     <ShowPlotTitle>true</ShowPlotTitle>
     <TitlePosition>1</TitlePosition>
     <PlotTitle>Stepper Motor A</PlotTitle>
     <ShowXValues>true</ShowXValues>
     <Fonts>
      <TitleFont>
       <Name>Arial</Name>
       <Height>12</Height>
       <PitchFamily>34</PitchFamily>
       <Weight>400</Weight>
       <Italic>0</Italic>
       <UnderLine>0</UnderLine>
       <StrikeOut>0</StrikeOut>
       <Color>0</Color>
      </TitleFont>
      <LabelFont>
       <Name>Arial</Name>
       <Height>12</Height>
       <PitchFamily>34</PitchFamily>
       <Weight>400</Weight>
       <Italic>0</Italic>
       <UnderLine>0</UnderLine>
       <StrikeOut>0</StrikeOut>
       <Color>0</Color>
      </LabelFont>
      <ValuesFont>
       <Name>Arial</Name>
       <Height>10</Height>
       <PitchFamily>34</PitchFamily>
       <Weight>400</Weight>
       <Italic>0</Italic>
       <UnderLine>0</UnderLine>
       <StrikeOut>0</StrikeOut>
       <Color>0</Color>
      </ValuesFont>
      <LegendFont>
       <Name>Arial</Name>
       <Height>12</Height>
       <PitchFamily>34</PitchFamily>
       <Weight>400</Weight>
       <Italic>0</Italic>
       <UnderLine>0</UnderLine>
       <StrikeOut>0</StrikeOut>
       <Color>0</Color>
      </LegendFont>
     </Fonts>
     <SharedXAxis>true</SharedXAxis>
     <SharedYAxis>true</SharedYAxis>
     <SharedZAxis>false</SharedZAxis>
     <XAxes>
      <Axis>
       <Minimum>0.0</Minimum>
       <Maximum>17.641751363645234</Maximum>
       <Linear>true</Linear>
       <Scaling>3</Scaling>
       <Label>time</Label>
      </Axis>
     </XAxes>
     <YAxes>
      <Axis>
       <Minimum>0.6000000000000002</Minimum>
       <Maximum>2.6000000000000005</Maximum>
       <Linear>true</Linear>
       <Scaling>2</Scaling>
       <Label>Control Setpoint</Label>
      </Axis>
      <Axis>
       <Minimum>-2.6</Minimum>
       <Maximum>-0.6</Maximum>
       <Linear>true</Linear>
       <Scaling>2</Scaling>
       <Label>Control Output</Label>
      </Axis>
      <Axis>
       <Minimum>-2.6</Minimum>
       <Maximum>-0.6</Maximum>
       <Linear>true</Linear>
       <Scaling>2</Scaling>
       <Label>Axle Angle</Label>
      </Axis>
     </YAxes>
     <ZAxes>
     </ZAxes>
     <Curves>
      <Curve>
       <LineColor>3355111</LineColor>
       <LineStyle>1</LineStyle>
       <TickColor>3355111</TickColor>
       <TickStyle>0</TickStyle>
       <CurveVisible>true</CurveVisible>
       <PixelThresshold>1</PixelThresshold>
       <LineThickness>1</LineThickness>
       <LineOrder>1</LineOrder>
       <ShowYValues>true</ShowYValues>
       <XCurveData>
        <ShowUnit>true</ShowUnit>
        <VarName>time</VarName>
       </XCurveData>
       <YCurveData>
        <ShowUnit>true</ShowUnit>
        <VarName>stepper_control\setpoint</VarName>
       </YCurveData>
      </Curve>
      <Curve>
       <LineColor>6076255</LineColor>
       <LineStyle>1</LineStyle>
       <TickColor>6076255</TickColor>
       <TickStyle>0</TickStyle>
       <CurveVisible>true</CurveVisible>
       <PixelThresshold>1</PixelThresshold>
       <LineThickness>1</LineThickness>
       <LineOrder>1</LineOrder>
       <ShowYValues>true</ShowYValues>
       <XCurveData>
        <ShowUnit>true</ShowUnit>
        <VarName>time</VarName>
       </XCurveData>
       <YCurveData>
        <ShowUnit>true</ShowUnit>
        <VarName>Joint_dynA\stepper_model\angle</VarName>
       </YCurveData>
      </Curve>
      <Curve>
       <LineColor>12553035</LineColor>
       <LineStyle>1</LineStyle>
       <TickColor>12553035</TickColor>
       <TickStyle>0</TickStyle>
       <CurveVisible>true</CurveVisible>
       <PixelThresshold>1</PixelThresshold>
       <LineThickness>1</LineThickness>
       <LineOrder>1</LineOrder>
       <ShowYValues>true</ShowYValues>
       <XCurveData>
        <ShowUnit>true</ShowUnit>
        <VarName>time</VarName>
       </XCurveData>
       <YCurveData>
        <ShowUnit>true</ShowUnit>
        <VarName>Joint_dynA\stepper_model\RotorAngle\angle</VarName>
       </YCurveData>
      </Curve>
     </Curves>
     <Legenda>
      <ShowLegenda>true</ShowLegenda>
      <Position>
       <X>0.12119013062409288</X>
       <Y>0.8741610738255033</Y>
      </Position>
      <BorderPenColor>0</BorderPenColor>
      <BackgroundColor>16777215</BackgroundColor>
     </Legenda>
    </Plot>
    <Plot>
     <PlotType>D3DPlot</PlotType>
     <BasePlot>
       <PlotId>2</PlotId>
       <UseWindowsBGColor>false</UseWindowsBGColor>
       <BGColor>16777215</BGColor>
       <PlotIsVisible>true</PlotIsVisible>
     </BasePlot>
     <PlotTitle>3D Animation</PlotTitle>
     <RenderQuality>137</RenderQuality>
     <ShowGrid>true</ShowGrid>
     <ShowFPS>false</ShowFPS>
     <BackgroundColor>4294967295</BackgroundColor>
     <SceneBackgroundImage>Gradients\BlueWhite.png</SceneBackgroundImage>
     <ApplyTextureBackground>true</ApplyTextureBackground>
     <FrameScale>1.0</FrameScale>
     <FrameThickness>1.0</FrameThickness>
     <MainFrame>
      <Frame>
       <ScaleValue>
        <X>
         <Value>1</Value>
        </X>
        <Y>
         <Value>1</Value>
        </Y>
        <Z>
         <Value>1</Value>
        </Z>
       </ScaleValue>
       <ShowReferenceFrame>true</ShowReferenceFrame>
       <Name>Reference Frame</Name>
       <Position>
       </Position>
       <Orientation>
        <Angles>
        </Angles>
        <OrientationType>Bryant</OrientationType>
       </Orientation>
       <LockX>false</LockX>
       <LockY>false</LockY>
       <LockZ>false</LockZ>
       <LockXPitch>false</LockXPitch>
       <LockYYaw>false</LockYYaw>
       <LockZRoll>false</LockZRoll>
       <Childs>
        <Frame>
         <ScaleValue>
     <X>
      <Value>1</Value>
     </X>
     <Y>
      <Value>1</Value>
     </Y>
     <Z>
      <Value>1</Value>
     </Z>
         </ScaleValue>
         <ShowReferenceFrame>false</ShowReferenceFrame>
         <Name>Default Lights and Cameras</Name>
         <Position>
         </Position>
         <Orientation>
     <Angles>
     </Angles>
     <OrientationType>Bryant</OrientationType>
         </Orientation>
         <LockX>false</LockX>
         <LockY>false</LockY>
         <LockZ>false</LockZ>
         <LockXPitch>false</LockXPitch>
         <LockYYaw>false</LockYYaw>
         <LockZRoll>false</LockZRoll>
         <Childs>
     <Light>
      <ShowReferenceFrame>false</ShowReferenceFrame>
      <Name>Ambient</Name>
      <Position>
      </Position>
      <Orientation>
       <ZAxis>
        <Z>
         <Value>1</Value>
        </Z>
       </ZAxis>
       <YAxis>
        <Y>
         <Value>1</Value>
        </Y>
       </YAxis>
       <OrientationType>Direct3D</OrientationType>
      </Orientation>
      <LockX>false</LockX>
      <LockY>false</LockY>
      <LockZ>false</LockZ>
      <LockXPitch>false</LockXPitch>
      <LockYYaw>false</LockYYaw>
      <LockZRoll>false</LockZRoll>
      <Childs>
      </Childs>
      <LightType>0</LightType>
      <LightColor>
       <Color>
        <X>
         <Value>0.3</Value>
        </X>
        <Y>
         <Value>0.3</Value>
        </Y>
        <Z>
         <Value>0.3</Value>
        </Z>
       </Color>
       <Offset>
       </Offset>
       <Multipliers>
        <X>
         <Value>1</Value>
        </X>
        <Y>
         <Value>1</Value>
        </Y>
        <Z>
         <Value>1</Value>
        </Z>
       </Multipliers>
       <Direct3DColorRange>true</Direct3DColorRange>
      </LightColor>
      <AmbientLight>
       <Color>
        <X>
         <Value>0.3</Value>
        </X>
        <Y>
         <Value>0.3</Value>
        </Y>
        <Z>
         <Value>0.3</Value>
        </Z>
       </Color>
       <Offset>
       </Offset>
       <Multipliers>
        <X>
         <Value>1</Value>
        </X>
        <Y>
         <Value>1</Value>
        </Y>
        <Z>
         <Value>1</Value>
        </Z>
       </Multipliers>
       <Direct3DColorRange>true</Direct3DColorRange>
      </AmbientLight>
      <AmbientOn>true</AmbientOn>
      <DiffuseOn>false</DiffuseOn>
      <SpecularOn>false</SpecularOn>
     </Light>
     <Light>
      <ShowReferenceFrame>false</ShowReferenceFrame>
      <Name>Parallel</Name>
      <Position>
       <X>
        <Value>-3</Value>
       </X>
       <Y>
        <Value>5</Value>
       </Y>
       <Z>
        <Value>3</Value>
       </Z>
      </Position>
      <Orientation>
       <ZAxis>
        <X>
         <Value>0.457495710997814</Value>
        </X>
        <Y>
         <Value>-0.762492851663023</Value>
        </Y>
        <Z>
         <Value>-0.457495710997814</Value>
        </Z>
       </ZAxis>
       <YAxis>
        <X>
         <Value>0.235379601434674</Value>
        </X>
        <Y>
         <Value>-0.392299335724456</Value>
        </Y>
        <Z>
         <Value>0.889211827642101</Value>
        </Z>
       </YAxis>
       <OrientationType>Direct3D</OrientationType>
      </Orientation>
      <LockX>false</LockX>
      <LockY>false</LockY>
      <LockZ>false</LockZ>
      <LockXPitch>false</LockXPitch>
      <LockYYaw>false</LockYYaw>
      <LockZRoll>false</LockZRoll>
      <Childs>
      </Childs>
      <LightType>3</LightType>
      <LightColor>
       <Color>
        <X>
         <Value>0.5</Value>
        </X>
        <Y>
         <Value>0.5</Value>
        </Y>
        <Z>
         <Value>0.5</Value>
        </Z>
       </Color>
       <Offset>
       </Offset>
       <Multipliers>
        <X>
         <Value>1</Value>
        </X>
        <Y>
         <Value>1</Value>
        </Y>
        <Z>
         <Value>1</Value>
        </Z>
       </Multipliers>
       <Direct3DColorRange>true</Direct3DColorRange>
      </LightColor>
      <Attenuation>
       <Constant>
        <Value>1.0</Value>
       </Constant>
       <Linear>
        <Value>0.0</Value>
       </Linear>
       <Quadratic>
        <Value>0.0</Value>
       </Quadratic>
      </Attenuation>
      <DiffuseLight>
       <Color>
        <X>
         <Value>0.5</Value>
        </X>
        <Y>
         <Value>0.5</Value>
        </Y>
        <Z>
         <Value>0.5</Value>
        </Z>
       </Color>
       <Offset>
       </Offset>
       <Multipliers>
        <X>
         <Value>1</Value>
        </X>
        <Y>
         <Value>1</Value>
        </Y>
        <Z>
         <Value>1</Value>
        </Z>
       </Multipliers>
       <Direct3DColorRange>true</Direct3DColorRange>
      </DiffuseLight>
      <SpecularLight>
       <Color>
        <X>
         <Value>0.5</Value>
        </X>
        <Y>
         <Value>0.5</Value>
        </Y>
        <Z>
         <Value>0.5</Value>
        </Z>
       </Color>
       <Offset>
       </Offset>
       <Multipliers>
        <X>
         <Value>1</Value>
        </X>
        <Y>
         <Value>1</Value>
        </Y>
        <Z>
         <Value>1</Value>
        </Z>
       </Multipliers>
       <Direct3DColorRange>true</Direct3DColorRange>
      </SpecularLight>
      <AmbientOn>false</AmbientOn>
      <DiffuseOn>true</DiffuseOn>
      <SpecularOn>true</SpecularOn>
     </Light>
     <Light>
      <ShowReferenceFrame>false</ShowReferenceFrame>
      <Name>Spot Light 1</Name>
      <Position>
       <X>
        <Value>-3</Value>
       </X>
       <Y>
        <Value>-5</Value>
       </Y>
       <Z>
        <Value>1</Value>
       </Z>
      </Position>
      <Orientation>
       <ZAxis>
        <X>
         <Value>0.50709255283711</Value>
        </X>
        <Y>
         <Value>0.845154254728517</Value>
        </Y>
        <Z>
         <Value>-0.169030850945703</Value>
        </Z>
       </ZAxis>
       <YAxis>
        <X>
         <Value>0.0869656553478673</Value>
        </X>
        <Y>
         <Value>0.144942758913112</Value>
        </Y>
        <Z>
         <Value>0.985610760609162</Value>
        </Z>
       </YAxis>
       <OrientationType>Direct3D</OrientationType>
      </Orientation>
      <LockX>false</LockX>
      <LockY>false</LockY>
      <LockZ>false</LockZ>
      <LockXPitch>false</LockXPitch>
      <LockYYaw>false</LockYYaw>
      <LockZRoll>false</LockZRoll>
      <Childs>
      </Childs>
      <LightType>2</LightType>
      <LightColor>
       <Color>
        <X>
         <Value>0.5</Value>
        </X>
        <Y>
         <Value>0.5</Value>
        </Y>
        <Z>
         <Value>0.5</Value>
        </Z>
       </Color>
       <Offset>
       </Offset>
       <Multipliers>
        <X>
         <Value>1</Value>
        </X>
        <Y>
         <Value>1</Value>
        </Y>
        <Z>
         <Value>1</Value>
        </Z>
       </Multipliers>
       <Direct3DColorRange>true</Direct3DColorRange>
      </LightColor>
      <Attenuation>
       <Constant>
        <Value>1.0</Value>
       </Constant>
       <Linear>
        <Value>0.05</Value>
       </Linear>
       <Quadratic>
        <Value>0.05</Value>
       </Quadratic>
      </Attenuation>
      <Umbra>
       <Value>1.0471975511965976</Value>
      </Umbra>
      <Penumbra>
       <Value>1.0471975511965976</Value>
      </Penumbra>
      <SpotExponent>0.0</SpotExponent>
      <DiffuseLight>
       <Color>
        <X>
         <Value>0.5</Value>
        </X>
        <Y>
         <Value>0.5</Value>
        </Y>
        <Z>
         <Value>0.5</Value>
        </Z>
       </Color>
       <Offset>
       </Offset>
       <Multipliers>
        <X>
         <Value>1</Value>
        </X>
        <Y>
         <Value>1</Value>
        </Y>
        <Z>
         <Value>1</Value>
        </Z>
       </Multipliers>
       <Direct3DColorRange>true</Direct3DColorRange>
      </DiffuseLight>
      <SpecularLight>
       <Color>
        <X>
         <Value>0.5</Value>
        </X>
        <Y>
         <Value>0.5</Value>
        </Y>
        <Z>
         <Value>0.5</Value>
        </Z>
       </Color>
       <Offset>
       </Offset>
       <Multipliers>
        <X>
         <Value>1</Value>
        </X>
        <Y>
         <Value>1</Value>
        </Y>
        <Z>
         <Value>1</Value>
        </Z>
       </Multipliers>
       <Direct3DColorRange>true</Direct3DColorRange>
      </SpecularLight>
      <AmbientOn>false</AmbientOn>
      <DiffuseOn>true</DiffuseOn>
      <SpecularOn>true</SpecularOn>
     </Light>
     <Light>
      <ShowReferenceFrame>false</ShowReferenceFrame>
      <Name>Spot Light 2</Name>
      <Position>
       <X>
        <Value>2</Value>
       </X>
       <Y>
        <Value>-3</Value>
       </Y>
       <Z>
        <Value>-1</Value>
       </Z>
      </Position>
      <Orientation>
       <ZAxis>
        <X>
         <Value>-0.534522483824849</Value>
        </X>
        <Y>
         <Value>0.801783725737273</Value>
        </Y>
        <Z>
         <Value>0.267261241912424</Value>
        </Z>
       </ZAxis>
       <YAxis>
        <X>
         <Value>0.14824986333222</Value>
        </X>
        <Y>
         <Value>-0.22237479499833</Value>
        </Y>
        <Z>
         <Value>0.963624111659432</Value>
        </Z>
       </YAxis>
       <OrientationType>Direct3D</OrientationType>
      </Orientation>
      <LockX>false</LockX>
      <LockY>false</LockY>
      <LockZ>false</LockZ>
      <LockXPitch>false</LockXPitch>
      <LockYYaw>false</LockYYaw>
      <LockZRoll>false</LockZRoll>
      <Childs>
      </Childs>
      <LightType>2</LightType>
      <LightColor>
       <Color>
        <X>
         <Value>1</Value>
        </X>
        <Y>
         <Value>1</Value>
        </Y>
        <Z>
         <Value>1</Value>
        </Z>
       </Color>
       <Offset>
       </Offset>
       <Multipliers>
        <X>
         <Value>1</Value>
        </X>
        <Y>
         <Value>1</Value>
        </Y>
        <Z>
         <Value>1</Value>
        </Z>
       </Multipliers>
       <Direct3DColorRange>true</Direct3DColorRange>
      </LightColor>
      <Attenuation>
       <Constant>
        <Value>1.0</Value>
       </Constant>
       <Linear>
        <Value>0.05</Value>
       </Linear>
       <Quadratic>
        <Value>0.05</Value>
       </Quadratic>
      </Attenuation>
      <Umbra>
       <Value>1.5707963267948966</Value>
      </Umbra>
      <Penumbra>
       <Value>1.5707963267948966</Value>
      </Penumbra>
      <SpotExponent>0.0</SpotExponent>
      <DiffuseLight>
       <Color>
        <X>
         <Value>1</Value>
        </X>
        <Y>
         <Value>1</Value>
        </Y>
        <Z>
         <Value>1</Value>
        </Z>
       </Color>
       <Offset>
       </Offset>
       <Multipliers>
        <X>
         <Value>1</Value>
        </X>
        <Y>
         <Value>1</Value>
        </Y>
        <Z>
         <Value>1</Value>
        </Z>
       </Multipliers>
       <Direct3DColorRange>true</Direct3DColorRange>
      </DiffuseLight>
      <SpecularLight>
       <Color>
        <X>
         <Value>0.5</Value>
        </X>
        <Y>
         <Value>0.5</Value>
        </Y>
        <Z>
         <Value>0.5</Value>
        </Z>
       </Color>
       <Offset>
       </Offset>
       <Multipliers>
        <X>
         <Value>1</Value>
        </X>
        <Y>
         <Value>1</Value>
        </Y>
        <Z>
         <Value>1</Value>
        </Z>
       </Multipliers>
       <Direct3DColorRange>true</Direct3DColorRange>
      </SpecularLight>
      <AmbientOn>false</AmbientOn>
      <DiffuseOn>true</DiffuseOn>
      <SpecularOn>true</SpecularOn>
     </Light>
     <Camera>
      <ShowReferenceFrame>false</ShowReferenceFrame>
      <Name>Camera Looking at Origin</Name>
      <Position>
       <X>
        <Value>0.144494930276406</Value>
       </X>
       <Y>
        <Value>-0.16367032375516</Value>
       </Y>
       <Z>
        <Value>0.165819959065724</Value>
       </Z>
      </Position>
      <Orientation>
       <ZAxis>
        <X>
         <Value>-0.574494337780199</Value>
        </X>
        <Y>
         <Value>0.647932475925021</Value>
        </Y>
        <Z>
         <Value>-0.500139742972065</Value>
        </Z>
       </ZAxis>
       <YAxis>
        <X>
         <Value>-0.331808079368203</Value>
        </X>
        <Y>
         <Value>0.374223410499862</Value>
        </Y>
        <Z>
         <Value>0.865944708107762</Value>
        </Z>
       </YAxis>
       <OrientationType>Direct3D</OrientationType>
      </Orientation>
      <LockX>false</LockX>
      <LockY>false</LockY>
      <LockZ>false</LockZ>
      <LockXPitch>false</LockXPitch>
      <LockYYaw>false</LockYYaw>
      <LockZRoll>false</LockZRoll>
      <Childs>
      </Childs>
      <FrontPlane>0.01</FrontPlane>
      <BackPlane>100.0</BackPlane>
      <AutoFrontBack>true</AutoFrontBack>
      <Field>0.003926990816987242</Field>
      <Fieldy>45.0</Fieldy>
      <PlaneLeft>-10.0</PlaneLeft>
      <PlaneRight>10.0</PlaneRight>
      <PlaneTop>10.0</PlaneTop>
      <PlaneBottom>-10.0</PlaneBottom>
      <UseLookatPosition>true</UseLookatPosition>
      <LookatPosition>
       <X>
        <Value>-0.000627364166602552</Value>
       </X>
       <Y>
        <Value>3.08669776184333e-006</Value>
       </Y>
       <Z>
        <Value>0.0394802856014185</Value>
       </Z>
      </LookatPosition>
      <UseAlwaysLookUp>true</UseAlwaysLookUp>
      <LookUpVector>
       <Z>
        <Value>1</Value>
       </Z>
      </LookUpVector>
      <RightHand>true</RightHand>
      <Perspective>true</Perspective>
      <IsSelectedCamera>true</IsSelectedCamera>
     </Camera>
     <Camera>
      <ShowReferenceFrame>false</ShowReferenceFrame>
      <Name>Front(XY)-Camera</Name>
      <Position>
       <Z>
        <Value>10</Value>
       </Z>
      </Position>
      <Orientation>
       <ZAxis>
        <Z>
         <Value>-1</Value>
        </Z>
       </ZAxis>
       <YAxis>
        <Y>
         <Value>1</Value>
        </Y>
       </YAxis>
       <OrientationType>Direct3D</OrientationType>
      </Orientation>
      <LockX>false</LockX>
      <LockY>false</LockY>
      <LockZ>false</LockZ>
      <LockXPitch>false</LockXPitch>
      <LockYYaw>false</LockYYaw>
      <LockZRoll>false</LockZRoll>
      <Childs>
      </Childs>
      <FrontPlane>0.01</FrontPlane>
      <BackPlane>100.0</BackPlane>
      <AutoFrontBack>true</AutoFrontBack>
      <Field>9.999999999999998</Field>
      <Fieldy>45.0</Fieldy>
      <PlaneLeft>-9.999999999999998</PlaneLeft>
      <PlaneRight>9.999999999999998</PlaneRight>
      <PlaneTop>9.999999999999998</PlaneTop>
      <PlaneBottom>-9.999999999999998</PlaneBottom>
      <UseLookatPosition>true</UseLookatPosition>
      <LookatPosition>
      </LookatPosition>
      <UseAlwaysLookUp>true</UseAlwaysLookUp>
      <LookUpVector>
       <Y>
        <Value>1</Value>
       </Y>
      </LookUpVector>
      <RightHand>true</RightHand>
      <Perspective>false</Perspective>
      <IsSelectedCamera>false</IsSelectedCamera>
     </Camera>
     <Camera>
      <ShowReferenceFrame>false</ShowReferenceFrame>
      <Name>Side(YZ)-Camera</Name>
      <Position>
       <X>
        <Value>10</Value>
       </X>
      </Position>
      <Orientation>
       <ZAxis>
        <X>
         <Value>-1</Value>
        </X>
       </ZAxis>
       <YAxis>
        <Z>
         <Value>1</Value>
        </Z>
       </YAxis>
       <OrientationType>Direct3D</OrientationType>
      </Orientation>
      <LockX>false</LockX>
      <LockY>false</LockY>
      <LockZ>false</LockZ>
      <LockXPitch>false</LockXPitch>
      <LockYYaw>false</LockYYaw>
      <LockZRoll>false</LockZRoll>
      <Childs>
      </Childs>
      <FrontPlane>0.01</FrontPlane>
      <BackPlane>100.0</BackPlane>
      <AutoFrontBack>true</AutoFrontBack>
      <Field>9.999999999999998</Field>
      <Fieldy>45.0</Fieldy>
      <PlaneLeft>-9.999999999999998</PlaneLeft>
      <PlaneRight>9.999999999999998</PlaneRight>
      <PlaneTop>9.999999999999998</PlaneTop>
      <PlaneBottom>-9.999999999999998</PlaneBottom>
      <UseLookatPosition>true</UseLookatPosition>
      <LookatPosition>
      </LookatPosition>
      <UseAlwaysLookUp>true</UseAlwaysLookUp>
      <LookUpVector>
       <Z>
        <Value>1</Value>
       </Z>
      </LookUpVector>
      <RightHand>true</RightHand>
      <Perspective>false</Perspective>
      <IsSelectedCamera>false</IsSelectedCamera>
     </Camera>
     <Camera>
      <ShowReferenceFrame>false</ShowReferenceFrame>
      <Name>Top(XZ)-Camera</Name>
      <Position>
       <Y>
        <Value>10</Value>
       </Y>
      </Position>
      <Orientation>
       <ZAxis>
        <Y>
         <Value>-1</Value>
        </Y>
       </ZAxis>
       <YAxis>
        <X>
         <Value>1</Value>
        </X>
       </YAxis>
       <OrientationType>Direct3D</OrientationType>
      </Orientation>
      <LockX>false</LockX>
      <LockY>false</LockY>
      <LockZ>false</LockZ>
      <LockXPitch>false</LockXPitch>
      <LockYYaw>false</LockYYaw>
      <LockZRoll>false</LockZRoll>
      <Childs>
      </Childs>
      <FrontPlane>0.01</FrontPlane>
      <BackPlane>100.0</BackPlane>
      <AutoFrontBack>true</AutoFrontBack>
      <Field>9.999999999999998</Field>
      <Fieldy>45.0</Fieldy>
      <PlaneLeft>-9.999999999999998</PlaneLeft>
      <PlaneRight>9.999999999999998</PlaneRight>
      <PlaneTop>9.999999999999998</PlaneTop>
      <PlaneBottom>-9.999999999999998</PlaneBottom>
      <UseLookatPosition>true</UseLookatPosition>
      <LookatPosition>
      </LookatPosition>
      <UseAlwaysLookUp>true</UseAlwaysLookUp>
      <LookUpVector>
       <X>
        <Value>1</Value>
       </X>
      </LookUpVector>
      <RightHand>true</RightHand>
      <Perspective>false</Perspective>
      <IsSelectedCamera>false</IsSelectedCamera>
     </Camera>
         </Childs>
        </Frame>
        <Frame>
         <ScaleValue>
     <X>
      <Value>1</Value>
     </X>
     <Y>
      <Value>1</Value>
     </Y>
     <Z>
      <Value>1</Value>
     </Z>
         </ScaleValue>
         <ShowReferenceFrame>false</ShowReferenceFrame>
         <Name>Cylinder</Name>
         <Position>
         </Position>
         <Orientation>
     <Angles>
     </Angles>
     <OrientationType>Bryant</OrientationType>
         </Orientation>
         <LockX>false</LockX>
         <LockY>false</LockY>
         <LockZ>false</LockZ>
         <LockXPitch>false</LockXPitch>
         <LockYYaw>false</LockYYaw>
         <LockZRoll>false</LockZRoll>
         <Childs>
     <Cube>
      <Center>Center</Center>
      <RibLength>1.0</RibLength>
      <ShowInnerSide>true</ShowInnerSide>
      <Accuracy>4</Accuracy>
      <ScaleValue>
       <X>
        <VariableName>Body1\dimension[1]</VariableName>
        <Value>0.0048</Value>
       </X>
       <Y>
        <VariableName>Body1\dimension[2]</VariableName>
        <Value>0.009</Value>
       </Y>
       <Z>
        <VariableName>Body1\dimension[3]</VariableName>
        <Value>0.065</Value>
       </Z>
      </ScaleValue>
      <OverrideColor>true</OverrideColor>
      <MeshColor>
       <X>
        <Value>0</Value>
       </X>
       <Y>
        <Value>0.501960784313725</Value>
       </Y>
       <Z>
        <Value>0.501960784313725</Value>
       </Z>
      </MeshColor>
      <Alpha>1.0</Alpha>
      <MeshColorMultipliers>
       <X>
        <Value>1</Value>
       </X>
       <Y>
        <Value>1</Value>
       </Y>
       <Z>
        <Value>1</Value>
       </Z>
      </MeshColorMultipliers>
      <MeshColorOffsets>
      </MeshColorOffsets>
      <Direct3DColorRange>true</Direct3DColorRange>
      <SpecularColor>
       <X>
        <Value>0.5</Value>
       </X>
       <Y>
        <Value>0.5</Value>
       </Y>
       <Z>
        <Value>0.5</Value>
       </Z>
      </SpecularColor>
      <EmissiveColor>
      </EmissiveColor>
      <ShininessPower>
       <Value>15</Value>
      </ShininessPower>
      <OverrideQuality>false</OverrideQuality>
      <ShowReferenceFrame>false</ShowReferenceFrame>
      <Name>Block</Name>
      <Position>
       <X>
        <VariableName>Body1\position[1]</VariableName>
        <Value>-2.1842289058019197e-7</Value>
       </X>
       <Y>
        <VariableName>Body1\position[2]</VariableName>
        <Value>0.015840355657380765</Value>
       </Y>
       <Z>
        <VariableName>Body1\position[3]</VariableName>
        <Value>0.029380449362273412</Value>
       </Z>
      </Position>
      <Orientation>
       <ZAxis>
        <X>
         <VariableName>Body1\R[1,3]</VariableName>
         <Value>-6.850425895176294e-6</Value>
        </X>
        <Y>
         <VariableName>Body1\R[2,3]</VariableName>
         <Value>0.5871777540389943</Value>
        </Y>
        <Z>
         <VariableName>Body1\R[3,3]</VariableName>
         <Value>0.8094580193652998</Value>
        </Z>
       </ZAxis>
       <YAxis>
        <X>
         <VariableName>Body1\R[1,2]</VariableName>
         <Value>7.434260214968079e-7</Value>
        </X>
        <Y>
         <VariableName>Body1\R[2,2]</VariableName>
         <Value>0.8094580193870597</Value>
        </Y>
        <Z>
         <VariableName>Body1\R[3,2]</VariableName>
         <Value>-0.5871777540484873</Value>
        </Z>
       </YAxis>
       <OrientationType>Matrix</OrientationType>
      </Orientation>
      <LockX>false</LockX>
      <LockY>false</LockY>
      <LockZ>false</LockZ>
      <LockXPitch>false</LockXPitch>
      <LockYYaw>false</LockYYaw>
      <LockZRoll>false</LockZRoll>
      <Childs>
      </Childs>
     </Cube>
     <Cube>
      <Center>Center</Center>
      <RibLength>1.0</RibLength>
      <ShowInnerSide>true</ShowInnerSide>
      <Accuracy>4</Accuracy>
      <ScaleValue>
       <X>
        <VariableName>Body2\dimension[1]</VariableName>
        <Value>0.005</Value>
       </X>
       <Y>
        <VariableName>Body2\dimension[2]</VariableName>
        <Value>0.025</Value>
       </Y>
       <Z>
        <VariableName>Body2\dimension[3]</VariableName>
        <Value>0.01</Value>
       </Z>
      </ScaleValue>
      <OverrideColor>true</OverrideColor>
      <MeshColor>
       <X>
        <Value>1</Value>
       </X>
       <Y>
        <Value>0.501960784313725</Value>
       </Y>
       <Z>
        <Value>0</Value>
       </Z>
      </MeshColor>
      <Alpha>1.0</Alpha>
      <MeshColorMultipliers>
       <X>
        <Value>1</Value>
       </X>
       <Y>
        <Value>1</Value>
       </Y>
       <Z>
        <Value>1</Value>
       </Z>
      </MeshColorMultipliers>
      <MeshColorOffsets>
      </MeshColorOffsets>
      <Direct3DColorRange>true</Direct3DColorRange>
      <SpecularColor>
       <X>
        <Value>0.5</Value>
       </X>
       <Y>
        <Value>0.5</Value>
       </Y>
       <Z>
        <Value>0.5</Value>
       </Z>
      </SpecularColor>
      <EmissiveColor>
      </EmissiveColor>
      <ShininessPower>
       <Value>15</Value>
      </ShininessPower>
      <OverrideQuality>false</OverrideQuality>
      <ShowReferenceFrame>false</ShowReferenceFrame>
      <Name>Block</Name>
      <Position>
       <X>
        <VariableName>Body2\position[1]</VariableName>
        <Value>1.0777759396163201e-7</Value>
       </X>
       <Y>
        <VariableName>Body2\position[2]</VariableName>
        <Value>-0.009660323640814466</Value>
       </Y>
       <Z>
        <VariableName>Body2\position[3]</VariableName>
        <Value>-0.007864631962265943</Value>
       </Z>
      </Position>
      <Orientation>
       <ZAxis>
        <X>
         <VariableName>Body2\R[1,3]</VariableName>
         <Value>-3.214012075936454e-6</Value>
        </X>
        <Y>
         <VariableName>Body2\R[2,3]</VariableName>
         <Value>-0.6319089858363088</Value>
        </Y>
        <Z>
         <VariableName>Body2\R[3,3]</VariableName>
         <Value>0.7750426011575092</Value>
        </Z>
       </ZAxis>
       <YAxis>
        <X>
         <VariableName>Body2\R[1,2]</VariableName>
         <Value>-6.6483879653314135e-6</Value>
        </X>
        <Y>
         <VariableName>Body2\R[2,2]</VariableName>
         <Value>0.7750426011578859</Value>
        </Y>
        <Z>
         <VariableName>Body2\R[3,2]</VariableName>
         <Value>0.631908985809046</Value>
        </Z>
       </YAxis>
       <OrientationType>Matrix</OrientationType>
      </Orientation>
      <LockX>false</LockX>
      <LockY>false</LockY>
      <LockZ>false</LockZ>
      <LockXPitch>false</LockXPitch>
      <LockYYaw>false</LockYYaw>
      <LockZRoll>false</LockZRoll>
      <Childs>
      </Childs>
     </Cube>
     <Cube>
      <Center>Center</Center>
      <RibLength>1.0</RibLength>
      <ShowInnerSide>true</ShowInnerSide>
      <Accuracy>4</Accuracy>
      <ScaleValue>
       <X>
        <VariableName>Body3\dimension[1]</VariableName>
        <Value>0.0045</Value>
       </X>
       <Y>
        <VariableName>Body3\dimension[2]</VariableName>
        <Value>0.01</Value>
       </Y>
       <Z>
        <VariableName>Body3\dimension[3]</VariableName>
        <Value>0.065</Value>
       </Z>
      </ScaleValue>
      <OverrideColor>true</OverrideColor>
      <MeshColor>
       <X>
        <Value>0.501960784313725</Value>
       </X>
       <Y>
        <Value>0.501960784313725</Value>
       </Y>
       <Z>
        <Value>1</Value>
       </Z>
      </MeshColor>
      <Alpha>1.0</Alpha>
      <MeshColorMultipliers>
       <X>
        <Value>1</Value>
       </X>
       <Y>
        <Value>1</Value>
       </Y>
       <Z>
        <Value>1</Value>
       </Z>
      </MeshColorMultipliers>
      <MeshColorOffsets>
      </MeshColorOffsets>
      <Direct3DColorRange>true</Direct3DColorRange>
      <SpecularColor>
       <X>
        <Value>0.5</Value>
       </X>
       <Y>
        <Value>0.5</Value>
       </Y>
       <Z>
        <Value>0.5</Value>
       </Z>
      </SpecularColor>
      <EmissiveColor>
      </EmissiveColor>
      <ShininessPower>
       <Value>15</Value>
      </ShininessPower>
      <OverrideQuality>false</OverrideQuality>
      <ShowReferenceFrame>false</ShowReferenceFrame>
      <Name>Block</Name>
      <Position>
       <X>
        <VariableName>Body3\position[1]</VariableName>
        <Value>-6.692317187352706e-9</Value>
       </X>
       <Y>
        <VariableName>Body3\position[2]</VariableName>
        <Value>-9.271524762268744e-4</Value>
       </Y>
       <Z>
        <VariableName>Body3\position[3]</VariableName>
        <Value>0.010912823003701597</Value>
       </Z>
      </Position>
      <Orientation>
       <ZAxis>
        <X>
         <VariableName>Body3\R[1,3]</VariableName>
         <Value>-6.861783032899875e-6</Value>
        </X>
        <Y>
         <VariableName>Body3\R[2,3]</VariableName>
         <Value>0.5688421031724941</Value>
        </Y>
        <Z>
         <VariableName>Body3\R[3,3]</VariableName>
         <Value>0.8224467530553025</Value>
        </Z>
       </ZAxis>
       <YAxis>
        <X>
         <VariableName>Body3\R[1,2]</VariableName>
         <Value>1.135164957808117e-6</Value>
        </X>
        <Y>
         <VariableName>Body3\R[2,2]</VariableName>
         <Value>0.8224467530785655</Value>
        </Y>
        <Z>
         <VariableName>Body3\R[3,2]</VariableName>
         <Value>-0.568842103179113</Value>
        </Z>
       </YAxis>
       <OrientationType>Matrix</OrientationType>
      </Orientation>
      <LockX>false</LockX>
      <LockY>false</LockY>
      <LockZ>false</LockZ>
      <LockXPitch>false</LockXPitch>
      <LockYYaw>false</LockYYaw>
      <LockZRoll>false</LockZRoll>
      <Childs>
      </Childs>
     </Cube>
     <Cube>
      <Center>Center</Center>
      <RibLength>1.0</RibLength>
      <ShowInnerSide>true</ShowInnerSide>
      <Accuracy>4</Accuracy>
      <ScaleValue>
       <X>
        <VariableName>Body4\dimension[1]</VariableName>
        <Value>0.005</Value>
       </X>
       <Y>
        <VariableName>Body4\dimension[2]</VariableName>
        <Value>0.05</Value>
       </Y>
       <Z>
        <VariableName>Body4\dimension[3]</VariableName>
        <Value>0.01</Value>
       </Z>
      </ScaleValue>
      <OverrideColor>true</OverrideColor>
      <MeshColor>
       <X>
        <Value>0.501960784313725</Value>
       </X>
       <Y>
        <Value>0</Value>
       </Y>
       <Z>
        <Value>0</Value>
       </Z>
      </MeshColor>
      <Alpha>1.0</Alpha>
      <MeshColorMultipliers>
       <X>
        <Value>1</Value>
       </X>
       <Y>
        <Value>1</Value>
       </Y>
       <Z>
        <Value>1</Value>
       </Z>
      </MeshColorMultipliers>
      <MeshColorOffsets>
      </MeshColorOffsets>
      <Direct3DColorRange>true</Direct3DColorRange>
      <SpecularColor>
       <X>
        <Value>0.5</Value>
       </X>
       <Y>
        <Value>0.5</Value>
       </Y>
       <Z>
        <Value>0.5</Value>
       </Z>
      </SpecularColor>
      <EmissiveColor>
      </EmissiveColor>
      <ShininessPower>
       <Value>15</Value>
      </ShininessPower>
      <OverrideQuality>false</OverrideQuality>
      <ShowReferenceFrame>false</ShowReferenceFrame>
      <Name>Block</Name>
      <Position>
       <X>
        <VariableName>Body4\position[1]</VariableName>
        <Value>-4.336569241139506e-7</Value>
       </X>
       <Y>
        <VariableName>Body4\position[2]</VariableName>
        <Value>0.034816284358052924</Value>
       </Y>
       <Z>
        <VariableName>Body4\position[3]</VariableName>
        <Value>0.05544654051093069</Value>
       </Z>
      </Position>
      <Orientation>
       <ZAxis>
        <X>
         <VariableName>Body4\R[1,3]</VariableName>
         <Value>7.660983997214484e-7</Value>
        </X>
        <Y>
         <VariableName>Body4\R[2,3]</VariableName>
         <Value>-0.7184279975751117</Value>
        </Y>
        <Z>
         <VariableName>Body4\R[3,3]</VariableName>
         <Value>0.6956013314389418</Value>
        </Z>
       </ZAxis>
       <YAxis>
        <X>
         <VariableName>Body4\R[1,2]</VariableName>
         <Value>-9.221922498965795e-6</Value>
        </X>
        <Y>
         <VariableName>Body4\R[2,2]</VariableName>
         <Value>0.695601331404492</Value>
        </Y>
        <Z>
         <VariableName>Body4\R[3,2]</VariableName>
         <Value>0.7184279975496879</Value>
        </Z>
       </YAxis>
       <OrientationType>Matrix</OrientationType>
      </Orientation>
      <LockX>false</LockX>
      <LockY>false</LockY>
      <LockZ>false</LockZ>
      <LockXPitch>false</LockXPitch>
      <LockYYaw>false</LockYYaw>
      <LockZRoll>false</LockZRoll>
      <Childs>
      </Childs>
     </Cube>
     <Cube>
      <Center>Center</Center>
      <RibLength>1.0</RibLength>
      <ShowInnerSide>true</ShowInnerSide>
      <Accuracy>4</Accuracy>
      <ScaleValue>
       <X>
        <VariableName>Body5\dimension[1]</VariableName>
        <Value>0.005</Value>
       </X>
       <Y>
        <VariableName>Body5\dimension[2]</VariableName>
        <Value>0.025</Value>
       </Y>
       <Z>
        <VariableName>Body5\dimension[3]</VariableName>
        <Value>0.01</Value>
       </Z>
      </ScaleValue>
      <OverrideColor>true</OverrideColor>
      <MeshColor>
       <X>
        <Value>0.501960784313725</Value>
       </X>
       <Y>
        <Value>0</Value>
       </Y>
       <Z>
        <Value>0</Value>
       </Z>
      </MeshColor>
      <Alpha>1.0</Alpha>
      <MeshColorMultipliers>
       <X>
        <Value>1</Value>
       </X>
       <Y>
        <Value>1</Value>
       </Y>
       <Z>
        <Value>1</Value>
       </Z>
      </MeshColorMultipliers>
      <MeshColorOffsets>
      </MeshColorOffsets>
      <Direct3DColorRange>true</Direct3DColorRange>
      <SpecularColor>
       <X>
        <Value>0.5</Value>
       </X>
       <Y>
        <Value>0.5</Value>
       </Y>
       <Z>
        <Value>0.5</Value>
       </Z>
      </SpecularColor>
      <EmissiveColor>
      </EmissiveColor>
      <ShininessPower>
       <Value>15</Value>
      </ShininessPower>
      <OverrideQuality>false</OverrideQuality>
      <ShowReferenceFrame>false</ShowReferenceFrame>
      <Name>Block</Name>
      <Position>
       <X>
        <VariableName>Body5\position[1]</VariableName>
        <Value>7.520860330604783e-4</Value>
       </X>
       <Y>
        <VariableName>Body5\position[2]</VariableName>
        <Value>0.06082379340134874</Value>
       </Y>
       <Z>
        <VariableName>Body5\position[3]</VariableName>
        <Value>0.08216055305480323</Value>
       </Z>
      </Position>
      <Orientation>
       <ZAxis>
        <X>
         <VariableName>Body5\R[1,3]</VariableName>
         <Value>8.290876761564355e-7</Value>
        </X>
        <Y>
         <VariableName>Body5\R[2,3]</VariableName>
         <Value>-0.7184280341474859</Value>
        </Y>
        <Z>
         <VariableName>Body5\R[3,3]</VariableName>
         <Value>0.6956012936663442</Value>
        </Z>
       </ZAxis>
       <YAxis>
        <X>
         <VariableName>Body5\R[1,2]</VariableName>
         <Value>0.0605296964229612</Value>
        </X>
        <Y>
         <VariableName>Body5\R[2,2]</VariableName>
         <Value>0.6943258730148419</Value>
        </Y>
        <Z>
         <VariableName>Body5\R[3,2]</VariableName>
         <Value>0.7171106873510685</Value>
        </Z>
       </YAxis>
       <OrientationType>Matrix</OrientationType>
      </Orientation>
      <LockX>false</LockX>
      <LockY>false</LockY>
      <LockZ>false</LockZ>
      <LockXPitch>false</LockXPitch>
      <LockYYaw>false</LockYYaw>
      <LockZRoll>false</LockZRoll>
      <Childs>
      </Childs>
     </Cube>
     <Frame>
      <ScaleValue>
       <X>
        <Value>1</Value>
       </X>
       <Y>
        <Value>1</Value>
       </Y>
       <Z>
        <Value>1</Value>
       </Z>
      </ScaleValue>
      <ShowReferenceFrame>false</ShowReferenceFrame>
      <Name>Reference Frame</Name>
      <Position>
       <X>
        <VariableName>Body6\position[1]</VariableName>
        <Value>0.0015045370330949836</Value>
       </X>
       <Y>
        <VariableName>Body6\position[2]</VariableName>
        <Value>0.06945503109745695</Value>
       </Y>
       <Z>
        <VariableName>Body6\position[3]</VariableName>
        <Value>0.0910750311658822</Value>
       </Z>
      </Position>
      <Orientation>
       <ZAxis>
        <X>
         <VariableName>Body6\R[1,3]</VariableName>
         <Value>8.290876761564355e-7</Value>
        </X>
        <Y>
         <VariableName>Body6\R[2,3]</VariableName>
         <Value>-0.7184280341474859</Value>
        </Y>
        <Z>
         <VariableName>Body6\R[3,3]</VariableName>
         <Value>0.6956012936663442</Value>
        </Z>
       </ZAxis>
       <YAxis>
        <X>
         <VariableName>Body6\R[1,2]</VariableName>
         <Value>0.0605296964229612</Value>
        </X>
        <Y>
         <VariableName>Body6\R[2,2]</VariableName>
         <Value>0.6943258730148419</Value>
        </Y>
        <Z>
         <VariableName>Body6\R[3,2]</VariableName>
         <Value>0.7171106873510685</Value>
        </Z>
       </YAxis>
       <OrientationType>Matrix</OrientationType>
      </Orientation>
      <LockX>false</LockX>
      <LockY>false</LockY>
      <LockZ>false</LockZ>
      <LockXPitch>false</LockXPitch>
      <LockYYaw>false</LockYYaw>
      <LockZRoll>false</LockZRoll>
      <Childs>
       <Frame>
        <ScaleValue>
         <X>
     <Value>1</Value>
         </X>
         <Y>
     <Value>1</Value>
         </Y>
         <Z>
     <Value>1</Value>
         </Z>
        </ScaleValue>
        <ShowReferenceFrame>false</ShowReferenceFrame>
        <Name>Reference Frame</Name>
        <Position>
        </Position>
        <Orientation>
         <Angles>
     <Y>
      <Value>1.5707963267949</Value>
     </Y>
         </Angles>
         <OrientationType>Bryant</OrientationType>
        </Orientation>
        <LockX>false</LockX>
        <LockY>false</LockY>
        <LockZ>false</LockZ>
        <LockXPitch>false</LockXPitch>
        <LockYYaw>false</LockYYaw>
        <LockZRoll>false</LockZRoll>
        <Childs>
         <Cylinder>
     <CircleElements>16</CircleElements>
     <LowerRadius>0.0073</LowerRadius>
     <UpperRadius>0.0073</UpperRadius>
     <Height>0.1</Height>
     <Closed>true</Closed>
     <LowerClosed>true</LowerClosed>
     <UpperClosed>true</UpperClosed>
     <CenterInOrigin>true</CenterInOrigin>
     <ShowInnerSide>false</ShowInnerSide>
     <ShowOuterSide>true</ShowOuterSide>
     <ScaleValue>
      <X>
       <Value>1</Value>
      </X>
      <Y>
       <Value>1</Value>
      </Y>
      <Z>
       <Value>1</Value>
      </Z>
     </ScaleValue>
     <OverrideColor>true</OverrideColor>
     <MeshColor>
      <X>
       <Value>0.752941176470588</Value>
      </X>
      <Y>
       <Value>0.752941176470588</Value>
      </Y>
      <Z>
       <Value>0.752941176470588</Value>
      </Z>
     </MeshColor>
     <Alpha>1.0</Alpha>
     <MeshColorMultipliers>
      <X>
       <Value>1</Value>
      </X>
      <Y>
       <Value>1</Value>
      </Y>
      <Z>
       <Value>1</Value>
      </Z>
     </MeshColorMultipliers>
     <MeshColorOffsets>
     </MeshColorOffsets>
     <Direct3DColorRange>true</Direct3DColorRange>
     <SpecularColor>
      <X>
       <Value>0.5</Value>
      </X>
      <Y>
       <Value>0.5</Value>
      </Y>
      <Z>
       <Value>0.5</Value>
      </Z>
     </SpecularColor>
     <EmissiveColor>
     </EmissiveColor>
     <ShininessPower>
      <Value>15</Value>
     </ShininessPower>
     <OverrideQuality>false</OverrideQuality>
     <ShowReferenceFrame>false</ShowReferenceFrame>
     <Name>Cylinder</Name>
     <Position>
      <Z>
       <Value>0.015</Value>
      </Z>
     </Position>
     <Orientation>
      <Angles>
      </Angles>
      <OrientationType>Bryant</OrientationType>
     </Orientation>
     <LockX>false</LockX>
     <LockY>false</LockY>
     <LockZ>false</LockZ>
     <LockXPitch>false</LockXPitch>
     <LockYYaw>false</LockYYaw>
     <LockZRoll>false</LockZRoll>
     <Childs>
     </Childs>
         </Cylinder>
         <Cylinder>
     <CircleElements>16</CircleElements>
     <LowerRadius>0.007</LowerRadius>
     <UpperRadius>0.007</UpperRadius>
     <Height>0.11</Height>
     <Closed>true</Closed>
     <LowerClosed>true</LowerClosed>
     <UpperClosed>true</UpperClosed>
     <CenterInOrigin>true</CenterInOrigin>
     <ShowInnerSide>false</ShowInnerSide>
     <ShowOuterSide>true</ShowOuterSide>
     <ScaleValue>
      <X>
       <Value>1</Value>
      </X>
      <Y>
       <Value>1</Value>
      </Y>
      <Z>
       <Value>1</Value>
      </Z>
     </ScaleValue>
     <OverrideColor>true</OverrideColor>
     <MeshColor>
      <X>
       <Value>0</Value>
      </X>
      <Y>
       <Value>0</Value>
      </Y>
      <Z>
       <Value>0.627450980392157</Value>
      </Z>
     </MeshColor>
     <Alpha>1.0</Alpha>
     <MeshColorMultipliers>
      <X>
       <Value>1</Value>
      </X>
      <Y>
       <Value>1</Value>
      </Y>
      <Z>
       <Value>1</Value>
      </Z>
     </MeshColorMultipliers>
     <MeshColorOffsets>
     </MeshColorOffsets>
     <Direct3DColorRange>true</Direct3DColorRange>
     <SpecularColor>
      <X>
       <Value>0.5</Value>
      </X>
      <Y>
       <Value>0.5</Value>
      </Y>
      <Z>
       <Value>0.5</Value>
      </Z>
     </SpecularColor>
     <EmissiveColor>
     </EmissiveColor>
     <ShininessPower>
      <Value>15</Value>
     </ShininessPower>
     <OverrideQuality>false</OverrideQuality>
     <ShowReferenceFrame>false</ShowReferenceFrame>
     <Name>Reference Frame</Name>
     <Position>
      <Z>
       <Value>0.013</Value>
      </Z>
     </Position>
     <Orientation>
      <Angles>
      </Angles>
      <OrientationType>Bryant</OrientationType>
     </Orientation>
     <LockX>false</LockX>
     <LockY>false</LockY>
     <LockZ>false</LockZ>
     <LockXPitch>false</LockXPitch>
     <LockYYaw>false</LockYYaw>
     <LockZRoll>false</LockZRoll>
     <Childs>
     </Childs>
         </Cylinder>
         <Cylinder>
     <CircleElements>16</CircleElements>
     <LowerRadius>0.001</LowerRadius>
     <UpperRadius>0.007</UpperRadius>
     <Height>0.02</Height>
     <Closed>true</Closed>
     <LowerClosed>true</LowerClosed>
     <UpperClosed>true</UpperClosed>
     <CenterInOrigin>true</CenterInOrigin>
     <ShowInnerSide>false</ShowInnerSide>
     <ShowOuterSide>true</ShowOuterSide>
     <ScaleValue>
      <X>
       <Value>1</Value>
      </X>
      <Y>
       <Value>1</Value>
      </Y>
      <Z>
       <Value>1</Value>
      </Z>
     </ScaleValue>
     <OverrideColor>true</OverrideColor>
     <MeshColor>
      <X>
       <Value>0</Value>
      </X>
      <Y>
       <Value>0</Value>
      </Y>
      <Z>
       <Value>1</Value>
      </Z>
     </MeshColor>
     <Alpha>1.0</Alpha>
     <MeshColorMultipliers>
      <X>
       <Value>1</Value>
      </X>
      <Y>
       <Value>1</Value>
      </Y>
      <Z>
       <Value>1</Value>
      </Z>
     </MeshColorMultipliers>
     <MeshColorOffsets>
     </MeshColorOffsets>
     <Direct3DColorRange>true</Direct3DColorRange>
     <SpecularColor>
      <X>
       <Value>0.5</Value>
      </X>
      <Y>
       <Value>0.5</Value>
      </Y>
      <Z>
       <Value>0.5</Value>
      </Z>
     </SpecularColor>
     <EmissiveColor>
     </EmissiveColor>
     <ShininessPower>
      <Value>15</Value>
     </ShininessPower>
     <OverrideQuality>false</OverrideQuality>
     <ShowReferenceFrame>false</ShowReferenceFrame>
     <Name>Cylinder</Name>
     <Position>
      <Z>
       <Value>-0.05</Value>
      </Z>
     </Position>
     <Orientation>
      <Angles>
      </Angles>
      <OrientationType>Bryant</OrientationType>
     </Orientation>
     <LockX>false</LockX>
     <LockY>false</LockY>
     <LockZ>false</LockZ>
     <LockXPitch>false</LockXPitch>
     <LockYYaw>false</LockYYaw>
     <LockZRoll>false</LockZRoll>
     <Childs>
     </Childs>
         </Cylinder>
        </Childs>
       </Frame>
      </Childs>
     </Frame>
     <Cube>
      <Center>Center</Center>
      <RibLength>1.0</RibLength>
      <ShowInnerSide>true</ShowInnerSide>
      <Accuracy>4</Accuracy>
      <ScaleValue>
       <X>
        <VariableName>LiftingArm\Body_Lift2\dimension[1]</VariableName>
        <Value>0.01</Value>
       </X>
       <Y>
        <VariableName>LiftingArm\Body_Lift2\dimension[2]</VariableName>
        <Value>0.003</Value>
       </Y>
       <Z>
        <VariableName>LiftingArm\Body_Lift2\dimension[3]</VariableName>
        <Value>0.002</Value>
       </Z>
      </ScaleValue>
      <OverrideColor>true</OverrideColor>
      <MeshColor>
       <X>
        <Value>1</Value>
       </X>
       <Y>
        <Value>1</Value>
       </Y>
       <Z>
        <Value>1</Value>
       </Z>
      </MeshColor>
      <Alpha>1.0</Alpha>
      <MeshColorMultipliers>
       <X>
        <Value>1</Value>
       </X>
       <Y>
        <Value>1</Value>
       </Y>
       <Z>
        <Value>1</Value>
       </Z>
      </MeshColorMultipliers>
      <MeshColorOffsets>
      </MeshColorOffsets>
      <Direct3DColorRange>true</Direct3DColorRange>
      <SpecularColor>
       <X>
        <Value>0.5</Value>
       </X>
       <Y>
        <Value>0.5</Value>
       </Y>
       <Z>
        <Value>0.5</Value>
       </Z>
      </SpecularColor>
      <EmissiveColor>
      </EmissiveColor>
      <ShininessPower>
       <Value>15</Value>
      </ShininessPower>
      <OverrideQuality>false</OverrideQuality>
      <ShowReferenceFrame>false</ShowReferenceFrame>
      <Name>Block</Name>
      <Position>
       <X>
        <VariableName>LiftingArm\Body_Lift2\position[1]</VariableName>
        <Value>0.010766949228224007</Value>
       </X>
       <Y>
        <VariableName>LiftingArm\Body_Lift2\position[2]</VariableName>
        <Value>0.04274079922313772</Value>
       </Y>
       <Z>
        <VariableName>LiftingArm\Body_Lift2\position[3]</VariableName>
        <Value>0.06387488576858491</Value>
       </Z>
      </Position>
      <Orientation>
       <ZAxis>
        <X>
         <VariableName>LiftingArm\Body_Lift2\R[1,3]</VariableName>
         <Value>3.495345900239307e-7</Value>
        </X>
        <Y>
         <VariableName>LiftingArm\Body_Lift2\R[2,3]</VariableName>
         <Value>-0.7184232033740139</Value>
        </Y>
        <Z>
         <VariableName>LiftingArm\Body_Lift2\R[3,3]</VariableName>
         <Value>0.6956062829314426</Value>
        </Z>
       </ZAxis>
       <YAxis>
        <X>
         <VariableName>LiftingArm\Body_Lift2\R[1,2]</VariableName>
         <Value>0.16844891169312998</Value>
        </X>
        <Y>
         <VariableName>LiftingArm\Body_Lift2\R[2,2]</VariableName>
         <Value>0.6856663796280392</Value>
        </Y>
        <Z>
         <VariableName>LiftingArm\Body_Lift2\R[3,2]</VariableName>
         <Value>0.708157171817936</Value>
        </Z>
       </YAxis>
       <OrientationType>Matrix</OrientationType>
      </Orientation>
      <LockX>false</LockX>
      <LockY>false</LockY>
      <LockZ>false</LockZ>
      <LockXPitch>false</LockXPitch>
      <LockYYaw>false</LockYYaw>
      <LockZRoll>false</LockZRoll>
      <Childs>
      </Childs>
     </Cube>
     <Cube>
      <Center>Center</Center>
      <RibLength>1.0</RibLength>
      <ShowInnerSide>true</ShowInnerSide>
      <Accuracy>4</Accuracy>
      <ScaleValue>
       <X>
        <VariableName>LiftingArm\Body_Lift3\dimension[1]</VariableName>
        <Value>0.003</Value>
       </X>
       <Y>
        <VariableName>LiftingArm\Body_Lift3\dimension[2]</VariableName>
        <Value>0.025</Value>
       </Y>
       <Z>
        <VariableName>LiftingArm\Body_Lift3\dimension[3]</VariableName>
        <Value>0.001</Value>
       </Z>
      </ScaleValue>
      <OverrideColor>true</OverrideColor>
      <MeshColor>
       <X>
        <Value>1</Value>
       </X>
       <Y>
        <Value>1</Value>
       </Y>
       <Z>
        <Value>1</Value>
       </Z>
      </MeshColor>
      <Alpha>1.0</Alpha>
      <MeshColorMultipliers>
       <X>
        <Value>1</Value>
       </X>
       <Y>
        <Value>1</Value>
       </Y>
       <Z>
        <Value>1</Value>
       </Z>
      </MeshColorMultipliers>
      <MeshColorOffsets>
      </MeshColorOffsets>
      <Direct3DColorRange>true</Direct3DColorRange>
      <SpecularColor>
       <X>
        <Value>0.5</Value>
       </X>
       <Y>
        <Value>0.5</Value>
       </Y>
       <Z>
        <Value>0.5</Value>
       </Z>
      </SpecularColor>
      <EmissiveColor>
      </EmissiveColor>
      <ShininessPower>
       <Value>15</Value>
      </ShininessPower>
      <OverrideQuality>false</OverrideQuality>
      <ShowReferenceFrame>false</ShowReferenceFrame>
      <Name>Block</Name>
      <Position>
       <X>
        <VariableName>LiftingArm\Body_Lift3\position[1]</VariableName>
        <Value>0.016117999410126673</Value>
       </X>
       <Y>
        <VariableName>LiftingArm\Body_Lift3\position[2]</VariableName>
        <Value>0.05065901420629866</Value>
       </Y>
       <Z>
        <VariableName>LiftingArm\Body_Lift3\position[3]</VariableName>
        <Value>0.0722974979075188</Value>
       </Z>
      </Position>
      <Orientation>
       <ZAxis>
        <X>
         <VariableName>LiftingArm\Body_Lift3\R[1,3]</VariableName>
         <Value>8.977844069799541e-7</Value>
        </X>
        <Y>
         <VariableName>LiftingArm\Body_Lift3\R[2,3]</VariableName>
         <Value>-0.7184185304092274</Value>
        </Y>
        <Z>
         <VariableName>LiftingArm\Body_Lift3\R[3,3]</VariableName>
         <Value>0.6956111091434926</Value>
        </Z>
       </ZAxis>
       <YAxis>
        <X>
         <VariableName>LiftingArm\Body_Lift3\R[1,2]</VariableName>
         <Value>0.036207434688140326</Value>
        </X>
        <Y>
         <VariableName>LiftingArm\Body_Lift3\R[2,2]</VariableName>
         <Value>0.6951550174148017</Value>
        </Y>
        <Z>
         <VariableName>LiftingArm\Body_Lift3\R[3,2]</VariableName>
         <Value>0.7179474377949481</Value>
        </Z>
       </YAxis>
       <OrientationType>Matrix</OrientationType>
      </Orientation>
      <LockX>false</LockX>
      <LockY>false</LockY>
      <LockZ>false</LockZ>
      <LockXPitch>false</LockXPitch>
      <LockYYaw>false</LockYYaw>
      <LockZRoll>false</LockZRoll>
      <Childs>
      </Childs>
     </Cube>
     <Cube>
      <Center>Center</Center>
      <RibLength>1.0</RibLength>
      <ShowInnerSide>true</ShowInnerSide>
      <Accuracy>4</Accuracy>
      <ScaleValue>
       <X>
        <VariableName>LiftingArm\Body_Lift4\dimension[1]</VariableName>
        <Value>0.0159</Value>
       </X>
       <Y>
        <VariableName>LiftingArm\Body_Lift4\dimension[2]</VariableName>
        <Value>0.003</Value>
       </Y>
       <Z>
        <VariableName>LiftingArm\Body_Lift4\dimension[3]</VariableName>
        <Value>0.002</Value>
       </Z>
      </ScaleValue>
      <OverrideColor>true</OverrideColor>
      <MeshColor>
       <X>
        <Value>1</Value>
       </X>
       <Y>
        <Value>1</Value>
       </Y>
       <Z>
        <Value>1</Value>
       </Z>
      </MeshColor>
      <Alpha>1.0</Alpha>
      <MeshColorMultipliers>
       <X>
        <Value>1</Value>
       </X>
       <Y>
        <Value>1</Value>
       </Y>
       <Z>
        <Value>1</Value>
       </Z>
      </MeshColorMultipliers>
      <MeshColorOffsets>
      </MeshColorOffsets>
      <Direct3DColorRange>true</Direct3DColorRange>
      <SpecularColor>
       <X>
        <Value>0.5</Value>
       </X>
       <Y>
        <Value>0.5</Value>
       </Y>
       <Z>
        <Value>0.5</Value>
       </Z>
      </SpecularColor>
      <EmissiveColor>
      </EmissiveColor>
      <ShininessPower>
       <Value>15</Value>
      </ShininessPower>
      <OverrideQuality>false</OverrideQuality>
      <ShowReferenceFrame>false</ShowReferenceFrame>
      <Name>Block</Name>
      <Position>
       <X>
        <VariableName>LiftingArm\Body_Lift4\position[1]</VariableName>
        <Value>0.008675736059349695</Value>
       </X>
       <Y>
        <VariableName>LiftingArm\Body_Lift4\position[2]</VariableName>
        <Value>0.0594920761737879</Value>
       </Y>
       <Z>
        <VariableName>LiftingArm\Body_Lift4\position[3]</VariableName>
        <Value>0.08166625242071981</Value>
       </Z>
      </Position>
      <Orientation>
       <ZAxis>
        <X>
         <VariableName>LiftingArm\Body_Lift4\R[1,3]</VariableName>
         <Value>1.5867030881723527e-6</Value>
        </X>
        <Y>
         <VariableName>LiftingArm\Body_Lift4\R[2,3]</VariableName>
         <Value>-0.7184107972199947</Value>
        </Y>
        <Z>
         <VariableName>LiftingArm\Body_Lift4\R[3,3]</VariableName>
         <Value>0.6956190957954029</Value>
        </Z>
       </ZAxis>
       <YAxis>
        <X>
         <VariableName>LiftingArm\Body_Lift4\R[1,2]</VariableName>
         <Value>0.06052954540305655</Value>
        </X>
        <Y>
         <VariableName>LiftingArm\Body_Lift4\R[2,2]</VariableName>
         <Value>0.6943436818169639</Value>
        </Y>
        <Z>
         <VariableName>LiftingArm\Body_Lift4\R[3,2]</VariableName>
         <Value>0.7170934567085117</Value>
        </Z>
       </YAxis>
       <OrientationType>Matrix</OrientationType>
      </Orientation>
      <LockX>false</LockX>
      <LockY>false</LockY>
      <LockZ>false</LockZ>
      <LockXPitch>false</LockXPitch>
      <LockYYaw>false</LockYYaw>
      <LockZRoll>false</LockZRoll>
      <Childs>
      </Childs>
     </Cube>
         </Childs>
        </Frame>
       </Childs>
      </Frame>
     </MainFrame>
    </Plot>
    <Plot>
     <PlotType>GraphPlot</PlotType>
     <BasePlot>
       <PlotId>3</PlotId>
       <UseWindowsBGColor>false</UseWindowsBGColor>
       <BGColor>16777215</BGColor>
       <PlotIsVisible>true</PlotIsVisible>
     </BasePlot>
     <Grid>
      <DrawGrid>true</DrawGrid>
      <GridColor>15780518</GridColor>
      <GridBorderLineColor>12624260</GridBorderLineColor>
      <GridZeroLineColor>0</GridZeroLineColor>
      <XTicks>10</XTicks>
      <YTicks>10</YTicks>
      <ZTicks>10</ZTicks>
      <Use3DLook>false</Use3DLook>
     </Grid>
     <PlotBGColor>16777215</PlotBGColor>
     <ShowPlotTitle>true</ShowPlotTitle>
     <TitlePosition>1</TitlePosition>
     <PlotTitle>Stepper Motor D</PlotTitle>
     <ShowXValues>true</ShowXValues>
     <Fonts>
      <TitleFont>
       <Name>Arial</Name>
       <Height>12</Height>
       <PitchFamily>34</PitchFamily>
       <Weight>400</Weight>
       <Italic>0</Italic>
       <UnderLine>0</UnderLine>
       <StrikeOut>0</StrikeOut>
       <Color>0</Color>
      </TitleFont>
      <LabelFont>
       <Name>Arial</Name>
       <Height>12</Height>
       <PitchFamily>34</PitchFamily>
       <Weight>400</Weight>
       <Italic>0</Italic>
       <UnderLine>0</UnderLine>
       <StrikeOut>0</StrikeOut>
       <Color>0</Color>
      </LabelFont>
      <ValuesFont>
       <Name>Arial</Name>
       <Height>10</Height>
       <PitchFamily>34</PitchFamily>
       <Weight>400</Weight>
       <Italic>0</Italic>
       <UnderLine>0</UnderLine>
       <StrikeOut>0</StrikeOut>
       <Color>0</Color>
      </ValuesFont>
      <LegendFont>
       <Name>Arial</Name>
       <Height>12</Height>
       <PitchFamily>34</PitchFamily>
       <Weight>400</Weight>
       <Italic>0</Italic>
       <UnderLine>0</UnderLine>
       <StrikeOut>0</StrikeOut>
       <Color>0</Color>
      </LegendFont>
     </Fonts>
     <SharedXAxis>true</SharedXAxis>
     <SharedYAxis>true</SharedYAxis>
     <SharedZAxis>false</SharedZAxis>
     <XAxes>
      <Axis>
       <Minimum>0.0</Minimum>
       <Maximum>17.641751363645234</Maximum>
       <Linear>true</Linear>
       <Scaling>3</Scaling>
       <Label>time</Label>
      </Axis>
     </XAxes>
     <YAxes>
      <Axis>
       <Minimum>-1.0</Minimum>
       <Maximum>1.0</Maximum>
       <Linear>true</Linear>
       <Scaling>2</Scaling>
       <Label>Control Setpoint</Label>
      </Axis>
      <Axis>
       <Minimum>-1.0</Minimum>
       <Maximum>1.0</Maximum>
       <Linear>true</Linear>
       <Scaling>2</Scaling>
       <Label>Control Output</Label>
      </Axis>
      <Axis>
       <Minimum>-1.0</Minimum>
       <Maximum>1.0</Maximum>
       <Linear>true</Linear>
       <Scaling>2</Scaling>
       <Label>Axle Angle</Label>
      </Axis>
     </YAxes>
     <ZAxes>
     </ZAxes>
     <Curves>
      <Curve>
       <LineColor>3355111</LineColor>
       <LineStyle>1</LineStyle>
       <TickColor>3355111</TickColor>
       <TickStyle>0</TickStyle>
       <CurveVisible>true</CurveVisible>
       <PixelThresshold>1</PixelThresshold>
       <LineThickness>1</LineThickness>
       <LineOrder>1</LineOrder>
       <ShowYValues>true</ShowYValues>
       <XCurveData>
        <ShowUnit>true</ShowUnit>
        <VarName>time</VarName>
       </XCurveData>
       <YCurveData>
        <ShowUnit>true</ShowUnit>
        <VarName>stepper_control1\setpoint</VarName>
       </YCurveData>
      </Curve>
      <Curve>
       <LineColor>6076255</LineColor>
       <LineStyle>1</LineStyle>
       <TickColor>6076255</TickColor>
       <TickStyle>0</TickStyle>
       <CurveVisible>true</CurveVisible>
       <PixelThresshold>1</PixelThresshold>
       <LineThickness>1</LineThickness>
       <LineOrder>1</LineOrder>
       <ShowYValues>true</ShowYValues>
       <XCurveData>
        <ShowUnit>true</ShowUnit>
        <VarName>time</VarName>
       </XCurveData>
       <YCurveData>
        <ShowUnit>true</ShowUnit>
        <VarName>Joint_dynC\angle</VarName>
       </YCurveData>
      </Curve>
      <Curve>
       <LineColor>12553035</LineColor>
       <LineStyle>1</LineStyle>
       <TickColor>12553035</TickColor>
       <TickStyle>0</TickStyle>
       <CurveVisible>true</CurveVisible>
       <PixelThresshold>1</PixelThresshold>
       <LineThickness>1</LineThickness>
       <LineOrder>1</LineOrder>
       <ShowYValues>true</ShowYValues>
       <XCurveData>
        <ShowUnit>true</ShowUnit>
        <VarName>time</VarName>
       </XCurveData>
       <YCurveData>
        <ShowUnit>true</ShowUnit>
        <VarName>Joint_dynC\stepper_model\RotorAngle\angle</VarName>
       </YCurveData>
      </Curve>
     </Curves>
     <Legenda>
      <ShowLegenda>true</ShowLegenda>
      <Position>
       <X>0.11683599419448476</X>
       <Y>0.8741610738255033</Y>
      </Position>
      <BorderPenColor>0</BorderPenColor>
      <BackgroundColor>16777215</BackgroundColor>
     </Legenda>
    </Plot>
    <Plot>
     <PlotType>GraphPlot</PlotType>
     <BasePlot>
       <PlotId>4</PlotId>
       <UseWindowsBGColor>false</UseWindowsBGColor>
       <BGColor>16777215</BGColor>
       <PlotIsVisible>true</PlotIsVisible>
     </BasePlot>
     <Grid>
      <DrawGrid>true</DrawGrid>
      <GridColor>15780518</GridColor>
      <GridBorderLineColor>12624260</GridBorderLineColor>
      <GridZeroLineColor>0</GridZeroLineColor>
      <XTicks>10</XTicks>
      <YTicks>10</YTicks>
      <ZTicks>10</ZTicks>
      <Use3DLook>false</Use3DLook>
     </Grid>
     <PlotBGColor>16777215</PlotBGColor>
     <ShowPlotTitle>true</ShowPlotTitle>
     <TitlePosition>1</TitlePosition>
     <PlotTitle>Plot</PlotTitle>
     <ShowXValues>true</ShowXValues>
     <Fonts>
      <TitleFont>
       <Name>Arial</Name>
       <Height>12</Height>
       <PitchFamily>34</PitchFamily>
       <Weight>400</Weight>
       <Italic>0</Italic>
       <UnderLine>0</UnderLine>
       <StrikeOut>0</StrikeOut>
       <Color>0</Color>
      </TitleFont>
      <LabelFont>
       <Name>Arial</Name>
       <Height>12</Height>
       <PitchFamily>34</PitchFamily>
       <Weight>400</Weight>
       <Italic>0</Italic>
       <UnderLine>0</UnderLine>
       <StrikeOut>0</StrikeOut>
       <Color>0</Color>
      </LabelFont>
      <ValuesFont>
       <Name>Arial</Name>
       <Height>10</Height>
       <PitchFamily>34</PitchFamily>
       <Weight>400</Weight>
       <Italic>0</Italic>
       <UnderLine>0</UnderLine>
       <StrikeOut>0</StrikeOut>
       <Color>0</Color>
      </ValuesFont>
      <LegendFont>
       <Name>Arial</Name>
       <Height>12</Height>
       <PitchFamily>34</PitchFamily>
       <Weight>400</Weight>
       <Italic>0</Italic>
       <UnderLine>0</UnderLine>
       <StrikeOut>0</StrikeOut>
       <Color>0</Color>
      </LegendFont>
     </Fonts>
     <SharedXAxis>true</SharedXAxis>
     <SharedYAxis>true</SharedYAxis>
     <SharedZAxis>false</SharedZAxis>
     <XAxes>
      <Axis>
       <Minimum>-0.04252191533744833</Minimum>
       <Maximum>0.08812961394085853</Maximum>
       <Linear>true</Linear>
       <Scaling>3</Scaling>
       <Label>position[2]</Label>
      </Axis>
     </XAxes>
     <YAxes>
      <Axis>
       <Minimum>-0.06</Minimum>
       <Maximum>0.14</Maximum>
       <Linear>true</Linear>
       <Scaling>2</Scaling>
       <Label>Body1</Label>
      </Axis>
      <Axis>
       <Minimum>-0.06</Minimum>
       <Maximum>0.14</Maximum>
       <Linear>true</Linear>
       <Scaling>2</Scaling>
       <Label>Body2</Label>
      </Axis>
      <Axis>
       <Minimum>-0.06</Minimum>
       <Maximum>0.14</Maximum>
       <Linear>true</Linear>
       <Scaling>2</Scaling>
       <Label>body3</Label>
      </Axis>
      <Axis>
       <Minimum>-0.06</Minimum>
       <Maximum>0.14</Maximum>
       <Linear>true</Linear>
       <Scaling>2</Scaling>
       <Label>Body4</Label>
      </Axis>
      <Axis>
       <Minimum>-0.06</Minimum>
       <Maximum>0.14</Maximum>
       <Linear>true</Linear>
       <Scaling>2</Scaling>
       <Label>Body5</Label>
      </Axis>
      <Axis>
       <Minimum>-0.06</Minimum>
       <Maximum>0.14</Maximum>
       <Linear>true</Linear>
       <Scaling>2</Scaling>
       <Label>Body6</Label>
      </Axis>
      <Axis>
       <Minimum>-0.06</Minimum>
       <Maximum>0.14</Maximum>
       <Linear>true</Linear>
       <Scaling>2</Scaling>
       <Label>path</Label>
      </Axis>
     </YAxes>
     <ZAxes>
     </ZAxes>
     <Curves>
      <Curve>
       <LineColor>3355111</LineColor>
       <LineStyle>1</LineStyle>
       <TickColor>3355111</TickColor>
       <TickStyle>0</TickStyle>
       <CurveVisible>true</CurveVisible>
       <PixelThresshold>1</PixelThresshold>
       <LineThickness>1</LineThickness>
       <LineOrder>1</LineOrder>
       <ShowYValues>true</ShowYValues>
       <XCurveData>
        <ShowUnit>true</ShowUnit>
        <VarName>Body_Lift2\position[2]</VarName>
       </XCurveData>
       <YCurveData>
        <ShowUnit>true</ShowUnit>
        <VarName>Body_Lift2\position[3]</VarName>
       </YCurveData>
      </Curve>
      <Curve>
       <LineColor>6076255</LineColor>
       <LineStyle>1</LineStyle>
       <TickColor>6076255</TickColor>
       <TickStyle>0</TickStyle>
       <CurveVisible>true</CurveVisible>
       <PixelThresshold>1</PixelThresshold>
       <LineThickness>1</LineThickness>
       <LineOrder>1</LineOrder>
       <ShowYValues>true</ShowYValues>
       <XCurveData>
        <ShowUnit>true</ShowUnit>
        <VarName>Body2\position[2]</VarName>
       </XCurveData>
       <YCurveData>
        <ShowUnit>true</ShowUnit>
        <VarName>Body2\position[3]</VarName>
       </YCurveData>
      </Curve>
      <Curve>
       <LineColor>12553035</LineColor>
       <LineStyle>1</LineStyle>
       <TickColor>12553035</TickColor>
       <TickStyle>0</TickStyle>
       <CurveVisible>true</CurveVisible>
       <PixelThresshold>1</PixelThresshold>
       <LineThickness>1</LineThickness>
       <LineOrder>1</LineOrder>
       <ShowYValues>true</ShowYValues>
       <XCurveData>
        <ShowUnit>true</ShowUnit>
        <VarName>Body3\position[2]</VarName>
       </XCurveData>
       <YCurveData>
        <ShowUnit>true</ShowUnit>
        <VarName>Body3\position[3]</VarName>
       </YCurveData>
      </Curve>
      <Curve>
       <LineColor>15086320</LineColor>
       <LineStyle>1</LineStyle>
       <TickColor>15086320</TickColor>
       <TickStyle>0</TickStyle>
       <CurveVisible>true</CurveVisible>
       <PixelThresshold>1</PixelThresshold>
       <LineThickness>1</LineThickness>
       <LineOrder>1</LineOrder>
       <ShowYValues>true</ShowYValues>
       <XCurveData>
        <ShowUnit>true</ShowUnit>
        <VarName>Body4\position[2]</VarName>
       </XCurveData>
       <YCurveData>
        <ShowUnit>true</ShowUnit>
        <VarName>Body4\position[3]</VarName>
       </YCurveData>
      </Curve>
      <Curve>
       <LineColor>15790150</LineColor>
       <LineStyle>1</LineStyle>
       <TickColor>15790150</TickColor>
       <TickStyle>0</TickStyle>
       <CurveVisible>true</CurveVisible>
       <PixelThresshold>1</PixelThresshold>
       <LineThickness>1</LineThickness>
       <LineOrder>1</LineOrder>
       <ShowYValues>true</ShowYValues>
       <XCurveData>
        <ShowUnit>true</ShowUnit>
        <VarName>Body5\position[2]</VarName>
       </XCurveData>
       <YCurveData>
        <ShowUnit>true</ShowUnit>
        <VarName>Body5\position[3]</VarName>
       </YCurveData>
      </Curve>
      <Curve>
       <LineColor>1696255</LineColor>
       <LineStyle>1</LineStyle>
       <TickColor>1696255</TickColor>
       <TickStyle>0</TickStyle>
       <CurveVisible>true</CurveVisible>
       <PixelThresshold>1</PixelThresshold>
       <LineThickness>1</LineThickness>
       <LineOrder>1</LineOrder>
       <ShowYValues>true</ShowYValues>
       <XCurveData>
        <ShowUnit>true</ShowUnit>
        <VarName>Body6\position[2]</VarName>
       </XCurveData>
       <YCurveData>
        <ShowUnit>true</ShowUnit>
        <VarName>Body6\position[3]</VarName>
       </YCurveData>
      </Curve>
      <Curve>
       <LineColor>4089775</LineColor>
       <LineStyle>1</LineStyle>
       <TickColor>4089775</TickColor>
       <TickStyle>0</TickStyle>
       <CurveVisible>true</CurveVisible>
       <PixelThresshold>1</PixelThresshold>
       <LineThickness>1</LineThickness>
       <LineOrder>1</LineOrder>
       <ShowYValues>true</ShowYValues>
       <XCurveData>
        <ShowUnit>true</ShowUnit>
        <VarName>rectanglepath\output[1]</VarName>
       </XCurveData>
       <YCurveData>
        <ShowUnit>true</ShowUnit>
        <VarName>rectanglepath\output[2]</VarName>
       </YCurveData>
      </Curve>
     </Curves>
     <Legenda>
      <ShowLegenda>true</ShowLegenda>
      <BorderPenColor>0</BorderPenColor>
      <BackgroundColor>16777215</BackgroundColor>
     </Legenda>
    </Plot>
    <Plot>
     <PlotType>GraphPlot</PlotType>
     <BasePlot>
       <PlotId>5</PlotId>
       <UseWindowsBGColor>false</UseWindowsBGColor>
       <BGColor>16777215</BGColor>
       <PlotIsVisible>true</PlotIsVisible>
     </BasePlot>
     <Grid>
      <DrawGrid>true</DrawGrid>
      <GridColor>15780518</GridColor>
      <GridBorderLineColor>12624260</GridBorderLineColor>
      <GridZeroLineColor>0</GridZeroLineColor>
      <XTicks>10</XTicks>
      <YTicks>10</YTicks>
      <ZTicks>10</ZTicks>
      <Use3DLook>false</Use3DLook>
     </Grid>
     <PlotBGColor>16777215</PlotBGColor>
     <ShowPlotTitle>true</ShowPlotTitle>
     <TitlePosition>1</TitlePosition>
     <PlotTitle>Stepper Control A</PlotTitle>
     <ShowXValues>true</ShowXValues>
     <Fonts>
      <TitleFont>
       <Name>Arial</Name>
       <Height>12</Height>
       <PitchFamily>34</PitchFamily>
       <Weight>400</Weight>
       <Italic>0</Italic>
       <UnderLine>0</UnderLine>
       <StrikeOut>0</StrikeOut>
       <Color>0</Color>
      </TitleFont>
      <LabelFont>
       <Name>Arial</Name>
       <Height>12</Height>
       <PitchFamily>34</PitchFamily>
       <Weight>400</Weight>
       <Italic>0</Italic>
       <UnderLine>0</UnderLine>
       <StrikeOut>0</StrikeOut>
       <Color>0</Color>
      </LabelFont>
      <ValuesFont>
       <Name>Arial</Name>
       <Height>10</Height>
       <PitchFamily>34</PitchFamily>
       <Weight>400</Weight>
       <Italic>0</Italic>
       <UnderLine>0</UnderLine>
       <StrikeOut>0</StrikeOut>
       <Color>0</Color>
      </ValuesFont>
      <LegendFont>
       <Name>Arial</Name>
       <Height>12</Height>
       <PitchFamily>34</PitchFamily>
       <Weight>400</Weight>
       <Italic>0</Italic>
       <UnderLine>0</UnderLine>
       <StrikeOut>0</StrikeOut>
       <Color>0</Color>
      </LegendFont>
     </Fonts>
     <SharedXAxis>true</SharedXAxis>
     <SharedYAxis>true</SharedYAxis>
     <SharedZAxis>false</SharedZAxis>
     <XAxes>
      <Axis>
       <Minimum>0.0</Minimum>
       <Maximum>17.641751363645234</Maximum>
       <Linear>true</Linear>
       <Scaling>3</Scaling>
       <Label>time</Label>
      </Axis>
     </XAxes>
     <YAxes>
      <Axis>
       <Minimum>-250.0</Minimum>
       <Maximum>250.0</Maximum>
       <Linear>true</Linear>
       <Scaling>1</Scaling>
       <Label>Acceleration</Label>
      </Axis>
      <Axis>
       <Minimum>0.0</Minimum>
       <Maximum>0.730288609349958</Maximum>
       <Linear>true</Linear>
       <Scaling>1</Scaling>
       <Label>Angle</Label>
      </Axis>
      <Axis>
       <Minimum>0.0</Minimum>
       <Maximum>0.730288609349958</Maximum>
       <Linear>true</Linear>
       <Scaling>1</Scaling>
       <Label>Velocity</Label>
      </Axis>
     </YAxes>
     <ZAxes>
     </ZAxes>
     <Curves>
      <Curve>
       <LineColor>6076255</LineColor>
       <LineStyle>1</LineStyle>
       <TickColor>6076255</TickColor>
       <TickStyle>0</TickStyle>
       <CurveVisible>true</CurveVisible>
       <PixelThresshold>1</PixelThresshold>
       <LineThickness>1</LineThickness>
       <LineOrder>1</LineOrder>
       <ShowYValues>true</ShowYValues>
       <XCurveData>
        <ShowUnit>true</ShowUnit>
        <VarName>time</VarName>
       </XCurveData>
       <YCurveData>
        <ShowUnit>true</ShowUnit>
        <VarName>stepper_control\Acceleration_int\input</VarName>
       </YCurveData>
      </Curve>
      <Curve>
       <LineColor>12553035</LineColor>
       <LineStyle>1</LineStyle>
       <TickColor>12553035</TickColor>
       <TickStyle>0</TickStyle>
       <CurveVisible>true</CurveVisible>
       <PixelThresshold>1</PixelThresshold>
       <LineThickness>1</LineThickness>
       <LineOrder>1</LineOrder>
       <ShowYValues>true</ShowYValues>
       <XCurveData>
        <ShowUnit>true</ShowUnit>
        <VarName>time</VarName>
       </XCurveData>
       <YCurveData>
        <ShowUnit>true</ShowUnit>
        <VarName>stepper_control\Velocity_int\output</VarName>
       </YCurveData>
      </Curve>
      <Curve>
       <LineColor>15086320</LineColor>
       <LineStyle>1</LineStyle>
       <TickColor>15086320</TickColor>
       <TickStyle>0</TickStyle>
       <CurveVisible>true</CurveVisible>
       <PixelThresshold>1</PixelThresshold>
       <LineThickness>1</LineThickness>
       <LineOrder>1</LineOrder>
       <ShowYValues>true</ShowYValues>
       <XCurveData>
        <ShowUnit>true</ShowUnit>
        <VarName>time</VarName>
       </XCurveData>
       <YCurveData>
        <ShowUnit>true</ShowUnit>
        <VarName>stepper_control\Velocity_int\input</VarName>
       </YCurveData>
      </Curve>
     </Curves>
     <Legenda>
      <ShowLegenda>true</ShowLegenda>
      <Position>
       <X>0.07602339181286549</X>
       <Y>0.877104377104377</Y>
      </Position>
      <BorderPenColor>0</BorderPenColor>
      <BackgroundColor>16777215</BackgroundColor>
     </Legenda>
    </Plot>
    <Plot>
     <PlotType>GraphPlot</PlotType>
     <BasePlot>
       <PlotId>6</PlotId>
       <UseWindowsBGColor>false</UseWindowsBGColor>
       <BGColor>16777215</BGColor>
       <PlotIsVisible>true</PlotIsVisible>
     </BasePlot>
     <Grid>
      <DrawGrid>true</DrawGrid>
      <GridColor>15780518</GridColor>
      <GridBorderLineColor>12624260</GridBorderLineColor>
      <GridZeroLineColor>0</GridZeroLineColor>
      <XTicks>10</XTicks>
      <YTicks>10</YTicks>
      <ZTicks>10</ZTicks>
      <Use3DLook>false</Use3DLook>
     </Grid>
     <PlotBGColor>16777215</PlotBGColor>
     <ShowPlotTitle>true</ShowPlotTitle>
     <TitlePosition>1</TitlePosition>
     <PlotTitle>Stepper Control D</PlotTitle>
     <ShowXValues>true</ShowXValues>
     <Fonts>
      <TitleFont>
       <Name>Arial</Name>
       <Height>12</Height>
       <PitchFamily>34</PitchFamily>
       <Weight>400</Weight>
       <Italic>0</Italic>
       <UnderLine>0</UnderLine>
       <StrikeOut>0</StrikeOut>
       <Color>0</Color>
      </TitleFont>
      <LabelFont>
       <Name>Arial</Name>
       <Height>12</Height>
       <PitchFamily>34</PitchFamily>
       <Weight>400</Weight>
       <Italic>0</Italic>
       <UnderLine>0</UnderLine>
       <StrikeOut>0</StrikeOut>
       <Color>0</Color>
      </LabelFont>
      <ValuesFont>
       <Name>Arial</Name>
       <Height>10</Height>
       <PitchFamily>34</PitchFamily>
       <Weight>400</Weight>
       <Italic>0</Italic>
       <UnderLine>0</UnderLine>
       <StrikeOut>0</StrikeOut>
       <Color>0</Color>
      </ValuesFont>
      <LegendFont>
       <Name>Arial</Name>
       <Height>12</Height>
       <PitchFamily>34</PitchFamily>
       <Weight>400</Weight>
       <Italic>0</Italic>
       <UnderLine>0</UnderLine>
       <StrikeOut>0</StrikeOut>
       <Color>0</Color>
      </LegendFont>
     </Fonts>
     <SharedXAxis>true</SharedXAxis>
     <SharedYAxis>true</SharedYAxis>
     <SharedZAxis>false</SharedZAxis>
     <XAxes>
      <Axis>
       <Minimum>0.0</Minimum>
       <Maximum>17.641751363645234</Maximum>
       <Linear>true</Linear>
       <Scaling>3</Scaling>
       <Label>time</Label>
      </Axis>
     </XAxes>
     <YAxes>
      <Axis>
       <Minimum>-250.0</Minimum>
       <Maximum>250.0</Maximum>
       <Linear>true</Linear>
       <Scaling>1</Scaling>
       <Label>Acceleration</Label>
      </Axis>
      <Axis>
       <Minimum>0.0</Minimum>
       <Maximum>39.669708688195</Maximum>
       <Linear>true</Linear>
       <Scaling>1</Scaling>
       <Label>Angle</Label>
      </Axis>
      <Axis>
       <Minimum>0.0</Minimum>
       <Maximum>39.669708688195</Maximum>
       <Linear>true</Linear>
       <Scaling>1</Scaling>
       <Label>Velocity</Label>
      </Axis>
     </YAxes>
     <ZAxes>
     </ZAxes>
     <Curves>
      <Curve>
       <LineColor>3355111</LineColor>
       <LineStyle>1</LineStyle>
       <TickColor>3355111</TickColor>
       <TickStyle>0</TickStyle>
       <CurveVisible>true</CurveVisible>
       <PixelThresshold>1</PixelThresshold>
       <LineThickness>1</LineThickness>
       <LineOrder>1</LineOrder>
       <ShowYValues>true</ShowYValues>
       <XCurveData>
        <ShowUnit>true</ShowUnit>
        <VarName>time</VarName>
       </XCurveData>
       <YCurveData>
        <ShowUnit>true</ShowUnit>
        <VarName>stepper_control1\Acceleration_int\input</VarName>
       </YCurveData>
      </Curve>
      <Curve>
       <LineColor>6076255</LineColor>
       <LineStyle>1</LineStyle>
       <TickColor>6076255</TickColor>
       <TickStyle>0</TickStyle>
       <CurveVisible>true</CurveVisible>
       <PixelThresshold>1</PixelThresshold>
       <LineThickness>1</LineThickness>
       <LineOrder>1</LineOrder>
       <ShowYValues>true</ShowYValues>
       <XCurveData>
        <ShowUnit>true</ShowUnit>
        <VarName>time</VarName>
       </XCurveData>
       <YCurveData>
        <ShowUnit>true</ShowUnit>
        <VarName>stepper_control1\Velocity_int\output</VarName>
       </YCurveData>
      </Curve>
      <Curve>
       <LineColor>12553035</LineColor>
       <LineStyle>1</LineStyle>
       <TickColor>12553035</TickColor>
       <TickStyle>0</TickStyle>
       <CurveVisible>true</CurveVisible>
       <PixelThresshold>1</PixelThresshold>
       <LineThickness>1</LineThickness>
       <LineOrder>1</LineOrder>
       <ShowYValues>true</ShowYValues>
       <XCurveData>
        <ShowUnit>true</ShowUnit>
        <VarName>time</VarName>
       </XCurveData>
       <YCurveData>
        <ShowUnit>true</ShowUnit>
        <VarName>stepper_control1\Velocity_int\input</VarName>
       </YCurveData>
      </Curve>
     </Curves>
     <Legenda>
      <ShowLegenda>true</ShowLegenda>
      <Position>
       <X>0.07602339181286549</X>
       <Y>0.877104377104377</Y>
      </Position>
      <BorderPenColor>0</BorderPenColor>
      <BackgroundColor>16777215</BackgroundColor>
     </Legenda>
    </Plot>
    <Plot>
     <PlotType>GraphPlot</PlotType>
     <BasePlot>
       <PlotId>7</PlotId>
       <UseWindowsBGColor>false</UseWindowsBGColor>
       <BGColor>16777215</BGColor>
       <PlotIsVisible>true</PlotIsVisible>
     </BasePlot>
     <Grid>
      <DrawGrid>true</DrawGrid>
      <GridColor>15780518</GridColor>
      <GridBorderLineColor>12624260</GridBorderLineColor>
      <GridZeroLineColor>0</GridZeroLineColor>
      <XTicks>10</XTicks>
      <YTicks>10</YTicks>
      <ZTicks>10</ZTicks>
      <Use3DLook>false</Use3DLook>
     </Grid>
     <PlotBGColor>16777215</PlotBGColor>
     <ShowPlotTitle>true</ShowPlotTitle>
     <TitlePosition>1</TitlePosition>
     <PlotTitle>Plot</PlotTitle>
     <ShowXValues>true</ShowXValues>
     <Fonts>
      <TitleFont>
       <Name>Arial</Name>
       <Height>12</Height>
       <PitchFamily>34</PitchFamily>
       <Weight>400</Weight>
       <Italic>0</Italic>
       <UnderLine>0</UnderLine>
       <StrikeOut>0</StrikeOut>
       <Color>0</Color>
      </TitleFont>
      <LabelFont>
       <Name>Arial</Name>
       <Height>12</Height>
       <PitchFamily>34</PitchFamily>
       <Weight>400</Weight>
       <Italic>0</Italic>
       <UnderLine>0</UnderLine>
       <StrikeOut>0</StrikeOut>
       <Color>0</Color>
      </LabelFont>
      <ValuesFont>
       <Name>Arial</Name>
       <Height>10</Height>
       <PitchFamily>34</PitchFamily>
       <Weight>400</Weight>
       <Italic>0</Italic>
       <UnderLine>0</UnderLine>
       <StrikeOut>0</StrikeOut>
       <Color>0</Color>
      </ValuesFont>
      <LegendFont>
       <Name>Arial</Name>
       <Height>12</Height>
       <PitchFamily>34</PitchFamily>
       <Weight>400</Weight>
       <Italic>0</Italic>
       <UnderLine>0</UnderLine>
       <StrikeOut>0</StrikeOut>
       <Color>0</Color>
      </LegendFont>
     </Fonts>
     <SharedXAxis>true</SharedXAxis>
     <SharedYAxis>true</SharedYAxis>
     <SharedZAxis>false</SharedZAxis>
     <XAxes>
      <Axis>
       <Minimum>0.0</Minimum>
       <Maximum>17.641751363645234</Maximum>
       <Linear>true</Linear>
       <Scaling>3</Scaling>
       <Label>time</Label>
      </Axis>
     </XAxes>
     <YAxes>
      <Axis>
       <Minimum>-0.1</Minimum>
       <Maximum>0.1</Maximum>
       <Linear>true</Linear>
       <Scaling>2</Scaling>
       <Label>Stepper A Torque</Label>
      </Axis>
      <Axis>
       <Minimum>0.0</Minimum>
       <Maximum>0.063461060702673</Maximum>
       <Linear>true</Linear>
       <Scaling>2</Scaling>
       <Label>Stepper C torque</Label>
      </Axis>
     </YAxes>
     <ZAxes>
     </ZAxes>
     <Curves>
      <Curve>
       <LineColor>3355111</LineColor>
       <LineStyle>1</LineStyle>
       <TickColor>3355111</TickColor>
       <TickStyle>0</TickStyle>
       <CurveVisible>true</CurveVisible>
       <PixelThresshold>1</PixelThresshold>
       <LineThickness>1</LineThickness>
       <LineOrder>1</LineOrder>
       <ShowYValues>true</ShowYValues>
       <XCurveData>
        <ShowUnit>true</ShowUnit>
        <VarName>time</VarName>
       </XCurveData>
       <YCurveData>
        <ShowUnit>true</ShowUnit>
        <VarName>Joint_dynA\stepper_model\p.T</VarName>
       </YCurveData>
      </Curve>
      <Curve>
       <LineColor>6076255</LineColor>
       <LineStyle>1</LineStyle>
       <TickColor>6076255</TickColor>
       <TickStyle>0</TickStyle>
       <CurveVisible>true</CurveVisible>
       <PixelThresshold>1</PixelThresshold>
       <LineThickness>1</LineThickness>
       <LineOrder>1</LineOrder>
       <ShowYValues>true</ShowYValues>
       <XCurveData>
        <ShowUnit>true</ShowUnit>
        <VarName>time</VarName>
       </XCurveData>
       <YCurveData>
        <ShowUnit>true</ShowUnit>
        <VarName>Joint_dynC\stepper_model\p.T</VarName>
       </YCurveData>
      </Curve>
     </Curves>
     <Legenda>
      <ShowLegenda>true</ShowLegenda>
      <BorderPenColor>0</BorderPenColor>
      <BackgroundColor>16777215</BackgroundColor>
     </Legenda>
    </Plot>
   </Plots>
   <PlotPanels>
    <PlotPanel>
     <PlotPanelId>1</PlotPanelId>
     <PlotPanelVisible>true</PlotPanelVisible>
     <Name>Window 1</Name>
     <Tiling>0</Tiling>
     <PlotIds>
       <PlotId>1</PlotId>
       <PlotId>3</PlotId>
       <PlotId>5</PlotId>
       <PlotId>6</PlotId>
     </PlotIds>
     <ToggleState>Base</ToggleState>
    </PlotPanel>
    <PlotPanel>
     <PlotPanelId>2</PlotPanelId>
     <PlotPanelVisible>true</PlotPanelVisible>
     <Name>Window 2</Name>
     <Tiling>0</Tiling>
     <PlotIds>
       <PlotId>2</PlotId>
     </PlotIds>
     <ToggleState>Base</ToggleState>
    </PlotPanel>
    <PlotPanel>
     <PlotPanelId>3</PlotPanelId>
     <PlotPanelVisible>true</PlotPanelVisible>
     <Name>Window 3</Name>
     <Tiling>0</Tiling>
     <PlotIds>
       <PlotId>4</PlotId>
     </PlotIds>
     <ToggleState>Base</ToggleState>
    </PlotPanel>
    <PlotPanel>
     <PlotPanelId>4</PlotPanelId>
     <PlotPanelVisible>true</PlotPanelVisible>
     <Name>Window 4</Name>
     <Tiling>0</Tiling>
     <PlotIds>
       <PlotId>7</PlotId>
     </PlotIds>
     <ToggleState>Base</ToggleState>
    </PlotPanel>
   </PlotPanels>
   <WindowRectangles virtualDesktopWidth="5760" virtualDesktopHeight="1080">
     <WindowRectangle monitor="2" left="1920" top="0" right="3840" bottom="1080" plotpanelid="2">
0.0895833 0.109259 0.892188 0.862037
     </WindowRectangle>
     <WindowRectangle monitor="1" left="-1920" top="0" right="0" bottom="1080" plotpanelid="1">
0.14375 0.0537037 0.94375 0.84537
     </WindowRectangle>
     <WindowRectangle monitor="1" left="-1920" top="0" right="0" bottom="1080" plotpanelid="3">
0.0265625 0.134259 0.776042 0.859259
     </WindowRectangle>
     <WindowRectangle monitor="1" left="-1920" top="0" right="0" bottom="1080" plotpanelid="4">
0.192708 0.163889 0.803646 0.708333
     </WindowRectangle>
   </WindowRectangles>
  </PlotSpecs>
  <RunSpecs>
   <SimulatorSettings>
    <StartTime>0.0</StartTime>
    <FinishTime>20.0</FinishTime>
    <AllowPassFinishTime>false</AllowPassFinishTime>
    <Warp>false</Warp>
    <FPGonio>false</FPGonio>
    <UseOutputAfterEach>false</UseOutputAfterEach>
    <OutputAfterEach>0.1</OutputAfterEach>
    <EventEpsilon>1.0e-6</EventEpsilon>
    <AlgebraicTolerance>1.0e-7</AlgebraicTolerance>
    <SteadyStateAnalysis>false</SteadyStateAnalysis>
    <UpdateHoldInstructions>true</UpdateHoldInstructions>
   </SimulatorSettings>
   <IntegrationMethods>
    <IntegrationMethod>
     <Name>Euler</Name>
     <StepSize>0.01</StepSize>
     <AutoStepSize>false</AutoStepSize>
    </IntegrationMethod>
    <IntegrationMethod>
     <Name>BackwardEuler</Name>
     <AbsoluteTolerance>1.0e-5</AbsoluteTolerance>
     <RelativeTolerance>1.0e-5</RelativeTolerance>
     <AlgebraicAbsoluteTolerance>1.0e-5</AlgebraicAbsoluteTolerance>
     <AlgebraicRelativeTolerance>1.0e-5</AlgebraicRelativeTolerance>
     <StepSize>0.01</StepSize>
     <Alpha>1.0</Alpha>
    </IntegrationMethod>
    <IntegrationMethod>
     <Name>AdamsBashforth</Name>
     <StepSize>1.0e-4</StepSize>
     <AutoStepSize>false</AutoStepSize>
    </IntegrationMethod>
    <IntegrationMethod>
     <Name>RungeKutta2</Name>
     <StepSize>0.01</StepSize>
     <AutoStepSize>false</AutoStepSize>
    </IntegrationMethod>
    <IntegrationMethod>
     <Name>RungeKutta4</Name>
     <StepSize>0.01</StepSize>
     <AutoStepSize>false</AutoStepSize>
    </IntegrationMethod>
    <IntegrationMethod>
     <Name>RungeKutta8</Name>
     <UseInitialStepSize>false</UseInitialStepSize>
     <InitialStepSize>0.0</InitialStepSize>
     <UseMaximumStepSize>false</UseMaximumStepSize>
     <MaximumStepSize>0.0</MaximumStepSize>
     <AbsoluteTolerance>1.0e-6</AbsoluteTolerance>
     <RelativeTolerance>1.0e-6</RelativeTolerance>
     <SafetyFactor>0.9</SafetyFactor>
     <Factor1>0.33</Factor1>
     <Factor2>6.0</Factor2>
     <Beta>0.0</Beta>
     <UseMaxNrSteps>false</UseMaxNrSteps>
     <MaxNrSteps>100000</MaxNrSteps>
     <UseStiffDetection>false</UseStiffDetection>
     <MaxNrStiffnessSteps>1000</MaxNrStiffnessSteps>
    </IntegrationMethod>
    <IntegrationMethod>
     <Name>RungeKuttaFehlberg</Name>
     <UseInitialStepSize>false</UseInitialStepSize>
     <InitialStepSize>0.0</InitialStepSize>
     <UseMaximumStepSize>false</UseMaximumStepSize>
     <MaximumStepSize>0.0</MaximumStepSize>
     <AbsoluteTolerance>1.0e-6</AbsoluteTolerance>
     <RelativeTolerance>1.0e-6</RelativeTolerance>
    </IntegrationMethod>
    <IntegrationMethod>
     <Name>VodeAdams</Name>
     <UseInitialStepSize>false</UseInitialStepSize>
     <InitialStepSize>0.0</InitialStepSize>
     <UseMaximumStepSize>false</UseMaximumStepSize>
     <MaximumStepSize>0.0</MaximumStepSize>
     <AbsoluteTolerance>1.0e-6</AbsoluteTolerance>
     <RelativeTolerance>1.0e-6</RelativeTolerance>
     <VodeUseBDF>true</VodeUseBDF>
     <VodeUseNewton>true</VodeUseNewton>
    </IntegrationMethod>
    <IntegrationMethod>
     <Name>BDFMethod</Name>
     <AbsoluteTolerance>1.0e-5</AbsoluteTolerance>
     <RelativeTolerance>1.0e-5</RelativeTolerance>
     <AlgebraicAbsoluteTolerance>1.0e-5</AlgebraicAbsoluteTolerance>
     <AlgebraicRelativeTolerance>1.0e-5</AlgebraicRelativeTolerance>
     <UseInitialStepSize>false</UseInitialStepSize>
     <InitialStepSize>0.0</InitialStepSize>
     <UseMaximumStepSize>false</UseMaximumStepSize>
     <MaximumStepSize>0.0</MaximumStepSize>
    </IntegrationMethod>
    <IntegrationMethod>
     <Name>MeBDFiMethod</Name>
     <AbsoluteTolerance>1.0e-6</AbsoluteTolerance>
     <RelativeTolerance>1.0e-6</RelativeTolerance>
     <AlgebraicAbsoluteTolerance>1.0e-6</AlgebraicAbsoluteTolerance>
     <AlgebraicRelativeTolerance>1.0e-6</AlgebraicRelativeTolerance>
     <UseInitialStepSize>false</UseInitialStepSize>
     <InitialStepSize>0.0</InitialStepSize>
     <UseMaximumStepSize>false</UseMaximumStepSize>
     <MaximumStepSize>0.0</MaximumStepSize>
    </IntegrationMethod>
    <SelectedIntegrationMethod>7</SelectedIntegrationMethod>
   </IntegrationMethods>
  </RunSpecs>
  <MultipleRun>
   <NrSteps>10</NrSteps>
   <CopyFromStates>false</CopyFromStates>
   <JoinParameterVariation>true</JoinParameterVariation>
   <ClearAfterRun>true</ClearAfterRun>
   <RedrawAfterRun>false</RedrawAfterRun>
   <DrawDuringSimulation>true</DrawDuringSimulation>
   <ActionBeforeOptimization>0</ActionBeforeOptimization>
   <CompareValue>0.0</CompareValue>
   <UseCompareValue>false</UseCompareValue>
   <MultipleRunType>Optimization</MultipleRunType>
   <Minimize>true</Minimize>
   <OptimizationVariable>Joint_dynC\stepper_model\angle</OptimizationVariable>
   <CompareVariable>stepper_control1\setpoint</CompareVariable>
   <ResulVarUsage>UseIntegralAbsolute</ResulVarUsage>
   <Tolerance>0.001</Tolerance>
   <OptimizationMethod>DavidsonFletcherPowell</OptimizationMethod>
   <MultipleRunVariables>
     <MultipleRunVariable>
       <Name>stepper_control1\Position_control\kp</Name>
       <Minimum>13.0</Minimum>
       <Maximum>39.0</Maximum>
       <SweepMethod>Linear</SweepMethod>
       <Distribution>Uniform</Distribution>
       <Mean>26.0</Mean>
       <Deviation>1.0</Deviation>
       <TolerancePercentage>1.0</TolerancePercentage>
       <Nominal>26.0</Nominal>
     </MultipleRunVariable>
     <MultipleRunVariable>
       <Name>stepper_control1\Velocity_control\kp</Name>
       <Minimum>33.0</Minimum>
       <Maximum>99.0</Maximum>
       <SweepMethod>Linear</SweepMethod>
       <Distribution>Uniform</Distribution>
       <Mean>66.0</Mean>
       <Deviation>1.0</Deviation>
       <TolerancePercentage>1.0</TolerancePercentage>
       <Nominal>66.0</Nominal>
     </MultipleRunVariable>
   </MultipleRunVariables>
  </MultipleRun>
  <ExportData>
   <WriteAsText>true</WriteAsText>
   <ReadAsText>true</ReadAsText>
   <WriteHeader>true</WriteHeader>
   <ReadHeader>true</ReadHeader>
   <ReadFilename></ReadFilename>
   <WriteFilename></WriteFilename>
   <DoWrite>false</DoWrite>
   <ExportVariables>
   </ExportVariables>
   <ImportVariables>
   </ImportVariables>
  </ExportData>
  <BreakPoints>
  </BreakPoints>
  <AnimationPlayback>
   <PlaybackSpeed>1.0</PlaybackSpeed>
  </AnimationPlayback>
</ExpData>
  </Experiment>
</Experiments>
</Document>
