Can my integration code for an accelerometer data work for a Square wave?
Mostrar comentarios más antiguos
I have a code written to integrate an accelerometer data to displacement. this code integrates the signal.
The code includes a butterworth high pass filter and the "cumtrapz" integration code.
Applying the code to a square wave, the wave becomes distorted. Does it mean my code is not good enough or the square wave will always be distorted by the filter.
Thanks in advance.
Respuesta aceptada
Más respuestas (1)
Walter Roberson
el 11 de Mayo de 2012
0 votos
It could mean both, but Yes, a square wave will always be distorted by any frequency filter.
square waves (and all other kinds of waves with straight edges... other than the constant signal of course) require infinite signal bandwidth to represent properly. Remove any frequency from that bandwidth (by way of filtering) and the square wave will be distorted. You often get "overshoot" on the leading and trailing edges as well.
Categorías
Más información sobre MATLAB en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
