Fixed Point IIR implementation

Hi pals,

I would like to implement a IIR Biquad filter using the fixed point 
arithmetics...
Hence to reduced the intermediate states I plan to use the following trick:
s(k) = x(k) -a1*s(k-1) -a2*s(k-2)
y(n) = b0*s(k) + b1*s(k-1) + b2*s(k-2)

The I can compute each y, saving only 2 states (s(k-1) a�nd s(k-2))...

BUT ... in order to scale my coefficients or input, I need to know what 
are the boundaries of the s(k) serie... in order to find a proper Fixed 
Point format for my coefficients..
So my questions are :

* for which conditions, s(k) is bounded
* If the s(k) is bounded, what are the boundaries?

Thanks in advance for your help (and sorry for my poor englsih)

Fred.
0
fred_nach (6)
11/30/2005 11:35:55 AM
comp.dsp 20141 articles. 0 followers. allnor (8507) is leader. Post Follow

19 Replies
306 Views

Similar Articles

[PageSpeed] 23
Fred Nach wrote:
> Hi pals,
> 
> I would like to implement a IIR Biquad filter using the fixed point 
> arithmetics...
> Hence to reduced the intermediate states I plan to use the following trick:
> s(k) = x(k) -a1*s(k-1) -a2*s(k-2)
> y(n) = b0*s(k) + b1*s(k-1) + b2*s(k-2)
> 
> The I can compute each y, saving only 2 states (s(k-1) a�nd s(k-2))...
> 
> BUT ... in order to scale my coefficients or input, I need to know what 
> are the boundaries of the s(k) serie... in order to find a proper Fixed 
> Point format for my coefficients..
> So my questions are :
> 
> * for which conditions, s(k) is bounded
> * If the s(k) is bounded, what are the boundaries?
> 
> Thanks in advance for your help (and sorry for my poor englsih)

Your English is good enough, I think. The s[k] are data you supply. They 
can't be larger or smaller than the representation allows, but they may 
have smaller limits.

I see no feedback in the formulas you give. Is that correct?

Jerry
-- 
Engineering is the art of making what you want from things you can get.
�����������������������������������������������������������������������
0
jya (12870)
11/30/2005 4:17:06 PM
Fred Nach wrote:
>
> I would like to implement a IIR Biquad filter using the fixed point
> arithmetics...
> Hence to reduced the intermediate states I plan to use the following tric=
k:
> s(k) =3D x(k) -a1*s(k-1) -a2*s(k-2)
> y(n) =3D b0*s(k) + b1*s(k-1) + b2*s(k-2)
>
> The I can compute each y, saving only 2 states (s(k-1) a=E9nd s(k-2))...

this is the Direct 2 Form (sometimes called the "Direct II Canonical
Form").  unrecommeded for floating-point (if the Q is quite high, you
end up subtracting numbers very close to each other and  losing
precision) and *highly* unrecommended for fixed-point (saturation
clipping will be your lot).

try the Direct 1 Form:

    y[n] =3D b0*x[n] + b1*x[n-1] + b2*x[n-2] - a1*y[n-1] - a2*y[n-2]

every product on the right side of the =3D sign is a double precision
fixed point and all of those products should be added together in
double precision.  this is trivial in the Mot 56K and the ADI SHArC and
maybe in the TI fixed-pointers.

> BUT ... in order to scale my coefficients or input, I need to know what
> are the boundaries of the s(k) serie... in order to find a proper Fixed
> Point format for my coefficients..

your coefs are defined strictly in terms of the frequency response you
want.  the gross range of a1 is -2 to +2 and a2 is -1 to +1 for any
stable biquad filter.  the b0, b1, b2 coefs can be nearly anything but
you will have to choose a range and possibly do some scaling using the
arithmetic shift operation on the result before saving to y[n].

> So my questions are :
>
> * for which conditions, s(k) is bounded
> * If the s(k) is bounded, what are the boundaries?

that is a purely artificial construct.  are your fixed-point signal
values considered 16 bit signed integers?  then it's  -32768 <=3D x[n] <
+32768 .  are they normalized?  then it's -1 <=3D x[n]< +1.  their range
is whatever you want them to be.

> Thanks in advance for your help (and sorry for my poor englsih)

as Jerry said, your English is fine.

r b-j

0
rbj (4086)
11/30/2005 5:57:01 PM
> I see no feedback in the formulas you give. Is that correct?

The aX coeffecients should be the feedback terms and the bX
coefficients should be the feed forward terms (from drawing a direct
form II simulation diagram).  The s(k) terms are the inputs to the
delay buffers, which will be a function of the input, feed forward and
feedback terms.

