Filter Output Size
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Digital Filter Analysis finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!