6 years, 11 months ago.

Complementary filter - slow response time

I have a problem with my complementary filter. When i send all the data to the computer terminal to see all the data, output data from complementary filter time response is kinda slow comparing to the not filtered data. Do you have any clue why it might be like that ? how to increase response time for complementary filter ? Thank you

still slow. How to check the speed of the filter ?

posted by Ad Blu 13 Oct 2014

1 Answer

6 years, 11 months ago.

Is your filter still running at the correct speed if you output data to your terminal? (Which is quite slow). Otherwise it could simply be that that is wrong.

And besides that you need to make sure your gyroscope is supplying data in the correct units. If it is giving radials, but your filter is using degrees, it also won't work properly.

Ok, i guess i have to read a lot lot more about accelerometers. Can you tall me how to check accelerometer and gyro range ? where in the code will i find it ?

posted by Ad Blu 09 Aug 2014

Well mainly the gyroscope, generally units of accelerometers don't really matter, since only the direction of the acceleration vector is taken into account.

And normally a lib will mention it somewhere in the documentation/header file which units it outputs, just like the complementary filter should mention it somewhere which units it wants at its inputs.

posted by Erik - 09 Aug 2014

This is my code: gyy = gy / 65.536 * 0.01; 0.01 = dt 65.536 is gyro sensivity 0.01 is sampling rate ayy = atan2f((float)ay, (float)az) * 180 / pi; and agy= (0.98 * (agy + gyy) )+( ayy * 0.02);

and still is slow, i do not now what is wrong, and i dont know how to look for help in the internet... any clues ?

posted by Ad Blu 16 Aug 2014