误码率matlab怎么计算,关于误码率的问题 急!!!!!
该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
求助各位大佬
要求是2ask调制 通过滚降系数为0,0.5,1的升余弦滚降滤波器,信道加入1-15db的高斯白噪声,
相干解调,匹配滤波后计算出误码率与信噪比的关系图与理论值拟合。
现在问题是计算出的误码率过高无法拟合,请教各位大佬应该怎么修改。明天就要交论文了 曲线一直拟合不上
好急
%%---baseband signal parameters---%%
D_R = 32e3; %Date Rate = 32Kbps
P_D = 1/D_R; %Pulse duration
%Signal generation
bits = 16;
rand_data = randi([0 1], 1,16);
input = repmat(rand_data',1,2000)';
input = input(:)';
t = linspace(0,bits,numel(input));
figure(1);
subplot(3,1,1);
plot(t,input);
title('Input bit stream');
xlabel('samples');
ylabel('amplitude');
grid on
%%carrier generation
fc = 10;
carrier = cos(2 * pi * fc * t);
subplot(3,1,2);
plot(t,carrier);
title('carrier');
xlabel('samples');
ylabel('amplitude');
grid;
%%raised cosine rolloff filter
%%rolloff = 0
rolloff = 0;
span = 20;
sps = 50;
rcosfilter_1 = rcosdesign(rolloff, span, sps,'sqrt');
shapedsignal_1 = conv(input,rcosfilter_1,'same');
figure(2)
subplot(3,1,1);
plot(t,shapedsignal_1);
title('shaped signal rolloff = 0');
xlabel('samples');
ylabel('amplitude');
rolloff = 0.5;
span = 20;
sps = 50;
rcosfilter_2 = rcosdesign(rolloff, span, sps,'sqrt');
shapedsignal_2 = conv(input,rcosfilter_2,'same');
subplot(3,1,2);
plot(t,shapedsignal_2);
title('shaped signal rolloff = 0.5');
xlabel('samples');
ylabel('amplitude');
rolloff = 1;
span = 20;
sps = 50;
rcosfilter_3 = rcosdesign(rolloff, span, sps,'sqrt');
shapedsignal_3 = conv(input,rcosfilter_3,'same');
subplot(3,1,3);
plot(t,shapedsignal_3);
title('shaped signal rolloff = 1');
xlabel('samples');
ylabel('amplitude');
%%ASK modulation
modulationsignal_1 = carrier .* shapedsignal_1;
figure(3);
subplot(3,1,1);
plot(t,modulationsignal_1);
title('modulation signal rolloff = 0');
xlabel('samples');
ylabel('amplitude');
grid on;
modulationsignal_2 = carrier .* shapedsignal_2;
subplot(3,1,2);
plot(t,modulationsignal_2);
title('modulation signal rolloff = 0.5');
xlabel('samples');
ylabel('amplitude');
grid on;
modulationsignal_3 = carrier .* shapedsignal_3;
subplot(3,1,3);
plot(t,modulationsignal_3);
title('modulation signal rolloff = 1');
xlabel('samples');
ylabel('amplitude');
grid on;
LPF = fdesign.lowpass('Fp,Fst,Ap,Ast',1,20,1,60,100);
lowpass = design(LPF,'equiripple');
%[ A B C D] = butter(10,[1 5]/50);
[b a] = butter(5,0.95,'low');
%d=designfilt('bandpassfir','FilterOrder',50, ...
%'CutoffFrequency1',1,'CutoffFrequency2',5, ...
%'SampleRate',100);
%%add noise
h = 1;j = 1;
for SNR = 1:1:15
snrlin = 10.^(SNR./10);
RxSig_1=awgn(modulationsignal_3,SNR,'measured',1);
%%demodulation
x = RxSig_1.* carrier;
%e = filter(d,x);
y = filter(lowpass,x);
%e = envelope(y);
z = conv(y,rcosfilter_3,'same');
%e = envelope(z);
figure(4);
subplot(4,4,SNR);
plot(t,RxSig_1,'g','LineWidth',2);
hold on;
plot(t,modulationsignal_3,'b');
title(['SNR:',num2str(SNR),'dB']);
xlabel('Samples');
ylabel('Amplitude');
%%comparator
L = length(y);
for i = 1:1:L
if z(i)> 2
output(i) = 1;
else
output(i) = 0;
end
end
figure(5);
xlabel('Samples');
ylabel('Amplitude');
subplot(5,3,SNR);
plot(t,output);
title(['SNR:',num2str(SNR),'dB'])
error = length(find(output ~= input));
cber(h) = error/32000;
h = h+1;
tber(j) = qfunc(sqrt(snrlin));
snrdb(j) = SNR;
j = j+1;
end
figure(4);
legend('Signal with noise','Signal after filteration');
figure(5);
legend('received bits with different singal to noise radio');
figure('Name','Comparison B/W Theoretical&Calculated BER');
semilogy(snrdb,cber,'-bo',snrdb,tber,'-mh');
hold on;
grid on;
legend('BER calculated','BER theoretical')
xlabel('SNR in dB');
ylabel('Bit error rate');
误码率matlab怎么计算,关于误码率的问题 急!!!!!相关推荐
- 误码率matlab怎么计算,Matlab 仿真(7,4)汉明码 传输误码率
汉明(7,4)码,传输7bits,其中4bits是信息,3bits是校验码 下面的程序是仿真汉明(7,4)码的编码,传输,解码的过程并统计误码率,希望对大家有所帮助. % 产生信息序列,1000000 ...
- 中继误码率 matlab,关于误码率的问题 急!!!!!
该楼层疑似违规已被系统折叠 隐藏此楼查看此楼 求助各位大佬 要求是2ask调制 通过滚降系数为0,0.5,1的升余弦滚降滤波器,信道加入1-15db的高斯白噪声, 相干解调,匹配滤波后计算出误码率与信 ...
- 直扩 单音干扰抑制 matlab,数学计算软件MATLAB资料集锦分享
数学计算软件MATLAB资料集锦分享 (2014-08-20 17:07:08) 标签: matlab 数学建模 仿真模拟 整理了一些有关MATLAB资料如下: 1.H型可逆PWM变换器的控制方式解析 ...
- matlab科学计算及分析,matlab科学计算
spContent=当前,科学计算已经成为科学研究.技术创新的重要方法与手段,而作为实现工具的科学计算软件无疑具有至关重要的作用.MATLAB为众多领域的计算问题提供了全面的解决方案,代表了当今国际科 ...
- Matlab怎么计算信号的能量,用Matlab求离散讯号的能量与功率怎么编程
在MATLAB中,可以用函数y=filter(p,d,x)实现差分方程的仿真,也可以用函数 y=conv(x,h)计算卷积. (1)即y=filter(p,d,x)用来实现差分方程,d表示差分方程输出 ...
- MATLAB数学计算与工程分析范例教程,MATLAB数学计算与工程分析范例教程
基本信息 书名:MATLAB数学计算与工程分析范例教程 定价:28.00元 作者:石博强,赵金 编著 出版社:中国铁道出版社 出版日期:2005-05-01 ISBN:9787#113057596 字 ...
- 计算阶比分析 matlab_(案例)层次聚类分析Matlab编码计算
"层次聚类分析Matlab编码计算" 测试数据集(9个变量,21个样本): 样本序号 人口密度x1/(人·.km-2) 人均耕地面积x 2/hm2) 森林覆盖率x3/% 农民人均纯 ...
- matlab中线性变压器,用MATLAB优化计算差动变压器的线性范围
基金项目:河南省自然科学基金资助项目(994043500) 作者简介:胡明江(1974 - ) ,男 ,河南洛阳人 ,硕士生. 收稿日期:2003 - 04 - 23 文章编号 :1672 - 687 ...
- 用matlab解一维单势垒波函数,一维多势垒结构准束缚态的MATLAB分析计算
第33卷 第2期 红 外 技 术 Vol.33 No.2 2011 年 2 月 Infrared Technology Feb. 2011 85 一维多势垒结构准束缚态的 MATLAB 分析计算 王忆 ...
最新文章
- 《需求分析与系统设计》阅读笔记三
- 2013年1月第4个周末
- 【深度学习】深度学习之Pytorch基础教程!
- c#爬虫-1688官网自动以图搜图
- Andorid获取状态栏高度
- Eclipse继承HttpServlet出现:HttpServlet cannot be resolved to a type的错误的解决方案
- 富文本存储型XSS的模糊测试之道
- python rpa库_Automagica python RPA库实践
- yolov5模型部署:Nvidia使用TensorRT部署yolov5s模型
- 计算机技能鉴定操作试题,计算机操作员中级操作技能考核试卷职业技能鉴定国家题库...
- Struts2第九篇【OGNL、valueStack详解】
- php xheditor 上传图片,codeigniter整合xheditor之后,xheditor上图片问题
- 3个快速将Word转换成PDF的方法
- 阿里云香港服务器购买教程(图文)
- 跨境电商亚马逊品牌卖家将会面临的机遇和挑战(一)
- 2021年JavaScript最新手机号码、电话号码正则表达式
- ArcGIS教程02:由高程点生成表面栅格及对应的等高线
- IOS根据屏幕尺寸判断是否为iphone6plus尺寸
- 复指数信号的matlab,复指数函数周期怎么算,为什么复变指数函数是周期函数,而实变指...
- 【YOLOv5】LabVIEW+YOLOv5快速实现实时物体识别(Object Detection)含源码