User:WillWare/Radio theory

Trig identities
There are some basic trigonometric identities that explain the appearance of sum and difference frequencies when a carrier wave is modulated.


 * sin (x + y) = sin x cos y + sin y cos x
 * cos (x + y) = cos x cos y - sin x sin y
 * sin x sin y = (1/2) cos (x - y) - (1/2) cos (x + y)
 * cos x cos y = (1/2) cos (x + y) - (1/2) cos (x - y)

The mathematical function for a sine wave signal of frequency f is
 * A sin(2&pi;ft + &phi;)

where A is the magnitude (or loudness) of the signal and &phi; is the phase (or offset in time).

Amplitude modulation
''Put in a time-domain graph of what's going on here, with the unmodulated f1 carrier, the f2 signal, and the resulting modulated carrier. It's probably good to show overmodulation. Simple AM receivers are generally insensitive to the phase of the carrier and can't correctly interpret an overmodulated signal.''

In amplitude modulation, a carrier wave of frequency f0 is modulated by an audio frequency f1 to give a signal like this:


 * (1/2 + 1/2 sin 2&pi;f1t) * sin 2&pi;f0t
 * = 1/2 sin 2&pi;f0t + 1/2 sin 2&pi;f1t sin 2&pi;f0t
 * = 1/2 sin 2&pi;f0t + 1/4 cos 2&pi;(f0-f1)t - 1/4 cos 2&pi;(f0+f1)t



The first term is a strong sine wave at the original carrier frequency f0. The other two terms are a lower sideband at frequency f0-f1 and an upper sideband at frequency f0+f1. Imagine a graph with frequency along the X axis, and a big spike at f0 and two smaller spikes at f0-f1 and f0+f1. The instrument that displays this graph is called a spectrum analyzer.

In general the audio signals aren't simple sine waves. They are voices, musical instruments, or other complex sounds, so the audio signal is comprised of large numbers of sine waves. On the spectrum analyzer, this looks like a big spike in the middle at f0, and fuzzy tails going to the left and right for the sum and difference frequencies. The tails will look symmetric because each frequency component in the audio will contribute equal amounts to the sum and the difference frequencies to the right and left of the carrier.

Bandwidth
The audio signal that modulates the carrier can be written as a sum of sinusoids:

x(t) = &Sigma;k Ak cos (2&pi;fkt + &phi;k)

This results in lower sidebands with frequencies f0-fk and upper sidebands with frequencies f0+fk, and if F is the largest value for the audio frequencies fk then the entire modulated signal lies within a frequency window from f0-F to f0+F, with a width of 2F.

We can say that 2F is the bandwidth of the modulated signal. In practice, the exact bandwidth may not be so clearly defined. The maximum modulating frequency can vary although it may be bounded. The edges of the modulated signal may not be sharp, they may slope gradually down to the noise floor of the system. It is fairly common to decide that the bandwidth should be measured at the frequency width where the modulated signal falls a certain number of decibels below the center amplitude, for example, 3 dB, where the transmitted power has fallen by a factor of two.

Single-sideband modulation
Single-sideband modulation attempts to allocate both transmitter power and radio spectrum more efficiently by transmitting no carrier, and only the lower or upper sideband. The only piece of information not contained in the signal is the carrier frequency, and the radio spectrum has been reduced by more than a factor of two.

Sinusoids as complex exponentials
Euler showed that we can define the exponential of an imaginary this way:


 * ejx = cos x + j sin x

where j=sqrt(-1) and x is in radians. If we do this, a lot of very consistent and useful mathematics falls out as a result. Everything you ever learned about logs and exponentials still applies, but is now generalizable to complex numbers. In dealing with sine waves as we do in radio, Euler's formula becomes amazingly useful. We'll follow the mathematical conventions that &omega;=2&pi;f, where f is the frequency of the sine wave.

Any sine wave is characterized by its frequency, amplitude, and phase. Assume the frequency is already known, then we have f and omega handy, and remembering our trig identities, we can write


 * x(t) = A cos(2&pi;ft + B)
 * = A cos(&omega;t + B)                         /* replace f with w */
 * = (A cos B) cos &omega;t - (A sin B) sin &omega;t   /* trig identity */
 * = real_part{ X ej&omega;t }           /* Euler's formula */

where X = A (cos B + j sin B) = A ejB

If you have a bunch of sinsusoids that are mathematically related and they're all the same frequency, then ejwt will be the same for all of them. Then it's handy to drop that part and just work with the complex coefficient X.

X is often called a phasor. It has an absolute value equal to the magnitude of the sine wave, and an angle (arctangent(imaginary_part/real_part)) equal to the phase of the sine wave (assuming phase=0 is a cosine).

Impedance
One very handy thing about phasors is that we can take a time derivative by multiplying by j&omega;, or a time integral by dividing by j&omega;. Remember those time-derivative formulas for capacitors and inductors?

i = C dv/dt ==>   i = j&omega; C v  ==>  XC = 1 / Cj&omega;

v = L di/dt ==>   v = j&omega; L i  ==>  XL = Lj&omega;

If we have an inductor L and we're seeing a sine wave voltage with phasor V and a sine wave current with phasor I, then we have a complex-valued version of Ohm's Law:

V = I XL

XC and XL are impedances. Think of "impedance" as a generalization of "resistance" just the way "complex number" is a generalization of "real number". A pure-real impedance is just a resistance - the voltage and current are in phase with each other. For capacitors and inductors, as for most circuits, impedance varies with frequency.

Summing complex exponentials to get real-valued signals
So Euler told us that

ej&omega;t = cos &omega;t + j sin &omega;t

If we have a sinusoidal voltage, it's real-valued (because there are no imaginary electrons) and we can write

cos &omega;t = 0.5 ej&omega;t + 0.5 e-j&omega;t

This gets rid of a kludge. Now we need to keep track of two different phasors (0.5 for j&omega;t, 0.5 for -j&omega;t) but the operation of taking the real part for no clear reason goes away, and is replaced by an addition of two complex values to get a real value. We can also write

sin &omega;t = 0.5j ej&omega;t -0.5j e-j&omega;t

So this is another approach to the question of "what are negative frequencies?"

Here, negative frequencies are used to produce complex conjugates, which can be added together to produce real-valued signals on physical wires. The complex numbers are only a mathematical convenience, but things need to be real when we look at real circuits, and negative frequencies are a way to get there with mathematical consistency.