DSPRelated.com
Forums

Exponenital Filter design

Started by gordon_ao January 24, 2005


Hello Folks

At the moment I am trying to design a one pole simple IIR digital
filter to simulate thermal heating and cooling delay effect with
simple equations like 1 - e^(-t/T), where T is a known time
constant. I think an one pole IIR filter will do it: Y[n] = alpha/[1-
(1-alpha)Z^(-1)] can simulate the delay effect when alpha < 1. But I
am quite pullzing how the alpha will be determined. i'd appreciate
if you shed some light on this.

Best regards,

Gordon Ao



Gordon-

> At the moment I am trying to design a one pole simple IIR digital
> filter to simulate thermal heating and cooling delay effect with
> simple equations like 1 - e^(-t/T), where T is a known time
> constant. I think an one pole IIR filter will do it: Y[n] = alpha/[1-
> (1-alpha)Z^(-1)] can simulate the delay effect when alpha < 1. But I
> am quite pullzing how the alpha will be determined. i'd appreciate
> if you shed some light on this.

The time domain implementation (difference equation) for your LPF is:

y[n] = (alpha)x[n] + (1-alpha)y[n-1]

If you choose alpha small then you can see the filter is "slow" -- it responds slowly
to new input. If you give it an impulse response, then the rate of decay is
1/(1-alpha). From that you can pick alpha to be the time constant you need -- how
many samples it should take for the decay to reach your desired minimum value.

-Jeff




Gordon,
For the low-pass filter below, the alpha can be shown to be equal to
alpha = 1/(1+(Sampling_Interval/Time_Constant)). Since you know the time
constant and sampling interval, you can find out this quantity. It is
approximately inverse of Number Samples in the time-constant when the
time-constant is >> 1.
Regards
arun
-----Original Message-----
From: Jeff Brower [mailto:]
Sent: Monday, January 24, 2005 9:48 PM
To: Gordon Ao
Cc:
Subject: Re: [matlab] Exponenital Filter design Gordon-

> At the moment I am trying to design a one pole simple IIR digital
> filter to simulate thermal heating and cooling delay effect with
> simple equations like 1 - e^(-t/T), where T is a known time
> constant. I think an one pole IIR filter will do it: Y[n] = alpha/[1-
> (1-alpha)Z^(-1)] can simulate the delay effect when alpha < 1. But I
> am quite pullzing how the alpha will be determined. i'd appreciate
> if you shed some light on this.

The time domain implementation (difference equation) for your LPF is:

y[n] = (alpha)x[n] + (1-alpha)y[n-1]

If you choose alpha small then you can see the filter is "slow" -- it
responds slowly
to new input. If you give it an impulse response, then the rate of
decay is
1/(1-alpha). From that you can pick alpha to be the time constant you
need -- how
many samples it should take for the decay to reach your desired minimum
value.

-Jeff



A correction:
alpha = 1/(1+(Time_Constant/Sampling_Interval)).
Sorry for the inconvenience.
Regards
arun -----Original Message-----
From: arun d naik (WT01 - EMBEDDED & PRODUCT ENGINEERING SOLUTIONS)
Sent: Tuesday, January 25, 2005 5:08 PM
To: 'Jeff Brower'; Gordon Ao
Cc:
Subject: RE: [matlab] Exponenital Filter design

Gordon,
For the low-pass filter below, the alpha can be shown to be equal to
alpha = 1/(1+(Sampling_Interval/Time_Constant)). Since you know the time
constant and sampling interval, you can find out this quantity. It is
approximately inverse of Number Samples in the time-constant when the
time-constant is >> 1.
Regards
arun
-----Original Message-----
From: Jeff Brower [mailto:]
Sent: Monday, January 24, 2005 9:48 PM
To: Gordon Ao
Cc:
Subject: Re: [matlab] Exponenital Filter design Gordon-

> At the moment I am trying to design a one pole simple IIR digital
> filter to simulate thermal heating and cooling delay effect with
> simple equations like 1 - e^(-t/T), where T is a known time
> constant. I think an one pole IIR filter will do it: Y[n] = alpha/[1-
> (1-alpha)Z^(-1)] can simulate the delay effect when alpha < 1. But I
> am quite pullzing how the alpha will be determined. i'd appreciate
> if you shed some light on this.

