Calculate decel-rate to avoid collision

180 Views Asked by At

Imagine the following scenario:

We have 2 carts moving alone a track, initially at x velocity. They are spaced apart by y metres and are both z length.

When a cart passes a pre-determined point on the track, it starts to decelerate down to another velocity. If the deceleration value is too high (i.e. the cart decelerates too quickly), a collision may occur as the back of the cart could still be before the deceleration point, thus causing the second cart to collide with it.

How could we determine the most appropriate decel rate which doesn't cause a collision?

I'm not on any maths or physics course, and in all likelihood (assuming I haven't massively over complicated this) I'm not going to be familiar with what's need to solve the problem. If somebody could point me in the right direction, in terms of equation, etc, that would be extremely helpful and allow me to do my own research.

1

There are 1 best solutions below

4
On

Let the initial velocity be $v$ (rather than $x$) and set the zero so the rear of the first cart is at $x=0$ when the deceleration starts and the zero of time when the deceleration starts. The acceleration is $-a$, where the $-$ sign shows the deceleration. We decelerate to a velocity $w$. The speed of the first cart is then $v_1=\begin {cases} v-at&t \lt \frac {v-w}{a}\\w&t \ge \frac {v-w}{a} \end {cases}$ We integrate that to get the position of the rear of the train $x_1=\begin {cases} vt-\frac 12at^2&t \lt \frac {v-w}{a}\\\frac {v(v-w)}a-\frac12a(\frac {v-w}{a})^2+wt&t \ge \frac {v-w}{a} \end {cases}$. The front of the second cart starts at $-y$, so its speed is $v_2=\begin {cases} v&t \lt \frac yv\\v-at&\frac yv \lt t \lt \frac yv+\frac {v-w}{a}\\w&t \ge \frac yv+\frac {v-w}{a} \end {cases}$ Again you integrate this to get the position $x_2=\begin {cases} -y+vt& t \lt \frac {y+z}v\\v(t-\frac {y+z}v)-\frac 12a(t-\frac {y+z}v)^2&\frac {y+z}v \lt t \lt \frac {y+z}v+\frac {v-w}{a}\\\frac {v(v-w)}a-\frac12a(\frac {v-w}{a})^2+w(t-\frac {y+z}v)&t \ge \frac {v-w}{a}+\frac {y+z}v \end {cases}$
where I used the fact that the time to start the deceleration of the second cart is $\frac {y+z}v$ as the front of the second cart has to travel $y+z$ before coming to the deceleration point. Now all you have to do is see if $x_2 \gt x_1$ at the end of the deceleration of the second cart. After that they are traveling the same speed.