Filter Output Size

조회 수: 6 (최근 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에서 Digital Filter Analysis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by