%%%%%%%%%%%%%%%%%%% DETECTION AND ESTIMATION THEORY %%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%% SANA SYED %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%% FIGURE 7.3 AND 7.4 %%%%%%%%%%%%%%%%%%%%%%%%%
clc
clear all
close all
N=50;
m=1000;
A=1;
sigma_sq=0.05;
f0=0.08;
phi=pi/4;
k=1;
SNR = -20:5:10; % Define SNR for plotting the figure
for k=1:length(SNR)
Pdf=[];
phi_hat=[];
x=zeros(m,N);
for M=1:m
n=0:1:N-1;
noise=sqrt(sigma_sq)*awgn(zeros(1,N),SNR(k)); % changing SNR
x(M,:)=A*cos(2*pi*f0*n+phi)+noise;
%x(M,:)=awgn((A*cos(2*pi*f0*n+phi)),SNR(k));
Pdf(M,:)=(1/(2*pi*sigma_sq)^(1/2))*(exp((-1/(2*sigma_sq))*(x(M,:)-A.*cos(2*pi*f0*n+phi)).^2));
Num=sum(x(M,:).*sin(2*pi*f0*n));
Den=sum(x(M,:).*cos(2*pi*f0*n));
phi_hat(M,:)=-atan(Num/Den);
end
phi_est(k)=(1/M)*sum(phi_hat);
phi_var(k)=N*(1/M)*sum((phi_hat-phi_est(k)).^2); % eq 7.10
end
% Compare actual mean with asymptotic mean against SNR
figure;
asymp_mean = pi/4*ones(1,length(SNR)); % Asymptotic mean
plot(SNR,asymp_mean,'r--','LineWidth',2);
hold on;
plot(SNR,phi_est,'LineWidth',2)
xlabel('SNR (dB)','FontWeight','bold','fontsize',12);
ylabel('Mean','FontWeight','bold','fontsize',12);
title('Actual vs. asymptotic mean for phase estimator','FontWeight','bold','fontsize',12);
legend('Asymptotic mean','actual mean');
% Compare actual variance with asymptotic variance against SNR
lg_asymp_var = -10*log10(N) - SNR; % Asymptotic variance
lg_var = 10*log10(phi_var);
figure;
plot(SNR,lg_asymp_var,'r--','LineWidth',3);
hold on;
plot(SNR,lg_var,'LineWidth',3)
xlabel('SNR (dB)','FontWeight','bold','fontsize',12);
ylabel('10log_1_0 variance','FontWeight','bold','fontsize',12);
title('Actual vs. asymptotic variance for phase estimator','FontWeight','bold','fontsize',12)
legend('Asymptotic variance','actual variance');
%
没有合适的资源?快使用搜索试试~ 我知道了~
fig7_34.rar_Almost Zero_www.34see.com
共1个文件
m:1个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 42 浏览量
2022-09-20
20:22:31
上传
评论
收藏 842B RAR 举报
温馨提示
We see that HTH matrix is almost diagonal as the off diagonal elements are nearly zero. So we are getting exact estimation in case of PRN INPUT due to diagonality of HTH matrix. As seen that the unknown inpulse response ( h ) and estimated impulse response ( hth ) are coming out to be exactly same. The estimation even gets better for large N .as we get the HTH matrix perfect diagonal. So we come to know that we can estimate the unknown parameters exactly when PRN input is used.
资源推荐
资源详情
资源评论
收起资源包目录
fig7_34.rar (1个子文件)
fig7_34.m 2KB
共 1 条
- 1
资源评论
Kinonoyomeo
- 粉丝: 91
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 基于 Ant 的 Java 项目示例.zip
- 各种字符串相似度和距离算法的实现Levenshtein、Jaro-winkler、n-Gram、Q-Gram、Jaccard index、最长公共子序列编辑距离、余弦相似度…….zip
- 运用python生成的跳跃的爱心
- 包括用 Java 编写的程序 欢迎您在此做出贡献!.zip
- (源码)基于QT框架的学生管理系统.zip
- 功能齐全的 Java Socket.IO 客户端库,兼容 Socket.IO v1.0 及更高版本 .zip
- 功能性 javascript 研讨会 无需任何库(即无需下划线),只需 ES5 .zip
- 分享Java相关的东西 - Java安全漫谈笔记相关内容.zip
- 具有适合 Java 应用程序的顺序定义的 Cloud Native Buildpack.zip
- 网络建设运维资料库职业
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功