Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

difference equation: filter design

Status
Not open for further replies.

dom045

Newbie level 2
Joined
Jul 16, 2009
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
syracuse
Activity points
1,297
Hi all:

I have a very basic question about difference equations. I seem to be going in circles trying to find the answer online.

1. if someone asks you to obtain the difference equation of a low pass filter with cut of freq say 60Hz, how would one go about doing it? Once you get the difference equation you can write the software, but I just can't remember how to get the difference equation.

2. The coefficients for the difference equations are scaling factors right?
I mean, if y(n) = a1x(n) + a2x(n-1), the coeff's are scaling factors for signals x(n) and x(n-1), correct?

Someone please help me!
 

To pass from differential equation (continuous domain) to difference equation (discrete domain) you can approximate the derivative of a function with its difference quotient. That is:

dy/dt ≈ {y[i*T] - y[(i-1)*T]}/T i*T and (i+1)*T are the time instants the function is evaluated

if we consider, for instance, a simple RC lowpass filter having input "x" and output "y", using Laplace we have: transfer function = y/x = 1/(S*R*C+1)
this means a differential equation R*C*dy/dt + y = x
using, now, the difference quotient:

R*C*{y[i*T] - y[(i-1)*T]}/T + y(i*T) = x(i*T)

we can omit "T" as argument of the funcion, then:

R*C*[y(i) - y(i-1)]/T + y(i) = x(i)

rearranging:

(R*C/T+1)*y(i) - R*C/T*y(i-1) = x(i)

thus:

y(i) = 1/(R*C/T+1)*x(i) + (R*C/T)/(R*C/T+1)*y(i-1)

T is the so called timestep, the smaller the more accurate (and slower) the simulation.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top