<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE document PUBLIC "-//CNX//DTD CNXML 0.5 plus MathML//EN" "http://cnx.rice.edu/technology/cnxml/schema/dtd/0.5/cnxml_mathml.dtd">
<document xmlns="http://cnx.rice.edu/cnxml" xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" xmlns:m="http://www.w3.org/1998/Math/MathML" id="new">
  <name>Frequency Modulation (FM) Mathematics</name>
  <metadata>
  <md:version>1.2</md:version>
  <md:created>2007/09/18 05:13:22 GMT-5</md:created>
  <md:revised>2008/03/18 09:21:44.446 GMT-5</md:revised>
  <md:authorlist>
      <md:author id="doering">
      <md:firstname>Ed</md:firstname>
      
      <md:surname>Doering</md:surname>
      <md:email>doering@rose-hulman.edu</md:email>
    </md:author>
  </md:authorlist>

  <md:maintainerlist>
    <md:maintainer id="doering">
      <md:firstname>Ed</md:firstname>
      
      <md:surname>Doering</md:surname>
      <md:email>doering@rose-hulman.edu</md:email>
    </md:maintainer>
    <md:maintainer id="eluther">
      <md:firstname>Erik</md:firstname>
      <md:othername>B</md:othername>
      <md:surname>Luther</md:surname>
      <md:email>erik.luther@ni.com</md:email>
    </md:maintainer>
    <md:maintainer id="SShearman">
      <md:firstname>Sam</md:firstname>
      <md:othername>D.</md:othername>
      <md:surname>Shearman</md:surname>
      <md:email>sam.shearman@ni.com</md:email>
    </md:maintainer>
  </md:maintainerlist>
  
  <md:keywordlist>
    <md:keyword>Bessel function</md:keyword>
    <md:keyword>carrier frequency</md:keyword>
    <md:keyword>FM</md:keyword>
    <md:keyword>frequency modulation</md:keyword>
    <md:keyword>harmonicity ratio</md:keyword>
    <md:keyword>John Chowning</md:keyword>
    <md:keyword>LabVIEW</md:keyword>
    <md:keyword>modulation frequency</md:keyword>
    <md:keyword>modulation index</md:keyword>
    <md:keyword>sidebands</md:keyword>
    <md:keyword>Yamaha DX7</md:keyword>
  </md:keywordlist>

  <md:abstract>Frequency modulation (FM) in the audio frequency range can create very rich spectra from only two sinusoidal oscillators, and the spectra can easily be made to evolve with time. The mathematics of FM synthesis is developed, and the spectral characteristics of the FM equation are discussed. Audio demonstrations as implemented by LabVIEW VIs illustrate the relationships between the three fundamental FM synthesis parameters (carrier frequency, modulation frequency, modulation index) and the synthesized spectra.</md:abstract>
</metadata>

<content>

<table id="labview_banner" frame="none"><tgroup cols="2">
<colspec rowsep="0" colsep="0"/> <colspec colwidth="6in" rowsep="0" colsep="0"/>
<tbody>
  <row>
    <entry morerows="3"><media type="image/png" src="LabVIEWq.png"/></entry>
    <entry> This module refers to LabVIEW, a software development environment that features a graphical programming language.
       Please see the <cnxn document="m15428">LabVIEW QuickStart Guide</cnxn> module for tutorials and documentation that will help you:</entry>
  </row>
  <row> <entry>• Apply LabVIEW to Audio Signal Processing </entry> </row>
  <row> <entry>• Get started with LabVIEW</entry> </row>
  <row> <entry>• Obtain a fully-functional evaluation edition of LabVIEW</entry> </row>
</tbody>
</tgroup>
</table>


<section id="sec1">
<name>Overview</name>

<para id="par2">
		<term>Frequency modulation</term> (<term>FM</term>) is most often associated with communications systems;
		for example, you can find all sorts of music stations on the FM band of your radio. In communications
		systems the <term>baseband</term> signal has a bandwidth similar to that of speech or music (anywhere
		from 8 kHz to 20 kHz), and the modulating frequency is several orders of magnitude higher; the FM radio
		band is 88 MHz to 108 MHz.</para>

<para id="par3">		When applied to audio signals for music synthesis purposes, the modulating frequency is of the same
		order as the audio signals to be modulated. FM can create very rich spectra, and
		the spectra can easily be made to evolve with time. The ability of FM to produce a wide variety of
		interesting spectra from only two sinusoidal oscillators makes FM a fascinating synthesis technique.
