On Apr 29, 8:55 pm, "John E. Hadstate" <jh113...@hotmail.com> wrote:> "John E. Hadstate" <jh113...@hotmail.com> wrote in messagenews:Y4idneGes7ZgcZTVnZ2dnUVZ_qmlnZ2d@supernews.com... > > >I have a general-purpose PLL implemented as a primitive in a > >language where I can easily run signals through it, plot the > >outputs, and tweak its parameters: initial frequency, loop > >gain, loop bandwidth and I/Q filter bandwidth. > > I noticed something today. If I feed my PLL an unmodulated > sine wave or a frequency modulated sine wave, it will acquire > lock and track precisely over a very wide range of initial > frequency errors and loop gain/bandwidth settings. However, if > I feed in a QPSK-modulated signal [SIN=COS=-SIN=-COS=...] the > acquisition and tracking ability falls to pieces. Where I > could easily acquire and track an FSK signal at 2000+/-200 Hz. > from a starting point of 1500 Hz., with the QPSK-modulated > signal, I can only acquire lock within +/- 1 Hz at 2400 Hz. > Having obtained lock, I can see the demodulated data on the > filtered I and Q arms out of the product mixer. > > Does this correspond with anyone else's experience? If so, > what were you able to do about expanding the acquisition range? > > I should mention that to get this to work at all, I introduced > a kludge into the basic quadrature PLL. After getting the I/Q > phase angle, I decide which quadrant I'm in and use the center > of that quadrant as the "Phase Setpoint". I then use the > difference between the measured I/Q phase angle and the phase > setpoint as an error signal to adjust the VFO's phase offset > (driving the demodulated I/Q phase to the center of the > quadrant). I also square this error and combine the result > with a fixed gain factor when calculating adjustments to the > VFO's frequency. The net effect of this is that when the loop > is locked in the center of one quadrant, a sudden jump to the > center of another quadrant will not cause much change in the > VFO's frequency (because the squared phase error is near zero) > and it will stay phase-locked on the new baud. > > I am not married to this kludge and would happily try a better > solution, especially if it expands the range over which I can > acquire lock. Any suggestions?I have the feeling the kluge and the PLL might be fighting each other, but I can't say for sure. In a properly designed PLL, you should not need the kluge. But I guess you know that. There is another QPSK architecture, from a great (and cheap) book called Telecommunication Systems Engineering by Lindsey & Simon, Section 2-5. I have used it and it works well. What you do is generate four phases from your NCO: sin(wt), sin(wt+pi/4), cos(wt), and cos(wt +pi/4). Your loop has four arms, each with a phase detector comparing the input signal to one of the NCO outputs. You multiply all the phase detector outputs together and pass that thru your lead-lag loop filter to control the NCO. John

# Demodulating QPSK

Started by ●April 5, 2008

Reply by ●April 29, 20082008-04-29

Reply by ●April 30, 20082008-04-30

"John" <sampson164@gmail.com> wrote in message news:f442941a-7411-4c34-be9c-5ec46621c6eb@p25g2000hsf.googlegroups.com...> > There is another QPSK architecture, from a great (and cheap) > book > called Telecommunication Systems Engineering by Lindsey & > Simon, > Section 2-5. I have used it and it works well. What you do is > generate > four phases from your NCO: sin(wt), sin(wt+pi/4), cos(wt), > and cos(wt > +pi/4). Your loop has four arms, each with a phase detector > comparing > the input signal to one of the NCO outputs. You multiply all > the phase > detector outputs together and pass that thru your lead-lag > loop filter > to control the NCO. > > John >By "phase detector" I assumed you meant "product mixer followed by low-pass filter". Sorry, I had no luck with this approach but thanks for trying to help.

Reply by ●April 30, 20082008-04-30

