DSPRelated.com
Forums

AM demodulation-envelope detection method

Started by BCLIM July 16, 2009
On Jul 22, 7:00&#4294967295;am, "BCLIM" <boonchun_...@yahoo.com> wrote:
> >On Jul 16, 9:45=A0pm, "BCLIM" <boonchun_...@yahoo.com> wrote: > >> >BCLIM wrote: > >> >> Hi All, > >> >> =A0 =A0 =A0 I have read out Richard Lyons's book about > approximation > >> envelope > >> >> detection. In the book got mentione after taking magniture of > analytic > >> >> signal, which is square root[square(I)+ square(Q)] and the result > need > >> to > >> >> be low pass filter to smoothen the signal. > > >> >> From the maths, the resultant of > >> >> the modulus of analytic signal will be only carrie(DC) plus message > >> >> signal(which is the envelope). > > >> >Then the math ignores the sampled nature of the signal > > >> >> In this case why we still need to low pass filter to smoothen out > the > >> signal. > > >> >To remove the images that result from the signal's sampled nature. > > >> >> I did a FFT plot of the signal before > >> >> low pass filtering, notice there are harmoincs of signal present. > Does > >> any > >> >> one know why the harmonic present? Thanks. > > >> >They are images. It is as if the baseband signal were modulated by > the > >> >sampling click. > > >> >Jerry > >> >-- > >> >Engineering is the art of making what you want from things you can > get. > > >> Hi Jerry, > >> Thanks for the feedback. > >> The below is the mathlab code I used to generate the modulated AM > signal. > >> Just added those sine wave. I did an FFT plot on this unprocess signal. > I > >> don't see any images occur. But after the modulus of the analytic > signal,= > > I > >> noticed the harmoinics occur. For example, 14kHz etc. > >> fs=3D312500; > >> T=3D41744; > >> n=3D(0:T-1); > >> f1=3D7000; > >> f2=3D7060; > >> f3=3D6940; > > xn_1=3D(1*sqrt(2))*sin(2*pi*f1*n/fs)+(0.1*sqrt(2))*sin(2*pi*f2*n/fs)+(0.1= > > > > >*sqr=ADt(2))*sin(2*pi*f3*n/fs); > > >> By maths, > >> =A0 =A0 =A0 =A0Analytic signal,Xc(t) =3D A(t)*e^(jwt) > >> A(t) is the envelope. > >> |xc(t)| =3D square root{(A(t)*cos(wt))^2+(A(t)*sin(wt))^2} > >> since cos^2(wt) + sin^2(wt) =3D 1 > >> =A0 =A0|xc(t)| =3D A(t), where A(t) =3D Ac + m*cos(wm*t) and > Ac=3Dcarrier > >> amplitude, > >> m=3Dmodulation index, wm=3Dw of message > >> Does the steps looks fine? If yes, then there shouldn't be any > hormonics > >> present. Weird.... > >> Regards, > >> BC- Hide quoted text - > > >> - Show quoted text - > > >BCLIM, > > >Please post the entire MATLAB code that is causing you the problem. > >You have the generation code above, I'd like to see it all. > > >Dirk Bell > >DSP Consultant > >Hi Dirk, > > &#4294967295; &#4294967295; &#4294967295; &#4294967295; The below is the whole code. > fs=3D312500; > T=41744; > n=(0:T-1); > f1=7000; > f2=7060; > f3=6940; > xn_1=3D(1*sqrt(2))*sin(2*pi*f1*n/fs)+(0.1*sqrt(2))*sin(2*pi*f2*n/fs)+(0.1 > sqrt(2))*sin(2*pi*f3*n/fs); > > fil=filter(HBT,1, xn_1); %Pass the Am signal thru hilbert transform filter > with 0dB gain in passband. > fil1=fil(129:41744); %remove group delay of filtered signal > xnnew=xn_1(129:41744); % syn the original signal by taking the same amount > of delay. > fil1sq=fil1.*fil1; %square Q > xn1sq=xnnew.*xnnew; &#4294967295;%square I > RSS=sqrt(fil1sq+xn1sq); %Square root the summing > %Then pass thru a LOW pass filter to remove the harmonics.- Hide quoted text - > > - Show quoted text -- Hide quoted text - > > - Show quoted text -
BCLIM, Comment 1) I don't know what the 'D' is in fs and xn_1 (as in '3D...'), and some of the equations after your original post. It wasn't in your Jul 16 post, so I will assume someone's editor or other SW is acting up and the Jul 16 equations are correct. Tell us if the change actually means something. Comment 2) I think this is your problem. What you have as the AM signal is not the normal AM envelope that this method applies to. You have the information modulation signal xn_1, but you need to add a positive constant offset of greater value than the magnitude of the minimum xn_1 value to make x1_n correspond to an envelope modulation for this approach. So replace old xn_1 with (1+alpha*old xn_1) where alpha is such that (1+alpha*old xn_1)>0; maybe initially set alpha so 3/2> (1+alpha*old xn_1)>1/2. Then in your demodulated AM output you will have the DC offset of 1 that you can remove, and the old xn_1 scaled by alpha, which you can unscale for comparison to the old xn_1. Note, the added constant of '1' suggested could be some other positive number with corresponding changes to alpha, but it will do for now. Dirk Bell DSP Consultant
On Jul 22, 10:30&#4294967295;am, Dirk Bell <bellda2...@cox.net> wrote:
> On Jul 22, 7:00&#4294967295;am, "BCLIM" <boonchun_...@yahoo.com> wrote: > > > > > > > >On Jul 16, 9:45=A0pm, "BCLIM" <boonchun_...@yahoo.com> wrote: > > >> >BCLIM wrote: > > >> >> Hi All, > > >> >> =A0 =A0 =A0 I have read out Richard Lyons's book about > > approximation > > >> envelope > > >> >> detection. In the book got mentione after taking magniture of > > analytic > > >> >> signal, which is square root[square(I)+ square(Q)] and the result > > need > > >> to > > >> >> be low pass filter to smoothen the signal. > > > >> >> From the maths, the resultant of > > >> >> the modulus of analytic signal will be only carrie(DC) plus message > > >> >> signal(which is the envelope). > > > >> >Then the math ignores the sampled nature of the signal > > > >> >> In this case why we still need to low pass filter to smoothen out > > the > > >> signal. > > > >> >To remove the images that result from the signal's sampled nature. > > > >> >> I did a FFT plot of the signal before > > >> >> low pass filtering, notice there are harmoincs of signal present. > > Does > > >> any > > >> >> one know why the harmonic present? Thanks. > > > >> >They are images. It is as if the baseband signal were modulated by > > the > > >> >sampling click. > > > >> >Jerry > > >> >-- > > >> >Engineering is the art of making what you want from things you can > > get. > > > >> Hi Jerry, > > >> Thanks for the feedback. > > >> The below is the mathlab code I used to generate the modulated AM > > signal. > > >> Just added those sine wave. I did an FFT plot on this unprocess signal. > > I > > >> don't see any images occur. But after the modulus of the analytic > > signal,= > > > I > > >> noticed the harmoinics occur. For example, 14kHz etc. > > >> fs=3D312500; > > >> T=3D41744; > > >> n=3D(0:T-1); > > >> f1=3D7000; > > >> f2=3D7060; > > >> f3=3D6940; > > > xn_1=3D(1*sqrt(2))*sin(2*pi*f1*n/fs)+(0.1*sqrt(2))*sin(2*pi*f2*n/fs)+(0.1= > > > >*sqr=ADt(2))*sin(2*pi*f3*n/fs); > > > >> By maths, > > >> =A0 =A0 =A0 =A0Analytic signal,Xc(t) =3D A(t)*e^(jwt) > > >> A(t) is the envelope. > > >> |xc(t)| =3D square root{(A(t)*cos(wt))^2+(A(t)*sin(wt))^2} > > >> since cos^2(wt) + sin^2(wt) =3D 1 > > >> =A0 =A0|xc(t)| =3D A(t), where A(t) =3D Ac + m*cos(wm*t) and > > Ac=3Dcarrier > > >> amplitude, > > >> m=3Dmodulation index, wm=3Dw of message > > >> Does the steps looks fine? If yes, then there shouldn't be any > > hormonics > > >> present. Weird.... > > >> Regards, > > >> BC- Hide quoted text - > > > >> - Show quoted text - > > > >BCLIM, > > > >Please post the entire MATLAB code that is causing you the problem. > > >You have the generation code above, I'd like to see it all. > > > >Dirk Bell > > >DSP Consultant > > >Hi Dirk, > > > &#4294967295; &#4294967295; &#4294967295; &#4294967295; The below is the whole code. > > fs=3D312500; > > T=41744; > > n=(0:T-1); > > f1=7000; > > f2=7060; > > f3=6940; > > xn_1=3D(1*sqrt(2))*sin(2*pi*f1*n/fs)+(0.1*sqrt(2))*sin(2*pi*f2*n/fs)+(0.1 > > sqrt(2))*sin(2*pi*f3*n/fs); > > > fil=filter(HBT,1, xn_1); %Pass the Am signal thru hilbert transform filter > > with 0dB gain in passband. > > fil1=fil(129:41744); %remove group delay of filtered signal > > xnnew=xn_1(129:41744); % syn the original signal by taking the same amount > > of delay. > > fil1sq=fil1.*fil1; %square Q > > xn1sq=xnnew.*xnnew; &#4294967295;%square I > > RSS=sqrt(fil1sq+xn1sq); %Square root the summing > > %Then pass thru a LOW pass filter to remove the harmonics.- Hide quoted text - > > > - Show quoted text -- Hide quoted text - > > > - Show quoted text - > > BCLIM, > > Comment 1) > > I don't know what the 'D' is in fs and xn_1 (as in '3D...'), and some > of the equations after your original post. &#4294967295;It wasn't in your Jul 16 > post, so I will assume someone's editor or other SW is acting up and > the Jul 16 equations are correct. Tell us if the change actually means > something. > > Comment 2) > > I think this is your problem. > > What you have as the AM signal is not the normal AM envelope that this > method applies to. &#4294967295;You have the information modulation signal xn_1, > but you need to add a positive constant offset of greater value than > the magnitude of the minimum xn_1 value to make x1_n correspond to an > envelope modulation for this approach. So replace old xn_1 with > (1+alpha*old xn_1) where alpha is such that (1+alpha*old xn_1)>0; > maybe initially set alpha so 3/2> (1+alpha*old xn_1)>1/2. Then in your > demodulated AM output you will have the DC offset of 1 that you can > remove, and the old xn_1 scaled by alpha, which you can unscale for > comparison to the old xn_1. Note, the added constant of '1' suggested > could be some other positive number with corresponding changes to > alpha, but it will do for now. > > Dirk Bell > DSP Consultant- Hide quoted text - > > - Show quoted text -
BTW, I assume the signal you are using falls within the passband of your Hilbert filter? Dirk
On Thu, 16 Jul 2009 07:42:04 -0500, "BCLIM" <boonchun_lim@yahoo.com>
wrote:

>Hi All, > I have read out Richard Lyons's book about approximation envelope >detection. In the book got mentione after taking magniture of analytic >signal, which is square root[square(I)+ square(Q)] and the result need to >be low pass filter to smoothen the signal. From the maths, the resultant of >the modulus of analytic signal will be only carrie(DC) plus message >signal(which is the envelope). In this case why we still need to low pass >filter to smoothen out the signal. I did a FFT plot of the signal before >low pass filtering, notice there are harmoincs of signal present. Does any >one know why the harmonic present? Thanks.
Hello BCLIM, Clay Turner's good reply answered your question. If you'd like to receive an errata for my book, please send me an E-mail. My E-mail address is in the back of the book. Regards, [-Rick-]