• 大小: 2.12MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-09-12
  • 语言: Matlab
  • 标签: 预失真  

资源简介

功率放大器预失真,LMS法,多项式法等matlab实现,

资源截图

代码片段和文件信息

clc;
close all;
%% 信号产生
simout=load(‘E:\预失真\仿真\zjp_pre-distoration simulation\dpdsimulation\qpsk_8000.mat‘);
simout=simout.simout;

fs=2*10^8;%采样率200Mhz
st=0:length(simout)-1;
s_qpsk=(simout.‘).*exp(j*2*pi*20000000*st/fs);%取实部为QPSK调制
%% 滤波器系数设置
N=50;%滤波器阶数
Wn1=[0.750.85];%1为fs的一半
Wn2=[0.150.25];
A=fir1(NWn1‘bandpass‘);
B=fir1(NWn2‘bandpass‘);
%% 功率放大
fc=6*10^7;%载波60MHZ
t=1:length(s_qpsk);
s_carri=s_qpsk.*exp(j*2*pi*fc*(t-1)/fs);%上变频
s_carri_b=filter(A1s_carri);%带通滤波
h = spectrum.welch; 
hpsd_carri_b=psd(hs_carri_b‘fs‘fs);
figure(1);
plot(hpsd_carri_b);%功率放大前的功率谱密度
a=[1.0513+0.0904j-0.068-0.0023j0.0289+0.0054j0.0542-0.29j0.2234+0.2317j-0.0621-0.0932j-0.9657-0.7028j-0.2451-0.3735j0.1229+0.1508j];
%a=[2.34.21.3-1.2-3.29.10.52.671.7];
HPA_s=volterra(as_carri_b);
% h=spectrum.welch;
hpsd=psd(hHPA_s‘fs‘fs);
figure(2);
plot(hpsd);
%% 预失真+功放-----多项式法
b=[1.0513+0.0904j-0.068-0.0023j0.0289+0.0054j0.0542-0.29j0.2234+0.2317j-0.0621-0.0932j-0.9657-0.7028j-0.2451-0.3735j0.1229+0.1508j];
%b=[2.34.21.3-1.2-3.29.10.52.671.7];
w=zeros(1length(b));
w=[0.01+0.01j0.01+0.01j0.01+0.01j0.01+0.01j0.01+0.01j0.01+0.01j0.01+0.01j0.01+0.01j0.01+0.01j];
%w=[0.00679765478699548-0.000259498756269653i0.00837971394159005-0.000111941227697152i0.0114287412467534+0.000135048972435035i0.00999572083062263-3.11814652641192e-07i0.00999748855999973-1.58555811669834e-07i0.0100016305410513+1.47719343296075e-07i0.00999993931875462-4.06509747496053e-09i0.00999995731939103-2.60788444989852e-09i0.0100000155833265+1.43812621935027e-09i];
s_qpsk=[00s_qpsk];
u=0.05;%LMS算法的参数
DPD_s0=zeros(1length(HPA_s)+2);
DPD_s1=zeros(1length(HPA_s)+2);
DPD_s=zeros(1length(HPA_s)+2);
LVB1=zeros(1N+1);
LVB2=zeros(1N+1);
HPA_s_p=zeros(1length(HPA_s)+2);
e=zeros(1length(HPA_s));
y=zeros(1length(HPA_s)+2);
lamda=0.99;%QRD-RLS算法的参数
y_q=zeros(1length(HPA_s)+2);
Y_q=ones(99);
X_q=zeros(19);
for n=3:length(HPA_s)+2
    %预失真
    S_qpsk=[s_qpsk(n)s_qpsk(n-1)s_qpsk(n-2)abs(s_qpsk(n))^2*s_qpsk(n)abs(s_qpsk(n-1))^2*s_qpsk(n-1)abs(s_qpsk(n-2))^2*s_qpsk(n-2)abs(s_qpsk(n))^4*s_qpsk(n)abs(s_qpsk(n-1))^4*s_qpsk(n-1)abs(s_qpsk(n-2))^4*s_qpsk(n-2)];
    DPD_s0(n)=w*S_qpsk.‘;
    %上变频
    DPD_s1(n)=DPD_s0(n)*exp(j*2*pi*fc*(n-3)/fs);
    %滤波
    LVB1=[DPD_s1(n)LVB1(1:N)];
    DPD_s(n)=A*LVB1.‘;
    %功放
    DPD_S=[DPD_s(n)DPD_s(n-1)DPD_s(n-2)abs(DPD_s(n))^2*DPD_s(n)abs(DPD_s(n-1))^2*DPD_s(n-1)abs(DPD_s(n-2))^2*DPD_s(n-2)abs(DPD_s(n))^4*DPD_s(n)abs(DPD_s(n-1))^4*DPD_s(n-1)abs(DPD_s(n-2))^4*DPD_s(n-2)];
    HPA_s_p(n)=b*DPD_S.‘;
    %下变频
    DPD_s2(n)=HPA_s_p(n)*exp(j*2*pi*fc*(n-3)/fs);
    %滤波
    LVB2=[DPD_s2(n)LVB2(1:N)];
    DPD_s3(n)= B*LVB2.‘;
    %LMS自适应算法
    y(n)=DPD_s3(n)/2;%假设功率放大4倍
    Y=[y(n)y(n-1)y(n-2)abs(y(n))^2*y(n)abs(y(n-1))^2*y(n-1)abs(y(n-2))^2*y(n-2)abs(y(n))^4*y(n)abs(y(n-1))^4*y(n-1)abs(y(n-2))^4*y(n-2)];
    e(n-2)=DPD_s0(n)-w*Y.‘;
    w=w

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       6258  2010-05-12 11:08  dpdsimulation\dpd_simulation.m

     文件        341  2010-04-12 09:25  dpdsimulation\plott.m

     文件     615673  2010-04-11 17:20  dpdsimulation\qpsk_40000.mat

     文件     123351  2010-04-11 16:27  dpdsimulation\qpsk_8000.mat

     文件    1231257  2010-04-11 19:20  dpdsimulation\qpsk_80000.mat

     文件     123107  2010-05-05 21:21  dpdsimulation\simout.mat

     文件     123248  2010-05-05 21:21  dpdsimulation\simout1.mat

     文件        413  2010-03-30 09:37  dpdsimulation\volterra.m

     目录          0  2010-10-20 09:09  dpdsimulation

----------- ---------  ---------- -----  ----

              2223648                    9


评论

共有 条评论