⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ed_sim_wrapper.m

📁 一个UWB仿真程序包
💻 M
字号:
%Wrapper file for sim, define sim params here and launch this script to start sim.%please refere to this file for a description of the possible params.%clean upclose allclear alltic%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Simulation parameters                                                %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% define parameters %%%%%%%%%%%%%%%%%%%%%%%%%TimingTC = 2e-9; %chip duration in sFS_CONT = 10e9; %sampling frequency in Hz to get cont time signal%PreambleL = 64; %spreading factorCODE_ID = 5; %which one of the 802.15.4a ternary codes to use%Channel ModelCH_MODEL = 1; %which channel model to chooseCH_ATT_THLD_DB = 15; %rays with bigger attenuation are considered 0%CH_RNG_SEED = 100*RUN+sim_run;%NoiseSNR_DB = 13; %Eb/N0% DataBURST_LENGTH = 4; %SYMBOL_LENGTH = 512; %RSCODE  = 1;if RSCODE == 1  DATA_LENGTH = 870  fullblock = floor(DATA_LENGTH/330);  PACKET_LENGTH = fullblock*378 + (DATA_LENGTH-fullblock*330) + 48;else  DATA_LENGTH = 127*8;  PACKET_LENGTH = DATA_LENGTH;end%ReceiverRX_BW = 2e9; %BW of the receiver determines Nyquist = 2*RX_BWT_INT = 1e-9; %integration lengthN_INT = 8; %how many blocks of length T_INT to sumG = 4; %how many repetitions of code in correlationTHLD_PROBA = 0.9; %threshold for correlation peaksN = 6; %number of consecutive corr peaks neededG_CHEST = 8; %number of len 31 symbols we accumulate for channel mask%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%simulation specific values, runs, instances allowing parallelizationRUN = 9; %number of the run determines init of rngsSIMS_PER_RUN = 1; %number of sims per run (!!! max 100 !!!)PLOT_FLAG = 1; %flag indicating whether to show plots%in/out filesCLUSTER = 0; %indicates whether we are running on cluster or notOUT_FILE = 'out_test.txt'; %output text fileed_sim(TC,BURST_LENGTH,SYMBOL_LENGTH,DATA_LENGTH,RSCODE,PACKET_LENGTH,FS_CONT,L,CODE_ID,CH_MODEL,CH_ATT_THLD_DB,SNR_DB,RX_BW,T_INT,N_INT,G,THLD_PROBA,N,G_CHEST,RUN,SIMS_PER_RUN,PLOT_FLAG,CLUSTER,OUT_FILE);toc

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -