This blog post is part of a collection, click here for links to the entire set, and a review of the products.
Introduction
In a few earlier posts, frequency modulation (FM) experiments were conducted using a frequency synthesizer, and frequency shift keying using Texas Instrument’s CC11xL development kit. This post documents amplitude modulation (AM) experiments and uses the Agilent/Keysight N9322C spectrum analyzer (SA) for measurement and alignment.
Amplitude modulation and frequency modulation are traditional methods of transmitting audio and data, and although other forms of modulation are now common, they all involve combinations of AM and FM, since amplitude and frequency are the two parameters that can be adjusted for a radio signal. AM has been around for a hundred years; it was the method used for the first audio broadcast over radio in 1906, at a place called Brant Rock. The transmitter was set to a constant frequency, and the output was adjusted in amplitude by the vibrations picked up from a microphone. This in effect was the amplitude modulation.
This post investigates a typical way to generate AM signals. The output is at low amplitude sufficient for experimentation with an AM radio. The signal was observed on an oscilloscope and on the N9322C spectrum analyzer, and was successfully aligned using these tools. The N9322C has built-in modulation analysis capabilities for this.
There is a brief theoretical look at a few radio topics first, but it is quite light with no maths beyond addition and multiplication.
Receivers, Transmitters, Mixers and Multipliers
At the heart of most radio transmitters and receivers (even modern Software Defined Radio or SDR products) will be one or more mixer devices. In a nutshell these devices are used to shift signals up or down the frequency spectrum. As an example, if a radio transmitter sends a signal at 10MHz, then a radio receiver may internally “mix” the received 10MHz signal with an 11MHz signal. The output of the mixer will contain sum (21MHz) and difference (1MHz) frequency content (In real life the output of the mixer will contain many other frequencies too). If the signal was desired to be shifted down to 1MHz, then a filter will remove the higher frequency content so that just the wanted signal appears on the output.
The diagram above shows one example topology of a radio receiver, and the role that the mixer plays. The antenna picks up signals at many frequencies, and they are filtered for the band of interest before passing into a mixer. The signals present are then shifted to a pre-defined part of the spectrum using an adjustable oscillator known as the local oscillator (LO). By tuning the LO, different channels can be selected. Then, significant amplification occurs and very sharp filtering in order to isolate the desired signal and remove the rest. The signal is then demodulated for the data or audio output to become available. The reason to shift to a pre-defined part of the spectrum is so that all the remainder circuitry does not need to be tunable. For example, it is extremely difficult to make sharp filters that are adjustable. The topology above (also known as a super-heterodyne or superhet receiver) means that the post-mixer amplifier, filter and demodulator can be designed and optimised for a pre-defined frequency and channel bandwidth.
A multiplier is a device that (as the names says) multiplies the amplitude of two input signals. It will be seen below that it can perform the frequency shifting function described above, and can therefore be used as a mixer. There are other types of mixers too.
It can get confusing visualising a signal in the time domain and correlating it with what it may look like in the frequency domain. Before bringing out the spectrum analyzer or scope, it is worth considering the expected output, and one way to see it all is to use MATLAB or GNU Octave.
First, a function is created to make life easier:
function x=sampled_sine(f, fs, n) % sampled_sine Create a sine wave signal % x = sampled_sine(f, fs, n) % where f is the signal frequency, % fs is the sample frequency % n is the number of samples t=0:1/fs:(n/fs)-1/fs; x=sin(2*pi*f*t);
Here are two example signals which are a 10Hz sine wave signal and a 100Hz signals created in arrays (both MATLAB and GNU Octave work with arrays of numbers; a sine wave is represented as an array of amplitude values spaced in time);
c=sampled_sine(100, 10000, 10000); % 100 Hz sinewave, sampled at 10kHz, 10k samples s=sampled_sine(110, 10000, 10000); % 110 Hz sinewave, sampled at 10kHz, 10k samples
If these are plotted, they look as expected; for clarity the plot below shows just the first 1000 samples of the 10k samples generated:
plot(c(1:1000), ‘g’); % plot 100Hz signal in green plot(s(1:1000), ‘b’); % plot 110Hz signal in blue
The 100Hz signal is shown in green, and the 110Hz signal is in blue in the diagram above. The frequency spectrum of the two signals can now be plotted:
C=fft(c); S=fft(s); plot(abs(C(1:400))/10000, 'g'); % plot 0-400Hz plot(abs(S(1:400))/10000, 'b');
The plot above shows the spectrum from 0 to 400Hz, and the two signals can be clearly seen at 100Hz and 100Hz.
Next, the two signals are multiplied:
m=s.*c;
In the time domain, this multiplied output looks like this:
It looks interesting, but the frequency domain view can also be observed to see what occurred:
M=fft(m); plot(abs(M(1:400))/10000, 'm'); % plot 0 to 400Hz of the frequency spectrum
This makes it clear; the multiplied output (in the time domain) resulted in a frequency spectrum that contains the sum and difference signals. The sum and difference of 100Hz and 110Hz is 210Hz and 10Hz, and these are the frequencies visible in the diagram above in purple. The input signals (blue and green) are just for reference, they are not present in the multiplier output. Mixers can be based on different topologies, and many will have other frequencies present as mentioned earlier, and they will need filtering out.
The multiplier has a popular use-case as a modulation device. Here is an example topology for a transmitter. The signal from the microphone is brought up to the correct levels (and filtered/processed for a good quality transmission) for the multiplier which will multiply with the desired carrier frequency. The output is amplified and filtered before transmission. To see how this works, the core of this can be simulated using MATLAB or GNU Octave as before.
For example, if we have a (say) 10Hz signal to represent an audio input (10Hz is low of course but it’s just an example), and the desired carrier frequency is 100Hz, then as before they can be multiplied. The expected time domain and frequency domain output is shown below (10Hz signal is in blue, 100Hz carrier is green):
The purple output above is referred to as double sideband suppressed carrier. An AM signal contains the carrier frequency too. In other words, for AM we want the purple output signal to also contain some of the green carrier signal. We can inject that into the time domain representation of the signal, by an addition:
a=m+c;
By adjusting the level of the carrier, different output occurs. The red and yellow overlaid traces above show the effect of two different levels of carrier.
So, injecting the carrier into the multiplier output has had an effect. The red trace above looks a different shape to the purple trace above it. Again, the frequency domain view will reveal what’s going on:
A=fft(a); plot(abs(A(1:200))/10000, 'r');
As expected, it can be seen that the signal contains the sum and difference frequencies as well as the original 100Hz signal.
Building the Circuit
For building the AM transmitter, it was decided to use an MC1496 MC1496 integrated circuit, which is a fairly popular but ancient (yet still manufactured) IC. The circuit from the PDF data sheet (figure 27) was followed. The output from the IC is a balanced signal on pins 6 and 12 of the IC, so a transformer was connected (it is not critical; I used Minicircuits T4-6T) on the output. The circuit was built on a PCB but this isn’t necessary.
Testing and Alignment
The carrier signal was generated using a DIY frequency synthesizer controlled with a BeagleBone Black. The input signal was initially a 1 kHz signal fed into the circuit through a 1uF capacitor. The output of the circuit was connected to the N9322C spectrum analyzer.
The display showed the AM spectrum. The screenshot below has 1kHz per division on the x-axis, and it indicates at the center a 6.5MHz carrier frequency, and the two peaks either side are spaced 1kHz from the carrier.
Much like with the FM analysis explored in an earlier post, the SA can also perform AM analysis. In AM analysis mode the SA shows a demodulated time-domain trace of the expected 1kHz sine wave input signal:
The alignment process involved adjusting the trimmer resistor in the MC1496 circuit while observing the modulation depth or ‘AM Depth’ value on the analysis screen, and aiming for 100%. This would correspond to adjusting from the yellow trace shown earlier to the red trace. The SINAD value was healthy, however sometimes it’s much easier seeing things using the neat spectrogram (spectrum changing over time) view:
The screenshot above shows the same three peaks that we’ve already established is the correct AM signal , however there are very faint repeated signals spaced 1kHz apart as shown circled in the spectrogram view above. These repeated signals are a symptom of distortion in either the 1kHz signal source or the remainder of the signal chain. The level is extremely low (it is in the noise in the screenshot above, i.e. one hundred thousandth of the power of the carrier). I was able to successfully reduce the level by adjusting signal and carrier amplitudes for minimal distortion.
The screenshot below shows the observed output of the AM signal on an oscilloscope after alignment. It would not have been possible to observe the signal source distortion nor observe any additional content from a mixer output without the help of the SA however. The AM analysis capability allows for spot-on adjustment of modulation depth and for selecting the perfect signal and carrier levels for minimal distortion.
After alignment with the sine wave input signal, a square(ish) wave was also tried. The screenshot below shows on the spectrogram the point in time when the signal was switched from sine to square wave, and the frequency spectrum shows the usual odd harmonics peaks expected from a square wave, as well as a spread of the required channel bandwidth extending infinitely.
The AM signal is low enough not to be a nuisance, but clearly high enough for testing with a radio receiver. As a next step, the output was connected to an AM radio and the modulator input was connected to an iPod. It functioned as expected.
Summary
This was just a quick look at amplitude modulation and how to build and align an AM modulator. There is less interest in AM these days, but mixers and multipliers are fundamental parts of most radio transceivers so it’s good to know what to expect from such devices in theory using software and in practice using hardware. A spectrum analyzer with built-in modulation analysis capabilities makes light work of test and alignment.
Top Comments