On Apr 29, 8:55�pm, "John E. Hadstate" <jh113...@hotmail.com> wrote:> "John E. Hadstate" <jh113...@hotmail.com> wrote in messagenews:Y4idneGes7ZgcZTVnZ2dnUVZ_qmlnZ2d@supernews.com... > > >I have a general-purpose PLL implemented as a primitive in a > >language where I can easily run signals through it, plot the > >outputs, and tweak its parameters: initial frequency, loop > >gain, loop bandwidth and I/Q filter bandwidth. > > I noticed something today. �If I feed my PLL an unmodulated > sine wave or a frequency modulated sine wave, it will acquire > lock and track precisely over a very wide range of initial > frequency errors and loop gain/bandwidth settings. �However, if > I feed in a QPSK-modulated signal [SIN=COS=-SIN=-COS=...] the > acquisition and tracking ability falls to pieces. �Where I > could easily acquire and track an FSK signal at 2000+/-200 Hz. > from a starting point of 1500 Hz., with the QPSK-modulated > signal, I can only acquire lock within +/- 1 Hz at 2400 Hz. > Having obtained lock, I can see the demodulated data on the > filtered I and Q arms out of the product mixer. > > Does this correspond with anyone else's experience? �If so, > what were you able to do about expanding the acquisition range? > > I should mention that to get this to work at all, I introduced > a kludge into the basic quadrature PLL. �After getting the I/Q > phase angle, I decide which quadrant I'm in and use the center > of that quadrant as the "Phase Setpoint". �I then use the > difference between the measured I/Q phase angle and the phase > setpoint as an error signal to adjust the VFO's phase offset > (driving the demodulated I/Q phase to the center of the > quadrant). �I also square this error and combine the result > with a fixed gain factor when calculating adjustments to the > VFO's frequency. �The net effect of this is that when the loop > is locked in the center of one quadrant, a sudden jump to the > center of another quadrant will not cause much change in the > VFO's frequency (because the squared phase error is near zero) > and it will stay phase-locked on the new baud. > > I am not married to this kludge and would happily try a better > solution, especially if it expands the range over which I can > acquire lock. �Any suggestions?are oyu trying to use the PLL to 1) recover the carrier of the QPSK 2) actually demodulate the QPSK data in the PLL control voltage? if 1, are you aware that the QPSK signal that you feed to the PLL should be fed through a nin linear ^4 to reduce the modulation and then you recover the carrier with a 1/4 phase ambiguilty if 2 then you need to divide the QPSK signal so that the phase changes do not exceed the dynamic range of the phase detector or else the loop CANNOT maintain lock as the phase of the input signal moves due to the modulation. This is true for a PLL based FM demod as well. The PLL will "cyclce slip" if the phase changes wrap around the dynmaic range of the phase detector. Mark

Reply by ●April 30, 20082008-04-30

On Apr 30, 6:17 pm, "John E. Hadstate" <jh113...@hotmail.com> wrote:> "John" <sampson...@gmail.com> wrote in message > > news:f442941a-7411-4c34-be9c-5ec46621c6eb@p25g2000hsf.googlegroups.com... > > > > > > > There is another QPSK architecture, from a great (and cheap) > > book > > called Telecommunication Systems Engineering by Lindsey & > > Simon, > > Section 2-5. I have used it and it works well. What you do is > > generate > > four phases from your NCO: sin(wt), sin(wt+pi/4), cos(wt), > > and cos(wt > > +pi/4). Your loop has four arms, each with a phase detector > > comparing > > the input signal to one of the NCO outputs. You multiply all > > the phase > > detector outputs together and pass that thru your lead-lag > > loop filter > > to control the NCO. > > > John > > By "phase detector" I assumed you meant "product mixer followed > by low-pass filter". Sorry, I had no luck with this approach > but thanks for trying to help.This approach is standard and should be workable. The PD is product + LPF for real inputs; LPF not necessary for complex baseband. John

Reply by ●April 30, 20082008-04-30

