FM Synthesis
Craig Stuart Sapp
craig@ccrma.stanford.edu
23 March 1995

Background of FM Synthesis

Frequency Modulation for Radios

In frequency modulation (FM), unlike AM, the amplitude of the carrier is kept constant, but its frequency is altered in accordance with variations in the audio signal being sent. This form of modulation was developed by the American electrical engineer Edwin H. Armstrong during the early 1930s in an effort to overcome interference and noise that affect AM radio reception. FM is less susceptible than is AM to certain kinds of interference, such as that caused by thunderstorms as well as random electrical currents from machinery and other related sources. These noise-producing signals affect the amplitude of a radio wave but not its frequency, and so an FM signal remains virtually unchanged.

FM is better adapted than is AM to the transmission of stereophonic sound, audio signals for television programs, and long-distance telephone calls by microwave radio relay. Commercial FM broadcasting stations are assigned higher frequencies than are AM stations. The assigned frequencies, spaced 200 kHz apart, range from 88 to 108 MHz.

In 1933 Armstrong secured four patents on advanced circuits that were to solve this last basic problem. They revealed an entirely new radio system, from transmitter to receiver. Instead of varying the amplitude, or power, of radio waves to carry voice or music, as in all radio before then, the new system varied, or modulated, the waves' frequency (number of waves per second) over a wide band of frequencies. This created a carrier wave that natural static--an amplitude phenomenon created by electrical storms--could not break into. As a result, FM's wide frequency range made possible the first clear, practical method of high-fidelity broadcasting.

Because the new system required a basic change in transmitters and receivers, it was not embraced with any alacrity by the established radio industry. Armstrong had to build the first full-scale FM station himself in 1939 at a cost of more than $300,000 to prove its worth. He then had to develop and promote the system, sustain it through World War II (while he again turned to military research), and fight off postwar regulatory attempts to hobble FM's growth. When FM slowly established itself, Armstrong again found himself entrapped in another interminable patent suit to retain his invention. Ill and aging in 1954, with most of his wealth gone in the battle for FM, he took his own life.

The years have brought increasing recognition of Armstrong's place in science and invention. FM is now the preferred system in radio, the required sound channel in all television, and the dominant medium in mobile radio, microwave relay, and space-satellite communications. Posthumously, Armstrong was elected to the pantheon of electrical greats by the International Telecommunications Union, to join such figures as André-Marie Ampère, Alexander Graham Bell, Michael Faraday, and Guglielmo Marconi. (L.P.L.)