I see the question he is asking, how to determine if these terms
overflow the fixed point number format in use, and how to determine a
proper scaling value to keep it from happening.  Unfortunately, I don't
know how to answer this question, but in the project I am presently
working on I have encountered the same problem, so I am hoping someone
has a good answer.  I got around the problem (? maybe ?) by using a
direct form I structure.

I have seen Matlab scripts that run an impulse response till it
stabilizes and then sum up the impulse responses and use the maximum
value as a scale factor, though I don't know if this is a correct
solution.

0
no_spam_me2 (215)
11/30/2005 6:01:31 PM
Noway2 wrote:
>>I see no feedback in the formulas you give. Is that correct?
> 
> 
> The aX coeffecients should be the feedback terms and the bX
> coefficients should be the feed forward terms (from drawing a direct
> form II simulation diagram).  The s(k) terms are the inputs to the
> delay buffers, which will be a function of the input, feed forward and
> feedback terms.
> 
> I see the question he is asking, how to determine if these terms
> overflow the fixed point number format in use, and how to determine a
> proper scaling value to keep it from happening.  Unfortunately, I don't
> know how to answer this question, but in the project I am presently
> working on I have encountered the same problem, so I am hoping someone
> has a good answer.  I got around the problem (? maybe ?) by using a
> direct form I structure.
> 
> I have seen Matlab scripts that run an impulse response till it
> stabilizes and then sum up the impulse responses and use the maximum
> value as a scale factor, though I don't know if this is a correct
> solution.

I expect that the b's are the denominator terms. Input samples are s[n], 
output and feedback samples are y[n]. I see no coefficients operating on 
any y[n].

I see what he's asking too. His problem lies with internal states, and I 
don't know how to deal with that in the abstract. If there's a general 
case, I haven't seen it.

Jerry
-- 
Engineering is the art of making what you want from things you can get.
�����������������������������������������������������������������������
0
jya (12870)
11/30/2005 6:36:47 PM
Jerry Avins wrote:
>
> I expect that the b's are the denominator terms.

no, Jerry, the a's are in the denominator.  they reversed that
convention a while back.  in the 70's it was a_k on top and b_k on
bottom, but, i think because they think that poles are more important,
most texts have it switched around now.

r b-j

0
rbj (4086)
11/30/2005 7:32:10 PM
robert bristow-johnson wrote:
> Jerry Avins wrote:
> 
>>I expect that the b's are the denominator terms.
> 
> 
> no, Jerry, the a's are in the denominator.  they reversed that
> convention a while back.  in the 70's it was a_k on top and b_k on
> bottom, but, i think because they think that poles are more important,
> most texts have it switched around now.
> 
> r b-j

I knew that too, but old habits sometimes bubble up. The important point 
was that Fred N. has no y terms to the right of an equal sign, so I 
don't see any recursion. Somewhere along the line I wrote that. Twice, I 
think.

Jerry
-- 
Engineering is the art of making what you want from things you can get.
�����������������������������������������������������������������������
0
jya (12870)
11/30/2005 9:21:45 PM
Jerry Avins wrote:
> robert bristow-johnson wrote:
> > Jerry Avins wrote:
> >
> >>I expect that the b's are the denominator terms.
> >
> > no, Jerry, the a's are in the denominator.
>
> I knew that too, but old habits sometimes bubble up. The important point
> was that Fred N. has no y terms to the right of an equal sign, so I
> don't see any recursion.

there is recursion with the intermediate s[k] signal:

Fred Nach wrote:

> I would like to implement a IIR Biquad filter using the fixed point
> arithmetics...
> Hence to reduced the intermediate states I plan to use the following trick:
> s(k) = x(k) -a1*s(k-1) -a2*s(k-2)
> y(n) = b0*s(k) + b1*s(k-1) + b2*s(k-2)

this is the canonical Direct Form 2.  poles before zeros.  problem is,
if there is a high Q filter, those poles will amplify the signal so
much that it will saturate s[k] before the zeros get to beat the signal
back down.  DF2 ain't particularly good, especially for fixed-point
arithmetic.

r b-j

0
rbj (4086)
11/30/2005 10:27:56 PM
On Wed, 30 Nov 2005 11:01:31 -0800, Noway2 wrote:
> I have seen Matlab scripts that run an impulse response till it
> stabilizes and then sum up the impulse responses and use the maximum
> value as a scale factor, though I don't know if this is a correct
> solution.

