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.

How to use filter for audio signal?

Status
Not open for further replies.

panda1234

Full Member level 2
Joined
Jan 22, 2015
Messages
125
Helped
4
Reputation
8
Reaction score
4
Trophy points
18
Activity points
1,172
Hi,
I want an audio signal that's equation is:
y[n]=x[n]+kx[n-3200]+k^2x[n-6400]+k^3x[n-9600]
now i want to filter this and obtain y_new=x
i know it's function is:H=(1+kR+k^2R^2+k^3R^3)
so invert function is:H'=1/(1+kR+k^2R^2+k^3R^3)
Q1:should i put 3200 instead R?
Q2:how to use this filter in matlab?
is this correct?(y_new=filter(1,[1 k*3200 (3200)^2*k^2 (3200)^3*k^3],y))
 

This doesn't make a lot of sense to me. You've got an audio signal that is comprised of samples spaced 3200 samples apart? What's happening to those other 3199 samples?

To further add to the confusion, what is "x" in "y_new=x"? The present value of x? (x(n))?
 

this equation make echo for your audio echo.you can make sure with examine it in MATLAB.
I hope below diagram make sense for you:
Untitled.png
 

In my entire audio career I never used only a bunch of numbers as an audio filter. Instead I used resistors, capacitors and opamps.
I also used a digital echo canceller product.
 

Yes, echo.
The output adds to the input 3 delayed versions of it. Each one of them is delayed 3200 samples and multiplied k times from the previous one.

i know it's function is:H=(1+kR+k^2R^2+k^3R^3)
so invert function is:H'=1/(1+kR+k^2R^2+k^3R^3)

No. You should become familiar with transfer functions. The correct transfer function in z domain is (with R=3200):

H(z) = 1 + k*z^-R + k^2*z^-(2*R) + k^3* z^-(3*R)

Q2:how to use this filter in matlab?
is this correct?(y_new=filter(1,[1 k*3200 (3200)^2*k^2 (3200)^3*k^3],y))

No. A correct form is:

R = 3200;
echoVector = [1, zeros(1,R-1), k, zeros(1,R-1), k^2, zeros(1,R-1), k^3];
y_new = filter( 1, echoVector, y );

Regards

Z
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top