IQ 信号处理广泛应用于当今的通信接收机中。 所有 IQ 处理接收器结构都因 I 和 Q 分支中的幅度和相位失配而遭受问题。 IQ 不平衡在模拟前端电路中很常见,它会导致图像信号在所需信号之上产生干扰。 本章的重点是向读者介绍接收器损伤的一些基本模型,如相位不平衡、增益不平衡和直流偏移。 众所周知的 DC 偏移和 IQ 不平衡补偿技术也与代码实现和结果一起讨论。
1. IQ 不平衡是由于功率不平衡和/或由不完美的本地振荡器输出引起的 I、Q 支路的非正交性导致的非理想射频前端组件造成的。 在图1中,IQ 分支上的功率不平衡由正交分支上的增益参数 捕获。 本地振荡器输出之间的相位误差由参数 捕获。
图1
如图 2 所示,以表示跟随 RF 接收器损伤
图 2
function z=receiver_impairments(r,g,phi,dc_i,dc_q)
%Function to add receiver impairments to the IQ branches
%[z]=iq_imbalance(r,g,phi) introduces DC and IQ imbalances between the inphase and quadrature components of the complex baseband signal r.
% The model parameter g represent the gain mismatch between the IQ branches of the receiver and the parameter 'phi' represents the phase error of the local oscillator (in degrees).
% The DC biases associated with each I,Q path are represented by the paramters dc_i and dc_q.
% 将接收器损伤添加到 IQ 分支的函数
% [z]=iq_imbalance(r,g,phi) 在 复基带信号 r 的 同相 和 正交分量之间 引入 DC 和 IQ 不平衡。
% 模型参数 g 表示接收器 IQ 分支之间的 增益失配,参数“phi”表示本地振荡器的相位误差(以度为单位)。
% 与每个 I、Q 路径相关的 DC 偏置由参数 dc_i 和 dc_q 表示。
k = iq_imbalance(r,g,phi); %Add IQ imbalance % 添加IQ不平衡
z = dc_impairment(k,dc_i,dc_q); %Add DC impairment % 添加直流损伤
2. 直流偏移和补偿
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Model for introducing DC offsets in the IQ branches % 在 IQ 分支中引入 DC 偏移的模型
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function [y]=dc_impairment(x,dc_i,dc_q)
%Function to create DC impairments in a complex baseband model
% [y]=iq_imbalance(x,dc_i,dc_q) introduces DC imbalance between the inphase and quadrature components of the complex baseband signal x.
% The DC biases associated with each I,Q path are represented by the paramters dc_i and dc_q
%
%在复数基带模型中创建 DC 损伤的函数
% [y]=iq_imbalance(x,dc_i,dc_q) 在复基带信号 x 的 同相 和 正交分量 之间引入 DC 不平衡。
% 与每个 I、Q 路径相关的 DC 偏置由参数 dc_i 和 dc_q 表示
y = x + (dc_i+1i*dc_q);
相应地,通过从输入信号中减去 I、Q 支路信号的平均值,可以简单地去除支路上的直流偏移。
% Model for introducing DC offsets in the IQ branches
% 在 IQ 分支中引入 DC 偏移的模型
function [v]=dc_compensation(z)
%Function to estimate and remove DC impairments in the IQ branch % 用于估计和消除 IQ 分支中的 DC 损伤的函数
% v=dc_compensation(z) removes the estimated DC impairment % v=dc_compensation(z) 消除估计的 DC 损伤
iDCest=mean(real(z));%estimated DC on I branch % 估计 I 分支上的 DC
qDCest=mean(imag(z));%estimated DC on Q branch % 估计 Q 分支上的 DC
v=z-(iDCest+1i*qDCest);%remove estimated DCs % 删除估计的 DC
3. IQ失衡模型
实践中使用了两种IQ不平衡模型,即单支IQ不平衡模型和双支IQ不平衡模型。 这两个模型在设想同相和正交arm中 IQ 失配的方式上有所不同。 在单分支模型中,IQ 失配被建模为仅其中一个分支(例如 Q 分支)中的幅度和相位误差。 相反,在双分支模型中,IQ 失配被建模为 I 和 Q 分支中的幅度和相位误差。 这两种模型的估计和补偿算法都必须相应地进行调整。 本文仅介绍单分支 IQ 不平衡模型及其相应的补偿算法。
iq_imbalance.m
function [z]= iq_imbalance(r,g,phi)
%Function to create IQ imbalance impairment in a complex baseband
% [z]=iq_imbalance(r,g,phi) introduces IQ imbalance and phase error signal between the inphase and quadrature components of the complex baseband signal r.
% The model parameter g represents the gain mismatch between the IQ branches of the receiver and 'phi' represents the phase error of the local oscillator (in degrees).
%
%在复杂基带中创建 IQ 不平衡损伤的函数
% [z]=iq_imbalance(r,g,phi) 在 复基带信号 r 的 同相 和 正交分量 之间引入 IQ 不平衡 和 相位误差信号。
% 模型参数 g 表示接收器 IQ 分支之间的增益失配,“phi”表示本地振荡器的相位误差(以度为单位)。
Ri=real(r); Rq=imag(r);
Zi= Ri; % I branch
Zq= g*(-sin(phi/180*pi)*Ri + cos(phi/180*pi)*Rq);% Q branch crosstalk % Q分支串扰
z=Zi+1i*Zq;
end
4. 盲测和补偿
IQ 不平衡的盲估计和补偿
function y=blind_iq_compensation(z)
% Function to estimate and compensate IQ impairments for the single-branch IQ impairment model
% y=blind_iq_compensation(z) estimates and compensates IQ imbalance
% 用于估计和补偿单分支 IQ 损伤模型的 IQ 损伤的函数
% y=blind_iq_compensation(z) 估计和补偿 IQ 不平衡
I=real(z);Q=imag(z);
theta1=(-1)*mean(sign(I).*Q);
theta2=mean(abs(I));
theta3=mean(abs(Q));
c1=theta1/theta2; c2=sqrt((theta3^2-theta1^2)/theta2^2);
yI = I; yQ = (c1*I+Q)/c2; y= (yI +1i*yQ);
end
5.估计
基于导频的估计算法被广泛用于估计各种信道属性。发射机发送一个导频序列,并根据基带信号处理器接收到的序列估计 IQ 不平衡。 导频估计技术非常适合无线应用,如 WLAN、UMTS 和 LTE,其中已知导频序列作为数据通信会话的一部分进行传输。
pilot_iq_imb_est.m
function [Kest,Pest]=pilot_iq_imb_est(g,phi,dc_i,dc_q)
%Length 64 - Long Preamble as defined in the IEEE 802.11a % Length 64 - IEEE 802.11a 中定义的 长前导码
preamble_freqDomain = [0,0,0,0,0,0,1,1,-1,-1,1,1,-1,1,-1,1,1,1,1,1,1,-1,-1,1,1,-1,1,-1,1,1,1,1,0,1,-1,-1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,-1,1,1,1,1,0,0,0,0,0];%freq. domain representation
preamble=ifft(preamble_freqDomain,64);%time domain representation % 时域表示
%--------------------------send known preamble through DC & IQ imbalance model and estimate it % 通过 DC 发送已知前导码 & IQ不平衡模型和估计
r=receiver_impairments(preamble,g,phi,dc_i,dc_q);
z=dc_compensation(r); %remove DC imb. before IQ imbalance estimation % 删除 DC 增益。 在 IQ 不平衡估计之前
%--------------------------IQ imbalance estimation % IQ不平衡估计--------
I=real(z); Q=imag(z);
Kest = sqrt(sum((Q.*Q))./sum(I.*I)); %estimate gain imbalance % 估计增益不平衡
Pest = sum(I.*Q)./sum(I.*I); %estimate phase mismatch % 估计相位失配
end
6. 可视化接收器损伤的影响
有了接收器损伤模型和补偿技术,让我们在一个复数的平面上可视化它们的影响。 例如,考虑像 64-QAM 这样的高阶调制。 IQ 不平衡和 DC 偏移等接收器损伤被添加到 QAM 调制信号中。 如下图 所示,未损伤序列和受接收器损伤影响的序列绘制在复平面上。
主程序 matlab.m
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Visualize receiver impairments in a complex plane % 可视化复数平面中的接收器损伤
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clearvars; clc;
M=64;%M-QAM modulation order % M-QAM调制阶数
N=1000;%To generate random symbols % 生成随机符号
d=ceil(M.*rand(N,1));%random data symbol generation % 随机数据符号生成
s = mqam_modulator(M,d); %M-QAM modulated symbols (s) % M-QAM 调制符号 (s)
g_1=0.8; phi_1=0; dc_i_1=0; dc_q_1=0; %IQ gain mismatch only % 仅获得 IQ Gain 不匹配
g_2=1; phi_2=12; dc_i_2=0; dc_q_2=0; %phase mismatch only % 仅相位失配
g_3=1; phi_3=0; dc_i_3=0.5; dc_q_3=0.5; %DC offsets only % 仅直流偏移
g_4=0.8; phi_4=12; dc_i_4=0.5; dc_q_4=0.5; %All impairments % 所有损伤(IQ impairments & DC offsets)
r1=receiver_impairments(s,g_1,phi_1,dc_i_1,dc_q_1);
r2=receiver_impairments(s,g_2,phi_2,dc_i_2,dc_q_2);
r3=receiver_impairments(s,g_3,phi_3,dc_i_3,dc_q_3);
r4=receiver_impairments(s,g_4,phi_4,dc_i_4,dc_q_4);
figure('Name','Constellation plots of 64-QAM modulated symbols');
subplot(2,2,1);plot(real(s),imag(s),'b.');hold on;
plot(real(r1),imag(r1),'r.'); title('IQ Gain mismatch only')
subplot(2,2,2);plot(real(s),imag(s),'b.');hold on;
plot(real(r2),imag(r2),'r.'); title('IQ Phase mismatch only')
subplot(2,2,3);plot(real(s),imag(s),'b.');hold on;
plot(real(r3),imag(r3),'r.'); title('DC offsets only')
subplot(2,2,4);plot(real(s),imag(s),'b.');hold on;
plot(real(r4),imag(r4),'r.');title('IQ impairments & DC offsets');
未受损(蓝色)和受损(红色)版本的 64-QAM 调制符号的星座图
-
- 具有接收器损伤的 M-QAM 调制性能
最终计算以下四种情况的误码率:(a) 接收信号(无补偿),
(b) 单独使用 DC 补偿,
(c) 使用 DC 补偿和盲 IQ 补偿,以及
(d) 使用 DC 补偿和基于导频 的IQ 补偿。
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Performance of M-QAM with receiver impairments
% 具有接收器损伤的 M-QAM 的性能
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Eb/N0 Vs SER for M-QAM modulation with receiver impairments
% 具有接收器损伤的 M-QAM 调制的 Eb/N0 Vs SER
clear all;clc;
%---------Input Fields------------------------
N=100000; %Number of input symbols
EbN0dB = -4:5:24; %Define EbN0dB range for simulation 针对图6.6和6.7
%EbN0dB = 21; %Define EbN0dB range for simulation 针对图6.8 plot constellation diagram
M=64; %M-QAM modulation order
g=0.9; phi=8; dc_i=1.9; dc_q=1.7;%receiver impairments 针对图6.6
%g=0.9; phi=30; dc_i=1.9; dc_q=1.7;%receiver impairments 针对图6.7
%g=0.7; phi=0; dc_i=0; dc_q=0;%plot constellation diagram (a)
%g=1; phi=25; dc_i=0; dc_q=0;%plot constellation diagram (b)
%g=0.7; phi=25; dc_i=0; dc_q=0;%plot constellation diagram (c)
%g=0.7; phi=25; dc_i=1.5; dc_q=1.5;%plot constellation diagram (d)
%----------------------------------------------
k=log2(M); %Bits per symbol
EsN0dB = 10*log10(k)+EbN0dB; %Converting Eb/N0 to Es/N0
SER1 = zeros(length(EsN0dB),1);%Symbol Error rates (No compensation)
SER2 = SER1;%Symbol Error rates (DC compensation only)
SER3 = SER1;%Symbol Error rates (DC comp & Blind IQ compensation)
SER4 = SER1;%Symbol Error rates (DC comp & Pilot IQ compensation)
d=ceil(M.*rand(1,N));%random data symbols drawn from [1,2,..,M]
[s,ref]=mqam_modulator(M,d);%MQAM symbols & reference constellation
%See section 3.4 on chapter 'Digital Modulators and Demodulators
%- Complex Baseband Equivalent Models' for function definition
for i=1:length(EsN0dB)
r = add_awgn_noise(s,EsN0dB(i)); %see section 4.1 on chapter 4
z=receiver_impairments(r,g,phi,dc_i,dc_q);%add impairments
v=dc_compensation(z); %DC compensation
y3=blind_iq_compensation(v); %blind IQ compensation
[Kest,Pest]=pilot_iq_imb_est(g,phi,dc_i,dc_q);%Pilot based estimation
y4=iqImb_compensation(v,Kest,Pest);%IQ comp. using estimated values
%Enable this section - if you want to plot constellation diagram % 启用此部分 - 如果要绘制星座图6.8
% figure(1);plot(real(z),imag(z),'rO'); hold on;
% plot(real(y4),imag(y4),'b*'); hold off;
% title(['Eb/N0=',num2str(EbN0dB(1j)),' (dB)']);pause;
%-------IQ Detectors - defined in section 3.5.4 chapter 3--------
[estTxSymbols_1,dcap_1]= iqOptDetector(z,ref);%No compensation
[estTxSymbols_2,dcap_2]= iqOptDetector(v,ref);%DC compensation only
[estTxSymbols_3,dcap_3]= iqOptDetector(y3,ref);%DC & blind IQ comp.
[estTxSymbols_4,dcap_4]= iqOptDetector(y4,ref);%DC & pilot IQ comp.
%------ Symbol Error Rate Computation-------
SER1(i)=sum((d~=dcap_1))/N; SER2(i)=sum((d~=dcap_2))/N;
SER3(i)=sum((d~=dcap_3))/N; SER4(i)=sum((d~=dcap_4))/N;
end
theoreticalSER = ser_awgn(EbN0dB,'MQAM',M); %theoretical SER
figure(2);
semilogy(EbN0dB,SER1,'r*-'); hold on; %Plot results
semilogy(EbN0dB,SER2,'bO-'); semilogy(EbN0dB,SER3,'g^-');
semilogy(EbN0dB,SER4,'m*-'); semilogy(EbN0dB,theoreticalSER,'k');
legend('No compensation','DC comp only','Sim- DC & blind iq comp','Sim- DC & pilot iq comp','Theoretical');
xlabel('E_b/N_0 (dB)');ylabel('Symbol Error Rate (Ps)');
title('Probability of Symbol Error 64-QAM signals');
由于代码太多,不方便呈现出来,添加 v 后免费获取,所有代码资源。