maanantai 18. tammikuuta 2016

On pulse forgery

It's been a while and I've been playing with pulse forgery problem (think of cabs with meters that seem to measure a bit too much cost) lately. Or more correctly, with the detection of forgery.

I wrote about this a bit, way back when I first started posting my random thoughts here, but since then some ideas have been clarified.

The easiest way of course was to cross-reference the pulse data with external source, like GPS. This of course requires GPS to practically be built-in, so it's a bit expensive, and in some regions might be a bit of a problem due to frequent loss of GPS signal (high buildings, tunnels, underground garages and whatnot)

But let's say you only have the pulse to work with. Most of the methods available work with the statistical parameters of the pulse; mainly duty cycle and period and changes in those. It's winter now, and while now it's not exceptionally slippery (at time of writing this it's -30C outside, and when it gets past (below) -5C or so slipperiness isn't as bad as close to zero) still in some cases wheels might lose their grip and spin momentarily wildly, like when trying to get moving from stop uphill, or trying to accelerate at on-ramp of highway. It wouldn't be nice if meter detected such events as tampering.

But ignoring that for a while, period (or frequency) change is simple one. In typical driving it shouldn't change too fast, and at least not constantly. So sudden large change there is pretty much a red flag. Measuring that is also a bit tricky. Some cars generate about 27000 pulses per kilometre, or 27 pulses per metre. At speed of mere 100km/h that translates already to 750 pulses per second - you'll need a fairly high precision timer if you want to measure those periods in detail! (and then there is software latency too, if you can't use hardware for this for some reason)

Duty cycle is also fun one - large change in duty cycle is another red flag. But unfortunately that is even greater problem as now your timing precision must be several orders of magnitude larger than with period alone. In some cars duty cycle can also vary based on speed so it can also cause false positives if that isn't considered.

At the moment I'm considering pulse period monitoring (most likely both overall frequency monitoring as well as monitoring pulse period discrepancies between sequential pulses) as more likely candidate. We'll see what happens when I get the test software I've been playing with on my desk to my car for more practical testing.


Ei kommentteja:

Lähetä kommentti