Can my integration code for an accelerometer data work for a Square wave?
Show older comments
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.
Accepted Answer
More Answers (1)
Walter Roberson
on 11 May 2012
0 votes
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.
Categories
Find more on MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!