Example Code

RF Simulation Demo: Frequency Modulation

Code and Documents

Attachment

Overview


Frequency Modulation (FM) is a form of modulation in which changes to the frequency of the carrier wave correspond directly with changes in the baseband signal. This is considered an analog form of modulation because the baseband signal is typically an analog waveform without discrete, digital values. This demo is designed to illustrate the theory behind frequency modulation and introduce practical aspects of its implementation

Common Applications:

FM is most commonly used for radio and television broadcasting.  In fact, FM radio, which operates from 88 MHz to 108 MHz, uses FM modulation to transmit audio signals.  Each radio station utilizes a 38 kHz frequency band to broadcast audio.  Analog television implements FM modulation as well.  In fact, television channels 0 through 72 utilize various bandwidths between 54 MHz and 825 MHz. 

Mathematical Background:

The basic principle behind FM modulation is that the amplitude of an analog baseband signal can be represented by a slightly different frequency of the carrier.  Mathematically, we will represent this by describing the steps required to modulate the frequency of a sinusoidal carrier.

The actual mathematical process to modulate a baseband signal, m(t), onto the carrier requires a two step process.  First, the message signal must be integrated with respect to time to get an equation for phase with respect to time, Ө(t).  This enables the modulation process because phase modulation is fairly straightforward with typical IQ modulator circuitry.  A block diagram description of a FM transmitter is shown below:

As the block diagram above illustrates, the integration of a message signal results in an equation for phase with respect to time.  This equation is defined by the following:

Again, the resulting modulation is phase modulation, which involves changing the phase of the carrier over time.  This process is fairly straightforward and requires a quadrature modulator, shown below:

Demonstration:

The following demonstration will introduce more practical aspects of frequency modulation and examine the effect of the carrier frequency and FM deviation on the resulting FM signal. 

  1. First, open the example “FM Modulation.VI” and run the program.  Notice that there are three basic parameters that we will adjust.  First, the ‘Baseband Frequency’ adjusts the frequency of the message signal that we desire to send.  Second, the Carrier Frequency is the frequency which we will utilize to carry our message signal.  Finally, the FM Deviation determines the frequency difference between the greatest instantaneous frequency of the modulated signal and the carrier frequency.  In this step, adjust the baseband frequency and observe the effect on the graph entitled FM modulated Wave.

  2. Next, we will experiment with the carrier frequency and observe the effect on the modulated FM signal.  Notice that the minimum carrier frequency is equivalent to the frequency of the baseband.  In addition, the frequency deviation is also automatically adjusted so that it is never greater than the carrier frequency.  Below we show a scenario where the carrier frequency is equal to the frequency of the baseband.  Because these frequencies are identical, the modulated FM signal is not purely sinusoidal.  

      

    As the image above illustrates, the baseband signal cannot be well represented in this scenario.  Ideally, the carrier frequency should be substantially greater than the frequency of the baseband signal.  In the graph below, we show the results of increasing the carrier frequency.  Here, you can see that the full period of each frequency is represented.

    pic6

  3. Finally, we will observe the effect of the modulation index on the FM signal.  To do this, adjust the carrier frequency to its maximum, 1 MHz.  You will notice that the maximum FM Deviation has now automatically been adjusted to 500 kHz.  Slide the FM Deviation slider to the maximum, 500 kHz and observe the results.  As you can see in the graph below, the frequency of the resulting time domain signal shows substantial variation.  In fact, the minimum level of the baseband signal is represented by 0 Hz. In addition, the maximum level of the baseband signal is represented by 2 MHz.  

    While significant FM deviation is visually obvious, smaller FM deviation values are not.  To observe this, change the FM deviation to 200 kHz.  At this setting, various levels of the baseband signal will be represented by frequencies ranging from 800 kHz to 1.2 MHz.  The time domain of the modulated waveform is shown below:

    As the graph shows, changes in the frequency deviation are less obvious in the time domain.  However, it is important to observe its effect on a communications system.  Ideally, a communications system should have a maximum frequency deviation to more accurately represent the baseband signal.  However, this is not without tradeoffs.  By increasing the frequency deviation, we also increase the power required to generate the signal and the frequency bandwidth that it occupies.

  4. Finally, click on the “Frequency Domain” tab to view an FFT power spectrum of the modulated signal.  While viewing this graph, slowly adjust the frequency deviation variable and observe the effect on the channel width.  You will notice that a higher frequency deviation results in a greater bandwidth that the channel occupies.  Below, we show a FM signal with a carrier of 1 MHz and a frequency deviation of 500 KHz.  As you can observe from the graph below, the modulated signal occupies over 1 MHz of bandwidth

     

Conclusion:

Frequency Modulation (FM) is an important modulation scheme both because of its widespread commercial use and because of its simplicity.  As we have seen in the demonstration, frequency modulation can be simplified to phase modulation with a simple integrator.  As a result, frequency modulated signals can be generated with the National Instruments vector signal generator, because they require nothing more than an IQ modulator.

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Contributors