The time domain implementation (difference equation) for your LPF is:

y[n] = (alpha)x[n] + (1-alpha)y[n-1]

If you choose alpha small then you can see the filter is "slow" -- it
responds slowly
to new input. If you give it an impulse response, then the rate of
decay is
1/(1-alpha). From that you can pick alpha to be the time constant you
need -- how
many samples it should take for the decay to reach your desired minimum
value.

-Jeff


Gordon-

Here is an e-mail I got from Jon Lark at L-3 Com (AS Div) that might be helpful:

> If you choose Alpha = Ts/Tau
> Where
> Ts is the sampling interval
> Tau is the desired Time constant Then the step response will
> closely match the step response of the corresponding analog filter
> with the transfer function
> G(s) = 1/(Tau*s + 1)

This appears similar to what Arun Naik suggested.

-Jeff -------- Original Message --------
Subject: Re: [matlab] Exponenital Filter design
Date: Mon, 24 Jan 2005 10:17:48 -0600
From: Jeff Brower <>
Organization: Signalogic, Inc
To: Gordon Ao <>
CC:

Gordon-

> At the moment I am trying to design a one pole simple IIR digital
> filter to simulate thermal heating and cooling delay effect with
> simple equations like 1 - e^(-t/T), where T is a known time
> constant. I think an one pole IIR filter will do it: Y[n] = alpha/[1-
> (1-alpha)Z^(-1)] can simulate the delay effect when alpha < 1. But I
> am quite pullzing how the alpha will be determined. i'd appreciate
> if you shed some light on this.

The time domain implementation (difference equation) for your LPF is:

y[n] = (alpha)x[n] + (1-alpha)y[n-1]

If you choose alpha small then you can see the filter is "slow" -- it responds slowly
to new input. If you give it an impulse response, then the rate of decay is
1/(1-alpha). From that you can pick alpha to be the time constant you need -- how
many samples it should take for the decay to reach your desired minimum value.

-Jeff




Arun and Jeff,

Many thanks for the great insight and reply. I will
try to experiment it shortly and let you know what I
get. Sorry I did not see your message sooner.

cheers,

Gordon --- wrote:
>
> Gordon,
> For the low-pass filter below, the alpha can be
> shown to be equal to
> alpha = 1/(1+(Sampling_Interval/Time_Constant)).
> Since you know the time
> constant and sampling interval, you can find out
> this quantity. It is
> approximately inverse of Number Samples in the
> time-constant when the
> time-constant is >> 1.
> Regards
> arun >
> -----Original Message-----
> From: Jeff Brower [mailto:]
> Sent: Monday, January 24, 2005 9:48 PM
> To: Gordon Ao
> Cc:
> Subject: Re: [matlab] Exponenital Filter design > Gordon-
>
> > At the moment I am trying to design a one pole
> simple IIR digital
> > filter to simulate thermal heating and cooling
> delay effect with
> > simple equations like 1 - e^(-t/T), where T is a
> known time
> > constant. I think an one pole IIR filter will do
> it: Y[n] = alpha/[1-
> > (1-alpha)Z^(-1)] can simulate the delay effect
> when alpha < 1. But I
> > am quite pullzing how the alpha will be
> determined. i'd appreciate
> > if you shed some light on this.
>
> The time domain implementation (difference equation)
> for your LPF is:
>
> y[n] = (alpha)x[n] + (1-alpha)y[n-1]
>
> If you choose alpha small then you can see the
> filter is "slow" -- it
> responds slowly
> to new input. If you give it an impulse response,
> then the rate of
> decay is
> 1/(1-alpha). From that you can pick alpha to be the
> time constant you
> need -- how
> many samples it should take for the decay to reach
> your desired minimum
> value.
>
> -Jeff > ------------------------ Yahoo! Groups Sponsor > Confidentiality Notice
> The information contained in this electronic
> message and any attachments to this message are
> intended for the exclusive use of the addressee(s)
> and may contain confidential or privileged
> information.
> If you are not the intended recipient, please notify
> the sender at Wipro or
> immediately
> and destroy all copies of this message and any
> attachments.
>

=====
___________________________________________________________
ALL-NEW Yahoo! Messenger - all new features - even more fun! http://uk.messenger.yahoo.com