LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Strange shift in FM modulation

Solved!
Go to solution

Hello NI Developers!

 

I've read materials/manulas on how to perform FM modulation on NI site and created my own VI.

 

When I modulate signal I see there is a strange phase shift between Message signal (red color) and FM signal (blue color).

 

As I understand from theory Frequency modulated signal must have maximum frequency directly at a point where Message signal has maximum amplitude.

 

I've investigated my VI but can't find where I have error, maybe someone from experienced users can see it?

VI is attached below. (LabView 7.1)

 

 

Thanks in advance.

 

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

Hello ACiDuser,

 

It looks like you switched the sine and cosine functions in your formula node for y[i].  Try changing these functions.

Regards,

Jon S.
National Instruments
LabVIEW NXG Product Owner
0 Kudos
Message 2 of 6
(3,185 Views)

 

Hello!

    That isn't the case. First message signal should be integrated. And there is no difference between SIN and COS - it's the same signal, but they only have reciprocal phase shift by 90 degrees. I followed this FM Modulation in LabView video manual http://cnx.org/content/m15493/latest/ 

I don't know why author didn't mention anything about integration of message signal.

And my formula now looks different. I'm not sure if it is absolutely correct, but Grathics look true. 

Hope someone could point where I still have mistakes. I'm not sure about this       .... +  2 * Pi * D * S[ i ]
Highlighted with red.

 

 Corrected version of VI is attached below.

 

 

Regards,

ACiDUser 

Message Edited by ACiDuser on 02-11-2009 06:53 PM
Message Edited by ACiDuser on 02-11-2009 06:55 PM
0 Kudos
Message 3 of 6
(3,177 Views)
Solution
Accepted by topic author ACiDuser
I modified your first VI.  Is this the functionality that you were looking for?
Regards,

Jon S.
National Instruments
LabVIEW NXG Product Owner
Message 4 of 6
(3,145 Views)
Thank you! That's the same as in my code, but much better and clear. Sometimes for me it is hard to find easy and elegant solution and I make complex code instead. 🙂
0 Kudos
Message 5 of 6
(3,134 Views)

You did all of the work.  I just switched the sin and cos function around.

 

I also added a wait function inside your loop.  When you have a loop without a wait function, LabVIEW will use as much processor power as it can to run the loop.  This makes your processor max out.  Do a simple test.  Open the Windows task manager and view the performance tab.  Run your program with and without a wait function inside the loop.  You should see the CPU usage go to 100 % in the case without a wait function (assuming you have a single core computer).  When you put a wait function in the loop your CPU usage should stay fairly low.

Regards,

Jon S.
National Instruments
LabVIEW NXG Product Owner
0 Kudos
Message 6 of 6
(3,119 Views)