DSPRelated.com
Forums

Qpsk Demodulator

Started by Eshwar varma March 12, 2015
On Thu, 12 Mar 2015 23:38:48 -0700, Eshwar varma wrote:

> On Thursday, March 12, 2015 at 4:59:41 PM UTC+5:30, Eshwar varma wrote: >> I implemented a qpsk demodulator on NI fpga . When i run the code iam >> getting correct constellation one out of 4 succesive runs remaining >> times constellation is rotating as shown in fig url: >> https://decibel.ni.com/content/servlet/JiveServlet/
showImage/105-32337-135325/Constellation.jpg
>> . >> >> q1. what are the possible causes for constellation rotation? > > @ tim > > 1. frequency lock is working one out of four times. > 2. The pll in step 6 removes small offsets . > > From your comments i understood that constellation rotation is due to > coarse (step 1 , 4) and fine (step 6) frequency offset estimation. Am i > correct. > > Demodulation is done at base band. > > Coarse Frequency Offset : > > Estimation : > I used FFT based frequency offset estimation. firstly i > raised input signal to the power of four and then calculated > 8192 FFT and i searched for the peak and calculated frequency > from bin value and divided frequency value by 4. > > Correction : > Let > S(t)= s(t)*e^iwt Where S(t) is incoming signal at the input of the > receiver , s(t) is original signal transmitted and e^iwt is the offset > added in channel. > To correct frequency offset i multiplied incoming signal with same > frequency offset but opposite frequency. > s(t) = S(t) * e^-iwt . > > > > Fine Frequency Offset Estimation (DD PLL) : > > It removes small frequency offsets. > > The incoming signal is complex IQ signal i calculated arc tan and > compared with ideal phase values (of symbol Map) and i calculated > error by subtracting phase of hard decisioned symbol from phase > of incoming signal. I applied phase error to a loop filter . On > next iteration incoming signal phase (arc tan )is subtracted > with phase error.
I missed your step 6. Yes, it should be sufficient. This still comes around to -- I think that you've got the right idea, but you're messing up some detail. The typical thing to do in a case like this is to divide and conquer. Separate the problem into as many tractable and verifiable bits as can be, and then start building solutions and verifying them one by one. I think your best bet at this point is to make a test signal with a known frequency offset. Disable your coarse frequency estimation and just nail it's output down to the known frequency offset, and test the thing with just your PLL (step 6). If it works -- great, you can proceed with confidence in that part. If it doesn't work -- great, you know what you need to work on next, and you can proceed with confidence that you're solving a real problem. Unless, of course, Randy is correct and you've got a 90 (or 180) degree ambiguity built into your system. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
On Fri, 13 Mar 2015 03:18:26 -0400, Randy Yates wrote:

> Eshwar varma <eshwar93.india@gmail.com> writes: > >> On Thursday, March 12, 2015 at 4:59:41 PM UTC+5:30, Eshwar varma wrote: >>> I implemented a qpsk demodulator on NI fpga . When i run the code iam >>> getting correct constellation one out of 4 succesive runs remaining >>> times constellation is rotating as shown in fig url: >>> https://decibel.ni.com/content/servlet/JiveServlet/
showImage/105-32337-135325/Constellation.jpg
>>> . >>> >>> q1. what are the possible causes for constellation rotation? >> >> @ tim >> >> 1. frequency lock is working one out of four times. >> 2. The pll in step 6 removes small offsets . >> >> From your comments i understood that constellation rotation is due to >> coarse (step 1 , 4) and fine (step 6) frequency offset estimation. Am i >> correct. >> >> Demodulation is done at base band. >> >> Coarse Frequency Offset : >> >> Estimation : >> I used FFT based frequency offset estimation. firstly i >> raised input signal to the power of four and then calculated >> 8192 FFT and i searched for the peak and calculated >> frequency from bin value and divided frequency value by 4. >> >> Correction : >> Let >> S(t)= s(t)*e^iwt Where S(t) is incoming signal at the input of the >> receiver , s(t) is original signal transmitted and e^iwt is the offset >> added in channel. >> To correct frequency offset i multiplied incoming signal with same >> frequency offset but opposite frequency. >> s(t) = S(t) * e^-iwt . >> >> >> >> Fine Frequency Offset Estimation (DD PLL) : >> >> It removes small frequency offsets. >> >> The incoming signal is complex IQ signal i calculated arc tan >> and compared with ideal phase values (of symbol Map) and i >> calculated error by subtracting phase of hard decisioned symbol >> from phase of incoming signal. I applied phase error to a loop >> filter . On next iteration incoming signal phase (arc tan )is >> subtracted with phase error. >> >> > I haven't followed this thread too closely, and Tim, forgive me if I'm > stepping on you, but Eshwar, you do know that QPSK demodulation, without > some sort of synchronization (e.g., a known frame preamble), has an > inherent 90 degree ambiguity?
If you pop up with an answer before I do that's fine -- I don't think that staking out a claim on a thread is really a useful thing to do in a newsgroup like this. I kind of alluded to DQPSK earlier -- Eshwar, it would be good to know if you are transmitting "pure" QPSK (where there is some presumed reference phase that must be adhered to), or DQPSK (where data is encoded in the size of the phase jump from one bit to the next). QPSK gives some amount of SNR improvement, until your receiver's reference slips and then you have this humongous burst error. DQPSK is immune from the burst error (a reference slip just causes two bits worth of error), but it doubles the number of bit errors from one incorrectly decoded symbol. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
Tim Wescott <seemywebsite@myfooter.really> writes:
> [...] > The typical thing to do in a case like this is to divide and conquer.
+1 +1 +1 +1 +1 +1 +1 ... -- Randy Yates Digital Signal Labs http://www.digitalsignallabs.com
On Thu, 12 Mar 2015 23:38:48 -0700 (PDT), Eshwar varma
<eshwar93.india@gmail.com> wrote:

