LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Experimenting active noise cancellation

Hi Travis,

It is been long since i last message u. Smiley Happy Hope you are doing good.

I have progressed in active noise cancellation but experience some problem. Can you help me?
 
I am currently trying to do an Active Noise Cancellation system using labview 8.0.
I am using NI-PCI-4472 as my analog input card to acquire signal with a microphone. I also use NI-9263 as my analog output module to generate output signal through a loudspeaker. The output signal is computed using the acquired input signal. I experience low frequency output signal with an an additional high frequency output signal when i am expected to produced only a low frequency output signal. Is it due to the reason that i did not synchronize the AI and AO? If it is so, can you teach me how to synchronize them? I had look through the examples on synchronization but i cant synchronize them as mine AO and AI are of different devices. I have attached my program. Can you please help me? Thank you.
 
 
Best regards,
Paul
Download All
0 Kudos
Message 11 of 25
(6,535 Views)
Hi Paul,

Travis is not in the office, but I have looked at your program.

You won't be able to use the synchronization lines, because you are using a USB device and a PCI device, so there is no way to get a RTSI cable connection between the two.  I think I understand what you are doing to the signal to create the output signal you are using.  I don't really think having the two operations being unsynchronized would be an issue with performing the analog output.  When you say you are getting a high frequency output, can you say  how you are verifying it, because it could just be a matter of noise in the generation.  I will look at the 9263 some more and see I can see a reason it would behave that way.  Please let me know if you have further issues with this application, and how the output is manifesting the frequencies.

Have a great day,

Michael D
Applications Engineering

Message Edited by MickeyD on 02-13-2007 03:50 PM

0 Kudos
Message 12 of 25
(6,524 Views)

Hi Michael,

I verified the high frequency sound by listening to it. It is somehow similar to the case when i run the program attached below. When i set the cycles per buffer to 1, i can clearly hear the 200Hz sine wave only. However, when i set cycles per buffer to 2, i can hear the 200Hz sine wave with an additional high frequency sound. May i know the reason why is this so? Hope this can help solve the previous problem that i sent early.

Have a nice day,
Paul

0 Kudos
Message 13 of 25
(6,514 Views)

Hi Michael,

I verified it by simply listening to it. It is somehow similar to the case when i run the attached program below. When i set the cycles per buffer to 1, i can clearly hear the 200Hz sine wave. However, when i set cycles per buffer to 2, i can hear the 200Hz sine wave with an additional high frequency noise. May i know the reason why? Hope this can help solve the previous problem that i sent early.

Have a nice day,
Paul

0 Kudos
Message 14 of 25
(6,517 Views)
Hi,

If you set the cycles to buffer to two and then you see the noise it seems to be that there is some noise in the generation of the signal, which is not all that surprising in a digital to analog conversion, that you would see some high frequency noise.  I think this would occur in both of the situations we have discussed.  The easiest way to get rid of that would be to use a low pass filter, the gap between the frequency you wish to hear and this high frequency noise should be more than large enough for you to create a filter in. 

Out of curiousity where did you get that example from?  If you got it from the LabVIEW shipping examples, which version of LabVIEW did it come with, because I have an example of the same name, with a different user interface.  Let me know if I can be of further help.

Have a great day,

Michael D
Applications Engineering
National Instruments
0 Kudos
Message 15 of 25
(6,501 Views)
Hi Michael,
I got the program from labview 7.0 example. I try inserting a low pass filter as shown in the attached file but i still cant filter out the high frequency sound. Can you help me with that? Thank you.
 
Regards,
Paul
0 Kudos
Message 16 of 25
(6,480 Views)

Hi, QZ

I'm a signal processing software engineer of NI. I'm also working on active noise control with adaptive filters recently just as you do. And I have also experienced with all the same problems when I build a real demo using NI hardware. The followings are my experiences to build ANC system:
1. Use LabVIEW RT, do not use desktop LabVIEW. Unlike typical control application with sampling rate only as high as several hundred Hz, ANC works at much higher sampling rate (at least 5KHz) to acquire the sound data. As a result, time deterministic is very important.

