LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

generate an 1 d array of random numbers that relate to an output wave that falls within a certain frequency range?

HI everybody, 

 

I have been creating random numbers that I'm using within a system, the system is working fine, but now I have realised that the random numbers must be outputted to speakers in such a way as to filter out all but a low frequency range.

I was thinking about generating a dither signal with a bandpass filter, but could not get it to give me out a full array of 5001 values which I could then manipulate.

The sampling frequency of the output is 2000Hz and the 5001 data points must fall within the 10- 200Hz range.

 

I have try this :

651651651.png

 

But i loose the main part of my Amp... ( 0.8 -> 0.2 ) . With my filter i want  to keep the amplitude of my signal

 

 

Thanks for the help,

0 Kudos
Message 1 of 6
(3,405 Views)

Random numbers have a lot of high frequency, so you are going to loose a lot of amplitude.  You could just multiply some value to your output waveform to get the amplitude you want.  I'm thinking you will want to multiply by the amplitude you want divided by the max value of your waveform.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 6
(3,383 Views)

Have you any other solutions? my system is an enslavement I Throws An noise amplitude and different frequencies depending on what is desired

0 Kudos
Message 3 of 6
(3,371 Views)

Hi, Geoff.  I was beginning to think that this is what you really wanted ...  A very easy way to generate a random-appearing signal at 2000Hz having frequencies within the 10-200Hz range is to generate a sum of sinusoids.  If you want to make it "unpredictable", you could do the following:

  1. Choose 10 frequencies at random between 10 and 200 (Hz).
  2. For each frequency, choose an amplitude in some range, with some rule (you probably want a fairly narrow range of amplitudes, but may want to have the amplitudes flat with frequency, increaase, or decrease -- see what looks best for your situation).
  3. Choose a random phase.
  4. Now start generating the 10 sinusoids as a function of t (in steps of 0.0005 sec) and sum them.

Bob Schor

0 Kudos
Message 4 of 6
(3,364 Views)

for example, i define this profile :

11111111111111111111111111111111111111111.png

When i generate it look like this : 

2222222222222222222222222222222222222.png

As you can see i generate a signal between 0 and 1000 Hz, but when frequency aren't in the range 10-200 ( my profile ) amp must be 0g

 

0 Kudos
Message 5 of 6
(3,359 Views)

Thank you BOB. 

I think really you have My solution ! If you have open my project you know that "RDM" block provide random amp but where can i introduce sine generation with frequency range ? 

165161.png

0 Kudos
Message 6 of 6
(3,352 Views)