QPSK modulation and demodulation process, including serial-to-parallel conversion, level conversion, carrier modulation, coherent demodulation, sampling judgment, etc.

Table of contents

1. Theoretical basis

2. Core program

3. Simulation conclusion


1. Theoretical basis

The QPSK signal can be regarded as the synthesis of two carrier-orthogonal 2PSK signals, so the QPSK positive modulator can refer to the communication principle

        Through the above modulation of QPSK signal, we have a deeper understanding of QPSK. Then its demodulation can be demodulated by a demodulation method similar to that of 2PSK signal. The in-phase branch and the quadrature branch are respectively demodulated by coherent demodulation, and then the sum of the two can be obtained, and the parallel data obtained by the up and down paths can be restored to serial data through sampling judgment and a serial/parallel switch.

QPSK demodulation principle:

        Quaternary phase-shift modulation uses four different phase differences of the carrier to represent the input digital information, which is quaternary phase-shift keying. QPSK is a phase modulation technology when M=4. It specifies four carrier phases, which are 45°, 135°, 225°, and 315°. The data input by the modulator is a binary digital sequence, in order to be compatible with quaternary The carrier phase of the binary data needs to be converted into quaternary data, which means that every two bits in the binary digital sequence need to be divided into groups, and there are four combinations, namely 00, 01, 10, 11, of which Each group is called a dibit symbol. Each double-bit symbol is composed of two binary information bits, which respectively represent one of the four symbols in the quaternary system.
 

2. Core program

................................................................
     y3=z2.*y2;
    subplot(212)
    plot(t1,y3)
    axis([0 0.4 -3 3 ]);
     title('Q支路分量相干解调信号')
    xlabel('时间/s')
    ylabel('幅值')
    grid on;
%加噪信号通过滤波器    
    [b,a]=butter(3,0.1);
   x3=filter(b,a,x3);
    [b,a]=butter(2,0.1);
   y3=filter(b,a,y3);
    figure(6)
   subplot(211)
   plot(t1,x3);
  axis([0 0.2 -3 3 ]);
   title('I支路分量相干解调信号通过滤波器')
    xlabel('时间/s')
    ylabel('幅值')
    grid on;
   subplot(212)
   plot(t1,y3);
    axis([0 0.2 -3 3 ]);
     title('Q支路分量相干解调通过滤波器')
    xlabel('时间/s')
    ylabel('幅值')
    grid on;
   out1=zeros(1,length(x3)/(2*N_samples));
   for i=0:(N/2-1)
if(x3(N_samples*i+N_samples/2)>0) 
           out1(i+1)=1;
       else
           out1(i+1)=-1;
       end
   end
   out2=zeros(1,length(y3)/(2*N_samples));
   for j=0:(N/2-1)
       if(((y3(N_samples/4+N_samples*j)+y3((N_samples*3)/4+N_samples*j))/2)>0) 
           out2(j+1)=1;
       else
           out2(j+1)=-1;
       end
   end
   out=zeros(1,length(bitstream)); 
    for k=1:length(bitstream)/2
        out(2*(k-1)+1)=out1(k);  
        out(2*(k-1)+2)=out2(k);
    end
  figure(7)
  subplot(211)
  stem(out);
  title('QPSK输出信号')
  ylabel('幅值')
  axis([0 8 -1 1]);
    spectrum=(real(fft(z1,10*length(z1)))).^2;
    S_spectrum=spectrum(1:length(spectrum)/2);
  subplot(212)
    F=0:fs/(2*length(S_spectrum)):fs/2-fs/(2*length(S_spectrum));
    plot(F,10*log10(S_spectrum))
    axis([0 50 0 60]);
    title('QPSK信号功率谱密度')
    xlabel('频率/Hz')
    ylabel('功率')
    snr=0:0.5:10;    
ber=1-(1-1/2*erfc(sqrt(0.4*snr))).^2;
    figure(8)
   semilogy(log(snr),ber,'-b*')
 title('QPSK信号误码率分析')
    xlabel('信噪比')
    ylabel('误码率')  
up143

3. Simulation conclusion

        The symbols of the I channel are odd-numbered symbols, and the symbols of the Q channel are even-numbered symbols. After the two are combined, the so-called quadrature phase shift keying (QPSK) is obtained, that is, quaternary absolute phase modulation 4PSK. Its modulation and demodulation is carried out according to the procedure in the appendix below. QPSK is composed of two BPSK signals, and the two signals are orthogonal to each other, that is, the phase difference is 90o. The two BPSK signals are added to obtain the QPSK signal. The diagram shown below is the symbol situation of the I road and the Q road:

 

 

 

 

Guess you like

Origin blog.csdn.net/ccsss22/article/details/130187660