Hi people, in the past few days I tried to filter a signal with no success. I'm here to understand which technique could help me at this point. I tried the madgwick, mahony and right now a simple low pass filter, but I am not able to delete (IN REAL TIME) the spikes that overpass 120 or go down 80.
My system is an arduino uno that reads the gravity vector of the imu bno055 during consecutive inclination, coming from quaternions. I attach the code and a pic to be complete.
Because of the turning on of a servo, that is not the cause of those spikes, the sample frequency is 0.2247. The resulted line is , indeed, not so smooth. I guess that this is another problem even if I don't like it.
Thank you to all. And honestly, sorry. Sorry for the loss of time. Indeed, continuing and testing it with other filters, because of all yours tips, I noticed that the problem was the soldering of the hardware, nothing else. Goodbye.