Single is not double

We set out yes­ter­day to tune the sys­tem but it was more dif­fi­cult than we first had expected. It turned out that the ini­tial poor per­for­mance was not a mat­ter of para­me­ter set­tings but rather of numer­i­cal problems.

It showed out that the sys­tem worked per­fectly (apart from some small bugs which were dis­cov­ered in the process) when com­piled for dou­ble pre­ci­sion (64-bits floats) but hade prob­lems when com­piled for sin­gle pre­ci­sion (32-bits floats). It worked fine with sin­gle pre­ci­sion for some old data that we used when ini­tially cod­ing the sys­tem. How­ever, when run with the new data, recorded from the cur­rent sys­tem, the covari­ance val­ues went bananas. The main dif­fer­ence is that the new data come in at 819[Hz] in com­par­i­son with 250[Hz] for the old data. The process noise scale with f^-2, where f is the fre­quency, while we do not scale the mea­sure­ment noise with time. This means that the ratio between process noise and mea­sure­ment noise decreased with roughly a fac­tor 10. For some rea­son this made the sys­tem unhappy run­ning on sin­gle precision.

Unfor­tu­nately we can only make hard­ware float­ing point oper­a­tions with sin­gle pre­ci­sion so the fact that it worked fine with dou­ble pre­ci­sion did not help much. We have started the work to pin down the numer­i­cal prob­lems but this far still with­out luck. How­ever, tweek­ing the para­me­ter val­ues we could still make the sys­tem run just fine. Here’s a sam­ple of what the sys­tem can do this far

The plot is of me (JO) tak­ing a turn in the cor­ri­dors of our depart­ment build­ing. The plot was dis­played in real-time on the lap­top used to receive and record the sys­tem posi­tion estimates.

Comments are closed.