信号采集、分析与处理项目设计报告.doc_第1页
信号采集、分析与处理项目设计报告.doc_第2页
信号采集、分析与处理项目设计报告.doc_第3页
信号采集、分析与处理项目设计报告.doc_第4页
信号采集、分析与处理项目设计报告.doc_第5页
已阅读5页,还剩51页未读 继续免费阅读

下载本文档

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

文档简介

中国民航大学航空自动化学院信号分析与处理课程设计报告 题 目:基于Matlab的信号采集、分析与处理项目专业班级:电子信息工程专业111145A班 学号: 指导教师: 二一三年六月三十日目 录一、设计目的及意义二、设计要求三、设计原理及方案四、软件流程五、运行分析六、设计总结七、参考文献八、 附录(程序代码)一、 设计目的及意义 本设计用微软自带的软件进行实时采集信号(声音或图像,下述信号同上),对其进行了时域分析,频谱分析。并应用matlab平台对信号加入了不同的噪声,进一步设计了一个的处理声音的巴特沃思低通滤波器和处理图像的相应的均值或平均滤波器,然后对加噪的信号进行滤波处理。最后对比滤波前后的信号的时域和频域特性,通过回放加噪语音信号和去噪语音信号以及图像处理后与处理前视觉角度上的对比,研究了信号处理尤其是信号滤波去噪方面的特性和应用。 在信号分析与处理的最后,语音与图像都添加的多种特效,在不断的自学过程中,我们对已学的信号与系统、数字信号处理更进一步的理解以及语音与图像在时域与频域真正的存在形式。二、设计要求 完成信号的采集,然后加载噪声信号,设计滤波器对加载噪声后的信号进行滤波处理,在整个过程中利用信号各个阶段的时域波形和频域波形图,从理论和视觉角度比较分析滤波的效果。在完成上述功能的基础上声音加入多种特效例如回声,延时及均衡器;图像加入反转,叠加等。 设计步骤如下:1.根据设计要求,结合要实现的功能总列GUI界面功能,合理构建下拉菜单; 2.学习matlab编程语言根据设计要求编辑相应的回调函数,并建立回调函数与下拉菜单之间的联系; 3.对系统进行调试及修改。 三、设计原理及方案设计原理:3.1模拟低通滤波器:假设模拟滤波器的系统函数对模拟滤波器取样后逼近后,得到的数字滤波器系统函数可见,数字滤波器可通过下述变换关系有模拟滤波器得到上述s平面到z平面之间的变换是双线性变换关系,故称之为“双线性”变换。它对高阶系统同样成立。回声:在一个像音乐厅那样的封闭空间中,人们听到的声音包括直接传播声音、一次反射声音和混响(reverberation)等几种成分。一次反射声音主要是由直接传播声音在近距离内的直接回声构成,而混响则是由密集的回声形成的。所以在一个隔音的舞台上录制的音乐与音乐厅中录制的效果就不一样,人们听起来会感到不自然。这时就需要用数字滤波器来人为地改变录制的信号,通过增加一些回声,使它接近于音乐厅中的效果。单回声的产生原理回声可以用延迟单元来实现,直接声音和它延迟了R个周期的单个回声可以下面的差分方程来表示: 其中,表示衰减系数。也可以用系统函数表示:可见,单回声可以通过一个FIR DF来实现。其冲激响应和结构图如图1:图1这实际上是一个梳状滤波器。设计方案:3.2时间安排:时间区间:第1周第15周时间节点:开题:第3周周末 中期检查:第7周周末 答辩:第15周周末具体时间安排:时间计 划 完 成 内 容第1周任务布置及软件介绍第2周熟悉所用软件第3周搭建一个简单界面,实现信号(语音、图像)的加载并显示开题第4周实现信号(语音、图像)的实时采集第5周对采集信号进行加噪,并对加噪前后信号进行谱分析第6周将信号分析部分加载到所做界面中第7周滤波器设计,中期检查第8周滤波器设计第9周将滤波器设计部分加载到所做界面中第10周信号特技效果实现第11周信号特技效果实现第12周针对上面所做内容存在的问题进行解决和相应功能的完善第13周附加功能的完善第14周完成设计报告第15周答辩3.3 人员分工何斌汉:收集资料、GUI界面制作、声音的采集与加噪,声音部分特效,制作设计报告等。范凯:辅助完成上述功能,并负责添加声音特效,均衡器及声音部分答辩PPT等高腾跃:GUI界面制作,图像的实时采集、加噪、滤波、图像的特技处理,制作图像部分答辩PPT等。郭宇:收集资料,辅助完成图像的相关功能,负责添加部分特效等。 3.4项目进程方案(1)项目根据具体分工安排及进度安排来具体分配工作、遇到问题时团队成员集体讨论解决,解决不了的问题在向老师汇报进度时提出进行讨论,在老师的帮助下,解决问题。(2)联系课本所学知识,能够对知识活学活用,对所学的知识尽可能应用进去,如回声效果。(3)在自己学习范围内适当的扩展与创新,如尝试添加多种特效,图像利用摄像头图像实时采集。四、软件流程 声音/图像导入画出语音频谱图 图像频谱图 画出声音时域图形 图像直方图 声音/图像处理 加入高频正弦噪声加入随机噪声 高斯噪声 巴特沃斯低通滤波器 椒盐噪声-均值滤波 高斯噪声-平均滤波 声音/图像特效 延时特性图像叠加图像伸缩变换图像截取图像任意角旋转 回声效果真彩图像求反真彩图像仿真运动模糊 均衡器(八段) 实现实时采集 真彩图像实时采集 视频实时采集5、 运行分析主界面:声音部分: 声音的采集及频谱分析 加随机噪后时域及频域图形FIR低通滤波器的幅频响应曲线滤波后IIR低通滤波器的幅频响应曲线滤波后加单频噪后时域及频域图形FIR滤波后IIR滤波后声音部分特效:1、 回声: 3、均衡器界面: 图像部分:读取图片 对称处理边缘处理 倒影处理灰度处理雾化处理旋转处理 六、设计总结 项目成员相互之间的帮忙协作,上网搜索相关资料,到图书馆查阅相关文献,遇到难题,共同商讨。解决不了的问题,我们就像老师和其他同学虚心请教。最终,我们一起解决了一个又一个难题,不断的寻找问题解决问题让我们感受到了团队的力量,班级的力量。在这个过程中,我们也对信号有了跟进一步的理解,而且我们尽可能拓展视野,例如均衡器、在Matlab中直接调用摄像头实时采集图像等,新知识带给了我们不断前进的动力,为我们以后通信的学习奠定了基础。最后由衷地感谢指导老师和同学在本次信号采集、分析与处理项目中给予的帮助与支持! 谢谢!七、参考文献1 郑君里,杨为理.信号与系统(第二版).北京:高等教育出版社,2000.2 周辉,董正宏.数字信号处理基础及MATLAB实现M.北京:北京希望电子 出版社,2006.3 邹理和.语音信号处理M.北京:国防工业出版社,1985.4 张德丰等,详解MATLAB数字信号处理.北京:电子工业出版社,2010.5 朱习军等,MATLAB在数字图像处理中的应用.北京:电子工业出版社,2009.6 胡晓军,徐飞,MATLAB应用图像处理.西安:西安电子科技大学出版社,2011.九、 附录(程序代码)主界面程序: function varargout = audio_project(varargin)% AUDIO_PROJECT M-file for audio_project.fig% AUDIO_PROJECT, by itself, creates a new AUDIO_PROJECT or raises the existing% singleton*.% H = AUDIO_PROJECT returns the handle to a new AUDIO_PROJECT or the handle to% the existing singleton*.% AUDIO_PROJECT(CALLBACK,hObject,eventData,handles,.) calls the local% function named CALLBACK in AUDIO_PROJECT.M with the given input arguments.% AUDIO_PROJECT(Property,Value,.) creates a new AUDIO_PROJECT or raises the% existing singleton*. Starting from the left, property value pairs are% applied to the GUI before audio_project_OpeningFcn gets called. An% unrecognized property name or invalid value makes property application% stop. All inputs are passed to audio_project_OpeningFcn via varargin.% *See GUI Options on GUIDEs Tools menu. Choose GUI allows only one% instance to run (singleton).% See also: GUIDE, GUIDATA, GUIHANDLES % Edit the above text to modify the response to help audio_project % Last Modified by GUIDE v2.5 26-Jun-2013 18:17:55 % Begin initialization code - DO NOT EDITgui_Singleton = 1;gui_State = struct(gui_Name, mfilename, . gui_Singleton, gui_Singleton, . gui_OpeningFcn, audio_project_OpeningFcn, . gui_OutputFcn, audio_project_OutputFcn, . gui_LayoutFcn, , . gui_Callback, );if nargin & ischar(varargin1) gui_State.gui_Callback = str2func(varargin1);end if nargout varargout1:nargout = gui_mainfcn(gui_State, varargin:);else gui_mainfcn(gui_State, varargin:);end% End initialization code - DO NOT EDIT % - Executes just before audio_project is made visible.function audio_project_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 arguments to audio_project (see VARARGIN) % Choose default command line output for audio_projecthandles.output = hObject; % Update handles structureguidata(hObject, handles); % UIWAIT makes audio_project wait for user response (see UIRESUME)% uiwait(handles.figure1); % - Outputs from this function are returned to the command line.function varargout = audio_project_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 structure with handles and user data (see GUIDATA) % Get default command line output from handles structurevarargout1 = handles.output; function recordtime_Callback(hObject, eventdata, handles)% hObject handle to recordtime (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 recordtime as text% str2double(get(hObject,String) returns contents of recordtime as a double % - Executes during object creation, after setting all properties.function recordtime_CreateFcn(hObject, eventdata, handles)% hObject handle to recordtime (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 & isequal(get(hObject,BackgroundColor), get(0,defaultUicontrolBackgroundColor) set(hObject,BackgroundColor,white);end % - Executes on button press in startrecord.function startrecord_Callback(hObject, eventdata, handles)% hObject handle to startrecord (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)Fs=str2double(get(findobj(Tag,samplerate),String);handles.y=wavrecord(str2double(get(findobj(Tag,recordtime),String)*Fs, Fs,double);wavwrite(handles.y,Fs,99.wav) handles.inputtype=1;guidata(hObject,handles);plot(handles.time,handles.y);title(WAVE);ysize=size(handles.y);set(handles.samplenum,String,num2str(ysize(1);% - Executes during object creation, after setting all properties.function startrecord_CreateFcn(hObject, eventdata, handles)% hObject handle to startrecord (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles empty - handles not created until after all CreateFcns called function filename_Callback(hObject, eventdata, handles)% hObject handle to filename (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 filename as text% str2double(get(hObject,String) returns contents of filename as a double % - Executes during object creation, after setting all properties.function filename_CreateFcn(hObject, eventdata, handles)% hObject handle to filename (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 & isequal(get(hObject,BackgroundColor), get(0,defaultUicontrolBackgroundColor) set(hObject,BackgroundColor,white);end function channel_Callback(hObject, eventdata, handles)% hObject handle to channel (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 channel as text% str2double(get(hObject,String) returns contents of channel as a double % - Executes during object creation, after setting all properties.function channel_CreateFcn(hObject, eventdata, handles)% hObject handle to channel (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 & isequal(get(hObject,BackgroundColor), get(0,defaultUicontrolBackgroundColor) set(hObject,BackgroundColor,white);end % - Executes on button press in fileopen.function fileopen_Callback(hObject, eventdata, handles)% hObject handle to fileopen (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)temp = wavread(get(findobj(Tag,filename),String);channel=str2double(get(handles.channel,String);handles.y=temp(:,channel);handles.inputtype=2;guidata(hObject,handles);plot(handles.time,handles.y);title(WAVE);ysize=size(handles.y) set(handles.samplenum,String,num2str(ysize(1); function samplerate_Callback(hObject, eventdata, handles)% hObject handle to samplerate (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 samplerate as text% str2double(get(hObject,String) returns contents of samplerate as a double % - Executes during object creation, after setting all properties.function samplerate_CreateFcn(hObject, eventdata, handles)% hObject handle to samplerate (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 & isequal(get(hObject,BackgroundColor), get(0,defaultUicontrolBackgroundColor) set(hObject,BackgroundColor,white);end function samplenum_Callback(hObject, eventdata, handles)% hObject handle to samplenum (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 samplenum as text% str2double(get(hObject,String) returns contents of samplenum as a double % - Executes during object creation, after setting all properties.function samplenum_CreateFcn(hObject, eventdata, handles)% hObject handle to samplenum (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 & isequal(get(hObject,BackgroundColor), get(0,defaultUicontrolBackgroundColor) set(hObject,BackgroundColor,white);end function freq_Callback(hObject, eventdata, handles)% hObject handle to freq (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 freq as text% str2double(get(hObject,String) returns contents of freq as a double % - Executes during object creation, after setting all properties.function freq_CreateFcn(hObject, eventdata, handles)% hObject handle to freq (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 & isequal(get(hObject,BackgroundColor), get(0,defaultUicontrolBackgroundColor) set(hObject,BackgroundColor,white);end function amp_Callback(hObject, eventdata, handles)% hObject handle to amp (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 amp as text% str2double(get(hObject,String) returns contents of amp as a double % - Executes during object creation, after setting all properties.function amp_CreateFcn(hObject, eventdata, handles)% hObject handle to amp (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 & isequal(get(hObject,BackgroundColor), get(0,defaultUicontrolBackgroundColor) set(hObject,BackgroundColor,white);end function phase_Callback(hObject, eventdata, handles)% hObject handle to phase (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 phase as text% str2double(get(hObject,String) returns contents of phase as a double % - Executes during object creation, after setting all properties.function phase_CreateFcn(hObject, eventdata, handles)% hObject handle to phase (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 & isequal(get(hObject,BackgroundColor), get(0,defaultUicontrolBackgroundColor) set(hObject,BackgroundColor,white);end % - Executes on button press in add.function add_Callback(hObject, eventdata, handles)% hObject handle to add (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) % Hint: get(hObject,Value) returns toggle state of add % - Executes during object creation, after setting all properties.function add_CreateFcn(hObject, eventdata, handles)% hObject handle to add (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles empty - handles not created until after all CreateFcns called % - Executes on button press in gensig.function gensig_Callback(hObject, eventdata, handles)% hObject handle to gensig (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)Fs=str2double(get(findobj(Tag,samplerate),String);handles.new_FS=FsN=str2double(get(findobj(Tag,samplenum),String);x=linspace(0,N/Fs,N);soundtype=get(handles.wavetype,Value);frequency=str2double(get(handles.freq,String);amp=str2double(get(handles.amp,String);phase=str2double(get(handles.phase,String);switch soundtype case 1 y=amp*sin(2*pi*x*frequency+phase); case 2 y=amp*sign(sin(2*pi*x*frequency+phase); case 3 y=amp*sawtooth(2*pi*x*frequency+phase,0.5); case 4 y=amp*sawtooth(2*pi*x*frequency+phase); case 5 y=amp*(2*rand(size(x)-1); otherwise errordlg(Illegal wave type,Choose errer);endif get(handles.add,Value)=0.0 handles.y=y;else handles.y=handles.y+y;endhandles.inputtype=3;guidata(hObject,handles);plot(handles.time,handles.y);title(WAVE);axis(0 N -str2double(get(handles.amp,String) str2double(get(handles.amp,String); % - Executes on button press in play.function play_Callback(hObject, eventdata, handles)% hObject handle to play (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (

温馨提示

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

评论

0/150

提交评论