Hacker News new | ask | show | jobs
by tobtoh 1436 days ago
If I remember my uni engineering/calculus maths class correctly, the third derivative of position is used in planning these sort of curves.

The first derivative of postion (with respect to time) is velocity. The second derivative is acceleration (ie rate of change of velocity). And the third derivative is jerk (rate of change of acceleration).

And 'jerk' has to be kept below a certain threshold for humans to find movement comfortable.

7 comments

A very similar thing is done in the creation of reflective surfaces on car bodies (typically in CAD software).

They call these constraints by G and a number.

  G1 would be a positional constraint: the two surfaces meet each other at the same point
  
  G2 tangential: same as G1, but the surfaces are tangential
  
  G3: same as G2, but the curvature (radius^-1) of the surfaces is the same at the point where the two meet. This essentially means the curvature combs of the surfaces shall meet at the same position (G1)
  
  G4: same as G3, only now the meeting curvature combs have to be tangential as well
  
  G5: same as G4, only now the curvature combs of the curvature combs have to meet at the same position
And so on. The goal is to create smooth transitions between two separate mathematical surfaces that cannot be seen in the reflections in the sheet metal. E.g. if you think about the connection of straight sheet of metal (curvature: 0) and a cylindrical surface (curvature: 1/radius) the curvature will go from zero to some different value immidiately on the transation you will definitly see this as a hard corner on the reflection or when light falls onto the surface.
A simple example of this is the squircle. This page [1] has a couple of nice images that are easy to understand.

https://99percentinvisible.org/article/circling-square-desig...

Minor point (well in this case at least) but you have an off by one error. Your G1 is G0.

Here is how it is defined in terms of basis vectors. https://people.eecs.berkeley.edu/~jfc/cs184f98/lec19/lec19.h...

Ah it was a while ago thanks for the correction.
> G2 tangential: same as G1, but the surfaces are tangential

This makes me think "tangential to what?".

Do you mean that, along the seam between G1 and G2, the tangent plane to G1 at a given point is equal to the tangent plane to G2 at the same point?

Yep, exactly that. Removes the appearance of a “fold” or “crease” at the surface transition, and makes the surface smooth and continuous.
Also seen in the planning of curves in roads (where jerk corresponds to the rate at which a steering wheel must be turned) and railways.

And this is also why the passengers jerk of a vehicle jerk backwards after it comes to a complete stop. Their muscles statically counter the relative forwards acceleration of their torsos during braking and require time to react to the acceleration suddenly going away. This effect can be prevented by gradually letting off the brake before reapplying it fully upon stopping, but few drivers and rapid transit systems seem to be aware.

> but few drivers or rapid transit systems seem to be aware

I find that amazing. What the heck are drivers ed instructors doing? It's not just hard on the passengers, it's hard on the machinery.

It's the same with the clutch. I've driven with enough people who fancy themselves as great shifters, but they jerk the hell out of the clutch every time, never attempting to match the shaft speed with the engine speed. If I comment on it, they always deny doing that :-/

If I'm on my game, I can shift smoother than an automatic. The bonus is the clutch will last a very long time.

"They way somebody treats their car is the way they treats themselves" — Frank Martin (paraphrased for gender neutrality).

And you can tell how somebody treats their car by examining how long the clutch lasts, if they drive a manual.

> What the heck are drivers ed instructors doing?

Dinging me over their interpretations of ambiguous driving laws, if my experience is any indication.

I can shift smoother than an automatic

Not a double clutch one, e.g. DSG

> What the heck are drivers ed instructors doing?

I mean to be completely fair - this is not their job. Driving instructors are there to keep everyone on the road safe - first.

Yes it's their job. It's a kind of passive safety.
This effect can be prevented by gradually letting off the brake before reapplying it fully upon stopping, but few drivers and rapid transit systems are aware.

This is surprising to read. Everyone whose car I've ridden in knows to do that, and it's only in extremely urgent and unexpected stops where it's neglected. Also, when fully stopped, only minimal pressure should be necessary to keep the car still.

