Tuesday, April 7, 2020

Why taking derivative amplifies noise

Did you know?
Taking derivative amplifies noise.

Why?
By differentiating, you remove the low-frequency components

How?
Assume a noisy input signal














Taking derivative using diff(inputSig)















When?
1) Finding velocity of motor through its quantized signals (Encoder data or A/D converter output)
2) Image processing, where derivatives are used to help detect the edges. While at mean time, this operation would also make the data noisier

Solution?
As 2 point discrete differentiation is bound to produce highly noisy results. try either
0) Smoothing filter (such as linear phase FIR filter) to alleviate the noise, then do the derivatives
1) 5-points stencil (https://en.wikipedia.org/wiki/Five-point_stencil)
2) Generate coefficients (i.e. more points) yourself using derivation of Lagrange polynomials.
3) Wavelet transform and use derivatives of wavelets. Wavelet transform will allow one to discard high-frequency components, theoretically coming from the underlying noise and sampling rate
( https://www.sciencedirect.com/science/article/abs/pii/S0169743903001370 )

The boy who was lost in robotics

Today is the first productive day of 

Hi to myself, this is my first post.
Have been wanting to start this for the longest time now, to keep track of some of the weird and wonderful knowledge I gain and how I felt along that way.
All so that I come back to review my time here in Biorobotics lab, I can better judge whether had been worthwhile.

Started work around end July, and at this point of time, 8 months have passed
So much time, yet haven't begun to write any post, just cause couldn't bring myself to do so.
Why?
Because I am fundamentally lazy.

But since the whole (essentially a lockdown, but allegedly not a lockdown) "circuit breaker" started. there has been much spare time for me to do this.

So....let's go.