wrote in message news:7nij9n$g4$1@nnrp1.deja.com...
> Hello,
>
> I'm not sure that my previous message made it, so here goes again...
>
> I am trying to implement special analog filters in Labview that are
> specified by s-domain transfer functions. The only way I can think of
> to do it is to do a bilinear transformation from the s to z-domain and
> use an IIR filter. But this raises a number of other questions such as
> pre-warping frequency (is it needed, which freq. to choose)and what
> error, if any, is involved in this process.
>
> Has anyone been successful with accomplishing this through any method?
>
> Thanks in advance,
>
> David DeLoach
Hi
Do you want an off-line filter or an on-line filter? Off-line filtering
functions are available in an "advanced installation" of LV (if I remember
right) and in Signal Processing Toolset. Off-line filters handle *given*
time-series. If you want an on-line filter, which calculates a new filter
output as soon as a new filter input is ready (the input may be a newly
sampled signal some discretization method (as bilinear transformation) and
implementation using a while-loop is a solution, as you suggest. (However,
the Signal Processing Toolset also contains such on-line functions, if I am
reading the NI Catalogue correctly.) An on-line algorithm can of course be
used off-line, too (the new input sample is then the new value fetched from
the existing time-series).
Assuming you want to implement the filter yourself (with while-loop and some
discr. method): If there are no significant signal frequencies above
approximately 0.2 * Nyquist frequency (in other words: if the sampling
frequency is sufficiently high), you should not have to bother about
prewarping (i.e. you do not have to adjust the filtering coefficients for
prewarping), and you may even develop the filter algorithm using the simple
Euler forward method for discretization (I have done this in several
projects, and it works fine). Theory for designing/analysing prewarping can
be found in for example Franklin and Powell: Digital Control of Dynamic
Systems, and in most Signal Processing textbooks. Prewarping is particularly
important for filters with "critical" specifications, for example
notch-filters where one well defined frequency component is to be removed.
With respect to the while-loop implementation, if you want to keep the block
diagram well-structured and with good overview, you may write a SubVI for
the filter (with connectors for input and output and filter parameters), and
use this SubVI in the (main) while-loop. Within the SubVI, the previous
filter variables (needed in the filter algorithm) are stored using local
variables rather than using a shift register (as I found it easier to
implement re-setting the filter variables (to initial values) when using
local variables than when using shift register).
Regards,
Finn Haugen
Telemark College, Norway