– From Encyclopaedia Brittanica Online (http://www.eb.com:180/eb.html)

FM synthesis

Frequency Modulation Synthesis was first described by John Chowning in this paper: 

Chowning, John M. "The Synthesis of Complex Audio Spectra by Means of Frequency Modulation," Journal of the Audio Engineering Society, volume 21, number 7 (September 1973).  pp. 526–534.

FM produces a wide variety of complex timbres by rapidly varying the frequency of one waveform in proportion to the amplitude of another waveform.  Computationally, FM synthesis is very cheap, so it was good for making sound synthesizers

One of the earliest and best-known digital synthesizers was the Yamaha DX-7, which was based on the results of Chowning's research in FM Synthesis. Introduced in 1983, the DX-7 was polyphonic, had a five-octave touch-sensitive keyboard, and offered a wide choice of timbres, which the player could adjust.

Simple FM Synthesis

c::"usage" = "The carrier frequency or average frequency."; 
    m::"usage" = "The modulating frequency."; d::"usage" = 
      "The peak deviation from the carrier frequency."; A::"usage" = "The amplitude of the sound in any units.";

Example values of the variables (Sounds similar to a Clarinet):

c = 90.; m = 60.; d = 60.; A = 1.;

fmwave[c_, m_, d_, t_] := 
      N[A Sin[2 π c t + ((d Sin[2 π m t])/m)]]

Clear[t]fmlist = Table[fmwave[c, m, k, t], {k, 0, 60 6, 20}];

Here is a graph of time versus amplitude of an FM function that starts out with no inner sine term, then gradually the modulation increases, until the modulation index equals 6:

timePlot = 
      (Plot[Evaluate[#1], {t, 0, 0.04}, PlotPoints -> 35, 
              AspectRatio -> (1/5), PlotRange -> All, 
              Frame -> True]&)/@fmlist;

<< "FMPlot.m"

fmClarinetSpectra = 
      Table[Join[{{0, 1.1}}, {{0, 0}}, 
          AbsPositiveFMSpectrum[90, 60, i], {{800, 0}}, {{800, 1.1}}], {i, 0, 
          6, .2}];

fmClarinetSpectra[[1
        ]] = {{0, 1.1}, {0, 0}, {90, 1.}, {800, 0}, {800, 
          1.1}};

(SpectralPlot[#1]&)/@fmClarinetSpectra;

Note that these spectra are created with only two sinewaves.  If additive synthesis were used, more sinewave generators would need to be used.  In the case of Index = 2, 6 sinwaves would be needed:

Clear[t]index2 = 
      Plus@@(#1[[2]] 
                Sin[2 π #1[[1]] 
                    t]&)/@AbsPositiveFMSpectrum[90, 60, 2]

Plot[index2, {t, 0, 0.04}];

Sin[x + Sin[x]] can be transformed into a series of Bessel functions, which makes it easier to see the number of individual harmonics in the resulting waveform:

d = 120; Clear[t]besselIndex2 = 
      BesselJ[0, (d/m)] Sin[2 π c t] + 
        BesselJ[1, (d/m)] 
          (Sin[2 π (c + m) t] - Sin[2 π (c - m)]) + 
        BesselJ[2, (d/m)] 
          (Sin[2 π (c + 2 m) t] - Sin[2 π (c - 2 m)])
             + BesselJ[3, (d/m)] 
          (Sin[2 π (c + 3 m) t] - Sin[2 π (c - 3 m)])
             + BesselJ[4, (d/m)] 
          (Sin[2 π (c + 4 m) t] - Sin[2 π (c - 4 m)])
            ;

Plot[besselIndex2, {t, 0, 0.04}];

How FM Spectra are Calculated

Clear[x, y]Plot3D[BesselJ[x, y], {x, 0, 20}, {y, 0, 20}, PlotPoints -> 20, 
      AxesLabel -> {"Order", "Index", "Amp"}, 
      FaceGrids -> None, BoxRatios -> {1, 1, 0.5}, 
      Mesh -> True, FaceGrids -> All, Shading -> False, 
      ViewPoint -> {2.459, 1.931, 1.294}, PlotRange -> All, 
      DefaultFont -> {"Helvetica-Bold", 18}];

Cross sections of the 3D plot above:

Slicing at the far back (Order 0 Bessel J):

Clear[x]Plot[BesselJ[0, x], {x, 0, 20}, 
      PlotRange -> {{0, 20}, {-1, 1}}, 
      Ticks -> {Range[20], Automatic}];

Slicing the plot perpendicular to the last plot give the amplitudes of the individual harmonics in the sound that has an index of 0.  In the plot there is only one harmonic present at 0:

Plot[BesselJ[x, 0.01], {x, 0, 20}, 
      PlotRange -> {{0, 20}, {-1, 1}}, 
      Ticks -> {Range[20], Automatic}];

Order 1 Bessel J:

Plot[BesselJ[1, x], {x, 0, 20}, 
      PlotRange -> {{0, 20}, {-1, 1}}, 
      Ticks -> {Range[20], Automatic}];

Slicing the plot perpendicular to the last plot give the amplitudes of the individual harmonics in the sound that has an index of 1.  Only the values at the integers exist, So there is lots of the first harmonic (0) and the second harmonic (1), plus a little bit at the third (2) and fourth (3) harmonics:

Plot[BesselJ[x, 1], {x, 0, 20}, 
      PlotRange -> {{0, 20}, {-1, 1}}, 
      Ticks -> {Range[20], Automatic}];

Order 20 Bessel J:

Plot[BesselJ[20, x], {x, 0, 20}, 
      PlotRange -> {{0, 20}, {-1, 1}}, 
      Ticks -> {Range[20], Automatic}];

Slicing the plot perpendicular to the last plot give the amplitudes of the individual harmonics in the sound that has an index of 1.  Only the values at the integers exist.  The plot below this one shows some of the harmonics created.

Plot[BesselJ[x, 20], {x, 0, 20}, 
      PlotRange -> {{0, 20}, {-1, 1}}, 
      Ticks -> {Range[20], Automatic}];

Note the similarity in shape to the previous plot:

data = Drop[FMSpectrum[1000, 50, 20], 22]; SpectralPlot[
      Join[{{1000, 1}}, {{1000, 0}}, data, {{1000, 0}}, {{1000, -1}}], 
      0.017];

FM synthesis sounds in Mathematica

The Mathematica Technical Report Guide to Standard Mathematica Packages version 2.2 describes how to do FM synthesis in the section on Miscellaneous`Audio` ( page 230).  Sound generation in Mathematica isn't too efficient (so it takes a while to generate a sound).

Needs[Miscellaneous`Audio`]

?Miscellaneous`Audio`*

SetOptions[FrequencyModulation, 
      DisplayFunction -> $SoundDisplayFunction, SampleRate -> 8125, 
      SampleDepth -> 8]

?FrequencyModulation

FrequencyModulation[fc, {fm, pd}, d, opts] returns a Sound object that is a frequency modulated sinusoid, where fc, fm, and pd are the carrier, modulator, and peak deviation frequencies in Hertz, and d is the duration in seconds. The option Type can be set to Standard (default), Cascade, or Parallel. For Cascade and Parallel, the second argument must be a list of pairs of the form {{fm1, pd1}, {fm2, pd2}, ...}, where pdi is the peak deviation associated with modulating frequency fmi, and both values are measured in Hertz.

FrequencyModulation[990, {660, 660 1}, 0.01];

FrequencyModulation[990, {660, 660 3}, 0.01];

FrequencyModulation[990, {660, 660 20}, 0.01];