</para>

</section>

<section id="sec4">
<name>Brief History of FM Synthesis</name>

<para id="par5">
		John Chowning was the first to systematically evaluate FM in the audio spectrum, and along with
		Stanford University, filed for a patent on the technique in 1975 (see U.S. Patent 4,018,121 at <link src="http://www.uspto.gov">U.S. Patent and Trademark Office</link> or at <link src="http://www.google.com/patents?vid=USPAT4018121">Google Patent Search</link>). The patent was issued in 1977, and Stanford University licensed the 
		technology to Yamaha Corporation. Six years later in 1983, Yamaha introduced the revolutionary DX7 synthesizer (<cnxn target="img-DX7"/>), 
		the first commercially successful instrument based on FM synthesis. The DX7 was also a milestone by introducing two other new technologies: digital 
		synthesis and MIDI (Musical Instrument Digital Interface). The "FM sound" defines much of the pop music
		styles of the 1980s.
</para>

<figure id="img-DX7">
<media type="image/png" src="51653026_5d7e9ba315_o.jpg">
   <param name="thumbnail" value="51653026_5d7e9ba315_m.jpg"/>
   </media>
<caption>
   Yamaha DX7 synthesizer, the first commercially successful instrument to offer FM synthesis, digital synthesis, and MIDI compatibility.
