Filter Output Size

3 次查看(过去 30 天)
Rodney
Rodney 2012-6-1
Hi All.
I am attempting to realize a discrete-time FIR filter designed in MATLAB on an embedded target, and am having difficulty understanding how MATLAB has arrived at its stated output size of {34,17}.
In short, my filter has 64 symmetric coefficients that are {16,17} - ie the MSB weight is 0.25. My filter inputs are {16,0}, and the heart of my implementation is as follows.
for (i = 0 ; i < 32 ; i++) {
output += coefficient[i] * ( input[a] + input[b] );
}
The values of the input index (ie 'a' and 'b') are not relevant to this discussion. The filter output is thus the sum of 32 of the following operations:
{16,17} * ( {16,0} + {16,0} ) = {16,17} * {17,0}
= {33,17}
My problem is this - how did MATLAB get from this result to {34,17}, when I would of thought the output would need to be {39,17}. I have arrived at this number using the fact that for multiple additions, you need:
floor(log2(32))+1
extra bits, as per Ricardo Losada's brilliant book "Digital Filters in MATLAB". Can anyone explain what is going on - I am at somewhat of a loss.

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Filter Analysis 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by