>On Thursday, March 12, 2015 at 4:59:41 PM UTC+5:30, Eshwar varma wrote: >> I implemented a qpsk demodulator on NI fpga . When i run the code iam get= >ting correct constellation one out of 4 succesive runs remaining times con= >stellation is rotating as shown in fig url: https://decibel.ni.com/content/= >servlet/JiveServlet/showImage/105-32337-135325/Constellation.jpg . >>=20 >> q1. what are the possible causes for constellation rotation? > >@ tim > > 1. frequency lock is working one out of four times. > 2. The pll in step 6 removes small offsets . > >From your comments i understood that constellation rotation is due to coars= >e (step 1 , 4) and fine (step 6) frequency offset estimation. Am i correct. > >Demodulation is done at base band. > >Coarse Frequency Offset : > > Estimation : > I used FFT based frequency offset estimation. firstly i raised i= >nput signal to the power of four and then calculated 8192 FFT and i searche= >d for the peak and calculated frequency from bin value and divided frequenc= >y value by 4. > > Correction : > Let >S(t)=3D s(t)*e^iwt >Where S(t) is incoming signal at the input of the receiver , s(t) is origin= >al signal transmitted and e^iwt is the offset added in channel. >To correct frequency offset i multiplied incoming signal with same frequenc= >y offset but opposite frequency. > s(t) =3D S(t) * e^-iwt . > > > >Fine Frequency Offset Estimation (DD PLL) : > > It removes small frequency offsets. > > The incoming signal is complex IQ signal i calculated arc tan and co= >mpared with ideal phase values (of symbol Map) and i calculated error by su= >btracting phase of hard decisioned symbol from phase of incoming signal. I = >applied phase error to a loop filter . On next iteration incoming signal ph= >ase (arc tan )is subtracted with phase error.
It appears that you're describing a phase-lock system here, but I'm not 100% certain. In any case, this is the part to concentrate on if the constellation is still rotating, as the phase-lock loop is supposed to stop that. The plots you posted before were constellation plots, but a good way to diagnose a misbehaving PLL is to look at either I or Q in the time domain. You may be able to discern the remaining offset frequency, or if the loop is locking and then unlocking, or just never achieving lock. Best of luck with it. Eric Jacobsen Anchor Hill Communications http://www.anchorhill.com
On Fri, 13 Mar 2015 21:57:28 -0400, Randy Yates wrote:

> Tim Wescott <seemywebsite@myfooter.really> writes: >> [...] >> The typical thing to do in a case like this is to divide and conquer. > > +1 +1 +1 +1 +1 +1 +1 ...
Take the log, subtract, and conquer? -- www.wescottdesign.com
Tim Wescott <tim@seemywebsite.com> writes:

