4.8 1 Motor\SG90.emx 2020-7-27 10:46:51 '; type Submodel ports signal in effort; power out p; end; implementation bg submodels GY1 592 296 description ' 4.2 1 False Bond Graph\GY.emx 2011-11-29 15:53:45 '; type GY ports power in p1; power out p2; restrictions causality constraint equal p1 p2; end; icon bg bottom figures text 'GY' 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 ' 4.2 1 False Bond Graph\I.emx 2011-11-29 15:55:55 '; type I ports power in p; signal out state; restrictions causality preferred in p; end; icon bg 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 ' 4.3 1 False Signal\Block Diagram\Integrate.emx 2013-3-8 14:47:42 '; type Integrate ports signal in input; signal out output; end; icon bg bottom figures rectangle 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 ' 4.2 1 False Bond Graph\MSe.emx 2011-11-29 16:12:33 '; type MSe ports power out p; signal in effort; restrictions causality fixed out p; end; icon bg bottom figures text 'MSe' 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 ' 4.2 1 False Bond Graph\OneJunction.emx 2011-11-29 16:17:51 '; knot OneJunction ports power knot duplicatable none p [1]; signal knot out flow [1]; restrictions causality constraint one_out p; end; icon bg figures text '1' 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 ' 4.2 1 False Bond Graph\OneJunction.emx 2011-11-29 16:17:51 '; knot OneJunction ports power knot duplicatable none p [1]; signal knot out flow [1]; restrictions causality constraint one_out p; end; icon bg figures text '1' 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 ' 4.0 1 False Signal\Control\PID Control\Continuous\PD.emx 2008-1-17 10:49:7 '; 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 '4.01False Signal\Block Diagram\PlusMinus.emx 2007-9-27 10:15:13 '; knot PlusMinus ports signal knot duplicatable in plus [1]; signal knot duplicatable in minus [1]; signal knot out output [1]; end; icon bg ellipse figures ellipse 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 ' 4.2 1 False Bond Graph\R.emx 2011-11-29 16:35:37 '; type R ports power in p; end; icon bg bottom figures text 'R' 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 ' 4.2 1 False Bond Graph\TF.emx 2011-11-29 16:43:47 '; 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; ]]>