2. Hardware timed single point timing is very CPU consuming, you need to use real time controller at high throughput like PXI-8196 or the latest PXI-8106 with Intel core2 dual processor.
3
. Do not use DSA card like 4461/4472 to acquire sound data. For ANC, the delay between input and output will be as small as possible in order to make the control speaker keep up with the primary noise. Hardware single point timing is the best timing mode for you. But DSA card do not support hardware single point timing for you in DAQmx currently. In addition, there exist several samples input delay because of the input digital/analog anti-aliasing filter of DSA board. The followings are from 4461 user manual addressing this issue:
The input filter delay, or time required for digital data to propagate through the ADC digital filter, is 63 sample clock samples. For example, a signal experiences a delay equal to 6.3 ms at 10 kS/s. This delay is an important factor for stimulus-response measurements, control applications, or any application where loop time is critical.
4. Because you can not use 4461/4472 for AI/AO, multi function DAQ will be your nature choice. I use PXI-6281 to build my ANC system. 6281 is a high accuracy M series multifunction DAQ with 16 channels AI to acquire acoustic signal and 2 channels AO to drive the control speakers. In addition, it has onboard analog anti-aliasing filter which is also very important to acquire the weak microphone signal corrupted by high frequency noise. To use 6281 for ANC purpose, you should pay attentions to the following issues:

  • Unlike DSA card, multifunction DAQ do not have onboard IEPE stimulus, it can not acquire acoustic signal from microphone directly in another word. You need to use NI SCC-ACC01 to provide IEPE current source in order to acquire microphone signal. You can also choose third-party microphone amplifiers.

  • Unlike DSA card, the DAC of multifunction DAQ is zero-order hold, not sigma-delta. This is why you encounters high frequency components using 9263 for analog output purpose. If you probe the output of 9263 to a oscillograph, it will be clear. Digital filter is invalid here because after DAC, the signal is in analog domain now! The only choice is to use analog low pass-filter to decrease the high frequency component. I built an active low-pass filter with operational amplifiers. You can also use simple one order passive RC low-pass filter, and it will be better than none.

5. You can also consider to use Compact RIO platform. The followings are the advantages of Compact RIO for ANC applications:

  • Use cRIO-9233 to acquire microphone signal. Unlike multifunction DAQ, cRIO-9233 is specially designed to acquire dynamic signal, you do not need external signal conditioner.

  • The ANC algorithms are running on FPGA, the time sequence will be determined by hardware, it will be much more stable for control application like ANC.

  • The CRIO system is low-cost and compact, it can work at critical situations (high temperature for example).


Hopefully the oboves can help you. BTW, I'm also interested in your application. I can provide my LV source code for you if you need it. You can also contact me directly by email: xiaosong.liu@ni.com

Good luck!

帖子被pine在03-13-2007 06:22 PM时编辑过了

帖子被pine在03-13-2007 06:24 PM时编辑过了

Message 17 of 25
(6,426 Views)
Hello, i'm new to LabVIEW. I'm trying to develop Active noise canceller using LMS and RLS algorithm. I'm not using any hardware...just simply simulation. Can anybody help me with this task...or maybe a hint. Btw, i'm using LabVIEW 8.20. Thank You.

Message Edited by hex on 03-25-2007 09:31 PM

0 Kudos
Message 18 of 25
(6,289 Views)
Hi,

There is a Recursive Least Squares LabVIEW Library located at the following link.

Recursive Least Squares

The library was written for LabVIEW 7, but I opened it in LabVIEW 8.2 and it was performing the way I expected.  The better option would be to use the RLS VIs and LMS filter VI located in the Digital Signal Processing Toolkit.  If you have LabVIEW Professional Development System, then you already have this, but it can also be purchased as a stand alone product. 

If neither of these options is working or available to you, let me know and we will continue looking into it.  The following discussion forumn has some good information about LMS filter algorithms.

http://forums.ni.com/ni/board/message?board.id=170&message.id=98504&requireLogin=False

Have a great day,

Michael D
Applications Engineering
National Instruments
0 Kudos
Message 19 of 25
(6,252 Views)
Hmm..intresting...Thank You MickeyD. I still don't figure out how to use it though...it will take a while. Btw, what is "Digital Signal Processing Toolkit"? Is it separate from my LabVIEW? Is it downloadable? Thank You.
0 Kudos
Message 20 of 25
(6,240 Views)