eclipse-sumo / sumo

Eclipse SUMO is an open source, highly portable, microscopic and continuous traffic simulation package designed to handle large networks. It allows for intermodal simulation including pedestrians and comes with a large set of tools for scenario creation.
https://eclipse.dev/sumo
Eclipse Public License 2.0
2.51k stars 1.42k forks source link

CACC performs emergency braking at low speed when approaching stopped vehicle #11679

Closed namdre closed 1 year ago

namdre commented 2 years ago

Bildschirmfoto von 2022-09-23 10-26-58

namdre commented 2 years ago

The model oscillates between these two states

The Krauss-based speed override does not come into play and the behavior takes place at speeds below 5m/s

@robertalms Would you care to take a look at this? Frankly, I'm baffled that nobody noticed this since it happens at the step-lengths that this model was being developed for and the situation is extremely common.

robertalms commented 2 years ago

Sure, I'll have a look at it.

robertalms commented 2 years ago

I can only speculate that nobody noticed this issue so far, since the CACC model was only used in the later half of the TransAID project for a very limited number of use cases (3 that I know of). Those were mostly highway scenarios to investigate traffic flow behavior with ToCs. Probably no one looked into this low speed behavior in more detail. Nevertheless - it's pretty odd

namdre commented 2 years ago

some acceleration spikes remain:

(from test cf_model/CACC/slow_approach_standing)

Bildschirmfoto von 2022-09-27 16-34-15

robertalms commented 2 years ago

@namdre Your initial guess of adding a spacing error of somewhat around 2m was pretty accurate. I came to a value of > 1.66 . Adding this to the time gap condition in line 365 (time gap > 2) eliminates those remaining spikes for the standstill scenario.

The micro oscillations you discovered for the platooning scenarios stem from the model frequently switching between mode (ii) and (iv) because the spacing error oscillates around zero... that's part of the original implementation/parametrization of the CACC model and should be tackled in another ticket.

namdre commented 2 years ago

Thanks! Would you do a pull request with the proposed changes?

robertalms commented 2 years ago

PR done.

Feel free to change the speed division with an epsilon (NUMERICAL_EPS_SPEED?), as discussed - I didn't really know how to do that. (From what I saw on in the platoon tests, a time gap around 1sec, would be reasonable, even with speed close to zero.)

namdre commented 2 years ago

Hm. I'd say it's better than before but there is still something "creepy" about the way the vehicle fails to stop for ~20s and then there is still an acceleration spike at the end:

Bildschirmfoto von 2022-10-02 14-54-02

namdre commented 2 years ago

also the test tests/sumo/devices/driverstate/queue_stop_start_cacc_apply now has emergency braking which it didn't have before ('m guessing that the new space threshold now creates instability when the driverstate model applies an error term to the remaining gap).

robertalms commented 2 years ago

Attached you may find three platooning tests that aim to replicate platooning maneuvers from the original publications. ACC_CACC_tests.zip

namdre commented 2 years ago

only marginally related but probably of interested to @robertalms : 03482f3daef2d0a0739ac2819ca1702f58a11c7f

robertalms commented 1 year ago

I suggest to close this issue and would refer to the newly opened #11776 for further CACC model discussions.

robertalms commented 1 year ago

This ticket and #11776 could also be reviewed by @vmintsis @dimikout3 and @kporfyri.

namdre commented 1 year ago

Attached you may find three platooning tests that aim to replicate platooning maneuvers from the original publications. ACC_CACC_tests.zip

@robertalms: I've adapted the tests so that they run without traci by using type calibrators that change the permitted acceleration and deceleration for the leader

robertalms commented 1 year ago

Nice. I guess you still had to mimick the test by a positional definition, right? The original definition of the test is time based (accel/decel for x seconds and so on) and I didn't know how to do that with waypoints or calibrators, therefore I tried to replicate the leader behavior via traci. Nevertheless, the new test should do just fine to test stabilities. Thanks!

namdre commented 1 year ago

The setup with calibrators makes it very hard to replicate the desired timing so this test doesn't really try. A better solution would be #1922