Data AcQuisition And Real-Time AnalysisScope - Spectrum - Spectrogram - Signal Generator
Software for Windows
Science with your Sound Card!
Contact us about
Macros: AMdepth, AMmode
Daqarta offers two different AM modes, selected by the button above the entry window. The default (button up) is labeled Depth Re: Peak; clicking it down changes to Depth Re: 50% Base.
In Peak mode the depth can be set from 0 to 200%, while 50% Base only allows 0 to 100%. Depth will be limited to 100% when toggling from Peak to 50% Base mode.
Peak mode uses a special scaling scheme to support various experimental uses, while 50% Base is the conventional scheme used (for example) by AM radio broadcasters. Conventional 50% Base AM multiplies the main wave (carrier) by the sum of one plus the depth-scaled modulator wave:
sin(carrier) * [1 + Depth * sin(modulator)]
Under that scheme, 0% Depth gives the unmodulated carrier, but 100% Depth gives a modulated wave with peaks twice as large as the unmodulated carrier. To allow that, the carrier is automatically reduced to 50% when the mode is selected with AM active. (Hence the name.)
Peak mode uses a slightly different scheme that gives identical wave shapes, but automatically takes care of scaling to insure that the modulated wave exactly fills the available range:
sin(carrier) * [1 - Depth/2 + Depth/2 * sin(modulator)]
Below are some comparison images at various depths using each mode. The left (green) trace is Peak mode, while the right (violet) is 50% Base mode. Near the bottom of each side is the RMS value, based on an unmodulated carrier whose amplitude is 100%. For example, the 70.711 on the Depth=0 image means that if the Y axis is +/-100 mV, then the RMS value is 70.711 mV.
Notice that for each depth, the peak-to-valley span is the same size for both modes. In 50% Base mode, the span straddles the 50% amplitude point.
You will probably want to use the default Peak mode for most audio work. For example, you can add a bit of tremolo to a tone without having its amplitude cut in half. But you will definitely need 50% Base mode for modeling conventional AM radio broadcasts. Peak mode would run the transmitter at full power even in the absence of a program signal, which would be terribly inefficient.
Worse, the transmitted signal would be hard to demodulate: Note that in Peak mode the effective baseline (midway between peak and valley) decreases as the modulation depth increases. Consider what would happen with a simple diode detector, as in a crystal radio, which blocks the negative portion of the incoming signal to allow a simple filter to average resulting positive carrier peaks to recover the audio. With Peak modulation the filter would have to contend with a changing DC component due to the baseline shifting in the opposite direction to the audio. Since that unwanted component is usually in the same general range as the audio portion, a simple filter won't work. (The Decimate Demodulate option uses a more sophisticated system that will work in either depth mode.)
Important: The conventional formula for calculating fractional depth m from measurements on the waveform is:
m = (Vp - Vt) / (Vp + Vt)
where Vp is the peak height and Vt is the trough (valley) amplitude. This only works for 50% Base mode. As an example, look at the Depth=50% waveforms above. On the right side the peak is 75% and the trough is 25%, so:
m = (75 - 25) / (75 + 25) m = 50 / 100 = 50% (CORRECT)
But on the left side the peak is 100% and the trough is 50%, which would give:
m = (100 - 50) / (100 + 50) m = 50 / 150 = 33.333% (WRONG)
You can convert between conventional m depth fraction and Daqarta's Peak-mode depth P via:
m = P / (2 - P) P = 2 * m / (1 + m)
As mentioned earlier, Peak mode allows Depth up to 200%, equivalent to what is sometimes called "Ring Modulation" by those familiar with old analog music synthesis. That name comes from an early circuit that used 4 diodes connected head-to-tail in a (square) ring to perform multiplication. The Peak scheme reduces to simple multiplication of the two sine waves when Depth = 200% (ie 2.00):
sin(carrier) * [1 - Depth/2 + Depth/2 * sin(modulator)] sin(carrier) * [1 - 2/2 + 2/2 * sin(modulator)] sin(carrier) * [1 - 1 + 1 * sin(modulator)] sin(carrier) * sin(modulator)
It is very instructive to view the spectrum of an AM sine wave while you adjust depth and modulation frequency. With Depth set to 0, you see a single line in the spectrum at the main Freq value. (Use the Spectrum Window function to get rid of distracting spectral leakage skirts, or better yet use the Step Lines option to set the main Freq to land exactly on a spectral line.)
Set Depth mode to Peak. As you start to raise Depth, you will notice two flanking lines around the main one, each at a distance equal to the modulator frequency. They will rise as Depth increases until at 100% they are half the magnitude (-6 dB) of the main line. Keep going, and they keep rising; at 133.33% all three components will be the same size, but above that the main carrier becomes smaller than the sidebands, until finally at 200% (simple multiplication) only the sidebands remain... no carrier at all! (Also known as "Suppressed Carrier Modulation".)
This is exactly as predicted by the sine multiplication formula from high school trigonometry:
sin(A) * sin(B) = 1/2 * cos(A-B) - 1/2 * cos(A+B)
All you have are sum and difference frequencies in the product; neither of the original frequencies are present. Note that this is not limited to sine wave modulators; whatever the modulator spectrum, it will be mirrored about the carrier frequency. (Essentially, you apply the above formula to each modulator component separately.)
This is a powerful tool. If you use a low-pass noise for the modulator, you will get a band of noise twice that width centered about the carrier. You can then apply FM or a frequency sweep to the carrier, and it becomes a noise band with a changing center frequency.
For pure sinusoids, the sideband amplitudes are always 1/4 of AM Depth in Peak mode. Note that the modulated AM carrier amplitude plus the two sideband amplitudes will always sum to unity (assuming carrier Level = 100%). For example, if AM Depth = 128% then each sideband amplitude is 128 / 4 = 32% and the carrier is 100 - 2 * 32 = 36 percent.
Each Sideband Amplitude = (AM Depth) / 4 Carrier Amplitude = 100% - (AM Depth) / 2
NOTE: AM Depth (in Peak or 50% Base mode) allows entry of negative values, which give the equivalent of inverted (180 degree) modulator phase.
L.1.AMmode=1 sets Depth Re: 50% Base mode for Left Stream 1. L.1.AMmode=0 sets Depth Re: Peak (default).
UM=L.1.AMmode sets UM to 1 if Depth Re: 50% Base is active for Left Stream 1, else 0 for Depth Re: Peak.
L.1.AMdepth=50 sets Left Stream 1 Depth to 50%, regardless of which mode is in use. However, Depth will be limited to 100% for Depth Re: 50% Base.
L.1.AMdepth=>1 increments Depth by 1%, while L.1.AMdepth=>-1 decrements by 1%. Only +/-1% steps are accepted.
D=L.1.AMdepth sets D to the current Depth value.
Questions? Comments? Contact us!We respond to ALL inquiries, typically within 24 hrs.
Over 35 Years of Innovative Instrumentation
© Copyright 2007 - 2023 by Interstellar Research
All rights reserved