【毕业设计系列】基于Matlab的数字信号处理仿真界面实现

DATE: 2021.3.28


1、前言

在大学课题设计和毕业设计中,要求实现数字信号处理算法的matlab GUI界面,包括

  • 信号产生模块: 根据用户输入的参数如幅度和频率,产生两个正弦信号,对这两个正弦信号叠加生成要处理的模拟信号。
  • 抽样模块: 根据用户设置的抽样频率对模拟信号在时域上进行抽样,产生一时域 离散信号。
  • 频谱演示模块: 用FFT对时域离散信号进行谱分析,用来显示 信号的频谱图。
  • IIR 滤波器生成模块:根据用户输入的截止频率和衰减指标设计出巴特沃斯数字低通滤波器,并显示出滤波器的幅度特性和相位特性曲线。
  • FIR 滤波器生成模块:根据输入的窗口长度和截止频率用窗函数法设计FIR数字滤波器,可供选择的窗函数有矩形窗、汉宁窗等。同时对其工作原理、构建方法和误码性能进行分析。

若需要相关代码可以在关注和订阅博主专栏之后,加博主QQ(2963033731)索取(代码付费提供)。

2、数字信号处理仿真实现效果

2.1、信号产生模块

image.png
image.png

2.2、抽样模块

image.png

2.3、FFT频谱分析

image.png

2.4、IIR滤波器

image.png

2.5、FIR滤波器

image.png

3、部分matlab程序

function varargout = hlp_signal_processing_guideGUI(varargin)
% SIGNAL_PROCESSING_GUIDEGUI    MATLAB code for signal_processing_guideGUI.fig
%      SIGNAL_PROCESSING_GUIDEGUI, by itself, creates a new SIGNAL_PROCESSING_GUIDEGUI or raises the existing
%      singleton*.
%
%      H = SIGNAL_PROCESSING_GUIDEGUI returns the handle to a new SIGNAL_PROCESSING_GUIDEGUI or the handle to
%      the existing singleton*.
%
%      SIGNAL_PROCESSING_GUIDEGUI('CALLBACK',hObject,eventData,handles,...) calls the local
%      function named CALLBACK in SIGNAL_PROCESSING_GUIDEGUI.M with the given input arguments.
%
%      SIGNAL_PROCESSING_GUIDEGUI('Property','Value',...) creates a new SIGNAL_PROCESSING_GUIDEGUI or raises the
%      existing singleton*.  Starting from the left, property value pairs are
%      applied to the GUI before signal_processing_guideGUI_OpeningFcn gets called.  An
%      unrecognized property name or invalid value makes property application
%      stop.  All inputs are passed to signal_processing_guideGUI_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 signal_processing_guideGUI

% Last Modified by GUIDE v2.5 08-May-2020 13:50:14

% Begin initialization code - DO NOT EDIT
%
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...
                   'gui_Singleton',  gui_Singleton, ...
                   'gui_OpeningFcn', @hlp_signal_processing_guideGUI_OpeningFcn, ...
                   'gui_OutputFcn',  @hlp_signal_processing_guideGUI_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 signal_processing_guideGUI is made visible.
function hlp_signal_processing_guideGUI_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 signal_processing_guideGUI (see VARARGIN)

% Choose default command line output for signal_processing_guideGUI
handles.output = hObject;

% Update handles structure
guidata(hObject, handles);

% UIWAIT makes signal_processing_guideGUI wait for user response (see UIRESUME)
% uiwait(handles.figure1);


% --- Outputs from this function are returned to the command line.
function varargout = hlp_signal_processing_guideGUI_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 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)
run('hlp_signal_processing_MainGUI');
set(handles.figure1,'visible','off');

% --- 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)
close;


% --- Executes during object creation, after setting all properties.
function figure1_CreateFcn(hObject, eventdata, handles)
% hObject    handle to figure1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called
dis = imread('bluesky.jpg');
imshow(dis)

THE END!

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • 准备前的工作——一段收集来的代码 一、输入信号时域&频域图像(非声音信号,而是函数) https://blog.c...
    芜青子阅读 10,198评论 1 2
  • 目 录 一.设计目的:.................................................
    _syn阅读 5,317评论 0 1
  • 在一些对延时精度要求较高的场景中,比如超声换能器阵列、差分麦克风等,常见设备的采样率能达到的整数延时精度十分有限,...
    大大大蚂蚁阅读 12,178评论 0 0
  • 振动信号的滤波处理 振动信号的滤波处理 在振动信号分析中,数据滤波就是把我们所关注和感兴趣的部分信号从采集得到的信...
    石显阅读 2,615评论 0 0
  • Ideal Filters 本文参考《Modern Digital Signal Processing》,仅作读书...
    Lesnew阅读 5,779评论 0 0

友情链接更多精彩内容