Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
9 years, 8 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
1 Answer
9 years, 8 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 09 Aug 2014Well 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 09 Aug 2014This 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 16 Aug 2014
still slow. How to check the speed of the filter ?
posted by Ad Blu 13 Oct 2014