Frequency Modulation

The general formula for frequency modulation is:

	e = A * Sin[ 2 Pi Fc t + Mi * Sin[2 Pi Fm t]]

where	e = amplitude at time t
	A = peak amplitude
	Fc = carrier frequency in hertz
	Mi = modulation index 	
	Fm = modulating frequency in hertz
	
Here is the Mathematica function for the above equation:

FM[Amplitude_,Carrier_,PeakDeviation_,Modulator_,Duration_] :=
	Play[Evaluate[
		Amplitude * Sin[2 Pi Carrier t +
		PeakDeviation/Modulator * 
		Sin[2 Pi Modulator t]]],
				{t,0,Duration}]

The Modulation Index

The modulation index is the ratio of the peak deviation to the modulating frequency:

	PeakDeviation / Fm
	
(The PeakDeviation is frequently called DeltaF in the standard literature.)

Higher values of the index result in more partials, a "brighter" sound.  

Very high values of the index result in "foldover", or "aliasing", adding low-frequency components to the sound.

The Modulation Ratio (Harmonic and Inharmonic Partials)

The Modulation Ratio is the ratio of the modulating frequency to the carrier frequency.

If MR is an integer greater than zero, the resulting overtones and sidebands (the spectrum) will have harmonic relationships to each other, analogous to those of standard orchestral instruments.

If MR is not an integer value (if it has a fractional part greater than zero)  the resulting overtones and sidebands will have an inharmonic relationship to each other, analogous to percussion instruments and bells.

One speaks of a harmonic relationship when the overtones and sidebands have frequencies that coincide with the harmonics of some fundamental, not necessarily the carrier.

When 	MR = 1	the spectrum contains all harmonics, and the fundamental is at the 			modulating frequency
	MR = 2	the spectrum contains only odd-numbered harmonics,  analogous to 			a clarinet
    	 MR = 3	every 3rd harmonic is missing from the series
    	 MR = n	every n harmonic is missing from the series

Simple Frequency Modulation (Vibrato)

When the modulating frequency is in the sub-audio range (below 20 Hz.), the resulting frequency modualtion is called "vibrato" by musicians.

In simple frequency modulation, the magnitude of the Peak Deviation controls the "depth" (or "intensity") of the vibrato, and the magnitude of the Modulator controls the rate of the vibrato.

To achieve a "standard" vibrato, the modulating frequency should be in the range of 5 to 10 Hz.

Here is an example of vibrato, using the following variables:

	Amplitude = 1
	Carrier = 440 Hz.
	PeakDeviation = 36 Hz.
	Modulator = 6 Hz.
	Duration = 1

FM[1, 440, 36, 6, 1]

Complex Frequency Modulation

When both the carrier and the modulating frequency are in the audio range, one speaks of a complex frequency modulation.

	Amplitude = 1
	Carrier = 440
	PeakDeviation = 4400
	Modulator = 440
	ModulationIndex  = PeakDeviation / Modulator = 10
	ModulatorRatio = Modulator / Carrier = 1
	Duration = 2

FM[1, 440, 4400, 440, 2]

Here is another example, in this one the PeakDeviation is continually changing, the result being a static pitch with a continually changing spectrum (timbre):

	Amplitude = 1
	Carrier = 440
	PeakDeviation =  4400 * Sin[t]
	Modulator = 440
	ModulationIndex = PeakDeviation / Modulator = 10 * Sin[t]
	ModulatorRatio = Modulator / Carrier = 1
	Duration = 2

FM[1, 440, (4400 * Sin[t]), 440, 3 Pi]

Serial Frequency Modulation ("Cascade" FM)

The equation for frequency modulation can be set up so that the modulating frequency is itself modulated.  This equation is sometimes called Cascade frequency modulation.

This requires that there be a Modulation Index for each modulating frequency.

Here is an equation for Serial FM:

	e = A * Sin[OmegaC * t + MI1 * Sin[OmegaM1 * t + MI2 * Sin[OmegaM2 * t]]]

where
	e = amplitude at time t
	A = maximum amplitude
	OmegaC = carrier frequency in radians
	MI1 = modulation index for modulating frequency 1
	OmegaM1 = modulating frequency 1 in radians
	MI2 = modulation index for modulating frequncy 2 
	OmegaM2 = modulating frequncy 2 in radians
	
Here is an example where

	 OmegaC = 440 Hz.
	  OmegaM1 =100 Hz.
	  OmegaM2 = 50 Hz.
	  MI1 = 10 
	  MI2 = 5
	  Duration = 2

Play[Evaluate[
Sin[2 Pi 440 t +
	10 * Sin[2 Pi 100 t +
		5 * Sin[2 Pi 50 t]]]],{t,0,2}]

This process can be extended to any number of modulating waves.

Parallel Frequency Modulation

It is possible to have two or more modulating frequncies modulating a carrier, but (in contradistinction to "Cascade" FM) the modulating frequncies do no affect each other.  

Another possibility is to have one modulating frequency modulating two carriers, that are otherwise not affecting each other.  Both possibilities are described below.

The examples utilize three frequencies.  The process can be extended to greater numbers of frequencies.

Double Modulator FM

Here is an equation for Double Modulator FM using three frequencies:

	e = A * Sin[OmegaC t + MI1 * Sin[OmegaM1 * t] 
			       + MI2 * Sin[OmegaM2  * t]]
where
	e = amplitude at time t
	A = maximum amplitude
	OmegaC = carrier frequency in radians
	MI1, MI2 = the modulation indices for the two modulating frequencies
	OmegaM1, OmegaM2 = the two modulating frequencies in radians

Play[Evaluate[
	Sin[2 Pi 440 t + 10 * Sin[2 Pi 100 t]
			  + 5 * Sin[2 Pi 50 t]]],{t,0,2}]

Double Carrier FM

Here is an equation for Double Carrier FM:

	e = A/2 * ( Sin[OmegaC1 * t + MI * Sin[OmegaM  * t]] +
	             Sin[OmegaC2 * t + MI * Sin[OmegaM  * t]])
where
	e = instantaneous amplitude
	A = maximum amplitude
	OmegaC1, OmegaC2 = the two carrier frequencies in radians
	MI = modulation index
	OmegaM = modulating frequency in radians

Play[Evaluate[
	Sin[2 Pi 440 t + 10 * Sin[2 Pi 100 t]] +
	Sin[2 Pi 622 t + 10 * Sin[2 Pi 100 t]]],{t,0,2}]