You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

9019 line
259KB

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <Document>
  3. <Model version="4.8" build="4.8.2.10124">
  4. <Sidops><![CDATA[model 128 184
  5. description '<Information>
  6. <Description>
  7. <Version>4.8</Version>
  8. <IsMainModel>0</IsMainModel>
  9. <KeepParameterValues>False</KeepParameterValues>
  10. <LibraryPath>C:\users\wouter\My Documents\studie\ma\mahd\implementation\SCARA\03_motor\MR_dynamics.emx</LibraryPath>
  11. <TimeStamp>2020-7-17 13:58:25</TimeStamp>
  12. </Description>
  13. </Information>';
  14. type Mainmodel
  15. end;
  16. implementation bg
  17. submodels
  18. Base 392 296
  19. description '<Information>
  20. <Description>
  21. <Version>4.8</Version>
  22. <IsMainModel>1</IsMainModel>
  23. <KeepParameterValues>False</KeepParameterValues>
  24. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  25. <LibraryPath>Z:\home\wouter\Documents\20-sim\library\Bond Graph\MR\link.emx</LibraryPath>
  26. <TimeStamp>2020-7-16 14:21:54</TimeStamp>
  27. <Description>Base</Description>
  28. </Description>
  29. </Information>';
  30. type Submodel
  31. ports
  32. power out p [6,1];
  33. signal in Hin [4,4];
  34. power in p1 [6,1];
  35. signal out Hout [4,4];
  36. parameters
  37. real I[3,1] = [1.6399999999999998e-6; 4.7e-8; 1.61e-6] {N.m.s};
  38. real m = 0.00455 {kg};
  39. real COMdim[3,1] = [0.0; 0.0325; 0.0] {m};
  40. real dim[3,1] = [0.0; 0.065; 0.0] {m};
  41. end;
  42. icon bg bottom
  43. figures
  44. rectangle 360 224 424 368 color 0 fill 10025880;
  45. text 'Link' 392 296 color 0;
  46. terminals
  47. p 360 256 fixed;
  48. Hin 360 336 fixed;
  49. p1 424 256 fixed;
  50. Hout 424 336 fixed;
  51. end;
  52. implementation bg
  53. submodels
  54. AdHi0 544 416
  55. description '<Description>
  56. <Version>4.0</Version>
  57. <IsMainModel>1</IsMainModel>
  58. <KeepParameterValues>False</KeepParameterValues>
  59. <LibraryPath>Bond Graph\MTF.emx</LibraryPath>
  60. <TimeStamp>2007-9-25 12:3:3</TimeStamp>
  61. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  62. </Description>';
  63. type MTF
  64. ports
  65. power in p1 [6,1];
  66. power out p2 [6,1];
  67. signal in H [4,4];
  68. restrictions
  69. causality constraint not_equal p1 p2;
  70. end;
  71. icon bg left
  72. figures
  73. text 'MTF' 544 416 color 0 18 bold;
  74. end;
  75. implementation eq
  76. variables
  77. real onlyRotH[4,4];
  78. code
  79. //Only rotations with respect to the inertial system matter!
  80. onlyRotH = H;
  81. onlyRotH[1,4] = 0;
  82. onlyRotH[2,4] = 0;
  83. onlyRotH[3,4] = 0;
  84. p2.e = transpose(Adjoint(onlyRotH)) * p1.e;
  85. p1.f = Adjoint(onlyRotH) * p2.f;
  86. implementation_end;
  87. AdHij 864 304
  88. description '<Description>
  89. <Version>4.0</Version>
  90. <IsMainModel>1</IsMainModel>
  91. <KeepParameterValues>False</KeepParameterValues>
  92. <LibraryPath>Bond Graph\MTF.emx</LibraryPath>
  93. <TimeStamp>2007-9-25 12:3:3</TimeStamp>
  94. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  95. </Description>';
  96. type MTF
  97. ports
  98. power out p1 [6,1];
  99. power in p2 [6,1];
  100. signal in H [4,4];
  101. restrictions
  102. causality constraint not_equal p1 p2;
  103. end;
  104. icon bg top
  105. figures
  106. text 'MTF' 864 304 color 0 18 bold;
  107. end;
  108. implementation eq
  109. equations
  110. //Only rotations with respect to the inertial system matter!
  111. p1.e = transpose(Adjoint(H)) * p2.e;
  112. p2.f = Adjoint(H) * p1.f;
  113. implementation_end;
  114. AdHik 544 248
  115. description '<Description>
  116. <Version>4.0</Version>
  117. <IsMainModel>1</IsMainModel>
  118. <KeepParameterValues>False</KeepParameterValues>
  119. <LibraryPath>Bond Graph\TF.emx</LibraryPath>
  120. <TimeStamp>2007-9-25 12:4:2</TimeStamp>
  121. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  122. </Description>';
  123. type TF
  124. ports
  125. power in p1 [6,1];
  126. power out p2 [6,1];
  127. restrictions
  128. causality constraint not_equal p1 p2;
  129. parameters
  130. real COMdim[3,1] = [0.0; 0.0325; 0.0];
  131. end;
  132. icon bg left
  133. figures
  134. text 'TF' 544 248 color 0 18 bold;
  135. end;
  136. implementation eq
  137. //Frame in joint connected to port 1
  138. //Principal inertial frame connected in port 2
  139. variables
  140. real d[3]; //distance between frames
  141. real R[3,3]; //rotation between frames
  142. real H[4,4]; //homogeneous matrix
  143. real AdH[6,6]; //Adjoint of homogeneous matrix
  144. equations
  145. d = COMdim; //distance of 1 in z direction of frames
  146. R = eye(3); //no rotation
  147. H = homogeneous(R,d);
  148. AdH = Adjoint(H);
  149. p1.f = AdH * p2.f;
  150. p2.e = transpose(AdH) * p1.e;
  151. implementation_end;
  152. AdHik1 544 360
  153. description '<Description>
  154. <Version>4.0</Version>
  155. <IsMainModel>1</IsMainModel>
  156. <KeepParameterValues>False</KeepParameterValues>
  157. <LibraryPath>Bond Graph\TF.emx</LibraryPath>
  158. <TimeStamp>2007-9-25 12:4:2</TimeStamp>
  159. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  160. </Description>';
  161. type TF
  162. ports
  163. power in p1 [6,1];
  164. power out p2 [6,1];
  165. restrictions
  166. causality constraint not_equal p1 p2;
  167. parameters
  168. real COMdim[3,1] = [0.0; 0.0325; 0.0];
  169. end;
  170. icon bg left
  171. figures
  172. text 'TF' 544 360 color 0 18 bold;
  173. end;
  174. implementation eq
  175. //Frame in joint connected to port 1
  176. //Principal inertial frame connected in port 2
  177. variables
  178. real d[3]; //distance between frames
  179. real R[3,3]; //rotation between frames
  180. real H[4,4]; //homogeneous matrix
  181. real AdH[6,6]; //Adjoint of homogeneous matrix
  182. equations
  183. d = COMdim; //distance of 1 in z direction of frames
  184. R = eye(3); //no rotation
  185. H = homogeneous(R,d);
  186. AdH = Adjoint(H);
  187. p1.f = AdH * p2.f;
  188. p2.e = transpose(AdH) * p1.e;
  189. implementation_end;
  190. EJS 608 184
  191. description '<Description>
  192. <Version>4.0</Version>
  193. <IsMainModel>1</IsMainModel>
  194. <KeepParameterValues>False</KeepParameterValues>
  195. <LibraryPath>Bond Graph\MGY.emx</LibraryPath>
  196. <TimeStamp>2007-10-31 11:43:6</TimeStamp>
  197. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  198. </Description>';
  199. type MGY
  200. ports
  201. power in p1 [6,1];
  202. parameters
  203. real I[3,1] = [20.0; 20.0; 20.0];
  204. real m = 20.0;
  205. end;
  206. icon bg top
  207. figures
  208. text 'MGY' 608 184 color 0 18 bold;
  209. end;
  210. implementation eq
  211. //EJS / Gyroscopic effects
  212. variables
  213. real II[6,6]; //Inertial tensor
  214. real Q[6,6];
  215. real QI[6,6];
  216. real v[3];
  217. real omega[3];
  218. equations
  219. II = [ I[1],0, 0, 0, 0, 0;
  220. 0, I[2],0, 0, 0, 0;
  221. 0, 0, I[3],0, 0, 0;
  222. 0, 0, 0, m, 0, 0;
  223. 0, 0, 0, 0, m, 0;
  224. 0, 0, 0, 0, 0, m];
  225. v[1:3] = p1.f[4:6];
  226. omega[1:3] = p1.f[1:3];
  227. Q[1:3,1:3] = -skew(omega);
  228. Q[1:3,4:6] = -skew(v);
  229. Q[4:6,1:3] = [0,0,0;0,0,0;0,0,0];//matrix filled with zeros
  230. Q[4:6,4:6] = -skew(omega);
  231. QI = Q*II;
  232. p1.e = QI*p1.f;implementation_end;
  233. Gravity 656 416
  234. description '<Description>
  235. <Version>4.0</Version>
  236. <IsMainModel>1</IsMainModel>
  237. <KeepParameterValues>False</KeepParameterValues>
  238. <LibraryPath>Bond Graph\Se.emx</LibraryPath>
  239. <TimeStamp>2007-9-25 12:3:26</TimeStamp>
  240. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  241. </Description>';
  242. type Se
  243. ports
  244. power out p [6,1];
  245. restrictions
  246. causality fixed out p;
  247. parameters
  248. real m = 20.0;
  249. end;
  250. icon bg bottom
  251. figures
  252. text 'Se' 656 416 color 0 18 bold;
  253. end;
  254. implementation eq
  255. variables
  256. real effort[6];
  257. equations
  258. effort = [0;0;0;0;0;-9.8*m];
  259. p.e = effort;
  260. implementation_end;
  261. Hij 864 496
  262. description '<Description>
  263. <Version>4.1</Version>
  264. <IsMainModel>1</IsMainModel>
  265. <KeepParameterValues>False</KeepParameterValues>
  266. <LibraryPath>H.emx</LibraryPath>
  267. <TimeStamp>2010-9-21 15:03:50</TimeStamp>
  268. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  269. </Description>';
  270. type Gain
  271. ports
  272. signal in input [4,4];
  273. signal out output [4,4];
  274. signal out Hab [4,4];
  275. parameters
  276. real dim[3,1] = [0.024; 0.0; 0.096];
  277. end;
  278. icon bg bottom
  279. figures
  280. rectangle 848.1 480 879.9 512 color 0 fill 15132390;
  281. text 'H' 864 496 color 16711680 16 bold;
  282. end;
  283. implementation eq
  284. parameters
  285. real baseoffset[3]=[0.143; 0; 0.046]; //coordinates of joint_1
  286. equations
  287. Hab = homogeneous(eye(3),dim+baseoffset);
  288. output = input * Hab;
  289. implementation_end;
  290. InertialTensor 480 184
  291. description '<Description>
  292. <Version>4.0</Version>
  293. <IsMainModel>1</IsMainModel>
  294. <KeepParameterValues>False</KeepParameterValues>
  295. <LibraryPath>Bond Graph\I.emx</LibraryPath>
  296. <TimeStamp>2007-9-25 12:2:12</TimeStamp>
  297. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  298. </Description>';
  299. type I
  300. ports
  301. power in p [6,1];
  302. signal out state [6,1];
  303. restrictions
  304. causality preferred in p;
  305. parameters
  306. real m = 1.0;
  307. real I[3,1] = [20.0; 20.0; 20.0];
  308. end;
  309. icon bg top
  310. figures
  311. text 'I' 480 184 color 0 18 bold;
  312. end;
  313. implementation eq
  314. variables
  315. real II[6,6]; //Inertial tensor
  316. equations
  317. II = [I[1],0, 0, 0, 0, 0;
  318. 0, I[2],0, 0, 0, 0;
  319. 0, 0, I[3],0, 0, 0;
  320. 0, 0, 0, m, 0, 0;
  321. 0, 0, 0, 0, m, 0;
  322. 0, 0, 0, 0, 0, m];
  323. state = int(p.e); //state = generalized momentum
  324. p.f = inverse(II)*state;
  325. implementation_end;
  326. plug Hout 984 496;
  327. plug p1 984 304;
  328. plug Hin 472 496;
  329. plug p 472 304;
  330. Splitter1 544 496
  331. description '<Description><Version>4.0</Version>
  332. <LibraryPath>Signal\Block Diagram\Splitter.emx</LibraryPath>
  333. <TimeStamp>2008-01-17 11:28:29</TimeStamp>
  334. <IsMainModel>1</IsMainModel>
  335. <KeepParameterValues>False</KeepParameterValues>
  336. </Description>';
  337. knot Splitter
  338. ports
  339. signal knot duplicatable out output [4,4];
  340. signal knot in input [4,4];
  341. end;
  342. icon bg ellipse
  343. figures
  344. ellipse 540.8 492.8 547.2 499.2 color -1 fill 0;
  345. ellipse 539.7 491.7 548.3 500.3 color -1;
  346. terminals
  347. input 544 496 fixed;
  348. end;
  349. implementation eq
  350. equations
  351. collect (output) = input;
  352. implementation_end;
  353. Ta00 600 416
  354. description '<Description>
  355. <Version>4.0</Version>
  356. <IsMainModel>1</IsMainModel>
  357. <KeepParameterValues>False</KeepParameterValues>
  358. <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  359. <TimeStamp>2007-9-27 9:51:18</TimeStamp>
  360. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  361. </Description>';
  362. knot OneJunction
  363. ports
  364. power knot duplicatable none p [6,1];
  365. signal knot out flow [6,1];
  366. restrictions
  367. causality constraint one_out p;
  368. end;
  369. icon bg bottom
  370. figures
  371. text '1' 600 416 color 0 18 bold;
  372. end;
  373. implementation eq
  374. equations
  375. sum (direct (p.e)) = 0;
  376. equal (collect (p.f));
  377. flow = first (p.f);
  378. implementation_end;
  379. Ta0j 544 304
  380. description '<Description>
  381. <Version>4.0</Version>
  382. <IsMainModel>1</IsMainModel>
  383. <KeepParameterValues>False</KeepParameterValues>
  384. <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  385. <TimeStamp>2007-9-27 9:51:18</TimeStamp>
  386. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  387. <Description></Description>
  388. </Description>';
  389. knot OneJunction
  390. ports
  391. power knot duplicatable none p [6,1];
  392. signal knot out flow [6,1];
  393. restrictions
  394. causality constraint one_out p;
  395. end;
  396. icon bg bottom
  397. figures
  398. text '1' 544 304 color 0 18 bold;
  399. end;
  400. implementation eq
  401. equations
  402. sum (direct (p.e)) = 0;
  403. equal (collect (p.f));
  404. flow = first (p.f);
  405. implementation_end;
  406. Ta0k 544 184
  407. description '<Description>
  408. <Version>4.0</Version>
  409. <IsMainModel>1</IsMainModel>
  410. <KeepParameterValues>False</KeepParameterValues>
  411. <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  412. <TimeStamp>2007-9-27 9:51:18</TimeStamp>
  413. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  414. <Description></Description>
  415. </Description>';
  416. knot OneJunction
  417. ports
  418. power knot duplicatable none p [6,1];
  419. signal knot out flow [6,1];
  420. restrictions
  421. causality constraint one_out p;
  422. end;
  423. icon bg top
  424. figures
  425. text '1' 544 184 color 0 18 bold;
  426. end;
  427. implementation eq
  428. equations
  429. sum (direct (p.e)) = 0;
  430. equal (collect (p.f));
  431. flow = first (p.f);
  432. implementation_end;
  433. end;
  434. connections
  435. AdHi0\p2 => AdHik1\p1;
  436. AdHij\p1 => Ta0j\p;
  437. AdHik\p2 => Ta0k\p;
  438. AdHik1\p2 => Ta0j\p;
  439. Gravity\p => Ta00\p;
  440. Hij\Hab -> AdHij\H;
  441. Hij\output -> Hout;
  442. Hin -> Splitter1\input;
  443. p <= Ta0j\p;
  444. p1 => AdHij\p2;
  445. Splitter1\output -> AdHi0\H;
  446. Splitter1\output -> Hij\input;
  447. Ta00\p => AdHi0\p1;
  448. Ta0j\p => AdHik\p1;
  449. Ta0k\p => EJS\p1;
  450. Ta0k\p => InertialTensor\p;
  451. end;
  452. parameterrelations
  453. InertialTensor\I = I;
  454. InterialTensor\m = m;
  455. EJS\I = I;
  456. EJS\m = m;
  457. AdHik\COMdim = COMdim;
  458. AdHik1\COMdim = COMdim;
  459. Hij\dim = dim;
  460. Gravity\m=m;parameterrelations_end;
  461. figures
  462. text 'b = current link (body)
  463. a = previous link (body)
  464. i = Body fixed frame, fixed in joint with previous link
  465. j = Body fixed frame, fixed in joint with next link
  466. k = Body fixed frame, principal inertial frame
  467. 0 = inertial system
  468. ' 288 280 color 0;
  469. implementation_end;
  470. Base1 584 296
  471. description '<Information>
  472. <Description>
  473. <Version>4.8</Version>
  474. <IsMainModel>1</IsMainModel>
  475. <KeepParameterValues>False</KeepParameterValues>
  476. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  477. <LibraryPath>Z:\home\wouter\Documents\20-sim\library\Bond Graph\MR\link.emx</LibraryPath>
  478. <TimeStamp>2020-7-16 14:21:54</TimeStamp>
  479. <Description>Base</Description>
  480. </Description>
  481. </Information>';
  482. type Submodel
  483. ports
  484. power out p [6,1];
  485. signal in Hin [4,4];
  486. power in p1 [6,1];
  487. signal out Hout [4,4];
  488. parameters
  489. real I[3,1] = [1.6399999999999998e-6; 4.7e-8; 1.61e-6] {N.m.s};
  490. real m = 0.00455 {kg};
  491. real COMdim[3,1] = [0.0; 0.025; 0.0] {m};
  492. real dim[3,1] = [0.0; 0.05; 0.0] {m};
  493. end;
  494. icon bg bottom
  495. figures
  496. rectangle 552 224 616 368 color 0 fill 10025880;
  497. text 'Link' 584 296 color 0;
  498. terminals
  499. p 552 256 fixed;
  500. Hin 552 336 fixed;
  501. p1 616 256 fixed;
  502. Hout 616 336 fixed;
  503. end;
  504. implementation bg
  505. submodels
  506. AdHi0 664 416
  507. description '<Description>
  508. <Version>4.0</Version>
  509. <IsMainModel>1</IsMainModel>
  510. <KeepParameterValues>False</KeepParameterValues>
  511. <LibraryPath>Bond Graph\MTF.emx</LibraryPath>
  512. <TimeStamp>2007-9-25 12:3:3</TimeStamp>
  513. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  514. </Description>';
  515. type MTF
  516. ports
  517. power in p1 [6,1];
  518. power out p2 [6,1];
  519. signal in H [4,4];
  520. restrictions
  521. causality constraint not_equal p1 p2;
  522. end;
  523. icon bg left
  524. figures
  525. text 'MTF' 664 416 color 0 18 bold;
  526. end;
  527. implementation eq
  528. variables
  529. real onlyRotH[4,4];
  530. code
  531. //Only rotations with respect to the inertial system matter!
  532. onlyRotH = H;
  533. onlyRotH[1,4] = 0;
  534. onlyRotH[2,4] = 0;
  535. onlyRotH[3,4] = 0;
  536. p2.e = transpose(Adjoint(onlyRotH)) * p1.e;
  537. p1.f = Adjoint(onlyRotH) * p2.f;
  538. implementation_end;
  539. AdHij 816 304
  540. description '<Description>
  541. <Version>4.0</Version>
  542. <IsMainModel>1</IsMainModel>
  543. <KeepParameterValues>False</KeepParameterValues>
  544. <LibraryPath>Bond Graph\MTF.emx</LibraryPath>
  545. <TimeStamp>2007-9-25 12:3:3</TimeStamp>
  546. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  547. </Description>';
  548. type MTF
  549. ports
  550. power out p1 [6,1];
  551. power in p2 [6,1];
  552. signal in H [4,4];
  553. restrictions
  554. causality constraint not_equal p1 p2;
  555. end;
  556. icon bg top
  557. figures
  558. text 'MTF' 816 304 color 0 18 bold;
  559. end;
  560. implementation eq
  561. equations
  562. //Only rotations with respect to the inertial system matter!
  563. p1.e = transpose(Adjoint(H)) * p2.e;
  564. p2.f = Adjoint(H) * p1.f;
  565. implementation_end;
  566. AdHik 664 248
  567. description '<Description>
  568. <Version>4.0</Version>
  569. <IsMainModel>1</IsMainModel>
  570. <KeepParameterValues>False</KeepParameterValues>
  571. <LibraryPath>Bond Graph\TF.emx</LibraryPath>
  572. <TimeStamp>2007-9-25 12:4:2</TimeStamp>
  573. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  574. </Description>';
  575. type TF
  576. ports
  577. power in p1 [6,1];
  578. power out p2 [6,1];
  579. restrictions
  580. causality constraint not_equal p1 p2;
  581. parameters
  582. real COMdim[3,1] = [0.01489; 0.00213; 0.00213];
  583. end;
  584. icon bg left
  585. figures
  586. text 'TF' 664 248 color 0 18 bold;
  587. end;
  588. implementation eq
  589. //Frame in joint connected to port 1
  590. //Principal inertial frame connected in port 2
  591. variables
  592. real d[3]; //distance between frames
  593. real R[3,3]; //rotation between frames
  594. real H[4,4]; //homogeneous matrix
  595. real AdH[6,6]; //Adjoint of homogeneous matrix
  596. equations
  597. d = COMdim; //distance of 1 in z direction of frames
  598. R = eye(3); //no rotation
  599. H = homogeneous(R,d);
  600. AdH = Adjoint(H);
  601. p1.f = AdH * p2.f;
  602. p2.e = transpose(AdH) * p1.e;
  603. implementation_end;
  604. AdHik1 664 360
  605. description '<Description>
  606. <Version>4.0</Version>
  607. <IsMainModel>1</IsMainModel>
  608. <KeepParameterValues>False</KeepParameterValues>
  609. <LibraryPath>Bond Graph\TF.emx</LibraryPath>
  610. <TimeStamp>2007-9-25 12:4:2</TimeStamp>
  611. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  612. </Description>';
  613. type TF
  614. ports
  615. power out p1 [6,1];
  616. power in p2 [6,1];
  617. restrictions
  618. causality constraint not_equal p1 p2;
  619. parameters
  620. real COMdim[3,1] = [0.01489; 0.00213; 0.00213];
  621. end;
  622. icon bg left
  623. figures
  624. text 'TF' 664 360 color 0 18 bold;
  625. end;
  626. implementation eq
  627. //Principal inertial frame connected in port 2
  628. variables
  629. real d[3]; //distance between frames
  630. real R[3,3]; //rotation between frames
  631. real H[4,4]; //homogeneous matrix
  632. real AdH[6,6]; //Adjoint of homogeneous matrix
  633. equations
  634. d = COMdim; //distance of 1 in z direction of frames
  635. R = eye(3); //no rotation
  636. H = homogeneous(R,d);
  637. AdH = Adjoint(H);
  638. p1.f = AdH * p2.f;
  639. p2.e = transpose(AdH) * p1.e;
  640. implementation_end;
  641. EJS 728 184
  642. description '<Description>
  643. <Version>4.0</Version>
  644. <IsMainModel>1</IsMainModel>
  645. <KeepParameterValues>False</KeepParameterValues>
  646. <LibraryPath>Bond Graph\MGY.emx</LibraryPath>
  647. <TimeStamp>2007-10-31 11:43:6</TimeStamp>
  648. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  649. </Description>';
  650. type MGY
  651. ports
  652. power in p1 [6,1];
  653. parameters
  654. real I[3,1] = [20.0; 20.0; 20.0];
  655. real m = 20.0;
  656. end;
  657. icon bg top
  658. figures
  659. text 'MGY' 728 184 color 0 18 bold;
  660. end;
  661. implementation eq
  662. //EJS / Gyroscopic effects
  663. variables
  664. real II[6,6]; //Inertial tensor
  665. real Q[6,6];
  666. real QI[6,6];
  667. real v[3];
  668. real omega[3];
  669. equations
  670. II = [ I[1],0, 0, 0, 0, 0;
  671. 0, I[2],0, 0, 0, 0;
  672. 0, 0, I[3],0, 0, 0;
  673. 0, 0, 0, m, 0, 0;
  674. 0, 0, 0, 0, m, 0;
  675. 0, 0, 0, 0, 0, m];
  676. v[1:3] = p1.f[4:6];
  677. omega[1:3] = p1.f[1:3];
  678. Q[1:3,1:3] = -skew(omega);
  679. Q[1:3,4:6] = -skew(v);
  680. Q[4:6,1:3] = [0,0,0;0,0,0;0,0,0];//matrix filled with zeros
  681. Q[4:6,4:6] = -skew(omega);
  682. QI = Q*II;
  683. p1.e = QI*p1.f;implementation_end;
  684. Gravity 776 416
  685. description '<Description>
  686. <Version>4.0</Version>
  687. <IsMainModel>1</IsMainModel>
  688. <KeepParameterValues>False</KeepParameterValues>
  689. <LibraryPath>Bond Graph\Se.emx</LibraryPath>
  690. <TimeStamp>2007-9-25 12:3:26</TimeStamp>
  691. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  692. </Description>';
  693. type Se
  694. ports
  695. power out p [6,1];
  696. restrictions
  697. causality fixed out p;
  698. parameters
  699. real m = 20.0;
  700. end;
  701. icon bg bottom
  702. figures
  703. text 'Se' 776 416 color 0 18 bold;
  704. end;
  705. implementation eq
  706. variables
  707. real effort[6];
  708. equations
  709. effort = [0;0;0;0;0;-9.8*m];
  710. p.e = effort;
  711. implementation_end;
  712. Hij 816 496
  713. description '<Description>
  714. <Version>4.1</Version>
  715. <IsMainModel>1</IsMainModel>
  716. <KeepParameterValues>False</KeepParameterValues>
  717. <LibraryPath>H.emx</LibraryPath>
  718. <TimeStamp>2010-9-21 15:03:50</TimeStamp>
  719. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  720. </Description>';
  721. type Gain
  722. ports
  723. signal in input [4,4];
  724. signal out output [4,4];
  725. signal out Hab [4,4];
  726. parameters
  727. real dim[3,1] = [0.024; 0.0; 0.096];
  728. end;
  729. icon bg bottom
  730. figures
  731. rectangle 800.1 480 831.9 512 color 0 fill 15132390;
  732. text 'H' 816 496 color 16711680 16 bold;
  733. end;
  734. implementation eq
  735. parameters
  736. real baseoffset[3]=[0.143; 0; 0.046]; //coordinates of joint_1
  737. equations
  738. Hab = homogeneous(eye(3),dim+baseoffset);
  739. output = input * Hab;
  740. implementation_end;
  741. InertialTensor 600 184
  742. description '<Description>
  743. <Version>4.0</Version>
  744. <IsMainModel>1</IsMainModel>
  745. <KeepParameterValues>False</KeepParameterValues>
  746. <LibraryPath>Bond Graph\I.emx</LibraryPath>
  747. <TimeStamp>2007-9-25 12:2:12</TimeStamp>
  748. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  749. </Description>';
  750. type I
  751. ports
  752. power in p [6,1];
  753. signal out state [6,1];
  754. restrictions
  755. causality preferred in p;
  756. parameters
  757. real m = 1.0;
  758. real I[3,1] = [20.0; 20.0; 20.0];
  759. end;
  760. icon bg top
  761. figures
  762. text 'I' 600 184 color 0 18 bold;
  763. end;
  764. implementation eq
  765. variables
  766. real II[6,6]; //Inertial tensor
  767. equations
  768. II = [I[1],0, 0, 0, 0, 0;
  769. 0, I[2],0, 0, 0, 0;
  770. 0, 0, I[3],0, 0, 0;
  771. 0, 0, 0, m, 0, 0;
  772. 0, 0, 0, 0, m, 0;
  773. 0, 0, 0, 0, 0, m];
  774. state = int(p.e); //state = generalized momentum
  775. p.f = inverse(II)*state;
  776. implementation_end;
  777. plug Hout 896 496;
  778. plug p1 904 304;
  779. plug Hin 592 496;
  780. plug p 592 304;
  781. Splitter1 664 496
  782. description '<Description><Version>4.0</Version>
  783. <LibraryPath>Signal\Block Diagram\Splitter.emx</LibraryPath>
  784. <TimeStamp>2008-01-17 11:28:29</TimeStamp>
  785. <IsMainModel>1</IsMainModel>
  786. <KeepParameterValues>False</KeepParameterValues>
  787. </Description>';
  788. knot Splitter
  789. ports
  790. signal knot duplicatable out output [4,4];
  791. signal knot in input [4,4];
  792. end;
  793. icon bg ellipse
  794. figures
  795. ellipse 660.8 492.8 667.2 499.2 color -1 fill 0;
  796. ellipse 659.7 491.7 668.3 500.3 color -1;
  797. terminals
  798. input 664 496 fixed;
  799. end;
  800. implementation eq
  801. equations
  802. collect (output) = input;
  803. implementation_end;
  804. Ta00 720 416
  805. description '<Description>
  806. <Version>4.0</Version>
  807. <IsMainModel>1</IsMainModel>
  808. <KeepParameterValues>False</KeepParameterValues>
  809. <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  810. <TimeStamp>2007-9-27 9:51:18</TimeStamp>
  811. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  812. </Description>';
  813. knot OneJunction
  814. ports
  815. power knot duplicatable none p [6,1];
  816. signal knot out flow [6,1];
  817. restrictions
  818. causality constraint one_out p;
  819. end;
  820. icon bg bottom
  821. figures
  822. text '1' 720 416 color 0 18 bold;
  823. end;
  824. implementation eq
  825. equations
  826. sum (direct (p.e)) = 0;
  827. equal (collect (p.f));
  828. flow = first (p.f);
  829. implementation_end;
  830. Ta0j 664 304
  831. description '<Description>
  832. <Version>4.0</Version>
  833. <IsMainModel>1</IsMainModel>
  834. <KeepParameterValues>False</KeepParameterValues>
  835. <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  836. <TimeStamp>2007-9-27 9:51:18</TimeStamp>
  837. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  838. <Description></Description>
  839. </Description>';
  840. knot OneJunction
  841. ports
  842. power knot duplicatable none p [6,1];
  843. signal knot out flow [6,1];
  844. restrictions
  845. causality constraint one_out p;
  846. end;
  847. icon bg bottom
  848. figures
  849. text '1' 664 304 color 0 18 bold;
  850. end;
  851. implementation eq
  852. equations
  853. sum (direct (p.e)) = 0;
  854. equal (collect (p.f));
  855. flow = first (p.f);
  856. implementation_end;
  857. Ta0k 664 184
  858. description '<Description>
  859. <Version>4.0</Version>
  860. <IsMainModel>1</IsMainModel>
  861. <KeepParameterValues>False</KeepParameterValues>
  862. <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  863. <TimeStamp>2007-9-27 9:51:18</TimeStamp>
  864. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  865. <Description></Description>
  866. </Description>';
  867. knot OneJunction
  868. ports
  869. power knot duplicatable none p [6,1];
  870. signal knot out flow [6,1];
  871. restrictions
  872. causality constraint one_out p;
  873. end;
  874. icon bg top
  875. figures
  876. text '1' 664 184 color 0 18 bold;
  877. end;
  878. implementation eq
  879. equations
  880. sum (direct (p.e)) = 0;
  881. equal (collect (p.f));
  882. flow = first (p.f);
  883. implementation_end;
  884. end;
  885. connections
  886. AdHi0\p2 => AdHik1\p2;
  887. AdHik\p2 => Ta0k\p;
  888. Gravity\p => Ta00\p;
  889. Hij\Hab -> AdHij\H;
  890. Hij\output -> Hout;
  891. Hin -> Splitter1\input;
  892. p <= Ta0j\p;
  893. p1 => AdHij\p2;
  894. Splitter1\output -> AdHi0\H;
  895. Splitter1\output -> Hij\input;
  896. Ta00\p => AdHi0\p1;
  897. Ta0j\p <= AdHij\p1;
  898. Ta0j\p <= AdHik1\p1;
  899. Ta0j\p => AdHik\p1;
  900. Ta0k\p => EJS\p1;
  901. Ta0k\p => InertialTensor\p;
  902. end;
  903. parameterrelations
  904. InertialTensor\I = I;
  905. InterialTensor\m = m;
  906. EJS\I = I;
  907. EJS\m = m;
  908. AdHik\COMdim = COMdim;
  909. AdHik1\COMdim = COMdim;
  910. Hij\dim = dim;
  911. Gravity\m=m;parameterrelations_end;
  912. figures
  913. text 'b = current link (body)
  914. a = previous link (body)
  915. i = Body fixed frame, fixed in joint with previous link
  916. j = Body fixed frame, fixed in joint with next link
  917. k = Body fixed frame, principal inertial frame
  918. 0 = inertial system
  919. ' 288 280 color 0;
  920. implementation_end;
  921. Base2 520 512
  922. description '<Information>
  923. <Description>
  924. <Version>4.8</Version>
  925. <IsMainModel>1</IsMainModel>
  926. <KeepParameterValues>False</KeepParameterValues>
  927. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  928. <LibraryPath>Z:\home\wouter\Documents\20-sim\library\Bond Graph\MR\link.emx</LibraryPath>
  929. <TimeStamp>2020-7-16 14:21:54</TimeStamp>
  930. <Description>Base</Description>
  931. </Description>
  932. </Information>';
  933. type Submodel
  934. ports
  935. power out p [6,1];
  936. signal in Hin [4,4];
  937. power in p1 [6,1];
  938. signal out Hout [4,4];
  939. parameters
  940. real I[3,1] = [1.6399999999999998e-6; 4.7e-8; 1.61e-6] {N.m.s};
  941. real m = 0.00455 {kg};
  942. real COMdim[3,1] = [0.0; 0.0325; 0.0] {m};
  943. real dim[3,1] = [0.0; 0.065; 0.0] {m};
  944. end;
  945. icon bg bottom
  946. figures
  947. rectangle 488 472 552 552 color 0 fill 255;
  948. text 'COM' 520 496 color 0;
  949. terminals
  950. p 488 488 fixed;
  951. Hin 488 536 fixed;
  952. p1 552 488 fixed;
  953. Hout 552 536 fixed;
  954. end;
  955. implementation bg
  956. submodels
  957. AdHi0 544 400
  958. description '<Description>
  959. <Version>4.0</Version>
  960. <IsMainModel>1</IsMainModel>
  961. <KeepParameterValues>False</KeepParameterValues>
  962. <LibraryPath>Bond Graph\MTF.emx</LibraryPath>
  963. <TimeStamp>2007-9-25 12:3:3</TimeStamp>
  964. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  965. </Description>';
  966. type MTF
  967. ports
  968. power in p1 [6,1];
  969. power out p2 [6,1];
  970. signal in H [4,4];
  971. restrictions
  972. causality constraint not_equal p1 p2;
  973. end;
  974. icon bg left
  975. figures
  976. text 'MTF' 544 400 color 0 18 bold;
  977. end;
  978. implementation eq
  979. variables
  980. real onlyRotH[4,4];
  981. code
  982. //Only rotations with respect to the inertial system matter!
  983. onlyRotH = H;
  984. onlyRotH[1,4] = 0;
  985. onlyRotH[2,4] = 0;
  986. onlyRotH[3,4] = 0;
  987. p2.e = transpose(Adjoint(onlyRotH)) * p1.e;
  988. p1.f = Adjoint(onlyRotH) * p2.f;
  989. implementation_end;
  990. EJS 616 256
  991. description '<Description>
  992. <Version>4.0</Version>
  993. <IsMainModel>1</IsMainModel>
  994. <KeepParameterValues>False</KeepParameterValues>
  995. <LibraryPath>Bond Graph\MGY.emx</LibraryPath>
  996. <TimeStamp>2007-10-31 11:43:6</TimeStamp>
  997. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  998. </Description>';
  999. type MGY
  1000. ports
  1001. power in p1 [6,1];
  1002. parameters
  1003. real I[3,1] = [20.0; 20.0; 20.0];
  1004. real m = 20.0;
  1005. end;
  1006. icon bg top
  1007. figures
  1008. text 'MGY' 616 256 color 0 18 bold;
  1009. end;
  1010. implementation eq
  1011. //EJS / Gyroscopic effects
  1012. variables
  1013. real II[6,6]; //Inertial tensor
  1014. real Q[6,6];
  1015. real QI[6,6];
  1016. real v[3];
  1017. real omega[3];
  1018. equations
  1019. II = [ I[1],0, 0, 0, 0, 0;
  1020. 0, I[2],0, 0, 0, 0;
  1021. 0, 0, I[3],0, 0, 0;
  1022. 0, 0, 0, m, 0, 0;
  1023. 0, 0, 0, 0, m, 0;
  1024. 0, 0, 0, 0, 0, m];
  1025. v[1:3] = p1.f[4:6];
  1026. omega[1:3] = p1.f[1:3];
  1027. Q[1:3,1:3] = -skew(omega);
  1028. Q[1:3,4:6] = -skew(v);
  1029. Q[4:6,1:3] = [0,0,0;0,0,0;0,0,0];//matrix filled with zeros
  1030. Q[4:6,4:6] = -skew(omega);
  1031. QI = Q*II;
  1032. p1.e = QI*p1.f;implementation_end;
  1033. Gravity 616 400
  1034. description '<Description>
  1035. <Version>4.0</Version>
  1036. <IsMainModel>1</IsMainModel>
  1037. <KeepParameterValues>False</KeepParameterValues>
  1038. <LibraryPath>Bond Graph\Se.emx</LibraryPath>
  1039. <TimeStamp>2007-9-25 12:3:26</TimeStamp>
  1040. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  1041. </Description>';
  1042. type Se
  1043. ports
  1044. power out p [6,1];
  1045. restrictions
  1046. causality fixed out p;
  1047. parameters
  1048. real m = 20.0;
  1049. end;
  1050. icon bg bottom
  1051. figures
  1052. text 'Se' 616 400 color 0 18 bold;
  1053. end;
  1054. implementation eq
  1055. variables
  1056. real effort[6];
  1057. equations
  1058. effort = [0;0;0;0;0;-g_n*m];
  1059. p.e = effort;
  1060. implementation_end;
  1061. InertialTensor 480 256
  1062. description '<Description>
  1063. <Version>4.0</Version>
  1064. <IsMainModel>1</IsMainModel>
  1065. <KeepParameterValues>False</KeepParameterValues>
  1066. <LibraryPath>Bond Graph\I.emx</LibraryPath>
  1067. <TimeStamp>2007-9-25 12:2:12</TimeStamp>
  1068. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  1069. </Description>';
  1070. type I
  1071. ports
  1072. power in p [6,1];
  1073. signal out state [6,1];
  1074. restrictions
  1075. causality preferred in p;
  1076. parameters
  1077. real m = 1.0;
  1078. real I[3,1] = [20.0; 20.0; 20.0];
  1079. end;
  1080. icon bg top
  1081. figures
  1082. text 'I' 480 256 color 0 18 bold;
  1083. end;
  1084. implementation eq
  1085. variables
  1086. real II[6,6]; //Inertial tensor
  1087. equations
  1088. II = [I[1],0, 0, 0, 0, 0;
  1089. 0, I[2],0, 0, 0, 0;
  1090. 0, 0, I[3],0, 0, 0;
  1091. 0, 0, 0, m, 0, 0;
  1092. 0, 0, 0, 0, m, 0;
  1093. 0, 0, 0, 0, 0, m];
  1094. state = int(p.e); //state = generalized momentum
  1095. p.f = inverse(II)*state;
  1096. implementation_end;
  1097. plug Hin 472 496;
  1098. plug p1 752 304;
  1099. plug Hout 768 496;
  1100. plug p 472 304;
  1101. Splitter1 544 496
  1102. description '<Description><Version>4.0</Version>
  1103. <LibraryPath>Signal\Block Diagram\Splitter.emx</LibraryPath>
  1104. <TimeStamp>2008-01-17 11:28:29</TimeStamp>
  1105. <IsMainModel>1</IsMainModel>
  1106. <KeepParameterValues>False</KeepParameterValues>
  1107. </Description>';
  1108. knot Splitter
  1109. ports
  1110. signal knot duplicatable out output [4,4];
  1111. signal knot in input [4,4];
  1112. end;
  1113. icon bg ellipse
  1114. figures
  1115. ellipse 540.8 492.8 547.2 499.2 color -1 fill 0;
  1116. ellipse 539.7 491.7 548.3 500.3 color -1;
  1117. terminals
  1118. input 544 496 fixed;
  1119. end;
  1120. implementation eq
  1121. equations
  1122. collect (output) = input;
  1123. implementation_end;
  1124. Ta0j 544 304
  1125. description '<Description>
  1126. <Version>4.0</Version>
  1127. <IsMainModel>1</IsMainModel>
  1128. <KeepParameterValues>False</KeepParameterValues>
  1129. <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  1130. <TimeStamp>2007-9-27 9:51:18</TimeStamp>
  1131. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  1132. <Description></Description>
  1133. </Description>';
  1134. knot OneJunction
  1135. ports
  1136. power knot duplicatable none p [6,1];
  1137. signal knot out flow [6,1];
  1138. restrictions
  1139. causality constraint one_out p;
  1140. end;
  1141. icon bg bottom
  1142. figures
  1143. text '1' 544 304 color 0 18 bold;
  1144. end;
  1145. implementation eq
  1146. equations
  1147. sum (direct (p.e)) = 0;
  1148. equal (collect (p.f));
  1149. flow = first (p.f);
  1150. implementation_end;
  1151. Ta0k 544 256
  1152. description '<Description>
  1153. <Version>4.0</Version>
  1154. <IsMainModel>1</IsMainModel>
  1155. <KeepParameterValues>False</KeepParameterValues>
  1156. <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  1157. <TimeStamp>2007-9-27 9:51:18</TimeStamp>
  1158. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  1159. <Description></Description>
  1160. </Description>';
  1161. knot OneJunction
  1162. ports
  1163. power knot duplicatable none p [6,1];
  1164. signal knot out flow [6,1];
  1165. restrictions
  1166. causality constraint one_out p;
  1167. end;
  1168. icon bg top
  1169. figures
  1170. text '1' 544 256 color 0 18 bold;
  1171. end;
  1172. implementation eq
  1173. equations
  1174. sum (direct (p.e)) = 0;
  1175. equal (collect (p.f));
  1176. flow = first (p.f);
  1177. implementation_end;
  1178. end;
  1179. connections
  1180. AdHi0\p2 => Ta0j\p;
  1181. Gravity\p => AdHi0\p1;
  1182. Hin -> Splitter1\input;
  1183. p <= Ta0j\p;
  1184. p1 => Ta0j\p;
  1185. Splitter1\output -> AdHi0\H;
  1186. Splitter1\output -> Hout;
  1187. Ta0j\p => Ta0k\p;
  1188. Ta0k\p => EJS\p1;
  1189. Ta0k\p => InertialTensor\p;
  1190. end;
  1191. parameterrelations
  1192. InertialTensor\I = I;
  1193. InterialTensor\m = m;
  1194. EJS\I = I;
  1195. EJS\m = m;
  1196. AdHik\COMdim = COMdim;
  1197. AdHik1\COMdim = COMdim;
  1198. Hij\dim = dim;
  1199. Gravity\m=m;parameterrelations_end;
  1200. figures
  1201. text 'b = current link (body)
  1202. a = previous link (body)
  1203. i = Body fixed frame, fixed in joint with previous link
  1204. j = Body fixed frame, fixed in joint with next link
  1205. k = Body fixed frame, principal inertial frame
  1206. 0 = inertial system
  1207. ' 288 280 color 0;
  1208. implementation_end;
  1209. Base3 1024 512
  1210. description '<Information>
  1211. <Description>
  1212. <Version>4.8</Version>
  1213. <IsMainModel>1</IsMainModel>
  1214. <KeepParameterValues>False</KeepParameterValues>
  1215. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  1216. <LibraryPath>Bond Graph\MR\center_of_mass.emx</LibraryPath>
  1217. <TimeStamp>2020-7-17 13:52:18</TimeStamp>
  1218. <Description>Base</Description>
  1219. </Description>
  1220. </Information>';
  1221. type Submodel
  1222. ports
  1223. power out p [6,1];
  1224. signal in Hin [4,4];
  1225. power in p1 [6,1];
  1226. signal out Hout [4,4];
  1227. parameters
  1228. real I[3,1] = [1.6399999999999998e-6; 4.7e-8; 1.61e-6] {N.m.s};
  1229. real m = 0.00455 {kg};
  1230. real COMdim[3,1] = [0.0; 0.0325; 0.0] {m};
  1231. real dim[3,1] = [0.0; 0.065; 0.0] {m};
  1232. end;
  1233. icon bg bottom
  1234. figures
  1235. rectangle 992 472 1056 552 color 0 fill 255;
  1236. text 'COM' 1024 496 color 0;
  1237. terminals
  1238. p 992 488 fixed;
  1239. Hin 992 536 fixed;
  1240. p1 1056 488 fixed;
  1241. Hout 1056 536 fixed;
  1242. end;
  1243. implementation bg
  1244. submodels
  1245. AdHi0 544 400
  1246. description '<Description>
  1247. <Version>4.0</Version>
  1248. <IsMainModel>1</IsMainModel>
  1249. <KeepParameterValues>False</KeepParameterValues>
  1250. <LibraryPath>Bond Graph\MTF.emx</LibraryPath>
  1251. <TimeStamp>2007-9-25 12:3:3</TimeStamp>
  1252. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  1253. </Description>';
  1254. type MTF
  1255. ports
  1256. power in p1 [6,1];
  1257. power out p2 [6,1];
  1258. signal in H [4,4];
  1259. restrictions
  1260. causality constraint not_equal p1 p2;
  1261. end;
  1262. icon bg left
  1263. figures
  1264. text 'MTF' 544 400 color 0 18 bold;
  1265. end;
  1266. implementation eq
  1267. variables
  1268. real onlyRotH[4,4];
  1269. code
  1270. //Only rotations with respect to the inertial system matter!
  1271. onlyRotH = H;
  1272. onlyRotH[1,4] = 0;
  1273. onlyRotH[2,4] = 0;
  1274. onlyRotH[3,4] = 0;
  1275. p2.e = transpose(Adjoint(onlyRotH)) * p1.e;
  1276. p1.f = Adjoint(onlyRotH) * p2.f;
  1277. implementation_end;
  1278. EJS 616 256
  1279. description '<Description>
  1280. <Version>4.0</Version>
  1281. <IsMainModel>1</IsMainModel>
  1282. <KeepParameterValues>False</KeepParameterValues>
  1283. <LibraryPath>Bond Graph\MGY.emx</LibraryPath>
  1284. <TimeStamp>2007-10-31 11:43:6</TimeStamp>
  1285. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  1286. </Description>';
  1287. type MGY
  1288. ports
  1289. power in p1 [6,1];
  1290. parameters
  1291. real I[3,1] = [20.0; 20.0; 20.0];
  1292. real m = 20.0;
  1293. end;
  1294. icon bg top
  1295. figures
  1296. text 'MGY' 616 256 color 0 18 bold;
  1297. end;
  1298. implementation eq
  1299. //EJS / Gyroscopic effects
  1300. variables
  1301. real II[6,6]; //Inertial tensor
  1302. real Q[6,6];
  1303. real QI[6,6];
  1304. real Ia[6];
  1305. initialequations
  1306. Ia[1:3] = I;
  1307. Ia[4:6] = m;
  1308. II = diag(Ia);
  1309. equations
  1310. Q = transpose(adjoint(p1.f));
  1311. QI = Q*II;
  1312. p1.e = QI*p1.f;implementation_end;
  1313. Gravity 616 400
  1314. description '<Description>
  1315. <Version>4.0</Version>
  1316. <IsMainModel>1</IsMainModel>
  1317. <KeepParameterValues>False</KeepParameterValues>
  1318. <LibraryPath>Bond Graph\Se.emx</LibraryPath>
  1319. <TimeStamp>2007-9-25 12:3:26</TimeStamp>
  1320. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  1321. </Description>';
  1322. type Se
  1323. ports
  1324. power out p [6,1];
  1325. restrictions
  1326. causality fixed out p;
  1327. parameters
  1328. real m = 20.0;
  1329. end;
  1330. icon bg bottom
  1331. figures
  1332. text 'Se' 616 400 color 0 18 bold;
  1333. end;
  1334. implementation eq
  1335. variables
  1336. real effort[6];
  1337. equations
  1338. effort = [0;0;0;0;0;-g_n*m];
  1339. p.e = effort;
  1340. implementation_end;
  1341. InertialTensor 480 256
  1342. description '<Description>
  1343. <Version>4.0</Version>
  1344. <IsMainModel>1</IsMainModel>
  1345. <KeepParameterValues>False</KeepParameterValues>
  1346. <LibraryPath>Bond Graph\I.emx</LibraryPath>
  1347. <TimeStamp>2007-9-25 12:2:12</TimeStamp>
  1348. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  1349. </Description>';
  1350. type I
  1351. ports
  1352. power in p [6,1];
  1353. signal out state [6,1];
  1354. restrictions
  1355. causality preferred in p;
  1356. parameters
  1357. real m = 1.0;
  1358. real I[3,1] = [20.0; 20.0; 20.0];
  1359. end;
  1360. icon bg top
  1361. figures
  1362. text 'I' 480 256 color 0 18 bold;
  1363. end;
  1364. implementation eq
  1365. variables
  1366. real II[6,6]; //Inertial tensor
  1367. equations
  1368. II = [I[1],0, 0, 0, 0, 0;
  1369. 0, I[2],0, 0, 0, 0;
  1370. 0, 0, I[3],0, 0, 0;
  1371. 0, 0, 0, m, 0, 0;
  1372. 0, 0, 0, 0, m, 0;
  1373. 0, 0, 0, 0, 0, m];
  1374. state = int(p.e); //state = generalized momentum
  1375. p.f = inverse(II)*state;
  1376. implementation_end;
  1377. plug Hin 472 496;
  1378. plug p1 752 304;
  1379. plug Hout 768 496;
  1380. plug p 472 304;
  1381. Splitter1 544 496
  1382. description '<Description><Version>4.0</Version>
  1383. <LibraryPath>Signal\Block Diagram\Splitter.emx</LibraryPath>
  1384. <TimeStamp>2008-01-17 11:28:29</TimeStamp>
  1385. <IsMainModel>1</IsMainModel>
  1386. <KeepParameterValues>False</KeepParameterValues>
  1387. </Description>';
  1388. knot Splitter
  1389. ports
  1390. signal knot duplicatable out output [4,4];
  1391. signal knot in input [4,4];
  1392. end;
  1393. icon bg ellipse
  1394. figures
  1395. ellipse 540.8 492.8 547.2 499.2 color -1 fill 0;
  1396. ellipse 539.7 491.7 548.3 500.3 color -1;
  1397. terminals
  1398. input 544 496 fixed;
  1399. end;
  1400. implementation eq
  1401. equations
  1402. collect (output) = input;
  1403. implementation_end;
  1404. Ta0j 544 304
  1405. description '<Description>
  1406. <Version>4.0</Version>
  1407. <IsMainModel>1</IsMainModel>
  1408. <KeepParameterValues>False</KeepParameterValues>
  1409. <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  1410. <TimeStamp>2007-9-27 9:51:18</TimeStamp>
  1411. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  1412. <Description></Description>
  1413. </Description>';
  1414. knot OneJunction
  1415. ports
  1416. power knot duplicatable none p [6,1];
  1417. signal knot out flow [6,1];
  1418. restrictions
  1419. causality constraint one_out p;
  1420. end;
  1421. icon bg bottom
  1422. figures
  1423. text '1' 544 304 color 0 18 bold;
  1424. end;
  1425. implementation eq
  1426. equations
  1427. sum (direct (p.e)) = 0;
  1428. equal (collect (p.f));
  1429. flow = first (p.f);
  1430. implementation_end;
  1431. Ta0k 544 256
  1432. description '<Description>
  1433. <Version>4.0</Version>
  1434. <IsMainModel>1</IsMainModel>
  1435. <KeepParameterValues>False</KeepParameterValues>
  1436. <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  1437. <TimeStamp>2007-9-27 9:51:18</TimeStamp>
  1438. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  1439. <Description></Description>
  1440. </Description>';
  1441. knot OneJunction
  1442. ports
  1443. power knot duplicatable none p [6,1];
  1444. signal knot out flow [6,1];
  1445. restrictions
  1446. causality constraint one_out p;
  1447. end;
  1448. icon bg top
  1449. figures
  1450. text '1' 544 256 color 0 18 bold;
  1451. end;
  1452. implementation eq
  1453. equations
  1454. sum (direct (p.e)) = 0;
  1455. equal (collect (p.f));
  1456. flow = first (p.f);
  1457. implementation_end;
  1458. end;
  1459. connections
  1460. AdHi0\p2 => Ta0j\p;
  1461. Gravity\p => AdHi0\p1;
  1462. Hin -> Splitter1\input;
  1463. p <= Ta0j\p;
  1464. p1 => Ta0j\p;
  1465. Splitter1\output -> AdHi0\H;
  1466. Splitter1\output -> Hout;
  1467. Ta0j\p => Ta0k\p;
  1468. Ta0k\p => EJS\p1;
  1469. Ta0k\p => InertialTensor\p;
  1470. end;
  1471. parameterrelations
  1472. InertialTensor\I = I;
  1473. InterialTensor\m = m;
  1474. EJS\I = I;
  1475. EJS\m = m;
  1476. AdHik\COMdim = COMdim;
  1477. AdHik1\COMdim = COMdim;
  1478. Hij\dim = dim;
  1479. Gravity\m=m;parameterrelations_end;
  1480. figures
  1481. text 'b = current link (body)
  1482. a = previous link (body)
  1483. i = Body fixed frame, fixed in joint with previous link
  1484. j = Body fixed frame, fixed in joint with next link
  1485. k = Body fixed frame, principal inertial frame
  1486. 0 = inertial system
  1487. ' 288 280 color 0;
  1488. implementation_end;
  1489. Base4 1432 512
  1490. description '<Information>
  1491. <Description>
  1492. <Version>4.8</Version>
  1493. <IsMainModel>1</IsMainModel>
  1494. <KeepParameterValues>False</KeepParameterValues>
  1495. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  1496. <LibraryPath>Z:\home\wouter\Documents\20-sim\library\Bond Graph\MR\link.emx</LibraryPath>
  1497. <TimeStamp>2020-7-16 14:21:54</TimeStamp>
  1498. <Description>Base</Description>
  1499. </Description>
  1500. </Information>';
  1501. type Submodel
  1502. ports
  1503. power out p [6,1];
  1504. signal in Hin [4,4];
  1505. power in p1 [6,1];
  1506. signal out Hout [4,4];
  1507. parameters
  1508. real I[3,1] = [1.6399999999999998e-6; 4.7e-8; 1.61e-6] {N.m.s};
  1509. real m = 0.00455 {kg};
  1510. real COMdim[3,1] = [0.0; 0.0325; 0.0] {m};
  1511. real dim[3,1] = [0.0; 0.065; 0.0] {m};
  1512. end;
  1513. icon bg bottom
  1514. figures
  1515. rectangle 1400 472 1464 552 color 0 fill 255;
  1516. text 'COM' 1432 496 color 0;
  1517. terminals
  1518. p 1400 488 fixed;
  1519. Hin 1400 536 fixed;
  1520. p1 1464 488 fixed;
  1521. Hout 1464 536 fixed;
  1522. end;
  1523. implementation bg
  1524. submodels
  1525. AdHi0 544 400
  1526. description '<Description>
  1527. <Version>4.0</Version>
  1528. <IsMainModel>1</IsMainModel>
  1529. <KeepParameterValues>False</KeepParameterValues>
  1530. <LibraryPath>Bond Graph\MTF.emx</LibraryPath>
  1531. <TimeStamp>2007-9-25 12:3:3</TimeStamp>
  1532. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  1533. </Description>';
  1534. type MTF
  1535. ports
  1536. power in p1 [6,1];
  1537. power out p2 [6,1];
  1538. signal in H [4,4];
  1539. restrictions
  1540. causality constraint not_equal p1 p2;
  1541. end;
  1542. icon bg left
  1543. figures
  1544. text 'MTF' 544 400 color 0 18 bold;
  1545. end;
  1546. implementation eq
  1547. variables
  1548. real onlyRotH[4,4];
  1549. code
  1550. //Only rotations with respect to the inertial system matter!
  1551. onlyRotH = H;
  1552. onlyRotH[1,4] = 0;
  1553. onlyRotH[2,4] = 0;
  1554. onlyRotH[3,4] = 0;
  1555. p2.e = transpose(Adjoint(onlyRotH)) * p1.e;
  1556. p1.f = Adjoint(onlyRotH) * p2.f;
  1557. implementation_end;
  1558. EJS 616 256
  1559. description '<Description>
  1560. <Version>4.0</Version>
  1561. <IsMainModel>1</IsMainModel>
  1562. <KeepParameterValues>False</KeepParameterValues>
  1563. <LibraryPath>Bond Graph\MGY.emx</LibraryPath>
  1564. <TimeStamp>2007-10-31 11:43:6</TimeStamp>
  1565. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  1566. </Description>';
  1567. type MGY
  1568. ports
  1569. power in p1 [6,1];
  1570. parameters
  1571. real I[3,1] = [20.0; 20.0; 20.0];
  1572. real m = 20.0;
  1573. end;
  1574. icon bg top
  1575. figures
  1576. text 'MGY' 616 256 color 0 18 bold;
  1577. end;
  1578. implementation eq
  1579. //EJS / Gyroscopic effects
  1580. variables
  1581. real II[6,6]; //Inertial tensor
  1582. real Q[6,6];
  1583. real QI[6,6];
  1584. real v[3];
  1585. real omega[3];
  1586. equations
  1587. II = [ I[1],0, 0, 0, 0, 0;
  1588. 0, I[2],0, 0, 0, 0;
  1589. 0, 0, I[3],0, 0, 0;
  1590. 0, 0, 0, m, 0, 0;
  1591. 0, 0, 0, 0, m, 0;
  1592. 0, 0, 0, 0, 0, m];
  1593. v[1:3] = p1.f[4:6];
  1594. omega[1:3] = p1.f[1:3];
  1595. Q[1:3,1:3] = -skew(omega);
  1596. Q[1:3,4:6] = -skew(v);
  1597. Q[4:6,1:3] = [0,0,0;0,0,0;0,0,0];//matrix filled with zeros
  1598. Q[4:6,4:6] = -skew(omega);
  1599. QI = Q*II;
  1600. p1.e = QI*p1.f;implementation_end;
  1601. Gravity 616 400
  1602. description '<Description>
  1603. <Version>4.0</Version>
  1604. <IsMainModel>1</IsMainModel>
  1605. <KeepParameterValues>False</KeepParameterValues>
  1606. <LibraryPath>Bond Graph\Se.emx</LibraryPath>
  1607. <TimeStamp>2007-9-25 12:3:26</TimeStamp>
  1608. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  1609. </Description>';
  1610. type Se
  1611. ports
  1612. power out p [6,1];
  1613. restrictions
  1614. causality fixed out p;
  1615. parameters
  1616. real m = 20.0;
  1617. end;
  1618. icon bg bottom
  1619. figures
  1620. text 'Se' 616 400 color 0 18 bold;
  1621. end;
  1622. implementation eq
  1623. variables
  1624. real effort[6];
  1625. equations
  1626. effort = [0;0;0;0;0;-g_n*m];
  1627. p.e = effort;
  1628. implementation_end;
  1629. InertialTensor 480 256
  1630. description '<Description>
  1631. <Version>4.0</Version>
  1632. <IsMainModel>1</IsMainModel>
  1633. <KeepParameterValues>False</KeepParameterValues>
  1634. <LibraryPath>Bond Graph\I.emx</LibraryPath>
  1635. <TimeStamp>2007-9-25 12:2:12</TimeStamp>
  1636. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  1637. </Description>';
  1638. type I
  1639. ports
  1640. power in p [6,1];
  1641. signal out state [6,1];
  1642. restrictions
  1643. causality preferred in p;
  1644. parameters
  1645. real m = 1.0;
  1646. real I[3,1] = [20.0; 20.0; 20.0];
  1647. end;
  1648. icon bg top
  1649. figures
  1650. text 'I' 480 256 color 0 18 bold;
  1651. end;
  1652. implementation eq
  1653. variables
  1654. real II[6,6]; //Inertial tensor
  1655. equations
  1656. II = [I[1],0, 0, 0, 0, 0;
  1657. 0, I[2],0, 0, 0, 0;
  1658. 0, 0, I[3],0, 0, 0;
  1659. 0, 0, 0, m, 0, 0;
  1660. 0, 0, 0, 0, m, 0;
  1661. 0, 0, 0, 0, 0, m];
  1662. state = int(p.e); //state = generalized momentum
  1663. p.f = inverse(II)*state;
  1664. implementation_end;
  1665. plug Hin 472 496;
  1666. plug p1 752 304;
  1667. plug Hout 768 496;
  1668. plug p 472 304;
  1669. Splitter1 544 496
  1670. description '<Description><Version>4.0</Version>
  1671. <LibraryPath>Signal\Block Diagram\Splitter.emx</LibraryPath>
  1672. <TimeStamp>2008-01-17 11:28:29</TimeStamp>
  1673. <IsMainModel>1</IsMainModel>
  1674. <KeepParameterValues>False</KeepParameterValues>
  1675. </Description>';
  1676. knot Splitter
  1677. ports
  1678. signal knot duplicatable out output [4,4];
  1679. signal knot in input [4,4];
  1680. end;
  1681. icon bg ellipse
  1682. figures
  1683. ellipse 540.8 492.8 547.2 499.2 color -1 fill 0;
  1684. ellipse 539.7 491.7 548.3 500.3 color -1;
  1685. terminals
  1686. input 544 496 fixed;
  1687. end;
  1688. implementation eq
  1689. equations
  1690. collect (output) = input;
  1691. implementation_end;
  1692. Ta0j 544 304
  1693. description '<Description>
  1694. <Version>4.0</Version>
  1695. <IsMainModel>1</IsMainModel>
  1696. <KeepParameterValues>False</KeepParameterValues>
  1697. <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  1698. <TimeStamp>2007-9-27 9:51:18</TimeStamp>
  1699. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  1700. <Description></Description>
  1701. </Description>';
  1702. knot OneJunction
  1703. ports
  1704. power knot duplicatable none p [6,1];
  1705. signal knot out flow [6,1];
  1706. restrictions
  1707. causality constraint one_out p;
  1708. end;
  1709. icon bg bottom
  1710. figures
  1711. text '1' 544 304 color 0 18 bold;
  1712. end;
  1713. implementation eq
  1714. equations
  1715. sum (direct (p.e)) = 0;
  1716. equal (collect (p.f));
  1717. flow = first (p.f);
  1718. implementation_end;
  1719. Ta0k 544 256
  1720. description '<Description>
  1721. <Version>4.0</Version>
  1722. <IsMainModel>1</IsMainModel>
  1723. <KeepParameterValues>False</KeepParameterValues>
  1724. <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  1725. <TimeStamp>2007-9-27 9:51:18</TimeStamp>
  1726. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  1727. <Description></Description>
  1728. </Description>';
  1729. knot OneJunction
  1730. ports
  1731. power knot duplicatable none p [6,1];
  1732. signal knot out flow [6,1];
  1733. restrictions
  1734. causality constraint one_out p;
  1735. end;
  1736. icon bg top
  1737. figures
  1738. text '1' 544 256 color 0 18 bold;
  1739. end;
  1740. implementation eq
  1741. equations
  1742. sum (direct (p.e)) = 0;
  1743. equal (collect (p.f));
  1744. flow = first (p.f);
  1745. implementation_end;
  1746. end;
  1747. connections
  1748. AdHi0\p2 => Ta0j\p;
  1749. Gravity\p => AdHi0\p1;
  1750. Hin -> Splitter1\input;
  1751. p <= Ta0j\p;
  1752. p1 => Ta0j\p;
  1753. Splitter1\output -> AdHi0\H;
  1754. Splitter1\output -> Hout;
  1755. Ta0j\p => Ta0k\p;
  1756. Ta0k\p => EJS\p1;
  1757. Ta0k\p => InertialTensor\p;
  1758. end;
  1759. parameterrelations
  1760. InertialTensor\I = I;
  1761. InterialTensor\m = m;
  1762. EJS\I = I;
  1763. EJS\m = m;
  1764. AdHik\COMdim = COMdim;
  1765. AdHik1\COMdim = COMdim;
  1766. Hij\dim = dim;
  1767. Gravity\m=m;parameterrelations_end;
  1768. figures
  1769. text 'b = current link (body)
  1770. a = previous link (body)
  1771. i = Body fixed frame, fixed in joint with previous link
  1772. j = Body fixed frame, fixed in joint with next link
  1773. k = Body fixed frame, principal inertial frame
  1774. 0 = inertial system
  1775. ' 288 280 color 0;
  1776. implementation_end;
  1777. Constant 168 336
  1778. description '<Description>
  1779. <Version>4.0</Version>
  1780. <IsMainModel>1</IsMainModel>
  1781. <KeepParameterValues>False</KeepParameterValues>
  1782. <LibraryPath>Signal\Sources\Constant.emx</LibraryPath>
  1783. <TimeStamp>2007-10-19 14:48:44</TimeStamp>
  1784. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  1785. </Description>';
  1786. type Constant
  1787. ports
  1788. signal out output [4,4];
  1789. end;
  1790. icon bg bottom
  1791. figures
  1792. rectangle 152.1 320 183.9 352 color 0 fill 15132390;
  1793. line 156.9 331.6 178.9 331.6 color 16711680 width 2;
  1794. line 154.2 342.7 179.9 342.7 color 0;
  1795. line 156.5 326.7 156.5 345 color 0;
  1796. end;
  1797. implementation eq
  1798. equations
  1799. output = eye(4);
  1800. implementation_end;
  1801. Constant1 296 48
  1802. description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
  1803. <LibraryPath>Signal\Sources\Constant.emx</LibraryPath>
  1804. <TimeStamp>2007-10-19 14:48:44</TimeStamp>
  1805. </Description>';
  1806. type Constant
  1807. ports
  1808. signal out output;
  1809. end;
  1810. icon bg bottom
  1811. figures
  1812. rectangle 280.1 32 311.9 64 color 0 fill 15132390;
  1813. line 284.9 43.6 306.9 43.6 color 16711680 width 2;
  1814. line 282.2 54.7 307.9 54.7 color 0;
  1815. line 284.5 38.7 284.5 57 color 0;
  1816. end;
  1817. implementation eq
  1818. parameters
  1819. real C = 1.0; // output value
  1820. equations
  1821. output = C;
  1822. implementation_end;
  1823. Joint 1224.1 510
  1824. description '<Information>
  1825. <Description>
  1826. <Version>4.8</Version>
  1827. <IsMainModel>1</IsMainModel>
  1828. <KeepParameterValues>False</KeepParameterValues>
  1829. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  1830. <LibraryPath>Bond Graph\MR\joint-v2.emx</LibraryPath>
  1831. <TimeStamp>2020-7-17 13:36:30</TimeStamp>
  1832. </Description>
  1833. </Information>';
  1834. type 'Submodel-rotz'
  1835. ports
  1836. power out p [6,1];
  1837. power in p1;
  1838. power in p2 [6,1];
  1839. signal in Hin [4,4];
  1840. signal out Hout [4,4];
  1841. parameters
  1842. real Rendstop = 1000.0;
  1843. real Cendstop = 1.0e-4;
  1844. real InitialPos = -2.9496;
  1845. real MinEndstopPos = -2.95;
  1846. real MaxEndstopPos = 2.95;
  1847. real Rconstraint = 1000.0;
  1848. real Cconstraint = 1.0e-4;
  1849. real Rjoint = 0.1;
  1850. end;
  1851. icon bg bottom
  1852. figures
  1853. rectangle 1192.2 472 1256 548 color 0 fill 14745599;
  1854. text 'Joint' 1224 504 color 0;
  1855. terminals
  1856. p 1192 488 fixed;
  1857. p1 1224 472 fixed;
  1858. p2 1256 488 fixed;
  1859. Hin 1192 536 fixed;
  1860. Hout 1256 536 fixed;
  1861. end;
  1862. implementation bg
  1863. submodels
  1864. AdHji 424 424
  1865. description '<Description>
  1866. <Version>4.0</Version>
  1867. <IsMainModel>1</IsMainModel>
  1868. <KeepParameterValues>False</KeepParameterValues>
  1869. <LibraryPath>Bond Graph\MTF.emx</LibraryPath>
  1870. <TimeStamp>2007-9-25 12:3:3</TimeStamp>
  1871. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  1872. </Description>';
  1873. type MTF
  1874. ports
  1875. power out p1 [6,1];
  1876. power in p2 [6,1];
  1877. signal in H [4,4];
  1878. restrictions
  1879. causality constraint not_equal p1 p2;
  1880. end;
  1881. icon bg bottom
  1882. figures
  1883. text 'MTF' 424 424 color 0 18 bold;
  1884. end;
  1885. implementation eq
  1886. equations
  1887. p2.e = transpose(Adjoint(H)) * p1.e;
  1888. p1.f = Adjoint(H) * p2.f;implementation_end;
  1889. EndstopMax 352 216
  1890. description '<Description>
  1891. <Version>4.1</Version>
  1892. <IsMainModel>1</IsMainModel>
  1893. <KeepParameterValues>False</KeepParameterValues>
  1894. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  1895. <LibraryPath>EndstopMax.emx</LibraryPath>
  1896. <TimeStamp>2011-1-18 16:54:54</TimeStamp>
  1897. </Description>';
  1898. type Submodel
  1899. ports
  1900. power out p2;
  1901. signal boolean out collision;
  1902. parameters
  1903. real Rendstop = 1000.0;
  1904. real Cendstop = 1.0e-4;
  1905. real InitialPos = -2.9496;
  1906. real EndstopPos = 2.95;
  1907. end;
  1908. icon bg bottom
  1909. figures
  1910. rectangle 303 193 401 239 color 0 fill 14013909;
  1911. text 'EndstopMax' 353 215 color 0 16;
  1912. end;
  1913. implementation bg
  1914. submodels
  1915. Cendstop 704 144
  1916. description '<Description>
  1917. <Version>4.0</Version>
  1918. <IsMainModel>1</IsMainModel>
  1919. <KeepParameterValues>False</KeepParameterValues>
  1920. <LibraryPath>Bond Graph\C.emx</LibraryPath>
  1921. <TimeStamp>2007-10-31 10:43:59</TimeStamp>
  1922. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  1923. </Description>';
  1924. type C
  1925. ports
  1926. power in p;
  1927. signal out state;
  1928. restrictions
  1929. causality preferred out p;
  1930. parameters
  1931. real Cendstop = 1.0e-4;
  1932. end;
  1933. icon bg right
  1934. figures
  1935. text 'C' 704 144 color 0 18 bold;
  1936. end;
  1937. implementation eq
  1938. equations
  1939. state = int(p.f);
  1940. p.e = state / Cendstop;
  1941. implementation_end;
  1942. Collision 704 216
  1943. description '<Description>
  1944. <Version>No Version Info</Version>
  1945. <IsMainModel>0</IsMainModel>
  1946. <KeepParameterValues>False</KeepParameterValues>
  1947. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  1948. </Description>';
  1949. type X0e
  1950. ports
  1951. power in p1;
  1952. power out p2;
  1953. power out p12;
  1954. signal boolean out Collision;
  1955. restrictions
  1956. causality fixed out p2;
  1957. causality fixed out p1;
  1958. causality fixed in p12;
  1959. parameters
  1960. real InitialPos = -2.9496;
  1961. real EndstopPos = 2.95;
  1962. end;
  1963. icon bg
  1964. figures
  1965. text 'X0e' 704 216 color 0 18 bold;
  1966. end;
  1967. implementation bg
  1968. submodels
  1969. Condition1 224.9 231.5
  1970. type Condition
  1971. ports
  1972. signal in dx;
  1973. signal boolean out contact;
  1974. end;
  1975. icon bg
  1976. figures
  1977. rectangle 197.2 215 252.6 248 color 0 fill 15132390;
  1978. text 'Condition' 224 231.5 color 0;
  1979. terminals
  1980. dx 224 248 fixed;
  1981. contact 224 215 fixed;
  1982. end;
  1983. implementation eq
  1984. parameters
  1985. real global epsilon;
  1986. variables
  1987. boolean bounce;
  1988. equations
  1989. contact = if dx - epsilon < 0 then true else false end;
  1990. bounce = event (dx - epsilon);implementation_end;
  1991. plug p1 96 176;
  1992. plug p2 352 176;
  1993. plug p12 224 64;
  1994. plug Collision 408 192;
  1995. Splitter1 224 200
  1996. description '<Description><Version>4.0</Version>
  1997. <LibraryPath>C:\Program Files\20-sim 4.0\System\SplitterBoolean.emx</LibraryPath>
  1998. <TimeStamp>2007-10-31 11:27:48</TimeStamp>
  1999. <IsMainModel>1</IsMainModel>
  2000. <KeepParameterValues>False</KeepParameterValues>
  2001. </Description>';
  2002. knot Splitter
  2003. ports
  2004. signal knot boolean duplicatable out output [1];
  2005. signal knot boolean in input [1];
  2006. end;
  2007. icon bg ellipse
  2008. figures
  2009. ellipse 220.8 196.8 227.2 203.2 color -1 fill 0;
  2010. ellipse 219.7 195.7 228.3 204.3 color -1;
  2011. terminals
  2012. input 224 200 fixed;
  2013. end;
  2014. implementation eq
  2015. equations
  2016. collect (output) = input;
  2017. implementation_end;
  2018. v1 160 176
  2019. description '<Description>
  2020. <IsMainModel>0</IsMainModel>
  2021. <KeepParameterValues>False</KeepParameterValues>
  2022. </Description>';
  2023. knot OneJunction
  2024. ports
  2025. mechanical knot duplicatable none p [1];
  2026. signal knot out flow [1];
  2027. restrictions
  2028. causality constraint one_out p;
  2029. end;
  2030. icon bg top
  2031. figures
  2032. text '1' 160 176 color 0 18 bold;
  2033. end;
  2034. implementation eq
  2035. equations
  2036. sum (direct (p.e)) = 0;
  2037. equal (collect (p.f));
  2038. flow = first (p.f);
  2039. implementation_end;
  2040. v12 224 120
  2041. description '<Description>
  2042. <IsMainModel>0</IsMainModel>
  2043. <KeepParameterValues>False</KeepParameterValues>
  2044. </Description>';
  2045. knot OneJunction
  2046. ports
  2047. mechanical knot duplicatable none p [1];
  2048. signal knot out flow [1];
  2049. restrictions
  2050. causality constraint one_out p;
  2051. end;
  2052. icon bg right
  2053. figures
  2054. text '1' 224 120 color 0 18 bold;
  2055. end;
  2056. implementation eq
  2057. equations
  2058. sum (direct (p.e)) = 0;
  2059. equal (collect (p.f));
  2060. flow = first (p.f);
  2061. implementation_end;
  2062. v2 296 176
  2063. description '<Description>
  2064. <IsMainModel>0</IsMainModel>
  2065. <KeepParameterValues>False</KeepParameterValues>
  2066. </Description>';
  2067. knot OneJunction
  2068. ports
  2069. mechanical knot duplicatable none p [1];
  2070. signal knot out flow [1];
  2071. restrictions
  2072. causality constraint one_out p;
  2073. end;
  2074. icon bg top
  2075. figures
  2076. text '1' 296 176 color 0 18 bold;
  2077. end;
  2078. implementation eq
  2079. equations
  2080. sum (direct (p.e)) = 0;
  2081. equal (collect (p.f));
  2082. flow = first (p.f);
  2083. implementation_end;
  2084. X0 224 176
  2085. description '<Description>
  2086. <IsMainModel>0</IsMainModel>
  2087. <KeepParameterValues>False</KeepParameterValues>
  2088. </Description>';
  2089. type X0
  2090. ports
  2091. mechanical in p1;
  2092. mechanical out p2;
  2093. mechanical out p12;
  2094. signal boolean in condition;
  2095. restrictions
  2096. causality fixed out p1;
  2097. causality fixed out p2;
  2098. causality fixed in p12;
  2099. end;
  2100. icon bg
  2101. figures
  2102. text 'X0' 224 176 color 8388608 18 bold;
  2103. end;
  2104. implementation eq
  2105. equations
  2106. p1.e = if condition then p12.e else 0 end;
  2107. p2.e = p1.e;
  2108. p12.f = if condition then p1.f-p2.f else 0 end;
  2109. implementation_end;
  2110. x1 160 304
  2111. description '<Description>
  2112. <IsMainModel>0</IsMainModel>
  2113. <KeepParameterValues>False</KeepParameterValues>
  2114. </Description>';
  2115. type Integrate
  2116. ports
  2117. signal in input;
  2118. signal out output;
  2119. parameters
  2120. real Initial = 2.95;
  2121. end;
  2122. icon bg left
  2123. figures
  2124. rectangle 145 289 175 319 color 0 fill 15132390;
  2125. text 'ò' 157.5 304 color 16711680 'SymbolProp BT' 21 symbol;
  2126. end;
  2127. implementation eq
  2128. equations
  2129. output = int (input, Initial);
  2130. implementation_end;
  2131. x12 224 304
  2132. description '<Description>
  2133. <IsMainModel>0</IsMainModel>
  2134. <KeepParameterValues>False</KeepParameterValues>
  2135. </Description>';
  2136. knot PlusMinus
  2137. ports
  2138. signal knot duplicatable in plus [1];
  2139. signal knot duplicatable in minus [1];
  2140. signal knot out output [1];
  2141. end;
  2142. icon bg ellipse bottom
  2143. figures
  2144. ellipse 216.5 296.5 231.5 311.5 color 0 fill 16777215;
  2145. end;
  2146. implementation eq
  2147. equations
  2148. output = sum (collect (plus)) - sum (collect (minus));
  2149. implementation_end;
  2150. x2 296 304
  2151. description '<Description>
  2152. <IsMainModel>0</IsMainModel>
  2153. <KeepParameterValues>False</KeepParameterValues>
  2154. </Description>';
  2155. type Integrate
  2156. ports
  2157. signal in input;
  2158. signal out output;
  2159. parameters
  2160. real Initial = -2.9496;
  2161. end;
  2162. icon bg right
  2163. figures
  2164. rectangle 281 289 311 319 color 0 fill 15132390;
  2165. text 'ò' 293.5 304 color 16711680 'SymbolProp BT' 21 symbol;
  2166. end;
  2167. implementation eq
  2168. equations
  2169. output = int (input, Initial);
  2170. implementation_end;
  2171. end;
  2172. connections
  2173. Condition1\contact -> Splitter1\input;
  2174. p1 => v1\p;
  2175. Splitter1\output -> Collision;
  2176. Splitter1\output -> X0\condition;
  2177. v1\flow -> x1\input;
  2178. v1\p => X0\p1;
  2179. v12\p => p12;
  2180. v2\flow -> x2\input;
  2181. v2\p => p2;
  2182. X0\p12 => v12\p;
  2183. X0\p2 => v2\p;
  2184. x1\output -> x12\plus;
  2185. x12\output -> Condition1\dx;
  2186. x2\output -> x12\minus;
  2187. end;
  2188. parameterrelations
  2189. x1\Initial = EndstopPos;
  2190. x2\Initial = InitialPos;parameterrelations_end;
  2191. implementation_end;
  2192. plug p2 648 216;
  2193. plug collision 800 216;
  2194. OneJunction5 704 176
  2195. description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
  2196. <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  2197. <TimeStamp>2007-9-27 9:51:18</TimeStamp>
  2198. </Description>';
  2199. knot OneJunction
  2200. ports
  2201. mechanical knot duplicatable none p [1];
  2202. signal knot out flow [1];
  2203. restrictions
  2204. causality constraint one_out p;
  2205. end;
  2206. icon bg
  2207. figures
  2208. text '1' 704 176 color 0 18 bold;
  2209. end;
  2210. implementation eq
  2211. equations
  2212. sum (direct (p.e)) = 0;
  2213. equal (collect (p.f));
  2214. flow = first (p.f);
  2215. implementation_end;
  2216. Rendstop 736 176
  2217. description '<Description>
  2218. <Version>4.0</Version>
  2219. <IsMainModel>1</IsMainModel>
  2220. <KeepParameterValues>False</KeepParameterValues>
  2221. <LibraryPath>Bond Graph\R.emx</LibraryPath>
  2222. <TimeStamp>2007-9-25 12:3:18</TimeStamp>
  2223. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  2224. </Description>';
  2225. type R
  2226. ports
  2227. power in p;
  2228. parameters
  2229. real Rendstop = 1000.0;
  2230. end;
  2231. icon bg bottom
  2232. figures
  2233. text 'R' 736 176 color 0 18 bold;
  2234. end;
  2235. implementation eq
  2236. equations
  2237. p.e = Rendstop * p.f;
  2238. implementation_end;
  2239. Sf1 704 264
  2240. description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
  2241. <LibraryPath>Bond Graph\Sf.emx</LibraryPath>
  2242. <TimeStamp>2007-9-25 12:3:35</TimeStamp>
  2243. </Description>';
  2244. type Sf
  2245. ports
  2246. power out p;
  2247. restrictions
  2248. causality fixed in p;
  2249. end;
  2250. icon bg bottom
  2251. figures
  2252. text 'Sf' 704 264 color 0 18 bold;
  2253. end;
  2254. implementation eq
  2255. parameters
  2256. real flow = 0.0;
  2257. variables
  2258. real effort;
  2259. equations
  2260. p.f = flow;
  2261. effort = p.e;
  2262. implementation_end;
  2263. end;
  2264. connections
  2265. Collision\Collision -> collision;
  2266. Collision\p12 => OneJunction5\p;
  2267. Collision\p2 => p2;
  2268. OneJunction5\p => Cendstop\p;
  2269. OneJunction5\p => Rendstop\p;
  2270. Sf1\p => Collision\p1;
  2271. end;
  2272. parameterrelations
  2273. Collision\InitialPos = InitialPos;
  2274. Collision\EndstopPos = EndstopPos;
  2275. Rendstop\Rendstop = Rendstop;
  2276. Cendstop\Cendstop = Cendstop;parameterrelations_end;
  2277. implementation_end;
  2278. EndstopMin 352 136
  2279. description '<Description>
  2280. <Version>4.1</Version>
  2281. <IsMainModel>1</IsMainModel>
  2282. <KeepParameterValues>False</KeepParameterValues>
  2283. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  2284. <LibraryPath>EndstopMin.emx</LibraryPath>
  2285. <TimeStamp>2011-1-18 16:54:44</TimeStamp>
  2286. </Description>';
  2287. type Submodel
  2288. ports
  2289. power out p2;
  2290. signal boolean out collision;
  2291. parameters
  2292. real Cendstop = 1.0e-4;
  2293. real Rendstop = 1000.0;
  2294. real InitialPos = -2.9496;
  2295. real EndstopPos = -2.95;
  2296. end;
  2297. icon bg bottom
  2298. figures
  2299. rectangle 303 113 401 159 color 0 fill 14013909;
  2300. text 'EndstopMin' 353 135 color 0 16;
  2301. end;
  2302. implementation bg
  2303. submodels
  2304. Cendstop 248 208
  2305. description '<Description>
  2306. <Version>4.0</Version>
  2307. <IsMainModel>1</IsMainModel>
  2308. <KeepParameterValues>False</KeepParameterValues>
  2309. <LibraryPath>Bond Graph\C.emx</LibraryPath>
  2310. <TimeStamp>2007-10-31 10:43:59</TimeStamp>
  2311. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  2312. </Description>';
  2313. type C
  2314. ports
  2315. power in p;
  2316. signal out state;
  2317. restrictions
  2318. causality preferred out p;
  2319. parameters
  2320. real Cendstop = 1.0e-4;
  2321. end;
  2322. icon bg right
  2323. figures
  2324. text 'C' 248 208 color 0 18 bold;
  2325. end;
  2326. implementation eq
  2327. equations
  2328. state = int(p.f);
  2329. p.e = state / Cendstop;
  2330. implementation_end;
  2331. Collision 248 120
  2332. description '<Description>
  2333. <Version>No Version Info</Version>
  2334. <IsMainModel>0</IsMainModel>
  2335. <KeepParameterValues>False</KeepParameterValues>
  2336. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  2337. </Description>';
  2338. type X0e
  2339. ports
  2340. power in p1;
  2341. power out p2;
  2342. power out p12;
  2343. signal boolean out collision;
  2344. restrictions
  2345. causality fixed out p1;
  2346. causality fixed out p2;
  2347. causality fixed in p12;
  2348. parameters
  2349. real InitialPos = -2.9496;
  2350. real EndstopLocation = -2.95;
  2351. end;
  2352. icon bg
  2353. figures
  2354. text 'X0e' 248 120 color 0 18 bold;
  2355. end;
  2356. implementation bg
  2357. submodels
  2358. Condition1 224.9 231.5
  2359. type Condition
  2360. ports
  2361. signal in dx;
  2362. signal boolean out contact;
  2363. end;
  2364. icon bg
  2365. figures
  2366. rectangle 197.2 215 252.6 248 color 0 fill 15132390;
  2367. text 'Condition' 224 231.5 color 0;
  2368. terminals
  2369. dx 224 248 fixed;
  2370. contact 224 215 fixed;
  2371. end;
  2372. implementation eq
  2373. parameters
  2374. real global epsilon;
  2375. variables
  2376. boolean bounce;
  2377. equations
  2378. contact = if dx - epsilon > 0 then true else false end;
  2379. bounce = event (dx - epsilon);implementation_end;
  2380. plug p1 96 176;
  2381. plug p2 352 176;
  2382. plug p12 224 64;
  2383. plug collision 400 200;
  2384. Splitter1 224 200
  2385. description '<Description><Version>4.0</Version>
  2386. <LibraryPath>C:\Program Files\20-sim 4.0\System\SplitterBoolean.emx</LibraryPath>
  2387. <TimeStamp>2007-10-31 11:27:48</TimeStamp>
  2388. <IsMainModel>1</IsMainModel>
  2389. <KeepParameterValues>False</KeepParameterValues>
  2390. </Description>';
  2391. knot Splitter
  2392. ports
  2393. signal knot boolean duplicatable out output [1];
  2394. signal knot boolean in input [1];
  2395. end;
  2396. icon bg ellipse
  2397. figures
  2398. ellipse 220.8 196.8 227.2 203.2 color -1 fill 0;
  2399. ellipse 219.7 195.7 228.3 204.3 color -1;
  2400. terminals
  2401. input 224 200 fixed;
  2402. end;
  2403. implementation eq
  2404. equations
  2405. collect (output) = input;
  2406. implementation_end;
  2407. v1 160 176
  2408. description '<Description>
  2409. <IsMainModel>0</IsMainModel>
  2410. <KeepParameterValues>False</KeepParameterValues>
  2411. </Description>';
  2412. knot OneJunction
  2413. ports
  2414. mechanical knot duplicatable none p [1];
  2415. signal knot out flow [1];
  2416. restrictions
  2417. causality constraint one_out p;
  2418. end;
  2419. icon bg top
  2420. figures
  2421. text '1' 160 176 color 0 18 bold;
  2422. end;
  2423. implementation eq
  2424. equations
  2425. sum (direct (p.e)) = 0;
  2426. equal (collect (p.f));
  2427. flow = first (p.f);
  2428. implementation_end;
  2429. v12 224 120
  2430. description '<Description>
  2431. <IsMainModel>0</IsMainModel>
  2432. <KeepParameterValues>False</KeepParameterValues>
  2433. </Description>';
  2434. knot OneJunction
  2435. ports
  2436. mechanical knot duplicatable none p [1];
  2437. signal knot out flow [1];
  2438. restrictions
  2439. causality constraint one_out p;
  2440. end;
  2441. icon bg right
  2442. figures
  2443. text '1' 224 120 color 0 18 bold;
  2444. end;
  2445. implementation eq
  2446. equations
  2447. sum (direct (p.e)) = 0;
  2448. equal (collect (p.f));
  2449. flow = first (p.f);
  2450. implementation_end;
  2451. v2 296 176
  2452. description '<Description>
  2453. <IsMainModel>0</IsMainModel>
  2454. <KeepParameterValues>False</KeepParameterValues>
  2455. </Description>';
  2456. knot OneJunction
  2457. ports
  2458. mechanical knot duplicatable none p [1];
  2459. signal knot out flow [1];
  2460. restrictions
  2461. causality constraint one_out p;
  2462. end;
  2463. icon bg top
  2464. figures
  2465. text '1' 296 176 color 0 18 bold;
  2466. end;
  2467. implementation eq
  2468. equations
  2469. sum (direct (p.e)) = 0;
  2470. equal (collect (p.f));
  2471. flow = first (p.f);
  2472. implementation_end;
  2473. X0 224 176
  2474. description '<Description>
  2475. <IsMainModel>0</IsMainModel>
  2476. <KeepParameterValues>False</KeepParameterValues>
  2477. </Description>';
  2478. type X0
  2479. ports
  2480. power in p1;
  2481. power out p2;
  2482. power out p12;
  2483. signal boolean in condition;
  2484. restrictions
  2485. causality fixed out p1;
  2486. causality fixed out p2;
  2487. causality fixed in p12;
  2488. end;
  2489. icon bg
  2490. figures
  2491. text 'X0' 224 176 color 8388608 18 bold;
  2492. end;
  2493. implementation eq
  2494. equations
  2495. p1.e = if condition then p12.e else 0 end;
  2496. p2.e = p1.e;
  2497. p12.f = if condition then p1.f-p2.f else 0 end;
  2498. implementation_end;
  2499. x1 160 304
  2500. description '<Description>
  2501. <IsMainModel>0</IsMainModel>
  2502. <KeepParameterValues>False</KeepParameterValues>
  2503. </Description>';
  2504. type Integrate
  2505. ports
  2506. signal in input;
  2507. signal out output;
  2508. parameters
  2509. real Initial = -2.95;
  2510. end;
  2511. icon bg left
  2512. figures
  2513. rectangle 145 289 175 319 color 0 fill 15132390;
  2514. text 'ò' 157.5 304 color 16711680 'SymbolProp BT' 21 symbol;
  2515. end;
  2516. implementation eq
  2517. equations
  2518. output = int (input, Initial);
  2519. implementation_end;
  2520. x12 224 304
  2521. description '<Description>
  2522. <IsMainModel>0</IsMainModel>
  2523. <KeepParameterValues>False</KeepParameterValues>
  2524. </Description>';
  2525. knot PlusMinus
  2526. ports
  2527. signal knot duplicatable in plus [1];
  2528. signal knot duplicatable in minus [1];
  2529. signal knot out output [1];
  2530. end;
  2531. icon bg ellipse bottom
  2532. figures
  2533. ellipse 216.5 296.5 231.5 311.5 color 0 fill 16777215;
  2534. end;
  2535. implementation eq
  2536. equations
  2537. output = sum (collect (plus)) - sum (collect (minus));
  2538. implementation_end;
  2539. x2 296 304
  2540. description '<Description>
  2541. <IsMainModel>0</IsMainModel>
  2542. <KeepParameterValues>False</KeepParameterValues>
  2543. </Description>';
  2544. type Integrate
  2545. ports
  2546. signal in input;
  2547. signal out output;
  2548. parameters
  2549. real Initial = -2.9496;
  2550. end;
  2551. icon bg right
  2552. figures
  2553. rectangle 281 289 311 319 color 0 fill 15132390;
  2554. text 'ò' 293.5 304 color 16711680 'SymbolProp BT' 21 symbol;
  2555. end;
  2556. implementation eq
  2557. equations
  2558. output = int (input, Initial);
  2559. implementation_end;
  2560. end;
  2561. connections
  2562. Condition1\contact -> Splitter1\input;
  2563. p1 => v1\p;
  2564. Splitter1\output -> collision;
  2565. Splitter1\output -> X0\condition;
  2566. v1\flow -> x1\input;
  2567. v1\p => X0\p1;
  2568. v12\p => p12;
  2569. v2\flow -> x2\input;
  2570. v2\p => p2;
  2571. X0\p12 => v12\p;
  2572. X0\p2 => v2\p;
  2573. x1\output -> x12\plus;
  2574. x12\output -> Condition1\dx;
  2575. x2\output -> x12\minus;
  2576. end;
  2577. parameterrelations
  2578. x1\Initial = EndstopLocation;
  2579. x2\Initial = InitialPos;parameterrelations_end;
  2580. implementation_end;
  2581. plug p2 152 120;
  2582. plug collision 360 120;
  2583. OneJunction 248 160
  2584. description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
  2585. <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  2586. <TimeStamp>2007-9-27 9:51:18</TimeStamp>
  2587. </Description>';
  2588. knot OneJunction
  2589. ports
  2590. power knot duplicatable none p [1];
  2591. signal knot out flow [1];
  2592. restrictions
  2593. causality constraint one_out p;
  2594. end;
  2595. icon bg
  2596. figures
  2597. text '1' 248 160 color 0 18 bold;
  2598. end;
  2599. implementation eq
  2600. equations
  2601. sum (direct (p.e)) = 0;
  2602. equal (collect (p.f));
  2603. flow = first (p.f);
  2604. implementation_end;
  2605. Rendstop 288 160
  2606. description '<Description>
  2607. <Version>4.0</Version>
  2608. <IsMainModel>1</IsMainModel>
  2609. <KeepParameterValues>False</KeepParameterValues>
  2610. <LibraryPath>Bond Graph\R.emx</LibraryPath>
  2611. <TimeStamp>2007-9-25 12:3:18</TimeStamp>
  2612. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  2613. </Description>';
  2614. type R
  2615. ports
  2616. power in p;
  2617. parameters
  2618. real Rendstop = 1000.0;
  2619. end;
  2620. icon bg bottom
  2621. figures
  2622. text 'R' 288 160 color 0 18 bold;
  2623. end;
  2624. implementation eq
  2625. equations
  2626. p.e = Rendstop * p.f;
  2627. implementation_end;
  2628. Sf2 248 64
  2629. description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
  2630. <LibraryPath>Bond Graph\Sf.emx</LibraryPath>
  2631. <TimeStamp>2007-9-25 12:3:35</TimeStamp>
  2632. </Description>';
  2633. type Sf
  2634. ports
  2635. power out p;
  2636. restrictions
  2637. causality fixed in p;
  2638. end;
  2639. icon bg bottom
  2640. figures
  2641. text 'Sf' 248 64 color 0 18 bold;
  2642. end;
  2643. implementation eq
  2644. parameters
  2645. real flow = 0.0;
  2646. variables
  2647. real effort;
  2648. equations
  2649. p.f = flow;
  2650. effort = p.e;
  2651. implementation_end;
  2652. end;
  2653. connections
  2654. Collision\collision -> collision;
  2655. Collision\p12 => OneJunction\p;
  2656. Collision\p2 => p2;
  2657. OneJunction\p => Cendstop\p;
  2658. OneJunction\p => Rendstop\p;
  2659. Sf2\p => Collision\p1;
  2660. end;
  2661. parameterrelations
  2662. Cendstop\Cendstop = Cendstop;
  2663. Rendstop\Rendstop = Rendstop;
  2664. Collision\InitialPos = InitialPos;
  2665. Collision\EndstopLocation = EndstopPos;parameterrelations_end;
  2666. implementation_end;
  2667. JointType 240 312
  2668. description '<Information><Description><Version>4.8</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues><AllowLibraryUpdate>True</AllowLibraryUpdate></Description><Attributes><GlobalRelations>parameters
  2669. real joint = 2;</GlobalRelations></Attributes></Information>';
  2670. type Submodel
  2671. ports
  2672. mechanical in p1;
  2673. signal out output [4,4];
  2674. power out p2 [6,1];
  2675. end;
  2676. implementation bg
  2677. submodels
  2678. Integrate 320 272
  2679. description '<Description>
  2680. <Version>4.0</Version>
  2681. <IsMainModel>1</IsMainModel>
  2682. <KeepParameterValues>False</KeepParameterValues>
  2683. <LibraryPath>Signal\Block Diagram\Integrate.emx</LibraryPath>
  2684. <TimeStamp>2007-9-26 12:3:23</TimeStamp>
  2685. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  2686. </Description>';
  2687. type Integrate
  2688. ports
  2689. signal in input;
  2690. signal out output [4,4];
  2691. parameters
  2692. real init = -2.9496;
  2693. end;
  2694. icon bg
  2695. figures
  2696. rectangle 304 256 336 288 color 0 fill 15132390;
  2697. text 'ò' 320 269.3 color 16711680 'SymbolProp BT' 21 symbol;
  2698. end;
  2699. implementation eq
  2700. parameters
  2701. real global joint;
  2702. variables
  2703. real R[3,3];
  2704. real p[3];
  2705. real q;
  2706. real qa[6];
  2707. real temp [4,4];
  2708. initialequations
  2709. qa = 0;
  2710. equations
  2711. q = -int(input,init);
  2712. qa[joint] = q;
  2713. R = dll('EulerAngles.dll','RotationMatrixFromEulXYZs',qa);
  2714. output = homogeneous(R,qa[4:6]);implementation_end;
  2715. plug p1 240 188;
  2716. plug output 320 368;
  2717. plug p2 240 412;
  2718. OneJunction2 240 272
  2719. description '<Information>
  2720. <Description>
  2721. <Version>4.2</Version>
  2722. <IsMainModel>1</IsMainModel>
  2723. <KeepParameterValues>False</KeepParameterValues>
  2724. <LibraryPath>Bond Graph\FlowSensor.emx</LibraryPath>
  2725. <TimeStamp>2011-11-29 15:50:53</TimeStamp>
  2726. </Description>
  2727. </Information>';
  2728. knot FlowSensor
  2729. ports
  2730. mechanical knot in p1 [1];
  2731. power knot out p2 [1];
  2732. signal knot out flow [1];
  2733. restrictions
  2734. causality constraint not_equal p1 p2;
  2735. end;
  2736. icon bg ellipse
  2737. figures
  2738. ellipse 233.1 264.8 246.9 279.1 color 0 fill 16777215;
  2739. text 'f' 240 271.2 color 0;
  2740. end;
  2741. implementation eq
  2742. equations
  2743. p2.f = p1.f;
  2744. p1.e = p2.e;
  2745. flow = p1.f;
  2746. implementation_end;
  2747. uTbai 240 328
  2748. description '<Description>
  2749. <Version>4.0</Version>
  2750. <IsMainModel>1</IsMainModel>
  2751. <KeepParameterValues>False</KeepParameterValues>
  2752. <LibraryPath>Bond Graph\TF.emx</LibraryPath>
  2753. <TimeStamp>2007-9-25 12:4:2</TimeStamp>
  2754. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  2755. </Description>';
  2756. type TF
  2757. ports
  2758. power in p1;
  2759. power out p2 [6,1];
  2760. restrictions
  2761. causality constraint not_equal p1 p2;
  2762. causality fixed in p1;
  2763. causality fixed out p2;
  2764. parameters
  2765. real Cconstraint = 1.0e-4;
  2766. real Rconstraint = 1000.0;
  2767. end;
  2768. icon bg left
  2769. figures
  2770. text 'TF' 240 328 color 0 18 bold;
  2771. end;
  2772. implementation eq
  2773. parameters
  2774. real global joint;
  2775. variables
  2776. real i;
  2777. real state[6];
  2778. equations
  2779. /*p2.e[1] = (Rconstraint*-p2.f[1] + int(-p2.f[1])/Cconstraint);
  2780. p2.e[2] = (Rconstraint*-p2.f[2] + int(-p2.f[2])/Cconstraint);
  2781. p2.e[3] = p1.e;
  2782. p2.e[4] = (Rconstraint*-p2.f[4] + int(-p2.f[4])/Cconstraint);
  2783. p2.e[5] = (Rconstraint*-p2.f[5] + int(-p2.f[5])/Cconstraint);
  2784. p2.e[6] = (Rconstraint*-p2.f[6] + int(-p2.f[6])/Cconstraint);
  2785. p1.f = p2.f[3];*/
  2786. state = int(p2.f);
  2787. for i = 1 to 6 do
  2788. if i == joint then
  2789. p1.f = p2.f[i];
  2790. p2.e[i] = p1.e;
  2791. else
  2792. p2.e[i] = (Rconstraint*-p2.f[i] + -state[i]/Cconstraint);
  2793. end;
  2794. end;
  2795. implementation_end;
  2796. end;
  2797. connections
  2798. Integrate\output -> output;
  2799. OneJunction2\flow -> Integrate\input;
  2800. OneJunction2\p2 => uTbai\p1;
  2801. p1 => OneJunction2\p1;
  2802. uTbai\p2 => p2;
  2803. end;
  2804. implementation_end;
  2805. MultiplyDivide1 320 576
  2806. description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
  2807. <LibraryPath>Signal\Block Diagram\MultiplyDivide.emx</LibraryPath>
  2808. <TimeStamp>2007-9-27 10:14:59</TimeStamp>
  2809. </Description>';
  2810. knot MultiplyDivide
  2811. ports
  2812. signal knot duplicatable in multiply [4,4];
  2813. signal knot duplicatable in divide [4,4];
  2814. signal knot out output [4,4];
  2815. end;
  2816. icon bg ellipse
  2817. figures
  2818. ellipse 312 568 328 584 color 0 fill 16777215;
  2819. end;
  2820. implementation eq
  2821. equations
  2822. output = mul (collect (multiply)) ./ mul (collect (divide));
  2823. implementation_end;
  2824. plug Hout 504 576;
  2825. plug Hin 112 576;
  2826. plug p2 496 424;
  2827. plug p 112 424;
  2828. plug p1 240 40;
  2829. OneJunction 240 176
  2830. description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
  2831. <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  2832. <TimeStamp>2007-9-27 9:51:18</TimeStamp>
  2833. </Description>';
  2834. knot OneJunction
  2835. ports
  2836. mechanical knot duplicatable none p [1];
  2837. signal knot out flow [1];
  2838. restrictions
  2839. causality constraint one_out p;
  2840. end;
  2841. icon bg
  2842. figures
  2843. text '1' 240 176 color 0 18 bold;
  2844. end;
  2845. implementation eq
  2846. equations
  2847. sum (direct (p.e)) = 0;
  2848. equal (collect (p.f));
  2849. flow = first (p.f);
  2850. implementation_end;
  2851. Or 456 176
  2852. description '<Description>
  2853. <Version>4.0</Version>
  2854. <IsMainModel>1</IsMainModel>
  2855. <KeepParameterValues>False</KeepParameterValues>
  2856. <LibraryPath>Signal\Logical\Discrete\Or.emx</LibraryPath>
  2857. <TimeStamp>2007-12-18 23:20:57</TimeStamp>
  2858. </Description>';
  2859. type 'Or-Or'
  2860. ports
  2861. signal boolean in input1;
  2862. signal boolean out output;
  2863. signal boolean in input2;
  2864. end;
  2865. icon bg bottom
  2866. figures
  2867. rectangle 440.1 160 471.9 192 color 0 fill 15132390;
  2868. group
  2869. line 442.3 169.3 452.8 169.3 color 16711680 fill 16711680;
  2870. line 442.3 183.1 452.8 183.1 color 16711680 fill 16711680;
  2871. end;
  2872. spline 451.9 164.8 453.9 176.5 451.9 187.7 color 16711680 fill 16711680;
  2873. line 460.7 176 469.5 176 color 16711680 fill 16711680;
  2874. spline 451.7 164.3 457.9 166.6 460.8 176.4 457.6 185.4 451.7 187.7 color 16711680 fill 15132390;
  2875. end;
  2876. implementation eq
  2877. equations
  2878. output = if input1 or input2 then
  2879. true
  2880. else
  2881. false
  2882. end;
  2883. implementation_end;
  2884. Rjoint 168 176
  2885. description '<Description>
  2886. <Version>4.0</Version>
  2887. <IsMainModel>1</IsMainModel>
  2888. <KeepParameterValues>False</KeepParameterValues>
  2889. <LibraryPath>Bond Graph\R.emx</LibraryPath>
  2890. <TimeStamp>2007-9-25 12:3:18</TimeStamp>
  2891. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  2892. </Description>';
  2893. type R
  2894. ports
  2895. power in p;
  2896. parameters
  2897. real Rjoint = 0.1;
  2898. end;
  2899. icon bg bottom
  2900. figures
  2901. text 'R' 168 176 color 0 18 bold;
  2902. end;
  2903. implementation eq
  2904. equations
  2905. p.e = Rjoint * p.f;
  2906. implementation_end;
  2907. Splitter2 320 312
  2908. description '<Description><Version>4.0</Version>
  2909. <LibraryPath>Signal\Block Diagram\Splitter.emx</LibraryPath>
  2910. <TimeStamp>2008-01-17 11:28:29</TimeStamp>
  2911. <IsMainModel>1</IsMainModel>
  2912. <KeepParameterValues>False</KeepParameterValues>
  2913. </Description>';
  2914. knot Splitter
  2915. ports
  2916. signal knot duplicatable out output [4,4];
  2917. signal knot in input [4,4];
  2918. end;
  2919. icon bg ellipse
  2920. figures
  2921. ellipse 316.8 308.8 323.2 315.2 color -1 fill 0;
  2922. ellipse 315.7 307.7 324.3 316.3 color -1;
  2923. terminals
  2924. input 320 312 fixed;
  2925. end;
  2926. implementation eq
  2927. equations
  2928. collect (output) = input;
  2929. implementation_end;
  2930. Wbai 240 424
  2931. description '<Description>
  2932. <Version>4.0</Version>
  2933. <IsMainModel>1</IsMainModel>
  2934. <KeepParameterValues>False</KeepParameterValues>
  2935. <LibraryPath>Bond Graph\ZeroJunction.emx</LibraryPath>
  2936. <TimeStamp>2007-9-27 9:51:43</TimeStamp>
  2937. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  2938. </Description>';
  2939. knot ZeroJunction
  2940. ports
  2941. power knot duplicatable none p [6,1];
  2942. signal knot out effort [6,1];
  2943. restrictions
  2944. causality constraint one_in p;
  2945. end;
  2946. icon bg bottom
  2947. figures
  2948. text '0' 240 424 color 0 18 bold;
  2949. end;
  2950. implementation eq
  2951. equations
  2952. sum (direct (p.f)) = 0;
  2953. equal (collect (p.e));
  2954. effort = first (p.e);
  2955. implementation_end;
  2956. ZeroJunction 240 104
  2957. description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
  2958. <LibraryPath>Bond Graph\ZeroJunction.emx</LibraryPath>
  2959. <TimeStamp>2007-9-27 9:51:43</TimeStamp>
  2960. </Description>';
  2961. knot ZeroJunction
  2962. ports
  2963. mechanical knot duplicatable none p [1];
  2964. signal knot out effort [1];
  2965. restrictions
  2966. causality constraint one_in p;
  2967. end;
  2968. icon bg
  2969. figures
  2970. text '0' 240 104 color 0 18 bold;
  2971. end;
  2972. implementation eq
  2973. equations
  2974. sum (direct (p.f)) = 0;
  2975. equal (collect (p.e));
  2976. effort = first (p.e);
  2977. implementation_end;
  2978. end;
  2979. connections
  2980. EndstopMax\collision -> Or\input1;
  2981. EndstopMin\collision -> Or\input2;
  2982. Hin -> MultiplyDivide1\multiply;
  2983. JointType\output -> Splitter2\input;
  2984. JointType\p2 => Wbai\p;
  2985. MultiplyDivide1\output -> Hout;
  2986. OneJunction\p <= EndstopMax\p2;
  2987. OneJunction\p <= EndstopMin\p2;
  2988. OneJunction\p => JointType\p1;
  2989. p <= Wbai\p;
  2990. p1 => ZeroJunction\p;
  2991. p2 => AdHji\p2;
  2992. Rjoint\p <= OneJunction\p;
  2993. Splitter2\output -> AdHji\H 424 312;
  2994. Splitter2\output -> MultiplyDivide1\multiply;
  2995. Wbai\p <= AdHji\p1;
  2996. ZeroJunction\p => OneJunction\p;
  2997. end;
  2998. parameterrelations
  2999. EndstopMin\Rendstop = Rendstop;
  3000. EndstopMin\Cendstop = Cendstop;
  3001. EndstopMin\InitialPos = InitialPos;
  3002. EndstopMin\EndstopPos = MinEndstopPos;
  3003. EndstopMax\Rendstop = Rendstop;
  3004. EndstopMax\Cendstop = Cendstop;
  3005. EndstopMax\InitialPos = InitialPos;
  3006. EndstopMax\EndstopPos = MaxEndstopPos;
  3007. Rjoint\Rjoint= Rjoint;
  3008. Integrate\init = InitialPos;
  3009. uTbai\Rconstraint = Rconstraint;
  3010. uTbai\Cconstraint = Cconstraint;
  3011. parameterrelations_end;
  3012. figures
  3013. text 'b = next link (body)
  3014. a = previous link (body)
  3015. i = Frame fixed in previous body, fixed in joint
  3016. j = Frame fixed in next body, fixed in joint
  3017. ' 680 488 color 0;
  3018. implementation_end;
  3019. JointBase1 488.2 296
  3020. description '<Description>
  3021. <Version>4.1</Version>
  3022. <IsMainModel>1</IsMainModel>
  3023. <KeepParameterValues>False</KeepParameterValues>
  3024. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  3025. <LibraryPath>Joint-roty.emx</LibraryPath>
  3026. <TimeStamp>2011-1-18 17:30:05</TimeStamp>
  3027. </Description>';
  3028. type 'Submodel-roty'
  3029. ports
  3030. power out p [6,1];
  3031. power in p1;
  3032. power in p2 [6,1];
  3033. signal in Hin [4,4];
  3034. signal out Hout [4,4];
  3035. parameters
  3036. real Rconstraint = 1000.0;
  3037. real Cconstraint = 1.0e-4;
  3038. real Rendstop = 1000.0;
  3039. real Cendstop = 1.0e-4;
  3040. real InitialPos = -1.13;
  3041. real MaxEndstopPos = 1.57;
  3042. real MinEndstopPos = -1.131;
  3043. real Rjoint = 0.1;
  3044. end;
  3045. icon bg bottom
  3046. figures
  3047. rectangle 456.5 224 520 368 color 0 fill 14745599;
  3048. text 'Joint-roty' 488.5 299 color 0;
  3049. terminals
  3050. p 456 256 fixed;
  3051. p1 487.5 224 fixed;
  3052. p2 520 256 fixed;
  3053. Hin 456 336 fixed;
  3054. Hout 520 336 fixed;
  3055. end;
  3056. implementation bg
  3057. submodels
  3058. AdHji 424 424
  3059. description '<Description>
  3060. <Version>4.0</Version>
  3061. <IsMainModel>1</IsMainModel>
  3062. <KeepParameterValues>False</KeepParameterValues>
  3063. <LibraryPath>Bond Graph\MTF.emx</LibraryPath>
  3064. <TimeStamp>2007-9-25 12:3:3</TimeStamp>
  3065. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  3066. </Description>';
  3067. type MTF
  3068. ports
  3069. power out p1 [6,1];
  3070. power in p2 [6,1];
  3071. signal in H [4,4];
  3072. restrictions
  3073. causality constraint not_equal p1 p2;
  3074. end;
  3075. icon bg bottom
  3076. figures
  3077. text 'MTF' 424 424 color 0 18 bold;
  3078. end;
  3079. implementation eq
  3080. equations
  3081. p2.e = transpose(Adjoint(H)) * p1.e;
  3082. p1.f = Adjoint(H) * p2.f;implementation_end;
  3083. EndstopMax 471 217
  3084. description '<Description>
  3085. <Version>4.1</Version>
  3086. <IsMainModel>1</IsMainModel>
  3087. <KeepParameterValues>False</KeepParameterValues>
  3088. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  3089. </Description>';
  3090. type Submodel
  3091. ports
  3092. power out p2;
  3093. signal boolean out collision;
  3094. parameters
  3095. real Rendstop = 1000.0;
  3096. real Cendstop = 1.0e-4;
  3097. real InitialPos = -1.13;
  3098. real EndstopPos = 1.57;
  3099. end;
  3100. icon bg bottom
  3101. figures
  3102. rectangle 422 194 520 240 color 0 fill 14013909;
  3103. text 'EndstopMax' 472 216 color 0 16;
  3104. terminals
  3105. p2 472 240 fixed;
  3106. end;
  3107. implementation bg
  3108. submodels
  3109. Cendstop 704 144
  3110. description '<Description>
  3111. <Version>4.0</Version>
  3112. <IsMainModel>1</IsMainModel>
  3113. <KeepParameterValues>False</KeepParameterValues>
  3114. <LibraryPath>Bond Graph\C.emx</LibraryPath>
  3115. <TimeStamp>2007-10-31 10:43:59</TimeStamp>
  3116. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  3117. </Description>';
  3118. type C
  3119. ports
  3120. power in p;
  3121. signal out state;
  3122. restrictions
  3123. causality preferred out p;
  3124. parameters
  3125. real Cendstop = 1.0e-4;
  3126. end;
  3127. icon bg right
  3128. figures
  3129. text 'C' 704 144 color 0 18 bold;
  3130. end;
  3131. implementation eq
  3132. equations
  3133. state = int(p.f);
  3134. p.e = state / Cendstop;
  3135. implementation_end;
  3136. Collision 704 216
  3137. description '<Description>
  3138. <Version>No Version Info</Version>
  3139. <IsMainModel>0</IsMainModel>
  3140. <KeepParameterValues>False</KeepParameterValues>
  3141. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  3142. </Description>';
  3143. type X0e
  3144. ports
  3145. power in p1;
  3146. power out p2;
  3147. power out p12;
  3148. signal boolean out Collision;
  3149. restrictions
  3150. causality fixed in p12;
  3151. causality fixed out p2;
  3152. causality fixed out p1;
  3153. parameters
  3154. real InitialPos = -1.13;
  3155. real EndstopPos = 1.57;
  3156. end;
  3157. icon bg
  3158. figures
  3159. text 'X0e' 704 216 color 0 18 bold;
  3160. end;
  3161. implementation bg
  3162. submodels
  3163. Condition1 224.9 231.5
  3164. type Condition
  3165. ports
  3166. signal in dx;
  3167. signal boolean out contact;
  3168. end;
  3169. icon bg
  3170. figures
  3171. rectangle 197.2 215 252.6 248 color 0 fill 15132390;
  3172. text 'Condition' 224 231.5 color 0;
  3173. terminals
  3174. dx 224 248 fixed;
  3175. contact 224 215 fixed;
  3176. end;
  3177. implementation eq
  3178. parameters
  3179. real global epsilon;
  3180. variables
  3181. boolean bounce;
  3182. equations
  3183. contact = if dx - epsilon < 0 then true else false end;
  3184. bounce = event (dx - epsilon);implementation_end;
  3185. plug p1 96 176;
  3186. plug p2 352 176;
  3187. plug p12 224 64;
  3188. plug Collision 408 192;
  3189. Splitter1 224 200
  3190. description '<Description><Version>4.0</Version>
  3191. <LibraryPath>C:\Program Files\20-sim 4.0\System\SplitterBoolean.emx</LibraryPath>
  3192. <TimeStamp>2007-10-31 11:27:48</TimeStamp>
  3193. <IsMainModel>1</IsMainModel>
  3194. <KeepParameterValues>False</KeepParameterValues>
  3195. </Description>';
  3196. knot Splitter
  3197. ports
  3198. signal knot boolean duplicatable out output [1];
  3199. signal knot boolean in input [1];
  3200. end;
  3201. icon bg ellipse
  3202. figures
  3203. ellipse 220.8 196.8 227.2 203.2 color -1 fill 0;
  3204. ellipse 219.7 195.7 228.3 204.3 color -1;
  3205. terminals
  3206. input 224 200 fixed;
  3207. end;
  3208. implementation eq
  3209. equations
  3210. collect (output) = input;
  3211. implementation_end;
  3212. v1 160 176
  3213. description '<Description>
  3214. <IsMainModel>0</IsMainModel>
  3215. <KeepParameterValues>False</KeepParameterValues>
  3216. </Description>';
  3217. knot OneJunction
  3218. ports
  3219. mechanical knot duplicatable none p [1];
  3220. signal knot out flow [1];
  3221. restrictions
  3222. causality constraint one_out p;
  3223. end;
  3224. icon bg top
  3225. figures
  3226. text '1' 160 176 color 0 18 bold;
  3227. end;
  3228. implementation eq
  3229. equations
  3230. sum (direct (p.e)) = 0;
  3231. equal (collect (p.f));
  3232. flow = first (p.f);
  3233. implementation_end;
  3234. v12 224 120
  3235. description '<Description>
  3236. <IsMainModel>0</IsMainModel>
  3237. <KeepParameterValues>False</KeepParameterValues>
  3238. </Description>';
  3239. knot OneJunction
  3240. ports
  3241. mechanical knot duplicatable none p [1];
  3242. signal knot out flow [1];
  3243. restrictions
  3244. causality constraint one_out p;
  3245. end;
  3246. icon bg right
  3247. figures
  3248. text '1' 224 120 color 0 18 bold;
  3249. end;
  3250. implementation eq
  3251. equations
  3252. sum (direct (p.e)) = 0;
  3253. equal (collect (p.f));
  3254. flow = first (p.f);
  3255. implementation_end;
  3256. v2 296 176
  3257. description '<Description>
  3258. <IsMainModel>0</IsMainModel>
  3259. <KeepParameterValues>False</KeepParameterValues>
  3260. </Description>';
  3261. knot OneJunction
  3262. ports
  3263. mechanical knot duplicatable none p [1];
  3264. signal knot out flow [1];
  3265. restrictions
  3266. causality constraint one_out p;
  3267. end;
  3268. icon bg top
  3269. figures
  3270. text '1' 296 176 color 0 18 bold;
  3271. end;
  3272. implementation eq
  3273. equations
  3274. sum (direct (p.e)) = 0;
  3275. equal (collect (p.f));
  3276. flow = first (p.f);
  3277. implementation_end;
  3278. X0 224 176
  3279. description '<Description>
  3280. <IsMainModel>0</IsMainModel>
  3281. <KeepParameterValues>False</KeepParameterValues>
  3282. </Description>';
  3283. type X0
  3284. ports
  3285. mechanical in p1;
  3286. mechanical out p2;
  3287. mechanical out p12;
  3288. signal boolean in condition;
  3289. restrictions
  3290. causality fixed out p1;
  3291. causality fixed out p2;
  3292. causality fixed in p12;
  3293. end;
  3294. icon bg
  3295. figures
  3296. text 'X0' 224 176 color 8388608 18 bold;
  3297. end;
  3298. implementation eq
  3299. equations
  3300. p1.e = if condition then p12.e else 0 end;
  3301. p2.e = p1.e;
  3302. p12.f = if condition then p1.f-p2.f else 0 end;
  3303. implementation_end;
  3304. x1 160 304
  3305. description '<Description>
  3306. <IsMainModel>0</IsMainModel>
  3307. <KeepParameterValues>False</KeepParameterValues>
  3308. </Description>';
  3309. type Integrate
  3310. ports
  3311. signal in input;
  3312. signal out output;
  3313. parameters
  3314. real Initial = 1.57;
  3315. end;
  3316. icon bg left
  3317. figures
  3318. rectangle 145 289 175 319 color 0 fill 15132390;
  3319. text 'ò' 157.5 304 color 16711680 'SymbolProp BT' 21 symbol;
  3320. end;
  3321. implementation eq
  3322. equations
  3323. output = int (input, Initial);
  3324. implementation_end;
  3325. x12 224 304
  3326. description '<Description>
  3327. <IsMainModel>0</IsMainModel>
  3328. <KeepParameterValues>False</KeepParameterValues>
  3329. </Description>';
  3330. knot PlusMinus
  3331. ports
  3332. signal knot duplicatable in plus [1];
  3333. signal knot duplicatable in minus [1];
  3334. signal knot out output [1];
  3335. end;
  3336. icon bg ellipse bottom
  3337. figures
  3338. ellipse 216.5 296.5 231.5 311.5 color 0 fill 16777215;
  3339. end;
  3340. implementation eq
  3341. equations
  3342. output = sum (collect (plus)) - sum (collect (minus));
  3343. implementation_end;
  3344. x2 296 304
  3345. description '<Description>
  3346. <IsMainModel>0</IsMainModel>
  3347. <KeepParameterValues>False</KeepParameterValues>
  3348. </Description>';
  3349. type Integrate
  3350. ports
  3351. signal in input;
  3352. signal out output;
  3353. parameters
  3354. real Initial = -1.13;
  3355. end;
  3356. icon bg right
  3357. figures
  3358. rectangle 281 289 311 319 color 0 fill 15132390;
  3359. text 'ò' 293.5 304 color 16711680 'SymbolProp BT' 21 symbol;
  3360. end;
  3361. implementation eq
  3362. equations
  3363. output = int (input, Initial);
  3364. implementation_end;
  3365. end;
  3366. connections
  3367. Condition1\contact -> Splitter1\input;
  3368. p1 => v1\p;
  3369. Splitter1\output -> Collision;
  3370. Splitter1\output -> X0\condition;
  3371. v1\flow -> x1\input;
  3372. v1\p => X0\p1;
  3373. v12\p => p12;
  3374. v2\flow -> x2\input;
  3375. v2\p => p2;
  3376. X0\p12 => v12\p;
  3377. X0\p2 => v2\p;
  3378. x1\output -> x12\plus;
  3379. x12\output -> Condition1\dx;
  3380. x2\output -> x12\minus;
  3381. end;
  3382. parameterrelations
  3383. x1\Initial = EndstopPos;
  3384. x2\Initial = InitialPos;parameterrelations_end;
  3385. implementation_end;
  3386. plug p2 648 216;
  3387. plug collision 800 216;
  3388. OneJunction5 704 176
  3389. description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
  3390. <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  3391. <TimeStamp>2007-9-27 9:51:18</TimeStamp>
  3392. </Description>';
  3393. knot OneJunction
  3394. ports
  3395. mechanical knot duplicatable none p [1];
  3396. signal knot out flow [1];
  3397. restrictions
  3398. causality constraint one_out p;
  3399. end;
  3400. icon bg
  3401. figures
  3402. text '1' 704 176 color 0 18 bold;
  3403. end;
  3404. implementation eq
  3405. equations
  3406. sum (direct (p.e)) = 0;
  3407. equal (collect (p.f));
  3408. flow = first (p.f);
  3409. implementation_end;
  3410. Rendstop 736 176
  3411. description '<Description>
  3412. <Version>4.0</Version>
  3413. <IsMainModel>1</IsMainModel>
  3414. <KeepParameterValues>False</KeepParameterValues>
  3415. <LibraryPath>Bond Graph\R.emx</LibraryPath>
  3416. <TimeStamp>2007-9-25 12:3:18</TimeStamp>
  3417. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  3418. </Description>';
  3419. type R
  3420. ports
  3421. power in p;
  3422. parameters
  3423. real Rendstop = 1000.0;
  3424. end;
  3425. icon bg bottom
  3426. figures
  3427. text 'R' 736 176 color 0 18 bold;
  3428. end;
  3429. implementation eq
  3430. equations
  3431. p.e = Rendstop * p.f;
  3432. implementation_end;
  3433. Sf1 704 264
  3434. description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
  3435. <LibraryPath>Bond Graph\Sf.emx</LibraryPath>
  3436. <TimeStamp>2007-9-25 12:3:35</TimeStamp>
  3437. </Description>';
  3438. type Sf
  3439. ports
  3440. power out p;
  3441. restrictions
  3442. causality fixed in p;
  3443. end;
  3444. icon bg bottom
  3445. figures
  3446. text 'Sf' 704 264 color 0 18 bold;
  3447. end;
  3448. implementation eq
  3449. parameters
  3450. real flow = 0.0;
  3451. variables
  3452. real effort;
  3453. equations
  3454. p.f = flow;
  3455. effort = p.e;
  3456. implementation_end;
  3457. end;
  3458. connections
  3459. Collision\Collision -> collision;
  3460. Collision\p12 => OneJunction5\p;
  3461. Collision\p2 => p2;
  3462. OneJunction5\p => Cendstop\p;
  3463. OneJunction5\p => Rendstop\p;
  3464. Sf1\p => Collision\p1;
  3465. end;
  3466. parameterrelations
  3467. Collision\InitialPos = InitialPos;
  3468. Collision\EndstopPos = EndstopPos;
  3469. Rendstop\Rendstop = Rendstop;
  3470. Cendstop\Cendstop = Cendstop;parameterrelations_end;
  3471. implementation_end;
  3472. EndstopMin 312 216
  3473. description '<Description>
  3474. <Version>4.1</Version>
  3475. <IsMainModel>1</IsMainModel>
  3476. <KeepParameterValues>False</KeepParameterValues>
  3477. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  3478. <LibraryPath>EndstopMin.emx</LibraryPath>
  3479. <TimeStamp>2011-1-18 14:37:57</TimeStamp>
  3480. </Description>';
  3481. type Submodel
  3482. ports
  3483. power out p2;
  3484. signal boolean out collision;
  3485. parameters
  3486. real Cendstop = 1.0e-4;
  3487. real Rendstop = 1000.0;
  3488. real InitialPos = -1.13;
  3489. real EndstopPos = -1.131;
  3490. end;
  3491. icon bg bottom
  3492. figures
  3493. rectangle 263 193 361 239 color 0 fill 14013909;
  3494. text 'EndstopMin' 313 215 color 0 16;
  3495. end;
  3496. implementation bg
  3497. submodels
  3498. Cendstop 248 208
  3499. description '<Description>
  3500. <Version>4.0</Version>
  3501. <IsMainModel>1</IsMainModel>
  3502. <KeepParameterValues>False</KeepParameterValues>
  3503. <LibraryPath>Bond Graph\C.emx</LibraryPath>
  3504. <TimeStamp>2007-10-31 10:43:59</TimeStamp>
  3505. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  3506. </Description>';
  3507. type C
  3508. ports
  3509. power in p;
  3510. signal out state;
  3511. restrictions
  3512. causality preferred out p;
  3513. parameters
  3514. real Cendstop = 1.0e-4;
  3515. end;
  3516. icon bg right
  3517. figures
  3518. text 'C' 248 208 color 0 18 bold;
  3519. end;
  3520. implementation eq
  3521. equations
  3522. state = int(p.f);
  3523. p.e = state / Cendstop;
  3524. implementation_end;
  3525. Collision 248 120
  3526. description '<Description>
  3527. <Version>No Version Info</Version>
  3528. <IsMainModel>0</IsMainModel>
  3529. <KeepParameterValues>False</KeepParameterValues>
  3530. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  3531. </Description>';
  3532. type X0e
  3533. ports
  3534. power in p1;
  3535. power out p2;
  3536. power out p12;
  3537. signal boolean out collision;
  3538. restrictions
  3539. causality fixed out p1;
  3540. causality fixed out p2;
  3541. causality fixed in p12;
  3542. parameters
  3543. real InitialPos = -1.13;
  3544. real EndstopLocation = -1.131;
  3545. end;
  3546. icon bg
  3547. figures
  3548. text 'X0e' 248 120 color 0 18 bold;
  3549. end;
  3550. implementation bg
  3551. submodels
  3552. Condition1 224.9 231.5
  3553. type Condition
  3554. ports
  3555. signal in dx;
  3556. signal boolean out contact;
  3557. end;
  3558. icon bg
  3559. figures
  3560. rectangle 197.2 215 252.6 248 color 0 fill 15132390;
  3561. text 'Condition' 224 231.5 color 0;
  3562. terminals
  3563. dx 224 248 fixed;
  3564. contact 224 215 fixed;
  3565. end;
  3566. implementation eq
  3567. parameters
  3568. real global epsilon;
  3569. variables
  3570. boolean bounce;
  3571. equations
  3572. contact = if dx - epsilon > 0 then true else false end;
  3573. bounce = event (dx - epsilon);implementation_end;
  3574. plug p1 96 176;
  3575. plug p2 352 176;
  3576. plug p12 224 64;
  3577. plug collision 400 200;
  3578. Splitter1 224 200
  3579. description '<Description><Version>4.0</Version>
  3580. <LibraryPath>C:\Program Files\20-sim 4.0\System\SplitterBoolean.emx</LibraryPath>
  3581. <TimeStamp>2007-10-31 11:27:48</TimeStamp>
  3582. <IsMainModel>1</IsMainModel>
  3583. <KeepParameterValues>False</KeepParameterValues>
  3584. </Description>';
  3585. knot Splitter
  3586. ports
  3587. signal knot boolean duplicatable out output [1];
  3588. signal knot boolean in input [1];
  3589. end;
  3590. icon bg ellipse
  3591. figures
  3592. ellipse 220.8 196.8 227.2 203.2 color -1 fill 0;
  3593. ellipse 219.7 195.7 228.3 204.3 color -1;
  3594. terminals
  3595. input 224 200 fixed;
  3596. end;
  3597. implementation eq
  3598. equations
  3599. collect (output) = input;
  3600. implementation_end;
  3601. v1 160 176
  3602. description '<Description>
  3603. <IsMainModel>0</IsMainModel>
  3604. <KeepParameterValues>False</KeepParameterValues>
  3605. </Description>';
  3606. knot OneJunction
  3607. ports
  3608. mechanical knot duplicatable none p [1];
  3609. signal knot out flow [1];
  3610. restrictions
  3611. causality constraint one_out p;
  3612. end;
  3613. icon bg top
  3614. figures
  3615. text '1' 160 176 color 0 18 bold;
  3616. end;
  3617. implementation eq
  3618. equations
  3619. sum (direct (p.e)) = 0;
  3620. equal (collect (p.f));
  3621. flow = first (p.f);
  3622. implementation_end;
  3623. v12 224 120
  3624. description '<Description>
  3625. <IsMainModel>0</IsMainModel>
  3626. <KeepParameterValues>False</KeepParameterValues>
  3627. </Description>';
  3628. knot OneJunction
  3629. ports
  3630. mechanical knot duplicatable none p [1];
  3631. signal knot out flow [1];
  3632. restrictions
  3633. causality constraint one_out p;
  3634. end;
  3635. icon bg right
  3636. figures
  3637. text '1' 224 120 color 0 18 bold;
  3638. end;
  3639. implementation eq
  3640. equations
  3641. sum (direct (p.e)) = 0;
  3642. equal (collect (p.f));
  3643. flow = first (p.f);
  3644. implementation_end;
  3645. v2 296 176
  3646. description '<Description>
  3647. <IsMainModel>0</IsMainModel>
  3648. <KeepParameterValues>False</KeepParameterValues>
  3649. </Description>';
  3650. knot OneJunction
  3651. ports
  3652. mechanical knot duplicatable none p [1];
  3653. signal knot out flow [1];
  3654. restrictions
  3655. causality constraint one_out p;
  3656. end;
  3657. icon bg top
  3658. figures
  3659. text '1' 296 176 color 0 18 bold;
  3660. end;
  3661. implementation eq
  3662. equations
  3663. sum (direct (p.e)) = 0;
  3664. equal (collect (p.f));
  3665. flow = first (p.f);
  3666. implementation_end;
  3667. X0 224 176
  3668. description '<Description>
  3669. <IsMainModel>0</IsMainModel>
  3670. <KeepParameterValues>False</KeepParameterValues>
  3671. </Description>';
  3672. type X0
  3673. ports
  3674. power in p1;
  3675. power out p2;
  3676. power out p12;
  3677. signal boolean in condition;
  3678. restrictions
  3679. causality fixed out p1;
  3680. causality fixed out p2;
  3681. causality fixed in p12;
  3682. end;
  3683. icon bg
  3684. figures
  3685. text 'X0' 224 176 color 8388608 18 bold;
  3686. end;
  3687. implementation eq
  3688. equations
  3689. p1.e = if condition then p12.e else 0 end;
  3690. p2.e = p1.e;
  3691. p12.f = if condition then p1.f-p2.f else 0 end;
  3692. implementation_end;
  3693. x1 160 304
  3694. description '<Description>
  3695. <IsMainModel>0</IsMainModel>
  3696. <KeepParameterValues>False</KeepParameterValues>
  3697. </Description>';
  3698. type Integrate
  3699. ports
  3700. signal in input;
  3701. signal out output;
  3702. parameters
  3703. real Initial = -1.131;
  3704. end;
  3705. icon bg left
  3706. figures
  3707. rectangle 145 289 175 319 color 0 fill 15132390;
  3708. text 'ò' 157.5 304 color 16711680 'SymbolProp BT' 21 symbol;
  3709. end;
  3710. implementation eq
  3711. equations
  3712. output = int (input, Initial);
  3713. implementation_end;
  3714. x12 224 304
  3715. description '<Description>
  3716. <IsMainModel>0</IsMainModel>
  3717. <KeepParameterValues>False</KeepParameterValues>
  3718. </Description>';
  3719. knot PlusMinus
  3720. ports
  3721. signal knot duplicatable in plus [1];
  3722. signal knot duplicatable in minus [1];
  3723. signal knot out output [1];
  3724. end;
  3725. icon bg ellipse bottom
  3726. figures
  3727. ellipse 216.5 296.5 231.5 311.5 color 0 fill 16777215;
  3728. end;
  3729. implementation eq
  3730. equations
  3731. output = sum (collect (plus)) - sum (collect (minus));
  3732. implementation_end;
  3733. x2 296 304
  3734. description '<Description>
  3735. <IsMainModel>0</IsMainModel>
  3736. <KeepParameterValues>False</KeepParameterValues>
  3737. </Description>';
  3738. type Integrate
  3739. ports
  3740. signal in input;
  3741. signal out output;
  3742. parameters
  3743. real Initial = -1.13;
  3744. end;
  3745. icon bg right
  3746. figures
  3747. rectangle 281 289 311 319 color 0 fill 15132390;
  3748. text 'ò' 293.5 304 color 16711680 'SymbolProp BT' 21 symbol;
  3749. end;
  3750. implementation eq
  3751. equations
  3752. output = int (input, Initial);
  3753. implementation_end;
  3754. end;
  3755. connections
  3756. Condition1\contact -> Splitter1\input;
  3757. p1 => v1\p;
  3758. Splitter1\output -> collision;
  3759. Splitter1\output -> X0\condition;
  3760. v1\flow -> x1\input;
  3761. v1\p => X0\p1;
  3762. v12\p => p12;
  3763. v2\flow -> x2\input;
  3764. v2\p => p2;
  3765. X0\p12 => v12\p;
  3766. X0\p2 => v2\p;
  3767. x1\output -> x12\plus;
  3768. x12\output -> Condition1\dx;
  3769. x2\output -> x12\minus;
  3770. end;
  3771. parameterrelations
  3772. x1\Initial = EndstopLocation;
  3773. x2\Initial = InitialPos;parameterrelations_end;
  3774. implementation_end;
  3775. plug p2 152 120;
  3776. plug collision 360 120;
  3777. OneJunction 248 160
  3778. description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
  3779. <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  3780. <TimeStamp>2007-9-27 9:51:18</TimeStamp>
  3781. </Description>';
  3782. knot OneJunction
  3783. ports
  3784. power knot duplicatable none p [1];
  3785. signal knot out flow [1];
  3786. restrictions
  3787. causality constraint one_out p;
  3788. end;
  3789. icon bg
  3790. figures
  3791. text '1' 248 160 color 0 18 bold;
  3792. end;
  3793. implementation eq
  3794. equations
  3795. sum (direct (p.e)) = 0;
  3796. equal (collect (p.f));
  3797. flow = first (p.f);
  3798. implementation_end;
  3799. Rendstop 288 160
  3800. description '<Description>
  3801. <Version>4.0</Version>
  3802. <IsMainModel>1</IsMainModel>
  3803. <KeepParameterValues>False</KeepParameterValues>
  3804. <LibraryPath>Bond Graph\R.emx</LibraryPath>
  3805. <TimeStamp>2007-9-25 12:3:18</TimeStamp>
  3806. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  3807. </Description>';
  3808. type R
  3809. ports
  3810. power in p;
  3811. parameters
  3812. real Rendstop = 1000.0;
  3813. end;
  3814. icon bg bottom
  3815. figures
  3816. text 'R' 288 160 color 0 18 bold;
  3817. end;
  3818. implementation eq
  3819. equations
  3820. p.e = Rendstop * p.f;
  3821. implementation_end;
  3822. Sf2 248 64
  3823. description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
  3824. <LibraryPath>Bond Graph\Sf.emx</LibraryPath>
  3825. <TimeStamp>2007-9-25 12:3:35</TimeStamp>
  3826. </Description>';
  3827. type Sf
  3828. ports
  3829. power out p;
  3830. restrictions
  3831. causality fixed in p;
  3832. end;
  3833. icon bg bottom
  3834. figures
  3835. text 'Sf' 248 64 color 0 18 bold;
  3836. end;
  3837. implementation eq
  3838. parameters
  3839. real flow = 0.0;
  3840. variables
  3841. real effort;
  3842. equations
  3843. p.f = flow;
  3844. effort = p.e;
  3845. implementation_end;
  3846. end;
  3847. connections
  3848. Collision\collision -> collision;
  3849. Collision\p12 => OneJunction\p;
  3850. Collision\p2 => p2;
  3851. OneJunction\p => Cendstop\p;
  3852. OneJunction\p => Rendstop\p;
  3853. Sf2\p => Collision\p1;
  3854. end;
  3855. parameterrelations
  3856. Cendstop\Cendstop = Cendstop;
  3857. Rendstop\Rendstop = Rendstop;
  3858. Collision\InitialPos = InitialPos;
  3859. Collision\EndstopLocation = EndstopPos;parameterrelations_end;
  3860. implementation_end;
  3861. Integrate 320 336
  3862. description '<Description>
  3863. <Version>4.0</Version>
  3864. <IsMainModel>1</IsMainModel>
  3865. <KeepParameterValues>False</KeepParameterValues>
  3866. <LibraryPath>Signal\Block Diagram\Integrate.emx</LibraryPath>
  3867. <TimeStamp>2007-9-26 12:3:23</TimeStamp>
  3868. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  3869. </Description>';
  3870. type Integrate
  3871. ports
  3872. signal in input;
  3873. signal out output [4,4];
  3874. parameters
  3875. real init = -1.13;
  3876. end;
  3877. icon bg
  3878. figures
  3879. rectangle 304 320 336 352 color 0 fill 15132390;
  3880. text 'ò' 320 333.3 color 16711680 'SymbolProp BT' 21 symbol;
  3881. end;
  3882. implementation eq
  3883. variables
  3884. real R[3,3];
  3885. real p[3];
  3886. real q;
  3887. equations
  3888. q = int(input,init);
  3889. R = [ cos(q), 0, sin(q);
  3890. 0, 1, 0;
  3891. -sin(q), 0, cos(q)];
  3892. p = [0;0;0];
  3893. output = homogeneous(R,p);
  3894. implementation_end;
  3895. MatrixMul 320 496
  3896. description '<Description>
  3897. <Version>4.0</Version>
  3898. <IsMainModel>1</IsMainModel>
  3899. <KeepParameterValues>False</KeepParameterValues>
  3900. <LibraryPath>Signal\Block Diagram\Gain.emx</LibraryPath>
  3901. <TimeStamp>2007-9-26 12:15:12</TimeStamp>
  3902. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  3903. </Description>';
  3904. type Gain
  3905. ports
  3906. signal in input1 [4,4];
  3907. signal out output [4,4];
  3908. signal in input2 [4,4];
  3909. end;
  3910. icon bg bottom
  3911. figures
  3912. rectangle 304.1 480 335.9 512 color 0 fill 15132390;
  3913. text 'X' 320 496 color 16711680 16 bold;
  3914. end;
  3915. implementation eq
  3916. equations
  3917. output = input2*input1; implementation_end;
  3918. plug p1 240 56;
  3919. plug p2 496 424;
  3920. plug Hin 112 496;
  3921. plug Hout 504 496;
  3922. plug p 112 424;
  3923. OneJunction 240 272
  3924. description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
  3925. <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  3926. <TimeStamp>2007-9-27 9:51:18</TimeStamp>
  3927. </Description>';
  3928. knot OneJunction
  3929. ports
  3930. power knot duplicatable none p [1];
  3931. signal knot out flow [1];
  3932. restrictions
  3933. causality constraint one_out p;
  3934. end;
  3935. icon bg
  3936. figures
  3937. text '1' 240 272 color 0 18 bold;
  3938. end;
  3939. implementation eq
  3940. equations
  3941. sum (direct (p.e)) = 0;
  3942. equal (collect (p.f));
  3943. flow = first (p.f);
  3944. implementation_end;
  3945. Or 392 216
  3946. description '<Description>
  3947. <Version>4.0</Version>
  3948. <IsMainModel>1</IsMainModel>
  3949. <KeepParameterValues>False</KeepParameterValues>
  3950. <LibraryPath>Signal\Logical\Discrete\Or.emx</LibraryPath>
  3951. <TimeStamp>2007-12-18 23:20:57</TimeStamp>
  3952. </Description>';
  3953. type 'Or-Or'
  3954. ports
  3955. signal boolean in input1;
  3956. signal boolean out output;
  3957. signal boolean in input2;
  3958. end;
  3959. icon bg bottom
  3960. figures
  3961. rectangle 376.1 200 407.9 232 color 0 fill 15132390;
  3962. group
  3963. line 378.3 209.3 388.8 209.3 color 16711680 fill 16711680;
  3964. line 378.3 223.1 388.8 223.1 color 16711680 fill 16711680;
  3965. end;
  3966. spline 387.9 204.8 389.9 216.5 387.9 227.7 color 16711680 fill 16711680;
  3967. line 396.7 216 405.5 216 color 16711680 fill 16711680;
  3968. spline 387.7 204.3 393.9 206.6 396.8 216.4 393.6 225.4 387.7 227.7 color 16711680 fill 15132390;
  3969. end;
  3970. implementation eq
  3971. equations
  3972. output = if input1 or input2 then
  3973. true
  3974. else
  3975. false
  3976. end;
  3977. implementation_end;
  3978. Rjoint 192 272
  3979. description '<Description>
  3980. <Version>4.0</Version>
  3981. <IsMainModel>1</IsMainModel>
  3982. <KeepParameterValues>False</KeepParameterValues>
  3983. <LibraryPath>Bond Graph\R.emx</LibraryPath>
  3984. <TimeStamp>2007-9-25 12:3:18</TimeStamp>
  3985. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  3986. </Description>';
  3987. type R
  3988. ports
  3989. power in p;
  3990. parameters
  3991. real Rjoint = 0.1;
  3992. end;
  3993. icon bg bottom
  3994. figures
  3995. text 'R' 192 272 color 0 18 bold;
  3996. end;
  3997. implementation eq
  3998. equations
  3999. p.e = Rjoint * p.f;
  4000. implementation_end;
  4001. Splitter2 320 368
  4002. description '<Description><Version>4.0</Version>
  4003. <LibraryPath>Signal\Block Diagram\Splitter.emx</LibraryPath>
  4004. <TimeStamp>2008-01-17 11:28:29</TimeStamp>
  4005. <IsMainModel>1</IsMainModel>
  4006. <KeepParameterValues>False</KeepParameterValues>
  4007. </Description>';
  4008. knot Splitter
  4009. ports
  4010. signal knot duplicatable out output [4,4];
  4011. signal knot in input [4,4];
  4012. end;
  4013. icon bg ellipse
  4014. figures
  4015. ellipse 316.8 364.8 323.2 371.2 color -1 fill 0;
  4016. ellipse 315.7 363.7 324.3 372.3 color -1;
  4017. terminals
  4018. input 320 368 fixed;
  4019. end;
  4020. implementation eq
  4021. equations
  4022. collect (output) = input;
  4023. implementation_end;
  4024. Tbai 240 384
  4025. description '<Description>
  4026. <Version>4.0</Version>
  4027. <IsMainModel>1</IsMainModel>
  4028. <KeepParameterValues>False</KeepParameterValues>
  4029. <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  4030. <TimeStamp>2007-9-27 9:51:18</TimeStamp>
  4031. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  4032. </Description>';
  4033. knot OneJunction
  4034. ports
  4035. power knot duplicatable none p [6,1];
  4036. signal knot out flow [6,1];
  4037. restrictions
  4038. causality constraint one_out p;
  4039. end;
  4040. icon bg left
  4041. figures
  4042. text '1' 240 384 color 0 18 bold;
  4043. end;
  4044. implementation eq
  4045. equations
  4046. sum (direct (p.e)) = 0;
  4047. equal (collect (p.f));
  4048. flow = first (p.f);
  4049. implementation_end;
  4050. uTbai 240 328
  4051. description '<Description>
  4052. <Version>4.0</Version>
  4053. <IsMainModel>1</IsMainModel>
  4054. <KeepParameterValues>False</KeepParameterValues>
  4055. <LibraryPath>Bond Graph\TF.emx</LibraryPath>
  4056. <TimeStamp>2007-9-25 12:4:2</TimeStamp>
  4057. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  4058. </Description>';
  4059. type TF
  4060. ports
  4061. power in p1;
  4062. power out p2 [6,1];
  4063. restrictions
  4064. causality constraint not_equal p1 p2;
  4065. parameters
  4066. real Rconstraint = 1000.0;
  4067. real Cconstraint = 1.0e-4;
  4068. end;
  4069. icon bg left
  4070. figures
  4071. text 'TF' 240 328 color 0 18 bold;
  4072. end;
  4073. implementation eq
  4074. equations
  4075. p2.e[1] = (Rconstraint*-p2.f[1] + int(-p2.f[1])/Cconstraint);
  4076. p2.e[2] = p1.e;
  4077. p2.e[3] = (Rconstraint*-p2.f[3] + int(-p2.f[3])/Cconstraint);
  4078. p2.e[4] = (Rconstraint*-p2.f[4] + int(-p2.f[4])/Cconstraint);
  4079. p2.e[5] = (Rconstraint*-p2.f[5] + int(-p2.f[5])/Cconstraint);
  4080. p2.e[6] = (Rconstraint*-p2.f[6] + int(-p2.f[6])/Cconstraint);
  4081. p1.f = p2.f[2];
  4082. implementation_end;
  4083. Wbai 240 424
  4084. description '<Description>
  4085. <Version>4.0</Version>
  4086. <IsMainModel>1</IsMainModel>
  4087. <KeepParameterValues>False</KeepParameterValues>
  4088. <LibraryPath>Bond Graph\ZeroJunction.emx</LibraryPath>
  4089. <TimeStamp>2007-9-27 9:51:43</TimeStamp>
  4090. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  4091. </Description>';
  4092. knot ZeroJunction
  4093. ports
  4094. power knot duplicatable none p [6,1];
  4095. signal knot out effort [6,1];
  4096. restrictions
  4097. causality constraint one_in p;
  4098. end;
  4099. icon bg bottom
  4100. figures
  4101. text '0' 240 424 color 0 18 bold;
  4102. end;
  4103. implementation eq
  4104. equations
  4105. sum (direct (p.f)) = 0;
  4106. equal (collect (p.e));
  4107. effort = first (p.e);
  4108. implementation_end;
  4109. ZeroJunction 240 104
  4110. description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
  4111. <LibraryPath>Bond Graph\ZeroJunction.emx</LibraryPath>
  4112. <TimeStamp>2007-9-27 9:51:43</TimeStamp>
  4113. </Description>';
  4114. knot ZeroJunction
  4115. ports
  4116. power knot duplicatable none p [1];
  4117. signal knot out effort [1];
  4118. restrictions
  4119. causality constraint one_in p;
  4120. end;
  4121. icon bg
  4122. figures
  4123. text '0' 240 104 color 0 18 bold;
  4124. end;
  4125. implementation eq
  4126. equations
  4127. sum (direct (p.f)) = 0;
  4128. equal (collect (p.e));
  4129. effort = first (p.e);
  4130. implementation_end;
  4131. end;
  4132. connections
  4133. EndstopMax\collision -> Or\input1;
  4134. EndstopMin\collision -> Or\input2;
  4135. Hin -> MatrixMul\input2;
  4136. Integrate\output -> Splitter2\input;
  4137. MatrixMul\output -> Hout;
  4138. OneJunction\flow -> Integrate\input 320 272;
  4139. OneJunction\p <= EndstopMax\p2;
  4140. OneJunction\p <= EndstopMin\p2;
  4141. OneJunction\p => Rjoint\p;
  4142. OneJunction\p => uTbai\p1;
  4143. p <= Wbai\p;
  4144. p1 => ZeroJunction\p;
  4145. p2 => AdHji\p2;
  4146. Splitter2\output -> AdHji\H 424 368;
  4147. Splitter2\output -> MatrixMul\input1;
  4148. Tbai\p => Wbai\p;
  4149. uTbai\p2 => Tbai\p;
  4150. Wbai\p <= AdHji\p1;
  4151. ZeroJunction\p => OneJunction\p;
  4152. end;
  4153. parameterrelations
  4154. EndstopMin\Rendstop = Rendstop;
  4155. EndstopMin\Cendstop = Cendstop;
  4156. EndstopMin\InitialPos = InitialPos;
  4157. EndstopMin\EndstopPos = MinEndstopPos;
  4158. EndstopMax\Rendstop = Rendstop;
  4159. EndstopMax\Cendstop = Cendstop;
  4160. EndstopMax\InitialPos = InitialPos;
  4161. EndstopMax\EndstopPos = MaxEndstopPos;
  4162. Rjoint\Rjoint= Rjoint;
  4163. Integrate\init = InitialPos;
  4164. uTbai\Rconstraint = Rconstraint;
  4165. uTbai\Cconstraint = Cconstraint;parameterrelations_end;
  4166. figures
  4167. text 'b = next link (body)
  4168. a = previous link (body)
  4169. i = Frame fixed in previous body, fixed in joint
  4170. j = Frame fixed in next body, fixed in joint
  4171. ' 744 400 color 0;
  4172. implementation_end;
  4173. JointBase2 296.2 296
  4174. description '<Description>
  4175. <Version>4.1</Version>
  4176. <IsMainModel>1</IsMainModel>
  4177. <KeepParameterValues>False</KeepParameterValues>
  4178. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  4179. <LibraryPath>Joint-roty.emx</LibraryPath>
  4180. <TimeStamp>2011-1-18 17:30:05</TimeStamp>
  4181. </Description>';
  4182. type 'Submodel-roty'
  4183. ports
  4184. power out p [6,1];
  4185. power in p1;
  4186. power in p2 [6,1];
  4187. signal in Hin [4,4];
  4188. signal out Hout [4,4];
  4189. parameters
  4190. real Rconstraint = 1000.0;
  4191. real Cconstraint = 1.0e-4;
  4192. real Rendstop = 1000.0;
  4193. real Cendstop = 1.0e-4;
  4194. real InitialPos = 0.0;
  4195. real MaxEndstopPos = 1.57;
  4196. real MinEndstopPos = -1.131;
  4197. real Rjoint = 0.1;
  4198. end;
  4199. icon bg bottom
  4200. figures
  4201. rectangle 264.5 224 328 368 color 0 fill 14745599;
  4202. text 'Joint-roty' 296.5 299 color 0;
  4203. terminals
  4204. p 264 256 fixed;
  4205. p1 295.5 224 fixed;
  4206. p2 328 256 fixed;
  4207. Hin 264 336 fixed;
  4208. Hout 328 336 fixed;
  4209. end;
  4210. implementation bg
  4211. submodels
  4212. AdHji 424 424
  4213. description '<Description>
  4214. <Version>4.0</Version>
  4215. <IsMainModel>1</IsMainModel>
  4216. <KeepParameterValues>False</KeepParameterValues>
  4217. <LibraryPath>Bond Graph\MTF.emx</LibraryPath>
  4218. <TimeStamp>2007-9-25 12:3:3</TimeStamp>
  4219. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  4220. </Description>';
  4221. type MTF
  4222. ports
  4223. power out p1 [6,1];
  4224. power in p2 [6,1];
  4225. signal in H [4,4];
  4226. restrictions
  4227. causality constraint not_equal p1 p2;
  4228. end;
  4229. icon bg bottom
  4230. figures
  4231. text 'MTF' 424 424 color 0 18 bold;
  4232. end;
  4233. implementation eq
  4234. equations
  4235. p2.e = transpose(Adjoint(H)) * p1.e;
  4236. p1.f = Adjoint(H) * p2.f;implementation_end;
  4237. EndstopMax 471 217
  4238. description '<Description>
  4239. <Version>4.1</Version>
  4240. <IsMainModel>1</IsMainModel>
  4241. <KeepParameterValues>False</KeepParameterValues>
  4242. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  4243. </Description>';
  4244. type Submodel
  4245. ports
  4246. power out p2;
  4247. signal boolean out collision;
  4248. parameters
  4249. real Rendstop = 1000.0;
  4250. real Cendstop = 1.0e-4;
  4251. real InitialPos = -1.13;
  4252. real EndstopPos = 1.57;
  4253. end;
  4254. icon bg bottom
  4255. figures
  4256. rectangle 422 194 520 240 color 0 fill 14013909;
  4257. text 'EndstopMax' 472 216 color 0 16;
  4258. terminals
  4259. p2 472 240 fixed;
  4260. end;
  4261. implementation bg
  4262. submodels
  4263. Cendstop 704 144
  4264. description '<Description>
  4265. <Version>4.0</Version>
  4266. <IsMainModel>1</IsMainModel>
  4267. <KeepParameterValues>False</KeepParameterValues>
  4268. <LibraryPath>Bond Graph\C.emx</LibraryPath>
  4269. <TimeStamp>2007-10-31 10:43:59</TimeStamp>
  4270. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  4271. </Description>';
  4272. type C
  4273. ports
  4274. power in p;
  4275. signal out state;
  4276. restrictions
  4277. causality preferred out p;
  4278. parameters
  4279. real Cendstop = 1.0e-4;
  4280. end;
  4281. icon bg right
  4282. figures
  4283. text 'C' 704 144 color 0 18 bold;
  4284. end;
  4285. implementation eq
  4286. equations
  4287. state = int(p.f);
  4288. p.e = state / Cendstop;
  4289. implementation_end;
  4290. Collision 704 216
  4291. description '<Description>
  4292. <Version>No Version Info</Version>
  4293. <IsMainModel>0</IsMainModel>
  4294. <KeepParameterValues>False</KeepParameterValues>
  4295. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  4296. </Description>';
  4297. type X0e
  4298. ports
  4299. power in p1;
  4300. power out p2;
  4301. power out p12;
  4302. signal boolean out Collision;
  4303. restrictions
  4304. causality fixed in p12;
  4305. causality fixed out p2;
  4306. causality fixed out p1;
  4307. parameters
  4308. real InitialPos = -1.13;
  4309. real EndstopPos = 1.57;
  4310. end;
  4311. icon bg
  4312. figures
  4313. text 'X0e' 704 216 color 0 18 bold;
  4314. end;
  4315. implementation bg
  4316. submodels
  4317. Condition1 224.9 231.5
  4318. type Condition
  4319. ports
  4320. signal in dx;
  4321. signal boolean out contact;
  4322. end;
  4323. icon bg
  4324. figures
  4325. rectangle 197.2 215 252.6 248 color 0 fill 15132390;
  4326. text 'Condition' 224 231.5 color 0;
  4327. terminals
  4328. dx 224 248 fixed;
  4329. contact 224 215 fixed;
  4330. end;
  4331. implementation eq
  4332. parameters
  4333. real global epsilon;
  4334. variables
  4335. boolean bounce;
  4336. equations
  4337. contact = if dx - epsilon < 0 then true else false end;
  4338. bounce = event (dx - epsilon);implementation_end;
  4339. plug p1 96 176;
  4340. plug p2 352 176;
  4341. plug p12 224 64;
  4342. plug Collision 408 192;
  4343. Splitter1 224 200
  4344. description '<Description><Version>4.0</Version>
  4345. <LibraryPath>C:\Program Files\20-sim 4.0\System\SplitterBoolean.emx</LibraryPath>
  4346. <TimeStamp>2007-10-31 11:27:48</TimeStamp>
  4347. <IsMainModel>1</IsMainModel>
  4348. <KeepParameterValues>False</KeepParameterValues>
  4349. </Description>';
  4350. knot Splitter
  4351. ports
  4352. signal knot boolean duplicatable out output [1];
  4353. signal knot boolean in input [1];
  4354. end;
  4355. icon bg ellipse
  4356. figures
  4357. ellipse 220.8 196.8 227.2 203.2 color -1 fill 0;
  4358. ellipse 219.7 195.7 228.3 204.3 color -1;
  4359. terminals
  4360. input 224 200 fixed;
  4361. end;
  4362. implementation eq
  4363. equations
  4364. collect (output) = input;
  4365. implementation_end;
  4366. v1 160 176
  4367. description '<Description>
  4368. <IsMainModel>0</IsMainModel>
  4369. <KeepParameterValues>False</KeepParameterValues>
  4370. </Description>';
  4371. knot OneJunction
  4372. ports
  4373. mechanical knot duplicatable none p [1];
  4374. signal knot out flow [1];
  4375. restrictions
  4376. causality constraint one_out p;
  4377. end;
  4378. icon bg top
  4379. figures
  4380. text '1' 160 176 color 0 18 bold;
  4381. end;
  4382. implementation eq
  4383. equations
  4384. sum (direct (p.e)) = 0;
  4385. equal (collect (p.f));
  4386. flow = first (p.f);
  4387. implementation_end;
  4388. v12 224 120
  4389. description '<Description>
  4390. <IsMainModel>0</IsMainModel>
  4391. <KeepParameterValues>False</KeepParameterValues>
  4392. </Description>';
  4393. knot OneJunction
  4394. ports
  4395. mechanical knot duplicatable none p [1];
  4396. signal knot out flow [1];
  4397. restrictions
  4398. causality constraint one_out p;
  4399. end;
  4400. icon bg right
  4401. figures
  4402. text '1' 224 120 color 0 18 bold;
  4403. end;
  4404. implementation eq
  4405. equations
  4406. sum (direct (p.e)) = 0;
  4407. equal (collect (p.f));
  4408. flow = first (p.f);
  4409. implementation_end;
  4410. v2 296 176
  4411. description '<Description>
  4412. <IsMainModel>0</IsMainModel>
  4413. <KeepParameterValues>False</KeepParameterValues>
  4414. </Description>';
  4415. knot OneJunction
  4416. ports
  4417. mechanical knot duplicatable none p [1];
  4418. signal knot out flow [1];
  4419. restrictions
  4420. causality constraint one_out p;
  4421. end;
  4422. icon bg top
  4423. figures
  4424. text '1' 296 176 color 0 18 bold;
  4425. end;
  4426. implementation eq
  4427. equations
  4428. sum (direct (p.e)) = 0;
  4429. equal (collect (p.f));
  4430. flow = first (p.f);
  4431. implementation_end;
  4432. X0 224 176
  4433. description '<Description>
  4434. <IsMainModel>0</IsMainModel>
  4435. <KeepParameterValues>False</KeepParameterValues>
  4436. </Description>';
  4437. type X0
  4438. ports
  4439. mechanical in p1;
  4440. mechanical out p2;
  4441. mechanical out p12;
  4442. signal boolean in condition;
  4443. restrictions
  4444. causality fixed out p1;
  4445. causality fixed out p2;
  4446. causality fixed in p12;
  4447. end;
  4448. icon bg
  4449. figures
  4450. text 'X0' 224 176 color 8388608 18 bold;
  4451. end;
  4452. implementation eq
  4453. equations
  4454. p1.e = if condition then p12.e else 0 end;
  4455. p2.e = p1.e;
  4456. p12.f = if condition then p1.f-p2.f else 0 end;
  4457. implementation_end;
  4458. x1 160 304
  4459. description '<Description>
  4460. <IsMainModel>0</IsMainModel>
  4461. <KeepParameterValues>False</KeepParameterValues>
  4462. </Description>';
  4463. type Integrate
  4464. ports
  4465. signal in input;
  4466. signal out output;
  4467. parameters
  4468. real Initial = 1.57;
  4469. end;
  4470. icon bg left
  4471. figures
  4472. rectangle 145 289 175 319 color 0 fill 15132390;
  4473. text 'ò' 157.5 304 color 16711680 'SymbolProp BT' 21 symbol;
  4474. end;
  4475. implementation eq
  4476. equations
  4477. output = int (input, Initial);
  4478. implementation_end;
  4479. x12 224 304
  4480. description '<Description>
  4481. <IsMainModel>0</IsMainModel>
  4482. <KeepParameterValues>False</KeepParameterValues>
  4483. </Description>';
  4484. knot PlusMinus
  4485. ports
  4486. signal knot duplicatable in plus [1];
  4487. signal knot duplicatable in minus [1];
  4488. signal knot out output [1];
  4489. end;
  4490. icon bg ellipse bottom
  4491. figures
  4492. ellipse 216.5 296.5 231.5 311.5 color 0 fill 16777215;
  4493. end;
  4494. implementation eq
  4495. equations
  4496. output = sum (collect (plus)) - sum (collect (minus));
  4497. implementation_end;
  4498. x2 296 304
  4499. description '<Description>
  4500. <IsMainModel>0</IsMainModel>
  4501. <KeepParameterValues>False</KeepParameterValues>
  4502. </Description>';
  4503. type Integrate
  4504. ports
  4505. signal in input;
  4506. signal out output;
  4507. parameters
  4508. real Initial = -1.13;
  4509. end;
  4510. icon bg right
  4511. figures
  4512. rectangle 281 289 311 319 color 0 fill 15132390;
  4513. text 'ò' 293.5 304 color 16711680 'SymbolProp BT' 21 symbol;
  4514. end;
  4515. implementation eq
  4516. equations
  4517. output = int (input, Initial);
  4518. implementation_end;
  4519. end;
  4520. connections
  4521. Condition1\contact -> Splitter1\input;
  4522. p1 => v1\p;
  4523. Splitter1\output -> Collision;
  4524. Splitter1\output -> X0\condition;
  4525. v1\flow -> x1\input;
  4526. v1\p => X0\p1;
  4527. v12\p => p12;
  4528. v2\flow -> x2\input;
  4529. v2\p => p2;
  4530. X0\p12 => v12\p;
  4531. X0\p2 => v2\p;
  4532. x1\output -> x12\plus;
  4533. x12\output -> Condition1\dx;
  4534. x2\output -> x12\minus;
  4535. end;
  4536. parameterrelations
  4537. x1\Initial = EndstopPos;
  4538. x2\Initial = InitialPos;parameterrelations_end;
  4539. implementation_end;
  4540. plug p2 648 216;
  4541. plug collision 800 216;
  4542. OneJunction5 704 176
  4543. description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
  4544. <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  4545. <TimeStamp>2007-9-27 9:51:18</TimeStamp>
  4546. </Description>';
  4547. knot OneJunction
  4548. ports
  4549. mechanical knot duplicatable none p [1];
  4550. signal knot out flow [1];
  4551. restrictions
  4552. causality constraint one_out p;
  4553. end;
  4554. icon bg
  4555. figures
  4556. text '1' 704 176 color 0 18 bold;
  4557. end;
  4558. implementation eq
  4559. equations
  4560. sum (direct (p.e)) = 0;
  4561. equal (collect (p.f));
  4562. flow = first (p.f);
  4563. implementation_end;
  4564. Rendstop 736 176
  4565. description '<Description>
  4566. <Version>4.0</Version>
  4567. <IsMainModel>1</IsMainModel>
  4568. <KeepParameterValues>False</KeepParameterValues>
  4569. <LibraryPath>Bond Graph\R.emx</LibraryPath>
  4570. <TimeStamp>2007-9-25 12:3:18</TimeStamp>
  4571. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  4572. </Description>';
  4573. type R
  4574. ports
  4575. power in p;
  4576. parameters
  4577. real Rendstop = 1000.0;
  4578. end;
  4579. icon bg bottom
  4580. figures
  4581. text 'R' 736 176 color 0 18 bold;
  4582. end;
  4583. implementation eq
  4584. equations
  4585. p.e = Rendstop * p.f;
  4586. implementation_end;
  4587. Sf1 704 264
  4588. description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
  4589. <LibraryPath>Bond Graph\Sf.emx</LibraryPath>
  4590. <TimeStamp>2007-9-25 12:3:35</TimeStamp>
  4591. </Description>';
  4592. type Sf
  4593. ports
  4594. power out p;
  4595. restrictions
  4596. causality fixed in p;
  4597. end;
  4598. icon bg bottom
  4599. figures
  4600. text 'Sf' 704 264 color 0 18 bold;
  4601. end;
  4602. implementation eq
  4603. parameters
  4604. real flow = 0.0;
  4605. variables
  4606. real effort;
  4607. equations
  4608. p.f = flow;
  4609. effort = p.e;
  4610. implementation_end;
  4611. end;
  4612. connections
  4613. Collision\Collision -> collision;
  4614. Collision\p12 => OneJunction5\p;
  4615. Collision\p2 => p2;
  4616. OneJunction5\p => Cendstop\p;
  4617. OneJunction5\p => Rendstop\p;
  4618. Sf1\p => Collision\p1;
  4619. end;
  4620. parameterrelations
  4621. Collision\InitialPos = InitialPos;
  4622. Collision\EndstopPos = EndstopPos;
  4623. Rendstop\Rendstop = Rendstop;
  4624. Cendstop\Cendstop = Cendstop;parameterrelations_end;
  4625. implementation_end;
  4626. EndstopMin 312 216
  4627. description '<Description>
  4628. <Version>4.1</Version>
  4629. <IsMainModel>1</IsMainModel>
  4630. <KeepParameterValues>False</KeepParameterValues>
  4631. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  4632. <LibraryPath>EndstopMin.emx</LibraryPath>
  4633. <TimeStamp>2011-1-18 14:37:57</TimeStamp>
  4634. </Description>';
  4635. type Submodel
  4636. ports
  4637. power out p2;
  4638. signal boolean out collision;
  4639. parameters
  4640. real Cendstop = 1.0e-4;
  4641. real Rendstop = 1000.0;
  4642. real InitialPos = -1.13;
  4643. real EndstopPos = -1.131;
  4644. end;
  4645. icon bg bottom
  4646. figures
  4647. rectangle 263 193 361 239 color 0 fill 14013909;
  4648. text 'EndstopMin' 313 215 color 0 16;
  4649. end;
  4650. implementation bg
  4651. submodels
  4652. Cendstop 248 208
  4653. description '<Description>
  4654. <Version>4.0</Version>
  4655. <IsMainModel>1</IsMainModel>
  4656. <KeepParameterValues>False</KeepParameterValues>
  4657. <LibraryPath>Bond Graph\C.emx</LibraryPath>
  4658. <TimeStamp>2007-10-31 10:43:59</TimeStamp>
  4659. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  4660. </Description>';
  4661. type C
  4662. ports
  4663. power in p;
  4664. signal out state;
  4665. restrictions
  4666. causality preferred out p;
  4667. parameters
  4668. real Cendstop = 1.0e-4;
  4669. end;
  4670. icon bg right
  4671. figures
  4672. text 'C' 248 208 color 0 18 bold;
  4673. end;
  4674. implementation eq
  4675. equations
  4676. state = int(p.f);
  4677. p.e = state / Cendstop;
  4678. implementation_end;
  4679. Collision 248 120
  4680. description '<Description>
  4681. <Version>No Version Info</Version>
  4682. <IsMainModel>0</IsMainModel>
  4683. <KeepParameterValues>False</KeepParameterValues>
  4684. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  4685. </Description>';
  4686. type X0e
  4687. ports
  4688. power in p1;
  4689. power out p2;
  4690. power out p12;
  4691. signal boolean out collision;
  4692. restrictions
  4693. causality fixed out p1;
  4694. causality fixed out p2;
  4695. causality fixed in p12;
  4696. parameters
  4697. real InitialPos = -1.13;
  4698. real EndstopLocation = -1.131;
  4699. end;
  4700. icon bg
  4701. figures
  4702. text 'X0e' 248 120 color 0 18 bold;
  4703. end;
  4704. implementation bg
  4705. submodels
  4706. Condition1 224.9 231.5
  4707. type Condition
  4708. ports
  4709. signal in dx;
  4710. signal boolean out contact;
  4711. end;
  4712. icon bg
  4713. figures
  4714. rectangle 197.2 215 252.6 248 color 0 fill 15132390;
  4715. text 'Condition' 224 231.5 color 0;
  4716. terminals
  4717. dx 224 248 fixed;
  4718. contact 224 215 fixed;
  4719. end;
  4720. implementation eq
  4721. parameters
  4722. real global epsilon;
  4723. variables
  4724. boolean bounce;
  4725. equations
  4726. contact = if dx - epsilon > 0 then true else false end;
  4727. bounce = event (dx - epsilon);implementation_end;
  4728. plug p1 96 176;
  4729. plug p2 352 176;
  4730. plug p12 224 64;
  4731. plug collision 400 200;
  4732. Splitter1 224 200
  4733. description '<Description><Version>4.0</Version>
  4734. <LibraryPath>C:\Program Files\20-sim 4.0\System\SplitterBoolean.emx</LibraryPath>
  4735. <TimeStamp>2007-10-31 11:27:48</TimeStamp>
  4736. <IsMainModel>1</IsMainModel>
  4737. <KeepParameterValues>False</KeepParameterValues>
  4738. </Description>';
  4739. knot Splitter
  4740. ports
  4741. signal knot boolean duplicatable out output [1];
  4742. signal knot boolean in input [1];
  4743. end;
  4744. icon bg ellipse
  4745. figures
  4746. ellipse 220.8 196.8 227.2 203.2 color -1 fill 0;
  4747. ellipse 219.7 195.7 228.3 204.3 color -1;
  4748. terminals
  4749. input 224 200 fixed;
  4750. end;
  4751. implementation eq
  4752. equations
  4753. collect (output) = input;
  4754. implementation_end;
  4755. v1 160 176
  4756. description '<Description>
  4757. <IsMainModel>0</IsMainModel>
  4758. <KeepParameterValues>False</KeepParameterValues>
  4759. </Description>';
  4760. knot OneJunction
  4761. ports
  4762. mechanical knot duplicatable none p [1];
  4763. signal knot out flow [1];
  4764. restrictions
  4765. causality constraint one_out p;
  4766. end;
  4767. icon bg top
  4768. figures
  4769. text '1' 160 176 color 0 18 bold;
  4770. end;
  4771. implementation eq
  4772. equations
  4773. sum (direct (p.e)) = 0;
  4774. equal (collect (p.f));
  4775. flow = first (p.f);
  4776. implementation_end;
  4777. v12 224 120
  4778. description '<Description>
  4779. <IsMainModel>0</IsMainModel>
  4780. <KeepParameterValues>False</KeepParameterValues>
  4781. </Description>';
  4782. knot OneJunction
  4783. ports
  4784. mechanical knot duplicatable none p [1];
  4785. signal knot out flow [1];
  4786. restrictions
  4787. causality constraint one_out p;
  4788. end;
  4789. icon bg right
  4790. figures
  4791. text '1' 224 120 color 0 18 bold;
  4792. end;
  4793. implementation eq
  4794. equations
  4795. sum (direct (p.e)) = 0;
  4796. equal (collect (p.f));
  4797. flow = first (p.f);
  4798. implementation_end;
  4799. v2 296 176
  4800. description '<Description>
  4801. <IsMainModel>0</IsMainModel>
  4802. <KeepParameterValues>False</KeepParameterValues>
  4803. </Description>';
  4804. knot OneJunction
  4805. ports
  4806. mechanical knot duplicatable none p [1];
  4807. signal knot out flow [1];
  4808. restrictions
  4809. causality constraint one_out p;
  4810. end;
  4811. icon bg top
  4812. figures
  4813. text '1' 296 176 color 0 18 bold;
  4814. end;
  4815. implementation eq
  4816. equations
  4817. sum (direct (p.e)) = 0;
  4818. equal (collect (p.f));
  4819. flow = first (p.f);
  4820. implementation_end;
  4821. X0 224 176
  4822. description '<Description>
  4823. <IsMainModel>0</IsMainModel>
  4824. <KeepParameterValues>False</KeepParameterValues>
  4825. </Description>';
  4826. type X0
  4827. ports
  4828. power in p1;
  4829. power out p2;
  4830. power out p12;
  4831. signal boolean in condition;
  4832. restrictions
  4833. causality fixed out p1;
  4834. causality fixed out p2;
  4835. causality fixed in p12;
  4836. end;
  4837. icon bg
  4838. figures
  4839. text 'X0' 224 176 color 8388608 18 bold;
  4840. end;
  4841. implementation eq
  4842. equations
  4843. p1.e = if condition then p12.e else 0 end;
  4844. p2.e = p1.e;
  4845. p12.f = if condition then p1.f-p2.f else 0 end;
  4846. implementation_end;
  4847. x1 160 304
  4848. description '<Description>
  4849. <IsMainModel>0</IsMainModel>
  4850. <KeepParameterValues>False</KeepParameterValues>
  4851. </Description>';
  4852. type Integrate
  4853. ports
  4854. signal in input;
  4855. signal out output;
  4856. parameters
  4857. real Initial = -1.131;
  4858. end;
  4859. icon bg left
  4860. figures
  4861. rectangle 145 289 175 319 color 0 fill 15132390;
  4862. text 'ò' 157.5 304 color 16711680 'SymbolProp BT' 21 symbol;
  4863. end;
  4864. implementation eq
  4865. equations
  4866. output = int (input, Initial);
  4867. implementation_end;
  4868. x12 224 304
  4869. description '<Description>
  4870. <IsMainModel>0</IsMainModel>
  4871. <KeepParameterValues>False</KeepParameterValues>
  4872. </Description>';
  4873. knot PlusMinus
  4874. ports
  4875. signal knot duplicatable in plus [1];
  4876. signal knot duplicatable in minus [1];
  4877. signal knot out output [1];
  4878. end;
  4879. icon bg ellipse bottom
  4880. figures
  4881. ellipse 216.5 296.5 231.5 311.5 color 0 fill 16777215;
  4882. end;
  4883. implementation eq
  4884. equations
  4885. output = sum (collect (plus)) - sum (collect (minus));
  4886. implementation_end;
  4887. x2 296 304
  4888. description '<Description>
  4889. <IsMainModel>0</IsMainModel>
  4890. <KeepParameterValues>False</KeepParameterValues>
  4891. </Description>';
  4892. type Integrate
  4893. ports
  4894. signal in input;
  4895. signal out output;
  4896. parameters
  4897. real Initial = -1.13;
  4898. end;
  4899. icon bg right
  4900. figures
  4901. rectangle 281 289 311 319 color 0 fill 15132390;
  4902. text 'ò' 293.5 304 color 16711680 'SymbolProp BT' 21 symbol;
  4903. end;
  4904. implementation eq
  4905. equations
  4906. output = int (input, Initial);
  4907. implementation_end;
  4908. end;
  4909. connections
  4910. Condition1\contact -> Splitter1\input;
  4911. p1 => v1\p;
  4912. Splitter1\output -> collision;
  4913. Splitter1\output -> X0\condition;
  4914. v1\flow -> x1\input;
  4915. v1\p => X0\p1;
  4916. v12\p => p12;
  4917. v2\flow -> x2\input;
  4918. v2\p => p2;
  4919. X0\p12 => v12\p;
  4920. X0\p2 => v2\p;
  4921. x1\output -> x12\plus;
  4922. x12\output -> Condition1\dx;
  4923. x2\output -> x12\minus;
  4924. end;
  4925. parameterrelations
  4926. x1\Initial = EndstopLocation;
  4927. x2\Initial = InitialPos;parameterrelations_end;
  4928. implementation_end;
  4929. plug p2 152 120;
  4930. plug collision 360 120;
  4931. OneJunction 248 160
  4932. description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
  4933. <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  4934. <TimeStamp>2007-9-27 9:51:18</TimeStamp>
  4935. </Description>';
  4936. knot OneJunction
  4937. ports
  4938. power knot duplicatable none p [1];
  4939. signal knot out flow [1];
  4940. restrictions
  4941. causality constraint one_out p;
  4942. end;
  4943. icon bg
  4944. figures
  4945. text '1' 248 160 color 0 18 bold;
  4946. end;
  4947. implementation eq
  4948. equations
  4949. sum (direct (p.e)) = 0;
  4950. equal (collect (p.f));
  4951. flow = first (p.f);
  4952. implementation_end;
  4953. Rendstop 288 160
  4954. description '<Description>
  4955. <Version>4.0</Version>
  4956. <IsMainModel>1</IsMainModel>
  4957. <KeepParameterValues>False</KeepParameterValues>
  4958. <LibraryPath>Bond Graph\R.emx</LibraryPath>
  4959. <TimeStamp>2007-9-25 12:3:18</TimeStamp>
  4960. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  4961. </Description>';
  4962. type R
  4963. ports
  4964. power in p;
  4965. parameters
  4966. real Rendstop = 1000.0;
  4967. end;
  4968. icon bg bottom
  4969. figures
  4970. text 'R' 288 160 color 0 18 bold;
  4971. end;
  4972. implementation eq
  4973. equations
  4974. p.e = Rendstop * p.f;
  4975. implementation_end;
  4976. Sf2 248 64
  4977. description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
  4978. <LibraryPath>Bond Graph\Sf.emx</LibraryPath>
  4979. <TimeStamp>2007-9-25 12:3:35</TimeStamp>
  4980. </Description>';
  4981. type Sf
  4982. ports
  4983. power out p;
  4984. restrictions
  4985. causality fixed in p;
  4986. end;
  4987. icon bg bottom
  4988. figures
  4989. text 'Sf' 248 64 color 0 18 bold;
  4990. end;
  4991. implementation eq
  4992. parameters
  4993. real flow = 0.0;
  4994. variables
  4995. real effort;
  4996. equations
  4997. p.f = flow;
  4998. effort = p.e;
  4999. implementation_end;
  5000. end;
  5001. connections
  5002. Collision\collision -> collision;
  5003. Collision\p12 => OneJunction\p;
  5004. Collision\p2 => p2;
  5005. OneJunction\p => Cendstop\p;
  5006. OneJunction\p => Rendstop\p;
  5007. Sf2\p => Collision\p1;
  5008. end;
  5009. parameterrelations
  5010. Cendstop\Cendstop = Cendstop;
  5011. Rendstop\Rendstop = Rendstop;
  5012. Collision\InitialPos = InitialPos;
  5013. Collision\EndstopLocation = EndstopPos;parameterrelations_end;
  5014. implementation_end;
  5015. Integrate 320 328
  5016. description '<Description>
  5017. <Version>4.0</Version>
  5018. <IsMainModel>1</IsMainModel>
  5019. <KeepParameterValues>False</KeepParameterValues>
  5020. <LibraryPath>Signal\Block Diagram\Integrate.emx</LibraryPath>
  5021. <TimeStamp>2007-9-26 12:3:23</TimeStamp>
  5022. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  5023. </Description>';
  5024. type Integrate
  5025. ports
  5026. signal in input;
  5027. signal out output [4,4];
  5028. parameters
  5029. real init = -1.13;
  5030. end;
  5031. icon bg
  5032. figures
  5033. rectangle 304 312 336 344 color 0 fill 15132390;
  5034. text 'ò' 320 325.3 color 16711680 'SymbolProp BT' 21 symbol;
  5035. end;
  5036. implementation eq
  5037. variables
  5038. real R[3,3];
  5039. real p[3];
  5040. real q;
  5041. equations
  5042. q = int(input,init);
  5043. R = [ cos(q), 0, sin(q);
  5044. 0, 1, 0;
  5045. -sin(q), 0, cos(q)];
  5046. p = [0;0;0];
  5047. output = homogeneous(R,p);
  5048. implementation_end;
  5049. MatrixMul 320 496
  5050. description '<Description>
  5051. <Version>4.0</Version>
  5052. <IsMainModel>1</IsMainModel>
  5053. <KeepParameterValues>False</KeepParameterValues>
  5054. <LibraryPath>Signal\Block Diagram\Gain.emx</LibraryPath>
  5055. <TimeStamp>2007-9-26 12:15:12</TimeStamp>
  5056. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  5057. </Description>';
  5058. type Gain
  5059. ports
  5060. signal in input1 [4,4];
  5061. signal out output [4,4];
  5062. signal in input2 [4,4];
  5063. end;
  5064. icon bg bottom
  5065. figures
  5066. rectangle 304.1 480 335.9 512 color 0 fill 15132390;
  5067. text 'X' 320 496 color 16711680 16 bold;
  5068. end;
  5069. implementation eq
  5070. equations
  5071. output = input2*input1; implementation_end;
  5072. plug p1 240 56;
  5073. plug p2 496 424;
  5074. plug Hin 112 496;
  5075. plug Hout 504 496;
  5076. plug p 112 424;
  5077. OneJunction 240 272
  5078. description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
  5079. <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  5080. <TimeStamp>2007-9-27 9:51:18</TimeStamp>
  5081. </Description>';
  5082. knot OneJunction
  5083. ports
  5084. power knot duplicatable none p [1];
  5085. signal knot out flow [1];
  5086. restrictions
  5087. causality constraint one_out p;
  5088. end;
  5089. icon bg
  5090. figures
  5091. text '1' 240 272 color 0 18 bold;
  5092. end;
  5093. implementation eq
  5094. equations
  5095. sum (direct (p.e)) = 0;
  5096. equal (collect (p.f));
  5097. flow = first (p.f);
  5098. implementation_end;
  5099. Or 392 216
  5100. description '<Description>
  5101. <Version>4.0</Version>
  5102. <IsMainModel>1</IsMainModel>
  5103. <KeepParameterValues>False</KeepParameterValues>
  5104. <LibraryPath>Signal\Logical\Discrete\Or.emx</LibraryPath>
  5105. <TimeStamp>2007-12-18 23:20:57</TimeStamp>
  5106. </Description>';
  5107. type 'Or-Or'
  5108. ports
  5109. signal boolean in input1;
  5110. signal boolean out output;
  5111. signal boolean in input2;
  5112. end;
  5113. icon bg bottom
  5114. figures
  5115. rectangle 376.1 200 407.9 232 color 0 fill 15132390;
  5116. group
  5117. line 378.3 209.3 388.8 209.3 color 16711680 fill 16711680;
  5118. line 378.3 223.1 388.8 223.1 color 16711680 fill 16711680;
  5119. end;
  5120. spline 387.9 204.8 389.9 216.5 387.9 227.7 color 16711680 fill 16711680;
  5121. line 396.7 216 405.5 216 color 16711680 fill 16711680;
  5122. spline 387.7 204.3 393.9 206.6 396.8 216.4 393.6 225.4 387.7 227.7 color 16711680 fill 15132390;
  5123. end;
  5124. implementation eq
  5125. equations
  5126. output = if input1 or input2 then
  5127. true
  5128. else
  5129. false
  5130. end;
  5131. implementation_end;
  5132. Rjoint 192 272
  5133. description '<Description>
  5134. <Version>4.0</Version>
  5135. <IsMainModel>1</IsMainModel>
  5136. <KeepParameterValues>False</KeepParameterValues>
  5137. <LibraryPath>Bond Graph\R.emx</LibraryPath>
  5138. <TimeStamp>2007-9-25 12:3:18</TimeStamp>
  5139. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  5140. </Description>';
  5141. type R
  5142. ports
  5143. power in p;
  5144. parameters
  5145. real Rjoint = 0.1;
  5146. end;
  5147. icon bg bottom
  5148. figures
  5149. text 'R' 192 272 color 0 18 bold;
  5150. end;
  5151. implementation eq
  5152. equations
  5153. p.e = Rjoint * p.f;
  5154. implementation_end;
  5155. Splitter2 320 368
  5156. description '<Description><Version>4.0</Version>
  5157. <LibraryPath>Signal\Block Diagram\Splitter.emx</LibraryPath>
  5158. <TimeStamp>2008-01-17 11:28:29</TimeStamp>
  5159. <IsMainModel>1</IsMainModel>
  5160. <KeepParameterValues>False</KeepParameterValues>
  5161. </Description>';
  5162. knot Splitter
  5163. ports
  5164. signal knot duplicatable out output [4,4];
  5165. signal knot in input [4,4];
  5166. end;
  5167. icon bg ellipse
  5168. figures
  5169. ellipse 316.8 364.8 323.2 371.2 color -1 fill 0;
  5170. ellipse 315.7 363.7 324.3 372.3 color -1;
  5171. terminals
  5172. input 320 368 fixed;
  5173. end;
  5174. implementation eq
  5175. equations
  5176. collect (output) = input;
  5177. implementation_end;
  5178. Tbai 240 376
  5179. description '<Description>
  5180. <Version>4.0</Version>
  5181. <IsMainModel>1</IsMainModel>
  5182. <KeepParameterValues>False</KeepParameterValues>
  5183. <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  5184. <TimeStamp>2007-9-27 9:51:18</TimeStamp>
  5185. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  5186. </Description>';
  5187. knot OneJunction
  5188. ports
  5189. power knot duplicatable none p [6,1];
  5190. signal knot out flow [6,1];
  5191. restrictions
  5192. causality constraint one_out p;
  5193. end;
  5194. icon bg left
  5195. figures
  5196. text '1' 240 376 color 0 18 bold;
  5197. end;
  5198. implementation eq
  5199. equations
  5200. sum (direct (p.e)) = 0;
  5201. equal (collect (p.f));
  5202. flow = first (p.f);
  5203. implementation_end;
  5204. uTbai 240 328
  5205. description '<Description>
  5206. <Version>4.0</Version>
  5207. <IsMainModel>1</IsMainModel>
  5208. <KeepParameterValues>False</KeepParameterValues>
  5209. <LibraryPath>Bond Graph\TF.emx</LibraryPath>
  5210. <TimeStamp>2007-9-25 12:4:2</TimeStamp>
  5211. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  5212. </Description>';
  5213. type TF
  5214. ports
  5215. power in p1;
  5216. power out p2 [6,1];
  5217. restrictions
  5218. causality constraint not_equal p1 p2;
  5219. parameters
  5220. real Rconstraint = 1000.0;
  5221. real Cconstraint = 1.0e-4;
  5222. end;
  5223. icon bg left
  5224. figures
  5225. text 'TF' 240 328 color 0 18 bold;
  5226. end;
  5227. implementation eq
  5228. equations
  5229. p2.e[1] = (Rconstraint*-p2.f[1] + int(-p2.f[1])/Cconstraint);
  5230. p2.e[2] = p1.e;
  5231. p2.e[3] = (Rconstraint*-p2.f[3] + int(-p2.f[3])/Cconstraint);
  5232. p2.e[4] = (Rconstraint*-p2.f[4] + int(-p2.f[4])/Cconstraint);
  5233. p2.e[5] = (Rconstraint*-p2.f[5] + int(-p2.f[5])/Cconstraint);
  5234. p2.e[6] = (Rconstraint*-p2.f[6] + int(-p2.f[6])/Cconstraint);
  5235. p1.f = p2.f[2];
  5236. implementation_end;
  5237. Wbai 240 424
  5238. description '<Description>
  5239. <Version>4.0</Version>
  5240. <IsMainModel>1</IsMainModel>
  5241. <KeepParameterValues>False</KeepParameterValues>
  5242. <LibraryPath>Bond Graph\ZeroJunction.emx</LibraryPath>
  5243. <TimeStamp>2007-9-27 9:51:43</TimeStamp>
  5244. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  5245. </Description>';
  5246. knot ZeroJunction
  5247. ports
  5248. power knot duplicatable none p [6,1];
  5249. signal knot out effort [6,1];
  5250. restrictions
  5251. causality constraint one_in p;
  5252. end;
  5253. icon bg bottom
  5254. figures
  5255. text '0' 240 424 color 0 18 bold;
  5256. end;
  5257. implementation eq
  5258. equations
  5259. sum (direct (p.f)) = 0;
  5260. equal (collect (p.e));
  5261. effort = first (p.e);
  5262. implementation_end;
  5263. ZeroJunction 240 160
  5264. description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
  5265. <LibraryPath>Bond Graph\ZeroJunction.emx</LibraryPath>
  5266. <TimeStamp>2007-9-27 9:51:43</TimeStamp>
  5267. </Description>';
  5268. knot ZeroJunction
  5269. ports
  5270. power knot duplicatable none p [1];
  5271. signal knot out effort [1];
  5272. restrictions
  5273. causality constraint one_in p;
  5274. end;
  5275. icon bg
  5276. figures
  5277. text '0' 240 160 color 0 18 bold;
  5278. end;
  5279. implementation eq
  5280. equations
  5281. sum (direct (p.f)) = 0;
  5282. equal (collect (p.e));
  5283. effort = first (p.e);
  5284. implementation_end;
  5285. end;
  5286. connections
  5287. EndstopMax\collision -> Or\input1;
  5288. EndstopMin\collision -> Or\input2;
  5289. Hin -> MatrixMul\input2;
  5290. Integrate\output -> Splitter2\input;
  5291. MatrixMul\output -> Hout;
  5292. OneJunction\flow -> Integrate\input 320 272;
  5293. OneJunction\p <= EndstopMax\p2;
  5294. OneJunction\p <= EndstopMin\p2;
  5295. OneJunction\p => Rjoint\p;
  5296. OneJunction\p => uTbai\p1;
  5297. p <= Wbai\p;
  5298. p1 => ZeroJunction\p;
  5299. p2 => AdHji\p2;
  5300. Splitter2\output -> AdHji\H 424 368;
  5301. Splitter2\output -> MatrixMul\input1;
  5302. Tbai\p => Wbai\p;
  5303. uTbai\p2 => Tbai\p;
  5304. Wbai\p <= AdHji\p1;
  5305. ZeroJunction\p => OneJunction\p;
  5306. end;
  5307. parameterrelations
  5308. EndstopMin\Rendstop = Rendstop;
  5309. EndstopMin\Cendstop = Cendstop;
  5310. EndstopMin\InitialPos = InitialPos;
  5311. EndstopMin\EndstopPos = MinEndstopPos;
  5312. EndstopMax\Rendstop = Rendstop;
  5313. EndstopMax\Cendstop = Cendstop;
  5314. EndstopMax\InitialPos = InitialPos;
  5315. EndstopMax\EndstopPos = MaxEndstopPos;
  5316. Rjoint\Rjoint= Rjoint;
  5317. Integrate\init = InitialPos;
  5318. uTbai\Rconstraint = Rconstraint;
  5319. uTbai\Cconstraint = Cconstraint;parameterrelations_end;
  5320. figures
  5321. text 'b = next link (body)
  5322. a = previous link (body)
  5323. i = Frame fixed in previous body, fixed in joint
  5324. j = Frame fixed in next body, fixed in joint
  5325. ' 744 400 color 0;
  5326. implementation_end;
  5327. JointBase3 784.2 496
  5328. description '<Description>
  5329. <Version>4.1</Version>
  5330. <IsMainModel>1</IsMainModel>
  5331. <KeepParameterValues>False</KeepParameterValues>
  5332. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  5333. <LibraryPath>Joint-roty.emx</LibraryPath>
  5334. <TimeStamp>2011-1-18 17:30:05</TimeStamp>
  5335. </Description>';
  5336. type 'Submodel-roty'
  5337. ports
  5338. power out p [6,1];
  5339. power in p1;
  5340. power in p2 [6,1];
  5341. signal in Hin [4,4];
  5342. signal out Hout [4,4];
  5343. parameters
  5344. real Rconstraint = 1000.0;
  5345. real Cconstraint = 1.0e-4;
  5346. real Rendstop = 1000.0;
  5347. real Cendstop = 1.0e-4;
  5348. real InitialPos = 0.0;
  5349. real MaxEndstopPos = 1.57;
  5350. real MinEndstopPos = -1.131;
  5351. real Rjoint = 0.1;
  5352. end;
  5353. icon bg bottom
  5354. figures
  5355. rectangle 752.5 424 816 568 color 0 fill 14745599;
  5356. text 'Joint-roty' 784.5 499 color 0;
  5357. terminals
  5358. p 752 456 fixed;
  5359. p1 783.5 424 fixed;
  5360. p2 816 456 fixed;
  5361. Hin 752 536 fixed;
  5362. Hout 816 536 fixed;
  5363. end;
  5364. implementation bg
  5365. submodels
  5366. AdHji 424 424
  5367. description '<Description>
  5368. <Version>4.0</Version>
  5369. <IsMainModel>1</IsMainModel>
  5370. <KeepParameterValues>False</KeepParameterValues>
  5371. <LibraryPath>Bond Graph\MTF.emx</LibraryPath>
  5372. <TimeStamp>2007-9-25 12:3:3</TimeStamp>
  5373. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  5374. </Description>';
  5375. type MTF
  5376. ports
  5377. power out p1 [6,1];
  5378. power in p2 [6,1];
  5379. signal in H [4,4];
  5380. restrictions
  5381. causality constraint not_equal p1 p2;
  5382. end;
  5383. icon bg bottom
  5384. figures
  5385. text 'MTF' 424 424 color 0 18 bold;
  5386. end;
  5387. implementation eq
  5388. equations
  5389. p2.e = transpose(Adjoint(H)) * p1.e;
  5390. p1.f = Adjoint(H) * p2.f;implementation_end;
  5391. EndstopMax 471 217
  5392. description '<Description>
  5393. <Version>4.1</Version>
  5394. <IsMainModel>1</IsMainModel>
  5395. <KeepParameterValues>False</KeepParameterValues>
  5396. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  5397. </Description>';
  5398. type Submodel
  5399. ports
  5400. power out p2;
  5401. signal boolean out collision;
  5402. parameters
  5403. real Rendstop = 1000.0;
  5404. real Cendstop = 1.0e-4;
  5405. real InitialPos = -1.13;
  5406. real EndstopPos = 1.57;
  5407. end;
  5408. icon bg bottom
  5409. figures
  5410. rectangle 422 194 520 240 color 0 fill 14013909;
  5411. text 'EndstopMax' 472 216 color 0 16;
  5412. terminals
  5413. p2 472 240 fixed;
  5414. end;
  5415. implementation bg
  5416. submodels
  5417. Cendstop 704 144
  5418. description '<Description>
  5419. <Version>4.0</Version>
  5420. <IsMainModel>1</IsMainModel>
  5421. <KeepParameterValues>False</KeepParameterValues>
  5422. <LibraryPath>Bond Graph\C.emx</LibraryPath>
  5423. <TimeStamp>2007-10-31 10:43:59</TimeStamp>
  5424. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  5425. </Description>';
  5426. type C
  5427. ports
  5428. power in p;
  5429. signal out state;
  5430. restrictions
  5431. causality preferred out p;
  5432. parameters
  5433. real Cendstop = 1.0e-4;
  5434. end;
  5435. icon bg right
  5436. figures
  5437. text 'C' 704 144 color 0 18 bold;
  5438. end;
  5439. implementation eq
  5440. equations
  5441. state = int(p.f);
  5442. p.e = state / Cendstop;
  5443. implementation_end;
  5444. Collision 704 216
  5445. description '<Description>
  5446. <Version>No Version Info</Version>
  5447. <IsMainModel>0</IsMainModel>
  5448. <KeepParameterValues>False</KeepParameterValues>
  5449. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  5450. </Description>';
  5451. type X0e
  5452. ports
  5453. power in p1;
  5454. power out p2;
  5455. power out p12;
  5456. signal boolean out Collision;
  5457. restrictions
  5458. causality fixed in p12;
  5459. causality fixed out p2;
  5460. causality fixed out p1;
  5461. parameters
  5462. real InitialPos = -1.13;
  5463. real EndstopPos = 1.57;
  5464. end;
  5465. icon bg
  5466. figures
  5467. text 'X0e' 704 216 color 0 18 bold;
  5468. end;
  5469. implementation bg
  5470. submodels
  5471. Condition1 224.9 231.5
  5472. type Condition
  5473. ports
  5474. signal in dx;
  5475. signal boolean out contact;
  5476. end;
  5477. icon bg
  5478. figures
  5479. rectangle 197.2 215 252.6 248 color 0 fill 15132390;
  5480. text 'Condition' 224 231.5 color 0;
  5481. terminals
  5482. dx 224 248 fixed;
  5483. contact 224 215 fixed;
  5484. end;
  5485. implementation eq
  5486. parameters
  5487. real global epsilon;
  5488. variables
  5489. boolean bounce;
  5490. equations
  5491. contact = if dx - epsilon < 0 then true else false end;
  5492. bounce = event (dx - epsilon);implementation_end;
  5493. plug p1 96 176;
  5494. plug p2 352 176;
  5495. plug p12 224 64;
  5496. plug Collision 408 192;
  5497. Splitter1 224 200
  5498. description '<Description><Version>4.0</Version>
  5499. <LibraryPath>C:\Program Files\20-sim 4.0\System\SplitterBoolean.emx</LibraryPath>
  5500. <TimeStamp>2007-10-31 11:27:48</TimeStamp>
  5501. <IsMainModel>1</IsMainModel>
  5502. <KeepParameterValues>False</KeepParameterValues>
  5503. </Description>';
  5504. knot Splitter
  5505. ports
  5506. signal knot boolean duplicatable out output [1];
  5507. signal knot boolean in input [1];
  5508. end;
  5509. icon bg ellipse
  5510. figures
  5511. ellipse 220.8 196.8 227.2 203.2 color -1 fill 0;
  5512. ellipse 219.7 195.7 228.3 204.3 color -1;
  5513. terminals
  5514. input 224 200 fixed;
  5515. end;
  5516. implementation eq
  5517. equations
  5518. collect (output) = input;
  5519. implementation_end;
  5520. v1 160 176
  5521. description '<Description>
  5522. <IsMainModel>0</IsMainModel>
  5523. <KeepParameterValues>False</KeepParameterValues>
  5524. </Description>';
  5525. knot OneJunction
  5526. ports
  5527. mechanical knot duplicatable none p [1];
  5528. signal knot out flow [1];
  5529. restrictions
  5530. causality constraint one_out p;
  5531. end;
  5532. icon bg top
  5533. figures
  5534. text '1' 160 176 color 0 18 bold;
  5535. end;
  5536. implementation eq
  5537. equations
  5538. sum (direct (p.e)) = 0;
  5539. equal (collect (p.f));
  5540. flow = first (p.f);
  5541. implementation_end;
  5542. v12 224 120
  5543. description '<Description>
  5544. <IsMainModel>0</IsMainModel>
  5545. <KeepParameterValues>False</KeepParameterValues>
  5546. </Description>';
  5547. knot OneJunction
  5548. ports
  5549. mechanical knot duplicatable none p [1];
  5550. signal knot out flow [1];
  5551. restrictions
  5552. causality constraint one_out p;
  5553. end;
  5554. icon bg right
  5555. figures
  5556. text '1' 224 120 color 0 18 bold;
  5557. end;
  5558. implementation eq
  5559. equations
  5560. sum (direct (p.e)) = 0;
  5561. equal (collect (p.f));
  5562. flow = first (p.f);
  5563. implementation_end;
  5564. v2 296 176
  5565. description '<Description>
  5566. <IsMainModel>0</IsMainModel>
  5567. <KeepParameterValues>False</KeepParameterValues>
  5568. </Description>';
  5569. knot OneJunction
  5570. ports
  5571. mechanical knot duplicatable none p [1];
  5572. signal knot out flow [1];
  5573. restrictions
  5574. causality constraint one_out p;
  5575. end;
  5576. icon bg top
  5577. figures
  5578. text '1' 296 176 color 0 18 bold;
  5579. end;
  5580. implementation eq
  5581. equations
  5582. sum (direct (p.e)) = 0;
  5583. equal (collect (p.f));
  5584. flow = first (p.f);
  5585. implementation_end;
  5586. X0 224 176
  5587. description '<Description>
  5588. <IsMainModel>0</IsMainModel>
  5589. <KeepParameterValues>False</KeepParameterValues>
  5590. </Description>';
  5591. type X0
  5592. ports
  5593. mechanical in p1;
  5594. mechanical out p2;
  5595. mechanical out p12;
  5596. signal boolean in condition;
  5597. restrictions
  5598. causality fixed out p1;
  5599. causality fixed out p2;
  5600. causality fixed in p12;
  5601. end;
  5602. icon bg
  5603. figures
  5604. text 'X0' 224 176 color 8388608 18 bold;
  5605. end;
  5606. implementation eq
  5607. equations
  5608. p1.e = if condition then p12.e else 0 end;
  5609. p2.e = p1.e;
  5610. p12.f = if condition then p1.f-p2.f else 0 end;
  5611. implementation_end;
  5612. x1 160 304
  5613. description '<Description>
  5614. <IsMainModel>0</IsMainModel>
  5615. <KeepParameterValues>False</KeepParameterValues>
  5616. </Description>';
  5617. type Integrate
  5618. ports
  5619. signal in input;
  5620. signal out output;
  5621. parameters
  5622. real Initial = 1.57;
  5623. end;
  5624. icon bg left
  5625. figures
  5626. rectangle 145 289 175 319 color 0 fill 15132390;
  5627. text 'ò' 157.5 304 color 16711680 'SymbolProp BT' 21 symbol;
  5628. end;
  5629. implementation eq
  5630. equations
  5631. output = int (input, Initial);
  5632. implementation_end;
  5633. x12 224 304
  5634. description '<Description>
  5635. <IsMainModel>0</IsMainModel>
  5636. <KeepParameterValues>False</KeepParameterValues>
  5637. </Description>';
  5638. knot PlusMinus
  5639. ports
  5640. signal knot duplicatable in plus [1];
  5641. signal knot duplicatable in minus [1];
  5642. signal knot out output [1];
  5643. end;
  5644. icon bg ellipse bottom
  5645. figures
  5646. ellipse 216.5 296.5 231.5 311.5 color 0 fill 16777215;
  5647. end;
  5648. implementation eq
  5649. equations
  5650. output = sum (collect (plus)) - sum (collect (minus));
  5651. implementation_end;
  5652. x2 296 304
  5653. description '<Description>
  5654. <IsMainModel>0</IsMainModel>
  5655. <KeepParameterValues>False</KeepParameterValues>
  5656. </Description>';
  5657. type Integrate
  5658. ports
  5659. signal in input;
  5660. signal out output;
  5661. parameters
  5662. real Initial = -1.13;
  5663. end;
  5664. icon bg right
  5665. figures
  5666. rectangle 281 289 311 319 color 0 fill 15132390;
  5667. text 'ò' 293.5 304 color 16711680 'SymbolProp BT' 21 symbol;
  5668. end;
  5669. implementation eq
  5670. equations
  5671. output = int (input, Initial);
  5672. implementation_end;
  5673. end;
  5674. connections
  5675. Condition1\contact -> Splitter1\input;
  5676. p1 => v1\p;
  5677. Splitter1\output -> Collision;
  5678. Splitter1\output -> X0\condition;
  5679. v1\flow -> x1\input;
  5680. v1\p => X0\p1;
  5681. v12\p => p12;
  5682. v2\flow -> x2\input;
  5683. v2\p => p2;
  5684. X0\p12 => v12\p;
  5685. X0\p2 => v2\p;
  5686. x1\output -> x12\plus;
  5687. x12\output -> Condition1\dx;
  5688. x2\output -> x12\minus;
  5689. end;
  5690. parameterrelations
  5691. x1\Initial = EndstopPos;
  5692. x2\Initial = InitialPos;parameterrelations_end;
  5693. implementation_end;
  5694. plug p2 648 216;
  5695. plug collision 800 216;
  5696. OneJunction5 704 176
  5697. description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
  5698. <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  5699. <TimeStamp>2007-9-27 9:51:18</TimeStamp>
  5700. </Description>';
  5701. knot OneJunction
  5702. ports
  5703. mechanical knot duplicatable none p [1];
  5704. signal knot out flow [1];
  5705. restrictions
  5706. causality constraint one_out p;
  5707. end;
  5708. icon bg
  5709. figures
  5710. text '1' 704 176 color 0 18 bold;
  5711. end;
  5712. implementation eq
  5713. equations
  5714. sum (direct (p.e)) = 0;
  5715. equal (collect (p.f));
  5716. flow = first (p.f);
  5717. implementation_end;
  5718. Rendstop 736 176
  5719. description '<Description>
  5720. <Version>4.0</Version>
  5721. <IsMainModel>1</IsMainModel>
  5722. <KeepParameterValues>False</KeepParameterValues>
  5723. <LibraryPath>Bond Graph\R.emx</LibraryPath>
  5724. <TimeStamp>2007-9-25 12:3:18</TimeStamp>
  5725. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  5726. </Description>';
  5727. type R
  5728. ports
  5729. power in p;
  5730. parameters
  5731. real Rendstop = 1000.0;
  5732. end;
  5733. icon bg bottom
  5734. figures
  5735. text 'R' 736 176 color 0 18 bold;
  5736. end;
  5737. implementation eq
  5738. equations
  5739. p.e = Rendstop * p.f;
  5740. implementation_end;
  5741. Sf1 704 264
  5742. description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
  5743. <LibraryPath>Bond Graph\Sf.emx</LibraryPath>
  5744. <TimeStamp>2007-9-25 12:3:35</TimeStamp>
  5745. </Description>';
  5746. type Sf
  5747. ports
  5748. power out p;
  5749. restrictions
  5750. causality fixed in p;
  5751. end;
  5752. icon bg bottom
  5753. figures
  5754. text 'Sf' 704 264 color 0 18 bold;
  5755. end;
  5756. implementation eq
  5757. parameters
  5758. real flow = 0.0;
  5759. variables
  5760. real effort;
  5761. equations
  5762. p.f = flow;
  5763. effort = p.e;
  5764. implementation_end;
  5765. end;
  5766. connections
  5767. Collision\Collision -> collision;
  5768. Collision\p12 => OneJunction5\p;
  5769. Collision\p2 => p2;
  5770. OneJunction5\p => Cendstop\p;
  5771. OneJunction5\p => Rendstop\p;
  5772. Sf1\p => Collision\p1;
  5773. end;
  5774. parameterrelations
  5775. Collision\InitialPos = InitialPos;
  5776. Collision\EndstopPos = EndstopPos;
  5777. Rendstop\Rendstop = Rendstop;
  5778. Cendstop\Cendstop = Cendstop;parameterrelations_end;
  5779. implementation_end;
  5780. EndstopMin 312 216
  5781. description '<Description>
  5782. <Version>4.1</Version>
  5783. <IsMainModel>1</IsMainModel>
  5784. <KeepParameterValues>False</KeepParameterValues>
  5785. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  5786. <LibraryPath>EndstopMin.emx</LibraryPath>
  5787. <TimeStamp>2011-1-18 14:37:57</TimeStamp>
  5788. </Description>';
  5789. type Submodel
  5790. ports
  5791. power out p2;
  5792. signal boolean out collision;
  5793. parameters
  5794. real Cendstop = 1.0e-4;
  5795. real Rendstop = 1000.0;
  5796. real InitialPos = -1.13;
  5797. real EndstopPos = -1.131;
  5798. end;
  5799. icon bg bottom
  5800. figures
  5801. rectangle 263 193 361 239 color 0 fill 14013909;
  5802. text 'EndstopMin' 313 215 color 0 16;
  5803. end;
  5804. implementation bg
  5805. submodels
  5806. Cendstop 248 208
  5807. description '<Description>
  5808. <Version>4.0</Version>
  5809. <IsMainModel>1</IsMainModel>
  5810. <KeepParameterValues>False</KeepParameterValues>
  5811. <LibraryPath>Bond Graph\C.emx</LibraryPath>
  5812. <TimeStamp>2007-10-31 10:43:59</TimeStamp>
  5813. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  5814. </Description>';
  5815. type C
  5816. ports
  5817. power in p;
  5818. signal out state;
  5819. restrictions
  5820. causality preferred out p;
  5821. parameters
  5822. real Cendstop = 1.0e-4;
  5823. end;
  5824. icon bg right
  5825. figures
  5826. text 'C' 248 208 color 0 18 bold;
  5827. end;
  5828. implementation eq
  5829. equations
  5830. state = int(p.f);
  5831. p.e = state / Cendstop;
  5832. implementation_end;
  5833. Collision 248 120
  5834. description '<Description>
  5835. <Version>No Version Info</Version>
  5836. <IsMainModel>0</IsMainModel>
  5837. <KeepParameterValues>False</KeepParameterValues>
  5838. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  5839. </Description>';
  5840. type X0e
  5841. ports
  5842. power in p1;
  5843. power out p2;
  5844. power out p12;
  5845. signal boolean out collision;
  5846. restrictions
  5847. causality fixed out p1;
  5848. causality fixed out p2;
  5849. causality fixed in p12;
  5850. parameters
  5851. real InitialPos = -1.13;
  5852. real EndstopLocation = -1.131;
  5853. end;
  5854. icon bg
  5855. figures
  5856. text 'X0e' 248 120 color 0 18 bold;
  5857. end;
  5858. implementation bg
  5859. submodels
  5860. Condition1 224.9 231.5
  5861. type Condition
  5862. ports
  5863. signal in dx;
  5864. signal boolean out contact;
  5865. end;
  5866. icon bg
  5867. figures
  5868. rectangle 197.2 215 252.6 248 color 0 fill 15132390;
  5869. text 'Condition' 224 231.5 color 0;
  5870. terminals
  5871. dx 224 248 fixed;
  5872. contact 224 215 fixed;
  5873. end;
  5874. implementation eq
  5875. parameters
  5876. real global epsilon;
  5877. variables
  5878. boolean bounce;
  5879. equations
  5880. contact = if dx - epsilon > 0 then true else false end;
  5881. bounce = event (dx - epsilon);implementation_end;
  5882. plug p1 96 176;
  5883. plug p2 352 176;
  5884. plug p12 224 64;
  5885. plug collision 400 200;
  5886. Splitter1 224 200
  5887. description '<Description><Version>4.0</Version>
  5888. <LibraryPath>C:\Program Files\20-sim 4.0\System\SplitterBoolean.emx</LibraryPath>
  5889. <TimeStamp>2007-10-31 11:27:48</TimeStamp>
  5890. <IsMainModel>1</IsMainModel>
  5891. <KeepParameterValues>False</KeepParameterValues>
  5892. </Description>';
  5893. knot Splitter
  5894. ports
  5895. signal knot boolean duplicatable out output [1];
  5896. signal knot boolean in input [1];
  5897. end;
  5898. icon bg ellipse
  5899. figures
  5900. ellipse 220.8 196.8 227.2 203.2 color -1 fill 0;
  5901. ellipse 219.7 195.7 228.3 204.3 color -1;
  5902. terminals
  5903. input 224 200 fixed;
  5904. end;
  5905. implementation eq
  5906. equations
  5907. collect (output) = input;
  5908. implementation_end;
  5909. v1 160 176
  5910. description '<Description>
  5911. <IsMainModel>0</IsMainModel>
  5912. <KeepParameterValues>False</KeepParameterValues>
  5913. </Description>';
  5914. knot OneJunction
  5915. ports
  5916. mechanical knot duplicatable none p [1];
  5917. signal knot out flow [1];
  5918. restrictions
  5919. causality constraint one_out p;
  5920. end;
  5921. icon bg top
  5922. figures
  5923. text '1' 160 176 color 0 18 bold;
  5924. end;
  5925. implementation eq
  5926. equations
  5927. sum (direct (p.e)) = 0;
  5928. equal (collect (p.f));
  5929. flow = first (p.f);
  5930. implementation_end;
  5931. v12 224 120
  5932. description '<Description>
  5933. <IsMainModel>0</IsMainModel>
  5934. <KeepParameterValues>False</KeepParameterValues>
  5935. </Description>';
  5936. knot OneJunction
  5937. ports
  5938. mechanical knot duplicatable none p [1];
  5939. signal knot out flow [1];
  5940. restrictions
  5941. causality constraint one_out p;
  5942. end;
  5943. icon bg right
  5944. figures
  5945. text '1' 224 120 color 0 18 bold;
  5946. end;
  5947. implementation eq
  5948. equations
  5949. sum (direct (p.e)) = 0;
  5950. equal (collect (p.f));
  5951. flow = first (p.f);
  5952. implementation_end;
  5953. v2 296 176
  5954. description '<Description>
  5955. <IsMainModel>0</IsMainModel>
  5956. <KeepParameterValues>False</KeepParameterValues>
  5957. </Description>';
  5958. knot OneJunction
  5959. ports
  5960. mechanical knot duplicatable none p [1];
  5961. signal knot out flow [1];
  5962. restrictions
  5963. causality constraint one_out p;
  5964. end;
  5965. icon bg top
  5966. figures
  5967. text '1' 296 176 color 0 18 bold;
  5968. end;
  5969. implementation eq
  5970. equations
  5971. sum (direct (p.e)) = 0;
  5972. equal (collect (p.f));
  5973. flow = first (p.f);
  5974. implementation_end;
  5975. X0 224 176
  5976. description '<Description>
  5977. <IsMainModel>0</IsMainModel>
  5978. <KeepParameterValues>False</KeepParameterValues>
  5979. </Description>';
  5980. type X0
  5981. ports
  5982. power in p1;
  5983. power out p2;
  5984. power out p12;
  5985. signal boolean in condition;
  5986. restrictions
  5987. causality fixed out p1;
  5988. causality fixed out p2;
  5989. causality fixed in p12;
  5990. end;
  5991. icon bg
  5992. figures
  5993. text 'X0' 224 176 color 8388608 18 bold;
  5994. end;
  5995. implementation eq
  5996. equations
  5997. p1.e = if condition then p12.e else 0 end;
  5998. p2.e = p1.e;
  5999. p12.f = if condition then p1.f-p2.f else 0 end;
  6000. implementation_end;
  6001. x1 160 304
  6002. description '<Description>
  6003. <IsMainModel>0</IsMainModel>
  6004. <KeepParameterValues>False</KeepParameterValues>
  6005. </Description>';
  6006. type Integrate
  6007. ports
  6008. signal in input;
  6009. signal out output;
  6010. parameters
  6011. real Initial = -1.131;
  6012. end;
  6013. icon bg left
  6014. figures
  6015. rectangle 145 289 175 319 color 0 fill 15132390;
  6016. text 'ò' 157.5 304 color 16711680 'SymbolProp BT' 21 symbol;
  6017. end;
  6018. implementation eq
  6019. equations
  6020. output = int (input, Initial);
  6021. implementation_end;
  6022. x12 224 304
  6023. description '<Description>
  6024. <IsMainModel>0</IsMainModel>
  6025. <KeepParameterValues>False</KeepParameterValues>
  6026. </Description>';
  6027. knot PlusMinus
  6028. ports
  6029. signal knot duplicatable in plus [1];
  6030. signal knot duplicatable in minus [1];
  6031. signal knot out output [1];
  6032. end;
  6033. icon bg ellipse bottom
  6034. figures
  6035. ellipse 216.5 296.5 231.5 311.5 color 0 fill 16777215;
  6036. end;
  6037. implementation eq
  6038. equations
  6039. output = sum (collect (plus)) - sum (collect (minus));
  6040. implementation_end;
  6041. x2 296 304
  6042. description '<Description>
  6043. <IsMainModel>0</IsMainModel>
  6044. <KeepParameterValues>False</KeepParameterValues>
  6045. </Description>';
  6046. type Integrate
  6047. ports
  6048. signal in input;
  6049. signal out output;
  6050. parameters
  6051. real Initial = -1.13;
  6052. end;
  6053. icon bg right
  6054. figures
  6055. rectangle 281 289 311 319 color 0 fill 15132390;
  6056. text 'ò' 293.5 304 color 16711680 'SymbolProp BT' 21 symbol;
  6057. end;
  6058. implementation eq
  6059. equations
  6060. output = int (input, Initial);
  6061. implementation_end;
  6062. end;
  6063. connections
  6064. Condition1\contact -> Splitter1\input;
  6065. p1 => v1\p;
  6066. Splitter1\output -> collision;
  6067. Splitter1\output -> X0\condition;
  6068. v1\flow -> x1\input;
  6069. v1\p => X0\p1;
  6070. v12\p => p12;
  6071. v2\flow -> x2\input;
  6072. v2\p => p2;
  6073. X0\p12 => v12\p;
  6074. X0\p2 => v2\p;
  6075. x1\output -> x12\plus;
  6076. x12\output -> Condition1\dx;
  6077. x2\output -> x12\minus;
  6078. end;
  6079. parameterrelations
  6080. x1\Initial = EndstopLocation;
  6081. x2\Initial = InitialPos;parameterrelations_end;
  6082. implementation_end;
  6083. plug p2 152 120;
  6084. plug collision 360 120;
  6085. OneJunction 248 160
  6086. description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
  6087. <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  6088. <TimeStamp>2007-9-27 9:51:18</TimeStamp>
  6089. </Description>';
  6090. knot OneJunction
  6091. ports
  6092. power knot duplicatable none p [1];
  6093. signal knot out flow [1];
  6094. restrictions
  6095. causality constraint one_out p;
  6096. end;
  6097. icon bg
  6098. figures
  6099. text '1' 248 160 color 0 18 bold;
  6100. end;
  6101. implementation eq
  6102. equations
  6103. sum (direct (p.e)) = 0;
  6104. equal (collect (p.f));
  6105. flow = first (p.f);
  6106. implementation_end;
  6107. Rendstop 288 160
  6108. description '<Description>
  6109. <Version>4.0</Version>
  6110. <IsMainModel>1</IsMainModel>
  6111. <KeepParameterValues>False</KeepParameterValues>
  6112. <LibraryPath>Bond Graph\R.emx</LibraryPath>
  6113. <TimeStamp>2007-9-25 12:3:18</TimeStamp>
  6114. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  6115. </Description>';
  6116. type R
  6117. ports
  6118. power in p;
  6119. parameters
  6120. real Rendstop = 1000.0;
  6121. end;
  6122. icon bg bottom
  6123. figures
  6124. text 'R' 288 160 color 0 18 bold;
  6125. end;
  6126. implementation eq
  6127. equations
  6128. p.e = Rendstop * p.f;
  6129. implementation_end;
  6130. Sf2 248 64
  6131. description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
  6132. <LibraryPath>Bond Graph\Sf.emx</LibraryPath>
  6133. <TimeStamp>2007-9-25 12:3:35</TimeStamp>
  6134. </Description>';
  6135. type Sf
  6136. ports
  6137. power out p;
  6138. restrictions
  6139. causality fixed in p;
  6140. end;
  6141. icon bg bottom
  6142. figures
  6143. text 'Sf' 248 64 color 0 18 bold;
  6144. end;
  6145. implementation eq
  6146. parameters
  6147. real flow = 0.0;
  6148. variables
  6149. real effort;
  6150. equations
  6151. p.f = flow;
  6152. effort = p.e;
  6153. implementation_end;
  6154. end;
  6155. connections
  6156. Collision\collision -> collision;
  6157. Collision\p12 => OneJunction\p;
  6158. Collision\p2 => p2;
  6159. OneJunction\p => Cendstop\p;
  6160. OneJunction\p => Rendstop\p;
  6161. Sf2\p => Collision\p1;
  6162. end;
  6163. parameterrelations
  6164. Cendstop\Cendstop = Cendstop;
  6165. Rendstop\Rendstop = Rendstop;
  6166. Collision\InitialPos = InitialPos;
  6167. Collision\EndstopLocation = EndstopPos;parameterrelations_end;
  6168. implementation_end;
  6169. Integrate 320 328
  6170. description '<Description>
  6171. <Version>4.0</Version>
  6172. <IsMainModel>1</IsMainModel>
  6173. <KeepParameterValues>False</KeepParameterValues>
  6174. <LibraryPath>Signal\Block Diagram\Integrate.emx</LibraryPath>
  6175. <TimeStamp>2007-9-26 12:3:23</TimeStamp>
  6176. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  6177. </Description>';
  6178. type Integrate
  6179. ports
  6180. signal in input;
  6181. signal out output [4,4];
  6182. parameters
  6183. real init = -1.13;
  6184. end;
  6185. icon bg
  6186. figures
  6187. rectangle 304 312 336 344 color 0 fill 15132390;
  6188. text 'ò' 320 325.3 color 16711680 'SymbolProp BT' 21 symbol;
  6189. end;
  6190. implementation eq
  6191. variables
  6192. real R[3,3];
  6193. real p[3];
  6194. real q[3];
  6195. real qa;
  6196. real temp [4,4];
  6197. initialequations
  6198. q = 0;
  6199. equations
  6200. qa= int(input,init);
  6201. q[2] = qa;
  6202. R = [ cos(q[2]), 0, sin(q[2]);
  6203. 0, 1, 0;
  6204. -sin(q[2]), 0, cos(q[2])];
  6205. p = [0;0;0];
  6206. output = dll('EulerAngles.dll','HMatrixFromEulXYZr',q);
  6207. temp = output - homogeneous(R,p);
  6208. implementation_end;
  6209. MatrixMul 320 496
  6210. description '<Description>
  6211. <Version>4.0</Version>
  6212. <IsMainModel>1</IsMainModel>
  6213. <KeepParameterValues>False</KeepParameterValues>
  6214. <LibraryPath>Signal\Block Diagram\Gain.emx</LibraryPath>
  6215. <TimeStamp>2007-9-26 12:15:12</TimeStamp>
  6216. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  6217. </Description>';
  6218. type Gain
  6219. ports
  6220. signal in input1 [4,4];
  6221. signal out output [4,4];
  6222. signal in input2 [4,4];
  6223. end;
  6224. icon bg bottom
  6225. figures
  6226. rectangle 304.1 480 335.9 512 color 0 fill 15132390;
  6227. text 'X' 320 496 color 16711680 16 bold;
  6228. end;
  6229. implementation eq
  6230. equations
  6231. output = input2*input1; implementation_end;
  6232. plug p1 240 56;
  6233. plug p2 496 424;
  6234. plug Hin 112 496;
  6235. plug Hout 504 496;
  6236. plug p 112 424;
  6237. OneJunction 240 272
  6238. description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
  6239. <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  6240. <TimeStamp>2007-9-27 9:51:18</TimeStamp>
  6241. </Description>';
  6242. knot OneJunction
  6243. ports
  6244. power knot duplicatable none p [1];
  6245. signal knot out flow [1];
  6246. restrictions
  6247. causality constraint one_out p;
  6248. end;
  6249. icon bg
  6250. figures
  6251. text '1' 240 272 color 0 18 bold;
  6252. end;
  6253. implementation eq
  6254. equations
  6255. sum (direct (p.e)) = 0;
  6256. equal (collect (p.f));
  6257. flow = first (p.f);
  6258. implementation_end;
  6259. Or 392 216
  6260. description '<Description>
  6261. <Version>4.0</Version>
  6262. <IsMainModel>1</IsMainModel>
  6263. <KeepParameterValues>False</KeepParameterValues>
  6264. <LibraryPath>Signal\Logical\Discrete\Or.emx</LibraryPath>
  6265. <TimeStamp>2007-12-18 23:20:57</TimeStamp>
  6266. </Description>';
  6267. type 'Or-Or'
  6268. ports
  6269. signal boolean in input1;
  6270. signal boolean out output;
  6271. signal boolean in input2;
  6272. end;
  6273. icon bg bottom
  6274. figures
  6275. rectangle 376.1 200 407.9 232 color 0 fill 15132390;
  6276. group
  6277. line 378.3 209.3 388.8 209.3 color 16711680 fill 16711680;
  6278. line 378.3 223.1 388.8 223.1 color 16711680 fill 16711680;
  6279. end;
  6280. spline 387.9 204.8 389.9 216.5 387.9 227.7 color 16711680 fill 16711680;
  6281. line 396.7 216 405.5 216 color 16711680 fill 16711680;
  6282. spline 387.7 204.3 393.9 206.6 396.8 216.4 393.6 225.4 387.7 227.7 color 16711680 fill 15132390;
  6283. end;
  6284. implementation eq
  6285. equations
  6286. output = if input1 or input2 then
  6287. true
  6288. else
  6289. false
  6290. end;
  6291. implementation_end;
  6292. Rjoint 192 272
  6293. description '<Description>
  6294. <Version>4.0</Version>
  6295. <IsMainModel>1</IsMainModel>
  6296. <KeepParameterValues>False</KeepParameterValues>
  6297. <LibraryPath>Bond Graph\R.emx</LibraryPath>
  6298. <TimeStamp>2007-9-25 12:3:18</TimeStamp>
  6299. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  6300. </Description>';
  6301. type R
  6302. ports
  6303. power in p;
  6304. parameters
  6305. real Rjoint = 0.1;
  6306. end;
  6307. icon bg bottom
  6308. figures
  6309. text 'R' 192 272 color 0 18 bold;
  6310. end;
  6311. implementation eq
  6312. equations
  6313. p.e = Rjoint * p.f;
  6314. implementation_end;
  6315. Splitter2 320 368
  6316. description '<Description><Version>4.0</Version>
  6317. <LibraryPath>Signal\Block Diagram\Splitter.emx</LibraryPath>
  6318. <TimeStamp>2008-01-17 11:28:29</TimeStamp>
  6319. <IsMainModel>1</IsMainModel>
  6320. <KeepParameterValues>False</KeepParameterValues>
  6321. </Description>';
  6322. knot Splitter
  6323. ports
  6324. signal knot duplicatable out output [4,4];
  6325. signal knot in input [4,4];
  6326. end;
  6327. icon bg ellipse
  6328. figures
  6329. ellipse 316.8 364.8 323.2 371.2 color -1 fill 0;
  6330. ellipse 315.7 363.7 324.3 372.3 color -1;
  6331. terminals
  6332. input 320 368 fixed;
  6333. end;
  6334. implementation eq
  6335. equations
  6336. collect (output) = input;
  6337. implementation_end;
  6338. Tbai 240 376
  6339. description '<Description>
  6340. <Version>4.0</Version>
  6341. <IsMainModel>1</IsMainModel>
  6342. <KeepParameterValues>False</KeepParameterValues>
  6343. <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  6344. <TimeStamp>2007-9-27 9:51:18</TimeStamp>
  6345. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  6346. </Description>';
  6347. knot OneJunction
  6348. ports
  6349. power knot duplicatable none p [6,1];
  6350. signal knot out flow [6,1];
  6351. restrictions
  6352. causality constraint one_out p;
  6353. end;
  6354. icon bg left
  6355. figures
  6356. text '1' 240 376 color 0 18 bold;
  6357. end;
  6358. implementation eq
  6359. equations
  6360. sum (direct (p.e)) = 0;
  6361. equal (collect (p.f));
  6362. flow = first (p.f);
  6363. implementation_end;
  6364. uTbai 240 328
  6365. description '<Description>
  6366. <Version>4.0</Version>
  6367. <IsMainModel>1</IsMainModel>
  6368. <KeepParameterValues>False</KeepParameterValues>
  6369. <LibraryPath>Bond Graph\TF.emx</LibraryPath>
  6370. <TimeStamp>2007-9-25 12:4:2</TimeStamp>
  6371. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  6372. </Description>';
  6373. type TF
  6374. ports
  6375. power in p1;
  6376. power out p2 [6,1];
  6377. restrictions
  6378. causality constraint not_equal p1 p2;
  6379. parameters
  6380. real Rconstraint = 1000.0;
  6381. real Cconstraint = 1.0e-4;
  6382. end;
  6383. icon bg left
  6384. figures
  6385. text 'TF' 240 328 color 0 18 bold;
  6386. end;
  6387. implementation eq
  6388. equations
  6389. p2.e[1] = (Rconstraint*-p2.f[1] + int(-p2.f[1])/Cconstraint);
  6390. p2.e[2] = p1.e;
  6391. p2.e[3] = (Rconstraint*-p2.f[3] + int(-p2.f[3])/Cconstraint);
  6392. p2.e[4] = (Rconstraint*-p2.f[4] + int(-p2.f[4])/Cconstraint);
  6393. p2.e[5] = (Rconstraint*-p2.f[5] + int(-p2.f[5])/Cconstraint);
  6394. p2.e[6] = (Rconstraint*-p2.f[6] + int(-p2.f[6])/Cconstraint);
  6395. p1.f = p2.f[2];
  6396. implementation_end;
  6397. Wbai 240 424
  6398. description '<Description>
  6399. <Version>4.0</Version>
  6400. <IsMainModel>1</IsMainModel>
  6401. <KeepParameterValues>False</KeepParameterValues>
  6402. <LibraryPath>Bond Graph\ZeroJunction.emx</LibraryPath>
  6403. <TimeStamp>2007-9-27 9:51:43</TimeStamp>
  6404. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  6405. </Description>';
  6406. knot ZeroJunction
  6407. ports
  6408. power knot duplicatable none p [6,1];
  6409. signal knot out effort [6,1];
  6410. restrictions
  6411. causality constraint one_in p;
  6412. end;
  6413. icon bg bottom
  6414. figures
  6415. text '0' 240 424 color 0 18 bold;
  6416. end;
  6417. implementation eq
  6418. equations
  6419. sum (direct (p.f)) = 0;
  6420. equal (collect (p.e));
  6421. effort = first (p.e);
  6422. implementation_end;
  6423. ZeroJunction 240 160
  6424. description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
  6425. <LibraryPath>Bond Graph\ZeroJunction.emx</LibraryPath>
  6426. <TimeStamp>2007-9-27 9:51:43</TimeStamp>
  6427. </Description>';
  6428. knot ZeroJunction
  6429. ports
  6430. power knot duplicatable none p [1];
  6431. signal knot out effort [1];
  6432. restrictions
  6433. causality constraint one_in p;
  6434. end;
  6435. icon bg
  6436. figures
  6437. text '0' 240 160 color 0 18 bold;
  6438. end;
  6439. implementation eq
  6440. equations
  6441. sum (direct (p.f)) = 0;
  6442. equal (collect (p.e));
  6443. effort = first (p.e);
  6444. implementation_end;
  6445. end;
  6446. connections
  6447. EndstopMax\collision -> Or\input1;
  6448. EndstopMin\collision -> Or\input2;
  6449. Hin -> MatrixMul\input2;
  6450. Integrate\output -> Splitter2\input;
  6451. MatrixMul\output -> Hout;
  6452. OneJunction\flow -> Integrate\input 320 272;
  6453. OneJunction\p <= EndstopMax\p2;
  6454. OneJunction\p <= EndstopMin\p2;
  6455. OneJunction\p => Rjoint\p;
  6456. OneJunction\p => uTbai\p1;
  6457. p <= Wbai\p;
  6458. p1 => ZeroJunction\p;
  6459. p2 => AdHji\p2;
  6460. Splitter2\output -> AdHji\H 424 368;
  6461. Splitter2\output -> MatrixMul\input1;
  6462. Tbai\p => Wbai\p;
  6463. uTbai\p2 => Tbai\p;
  6464. Wbai\p <= AdHji\p1;
  6465. ZeroJunction\p => OneJunction\p;
  6466. end;
  6467. parameterrelations
  6468. EndstopMin\Rendstop = Rendstop;
  6469. EndstopMin\Cendstop = Cendstop;
  6470. EndstopMin\InitialPos = InitialPos;
  6471. EndstopMin\EndstopPos = MinEndstopPos;
  6472. EndstopMax\Rendstop = Rendstop;
  6473. EndstopMax\Cendstop = Cendstop;
  6474. EndstopMax\InitialPos = InitialPos;
  6475. EndstopMax\EndstopPos = MaxEndstopPos;
  6476. Rjoint\Rjoint= Rjoint;
  6477. Integrate\init = InitialPos;
  6478. uTbai\Rconstraint = Rconstraint;
  6479. uTbai\Cconstraint = Cconstraint;parameterrelations_end;
  6480. figures
  6481. text 'b = next link (body)
  6482. a = previous link (body)
  6483. i = Frame fixed in previous body, fixed in joint
  6484. j = Frame fixed in next body, fixed in joint
  6485. ' 744 400 color 0;
  6486. implementation_end;
  6487. Link 408 512
  6488. description '<Information>
  6489. <Description>
  6490. <Version>4.8</Version>
  6491. <LibraryPath>Z:\home\wouter\Documents\20-sim\library\Bond Graph\MR\link-v2.emx</LibraryPath>
  6492. <IsMainModel>1</IsMainModel>
  6493. <KeepParameterValues>False</KeepParameterValues>
  6494. <TimeStamp>2020-7-16 17:44:32</TimeStamp>
  6495. <AllowLibraryUpdate>False</AllowLibraryUpdate>
  6496. </Description>
  6497. </Information>';
  6498. type 'Submodel-Equation'
  6499. ports
  6500. signal in Hin [4,4];
  6501. signal out Hout [4,4];
  6502. power in Pin [6,1];
  6503. power out Pout [6,1];
  6504. restrictions
  6505. causality constraint not_equal Pin Pout;
  6506. end;
  6507. icon bg
  6508. figures
  6509. rectangle 376 472 440 552 color 0 fill 8454041;
  6510. text 'name' 408 496 color 0 'Clear Sans' 16;
  6511. terminals
  6512. Hin 376 536 fixed;
  6513. Hout 440 536 fixed;
  6514. Pin 440 488 fixed;
  6515. Pout 376 488 fixed;
  6516. end;
  6517. implementation eq
  6518. parameters
  6519. real offset[3]= [0.167; 0.00001; 0.142]; //coordinates of joint_1
  6520. variables
  6521. real Hab[4,4];
  6522. real AdHab[6,6];
  6523. equations
  6524. Hab = homogeneous(eye(3),offset);
  6525. AdHab = Adjoint(eye(3),offset);
  6526. Hout = Hin * Hab;
  6527. Pout.e = transpose(AdHab) * Pin.e;
  6528. Pin.f = AdHab * Pout.f;
  6529. implementation_end;
  6530. Link1 640 512
  6531. description '<Information>
  6532. <Description>
  6533. <Version>4.8</Version>
  6534. <LibraryPath>Z:\home\wouter\Documents\20-sim\library\Bond Graph\MR\link-v2.emx</LibraryPath>
  6535. <IsMainModel>1</IsMainModel>
  6536. <KeepParameterValues>False</KeepParameterValues>
  6537. <TimeStamp>2020-7-16 17:44:32</TimeStamp>
  6538. <AllowLibraryUpdate>False</AllowLibraryUpdate>
  6539. </Description>
  6540. </Information>';
  6541. type 'Submodel-Equation'
  6542. ports
  6543. signal in Hin [4,4];
  6544. signal out Hout [4,4];
  6545. power in Pin [6,1];
  6546. power out Pout [6,1];
  6547. restrictions
  6548. causality constraint not_equal Pin Pout;
  6549. end;
  6550. icon bg
  6551. figures
  6552. rectangle 608 472 672 552 color 0 fill 8454041;
  6553. text 'name' 640 496 color 0 'Clear Sans' 16;
  6554. terminals
  6555. Hin 608 536 fixed;
  6556. Hout 672 536 fixed;
  6557. Pin 672 488 fixed;
  6558. Pout 608 488 fixed;
  6559. end;
  6560. implementation eq
  6561. parameters
  6562. real offset[3]= [0.167;1e-005;0.142]; //coordinates of joint_1
  6563. variables
  6564. real Hab[4,4];
  6565. real AdHab[6,6];
  6566. equations
  6567. Hab = homogeneous(eye(3),offset);
  6568. AdHab = Adjoint(eye(3),offset);
  6569. Hout = Hin * Hab;
  6570. Pout.e = transpose(AdHab) * Pin.e;
  6571. Pin.f = AdHab * Pout.f;
  6572. implementation_end;
  6573. Link2 912 512
  6574. description '<Information>
  6575. <Description>
  6576. <Version>4.8</Version>
  6577. <LibraryPath>Z:\home\wouter\Documents\20-sim\library\Bond Graph\MR\link-v2.emx</LibraryPath>
  6578. <IsMainModel>1</IsMainModel>
  6579. <KeepParameterValues>False</KeepParameterValues>
  6580. <TimeStamp>2020-7-16 17:44:32</TimeStamp>
  6581. <AllowLibraryUpdate>False</AllowLibraryUpdate>
  6582. </Description>
  6583. </Information>';
  6584. type 'Submodel-Equation'
  6585. ports
  6586. signal in Hin [4,4];
  6587. signal out Hout [4,4];
  6588. power in Pin [6,1];
  6589. power out Pout [6,1];
  6590. restrictions
  6591. causality constraint not_equal Pin Pout;
  6592. end;
  6593. icon bg
  6594. figures
  6595. rectangle 880 472 944 552 color 0 fill 8454041;
  6596. text 'name' 912 496 color 0 'Clear Sans' 16;
  6597. terminals
  6598. Hin 880 536 fixed;
  6599. Hout 944 536 fixed;
  6600. Pin 944 488 fixed;
  6601. Pout 880 488 fixed;
  6602. end;
  6603. implementation eq
  6604. parameters
  6605. real offset[3]= [0.167;0.0001;0.142]; //coordinates of joint_1
  6606. variables
  6607. real Hab[4,4];
  6608. real AdHab[6,6];
  6609. equations
  6610. Hab = homogeneous(eye(3),offset);
  6611. AdHab = Adjoint(eye(3),offset);
  6612. Hout = Hin * Hab;
  6613. Pout.e = transpose(AdHab) * Pin.e;
  6614. Pin.f = AdHab * Pout.f;
  6615. implementation_end;
  6616. Link3 1120 512
  6617. description '<Information>
  6618. <Description>
  6619. <Version>4.8</Version>
  6620. <LibraryPath>Z:\home\wouter\Documents\20-sim\library\Bond Graph\MR\link-v2.emx</LibraryPath>
  6621. <IsMainModel>1</IsMainModel>
  6622. <KeepParameterValues>False</KeepParameterValues>
  6623. <TimeStamp>2020-7-16 17:44:32</TimeStamp>
  6624. <AllowLibraryUpdate>False</AllowLibraryUpdate>
  6625. </Description>
  6626. </Information>';
  6627. type 'Submodel-Equation'
  6628. ports
  6629. signal in Hin [4,4];
  6630. signal out Hout [4,4];
  6631. power in Pin [6,1];
  6632. power out Pout [6,1];
  6633. restrictions
  6634. causality constraint not_equal Pin Pout;
  6635. end;
  6636. icon bg
  6637. figures
  6638. rectangle 1088 472 1152 552 color 0 fill 8454041;
  6639. text 'name' 1120 496 color 0 'Clear Sans' 16;
  6640. terminals
  6641. Hin 1088 536 fixed;
  6642. Hout 1152 536 fixed;
  6643. Pin 1152 488 fixed;
  6644. Pout 1088 488 fixed;
  6645. end;
  6646. implementation eq
  6647. parameters
  6648. real offset[3]= [0.167;0.0001;0.142]; //coordinates of joint_1
  6649. variables
  6650. real Hab[4,4];
  6651. real AdHab[6,6];
  6652. equations
  6653. Hab = homogeneous(eye(3),offset);
  6654. AdHab = Adjoint(eye(3),offset);
  6655. Hout = Hin * Hab;
  6656. Pout.e = transpose(AdHab) * Pin.e;
  6657. Pin.f = AdHab * Pout.f;
  6658. implementation_end;
  6659. Link4 1328 512
  6660. description '<Information>
  6661. <Description>
  6662. <Version>4.8</Version>
  6663. <LibraryPath>Z:\home\wouter\Documents\20-sim\library\Bond Graph\MR\link-v2.emx</LibraryPath>
  6664. <IsMainModel>1</IsMainModel>
  6665. <KeepParameterValues>False</KeepParameterValues>
  6666. <TimeStamp>2020-7-16 17:44:32</TimeStamp>
  6667. <AllowLibraryUpdate>False</AllowLibraryUpdate>
  6668. </Description>
  6669. </Information>';
  6670. type 'Submodel-Equation'
  6671. ports
  6672. signal in Hin [4,4];
  6673. signal out Hout [4,4];
  6674. power in Pin [6,1];
  6675. power out Pout [6,1];
  6676. restrictions
  6677. causality constraint not_equal Pin Pout;
  6678. end;
  6679. icon bg
  6680. figures
  6681. rectangle 1296 472 1360 552 color 0 fill 8454041;
  6682. text 'name' 1328 496 color 0 'Clear Sans' 16;
  6683. terminals
  6684. Hin 1296 536 fixed;
  6685. Hout 1360 536 fixed;
  6686. Pin 1360 488 fixed;
  6687. Pout 1296 488 fixed;
  6688. end;
  6689. implementation eq
  6690. parameters
  6691. real offset[3]= [0.167;0.0001;0.142]; //coordinates of joint_1
  6692. variables
  6693. real Hab[4,4];
  6694. real AdHab[6,6];
  6695. equations
  6696. Hab = homogeneous(eye(3),offset);
  6697. AdHab = Adjoint(eye(3),offset);
  6698. Hout = Hin * Hab;
  6699. Pout.e = transpose(AdHab) * Pin.e;
  6700. Pin.f = AdHab * Pout.f;
  6701. implementation_end;
  6702. OneJunction 200 256
  6703. description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
  6704. <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  6705. <TimeStamp>2007-9-27 9:51:18</TimeStamp>
  6706. </Description>';
  6707. knot OneJunction
  6708. ports
  6709. power knot duplicatable none p [6,1];
  6710. signal knot out flow [6,1];
  6711. restrictions
  6712. causality constraint one_out p;
  6713. end;
  6714. icon bg
  6715. figures
  6716. text '1' 200 256 color 0 18 bold;
  6717. end;
  6718. implementation eq
  6719. equations
  6720. sum (direct (p.e)) = 0;
  6721. equal (collect (p.f));
  6722. flow = first (p.f);
  6723. implementation_end;
  6724. OneJunction1 304 488
  6725. description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
  6726. <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  6727. <TimeStamp>2007-9-27 9:51:18</TimeStamp>
  6728. </Description>';
  6729. knot OneJunction
  6730. ports
  6731. power knot duplicatable none p [6,1];
  6732. signal knot out flow [6,1];
  6733. restrictions
  6734. causality constraint one_out p;
  6735. end;
  6736. icon bg
  6737. figures
  6738. text '1' 304 488 color 0 18 bold;
  6739. end;
  6740. implementation eq
  6741. equations
  6742. sum (direct (p.e)) = 0;
  6743. equal (collect (p.f));
  6744. flow = first (p.f);
  6745. implementation_end;
  6746. OneJunction3 488 160
  6747. description '<Information>
  6748. <Description>
  6749. <Version>4.2</Version>
  6750. <IsMainModel>1</IsMainModel>
  6751. <KeepParameterValues>False</KeepParameterValues>
  6752. <LibraryPath>Bond Graph\ZeroJunction.emx</LibraryPath>
  6753. <TimeStamp>2011-11-29 16:45:16</TimeStamp>
  6754. </Description>
  6755. </Information>';
  6756. knot ZeroJunction
  6757. ports
  6758. power knot duplicatable none p [1];
  6759. signal knot out effort [1];
  6760. restrictions
  6761. causality constraint one_in p;
  6762. end;
  6763. icon bg
  6764. figures
  6765. text '0' 488 160 color 0 18 bold;
  6766. end;
  6767. implementation eq
  6768. equations
  6769. sum (direct (p.f)) = 0;
  6770. equal (collect (p.e));
  6771. effort = first (p.e);
  6772. implementation_end;
  6773. Sf 128 256
  6774. description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
  6775. <LibraryPath>Bond Graph\3D\Sf-3.emx</LibraryPath>
  6776. <TimeStamp>2007-9-25 12:11:58</TimeStamp>
  6777. </Description>';
  6778. type 'Sf-3'
  6779. ports
  6780. power out p [6,1];
  6781. restrictions
  6782. causality fixed in p;
  6783. end;
  6784. icon bg bottom
  6785. figures
  6786. text 'Sf' 128 256 color 0 18 bold;
  6787. end;
  6788. implementation eq
  6789. parameters
  6790. real flow[6,1] = 0;
  6791. variables
  6792. real effort [6];
  6793. equations
  6794. p.f = flow;
  6795. effort = p.e;
  6796. implementation_end;
  6797. Sf1 256 488
  6798. description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
  6799. <LibraryPath>Bond Graph\3D\Sf-3.emx</LibraryPath>
  6800. <TimeStamp>2007-9-25 12:11:58</TimeStamp>
  6801. </Description>';
  6802. type 'Sf-3'
  6803. ports
  6804. power out p [6,1];
  6805. restrictions
  6806. causality fixed in p;
  6807. end;
  6808. icon bg bottom
  6809. figures
  6810. text 'Sf' 256 488 color 0 18 bold;
  6811. end;
  6812. implementation eq
  6813. parameters
  6814. real flow[6,1] = 0;
  6815. variables
  6816. real effort [6];
  6817. equations
  6818. p.f = flow;
  6819. effort = p.e;
  6820. implementation_end;
  6821. Splitter1 296 96
  6822. description '<Description><Version>4.0</Version>
  6823. <LibraryPath>Signal\Block Diagram\Splitter.emx</LibraryPath>
  6824. <TimeStamp>2008-01-17 11:28:29</TimeStamp>
  6825. <IsMainModel>1</IsMainModel>
  6826. <KeepParameterValues>False</KeepParameterValues>
  6827. </Description>';
  6828. knot Splitter
  6829. ports
  6830. signal knot duplicatable out output [1];
  6831. signal knot in input [1];
  6832. end;
  6833. icon bg ellipse
  6834. figures
  6835. ellipse 292.8 92.8 299.2 99.2 color -1 fill 0;
  6836. ellipse 291.7 91.7 300.3 100.3 color -1;
  6837. terminals
  6838. input 296 96 fixed;
  6839. end;
  6840. implementation eq
  6841. equations
  6842. collect (output) = input;
  6843. implementation_end;
  6844. Splitter2 232 336
  6845. description '<Description><Version>4.0</Version>
  6846. <LibraryPath>Signal\Block Diagram\Splitter.emx</LibraryPath>
  6847. <TimeStamp>2008-01-17 11:28:29</TimeStamp>
  6848. <IsMainModel>1</IsMainModel>
  6849. <KeepParameterValues>False</KeepParameterValues>
  6850. </Description>';
  6851. knot Splitter
  6852. ports
  6853. signal knot duplicatable out output [4,4];
  6854. signal knot in input [4,4];
  6855. end;
  6856. icon bg ellipse
  6857. figures
  6858. ellipse 228.8 332.8 235.2 339.2 color -1 fill 0;
  6859. ellipse 227.7 331.7 236.3 340.3 color -1;
  6860. terminals
  6861. input 232 336 fixed;
  6862. end;
  6863. implementation eq
  6864. equations
  6865. collect (output) = input;
  6866. implementation_end;
  6867. Splitter3 400 96
  6868. description '<Description><Version>4.0</Version>
  6869. <LibraryPath>Signal\Block Diagram\Splitter.emx</LibraryPath>
  6870. <TimeStamp>2008-01-17 11:28:29</TimeStamp>
  6871. <IsMainModel>1</IsMainModel>
  6872. <KeepParameterValues>False</KeepParameterValues>
  6873. </Description>';
  6874. knot Splitter
  6875. ports
  6876. signal knot duplicatable out output [1];
  6877. signal knot in input [1];
  6878. end;
  6879. icon bg ellipse
  6880. figures
  6881. ellipse 396.8 92.8 403.2 99.2 color -1 fill 0;
  6882. ellipse 395.7 91.7 404.3 100.3 color -1;
  6883. terminals
  6884. input 400 96 fixed;
  6885. end;
  6886. implementation eq
  6887. equations
  6888. collect (output) = input;
  6889. implementation_end;
  6890. Splitter4 232 536
  6891. description '<Description><Version>4.0</Version>
  6892. <LibraryPath>Signal\Block Diagram\Splitter.emx</LibraryPath>
  6893. <TimeStamp>2008-01-17 11:28:29</TimeStamp>
  6894. <IsMainModel>1</IsMainModel>
  6895. <KeepParameterValues>False</KeepParameterValues>
  6896. </Description>';
  6897. knot Splitter
  6898. ports
  6899. signal knot duplicatable out output [4,4];
  6900. signal knot in input [4,4];
  6901. end;
  6902. icon bg ellipse
  6903. figures
  6904. ellipse 228.8 532.8 235.2 539.2 color -1 fill 0;
  6905. ellipse 227.7 531.7 236.3 540.3 color -1;
  6906. terminals
  6907. input 232 536 fixed;
  6908. end;
  6909. implementation eq
  6910. equations
  6911. collect (output) = input;
  6912. implementation_end;
  6913. Submodel1 296 144
  6914. description '<Description>
  6915. <Version>4.8</Version>
  6916. <IsMainModel>1</IsMainModel>
  6917. </Description>';
  6918. type Submodel
  6919. ports
  6920. signal in input;
  6921. power out p2;
  6922. end;
  6923. implementation bg
  6924. submodels
  6925. Gain1 552 88
  6926. description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
  6927. <LibraryPath>Signal\Block Diagram\Gain.emx</LibraryPath>
  6928. <TimeStamp>2007-9-26 12:15:12</TimeStamp>
  6929. </Description>';
  6930. type Gain
  6931. ports
  6932. signal in input;
  6933. signal out output;
  6934. end;
  6935. icon bg bottom
  6936. figures
  6937. rectangle 536.1 72 567.9 104 color 0 fill 15132390;
  6938. text 'K' 552 88 color 16711680 16 bold;
  6939. end;
  6940. implementation eq
  6941. parameters
  6942. real K = 12.0; // gain
  6943. equations
  6944. output = K * input;
  6945. implementation_end;
  6946. GY 624 184
  6947. description '<Information>
  6948. <Description>
  6949. <Version>4.2</Version>
  6950. <IsMainModel>1</IsMainModel>
  6951. <KeepParameterValues>False</KeepParameterValues>
  6952. <LibraryPath>Bond Graph\GY.emx</LibraryPath>
  6953. <TimeStamp>2011-11-29 15:53:45</TimeStamp>
  6954. </Description>
  6955. </Information>';
  6956. type GY
  6957. ports
  6958. power in p1;
  6959. power out p2;
  6960. restrictions
  6961. causality constraint equal p1 p2;
  6962. end;
  6963. icon bg bottom
  6964. figures
  6965. text 'GY' 624 184 color 0 18 bold;
  6966. end;
  6967. implementation eq
  6968. parameters
  6969. real r = 0.127;
  6970. equations
  6971. p1.e = r * p2.f;
  6972. p2.e = r * p1.f;
  6973. implementation_end;
  6974. MSe 624 88
  6975. description '<Information>
  6976. <Description>
  6977. <Version>4.2</Version>
  6978. <IsMainModel>1</IsMainModel>
  6979. <KeepParameterValues>False</KeepParameterValues>
  6980. <LibraryPath>Bond Graph\MSe.emx</LibraryPath>
  6981. <TimeStamp>2011-11-29 16:12:33</TimeStamp>
  6982. </Description>
  6983. </Information>';
  6984. type MSe
  6985. ports
  6986. power out p;
  6987. signal in effort;
  6988. restrictions
  6989. causality fixed out p;
  6990. end;
  6991. icon bg bottom
  6992. figures
  6993. text 'MSe' 624 88 color 0 18 bold;
  6994. end;
  6995. implementation eq
  6996. variables
  6997. real flow;
  6998. equations
  6999. p.e = effort;
  7000. flow = p.f;
  7001. implementation_end;
  7002. plug input 424 88;
  7003. plug p2 624 220;
  7004. OneJunction2 624 136
  7005. description '<Information>
  7006. <Description>
  7007. <Version>4.2</Version>
  7008. <IsMainModel>1</IsMainModel>
  7009. <KeepParameterValues>False</KeepParameterValues>
  7010. <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  7011. <TimeStamp>2011-11-29 16:17:51</TimeStamp>
  7012. </Description>
  7013. </Information>';
  7014. knot OneJunction
  7015. ports
  7016. power knot duplicatable none p [1];
  7017. signal knot out flow [1];
  7018. restrictions
  7019. causality constraint one_out p;
  7020. end;
  7021. icon bg
  7022. figures
  7023. text '1' 624 136 color 0 18 bold;
  7024. end;
  7025. implementation eq
  7026. equations
  7027. sum (direct (p.e)) = 0;
  7028. equal (collect (p.f));
  7029. flow = first (p.f);
  7030. implementation_end;
  7031. R 664 136
  7032. description '<Information>
  7033. <Description>
  7034. <Version>4.2</Version>
  7035. <IsMainModel>1</IsMainModel>
  7036. <KeepParameterValues>False</KeepParameterValues>
  7037. <LibraryPath>Bond Graph\R.emx</LibraryPath>
  7038. <TimeStamp>2011-11-29 16:35:37</TimeStamp>
  7039. </Description>
  7040. </Information>';
  7041. type R
  7042. ports
  7043. power in p;
  7044. end;
  7045. icon bg bottom
  7046. figures
  7047. text 'R' 664 136 color 0 18 bold;
  7048. end;
  7049. implementation eq
  7050. parameters
  7051. real r = 0.08;
  7052. equations
  7053. p.e = r * p.f;
  7054. implementation_end;
  7055. SignalLimiter2 488 88
  7056. description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
  7057. <LibraryPath>Signal\Block Diagram Non-Linear\SignalLimiter-Limit.emx</LibraryPath>
  7058. <TimeStamp>2007-9-26 12:47:40</TimeStamp>
  7059. </Description>';
  7060. type 'SignalLimiter-Limit'
  7061. ports
  7062. signal in input;
  7063. signal out output;
  7064. end;
  7065. icon bg bottom
  7066. figures
  7067. group
  7068. rectangle 472 72 504 104 color 0 fill 15132390;
  7069. line 487.9 76.5 487.9 101 color 0 fill 15132390;
  7070. line 475 88.2 500.7 88.2 color 0 fill 15132390;
  7071. spline 481.9 95.1 493.9 81.4 color 16711680 fill 15132390 width 2;
  7072. spline 493.3 82.2 501.9 81.8 color 16711680 fill 15132390 width 2;
  7073. spline 475 95.6 481.9 95.1 color 16711680 fill 15132390 width 2;
  7074. end;
  7075. end;
  7076. implementation eq
  7077. parameters
  7078. real maximum = 1;
  7079. real minimum = -1;
  7080. equations
  7081. output = limit (input, minimum, maximum);
  7082. implementation_end;
  7083. end;
  7084. connections
  7085. Gain1\output -> MSe\effort;
  7086. GY\p2 => p2;
  7087. input -> SignalLimiter2\input;
  7088. MSe\p => OneJunction2\p;
  7089. OneJunction2\p => GY\p1;
  7090. R\p <= OneJunction2\p;
  7091. SignalLimiter2\output -> Gain1\input;
  7092. end;
  7093. implementation_end;
  7094. Submodel2 488 96
  7095. description '<Description>
  7096. <Version>4.8</Version>
  7097. <IsMainModel>1</IsMainModel>
  7098. </Description>';
  7099. type Submodel
  7100. ports
  7101. signal in input;
  7102. power out p2;
  7103. end;
  7104. implementation bg
  7105. submodels
  7106. Gain1 552 88
  7107. description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
  7108. <LibraryPath>Signal\Block Diagram\Gain.emx</LibraryPath>
  7109. <TimeStamp>2007-9-26 12:15:12</TimeStamp>
  7110. </Description>';
  7111. type Gain
  7112. ports
  7113. signal in input;
  7114. signal out output;
  7115. end;
  7116. icon bg bottom
  7117. figures
  7118. rectangle 536.1 72 567.9 104 color 0 fill 15132390;
  7119. text 'K' 552 88 color 16711680 16 bold;
  7120. end;
  7121. implementation eq
  7122. parameters
  7123. real K = 12.0; // gain
  7124. equations
  7125. output = K * input;
  7126. implementation_end;
  7127. GY 624 184
  7128. description '<Information>
  7129. <Description>
  7130. <Version>4.2</Version>
  7131. <IsMainModel>1</IsMainModel>
  7132. <KeepParameterValues>False</KeepParameterValues>
  7133. <LibraryPath>Bond Graph\GY.emx</LibraryPath>
  7134. <TimeStamp>2011-11-29 15:53:45</TimeStamp>
  7135. </Description>
  7136. </Information>';
  7137. type GY
  7138. ports
  7139. power in p1;
  7140. power out p2;
  7141. restrictions
  7142. causality constraint equal p1 p2;
  7143. end;
  7144. icon bg bottom
  7145. figures
  7146. text 'GY' 624 184 color 0 18 bold;
  7147. end;
  7148. implementation eq
  7149. parameters
  7150. real r = 0.127;
  7151. equations
  7152. p1.e = r * p2.f;
  7153. p2.e = r * p1.f;
  7154. implementation_end;
  7155. MSe 624 88
  7156. description '<Information>
  7157. <Description>
  7158. <Version>4.2</Version>
  7159. <IsMainModel>1</IsMainModel>
  7160. <KeepParameterValues>False</KeepParameterValues>
  7161. <LibraryPath>Bond Graph\MSe.emx</LibraryPath>
  7162. <TimeStamp>2011-11-29 16:12:33</TimeStamp>
  7163. </Description>
  7164. </Information>';
  7165. type MSe
  7166. ports
  7167. power out p;
  7168. signal in effort;
  7169. restrictions
  7170. causality fixed out p;
  7171. end;
  7172. icon bg bottom
  7173. figures
  7174. text 'MSe' 624 88 color 0 18 bold;
  7175. end;
  7176. implementation eq
  7177. variables
  7178. real flow;
  7179. equations
  7180. p.e = effort;
  7181. flow = p.f;
  7182. implementation_end;
  7183. plug input 424 88;
  7184. plug p2 624 220;
  7185. OneJunction2 624 136
  7186. description '<Information>
  7187. <Description>
  7188. <Version>4.2</Version>
  7189. <IsMainModel>1</IsMainModel>
  7190. <KeepParameterValues>False</KeepParameterValues>
  7191. <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  7192. <TimeStamp>2011-11-29 16:17:51</TimeStamp>
  7193. </Description>
  7194. </Information>';
  7195. knot OneJunction
  7196. ports
  7197. power knot duplicatable none p [1];
  7198. signal knot out flow [1];
  7199. restrictions
  7200. causality constraint one_out p;
  7201. end;
  7202. icon bg
  7203. figures
  7204. text '1' 624 136 color 0 18 bold;
  7205. end;
  7206. implementation eq
  7207. equations
  7208. sum (direct (p.e)) = 0;
  7209. equal (collect (p.f));
  7210. flow = first (p.f);
  7211. implementation_end;
  7212. R 664 136
  7213. description '<Information>
  7214. <Description>
  7215. <Version>4.2</Version>
  7216. <IsMainModel>1</IsMainModel>
  7217. <KeepParameterValues>False</KeepParameterValues>
  7218. <LibraryPath>Bond Graph\R.emx</LibraryPath>
  7219. <TimeStamp>2011-11-29 16:35:37</TimeStamp>
  7220. </Description>
  7221. </Information>';
  7222. type R
  7223. ports
  7224. power in p;
  7225. end;
  7226. icon bg bottom
  7227. figures
  7228. text 'R' 664 136 color 0 18 bold;
  7229. end;
  7230. implementation eq
  7231. parameters
  7232. real r = 0.08;
  7233. equations
  7234. p.e = r * p.f;
  7235. implementation_end;
  7236. SignalLimiter2 488 88
  7237. description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
  7238. <LibraryPath>Signal\Block Diagram Non-Linear\SignalLimiter-Limit.emx</LibraryPath>
  7239. <TimeStamp>2007-9-26 12:47:40</TimeStamp>
  7240. </Description>';
  7241. type 'SignalLimiter-Limit'
  7242. ports
  7243. signal in input;
  7244. signal out output;
  7245. end;
  7246. icon bg bottom
  7247. figures
  7248. group
  7249. rectangle 472 72 504 104 color 0 fill 15132390;
  7250. line 487.9 76.5 487.9 101 color 0 fill 15132390;
  7251. line 475 88.2 500.7 88.2 color 0 fill 15132390;
  7252. spline 481.9 95.1 493.9 81.4 color 16711680 fill 15132390 width 2;
  7253. spline 493.3 82.2 501.9 81.8 color 16711680 fill 15132390 width 2;
  7254. spline 475 95.6 481.9 95.1 color 16711680 fill 15132390 width 2;
  7255. end;
  7256. end;
  7257. implementation eq
  7258. parameters
  7259. real maximum = 1;
  7260. real minimum = -1;
  7261. equations
  7262. output = limit (input, minimum, maximum);
  7263. implementation_end;
  7264. end;
  7265. connections
  7266. Gain1\output -> MSe\effort;
  7267. GY\p2 => p2;
  7268. input -> SignalLimiter2\input;
  7269. MSe\p => OneJunction2\p;
  7270. OneJunction2\p => GY\p1;
  7271. R\p <= OneJunction2\p;
  7272. SignalLimiter2\output -> Gain1\input;
  7273. end;
  7274. implementation_end;
  7275. Submodel7 1464 656
  7276. description '<Description><Version>4.0</Version>
  7277. <LibraryPath>Template\Submodel-Equation.emx</LibraryPath>
  7278. <IsMainModel>1</IsMainModel>
  7279. <KeepParameterValues>False</KeepParameterValues>
  7280. <TimeStamp>2007-11-1 22:32:1</TimeStamp>
  7281. <AllowLibraryUpdate>False</AllowLibraryUpdate>
  7282. </Description>';
  7283. type 'Submodel-Equation'
  7284. ports
  7285. signal in input [4,4];
  7286. signal out output;
  7287. end;
  7288. implementation eq
  7289. variables
  7290. real position[3];
  7291. real rotation[3];
  7292. equations
  7293. // start typing here
  7294. position = input[1:3,4];
  7295. rotation = [input[3,2];input[1,3];input[2,1]];
  7296. implementation_end;
  7297. Wtip0 664 256
  7298. description '<Description>
  7299. <Version>4.0</Version>
  7300. <IsMainModel>1</IsMainModel>
  7301. <KeepParameterValues>False</KeepParameterValues>
  7302. <LibraryPath>Bond Graph\Se.emx</LibraryPath>
  7303. <TimeStamp>2007-9-25 12:3:26</TimeStamp>
  7304. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  7305. </Description>';
  7306. type Se
  7307. ports
  7308. power out p [6,1];
  7309. restrictions
  7310. causality fixed out p;
  7311. end;
  7312. icon bg bottom
  7313. figures
  7314. text 'Se' 664 256 color 0 18 bold;
  7315. end;
  7316. implementation eq
  7317. parameters
  7318. real effort = 0.0;
  7319. variables
  7320. real flow[6];
  7321. equations
  7322. p.e = effort;
  7323. flow = p.f;
  7324. implementation_end;
  7325. Wtip1 1504 488
  7326. description '<Description>
  7327. <Version>4.0</Version>
  7328. <IsMainModel>1</IsMainModel>
  7329. <KeepParameterValues>False</KeepParameterValues>
  7330. <LibraryPath>Bond Graph\Se.emx</LibraryPath>
  7331. <TimeStamp>2007-9-25 12:3:26</TimeStamp>
  7332. <AllowLibraryUpdate>True</AllowLibraryUpdate>
  7333. </Description>';
  7334. type Se
  7335. ports
  7336. power out p [6,1];
  7337. restrictions
  7338. causality fixed out p;
  7339. end;
  7340. icon bg bottom
  7341. figures
  7342. text 'Se' 1504 488 color 0 18 bold;
  7343. end;
  7344. implementation eq
  7345. parameters
  7346. real effort = 0.0;
  7347. variables
  7348. real flow[6];
  7349. equations
  7350. p.e = effort;
  7351. flow = p.f;
  7352. implementation_end;
  7353. ZeroJunction2 808 232
  7354. description '<Information>
  7355. <Description>
  7356. <Version>4.2</Version>
  7357. <IsMainModel>1</IsMainModel>
  7358. <KeepParameterValues>False</KeepParameterValues>
  7359. <LibraryPath>Bond Graph\ZeroJunction.emx</LibraryPath>
  7360. <TimeStamp>2011-11-29 16:45:16</TimeStamp>
  7361. </Description>
  7362. </Information>';
  7363. knot ZeroJunction
  7364. ports
  7365. power knot duplicatable none p [1];
  7366. signal knot out effort [1];
  7367. restrictions
  7368. causality constraint one_in p;
  7369. end;
  7370. icon bg
  7371. figures
  7372. text '0' 808 232 color 0 18 bold;
  7373. end;
  7374. implementation eq
  7375. equations
  7376. sum (direct (p.f)) = 0;
  7377. equal (collect (p.e));
  7378. effort = first (p.e);
  7379. implementation_end;
  7380. end;
  7381. connections
  7382. Base\Hout -> JointBase1\Hin;
  7383. Base\p => JointBase2\p2;
  7384. Base1\p => JointBase1\p2;
  7385. Base2\Hout -> Link1\Hin;
  7386. Base2\p1 <= Link1\Pout;
  7387. Base3\Hin <- Link2\Hout;
  7388. Base3\Hout -> Link3\Hin;
  7389. Base4\Hin <- Link4\Hout;
  7390. Base4\Hout -> Submodel7\input;
  7391. Constant\output -> Splitter2\input;
  7392. Constant1\output -> Splitter1\input;
  7393. Joint\p => Link3\Pin;
  7394. Joint\p2 <= Link4\Pout;
  7395. JointBase1\Hout -> Base1\Hin;
  7396. JointBase1\p => Base\p1;
  7397. JointBase2\Hout -> Base\Hin;
  7398. JointBase2\p => OneJunction\p;
  7399. JointBase3\Hout -> Link2\Hin;
  7400. JointBase3\p => Link1\Pin;
  7401. JointBase3\p1 <= ZeroJunction2\p;
  7402. JointBase3\p2 <= Link2\Pout;
  7403. Link\Hout -> Base2\Hin;
  7404. Link\Pin <= Base2\p;
  7405. Link1\Hout -> JointBase3\Hin;
  7406. Link2\Pin <= Base3\p;
  7407. Link3\Hout -> Joint\Hin;
  7408. Link3\Pout => Base3\p1;
  7409. Link4\Hin <- Joint\Hout;
  7410. Link4\Pin <= Base4\p;
  7411. OneJunction\p <= Sf\p;
  7412. OneJunction1\p <= Link\Pout;
  7413. OneJunction1\p <= Sf1\p;
  7414. OneJunction3\p => JointBase1\p1;
  7415. Splitter1\output -> Splitter3\input;
  7416. Splitter1\output -> Submodel1\input;
  7417. Splitter2\output -> JointBase2\Hin;
  7418. Splitter2\output -> Splitter4\input;
  7419. Splitter3\output -> Submodel2\input;
  7420. Splitter4\output -> Link\Hin;
  7421. Submodel1\p2 => JointBase2\p1;
  7422. Submodel2\p2 => OneJunction3\p;
  7423. Wtip0\p => Base1\p1;
  7424. Wtip1\p => Base4\p1;
  7425. ZeroJunction2\p <= OneJunction3\p 808 160;
  7426. ZeroJunction2\p => Joint\p1;
  7427. end;
  7428. implementation_end;
  7429. ]]>
  7430. </Sidops>
  7431. </Model>
  7432. <Experiments>
  7433. <DefaultExperiment><![CDATA[Experiment 1]]>
  7434. </DefaultExperiment>
  7435. <Experiment>
  7436. <Name>Experiment 1</Name>
  7437. <CreatedBy></CreatedBy>
  7438. <Info></Info>
  7439. <ExpData>
  7440. <VersionNumber>4.8</VersionNumber>
  7441. <ModelProperties>
  7442. <ModelProperty section="tools\graph editor" entry="debugMode" value="0"/>
  7443. </ModelProperties>
  7444. <Variables>
  7445. <Constants>
  7446. </Constants>
  7447. <Parameters>
  7448. <Variable>
  7449. <Name>epsilon</Name>
  7450. <Value>0</Value>
  7451. </Variable>
  7452. </Parameters>
  7453. <Initials>
  7454. <Variable>
  7455. <Name>Base1\InertialTensor\state_initial</Name>
  7456. <Rows>6</Rows>
  7457. <Columns>1</Columns>
  7458. <Value>0 0 0 0 0 0</Value>
  7459. </Variable>
  7460. <Variable>
  7461. <Name>Base3\InertialTensor\state_initial</Name>
  7462. <Rows>6</Rows>
  7463. <Columns>1</Columns>
  7464. <Value>0 0 0 0 0 0</Value>
  7465. </Variable>
  7466. <Variable>
  7467. <Name>Base4\InertialTensor\state_initial</Name>
  7468. <Rows>6</Rows>
  7469. <Columns>1</Columns>
  7470. <Value>0 0 0 0 0 0</Value>
  7471. </Variable>
  7472. <Variable>
  7473. <Name>Base\InertialTensor\state_initial</Name>
  7474. <Rows>6</Rows>
  7475. <Columns>1</Columns>
  7476. <Value>0 0 0 0 0 0</Value>
  7477. </Variable>
  7478. <Variable>
  7479. <Name>JointBase1\EndstopMax\Cendstop\state_initial</Name>
  7480. <Value>0</Value>
  7481. </Variable>
  7482. <Variable>
  7483. <Name>JointBase1\EndstopMin\Cendstop\state_initial</Name>
  7484. <Value>0</Value>
  7485. </Variable>
  7486. <Variable>
  7487. <Name>JointBase2\EndstopMax\Cendstop\state_initial</Name>
  7488. <Value>0</Value>
  7489. </Variable>
  7490. <Variable>
  7491. <Name>JointBase2\EndstopMin\Cendstop\state_initial</Name>
  7492. <Value>0</Value>
  7493. </Variable>
  7494. <Variable>
  7495. <Name>JointBase3\EndstopMax\Cendstop\state_initial</Name>
  7496. <Value>0</Value>
  7497. </Variable>
  7498. <Variable>
  7499. <Name>JointBase3\EndstopMin\Cendstop\state_initial</Name>
  7500. <Value>0</Value>
  7501. </Variable>
  7502. <Variable>
  7503. <Name>Joint\EndstopMax\Cendstop\state_initial</Name>
  7504. <Value>0</Value>
  7505. </Variable>
  7506. <Variable>
  7507. <Name>Joint\EndstopMin\Cendstop\state_initial</Name>
  7508. <Value>0</Value>
  7509. </Variable>
  7510. <Variable>
  7511. <Name>Joint\JointType\uTbai\state_initial</Name>
  7512. <Rows>6</Rows>
  7513. <Columns>1</Columns>
  7514. <Value>0 0 0 0 0 0</Value>
  7515. </Variable>
  7516. <Variable>
  7517. <Name>new_state1_initial</Name>
  7518. <Value>0</Value>
  7519. </Variable>
  7520. <Variable>
  7521. <Name>new_state10_initial</Name>
  7522. <Value>0</Value>
  7523. </Variable>
  7524. <Variable>
  7525. <Name>new_state11_initial</Name>
  7526. <Value>0</Value>
  7527. </Variable>
  7528. <Variable>
  7529. <Name>new_state12_initial</Name>
  7530. <Value>0</Value>
  7531. </Variable>
  7532. <Variable>
  7533. <Name>new_state13_initial</Name>
  7534. <Value>0</Value>
  7535. </Variable>
  7536. <Variable>
  7537. <Name>new_state14_initial</Name>
  7538. <Value>0</Value>
  7539. </Variable>
  7540. <Variable>
  7541. <Name>new_state15_initial</Name>
  7542. <Value>0</Value>
  7543. </Variable>
  7544. <Variable>
  7545. <Name>new_state2_initial</Name>
  7546. <Value>0</Value>
  7547. </Variable>
  7548. <Variable>
  7549. <Name>new_state3_initial</Name>
  7550. <Value>0</Value>
  7551. </Variable>
  7552. <Variable>
  7553. <Name>new_state4_initial</Name>
  7554. <Value>0</Value>
  7555. </Variable>
  7556. <Variable>
  7557. <Name>new_state5_initial</Name>
  7558. <Value>0</Value>
  7559. </Variable>
  7560. <Variable>
  7561. <Name>new_state6_initial</Name>
  7562. <Value>0</Value>
  7563. </Variable>
  7564. <Variable>
  7565. <Name>new_state7_initial</Name>
  7566. <Value>0</Value>
  7567. </Variable>
  7568. <Variable>
  7569. <Name>new_state8_initial</Name>
  7570. <Value>0</Value>
  7571. </Variable>
  7572. <Variable>
  7573. <Name>new_state9_initial</Name>
  7574. <Value>0</Value>
  7575. </Variable>
  7576. <Variable>
  7577. <Name>Joint\EndstopMax\Collision\p12.f_initial</Name>
  7578. <Value>0</Value>
  7579. </Variable>
  7580. <Variable>
  7581. <Name>Joint\EndstopMin\Collision\p12.f_initial</Name>
  7582. <Value>0</Value>
  7583. </Variable>
  7584. <Variable>
  7585. <Name>Joint\Rjoint\p.e_initial</Name>
  7586. <Value>0</Value>
  7587. </Variable>
  7588. <Variable>
  7589. <Name>Submodel2\R\p.f_initial</Name>
  7590. <Value>0</Value>
  7591. </Variable>
  7592. </Initials>
  7593. </Variables>
  7594. <PlotSpecs>
  7595. <VarNames>
  7596. <VarName>time</VarName>
  7597. <VarName>Submodel7\position[1]</VarName>
  7598. <VarName>Submodel7\position[2]</VarName>
  7599. <VarName>Submodel7\position[3]</VarName>
  7600. <VarName>Submodel7\rotation[1]</VarName>
  7601. <VarName>Submodel7\rotation[2]</VarName>
  7602. <VarName>Submodel7\rotation[3]</VarName>
  7603. </VarNames>
  7604. <Plots>
  7605. <Plot>
  7606. <PlotType>GraphPlot</PlotType>
  7607. <BasePlot>
  7608. <PlotId>1</PlotId>
  7609. <UseWindowsBGColor>false</UseWindowsBGColor>
  7610. <BGColor>16777215</BGColor>
  7611. <PlotIsVisible>true</PlotIsVisible>
  7612. </BasePlot>
  7613. <Grid>
  7614. <DrawGrid>true</DrawGrid>
  7615. <GridColor>15780518</GridColor>
  7616. <GridBorderLineColor>12624260</GridBorderLineColor>
  7617. <GridZeroLineColor>0</GridZeroLineColor>
  7618. <XTicks>10</XTicks>
  7619. <YTicks>10</YTicks>
  7620. <ZTicks>10</ZTicks>
  7621. <Use3DLook>false</Use3DLook>
  7622. </Grid>
  7623. <PlotBGColor>16777215</PlotBGColor>
  7624. <ShowPlotTitle>true</ShowPlotTitle>
  7625. <TitlePosition>1</TitlePosition>
  7626. <PlotTitle>model</PlotTitle>
  7627. <ShowXValues>true</ShowXValues>
  7628. <Fonts>
  7629. <TitleFont>
  7630. <Name>Arial</Name>
  7631. <Height>12</Height>
  7632. <PitchFamily>34</PitchFamily>
  7633. <Weight>400</Weight>
  7634. <Italic>0</Italic>
  7635. <UnderLine>0</UnderLine>
  7636. <StrikeOut>0</StrikeOut>
  7637. <Color>0</Color>
  7638. </TitleFont>
  7639. <LabelFont>
  7640. <Name>Arial</Name>
  7641. <Height>12</Height>
  7642. <PitchFamily>34</PitchFamily>
  7643. <Weight>400</Weight>
  7644. <Italic>0</Italic>
  7645. <UnderLine>0</UnderLine>
  7646. <StrikeOut>0</StrikeOut>
  7647. <Color>0</Color>
  7648. </LabelFont>
  7649. <ValuesFont>
  7650. <Name>Arial</Name>
  7651. <Height>10</Height>
  7652. <PitchFamily>34</PitchFamily>
  7653. <Weight>400</Weight>
  7654. <Italic>0</Italic>
  7655. <UnderLine>0</UnderLine>
  7656. <StrikeOut>0</StrikeOut>
  7657. <Color>0</Color>
  7658. </ValuesFont>
  7659. <LegendFont>
  7660. <Name>Arial</Name>
  7661. <Height>12</Height>
  7662. <PitchFamily>34</PitchFamily>
  7663. <Weight>400</Weight>
  7664. <Italic>0</Italic>
  7665. <UnderLine>0</UnderLine>
  7666. <StrikeOut>0</StrikeOut>
  7667. <Color>0</Color>
  7668. </LegendFont>
  7669. </Fonts>
  7670. <SharedXAxis>true</SharedXAxis>
  7671. <SharedYAxis>true</SharedYAxis>
  7672. <SharedZAxis>false</SharedZAxis>
  7673. <XAxes>
  7674. <Axis>
  7675. <Minimum>0.0</Minimum>
  7676. <Maximum>10.0</Maximum>
  7677. <Linear>true</Linear>
  7678. <Scaling>3</Scaling>
  7679. <Label>time</Label>
  7680. </Axis>
  7681. </XAxes>
  7682. <YAxes>
  7683. <Axis>
  7684. <Minimum>-1.0</Minimum>
  7685. <Maximum>1.0</Maximum>
  7686. <Linear>true</Linear>
  7687. <Scaling>2</Scaling>
  7688. <Label>position[1]</Label>
  7689. </Axis>
  7690. <Axis>
  7691. <Minimum>-0.5</Minimum>
  7692. <Maximum>0.5</Maximum>
  7693. <Linear>true</Linear>
  7694. <Scaling>2</Scaling>
  7695. <Label>position[2]</Label>
  7696. </Axis>
  7697. <Axis>
  7698. <Minimum>-0.5</Minimum>
  7699. <Maximum>0.5</Maximum>
  7700. <Linear>true</Linear>
  7701. <Scaling>2</Scaling>
  7702. <Label>position[3]</Label>
  7703. </Axis>
  7704. <Axis>
  7705. <Minimum>-0.5</Minimum>
  7706. <Maximum>0.5</Maximum>
  7707. <Linear>true</Linear>
  7708. <Scaling>2</Scaling>
  7709. <Label>rotation[1]</Label>
  7710. </Axis>
  7711. <Axis>
  7712. <Minimum>-0.5</Minimum>
  7713. <Maximum>0.5</Maximum>
  7714. <Linear>true</Linear>
  7715. <Scaling>2</Scaling>
  7716. <Label>rotation[2]</Label>
  7717. </Axis>
  7718. <Axis>
  7719. <Minimum>-0.5</Minimum>
  7720. <Maximum>0.5</Maximum>
  7721. <Linear>true</Linear>
  7722. <Scaling>2</Scaling>
  7723. <Label>rotation[3]</Label>
  7724. </Axis>
  7725. </YAxes>
  7726. <ZAxes>
  7727. </ZAxes>
  7728. <Curves>
  7729. <Curve>
  7730. <LineColor>3355111</LineColor>
  7731. <LineStyle>1</LineStyle>
  7732. <TickColor>3355111</TickColor>
  7733. <TickStyle>0</TickStyle>
  7734. <CurveVisible>true</CurveVisible>
  7735. <PixelThresshold>1</PixelThresshold>
  7736. <LineThickness>1</LineThickness>
  7737. <LineOrder>1</LineOrder>
  7738. <ShowYValues>true</ShowYValues>
  7739. <XCurveData>
  7740. <ShowUnit>true</ShowUnit>
  7741. <VarName>time</VarName>
  7742. </XCurveData>
  7743. <YCurveData>
  7744. <ShowUnit>true</ShowUnit>
  7745. <VarName>Submodel7\position[1]</VarName>
  7746. </YCurveData>
  7747. </Curve>
  7748. <Curve>
  7749. <LineColor>6076255</LineColor>
  7750. <LineStyle>1</LineStyle>
  7751. <TickColor>6076255</TickColor>
  7752. <TickStyle>0</TickStyle>
  7753. <CurveVisible>true</CurveVisible>
  7754. <PixelThresshold>1</PixelThresshold>
  7755. <LineThickness>1</LineThickness>
  7756. <LineOrder>1</LineOrder>
  7757. <ShowYValues>true</ShowYValues>
  7758. <XCurveData>
  7759. <ShowUnit>true</ShowUnit>
  7760. <VarName>time</VarName>
  7761. </XCurveData>
  7762. <YCurveData>
  7763. <ShowUnit>true</ShowUnit>
  7764. <VarName>Submodel7\position[2]</VarName>
  7765. </YCurveData>
  7766. </Curve>
  7767. <Curve>
  7768. <LineColor>12553035</LineColor>
  7769. <LineStyle>1</LineStyle>
  7770. <TickColor>12553035</TickColor>
  7771. <TickStyle>0</TickStyle>
  7772. <CurveVisible>true</CurveVisible>
  7773. <PixelThresshold>1</PixelThresshold>
  7774. <LineThickness>1</LineThickness>
  7775. <LineOrder>1</LineOrder>
  7776. <ShowYValues>true</ShowYValues>
  7777. <XCurveData>
  7778. <ShowUnit>true</ShowUnit>
  7779. <VarName>time</VarName>
  7780. </XCurveData>
  7781. <YCurveData>
  7782. <ShowUnit>true</ShowUnit>
  7783. <VarName>Submodel7\position[3]</VarName>
  7784. </YCurveData>
  7785. </Curve>
  7786. <Curve>
  7787. <LineColor>15086320</LineColor>
  7788. <LineStyle>1</LineStyle>
  7789. <TickColor>15086320</TickColor>
  7790. <TickStyle>0</TickStyle>
  7791. <CurveVisible>true</CurveVisible>
  7792. <PixelThresshold>1</PixelThresshold>
  7793. <LineThickness>1</LineThickness>
  7794. <LineOrder>1</LineOrder>
  7795. <ShowYValues>true</ShowYValues>
  7796. <XCurveData>
  7797. <ShowUnit>true</ShowUnit>
  7798. <VarName>time</VarName>
  7799. </XCurveData>
  7800. <YCurveData>
  7801. <ShowUnit>true</ShowUnit>
  7802. <VarName>Submodel7\rotation[1]</VarName>
  7803. </YCurveData>
  7804. </Curve>
  7805. <Curve>
  7806. <LineColor>15790150</LineColor>
  7807. <LineStyle>1</LineStyle>
  7808. <TickColor>15790150</TickColor>
  7809. <TickStyle>0</TickStyle>
  7810. <CurveVisible>true</CurveVisible>
  7811. <PixelThresshold>1</PixelThresshold>
  7812. <LineThickness>1</LineThickness>
  7813. <LineOrder>1</LineOrder>
  7814. <ShowYValues>true</ShowYValues>
  7815. <XCurveData>
  7816. <ShowUnit>true</ShowUnit>
  7817. <VarName>time</VarName>
  7818. </XCurveData>
  7819. <YCurveData>
  7820. <ShowUnit>true</ShowUnit>
  7821. <VarName>Submodel7\rotation[2]</VarName>
  7822. </YCurveData>
  7823. </Curve>
  7824. <Curve>
  7825. <LineColor>1696255</LineColor>
  7826. <LineStyle>1</LineStyle>
  7827. <TickColor>1696255</TickColor>
  7828. <TickStyle>0</TickStyle>
  7829. <CurveVisible>true</CurveVisible>
  7830. <PixelThresshold>1</PixelThresshold>
  7831. <LineThickness>1</LineThickness>
  7832. <LineOrder>1</LineOrder>
  7833. <ShowYValues>true</ShowYValues>
  7834. <XCurveData>
  7835. <ShowUnit>true</ShowUnit>
  7836. <VarName>time</VarName>
  7837. </XCurveData>
  7838. <YCurveData>
  7839. <ShowUnit>true</ShowUnit>
  7840. <VarName>Submodel7\rotation[3]</VarName>
  7841. </YCurveData>
  7842. </Curve>
  7843. </Curves>
  7844. <Legenda>
  7845. <ShowLegenda>true</ShowLegenda>
  7846. <BorderPenColor>0</BorderPenColor>
  7847. <BackgroundColor>16777215</BackgroundColor>
  7848. </Legenda>
  7849. </Plot>
  7850. <Plot>
  7851. <PlotType>D3DPlot</PlotType>
  7852. <BasePlot>
  7853. <PlotId>2</PlotId>
  7854. <UseWindowsBGColor>false</UseWindowsBGColor>
  7855. <BGColor>16777215</BGColor>
  7856. <PlotIsVisible>true</PlotIsVisible>
  7857. </BasePlot>
  7858. <PlotTitle>3D Animation</PlotTitle>
  7859. <RenderQuality>137</RenderQuality>
  7860. <ShowGrid>true</ShowGrid>
  7861. <ShowFPS>false</ShowFPS>
  7862. <BackgroundColor>4294967295</BackgroundColor>
  7863. <SceneBackgroundImage>Gradients\BlueWhite.png</SceneBackgroundImage>
  7864. <ApplyTextureBackground>true</ApplyTextureBackground>
  7865. <FrameScale>1.0</FrameScale>
  7866. <FrameThickness>1.0</FrameThickness>
  7867. <MainFrame>
  7868. <Frame>
  7869. <ScaleValue>
  7870. <X>
  7871. <Value>1</Value>
  7872. </X>
  7873. <Y>
  7874. <Value>1</Value>
  7875. </Y>
  7876. <Z>
  7877. <Value>1</Value>
  7878. </Z>
  7879. </ScaleValue>
  7880. <ShowReferenceFrame>true</ShowReferenceFrame>
  7881. <Name>Reference Frame</Name>
  7882. <Position>
  7883. </Position>
  7884. <Orientation>
  7885. <Angles>
  7886. </Angles>
  7887. <OrientationType>Bryant</OrientationType>
  7888. </Orientation>
  7889. <LockX>false</LockX>
  7890. <LockY>false</LockY>
  7891. <LockZ>false</LockZ>
  7892. <LockXPitch>false</LockXPitch>
  7893. <LockYYaw>false</LockYYaw>
  7894. <LockZRoll>false</LockZRoll>
  7895. <Childs>
  7896. <Frame>
  7897. <ScaleValue>
  7898. <X>
  7899. <Value>1</Value>
  7900. </X>
  7901. <Y>
  7902. <Value>1</Value>
  7903. </Y>
  7904. <Z>
  7905. <Value>1</Value>
  7906. </Z>
  7907. </ScaleValue>
  7908. <ShowReferenceFrame>false</ShowReferenceFrame>
  7909. <Name>Default Lights and Cameras</Name>
  7910. <Position>
  7911. </Position>
  7912. <Orientation>
  7913. <Angles>
  7914. </Angles>
  7915. <OrientationType>Bryant</OrientationType>
  7916. </Orientation>
  7917. <LockX>false</LockX>
  7918. <LockY>false</LockY>
  7919. <LockZ>false</LockZ>
  7920. <LockXPitch>false</LockXPitch>
  7921. <LockYYaw>false</LockYYaw>
  7922. <LockZRoll>false</LockZRoll>
  7923. <Childs>
  7924. <Light>
  7925. <ShowReferenceFrame>false</ShowReferenceFrame>
  7926. <Name>Ambient</Name>
  7927. <Position>
  7928. </Position>
  7929. <Orientation>
  7930. <ZAxis>
  7931. <Z>
  7932. <Value>1</Value>
  7933. </Z>
  7934. </ZAxis>
  7935. <YAxis>
  7936. <Y>
  7937. <Value>1</Value>
  7938. </Y>
  7939. </YAxis>
  7940. <OrientationType>Direct3D</OrientationType>
  7941. </Orientation>
  7942. <LockX>false</LockX>
  7943. <LockY>false</LockY>
  7944. <LockZ>false</LockZ>
  7945. <LockXPitch>false</LockXPitch>
  7946. <LockYYaw>false</LockYYaw>
  7947. <LockZRoll>false</LockZRoll>
  7948. <Childs>
  7949. </Childs>
  7950. <LightType>0</LightType>
  7951. <LightColor>
  7952. <Color>
  7953. <X>
  7954. <Value>0.3</Value>
  7955. </X>
  7956. <Y>
  7957. <Value>0.3</Value>
  7958. </Y>
  7959. <Z>
  7960. <Value>0.3</Value>
  7961. </Z>
  7962. </Color>
  7963. <Offset>
  7964. </Offset>
  7965. <Multipliers>
  7966. <X>
  7967. <Value>1</Value>
  7968. </X>
  7969. <Y>
  7970. <Value>1</Value>
  7971. </Y>
  7972. <Z>
  7973. <Value>1</Value>
  7974. </Z>
  7975. </Multipliers>
  7976. <Direct3DColorRange>true</Direct3DColorRange>
  7977. </LightColor>
  7978. <AmbientLight>
  7979. <Color>
  7980. <X>
  7981. <Value>0.3</Value>
  7982. </X>
  7983. <Y>
  7984. <Value>0.3</Value>
  7985. </Y>
  7986. <Z>
  7987. <Value>0.3</Value>
  7988. </Z>
  7989. </Color>
  7990. <Offset>
  7991. </Offset>
  7992. <Multipliers>
  7993. <X>
  7994. <Value>1</Value>
  7995. </X>
  7996. <Y>
  7997. <Value>1</Value>
  7998. </Y>
  7999. <Z>
  8000. <Value>1</Value>
  8001. </Z>
  8002. </Multipliers>
  8003. <Direct3DColorRange>true</Direct3DColorRange>
  8004. </AmbientLight>
  8005. <AmbientOn>true</AmbientOn>
  8006. <DiffuseOn>false</DiffuseOn>
  8007. <SpecularOn>false</SpecularOn>
  8008. </Light>
  8009. <Light>
  8010. <ShowReferenceFrame>false</ShowReferenceFrame>
  8011. <Name>Parallel</Name>
  8012. <Position>
  8013. <X>
  8014. <Value>-3</Value>
  8015. </X>
  8016. <Y>
  8017. <Value>5</Value>
  8018. </Y>
  8019. <Z>
  8020. <Value>3</Value>
  8021. </Z>
  8022. </Position>
  8023. <Orientation>
  8024. <ZAxis>
  8025. <X>
  8026. <Value>0.457495710997814</Value>
  8027. </X>
  8028. <Y>
  8029. <Value>-0.762492851663023</Value>
  8030. </Y>
  8031. <Z>
  8032. <Value>-0.457495710997814</Value>
  8033. </Z>
  8034. </ZAxis>
  8035. <YAxis>
  8036. <X>
  8037. <Value>0.235379601434674</Value>
  8038. </X>
  8039. <Y>
  8040. <Value>-0.392299335724456</Value>
  8041. </Y>
  8042. <Z>
  8043. <Value>0.889211827642101</Value>
  8044. </Z>
  8045. </YAxis>
  8046. <OrientationType>Direct3D</OrientationType>
  8047. </Orientation>
  8048. <LockX>false</LockX>
  8049. <LockY>false</LockY>
  8050. <LockZ>false</LockZ>
  8051. <LockXPitch>false</LockXPitch>
  8052. <LockYYaw>false</LockYYaw>
  8053. <LockZRoll>false</LockZRoll>
  8054. <Childs>
  8055. </Childs>
  8056. <LightType>3</LightType>
  8057. <LightColor>
  8058. <Color>
  8059. <X>
  8060. <Value>0.5</Value>
  8061. </X>
  8062. <Y>
  8063. <Value>0.5</Value>
  8064. </Y>
  8065. <Z>
  8066. <Value>0.5</Value>
  8067. </Z>
  8068. </Color>
  8069. <Offset>
  8070. </Offset>
  8071. <Multipliers>
  8072. <X>
  8073. <Value>1</Value>
  8074. </X>
  8075. <Y>
  8076. <Value>1</Value>
  8077. </Y>
  8078. <Z>
  8079. <Value>1</Value>
  8080. </Z>
  8081. </Multipliers>
  8082. <Direct3DColorRange>true</Direct3DColorRange>
  8083. </LightColor>
  8084. <Attenuation>
  8085. <Constant>
  8086. <Value>1.0</Value>
  8087. </Constant>
  8088. <Linear>
  8089. <Value>0.0</Value>
  8090. </Linear>
  8091. <Quadratic>
  8092. <Value>0.0</Value>
  8093. </Quadratic>
  8094. </Attenuation>
  8095. <DiffuseLight>
  8096. <Color>
  8097. <X>
  8098. <Value>0.5</Value>
  8099. </X>
  8100. <Y>
  8101. <Value>0.5</Value>
  8102. </Y>
  8103. <Z>
  8104. <Value>0.5</Value>
  8105. </Z>
  8106. </Color>
  8107. <Offset>
  8108. </Offset>
  8109. <Multipliers>
  8110. <X>
  8111. <Value>1</Value>
  8112. </X>
  8113. <Y>
  8114. <Value>1</Value>
  8115. </Y>
  8116. <Z>
  8117. <Value>1</Value>
  8118. </Z>
  8119. </Multipliers>
  8120. <Direct3DColorRange>true</Direct3DColorRange>
  8121. </DiffuseLight>
  8122. <SpecularLight>
  8123. <Color>
  8124. <X>
  8125. <Value>0.5</Value>
  8126. </X>
  8127. <Y>
  8128. <Value>0.5</Value>
  8129. </Y>
  8130. <Z>
  8131. <Value>0.5</Value>
  8132. </Z>
  8133. </Color>
  8134. <Offset>
  8135. </Offset>
  8136. <Multipliers>
  8137. <X>
  8138. <Value>1</Value>
  8139. </X>
  8140. <Y>
  8141. <Value>1</Value>
  8142. </Y>
  8143. <Z>
  8144. <Value>1</Value>
  8145. </Z>
  8146. </Multipliers>
  8147. <Direct3DColorRange>true</Direct3DColorRange>
  8148. </SpecularLight>
  8149. <AmbientOn>false</AmbientOn>
  8150. <DiffuseOn>true</DiffuseOn>
  8151. <SpecularOn>true</SpecularOn>
  8152. </Light>
  8153. <Light>
  8154. <ShowReferenceFrame>false</ShowReferenceFrame>
  8155. <Name>Spot Light 1</Name>
  8156. <Position>
  8157. <X>
  8158. <Value>-3</Value>
  8159. </X>
  8160. <Y>
  8161. <Value>-5</Value>
  8162. </Y>
  8163. <Z>
  8164. <Value>1</Value>
  8165. </Z>
  8166. </Position>
  8167. <Orientation>
  8168. <ZAxis>
  8169. <X>
  8170. <Value>0.50709255283711</Value>
  8171. </X>
  8172. <Y>
  8173. <Value>0.845154254728517</Value>
  8174. </Y>
  8175. <Z>
  8176. <Value>-0.169030850945703</Value>
  8177. </Z>
  8178. </ZAxis>
  8179. <YAxis>
  8180. <X>
  8181. <Value>0.0869656553478673</Value>
  8182. </X>
  8183. <Y>
  8184. <Value>0.144942758913112</Value>
  8185. </Y>
  8186. <Z>
  8187. <Value>0.985610760609162</Value>
  8188. </Z>
  8189. </YAxis>
  8190. <OrientationType>Direct3D</OrientationType>
  8191. </Orientation>
  8192. <LockX>false</LockX>
  8193. <LockY>false</LockY>
  8194. <LockZ>false</LockZ>
  8195. <LockXPitch>false</LockXPitch>
  8196. <LockYYaw>false</LockYYaw>
  8197. <LockZRoll>false</LockZRoll>
  8198. <Childs>
  8199. </Childs>
  8200. <LightType>2</LightType>
  8201. <LightColor>
  8202. <Color>
  8203. <X>
  8204. <Value>0.5</Value>
  8205. </X>
  8206. <Y>
  8207. <Value>0.5</Value>
  8208. </Y>
  8209. <Z>
  8210. <Value>0.5</Value>
  8211. </Z>
  8212. </Color>
  8213. <Offset>
  8214. </Offset>
  8215. <Multipliers>
  8216. <X>
  8217. <Value>1</Value>
  8218. </X>
  8219. <Y>
  8220. <Value>1</Value>
  8221. </Y>
  8222. <Z>
  8223. <Value>1</Value>
  8224. </Z>
  8225. </Multipliers>
  8226. <Direct3DColorRange>true</Direct3DColorRange>
  8227. </LightColor>
  8228. <Attenuation>
  8229. <Constant>
  8230. <Value>1.0</Value>
  8231. </Constant>
  8232. <Linear>
  8233. <Value>0.05</Value>
  8234. </Linear>
  8235. <Quadratic>
  8236. <Value>0.05</Value>
  8237. </Quadratic>
  8238. </Attenuation>
  8239. <Umbra>
  8240. <Value>1.0471975511965976</Value>
  8241. </Umbra>
  8242. <Penumbra>
  8243. <Value>1.0471975511965976</Value>
  8244. </Penumbra>
  8245. <SpotExponent>0.0</SpotExponent>
  8246. <DiffuseLight>
  8247. <Color>
  8248. <X>
  8249. <Value>0.5</Value>
  8250. </X>
  8251. <Y>
  8252. <Value>0.5</Value>
  8253. </Y>
  8254. <Z>
  8255. <Value>0.5</Value>
  8256. </Z>
  8257. </Color>
  8258. <Offset>
  8259. </Offset>
  8260. <Multipliers>
  8261. <X>
  8262. <Value>1</Value>
  8263. </X>
  8264. <Y>
  8265. <Value>1</Value>
  8266. </Y>
  8267. <Z>
  8268. <Value>1</Value>
  8269. </Z>
  8270. </Multipliers>
  8271. <Direct3DColorRange>true</Direct3DColorRange>
  8272. </DiffuseLight>
  8273. <SpecularLight>
  8274. <Color>
  8275. <X>
  8276. <Value>0.5</Value>
  8277. </X>
  8278. <Y>
  8279. <Value>0.5</Value>
  8280. </Y>
  8281. <Z>
  8282. <Value>0.5</Value>
  8283. </Z>
  8284. </Color>
  8285. <Offset>
  8286. </Offset>
  8287. <Multipliers>
  8288. <X>
  8289. <Value>1</Value>
  8290. </X>
  8291. <Y>
  8292. <Value>1</Value>
  8293. </Y>
  8294. <Z>
  8295. <Value>1</Value>
  8296. </Z>
  8297. </Multipliers>
  8298. <Direct3DColorRange>true</Direct3DColorRange>
  8299. </SpecularLight>
  8300. <AmbientOn>false</AmbientOn>
  8301. <DiffuseOn>true</DiffuseOn>
  8302. <SpecularOn>true</SpecularOn>
  8303. </Light>
  8304. <Light>
  8305. <ShowReferenceFrame>false</ShowReferenceFrame>
  8306. <Name>Spot Light 2</Name>
  8307. <Position>
  8308. <X>
  8309. <Value>2</Value>
  8310. </X>
  8311. <Y>
  8312. <Value>-3</Value>
  8313. </Y>
  8314. <Z>
  8315. <Value>-1</Value>
  8316. </Z>
  8317. </Position>
  8318. <Orientation>
  8319. <ZAxis>
  8320. <X>
  8321. <Value>-0.534522483824849</Value>
  8322. </X>
  8323. <Y>
  8324. <Value>0.801783725737273</Value>
  8325. </Y>
  8326. <Z>
  8327. <Value>0.267261241912424</Value>
  8328. </Z>
  8329. </ZAxis>
  8330. <YAxis>
  8331. <X>
  8332. <Value>0.14824986333222</Value>
  8333. </X>
  8334. <Y>
  8335. <Value>-0.22237479499833</Value>
  8336. </Y>
  8337. <Z>
  8338. <Value>0.963624111659432</Value>
  8339. </Z>
  8340. </YAxis>
  8341. <OrientationType>Direct3D</OrientationType>
  8342. </Orientation>
  8343. <LockX>false</LockX>
  8344. <LockY>false</LockY>
  8345. <LockZ>false</LockZ>
  8346. <LockXPitch>false</LockXPitch>
  8347. <LockYYaw>false</LockYYaw>
  8348. <LockZRoll>false</LockZRoll>
  8349. <Childs>
  8350. </Childs>
  8351. <LightType>2</LightType>
  8352. <LightColor>
  8353. <Color>
  8354. <X>
  8355. <Value>1</Value>
  8356. </X>
  8357. <Y>
  8358. <Value>1</Value>
  8359. </Y>
  8360. <Z>
  8361. <Value>1</Value>
  8362. </Z>
  8363. </Color>
  8364. <Offset>
  8365. </Offset>
  8366. <Multipliers>
  8367. <X>
  8368. <Value>1</Value>
  8369. </X>
  8370. <Y>
  8371. <Value>1</Value>
  8372. </Y>
  8373. <Z>
  8374. <Value>1</Value>
  8375. </Z>
  8376. </Multipliers>
  8377. <Direct3DColorRange>true</Direct3DColorRange>
  8378. </LightColor>
  8379. <Attenuation>
  8380. <Constant>
  8381. <Value>1.0</Value>
  8382. </Constant>
  8383. <Linear>
  8384. <Value>0.05</Value>
  8385. </Linear>
  8386. <Quadratic>
  8387. <Value>0.05</Value>
  8388. </Quadratic>
  8389. </Attenuation>
  8390. <Umbra>
  8391. <Value>1.5707963267948966</Value>
  8392. </Umbra>
  8393. <Penumbra>
  8394. <Value>1.5707963267948966</Value>
  8395. </Penumbra>
  8396. <SpotExponent>0.0</SpotExponent>
  8397. <DiffuseLight>
  8398. <Color>
  8399. <X>
  8400. <Value>1</Value>
  8401. </X>
  8402. <Y>
  8403. <Value>1</Value>
  8404. </Y>
  8405. <Z>
  8406. <Value>1</Value>
  8407. </Z>
  8408. </Color>
  8409. <Offset>
  8410. </Offset>
  8411. <Multipliers>
  8412. <X>
  8413. <Value>1</Value>
  8414. </X>
  8415. <Y>
  8416. <Value>1</Value>
  8417. </Y>
  8418. <Z>
  8419. <Value>1</Value>
  8420. </Z>
  8421. </Multipliers>
  8422. <Direct3DColorRange>true</Direct3DColorRange>
  8423. </DiffuseLight>
  8424. <SpecularLight>
  8425. <Color>
  8426. <X>
  8427. <Value>0.5</Value>
  8428. </X>
  8429. <Y>
  8430. <Value>0.5</Value>
  8431. </Y>
  8432. <Z>
  8433. <Value>0.5</Value>
  8434. </Z>
  8435. </Color>
  8436. <Offset>
  8437. </Offset>
  8438. <Multipliers>
  8439. <X>
  8440. <Value>1</Value>
  8441. </X>
  8442. <Y>
  8443. <Value>1</Value>
  8444. </Y>
  8445. <Z>
  8446. <Value>1</Value>
  8447. </Z>
  8448. </Multipliers>
  8449. <Direct3DColorRange>true</Direct3DColorRange>
  8450. </SpecularLight>
  8451. <AmbientOn>false</AmbientOn>
  8452. <DiffuseOn>true</DiffuseOn>
  8453. <SpecularOn>true</SpecularOn>
  8454. </Light>
  8455. <Camera>
  8456. <ShowReferenceFrame>false</ShowReferenceFrame>
  8457. <Name>Camera Looking at Origin</Name>
  8458. <Position>
  8459. <X>
  8460. <Value>8</Value>
  8461. </X>
  8462. <Y>
  8463. <Value>4</Value>
  8464. </Y>
  8465. <Z>
  8466. <Value>4</Value>
  8467. </Z>
  8468. </Position>
  8469. <Orientation>
  8470. <ZAxis>
  8471. <X>
  8472. <Value>-0.816496580927726</Value>
  8473. </X>
  8474. <Y>
  8475. <Value>-0.408248290463863</Value>
  8476. </Y>
  8477. <Z>
  8478. <Value>-0.408248290463863</Value>
  8479. </Z>
  8480. </ZAxis>
  8481. <YAxis>
  8482. <X>
  8483. <Value>-0.365148371670111</Value>
  8484. </X>
  8485. <Y>
  8486. <Value>-0.182574185835055</Value>
  8487. </Y>
  8488. <Z>
  8489. <Value>0.912870929175277</Value>
  8490. </Z>
  8491. </YAxis>
  8492. <OrientationType>Direct3D</OrientationType>
  8493. </Orientation>
  8494. <LockX>false</LockX>
  8495. <LockY>false</LockY>
  8496. <LockZ>false</LockZ>
  8497. <LockXPitch>false</LockXPitch>
  8498. <LockYYaw>false</LockYYaw>
  8499. <LockZRoll>false</LockZRoll>
  8500. <Childs>
  8501. </Childs>
  8502. <FrontPlane>0.01</FrontPlane>
  8503. <BackPlane>100.0</BackPlane>
  8504. <AutoFrontBack>true</AutoFrontBack>
  8505. <Field>0.003926990816987242</Field>
  8506. <Fieldy>45.0</Fieldy>
  8507. <PlaneLeft>-10.0</PlaneLeft>
  8508. <PlaneRight>10.0</PlaneRight>
  8509. <PlaneTop>10.0</PlaneTop>
  8510. <PlaneBottom>-10.0</PlaneBottom>
  8511. <UseLookatPosition>true</UseLookatPosition>
  8512. <LookatPosition>
  8513. </LookatPosition>
  8514. <UseAlwaysLookUp>true</UseAlwaysLookUp>
  8515. <LookUpVector>
  8516. <Z>
  8517. <Value>1</Value>
  8518. </Z>
  8519. </LookUpVector>
  8520. <RightHand>true</RightHand>
  8521. <Perspective>true</Perspective>
  8522. <IsSelectedCamera>true</IsSelectedCamera>
  8523. </Camera>
  8524. <Camera>
  8525. <ShowReferenceFrame>false</ShowReferenceFrame>
  8526. <Name>Front(XY)-Camera</Name>
  8527. <Position>
  8528. <Z>
  8529. <Value>10</Value>
  8530. </Z>
  8531. </Position>
  8532. <Orientation>
  8533. <ZAxis>
  8534. <Z>
  8535. <Value>-1</Value>
  8536. </Z>
  8537. </ZAxis>
  8538. <YAxis>
  8539. <Y>
  8540. <Value>1</Value>
  8541. </Y>
  8542. </YAxis>
  8543. <OrientationType>Direct3D</OrientationType>
  8544. </Orientation>
  8545. <LockX>false</LockX>
  8546. <LockY>false</LockY>
  8547. <LockZ>false</LockZ>
  8548. <LockXPitch>false</LockXPitch>
  8549. <LockYYaw>false</LockYYaw>
  8550. <LockZRoll>false</LockZRoll>
  8551. <Childs>
  8552. </Childs>
  8553. <FrontPlane>0.01</FrontPlane>
  8554. <BackPlane>100.0</BackPlane>
  8555. <AutoFrontBack>true</AutoFrontBack>
  8556. <Field>9.999999999999998</Field>
  8557. <Fieldy>45.0</Fieldy>
  8558. <PlaneLeft>-9.999999999999998</PlaneLeft>
  8559. <PlaneRight>9.999999999999998</PlaneRight>
  8560. <PlaneTop>9.999999999999998</PlaneTop>
  8561. <PlaneBottom>-9.999999999999998</PlaneBottom>
  8562. <UseLookatPosition>true</UseLookatPosition>
  8563. <LookatPosition>
  8564. </LookatPosition>
  8565. <UseAlwaysLookUp>true</UseAlwaysLookUp>
  8566. <LookUpVector>
  8567. <Y>
  8568. <Value>1</Value>
  8569. </Y>
  8570. </LookUpVector>
  8571. <RightHand>true</RightHand>
  8572. <Perspective>false</Perspective>
  8573. <IsSelectedCamera>false</IsSelectedCamera>
  8574. </Camera>
  8575. <Camera>
  8576. <ShowReferenceFrame>false</ShowReferenceFrame>
  8577. <Name>Side(YZ)-Camera</Name>
  8578. <Position>
  8579. <X>
  8580. <Value>10</Value>
  8581. </X>
  8582. </Position>
  8583. <Orientation>
  8584. <ZAxis>
  8585. <X>
  8586. <Value>-1</Value>
  8587. </X>
  8588. </ZAxis>
  8589. <YAxis>
  8590. <Z>
  8591. <Value>1</Value>
  8592. </Z>
  8593. </YAxis>
  8594. <OrientationType>Direct3D</OrientationType>
  8595. </Orientation>
  8596. <LockX>false</LockX>
  8597. <LockY>false</LockY>
  8598. <LockZ>false</LockZ>
  8599. <LockXPitch>false</LockXPitch>
  8600. <LockYYaw>false</LockYYaw>
  8601. <LockZRoll>false</LockZRoll>
  8602. <Childs>
  8603. </Childs>
  8604. <FrontPlane>0.01</FrontPlane>
  8605. <BackPlane>100.0</BackPlane>
  8606. <AutoFrontBack>true</AutoFrontBack>
  8607. <Field>9.999999999999998</Field>
  8608. <Fieldy>45.0</Fieldy>
  8609. <PlaneLeft>-9.999999999999998</PlaneLeft>
  8610. <PlaneRight>9.999999999999998</PlaneRight>
  8611. <PlaneTop>9.999999999999998</PlaneTop>
  8612. <PlaneBottom>-9.999999999999998</PlaneBottom>
  8613. <UseLookatPosition>true</UseLookatPosition>
  8614. <LookatPosition>
  8615. </LookatPosition>
  8616. <UseAlwaysLookUp>true</UseAlwaysLookUp>
  8617. <LookUpVector>
  8618. <Z>
  8619. <Value>1</Value>
  8620. </Z>
  8621. </LookUpVector>
  8622. <RightHand>true</RightHand>
  8623. <Perspective>false</Perspective>
  8624. <IsSelectedCamera>false</IsSelectedCamera>
  8625. </Camera>
  8626. <Camera>
  8627. <ShowReferenceFrame>false</ShowReferenceFrame>
  8628. <Name>Top(XZ)-Camera</Name>
  8629. <Position>
  8630. <Y>
  8631. <Value>10</Value>
  8632. </Y>
  8633. </Position>
  8634. <Orientation>
  8635. <ZAxis>
  8636. <Y>
  8637. <Value>-1</Value>
  8638. </Y>
  8639. </ZAxis>
  8640. <YAxis>
  8641. <X>
  8642. <Value>1</Value>
  8643. </X>
  8644. </YAxis>
  8645. <OrientationType>Direct3D</OrientationType>
  8646. </Orientation>
  8647. <LockX>false</LockX>
  8648. <LockY>false</LockY>
  8649. <LockZ>false</LockZ>
  8650. <LockXPitch>false</LockXPitch>
  8651. <LockYYaw>false</LockYYaw>
  8652. <LockZRoll>false</LockZRoll>
  8653. <Childs>
  8654. </Childs>
  8655. <FrontPlane>0.01</FrontPlane>
  8656. <BackPlane>100.0</BackPlane>
  8657. <AutoFrontBack>true</AutoFrontBack>
  8658. <Field>9.999999999999998</Field>
  8659. <Fieldy>45.0</Fieldy>
  8660. <PlaneLeft>-9.999999999999998</PlaneLeft>
  8661. <PlaneRight>9.999999999999998</PlaneRight>
  8662. <PlaneTop>9.999999999999998</PlaneTop>
  8663. <PlaneBottom>-9.999999999999998</PlaneBottom>
  8664. <UseLookatPosition>true</UseLookatPosition>
  8665. <LookatPosition>
  8666. </LookatPosition>
  8667. <UseAlwaysLookUp>true</UseAlwaysLookUp>
  8668. <LookUpVector>
  8669. <X>
  8670. <Value>1</Value>
  8671. </X>
  8672. </LookUpVector>
  8673. <RightHand>true</RightHand>
  8674. <Perspective>false</Perspective>
  8675. <IsSelectedCamera>false</IsSelectedCamera>
  8676. </Camera>
  8677. </Childs>
  8678. </Frame>
  8679. <Frame>
  8680. <ScaleValue>
  8681. <X>
  8682. <Value>1</Value>
  8683. </X>
  8684. <Y>
  8685. <Value>1</Value>
  8686. </Y>
  8687. <Z>
  8688. <Value>1</Value>
  8689. </Z>
  8690. </ScaleValue>
  8691. <ShowReferenceFrame>false</ShowReferenceFrame>
  8692. <Name>Scenery</Name>
  8693. <Position>
  8694. </Position>
  8695. <Orientation>
  8696. <Angles>
  8697. </Angles>
  8698. <OrientationType>Bryant</OrientationType>
  8699. </Orientation>
  8700. <LockX>false</LockX>
  8701. <LockY>false</LockY>
  8702. <LockZ>false</LockZ>
  8703. <LockXPitch>false</LockXPitch>
  8704. <LockYYaw>false</LockYYaw>
  8705. <LockZRoll>false</LockZRoll>
  8706. <Childs>
  8707. <Cube>
  8708. <Center>Center</Center>
  8709. <RibLength>1.0</RibLength>
  8710. <ShowInnerSide>true</ShowInnerSide>
  8711. <Accuracy>4</Accuracy>
  8712. <ScaleValue>
  8713. <X>
  8714. <Value>1</Value>
  8715. </X>
  8716. <Y>
  8717. <Value>1</Value>
  8718. </Y>
  8719. <Z>
  8720. <Value>1</Value>
  8721. </Z>
  8722. </ScaleValue>
  8723. <OverrideColor>true</OverrideColor>
  8724. <MeshColor>
  8725. <X>
  8726. <Value>1</Value>
  8727. </X>
  8728. <Y>
  8729. <Value>1</Value>
  8730. </Y>
  8731. <Z>
  8732. <Value>1</Value>
  8733. </Z>
  8734. </MeshColor>
  8735. <Alpha>1.0</Alpha>
  8736. <MeshColorMultipliers>
  8737. <X>
  8738. <Value>1</Value>
  8739. </X>
  8740. <Y>
  8741. <Value>1</Value>
  8742. </Y>
  8743. <Z>
  8744. <Value>1</Value>
  8745. </Z>
  8746. </MeshColorMultipliers>
  8747. <MeshColorOffsets>
  8748. </MeshColorOffsets>
  8749. <Direct3DColorRange>true</Direct3DColorRange>
  8750. <SpecularColor>
  8751. <X>
  8752. <Value>0.5</Value>
  8753. </X>
  8754. <Y>
  8755. <Value>0.5</Value>
  8756. </Y>
  8757. <Z>
  8758. <Value>0.5</Value>
  8759. </Z>
  8760. </SpecularColor>
  8761. <EmissiveColor>
  8762. </EmissiveColor>
  8763. <ShininessPower>
  8764. <Value>15</Value>
  8765. </ShininessPower>
  8766. <OverrideQuality>false</OverrideQuality>
  8767. <ShowReferenceFrame>false</ShowReferenceFrame>
  8768. <Name>Block</Name>
  8769. <Position>
  8770. </Position>
  8771. <Orientation>
  8772. <Angles>
  8773. </Angles>
  8774. <OrientationType>Bryant</OrientationType>
  8775. </Orientation>
  8776. <LockX>false</LockX>
  8777. <LockY>false</LockY>
  8778. <LockZ>false</LockZ>
  8779. <LockXPitch>false</LockXPitch>
  8780. <LockYYaw>false</LockYYaw>
  8781. <LockZRoll>false</LockZRoll>
  8782. <Childs>
  8783. </Childs>
  8784. </Cube>
  8785. </Childs>
  8786. </Frame>
  8787. </Childs>
  8788. </Frame>
  8789. </MainFrame>
  8790. </Plot>
  8791. </Plots>
  8792. <PlotPanels>
  8793. <PlotPanel>
  8794. <PlotPanelId>1</PlotPanelId>
  8795. <PlotPanelVisible>true</PlotPanelVisible>
  8796. <Name>Window 1</Name>
  8797. <Tiling>0</Tiling>
  8798. <PlotIds>
  8799. <PlotId>1</PlotId>
  8800. </PlotIds>
  8801. <ToggleState>Base</ToggleState>
  8802. </PlotPanel>
  8803. <PlotPanel>
  8804. <PlotPanelId>2</PlotPanelId>
  8805. <PlotPanelVisible>false</PlotPanelVisible>
  8806. <Name>Window 2</Name>
  8807. <Tiling>0</Tiling>
  8808. <PlotIds>
  8809. <PlotId>2</PlotId>
  8810. </PlotIds>
  8811. <ToggleState>Base</ToggleState>
  8812. </PlotPanel>
  8813. </PlotPanels>
  8814. <WindowRectangles virtualDesktopWidth="5760" virtualDesktopHeight="1080">
  8815. <WindowRectangle monitor="0" left="0" top="0" right="1920" bottom="1080" plotpanelid="2">
  8816. 0.330208 0.32963 0.669792 0.67037
  8817. </WindowRectangle>
  8818. <WindowRectangle monitor="2" left="1920" top="0" right="3840" bottom="1080" plotpanelid="1">
  8819. 0.133333 0.00462963 0.895833 0.776852
  8820. </WindowRectangle>
  8821. </WindowRectangles>
  8822. </PlotSpecs>
  8823. <RunSpecs>
  8824. <SimulatorSettings>
  8825. <StartTime>0.0</StartTime>
  8826. <FinishTime>10.0</FinishTime>
  8827. <AllowPassFinishTime>false</AllowPassFinishTime>
  8828. <Warp>true</Warp>
  8829. <FPGonio>false</FPGonio>
  8830. <UseOutputAfterEach>false</UseOutputAfterEach>
  8831. <OutputAfterEach>0.1</OutputAfterEach>
  8832. <EventEpsilon>1.0e-6</EventEpsilon>
  8833. <AlgebraicTolerance>1.0e-7</AlgebraicTolerance>
  8834. <SteadyStateAnalysis>false</SteadyStateAnalysis>
  8835. <UpdateHoldInstructions>true</UpdateHoldInstructions>
  8836. </SimulatorSettings>
  8837. <IntegrationMethods>
  8838. <IntegrationMethod>
  8839. <Name>Euler</Name>
  8840. <StepSize>0.01</StepSize>
  8841. <AutoStepSize>false</AutoStepSize>
  8842. </IntegrationMethod>
  8843. <IntegrationMethod>
  8844. <Name>BackwardEuler</Name>
  8845. <AbsoluteTolerance>1.0e-5</AbsoluteTolerance>
  8846. <RelativeTolerance>1.0e-5</RelativeTolerance>
  8847. <AlgebraicAbsoluteTolerance>1.0e-5</AlgebraicAbsoluteTolerance>
  8848. <AlgebraicRelativeTolerance>1.0e-5</AlgebraicRelativeTolerance>
  8849. <StepSize>0.01</StepSize>
  8850. <Alpha>1.0</Alpha>
  8851. </IntegrationMethod>
  8852. <IntegrationMethod>
  8853. <Name>AdamsBashforth</Name>
  8854. <StepSize>0.01</StepSize>
  8855. <AutoStepSize>false</AutoStepSize>
  8856. </IntegrationMethod>
  8857. <IntegrationMethod>
  8858. <Name>RungeKutta2</Name>
  8859. <StepSize>0.01</StepSize>
  8860. <AutoStepSize>false</AutoStepSize>
  8861. </IntegrationMethod>
  8862. <IntegrationMethod>
  8863. <Name>RungeKutta4</Name>
  8864. <StepSize>0.01</StepSize>
  8865. <AutoStepSize>false</AutoStepSize>
  8866. </IntegrationMethod>
  8867. <IntegrationMethod>
  8868. <Name>RungeKutta8</Name>
  8869. <UseInitialStepSize>false</UseInitialStepSize>
  8870. <InitialStepSize>0.0</InitialStepSize>
  8871. <UseMaximumStepSize>false</UseMaximumStepSize>
  8872. <MaximumStepSize>0.0</MaximumStepSize>
  8873. <AbsoluteTolerance>1.0e-6</AbsoluteTolerance>
  8874. <RelativeTolerance>1.0e-6</RelativeTolerance>
  8875. <SafetyFactor>0.9</SafetyFactor>
  8876. <Factor1>0.33</Factor1>
  8877. <Factor2>6.0</Factor2>
  8878. <Beta>0.0</Beta>
  8879. <UseMaxNrSteps>false</UseMaxNrSteps>
  8880. <MaxNrSteps>100000</MaxNrSteps>
  8881. <UseStiffDetection>false</UseStiffDetection>
  8882. <MaxNrStiffnessSteps>1000</MaxNrStiffnessSteps>
  8883. </IntegrationMethod>
  8884. <IntegrationMethod>
  8885. <Name>RungeKuttaFehlberg</Name>
  8886. <UseInitialStepSize>false</UseInitialStepSize>
  8887. <InitialStepSize>0.0</InitialStepSize>
  8888. <UseMaximumStepSize>false</UseMaximumStepSize>
  8889. <MaximumStepSize>0.0</MaximumStepSize>
  8890. <AbsoluteTolerance>1.0e-6</AbsoluteTolerance>
  8891. <RelativeTolerance>1.0e-6</RelativeTolerance>
  8892. </IntegrationMethod>
  8893. <IntegrationMethod>
  8894. <Name>VodeAdams</Name>
  8895. <UseInitialStepSize>false</UseInitialStepSize>
  8896. <InitialStepSize>0.0</InitialStepSize>
  8897. <UseMaximumStepSize>false</UseMaximumStepSize>
  8898. <MaximumStepSize>0.0</MaximumStepSize>
  8899. <AbsoluteTolerance>1.0e-6</AbsoluteTolerance>
  8900. <RelativeTolerance>1.0e-6</RelativeTolerance>
  8901. <VodeUseBDF>true</VodeUseBDF>
  8902. <VodeUseNewton>true</VodeUseNewton>
  8903. </IntegrationMethod>
  8904. <IntegrationMethod>
  8905. <Name>BDFMethod</Name>
  8906. <AbsoluteTolerance>1.0e-5</AbsoluteTolerance>
  8907. <RelativeTolerance>1.0e-5</RelativeTolerance>
  8908. <AlgebraicAbsoluteTolerance>1.0e-5</AlgebraicAbsoluteTolerance>
  8909. <AlgebraicRelativeTolerance>1.0e-5</AlgebraicRelativeTolerance>
  8910. <UseInitialStepSize>false</UseInitialStepSize>
  8911. <InitialStepSize>0.0</InitialStepSize>
  8912. <UseMaximumStepSize>false</UseMaximumStepSize>
  8913. <MaximumStepSize>0.0</MaximumStepSize>
  8914. </IntegrationMethod>
  8915. <IntegrationMethod>
  8916. <Name>MeBDFiMethod</Name>
  8917. <AbsoluteTolerance>1.0e-5</AbsoluteTolerance>
  8918. <RelativeTolerance>1.0e-5</RelativeTolerance>
  8919. <AlgebraicAbsoluteTolerance>1.0e-5</AlgebraicAbsoluteTolerance>
  8920. <AlgebraicRelativeTolerance>1.0e-5</AlgebraicRelativeTolerance>
  8921. <UseInitialStepSize>false</UseInitialStepSize>
  8922. <InitialStepSize>0.0</InitialStepSize>
  8923. <UseMaximumStepSize>false</UseMaximumStepSize>
  8924. <MaximumStepSize>0.0</MaximumStepSize>
  8925. </IntegrationMethod>
  8926. <SelectedIntegrationMethod>7</SelectedIntegrationMethod>
  8927. </IntegrationMethods>
  8928. </RunSpecs>
  8929. <MultipleRun>
  8930. <NrSteps>10</NrSteps>
  8931. <CopyFromStates>false</CopyFromStates>
  8932. <JoinParameterVariation>true</JoinParameterVariation>
  8933. <ClearAfterRun>true</ClearAfterRun>
  8934. <RedrawAfterRun>false</RedrawAfterRun>
  8935. <DrawDuringSimulation>true</DrawDuringSimulation>
  8936. <ActionBeforeOptimization>0</ActionBeforeOptimization>
  8937. <CompareValue>0.0</CompareValue>
  8938. <UseCompareValue>true</UseCompareValue>
  8939. <MultipleRunType>MultipleRun</MultipleRunType>
  8940. <Minimize>true</Minimize>
  8941. <OptimizationVariable></OptimizationVariable>
  8942. <ResulVarUsage>UseEndValue</ResulVarUsage>
  8943. <Tolerance>0.001</Tolerance>
  8944. <OptimizationMethod>BroydonFletcherGoldfarbShanno</OptimizationMethod>
  8945. <MultipleRunVariables>
  8946. </MultipleRunVariables>
  8947. </MultipleRun>
  8948. <ExportData>
  8949. <WriteAsText>true</WriteAsText>
  8950. <ReadAsText>true</ReadAsText>
  8951. <WriteHeader>true</WriteHeader>
  8952. <ReadHeader>true</ReadHeader>
  8953. <ReadFilename></ReadFilename>
  8954. <WriteFilename></WriteFilename>
  8955. <DoWrite>false</DoWrite>
  8956. <ExportVariables>
  8957. </ExportVariables>
  8958. <ImportVariables>
  8959. </ImportVariables>
  8960. </ExportData>
  8961. <BreakPoints>
  8962. </BreakPoints>
  8963. <AnimationPlayback>
  8964. <PlaybackSpeed>1.0</PlaybackSpeed>
  8965. </AnimationPlayback>
  8966. </ExpData>
  8967. </Experiment>
  8968. </Experiments>
  8969. </Document>