"John E. Hadstate" <jh113355@hotmail.com> wrote in message news:sI2dnTnkHZEFkGXanZ2dnUVZ_uuonZ2d@supernews.com...> Is it possible forego the joys of the Costas loop and > demodulate a scalar QPSK signal using a bandpass filter, a > Hilbert transformer and the atan2(im,re) function? > >I was just reading a paper by P. K. Jain, et. al. on carrier recovery for QPSK demodulation. In it, he shows a diagram of a Costas Loop that, if implemented in software, would contain a statement like the following: Feedback = ((QArm*Limited(IArm)) * (IArm*Limited(QArm))) The Feedback is then applied through a filter and integrator to the frequency control input of a VFO (NCO). IArm and QArm would be the LP filtered I/Q branches of the product mixer. This diagram differs from those by many other authors who show a Costas loop structure that, if implemented in software, would produce a statement like the following: Feedback = ((QArm*Limited(IArm)) - (IArm*Limited(QArm))) Notice that one of Jain's multiplications is shown by other authors as a subtraction. Does anyone know for sure which is right?

Reply by ●April 30, 20082008-04-30

On Apr 6, 3:56 pm, "John E. Hadstate" <jh113...@hotmail.com> wrote:> That's the area where I'm looking for hints. I don't have a > clue about how to recover the carrier without some sort of > feedback-driven loop.Carrier recovery seems like it should just be a form of localized frequency and phase estimation. If you have the full sample vector for your signal, there's little reason to even have to run your PLL "forward" in time, much less have to deal with feedback "latency". IMHO. YMMV. -- rhn A.T nicholson d.0.t C-o-M

Reply by ●May 31, 20082008-05-31

"John E. Hadstate" <jh113355@hotmail.com> wrote in message news:sI2dnTnkHZEFkGXanZ2dnUVZ_uuonZ2d@supernews.com...> Is it possible forego the joys of the Costas loop and > demodulate a scalar QPSK signal using a bandpass filter, a > Hilbert transformer and the atan2(im,re) function? > >After extensive tests, I've hit upon one robust, sure-fire system for demodulating long-duration QPSK. (This system is not especially useful for signals that occur in short bursts.) As always with this type of system, you will probably need to re-map your recovered dibits based on some knowledge of the signal's contents and internal structure. In my implementation, all filters were two-pole IIR filters. The low-pass filters were designed by applying the BLT to Butterworth pole placements from the analog domain. The band-pass filters were designed with complex-conjugate poles just inside the unit circle and on the radial lines corresponding to the desired center frequency. All of the critical frequencies were either a multiple or a fraction of the baud rate of the dibits. Here's the block diagram in text form: 1. Re-tune the QPSK signal so that its frequency is an integral multiple of the baud rate. To do this, you need to have some estimate of frequency of the incoming signal. You don't necessarily know the exact frequency of the original signal, but you must estimate "close enough". Initialize a frequency accumulator to the re-tuned frequency. 2. Square the signal from (1). Bandpass filter around 2x the nominal (re-tuned) frequency. 3. Square the signal from (2). Bandpass filter around 4x the nominal (re-tuned) frequency. 4. Multiply the signal from (3) by a sin and cos from a quadrature Numerically Controlled Oscillator (NCO) running at 4x the frequency indicated by the frequency accumulator. 5. Low-pass filter the I and Q arms to remove the 8x component. Note: At this point you are dealing with frequencies of at least 8x the re-tuned signal (which might be higher than the frequency of your original signal). Make sure your sample rate is adequate to handle these frequencies. 6. Use the first difference of atan2(Q,I) to estimate the rate-of-change of phase angle between I and Q. Unwrap this result so it stays between -Pi and +Pi. Using this technique makes your PLL's loop gain less vulnerable to changes in signal level. 7. Filter the phase rate-of-change, multiply by a gain constant and subtract it from the frequency accumulator. (This is the same frequency accumulator that is multiplied by 4 and used as the control frequency of the NCO in step (4). At this point, if you've got all the filters right and the gain right, you will have constructed a PLL that will lock-up fairly quickly at a frequency of 4x the re-tuned frequency and it will follow changes in the carrier frequency of the re-tuned signal. The double squaring will have wiped out most of the effect of modulation on the frequency estimation. 8. Apply the frequency from the frequency accumulator in (7) directly to another quadrature NCO. It is this NCO that produces the reconstructed carrier. 9. Multiply the re-tuned signal from (1) by the sin and cos from the NCO in (8). 10. Low-pass filter the I and Q arms from (9) to eliminate the 2x frequency. 11. Look at the signs of the signal on the I and Q arms in (10) to decide which quadrant the signal is in. You have to invent the necessary logic to synchronize, decimate, and recover the demodulated dibits. Hint: it helps if you sampled the incoming signal at a rate that was an integral multiple of the baud rate (in addition to being at least 16x the re-tuned frequency).

