SNE T ECHNICAL N OTE Implemenaon of Quanzed Sae Sysems n MATLAB/Smulnk Parck Grabher, Mahas Rößler 2*, Bernhard Henzl 3 Ins. of Analyss and Scenfc Compung, Venna Unversy of Technology, Wedner Haupsraße 8-, 4 Venna, Ausra; * mahas.roessler@uwen.ac.a 2 dwh Smulaon Servces, Neusfg. 57-59, A-7 Wen, Ausra 3 Ins. of Compuer Aded Auomaon, Venna Unversy of Technology, Trelsraße 3, 4 Venna, Ausra. Absrac. Common pracce n he smulaon of connuous sysems s o dscreze he me n order o oban a numercal soluon. The Quanzed Sae Sysem () approach makes possble ha he dscresaon s appled o he sae varables, nsead of he me range. In oher words connuous sysems can be smulaed even-based wh he mehod. I also effecs a new orenaon and leads among oher hngs o very effcen sae even deecon. Erneso Kofman and Sergo Junco presened he mehod n he DEVS formalsm []. Ths paper descrbes how he mplemenaon of he mehod n Smulnk/SmEvens works and whch resrcons sll exs. Quanzed Funcon wh Hyseress. q() Q r Inroducon,.. Q Q Q r x() Fgure : Quanzed Funcon wh Hyseress. u f q d x d xn E E Fgure 2: Block dagram of a Quanzed Sae Sysem, whch consss of he sac funcon and he quanzed nergraor wh hyseress. q q n SNE 24(3-4) 2/24 85
P Grabher e al. Implemenaon of Quanzed Sae Sysems n MATLAB/Smulnk T N rg *Q^(- new q q prevous nal Value: q prevous new lfeme Sae q Even Fler - sgnal never execues he aomc r(x/q q subsysem Eny Snk #d lfeme Ge Arbue2 Eny Snk P Sngle Server - o hold an eny ll he nex ranson OR n Logcal me x Operaor prevous x prevous x Inal Value: x lfeme prevous me Even Fler Sae x Clock Tmed o Even Sgnal4 -Crese -Cxneu #d vc ex. Transon #d s n. Transon Inalzaon vc Rese 2 Pah Combner (q) (qres) x Sngle Server - o avod Sascal relave o eny me x lfeme Se Arbue me Se Arbue3 me x Se Arbue5 Sngle Server 2 - o avod Sascal relave o eny 2 3 Pah Combner Sngle Server 3 - o avod Sascal relave o eny x me Ge Arbue Fgure 3: Implemenaon of he Quanzed Inegraor of mehod n Smulnk. Implemenaon of he Mehod n Smulnk. Evens and Eny Generaors 86 SNE 24(3-4) 2/24
T N P Grabher e al. Implemenaon of Quanzed Sae Sysems n MATLAB/Smulnk Arbuesandcompuaons me of arsng exac sae ndex sae dervave lfeme..3 Ineracon beween even and mebased blocks Arbue Funcon Gaeway-blocks Aomc Subsysem..4 Commens Fgure 4: Incompable me-based blocks have o be placed nsde an Aomc Subsysem. x = Q =. x = Q =. q q Consan Consan In In2 >= Swch Ou Aomc Subsysem SNE 24(3-4) 2/24 87
P Grabher e al. Implemenaon of Quanzed Sae Sysems n MATLAB/Smulnk T N 2 Case Sudes and Resuls 2. Smple equaon q(), x() 3 2 2 3 : ΔQ=ε=.2 FE: h=.25 analyc soluon 4.5..5.2 Fgure 5: Numercal soluons from he dfferen ypes of explc solvers. 2.2 Sff equaon 8 6 4 2 q : number of ranssons = q 2 : number of ransons = 25 2 3 4 5 Fgure 6: Sff equaons effec a fas oscllaon n he sae. 88 SNE 24(3-4) 2/24
T N P Grabher e al. Implemenaon of Quanzed Sae Sysems n MATLAB/Smulnk 2.3 H-Brdge volage supply volage of he elecromove force volage a he ressance volage of he nducance momen of nera moor orquemoor vscous frcon consanangle angular velocy angular acceleraon q, q ω, ω 5 5 5 5 2 5 Fgure 7: Smulaon resuls of he DC moor. 5 5 2 q, q ω, ω 98 96 94 7 8 9 2 3 92 7 8 9 2 3 Fgure 8: Smulaon resuls of he DC moor n he nerval (7,3.). 2.4 Bouncng ball vercalspeed earh gravy consan coeffcen of resuon. SNE 24(3-4) 2/24 89
P Grabher e al. Implemenaon of Quanzed Sae Sysems n MATLAB/Smulnk T N 8 6 floor : ΔQ =., ΔQ 2 =. : ΔQ=. : rel. Tol.= 6.3.25.2.5 floor : ΔQ =., ΔQ 2 =. : ΔQ=. : rel. Tol.= 6 q x (), x() 4 2 q x (), x()..5.5 2 2 3 4 5 6 7 Fgure 9: Smulaon resuls of he Bouncng Ball. q x (), x().5.4.3.2...2 floor : ΔQ =., ΔQ 2 =. : ΔQ=. : rel. Tol.= 6 5 5.2 5.4 5.6 5.8 6 6.2 Fgure : Smulaon resuls of he Bouncng Ball n he nerval (5,6.2).. 5.8 6 6.2 6.4 6.6 6.8 Fgure : Smulaon resuls of he Bouncng Ball n he nerval (5.8,6.8). Zeno Phenomenon References Transacons of he Socey for Compuer Smulaon Inernaonal - Recen advances n DEVS Mehodology--par I Connuous Sysem Smulaon Conrol Tuorals for MATLAB and Smulnk. MATHMOD 22-7h Venna Conference on Mahemacal Modellng; 9 SNE 24(3-4) 2/24