wxd12358699 发表于 2010-5-12 12:02

请求好心人帮忙

均衡器Matlab例程(1)解析
Equalizing Using a Training Sequence

例程代码
% Set up parameters and signals.
M = 4; % Alphabet size for modulation
msg = randint(1500,1,M); % Random message,产生一个1500 x 1 在区域内的随机整数序列
modmsg = pskmod(msg,M); % Modulate using QPSK.进行QPSK调制的映射
trainlen = 500; % Length of training sequence定义训练序列的帧长
chan = [.986; .845; .237; .123+.31i]; % Channel coefficients定义信道参量
filtmsg = filter(chan,1,modmsg); % Introduce channel distortion. 模拟信道变化
% Equalize the received signal.
eq1 = lineareq(8, lms(0.01)); % Create an equalizer object.
eq1.SigConst = pskmod(,M); % Set signal constellation. 设置星座图
= equalize(eq1,filtmsg,modmsg(1:trainlen)); % Equalize.
% Plot signals.
h = scatterplot(filtmsg,1,trainlen,'bx'); hold on; 以蓝星画出未经过均衡的信号
scatterplot(symbolest,1,trainlen,'g.',h); 在原图的基础上以绿色画出经过均衡后的信号
scatterplot(eq1.SigConst,1,0,'k*',h); 在原图的基础上以黄色标出理想星座图
legend('Filtered signal','Equalized signal',...
   'Ideal signal constellation');
hold off;
% Compute error rates with and without equalization.   计算误码率
demodmsg_noeq = pskdemod(filtmsg,M); % Demodulate unequalized signal. 解调未均衡的码字
demodmsg = pskdemod(yd,M); % Demodulate detected signal from equalizer.解调已均衡的码字
= symerr(demodmsg_noeq(trainlen+1:end),...对比未均衡信号和样本信号的误码和误码率
   msg(trainlen+1:end));
= symerr(demodmsg(trainlen+1:end),...
   msg(trainlen+1:end)); 对比均衡信号和样本信号的误码和误码率
disp('Symbol error rates with and without equalizer:')
disp(
希望能得到高手的指点,红色部分参数不是很明白,万分感谢
页: [1]
查看完整版本: 请求好心人帮忙