• wz-21
    了解作者
  • matlab
    开发工具
  • 7KB
    文件大小
  • zip
    文件格式
  • 1
    收藏次数
  • 10 积分
    下载积分
  • 20
    下载次数
  • 2020-07-29 22:16
    上传日期
OFDM系统的数字预失真系统,记忆多项式,LMS算法
dpd.zip
  • dpd
  • memoryless_model.m
    9.1KB
  • PA_model.m
    336B
  • memory_model_odd_only.m
    4.8KB
  • PD_model.m
    551B
  • memory_model.m
    9.5KB
内容介绍
clc clear all close all %% ***************parameters*********** Fs = 8e6; symbol_len = 1000; M_ary = 16; fft_len = 512; Gain = 5; %% ************data ofdm modulation**************** data_org = round(rand(symbol_len,1)*(M_ary-1)); data_mod = qammod(data_org,M_ary); zeros_is = zeros(8*fft_len - symbol_len,1); tx_data_pre = [data_mod(1:symbol_len/2);zeros_is;data_mod(symbol_len/2+1:end)]; tx_data = ifft(tx_data_pre,8*fft_len); tx_1 = 0.5*tx_data/max(abs(tx_data)); % tx_1 = tx_data; %% *********************PA model momory************** K_memory = 7; M_deep = 4; rx_data = [tx_1(1:end)]; % rx_data = [tx_data(1:end)]; %% ********* m=4 k=5 ************* % [rx,a] = PA_model(M_deep,K_memory,rx_data); % rx = sum(rx.').'; % a = randn(28,1)+1j*randn(28,1); a = [0.233004622674191 + 0.635198869540073i;-1.33659184382657 + 3.58423828584056i;0.307399801776761 + 0.746945223401237i;-1.43959451786254 + 0.995943357414700i;-0.247567484016746 - 0.944308608625685i;-0.179746989274769 - 0.264766360263147i;-2.12071083467500 - 0.998874276194135i;-0.199778346097114 - 0.0349010207117241i;-0.0433749203131160 - 0.195849197908969i;-0.0831975500635525 + 0.387472108984295i;0.138673457588717 - 0.402120082194563i;0.376839773825889 - 0.375100094597520i;0.195481268033665 - 0.335667680261770i;-0.373788165245229 + 0.299303586759484i;-0.0140837800574261 - 0.101962247936442i;0.0139289204937632 - 0.102250787671813i;-0.0887218404730627 + 0.0495666479273904i;0.0982653176405963 + 0.0124074020450156i;0.0297301728690021 + 0.00143939195244749i;0.0429304120548688 + 0.0609118671236067i;-0.0373988564605405 - 0.0362804181927936i;-0.0116630076241321 + 0.0119338058512951i;-0.00258461440441549 + 0.00884146553253109i;-0.0153983575198869 - 0.00440857897465475i;-0.00236366532830665 - 0.0209727083608123i;-0.0179858916115080 - 0.00374056001510196i;0.00835712312429216 + 0.0199052139865074i;-0.0229807289775089 - 0.00271034775419245i]; % a(8:14) = (1/(2^1))*a(8:14); % a(15:21) = (1/(2^3))*a(15:21); % a(22:28) = (1/(2^5))*a(22:28); % a = [0.401712506049657 + 0.630847704336072i;1.89552042416265 - 0.500229182802975i;0.617319568038694 - 1.55438259132475i;-1.10599279333370 - 0.995994700803099i;1.23697622920639 - 0.549769928217911i;-1.03786117202721 - 0.786904090085203i;0.434987785653903 + 0.548482563326077i;-0.249394678300251 + 1.08269226642537i;-0.179369620235002 + 0.715623263238030i;-1.20882850263235 + 1.35449763285999i;-0.184792375626356 + 1.32596314789138i;-0.0570000390931970 + 0.929411533342424i;-1.41439486237484 + 0.435207635482783i;-0.875147973361136 - 1.03504000288016i;1.14423780606586 - 0.430758164852653i]; w = 0.0; f = w*ones(28,1)+w*1j*ones(28,1); % p = 0*ones(15,1)+1j*0*ones(15,1); % f = [p,f]; zn_f = zeros(length(tx_1)+M_deep-1,1)+1j*zeros(length(tx_1)+M_deep-1,1); zn_f1 = [zeros(1,1);zn_f(1:end-1)]; zn_f2 = [zeros(2,1);zn_f(1:end-2)]; zn_g = zeros(length(tx_1)+M_deep-1,1)+1j*zeros(length(tx_1)+M_deep-1,1); yn = zeros(length(tx_1),1)+1j*zeros(length(tx_1),1); pp = zeros(length(tx_1),1)+1j*zeros(length(tx_1),1); % rx_data = rx_data; u = 0.05; Pn = eye(5)+1j*eye(5); G = 0.5/max(abs(tx_data)); % a = a*G; % G = 1; % rx_data1 = [rx_data,rx_data.*(abs(rx_data).^1),rx_data.*(abs(rx_data).^2)... % ,rx_data.*(abs(rx_data).^3),rx_data.*(abs(rx_data).^4)]*a; px_data = [rx_data]; px_data1 = [zeros(1,1);px_data(1:end-1)]; px_data2 = [zeros(2,1);px_data(1:end-2)]; px_data3 = [zeros(3,1);px_data(1:end-3)]; tic for jj = 1:300 for ii = 1:length(tx_1) % % zn = [px_data(ii),px_data(ii)*(abs(px_data(ii)).^2),px_data(ii)*(abs(px_data(ii)).^3)... % ,px_data(ii)*(abs(px_data(ii)).^3),px_data(ii)*(abs(px_data(ii)).^4)]; % % zn1 = [px_data1(ii),px_data1(ii)*(abs(px_data1(ii)).^1),px_data1(ii)*(abs(px_data1(ii)).^2)... % ,px_data1(ii)*(abs(px_data1(ii)).^3),px_data1(ii)*(abs(px_data1(ii)).^4)]; % % zn2 = [px_data2(ii),px_data2(ii)*(abs(px_data2(ii)).^1),px_data2(ii)*(abs(px_data2(ii)).^2)... % ,px_data2(ii)*(abs(px_data2(ii)).^3),px_data2(ii)*(abs(px_data2(ii)).^4)]; zn = [px_data(ii),px_data(ii)*(abs(px_data(ii)).^1),px_data(ii)*(abs(px_data(ii)).^2),... px_data(ii)*(abs(px_data(ii)).^3),px_data(ii)*(abs(px_data(ii)).^4),... px_data(ii)*(abs(px_data(ii)).^5), px_data(ii)*(abs(px_data(ii)).^6)]; zn1 = [px_data1(ii),px_data1(ii)*(abs(px_data1(ii)).^1),px_data1(ii)*(abs(px_data1(ii)).^2),... px_data1(ii)*(abs(px_data1(ii)).^3),px_data1(ii)*(abs(px_data1(ii)).^4),... px_data1(ii)*(abs(px_data1(ii)).^5), px_data1(ii)*(abs(px_data1(ii)).^6)]; zn2 = [px_data2(ii),px_data2(ii)*(abs(px_data2(ii)).^1),px_data2(ii)*(abs(px_data2(ii)).^2),... px_data2(ii)*(abs(px_data2(ii)).^3),px_data2(ii)*(abs(px_data2(ii)).^4),... px_data2(ii)*(abs(px_data2(ii)).^5), px_data2(ii)*(abs(px_data2(ii)).^6)]; zn3 = [px_data3(ii),px_data3(ii)*(abs(px_data3(ii)).^1),px_data3(ii)*(abs(px_data3(ii)).^2),... px_data3(ii)*(abs(px_data3(ii)).^3),px_data3(ii)*(abs(px_data3(ii)).^4),... px_data3(ii)*(abs(px_data3(ii)).^5), px_data3(ii)*(abs(px_data3(ii)).^6)]; zn = [zn,zn1,zn2,zn3]; zn_f(ii+M_deep-1) = (zn*a)/G; Yn= [zn_f(ii+M_deep-1),zn_f(ii+M_deep-1)*(abs(zn_f(ii+M_deep-1)).^1),zn_f(ii+M_deep-1)*(abs(zn_f(ii+M_deep-1)).^2),... zn_f(ii+M_deep-1)*(abs(zn_f(ii+M_deep-1)).^3),zn_f(ii+M_deep-1)*(abs(zn_f(ii+M_deep-1)).^4),... zn_f(ii+M_deep-1)*(abs(zn_f(ii+M_deep-1)).^5),zn_f(ii+M_deep-1)*(abs(zn_f(ii+M_deep-1)).^6)]; Yn1= [zn_f(ii+M_deep-2),zn_f(ii+M_deep-2)*(abs(zn_f(ii+M_deep-2)).^1),zn_f(ii+M_deep-2)*(abs(zn_f(ii+M_deep-2)).^2),... zn_f(ii+M_deep-2)*(abs(zn_f(ii+M_deep-2)).^3),zn_f(ii+M_deep-2)*(abs(zn_f(ii+M_deep-2)).^4),... zn_f(ii+M_deep-2)*(abs(zn_f(ii+M_deep-2)).^5),zn_f(ii+M_deep-2)*(abs(zn_f(ii+M_deep-2)).^6)]; Yn2= [zn_f(ii+M_deep-3),zn_f(ii+M_deep-3)*(abs(zn_f(ii+M_deep-3)).^1),zn_f(ii+M_deep-3)*(abs(zn_f(ii+M_deep-3)).^2),... zn_f(ii+M_deep-3)*(abs(zn_f(ii+M_deep-3)).^3),zn_f(ii+M_deep-3)*(abs(zn_f(ii+M_deep-3)).^4),... zn_f(ii+M_deep-3)*(abs(zn_f(ii+M_deep-3)).^5),zn_f(ii+M_deep-3)*(abs(zn_f(ii+M_deep-3)).^6)]; Yn3= [zn_f(ii+M_deep-4),zn_f(ii+M_deep-4)*(abs(zn_f(ii+M_deep-4)).^1),zn_f(ii+M_deep-4)*(abs(zn_f(ii+M_deep-4)).^2),... zn_f(ii+M_deep-4)*(abs(zn_f(ii+M_deep-4)).^3),zn_f(ii+M_deep-4)*(abs(zn_f(ii+M_deep-4)).^4),... zn_f(ii+M_deep-4)*(abs(zn_f(ii+M_deep-4)).^5),zn_f(ii+M_deep-4)*(abs(zn_f(ii+M_deep-4)).^6)]; Yn = [Yn,Yn1,Yn2,Yn3]; zn_g(ii) = Yn*f; en(jj) = px_data(ii) - zn_g(ii); % if (abs(en)<0.01) % u = u/10; % end f = f + u*en(jj)* Yn'; end rx2 = [zeros(1,1);rx_data(1:end-1)]; rx3 = [zeros(2,1);rx_data(1:end-2)]; rx4 = [zeros(3,1);rx_data(1:end-3)]; X = [rx_data,rx_data.*abs(rx_data).^1,rx_data.*abs(rx_data).^2,rx_data.*abs(rx_data).^3,... rx_data.*abs(rx_data).^4,rx_data.*abs(rx_data).^5,rx_data.*abs(rx_data).^6]; X2 = [rx2,rx2.*abs(rx2).^1,rx2.*abs(rx2).^2,rx2.*abs(rx2).^3,... rx2.*abs(rx2).^4,rx2.*abs(rx2).^5,rx2.*abs(rx2).^6]; X3 = [rx3,rx3.*abs(rx3).^1,rx3.*abs(rx3).^2,rx3.*abs(rx3).^3,... rx3.*abs(rx3).^4,rx3.*abs(rx3).^5,rx3.*abs(rx3).^6]; X4 = [rx4,rx4.*abs(rx4).^1,rx4.*abs(rx4).^2,rx4.*abs(rx4).^3,... rx4.*abs(rx4).^4,rx4.*abs(rx4).^5,rx4.*abs(rx4).^6]; X = [X,X2,X3,X4]; px_data = X*f; px_data1 = [zeros(1,1);px_data(1:end-1)]; px_data2 = [zeros(2,1);px_data(1:end-2)]; px_data3 = [zeros(3,1);px_data(1:end-3)]; zn_f1 = [zeros(1,1);zn_f(1:end-1)]; zn_f2 = [zeros(2,1);zn_f(1:end-2)]; % Z = [z,z.*abs(z).^1,z.*abs(z).^2,z.*abs(z).^3,z.*abs(z).^4]; % rx_data = Z*a; jj end toc figure plot(abs(en)); % rx_data = tx_data; rx2 = [zeros(1,1);rx_data(1:end-1)];
评论
    相关推荐