Forums

Question about quantization

Started by Bobby November 15, 2004
I've got transfer function H(z) and determined location of poles and zeros.

How can I recalculate location of poles and zeros using a minimum
quantization
level of 0.125 for direct form II, cascade, and parallel structures? Where
can I
find sample solutions for similar problems? Any online tutorial?

Is there any Matlab function which solves this problem?

Thanks in advance.


Bobby wrote:

> I've got transfer function H(z) and determined location of poles and zeros. > > How can I recalculate location of poles and zeros using a minimum > quantization > level of 0.125 for direct form II, cascade, and parallel structures? Where > can I > find sample solutions for similar problems? Any online tutorial? > > Is there any Matlab function which solves this problem? > > Thanks in advance. > >
Do you mean gain quantization or state quantization? If you mean gain quantization then calculate your filter using the form you want, round all of the gains to the nearest 0.125, and analyze your filter for the resulting transfer function. If you mean state quantization (you probably don't) then your system is nonlinear and not only poles and zeros, but the whole notion of a transfer function goes right out the window. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
Good question ... I think  it is about gain quantanization ...

I however don't think that this is just about rounding to the nearest
0.125.
If this would be true then quantanization effect to transfer function
will not depend on representation of transfer function (direct form
II, cascade, and parallel structures).

As you know the quantanization error is different for different
representations
(direct form II, cascade, and parallel structures) of transfer
function.
There are some formulas for computation of these errors, but this is
cumbersome job to calculate these errors. I am pretty sure that there
is simpler way to estimate quantanization effect for direct form II,
cascade, and parallel structures forms of representation of filter.

Bobby

Tim Wescott <tim@wescottnospamdesign.com> wrote in message news:<10pgi8tmhuhhhd2@corp.supernews.com>...
> Bobby wrote: > > > I've got transfer function H(z) and determined location of poles and zeros. > > > > How can I recalculate location of poles and zeros using a minimum > > quantization > > level of 0.125 for direct form II, cascade, and parallel structures? Where > > can I > > find sample solutions for similar problems? Any online tutorial? > > > > Is there any Matlab function which solves this problem? > > > > Thanks in advance. > > > > > Do you mean gain quantization or state quantization? > > If you mean gain quantization then calculate your filter using the form > you want, round all of the gains to the nearest 0.125, and analyze your > filter for the resulting transfer function. > > If you mean state quantization (you probably don't) then your system is > nonlinear and not only poles and zeros, but the whole notion of a > transfer function goes right out the window.
Bobby wrote:
-snip-
 >
 > Good question ... I think  it is about gain quantization ...
 >
 > I however don't think that this is just about rounding to the nearest
 > 0.125.
 > If this would be true then quantization effect to transfer function
 > will not depend on representation of transfer function (direct form
 > II, cascade, and parallel structures).
 >

Quantization, every place where I've seen it, has referred to the amount 
of precision available to represent a number.  Rounding to the nearest 
quantization level is a good quick and dirty start.

There is, in general, not a 1:1 correspondence between filter gains and 
transfer function coefficients, so you cannot, in general, expect 
quantization to be equivalent from one filter form to the next. 
Certainly in the case of n cascaded 1st-order filters vs. one n-th order 
direct form filter (of any subtype) there's a _tremendous_ difference. 
Take, for instance, a second-order low pass with the transfer function

              (1-d_1)(1-d_2)z^2
H(z) = ----------------------------
        z^2 - (d_1 + d_2)z + d_1 d_2

and poles at d_1 = 0.875 and d_2 = 0.75 (yes, those are chosen with evil 
intent).  This gives

              0.03125z^2
H(z) = ----------------------
        z^2 - 1.625z + 0.65625

A cascaded realization will get you _exactly_ the transfer function 
you're looking for.  With a direct form who's gains are equal to the 
transfer function coefficients the closest you can come is

               0 z^2
H(z) = --------------------
        z^2 - 1.625z + 0.625

Even ignoring the minor difficulty of having zero gain, your transfer 
function has poles at z = 0.625 and z = 1!  This ain't good.

 > As you know the quantization error is different for different
 > representations
 > (direct form II, cascade, and parallel structures) of transfer
 > function.
 > There are some formulas for computation of these errors, but this is
 > cumbersome job to calculate these errors. I am pretty sure that there
 > is simpler way to estimate quantanization effect for direct form II,
 > cascade, and parallel structures forms of representation of filter.
 >
 > Bobby
 >
If it's data quantization errors I just make it into a state-space model 
and look at the gains from each state to the output -- this models the 
quantization as injected noise at the state, and gives me an estimate of 
the output error.  But if your data range is (-1, 1) and you're 
quantizing to 0.125 then you aren't going to get much value from your 
filter.

-- 

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com
In article <10b25cdd.0411151050.54fec7e0@posting.google.com>,
Bobby <waystark@yahoo.com> wrote:
>Good question ... I think it is about gain quantanization ... > >I however don't think that this is just about rounding to the nearest >0.125. >If this would be true then quantanization effect to transfer function >will not depend on representation of transfer function (direct form >II, cascade, and parallel structures). > >As you know the quantanization error is different for different >representations >(direct form II, cascade, and parallel structures) of transfer >function.
Are you referring to quantization of the mathematical transfer function? Or of the intermediate values in a particular IIR implementation? IMHO. YMMV. -- Ron Nicholson rhn AT nicholson DOT com http://www.nicholson.com/rhn/ #include <canonical.disclaimer> // only my own opinions, etc.
Yes, the problem I am trying to solve about quantization of the mathematical
transfer function.

"Ronald H. Nicholson Jr." <rhn@mauve.rahul.net> wrote in message
news:cnbkjr$ses$1@blue.rahul.net...
> In article <10b25cdd.0411151050.54fec7e0@posting.google.com>, > Bobby <waystark@yahoo.com> wrote: > >Good question ... I think it is about gain quantanization ... > > > >I however don't think that this is just about rounding to the nearest > >0.125. > >If this would be true then quantanization effect to transfer function > >will not depend on representation of transfer function (direct form > >II, cascade, and parallel structures). > > > >As you know the quantanization error is different for different > >representations > >(direct form II, cascade, and parallel structures) of transfer > >function. > > Are you referring to quantization of the mathematical transfer function? > Or of the intermediate values in a particular IIR implementation? > > > IMHO. YMMV. > -- > Ron Nicholson rhn AT nicholson DOT com http://www.nicholson.com/rhn/ > #include <canonical.disclaimer> // only my own opinions, etc.