资源简介
基于博弈论的信道选择与功率控制仿真,在20次迭代后达到纳什均衡
代码片段和文件信息
clear all;
close all
N=2; % Two active links
iter=20; % 迭代次数
H=[0.27640.5345;0.54320.2344]; % 信道增益
R1=60; % 数据速率
L1=5; % 信息bit
M1=10; % 数据bit
L2=3;
M2=6;
R2=15;
Bn=0.05; %背景噪声
alpha=0.01; % 跳时增益
lamda=[0.050.0750.1]; % Linear Price Function
P1=zeros(39); %初始化发送功率
P2=zeros(39);
I1=zeros(39);
I2=zeros(39);
for m=1:length(lamda)
for n=2:iter
I1(mn)=H(11)/[R1*(Bn+alpha*P2(mn-1)*H(21))];
P1(mn)=-log(1-(lamda(m)/(I1(mn)*L1*R1))^(1/(M1-1)))/I1(mn);
I2(mn)=H(22)/[R2*(Bn+alpha*P1(mn-1)*H(12))];
P2(mn)=-log(1-(lamda(m)/(I2(mn)*L2*R2))^(1/(M2-1)))/I2(mn);
U1(mn)=-((L1/M1)*R1*(1-exp(-I1(mn)*P1(mn)))^M1)+(lamda(m)*P1(mn));
U2(mn)=-((L2/M2)*R2*(1-exp(-I2(mn)*P2(mn)))^M2)+(lamda(m)*P2(mn));
end
end
plot(P1(1:)‘r+-‘);
hold on
plot(P1(2:)‘go-‘);
plot(P1(3:)‘b*-‘);
xlabel(‘Iteration‘);
ylabel(‘Transmission power of Wimax‘);
legend(‘lamda=0.05‘‘lamda=0.075‘‘lamda=0.1‘);
figure;
plot(U1(1:)‘r+-‘);
hold on
plot(U1(2:)‘go-‘);
plot(U1(3:)‘b*-‘);
xlabel(‘Iteration‘);
ylabel(‘Utility function of Wimax‘);
legend(‘lamda=0.05‘‘lamda=0.075‘‘lamda=0.1‘);
figure;
plot(P2(1:)‘r+-‘);
hold on
plot(P2(2:)‘go-‘);
plot(P2(3:)‘b*-‘);
xlabel(‘Iteration‘);
ylabel(‘Transmission power of UWB‘);
legend(‘lamda=0.05‘‘lamda=0.075‘‘lamda=0.1‘);
figure;
plot(U2(1:)‘r+-‘);
hold on
plot(U2(2:)‘go-‘);
plot(U2(3:)‘b*-‘);
xlabel(‘Iteration‘);
ylabel(‘Utility function of UWB‘);
legend(‘lamda=0.05‘‘lamda=0.075‘‘lamda=0.1‘);
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1612 2013-10-29 15:39 GT.m
----------- --------- ---------- ----- ----
1612 1
评论
共有 条评论