Mitra《数字信号处理-基于计算机的方法》翻译 武汉大学 孙洪
- 格式:pdf
- 大小:247.70 KB
- 文档页数:4
朱丽平通信工程系(理工楼214房间)zlp6681@数字信号处理(Digital Signal Processing)关于本课程(About the course)教材¾数字信号处理——基于计算机的方法(第四版). Sanjit K. Mitra著,余翔宇译. 电子工业出版社. 2012,1.¾数字信号处理实验指导书(MATLAB 版). Sanjit K. Mitra 著,孙洪等译. 电子工业出版社. 2005, 1.参考书¾Richard G. Lyons. Understanding Digital Signal Processing(Second Edition). 机械工业出版社. 2005,1.¾朱光明,程建远,刘保童等译. 数字信号处理(原书第2版). 机械工业出版社. 2006,1.评分标准平时:出勤(10%) + 作业(10%) + 实验报告(10%)阶段测试:理论(20%) + 实验(20%) 期末考试: 30%课程体系(Architecture of the course)数字信号处理信号处理与算法实现系统分析、设计与实现数字滤波器结构(直接型、级联型、并联型、格型)数字滤波器实现中的有限字长效应离散时间信号的时频域变换(DTFT 、DFT 、STFT 、DCT 、z 变换)数字滤波器设计(IIR 、FIR)离散时间系统的时域分析离散时间信号的时域分析离散时间信号的频域分析快速算法(FFT)离散时间系统的变换域分析课程内容(Contents of the course)第1章信号和信号处理第2章时域中的离散时间信号 第3章频域中的离散时间信号 第4章离散时间系统 第5章有限长离散变换第7章变换域中的LTI 离散时间系统 第8章数字滤波器结构 第9章IIR 数字滤波器设计 第10章FIR 数字滤波器设计 第11章DFT 算法实现第12章有限字长效应的分析Matlab 实验(Laboratory Using Matlab)Lab 1 Discrete-Time Signals : Time-Domain Representations (离散时间信号的时域分析) Lab 2 Discrete-Time Systems : Time-Domain Representations (离散时间系统的时域分析) Lab3 Discrete-Time Signals : Frequency-Domain Representations (离散时间信号的频域分析)Lab 4 Digital Processing of Continuous-Time Signals (连续时间信号的数字处理)Lab 5 Digital Filter Design (数字滤波器设计) Lab 6 Digital Filter Implementation (数字滤波器实现)信号和信号处理(Signals and Signal Processing)第1章学习目标(Learning Objectives)信号的特征与分类(Characterization and Classification of Signals)典型的信号处理运算(Typical signal processing operations)典型信号举例(Examples of Typical Signals) 为什么要进行数字信号处理(Why digital signal processing)数字信号处理的实现(Implementations of Digital Signal Processing)1.1 信号的特征与分类continuous-time signal (连续时间信号)模拟信号量化阶梯信号discrete-time signal (离散时间信号)采样信号数字信号1.2 典型的信号处理运算时域基本运算(Simple Time-DomainOperations) 滤波(Filtering)复用和解复用(Multiplexing and Demultiplexing)信号的产生(Signal Generation)1.2.1 时域基本运算t 0 >0, delay (延时)t 0 <0, advance (超前)()x t ()()y t x t α=α为正的或负的常数.α 标乘(scaling)()x t ()()0y t x t t =−相加(addition)()a t ()()()y t a t x t =相乘(product)()1x t ()2x t ()()()12y t x t x t =+ 1.2.1 时域基本运算differentiation (微分)integration (积分)()x t ()()ty t x d ττ−∞=∫∫()x t d dt()()dx t y t dt=1.2.2 滤波()()j t X j x t e dt∞−Ω−∞Ω=∫():x t 连续时间信号the spectrum of x(t),x(t)的频谱()?X j Ω滤波的目的:根据指定的要求改变频谱。
研究生“现代信号处理”课程大型作业(以下四个题目任选三题做)1. 请用多层感知器(MLP )神经网络误差反向传播(BP )算法实现异或问题(输入为[00;01;10;11]X T =,要求可以判别输出为0或1),并画出学习曲线。
其中,非线性函数采用S 型Logistic 函数。
2. 试用奇阶互补法设计两带滤波器组(高、低通互补),进而实现四带滤波器组;并画出其频响。
滤波器设计参数为:F p =1.7KHz , F r =2.3KHz , F s =8KHz , A rmin ≥70dB 。
3. 根据《现代数字信号处理》(姚天任等,华中理工大学出版社,2001)第四章附录提供的数据(pp.352-353),试用如下方法估计其功率谱,并画出不同参数情况下的功率谱曲线:1) Levinson 算法2) Burg 算法3) ARMA 模型法4) MUSIC 算法4. 图1为均衡带限信号所引起失真的横向或格型自适应均衡器(其中横向FIR 系统长M =11), 系统输入是取值为±1的随机序列)(n x ,其均值为零;参考信号)7()(-=n x n d ;信道具有脉冲响应:12(2)[1cos()]1,2,3()20 n n h n W π-⎧+=⎪=⎨⎪⎩其它式中W 用来控制信道的幅度失真(W = 2~4, 如取W = 2.9,3.1,3.3,3.5等),且信道受到均值为零、方差001.02=v σ(相当于信噪比为30dB)的高斯白噪声)(n v 的干扰。
试比较基于下列几种算法的自适应均衡器在不同信道失真、不同噪声干扰下的收敛情况(对应于每一种情况,在同一坐标下画出其学习曲线):1) 横向/格-梯型结构LMS 算法2) 横向/格-梯型结构RLS 算法并分析其结果。
图1 横向或格-梯型自适应均衡器参考文献[1] 姚天任, 孙洪. 现代数字信号处理[M]. 武汉: 华中理工大学出版社, 2001[2] 杨绿溪. 现代数字信号处理[M]. 北京: 科学出版社, 2007[3] S. K. Mitra. 孙洪等译. 数字信号处理——基于计算机的方法(第三版)[M]. 北京: 电子工业出版社, 2006[4] S.Haykin, 郑宝玉等译. 自适应滤波器原理(第四版)[M].北京: 电子工业出版社, 2003[5] J. G. Proakis, C. M. Rader, F. Y. Ling, etc. Algorithms for Statistical Signal Processing [M].Beijing: Tsinghua University Press, 2003一、请用多层感知器(MLP)神经网络误差反向传播(BP)算法实现异或问题(输入为[00;01;10;11],要求可以判别输出为0或1),并画出学习曲线。
Signal processingSignal processing is an area of electrical engineering and applied mathematics that deals with operations on or analysis of signals, in either discrete or continuous time, to perform useful operations on those signals. Signals of interest can include sound, images, time-varying measurement values and sensor data, for example biological data such as electrocardiograms, control system signals, telecommunication transmission signals such as radio signals, and many others. Signals are analog or digital electrical representations of time-varying or spatial-varying physical quantities. In the context of signal processing, arbitrary binary data streams and on-off signalling are not considered as signals, but only analog and digital signals that are representations of analog physical quantities.HistoryAccording to Alan V. Oppenheim and Ronald W. Schafer, the principles of signal processing can be found in the classical numerical analysis techniques of the 17th century. They further state that the "digitalization" or digital refinement of these techniques can be found in the digital control systems of the 1940s and 1950s.[2]Categories of signal processingAnalog signal processingAnalog signal processing is for signals that have not been digitized, as in classical radio, telephone, radar, and television systems. This involves linear electronic circuits such as passive filters, active filters, additive mixers, integrators and delay lines. It also involves non-linear circuits such ascompandors, multiplicators (frequency mixers and voltage-controlled amplifiers), voltage-controlled filters, voltage-controlled oscillators andphase-locked loops.Discrete time signal processingDiscrete time signal processing is for sampled signals that are considered as defined only at discrete points in time, and as such are quantized in time, but not in magnitude.Analog discrete-time signal processing is a technology based on electronic devices such as sample and hold circuits, analog time-division multiplexers, analog delay lines and analog feedback shift registers. This technology was a predecessor of digital signal processing (see below), and is still used in advanced processing of gigahertz signals.The concept of discrete-time signal processing also refers to a theoretical discipline that establishes a mathematical basis for digital signal processing, without taking quantization error into consideration.Digital signal processingDigital signal processing is for signals that have been digitized. Processing is done by general-purpose computers or by digital circuits such as ASICs, field-programmable gate arrays or specialized digital signal processors (DSP chips). Typical arithmetical operations include fixed-point and floating-point, real-valued and complex-valued, multiplication and addition. Other typical operations supported by the hardware are circular buffers and look-up tables. Examples of algorithms are the Fast Fourier transform (FFT), finite impulseresponse (FIR) filter, Infinite impulse response (IIR) filter, and adaptive filters such as the Wiener and Kalman filters1.Digital signal processingDigital signal processing (DSP) is concerned with the representation of signals by a sequence of numbers or symbols and the processing of these signals. Digital signal processing and analog signal processing are subfields of signal processing. DSP includes subfields like: audio and speech signal processing, sonar and radar signal processing, sensor array processing, spectral estimation, statistical signal processing, digital image processing, signal processing for communications, control of systems, biomedical signal processing, seismic data processing, etc.The goal of DSP is usually to measure, filter and/or compress continuousreal-world analog signals. The first step is usually to convert the signal from an analog to a digital form, by sampling it using an analog-to-digital converter (ADC), which turns the analog signal into a stream of numbers. However, often, the required output signal is another analog output signal, which requires a digital-to-analog converter (DAC). Even if this process is more complex than analog processing and has a discrete value range, the application of computational power to digital signal processing allows for many advantages over analog processing in many applications, such as error detection and correction in transmission as well as data compression.[1]DSP algorithms have long been run on standard computers, on specialized processors called digital signal processors (DSPs), or on purpose-built hardware such as application-specific integrated circuit (ASICs). Today thereare additional technologies used for digital signal processing including more powerful general purpose microprocessors, field-programmable gate arrays (FPGAs), digital signal controllers (mostly for industrial apps such as motor control), and stream processors, among others.[2]2. DSP domainsIn DSP, engineers usually study digital signals in one of the following domains: time domain (one-dimensional signals), spatial domain (multidimensional signals), frequency domain, autocorrelation domain, and wavelet domains. They choose the domain in which to process a signal by making an informed guess (or by trying different possibilities) as to which domain best represents the essential characteristics of the signal. A sequence of samples from a measuring device produces a time or spatial domain representation, whereas a discrete Fourier transform produces the frequency domain information, that is the frequency spectrum. Autocorrelation is defined as the cross-correlation of the signal with itself over varying intervals of time or space.3. Signal samplingMain article: Sampling (signal processing)With the increasing use of computers the usage of and need for digital signal processing has increased. In order to use an analog signal on a computer it must be digitized with an analog-to-digital converter. Sampling is usually carried out in two stages, discretization and quantization. In the discretization stage, the space of signals is partitioned into equivalence classes and quantization is carried out by replacing the signal with representative signal of the corresponding equivalence class. In the quantization stage the representative signal values are approximated by values from a finite set.The Nyquist–Shannon sampling theorem states that a signal can be exactly reconstructed from its samples if the sampling frequency is greater than twice the highest frequency of the signal; but requires an infinite number of samples . In practice, the sampling frequency is often significantly more than twice that required by the signal's limited bandwidth.A digital-to-analog converter is used to convert the digital signal back to analog. The use of a digital computer is a key ingredient in digital control systems. 4. Time and space domainsMain article: Time domainThe most common processing approach in the time or space domain is enhancement of the input signal through a method called filtering. Digital filtering generally consists of some linear transformation of a number of surrounding samples around the current sample of the input or output signal. There are various ways to characterize filters; for example:• A "linear" filter is a linear transformation of input samples; other filters are "non-linear". Linear filters satisfy the superposition condition, i.e. if an input is a weighted linear combination of different signals, the output is an equally weighted linear combination of the corresponding output signals.• A "causal" filter uses only previous samples of the input or output signals; while a "non-causal" filter uses future input samples. A non-causal filter can usually be changed into a causal filter by adding a delay to it.• A "time-invariant" filter has constant properties over time; other filters such as adaptive filters change in time.•Some filters are "stable", others are "unstable". A stable filter produces an output that converges to a constant value with time, or remains bounded within a finite interval. An unstable filter can produce an output that grows without bounds, with bounded or even zero input.• A "finite impulse response" (FIR) filter uses only the input signals, while an "infinite impulse response" filter (IIR) uses both the input signal and previous samples ofthe output signal. FIR filters are always stable, while IIR filters may be unstable.Filters can be represented by block diagrams which can then be used to derive a sample processing algorithm to implement the filter using hardware instructions. A filter may also be described as a difference equation, a collection of zeroes and poles or, if it is an FIR filter, an impulse response or step response.The output of a digital filter to any given input may be calculated by convolving the input signal with the impulse response.5. Frequency domainMain article: Frequency domainSignals are converted from time or space domain to the frequency domain usually through the Fourier transform. The Fourier transform converts the signal information to a magnitude and phase component of each frequency. Often the Fourier transform is converted to the power spectrum, which is the magnitude of each frequency component squared.The most common purpose for analysis of signals in the frequency domain is analysis of signal properties. The engineer can study the spectrum todetermine which frequencies are present in the input signal and which are missing.In addition to frequency information, phase information is often needed. This can be obtained from the Fourier transform. With some applications, how the phase varies with frequency can be a significant consideration.Filtering, particularly in non-realtime work can also be achieved by converting to the frequency domain, applying the filter and then converting back to the time domain. This is a fast, O(n log n) operation, and can give essentially any filter shape including excellent approximations to brickwall filters.There are some commonly used frequency domain transformations. For example, the cepstrum converts a signal to the frequency domain through Fourier transform, takes the logarithm, then applies another Fourier transform. This emphasizes the frequency components with smaller magnitude while retaining the order of magnitudes of frequency components.Frequency domain analysis is also called spectrum- or spectral analysis.6. Z-domain analysisWhereas analog filters are usually analysed on the s-plane; digital filters are analysed on the z-plane or z-domain in terms of z-transforms.Most filters can be described in Z-domain (a complex number superset of the frequency domain) by their transfer functions. A filter may be analysed in the z-domain by its characteristic collection of zeroes and poles.7. ApplicationsThe main applications of DSP are audio signal processing, audio compression, digital image processing, video compression, speech processing, speech recognition, digital communications, RADAR, SONAR, seismology, and biomedicine. Specific examples are speech compression and transmission in digital mobile phones, room matching equalization of sound in Hifi and sound reinforcement applications, weather forecasting, economic forecasting, seismic data processing, analysis and control of industrial processes, computer-generated animations in movies, medical imaging such as CAT scans and MRI, MP3 compression, image manipulation, high fidelity loudspeaker crossovers and equalization, and audio effects for use with electric guitar amplifiers8. ImplementationDigital signal processing is often implemented using specialised microprocessors such as the DSP56000, the TMS320, or the SHARC. These often process data using fixed-point arithmetic, although some versions are available which use floating point arithmetic and are more powerful. For faster applications FPGAs[3] might be used. Beginning in 2007, multicore implementations of DSPs have started to emerge from companies including Freescale and Stream Processors, Inc. For faster applications with vast usage, ASICs might be designed specifically. For slow applications, a traditional slower processor such as a microcontroller may be adequate. Also a growing number of DSP applications are now being implemented on Embedded Systems using powerful PCs with a Multi-core processor.(翻译)信号处理信号处理是电气工程与应用数学领域,在离散的或连续时间域处理和分析信号,以对这些信号进行所需的有用的处理。
数字信号处理国外教材数字信号处理(Digital Signal Processing,DSP)是指通过数字计算机对信号进行采样、量化、编码、处理和解码的技术过程。
它已经成为现代通信、图像处理、音频处理和控制系统等领域中不可或缺的核心技术。
国外教材在数字信号处理方面具有丰富的资源和深厚的研究成果,以下将介绍一些常见的国外数字信号处理教材。
1. 《数字信号处理:原理、算法与硬件实现》(Digital Signal Processing: Principles, Algorithms, and Applications)- John G. Proakis, Dimitris G. Manolakis这是一本经典的数字信号处理教材,适用于本科和研究生的学习。
它全面介绍了数字信号处理的原理、算法和实现方法,并包含了大量的数学推导和实际应用。
该书广泛探讨了滤波器设计、频谱分析、傅里叶变换、数字滤波器设计和信号重建等主题。
2. 《数字信号处理和系统》(Digital Signal Processing and System)- Gérard Blanchet, Maurice Charbit这本教材介绍了数字信号处理的基本概念和技术,并重点介绍了系统建模、滤波器设计和频谱分析等内容。
它以实际的案例和应用为基础,帮助学习者理解数字信号处理在实际系统中的应用。
该书还包含了大量的练习题和实验,帮助学习者深入理解和应用所学知识。
3. 《数字信号处理系统设计与实现》(Digital Signal Processing System Design and Implementation)- Sanjit K.Mitra这本教材侧重于数字信号处理系统的设计和实现,包括硬件和软件方面的内容。
它详细介绍了数字信号处理器(DSP)的体系结构和特点,并着重讨论了DSP算法的设计和优化。
该书以实际应用为导向,涵盖了多种领域中的案例研究,如音频信号处理、图像处理和通信系统等。
中英文对照外文翻译(文档含英文原文和中文翻译)数字信号处理一、导论数字信号处理(DSP)是由一系列的数字或符号来表示这些信号的处理的过程的。
数字信号处理与模拟信号处理属于信号处理领域。
DSP包括子域的音频和语音信号处理,雷达和声纳信号处理,传感器阵列处理,谱估计,统计信号处理,数字图像处理,通信信号处理,生物医学信号处理,地震数据处理等。
由于DSP的目标通常是对连续的真实世界的模拟信号进行测量或滤波,第一步通常是通过使用一个模拟到数字的转换器将信号从模拟信号转化到数字信号。
通常,所需的输出信号却是一个模拟输出信号,因此这就需要一个数字到模拟的转换器。
即使这个过程比模拟处理更复杂的和而且具有离散值,由于数字信号处理的错误检测和校正不易受噪声影响,它的稳定性使得它优于许多模拟信号处理的应用(虽然不是全部)。
DSP算法一直是运行在标准的计算机,被称为数字信号处理器(DSP)的专用处理器或在专用硬件如特殊应用集成电路(ASIC)。
目前有用于数字信号处理的附加技术包括更强大的通用微处理器,现场可编程门阵列(FPGA),数字信号控制器(大多为工业应用,如电机控制)和流处理器和其他相关技术。
在数字信号处理过程中,工程师通常研究数字信号的以下领域:时间域(一维信号),空间域(多维信号),频率域,域和小波域的自相关。
他们选择在哪个领域过程中的一个信号,做一个明智的猜测(或通过尝试不同的可能性)作为该域的最佳代表的信号的本质特征。
从测量装置对样品序列产生一个时间或空间域表示,而离散傅立叶变换产生的频谱的频率域信息。
自相关的定义是互相关的信号本身在不同时间间隔的时间或空间的相关情况。
二、信号采样随着计算机的应用越来越多地使用,数字信号处理的需要也增加了。
为了在计算机上使用一个模拟信号的计算机,它上面必须使用模拟到数字的转换器(ADC)使其数字化。
采样通常分两阶段进行,离散化和量化。
在离散化阶段,信号的空间被划分成等价类和量化是通过一组有限的具有代表性的信号值来代替信号近似值。
数字信号处理实际系统并不一定要包括它的所有框如有些系统只需数字输出,可直接以数另一些系统的输入就是数字量,因而就纯数字系统则只需要数字信号处理器这在国际上一般把而它的历史可以追溯到数字信号处理的基本工具:微积分,概数字信号处理的理论基础:离散线性变在学科发展上,数字信号处理又和最优数字信号处理学科包含有与模拟系统1234567在模拟系统中,它的精度是由元件决2.可靠性强模拟系统:各参数都有一定的温度系数,易受环境条件,如温度、振动、电磁感应等影响,产生杂散效应甚至振荡等数字系统:只有两个信号电平0,1受噪声及环境条件等影响小。
且数字系统采用大规模集成电路,其故障率远远小于采用众多分立元件构成的模拟系统数字系统的性能主要决定于乘法器的各利用某一路信号的相邻两抽样值之间存在很大的空隙例:对信号进行频谱分析模拟频谱仪在频率低端只能分析到但在数字的谱分析中,已能做到又例:有限长冲激响应数字滤波器,则可实现利用庞大的存储单元,可以存储一帧或数字系统的速度还不算高,因而不能处另外,数字系统的设计和结构复杂,价数字系统由有源器件构成自数字信号处理大致可分为:信号分析信号滤波它是最早采用数字信号处理技术的领域之一。
本世纪在语音领域现存在着三种系统:即广泛应用于电话窃听。
应用于语音编码、语音合在GSM手机中用DSP可将语音压缩数字信号处理技术成功应用的图像处理方法数据压缩图像复原清晰化与增强采用DSP完成视频图像信号的压缩整个通信领域几乎没有不受数字信号处理数字技术已用于信号的调制、解调、滤语音数据压缩与解压是数字信号处理的重在电信领域,数字处理技术已发展到音调利用通信卫星打越洋长途电话时调制解调器下面介绍它们在通讯中的应用大家知道,脉与数据压缩相反的数据扩张,也是很有用的技现代通信系统是信息时代的生命线。
最生物医学信号处理CTCAT:1. 2. 3. 4.工作站和微机上各厂家的数字信号软用这一方法优点:可适用于各种数字信由于单片机发展已经很久,价格便宜,优点:可根据不同环境配不同单片机,DSP如内部带有乘法器,累加器,采用流水线目前市场上的美国德州仪器公司还有MotorolaAD市场上推出专门用于如:National其软件算法已在芯片内部用硬件电路实现,使数字信号处理技术已经成熟DSP。
现代信号处理大型作业一.试用奇阶互补法设计两带滤波器组(高、低通互补),进而实现四带滤波器组;并画出其频响。
滤波器设计参数为:F p =1.7KHz , F r =2.3KHz , F s =8KHz , A rmin ≥70dB 。
(一)、分析与通常的滤波器相比,互补滤波器具有优良的结构特性和结构特性,具有较低的噪声能量和系数敏感性,其定义如下:一组滤波器H 12(),(),.......()Z H Z H Z n 如果满足下式:He Kjw k n(),==∑110<w<2π 则称这组滤波器为幅度互补滤波器;如果满足下式:He kjw k n()=∑=121, 0<w<2π则称这组滤波器为功率互补滤波器,同时互补滤波器还应该满足:Hz A z kk n()()=∑=1其中A(z)为全通函数,适当的选择全通函数,可以使两带函数具有所需要的低通和高通特性。
(二)、设计步骤(1) 对Fp 、Fr 进行预畸);();(''FsFrtg FsFptg r p ∏=Ω∏=Ω(2) 计算'''*r p c ΩΩ=Ω,判断'c Ω是否等于1,即该互补滤波器是否为互补镜像滤波器(3) 计算相关系数⎪⎩⎪⎨⎧-==+++=+-=-=ΩΩ=--=偶数)N 为(;21奇数)N 为 (;;lg /)16/1lg(;150152;1121;1;;])110)(110[(1213090500''02'''211-min1.0min1.0i i u q k N q q q q q k k q k k k k rp Ar Ap;)2cos()1(21))12(sin()1(21)1(21'2∑∑∞=∞=+-++-=Ωm mm m m m m i u Nm q u Nm q q ππ;42⎥⎦⎤⎢⎣⎡=N N;221N N N -⎥⎦⎤⎢⎣⎡=;)/1)(1(2'2'k k v i i i Ω-Ω-=12'1212,1;12N i v i i i =Ω+=--α 22'22,1;12N i v iii =Ω+=β (4) 互补镜像滤波器的数字实现;22i ii A αα+-=;22iii B ββ+-=1221,1;1)(N i ZA Z A Z H i i i =++=∏--22212,1;1)(N i ZB Z B Z Z H i i i =++=∏--- )];()([21)(21Z H Z H Z H L +=(三)、程序与结果 1. 二带滤波器组 (1) 源程序: clear; clf;Fp=1700;Fr=2300;Fs=8000; Wp=tan(pi*Fp/Fs); Wr=tan(pi*Fr/Fs); Wc=sqrt(Wp*Wr); k=Wp/Wr;k1=sqrt(sqrt(1-k^2)); q0=0.5*(1-k1)/(1+k1);q=q0+2*q0^5+15*q0^9+150*q0^13; N=11;N2=fix(N/4); M=fix(N/2); N1=M-N2; for jj=1:M a=0;for m=0:5a=a+(-1)^m*q^(m*(m+1))*sin((2*m+1)*pi*jj/N);%N is odd, u=j end ab=0;for m=1:5b=b+(-1)^m*q^(m^2)*cos(2*m*pi*jj/N); end bW(jj)=2*q^0.25*a/(1+2*b);V(jj)=sqrt((1-k*W(jj)^2)*(1-W(jj)^2/k)); endfor i=1:N1alpha(i)=2*V(2*i-1)/(1+W(2*i-1)^2); endfor i=1:N2beta(i)=2*V(2*i)/(1+W(2*i)^2); endfor i=1:N1a(i)=(1-alpha(i)*Wc+Wc^2)/(1+alpha(i)*Wc+Wc^2); endfor i=1:N2b(i)=(1-beta(i)*Wc+Wc^2)/(1+beta(i)*Wc+Wc^2); endw=0:0.0001:0.5;LP=zeros(size(w));HP=zeros(size(w));for n=1:length(w)z=exp(j*w(n)*2*pi);H1=1;for i=1:N1H1=H1*(a(i)+z^(-2))/(1+a(i)*z^(-2)) ;endH2=1/z;for i=1:N2H2=H2*(b(i)+z^(-2))/(1+b(i)*z^(-2));endLP(n)=abs((H1+H2)/2);HP(n)=abs((H1-H2)/2);endplot(w,LP,'b',w,HP,'r');hold on;xlabel('digital frequency');ylabel('amptitude');(2)运行结果:见图1图1 二带数字滤波器组2.四带滤波器组(1)源程序:clf;Fp=1700;Fr=2300;Fs=8000;Wp=tan(pi*Fp/Fs);Wr=tan(pi*Fr/Fs);Wc=sqrt(Wp*Wr);k=Wp/Wr;k1=sqrt(sqrt(1-k^2));q0=0.5*(1-k1)/(1+k1);q=q0+2*q0^5+15*q0^9+150*q0^13;N=11;N2=fix(N/4);M=fix(N/2);N1=M-N2;for jj=1:Ma=0;for m=0:5a=a+(-1)^m*q^(m*(m+1))*sin((2*m+1)*pi*jj/N); % N is odd, u=jendb=0;for m=1:5b=b+(-1)^m*q^(m^2)*cos(2*m*pi*jj/N);endW(jj)=2*q^0.25*a/(1+2*b);V(jj)=sqrt((1-k*W(jj)^2)*(1-W(jj)^2/k));Endfor i=1:N1alpha(i)=2*V(2*i-1)/(1+W(2*i-1)^2);endfor i=1:N2beta(i)=2*V(2*i)/(1+W(2*i)^2);endfor i=1:N1a(i)=(1-alpha(i)*Wc+Wc^2)/(1+alpha(i)*Wc+Wc^2);endfor i=1:N2b(i)=(1-beta(i)*Wc+Wc^2)/(1+beta(i)*Wc+Wc^2);endw=0:0.0001:0.5;LLP=zeros(size(w));LHP=zeros(size(w));HLP=zeros(size(w));HHP=zeros(size(w));for n=1:length(w)z=exp(j*w(n)*2*pi);H1=1;for i=1:N1H1=H1*(a(i)+z^(-2))/(1+a(i)*z^(-2)) ;endH21=1;for i=1:N1H21=H21*(a(i)+z^(-4))/(1+a(i)*z^(-4)) ;H2=1/z;for i=1:N2H2=H2*(b(i)+z^(-2))/(1+b(i)*z^(-2));endH22=1/(z^2);for i=1:N2H22=H22*(b(i)+z^(-4))/(1+b(i)*z^(-4));endLP=((H1+H2)/2);HP=((H1-H2)/2);LLP(n)=abs((H21+H22)/2*LP);LHP(n)=abs((H21-H22)/2*LP);HHP(n)=abs((H21+H22)/2*HP);HLP(n)=abs((H21-H22)/2*HP);endplot(w,LLP,'b',w,LHP,'r',w,HLP,'k',w,HHP,'m')hold onxlabel('digital frequency');ylabel('amptitude');(2)运行结果:见图2图2 四带数字滤波器组二、根据《现代数字信号处理》第四章提供的数据,试用如下方法估计其功率谱,并画出不同参数情况下的功率谱曲线:1)Levison算法2)Burg算法3) ARMA 模型法 4) MUSIC 算法 1 Levinson 算法Levinson 算法用于求解Yule-Walker 方程,是一种按阶次进行递推的算法,即首先以AR (0)和AR (1)模型参数作为初始条件,计算AR (2)模型参数;然后根据这些参数计算AR (3)参数,等等,一直到计算出AR (p )模型参数为止,需要的运算量数量级为2p ,其中p 为AR 模型的阶数。