
94 Cyber-Physical Systems: From Theory to Practice
V1 integrator
V2 integrator
V1
V1 integrator
P1 integrator
init
Separate
State machine
Together
Separate.p2= P1;
Separate.v1= V1;
Separate.v2= V1;
guard: abs(Force) > Stickiness
set: Sepatate.p1 = P1;
guard: true
output: P1 = p1; P2 = p2
P2
P1
Stickiness integrator
Stickiness
Gain
–1.0
V1 and V2 are velocities,
and P1 and P2 are positions
of the two masses.
Expression
1.0*1.0 – 2.0*2.0 – (1.0–2.0)*P1
(1.0*1.0 + 2.0*2.0 – (1.0 + 2.0)*P1)/2.0
Expression 2 Force
V1
V2
P1
P2
V1 and V2 are
velocities, and
P1 and P2 are
positions of the
two masses.
AddsuBtract
ZeroCrossingDetector
touched
0.0
Continuous-time model
Continuous-time model
∫
∫∫