Hi all! I'm currently working on a sound card based QPSK modem project and has just encountered some problems. I coded my program with C++ and the portaudio library which operates at a sampling rate of 12000Hz (both the transmitter and receiver sides). When I tested out the the system on the same computer (transmitter -> headphone jack -> wire -> microphone jack -> receiver), it worked well. However, when I move the receiver side to another computer, the system seemed not to work properly and a very slow shifting of the peaks on the raw waveform was observed. My professor told me this is because there's a small difference between the sampling rates of the two sides, and advised me to use something called a 'multirate interpolating filter'. But according to my observation, the difference between the sampling rates is lesser than 1 Hz, thus it seemed very difficult to recover the sampling rate by up and down sampling. What's more, I don't know how to keep the frame size consistency while doing this, because I always operate the data at a frame size of 512 doubles. It seems to be a fatal error to my algorithm if the frame becomes 511 or 513. I really have no idea now. Would you mind giving me some suggestions? Thanks. _____________________________ Posted through www.DSPRelated.com
Carrier frequency recovery in QPSK
Started by ●March 26, 2014
Reply by ●March 26, 20142014-03-26
On Wed, 26 Mar 2014 20:56:55 -0500, "babel92" <99714@dsprelated> wrote:>Hi all! > >I'm currently working on a sound card based QPSK modem project and has just >encountered some problems. >I coded my program with C++ and the portaudio library which operates at a >sampling rate of 12000Hz (both the transmitter and receiver sides). When I >tested out the the system on the same computer (transmitter -> headphone >jack -> wire -> microphone jack -> receiver), it worked well. >However, when I move the receiver side to another computer, the system >seemed not to work properly and a very slow shifting of the peaks on the >raw waveform was observed. >My professor told me this is because there's a small difference between the >sampling rates of the two sides, and advised me to use something called a >'multirate interpolating filter'. But according to my observation, the >difference between the sampling rates is lesser than 1 Hz, thus it seemed >very difficult to recover the sampling rate by up and down sampling. >What's more, I don't know how to keep the frame size consistency while >doing this, because I always operate the data at a frame size of 512 >doubles. It seems to be a fatal error to my algorithm if the frame becomes >511 or 513. >I really have no idea now. Would you mind giving me some suggestions? >Thanks. >As your professor suggested, search on "multirate filter" or "polyphase filter". A polyphase filter is a particular implementation of a multirate filter that is popular for this application. Eric Jacobsen Anchor Hill Communications http://www.anchorhill.com
Reply by ●March 26, 20142014-03-26
On Thu, 27 Mar 2014 02:02:47 GMT, eric.jacobsen@ieee.org (Eric Jacobsen) wrote:>On Wed, 26 Mar 2014 20:56:55 -0500, "babel92" <99714@dsprelated> >wrote: > >>Hi all! >> >>I'm currently working on a sound card based QPSK modem project and has just >>encountered some problems. >>I coded my program with C++ and the portaudio library which operates at a >>sampling rate of 12000Hz (both the transmitter and receiver sides). When I >>tested out the the system on the same computer (transmitter -> headphone >>jack -> wire -> microphone jack -> receiver), it worked well. >>However, when I move the receiver side to another computer, the system >>seemed not to work properly and a very slow shifting of the peaks on the >>raw waveform was observed. >>My professor told me this is because there's a small difference between the >>sampling rates of the two sides, and advised me to use something called a >>'multirate interpolating filter'. But according to my observation, the >>difference between the sampling rates is lesser than 1 Hz, thus it seemed >>very difficult to recover the sampling rate by up and down sampling. >>What's more, I don't know how to keep the frame size consistency while >>doing this, because I always operate the data at a frame size of 512 >>doubles. It seems to be a fatal error to my algorithm if the frame becomes >>511 or 513. >>I really have no idea now. Would you mind giving me some suggestions? >>Thanks. >> > >As your professor suggested, search on "multirate filter" or >"polyphase filter". A polyphase filter is a particular >implementation of a multirate filter that is popular for this >application. > > >Eric Jacobsen >Anchor Hill Communications >http://www.anchorhill.comHit Send a little too quickly. You'll also need to learn about timing recovery loops, which are essentially Phase Locked Loops that lock to the symbol phase and find the center sampling point of the symbol. They're also called symbol recovery loops. In your case the symbol recovery loop will steer the polyphase filter (or whatever multirate filter or resampler you choose to use) so that you get interpolated output samples aligned at the symbol centers, regardless of where the original samples were. Eric Jacobsen Anchor Hill Communications http://www.anchorhill.com
Reply by ●March 26, 20142014-03-26
What you need is this. Read as many references as you quickly can, to strengthen the understanding. http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.127.1757&rep=rep1&type=pdf _____________________________ Posted through www.DSPRelated.com
Reply by ●March 26, 20142014-03-26
> >What you need is this. Read as many references as you quickly can, to >strengthen the understanding. > >http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.127.1757&rep=rep1&type=pdf > > >_____________________________ >Posted through www.DSPRelated.com >And the topic should not be carrier frequency recovery, it's symbol timing frequency recovery. _____________________________ Posted through www.DSPRelated.com
Reply by ●March 27, 20142014-03-27
On 3/26/14 10:08 PM, Eric Jacobsen wrote: ...>> >> As your professor suggested, search on "multirate filter" or >> "polyphase filter". A polyphase filter is a particular >> implementation of a multirate filter that is popular for this >> application. >> >>in other words, "think analog".> > You'll also need to learn about timing recovery loops, which are > essentially Phase Locked Loops that lock to the symbol phase and find > the center sampling point of the symbol. They're also called symbol > recovery loops. In your case the symbol recovery loop will steer the > polyphase filter (or whatever multirate filter or resampler you choose > to use) so that you get interpolated output samples aligned at the > symbol centers, regardless of where the original samples were. >that's the main thing. Eric, i dunno how you do such a thing unless it is known that you get some kinda header that has all 0's or all 1's or 01010101 or something like that. without such a header, how do you a grip on it? -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
Reply by ●March 27, 20142014-03-27
On Wed, 26 Mar 2014 23:30:41 -0400, robert bristow-johnson <rbj@audioimagination.com> wrote:>On 3/26/14 10:08 PM, Eric Jacobsen wrote: >... >>> >>> As your professor suggested, search on "multirate filter" or >>> "polyphase filter". A polyphase filter is a particular >>> implementation of a multirate filter that is popular for this >>> application. >>> >>> > >in other words, "think analog". > >> >> You'll also need to learn about timing recovery loops, which are >> essentially Phase Locked Loops that lock to the symbol phase and find >> the center sampling point of the symbol. They're also called symbol >> recovery loops. In your case the symbol recovery loop will steer the >> polyphase filter (or whatever multirate filter or resampler you choose >> to use) so that you get interpolated output samples aligned at the >> symbol centers, regardless of where the original samples were. >> > >that's the main thing. > >Eric, i dunno how you do such a thing unless it is known that you get >some kinda header that has all 0's or all 1's or 01010101 or something >like that. without such a header, how do you a grip on it?Timing Error Detector. There are a number of varieties, many require only one sample per symbol. No special training sequence is needed, just a decent amount of entropy in the signal.> >-- > >r b-j rbj@audioimagination.com > >"Imagination is more important than knowledge." > >Eric Jacobsen Anchor Hill Communications http://www.anchorhill.com
Reply by ●March 27, 20142014-03-27
On Wed, 26 Mar 2014 21:22:10 -0500, "commsignal" <58672@dsprelated> wrote:>> >>What you need is this. Read as many references as you quickly can, to >>strengthen the understanding. >> >>http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.127.1757&rep=rep1&type=pdf >> >> >>_____________________________ >>Posted through www.DSPRelated.com >> > >And the topic should not be carrier frequency recovery, it's symbol timing >frequency recovery.Nitpick: actually symbol timing phase recovery. Eric Jacobsen Anchor Hill Communications http://www.anchorhill.com
Reply by ●March 27, 20142014-03-27
>>And the topic should not be carrier frequency recovery, it's symboltiming>>frequency recovery. > >Nitpick: actually symbol timing phase recovery. > > >Eric Jacobsen >Anchor Hill Communications >http://www.anchorhill.com >:) OP wrote "a very slow shifting of the peaks on the raw waveform was observed." And "I don't know how to keep the frame size consistency while doing this, because I always operate the data at a frame size of 512 doubles. It seems to be a fatal error to my algorithm if the frame becomes 511 or 513." So his main purpose in addition to having a symbol timing phase recovery loop is to achieve symbol frequency recovery. _____________________________ Posted through www.DSPRelated.com
Reply by ●March 27, 20142014-03-27
On Wed, 26 Mar 2014 23:11:32 -0500, "commsignal" <58672@dsprelated> wrote:>>>And the topic should not be carrier frequency recovery, it's symbol >timing >>>frequency recovery. >> >>Nitpick: actually symbol timing phase recovery. >> >> >>Eric Jacobsen >>Anchor Hill Communications >>http://www.anchorhill.com >> > >:) >OP wrote "a very slow shifting of the peaks on the raw waveform was >observed." And "I don't know how to keep the frame size consistency while >doing this, because I always operate the data at a frame size of 512 >doubles. It seems to be a fatal error to my algorithm if the frame becomes >511 or 513." > >So his main purpose in addition to having a symbol timing phase recovery >loop is to achieve symbol frequency recovery.He indicated the difference between sampling rates was less than 1Hz, which explains the phenomena described and that you've quoted here. The clocks aren't phase locked, so his description is consistent with observing the symbol clock slipping phase at a 1Hz rate. Locking clock frequency comes with locking clock phase. I don't think the 1Hz frequency difference is enough to consider a significant frequency offset, since a typical general symbol recovery loop will pull that out (and likely quite a bit more). Eric Jacobsen Anchor Hill Communications http://www.anchorhill.com






