版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、实验1周期信号波形的合成和分解1实验目的1. 学习使用Matlab,学会用Matlab提供的函数对信号进行频谱分析;2. 加深了解信号分析手段之一的傅立叶变换的基本思想和物理意义;3. 观察和分析由多个频率、幅值和相位成一定关系的正弦波叠加的合成波形;。4. 观察和分析频率、幅值相同,相位角不同的正弦波叠加的合成波形;5. 通过本实验熟悉信号的合成、分解原理,了解信号频谱的含义。2实验原理按富立叶分析的原理,任何周期信号都可以用一组三角函数sin(2ii nf0t)、con(2兀 nf0t)的组合表示oC(n=1 , 2, 3,)x(t)二 a0 (an cos2二 nf0t bn sin2:
2、nf0t)n 4也就是说,我们可以用一组正弦波和余弦波来合成任意形状的周期信号 对于典型的方波,其时域表达式为:-A(-?/2 0)(Qf 1). If x and y are not the same len gth, the shorter vector is zero-padded to the len gth of the Ion ger vector.c=xcorr(x) is the autocorrelation sequence for the vector x.c=xcorr(x,y,maxlags,optio n)where opti on is:biased: Biase
3、d estimate of the cross-correlati on fun cti onun biased: Un biased estimate of the cross-correlati on fun ctio ncoeff: Normalizes the sequence so the autocorrelations at zero lag are identically 1.0 non e, to use the raw, un scaled cross-correlati ons (default) maxlags specifies both x,y a maximum
4、number of lags .Example:求 x1 = sin(2 n 10t)+w(t) 和 x2=w(t)的自相关函数 (w(t)为白噪声)。N=1000; n=0:N-1;Fs=500;t=n/Fs;x1=si n(2*pi*10*t)+0.6*ra ndn (1,le ngth(t);c,lags=xcorr(x1,u nbiased);subplot(2,2,1),plot(t,x1),xlabel(t),ylabel(x1(t),grid;自相关函数),grid;互相关函数),grid;subplot(2,2,2),plot(lags/Fs,c),ylabel(Rxx1(t)
5、, ti tle(x1x2=ra ndn (1,le ngth(t);c,lags=xcorr(x2,u nbiased); subplot(2,2,3),plot(t,x2),xlabel(t),ylabel(x2(t),grid subplot(2,2,4),plot(lags/Fs,c),ylabel(Rxx2(t), ti tle(x2x2互相关函数x1自相关函数ll HL .tJH. J x . - .J|riirni1r i j i q r5. File Openration%We can create a data file:t=0:0.001:0.511;y=si n(2*pi
6、*20*t)+si n(2*pi*70*t)+si n(2*pi*80*t)+si n(2*pi*90*t); save data1 y -ascii; %save y as a text file: data1 x=load(data1); %load file as a variable x% We can create a file as data.txt using any edit :1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3% then use it as a variable , for example:y=load(data.txt); %load
7、file“ data.txt ” as a variable yplot(y);6. Histogram plotn = hist(Y)n = hist(Y,x)DescriptionA histogram shows the distribution of data values.n = hist(Y) bins the elements in Y into 10 equally spaced containers and returns the number of elements in each contain er. If Y is a matrix, hist works dow n
8、 the colu mns.n = hist(Y,x) where x is a vector, returns the distribution of Y among length (x) bins with centers specified by x. For example, if x is a 5-element vector, hist distributes the elements of Y into five bins centered on the x-axis at the eleme nts in x. Note: use histc if it is more n atural to specify bin edges in stead of cen ters.ExampleGen erate a bell-curve histogram from Gaussia n data.x = -2.9:0.129;y = randn (10000,1);hist(y,x)-3450400350300250200150100500-2-101237.功率谱估计pwelch(x,window,noverlap,nfft,fs)x 被估计的信号;windows所加Hanning窗的长度;noverlap被估计信号重叠的长度;nfft fft 的长度;fs采样
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 数据中心智能监控与故障预测系统
- 位章程及联营协议书
- 位集资房屋合同范本
- 交通意外谅解协议书
- 设备买卖意向合同范本
- 会所安全协议书范本
- 城市绿色综合分拣中心建设项目风险评估报告
- 易考词汇高考真题及答案
- 专利变更协议书范本
- 推动畜禽粪污资源化利用实施方案
- 2024年山东省公务员考试申论(C卷)真题答案解析
- 2025广东惠州市政务服务和数据管理局编外人员招聘6人考试笔试参考题库附答案解析
- 贵州省考公安真题及答案
- 2025年黄岛网格员考试题及答案
- 2025年度天津市中小学教师系列正高级职称评审劳动教育综合练习题及答案
- 虚拟化应急预案
- 抖音美食运营方案
- 氨水泄漏知识培训课件
- 纪念抗战胜利 坚定民族信念
- 印刷管理考试题及答案
- 2025年包钢(集团)公司新员工招聘考试真题及答案
评论
0/150
提交评论