当前位置:网站首页>Digital signal processing experiment (I)
Digital signal processing experiment (I)
2022-07-23 18:18:00 【Full stack programmer webmaster】
Hello everyone , I meet you again , I'm your friend, Quan Jun .
The experiment purpose
The purpose of this experiment is : stay matlab Several basic digital signals are generated in the environment , And operate and transform these basic signals , At the same time, the sampling theorem is verified by the program results , Deep understanding of sampling theorem . Record audio signals by yourself and process different audio signals , Deepen your understanding of the principle of sound channel in audio signal , And mixing 、 The formation principle of echo .
Experimental content
- use matlab Generate unit pulse signal , Unit step signal , Rectangular signal , Sine signal , Cosine signal , Exponential signals , Produce and observe f(x)=sinc(x) The waveform of the function .
- utilize matlab Realize the algebraic operation of discrete-time signals , Shift operation , Folding operation , Convolution operation , Differential transformation and proportional transformation .
- Verification of sampling theorem Explore the impact of sampling on signal reconstruction , The influence of frequency truncation on signal reconstruction .
- Audio experiment
Analysis of experimental results
1. use matlab Generate unit pulse signal , Unit step signal , Rectangular signal , Sine signal , Cosine signal , Exponential signals , Produce and observe f(x)=sinc(x) The waveform of the function .
chart (a) It represents the unit pulse sequence , chart (b) It represents the unit step sequence , The unit pulse sequence is 0 The value at is 1, The values at other points are 0; The unit step sequence is greater than or equal to 0 The value at the point of is 1, The values at other points are 0.
chart (c) Represents a rectangular sequence , Rectangular sequence in 20-30 The value between is 1, The value of other points is 0; chart (d) Represents a sinusoidal sequence , Sine sequence has obvious periodicity .
chart (e) It represents a real exponential sequence , Its function prototype is f(x)=(5/4)x f(x)=(5/4)^x chart (f) Represents a complex exponential sequence , The four subgraphs represent the real part sequence of the complex exponential sequence 、 Imaginary part sequence 、 Modular sequence and phase angle sequence . Its function prototype is f(x)=(0.8eπi/4)x f(x)=(0.8e^{\pi i/4})^x.
chart (g) It means sinc function ,sinc The prototype of the function is f(x)=sin(x)/x f(x)=sin(x)/x, In mathematical analysis , Yes sin(x) stay 0 Let's get out of here , You can get sinc Function in 0 The value at is 1.
2. utilize matlab Realize the algebraic operation of discrete-time signals , Shift operation , Folding operation , Convolution operation , Differential transformation and proportional transformation .
chart (a) It represents the shift of unit pulse sequence , The left subgraph is the original sequence , Right subgraph is shifted to the right 5 A sequence of units . chart (b) It is the sequence after the unit step sequence is folded . From negative infinity to 0 The value of is 1, The values of other points are 0.
chart (c) Represents a sequence 1 And sequence 2 The effect picture after adding , Sequence 1 Is a sinusoidal sequence , The functional prototype of the sequence is f(x)=0.3sin(πx/6) f(x)=0.3sin(\pi x/6); Sequence 2 Is a cosine sequence , The functional prototype of the sequence is f(x)=0.2cos(πx/4) f(x)=0.2cos(\pi x/4) , chart (d) Representation sequence convolution .
3. Verification of sampling theorem
Explore the impact of sampling on signal reconstruction , The influence of frequency truncation on signal reconstruction . First, the signal is sampled at different frequencies , Critical sampling is the Nyquist critical value , Oversampling in the experiment , Under sampling and critical sampling are tested , The experimental results are shown below .
chart (a) Indicates under sampling , chart (b) Indicates critical sampling , The thick green line indicates the original signal , The black thin line represents the reconstructed signal after sampling , From the experimental results of undersampling and critical sampling, we observed : There is a certain difference between the under sampled reconstructed signal and the original signal , The reconstructed signal of critical sampling is approximately the same as the original signal .
chart (c) It indicates oversampling , chart (d) It represents the critical sampling situation , The thick green line indicates the original signal , The black thin line represents the reconstructed signal after sampling . It can be seen from the results of two sampling experiments : After two kinds of sampling, the reconstructed signal is similar to the original signal . Through this test , We have a deeper understanding of the sampling theorem . The sampling frequency must be greater than the highest frequency of twice the signal spectrum . Next, we will analyze the influence of frequency resolution on sampling . The experimental signal is f(t)=1(−1≤t≤1) f(t)=1(-1\leq t \leq 1) The experimental signal spectrum is F(w)=2sin(w)/w F(w)=2sin(w)/w
chart (a) It's the original signal , chart (b) Is the spectrum of the signal .
chart (c) Indicates sampling intercept ws = 1000 Time sampling signal sequence , chart (d) yes ws = 1000 The reconstructed signal of time , It can be seen that when ws Value of 1000 when , The sampling process can only approximate 0 Nearby signals .
chart (e) Sum graph (f) Yes, the cut-off frequency is Sampling sequence and reconstructed signal , It can be seen that it is better than ws = 1000 It is closer to the original signal .
4. Audio experiment
Audio acquisition : Use matlab function wavrecord() Record sound signals at both ends , Set the recording frequency FS=11025, And use wavplay() Function to play , Use wavwrite() The function stores the recorded audio file with the suffix wav The audio file for .
Audio signal processing : Digitize the acquired audio signal First, draw the time domain spectrum of the signals at both ends :
Sub figure above a music yes a.wav Time domain spectrum of the document , The following subgraph b music yes b.wav Time domain spectrum of the document . Next, we will synthesize the two sound signals , Generate mixed signal 、 And echo signals .
The generation of mixed sound is obtained by linearly changing the two sound signals , In this experiment y1 The coefficient of is 1,y2 The coefficient of is 0.3. Then normalize the generated new signal to form a graph 5.1 Mixed sound of . The principle of echo generation is to linearly change the sound signal in different time periods . First, echo information is generated , Then mix the echo information with the original information , You get the echo information .
summary
After this experiment , Learn how to use matlab Tools for basic signal processing . First, simulate the graphics of different basic sequences , Secondly, the Nyquist sampling theorem is experimentally explored , The Nyquist sampling theorem is further verified by experiments . At the same time, the influence of cut-off frequency on sampling is analyzed experimentally . Finally, practice operation and record audio information , And mix 、 Echo and other operations . Through this experiment of testing technology , I learned a lot of practical knowledge , More importantly, the process of doing experiments , Ways of thinking , This is common to other experiments , It really benefits us a lot .
Publisher : Full stack programmer stack length , Reprint please indicate the source :https://javaforall.cn/126598.html Link to the original text :https://javaforall.cn
边栏推荐
- vb连接Access数据库自定义
- Explication détaillée du principe de co - intégration en go
- Leetcode: Jianzhi offer II 115. reconstruction sequence [graph theory thinking + in degree consideration + topological sorting]
- tree
- 数据库建模
- Seal player IP and machine code and unlock the blocked tutorial
- Debug: the formal parameter has const modifier, which should be paid attention to
- 【215】gin框架连接mysql数据库
- 【215】gin框架連接mysql數據庫
- Open source needs specialization
猜你喜欢
![Leetcode: Jianzhi offer II 115. reconstruction sequence [graph theory thinking + in degree consideration + topological sorting]](/img/cc/1438381ccc8d7fe147bb9c5e7e1742.png)
Leetcode: Jianzhi offer II 115. reconstruction sequence [graph theory thinking + in degree consideration + topological sorting]