There's definitely confirmation bias causing me to not notice stops where there isn't a jerk. And perhaps by the Baader-Meinhof effect you'll begin to notice them more frequently, too. But stops without any perceptible jerk are rare enough that when they happen I get an odd feeling of floating forwards like when the train beside your own at a station departs—perhaps it's because my subconscious, still anticipating the jerk, believes that I'm still in motion.

In some cars there's hysteresis in the brake pedal (perhaps caused by the booster or self-energizing system) that makes it hard to smoothly release the brake even when the driver tries to. But metros seem to increase their braking force—visible in standing passengers leaning progressively more—as speed decreases. Is there some physical cause to that?

> only minimal pressure should be necessary

I gathered that it was best practice to fully brake when stopped in case someone hits you, especially at a light where you might be rear-ended and roll into the intersection.

If rear-ended with your brakes engaged more of the impact energy will go into crumbling your car than if it's allowed to transfer into forward speed. If you see it coming, let go of the brake, and then step on it after impact. That's the advise I got.
It depends on if you're trying to minimize damage to your car, or the passengers. For a light impact where you aren't going to sustain any injuries it might be optimal to let off the brake. But if the accelerations are going to cause injury, then you would want to apply the brakes to minimize the acceleration of the car.
Strategy sounds legit but my concern would be that the (previously distracted) incoming driver attempts to dodge at the last second. Their car will hit your car with torque that could send it into oncoming traffic. But that angled impact also means less push in your car's forward direction, so maybe this concern is overblown.
> Everyone whose car I've ridden in knows to do that

I also do that, and don't know anyone who doesn't. I vaguely remember that I learned it in driving school, most likely because my driving instructor didn't want to be jerked around on the passenger seat for an hour every week.

Train/tram drivers here also usually do that in stations, except when they try to make up for delays, or when they have wrongly estimated the breaking distance.

Re train/tram drivers: Especially with more modern(ish) rolling stock that can also depend on how well the manufacturer has set up the braking system.

For one instance multiple units (especially electrically powered ones) commonly have computerised braking controls, often transition from dynamic to friction braking shortly before coming to a standstill, and might possibly have some sort of automatically applied parking brake.

If the manufacturer didn't properly adjust this whole system, the friction brake as it takes over for the last few kph might be applied with too much of a "bite" and therefore cause a jerky stop which even a skilled driver might not be able to fully prevent.

Older drivers seem not to know this, in my experience at least.
I think that's more of an indication of their fine motor control deteriorating with age.
> Also, when fully stopped, only minimal pressure should be necessary to keep the car still.

Why? To keep the brake fluid lines from bursting or something?

More pressure won't do any harm, it's just not necessary if you only want to keep the car still (on a flat road, in neutral, with nobody trying to tow you, etc.).
It's more tiring, however, which can be an important factor if you're taking a long trip.
It's a little more complicated than that in a passenger car. The deceleration compresses the front springs. When the car comes to a stop, the springs decompress and the front of the car pops up and the body of the car moves slightly backwards even though the wheels are now stationary.
Interestingly, in this /r/askscience thread:[1]

1) lots of comments are attributing the jerk felt by occupants to the vehicle suspension. But that isn't the case! The occupants visibly move backwards relative to the car body, but the backwards motion of the car itself should rather have the opposite effect.

2) a commenter contradicts what several commenters here have noticed:

> I wager this has to do with the driver; most drivers I've noticed don't ease up off the breaks when slowing down, and so the 'slowing force' feels like it ramps up along the deceleration profile, up until the point when the car comes to a complete start and there's a 'jerk'.

[1] https://www.reddit.com/r/askscience/comments/20mljk/what_cau...

> The occupants visibly move backwards relative to the car body

The only video linked to in that thread has been removed so I wasn't able to see this, but I will point out that the timing is critical to interpreting this observation. During deceleration, the occupants will move forward relative to the car body so that the car can apply a decelerating force to their bodies (via seat belts or friction against the seats and floor of the car). At some point after the car has stopped, they will necessarily move back to their neutral position. This will have nothing to do with the transient motion of the car when acceleration drops to zero.