It's pretty close.  This is the main reason why these "direct form 2"
implmentations are not preferred.  A direct form 1 implmentation will use
more memory but (a) memory is relatively cheap and (b) the values stored
will be as constrained as the input and output values.

-- 
Andrew

0
12/1/2005 12:10:25 AM
robert bristow-johnson wrote:
> Jerry Avins wrote:
> 
>>robert bristow-johnson wrote:
>>
>>>Jerry Avins wrote:
>>>
>>>
>>>>I expect that the b's are the denominator terms.
>>>
>>>no, Jerry, the a's are in the denominator.
>>
>>I knew that too, but old habits sometimes bubble up. The important point
>>was that Fred N. has no y terms to the right of an equal sign, so I
>>don't see any recursion.
> 
> 
> there is recursion with the intermediate s[k] signal:

OK. Back to the books with my thinking cap on.

Jerry
-- 
Engineering is the art of making what you want from things you can get.
�����������������������������������������������������������������������
0
jya (12870)
12/1/2005 4:19:12 AM
Jerry Avins wrote:
> robert bristow-johnson wrote:
> > Jerry Avins wrote:
....
> >>I knew that too, but old habits sometimes bubble up. The important point
> >>was that Fred N. has no y terms to the right of an equal sign, so I
> >>don't see any recursion.
> >
> >
> > there is recursion with the intermediate s[k] signal:
>
> OK. Back to the books with my thinking cap on.

no need.  here's a simple way to look at it:

   s[k] =    x[k] - a1*s[k-1] - a2*s[k-2]
   y[k] = b0*s[k] + b1*s[k-1] + b2*s[k-2]

think of this as two filters in cascade.  the first with input x[k] and
output s[k].  the second with input s[k] and output y[k].