Reply by ●June 1, 20082008-06-01

On Sat, 31 May 2008 22:48:04 -0400, "John E. Hadstate" <jh113355@hotmail.com> wrote:> >"John E. Hadstate" <jh113355@hotmail.com> wrote in message >news:sI2dnTnkHZEFkGXanZ2dnUVZ_uuonZ2d@supernews.com... >> Is it possible forego the joys of the Costas loop and >> demodulate a scalar QPSK signal using a bandpass filter, a >> Hilbert transformer and the atan2(im,re) function? >> >> > >After extensive tests, I've hit upon one robust, sure-fire >system for demodulating long-duration QPSK. (This system is >not especially useful for signals that occur in short bursts.) >As always with this type of system, you will probably need to >re-map your recovered dibits based on some knowledge of the >signal's contents and internal structure. > >In my implementation, all filters were two-pole IIR filters. >The low-pass filters were designed by applying the BLT to >Butterworth pole placements from the analog domain. The >band-pass filters were designed with complex-conjugate poles >just inside the unit circle and on the radial lines >corresponding to the desired center frequency. All of the >critical frequencies were either a multiple or a fraction of >the baud rate of the dibits. > >Here's the block diagram in text form: > >1. Re-tune the QPSK signal so that its frequency is an >integral multiple of the baud rate. To do this, you need to >have some estimate of frequency of the incoming signal. You >don't necessarily know the exact frequency of the original >signal, but you must estimate "close enough". Initialize a >frequency accumulator to the re-tuned frequency. > >2. Square the signal from (1). Bandpass filter around 2x the >nominal (re-tuned) frequency. > >3. Square the signal from (2). Bandpass filter around 4x the >nominal (re-tuned) frequency. > >4. Multiply the signal from (3) by a sin and cos from a >quadrature Numerically Controlled Oscillator (NCO) running at >4x the frequency indicated by the frequency accumulator. > >5. Low-pass filter the I and Q arms to remove the 8x >component. > >Note: At this point you are dealing with frequencies of at >least 8x the re-tuned signal (which might be higher than the >frequency of your original signal). Make sure your sample rate >is adequate to handle these frequencies. > >6. Use the first difference of atan2(Q,I) to estimate the >rate-of-change of phase angle between I and Q. Unwrap this >result so it stays between -Pi and +Pi. Using this technique >makes your PLL's loop gain less vulnerable to changes in signal >level. > >7. Filter the phase rate-of-change, multiply by a gain >constant and subtract it from the frequency accumulator. (This >is the same frequency accumulator that is multiplied by 4 and >used as the control frequency of the NCO in step (4). > >At this point, if you've got all the filters right and the gain >right, you will have constructed a PLL that will lock-up fairly >quickly at a frequency of 4x the re-tuned frequency and it will >follow changes in the carrier frequency of the re-tuned signal. >The double squaring will have wiped out most of the effect of >modulation on the frequency estimation. > >8. Apply the frequency from the frequency accumulator in (7) >directly to another quadrature NCO. It is this NCO that >produces the reconstructed carrier. > >9. Multiply the re-tuned signal from (1) by the sin and cos >from the NCO in (8). > >10. Low-pass filter the I and Q arms from (9) to eliminate the >2x frequency. > >11. Look at the signs of the signal on the I and Q arms in (10) >to decide which quadrant the signal is in. You have to invent >the necessary logic to synchronize, decimate, and recover the >demodulated dibits. Hint: it helps if you sampled the incoming >signal at a rate that was an integral multiple of the baud rate >(in addition to being at least 16x the re-tuned frequency). >Sounds interesting, but what problem does this solve? Or is it just a processing experiment? My guess is that it may not perform well in noise, since the double-squaring of a noisy signal can get ugly in a hurry. Since that's the reference for your ultimate demodulation, I suspect performance in noise or other impairments may suffer. Interesting architecture, though. Eric Jacobsen Minister of Algorithms Abineau Communications http://www.ericjacobsen.org Blog: http://www.dsprelated.com/blogs-1/hf/Eric_Jacobsen.php

