Clear Filters
Clear Filters

How to avoid the prominent damping to output of "FIR Rate Conversion HDL Optimized".

1 view (last 30 days)
We are using the "FIR Rate Conversion HDL Optimized" block to achieve a 4n/5 upsample rate. The output signal has a significant damping, much smaller than my simulated input signal.
Is this expected?
How do we avoid that?

Accepted Answer

Garrey Rice
Garrey Rice on 25 Jul 2023
It looks like FIR filter coefficients you are using have a passband gain of 0 dB of. As a result, the output of the block is being attenuated by a factor of Interpolation factor as you can see in the three plots you've attached. This is expected. Conceptually, the block interpolates by inserting zeros between each sample and then applying the filter, which spreads the energy of the input samples across all of the interpolated samples.
To avoid this, you can either scale your coefficients by multiplying them by the Interpolation factor, or apply a gain of Interpolation factor at the output of the block. For example you could use the dsp.FIRRateConverter System object to design a suitable filter. Note that the following configuration has a passband gain of 5 (~14 dB).
firrc = dsp.FIRRateConverter(5,4,'Auto');
fvtool(firrc.Numerator);
Also, it looks like the signals in the plots you have provided are heavily quantized, and the output of the FIR Rate Conversion HDL Optimized block has a DC offset. Consider adjusting the fixed point data type settings of the block and choosing a different rounding mode.

More Answers (0)

Categories

Find more on Optimization in Help Center and File Exchange

Products


Release

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!