当前位置:网站首页>Digital signal processing course lab report (what foundation is needed for digital signal processing)
Digital signal processing course lab report (what foundation is needed for digital signal processing)
2022-07-30 14:11:00 【Full stack programmer webmaster】
大家好,又见面了,我是你们的朋友全栈君.
- 问题重述
DSP课程实验
- Computer simulation to produce more frequency signal:
- 编写通用的FFT子程序
- 设置参数,对信号进行频谱分析
- The signal respectively to meet and satisfy the Nyquist sampling theorem of sampling rate sampling,Observe the spectrum change
- 设计低通、高通、带通和带阻滤波器,The multiple frequency signal filter processing
- 撰写实验报告,Content includes experimental steps、流程图、源程序、设置参数、输出结果(图)、结果分析(结合原理)
例如:模拟信号:
用一个FFTProcessor on the spectrum analysis,To distinguish the frequency component of all,则
- 1)The minimum signal record length should be how much?
- 2)Sampling frequency at least as much?
- 3)若采样频率为100Hz,The sampling points should be take time;
- 4)若采样频率为50Hz,What are the spectrum analysis of signal frequency component?Whether is consistent with the actual signal frequency component?为什么?
- 实验目的
- Experimental knowledge needed to cover the discrete Fourier transform、数字滤波器设计、Signal extraction and interpolation to recover、The Nyquist specific reason, etc,Through the experiment ofDSPThe understanding of the course content,巩固所学知识.
- Learn to use computers to write generalFFT程序,The continuous signal spectrum waveform analysis.
- 学会应用DFTThe analysis of common problems in digital signal processing (DSP) and explore the solution.
- Familiar with the use of the advanced programming language,Including the use of common function,图形绘制,A variety of library calls and the adjustment of parameters.
- 增强在DSPBeginning ability and self-educated abilities.
- 问题分析
按照题目要求,First of all should take advantage of computer generated by a superposition of multiple frequency signal.After the ventilation under the sampling frequency of signal sampling.编写FFTApplication of signalDFT变换,Should be able to observe in meeting and does not meet the Nyquist sampling theorem under the condition of signal spectrum respectively in not aliasing and mixing condition.Then it is necessary to restore signal to meet or does not meet the Nyquist sampling theorem under the condition of,Frequency spectrum aliasing effect on the recovery time domain signal.In the spectrum aliasing,Observe the time domain signal distortion.
In the case of satisfy Nyquist sampling theorem,With the digital low pass、高通、Bandpass and band stop filter to filter the request signal,Observe the change of the frequency domain and time domain waveform change.
This experiment mainly realize the time-domain signal sampling(A/D转换),滤波(数字信号处理),As well as the signal interpolation recovery(D/A转换)等步骤.
- 实验原理
The digital Fourier transform,Usually the discrete Fourier transform(DFT)方法.但是DFTThe deficiencies is the amount of calculation is too big,It is hard to real-time processing.计算一个N点的DFT,一般需要N²次复数乘法和N(N-1)次复数加法运算.因此,当NLarge or requirements for real-time signal processing,Often difficult to achieve the required speed.FFT是一种DFT的高效算法,它根据离散傅氏变换的奇、偶、虚、实等特性,对离散傅立叶变换的算法进行改进获得的.
DFT的运算为:
By this methodDFT对于 的每个K值,需要进行4N次实数相乘和(4N-2)次相加,对于N个k值,共需4N*N次实数相乘和(4N-2)*NA real together.改进DFT算法,Reduce its computation,利用DFT中 The periodic and symmetry,使整个DFTThe calculation of into a series of迭代运算,Can greatly improve the operation process and the computation,这就是FFT的基本思想.FFTIn the computer system or数字系统The application of discrete傅立叶变换,Is a big improvement.
有限长离散信号x(n),n=0,1,…,N-1的DFT定义为:
可以看出,DFT需要计算大约N2次乘法和N2次加法.当N较大时,这个计算量是很大的.利用WNThe symmetry and periodic,将N点DFT分解为两个N/2点的 DFT,这样两个N/2点DFTThe total amount of calculation is only half the original,即(N/2)2+(N/2)2=N2/2,So that we can continue to break down,将N/2再分解为N/4点 DFT等.对于N=2m 点的DFT都可以分解为2点的DFT,So it can reduce the amount of calculation for(N/2)log2N次乘法和Nlog2N次加法.图为FFT与DFT-The relation curve of computation and calculation points required.The figure is obviousFFT算法的优越性.
将x(n)分解为偶数与奇数的两个序列之和,即
x1(n)和x2(n)的长度都是N/2,x1(n)是偶数序列,x2(n)是奇数序列,则
其中X1(k)和X2(k)分别为x1(n)和x2(n)的N/2点DFT.由于X1(k)和X2(k)均以N/2为周期,且WN k+N/2=-WN k,所以X(k)又可表示为:
On the type of operation can use the figure2表示,根据其形状称之为蝶形运算.依此类推,经过m-1次分解,最后将N点DFT分解为N/2个两点DFT.图3为8点FFTThe decomposition process of.
FFTThe principle of the algorithm is carried out by many small easier transform to achieve large-scale transform,Reduces the operation requirements,Improved with speed.FFT不是DFTThe approximate arithmetic,They are completely equivalent.
- 流程图
DSP系统的基本组成
The flow chart of the main steps
- 实验步骤
- Computer simulation to produce more frequency signal,Take five cycles image
Twice in the Nyquist frequency sampling
The sampling signalFFT运算
For low frequency observation spectrum characteristic
For discrete frequency domain inverse discrete Fourier transform (idwt) time-domain sampling signals and is willing to compare
In order to get the undistorted signal,The signal is obtained by inverse transform zero insertion(Every two sampling value inserted between7个零)
Cycle Fourier transform to obtain for the continuation of the spectrum
Through by the frequency of sampling pointN一半N/2的理想低通滤波器
显示1/16Observe the low-frequency
Inverse discrete Fourier transform (idwt) reduction in the time domain waveform
Through digital low passbutterworth滤波器(截止频率10HZ)
Through digital high-passbutterworth滤波器(截至频率30HZ)
Through digital bandpassbutterworth滤波器(截止频率(10HZ、30HZ)
Through digital band stopbutterworth滤波器(截止频率(10HZ、30HZ)
- Group parameters
The Nyquist specific reason validation and signal recovery
组别 | 频率(f1,f2,f3) | 振幅(A1,A2,A3) | Signal record length(NT) | 抽样频率 | Through the filter type |
---|---|---|---|---|---|
第一组 | (5,20,40) | (1.5,2,-1) | 5 | 160HZ | 无 |
第二组 | (5,20,40) | (1.5,2,-1) | 3 | 160HZ | 无 |
第三组 | (5,20,40) | (1.5,2,-1) | 3 | 50HZ | 无 |
第四组 | (5,20,40) | (1.5,2,-1) | 3 | 80HZ | 无 |
第五组 | (5,20,40) | (1.5,2,-1) | 3 | 100HZ | 无 |
第六组 | (5,20,40) | (1.5,2,-1) | 3 | 320HZ | 无 |
The signal through the ideal filter
组别 | 频率(f1,f2,f3) | 振幅(A1,A2,A3) | Signal record length(NT) | 抽样频率 | Through the filter type | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|
第七组 | (5,20,40) | (1.5,2,-1) | 3 | 160HZ | 低通(f<10HZ) | ||||||
第八组 | (5,20,40) | (1.5,2,-1) | 3 | 160HZ | 高通 (f>30HZ) | ||||||
第九组 | (5,20,40) | (1.5,2,-1) | 3 | 160HZ | 带通 (10HZ<f<30HZ) | ||||||
第十组 | (5,20,40) | (1.5,2,-1) | 3 | 160HZ | 带阻 (f<10HZ|f>30HZ) | ||||||
信号通过butterworth滤波器
组别 | 频率(f1,f2,f3) | 振幅(A1,A2,A3) | Signal record length(NT) | 抽样频率 | Through the filter type | |||||
---|---|---|---|---|---|---|---|---|---|---|
第十一组 | (5,20,40) | (1.5,2,-1) | 3 | 160HZ | 低通(f<10HZ) | |||||
第十二组 | (5,20,40) | (1.5,2,-1) | 3 | 160HZ | 高通 (f>30HZ) | |||||
第十三组 | (5,20,40) | (1.5,2,-1) | 3 | 160HZ | 带通 (10HZ<f<30HZ) | |||||
第十四组 | (5,20,40) | (1.5,2,-1) | 3 | 160HZ | 带阻 (f<10HZ|f>30HZ) | |||||
- 输出结果(图)
The first set of output figure(The experimental steps example):
A second group of the output figure
The third group output figure
The fourth group output figure
With five output figure
Group 6 output figure
The seventh group output figure(Through the ideal low-pass filter)
Group eight output figure(Through the ideal high-pass filter)
Set of output results figure 9(Through the ideal band-pass filter10HZ~30HZ)
The first ten group output figure(Through the ideal band-stop filter,阻带10~30hz)
11 group output figure(通过10HZ butterworth低通滤波器)
Set of 12 output figure(通过30HZ butterworth高通滤波器)
Group of 13 output figure(通过10~30HZ butterworth带通滤波器)
Set of output results figure 14(通过10~30HZ butterworth带阻滤波器)
- 结果分析
组别 | 频率(f1,f2,f3) | 振幅(A1,A2,A3) | Signal record length(NT) | 抽样频率 | Whether the aliasing distortion |
---|---|---|---|---|---|
第一组 | (5,20,40) | (1.5,2,-1) | 5 | 160HZ | 否 |
第二组 | (5,20,40) | (1.5,2,-1) | 3 | 160HZ | 否 |
第三组 | (5,20,40) | (1.5,2,-1) | 3 | 50HZ | 是 |
第四组 | (5,20,40) | (1.5,2,-1) | 3 | 80HZ | 是 |
第五组 | (5,20,40) | (1.5,2,-1) | 3 | 100HZ | 否 |
第六组 | (5,20,40) | (1.5,2,-1) | 3 | 320HZ | 否 |
For the first six groups of contrastive analysis of the experimental results of image can be,The sampling frequency is not greater than the Nyquist sampling frequency,That is twice the highest frequency component,频谱发生混叠,Aliasing distortion.By the third group,The fourth group can be seen that,Frequency domain produce aliasing,Reconstruction signal time domain waveform serious distortion.Other groups have no distortion.Which verified the Nyquist sampling theorem.
组别 | 频率(f1,f2,f3) | 振幅(A1,A2,A3) | 抽样频率 | Through the filter type |
---|---|---|---|---|
第一组 | (5,20,40) | (1.5,2,-1) | 160HZ | 无 |
第七组 | (5,20,40) | (1.5,2,-1) | 160HZ | 理想低通 (f<10HZ) |
第十一组 | (5,20,40) | (1.5,2,-1) | 160HZ | butterworth低通 (f<10HZ) |
第八组 | (5,20,40) | (1.5,2,-1) | 160HZ | 理想高通 (f>30HZ) |
第十二组 | (5,20,40) | (1.5,2,-1) | 160HZ | butterworth高通 (f>30HZ) |
第九组 | (5,20,40) | (1.5,2,-1) | 160HZ | 理想带通 (10HZ<f<30HZ) |
第十三组 | (5,20,40) | (1.5,2,-1) | 160HZ | butterworth带通 (10HZ<f<30HZ) |
第十组 | (5,20,40) | (1.5,2,-1) | 160HZ | Ideal with resistance (f<10HZ|f>30HZ) |
第十四组 | (5,20,40) | (1.5,2,-1) | 160HZ | butterworth带阻 (f<10HZ|f>30HZ) |
For through the filter group compared with the first set of,It can be seen that the signal through the filter after the change of frequency domain,At the same time observation reconstruction signals in the time domain can be seen by qualcomm、低通、带通、Band-stop filter after the signal waveform changes.Can see in this,对于不同需求、Can use different forms filter.Compared to the ideal filter and5阶butterworthThe output of filter can already seebutterworthThe output of the filter filtering results and ideal filter results are different,In terms of its frequency spectrum change ideal filter has a transition bandwidth,And stopband attenuation is not ideal value.In conformity with the content,The content of the digital filter is proved.
- 题目解答
模拟信号:
用一个FFTProcessor on the spectrum analysis,To distinguish the frequency component of all,则
- 1)The minimum signal record length should be how much?
- 2)Sampling frequency at least as much?
- 3)若采样频率为100Hz,The sampling points should be take time;
- 4)若采样频率为50Hz,What are the spectrum analysis of signal frequency component?Whether is consistent with the actual signal frequency component?为什么?
答:
- The minimum signal record should contain at least one signal cycle length,xa(t)Three signals in the frequency component respectively5HZ、20HZ、40HZ,Therefore, the frequency resolution for5HZ,则xa(t)的最小周期T0为0.20s.The minimum signal recording length should be0.20s.
- Sampling frequency should be greater than the Nyquist frequency,xa(t)Three signals in the frequency component respectively5HZ、20HZ、40HZ,则xa(t)The maximum frequency of the signal component40HZ,即采样频率fs至少为80HZ.
- 采样点数N = T0/T,T0 = 0.2s,If the frequency is100HZ则T = 1/fs = 0.01s.则N = 20,由N = 2^L,则L取5时N取最小值32.即,Sampling points should be taken32点.
- 若采样频率为50HZ,The signal frequency components have5HZ、10HZ、20HZ,Because does not meet the Nyquist specific reason,频谱发生混叠,A new frequency component10HZ,Its continuation for cycle roar-40HZThe frequency components appear in folding frequency(25HZ)Within the scope of the error detection component.As shown in the experiments the third group data spectrum image.频谱混叠,The corresponding wave distortion.50HZSampling corresponding results as shown in the figure below.
- Experiment source code and detailed steps
实验平台 Jupyter Notebook
实验语言 Python
Experiments using scientific computing library numpy scipy signal
Experiments using the drawing librarymatplotlib seaborn
实验源码:
See my download area
https://download.csdn.net/download/weixin_42733218/10942392
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/128937.html原文链接:https://javaforall.cn
边栏推荐
- 接口自动化框架,lm-easytest内测版发布,赶紧用起来~
- selenium4+pyetsst+allure+pom进行自动化测试框架的最新设计
- 地形分析的主要内容(流浪地球的特效水平)
- redis6.0 源码学习(五)ziplist
- OFDM Sixteen Lectures 3- OFDM Waveforms
- 3年软件测试经验面试要求月薪22K,明显感觉他背了很多面试题...
- mongodb打破原则引入SQL,它到底想要干啥?
- 电池包托盘有进水风险,存在安全隐患,紧急召回52928辆唐DM
- UPC2022 Summer Individual Training Game 19 (B, P)
- jsArray array copy method performance test 2207300823
猜你喜欢
Shell变量与赋值、变量运算、特殊变量、重定向与管渠
无代码开发平台全部应用设置入门教程
LeetCode二叉树系列——199二叉树的右视图
近两年激光雷达运动物体分割论文阅读小结
(一)Multisim安装与入门
SQL 26 calculation under 25 years of age or older and the number of users
Data Middle Office Construction (5): Breaking Enterprise Data Silos and Extracting Data Value
人社部公布“数据库运行管理员”成新职业,OceanBase参与制定职业标准
我为何从开发人员转做测试,3年软件测试工程师,带你聊聊这其中的秘辛
3 years of software testing experience, the interview requires a monthly salary of 22K, obviously he has memorized a lot of interview questions...
随机推荐
#第九章 子查询课后习题
ML之PDP:基于FIFA 2018 Statistics(2018年俄罗斯世界杯足球赛)球队比赛之星分类预测数据集利用DT决策树&RF随机森林+PDP部分依赖图可视化实现模型可解释性之详细攻略
Self-tuning PID self-tuning control 】 【
OFDM 十六讲 3- OFDM Waveforms
CF603E Pastoral Oddities
CF338E Optimize!
jsArray array copy method performance test 2207300040
LeetCode二叉树系列——116.填充每个节点的下一个右侧指针
Shell变量与赋值、变量运算、特殊变量、重定向与管渠
jsArray数组复制方法性能测试2207300040
CF1677E Tokitsukaze and Beautiful Subsegments
OFDM Sixteen Lectures 3- OFDM Waveforms
Baijiahao cancels the function of posting documents on the interface: the weight of the plug-in chain is blocked
六面蚂蚁金服,抗住面试官的狂轰乱炸,前来面试复盘
ARC115F Migration
cookie模拟登录「建议收藏」
LeetCode二叉树系列——145.二叉树的后序遍历
群晖系统安装相关文件分享
以unity3d为例解读:游戏数据加密
selenium4+pyetsst+allure+pom进行自动化测试框架的最新设计