I'm simulating a car suspension behavior on different roads. I use a 2DoF system equation. Everything is fine but... a real car has bumpstops. the suspension can't travel too much up or too much down.
a) i was trying to switch systems, like the car is a rigid body when the spring is all way pushed, and so on. but its a mess.
b) i was trying imposing K and b equal to zero or infinite. but it only works under certain condition unless the car experiment high instant force bouncing away or zero force when the limit is reached flying up or down.
c) About steps and derivatives: i delay the road input and predict the step so the car can handle the infinite force by the damper (road speed) disabling them.
d) My new approach is to treat the problem like a collision using momentum and energy conservation to find the new speeds and inserting them in the model.
- first problem: i can't use new speeds. "Error:Input data dependency violation due to action subsystems. See Subsystem Examples in the Simulink library for valid and invalid examples of action subsystems".
I) I found out that using a small delay like 1 sample the problem goes away. Why can't i do it without delay?
anyway it happens that when the switch is triggered the collision velocities are used but the simulation stay stucked just above the bumpstop and don't come back. this because while he's coming back he's still above during the next sample so it collide again. the condition is than always true and the car diverge.
II) i would like some trick that: when the condition is equal to 1 trigger the new speed but its than disabled until the spring is again in the functional range.
III) if there is any faster method to do this i would like to know (i know about simscape multibody and vehicle dynamic blockset but this is for my bachelor degree thesis).
IV) if you know any way to build a bumpstop with less effort i appreciate it.
V) is it better to use discrete calculator instead of continuous time one?
I'm trying to learn about simulink behavior and everything, thats why i do not use ready blocksets.
system https://postimg.cc/34qsz0Y0
plot (road,car,wheel) https://postimg.cc/JsPHZRRd
plot(spring and tire movements) https://postimg.cc/n9rn8fyM