【滤波器设计】基于matlab实现数字滤波器和均衡器设计
【滤波器设计】基于matlab实现数字滤波器和均衡器设计
TT_Matlab
博主简介:擅长智能优化算法、神经网络预测、信号处理、元胞自动机、图像处理、路径规划、无人机等多种领域的Matlab仿真,完整matlab代码或者程序定制加qq1575304183。
✅作者简介:热爱科研的Matlab仿真开发者,修心和技术同步精进,matlab项目合作可私信。
个人主页: Matlab科研工作室
个人信条:格物致知。
更多Matlab仿真内容点击
智能优化算法 神经网络预测 雷达通信 无线传感器 电力系统
信号处理 图像处理 路径规划 元胞自动机 无人机
⛄ 内容介绍
随着数字化技术的快速、深入发展,人们对数字化电子产品所产生的图像、图形以及声音等质量的要求越来越高。在实时数字处理过程中,往往需要对目标信号进行滤波处理,以满足用户对信号的要求。
MATLAB 是一个数据分析和处理功能十分强大的工程实用软件,它的滤波器设计工具箱为实现声音信号的数字滤波提供了十分方便的函数和命令。本文将介绍基于MATLAB设计出的一种实用的数字滤波器,并对其功能进行扩展,设计出一种均衡器。
1 算法原理
滤波器的种类很多,按所通过信号的频段分为低通、高通、带通和带阻滤波器四种。低通滤波器:它允许信号中的低频或直流分量通过,抑制高频分量或干扰和噪声。高通滤波器:它允许信号中的高频分量通过,抑制低频或直流分量。带通滤波器:它允许一定频段的信号通过,抑制低于或高于该频段的信号、干扰和噪声。带阻滤波器:它抑制一定频段内的信号,允许该频段以外的信号通过。
上述每种滤波器又可以分为模拟滤波器和数字滤波器。如果滤波器的输入输出都是数字信号,则这样的滤波器称之为数字滤波器。根据数字滤波器冲激响应的时域特性,可将数字滤波器分为两种,即无限长冲激响应(
IIR)滤波器和有限长冲激响应(FIR)滤波器。
⛄ 部分代码
function varargout = Equalizer(varargin)
% EQUALIZER MATLAB code for Equalizer.fig
% EQUALIZER, by itself, creates a new EQUALIZER or raises the existing
% singleton*.
%
% H = EQUALIZER returns the handle to a new EQUALIZER or the handle to
% the existing singleton*.
%
% EQUALIZER(’CALLBACK’,hObject,eventData,handles,...) calls the local
% function named CALLBACK in EQUALIZER.M with the given input arguments.
%
% EQUALIZER(’Property’,’Value’,...) creates a new EQUALIZER or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before Equalizer_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to Equalizer_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 Equalizer
% Last Modified by GUIDE v2.5 08-Dec-2011 12:41:42
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct(’gui_Name’, mfilename, ...
’gui_Singleton’, gui_Singleton, ...
’gui_OpeningFcn’, @Equalizer_OpeningFcn, ...
’gui_OutputFcn’, @Equalizer_OutputFcn, ...
’gui_LayoutFcn’, [] , ...
’gui_Callback’, []);
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end
if 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 Equalizer is made visible.
function Equalizer_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 Equalizer (see VARARGIN)
% Choose default command line output for Equalizer
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
f=linspace(0,20000,20000);
yf=1.*(f<=5000)+0.*(f>5000);
plot(handles.axes5,f,yf,’m’,’LineWidth’,2);
axis(handles.axes5,[0,20000,0,1.2]);
xlabel(handles.axes5,’Freqency(Hz)’,’fontweight’,’bold’);
ylabel(handles.axes5,’Amplitude’,’fontweight’,’bold’);
grid(handles.axes5);
% UIWAIT makes Equalizer wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = Equalizer_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 structure
varargout{1} = handles.output;
% --- Executes on slider movement.
function slider31_Callback(hObject, eventdata, handles)
% hObject handle to slider31 (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,’Value’) returns position of slider
% get(hObject,’Min’) and get(hObject,’Max’) to determine range of slider
% --- Executes during object creation, after setting all properties.
function slider31_CreateFcn(hObject, eventdata, handles)
% hObject handle to slider31 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: slider controls usually have a light gray background.
if isequal(get(hObject,’BackgroundColor’), get(0,’defaultUicontrolBackgroundColor’))
set(hObject,’BackgroundColor’,[.9 .9 .9]);
end
% --- Executes on slider movement.
function slider62_Callback(hObject, eventdata, handles)
% hObject handle to slider62 (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,’Value’) returns position of slider
% get(hObject,’Min’) and get(hObject,’Max’) to determine range of slider
% --- Executes during object creation, after setting all properties.
function slider62_CreateFcn(hObject, eventdata, handles)
% hObject handle to slider62 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: slider controls usually have a light gray background.
if isequal(get(hObject,’BackgroundColor’), get(0,’defaultUicontrolBackgroundColor’))
set(hObject,’BackgroundColor’,[.9 .9 .9]);
end
⛄ 运行结果
⛄ 参考文献
[1] 李益华. MATLAB辅助现代工程数字信号处理
(
第
2版
)
.
西安:
西安电子科技大学出版社
,
2010
[
2
]
雷学堂,徐火希
.
基于
MATLAB的语音滤波实验设计
.
黄冈师范学院物电系
,
2007
[3] 赵淑敏. 基于
MATLAB
实现对语音信号频谱分析
.
兰州交通大学电子与信息工程学院
,2010
[4] 申鹏. 语音信号的滤波处理及时频域分析.
湖南工业大学计算机与通信学院
,2010
[5] 陈亚勇. MATLAB信号处理详解.
北京:人民邮电出版社
,2002
仿真咨询
1.卷积神经网络(CNN)、LSTM、支持向量机(SVM)、最小二乘支持向量机(LSSVM)、极限学习机(ELM)、核极限学习机(KELM)、BP、RBF、宽度学习、DBN、RF、RBF、DELM实现风电预测、光伏预测、电池寿命预测、辐射源识别、交通流预测、负荷预测、股价预测、PM2.5浓度预测、电池健康状态预测、水体光学参数反演、NLOS信号识别、地铁停车精准预测、变压器故障诊断
2.图像识别、图像分割、图像检测、图像隐藏、图像配准、图像拼接、图像融合、图像增强、图像压缩感知
3.旅行商问题(TSP)、车辆路径问题(VRP、MVRP、CVRP、VRPTW等)、无人机三维路径规划、无人机协同、无人机编队、机器人路径规划、栅格地图路径规划、多式联运运输问题、车辆协同无人机路径规划
4.无人机路径规划、无人机控制、无人机编队、无人机协同、无人机任务分配
5.传感器部署优化、通信协议优化、路由优化、目标定位
6.信号识别、信号加密、信号去噪、信号增强、雷达信号处理、信号水印嵌入提取、肌电信号、脑电信号
7.生产调度、经济调度、装配线调度、充电优化、车间调度、发车优化、水库调度、三维装箱、物流选址、货位优化
8.微电网优化、无功优化、配电网重构、储能配置
9.元胞自动机交通流 人群疏散 病毒扩散 晶体生长
⛳️ 代码获取关注我
❤️部分理论引用网络文献,若有侵权联系博主删除
❤️ 关注我领取海量matlab电子书和数学建模资料
-
2023年血糖新标准公布,不是3.9-6.1,快来看看你的血糖正常吗? 2023-02-07
-
2023年各省最新电价一览!8省中午执行谷段电价! 2023-01-03
-
GB 55009-2021《燃气工程项目规范》(含条文说明),2022年1月1日起实施 2021-11-07
-
PPT导出高分辨率图片的四种方法 2022-09-22
-
2023年最新!国家电网27家省级电力公司负责人大盘点 2023-03-14
-
全国消防救援总队主官及简历(2023.2) 2023-02-10
-
盘点 l 中国石油大庆油田现任领导班子 2023-02-28
-
我们的前辈!历届全国工程勘察设计大师完整名单! 2022-11-18
-
关于某送变电公司“4·22”人身死亡事故的快报 2022-04-26