资源简介
现在需要通过源节点给目的节点发送数据,发送链路包括两条:
1、源节点直接发送目的节点;
2、源节点通过中继的转发,发送给目的节点。
因此,目的节点相当于接收到两条链路的信号。
代码片段和文件信息
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% cooperation communication
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clc;
clear;
close all;
warning off;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% system parameters
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
BandWidth = 8;% in Mega Hz
% number of primary user
Node_set = 100;
% number of cooperation user
Node_relay_Vec = [1];% the number of node to be choosen to be relay
TxRangeVec = [20:10:100];% distance between source and sink node
snr_Th = 30;% snr threshold for outage probability 0.001%
PlotOn = 0;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% simulation parameters
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
IterNum = 1;
Len = length(TxRangeVec);
RelayLen = length(Node_relay_Vec);
PowerConsumption = zeros(RelayLenLen);
PowerConsumption_D = zeros(1Len);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% simulation
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
for sim_index = 1:Len;
TxRange = TxRangeVec(sim_index);
for loops = 1:IterNum;
% network topology
Destination_Pos = [0;0];% desitnation node
Source_Pos = [-TxRange;0];% source node
% coveage
alpha = 0:pi/20:2*pi;%角度[02*pi]
R = TxRange;%半径
x = R*cos(alpha);
y = R*sin(alpha);
% the terminal to be relay node
Phase_relay = 2*pi*rand(1Node_set);
Distance_relay = R*rand(1Node_set);
Relay_Pos = [Distance_relay.*cos(Phase_relay);
Distance_relay.*sin(Phase_relay)];
% plot the network
if(PlotOn)
figure(1);
clf;
plot(Destination_Pos(1)Destination_Pos(2)‘ro‘ ‘MarkerFaceColor‘‘r‘); hold on;
text(Destination_Pos(1)+0.1Destination_Pos(2)‘Rx‘);
plot(xy‘m-‘‘linewidth‘2);axis equal;
plot(Source_Pos(1)Source_Pos(2)‘ks‘ ‘MarkerFaceColor‘‘k‘);
text(Source_Pos(1)+0.1Source_Pos(2)‘Tx‘);
plot(Relay_Pos(1:)Relay_Pos(2:)‘b*‘);
title(‘network topo‘);
end;
% CR Tx signal generator
[Ofdm_cp TxBit] = CR_Tx();
%% direct transmitter
% determine the snr of direct path
Thermal_noise = -174+60+10*log10(BandWidth);% in dBm
% sig power
sig_pow = Thermal_noise + snr_Th;
% determine the tx power from path loss
PL = 128.1+37.6*log10(TxRange*0.001);
TX_dB_direct = sig_pow + PL;% in dBm
Tx_power_direct = 10.^(0.1*TX_dB_direct);
%% cooperative transmitter
% path loss from source 2 relay
Pos_source_relay = Relay_Pos - Destination_Pos*ones(1Node_set);
Distance_source_relay = sqrt(Pos_source_relay(1:).
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2018-10-10 15:39 源码\
文件 645 2017-05-02 18:25 源码\AF_MRC_NodeSet_100_RelayPower_50.mat
文件 5367 2017-05-02 11:06 源码\Cooperation_RealyNum_Distance_Sim.m
文件 7791 2017-05-02 10:33 源码\Cooperation_RealyNum_SNR_Sim.m
文件 3015 2014-05-09 11:46 源码\CR_Rx.m
文件 3238 2014-05-09 11:46 源码\CR_Tx.m
目录 0 2017-05-02 10:30 源码\requirement\
文件 307520 2017-03-20 17:07 源码\requirement\Partner choice and(山大论文中的参考文献16).pdf
文件 23040 2017-04-27 21:45 源码\requirement\request.doc
目录 0 2018-10-10 15:39 演示\
文件 25999281 2017-05-02 22:54 演示\45607.mp4
文件 64 2018-10-10 16:34 说明.txt
目录 0 2018-10-10 15:38 需求\
文件 307520 2017-03-20 17:07 需求\Partner choice and(山大论文中的参考文献16).pdf
文件 23040 2017-04-27 21:45 需求\request.doc
- 上一篇:基于序列图像的超分辨率重建方法
- 下一篇:性能测试工具CBench
相关资源
- 你想要的采样重构代码,这里都有
- 博睿康公司Neuracle EEG RecorderV2采集软件
- redfit软件包
- MCNP学生版.zip
-
Digital Signal Processing - Computer ba
sed - 全景图像拼接图像拼接作业
- 蒙特卡洛算法讲义,对数模初学者帮
- 基于SURF的图像配准
- 图像融合+质量评价
- 播放ASF/AMC运动数据
- 数学建模 姜启源 及答案和司守奎老师
- 视频中人数统计
- 数字语音处理理论与应用 [Theory and
- 卷积神经网络车牌识别
- 认知无线电中频谱感知技术研究
- 对shape context的一种改进可图形集后直
- MCNP使用说明书
- Dynamic Noncooperative Game Theory
- 机器学习实战-中文版-超清晰文字版
- 扩频通信系统实用仿真技术
- HDR Deghosting: How to deal with Saturation
- moseksetupwin64x86.msi
- 微网逆变器及电能质量治理综合装置
- 数学建模算法与程序-司守奎pdf+源代码
- 2017年研究生数学建模D题二等奖
- 提取图像的haar特征5个方向并将其保存
- 智能控制课件,包含习题,
- 吴恩达机器学习编程解答自己做的,
- matlab初学者学习
- ReBEL toolkit工具箱
评论
共有 条评论