The VW emissions cheat is famous, but I realised this afternoon that I had no idea how it was achieved. This paper from 2017 contains a lucid explanation of how VW’s ECU software identified the conditions of a regulatory test, triggering a mechanism to drastically reduce NOx emissions. It also describes a far cruder method of cheating the same tests used by Fiat .
The paper then presents a rather clever static analysis tool which aims to detect cheating in ECU firmware by spotting instances in the code where the distance travelled by the vehicle in the current journey is compared against known test scenarios - the key technique used by VW.
 I can’t help but cheekily recall Orwell: “The Italians adopted the goose-step at about the time when Italy passed definitely under German control, and, as one would expect, they do it less well than the Germans”