无线楼宇数据传输系统的仿真_第1页
无线楼宇数据传输系统的仿真_第2页
无线楼宇数据传输系统的仿真_第3页
无线楼宇数据传输系统的仿真_第4页
无线楼宇数据传输系统的仿真_第5页
已阅读5页,还剩6页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、无线楼宇数据传输系统的仿真1. 摘要本实验的内容是无线楼宇数据传输仿真,分析915M的楼宇通信特性,建立楼宇数据通信系统的仿真模型,采用无线收发芯片NRF905,依据其性能参数来判断楼宇内两点能否进行数据传输。2. 实验内容:无线楼宇数据传输系统的仿真。分析915M的楼宇通信特性,建立楼宇数据通信系统的仿真模型,采用无线收发芯片NRF905,依据其性能参数来判断楼宇内两点之间能否进行数据传输。路径损耗(Path Loss)主要是由三个方面的因素导致的:一是发射机和接收机之间相隔的距离;二是同一楼层的软隔板;三是竖直方向的混凝土墙。它们造成的路径损耗可用以下公式表示:PL(d)dB=20*log

2、10(4*pi*d/l)+p*AF(soft partition)dB+q*AF(concret wall)dB.其中d是收发之间相隔的距离(m),l是芯片发出信号的波长(l= c / f = 300 M / 914 M = 0. m),p是软隔墙数,其相应的AF(soft partition)=1.39dB,q是混凝土墙数,其相应的 AF(concret wall)=2.38dB。由此,考虑此仿真系统为二维。即:当知道软隔墙数p和混凝土墙数q时,根据平面两点之间距离公式,可以得到收发之间相隔的近似距离:d=sqrt(p*x)2+(q*y)2).其中x为每两个软隔墙之间的水平距离,y为每两个混

3、凝土墙楼层之间的竖直高度。x,y为已知参数。所以程序需输入p、q两个变量,即可得到收发之间相隔的近似距离,进而算出收发之间的路径损耗。无线收发芯片NRF905的最大输出功率为10dBm=-20dB,接收分辨功率(能接收到的最小功率)为-100dBm=-130dB,所以其能允许的最大衰减范围为-20-(-130)=110dB,当路径损耗在此范围内芯片能够收发信号。程序中先算出发射机和接收机之间的路径损耗,再与110dB相比较。若小于110dB,则在允许的衰减范围内,能够进行无线楼宇数据通信;若大于110dB,则超出允许的衰减范围,不能进行无线楼宇数据通信。最后,程序分别绘制出路径损耗随软隔墙数p

4、和混凝土墙数q的变化曲线。即同一楼层(q=0)的路径损耗随软隔墙数的增加(水平距离的增大)的变化曲线;和竖直方向上(p=0)路径损耗随混凝土墙数的增加(竖直高度的增加)的变化曲线。3. 实验程序及结果:function varargout = Wirelesscommunication_building(varargin)% WIRELESSCOMMUNICATION_BUILDING M-file for Wirelesscommunication_building.fig% WIRELESSCOMMUNICATION_BUILDING, by itself, creates a new W

5、IRELESSCOMMUNICATION_BUILDING or raises the existing% singleton*.% H = WIRELESSCOMMUNICATION_BUILDING returns the handle to a new WIRELESSCOMMUNICATION_BUILDING or the handle to% the existing singleton*.% WIRELESSCOMMUNICATION_BUILDING('CALLBACK',hObject,eventData,handles,.) calls the local%

6、 function named CALLBACK in WIRELESSCOMMUNICATION_BUILDING.M with the given input arguments.% WIRELESSCOMMUNICATION_BUILDING('Property','Value',.) creates a new WIRELESSCOMMUNICATION_BUILDING or raises the% existing singleton*. Starting from the left, property value pairs are% applie

7、d to the GUI before Wirelesscommunication_building_OpeningFunction gets called. An% unrecognized property name or invalid value makes property application% stop. All inputs are passed to Wirelesscommunication_building_OpeningFcn via varargin.% *See GUI Options on GUIDE's Tools menu. Choose "

8、;GUI allows only one% instance to run (singleton)".% See also: GUIDE, GUIDATA, GUIHANDLES% Edit the above text to modify the response to help Wirelesscommunication_building% Last Modified by GUIDE v2.5 18-May-2006 22:38:07% Begin initialization code - DO NOT EDITgui_Singleton = 1;gui_State = st

9、ruct('gui_Name', mfilename, . 'gui_Singleton', gui_Singleton, . 'gui_OpeningFcn', Wirelesscommunication_building_OpeningFcn, . 'gui_OutputFcn', Wirelesscommunication_building_OutputFcn, . 'gui_LayoutFcn', , . 'gui_Callback', );if nargin && isch

10、ar(varargin1) gui_State.gui_Callback = str2func(varargin1);endif nargout varargout1:nargout = gui_mainfcn(gui_State, varargin:);else gui_mainfcn(gui_State, varargin:);end% End initialization code - DO NOT EDIT% - Executes just before Wirelesscommunication_building is made visible.function Wirelessco

11、mmunication_building_OpeningFcn(hObject, eventdata, handles, varargin)% This function has no output args, see OutputFcn.% hObject handle to figure% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)% varargin command line argu

