simulating the confort of a car

simulating the confort of a car

# Car confort when passing a bump (simplified version)

# parameters

param k1=0.9 k2=0.5 L1=1 L2=1.8 b=0.1

# functions

delta(t)=heav(t-30)-heav(t-31)

g1(t)= delta(t)

g2(t)= delta(t)

# equations

x1' = x2 + g1(t)

y1' = y2 + g2(t)

x2' = -(k1+k2)*x1 + (k1*L1-k2*L2)*y1 - b*x2

y2' = (k1*L1-k2*L2)*x1 - (k1*L1^2+k2*L2^2)*y1 - b*y2

Now we replace f1 and f2 for some oscilation that resonante with the elevation and swing.