Hello all, I need to make an amplitude-modulated tone with alternating polarities using Matlab 5. The part I am stuck on is how to get the phase to reverse after each cycle of the AM envelope. The phase needs to reverse at the null point between each AM cycle. Also, does anyone have advice on how to get the initial phase of both frequencies to be zero? I am new to using Matlab and would greatly appreciate any help/advice/code. Some general information: sampling frequency 10,000 Hz carrier frequency 1000 Hz modulation frequency 84.96094 Hz duration 1.024 seconds Thanks, Chris
alternating-polarity Amplitude-Modulated tone?
Started by ●April 20, 2006
Reply by ●April 20, 20062006-04-20
<cclinard@hotmail.com> wrote in message news:1145546603.495621.138290@t31g2000cwb.googlegroups.com...> Hello all, > > > I need to make an amplitude-modulated tone with alternating polarities > using Matlab 5. > > > The part I am stuck on is how to get the phase to reverse after each > cycle of the AM envelope. The phase needs to reverse at the null point > between each AM cycle. > > > Also, does anyone have advice on how to get the initial phase of both > frequencies to be zero? > > > I am new to using Matlab and would greatly appreciate any > help/advice/code. > > > Some general information: > sampling frequency 10,000 Hz > carrier frequency 1000 Hz > modulation frequency 84.96094 Hz > duration 1.024 secondsQ: how to get the initial phase of both frequencies to be zero? A: Compute them both as cosines starting at time zero. x=cost(wct) where wc is the carrier radian frequency and t is time [wc=2*pi*fc] y=cos(wmt) where wm is the modulation radian frequency Q: how to get the phase to reverse after each cycle of the AM envelope. The phase needs to reverse at the null point between each AM cycle. A: It would be better if you were clearer in your specification of the objective. It depends on what you mean: - you want the phase of the carrier to reverse after each *cycle* of the AM envelope? - you want the phase of the carrier to reverse at each *zero* (half-cycle) of the AM envelope / that is, you want it to be "in phase" when the modulation is positive and "reversed phase" when the modulation is negative. - you want the phase of the AM envelope to reverse after each cycle of the AM envelope? "This phase needs to reverse at the null point between each AM cycle" So this seems to say the phase changes at each zero-crossing or half-cycle and not each cycle...... I will *guess* that you mean you want the phase of the carrier to reverse at *each* null point of the AM signal. That means that you want the modulator to be a 4-quadrant multiplier or a modulator for a "suppressed carrier" or "double sideband" system. Here's how that works: If the modulating signal is positive, then the output is proportional to the modulating signal amplitude and the carrier is "in phase". If the modulating signal is negative, then the output is proportional to the modulating signal amplitude and the carrier is "out of phase" or, simply multiplied by -1. If this is what you need, then from above, the modulated signal would be x*y. It's a bit different than the typical "AM" because AM normally suggests that the modulated signal is: m1(t)= [1 + cos(wmt)]*cost(wct) This yields 100% modulation AM. Note that the modulating signal never goes below zero. Thus, the phase of the carrier never "switches". The spectrum looks like a carrier of amplitude 1.0 at wc and sidebands at wc+wm and wc-wm each with amplitudes of 0.5. Otherwise: m2(t) = cos(wmt)*cos(wct) yields a spectrum that looks like lines at wc+wm and wc-wm with no visible carrier at wc. Fred
Reply by ●April 20, 20062006-04-20
cclinard@hotmail.com wrote:> Hello all, > > > I need to make an amplitude-modulated tone with alternating polarities > using Matlab 5. > > > The part I am stuck on is how to get the phase to reverse after each > cycle of the AM envelope. The phase needs to reverse at the null point > between each AM cycle.Which phase reverses: the carrier or the modulation? Be aware that instantaneously reversing either phase generates lots of sidebands.> Also, does anyone have advice on how to get the initial phase of both > frequencies to be zero?Phase relative to what? isn't possible to refer phase at one frequency to phase at another. Do you simply want both waveforms to have a zero crossing at t=0?> I am new to using Matlab and would greatly appreciate any > help/advice/code.Is learning Matlab one of the objects of your assignment? Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by ●April 20, 20062006-04-20
Fred Marshall wrote: ...> m2(t) = cos(wmt)*cos(wct) > > yields a spectrum that looks like lines at wc+wm and wc-wm with no visible > carrier at wc.And the envelope looks like a full-wave rectified sine wave and there is no splatter. On the other hand, if the waveform is sin(k*w_c*t)[1 + sin(w_m*t] where k = sign[sin(w_c*t/2) then the envelope is that of normal AM, but the phase of the carrier reverses whenever the envelope goes to zero, and the spectrum will include many lines far from the carrier. Using sines males all waveforms zero at t=0. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by ●April 20, 20062006-04-20
cclinard@hotmail.com wrote: Thank you very much for your assistance!! I apologize for not describing the desired result correctly. The phase needs to reverse at the null point located at each half-cycle. Your solutions make perfect sense. Many thanks, Chris
Reply by ●April 20, 20062006-04-20
This is just double side-band supressed carrier(DSSC). You multiply the baseband X the carrier and voila! ie cos(wmt).cos(wct) This has two sidebands and the phase reverses as you need it. If you add a dc term in the baseband you get AM but that is anotehr story. Tom
Reply by ●April 20, 20062006-04-20
naebad wrote:> This is just double side-band supressed carrier(DSSC). You multiply the > baseband X the carrier and voila! > ie > > cos(wmt).cos(wct) > > This has two sidebands and the phase reverses as you need it. If you > add a dc term in the baseband you get AM but that is anotehr story.And the envelope looks like a full-wave rectified etc. etc. etc. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by ●April 20, 20062006-04-20
"Jerry Avins" <jya@ieee.org> wrote in message news:KJqdnXVATYanndXZnZ2dnUVZ_vadnZ2d@rcn.net...> naebad wrote: >> This is just double side-band supressed carrier(DSSC). You multiply the >> baseband X the carrier and voila! >> ie >> >> cos(wmt).cos(wct) >> >> This has two sidebands and the phase reverses as you need it. If you >> add a dc term in the baseband you get AM but that is anotehr story. > > And the envelope looks like a full-wave rectified etc. etc. etc. > > Jerry > --But it only "looks like".... If you look at the carrier phase at the same time then it looks like a sinusoid.
Reply by ●April 20, 20062006-04-20
Fred Marshall wrote:> "Jerry Avins" <jya@ieee.org> wrote in message > news:KJqdnXVATYanndXZnZ2dnUVZ_vadnZ2d@rcn.net... > >>naebad wrote: >> >>>This is just double side-band supressed carrier(DSSC). You multiply the >>>baseband X the carrier and voila! >>>ie >>> >>>cos(wmt).cos(wct) >>> >>>This has two sidebands and the phase reverses as you need it. If you >>>add a dc term in the baseband you get AM but that is anotehr story. >> >>And the envelope looks like a full-wave rectified etc. etc. etc. >> >>Jerry >>-- > > > But it only "looks like".... > > If you look at the carrier phase at the same time then it looks like a > sinusoid.I'm not sure what you mean. I understand the "only looks like" part; that is in fact what I wrote. The AM looks like an offset sinusoid touching the time axis on its positive peaks and its negative -- including the offset mirrored above the axis, the space between filled in by the carrier. The DSSC looks like the same two sinusoids without offset, so they intersect on the time axis, and the space enclosed by them filled in by the carrier*. The two appearances are quite distinct. Jerry _____________________________________ * All right, there really is no carrier. Say instead, filled in by RF. -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by ●April 20, 20062006-04-20
"Jerry Avins" <jya@ieee.org> wrote in message news:JqOdnbil2u32otXZnZ2dnUVZ_umdnZ2d@rcn.net...> Fred Marshall wrote: >> "Jerry Avins" <jya@ieee.org> wrote in message >> news:KJqdnXVATYanndXZnZ2dnUVZ_vadnZ2d@rcn.net... >> >>>naebad wrote: >>> >>>>This is just double side-band supressed carrier(DSSC). You multiply the >>>>baseband X the carrier and voila! >>>>ie >>>> >>>>cos(wmt).cos(wct) >>>> >>>>This has two sidebands and the phase reverses as you need it. If you >>>>add a dc term in the baseband you get AM but that is anotehr story. >>> >>>And the envelope looks like a full-wave rectified etc. etc. etc. >>> >>>Jerry >>>-- >> >> >> But it only "looks like".... >> >> If you look at the carrier phase at the same time then it looks like a >> sinusoid. > > I'm not sure what you mean. I understand the "only looks like" part; that > is in fact what I wrote. The AM looks like an offset sinusoid touching the > time axis on its positive peaks and its negative -- > including the offset mirrored above the axis, the space between filled in > by the carrier. The DSSC looks like the same two sinusoids without offset, > so they intersect on the time axis, and the space enclosed by them filled > in by the carrier*. The two appearances are quite distinct. > > JerryJerry, I think that the notion of "envelope" for DSSC might be extended to mean one that isn't so discontinuous as a rectified sine wave. It makes sense and I like to think of it in that way. Then the envelope of AM and the "envelope" of DSSC are the same - a sinusoid. But, I realize that "envelope" means what you described and I was trying to suggest an extended version. Maybe that's a bad idea because it would be confusing. Fred