12、ments to Wirelesscommunication_building (see VARARGIN)% Choose default command line output for Wirelesscommunication_buildinghandles.output = hObject;% Update handles structureguidata(hObject, handles);% UIWAIT makes Wirelesscommunication_building wait for user response (see UIRESUME)% uiwait(handle

13、s.figure1);% - Outputs from this function are returned to the command line.function varargout = Wirelesscommunication_building_OutputFcn(hObject, eventdata, handles) % varargout cell array for returning output args (see VARARGOUT);% hObject handle to figure% eventdata reserved - to be defined in a f

14、uture version of MATLAB% handles structure with handles and user data (see GUIDATA)% Get default command line output from handles structurevarargout1 = handles.output;function edit1_Callback(hObject, eventdata, handles)% hObject handle to edit1 (see GCBO)% eventdata reserved - to be defined in a fut

15、ure version of MATLAB% handles structure with handles and user data (see GUIDATA)% Hints: get(hObject,'String') returns contents of edit1 as text% str2double(get(hObject,'String') returns contents of edit1 as a double% Read the input value edit1 = str2double(get(hObject,'String&#

16、39;);% Check whether the input is a numberif isnan(edit1) set(hObject, 'String', 1); errordlg('Input must be a number','Error');endif (edit1<0|edit1>4) errordlg('发射机和接收机相隔的楼层数必须在零到四层之间','Error');end;% Save the new valuedata = getappdata(gcbf, 'metric

17、data');data.edit1 = edit1;setappdata(gcbf, 'metricdata', data);% - Executes during object creation, after setting all properties.function edit1_CreateFcn(hObject, eventdata, handles)% hObject handle to edit1 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% ha

18、ndles empty - handles not created until after all CreateFcns called% Hint: edit controls usually have a white background on Windows.% See ISPC and COMPUTER.if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor') set(hObject,'BackgroundC

19、olor','white');endfunction edit2_Callback(hObject, eventdata, handles)% hObject handle to edit2 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)% Hints: get(hObject,'String') returns contents

20、of edit2 as text% str2double(get(hObject,'String') returns contents of edit2 as a double% Read the input valueedit2 = str2double(get(hObject,'String');% Check whether the input is a numberif isnan(edit2) set(hObject, 'String', 1); errordlg('Input must be a number',

21、9;Error');endif edit2<0 errordlg('发射机和接收机相隔的距离必须大于0','Error');end;% Save the new valuedata = getappdata(gcbf, 'metricdata');data.edit2 = edit2;setappdata(gcbf, 'metricdata', data);% - Executes during object creation, after setting all properties.function edit2_

22、CreateFcn(hObject, eventdata, handles)% hObject handle to edit2 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles empty - handles not created until after all CreateFcns called% Hint: edit controls usually have a white background on Windows.% See ISPC and COMPUTER.

23、if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor') set(hObject,'BackgroundColor','white');endfunction edit3_Callback(hObject, eventdata, handles)% hObject handle to edit3 (see GCBO)% eventdata reserved - to be defined i

24、n a future version of MATLAB% handles structure with handles and user data (see GUIDATA)% Hints: get(hObject,'String') returns contents of edit3 as text% str2double(get(hObject,'String') returns contents of edit3 as a double% Read the input valueedit3 = str2double(get(hObject,'St

25、ring');% Check whether the input is a numberif isnan(edit3) set(hObject, 'String', 1); errordlg('Input must be a number','Error');endif edit3<0 errordlg('收发之间的软隔墙数必须大于或等于0','Error');end;% Save the new valuedata = getappdata(gcbf, 'metricdata');d

26、ata.edit3 = edit3;setappdata(gcbf, 'metricdata', data);% - Executes during object creation, after setting all properties.function edit3_CreateFcn(hObject, eventdata, handles)% hObject handle to edit3 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles empty

27、- handles not created until after all CreateFcns called% Hint: edit controls usually have a white background on Windows.% See ISPC and COMPUTER.if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor') set(hObject,'BackgroundColor',&#

28、39;white');endfunction edit4_Callback(hObject, eventdata, handles)% hObject handle to edit4 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)% Hints: get(hObject,'String') returns contents of edit4 as

29、text% str2double(get(hObject,'String') returns contents of edit4 as a double% Read the input valueedit4 = str2double(get(hObject,'String');% Check whether the input is a numberif isnan(edit4) set(hObject, 'String', 1); errordlg('Input must be a number','Error'

30、);endif edit4<0 errordlg('收发之间的混凝墙数必须大于或等于0','Error');end;% Save the new valuedata = getappdata(gcbf, 'metricdata');data.edit4 = edit4;setappdata(gcbf, 'metricdata', data);% - Executes during object creation, after setting all properties.function edit4_CreateFcn(hO

31、bject, eventdata, handles)% hObject handle to edit4 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles empty - handles not created until after all CreateFcns called% Hint: edit controls usually have a white background on Windows.% See ISPC and COMPUTER.if ispc &

32、;& isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor') set(hObject,'BackgroundColor','white');end% - Executes on button press in pushbutton1.function pushbutton1_Callback(hObject, eventdata, handles)% hObject handle to pushbutton1 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)data = getappdata(gcbf, 'metricdata');p=data.edit3; %收发之间的软隔墙数q=data.edit4; %收发之间的混凝土墙数x=5; %每两个软隔墙之间的距离(m)y=3; %每一楼层的高度(m)d=sq

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论