m Matlab simulation of communication link based on LTE, with uplink SC-FDMA and downlink OFDMA

Table of contents

1. Algorithm simulation effect

2. Summary of theoretical knowledge involved in algorithms

2.1 Downlink OFDMA

2.2 Uplink SC-FDMA

3.MATLAB core program

4. Obtain the complete algorithm code file


1. Algorithm simulation effect

The matlab2022a simulation results are as follows:

2. Summary of theoretical knowledge involved in algorithms

          LTE (Long-Term Evolution) is the next generation wireless communication technology. It uses SC-FDMA (Single-Carrier Frequency-Division Multiple Access) as the uplink transmission scheme and OFDMA (Orthogonal Frequency-Division Multiple Access) as the downlink road transmission scheme. Both technologies are multi-access technologies that enable multiple users to communicate using the same frequency band at the same time without interfering with each other.

2.1 Downlink OFDMA

Single stream + BCH encoding + QPSK + lmmse channel estimation, its approximate structure is as follows:

        SC-FDMA is a single-carrier frequency division multiple access technology. The basic idea is to convert the data symbols in the frequency domain to the time domain through the discrete Fourier transform (DFT), then add a cyclic prefix (CP) to the time domain to eliminate the multipath effect, and then send the data to the wireless channel middle. At the receiving end, after removing the cyclic prefix, the frequency domain signal is restored through the inverse discrete Fourier transform (IDFT).

  • Sender:

X[k] = Σ_{n=0}^{N-1} x[n] * e^{-jk*n/N} (0 ≤ k ≤ N-1)

Among them, X[k] is the frequency domain signal, x[n] is the time domain signal, and N is the number of subcarriers.

  • Receiving end:

x[n] = (1/N) * Σ_{k=0}^{N-1} X[k] * e^{jk*n/N} (0 ≤ n ≤ N-1)

2.2 Uplink SC-FDMA

Single stream + Turbo coding + QPSK + lmmse channel estimation, its general structure is as follows:

        OFDMA is an orthogonal frequency division multiple access technology. It divides the entire frequency band into multiple subcarriers, each of which can independently modulate a data stream. Since the subcarriers are orthogonal, multiple users can communicate using the same frequency band at the same time without interfering with each other. Let S[k] represent the data symbol on the k-th subcarrier, f[k] represent the frequency of the k-th subcarrier, and T represent the OFDM symbol period. Then sending a signal can be expressed as:

s(t) = Σ_{k=0}^{N-1} S[k] * e^{j2πf[k]*t} (0 ≤ t ≤ T)

At the receiving end, each subcarrier is demodulated through a matched filter bank to recover the original data. The demodulation formula is as follows:

Y[k] = ∫_{0}^{T} y(t) * e^{-j2πf[k]*t} dt

Among them, Y[k] is the received data on the k-th subcarrier, and y(t) is the received signal.

        Through SC-FDMA and OFDMA technologies, LTE achieves efficient spectrum utilization and multi-user access. Using SC-FDMA in the uplink can reduce the peak-to-average power ratio (PAPR), reducing the terminal's power amplifier cost and battery consumption; using OFDMA in the downlink can achieve multi-user parallel transmission and improve system throughput.

3.MATLAB core program

..................................................................
%每个SNR点上仿真若干次
for i=1:length(SNR_dB) 
    i
    Error   = 0;  
    err_all = 0;
    for iii=1:nloop(i)
        iii
        rng(iii);
       %%
        %产生测试信号
        msg       = rand(Len*Nc/4,1)>=0.5;
        %turbo编码
        seridata1 = func_turbo_code(msg,N,M);
........................................................................
        %每次仿真信道采样的开始位置
        count_begin      =(iii-1)*(5*counter);
        trms_1           = delay_avg/timeval;
        t_max            = 4e-6/timeval;
        %信道采样点数,每个调制符号采一个点
        [passchan_ofdm_symbol,H] = func_multipath_chann(Guard_int_ofdm_out,Nmultipath,Pow_avg,delay_multi,Fre_offset,timeval,counter,count_begin);
        %加入噪声 
        Rec_ofdm_symbol  = awgn(passchan_ofdm_symbol,SNR_dB(i),'measured');
        
       %%
        %开始接收
        Guard_int_remove = func_guard_interval_remove(Rec_ofdm_symbol,(fftlen+Guard_int),Guard_int,(Nc+pilot_num));
        %FFT
        fft_out          = fft(Guard_int_remove);
        %sub carrier demapping
        fft_out          = func_desubcarrierMap(fft_out);
        fft_out          = ifft(fft_out);
        %信道估计
        %LMMSE
        [Sig_Lrmmse,Hs]  = func_lmmse_estimation(fft_out,pilot_space,Pilot_seq,pilot_num,trms_1,t_max,10^(SNR_dB(i)/10));
        %解调
        Dqpsk            = func_deMapping(Sig_Lrmmse,fftlen*Nc);
        %turbo解码
        Dqpsk_decode     = [func_turbo_decode(2*Dqpsk(1:end-(Len*Nc-length(seridata1)))-1,N,M)]';
        %计算误码率
        err_num          = Len*Nc/4-length(find(msg==Dqpsk_decode(1:Len*Nc/4)));
        Error            = Error + err_num;
    end
    %计算误码率
    err_all       = err_all+Len*Nc/4;
    Err_Rate(i)   = Error/err_all/nloop(i);
end

.....................................................................

papr     = zeros(1,PAPR_len);
psFilter = r;

for n = 1:PAPR_len
    n
    tmp  = round(rand(BLOCK,2));
    tmp  = tmp*2 - 1;
    data = (tmp(:,1) + j*tmp(:,2))/sqrt(2);
    X    = fft(data);
    Y    = zeros(totalSubcarriers,1);   
    Y(1:Q:totalSubcarriers) = X;
    y    = ifft(Y);
    y_oversampled(1:Nos:Nos*totalSubcarriers) = y;
    y_result = filter(psFilter, 1, y_oversampled);
    %PAPR.
    papr(n) = 10*log10(max(abs(y_result).^2) / mean(abs(y_result).^2));
end
[X1,X2] = hist(papr,50);
N(ii,:)=X1;
Xs(ii,:)=X2;
end
figure
semilogy(Xs(1,:),1-cumsum(N(1,:))/max(cumsum(N(1,:))),'b','linewidth',2);
hold on
semilogy(Xs(2,:),1-cumsum(N(2,:))/max(cumsum(N(2,:))),'r','linewidth',2);
hold on
semilogy(Xs(3,:),1-cumsum(N(3,:))/max(cumsum(N(3,:))),'k','linewidth',2);
title ('PAPR of SC-FDMA')
xlabel ('PAPR[dB]')
ylabel ('{PAPR(PAPR>PAPR0)}')
grid on;
legend('User = 16','User = 32','User = 64');



%发送信号
figure
stem(msg(500:2000));
title('发送信号');

figure
stem(Dqpsk_decode(500:2000));
title('接收信号');




% 误码率
figure
semilogy(SNR_dB,Err_Rate,'b-o');
grid on
xlabel('SNR');
ylabel('BER');
axis([0.999,8,1e-5,1]);


%星座图
[R,C] = size(Sig_Lrmmse);
RR    = reshape(Sig_Lrmmse,[R*C,1]);
scatterplot(RR);  

save up.mat N Xs seridata RR SNR_dB Err_Rate
0X_033m

4. Obtain the complete algorithm code file

IN

Guess you like

Origin blog.csdn.net/hlayumi1234567/article/details/134471439