m simulation of DQPSK modulation and demodulation technology based on matlab

catalogue

1. Algorithm description

2. Some procedures

3. Preview of some simulation diagrams

4. Source code acquisition method

1. Algorithm description

4-digit DPSK is usually recorded as DQPSK. DQPSK signal coding method is shown in the table below:

a

b

θk

Mode A

Mode B

0

0

90°

135°

0

1

45°

1

1

270°

315°

1

0

180°

225°

In the table θ k is the phase change relative to the previous adjacent symbol. There are two ways: A and B. In mode B, there is always phase change between adjacent symbols, so it is conducive to extracting symbol synchronization at the receiving end. In addition, because the maximum phase shift of its adjacent symbol phase is ± 135 °, which is smaller than the maximum phase shift of mode a, the amplitude fluctuation of prime is also small after transmission through the band limited system. Mode B DQPSK is also called π /4DQPSK. The generation method of DQPSK is similar to that of QPSk, but DQPSK first converts the input double bit code through code type transformation, and then performs four phase absolute phase shift with the double bit code output by the code type converter, and the resulting output signal is a four phase relative phase shift signal. The commonly used methods are code transformation plus phase modulation and code transformation plus phase selection.

  • Code transformation plus phase modulation. The block diagram of DQPSK signal generated by code transformation plus phase modulation is shown in the figure below. The serial binary non return to zero bipolar symbols are transformed into two parallel symbols ab by the serial parallel converter, and transformed into relative symbols cd by the code converter. Then they are multiplied by a pair of coherent carriers respectively, and finally added to produce DQPSK signals. Different from the generation method of QPSK signal, the generation of DQPSK requires that the symbols ab after serial parallel conversion be converted into relative codes cd through the code converter, and when generating coherent carriers, two π /4 phase shifters are used to replace one π /2 phase shifter, so that the generated symbols comply with A-mode coding.

  • Code transformation plus phase selection. Its composition block diagram is shown in the following figure. In addition to selecting the phase of the carrier according to the regulations, the logic option circuit should also realize the function of converting the absolute code into the relative code. In other words, when the four phase absolute phase shift, the phase of the carrier is directly selected by the input double bit code; When four phases are relatively phase shifted, the input double bit code ab needs to be converted into the corresponding double bit code cd, and then cd is used to select the phase of the carrier, so that DQPSK signal can be generated.

2. Demodulation of DQPSK signal

The demodulation of DQPSK signal is similar to that of 2DPSK signal. There are also two methods, namely, polarity comparison method and phase comparison method.

  • Polarity comparison method. Its principle block diagram is shown in the figure below. Since DQPSK signal can be regarded as the synthesis of two 2DPSK signals, and it can also be demodulated according to two 2DPSK signals respectively during demodulation, it is easy to separate these two orthogonal 2DPSK signals by demodulating with two coherent carriers in the demodulation process. After low-pass filtering and sampling decision, the relative relative code is recovered, and then transformed into absolute code by code inverse converter, so as to recover the transmitted binary information.

  • Phase comparison method. Its principle block diagram is shown in the figure below. When demodulating with this method, there is no need for a special coherent carrier, just delay the received signal by a symbol interval T, and then multiply it by the signal itself. Multiplication plays the role of phase comparison. The multiplication result reflects the phase difference between the front and rear symbols. After low-pass filtering and sampling decision, the original digital information can be directly recovered, so the code inverse converter is not needed in the demodulator.

2. Some procedures

%pi/4-DQPSK Monte Carlo simulation of modulation and demodulation system

N = 10000;                            %Simulation quantity size
EbN0_indB = -2 : 0.5 : 12;            %Simulated SNR points
EbN0 = 10.^(EbN0_indB/10);            %dB Convert to natural value
times = 50;                           %Simulation times
err_rate = zeros(length(EbN0),times);

for ii = 1 : length(EbN0)
        for i = 1 : times
            r = rand(1,2*N);
            source = r>0.5;           %Generate binary source
            b = 1 - 2*source;         %Change to reverse polarity           
            bI = zeros(1,N);          %In phase branch
            I = zeros(1,N);
            bQ = zeros(1,N);          %Orthogonal branch
            Q = zeros(1,N);
            delta = zeros(1,N);       %Carrier phase difference
            for n = 1 : N             %Serial parallel transformation
                bI(n) = b(2*n);
                bQ(n) = b(2*n-1);
                if n == 1             %Differential coding  
                    I(n) = (bI(n)*bI(n) - bQ(n)*bQ(n))/sqrt(2);
                    Q(n) = (bQ(n)*bI(n) + bI(n)*bQ(n))/sqrt(2);
                else
                    I(n) = (I(n-1)*bI(n) - Q(n-1)*bQ(n))/sqrt(2);
                    Q(n) = (Q(n-1)*bI(n) + I(n-1)*bQ(n))/sqrt(2);
                end
            end
            Eb_x = cov(I);                       %signal energy 
            Eb_y = cov(Q);
            sigma_x = sqrt(Eb_x/(2*EbN0(ii)));   %Calculate the noise variance according to the signal-to-noise ratio
            sigma_y = sqrt(Eb_y/(2*EbN0(ii)));
            noise_x = randn(1,N)*sigma_x;        %Gaussian noise generation
            noise_y = randn(1,N)*sigma_y;
            w = I + noise_x;                     %AWGN Channel transmission
            z = Q + noise_y;
            errornum_x = 0;              %Number of errors
            errornum_y = 0;
            for n = 1 : N                %Differential decoding
                if n == 1
                   x(n) = w(n)*w(n) + z(n)*z(n);
                   y(n) = z(n)*w(n) - w(n)*z(n);
                else
                   x(n) = w(n)*w(n-1) + z(n)*z(n-1);
                   y(n) = z(n)*w(n-1) - w(n)*z(n-1);
                end
                if x(n) <= 0                   %sentence x
                    result_x(n) = -1;  
                elseif x(n) > 0
                    result_x(n) = 1;
                end
                if y(n) <= 0                   %sentence y
                    result_y(n) = -1;  
                elseif y(n) > 0
                    result_y(n) = 1;
                end
                if result_x(n) ~= bI(n)        %calculation x Number of errors
                    errornum_x = errornum_x + 1; 
                end
                if result_y(n) ~= bQ(n)        %calculation y Number of errors
                    errornum_y = errornum_y + 1;
                end
                if errornum_x + errornum_y >= 100
                    break
                end
            end
            err_rate(ii,i) = (errornum_x + errornum_y)/(2*n);
        end
end

3. Preview of some simulation diagrams

 

 

4. Source code acquisition method

Method 1:

Click the download link:

m simulation of DQPSK modulation and demodulation technology based on matlab + program operation video

Acquisition method 2:

Blog resource item, search for resources with the same name as blog.

Acquisition method 3:

If the download link fails, the blogger will contact wechat.

01_051_m

Tags: MATLAB programming language

Posted by digitalbart2k on Sat, 16 Jul 2022 08:29:43 +0930