Powered By Blogger

2014年3月20日木曜日

加速度センサとロータリーエンコーダを組み合わせた速度計測法②:移動平均を用いた計測速度の平滑化

今回は②:移動平均を用いた計測速度の平滑化 について書きます。

前回、1 ms間にカウントされた波の数から速度を測定すると振動的になるということを紹介しました。今回は1 msごとに測定した速度データの単純移動平均をとり、振動を抑制する方法を紹介します。

前回紹介した1 msごとに計測した速度データに対し過去の5点(5 ms間)の移動平均をとりました。下にイメージ図を挙げます。





5 msの移動平均の結果をv-tグラフ(下図)の赤線で示します。
1 msごとに計測したデータも青線で示しました。この図から、移動平均で振動の振幅が小さくなっていることが分かります。
さらに10 ms、20 ms 、30 ms、50 msで移動平均をとったときのv-tグラフを示します。平均をとる時間が長くなるにつれて、振動の振幅が小さくなることがわかります。






ただし、平滑化されるからといって、平均をとる時間をいくらでも長くすればよいというわけでもありません。次回は平均をとる時間を長くしたときの問題を紹介します。

3 件のコメント:

  1. Why the encoder feedback for your halfsize mouse is so noisy? Is this something in common amount all micromouse players who are using AMS encoder IC?

    返信削除
  2. No feedback control is done in this test run, so this noisy data is caused by hardware. I think there is something wrong with wheels or encoder. I don't know what happens if I use other encoder. I have only used AMS encoder IC.

    返信削除
  3. oh, i see.
    AS5145B/5040 shouldn't be this noisy. At least it works fine on my 4 wheel half size mouse(haven't completely done yet). Let's hope this is not the problem of encoder itself :)

    返信削除