LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Issues with signal input adaptive filtering, it won't filter the added noise from the input waveform

Hello,


I have an issue with my adaptive noise cancellation program. Essentially I want to input a custom wav add noise to it and then filter the noise away in order to gain the custom wav again.

While doing so I want to read the learning curve and read the adaptive coefficients. Unfortunately I have an issue when it comes to the filtering of the custom wav+noise. It won't filter the signal at all.

It would be helpful if someone could have a look at it and possibly help me out.

Thanks!

0 Kudos
Message 1 of 4
(2,322 Views)

Hello,

 

i just had a look at your VI, but i can't run it. Are you using any special Toolkits (Sound&Vibration?), or are you using selfcreated SubVIs in the VI?

 

Anyhow i figured out, that after your Adding-function where you add the Waveform captured from the wav-file and the Noise created in every loop, you receive a 1D-Array of Waveforms. Is that really what you need for the Filter?

If you want to add a Noise to a Waveform normally, you should connect the noise-array directly to the Add-function, just as you did, and use "Get Waveform Components" to extract the Y-Array from the Waveform. Then add both Arrays to a new one, and if you need a normal Waveform as an output. Use "Build Waveform" to build a new WF using the added Array, and the dt, t0 and "Attributes" of the WF from the wav-file.

 

I hope this helped.

 

Regards,

Jan Göbel

Applications Engineer

0 Kudos
Message 2 of 4
(2,275 Views)

Hey Jan,

 

Thanks for the reply. I am currently using the Adaptive Filter Toolkit in order to obtain those VIs. The VIs which are in use are the LMS Adaptive Filter ones. 

I figured there might be an error with the input of the array. This VI requires a DBL Array but it seems like it can not process it. 

The "Get Wavefirn Components" works better now but I still have an issue with a time. I put a 9s wav file in but it only computes it in a very short time and I can not play the file while it is computing.

I added the modified program to the attachments. 


This program is ought to read a waveform file add noise to it and then use an adaptive filter in order to get the orginal waveform back again and if possible either store or play the final waveform. 

 

Thanks for your help.

 

0 Kudos
Message 3 of 4
(2,265 Views)

Hello,

 

I haven't really checked the filter-part of your VI, but i already see another Problem:

You are reading "all" samples from the wav-file, so the Waveform you create got as many values, as the wav-file. And your are adding it to a Waveform containing 1000 Samples of Noise. If you want to add Waveforms, both of them should have the same length. You can solve that by replacing the "1000"-constant with a "get Waveform Components" (Y), and a "get Size of Array". That way you will always create as many Noise-samples, as are contained in the wav-file.

 

Maybe this will solve your Problem, if not please respond.

 

Regards,

Jan Göbel

Applications Engineer

 

0 Kudos
Message 4 of 4
(2,237 Views)