rhcsa笔记六

Analyze the CPU surge of an RFID tag system written by.Net

阿里 P7 到底是怎样的水平?

Did not find the necessary patch file 'newopui.pak'?

变分法 (Calculus of Variations)

20220721 积分环节的时频域分析

封玩家IP和机器码以及解开被封的教程

DDD:如何领用领域驱动设计来避免写流水账代码

Time frequency domain analysis of 20220721 integral link
随机推荐
Shell | incomplete summary of the method of viewing the process
Eric6 installation problem
搭建PHP开发环境(Apache+PHP+MySQL)「建议收藏」
Machine learning (9) - Feature Engineering (3) (supplementary)
Data crawling and display of e-commerce platform based on scratch
分析一个 .NET 写的 某 RFID标签系统 CPU暴涨
Reinforcement learning -- Markov decision process MP MRP MDP
Use moment to get the date of the current day and the next day
Comparison of several operation and maintenance tools
Go medium high parallel communication mode: the underlying principle of channel pipeline
微服务雪崩问题及解决方案
Problems encountered in the project and Solutions
Redis data loss problem
go中的協程原理詳解
MySQL事务,从redo log、bin log、undo log说起...
20220721 积分环节的时频域分析
MySQL8.0.23四次重装都失败在 'Writing configuration file'
C language · structure (Introduction to linear table)
传奇架设 GEE引擎教程 配置微端
[jzof] 13 motion range of robot