The instrument pictured here is packaged in a road case.
Photographer: schoschie (<link src="http://www.flickr.com/photos/schoschie/51653026/">http://www.flickr.com/photos/schoschie/51653026/</link>). 
Copyright holder has granted permission to display this image under the 
<link src="http://creativecommons.org/licenses/by-sa/2.0/deed">Creative Commons Attribution-ShareAlike license</link>.

</caption>
</figure>

</section>

<section id="sec7">
<name>FM Equation</name>

<para id="par8">
The basic FM equation is presented in <cnxn target="eqn-fm"/>:
</para>

<equation id="eqn-fm">



<m:math>
 <m:semantics>
  <m:mrow>
   <m:mi>y</m:mi><m:mo stretchy="false">(</m:mo><m:mi>t</m:mi><m:mo stretchy="false">)</m:mo><m:mo>=</m:mo><m:mi>A</m:mi><m:mi>sin</m:mi><m:mo>⁡</m:mo><m:mo stretchy="false">(</m:mo><m:mn>2</m:mn><m:mi>π</m:mi><m:msub>
    <m:mi>f</m:mi>
    <m:mi>c</m:mi>
   </m:msub>
   <m:mi>t</m:mi><m:mo>+</m:mo><m:mi>I</m:mi><m:mi>sin</m:mi><m:mo>⁡</m:mo><m:mo stretchy="false">(</m:mo><m:mn>2</m:mn><m:mi>π</m:mi><m:msub>
    <m:mi>f</m:mi>
    <m:mi>m</m:mi>
   </m:msub>
   <m:mi>t</m:mi><m:mo stretchy="false">)</m:mo><m:mo stretchy="false">)</m:mo><m:mo>,</m:mo>
  </m:mrow>
 <m:annotation encoding="MathType-MTEF">
 </m:annotation>
 </m:semantics>
</m:math>

</equation>

<para id="par10">
where the parameters are defined as follows:
</para>

<list id="list11" type="bulleted">

<item> 

<m:math>
 <m:semantics>
  <m:mrow>
   <m:msub>
    <m:mi>f</m:mi>
    <m:mi>c</m:mi>
   </m:msub>
   <m:mo>=</m:mo>
  </m:mrow>
 <m:annotation encoding="MathType-MTEF">
 </m:annotation>
 </m:semantics>
</m:math> carrier frequency (Hz)
 </item>
<item> 

<m:math>
 <m:semantics>
  <m:mrow>
   <m:msub>
    <m:mi>f</m:mi>
    <m:mi>m</m:mi>
   </m:msub>
   <m:mo>=</m:mo>
  </m:mrow>
 <m:annotation encoding="MathType-MTEF">
 </m:annotation>
 </m:semantics>
</m:math> modulation frequency (Hz)
 </item>
<item> 

<m:math>
 <m:semantics>
  <m:mrow>
   <m:mi>I</m:mi><m:mo>=</m:mo>
  </m:mrow>
 <m:annotation encoding="MathType-MTEF">
 </m:annotation>
 </m:semantics>
</m:math> modulation index
 </item>

</list>

<para id="par12">
		The <cnxn target="video-fm-eqn"/> screencast video continues the discussion by explaining the significance of each part of <cnxn target="eqn-fm"/>,
		and demonstrates in a qualitative fashion how the different parameters of the equation influence the spectrum of the audio signal.
</para>

<para id="par13">
		<media type="image/png" src="LabVIEW.png"/> Download the LabVIEW VI demonstrated in the video: <link src="fm_demo1.vi">fm_demo1.vi</link>.
		Refer to <cnxn document="m15430">TripleDisplay</cnxn> to install the front-panel indicator used to view the signal spectrum.
</para>

<figure id="video-fm-eqn">
<media type="image/png" src="mod_fm-math-eqn.html">
   <param name="thumbnail" value="mod_fm-math-eqn.png"/>
   </media>
<caption>
   [video] Significance of each part of the basic FM equation, and audio demonstration
</caption>
</figure>

</section>

<section id="sec15">
<name>FM Spectrum</name>

<para id="par16">
The following trigonometric identity facilitates quantitative understanding of the spectrum produced by the basic FM equation of <cnxn target="eqn-fm"/>:
</para>

<equation id="eqn-trigid">



<m:math>
 <m:semantics>
  <m:mrow>
   <m:mi>sin</m:mi><m:mo>⁡</m:mo><m:mo stretchy="false">(</m:mo><m:mi>θ</m:mi><m:mo>+</m:mo><m:mi>a</m:mi><m:mi>sin</m:mi><m:mo>⁡</m:mo><m:mi>β</m:mi><m:mo stretchy="false">)</m:mo><m:mo>=</m:mo><m:msub>
    <m:mi>J</m:mi>
    <m:mn>0</m:mn>
   </m:msub>
   <m:mo stretchy="false">(</m:mo><m:mi>a</m:mi><m:mo stretchy="false">)</m:mo><m:mi>sin</m:mi><m:mo>⁡</m:mo><m:mi>θ</m:mi><m:mo>+</m:mo><m:mstyle displaystyle="true">
    <m:munderover>
     <m:mo>∑</m:mo>
     <m:mrow>
      <m:mi>k</m:mi><m:mo>=</m:mo><m:mn>1</m:mn>
     </m:mrow>
     <m:mi>∞</m:mi>
    </m:munderover>
    <m:mrow>
     <m:msub>
      <m:mi>J</m:mi>
      <m:mi>k</m:mi>
     </m:msub>
     <m:mo stretchy="false">(</m:mo><m:mi>a</m:mi><m:mo stretchy="false">)</m:mo><m:mrow><m:mo>[</m:mo> <m:mrow>
      <m:mi>sin</m:mi><m:mo>⁡</m:mo><m:mo stretchy="false">(</m:mo><m:mi>θ</m:mi><m:mo>+</m:mo><m:mi>k</m:mi><m:mi>β</m:mi><m:mo stretchy="false">)</m:mo><m:mo>+</m:mo><m:msup>
       <m:mrow>
        <m:mo stretchy="false">(</m:mo><m:mo>−</m:mo><m:mn>1</m:mn><m:mo stretchy="false">)</m:mo>
       </m:mrow>
       <m:mi>k</m:mi>
      </m:msup>
      <m:mi>sin</m:mi><m:mo>⁡</m:mo><m:mo stretchy="false">(</m:mo><m:mi>θ</m:mi><m:mo>−</m:mo><m:mi>k</m:mi><m:mi>β</m:mi><m:mo stretchy="false">)</m:mo>
     </m:mrow> <m:mo>]</m:mo></m:mrow>
    </m:mrow>
   </m:mstyle>
  </m:mrow>
 <m:annotation encoding="MathType-MTEF">
 </m:annotation>
 </m:semantics>
</m:math>

</equation>

<para id="par18">
The term
<m:math>
 <m:semantics>
  <m:mrow>
   <m:msub>
    <m:mi>J</m:mi>
    <m:mi>k</m:mi>
   </m:msub>
   <m:mo stretchy="false">(</m:mo><m:mi>a</m:mi><m:mo stretchy="false">)</m:mo>
  </m:mrow>
 <m:annotation encoding="MathType-MTEF">
 </m:annotation>
 </m:semantics>
 </m:math> defines a Bessel function of the first kind of order 
<m:math>
 <m:semantics>
  <m:mi>k</m:mi>
 <m:annotation encoding="MathType-MTEF">
 </m:annotation>
 </m:semantics>
 </m:math> evaluated at the value 
<m:math>
 <m:semantics>
  <m:mi>a</m:mi>
 <m:annotation encoding="MathType-MTEF">
 </m:annotation>
 </m:semantics>
</m:math>.
</para>

<para id="par19">
		Note how the left-hand side of the identity possesses exactly the same form as the basic FM equation of <cnxn target="eqn-fm"/>. Therefore, the right-hand
		side of the identity explains where the spectral components called <term>sidebands</term> are located, and indicates the amplitude of each
		spectral component. The <cnxn target="video-sidebands"/> screencast video continues the discussion by explaining the significance of each part of 
		<cnxn target="eqn-trigid"/>, especially the location of the sideband spectral components.
</para>

<figure id="video-sidebands">
<media type="image/png" src="mod_fm-math-sidebands.html">
   <param name="thumbnail" value="mod_fm-math-sidebands.png"/>
   </media>
<caption>
   [video] Trig identity of <cnxn target="eqn-trigid"/> and location of sideband spectral components 
</caption>
</figure>

<para id="par21">
		As discussed <cnxn target="video-sidebands"/> video, the basic FM equation produces an infinite number of sideband components; this is also evident by
		noting that the summation of <cnxn target="eqn-trigid"/> runs from k=1 to infinity. However, the amplitude of each sideband is controlled by the Bessel function,
		and non-zero amplitudes tend to cluster around the central carrier frequency.
		The <cnxn target="video-bessel"/> screencast video continues the discussion by examining the behavior of the Bessel function
<m:math>
 <m:semantics>
  <m:mrow>
   <m:msub>
    <m:mi>J</m:mi>
    <m:mi>k</m:mi>
   </m:msub>
   <m:mo stretchy="false">(</m:mo><m:mi>a</m:mi><m:mo stretchy="false">)</m:mo>
  </m:mrow>
 <m:annotation encoding="MathType-MTEF">
 </m:annotation>
 </m:semantics>
 </m:math> when its two parameters are varied, and shows how these parameters link to the modulation index and sideband number.
</para>

<figure id="video-bessel">
<media type="image/png" src="mod_fm-math-bessel.html">
   <param name="thumbnail" value="mod_fm-math-bessel.png"/>
   </media>
<caption>
   [video] Discussion of the Bessel function
<m:math>
 <m:semantics>
  <m:mrow>
   <m:msub>
    <m:mi>J</m:mi>
    <m:mi>k</m:mi>
   </m:msub>
   <m:mo stretchy="false">(</m:mo><m:mi>a</m:mi><m:mo stretchy="false">)</m:mo>
  </m:mrow>
 <m:annotation encoding="MathType-MTEF">
 </m:annotation>
 </m:semantics>
 </m:math> and its relationship to modulation index and sideband number

</caption>
</figure>

<para id="par23">
Now that you have developed a better quantitative understanding of the spectrum produced by the basic FM equation, the <cnxn target="video-eqn-revisit"/> 
screencast video revisits the earlier audio demonstration of the FM equation to relate the spectrum to its quantitative explanation.
</para>

<figure id="video-eqn-revisit">
<media type="image/png" src="mod_fm-math-eqn-revisit.html">
   <param name="thumbnail" value="mod_fm-math-eqn-revisit.png"/>
   </media>
<caption>
   [video] FM audio demonstration revisited
</caption>
</figure>

</section>

<section id="sec25">
<name>Harmonicity Ratio</name>

<para id="par26">
The basic FM equation generates a cluster of spectral components centered about the carrier frequency </para>

<para id="par27"><m:math>
 <m:semantics>
  <m:mrow>
   <m:msub>
    <m:mi>f</m:mi>
    <m:mi>c</m:mi>
   </m:msub>
  </m:mrow>
 <m:annotation encoding="MathType-MTEF">
 </m:annotation>
 </m:semantics>
 </m:math> with cluster density controlled by the modulation frequency</para>

<para id="par28"><m:math>
 <m:semantics>
  <m:mrow>
   <m:msub>
    <m:mi>f</m:mi>
    <m:mi>m</m:mi>
   </m:msub>
  </m:mrow>
 <m:annotation encoding="MathType-MTEF">
 </m:annotation>
 </m:semantics>
 </m:math>. Recall that we perceive multiple spectral components to be a single tone when the components are located at integer multiples of a fundamental frequency, otherwise we
 perceive multiple tones with different pitches. The <term>harmonicity ratio</term>
<m:math>
 <m:semantics>
  <m:mi>H</m:mi>
 <m:annotation encoding="MathType-MTEF">
 </m:annotation>
 </m:semantics>
</m:math> provides a convenient way to choose the modulation frequency to produce either harmonic or inharmonic tones. Harmonicity ratio is defined as:
</para>

<equation id="eqn-H">



<m:math>
 <m:semantics>
  <m:mrow>
   <m:mi>H</m:mi><m:mo>=</m:mo><m:mfrac>
    <m:mrow>
     <m:msub>
      <m:mi>f</m:mi>
      <m:mi>m</m:mi>
     </m:msub>
    </m:mrow>
    <m:mrow>
     <m:msub>
      <m:mi>f</m:mi>
      <m:mi>c</m:mi>
     </m:msub>
    </m:mrow>
   </m:mfrac>
  </m:mrow>
 <m:annotation encoding="MathType-MTEF">
 </m:annotation>
 </m:semantics>
</m:math>

</equation>

<para id="par30">
Harmonicity ratios that involve an integer, i.e.,
<m:math>
 <m:semantics>
  <m:mrow>
   <m:mi>H</m:mi><m:mo>=</m:mo><m:mi>N</m:mi>
  </m:mrow>
 <m:annotation encoding="MathType-MTEF">
 </m:annotation>
 </m:semantics>
</m:math>
or
<m:math>
 <m:semantics>
  <m:mrow>
   <m:mi>H</m:mi><m:mo>=</m:mo><m:mrow><m:mn>1</m:mn><m:mo>/</m:mo><m:mi>N</m:mi></m:mrow>
  </m:mrow>
 <m:annotation encoding="MathType-MTEF">
 </m:annotation>
 </m:semantics>
 </m:math>
for
<m:math>
 <m:semantics>
  <m:mrow>
   <m:mi>N</m:mi><m:mo>≥</m:mo><m:mn>1</m:mn>
  </m:mrow>
 <m:annotation encoding="MathType-MTEF">
 </m:annotation>
 </m:semantics>
</m:math>, result in sideband spacing that follows a harmonic relationship. On the other hand, non-integer-based harmonicity ratios, especially using irrational numbers
such as
<m:math>
 <m:semantics>
  <m:mi>π</m:mi>
 <m:annotation encoding="MathType-MTEF">
 </m:annotation>
 </m:semantics>
</m:math>
and
<m:math>
 <m:semantics>
  <m:mrow>
   <m:msqrt>
    <m:mn>2</m:mn>
   </m:msqrt>
  </m:mrow>
 <m:annotation encoding="MathType-MTEF">
 </m:annotation>
 </m:semantics>
</m:math>,
produce interesting inharmonic sounds.
</para>

<para id="par31">
		<media type="image/png" src="LabVIEW.png"/> Try experimenting with the basic FM equation yourself. The LabVIEW VI <link src="fm_demo2.vi">fm_demo2.vi</link> provides front-panel controls for
		carrier frequency, modulation index, and harmonicity ratio. You can create an amazingly wide variety of sound effects by strategically choosing specific
		values for these three parameters. The <cnxn target="video-fm-demo2"/> screencast video illustrates how to use the VI and provides some
		ideas about how to choose the parameters.
		Refer to <cnxn document="m15430">TripleDisplay</cnxn> to install the front-panel indicator used to view the signal spectrum.
</para>

<figure id="video-fm-demo2">
<media type="image/png" src="mod_fm-math-demo2.html">
   <param name="thumbnail" value="mod_fm-math-demo2.png"/>
   </media>
<caption>
   [video] Demonstration of fm_demo2.vi
</caption>
</figure>

</section>

<section id="sec33">
<name>References</name>

<list id="list34" type="bulleted">

<item> Moore, F.R., "Elements of Computer Music," Prentice-Hall, 1990, ISBN 0-13-252552-6. </item>
<item> Dodge, C., and T.A. Jerse, "Computer Music: Synthesis, Composition, and Performance," 2nd ed., Schirmer Books, 1997, ISBN 0-02-864682-7.  </item>

</list>

</section>

</content>
</document>
