-
时隙 Aloha 及伪贝叶斯算法性能仿真
设一个时隙 Aloha 系统的时隙长度为 1,所有节点的数据包均等长且等于时隙长度。网络中的节点数为 m,各节点数据包以泊松过程到达。 1 假定每个节点的数据包到达强度均为 λ /m,在不同的 λ 下,仿真时隙Aloha 数据包传送的成功概率,绘制呼入强度和成功概率的曲线,和理论结果进行对照。 仿真思路: 1) 生成一个二项分布列来模拟数据包的到达过程 2) 因为数据包以泊松过程到达,所以二项分布的 P 定为(1- m eλ− ) 3) 对生成的数列求和,只有当其和恰等于 1 即有且仅有一个数据包到达时,才可以成功发送,这时成功个数计数+1 4) 2.选取合理的引,,qa,m,采用延时的下界,仿真时隙Aoha系统数据传输过程,统计在不冋同η下,到达率及离开率,绘制它们随n的分布情况,和理论值进行对照qn:等待重传的节点在每一时隙内重传数据包的概率qa:每个发送节点有新数据包到达的概率m:系统内总的节点数n:每个时隙开始时等待重传的节点数仿真思路:1)用二项分布模拟数据包的到达及发送过程2)生成两个数列:一个表示等待重传的节点以q,重传的情况;一个表示新到达的数据包情况因为题日说明采用延时的下界,即不缓冲,每个节点最多容纳一个数据包,有包则扔。所以第一个数列前n项令为1,后一个前n项令为0,之后两个数列可以进行简单加和3)发送成功率:对两个数列相加之后求和,如果sum等于1,说明此时隙内到达和发送的总数为1,只有在这种情况下发送才有可能成功,计数加1到达率:在每N次实验中,对“表示到达的数列”求和,统计4)对n做循环以表示到达率和离开率随n的变化情况;每个n下进行N次实验,数理统计3/8仿真结果0.40.35*0.30.250.20.150.10.0550607080901001/曲线为理论曲线:Ps=G exp(-G)and G=(m-n)a+n gr2/仿真值基木与理论曲线吻合在仿真的过程中,合理选取个参数值对能否得到埋想的曲线起了重要的作用下图分别为qr=0.02,0.05,0.08s时的曲线。可以看到,随着qr的增加,曲线向左移,导致第二个交叉点也左移,这个时候重传的延时将会减小。反之,曲线右移。当q,增加到一定程度的时候,系统只有一个稳定点了。4/840.350.30.20.1501020304050607080901c03仿真时隙Aoha系统下的伪贝叶斯算法,通过仿真结果眼正在n的估计误差较大的情况下的收敛特性及到达率小于1/e下的稳定性。仿真思路:1、伪贝叶斯算法的主要思路是对新数据包和积压节点等同对待:当有新数据包到达的时候,暂不发送,下一时刻与以前的积压节点一起以4r发送。所以修改2中的仿真模型:1)依旧是一列表到达,一列表上一时隙的积压节点2)对两列加和,统计其中为1的个数,设为d3)以qr为概率,d为长度,生成又一个二项分布数列 depart,表示发送的情况4)对depa求和,如果 depart的和为一,说明恰发送成功,n(k+1)=d-1,否则n(k+1)=n(k)5)循环,进行数理统计2、仿真收敛特性和稳定特性哩论值:根据给岀的伪贝叶斯算法的具体步骤,由给出的n(k),不断模拟生成n(k+1)5/8仿真值:由仿真模型及给出的n(k),生成n(k+1)观察两种方式得到曲线的走向3、给出不同的值,观察n(k+1)随时间变化的情况判断标准如果要保持系统的稳定,至少n(k+1)应该保持在一个恒定的状态,或者逐渐趋于零。如果n(k+1)不断增加,则系统最终将趋于饱和,无法再接纳新的数据包,此时系统不稳定。仿真结果:1、验证在n的佔计误差较大的情况下的收敛特性:1)n=170;估计nt=20;m=100:20.2:N=100016030040050060070080g001CC08002)n=50;估计nt=180;m=1000=-1-02:N=80结果说明可以看出,当估计值与系统本身的积压数据包数有很大差别的时候,无论是大还是小,最终都可以趋于实际值,从而收敛特性得到验证。1)同时可以看到,改变的值:当λ增大的时候,收敛地更快;2)当n不变的时候,改变m的值,如果n/m变大,那么发生碰撞的几率就变大,也会导致估计的n值更快地趋向理论n值这些都是于课堂分析的理论情况相吻合的6/82、验证系统的稳定性下图分别为A=02:=10.1:=1:4=1+02:=0.3时候的情况。可以看到,当λ
- 2020-12-09下载
- 积分:1
-
900多个51/52单片机仿真实例大全,包含源程序代码
900多个51/52单片机仿真实例大全,包含c语言源程序项目代码,均经过测试
- 2020-12-12下载
- 积分:1
-
labview 模拟汽车系统(LABVIEW小汽车智能简易仪表盘)
基于LABVIEW的模拟汽车转速方向控制,模拟汽车行驶过程的状态,程序含有油量计算,档位变化,刹车程序,模拟汽车动图及干扰模拟等
- 2019-04-18下载
- 积分:1
-
图像处理-加噪、去噪、压缩(Matlab GUI)
Matlab GUI集成了图像加噪、去噪和压缩三种功能,并附相关源码及操作说明。图像加噪包含高斯、泊松、椒盐、斑点噪声;图像去噪包含中值滤波、维纳滤波、小波滤波、理想低通滤波和高斯低通滤波;图像压缩包含PCA、DCT(离散余弦变换)、FFT(快速傅里叶变换)、位平面行程编码和JPEG。
- 2020-07-03下载
- 积分:1
-
图像标注工具_mask_rcnn等深度学习样本制作
图像标注工具,参考了VIA及labelme等标注软件,由C#编写,支持矩形及多边形的数据标定,为了制作数据集用来做实例分割等深度学习算法训练,特编写了次软件,本着开源精神,代码一起奉上。分享给需要的好朋友们。
- 2020-12-08下载
- 积分:1
-
用matlab实现自适应图像阈值分割(最大类间方差法
用matlab实现自适应图像阈值分割(最大类间方差法)%本程序是利用最大类间方差算法求解自适应阈值,对图像进行分割
- 2020-12-01下载
- 积分:1
-
koza的遗传编程资料
有关遗传编程引用的最多的资料,很基础。对遗传编程进行了详细的介绍。
- 2020-12-03下载
- 积分:1
-
稀疏自编码深度学习的Matlab实现
稀疏自编码深度学习的Matlab实现,sparse Auto coding,Matlab codetrain, m/7% CS294A/CS294W Programming Assignment Starter CodeInstructions%%%This file contains code that helps you get started ontheprogramming assignment. You will need to complete thecode in sampleIMAgEsml sparseAutoencoder Cost m and computeNumericalGradientml For the purpose of completing the assignment, you domot need tochange the code in this filecurer:YiBinYUyuyibintony@163.com,WuYiUniversityning, MATLAB Code for Sparse Autoencodtrain.m∥%%========%6% STEP 0: Here we provide the relevant parameters valuesthat willl allow your sparse autoencoder to get good filters; youdo not need to9 change the parameters belowvisibleSize =8*8; number of input unitshiddensize 25number of hidden unitssparsity Param =0.01; desired average activation ofthe hidden units7 (This was denoted by the greek alpharho, which looks like a lower-case pcurer:YiBinYUyuyibintony@163.com,WuYiUniversityning, MATLAB Code for Sparse Autoencod4/57train.,m∥in the lecture notes)1 ambda=0.0001%o weight decay parameterbeta 3%o weight of sparsity penalty term%%==:79 STEP 1: Implement sampleIMAGESAfter implementing sampleIMAGES, the display_networkcommand shouldfo display a random sample of 200 patches from the datasetpatches sampleIMAgES;display_network(patches(:, randi(size(patches, 2), 204, 1)), 8)%为产生一个204维的列向量,每一维的值为0~10000curer:YiBinYUyuyibintony@163.com,WuYiUniversityning, MATLAB Code for Sparse Autoencod5/57train.m/v%中的随机数,说明是随机取204个 patch来显示%o Obtain random parameters thetatheta= initializeParameters ( hiddenSize, visibleSize)%%=============三三三三====================================97 STEP 2: Implement sparseAutoencoder CostYou can implement all of the components (squared errorcost, weight decay termsparsity penalty) in the cost function at once, butit may be easier to do%o it step-by-step and run gradient checking (see STEP3 after each stepWecurer:YiBinYUyuyibintony@163.com,WuYiUniversityning, MATLAB Code for Sparse Autoencod6/57train. m vb suggest implementing the sparseAutoencoder Cost functionusing the following steps(a) Implement forward propagation in your neural networland implement the%squared error term of the cost function. Implementbackpropagation tocompute the derivatives. Then (using lambda=beta=(run gradient Checking%to verify that the calculations corresponding tothe squared error costterm are correctcurer:YiBinYUyuyibintony@163.com,WuYiUniversityning, MATLAB Code for Sparse Autoencod7/57train. m vl(b) Add in the weight decay term (in both the cost funcand the derivativecalculations), then re-run Gradient Checking toverify correctnessl (c) Add in the sparsity penalty term, then re-run gradiChecking toverify correctnessFeel free to change the training settings when debuggingyour%o code. (For example, reducing the training set sizecurer:YiBinYUyuyibintony@163.com,WuYiUniversityning, MATLAB Code for Sparse Autoencod8/57train m vl/number of hidden units may make your code run fasterand setting betaand/or lambda to zero may be helpful for debuggingHowever, in yourfinal submission of the visualized weights, please useparameters web gave in Step 0 abovecoS七grad]sparseAutoencoderCost(theta, visibleSize,hiddensize, lambda,sparsityParam, beta,patches)二〓二二二二二二二〓二〓二〓二〓=二====〓=curer:YiBinYUyuyibintony@163.com,WuYiUniversityning, MATLAB Code for Sparse Autoencod9/57train.m vlll96% STeP 3: Gradient CheckingHint: If you are debugging your code, performing gradienchecking on smaller modelsand smaller training sets (e. g, using only 10 trainingexamples and 1-2 hiddenunits) may speed things upl First, lets make sure your numerical gradient computationis correct for a%o simple function. After you have implemented computeNumerun the followingcheckNumericalGradientocurer:YiBinYUyuyibintony@163.com,WuYiUniversityDeep Learning, MATLAB Code for Sparse Autoencode10/57
- 2020-12-05下载
- 积分:1
-
cifar-10-batches-py.zip
做cs231n时候的作业上使用到的机器学习分类数据集。国内下载速度巨慢,而且还需要使用linux系统才能运行那个脚本,因此直接贴在CSDN上。The CIFAR-10 and CIFAR-100 are labeled subsets of the 80 million tiny images dataset. They were collected by Alex Krizhevsky, Vinod Nair, and Geoffrey Hinton.The CIFAR-10 datasetThe CIFAR-10 dataset consists of 60000 32x32 co
- 2019-12-29下载
- 积分:1
-
C#程序设计教程-郑阿奇
这是郑阿奇C#程序设计教程的程序代码部分
- 2020-12-03下载
- 积分:1