LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

amplitud and frecuency modulation

Hello,
I am trying to play a waveform of an acquired signal of a pressure transducer. I want to play this signal doing two different in two different ways:
-Doing an amplitude modulation (Multiplying with the acquired signal by a sine wave) or
-Doing a frecuency modulation of the amplitud between two gived frecuencies.
 
In both two methods i have a lot of noise when i play the modulated signals and i don't know what i can do for removing this noise. You could give to me some idea o tell me why i have this noise?
Thanks a lot
 
Javier
 
p.d: I attached the VI
0 Kudos
Message 1 of 9
(3,949 Views)
the noise must be in your Pressure signal.  When I substituted a clean waveform for the pressure signal, the outputs were not noisy.  See attached vi.
 
The noise can be removed from the Pressure signal by using a low pass filter.

Message Edited by tbob on 01-26-2007 09:40 AM

- tbob

Inventor of the WORM Global
Message 2 of 9
(3,932 Views)

Thank you for reply Tbob,

With the filter I improved the sound for the case of amplitude modulation but i don't solve the problems with the frequency modulation.

I attached you the VI modified and the file i want to play (The first colon of the file is the time and the other 3 colonnes are the voltage for 3 different pressure transducers). The time acquistion is 1 second and the number of samples is 12500 but i want to play the signal in a gived time.

Thank you another time.  If you do some modification or you attach me some VI could you please save it as version 8.0. I saw your VI but i asked a colegue for open it because i don't still have version 8.2.

 

Thank you very much

Javier

 

 

Download All
0 Kudos
Message 3 of 9
(3,906 Views)
I could not try your vi because you didn't attach the two subvi's in frame 0.  One thing that can cause noise in FM is when the modulating signal input level overdrives the carrier.  This is the case when using real radio equipment.  In terms of programming, I'm afraid I don't know enough to check this.  But I would imaging your formula in the FM frame might be wrong.  If Fmax-Fmin is to great, it could produce distortion I believe.  Maybe you could plot the output waveforms for f, w, and Y.  If there is no distortion, Y will vary in frequency proportional to the frequency of f.  Try using cos instead of sin in your formula.  Maybe someone who knows more about FM math can shed some light here.
- tbob

Inventor of the WORM Global
Message 4 of 9
(3,900 Views)

Thanks Bob,

here i attached the two subVI. Thanks for your answer, it gives to me some ideas.

 

Javier

0 Kudos
Message 5 of 9
(3,889 Views)
In fram 0, you have made a classic mistake and caused a race condition.  This is why people argue against using local variables.  In your vi, you have created a local variable of Nb Samples and wired the local into the divide funtion.  This is what is happening:
When you start the vi, Nb Samples is 0 (default), so the local variable is also 0.  The local variable does not wait for the Nb Samples indicator to be set.  This is how Labview works.  An output doesn't happen until all of its inputs are satisfied.  The Nb Samples vi won't execute until its inputs get there, then it will execute and only then will Nb Samples be written to.  The local variable on the other hand, has no input requirements (no wires going in), so its value (0, default value) gets sent out immediately.  This 0 value gets fed into the divide funtion vi right away.  Doesn't matter what else happens, you have a divide by 0 condition, which is always a no-no.  To fix the problem, delete the local variable.  Wire the Nb Samples indicator to the divide input.  Now the divide won't take place until the Nb Samples is defined by the Nb Samples vi outptut.  Now everything works like a charm.  Very interesting sounds with FM.
You other local variables in the following frames are OK because they are written to in previous frames.  Locals in following frames don't get populated with anything until those frames are opened.  So when those following frames are executed, the local variable data is already there.
Race condition is defined as a race between writing to a local and reading from a local.  Are you reading the last data written?  Or are you reading data before the write?  In your case, the local was reading data before the write.
- tbob

Inventor of the WORM Global
Message 6 of 9
(3,876 Views)
Thank you,
You solve another problem of my VI. I didn't know why it didn't work the first time it run. Now is OK!!!   I check the other local varibles and all works correctly
 
The problem is when i try to play the waveform of the signal after the frequency modulation, i don't know if what i have is noise or is extrange sounds because the waveform is not well build.... what's mean i don't do correctly the frequency modulation.
 
Thanks a lot Bob
0 Kudos
Message 7 of 9
(3,862 Views)
I think your formula for FM is wrong.  I replaced it using Labview functions following the math formula for an FM signal.  Look at this website:
 
You have to use the Labview integration function and you have to add a deviation control.  The modulating signal must be limited in amplitude to +/-1.  The frequency of the modulating signal tells the carrier how fast it should deviate from the center frequency, while the deviation control tells how much to deviate from the center frequency.
 
I added a case in the first frame to produce a 100Hz tone to use as a clean modulating signal.  This shows that there is no noise in the system.  Also had to change some stuff in the AM frame to keep the modulating signal positive to properly modulate the carrier.  For AM, you can vary the amount of AM modulation (0 to 100%) by changing the amplitude of the modulating signal.  Don't go lower than 0 (0%) and don't go above the carrier amplitude (100%).
 
See attached vi.
- tbob

Inventor of the WORM Global
Message 8 of 9
(3,849 Views)

Thank you very much for your help...it was really very helpfull!!!

javi

0 Kudos
Message 9 of 9
(3,817 Views)