资源简介
AmplifyandForward.m
代码片段和文件信息
%% This programe provides SER analysis of amplify and forward cooperative protocol using QPSK modulation%%%
%% Results are compared with theoratical results for QPSK modulation with AWGN and Rayleigh fading channels %%%
clear all
clc
N= 10^6; %number of symbols
Pt=1;% Total Tranmited Power
Pb=Pt/2;% Transmitted power of source
Pr=Pt/2; % Transmitted power of Relay
snr_db=[0:40];% SNR in dB
data_BS1 = ((2*(rand(1N)>0.5)-1) + j*(2*(rand(1N)>0.5)-1))%% Data generation
data=zeros(1N); % Received data matrix
%% Channel gains
channel_BS1_RS1=(1/sqrt(2)).*[randn(1N)+j*randn(1N)];% Channel coefficients for Soure-Relay link
a11=sum((abs(channel_BS1_RS1)))/N; %Average channel gain for Soure-Relay link Channel
channel_RS1_MS1=(1/sqrt(2)).*[randn(1N)+j*randn(1N)];% Channel coefficients for Relay-Desination link
b11=sum((abs(channel_RS1_MS1)))/N; %Average channel gain for Relay-Desination link Channel
channel_BS1_MS1=(1/sqrt(2))*[randn(1N)+j*randn(1N)];% Channel coefficients for Soure-Desination Direct link
c11=sum((abs(channel_BS1_MS1)))/N; %Average channel gain for Soure-Desination link Channel
%% AWGN
nbr=(1/sqrt(2)).*(randn(1N)+j*randn(1N));%AWGN for at Relay for Soure-Relay link
nrm=(1/sqrt(2)).*(randn(1N)+j*randn(1N));%AWGN for at Desination for Relay-Desination link
nbm=(1/sqrt(2)).*(randn(1N)+j*randn(1N));%AWGN for at Desination for source-Desination link
for i=1:length(snr_db)
snr_linear(i)=10.^(snr_db(i)/10); % Linear value of SNR
No(i)=Pt./snr_linear(i); % Noise power
%% AMPLIFICATION FACTOR
Beta1=sqrt(Pr./(a11^2.*Pb+No(i)));
%% RECEIVED DATA AT RELAY FROM BS
data_BS1_RS1=sqrt(Pb/2).*data_BS1.*channel_BS1_RS1+sqrt(No(i))*nbr;
%% RECEIVED DATA AT MS FROM RS
相关资源
- qpsk3.m
- M.m
- bpsk_qpsk.m
- 基于MATLAB的KL人脸识别程序可运行.r
- 用matlab打造自己的注册机.zip
- matlab坐标平移旋转源代码.zip
- 3.2.2kalman_tempreture.m
- DLM_constant_delta.m
- binary.m
- svgensim4.mdl
- magsint.m
- xiangganleiji.m
- 298496基于Matlab的m序列发生器的设计与
- 有源四阶切比雪夫滤波器.ms12
- sy3_2DPSK.mdl
- Matlab.vR2016b_NMac.to.torrent
- 欺骗的艺术-凯文·米特尼克.mobi
- Boost(1).mdl
- bd503b752b2ccf3d8e0912b7522098d7.m
- PD.m
- PIDTUNING.mlappinstall
- u0xaoz.ms10
- MATLAB的系统动力学仿真.pdf
- lung_test.m
- matlab使用libsvm进行分类代码.rar
- 高频单调谐回路放大器.ms11
- 无刷直流电机MATLAB模型.rar
- 基于MATLAB的质点弹道计算与外弹道优
- yw5bth.m
- s_niblack3.m
评论
共有 条评论