




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、湖南工程學(xué)院課 程 設(shè) 計(jì) 任 務(wù) 書課程名稱 通信原理 題 目數(shù)字調(diào)制GUI仿真平臺(tái)的設(shè)計(jì) 專業(yè)班級(jí): 電 信1202 學(xué)生姓名: 王 杰 學(xué)號(hào): 201201030232 指導(dǎo)老師: 曾 志 剛 審 批: 任務(wù)書下達(dá)日期 2014年 月 日設(shè) 計(jì) 完成日期 年 月 日 設(shè)計(jì)內(nèi)容與設(shè)計(jì)要求一、設(shè)計(jì)內(nèi)容:利用MATLAB的GUI圖形界面設(shè)計(jì)工具設(shè)計(jì)數(shù)字調(diào)制的仿真平臺(tái)。1、熟悉GUI圖形界面的設(shè)計(jì)方法;2、利用MATLAB的GUI工具設(shè)計(jì)仿真實(shí)驗(yàn)平臺(tái)。二、設(shè)計(jì)要求1、給出系統(tǒng)框圖以及仿真界面;2、給出各模塊的后臺(tái)程序設(shè)計(jì);主要設(shè)計(jì)條件MATLAB軟件;說明書格式1. 課程設(shè)計(jì)封面;2. 任務(wù)書;
2、3. 說明書目錄;4. 設(shè)計(jì)基本原理與系統(tǒng)框圖。5. 各單元電路設(shè)計(jì);6. 系統(tǒng)進(jìn)行調(diào)試結(jié)果;7. 總結(jié)與體會(huì);8. 附錄;9. 參考文獻(xiàn)。進(jìn)度安排D1:下達(dá)設(shè)計(jì)任務(wù)書,介紹課題內(nèi)容與要求; D2:查找資料;D3D5:設(shè)計(jì)系統(tǒng)框圖、完成仿真界面的設(shè)計(jì);D6D9:設(shè)置調(diào)試仿真參數(shù),設(shè)計(jì)后臺(tái)程序;D10D14:編寫并打印設(shè)計(jì)報(bào)告;D15:答辯。參考文獻(xiàn)1、樊昌信主編,通信原理,國(guó)防工業(yè)出版社。2、南利平主編,通信原理簡(jiǎn)明教程,清華大學(xué)出版社。 3、浣喜明,通信原理實(shí)驗(yàn)指導(dǎo)書,湖南工程學(xué)院。4、施曉紅,周佳精通GUI圖形界面編程,北京大學(xué)出版社。 目 錄一.緒論41 前言42 設(shè)計(jì)框圖5二.單元電路
3、51 二進(jìn)制振幅鍵控(2ASK)52 二進(jìn)制頻移鍵控(2FSK)63 二進(jìn)制相移鍵控(2PSK)64 二進(jìn)制差分相移鍵控(2DPSK)7三.GUI仿真71新建GUI72 2ASK 仿真83 2FSK仿真94 2PSK仿真115 2DPSK 仿真126 退出14四總結(jié)與體會(huì)15五.附錄16參考文獻(xiàn)23一.緒論1 前言目前數(shù)字信號(hào)在生活中越來越普遍,越來越受歡迎。低頻基帶信號(hào)只能適合短距離傳輸,要進(jìn)行遠(yuǎn)距離的傳輸需要調(diào)制到高頻,所以數(shù)字調(diào)制的設(shè)計(jì)越來越有必要性。本設(shè)計(jì)主要設(shè)計(jì)了我們生活中常見的調(diào)制方式,有2ASK、2FSK、2PSK、2DPSK。具體的設(shè)計(jì)會(huì)在單元電路中體現(xiàn),本設(shè)計(jì)的仿真是在MAT
4、LAB下GUI設(shè)計(jì)的。2 設(shè)計(jì)框圖載波信號(hào)乘 法 器2ASK判決2FSK判決2PSK2DPSKA(t)二.單元電路1 二進(jìn)制振幅鍵控(2ASK)二進(jìn)制振幅鍵控信號(hào)碼元表達(dá)式如下: 式中為載波的角頻率;A(t)是隨基帶調(diào)制信號(hào)變化的時(shí)振幅,即:A 當(dāng)發(fā)送“1”時(shí)0 當(dāng)發(fā)送“0”時(shí)本設(shè)計(jì)采用相乘電路,用基帶信號(hào)A(t)與載波相乘就得到已調(diào)信號(hào)。2 二進(jìn)制頻移鍵控(2FSK)二進(jìn)制頻移鍵控信號(hào)碼元的“1”和“0”分別用兩個(gè)不同頻率余弦波形來傳送。而其振幅和初相位不變。故其表達(dá)式如下: 當(dāng)發(fā)送“1”時(shí) 當(dāng)發(fā)送“0”時(shí)A為一常數(shù),表明碼元的包絡(luò)是矩形脈沖,本設(shè)計(jì)采用根據(jù)基帶信號(hào)判斷輸出不同頻率的余弦波。
5、3 二進(jìn)制相移鍵控(2PSK)2PSK信號(hào)碼元的“0”和“1”分別用兩個(gè)不同的初相位來表示,而其振幅和頻率保持不變。故2PSK信號(hào)表達(dá)式如下: );式中,當(dāng)發(fā)“0”時(shí),。當(dāng)發(fā)“1”時(shí),。具體表達(dá)式如下: 當(dāng)發(fā)送“0”時(shí) 當(dāng)發(fā)送“1”時(shí)本設(shè)計(jì)采用選擇法,根據(jù)基帶信號(hào)來判斷選擇輸出不同初相位的余弦波。4 二進(jìn)制差分相移鍵控(2DPSK)2DPSK是利用相鄰碼元載波相位的相對(duì)值表示基帶信號(hào)“0”和“1”的?,F(xiàn)在用表示載波的初相位。用表示當(dāng)前碼元與前一碼元的相位之差: 當(dāng)發(fā)送“0”時(shí) 當(dāng)發(fā)送“1”時(shí)則信號(hào)碼元可以表示為: 三.GUI仿真1新建GUI在MATLAB中打開GUI,進(jìn)入后調(diào)用需要的圖標(biāo),然后
6、運(yùn)行,得到m文件,然后再到m文件中修改每一個(gè)按鈕所指定的功能。新建的GUI如下圖:2 2ASK 仿真首先用get語句得到文字框中輸入的基帶信號(hào),再計(jì)算基帶信號(hào)的的長(zhǎng)度,再使用for語句進(jìn)行循環(huán),并讓每個(gè)碼元與載波相乘得到調(diào)制信號(hào)并畫出其圖形,再畫出基帶信號(hào)的圖形與之作比較對(duì)照。源代碼如下:function pushbutton1_Callback(hObject, eventdata, handles)% hObject handle to pushbutton1 (see GCBO)% eventdata reserved - to be defined in a future versio
7、n of MATLAB% handles structure with handles and user data (see GUIDATA)input=get(handles.edit2,'String');n=size(input);for a=1:n(2) t=a-1:0.005:a;y=cos(2*pi*t-pi/2)*(input(a)-48);plot(t,y)hold ony1=input(a)-48;plot(t,y1,'r')legend('調(diào)制信號(hào)','基帶信號(hào)')xlabel('bit');y
8、label('幅值');title('2ASK')hold onylim(-1.4 1.8);endhold offgrid on% - Executes on button press in pushbutton2.仿真圖如下:3 2FSK仿真2FSK通過if語句來判斷輸出不同頻率的余弦波。源代碼如下:function pushbutton2_Callback(hObject, eventdata, handles)% hObject handle to pushbutton2 (see GCBO)% eventdata reserved - to be de
9、fined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)?%?handles?structure?with?handles?and?user?data?(see?GUIDATA)?input=get(handles.edit1,'String');?input=get(handles.edit2,'String');n=size(input);for a=1:n(2) t=a-1:0.005:a; if input(a)-48=0
10、 y=cos(2*pi*t-pi/2); else y=cos(4*pi*t-pi/2); end plot(t,y) hold on y1=input(a)-48; plot(t,y1,'r')legend('調(diào)制信號(hào)','基帶信號(hào)')xlabel('bit');ylabel('幅值');title('2FSK')hold onylim(-1.4 1.8);endhold offgrid on仿真圖如下:4 2PSK仿真2PSK采用判決法產(chǎn)生當(dāng)基帶信號(hào)為“0”時(shí),初相位為0,當(dāng)為“1”時(shí),初相位為
11、180。源代碼如下:function pushbutton3_Callback(hObject, eventdata, handles)% hObject handle to pushbutton3 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)input=get(handles.edit2,'String');n=size(input);for a=1:
12、n(2) t=a-1:0.005:a; if input(a)-48=0 y=cos(2*pi*t+pi/2); else y=cos(2*pi*t-pi/2); end plot(t,y) hold on y1=input(a)-48; plot(t,y1,'r')legend('調(diào)制信號(hào)','基帶信號(hào)')xlabel('bit');ylabel('幅值');title('2PSK')hold onylim(-1.4 1.8);endhold offgrid on仿真圖如下:5 2DPSK 仿真2
13、DPSK是通過前后碼元的相位差值來編碼輸出的,是把2PSK變?yōu)橄鄬?duì)碼元。源代碼如下:function pushbutton4_Callback(hObject, eventdata, handles)% hObject handle to pushbutton5 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)input=get(handles.edit2,'Str
14、ing');n=size(input);dp=0;for a=1:n(2) t=a-1:0.005:a; dp=dp+pi*(input(a)-48); y=cos(2*pi*t+dp+pi/2); plot(t,y,'b') hold on y1=input(a)-48; plot(t,y1,'r')legend('調(diào)制信號(hào)','基帶信號(hào)')xlabel('bit');ylabel('幅值');title('2DPSK')hold onylim(-1.4 1.8);endh
15、old offgrid on仿真圖如下:6 退出退出GUI的代碼如下:function pushbutton5_Callback(hObject, eventdata, handles)% hObject handle to pushbutton4 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)exit;四總結(jié)與體會(huì) 在本次課程設(shè)計(jì)中,我學(xué)會(huì)了一種新技能就是使用MATLA
16、B中的GUI,之前只學(xué)會(huì)了MATLAB中如何編制M文件,現(xiàn)在能夠自己設(shè)計(jì)一個(gè)圖形化的界面,感覺十分有成就感。非常高興能有這樣的機(jī)會(huì)鍛煉自己的學(xué)習(xí)能力,一方面在鍛煉自己的學(xué)習(xí)能力的同時(shí),也表現(xiàn)出了自己有能力學(xué)好一門新技能。學(xué)習(xí)的技能不只是看書,還有上網(wǎng)查資料,圖書館借資料,對(duì)資料的分類,整理與分析。通過此次課設(shè),我感覺我的學(xué)習(xí)能力得到了大大的提升。五.附錄全過程源代碼如下:function varargout = untitled2(varargin)% UNTITLED2 M-file for untitled2.fig% UNTITLED2, by itself, creates a new
17、 UNTITLED2 or raises the existing% singleton*.% H = UNTITLED2 returns the handle to a new UNTITLED2 or the handle to% the existing singleton*.% UNTITLED2('CALLBACK',hObject,eventData,handles,.) calls the local% function named CALLBACK in UNTITLED2.M with the given input arguments.% UNTITLED2
18、('Property','Value',.) creates a new UNTITLED2 or raises the% existing singleton*. Starting from the left, property value pairs are% applied to the GUI before untitled2_OpeningFunction gets called. An% unrecognized property name or invalid value makes property application% stop. All
19、inputs are passed to untitled2_OpeningFcn via varargin.% *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one% instance to run (singleton)".% See also: GUIDE, GUIDATA, GUIHANDLES% Copyright 2002-2003 The MathWorks, Inc.% Edit the above text to modify the response to help
20、 untitled2% Last Modified by GUIDE v2.5 21-Dec-2014 15:55:06% Begin initialization code - DO NOT EDITgui_Singleton = 1;gui_State = struct('gui_Name', mfilename, . 'gui_Singleton', gui_Singleton, . 'gui_OpeningFcn', untitled2_OpeningFcn, . 'gui_OutputFcn', untitled2_Ou
21、tputFcn, . 'gui_LayoutFcn', , . 'gui_Callback', );if nargin && ischar(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
22、% - Executes just before untitled2 is made visible.function untitled2_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 us
23、er data (see GUIDATA)% varargin command line arguments to untitled2 (see VARARGIN)% Choose default command line output for untitled2handles.output = hObject;% Update handles structureguidata(hObject, handles);% UIWAIT makes untitled2 wait for user response (see UIRESUME)% uiwait(handles.figure1);% -
24、 Outputs from this function are returned to the command line.function varargout = untitled2_OutputFcn(hObject, eventdata, handles) % varargout cell array for returning output args (see VARARGOUT);% hObject handle to figure% eventdata reserved - to be defined in a future version of MATLAB% handles st
25、ructure with handles and user data (see GUIDATA)% Get default command line output from handles structurevarargout1 = handles.output;% - Executes on button press in pushbutton1.function pushbutton1_Callback(hObject, eventdata, handles)% hObject handle to pushbutton1 (see GCBO)% eventdata reserved - t
26、o be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)input=get(handles.edit2,'String');n=size(input);for a=1:n(2) t=a-1:0.005:a;y=cos(2*pi*t-pi/2)*(input(a)-48);plot(t,y)hold ony1=input(a)-48;plot(t,y1,'r')legend('調(diào)制信號(hào)','基帶
27、信號(hào)')xlabel('bit');ylabel('幅值');title('2ASK')hold onylim(-1.4 1.8);endhold offgrid on% - Executes on button press in pushbutton2.function pushbutton2_Callback(hObject, eventdata, handles)% hObject handle to pushbutton2 (see GCBO)% eventdata reserved - to be defined in a fu
28、ture version of MATLAB% handles structure with handles and user data (see GUIDATA)?%?handles?structure?with?handles?and?user?data?(see?GUIDATA)?input=get(handles.edit1,'String');?input=get(handles.edit2,'String');n=size(input);for a=1:n(2) t=a-1:0.005:a; if input(a)-48=0 y=cos(2*pi*t
29、-pi/2); else y=cos(4*pi*t-pi/2); end plot(t,y) hold on y1=input(a)-48; plot(t,y1,'r')legend('調(diào)制信號(hào)','基帶信號(hào)')xlabel('bit');ylabel('幅值');title('2FSK')hold onylim(-1.4 1.8);endhold offgrid on% - Executes on button press in pushbutton3.function pushbutton3_C
30、allback(hObject, eventdata, handles)% hObject handle to pushbutton3 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)input=get(handles.edit2,'String');n=size(input);for a=1:n(2) t=a-1:0.005:a; if input(a)-
31、48=0 y=cos(2*pi*t+pi/2); else y=cos(2*pi*t-pi/2); end plot(t,y) hold on y1=input(a)-48; plot(t,y1,'r')legend('調(diào)制信號(hào)','基帶信號(hào)')xlabel('bit');ylabel('幅值');title('2PSK')hold onylim(-1.4 1.8);endhold offgrid on% - Executes on button press in pushbutton5.funct
32、ion pushbutton4_Callback(hObject, eventdata, handles)% hObject handle to pushbutton5 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)input=get(handles.edit2,'String');n=size(input);dp=0;for a=1:n(2) t=a-1
33、:0.005:a; dp=dp+pi*(input(a)-48); y=cos(2*pi*t+dp+pi/2); plot(t,y,'b') hold on y1=input(a)-48; plot(t,y1,'r')legend('調(diào)制信號(hào)','基帶信號(hào)')xlabel('bit');ylabel('幅值');title('2DPSK')hold onylim(-1.4 1.8);endhold offgrid on% - Executes on button press in p
34、ushbutton4.function pushbutton5_Callback(hObject, eventdata, handles)% hObject handle to pushbutton4 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)exit;function edit2_Callback(hObject, eventdata, handles)% hObject handle to edit2 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handl
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 物業(yè)內(nèi)勤的工作總結(jié)(14篇)
- 2025福建南安市首創(chuàng)水務(wù)有限責(zé)任公司招聘6人筆試參考題庫(kù)附帶答案詳解
- 2025福建武夷碳產(chǎn)業(yè)投資有限公司招聘2人筆試參考題庫(kù)附帶答案詳解
- 2025浙江省安全生產(chǎn)科學(xué)研究有限公司招聘15人筆試參考題庫(kù)附帶答案詳解
- 2025年甘肅省慶陽(yáng)市新莊煤礦面向社會(huì)招聘生產(chǎn)性靈活用工206人筆試參考題庫(kù)附帶答案詳解
- 2025年人保財(cái)險(xiǎn)陜西省分公司招聘(57人)筆試參考題庫(kù)附帶答案詳解
- 加強(qiáng)校園餐飲安全管理的策略與實(shí)施路徑
- 低空經(jīng)濟(jì)公司成立前景分析報(bào)告
- 2024年房地產(chǎn)開發(fā)經(jīng)營(yíng)服務(wù)項(xiàng)目資金需求報(bào)告代可行性研究報(bào)告
- 專賣合同協(xié)議書
- 膿胸護(hù)理疑難病例討論
- 國(guó)際企業(yè)的財(cái)務(wù)管理完整版
- 2024年愛數(shù)技術(shù)認(rèn)證工程師考試題目
- 北師大版 2024-2025學(xué)年四年級(jí)數(shù)學(xué)上冊(cè)典型例題系列第六單元:商的變化規(guī)律和商不變的性質(zhì)專項(xiàng)練習(xí)(原卷版+解析)
- 2024年英語B級(jí)考試真題及答案
- 人教版五年級(jí)英語123單元測(cè)試卷名校版含答案
- 農(nóng)村土地承包法知識(shí)講座
- 2023年浙江省高考滿分作文:科技的新秀人文的毒酒
- 草木緣情:中國(guó)古典文學(xué)中的植物世界
- 中國(guó)絕緣材料產(chǎn)品及應(yīng)用手冊(cè)
- 擒拿格斗課件
評(píng)論
0/150
提交評(píng)論