<?xml version="1.0" encoding="UTF-8"?>
<Document>
  <Model version="4.8" build="4.8.2.10124">
    <Sidops>
<![CDATA[SG90 288 400
 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
   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 704 400
    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 688 384 720 416 color 0 fill 15132390;
      text '∫' 704 400.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 536 488;
   plug p 744 296;
   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 704 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' 704 296 color 0 18 bold;
    end;
    implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
   PD 456 400
    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 440 384 472 416 color 0 fill 15132390;
      text 'PD' 456.5 400.1 color 16711680 18 bold;
    end;
    implementation eq
parameters
	real kp = 1.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 536 400
    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 528 392 544 408 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;
   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 = 120;
equations
	p1.e = r * p2.e;
	p2.f = r * p1.f;
implementation_end;
  end;
  connections
   effort -> PlusMinus1\plus;
   GY1\p2 => TF1\p1;
   Integrate\output -> PlusMinus1\minus;
   MSe\p => OneJunction1\p;
   OneJunction1\p => GY1\p1;
   OneJunction1\p => I\p;
   OneJunction1\p => R\p;
   OneJunction2\flow -> Integrate\input;
   OneJunction2\p => p;
   PD\output -> MSe\effort;
   PlusMinus1\output -> PD\error;
   TF1\p2 => OneJunction2\p;
  end;
 implementation_end;
]]>
    </Sidops>
  </Model>
</Document>
