Skip to content

Commit 82e7a9f

Browse files
committed
updated examples to fit new grid
1 parent 85329b3 commit 82e7a9f

21 files changed

+1019
-1023
lines changed

static/examples/bouncing-ball-dark.svg

Lines changed: 55 additions & 55 deletions
Loading

static/examples/bouncing-ball-light.svg

Lines changed: 55 additions & 55 deletions
Loading

static/examples/bouncing-ball.json

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
{
22
"version": "1.0.0",
33
"metadata": {
4-
"created": "2026-01-14T10:21:54.899Z",
5-
"modified": "2026-01-14T10:21:54.899Z",
6-
"name": "Bouncing Ball",
7-
"description": "Gravity, Collisions and discrete Events"
4+
"created": "2026-01-19T16:03:09.415Z",
5+
"modified": "2026-01-19T16:03:09.415Z",
6+
"name": "bouncing-ball"
87
},
98
"graph": {
109
"nodes": [
@@ -13,8 +12,8 @@
1312
"type": "Integrator",
1413
"name": "pos",
1514
"position": {
16-
"x": 705,
17-
"y": 255
15+
"x": 750,
16+
"y": 250
1817
},
1918
"inputs": [
2019
{
@@ -45,8 +44,8 @@
4544
"type": "Integrator",
4645
"name": "vel",
4746
"position": {
48-
"x": 480,
49-
"y": 255
47+
"x": 530,
48+
"y": 250
5049
},
5150
"inputs": [
5251
{
@@ -75,8 +74,8 @@
7574
"type": "Scope",
7675
"name": "x(t)",
7776
"position": {
78-
"x": 825,
79-
"y": 330
77+
"x": 860,
78+
"y": 340
8079
},
8180
"inputs": [
8281
{
@@ -98,8 +97,8 @@
9897
"type": "Constant",
9998
"name": "gravity",
10099
"position": {
101-
"x": 390,
102-
"y": 150
100+
"x": 430,
101+
"y": 160
103102
},
104103
"inputs": [],
105104
"outputs": [
@@ -122,8 +121,8 @@
122121
"type": "Scope",
123122
"name": "v(t)",
124123
"position": {
125-
"x": 585,
126-
"y": 330
124+
"x": 620,
125+
"y": 340
127126
},
128127
"inputs": [
129128
{
@@ -145,8 +144,8 @@
145144
"type": "Function",
146145
"name": "total energy",
147146
"position": {
148-
"x": 705,
149-
"y": 150
147+
"x": 750,
148+
"y": 160
150149
},
151150
"inputs": [
152151
{
@@ -186,8 +185,8 @@
186185
"type": "Scope",
187186
"name": "E(t)",
188187
"position": {
189-
"x": 1065,
190-
"y": 330
188+
"x": 1100,
189+
"y": 340
191190
},
192191
"inputs": [
193192
{
@@ -260,8 +259,8 @@
260259
{
261260
"id": "deeecd86-71ac-4a13-a289-c64c946e667c",
262261
"position": {
263-
"x": -45,
264-
"y": 90
262+
"x": -50,
263+
"y": 60
265264
},
266265
"content": "# Bouncing Ball Physics\n\nThis is an example of a hybrid system with continuous dynamics (free falling ball) and discrete events (bounces).\n\nIntegrating the gravitational acceleration gives the ball velocity in free fall:\n\n$$ v(t) = - \\int_0^t g \\, d\\tau $$\n\nAnd the position is the integrated velocity:\n\n$$ x(t) = \\int_0^t v(\\tau) \\, d\\tau $$\n\nWe use an event node to define the discrete dynamics of the ball hitting the ground. Whenever the position crosses zero\n\n$$ |x(t)| = 0 $$\n\nthe sign of the velocity is flipped and a coefficient of restitution ($b$) is applied to model the energy loss from the deformation of the ball:\n\n$$ y(t) \\leftarrow -b \\, y(t) $$\n\nWhen the total energy drops below a certain threshold we consider that a Zeno state and stop the simulation.",
267266
"width": 425,
@@ -275,8 +274,8 @@
275274
"type": "pathsim.events.ZeroCrossing",
276275
"name": "Bounce",
277276
"position": {
278-
"x": 945,
279-
"y": 225
277+
"x": 980,
278+
"y": 260
280279
},
281280
"params": {
282281
"func_evt": "bounce_detect",
@@ -289,7 +288,7 @@
289288
"name": "Zeno",
290289
"position": {
291290
"x": 1200,
292-
"y": 225
291+
"y": 260
293292
},
294293
"params": {
295294
"func_evt": "zeno_detect",

static/examples/cascade-subsystem-dark.svg

Lines changed: 70 additions & 70 deletions
Loading

static/examples/cascade-subsystem-light.svg

Lines changed: 70 additions & 70 deletions
Loading

static/examples/cascade-subsystem.json

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
{
22
"version": "1.0.0",
33
"metadata": {
4-
"created": "2026-01-14T10:23:07.377Z",
5-
"modified": "2026-01-14T10:23:07.377Z",
6-
"name": "Cascade PI Controler",
7-
"description": "Cascade Control of a Plant modeled as nested Subsystems"
4+
"created": "2026-01-19T16:01:11.207Z",
5+
"modified": "2026-01-19T16:01:11.207Z",
6+
"name": "cascade-subsystem"
87
},
98
"graph": {
109
"nodes": [
@@ -13,8 +12,8 @@
1312
"type": "StepSource",
1413
"name": "Setpoint",
1514
"position": {
16-
"x": 735,
17-
"y": 435
15+
"x": 720,
16+
"y": 440
1817
},
1918
"inputs": [],
2019
"outputs": [
@@ -38,7 +37,7 @@
3837
"type": "PID",
3938
"name": "PI-1",
4039
"position": {
41-
"x": 1065,
40+
"x": 1090,
4241
"y": 330
4342
},
4443
"inputs": [
@@ -73,7 +72,7 @@
7372
"type": "Adder",
7473
"name": "Error-1",
7574
"position": {
76-
"x": 915,
75+
"x": 910,
7776
"y": 330
7877
},
7978
"inputs": [
@@ -114,8 +113,8 @@
114113
"type": "Adder",
115114
"name": "Error-2",
116115
"position": {
117-
"x": 1245,
118-
"y": 330
116+
"x": 1240,
117+
"y": 340
119118
},
120119
"inputs": [
121120
{
@@ -155,8 +154,8 @@
155154
"type": "PID",
156155
"name": "PI-2",
157156
"position": {
158-
"x": 1395,
159-
"y": 330
157+
"x": 1410,
158+
"y": 340
160159
},
161160
"inputs": [
162161
{
@@ -190,8 +189,8 @@
190189
"type": "Subsystem",
191190
"name": "Plant",
192191
"position": {
193-
"x": 1320,
194-
"y": 405
192+
"x": 1330,
193+
"y": 410
195194
},
196195
"inputs": [
197196
{
@@ -231,8 +230,8 @@
231230
"type": "Interface",
232231
"name": "Subsystem",
233232
"position": {
234-
"x": -285,
235-
"y": -360
233+
"x": -250,
234+
"y": -320
236235
},
237236
"inputs": [],
238237
"outputs": [],
@@ -245,8 +244,8 @@
245244
"type": "TransferFunctionZPG",
246245
"name": "TF-2",
247246
"position": {
248-
"x": -420,
249-
"y": -105
247+
"x": -410,
248+
"y": -120
250249
},
251250
"inputs": [
252251
{
@@ -280,8 +279,8 @@
280279
"type": "TransferFunctionZPG",
281280
"name": "TF-1",
282281
"position": {
283-
"x": -420,
284-
"y": -285
282+
"x": -410,
283+
"y": -280
285284
},
286285
"inputs": [
287286
{
@@ -315,8 +314,8 @@
315314
"type": "Subsystem",
316315
"name": "Disturbance",
317316
"position": {
318-
"x": -405,
319-
"y": -195
317+
"x": -410,
318+
"y": -200
320319
},
321320
"inputs": [
322321
{
@@ -348,20 +347,22 @@
348347
"type": "Interface",
349348
"name": "Subsystem",
350349
"position": {
351-
"x": 105,
352-
"y": 60
350+
"x": 270,
351+
"y": 0
353352
},
354353
"inputs": [],
355354
"outputs": [],
356-
"params": {}
355+
"params": {
356+
"_rotation": 2
357+
}
357358
},
358359
{
359360
"id": "09e7895b-f3f5-448a-a5c7-14f8c9225db4",
360361
"type": "Adder",
361362
"name": "Combiner",
362363
"position": {
363-
"x": 240,
364-
"y": 120
364+
"x": 270,
365+
"y": 70
365366
},
366367
"inputs": [
367368
{
@@ -392,16 +393,16 @@
392393
}
393394
],
394395
"params": {
395-
"_rotation": 1
396+
"_rotation": 0
396397
}
397398
},
398399
{
399400
"id": "be9bfd71-6059-4d41-be9d-faa2a73e9f61",
400401
"type": "WhiteNoise",
401402
"name": "Noise",
402403
"position": {
403-
"x": 105,
404-
"y": -15
404+
"x": 120,
405+
"y": 80
405406
},
406407
"inputs": [],
407408
"outputs": [
@@ -416,7 +417,6 @@
416417
],
417418
"params": {
418419
"spectral_density": "noise_psd",
419-
"sampling_rate": "0.5",
420420
"_rotation": 0
421421
}
422422
},
@@ -425,8 +425,8 @@
425425
"type": "Scope",
426426
"name": "Disturbed Signal",
427427
"position": {
428-
"x": 405,
429-
"y": 120
428+
"x": 450,
429+
"y": 70
430430
},
431431
"inputs": [
432432
{
@@ -478,8 +478,8 @@
478478
{
479479
"id": "c3103ad7-22d5-455d-8078-579809c95ad6",
480480
"position": {
481-
"x": 345,
482-
"y": -15
481+
"x": 360,
482+
"y": -90
483483
},
484484
"content": "# Disturbance\n\nThe inline disturbance adds a white noise signal on top of the input signal.",
485485
"width": 155,
@@ -530,8 +530,8 @@
530530
{
531531
"id": "4dc50a79-58b7-4cbd-b049-110bfbbd117e",
532532
"position": {
533-
"x": -600,
534-
"y": -255
533+
"x": -180,
534+
"y": -280
535535
},
536536
"content": "# Plant\n\nThe plant contains two transfer functions and an additive inline disturbance...\n\n... which is modeled by a subsystem too.",
537537
"width": 140,
@@ -545,8 +545,8 @@
545545
"type": "Scope",
546546
"name": "Plant vs Setpoint",
547547
"position": {
548-
"x": 1095,
549-
"y": 510
548+
"x": 1020,
549+
"y": 500
550550
},
551551
"inputs": [
552552
{
@@ -577,7 +577,7 @@
577577
"type": "Scope",
578578
"name": "Err-1 and PI-1",
579579
"position": {
580-
"x": 1005,
580+
"x": 1010,
581581
"y": 240
582582
},
583583
"inputs": [
@@ -609,7 +609,7 @@
609609
"type": "Scope",
610610
"name": "Err-2 and PI-2",
611611
"position": {
612-
"x": 1335,
612+
"x": 1340,
613613
"y": 240
614614
},
615615
"inputs": [
@@ -734,8 +734,8 @@
734734
{
735735
"id": "416e7281-7496-4b94-8c9f-ab802029d5e9",
736736
"position": {
737-
"x": 720,
738-
"y": 225
737+
"x": 690,
738+
"y": 220
739739
},
740740
"content": "# Cascade PI Controler\n\nThis example is a cascade controler. The plant is modeled as a **Subsystem**. Double click to enter.",
741741
"width": 230,

0 commit comments

Comments
 (0)