the first is a all-pole filter (actually there are 2 zeros at the
origin, but don't worry about them) and the second is a all zero
filter, an FIR (like an FIR, there are 2 poles at the origin, but the
other 2 zeros kill 'em).  the transfer function of the first:

    S(z)/X(z) = 1/(1 + a1*z^-1 + a2*z-2)

the transfer function of the second

    Y(z)/S(z) = b0 + b1*z^-1 + b2*z^-2

and the transfer function of the whole sheee-bang is

   H(z) = Y(z)/X(z) = ( Y(z)/S(z) ) * ( S(z)/X(z) )

and the reason it has only two states instead of four is that the
states for the first are identical to the states of the second (both
delays on s[k]) so they can be combined into a single delay line.

 r b-j

0
rbj (4086)
12/1/2005 7:09:00 AM
Hi all !

Firstly thanks a lot for your fast and usefull help ;-)

It seems that my previous post was not clear enough so here are some 
extra details :

* The filter structure is indeed the From II that robert B-J has 
described very clearly.

* a1 and a2 are hence the DENOMINATORS coeff (I was born in the 80's !!)
and ... b1 and b2 are NUMERATOR (no b0 cause it is supposed scaled)

* The input signal is x(n) and it is a bounded signal : PCM 16 bits so 
it varies from -32768 to 32767

* The s(k) are the internal states that I save between each sample 
processing...

* The filter is indeed stable hence  |a1| <= 2 and |a2| <= 1

I think I understood that this implementation is not recommended because 
it compute first the feedback terms and leads to big variations...
But is there a way to retrieve the boudary of s(k) mathematicaly ?

I think that as long as a1 and a2 are given for a stable filter s(k) 
should be bounded...

For my program, this implementation is very interesting cause i code in 
Assembly and It save a lot of MPIS to only read 2 states variable (s1 
and s2) then 4 (x1 x2 y1 y2)...

Fred.


robert bristow-johnson a �crit :
> Fred Nach wrote:
> 
>>I would like to implement a IIR Biquad filter using the fixed point
>>arithmetics...
>>Hence to reduced the intermediate states I plan to use the following trick:
>>s(k) = x(k) -a1*s(k-1) -a2*s(k-2)
>>y(n) = b0*s(k) + b1*s(k-1) + b2*s(k-2)
>>
>>The I can compute each y, saving only 2 states (s(k-1) a�nd s(k-2))...
> 
> 
> this is the Direct 2 Form (sometimes called the "Direct II Canonical
> Form").  unrecommeded for floating-point (if the Q is quite high, you
> end up subtracting numbers very close to each other and  losing
> precision) and *highly* unrecommended for fixed-point (saturation
> clipping will be your lot).
> 
> try the Direct 1 Form:
> 
>     y[n] = b0*x[n] + b1*x[n-1] + b2*x[n-2] - a1*y[n-1] - a2*y[n-2]
> 
> every product on the right side of the = sign is a double precision
> fixed point and all of those products should be added together in
> double precision.  this is trivial in the Mot 56K and the ADI SHArC and
> maybe in the TI fixed-pointers.
> 
> 
>>BUT ... in order to scale my coefficients or input, I need to know what
>>are the boundaries of the s(k) serie... in order to find a proper Fixed
>>Point format for my coefficients..
> 
> 
> your coefs are defined strictly in terms of the frequency response you
> want.  the gross range of a1 is -2 to +2 and a2 is -1 to +1 for any
> stable biquad filter.  the b0, b1, b2 coefs can be nearly anything but
> you will have to choose a range and possibly do some scaling using the
> arithmetic shift operation on the result before saving to y[n].
> 
> 
>>So my questions are :
>>
>>* for which conditions, s(k) is bounded
>>* If the s(k) is bounded, what are the boundaries?
> 
> 
> that is a purely artificial construct.  are your fixed-point signal
> values considered 16 bit signed integers?  then it's  -32768 <= x[n] <
> +32768 .  are they normalized?  then it's -1 <= x[n]< +1.  their range
> is whatever you want them to be.
> 
> 
>>Thanks in advance for your help (and sorry for my poor englsih)
> 
> 
> as Jerry said, your English is fine.
> 
> r b-j
> 
0
fred_nach (6)
12/1/2005 3:18:16 PM
Me again ...

Ok, so i've just launch a Matlab plot of the filter derived from the 
s(k) sequence :

s(k) = x(k) -a1*s(k-1) -a2*s(k-2)
hence considering x(k) as input and s(k) as output
H(Z) = 1/(1 + a1*z^-1 + a2*z^-2)

the frequency response give a curve that decrease gradualy, *BUT* start 
witha gain of about 80 dB ... hence it means (as long as i 
understand...) that for almost constant x(k) (=low freq) the gain is 
very important so s(k) will take big values ... (gain of 80dB is like 
multiplying by 10 000 !) hence it for a Fixed Point architecture it 
requires ceil(log2(10000)) = 14 guard bits !!!

So yes... it's definitively not a good solution to implement a filter 
like that ... and I will do it using the direct form 1.

Salut !

Fred
0
fred_nach (6)
12/1/2005 4:06:39 PM
Fred Nach wrote:
>
> It seems that my previous post was not clear enough

it was clear enough for me.

....

> * The filter is indeed stable hence  |a1| <= 2 and |a2| <= 1
>
> I think I understood that this implementation is not recommended because
> it compute first the feedback terms and leads to big variations...

it means that s[n] is too large to fit in you 16 bit words.  if you
represent them as 32 bit words, then you have to do double precision
multiplies when you multiply be b0, b1, b2.

> But is there a way to retrieve the boudary of s[n] mathematicaly ?
>
> I think that as long as a1 and a2 are given for a stable filter s[n]
> should be bounded...

it is.  the worst case is that if a1 and a2 are known, you can obtain
the impulse response for the all-pole filter

      H_s(z) = 1/(1 + a1*z^-1 + a2*z^-2)

call that impulse response h_s[n].

the worst case for the maximum value for |s[n]| is what happens if x[n]
shares the same sign as s[n] (for each value of n) and is at it at its
maximum magnitude.  from the convolution summation

      s[n] = SUM{ h_s[k] * x[n-k] }
              n

      max |s[n]| = max |x[n]| * SUM{ |h_s[n]| }
       n            n            n           (max's and SUM over all n)

you might find that max gain, SUM{ |h_s[n]| }, to be a very large
value.  much larger than 1. if you were to reduce you input to such a
degree that you guarantee that s[n] never saturates, you will likely
reduce

> For my program, this implementation is very interesting cause i code in
> Assembly and It save a lot of MIPS to only read 2 states variable (s1
> and s2) then 4 (x1 x2 y1 y2)...

there is no reason for the DF1 to require more MIPS in the inner loop
than the DF2.  at least for cascaded biquads.  if you're doing only one
biquad, that is your overall filter order is 2, then it will cost a
little more (but the cost is worth it).

the DF1 requires 2 additional states but, if you cascade 2nd order
biquads, the two output states can be shared with the 2 input states of
the next section.  so if you have N sections(an order 2N filter), the
number of states you need for DF1 is 2N+2 only 2 more than DF2.  not a
very high price to pay.

the DF2 is useless in your case (assuming that your filter will have
some decent Q making the poles very close to the unit circle).  but, if
you like learning this yourself (we call this "learning the hard way"),
feel free to implement it.  but you will find that either you
pre-scaling of the input will drive your signal into the noise floor
or,if you do not pre-scale the input, your intermediate state signal,
s[n], will saturate.  only with double precision (that will cost more
MIPS than DF1) will you avoid that.

r b-j

0
rbj (4086)
12/1/2005 4:28:55 PM
Fred Nach wrote:
> Me again ...
>
> Ok, so i've just launch a Matlab plot of the filter derived from the
> s(k) sequence :
>
> s(k) = x(k) -a1*s(k-1) -a2*s(k-2)
> hence considering x(k) as input and s(k) as output
> H(Z) = 1/(1 + a1*z^-1 + a2*z^-2)
>
> the frequency response give a curve that decrease gradualy, *BUT* start
> witha gain of about 80 dB ... hence it means (as long as i
> understand...) that for almost constant x(k) (=low freq) the gain is
> very important so s(k) will take big values ... (gain of 80dB is like
> multiplying by 10 000 !) hence it for a Fixed Point architecture it
> requires ceil(log2(10000)) = 14 guard bits !!!
>
> So yes... it's definitively not a good solution to implement a filter
> like that ... and I will do it using the direct form 1.

our posts "crossed in the mail".  i'm glad that you "get it" now.  :-)

when using the DF1, make sure that all five terms (b0*x[n] b1*x[n-1],
etc) are added together in a double precision accumulator before
quantizing that back to a single precision output.  also, consider
"noise shaping" or "fraction saving" (Google Groups the latter term or
look up the DC Blocking filter in fixed-point at dspguru.com).  with
only 16 bits, you'll probably need it.

r b-j

0
rbj (4086)
12/1/2005 4:35:02 PM
On 1 Dec 2005 08:35:02 -0800, "robert bristow-johnson"
<rbj@audioimagination.com> wrote:
>
>Fred Nach wrote:
>> Me again ...
>>
>> Ok, so i've just launch a Matlab plot of the filter derived from the
>> s(k) sequence :
>>
>> s(k) = x(k) -a1*s(k-1) -a2*s(k-2)
>> hence considering x(k) as input and s(k) as output
>> H(Z) = 1/(1 + a1*z^-1 + a2*z^-2)
>>
>> the frequency response give a curve that decrease gradualy, *BUT* start
>> witha gain of about 80 dB ... hence it means (as long as i
>> understand...) that for almost constant x(k) (=low freq) the gain is
>> very important so s(k) will take big values ... (gain of 80dB is like
>> multiplying by 10 000 !) hence it for a Fixed Point architecture it
>> requires ceil(log2(10000)) = 14 guard bits !!!
>>
>> So yes... it's definitively not a good solution to implement a filter
>> like that ... and I will do it using the direct form 1.
>
>our posts "crossed in the mail".  i'm glad that you "get it" now.  :-)
>
>when using the DF1, make sure that all five terms (b0*x[n] b1*x[n-1],
>etc) are added together in a double precision accumulator before
>quantizing that back to a single precision output.  also, consider
>"noise shaping" or "fraction saving" (Google Groups the latter term or
>look up the DC Blocking filter in fixed-point at dspguru.com).  with
>only 16 bits, you'll probably need it.
>

Isn't this a case where a lattice filter implementaion helps?
0
just5217 (63)
12/1/2005 4:46:28 PM
Just Cocky wrote:

> Isn't this a case where a lattice filter implementaion helps?

the "normalized ladder" architecture is supposed to address this
problem.  it preserves the mean power in those internal states but does
not guarantee against saturation. in the DF1, you can scale down b0,
b1, b2 to such a point that the summer (and output y[n]) does not
saturate (and then scale it up later, if you can get away with it).

r b-j

0
rbj (4086)
12/1/2005 5:07:45 PM
Just Cocky wrote:

> Isn't this a case where a lattice filter implementaion helps?

the "normalized ladder" architecture is supposed to address this
problem.  it preserves the mean power in those internal states but does
not guarantee against saturation. in the DF1, you can scale down b0,
b1, b2 to such a point that the summer (and output y[n]) does not
saturate (and then scale it up later, if you can get away with it).

r b-j

0
rbj (4086)
12/1/2005 6:02:21 PM
robert bristow-johnson wrote:
> Jerry Avins wrote:
> 
>>robert bristow-johnson wrote:
>>
>>>Jerry Avins wrote:

   ...

>>OK. Back to the books with my thinking cap on.
> 
> 
> no need.  here's a simple way to look at it:

   ...

Thanks much. Part of my problem was misreading the original equations, 
the ones with () instead of [].

Jerry
-- 
Engineering is the art of making what you want from things you can get.
�����������������������������������������������������������������������
0
jya (12870)
12/1/2005 6:29:17 PM
"Andrew Reilly" <andrew-newspost@areilly.bpc-users.org> wrote in message 
news:pan.2005.12.01.00.10.23.587775@areilly.bpc-users.org...
> On Wed, 30 Nov 2005 11:01:31 -0800, Noway2 wrote:
>> I have seen Matlab scripts that run an impulse response till it
>> stabilizes and then sum up the impulse responses and use the maximum
>> value as a scale factor, though I don't know if this is a correct
>> solution.
>
> It's pretty close.  This is the main reason why these "direct form 2"
> implmentations are not preferred.  A direct form 1 implmentation will use
> more memory but (a) memory is relatively cheap and (b) the values stored
> will be as constrained as the input and output values.

Even though memory is cheap, sometimes I find the overhead of the extra memory 
stores/fetches slows the filter down a bit (depending on the architecture). 


0
12/3/2005 6:16:47 AM
Reply:
Similar Artilces:

Derivative of a funtion evaluated at a point in 3D
Hello, I am totally new to Mathematica and trying to program a simple FEM-type problem. I am trying to take the partial derivative (symbolically) of an expression that is a function of four points in 3D. All I can think of to do is F[p1,p2,p3,p4] = stuff then D[F,p1,p2,p3,p4] . But I keep getting a zero expression as a result. (where stuff is a nasty combination of these points) Any thoughts? mroc_1000@hotmail.com (mroc) wrote in message news:<boign7$oj1$1@smc.vnet.net>... > Hello, I am totally new to Mathematica and trying to program a simple > FEM-type problem. I am tr...

NamedPipe need to point to a spooler generated File.
Hi all, Can any one help me in finding this solution. I am creating a named pipe in a service with the name same as that is generated by the windows spooler. So that whenever a print is issued in any of the applications the spooler generates the file in system folder. Not that when a file with the same name as namepipe is created that spooler file contents had to come to my pipe. but that is not what happening. your help in this regard will be of great help to me. thank you very much, regards, Mohd Moinuddin Pasha. ...

Code to compute minimal geodesic distance between points on a 3D surface
Hello, Could someone give me pointers to existing code for calculating the minimal geodesic distance between two arbitrary points on a 3D surface, given "N" points lying on the surface. Thanks, ==ajit (P.S.: Remove the shakespearean name to reply ) "ajit" <ajit_v_rROMEO@yahoo.co.uk> wrote in message news:79cfabc6.0401091316.22ce26f8@posting.google.com... > Could someone give me pointers to existing code for calculating the > minimal geodesic distance between two arbitrary points on a 3D > surface, given "N" points lying on the surface. Geodes...

lisp implementations and scaling requirements
Daniel Barlow noted a point here -> http://ww.telent.net/diary/2002/11/ that "Lisp is unsuitable for Google because implementations don't cope with their scary scaling requirements.". True enough, just to start up SBCL on my machine takes up 26M (python 4M, perl 3M, ruby 2.5M, C++ 1.2M, and C 0.9M ). Which is not good if you want thousands of processes (doing simple things) running simultaneously. So I would like to invite comments from people who know about this, is it possible to create a runtime shared library as a Lisp implementation? Also how well supported is multi-th...

[News] More Price-Fixing Stories
Samsung US executive gets 8 months for price-fixing ,----[ Quote ] | A marketing executive with the U.S. unit of Samsung Electronics Co. | Ltd. agreed to plead guilty and serve prison time for taking part in | price-fixing in the computer memory chip business, the U.S. Justice | Department said Thursday. `---- http://biz.yahoo.com/bizj/060921/1350150.html?.v=1 Reminds me of: Lawsuit Against Microsoft Set for Court ,----[ Quote ] | The case claims Microsoft violated Iowa's antitrust laws and harmed | customers by illegally overcharging for its software, by denying class | members free ...

feasibility of multipoint to point over single or a few FDMA slots
1) Is it been tried that on a same frequency slot (bandwidth) many wireless nodes (devices) communicate with single node (device) using different (orthogonal) spread spectra sequence signals? if yes what is the upper limit on number of multipoint-point? what is the hardware used can it be radio modems offered with FHSS or DSSS capacity? 2) If in a cellular like network designer wants to reduce the hands off protocol to alloting fixed chip sequences to each node (a controlled network) and uses same link all over the geography, in this case base stations or sink nodes are placed at locations wh...

Sr. SAP resource
hi, I am looking for a Sr.SAP with good knowledge in Fixed Assets / SME. if suitable kindly mail me your resume and rates. Email your resume to : carmelc@gmail.com. REQUIREMENT: Sr. SAP Resource -- Fixed Assets GURU // SME NOT looking for an AP/AR resource w/some fixed assets Rate: Best Start: ASAP (this week or early next is required) Duration: 9/30/05 w/possibility of extension Location: OH. ...

Sockets with fixed IP address
I am developing and testing a dedicated LAN composed of just two Windows computers with Ethernet adapters. The application will deal with UDP only. No TCP. For various reasons, I would like to bypass the DNS stuff and use a statically defined IP address in the "server" side of the UDP connection. (The "server" will eventually be replaced with an embedded Ethernet device with limited resources.) The trouble is, I seem unable to use the Windows Sockets API to force a fixed IP address (10.10.6.100) in the "server". Evidence is that after calling bind a...

When is M$ meta file fix(just issued) not a fix?
With the recent "fix" of course it appears. http://www.techweb.com/article/showArticle.jhtml?articleId=175802806&pgno =1 ust days after Microsoft rushed out a patch for a bug in Windows Metafile (WMF) image processing, a security company has warned customers that multiple memory corruption vulnerabilities in the same rendering engine could leave users open to attack. "An attacker may leverage these issues to carry out a denial-of-service attack or execute arbitrary code," Symantec said in a vulnerability alert issued through its DeepSight Management System. The...

Fixing the fix fixes.
Sad. Someday in the distant future, they might get it right. Maybe with OSXII - but it's doubtful. ...

Implementation ideas? Flexible string matching
Here is the puzzle. You have a string. You have a list of strings and/or regular expressions. You want to find the match, if any, between your string and an element in the list. If the list is also just strings, you can create a hash with the strings as keys then do a hash lookup to do the match. That's fast, even if the list is very long. However, what is most of the list is string literals, but you want to be able to use regexps or some sort of wildcard matching for some of the matches, too. Does anyone have any bright ideas about how to do this as quickly as possible? The...

looking for lms filtering implemented by simulink
I am experimenting with matlab the LMS algorithm , there are many m files I can find. the problem is that I want to using simulink to do it, but i don't kown how to construct the model,anybody can give me some idea. thank u ...

parallel interpreter/db problem. transaction didn't fix.
mysql_query("START TRANSACTION", $link2); $q2=mysql_query("SELECT pictures.pid AS pid FROM pictures,counter WHERE pictures.pid>counter.pid LIMIT 1", $link2); if ($row2=mysql_fetch_assoc($q2)) { mysql_query("UPDATE counter SET pid=$row2[pid]", $link2); $n=$row2['pid']; } else { //reached end of table. mysql_query("UPDATE counter SET pid=1", $link2); $n=1; } mysql_free_result($q2); mysql_query("COMMIT", $link2); the transaction makes no difference in the outcome. I've even tried locking the tables, but tha...

Point-to-point link without PPP on freebsd? Is it possible?
Is it possible to implement a point-to-point link on FreeBSD without using PPP? I'm trying to create a "tappable" link between a fbsd firewall and router that can be used to monitor multiple networks (connected to the router) using Snort. I realize that I could just as easily use a /30, but I'm just curious if it could be done with a /31 not using PPP. NAT for the internet connection is performed by the firewall Here is a rude drawing of the network (hopefully Google Groups, doesnt distort it too much). Internet -----> Firewall --------------------> Router ...

How to get clicked point coordinates?
Example: <form action="..." method="post"> <input type=image name="Image1" onclick="beforeSubmit();" src="..."/> </form> When I click on the image the form submitted to the server. As I can see post data contains next additional values: Image1.x=121 and Image1.y=64 These values are coordinates of clicked point relative to image. Can I get these values in onclick event handler (within the beforeSubmit method)? marss a �crit : > Example: > <form action="..." method="post"> > <i...

First order IIR filter
Dear All, I do not have any background in DSP, so please excuse if this question seems silly. I am working on a bugfix for an IIR filter implementation in C. It takes samples from ADC and filters them. Filtering is done by an First order IIR filter. The transfer function is as follows: /* First order IIR filter z-transform(formula): [ 2^-n/(1-(2^-n)) ] H(z) = --------------------------------- [1 - ( (1/ (1- (2^-n)))*Z^-1 )] and the final equation which is implemented into code is a sfollows: Output = ([1/(2^n -1)]*input) + ([2^n/(2^n -...

Fixing fixes
OSX 10.5.2 - a really great OS- BWAHAAAHAAAHAAAA. I personally like the "Scotch Tape Fix. Apple confirms "closed-lid" issue is a known bug Slow LAN transfers under Mac OS X 10.5.2 Mac OS X Tiger (10.4.x), PowerBook users continue suffer from missing first letter Mac OS X 10.5.2/Leopard Graphics Update 1.0: Missing display resolutions and wake-from sleep Leopard Graphics Update 1.0: Repeatable freezes, uninstalling fixes Apple TV 2.0: More fixes for problems updating Aperture 1.5.x does not benefit from Mac OS X 10.5.2 RAW improvements Boosting iPhone signal streng...

Dynamically allocating a fixed-size multidimensional array?
Actually, I'm not even sure it's possible to dynamically allocate a fixed size one dimensional array. So here's the problem: I have a type 'board' defined as so: typedef char board[8][8] and I am supposed to write a function with the following prototype: Board *new_board(); which would require me to use malloc for allocation. I've tried many different things that I'd be ashamed to post here but have found no solution. The problem is that it doesn't seem possible to cast a char* or char** to a fixed length array (e.g. char[8] or char[8][8] or board in this cas...

Fixed Weight Sorting
Hi all, I'm trying to simulate a fixed weght machine. This machine has two entry points with grapes that have two different probabilistic distributions. Then a work center pick from several queues a combination so grape1+grape2=target+-tol. Anyone is familiar with this kind of work? Best Regards, Jaime ...

Floating point subtraction with FLT_MAX error
Just a small little program. Can not figure out what am I doing wrong. #include <stdio.h> #include <limits.h> #include <float.h> int main() { double max = FLT_MAX; double sub = 16703.627681; double result = max - sub; printf("%f - %f = %f\n", max, sub, result); return 0; } Output: 340282346638528859811704183484516925440.000000 - 16703.627681 = 340282346638528859811704183484516925440.000000 Any help would be highly appreciated. Thanks On Oct 25, 7:56 pm, spooler...@gmail.com wrote: > Just a small little program. Can not figure out what am I doing wrong...

Floating point questions
I have to talk to a device that does IEEE floating point in both 32 and 64 bit forms. (but usually just 32 bits). On vax, I can use CVT$FTOF to convert to/from native VAX to IEEE. On vax, the DEC-C doc says that: float = 32 bits ( I assume VAX-F floating point) double = 64 bits long double = 64 bits and it says it is the same as double. For the 64 bit floats, I see both VAX-D and VAX-G types available. Which ones does DEC-C use for double and long-double ? And if that program is compiled on an alpha, what does "float" and "double" translate to by default ? Since pl...

a problem about function returning point
hi everyone: Today I came cross a strange problem about function returning point. I have a function for replace chinses character to english character. sub replace_par{ my $str =3D shift; $str =3D~ s/\xA3\xA8/\(/; $str =3D~ s/\xA3\xA9/\)/; return $str; } Then I calling this function in a subroutine. as follows: ..=2E. ... ### first we open a text file, and read line by line: open(F,"<aaa.txt"); while(<F>){ ..=2E. ... #according the context we have read, we named function name. my $progName =3D $conf->{'feedname'} . '_slicecheck...

[OT] Cross-platform RPC implementations
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Does anyone know a good cross-platform remote procedure call implementation that works well with wxWidgets? I'm developing a database driven client-server application, and I need to be able to have the server handle remote procedure calls from the client. The reason I'm using client/server instead of wxODBC directly is because the server needs to keep accounting of certain items. Thanks in advance! ~Michael -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enig...

Q Dislin: 3d plots with axis crossed in a point
Sorry, I know this is a little offtopic in here, but since there are a few dislin users here, I hope of this being the best chance of getting an answer. I've been using dislin for quite some time, but now for the first time, I need a 3d plot (panel vortices checking). Is it possible somehow to make a 3d plot with crossed axis. By default the coordinate system look like an L letter, with a Z axis going vertical from one of the tops of the letter. I require a coordinate system in which all three axis cross at 0 point. I tried call cross, but that didn't change anything (btw, using dis...

(InfoSnapV8)
Hi, Fixed quite a few trouble reports, and in fact my pile of trouble reports looks very empty at the moment :-) What is fixed: http://www.ustation.se/InfoSnapV8/Sordid.TXT Free download: http://www.ustation.se Have a lot of fun, /Chris Zakrewsky Team uStation AB SWEDEN ...