最美情侣中文字幕电影,在线麻豆精品传媒,在线网站高清黄,久久黄色视频

歡迎光臨散文網(wǎng) 會(huì)員登陸 & 注冊

【濾波器】基于低通、帶通、高通濾波器實(shí)現(xiàn)語音去噪含Matlab源碼

2022-09-13 23:51 作者:Matlab工程師  | 我要投稿

1 簡介

在本文中,我們分別研究了在MATLAB環(huán)境下IIR數(shù)字濾波器的典型設(shè)計(jì)和完全設(shè)計(jì)等方法。?典型設(shè)計(jì)是先按一定規(guī)則將給出的數(shù)字濾波器的技術(shù)指標(biāo)轉(zhuǎn)換成模擬低通濾波器的技術(shù)指標(biāo),據(jù)此產(chǎn)生模擬濾波器原型,然后把模擬低通濾波器原型轉(zhuǎn)換成模擬低通、高通、帶通濾波器,最后再把模擬濾波器轉(zhuǎn)換成數(shù)字濾波器。?完全設(shè)計(jì)方法中我們利用函數(shù)直接設(shè)計(jì)出低通、高通、帶通濾波器,并分別用巴特沃斯(Butterworth)濾波器來實(shí)現(xiàn)語音去噪。

2 部分代碼

function varargout = AMtiaozhi(varargin)% AMTIAOZHI M-file for AMtiaozhi.fig% ? ? ?AMTIAOZHI, by itself, creates a new AMTIAOZHI or raises the existing% ? ? ?singleton*.%% ? ? ?H = AMTIAOZHI returns the handle to a new AMTIAOZHI or the handle to% ? ? ?the existing singleton*.%% ? ? ?AMTIAOZHI('CALLBACK',hObject,eventData,handles,...) calls the local% ? ? ?function named CALLBACK in AMTIAOZHI.M with the given input arguments.%% ? ? ?AMTIAOZHI('Property','Value',...) creates a new AMTIAOZHI or raises the% ? ? ?existing singleton*. ?Starting from the left, property value pairs are% ? ? ?applied to the GUI before AMtiaozhi_OpeningFunction gets called. ?An% ? ? ?unrecognized property name or invalid value makes property application% ? ? ?stop. ?All inputs are passed to AMtiaozhi_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% Edit the above text to modify the response to help AMtiaozhi% Last Modified by GUIDE v2.5 10-May-2010 16:42:40% Begin initialization code - DO NOT EDITgui_Singleton = 1;gui_State = struct('gui_Name', ? ? ? mfilename, ... ? ? ? ? ? ? ? ? ? 'gui_Singleton', ?gui_Singleton, ... ? ? ? ? ? ? ? ? ? 'gui_OpeningFcn', @AMtiaozhi_OpeningFcn, ... ? ? ? ? ? ? ? ? ? 'gui_OutputFcn', ?@AMtiaozhi_OutputFcn, ... ? ? ? ? ? ? ? ? ? 'gui_LayoutFcn', ?[] , ... ? ? ? ? ? ? ? ? ? 'gui_Callback', ? []);if nargin & isstr(varargin{1}) ? ?gui_State.gui_Callback = str2func(varargin{1});endif nargout ? ?[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});else ? ?gui_mainfcn(gui_State, varargin{:});end% End initialization code - DO NOT EDIT% --- Executes just before AMtiaozhi is made visible.function AMtiaozhi_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 AMtiaozhi (see VARARGIN)% Choose default command line output for AMtiaozhihandles.output = hObject;% Update handles structureguidata(hObject, handles);% UIWAIT makes AMtiaozhi wait for user response (see UIRESUME)% uiwait(handles.figure1);% --- Outputs from this function are returned to the command line.function varargout = AMtiaozhi_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 structurevarargout{1} = handles.output;% --- Executes during object creation, after setting all properties.function popupmenu1_CreateFcn(hObject, eventdata, handles)% hObject ? ?handle to popupmenu1 (see GCBO)% eventdata ?reserved - to be defined in a future version of MATLAB% handles ? ?empty - handles not created until after all CreateFcns called% Hint: popupmenu 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'));endset(hObject, 'String', {'調(diào)制信號', '載波信號','已調(diào)波信號'});% --- Executes on selection change in popupmenu1.function popupmenu1_Callback(hObject, eventdata, handles)% hObject ? ?handle to popupmenu1 (see GCBO)% eventdata ?reserved - to be defined in a future version of MATLAB% handles ? ?structure with handles and user data (see GUIDATA)% Hints: contents = get(hObject,'String') returns popupmenu1 contents as cell array% ? ? ? ?contents{get(hObject,'Value')} returns selected item from popupmenu1% --- Executes during object creation, after setting all properties.function popupmenu2_CreateFcn(hObject, eventdata, handles)% hObject ? ?handle to popupmenu2 (see GCBO)% eventdata ?reserved - to be defined in a future version of MATLAB% handles ? ?empty - handles not created until after all CreateFcns called% Hint: popupmenu 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'));endset(hObject, 'String', {'高通濾波', '低通濾波','帶通濾波'});% --- Executes on selection change in popupmenu2.function popupmenu2_Callback(hObject, eventdata, handles)% hObject ? ?handle to popupmenu2 (see GCBO)% eventdata ?reserved - to be defined in a future version of MATLAB% handles ? ?structure with handles and user data (see GUIDATA)% Hints: contents = get(hObject,'String') returns popupmenu2 contents as cell array% ? ? ? ?contents{get(hObject,'Value')} returns selected item from popupmenu2% --- Executes on button press in pushbutton1.function pushbutton1_Callback(hObject, eventdata, handles)popup_sel_index = get(handles.popupmenu1, 'Value');switch popup_sel_index ? ?case 1 ? ? ? ?dt=0.01; ? ? ? ?t=0:dt:10;Fs=1/dt; ? ? ? ?e=sinc(t-5);%調(diào)制信號 ? ? ? ?elength=length(e);%求采樣點(diǎn)個(gè)數(shù) ? ? ? ?E=fft(e,elength);%快速傅里葉變換 ? ? ? ?%fe=-Fs/2:elength:Fs/2; ? ? ? ?En=fftshift(E);%對fft輸出進(jìn)行重新排列,將零頻分量移到頻譜中心 ? ? ? ?axes(handles.axes1); ? ? ? ?plot(t,e);title('調(diào)制信號'); ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?xlabel('時(shí)間s'); ? ? ? ?ylabel('強(qiáng)度值'); ? ? ? ?axis([0 10 1.1*min(e) 1.1*max(e)]); ? ? ? ?axes(handles.axes2); ? ? ? ?plot(abs(En));title('調(diào)制信號頻譜'); ? ? ? ?axis([0 1000 1.1*min(abs(En)) 1.1*max(abs(En))]); ? ? ? ?set(handles.axes2,'Xticklabel',[-50,-30,-10,10,30,50]) ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?xlabel('頻率Hz'); ? ? ? ?ylabel('幅度值'); ? ?case 2 ? ? ? ?dt=0.01; ? ? ? ?t=0:dt:10;Fs=1/dt; ? ? ? ?s=cos(60*pi*t)+cos(40*pi*t)+cos(20*pi*t);%載波信號 ? ? ? ?slength=length(s);%求采樣點(diǎn)個(gè)數(shù) ? ? ? ?S=fft(s);%快速傅里葉變換 ? ? ? ?%fs=linspace(-Fs/2,Fs/2,slength); ? ? ? ?Sn=fftshift(S); ? ? ? ?axes(handles.axes3); ? ? ? ?plot(t,s);title('載波信號'); ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?xlabel('時(shí)間s'); ? ? ? ?ylabel('強(qiáng)度值'); ? ? ? ?axes(handles.axes4);plot(abs(Sn));title('載波信號頻譜'); ? ? ? ? ? ? ? ?axis([0 1000 1.1*min(abs(Sn)) 1.1*max(abs(Sn))]); ? ? ? ?set(handles.axes4,'Xticklabel',[-50,-30,-10,10,30,50]) ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?xlabel('頻率Hz'); ? ? ? ?ylabel('幅度值'); ? ?case 3 ? ? ? ?dt=0.01; ? ? ? ?t=0:dt:10;Fs=1/dt; ? ? ? ?s=cos(60*pi*t)+cos(40*pi*t)+cos(20*pi*t);%載波信號 ? ? ? ?e=sinc(t-5);%調(diào)制信號 ? ? ? ?p=e.*s;%調(diào)制 ? ? ? ?plength=length(p); ? ? ? ?P=fft(p); ? ? ? ?%fp=linspace(-Fs/2,Fs/2,plength); ? ? ? ?Pn=fftshift(P); ? ? ? ?axes(handles.axes5); ? ? ? ?plot(t,p);title('調(diào)幅信號'); ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?xlabel('時(shí)間s'); ? ? ? ?ylabel('強(qiáng)度值'); ? ? ? ?axis([0 10 1.1*min(p) 1.1*max(p)]); ? ? ? ?axes(handles.axes6); ? ? ? ?plot(abs(Pn));title('調(diào)幅信號頻譜'); ? ? ? ? ? ? ? ? ? ? ? ?axis([0 1000 1.1*min(abs(Pn)) 1.1*max(abs(Pn))]); ? ? ? ?set(handles.axes6,'Xticklabel',[-50,-30,-10,10,30,50]) ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?xlabel('頻率Hz'); ? ? ? ?ylabel('幅度值');end% 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)% --- Executes on button press in pushbutton2.function pushbutton2_Callback(hObject, eventdata, handles)pend% 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)

