s-news
[Top] [All Lists]

Summary; Splus code for recursive filters

To: S news submissions <s-news@wubios.wustl.edu>
Subject: Summary; Splus code for recursive filters
From: "Charles E. (Ted) Wright" <cew@aris.ss.uci.edu>
Date: Wed, 5 Sep 2001 11:33:37 -0700 (PDT)
I received two responses to my query about how implement IIR filters that
had both recursive and non-recursive coefficients using filter() or
otherwise.  Derek Eder's response pointed me back to filter(), but, as it
turns out, the devil is in the details when trying to do this correctly and
I had already beaten my head against this and failed.  Henrik Nielsen,
however, sent me a suite of functions that build rational tranfer obejcts
from known coefficients, describe their characteristics, and implement
filters based on them (using two calls to filter() in the correct way).
This package is precisely what I was looking for.  Henrik's response and my
original query are attached below.

Thanks,

Ted Wright

---------- Forwarded message ----------
Date: Tue, 4 Sep 2001 08:13:05 +0200 (METDST)
From: Henrik Aalborg Nielsen <immhan@student.dtu.dk>
To: "Charles E. (Ted) Wright" <cew@aris.ss.uci.edu>
Subject: Re: [S] Query; Splus code for recursive filters

Hi Ted,

This might be somewhat overkill, but I've made a small set of
functions which implements rational transfer function objects and
filters in S-PLUS (with the purpose of demonstrating classes and
methods to students of engineering).  For filtering these use two
calls to filter(); first a recursive filter and then a convolution
filter.  The filter is build by rtf() and the filtering is done by
rtf.filter().

Regards,
Henrik

--------------------------------------------------------------------------
   Henrik Aalborg Nielsen
   Informatics and Mathematical Modelling
   Section for Statistics, Time Series Group
   Technical University of Denmark
   Richard Petersens Plads, Build.321,
   DK-2800 Kgs. Lyngby, Denmark.
   Phone:  +45 4525 3418
   Fax.:   +45 4588 2673
   E-mail: han@imm.dtu.dk
   URL:    http://www.imm.dtu.dk/~han
--------------------------------------------------------------------------

On Mon, 3 Sep 2001, Charles E. (Ted) Wright wrote:

> Can someone point me to Splus code to implement IIR (Recursive) filters.
> As far as I can tell the filter() function in Splus allows only either
> FIR-type filters, in which each output is a weighted average of the inputs,
> and recursive filters, in which each output is a weighted average of just
> the previous outputs.  I need to implement filters (e.g., Butterworth
> filters) where the output depends on BOTH the previous input and the
> previous output values.  I thought it might be possible to do this with
> multiple calls to filter(), but, if so, I don't see it.
>
> C functions to implement these filters are not hard to write, but why
> re-invent the wheel if it is already sitting there?
>
> Thanks,
>
> Ted Wright
>
> ---------------------------------------------------------------------
> This message was distributed by s-news@lists.biostat.wustl.edu.  To
> unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu with
> the BODY of the message:  unsubscribe s-news
>

Attachment: RatTransFun.fun
Description: Text document

<Prev in Thread] Current Thread [Next in Thread>
  • Summary; Splus code for recursive filters, Charles E. (Ted) Wright <=