logo资料库

JULIUSO. SMITHIII《INTRODUCTION TO DIGITAL FILTERS WITH AUDIO APPLICATIONS》.doc

第1页 / 共481页
第2页 / 共481页
第3页 / 共481页
第4页 / 共481页
第5页 / 共481页
第6页 / 共481页
第7页 / 共481页
第8页 / 共481页
资料共481页,剩余部分请下载后查看
Preface
Outline
Book Series Overview
Acknowledgments
Errata
Chapter 1 The Simplest Lowpass Filter
1.1Introduction
1.1.1What is a Filter?
1.1.2Why learn about filters?
1.2The Simplest Lowpass Filter
1.2.1Definition of the Simplest Low-Pass
1.3Finding the Frequency Response
1.3.1Sine-Wave Analysis
1.3.2Mathematical Sine-Wave Analysis
1.3.3Amplitude Response
1.3.4Phase Response
1.4An Easier Way
1.4.1Complex Sinusoids
1.4.2Complex Amplitude
1.4.3Phasor Notation
1.4.4Complex Sinusoids as Circular Motion
1.4.5Rederiving the Frequency Response
1.5Summary
Chapter 2 Matlab Analysis of the Simplest Lowpass Filter
2.1Matlab Filter Implementation
2.2Simulated Sine-Wave Analysis in Matlab
2.3Complex Sine-Wave Analysis
2.4Practical Frequency-Response Analysis
Chapter 3 Analysis of a Digital Comb Filter
3.1Difference Equation
3.2Signal Flow Graph
3.3Software Implementation in Matlab
3.3.1Sample-Level Implementation in Matlab
3.4Software Implementation in C++
3.5Software Implementation in Faust
3.6Impulse Response
3.7Transfer Function
3.8Frequency Response
3.9Amplitude Response
3.10Phase Response
3.11Pole-Zero Analysis
3.12Alternative Realizations
3.12.1First-Order Parallel Sections
3.12.2Parallel, Real, Second-Order Sections
3.12.3Parallel Second-Order Signal Flow Graph
3.12.4Series, Real, Second-Order Sections
3.13Summary
Chapter 4 Linear Time-Invariant Digital Filters
4.1Definition of a Signal
4.2Definition of a Filter
4.3Examples of Digital Filters
4.3.1Scaling:
4.3.2Superposition:
4.3.3Real Linear Filtering of Complex Signals
4.4Time-Invariant Filters
4.5Showing Linearity and Time Invariance, or Not
4.6Nonlinear Filter Example: Dynamic Range Compressio
4.6.1Why Dynamic Range Compression is Nonlinear
4.7A Musical Time-Varying Filter Example
4.8Analysis of Nonlinear Filters
4.9Conclusions
Chapter 5 Time Domain Digital Filter Representations
5.1Difference Equation
5.2Signal Flow Graph
5.3Causal Recursive Filters
5.4Filter Order
5.5Direct-Form-I Implementation
5.6Impulse-Response Representation
5.7Filter Stability
5.8Impulse Response Example
5.9Implications of Linear-Time-Invariance
5.10Convolution Representation
5.10.1Convolution Representation Summary
5.11Finite Impulse Response Digital Filters
5.11.1FIR impulse response
5.11.2Convolution Representation of FIR Filters
5.11.3The ``Finite'' in FIR
5.11.4Causal FIR Filters
5.11.5FIR Transfer Function
5.11.6FIR Order
5.11.7FIR Software Implementations
5.12Transient Response, Steady State, and Decay
5.12.1FIR Example
5.12.2IIR Example
5.12.3Transient and Steady-State Signals
5.12.4Decay Response, Initial Conditions Response
5.12.5Complete Response
5.13Summary and Conclusions
5.14Time Domain Representation Problems
Chapter 6 Transfer Function Analysis
6.1The Z Transform
6.2Existence of the Z Transform
6.3Shift and Convolution Theorems
6.3.1Shift Theorem
6.3.2Convolution Theorem
6.4Z Transform of Convolution
6.5Z Transform of Difference Equations
6.6Factored Form
6.7Series and Parallel Transfer Functions
6.7.1Series Case
6.7.2Parallel Case
6.7.2.1Series Combination is Commutative
6.8Partial Fraction Expansion
6.8.1Example
6.8.2Complex Example
6.8.3PFE to Real, Second-Order Sections
6.8.4Inverting the Z Transform
6.8.5FIR Part of a PFE
6.8.5.1Example: The General Biquad PFE
6.8.6Alternate PFE Methods
6.8.7Repeated Poles
6.8.7.1Dealing with Repeated Poles Analytically
6.8.7.2Example
6.8.7.3Impulse Response of Repeated Poles
6.8.7.4So What's Up with Repeated Poles?
6.8.8Alternate Stability Criterion
6.8.9Summary of the Partial Fraction Expansion
6.8.10Software for Partial Fraction Expansion
6.8.10.1Example 2
6.8.10.2Polynomial Multiplication in Matlab
6.8.10.3Polynomial Division in Matlab
6.9Problems
Chapter 7 Frequency Response Analysis
7.1Frequency Response
7.2Amplitude Response
7.3Phase Response
7.4Polar Form of the Frequency Response
7.4.1Separating the Transfer Function Numerator and Den
7.5Frequency Response as a Ratio of DTFTs
7.5.1Frequency Response in Matlab
7.5.2Example LPF Frequency Response Using freqz
7.6Phase and Group Delay
7.6.1Phase Delay
7.6.2Phase Unwrapping
7.6.3Group Delay
7.6.3.1Derivation of Group Delay as Modulation Delay
7.6.4Group Delay Examples in Matlab
7.6.5Vocoder Analysis
7.6.6Numerical Computation of Group Delay
7.7Frequency Response Analysis Problems
Chapter 8 Pole-Zero Analysis
8.1Filter Order = Transfer Function Order
8.2Graphical Computation of Amplitude Response from P
8.3Graphical Phase Response Calculation
8.4Stability Revisited
8.4.1Computing Reflection Coefficients to Check Filter
8.4.2Step-Down Procedure
8.4.3Testing Filter Stability in Matlab
8.5Bandwidth of One Pole
8.6Time Constant of One Pole
8.7Unstable Poles--Unit Circle Viewpoint
8.7.1Geometric Series
8.7.2One-Pole Transfer Functions
8.8Poles and Zeros of the Cepstrum
8.9Conversion to Minimum Phase
8.10Hilbert Transform Relations
8.11Pole-Zero Analysis Problems
Chapter 9 Implementation Structures for Recursive Digital Fi
9.1The Four Direct Forms
9.1.1Direct-Form I
9.1.1.1Two's Complement Wrap-Around
9.1.2Direct Form II
9.1.2.1More about Potential Internal Overflow of DF-II
9.1.3Transposed Direct-Forms
9.1.4Numerical Robustness of TDF-II
9.2Series and Parallel Filter Sections
9.2.1Series Second-Order Sections
9.2.1.1Matlab Example
9.2.2Parallel First and/or Second-Order Sections
9.2.2.1First-Order Complex Resonators
9.2.2.2Real Second-Order Sections
9.2.2.3Implementation of Repeated Poles
9.2.3Formant Filtering Example
9.2.4Butterworth Lowpass Filter Example
9.2.5Summary of Series/Parallel Filter Sections
9.3Pole-Zero Analysis Problems
Chapter 10 Filters Preserving Phase
10.1Linear-Phase Filters (Symmetric Impulse Responses)
10.2Zero-Phase Filters (Even Impulse Responses)
10.2.1-Phase Filters
10.2.2Phase in the Stopband
10.2.3Example Zero-Phase Filter Design
10.2.4Elementary Zero-Phase Filter Examples
10.3Odd Impulse Reponses
10.4Symmetric Linear-Phase Filters
10.4.1Simple Linear-Phase Filter Examples
10.4.2Software for Linear-Phase Filter Design
10.5Antisymmetric Linear-Phase Filters
10.6Forward-Backward Filtering
10.7Phase Distortion at Passband Edges
Chapter 11 Minimum-Phase Filters
11.1Definition of Minimum Phase Filters
11.2Minimum-Phase Polynomials
11.3Maximum Phase Filters
11.3.1Example
11.4Minimum Phase Means Fastest Decay
11.5Minimum-Phase/Allpass Decomposition
11.6Is Linear Phase Really Ideal for Audio?
11.7Creating Minimum Phase Filters and Signals
Chapter 12 Conclusion
Chapter 1 Background Fundamentals
1.1 Signal Representation and Notation
1.1.1 Units
1.1.2 Sinusoids
1.1.3 Spectrum
1.2 Complex and Trigonometric Identities
1.2.1 Complex Numbers
1.2.2 The Exponential Function
1.2.3 Trigonometric Identities
1.2.3.1Trigonometric Identities, Continued
1.2.4 Half-Angle Tangent Identities
1.3 A Sum of Sinusoids at the Same Frequency is Anothe
1.3.1 Proof Using Trigonometry
1.3.2 Proof Using Complex Variables
1.3.3 Phasor Analysis: Factoring a Complex Sinusoid into
Chapter 2 Elementary Audio Digital Filters
2.1 Elementary Filter Sections
2.1.1 One-Zero
2.1.2 One-Pole
2.1.3 Two-Pole
2.1.3.1Resonator Bandwidth in Terms of Pole Radius
2.1.4 Two-Zero
2.1.5 Complex Resonator
2.1.5.1Two-Pole Partial Fraction Expansion
2.1.6 The BiQuad Section
2.1.7 Biquad Software Implementations
2.2 Allpass Filter Sections
2.2.1 The Biquad Allpass Section
2.2.2 Allpass Filter Design
2.3 DC Blocker
2.3.1 DC Blocker Frequency Response
2.3.2 DC Blocker Software Implementations
2.4 Low and High Shelving Filters
2.4.1 Exercise
2.5 Peaking Equalizers
2.6 Time-Varying Two-Pole Filters
2.6.1 Normalizing Two-Pole Filter Gain at Resonance
2.6.2 Constant Resonance Gain
2.6.3 Peak Gain Versus Resonance Gain
2.6.4 Constant Peak-Gain Resonator
2.6.5 Four-Pole Tunable Lowpass/Bandpass Filters
2.7 Elementary Filter Problems
Chapter 3 Allpass Filters
3.1 Allpass Examples
3.2 Paraunitary FiltersC.4
3.3 Multi-Input, Multi-Output (MIMO) Allpass Filters
3.3.1 Paraunitary MIMO Filters
3.3.1.1MIMO Paraconjugate
3.3.1.2MIMO Paraunitary Condition
3.3.1.3Properties of Paraunitary Systems
3.3.1.4Properties of Paraunitary Filter Banks
3.3.2 Paraunitary Filter Examples
3.4 Allpass Problems
Chapter 4 Introduction to Laplace Transform Analysis
4.1 Existence of the Laplace Transform
4.2 Analytic Continuation
4.3 Relation to the z Transform
4.4 Laplace Transform Theorems
4.4.1 Linearity
4.4.2 Differentiation
4.5 Laplace Analysis of Linear Systems
4.5.1 Moving Mass
4.5.2 Mass-Spring Oscillator Analysis
Chapter 5 Analog Filters
5.1 Example Analog Filter
5.2 Capacitors
5.2.1 Mechanical Equivalent of a Capacitor is a Spring
5.3 Inductors
5.3.1 Mechanical Equivalent of an Inductor is a Mass
5.4 RC Filter Analysis
5.4.1 Driving Point Impedance
5.4.2 Transfer Function
5.4.3 Impulse Response
5.4.4 The Continuous-Time Impulse
5.4.5 Poles and Zeros
5.5 RLC Filter Analysis
5.5.1 Driving Point Impedance
5.5.2 Transfer Function
5.5.3 Poles and Zeros
5.5.4 Impulse Response
5.6 Relating Pole Radius to Bandwidth
5.7 Quality Factor (Q)
5.7.1 Decay Time is Q Periods
5.7.2 Q as Energy Stored over Energy Dissipated
5.8 Analog Allpass Filters
5.8.1 Lossless Analog Filters
Chapter 6 Matrix Filter Representations
6.1 Introduction
6.2 General Causal Linear Filter Matrix
6.3 General LTI Filter Matrix
6.4 Cyclic Convolution Matrix
6.5 Inverse Filters
6.6 State Space Realization
6.6.1 State Space Filter Realization Example
6.7 Time Domain Filter Estimation
6.7.1 Effect of Measurement Noise
6.7.2 Matlab System Identification Example
Chapter 7 State Space Filters
7.1 Markov Parameters
7.2 Response from Initial Conditions
7.3 Complete Response
7.4 Transfer Function of a State Space Filter
7.4.1 Example State Space Filter Transfer Function
7.5 Transposition of a State Space Filter
7.6 Poles of a State Space Filter
7.7 Difference Equations to State Space
7.7.1 Converting to State-Space Form by Hand
7.7.2 Converting Signal Flow Graphs to State-Space Form
7.7.3 Controllability and Observability
7.7.4 A Short-Cut to Controller Canonical Form
7.7.5 Matlab Direct-Form to State-Space Conversion
7.7.6 State Space Simulation in Matlab
7.7.7 Other Relevant Matlab Functions
7.7.8 Matlab State-Space Filter Conversion Example
7.8 Similarity Transformations
7.9 Modal Representation
7.9.1 Diagonalizing a State-Space Model
7.9.2 Finding the Eigenvalues of A in Practice
7.9.3 Example of State-Space Diagonalization
7.9.4 Properties of the Modal Representation
7.10 Repeated Poles
7.10.1 Jordan Canonical Form
7.11 State-Space Analysis Example: The Digital Waveguid
7.11.1 Finding the Eigenstructure of A
7.11.2 Choice of Output Signal and Initial Conditions
7.12 References
7.13 State Space Problems
Chapter 8 A View of Linear Time Varying Digital Filters
8.1 Introduction
8.2 Derivation
8.3 Summary
Chapter 9 Recursive Digital Filter Design
9.1 Lowpass Filter Design
9.2 Butterworth Lowpass Design
9.2.1 Butterworth Lowpass Poles and Zeros
9.2.2 Example: Second-Order Butterworth Lowpass
9.3 Digitizing Analog Filters with the Bilinear Transf
9.3.1 Bilinear Transformation
9.3.2 Frequency Warping
9.3.3 Analog Prototype Filter
9.3.4 Examples
9.4 Filter Design by Minimizing the L2 Equation-Error
9.4.1 Equation Error Formulation
9.4.2 Error Weighting and Frequency Warping
9.4.3 Stability of Equation Error Designs
9.4.4 An FFT-Based Equation-Error Method
9.4.5 Prony's Method
9.4.6 The Padé-Prony Method
Chapter 10 Matlab Utilities
10.1 Time Plots: myplot.m
10.2 Frequency Plots: freqplot.m
10.3 Saving Plots to Disk: saveplot.m
10.4 Frequency Response Plots: plotfr.m
10.5 Partial Fraction Expansion: residuez.m
10.5.1 Method
10.5.2 Example with Repeated Poles
10.6 Partial Fraction Expansion: residued.m
10.6.1 Method
10.7 Parallel SOS to Transfer Function: psos2tf.m
10.8 Group Delay Computation: grpdelay.m
10.9 Matlab listing: fold.m
10.10 Matlab listing: clipdb.m
10.11 Matlab listing: mps.m and test program
10.11.1 Matlab listing: mps.m
10.11.2 Matlab listing: tmps.m
10.11.3 Matlab diary: tmps.d
10.12 Signal Plots: swanalplot.m
10.13 Frequency Response Plot: swanalmainplot.m
Chapter 11 Digital Filtering in Faust and PD
11.1 A Simple Faust Program
11.2 Generating Faust Block Diagrams
11.3 Testing a Faust Filter Section
11.4 A Look at the Generated C++ code
11.5 Generating a Pure Data (PD) Plugin
11.5.1 Generating the PD Plugin
11.5.2 Generating a PD Plugin-Wrapper Abstraction
11.5.3 A PD Test Patch for the Plugin Wrapper
11.6 Generating a LADSPA Plugin via Faust
11.7 Generating a VST Plugin via Faust
11.7.1 Bypassing Windows
11.8 Generating a MIDI Synthesizer for PD
11.9 MIDI Synthesizer Test Patch
Links to Online Resources
Bibliography
INTRODUCTION TO DIGITAL FILTERS WITH AUDIO APPLICATIONS JULIUSO. SMITHIII Center for Computer Research in Music and Acoustics (CCRMA) Department of Music, Stanford University, Stanford, California 94305 USA 1
Preface..................................................................................................................................................... 11 Outline .............................................................................................................................................11 Book Series Overview.................................................................................................................... 12 Acknowledgments...........................................................................................................................13 Errata 14 1.2 1.3 1.4 Chapter 1 1.1 1.5 Chapter 2 The Simplest Lowpass Filter ........................................................................................... 15 Introduction..........................................................................................................................15 1.1.1 What is a Filter? .......................................................................................................... 15 1.1.2 Why learn about filters? ..............................................................................................16 The Simplest Lowpass Filter ............................................................................................... 16 1.2.1 Definition of the Simplest Low-Pass.......................................................................... 17 Finding the Frequency Response .........................................................................................21 1.3.1 Sine-Wave Analysis.....................................................................................................21 1.3.2 Mathematical Sine-Wave Analysis ..............................................................................23 1.3.3 Amplitude Response ................................................................................................... 28 1.3.4 Phase Response ........................................................................................................... 29 An Easier Way......................................................................................................................30 1.4.1 Complex Sinusoids......................................................................................................31 1.4.2 Complex Amplitude .................................................................................................... 32 1.4.3 Phasor Notation...........................................................................................................32 1.4.4 Complex Sinusoids as Circular Motion...................................................................... 33 1.4.5 Rederiving the Frequency Response ...........................................................................35 Summary..............................................................................................................................38 Matlab Analysis of the Simplest Lowpass Filter ............................................................. 39 2.1 Matlab Filter Implementation.............................................................................................. 40 Simulated Sine-Wave Analysis in Matlab............................................................................44 2.2 Complex Sine-Wave Analysis ..............................................................................................52 2.3 Practical Frequency-Response Analysis.............................................................................. 55 2.4 Chapter 3 Analysis of a Digital Comb Filter ....................................................................................59 Difference Equation ............................................................................................................. 59 3.1 Signal Flow Graph............................................................................................................... 60 3.2 3.3 Software Implementation in Matlab .................................................................................... 60 3.3.1 Sample-Level Implementation in Matlab ....................................................................61 Software Implementation in C++ .........................................................................................63 3.4 Software Implementation in Faust .......................................................................................65 3.5 Impulse Response ................................................................................................................ 68 3.6 Transfer Function .................................................................................................................70 3.7 Frequency Response ............................................................................................................ 71 3.8 3.9 Amplitude Response ............................................................................................................ 73 3.10 Phase Response ....................................................................................................................74 3.11 Pole-Zero Analysis.............................................................................................................. 75 3.12 Alternative Realizations...................................................................................................... 77 3.12.1 First-Order Parallel Sections .......................................................................................78 2
4.4 4.5 4.6 Chapter 4 4.1 4.2 4.3 3.12.2 Parallel, Real, Second-Order Sections........................................................................ 85 3.12.3 Parallel Second-Order Signal Flow Graph..................................................................88 3.12.4 Series, Real, Second-Order Sections ...........................................................................90 3.13 Summary..............................................................................................................................90 Linear Time-Invariant Digital Filters ...............................................................................91 Definition of a Signal...........................................................................................................91 Definition of a Filter ............................................................................................................ 93 Examples of Digital Filters.................................................................................................. 94 4.3.1 Scaling: ........................................................................................................................96 4.3.2 Superposition:............................................................................................................. 96 4.3.3 Real Linear Filtering of Complex Signals .................................................................. 98 Time-Invariant Filters.......................................................................................................... 98 Showing Linearity and Time Invariance, or Not..................................................................99 Nonlinear Filter Example: Dynamic Range Compression .................................................102 4.6.1 Why Dynamic Range Compression is Nonlinear ..................................................... 102 A Musical Time-Varying Filter Example ...........................................................................103 4.7 Analysis of Nonlinear Filters............................................................................................. 104 4.8 Conclusions........................................................................................................................105 4.9 Time Domain Digital Filter Representations................................................................. 106 Chapter 5 Difference Equation ........................................................................................................... 106 5.1 Signal Flow Graph............................................................................................................. 107 5.2 Causal Recursive Filters.................................................................................................... 108 5.3 Filter Order.........................................................................................................................109 5.4 Direct-Form-I Implementation ...........................................................................................109 5.5 Impulse-Response Representation ..................................................................................... 109 5.6 Filter Stability .....................................................................................................................110 5.7 Impulse Response Example ............................................................................................... 111 5.8 5.9 Implications of Linear-Time-Invariance ............................................................................ 111 5.10 Convolution Representation.............................................................................................. 114 5.10.1 Convolution Representation Summary ..................................................................... 118 5.11 Finite Impulse Response Digital Filters ............................................................................ 118 5.11.1 FIR impulse response ................................................................................................ 119 5.11.2 Convolution Representation of FIR Filters............................................................... 119 5.11.3 The ``Finite'' in FIR...................................................................................................120 5.11.4 Causal FIR Filters..................................................................................................... 120 5.11.5 FIR Transfer Function ...............................................................................................121 5.11.6 FIR Order.................................................................................................................. 121 5.11.7 FIR Software Implementations ................................................................................. 121 5.12 Transient Response, Steady State, and Decay................................................................... 123 5.12.1 FIR Example ............................................................................................................. 125 5.12.2 IIR Example .............................................................................................................. 126 5.12.3 Transient and Steady-State Signals........................................................................... 128 5.12.4 Decay Response, Initial Conditions Response ..........................................................129 5.12.5 Complete Response ...................................................................................................129 3
Chapter 6 6.1 6.2 6.3 6.9 Chapter 7 7.1 7.2 7.3 7.4 7.5 6.8 6.4 6.5 6.6 6.7 5.13 Summary and Conclusions ................................................................................................ 130 5.14 Time Domain Representation Problems ............................................................................130 Transfer Function Analysis ............................................................................................ 131 The Z Transform................................................................................................................ 131 Existence of the Z Transform.............................................................................................133 Shift and Convolution Theorems....................................................................................... 134 6.3.1 Shift Theorem ............................................................................................................134 6.3.2 Convolution Theorem............................................................................................... 135 Z Transform of Convolution.............................................................................................. 136 Z Transform of Difference Equations................................................................................ 137 Factored Form....................................................................................................................138 Series and Parallel Transfer Functions ...............................................................................139 6.7.1 Series Case ................................................................................................................ 139 6.7.2 Parallel Case ..............................................................................................................140 6.7.2.1 Series Combination is Commutative........................................................................... 140 Partial Fraction Expansion.................................................................................................141 6.8.1 Example.....................................................................................................................142 6.8.2 Complex Example .....................................................................................................143 6.8.3 PFE to Real, Second-Order Sections ........................................................................ 144 6.8.4 Inverting the Z Transform ......................................................................................... 145 6.8.5 FIR Part of a PFE ...................................................................................................... 146 6.8.5.1 Example: The General Biquad PFE............................................................................148 6.8.6 Alternate PFE Methods............................................................................................. 149 6.8.7 Repeated Poles.......................................................................................................... 150 6.8.7.1 Dealing with Repeated Poles Analytically...................................................................150 6.8.7.2 Example..........................................................................................................................151 6.8.7.3 Impulse Response of Repeated Poles...........................................................................151 6.8.7.4 So What's Up with Repeated Poles?............................................................................153 6.8.8 Alternate Stability Criterion......................................................................................155 6.8.9 Summary of the Partial Fraction Expansion............................................................. 155 6.8.10 Software for Partial Fraction Expansion ................................................................... 157 6.8.10.1 Example 2..................................................................................................................158 6.8.10.2 Polynomial Multiplication in Matlab..................................................................... 160 6.8.10.3 Polynomial Division in Matlab................................................................................160 Problems............................................................................................................................ 161 Frequency Response Analysis........................................................................................163 Frequency Response .......................................................................................................... 163 Amplitude Response .......................................................................................................... 165 Phase Response ..................................................................................................................166 Polar Form of the Frequency Response ............................................................................. 166 7.4.1 Separating the Transfer Function Numerator and Denominator ............................... 167 Frequency Response as a Ratio of DTFTs......................................................................... 168 7.5.1 Frequency Response in Matlab................................................................................. 169 7.5.2 Example LPF Frequency Response Using freqz .......................................................172 4
7.7 Chapter 8 8.1 8.2 8.3 8.4 Chapter 9 9.1 9.2 7.6 8.5 8.6 8.7 Phase and Group Delay......................................................................................................175 7.6.1 Phase Delay ...............................................................................................................176 7.6.2 Phase Unwrapping .................................................................................................... 177 7.6.3 Group Delay.............................................................................................................. 179 7.6.3.1 Derivation of Group Delay as Modulation Delay.......................................................180 7.6.4 Group Delay Examples in Matlab.............................................................................182 7.6.5 Vocoder Analysis.......................................................................................................185 7.6.6 Numerical Computation of Group Delay..................................................................186 Frequency Response Analysis Problems ........................................................................... 190 Pole-Zero Analysis.........................................................................................................191 Filter Order = Transfer Function Order............................................................................. 192 Graphical Computation of Amplitude Response from Poles and Zeros............................ 193 Graphical Phase Response Calculation ..............................................................................196 Stability Revisited ..............................................................................................................198 8.4.1 Computing Reflection Coefficients to Check Filter Stability ................................... 199 8.4.2 Step-Down Procedure............................................................................................... 200 8.4.3 Testing Filter Stability in Matlab .............................................................................. 201 Bandwidth of One Pole......................................................................................................204 Time Constant of One Pole................................................................................................204 Unstable Poles--Unit Circle Viewpoint..............................................................................205 8.7.1 Geometric Series....................................................................................................... 206 8.7.2 One-Pole Transfer Functions .....................................................................................206 Poles and Zeros of the Cepstrum ....................................................................................... 207 8.8 8.9 Conversion to Minimum Phase ..........................................................................................210 8.10 Hilbert Transform Relations.............................................................................................. 211 8.11 Pole-Zero Analysis Problems............................................................................................ 211 Implementation Structures for Recursive Digital Filters ............................................... 212 The Four Direct Forms .......................................................................................................212 9.1.1 Direct-Form I ............................................................................................................ 212 9.1.1.1 Two's Complement Wrap-Around .............................................................................. 214 9.1.2 Direct Form II........................................................................................................... 215 9.1.2.1 More about Potential Internal Overflow of DF-II..................................................... 216 9.1.3 Transposed Direct-Forms..........................................................................................216 9.1.4 Numerical Robustness of TDF-II..............................................................................218 Series and Parallel Filter Sections ......................................................................................218 9.2.1 Series Second-Order Sections ...................................................................................218 9.2.1.1 Matlab Example............................................................................................................ 219 9.2.2 Parallel First and/or Second-Order Sections ............................................................. 220 9.2.2.1 First-Order Complex Resonators................................................................................ 221 9.2.2.2 Real Second-Order Sections.........................................................................................221 9.2.2.3 Implementation of Repeated Poles.............................................................................. 222 9.2.3 Formant Filtering Example ....................................................................................... 223 9.2.4 Butterworth Lowpass Filter Example ....................................................................... 227 9.2.5 Summary of Series/Parallel Filter Sections...............................................................229 5
9.3 Chapter 10 Pole-Zero Analysis Problems .............................................................................................229 Filters Preserving Phase .................................................................................................230 10.1 Linear-Phase Filters (Symmetric Impulse Responses) ......................................................230 10.2 Zero-Phase Filters (Even Impulse Responses) ............................................................... 231 -Phase Filters.........................................................................................................232 10.2.1 10.2.2 Phase in the Stopband.......................................................................................... 232 10.2.3 Example Zero-Phase Filter Design........................................................................... 232 10.2.4 Elementary Zero-Phase Filter Examples ...................................................................234 10.3 Odd Impulse Reponses ...................................................................................................... 235 10.4 Symmetric Linear-Phase Filters ........................................................................................ 236 10.4.1 Simple Linear-Phase Filter Examples.......................................................................237 10.4.2 Software for Linear-Phase Filter Design...................................................................238 10.5 Antisymmetric Linear-Phase Filters ..................................................................................238 10.6 Forward-Backward Filtering ............................................................................................. 238 10.7 Phase Distortion at Passband Edges.................................................................................. 240 Chapter 11 Minimum-Phase Filters ..................................................................................................242 11.1 Definition of Minimum Phase Filters................................................................................242 11.2 Minimum-Phase Polynomials ............................................................................................242 11.3 Maximum Phase Filters .....................................................................................................243 11.3.1 Example.....................................................................................................................244 11.4 Minimum Phase Means Fastest Decay..............................................................................245 11.5 Minimum-Phase/Allpass Decomposition ..........................................................................245 11.6 Is Linear Phase Really Ideal for Audio?............................................................................246 11.7 Creating Minimum Phase Filters and Signals ................................................................... 250 Conclusion..................................................................................................................... 252 Background Fundamentals.............................................................................................253 Signal Representation and Notation...................................................................................253 1.1.1 Units.......................................................................................................................... 253 1.1.2 Sinusoids................................................................................................................... 254 1.1.3 Spectrum ................................................................................................................... 254 Complex and Trigonometric Identities.............................................................................. 255 1.2.1 Complex Numbers.................................................................................................... 256 1.2.2 The Exponential Function .........................................................................................257 1.2.3 Trigonometric Identities ............................................................................................258 1.2.3.1 Trigonometric Identities, Continued ........................................................................... 258 1.2.4 Half-Angle Tangent Identities...................................................................................259 A Sum of Sinusoids at the Same Frequency is Another Sinusoid at that Frequency.........259 1.3.1 Proof Using Trigonometry ........................................................................................ 260 1.3.2 Proof Using Complex Variables................................................................................261 1.3.3 Phasor Analysis: Factoring a Complex Sinusoid into Phasor Times Carrier............262 Elementary Audio Digital Filters................................................................................... 264 Elementary Filter Sections .................................................................................................264 2.1.1 One-Zero................................................................................................................... 264 2.1.2 One-Pole....................................................................................................................266 Chapter 12 Chapter 1 1.1 Chapter 2 2.1 1.2 1.3 6
2.2 2.3 2.4 2.5 2.6 2.1.3 Two-Pole................................................................................................................... 269 2.1.3.1 Resonator Bandwidth in Terms of Pole Radius..........................................................272 2.1.4 Two-Zero...................................................................................................................273 2.1.5 Complex Resonator ...................................................................................................275 2.1.5.1 Two-Pole Partial Fraction Expansion......................................................................... 277 2.1.6 The BiQuad Section.................................................................................................. 279 2.1.7 Biquad Software Implementations ............................................................................281 Allpass Filter Sections ....................................................................................................... 282 2.2.1 The Biquad Allpass Section ...................................................................................... 283 2.2.2 Allpass Filter Design .................................................................................................284 DC Blocker........................................................................................................................ 285 2.3.1 DC Blocker Frequency Response ............................................................................. 285 2.3.2 DC Blocker Software Implementations .................................................................... 289 Low and High Shelving Filters.......................................................................................... 290 2.4.1 Exercise ..................................................................................................................... 291 Peaking Equalizers.............................................................................................................291 Time-Varying Two-Pole Filters ..........................................................................................294 2.6.1 Normalizing Two-Pole Filter Gain at Resonance ......................................................298 2.6.2 Constant Resonance Gain......................................................................................... 299 2.6.3 Peak Gain Versus Resonance Gain............................................................................300 2.6.4 Constant Peak-Gain Resonator................................................................................. 302 2.6.5 Four-Pole Tunable Lowpass/Bandpass Filters .......................................................... 307 Elementary Filter Problems............................................................................................... 307 2.7 Allpass Filters................................................................................................................ 308 Chapter 3 Allpass Examples...............................................................................................................309 3.1 Paraunitary FiltersC.4.......................................................................................................... 311 3.2 3.3 Multi-Input, Multi-Output (MIMO) Allpass Filters ...........................................................312 3.3.1 Paraunitary MIMO Filters.........................................................................................314 3.3.1.1 MIMO Paraconjugate...................................................................................................314 3.3.1.2 MIMO Paraunitary Condition .....................................................................................314 3.3.1.3 Properties of Paraunitary Systems .............................................................................. 315 3.3.1.4 Properties of Paraunitary Filter Banks .......................................................................315 3.3.2 Paraunitary Filter Examples......................................................................................317 Allpass Problems............................................................................................................... 318 Introduction to Laplace Transform Analysis ..................................................................319 Existence of the Laplace Transform...................................................................................320 Analytic Continuation ........................................................................................................320 Relation to the z Transform................................................................................................323 Laplace Transform Theorems............................................................................................ 324 4.4.1 Linearity .................................................................................................................... 324 4.4.2 Differentiation........................................................................................................... 325 Laplace Analysis of Linear Systems .................................................................................. 326 4.5.1 Moving Mass.............................................................................................................326 4.5.2 Mass-Spring Oscillator Analysis ...............................................................................328 3.4 Chapter 4 4.1 4.2 4.3 4.4 4.5 7
Chapter 5 5.1 5.2 5.3 5.4 5.5 5.8 5.6 5.7 Analog Filters.................................................................................................................331 Example Analog Filter ....................................................................................................... 331 Capacitors.......................................................................................................................... 332 5.2.1 Mechanical Equivalent of a Capacitor is a Spring.................................................... 333 Inductors............................................................................................................................ 333 5.3.1 Mechanical Equivalent of an Inductor is a Mass...................................................... 335 RC Filter Analysis ..............................................................................................................335 5.4.1 Driving Point Impedance .......................................................................................... 335 5.4.2 Transfer Function ...................................................................................................... 336 5.4.3 Impulse Response ......................................................................................................336 5.4.4 The Continuous-Time Impulse ..................................................................................337 5.4.5 Poles and Zeros......................................................................................................... 338 RLC Filter Analysis ........................................................................................................... 338 5.5.1 Driving Point Impedance .......................................................................................... 338 5.5.2 Transfer Function ...................................................................................................... 339 5.5.3 Poles and Zeros......................................................................................................... 339 5.5.4 Impulse Response ......................................................................................................339 Relating Pole Radius to Bandwidth................................................................................... 340 Quality Factor (Q)..............................................................................................................342 5.7.1 Decay Time is Q Periods...........................................................................................344 5.7.2 Q as Energy Stored over Energy Dissipated ............................................................. 346 Analog Allpass Filters........................................................................................................347 5.8.1 Lossless Analog Filters............................................................................................. 349 Matrix Filter Representations ........................................................................................ 352 Introduction........................................................................................................................352 General Causal Linear Filter Matrix.................................................................................. 352 General LTI Filter Matrix ...................................................................................................353 Cyclic Convolution Matrix................................................................................................ 355 Inverse Filters.....................................................................................................................357 State Space Realization......................................................................................................358 6.6.1 State Space Filter Realization Example .................................................................... 358 Time Domain Filter Estimation ......................................................................................... 360 6.7.1 Effect of Measurement Noise ....................................................................................362 6.7.2 Matlab System Identification Example .....................................................................363 State Space Filters ..........................................................................................................366 7.1 Markov Parameters............................................................................................................ 366 Response from Initial Conditions...................................................................................... 368 7.2 Complete Response ............................................................................................................368 7.3 7.4 Transfer Function of a State Space Filter ...........................................................................368 7.4.1 Example State Space Filter Transfer Function ..........................................................369 Transposition of a State Space Filter ................................................................................. 370 Poles of a State Space Filter...............................................................................................371 Difference Equations to State Space ..................................................................................372 7.7.1 Converting to State-Space Form by Hand ................................................................ 372 7.5 7.6 7.7 Chapter 6 6.1 6.2 6.3 6.4 6.5 6.6 6.7 Chapter 7 8
分享到:
收藏