m Matlab simulation of audio signal synchronization receiver based on 16QAM modulation, including gardner symbol synchronization, carrier synchronization and CMA equalization

Table of contents

1. Algorithm simulation effect

2. Algorithms involve an overview of theoretical knowledge

3. MATLAB core program

4. Complete algorithm code file


1. Algorithm simulation effect

The matlab2022a simulation results are as follows:

Constellation diagram changes during the locking process:

Timing convergence curve:

Carrier synchronization convergence curve:

2. Algorithms involve an overview of theoretical knowledge

         The audio signal synchronization receiver based on 16QAM (Quadrature Amplitude Modulation) modulation is a complex but efficient communication system. The system mainly involves three key parts: Gardner symbol synchronization, carrier synchronization and CMA (Constant Modulus Algorithm) equalization.

1. Gardner symbol synchronization

        Gardner symbol synchronization is an algorithm for phase and frequency synchronization of digital communication systems that works at the data symbol level. This algorithm estimates and tracks the phase and frequency of the received signal through a special filter (Gardner or Dragone filter). This filter attempts to minimize the difference between the received signal and the ideal signal, thereby providing an accurate phase and frequency estimate.

         Gardner timing error algorithm is usually used in BPSK and QPSK signals, and can be applied to multi-ary baseband signals such as QAM through improvements. Gardner timing error algorithm, a feature of this algorithm is that each symbol only needs to use two sampling points, one is the strobe point, which is the best observation point, and the other is the amidrobe point, which is the sampling point between the two observation points. The function of the numerically controlled oscillator in the Gardener ring is completely different from that of the NCO in the phase-locked loop. The function of the NCO here is to generate a clock, that is, to determine the interpolation base point mk, and at the same time complete the calculation of the fractional interval uk to provide it to the interpolator for interpolation. Insert.
The numerically controlled oscillator (NCO) in the bit synchronization loop is a phase reducer, and its difference equation is:
η(m+1)=[η(m)-ω(m)]mod1

       In the formula, η(m) is the content of the m-th working clock NCO register, ω(m) is the control word of the NCO, and both are positive decimals. The working period of the NCO is T s (sampling period), the period of the interpolator is Ti, and ω (m) is adjusted by the loop filter so that the NCO overflows at the best sampling moment.

2. Carrier synchronization

       Carrier synchronization is the part used to extract phase and frequency information from the received signal. It is mainly used to eliminate possible carrier deviations in the received signal. This deviation may be caused by frequency desynchronization of the transmitting and receiving equipment or by multipath effects. Costas Loop is used for carrier frequency recovery in coherent demodulation of suppressed carrier modulated signals (such as double sideband suppressed carrier modulation) and phase modulated signals (BPSK, QPSK). The main application of Costas rings is in wireless communication receivers. Compared with the PLL-based detector, its advantage is that when the phase difference is relatively small, the error voltage output by the Costas loop is sin(2(θi−θf)), while the error voltage output by the PLL-based detector is sin(θi−θf) , which not only doubles the sensitivity, but also makes the Costas loop particularly suitable for tracking the Doppler shift of the carrier, especially in OFDM and GPS receivers.

3. CMA equalization

        CMA (Constant Modulus Algorithm) equalization is a blind signal processing technology commonly used in digital communication systems. It is mainly used to eliminate multipath interference and channel distortion. The CMA equalizer minimizes the modulus deviation of the output signal by adjusting its weights. This means that it attempts to adjust the received signal to something close to the ideal signal shape.

        The audio signal synchronous receiver based on 16QAM modulation combines the above three parts to achieve synchronous demodulation and equalization by processing the received signal, thereby restoring the original signal.

3. MATLAB core program

........................................................................
%gardner算法开始
%gardner算法开始
len=length(out);
K=4;     %每 个符号采4个样点
Ns=len;  %总的采样点数
N=floor(Ns/K);%符号数
i=4;    %用来表示Ts的时间序号,指示n,n_temp,nco,
k=1;    %用来表示Ti时间序号,指示u,yI,yQ
ms=1;   %用来指示T的时间序号,用来指示a,b以及w
strobe=zeros(1,Ns);

c1=0.0267;   
c2=0.00035556;  %环路滤波器系数
%%%%% 仿真输入测试的PSK基带数据 %%%
aI=real(out);
aQ=imag(out);
 
ik=[];
qk=[];
ns=length(aI)-2;
length(aI);

tic;
while(i<ns)
    n_temp(i+1)=n(i)-w(ms);
    if(n_temp(i+1)>0)
        n(i+1)=n_temp(i+1);
    else
        n(i+1)=mod(n_temp(i+1),1);
        %内插滤波器模块
        FI1=0.5*aI(i+2-2)-0.5*aI(i+1-2)-0.5*aI(i-2)+0.5*aI(i-1-2);
        FI2=1.5*aI(i+1-2)-0.5*aI(i+2-2)-0.5*aI(i-2)-0.5*aI(i-1-2);
        FI3=aI(i-2);
        
.....................................................................
        end
        k=k+1;
        u(k)=n(i)/w(ms);
    end
    i=i+1;
end

toc;



 
figure;
t=0:length(u)-1;
T=1/2400;
subplot(311);
plot(t*T,u);
xlabel('运算点数');
ylabel('分数间隔');

t=0:length(time_error)-1;
T=1/2400;
subplot(312);
plot(t*T,time_error);
xlabel('运算点数');
ylabel('定时误差');
t=0:length(w)-1;
T=1/2400;
subplot(313);
t=0:length(ik)-1;
T=1/1200;
plot(t*T,ik);title('最终的基带数据I');

len=length(ik);
symbolall=ik-1i*qk;
sym=zeros(1,len);

ik=[0,ik];
 
basebandSignal=symbolall';
 

%%
%载波同步
 



tic;
T=1/FS;
Yo = [];
%给锁相环一个初始相位
Phase0 = pi/4;
for frame=1:nf 
    x        = basebandSignal(frame)*exp(sqrt(-1)*(phase*frame*T+Phase0));  %phase是反馈的调整变量,用来调整输入信号的载波频率来调整跟踪频率
    %将数据转换到基带
......................................................................
    Yo(frame)= dfrq;
end
%均衡器
OUT4 = CMA(OUT3);
OUT4 = OUT4;
toc;
LENS = 1000;%simulink设置的是1000.这里也1000.

axis([-0.5,0.5,-0.5,0.5]);
 subplot(133);
plot(real(OUT4(LENS*(i-1)+1:LENS*i)),imag(OUT4(LENS*(i-1)+1:LENS*i)),'r.');title('CMA均衡基带数据星座图');

axis([-0.5,0.5,-0.5,0.5]);
pause(0.1);
end

y=OUT4; 
T=1/2400;
Tx_real=y;
 
Tx_real=Tx_real';
t=t(1:length(Tx_real))*T;
data=[t' Tx_real];
ts2= timeseries;
ts2.Time=t';
ts2.Data=Tx_real;
save('data2.mat','-v7.3','ts2');
0X_027m

4. Complete algorithm code file

V

Guess you like

Origin blog.csdn.net/hlayumi1234567/article/details/132820508
Recommended