> On Fri, 13 Mar 2015 21:57:28 -0400, Randy Yates wrote: > >> Tim Wescott <seemywebsite@myfooter.really> writes: >>> [...] >>> The typical thing to do in a case like this is to divide and conquer. >> >> +1 +1 +1 +1 +1 +1 +1 ... > > Take the log, subtract, and conquer?
lol... If it were 30 years earlier, I would've just responded with "Right on!" to your suggestion (which is truly "right on"!). -- Randy Yates Digital Signal Labs http://www.digitalsignallabs.com
On Sunday, March 15, 2015 at 12:04:10 AM UTC+5:30, Tim Wescott wrote:
> On Fri, 13 Mar 2015 21:57:28 -0400, Randy Yates wrote: > > > Tim Wescott <seemywebsite@myfooter.really> writes: > >> [...] > >> The typical thing to do in a case like this is to divide and conquer. > > > > +1 +1 +1 +1 +1 +1 +1 ... > > Take the log, subtract, and conquer? > > -- > www.wescottdesign.com
iam checking each block thoroughly , while iam checking coarse frequency offset estimation i found the below problem . Iam demodulating base band signal, the input signal will have 2 samples per symbol ,In coarse frequency offset estimation (fft) ,to estimate frequency i applied fft to the signal , as we have to remove phase nonlinearities before fft i used mth power data modulation removal technique ,so if i rise the signal to the 4th power(qpsk) with only two samples per symbol i may get aliasing effect, so fft might not estimate the correct. is there any other data modulation removal techniques.
On 16.03.2015 8:33, Eshwar varma wrote:
> On Sunday, March 15, 2015 at 12:04:10 AM UTC+5:30, Tim Wescott wrote: >> On Fri, 13 Mar 2015 21:57:28 -0400, Randy Yates wrote: >> >>> Tim Wescott <seemywebsite@myfooter.really> writes: >>>> [...] >>>> The typical thing to do in a case like this is to divide and conquer. >>> >>> +1 +1 +1 +1 +1 +1 +1 ... >> >> Take the log, subtract, and conquer? >> >> -- >> www.wescottdesign.com > iam checking each block thoroughly , while iam checking coarse frequency offset estimation i found the below problem . > Iam demodulating base band signal, the input signal will have 2 samples per symbol ,In coarse frequency offset estimation (fft) ,to estimate frequency i applied fft to the signal , as we have to remove phase nonlinearities before fft i used mth power data modulation removal technique ,so if i rise the signal to the 4th power(qpsk) with only two samples per symbol i may get aliasing effect, so fft might not estimate the correct. > > is there any other data modulation removal techniques. > >
Yes. A good book is "Synchronization Techniques for Digital Receivers" by Mengali and D'Andrea. Basically, there are two different problems: one is to remove large frequency offsets on the order of ~100% of the symbol rate, the other is to remove small frequency offsets not exceeding ~10% of the symbol rate. If frequency offsets you deal with don't exceed 10% of the symbol rate, FFT-based method is fine. Typically the FFT-based method is discussed for the case of 1 sample per symbol, and in that case it's limited to +/- ~10% of the symbol rate. Since you have 2 samples per symbol you should get extended acquisition range (perhaps up to ~20% of the symbol rate, but I dunno), but at the penalty of worse minimum SNR required for the operation of your receiver. Evgeny.
On 16.03.2015 22:59, Evgeny Filatov wrote:
> On 16.03.2015 8:33, Eshwar varma wrote: >> On Sunday, March 15, 2015 at 12:04:10 AM UTC+5:30, Tim Wescott wrote: >>> On Fri, 13 Mar 2015 21:57:28 -0400, Randy Yates wrote: >>> >>>> Tim Wescott <seemywebsite@myfooter.really> writes: >>>>> [...] >>>>> The typical thing to do in a case like this is to divide and conquer. >>>> >>>> +1 +1 +1 +1 +1 +1 +1 ... >>> >>> Take the log, subtract, and conquer? >>> >>> -- >>> www.wescottdesign.com >> iam checking each block thoroughly , while iam checking coarse >> frequency offset estimation i found the below problem . >> Iam demodulating base band signal, the input signal will have >> 2 samples per symbol ,In coarse frequency offset estimation (fft) ,to >> estimate frequency i applied fft to the signal , as we have to remove >> phase nonlinearities before fft i used mth power data modulation >> removal technique ,so if i rise the signal to the 4th power(qpsk) with >> only two samples per symbol i may get aliasing effect, so fft might >> not estimate the correct. >> >> is there any other data modulation removal techniques. >> >> > > Yes. A good book is "Synchronization Techniques for Digital Receivers" > by Mengali and D'Andrea. > > Basically, there are two different problems: one is to remove large > frequency offsets on the order of ~100% of the symbol rate, the other is > to remove small frequency offsets not exceeding ~10% of the symbol rate. > > If frequency offsets you deal with don't exceed 10% of the symbol rate, > FFT-based method is fine. Typically the FFT-based method is discussed > for the case of 1 sample per symbol, and in that case it's limited to > +/- ~10% of the symbol rate. Since you have 2 samples per symbol you > should get extended acquisition range (perhaps up to ~20% of the symbol > rate, but I dunno), but at the penalty of worse minimum SNR required for > the operation of your receiver. > > Evgeny. >
Actually as I started thinking about it, there's another problem with using FFT-based method for 2 samples per symbol. It is intersymbol interference, which is typically avoided when 1 sample per symbol is used. Generally speaking, when using 2 samples per symbol for FFT, you are in uncharted waters. Nobody knows what happens there. Technically speaking you are even not guaranteed to get correct frequency estimates with good SNR -- because of the intersymbol interference. The idea of the method is that you get 1 sample per symbol at the maximum of the matched filter output (which implies you've already got symbol synchronization by that point). To correctly use the method you should do timing recovery before frequency offset estimation. Evgeny.
On Tuesday, March 17, 2015 at 2:00:06 AM UTC+5:30, Evgeny Filatov wrote:
> On 16.03.2015 22:59, Evgeny Filatov wrote: > > On 16.03.2015 8:33, Eshwar varma wrote: > >> On Sunday, March 15, 2015 at 12:04:10 AM UTC+5:30, Tim Wescott wrote: > >>> On Fri, 13 Mar 2015 21:57:28 -0400, Randy Yates wrote: > >>> > >>>> Tim Wescott <seemywebsite@myfooter.really> writes: > >>>>> [...] > >>>>> The typical thing to do in a case like this is to divide and conquer. > >>>> > >>>> +1 +1 +1 +1 +1 +1 +1 ... > >>> > >>> Take the log, subtract, and conquer? > >>> > >>> -- > >>> www.wescottdesign.com > >> iam checking each block thoroughly , while iam checking coarse > >> frequency offset estimation i found the below problem . > >> Iam demodulating base band signal, the input signal will have > >> 2 samples per symbol ,In coarse frequency offset estimation (fft) ,to > >> estimate frequency i applied fft to the signal , as we have to remove > >> phase nonlinearities before fft i used mth power data modulation > >> removal technique ,so if i rise the signal to the 4th power(qpsk) with > >> only two samples per symbol i may get aliasing effect, so fft might > >> not estimate the correct. > >> > >> is there any other data modulation removal techniques. > >> > >> > > > > Yes. A good book is "Synchronization Techniques for Digital Receivers" > > by Mengali and D'Andrea. > > > > Basically, there are two different problems: one is to remove large > > frequency offsets on the order of ~100% of the symbol rate, the other is > > to remove small frequency offsets not exceeding ~10% of the symbol rate. > > > > If frequency offsets you deal with don't exceed 10% of the symbol rate, > > FFT-based method is fine. Typically the FFT-based method is discussed > > for the case of 1 sample per symbol, and in that case it's limited to > > +/- ~10% of the symbol rate. Since you have 2 samples per symbol you > > should get extended acquisition range (perhaps up to ~20% of the symbol > > rate, but I dunno), but at the penalty of worse minimum SNR required for > > the operation of your receiver. > > > > Evgeny. > > > > Actually as I started thinking about it, there's another problem with > using FFT-based method for 2 samples per symbol. It is intersymbol > interference, which is typically avoided when 1 sample per symbol is > used. Generally speaking, when using 2 samples per symbol for FFT, you > are in uncharted waters. Nobody knows what happens there. Technically > speaking you are even not guaranteed to get correct frequency estimates > with good SNR -- because of the intersymbol interference. > > The idea of the method is that you get 1 sample per symbol at the > maximum of the matched filter output (which implies you've already got > symbol synchronization by that point). To correctly use the method you > should do timing recovery before frequency offset estimation. > > Evgeny.
Thanks Evengy for helping me in understanding the problem . For symbol timining recovery i used the method proposed by gardener . where it takes 2 samples per symbol and at output it gives only one samples per symbol , 1. so shall i place the CFO estimator ( fft based) after the symbol timing recovery? 2. And let say input signal has one sample per symbol and has symbol synchronization before applying to CFo estimator (fft) .As i said i raised input signal to the power four i.e i get a signal at 4F before applying FFT. So with only one sample per symbol and raising it to 4f will there be any aliasing affect?