Reply by ●June 1, 20082008-06-01

On May 31, 10:48 pm, "John E. Hadstate" <jh113...@hotmail.com> wrote:> "John E. Hadstate" <jh113...@hotmail.com> wrote in messagenews:sI2dnTnkHZEFkGXanZ2dnUVZ_uuonZ2d@supernews.com... > > > Is it possible forego the joys of the Costas loop and > > demodulate a scalar QPSK signal using a bandpass filter, a > > Hilbert transformer and the atan2(im,re) function? > > After extensive tests, I've hit upon one robust, sure-fire > system for demodulating long-duration QPSK. (This system is > not especially useful for signals that occur in short bursts.) > As always with this type of system, you will probably need to > re-map your recovered dibits based on some knowledge of the > signal's contents and internal structure. > > In my implementation, all filters were two-pole IIR filters. > The low-pass filters were designed by applying the BLT to > Butterworth pole placements from the analog domain. The > band-pass filters were designed with complex-conjugate poles > just inside the unit circle and on the radial lines > corresponding to the desired center frequency. All of the > critical frequencies were either a multiple or a fraction of > the baud rate of the dibits. > > Here's the block diagram in text form: > > 1. Re-tune the QPSK signal so that its frequency is an > integral multiple of the baud rate. To do this, you need to > have some estimate of frequency of the incoming signal. You > don't necessarily know the exact frequency of the original > signal, but you must estimate "close enough". Initialize a > frequency accumulator to the re-tuned frequency. > > 2. Square the signal from (1). Bandpass filter around 2x the > nominal (re-tuned) frequency. > > 3. Square the signal from (2). Bandpass filter around 4x the > nominal (re-tuned) frequency. > > 4. Multiply the signal from (3) by a sin and cos from a > quadrature Numerically Controlled Oscillator (NCO) running at > 4x the frequency indicated by the frequency accumulator. > > 5. Low-pass filter the I and Q arms to remove the 8x > component. > > Note: At this point you are dealing with frequencies of at > least 8x the re-tuned signal (which might be higher than the > frequency of your original signal). Make sure your sample rate > is adequate to handle these frequencies. > > 6. Use the first difference of atan2(Q,I) to estimate the > rate-of-change of phase angle between I and Q. Unwrap this > result so it stays between -Pi and +Pi. Using this technique > makes your PLL's loop gain less vulnerable to changes in signal > level. > > 7. Filter the phase rate-of-change, multiply by a gain > constant and subtract it from the frequency accumulator. (This > is the same frequency accumulator that is multiplied by 4 and > used as the control frequency of the NCO in step (4). > > At this point, if you've got all the filters right and the gain > right, you will have constructed a PLL that will lock-up fairly > quickly at a frequency of 4x the re-tuned frequency and it will > follow changes in the carrier frequency of the re-tuned signal. > The double squaring will have wiped out most of the effect of > modulation on the frequency estimation. > > 8. Apply the frequency from the frequency accumulator in (7) > directly to another quadrature NCO. It is this NCO that > produces the reconstructed carrier. > > 9. Multiply the re-tuned signal from (1) by the sin and cos > from the NCO in (8). > > 10. Low-pass filter the I and Q arms from (9) to eliminate the > 2x frequency. > > 11. Look at the signs of the signal on the I and Q arms in (10) > to decide which quadrant the signal is in. You have to invent > the necessary logic to synchronize, decimate, and recover the > demodulated dibits. Hint: it helps if you sampled the incoming > signal at a rate that was an integral multiple of the baud rate > (in addition to being at least 16x the re-tuned frequency).Tell us what robust and sure-fire means in dB. What is the implementation loss at 1e-3, 1e-4, 1e-5? John

