三种均衡器的MATLAB实现
来源:互联网 发布:鹊桥淘宝佣金怎么撤回 编辑:程序博客网 时间:2024/06/07 21:03
%%第一种
clear
clc% Build a set of test data.
hMod = comm.BPSKModulator; % BPSKModulator System object
x = step(hMod,randi([0 1],1000,1)); % BPSK symbols
rxsig = conv(x,[1 0.8 0.3]); % Received signal
% Create an equalizer object.
eqlms = lineareq(8,lms(0.03));
% Change the reference tap index in the equalizer.
eqlms.RefTap = 4;
% Apply the equalizer object to a signal.
y = equalize(eqlms,rxsig,x(1:200));
%%第二种
clear
clc
% Set up parameters and signals.
M = 4; % Alphabet size for modulation
msg = randi([0 M-1],1500,1); % Random message
hMod = comm.QPSKModulator('PhaseOffset',pi/4);
modmsg = step(hMod,msg); % Modulate using 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 = step(hMod,(0:M-1)')'; % Set signal constellation.
[symbolest,yd] = 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.
hDemod = comm.QPSKDemodulator('PhaseOffset',pi/4);
demodmsg_noeq = step(hDemod,filtmsg); % Demodulate unequalized signal.
demodmsg = step(hDemod,yd); % Demodulate detected signal from equalizer.
hErrorCalc = comm.ErrorRate; % ErrorRate calculator
ser_noEq = step(hErrorCalc, ...
msg(trainlen+1:end), demodmsg_noeq(trainlen+1:end));
reset(hErrorCalc)
ser_Eq = step(hErrorCalc, msg(trainlen+1:end),demodmsg(trainlen+1:end));
disp('Symbol error rates with and without equalizer:')
disp([ser_Eq(1) ser_noEq(1)])
%%第三种
clear
clc
M = 4; % Alphabet size for modulation
msg = randi([0 M-1],1500,1); % Random message
hMod = comm.QPSKModulator('PhaseOffset',pi/4);
modmsg = step(hMod,msg); % Modulate using QPSK.
trainlen = 500; % Length of training sequence
chan = [.986; .845; .237; .123+.31i]; % Channel coefficients
filtmsg = filter(chan,1,modmsg); % Introduce channel distortion.
% Set up equalizer.
eqlms = lineareq(8, lms(0.01)); % Create an equalizer object.
eqlms.SigConst = step(hMod,(0:M-1)')'; % Set signal constellation.
% Maintain continuity between calls to equalize.
eqlms.ResetBeforeFiltering = 0;
% Equalize the received signal, in pieces.
% 1. Process the training sequence.
s1 = equalize(eqlms,filtmsg(1:trainlen),modmsg(1:trainlen));
% 2. Process some of the data in decision-directed mode.
s2 = equalize(eqlms,filtmsg(trainlen+1:800));
% 3. Process the rest of the data in decision-directed mode.
s3 = equalize(eqlms,filtmsg(801:end));
s = [s1; s2; s3]; % Full output of equalizer
- 三种均衡器的MATLAB实现
- 基于MATLAB与VC混合编程的数字均衡器设计
- LVS负载均衡器DR模型的实现
- [DirectSound] 基于DirectSound的音频均衡器实现
- 分水岭算法 matlab的三种实现方法
- 分水岭算法 matlab的三种实现方法 .
- Unity中实现获取音频的频谱的可视化均衡器
- android手机上实现竖直seekbar的EQ均衡器
- keepalived实现haproxy负载均衡器的高可用
- LVS+Keepalived 实现高可用的前端负载均衡器
- 阅读《基于MATLAB与VC混合编程的数字均衡器设计》的要点
- 图像灰度化的三种方法及matlab,c++,python实现
- 机器学习(三)之Matlab实现的函数总结
- MATLAB中多行注释的三种方法
- MATLAB中多行注释的三种方法
- MATLAB中多行注释的三种方法
- MATLAB中多行注释的三种方法
- 负载均衡器的比较
- 单例模式
- NavigationView的头部的事件监听
- 插入排序 心得
- 【工作中学到的小技巧】在/etc/profile中添加path后导致linux命令都不能用
- PHP设计模式系列
- 三种均衡器的MATLAB实现
- dbforget mysql connection 20171118
- LeetCode刷题(41)--Sort Color
- 接口数据改变对应的PullToRefresh展示效果也改变
- java.io.IOException: response already committed
- 简单实现 二级列表购物车(固定数据)
- The Definitive Guide to Squarespace.pdf 英文原版 免费下载
- VC 调用GDI+绘图
- 【Ubuntu】Ubuntu16.04安装WPS及解决字体缺失问题