0
$\begingroup$

I work on a simulation decimation filter: downsampling + filter.

My test environment: low data rate receiver, BPSK, square root raised cosine filter with cutoff frequency =0.5, transition bandwidth = 0.2, sampling frequency = 4 and 21 taps.

I am not an expert in signal processing but I have to know some stuff.

My question is about downsamplig step. Downsampling for me as software engineer means that I need discard N sample between two samples.

I implemented in this way decimation and got additional frequencies. Matlab simulation doesn’t give these frequencies.

If I sum up, it will work as in Matlab.

Example:

enter image description here

​ where o - sample i use, x samples I discard

I sum sample "o" and 3 samples "x" up if a downsampling factor is 4. Resultant is a new sample =^ "0"

This works in FPGA, but I cant understand it why it works...could someone gives me an explanation or if this operation exists how can I seach information about it?

Thank you in advance!

$\endgroup$
7
  • $\begingroup$ Did you apply lowpass filtering before downsampling? $\endgroup$ – ZR Han Jun 17 at 9:16
  • $\begingroup$ @ZRHan yes, I did $\endgroup$ – LeeLeeYa Jun 17 at 9:19
  • $\begingroup$ So i didn't quite understand what your question is. MATLAB and FPGA both work, where did you get the additional frequencies? $\endgroup$ – ZR Han Jun 17 at 9:22
  • $\begingroup$ Since your downsampling factor is 4, the new sampling frequency is 1 and the Nyquist frequency is 0.5. You need a lowpass filter with lower cutoff frequency instead of 0.5. $\endgroup$ – ZR Han Jun 17 at 9:27
  • $\begingroup$ @ZRHan In FPGA simulation I remove N-1 samples, where N is decimation factor. In this case I got additional frequencies. I fixed it by using summation , but It should be explained in theory...why do additional frequency appear if i remove samples? Why does addition fix it? $\endgroup$ – LeeLeeYa Jun 17 at 9:27
0
$\begingroup$

Doing the summation is the necessary low pass filter step prior to decimation, and an ideal decimation approach when the noise is white (evenly spread across frequency). What this does is ensure that every signal component of every sample is included while the noise gets reduced through averaging (summing is averaging just without the scaling by dividing by the number of samples): when you sum, the value for coherent values (the mean) goes up by the number of samples $N$, while the standard deviation of the noise component goes up by $\sqrt{N}$ .

So this would be the best and typical approach to decimation when there isn't a particularly strong interference present out of band: sum all samples over the decimation interval first, and then down-sample by selecting every Dth sample.

(Note that CIC decimating filters do this specifically).

I explain this further in the following slides showing decimation as the combination of requisite filtering with down-sampling:

down-sampling

anti-alias filter

alias filter design

A moving average filter of N taps places it's rejection nulls at the ideal location for a decimate by N operation!

MAF

The numerical example of this for the case of decimate by four is the output samples $m$ are selected from the input samples $n$ as follows, with $n$ indexing at four times the rate of $m$, so for every four $n$ samples we get one $m$ sample:

Four point moving average:

$y[n] = \frac{x[n]+x[n-1]+x[n-2]+x[n-3]}{4}$

Select (down-sample) every fourth sample:

$w[m] = y[4m]$

The above shows the direct approach, but as suggested in the graphic the cascade-integrator-comb (CIC) decimator does this exact computation more efficiently. There are other posts here that further detail such decimation approaches.

$\endgroup$
6
  • $\begingroup$ let say I have the following samples: s1, s2, s3, s4, ..., The decimation factor is 4. my first step d1 = s1+s2+s3+s4, d2 = s5+s6+s7+s8, ... d3=...., d4=.... d5, d6. The next step is d1,d5,d9....i.e Should I remove sums between ? $\endgroup$ – LeeLeeYa Jun 17 at 14:45
  • $\begingroup$ @LeeLeeYa You want to do a moving sum of the sample with the previous 3 samples, and then remove every three samples of that result and keep the fourth. That said, you can simply sum every four samples and keep the result and then skip ahead four samples and repeat. It's the same result with less processing. $\endgroup$ – Dan Boschen Jun 17 at 15:02
  • $\begingroup$ sorry...i cant understand it..."sum all samples over the decimation interval first, and then down-sample by selecting every Dth sample." Could you give a numerical or schematic example? $\endgroup$ – LeeLeeYa Jun 21 at 14:53
  • $\begingroup$ Yes I will be happy to later when I am back at my computer $\endgroup$ – Dan Boschen Jun 21 at 14:58
  • $\begingroup$ thank you in advance! $\endgroup$ – LeeLeeYa Jun 22 at 5:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.