Reply by ●June 1, 20082008-06-01

John E. Hadstate wrote:> After extensive tests, I've hit upon one robust, sure-fire system for > demodulating long-duration QPSK. (This system is not especially useful > for signals that occur in short bursts.)Why reinventing a wheel? Demodulation of the long duration QPSK without noise, fading and frequency wander is a piece of cake task, and there is 10000 solutions for that.> As always with this type of > system, you will probably need to re-map your recovered dibits based on > some knowledge of the signal's contents and internal structure. > > In my implementation, all filters were two-pole IIR filters. The > low-pass filters were designed by applying the BLT to Butterworth pole > placements from the analog domain.Minor technical detail. Why does it matter?> The band-pass filters were designed > with complex-conjugate poles just inside the unit circle and on the > radial lines corresponding to the desired center frequency. All of the > critical frequencies were either a multiple or a fraction of the baud > rate of the dibits.Too many of the clever scientific words. Understood nothing.> > Here's the block diagram in text form:1. What is new about it? 2. Why this is better then a classic approach?> 1. Re-tune t QPSK signal so that its frequency is an integral > multiple of the baud rate.Having all frequencies coupled is inflexible and inconvenient.> To do this, you need to have some estimate > of frequency of the incoming signal. You don't necessarily know the > exact frequency of the original signal, but you must estimate "close > enough". Initialize a frequency accumulator to the re-tuned frequency. > > 2. Square the signal from (1). Bandpass filter around 2x the nominal > (re-tuned) frequency. > > 3. Square the signal from (2). Bandpass filter around 4x the nominal > (re-tuned) frequency.4-th order loop classics.> 4. Multiply the signal from (3) by a sin and cos from a quadrature > Numerically Controlled Oscillator (NCO) running at 4x the frequency > indicated by the frequency accumulator. > > 5. Low-pass filter the I and Q arms to remove the 8x component.Trivial implementation of a bandpass in complex domain.> Note: At this point you are dealing with frequencies of at least 8x the > re-tuned signal (which might be higher than the frequency of your > original signal). Make sure your sample rate is adequate to handle > these frequencies.Another stupid limitation.> 6. Use the first difference of atan2(Q,I) to estimate the > rate-of-change of phase angle between I and Q. Unwrap this result so it > stays between -Pi and +Pi. Using this technique makes your PLL's loop > gain less vulnerable to changes in signal level.And less noise resistant, too.> 7. Filter the phase rate-of-change, multiply by a gain constant and > subtract it from the frequency accumulator. (This is the same frequency > accumulator that is multiplied by 4 and used as the control frequency of > the NCO in step (4).This could be done much simpler.> At this point, if you've got all the filters right and the gain right, > you will have constructed a PLL that will lock-up fairly quickly at a > frequency of 4x the re-tuned frequency and it will follow changes in the > carrier frequency of the re-tuned signal.Not any different from the 4-th order Costas Loop.> The double squaring will have > wiped out most of the effect of modulation on the frequency estimation.Classics. So what is new?> 8. Apply the frequency from the frequency accumulator in (7) directly > to another quadrature NCO. It is this NCO that produces the > reconstructed carrier.So?> 9. Multiply the re-tuned signal from (1) by the sin and cos from the > NCO in (8).So?> 10. Low-pass filter the I and Q arms from (9) to eliminate the 2x > frequency.So?> 11. Look at the signs of the signal on the I and Q arms in (10) to > decide which quadrant the signal is in. You have to invent the > necessary logic to synchronize, decimate, and recover the demodulated > dibits. Hint: it helps if you sampled the incoming signal at a rate > that was an integral multiple of the baud rate (in addition to being at > least 16x the re-tuned frequency).What is the point of this very trivial exersize? Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com