LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

generate pink noise through 4461 card

Hello
 
I have to write a VI which could be used as a pink noise genertaor. I have 4461 card with a PXI-1033 chassis. Can some one help me with some simple examples. I was trying to do it throught DAQ assistant but it only gave the options for sine , triangular or square wave . No options for pink noise.
 
Any example VI's appreciated
 
Thanks
 
Ankit
0 Kudos
Message 1 of 12
(3,782 Views)

A search on pink came up with this thread with a vi posted near the bottom:

http://forums.ni.com/ni/board/message?board.id=170&message.id=78028&query.id=12862#M78028

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 2 of 12
(3,777 Views)
Thanks AnalogKid2DigitalMan
 
I saw that example but I am having some problems in actually writing the DAQ mx part for playing pink noise throught the 4461. Thanks for your reply and I will keep trying to figure it out.
 
Thanks
 
Ankit
0 Kudos
Message 3 of 12
(3,771 Views)
Have you taken a look at the many examples for DAQmx? Help->Find Examples.
0 Kudos
Message 4 of 12
(3,762 Views)
 
I have a VI which generates pink noise but it sounds like it is playing the same sample again and again . You can hear the clicking noise due to playing the same sample again and again. I want the noise to be continuous without any clicking.
 
Please take a look at the attached VI
 
Thanks
 
Ankit
0 Kudos
Message 5 of 12
(3,753 Views)
Hi ankit,
 
This will typically happen if you're reconfiguring your board or start and stoping your task over and over in a program. I opened your VI and saw that this is how your program is organized. Don't clear your task and then reconfigure and build it every loop iteration. Take a look at the shipping examples for analog output and you will see that all configuration is outside the main loop. Also look through the links below my name for other great resources for succesfully building your application.
PBear
NI RF
0 Kudos
Message 6 of 12
(3,728 Views)
Attached is a VI that generates pink noise using a 4461. It calls a waveform generator VI, also attached. I recommend setting the number of points to at least 1 million so that your cycle time / correlation period is long.

Hope this helps,
Ed

Download All
0 Kudos
Message 7 of 12
(3,715 Views)
Hello Ed
 
Thanks for posting the VI's for pink noise. This helped me to understand what mistake I was making earlier, I was restarting the DAQ mx again and again but that was just one of the mistakes.
 
Now I am trying to do the same thing through my sound card (for another application). I was wondering if there is a way you can play pink noise though your sound card without specifying a big time or even if I specify a big time it should do the one-third octave band analysis in real time.
 
I have attached a VI showing that. If I increase the number of samples to adjust the length of time of the signal but still the one-third octave band just gets the whole time domain signal and shows the value. I think I am missing a basic thing here and that is how to to feed blocks of data so that the octave band analyser works in real time.
 
Thanks
 
Ankit
0 Kudos
Message 8 of 12
(3,689 Views)
Here is the attached VI for the above post.
 
Ankit
0 Kudos
Message 9 of 12
(3,688 Views)
Hi, Ankit.

Well, it's important to loop a long waveform buffer for two reasons:

1) The longer the waveform, the less spectral deviation from pink it will have. A short waveform will have a "noisy" spectrum, even if you average it, because of the random nature of the waveform. As you increase the length of the waveform, the averaged spectrum will converge to a nice flat pink line. Now if you're willing to measure both the input and output waveforms at your DUT, this doesn't matter, since you can subtract out the spectral bias of the generated waveform. This is typically how I make my measurements, even with a long waveform.

2) The waveform needs to have a certain length to ensure that low frequencies are included. And the spectral bias problems mentioned above are especially bad at the lowest generated frequencies.

As for the Sound & Vibration Tookit, I have to confess that I don't have any experience with it, so perhaps someone else can chime in here.

As for generating long waveforms through the sound card, one thing that I do frequently is write LabVIEW code to create a .wav file of the waveform I need. Then I play it though the sound card with WinAmp or something so I don't tie up LabVIEW with the generation.

Hope this helps,
Ed

0 Kudos
Message 10 of 12
(3,680 Views)