[<<][meta][>>][..]
Sat Feb 27 15:25:07 CET 2010

RatFunc and Applicative

This separates the recursion pattern from the update equation, but
doesn't really add much readability:

> causal p = s where
>     s hs (x:xs) =
>         let (hs',y) = p hs x
>             ys      = s hs' xs
>         in y : ys

> arx' p = causal p' 
>     where p' hs x = (hs',y)
>               where hs' = y:hs
>                     y   = p hs + x

> ma' p = causal p' 
>     where p' hs x = (hs',y)
>               where hs' = x:hs
>                     y   = p hs'

These can be further normalized if the ma doesn't operate on the input
sample directly, i.e. if 'now' is separate from 'past', and even more
so if the coefficient of the direct input is 1.  Does this signify
anything?  Only that an armax filter is quite regular: the input and
output delay lines look similar.  Is this useful?  Probably not really.

Where am I going?  This is all interesting but I'm loosing
integration..

Using rational functions gives a way to deal with signals in the
frequency domain.  But what I'm trying to accomplish is a time-domain
representation with nonlinear operators (i.e. multiplication).

The RatFunc.hs provides:

    - Interface between RatFunc and stream processors.  This is useful
      for simulation in Haskell.

Now, can this be used together with abstract interpretation to recover
implementatation structure?  The key is probably in the ``history''
implementation.  Frankly it seems a bit trivial: ratfunc _already_
gives a direct map to implementation as tapped delay lines, which can
either be implemented as shift registers or as a sliding memory
window.

So, in the bigger picture, the question seems to be: how to implement
delays.  The answer to this is probably to keep them in a single big
ring buffer.




[Reply][About]
[<<][meta][>>][..]