




已阅读5页,还剩17页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
信号与线性系统课程设计报告课题名称:语音信号处理系统设计班 级:电子c093姓 名:李月学 号:098165成 绩:指导教师:王霞日 期:2011.12.29目录第一章 概要 .3第二章 课程设计的目的和意义. 32.1目的.2.2意义.第三章 设计任务及指标.3第四章 设计方案论证.4第五章 设计内容.7第六章 实验结果与分析.16第七章 结论.22第一章 概要语音信号处理是将信号以数字方式表示并处理的理论和技术。数字信号处理的目的是对真实世界的连续模拟信号进行测量和滤波。因此在进行数字信号处理之前需要将信号从模拟域转换到数字域,这通常通过模数转换器实现。数字信号处理的算法需要利用计算机或专用处理设备。数字信号处理的核心算法是离散傅立叶变换(DFT),DFT使信号在数字域和频域都实现了离散化,从而可以用通用计算机处理信号。MATLAB是矩阵实验室的简称,和Mathmatica,Maple并称为三大数学软件。它在数学类科技应用软件中在数值计算方面首屈一指。它的指令表达式与数学。工程中常用的形式十分相似,故用MATLAB来解算问题要比C,FORTRAN等语言简洁的多。而在新版本中也加入了对C,FORTRAN,C+,java的支持。可以直接调用,用户也可以将自己编写的实用程序导入到MATLAB函数库中方便以后调用。关键词:频谱分析,滤波,回放,GUI,加噪第二章 课程设计的目的和意义 1.1、语音信号处理是一门比较实用的电子工程的的专业课程,语音是人类获取信息的重要来源和利用信息的重要手段。通过语音传递信息是人类最重要的基本功能之一,语音是人类特有的功能语音是语言的声学表现是相互传递信息的重要手段是人类最重要,最有效,最常用和最方便的交换信息的形式。1.2、 本设计课题主要研究语音信号初步分析的软件实现方法、滤波器的设计及应用。通过完成本课题的设计,拟主要达到以下几个目的:(1)了解Matlab软件的特点和使用方法。(2)掌握利用Matlab分析信号和系统的时域、频域特性的方法;(3)掌握数字滤波器的设计方法及应用。(4)了解语音信号的特性及分析方法。(5)通过本课题的设计,培养学生运用所学知识分析和解决实际问题的能力。 第三章 设计任务及指标设计一个简单的语音信号分析系统,实现对语音信号时域波形显示、进行频谱分析,利用滤波器滤除噪声、对语音信号的参数进行提取分析等功能。采用Matlab设计语言信号分析相关程序,并且利用GUI设计图形用户界面。具体任务是:(1)采集语音信号。(2)对原始语音信号加入干扰噪声,对原始语音信号及带噪语音信号进行时频域分析。(3)针对语音信号频谱及噪声频率,设计合适的数字滤波器滤除噪声。(4)对噪声滤除前后的语音进行时频域分析。(5)对语音信号进行重采样,回放并与原始信号进行比较。(6)对语音信号部分时域参数进行提取。(7)设计图形用户界面(实现以上功能)第四章 设计方案论证1信号的抽样与恢复利用抽样脉冲把一个连续信号变为离散时间样值的过程称为抽样,在满足抽样定理条件下,抽样信号保留了原信号的全部信息,并且从抽样信号中可以无失真的恢复出原始信号。抽样定理在通信系统、信息传输理论方面占有十分重要的地位。数字通信系统是以此定理作为理论基础。抽样过程关系到通信设备整个系统的性能指标。信号的抽样软件实现例:利用MATLAB实现对信号的抽样。程序如下:t0=0:0.001:0.1; x0=cos(2*pi*20*t0);plot(t0,x0,r) %绘制原始信号hold on Fs=100; T=0:1/Fs: 0.1;x= cos(2*pi*20*t);stem(t,x);hold off信号恢复的软件实现信号重建是信号抽样的逆过程,需要在抽样点之间“插入”一些细节,也就是在样点之间进行内插。即内插函数为,得到的重建信号记为,则有 (1-1)信号是否为x(t)的重建取决于对x(t)的抽样是否正确。如果不满足抽样定理的约束条件,出现频谱混叠,将无法从样点序列准确地重建x(t)。2滤波器设计2.1 模拟滤波器设计原理(1)模拟巴特沃思滤波器原理 巴特沃斯滤波器具有单调下降的幅频特性:在小于截止频率的范围内,具有最平幅度的响应,而在后,幅频响应迅速下降。巴特沃思低通滤波器幅度平方函数为: (2-1)式中N为滤波器阶数,为3dB截止角频率。将幅度平方函数写成s的函数: (2-2) 该幅度平方函数有2N个等间隔分布在半径为的圆上的极点, 为了形成稳定的滤波器,取左半平面的N个极点构成,即: (2-3) 为使设计统一,将频率归一化,得到归一化极点,相应的归一化系统函数为: (2-4)多项式形式为: (2-5)(2)模拟切比雪夫滤波器原理 切比雪夫滤波器的幅频特性具有等波纹特性,有两种形式,在通带内等波纹、阻带单调的是I型滤波器,在通带内单调、在阻带内等波纹的是II滤波器。以I型滤波器为例。切比雪夫滤波器的幅度平方函数为: (2-6) 为小于1的正数,表示通带内幅度波动的程度。p称为通带截止频率。令=/p,称为对p的归一化频率。CN(x)为N阶切比雪夫多项式。幅度平方函数的极点是分布在bp为长半轴,ap为短半轴的椭圆上的点。同样取s平面左半平面的极点构成: (2-7)进行归一化,得到: (2-8)其中 , 2.2 模拟滤波器数字化原理将模拟滤波器转化为数字滤波器在工程上常用的有脉冲响应不变法和双线性变换法。脉冲响应不变法时一种时域上的转换方法,它是数字滤波器的单位取样响应在抽样点上等于模拟滤波器的单位冲激响应,即: (2-9)设模拟滤波器只有单阶极点,其系统函数为: (2-10)对进行拉氏反变换得到,对进行等间隔抽样,得到,对进行Z变换,得到数字滤波器系统函数: (2-11)这种方法s和z的关系是:。该方法的优点是频率坐标变换时线性的切数字滤波器的单位脉冲响应完全模仿模拟滤波器的单位冲激响应,时域特性逼近好;缺点是会产生频谱混叠现象,适合低通、带通滤波器的设计,不适合高通、带阻滤波器的设计。 双线性变换法为了克服频谱混叠现象,采用非线性频率压缩方法,将整个频率轴上的频率范围压缩到之间,再用转换到Z平面上。这种方法s和z的关系是:。该方法克服了频谱混叠现象,但带来了频率坐标变换的非线性:,由模拟滤波器系统函数转换为数字滤波器系统函数公式为: (2-12)2.3数字高通、带通、带阻滤波器的设计这些滤波器可以借助于模拟滤波器的频率变换设计一个所需类型的模拟滤波器, 再通过双线性变换法将其转换成所需类型的数字滤波器。首先确定所需类型数字滤波器的技术指标;然后将数字滤波器技术指标按照公式转换成所需类型滤波器的模拟域技术指标;将所需类型滤波器的模拟域技术指标转换成低通滤波器技术指标;设计归一化模拟低通滤波器;去归一化得到模拟低通滤波器的系统函数;将模拟低通滤波器转换为所需类型的模拟滤波器;最后通过双线性变换法转换成所需类型的数字滤波器第五章 设计内容 3、 程序部分function varargout = untitled1(varargin)% UNTITLED1 M-file for untitled1.fig% UNTITLED1, by itself, creates a new UNTITLED1 or raises the existing% singleton*.% H = UNTITLED1 returns the handle to a new UNTITLED1 or the handle to% the existing singleton*.% UNTITLED1(CALLBACK,hObject,eventData,handles,.) calls the local% function named CALLBACK in UNTITLED1.M with the given input arguments.% UNTITLED1(Property,Value,.) creates a new UNTITLED1 or raises the% existing singleton*. Starting from the left, property value pairs are% applied to the GUI before untitled1_OpeningFunction gets called. An% unrecognized property name or invalid value makes property application% stop. All inputs are passed to untitled1_OpeningFcn via varargin.% *See GUI Options on GUIDEs 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 untitled1% Last Modified by GUIDE v2.5 29-Dec-2011 14:42:51% Begin initialization code - DO NOT EDITgui_Singleton = 1;gui_State = struct(gui_Name, mfilename, . gui_Singleton, gui_Singleton, . gui_OpeningFcn, untitled1_OpeningFcn, . gui_OutputFcn, untitled1_OutputFcn, . 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% - Executes just before untitled1 is made visible.function untitled1_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 untitled1 (see VARARGIN)% Choose default command line output for untitled1handles.output = hObject;% Update handles structureguidata(hObject, handles);% UIWAIT makes untitled1 wait for user response (see UIRESUME)% uiwait(handles.figure1);% - Outputs from this function are returned to the command line.function varargout = untitled1_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;% - 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)figure(1)subplot(3,1,1)x,fs=wavread(C:Documents and SettingsAdministrator桌面bu5.wav); N=length(x);k=0:N-1;plot(k,x);title(FFT f=16000)subplot(3,1,2)x,fs=wavread(C:Documents and SettingsAdministrator桌面bu5.wav);y=decimate(x,2);N=length(x);k=0:N-1;plot(y)title(FFT f=8000)subplot(3,1,3)x,fs=wavread(C:Documents and SettingsAdministrator桌面bu5.wav);z=decimate(x,4);N=length(x);k=0:N-1;plot(z)title(FFT f=4000) % - 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 future version of MATLAB% handles structure with handles and user data (see GUIDATA)figure(2)subplot(3,1,1)x,fs=wavread(C:Documents and SettingsAdministrator桌面bu5.wav); N=length(x);X=fft(x);k=0:N-1;plot(k,abs(X);title(FFT f=16000)subplot(3,1,2)x,fs=wavread(C:Documents and SettingsAdministrator桌面bu5.wav);y=decimate(x,2);y1=fft(y);plot(abs(y1)title(FFT f=8000)subplot(3,1,3)x,fs=wavread(C:Documents and SettingsAdministrator桌面bu5.wav);z=decimate(x,4);y2=fft(z);plot(abs(y2)title(FFT f=4000) % - Executes on button press in pushbutton3.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)figure(3)subplot(3,1,1)x,fs=wavread(C:Documents and SettingsAdministrator桌面bu5.wav);N=length(x);n=0:N-1;plot(n,x)title(FFT f=16000)subplot(3,1,2)N=length(x);n=0:N-1;fs=fft(x);plot(n,fs)title(FFT f=8000)subplot(3,1,3)N=length(x);n=0:N-1;fs=fft(x);plot(n,abs(fs) title(FFT f=4000)% - Executes on button press in pushbutton4.function pushbutton4_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)figure(4)subplot(2,1,1)x,fs=wavread(C:Documents and SettingsAdministrator桌面bu5.wav); N=length(x);X=fft(x);k=0:N-1;plot(k,abs(X);title(FFT (without noise)subplot(2,1,2)x,fs=wavread(C:Documents and SettingsAdministrator桌面bu5.wav); N=length(x);n=0:N-1;f=6000;x1=x+0.02*cos(2*pi*n*f/fs); y=fft(x1);plot(n,abs(y);title(FFT (with noise)% - Executes on button press in pushbutton5.function pushbutton5_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)figure(5)subplot(2,2,1)x,fs=wavread(C:Documents and SettingsAdministrator桌面bu5.wav);N=length(x);n=0:N-1;plot(n,x)subplot(2,2,3)N=length(x);n=0:N-1;fs=fft(x);plot(n,abs(fs)subplot(2,2,2)x,fs=wavread(C:Documents and SettingsAdministrator桌面bu5.wav); K=length(x);k=0:K-1;f=6000;x1=x+0.02*cos(2*pi*k*f/fs); plot(k,x1);title(FFT (with noise)subplot(2,2,4)x,fs=wavread(C:Documents and SettingsAdministrator桌面bu5.wav); K=length(x);k=0:K-1;f=6000;x1=x+0.02*cos(2*pi*k*f/fs); y1=fft(x1);plot(k,abs(y1);title(FFT (with noise) % - Executes on button press in pushbutton6.function pushbutton6_Callback(hObject, eventdata, handles)% hObject handle to pushbutton6 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)fs=16000;global s;x1,fs=wavread(C:Documents and SettingsAdministrator桌面bu5.wav);t=0:1/16000:(length(x1)-1)/16000;Au=0.05;d=Au*cos(2*pi*6000*t);x2=x1+d;wp=str2num(get(handles.edit4,String)*pi;ws=str2num(get(handles.edit5,String)*pi;Rp=1;Rs=15;Fs=16000;Ts=1/Fs;wp1=2/Ts*tan(wp/2);ws1=2/Ts*tan(ws/2);N,Wn=buttord(wp1,ws1,Rp,Rs,s);Z,P,K=buttap(N);Bap,Aap=zp2tf(Z,P,K);b,a=lp2lp(Bap,Aap,Wn);bz,az=bilinear(b,a,Fs);H,W=freqz(bz,az);figure(6)plot(W*Fs/(2*pi),abs(H)title(加入噪声前后频谱分析);% - Executes on button press in pushbutton7.function pushbutton7_Callback(hObject, eventdata, handles)% hObject handle to pushbutton7 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)fs=16000;global s;x1,fs=wavread(C:Documents and SettingsAdministrator桌面bu5.wav);t=0:1/16000:(length(x1)-1)/16000;Au=0.05;d=Au*cos(2*pi*6000*t);x2=x1+d;wp=str2num(get(handles.edit4,String)*pi;ws=str2num(get(handles.edit5,String)*pi;Rp=1;Rs=15;Fs=82050;Ts=1/Fs;wp1=2/Ts*tan(wp/2);ws1=2/Ts*tan(ws/2);N,Wn=buttord(wp1,ws1,Rp,Rs,s);Z,P,K=buttap(N);Bap,Aap=zp2tf(Z,P,K);b,a=lp2lp(Bap,Aap,Wn);bz,az=bilinear(b,a,Fs);H,W=freqz(bz,az);f1=filter(bz,az,x2);figure(3)subplot(2,2,1)plot(t,x2);title(滤波前的时域波形);subplot(2,2,2)plot(t,f1);title(滤波后的时域波形);sound(f1,fs);F0=fft(f1,1024);f=fs*(0:511)/1024;y2=fft(x2);figure(4)subplot(2,2,3);plot(f,abs(y2(1:512);title(滤波前的频谱)xlabel(频率/Hz);ylabel(幅值/N);subplot(2,2,4)F1=plot(f,abs(F0(1:512);%title(滤波后的频谱)xlabel(频率/Hz);ylabel(幅值/N);% - Executes on button press in pushbutton8.function pushbutton8_Callback(hObject, eventdata, handles)% hObject handle to pushbutton8 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)x,fs=wavread(C:Documents and SettingsAdministrator桌面bu5.wav); sound(x,fs)% - Executes on button press in pushbutton9.function pushbutton9_Callback(hObject, eventdata, handles)% hObject handle to pushbutton9 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)x,fs=wavread(C:Documents and SettingsAdministrator桌面bu5.wav); N=length(x);n=0:N-1;f=6000;x1=x+0.02*cos(2*pi*n*f/fs); sound(x1,fs)% - Executes on button press in pushbutton10.function pushbutton10_Callback(hObject, eventdata, handles)% hObject handle to pushbutton10 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)x,fs=wavread(C:Documents and SettingsAdministrator桌面bu5.wav); fs=16000;global s;x1,fs=wavread(C:Documents and SettingsAdministrator桌面bu5.wav);t=0:1/16000:(length(x1)-1)/16000;Au=0.05;d=Au*cos(2*pi*6000*t);x2=x1+d;wp=str2num(get(handles.edit4,String)*pi;ws=str2num(get(handles.edit5,String)*pi;Rp=1;Rs=15;Fs=82050;Ts=1/Fs;wp1=2/Ts*tan(wp/2);ws1=2/Ts*tan(ws/2);N,Wn=buttord(wp1,ws1,Rp,Rs,s);Z,P,K=buttap(N);Bap,Aap=zp2tf(Z,P,K);b,a=lp2lp(Bap,Aap,Wn);bz,az=bilinear(b,a,Fs);H,W=freqz(bz,az);f1=filter(bz,az,x2);sound(f1,16000);% - Executes on button press in pushbutton11.function pushbutton11_Callback(hObject, eventdata, handles)% hObject handle to pushbutton11 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)function 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 text% str2double(get(hObject,String) returns contents of edit4 as a double% - Executes during object creation, after setting all properties.function edit4_CreateFcn(hObject, 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 set(hObject,BackgroundColor,white);else set(hObject,BackgroundColor,get(0,defaultUicontrolBackgroundColor);endfunction edit5_Callback(hObject, eventdata, handles)ws=str2num(get(handles.edit5,String)*pi;% hObject handle to edit5 (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 edit5 as text% str2double(get(hObject,String) returns contents of edit5 as a double% - Executes during object creation, after setting all properties.function edit5_CreateFcn(hObject, eventdata, handles)% hObject handle to edit5 (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 set(hObject,BackgroundColor,white);else set(hObject,BackgroundCol
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 中国节能生活锅炉行业市场发展前景及发展趋势与投资战略研究报告(2024-2030)
- 2024年中国交通铝行业发展调查报告
- 2025年 南昌大学校内外招聘考试笔试试题附答案
- 2025年 河北软件职业技术学院选聘工作人员考试试题附答案
- 桑蚕丝定位男长巾项目投资可行性研究分析报告(2024-2030版)
- 2025年 安康市审计局事业单位招聘考试笔试试题附答案
- 2023-2028年中国河南白酒行业市场深度分析及投资策略咨询报告
- 2025年中国智慧商城建设市场前景预测及投资规划研究报告
- 2025年中国屏山炒青茶行业市场发展监测及投资战略规划报告
- 宝鸡醋项目可行性研究报告
- 关键工程施工进度计划网络图及施工进度总体计划网络图
- SB/T 10784-2012洗染服务合约技术规范
- GB/T 16940-2012滚动轴承套筒型直线球轴承外形尺寸和公差
- GB/T 15814.1-1995烟花爆竹药剂成分定性测定
- 煤矿安全规程露天部分参考题库(含答案)
- 紫铜材质证明
- 新产品评审管理办法
- (参考)菲达公司国内电除尘器业绩表
- 大学生职业生涯规划与就业指导教案第5讲:兴趣探索
- 门店电表记录表
- 七年级劳技 花卉种植 花卉用途 PPT学习教案
评论
0/150
提交评论