Polyphase decimation filter: Simulink implementation of commutator variant not as expected

6 次查看(过去 30 天)
Hi,
I am modelling a polyphase decimation filter in Simulink. In literature there are 2 variant implementations:
  • with a commutator
  • with extra delay elements and decimators
Slide 25 shows block diagram with commutator and slide 24 without in below presentation:
The attached PolyphaseDecimation2.slx is the version without commutator that gives correct results.
In the attached PolyphaseDecimation.slx I try to simulate the commutator variant. But there is a huge difference between normal filter followed by decimation versus my polyphase implementation. The sine generator makes frames of 4 samples and with a demux I unpack such a frame to four values. Let's calculate the first output value. For the full filter this is the value input(0)*h(0) that will be selected by the decimator as the delay elements are initialized with zeros. The next 3 values coming out of the filter will be discarded. For my filter it is input(0)*h(0)+input(1)*h(1)+input(2)*h(2)+input(3)*h(3). This is clearly different and this is because the input(1:3) are directly used without a delay element.
So probably my interpretation of a polyphase decimator with commutator is not correct? Or are the two variants really different?
Kind regards, Bert

采纳的回答

Bert RAM Aerts
Bert RAM Aerts 2019-6-5
编辑:Bert RAM Aerts 2019-6-6
My formula input(0)*h(0)+input(1)*h(1)+input(2)*h(2)+input(3)*h(3) was incorrect, input was in the wrong order.
It has to be input(3)*h(0)+input(2)*h(1)+input(1)*h(2)+input(0)*h(3) and the filters had to be applied in reverse order.
The other mistake I made was that the downsampler was taking the first sample of the four, while to be the same as the formula I just gave, it should be the last sample of the four. This can easily been done in this Simulink block, but the problem is that selecting another sample than the first adds latency and outputs first a zero. To compensate for that, I added a delay element after the commutator decimator.
And now both implementations give the same result. Problem solved!

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Multirate and Multistage Filters 的更多信息

产品


版本

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by