Thursday 29 September 2016

downsampling - What if the Down sampling factor is not an integer?


I have developed a function which down samples an input signal.Say I have an input signal with a sampling rate of 512 samples/sec and would like to down sample it 128 samples/sec, then the down sampling factor is discrete and it is 4. In this case, I believe that the input signal will successfully be down sampled to 128 samples/sec without any loss of information.But, what if we have to down sample a signal from a sampling rate of 511 samples/sec to 127 samples/sec,then the down sampling factor 4.0236. When I run my code for a down sampling non integer factor, I still get the output down sampled signal,but I am sure that, since I down sampled the signal by an non-integer factor, the output may not be correct and would have lost information.Any methods to overcome this issue or Is there a way to approximate it without damaging the quality of the down sampled signal?


My Understanding - I found a method after a while of researching. In this case we have to initially up sample the input sampling rate followed by down sampling, known as "Multirate conversion". So here is my understanding, Input Sampling rate = 511 b/s and Desired output sampling rate = 127 b/s. So, 127*5 = 635 and 635 -511 = 124. Therefore, i need to up sample 511 b/s by a factor of L = 5 to get 635 and then down sample this 635 by a factor M = 124 to get the desired down sampled output of 127 b/s. What do you have to say?. Please correct me if its wrong or illogical.




Answer



Resampling (by rational or even irrational ratios) can be done by low-pass filtering in conjunction with high quality interpolation of all the samples needed for the new rate, directly. No two-step up-sampling following by downsampling is required (although that is one possible implementation for simple ratios).


A Sinc kernel, being a reconstruction formula, is the ideal interpolator for band-limited sampled waveforms. In practice, a windowed Sinc interpolator is usually as good or better than the FIR or IIR filters used inside other resampling methods.


Also, information may be lost in going to any lower sample rate (even in your original 4:1 resampler) if the original sample data contains higher frequency spectrum that has to be removed by the anti-alias low pass filter (required to prevent aliasing at the lower sample rate).


No comments:

Post a Comment

readings - Appending 内 to a company name is read ない or うち?

For example, if I say マイクロソフト内のパートナーシップは強いです, is the 内 here read as うち or ない? Answer 「内」 in the form: 「Proper Noun + 内」 is always read 「ない...