I am doing my project in noise cancellation and i am implementing it using matlab.I have recorded my noisy speech and simultaneously recorded the noise using different recording device.I am making a FIR filter which will remove or reduce the noise.
The theory says that if
x=d+v
d=desired signal
v=noise
Now in order to calculate the coefficients for the filter which will produce a noise v' and when when added to x will remove the noise and leave the desired signal.
To calculate the coeffiecients of the filter
b=Rdx/Rxx
Where Rdx is the cross correlation estimate between d and x and Rxx is auto correlation between x
Problem: (1) How do i cross correlate d and x i know it is xcorr function but how do i obtain only d signal?
(2) How should i use the filter function to implement my coefficients on the noisey signal to get v'?
calculate the coefficients for the filter which will produce a noise v'(n) and when added to x(n) will remove the noise and leave the desired signal
That's basically a misunderstanding of the optimum filter concept. In the usual case, when you have uncorrelated noise and an "orthogonal" signal, a filter only can reduce spectral components of noise outside the signal band. Wiener filter theory is a rule to calculate this filter, no matter how big or small it's effect may be. With a speech signal, it probably isn't very effective. Substracting a noise component, as you imagine, would only be possible with a correlated (e. g. periodical noise) or noise correlated to the signal, e. g. nonlinear distortions.