5
$\begingroup$

I'm currently devising a solution for demodulating a DPSK signal in C#. So far I've got a working FFT with phase detection, BUT:

I now have an issue of aligning the window of the FFT to synchronise with each symbol transmitted on the audio stream - now I've done some manual testing and for a test transmission I rendered, and I have symbols with a window width of 19 samples.

I do understand that DPSK is designed to avoid a reference signal for demodulating the input signal but FFT window alignment is still needed.

Now the problem is that because this will be potentially used on amateur radio where transmission times are entirely random, the alignment of each symbol will have to be determined. The transmission I rendered has a clock timing header of 1024 symbols, but how can I be sure to get the alignment right?

For example, the header is like:

1 0 1 0 1 0 1 0 etc etc

and the phase of the sine wave rendered from this bit stream would be:

0, 90 0, 90, 0, 90 etc etc

How can I make sure that the receiver will determine the transmitted phase and not anything like

15, 105 ,15, 105, etc etc

as this would also introduce spurious phase calculations from the FFT detecting the higher-frequency harmonics due to the jump in phase.

$\endgroup$
  • 7
    $\begingroup$ Is there a reason you're trying to implement the DPSK demodulator using an FFT? That's not typically the way one would do it, for the reasons you discovered and others. $\endgroup$ – Jason R Nov 29 '11 at 16:25
  • 3
    $\begingroup$ If $1~0~1~0~1\cdots$ gives phases $0~90~0~90\cdots$, then it doesn't seem like you are using DPSK at all, or there is something that you are not conveying clearly to the readership of dsp.SE. Typically, in binary antipodal PSK, the phases are $0$ and $180$, not $0$ and $90$. Assuming you meant $180$, not $90$ (or even if $90$ is correct because you are using orthogonal PSK instead of antipodal PSK), a stream of alternating phases corresponds to data of $1~1~1~1~\cdots$ in DPSK where information is conveyed by the change in phase, not the actual phase itself as in plain PSK. $\endgroup$ – Dilip Sarwate Nov 29 '11 at 17:55
4
$\begingroup$

Here are a few things that aren't right:

1) Regardless of the Carrier Synchronization: You are using 0 and 90 degrees for your signaling. You would need an I and Q channel in order to decode the signal if that were the case. For BPSK (Binary) you should be using 0 and 180 degrees. Only if you are using QPSK should you use 90 and 270 degrees, then again its just mimicking using an I and Q channels.

There is a system block diagram below that will make this more apparent.

2) DPSK does not require any phase carrier synchronization. You pay for it by halving your SNR.

Encoding DQPSK

(for BPSK, eliminate Q and sqrt(2)

I-inphase channel Bit values
Q-quadrature bit values
C = (I + J*Q)/sqrt(2); // recombined I and Q channels
for n = 0 to length( C )
    x_diff = x_diff(n-1) *C(n);  //where X(n) <0 == 0 
//X_diff is the differentially encoded channels

Decoding DQPSK

I - retrieved I channel 
Q - retrieved Q channel 
C =I + j*Q;
for n = 0 to length( C )
    decoded(n) =C(n)/decoded(n-1);  //where X(n) <0 == 0 

4) You should never see a phase value because of thresholding at the sampler block

Transmitter Block Diagram Transmitter Block Diagram

Receiver Block Diagram

Receiver Block Diagram

(Remember you can ignore anything with the Q channel path if you are using BPSK, ignore the Convolutional encoding block and the input string block this whole thing will be easier to understand) .

The Sampler block acts like a Analog to Digital Converter. It samples the output of the I and Q channels at the bitrate your transmitting at (100bits/s, 200bits/s etc) it will give you the AMPLITUDE of the signal recovered.

Because, hopefully, you've used NRZ encoding, (-1, +1) to signal 0 and 1, you must threshold your signal. All values below Zero are 0's and all values above zero are 1's. If you've used RZ encoding that is (0, 1) instead of (-1, +1) for your signaling you should threshold at 0.5.

Therefore you should NEVER work with a phase value.

5) Additional Block Diagram Information:

This is purely to be thorough and give readers a better idea about what is going on.

 1) The Users inputs a string ("Hello World" for example) this gets converted into its 
    Ascii binary value. 
3)This then gets put through a convolutional encoder, this is for feedfoward error 
  correction. This is to reduce the transmission errors due to noise in the 
  communication channel. Like power-lines or someone talking. 
4)The binary values are converted into Non-return to Zero Encoding (NRZ) this means 
  that 0's are converted to -1's and 1's are converted to +1's. 
5) differential encoding is applied to eliminate the need for carrier (discussed above)
    synchronization. 
6)The Signal is split into the I and Q channels (all even bits go to Q. All odd bits 
   go to the I channel) 
7) They are then shaped into pulses by the wave generator. 
8) An Inter-Symbol Interference filter is applied (root raised cosine filter).
9)The I and Q channels are multipled by cosine and sine (same frequency, just shifted
    90 degrees) then recombined and transmitted. 
10)The Receiver process is the same thing as the transmitter in reverse except:
   Convolutional Decoder: Use the Viterbi algorithm. 
   Detector Block - this is where the NRZ thresholding takes place, values greater 
   than Zero  are 1's values less than Zero are 0's

6) Working with M-ary (like Bin-ary, or trin-ary)

If you want to work with more data points in QPSK, you need to generate your constellation diagram.

Remember that all points on a QPSK system should lie on a circle.

Think of each point as a combination of the I and Q channels and not as purely a Phase value used for signaling.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.