3 仿真結(jié)果

4 參考文獻(xiàn)

[1]王蔚. MATLAB環(huán)境下的數(shù)字濾波器設(shè)計(jì)及其應(yīng)用[D]. 蘇州大學(xué), 2002.

博主簡介:擅長智能優(yōu)化算法、神經(jīng)網(wǎng)絡(luò)預(yù)測、信號處理、元胞自動(dòng)機(jī)、圖像處理、路徑規(guī)劃、無人機(jī)等多種領(lǐng)域的Matlab仿真,相關(guān)matlab代碼問題可私信交流。

部分理論引用網(wǎng)絡(luò)文獻(xiàn),若有侵權(quán)聯(lián)系博主刪除。




【濾波器】基于低通、帶通、高通濾波器實(shí)現(xiàn)語音去噪含Matlab源碼的評論 (共 條)

分享到微博請遵守國家法律
怀远县| 兴业县| 平昌县| 横峰县| 赤壁市| 海原县| 确山县| 城固县| 丹阳市| 克什克腾旗| 华坪县| 淅川县| 镇远县| 丰城市| 河源市| 乐陵市| 耒阳市| 儋州市| 施秉县| 建湖县| 顺义区| 铁岭市| 武宣县| 许昌市| 巴青县| 齐齐哈尔市| 株洲市| 饶平县| 陵川县| 新绛县| 扬中市| 余姚市| 桃园县| 政和县| 云龙县| 宜州市| 淮南市| 临桂县| 岳阳县| 阿拉善右旗| 红安县|