DSPRelated.com
Forums

modulation: audio DC offset

Started by waltech December 23, 2009
hi

a short time ago, I posted I was doing computed modulation.
I now have 2 nice sidelobes.

The q is this:
Where mathematically, and more to the point, where should I
account for the necessity in code of doing an DC offset to audio
array samples in  order to achieve the "Carrier" in AM modulation ?

procedure:
I simply add  some close sine frequencies to get a 300-3000 hz
waveform ( simulated by 5 to 47 cycles ) in a 512 array.
I then multiply each element by a higher frequency.  When I
FFT I get the expected sidelobes.  But no carrier.

If I add a DC offset to the audio array, I then get a carrier
properly with the sidelobes.

Many book's over the years don't specifically mention the necessity
of a DC offset to audio to get the carrier.  However, if I look at the
diagram of some modulator, the audio may be connected by a capacitor,
or coupled thru a transformer, so that when the modulation is missing,
the AM carrier continues.  I really need some placement of this
coupling in my mind to translate to DSP.  Should I simply add a
DC to the audio, or should this be handled another way ??
Is there another "normal" way?

thanks,
Walt.......

   

waltech wrote:
> hi > > a short time ago, I posted I was doing computed modulation. > I now have 2 nice sidelobes. > > The q is this: > Where mathematically, and more to the point, where should I > account for the necessity in code of doing an DC offset to audio > array samples in order to achieve the "Carrier" in AM modulation ? > > procedure: > I simply add some close sine frequencies to get a 300-3000 hz > waveform ( simulated by 5 to 47 cycles ) in a 512 array. > I then multiply each element by a higher frequency. When I > FFT I get the expected sidelobes. But no carrier. > > If I add a DC offset to the audio array, I then get a carrier > properly with the sidelobes. > > Many book's over the years don't specifically mention the necessity > of a DC offset to audio to get the carrier. However, if I look at the > diagram of some modulator, the audio may be connected by a capacitor, > or coupled thru a transformer, so that when the modulation is missing, > the AM carrier continues. I really need some placement of this > coupling in my mind to translate to DSP. Should I simply add a > DC to the audio, or should this be handled another way ?? > Is there another "normal" way?
You really need to know what Modulation consists of and how it is done. I suggest a copy of the Radio Amateur' Handbook from ARRL. If the 2009 edition isn't already discounted, the 2008 edition will be. Amplitude modulation can be accomplished with a multiplier Of the band of audio frequencies to be modulated is expressed as x_m -- read x-subscript-m -- and the carrier frequency is f_c, then the modulation process accomplishes sin(Wt)*(1 + m*x_m) where the |m*x_m| must never exceed 1. The carrier comes from the factor 1 in (1 + m*x_m). It is steady. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
On Wed, 23 Dec 2009 18:27:34 -0500, Jerry Avins wrote:

> waltech wrote: >> hi >> >> a short time ago, I posted I was doing computed modulation. I now have >> 2 nice sidelobes. >> >> The q is this: >> Where mathematically, and more to the point, where should I account for >> the necessity in code of doing an DC offset to audio array samples in >> order to achieve the "Carrier" in AM modulation ? >> >> procedure: >> I simply add some close sine frequencies to get a 300-3000 hz waveform >> ( simulated by 5 to 47 cycles ) in a 512 array. I then multiply each >> element by a higher frequency. When I FFT I get the expected >> sidelobes. But no carrier. >> >> If I add a DC offset to the audio array, I then get a carrier properly >> with the sidelobes. >> >> Many book's over the years don't specifically mention the necessity of >> a DC offset to audio to get the carrier. However, if I look at the >> diagram of some modulator, the audio may be connected by a capacitor, >> or coupled thru a transformer, so that when the modulation is missing, >> the AM carrier continues. I really need some placement of this >> coupling in my mind to translate to DSP. Should I simply add a DC to >> the audio, or should this be handled another way ?? Is there another >> "normal" way? > > You really need to know what Modulation consists of and how it is done.
Not to mention an understanding of the difference between a model and reality.
> I suggest a copy of the Radio Amateur' Handbook from ARRL. If the 2009 > edition isn't already discounted, the 2008 edition will be. > > Amplitude modulation can be accomplished with a multiplier Of the band > of audio frequencies to be modulated is expressed as x_m -- read > x-subscript-m -- and the carrier frequency is f_c, then the modulation > process accomplishes > > sin(Wt)*(1 + m*x_m) where the |m*x_m| must never exceed 1. > > The carrier comes from the factor 1 in (1 + m*x_m). It is steady.
But AM originally was accomplished with a circuit whose multiplying function was well buried, yet whose "modulation on top of carrier" was obvious. The _reality_ of AM is that you used a honkin' big class C amplifier with plenty of grid drive, then modulated the power to that amplifier. Yes, that big amplifier had the effect of multiplying the carrier by it's power supply voltage (which was varying at audio). But only theorists thought of it that way. -- www.wescottdesign.com
Tim Wescott wrote:
> On Wed, 23 Dec 2009 18:27:34 -0500, Jerry Avins wrote: > >> waltech wrote: >>> hi >>> >>> a short time ago, I posted I was doing computed modulation. I now have >>> 2 nice sidelobes. >>> >>> The q is this: >>> Where mathematically, and more to the point, where should I account for >>> the necessity in code of doing an DC offset to audio array samples in >>> order to achieve the "Carrier" in AM modulation ? >>> >>> procedure: >>> I simply add some close sine frequencies to get a 300-3000 hz waveform >>> ( simulated by 5 to 47 cycles ) in a 512 array. I then multiply each >>> element by a higher frequency. When I FFT I get the expected >>> sidelobes. But no carrier. >>> >>> If I add a DC offset to the audio array, I then get a carrier properly >>> with the sidelobes. >>> >>> Many book's over the years don't specifically mention the necessity of >>> a DC offset to audio to get the carrier. However, if I look at the >>> diagram of some modulator, the audio may be connected by a capacitor, >>> or coupled thru a transformer, so that when the modulation is missing, >>> the AM carrier continues. I really need some placement of this >>> coupling in my mind to translate to DSP. Should I simply add a DC to >>> the audio, or should this be handled another way ?? Is there another >>> "normal" way? >> You really need to know what Modulation consists of and how it is done. > > Not to mention an understanding of the difference between a model and > reality. > >> I suggest a copy of the Radio Amateur' Handbook from ARRL. If the 2009 >> edition isn't already discounted, the 2008 edition will be. >> >> Amplitude modulation can be accomplished with a multiplier Of the band >> of audio frequencies to be modulated is expressed as x_m -- read >> x-subscript-m -- and the carrier frequency is f_c, then the modulation >> process accomplishes >> >> sin(Wt)*(1 + m*x_m) where the |m*x_m| must never exceed 1. >> >> The carrier comes from the factor 1 in (1 + m*x_m). It is steady. > > But AM originally was accomplished with a circuit whose multiplying > function was well buried, yet whose "modulation on top of carrier" was > obvious. The _reality_ of AM is that you used a honkin' big class C > amplifier with plenty of grid drive, then modulated the power to that > amplifier. Yes, that big amplifier had the effect of multiplying the > carrier by it's power supply voltage (which was varying at audio). > > But only theorists thought of it that way.
Were technicians theorists? They taught it in technician school (RCA Institutes' T3 course). In the real world, the carrier amplitude can't be driven negative. Even if you managed it using a four-quadrant multiplier, a peak detector's output would be quite distorted. That means that at 100% modulation with a sinewave modulating signal, the modulated peak power is four times the carrier peak power and the average RF power is twice the average carrier power alone. The extra power comes from the plate modulator, so it has to be beefy. Whatever the waveform, all the sideband power is supplied by the modulator. There was a scheme for squeezing more power out of a given average tube dissipation. Basically, the carrier power was increased during the peaks of negative modulation, allowing modulation percentages greater than 100%. Sort of. I forget what it's called. (I took that course* about 55 years ago and the scheme was obsolete then.) Jerry _________________ * The final exam for that course was simply stated. Use these tubes: (plate characteristics given graphically). Use these power supplies (voltages given, except the bias voltages to be specified). Design a 5 KW plate modulated transmitter starting with the crystal oscillator for RF and 0 dBm audio in. Specify the turns ratio for the modulation transformer. Expect it to work if built. Two hours. Go. -- Engineering is the art of making what you want from things you can get. ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
On Dec 23, 5:39&#4294967295;pm, "waltech" <waltechm...@yahoo.com> wrote:
> hi > > a short time ago, I posted I was doing computed modulation. > I now have 2 nice sidelobes. > > The q is this: > Where mathematically, and more to the point, where should I > account for the necessity in code of doing an DC offset to audio > array samples in &#4294967295;order to achieve the "Carrier" in AM modulation ? > > procedure: > I simply add &#4294967295;some close sine frequencies to get a 300-3000 hz > waveform ( simulated by 5 to 47 cycles ) in a 512 array. > I then multiply each element by a higher frequency. &#4294967295;When I > FFT I get the expected sidelobes. &#4294967295;But no carrier. > > If I add a DC offset to the audio array, I then get a carrier > properly with the sidelobes. > > Many book's over the years don't specifically mention the necessity > of a DC offset to audio to get the carrier. &#4294967295;However, if I look at the > diagram of some modulator, the audio may be connected by a capacitor, > or coupled thru a transformer, so that when the modulation is missing, > the AM carrier continues. &#4294967295;I really need some placement of this > coupling in my mind to translate to DSP. &#4294967295;Should I simply add a > DC to the audio, or should this be handled another way ?? > Is there another "normal" way? > > thanks, > Walt.......
Hello Walt, Yes you are correct about needing an offset. The trig identity should explain it 2*cos(a)cos(b) = cos(a+b) + cos(a-b) That is why your carrier becomes suppressed. Add in your offset 2*(1+cos(a))cos(b) = 2cos(b) + cos(a+b) + cos(a-b) Remember early modulators could only multiply by positive numbers. IHTH, Clay
Jerry Avins <jya@ieee.org> wrote:
(snip)

> * The final exam for that course was simply stated. Use these tubes: > (plate characteristics given graphically). Use these power supplies > (voltages given, except the bias voltages to be specified). Design a 5 > KW plate modulated transmitter starting with the crystal oscillator for > RF and 0 dBm audio in. Specify the turns ratio for the modulation > transformer. Expect it to work if built. Two hours. Go.
Design, but not build, right? Lab finals, where you have to actually build something, are more fun. -- glen
glen herrmannsfeldt wrote:
> Jerry Avins <jya@ieee.org> wrote: > (snip) > >> * The final exam for that course was simply stated. Use these tubes: >> (plate characteristics given graphically). Use these power supplies >> (voltages given, except the bias voltages to be specified). Design a 5 >> KW plate modulated transmitter starting with the crystal oscillator for >> RF and 0 dBm audio in. Specify the turns ratio for the modulation >> transformer. Expect it to work if built. Two hours. Go. > > Design, but not build, right?
Right. The funny part is that, coming from a hi-fi audio background, I had glossed over the design of Class-B audio amplifiers. The classical approach with tubes picked the output transformer turns ratio to match the stage's plate impedance to the load. That required guessing and iterating. I knew I didn't have enough experience to do that in the allotted time, so I took another approach. My posted grade for the course was "See me" and I fretted a bit. When I got to see the instructor, he began by saying that I had achieved a good result, but he wanted the method explained before giving me credit. My way seemed too simple to be real, so he tried it on another design. That worked too. He then asked one of the other instructors if he had heard if it. It turned out to be in the RCA Transistor Manual. For years after, Class-B transformer-coupled tube amplifiers were designed the hard way -- repeated iteration guided by experience -- and transistor equivalents were designed "my" way. I was obviously not the original inventor, but I had dreamed it up on the exam. I got my A.
> Lab finals, where you have to actually build something, are more fun.
But necessarily more limited in scope. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Clay wrote:
> On Dec 23, 5:39 pm, "waltech" <waltechm...@yahoo.com> wrote: >> hi >> >> a short time ago, I posted I was doing computed modulation. >> I now have 2 nice sidelobes. >> >> The q is this: >> Where mathematically, and more to the point, where should I >> account for the necessity in code of doing an DC offset to audio >> array samples in order to achieve the "Carrier" in AM modulation ? >> >> procedure: >> I simply add some close sine frequencies to get a 300-3000 hz >> waveform ( simulated by 5 to 47 cycles ) in a 512 array. >> I then multiply each element by a higher frequency. When I >> FFT I get the expected sidelobes. But no carrier. >> >> If I add a DC offset to the audio array, I then get a carrier >> properly with the sidelobes. >> >> Many book's over the years don't specifically mention the necessity >> of a DC offset to audio to get the carrier. However, if I look at the >> diagram of some modulator, the audio may be connected by a capacitor, >> or coupled thru a transformer, so that when the modulation is missing, >> the AM carrier continues. I really need some placement of this >> coupling in my mind to translate to DSP. Should I simply add a >> DC to the audio, or should this be handled another way ?? >> Is there another "normal" way? >> >> thanks, >> Walt....... > > Hello Walt, > > Yes you are correct about needing an offset. > > The trig identity should explain it > > 2*cos(a)cos(b) = cos(a+b) + cos(a-b) > > That is why your carrier becomes suppressed. > > Add in your offset > > 2*(1+cos(a))cos(b) = 2cos(b) + cos(a+b) + cos(a-b) > > Remember early modulators could only multiply by positive numbers.
And peak detectors can't handle anything else. If the RF is allowed to go negative (reverse sign) the detector needs to account for phase. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
On Wed, 23 Dec 2009 21:59:36 -0500, Jerry Avins wrote:

> Tim Wescott wrote: >> On Wed, 23 Dec 2009 18:27:34 -0500, Jerry Avins wrote: >> >>> waltech wrote: >>>> hi >>>> >>>> a short time ago, I posted I was doing computed modulation. I now >>>> have 2 nice sidelobes. >>>> >>>> The q is this: >>>> Where mathematically, and more to the point, where should I account >>>> for the necessity in code of doing an DC offset to audio array >>>> samples in order to achieve the "Carrier" in AM modulation ? >>>> >>>> procedure: >>>> I simply add some close sine frequencies to get a 300-3000 hz >>>> waveform ( simulated by 5 to 47 cycles ) in a 512 array. I then >>>> multiply each element by a higher frequency. When I FFT I get the >>>> expected sidelobes. But no carrier. >>>> >>>> If I add a DC offset to the audio array, I then get a carrier >>>> properly with the sidelobes. >>>> >>>> Many book's over the years don't specifically mention the necessity >>>> of a DC offset to audio to get the carrier. However, if I look at >>>> the diagram of some modulator, the audio may be connected by a >>>> capacitor, or coupled thru a transformer, so that when the modulation >>>> is missing, the AM carrier continues. I really need some placement >>>> of this coupling in my mind to translate to DSP. Should I simply add >>>> a DC to the audio, or should this be handled another way ?? Is there >>>> another "normal" way? >>> You really need to know what Modulation consists of and how it is >>> done. >> >> Not to mention an understanding of the difference between a model and >> reality. >> >>> I suggest a copy of the Radio Amateur' Handbook from ARRL. If the 2009 >>> edition isn't already discounted, the 2008 edition will be. >>> >>> Amplitude modulation can be accomplished with a multiplier Of the band >>> of audio frequencies to be modulated is expressed as x_m -- read >>> x-subscript-m -- and the carrier frequency is f_c, then the modulation >>> process accomplishes >>> >>> sin(Wt)*(1 + m*x_m) where the |m*x_m| must never exceed 1. >>> >>> The carrier comes from the factor 1 in (1 + m*x_m). It is steady. >> >> But AM originally was accomplished with a circuit whose multiplying >> function was well buried, yet whose "modulation on top of carrier" was >> obvious. The _reality_ of AM is that you used a honkin' big class C >> amplifier with plenty of grid drive, then modulated the power to that >> amplifier. Yes, that big amplifier had the effect of multiplying the >> carrier by it's power supply voltage (which was varying at audio). >> >> But only theorists thought of it that way. > > Were technicians theorists? They taught it in technician school (RCA > Institutes' T3 course). In the real world, the carrier amplitude can't > be driven negative. Even if you managed it using a four-quadrant > multiplier, a peak detector's output would be quite distorted. That > means that at 100% modulation with a sinewave modulating signal, the > modulated peak power is four times the carrier peak power and the > average RF power is twice the average carrier power alone. The extra > power comes from the plate modulator, so it has to be beefy. Whatever > the waveform, all the sideband power is supplied by the modulator. >
(snip) Huh. Good 'technician' course. I'm still going to stand by the notion that the reality may be described as a high-level 1-quadrant multiplier with built-in offset, but while that works well for modeling it's not necessarily how you want to think about it when you're debugging an AM set. Incidentally, I've often wondered if you couldn't get decent SSB performance with an AM modulator that goes all the way down to 0, coupled with an exciter that shifts phase at the appropriate spots. Needing a DC- coupled audio amp to the RF deck plate is probably the least of your practical difficulties, though. -- www.wescottdesign.com

Tim Wescott wrote:


> Incidentally, I've often wondered if you couldn't get decent SSB > performance with an AM modulator that goes all the way down to 0, coupled > with an exciter that shifts phase at the appropriate spots. Needing a DC- > coupled audio amp to the RF deck plate is probably the least of your > practical difficulties, though.
This is what was referred as synthetic method of SSB generation. The problem with it is the accuracy of phase and amplitude modulators. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com