I will also note that it is not that difficult to come to a complete stop with no perceivable transient if you ease off the brakes as the car comes to a halt. It's actually a useful skill to cultivate IMHO.

>Also seen in the planning of curves in roads (where jerk corresponds to the rate at which a steering wheel must be turned) and railways.

Just for the record, the transition curve is usually (not always but very often ) a clothoid (or Euler's spiral or Cornu spiral)

https://en.wikipedia.org/wiki/Euler_spiral

This was particularly noticeable to me riding San Francisco light rail to work. When trains run underground they start and stop under computer control. Nice, smooth acceleration and deceleration.

On the surface (or when the computer control system was borked) the starts and stops were a lot less pleasant.

This is fun to try in cars. The drivetrain can have a bit of twist under deceleration, and you can feel it spring back after the wheels stop. For best comfort you need to gradually reduce the braking force not just for human comfort but also to relieve that twist.
OT: that reminds me of an interesting physics problem.

If you have a ball sitting on the floor in the aisle of a stationary bus and the bus starts accelerating forward the ball rolls toward the back of the bus. If you have a bus moving at a constant velocity and it start decelerating the ball rolls toward the front of the bus.

Suppose you also have a helium balloon floating in the bus. Does it also move toward the back of the bus when the bus accelerates and toward the front when the bus decelerates? Or does it stay where it is? Or does it move toward the front when the bus accelerates and toward the back when the bus decelerates?

The balloon would probably move toward the front when accelerating and toward the back when the bus slows, if it moved at all.

It helps (me) to imagine an air bubble in a sealed, nearly-full fish tank on that same accelerating bus. The heavier water gets "flung" harder away from the direction of acceleration, and the bubble gets pushed out of the way in the opposite direction. Same principle.

Yup. The movement is quite noticeable. Here's someone trying it [1].

[1] https://www.youtube.com/watch?v=XXpURFYgR2E

Given that train drivers have cameras pointing at passengers, I'd argue that they are indeed aware of the effect, but don't always roll the stop due to delays on the line and/or personal reasons.
> This effect can be prevented by gradually letting off the brake before reapplying it fully upon stopping, but few drivers and rapid transit systems seem to be aware.

Is this why it seems to be mostly Americans that are into the idea of self-driving cars, because the standard of driving is so low?

I have a t-shirt which has "don't be a" and the equation for the third derivative
Reminds me of someone I knew at university whose T-shirt was the definite integral from 10 to 13 of 2x dx followed by a question mark.
∫ 2x dx = x² + C

13² − 10² = 69

...9?
The answer is a nice, round number.
duh. it does contain 9 tho.
Better than my schwarzchild radius nerd shirt!
I saw a shirt the other day that said there’s no place like G28 0 0 0. I think for now that wins my nerdshirt championship (I still like my “velociraptor = distraptor / timeraptor” short though, even if it fails dimensional analysis. =)
And 'jerk' has to be kept below a certain threshold for humans to find movement comfortable.

It's not strictly a matter of threshold -- people might tolerate a higher jerk if it's for a much shorter duration, for example. In practice it doesn't much matter which metric you minimize; you'll end up with similar results. The simplest option is to minimize the mean absolute jerk, which has the side benefit of utterly confusing any non-physics-literate people listening in. (You want to do what to whom?)

Note that 'mean absolute jerk' can also be described as 'total variation of acceleration over time'. That implies it does not depend on how fast the acceleration changes, only about the difference between minimum and maximum (as long as the acceleration increases/decreases monotonically to/from the maximum). This may or may not be what you want.
I see what you did there
Jounce, crackle and pop for the 4th, 5th and sixth derivatives
Jounce, also known as snap. Which to people of a certain cultural background explains where the names for the 5th and 6th derivatives come from.
It feels wrong to me that pop comes after crackle. Crackle seems like the ultimate high-frequency effect. In fact, "pop" seems like it should come before "snap". But I guess it is somewhat arbitrary.
This video has an excellent visual demo of that concept: https://youtu.be/aVwxzDHniEw?t=451.
Skateboarders in 2008 don't get this. https://www.youtube.com/watch?v=TkeCZfG_KaI