https://ccrma.stanford.edu/~jos/filters/ Next | Index | JOS Index | JOS Pubs | JOS Home | Search --------------------------------------------------------------------- INTRODUCTION TO DIGITAL FILTERS WITH AUDIO APPLICATIONS JULIUS O. SMITH III Center for Computer Research in Music and Acoustics (CCRMA) --------------------------------------------------------------------- --------------------------------------------------------------------- * Preface + Outline + Book Series Overview + Acknowledgments + Errata * The Simplest Lowpass Filter + Introduction o What is a Filter? o Why learn about filters? + The Simplest Lowpass Filter o Definition of the Simplest Low-Pass + Finding the Frequency Response o Sine-Wave Analysis o Mathematical Sine-Wave Analysis o Amplitude Response o Phase Response + An Easier Way o Complex Sinusoids o Complex Amplitude o Phasor Notation o Complex Sinusoids as Circular Motion o Rederiving the Frequency Response + Summary + Elementary Filter Theory Problems * Matlab Filter Analysis + Matlab Filter Implementation + Matlab Sine-Wave Analysis + Complex Sine-Wave Analysis + Practical Frequency-Response Analysis + Elementary Matlab Problems * Analysis of a Digital Comb Filter + Difference Equation + Signal Flow Graph + Software Implementation in Matlab o Sample-Level Implementation in Matlab + Software Implementation in C++ + Software Implementation in Faust + Impulse Response + Transfer Function + Frequency Response + Amplitude Response + Phase Response + Pole-Zero Analysis + Alternative Realizations o First-Order Parallel Sections o Parallel, Real, Second-Order Sections o Parallel Second-Order Signal Flow Graph o Series, Real, Second-Order Sections + Summary * Linear Time-Invariant Filters + Definition of a Signal + Definition of a Filter + Examples of Digital Filters + Linear Filters o Scaling: o Superposition: o Real Linear Filtering of Complex Signals + Time-Invariant Filters + Showing Linearity and Time Invariance + Dynamic Range Compression o Why Dynamic Range Compression is Nonlinear + A Musical Time-Varying Filter Example + Analysis of Nonlinear Filters + Conclusions + Linearity and Time-Invariance Problems * Time Domain Representations + Difference Equation + Signal Flow Graph + Causal Recursive Filters + Filter Order + Direct-Form-I Implementation + Impulse-Response Representation + Filter Stability + Impulse Response Example + Implications of Linear-Time-Invariance + Convolution Representation o Convolution Representation Summary + FIR Digital Filters o FIR impulse response o Convolution Representation of FIR Filters o The ``Finite'' in FIR o Causal FIR Filters o FIR Transfer Function o FIR Order o FIR Software Implementations + Transient and Steady State Response o FIR Example o IIR Example o Transient and Steady-State Signals o Decay Response, Initial Conditions Response o Complete Response + Summary and Conclusions + Time Domain Representation Problems * Transfer Function Analysis + The Z Transform + Existence of the Z Transform + Shift and Convolution Theorems o Shift Theorem o Convolution Theorem + Z Transform of Convolution + Z Transform of Difference Equations + Factored Form + Series and Parallel Transfer Functions o Series Case o Parallel Case # Series Combination is Commutative + Partial Fraction Expansion o Example o Complex Example o PFE to Real, Second-Order Sections o Inverting the Z Transform o FIR Part of a PFE # Example: The General Biquad PFE o Alternate PFE Methods o Repeated Poles # Dealing with Repeated Poles Analytically # Example # Impulse Response of Repeated Poles # So What's Up with Repeated Poles? o Alternate Stability Criterion o Summary of the Partial Fraction Expansion o Software for Partial Fraction Expansion # Example 2 # Polynomial Multiplication in Matlab # Polynomial Division in Matlab + Problems * Frequency Response Analysis + Frequency Response + Amplitude Response + Phase Response + Polar Form of the Frequency Response o Separating the Transfer Function Numerator and Denominator + Frequency Response as a Ratio of DTFTs o Frequency Response in Matlab o Example LPF Frequency Response Using freqz + Phase and Group Delay o Phase Delay o Phase Unwrapping o Group Delay # Derivation of Group Delay as Modulation Delay o Group Delay Examples in Matlab o Vocoder Analysis o Numerical Computation of Group Delay + Frequency Response Analysis Problems * Pole-Zero Analysis + Filter Order = Transfer Function Order + Graphical Amplitude Response + Graphical Phase Response + Stability Revisited o Computing Reflection Coefficients o Step-Down Procedure o Testing Filter Stability in Matlab + Bandwidth of One Pole + Time Constant of One Pole + Unstable Poles--Unit Circle Viewpoint o Geometric Series o One-Pole Transfer Functions + Poles and Zeros of the Cepstrum + Conversion to Minimum Phase + Hilbert Transform Relations + Pole-Zero Analysis Problems * Implementation Structures + The Four Direct Forms o Direct-Form I # Two's Complement Wrap-Around o Direct Form II # More about Potential Internal Overflow of DF-II o Transposed Direct-Forms o Numerical Robustness of TDF-II + Series and Parallel Filter Sections o Series Second-Order Sections # Matlab Example o Parallel First and/or Second-Order Sections # First-Order Complex Resonators # Real Second-Order Sections # Implementation of Repeated Poles o Formant Filtering Example o Butterworth Lowpass Filter Example o Summary of Series/Parallel Filter Sections + Pole-Zero Analysis Problems * Filters Preserving Phase + Linear-Phase Filters + Zero-Phase Filters o $ \pi $ -Phase Filters o Phase $ \pi $ in the Stopband o Example Zero-Phase Filter Design o Elementary Zero-Phase Filter Examples + Odd Impulse Reponses + Symmetric Linear-Phase Filters o Simple Linear-Phase Filter Examples o Software for Linear-Phase Filter Design + Antisymmetric Linear-Phase Filters + Forward-Backward Filtering + Phase Distortion at Passband Edges * Minimum-Phase Filters + Definition of Minimum Phase Filters + Minimum-Phase Polynomials + Maximum Phase Filters o Example + Minimum Phase Means Fastest Decay + Minimum-Phase/Allpass Decomposition + Linear Phase Audio Filters + Creating Minimum Phase * Conclusion * Background Fundamentals + Signal Representation and Notation o Units o Sinusoids o Spectrum + Complex and Trigonometric Identities o Complex Numbers o The Exponential Function o Trigonometric Identities # Trigonometric Identities, Continued o Half-Angle Tangent Identities + Sinusoids as Eigenfunctions of LTI Systems o Proof Using Trigonometry o Proof Using Complex Variables o Phasor Analysis * Elementary Audio Digital Filters + Elementary Filter Sections o One-Zero o One-Pole o Two-Pole # Resonator Bandwidth in Terms of Pole Radius o Two-Zero o Complex Resonator # Two-Pole Partial Fraction Expansion o The BiQuad Section o Biquad Software Implementations + Allpass Filter Sections o The Biquad Allpass Section o Allpass Filter Design + DC Blocker o DC Blocker Frequency Response o DC Blocker Software Implementations + Low and High Shelf Filters o Exercise + Peaking Equalizers + Time-Varying Two-Pole Filters o Normalizing Two-Pole Filter Gain at Resonance o Constant Resonance Gain o Peak Gain Versus Resonance Gain o Constant Peak-Gain Resonator o Four-Pole Tunable Lowpass/Bandpass Filters + Elementary Filter Problems * Allpass Filters + Allpass Examples + Paraunitary Filters + MIMO Allpass Filters o Paraunitary MIMO Filters # MIMO Paraconjugate # MIMO Paraunitary Condition # Properties of Paraunitary Systems # Properties of Paraunitary Filter Banks o Paraunitary Filter Examples + Allpass Problems * Laplace Transform Analysis + Existence of the Laplace Transform + Analytic Continuation + Relation to the z Transform + Laplace Transform Theorems o Linearity o Differentiation + Laplace Analysis of Linear Systems o Moving Mass o Mass-Spring Oscillator Analysis * Analog Filters + Example Analog Filter + Capacitors o Mechanical Equivalent of a Capacitor is a Spring + Inductors o Mechanical Equivalent of an Inductor is a Mass + RC Filter Analysis o Driving Point Impedance o Transfer Function o Impulse Response o The Continuous-Time Impulse o Poles and Zeros + RLC Filter Analysis o Driving Point Impedance o Transfer Function o Poles and Zeros o Impulse Response + Relating Pole Radius to Bandwidth + Quality Factor (Q) o Q of a Complex Resonator o Q of a Real Second-Order Resonator # Critical Damping and Related Terms o Damping Ratio o Decay Time is Q Periods o Q as Energy Stored over Energy Dissipated + Analog Allpass Filters o Lossless Analog Filters * Matrix Filter Representations + Introduction + General Causal Linear Filter Matrix + General LTI Filter Matrix + Cyclic Convolution Matrix + Inverse Filters + State Space Realization o State Space Filter Realization Example + Time Domain Filter Estimation o Effect of Measurement Noise o Matlab System Identification Example * State Space Filters + Markov Parameters + Response from Initial Conditions + Complete Response + Transfer Function of a State Space Filter o Example State Space Filter Transfer Function + Transposition of a State Space Filter + Poles of a State Space Filter + Difference Equations to State Space o Converting to State-Space Form by Hand o Signal Flow Graph to State Space Filter o Controllability and Observability o A Short-Cut to Controller Canonical Form o Matlab Direct-Form to State-Space Conversion o State Space Simulation in Matlab o Other Relevant Matlab Functions o Matlab State-Space Filter Conversion Example + Similarity Transformations + Modal Representation o Diagonalizing a State-Space Model o Finding the Eigenvalues of A in Practice o Example of State-Space Diagonalization o Properties of the Modal Representation + Repeated Poles o Jordan Canonical Form + Digital Waveguide Oscillator Example o Finding the Eigenstructure of A o Choice of Output Signal and Initial Conditions + References + State Space Problems * Linear Time-Varying Filters + Introduction + Derivation + Summary * Recursive Digital Filter Design + Lowpass Filter Design + Butterworth Lowpass Design o Butterworth Lowpass Poles and Zeros o Example: Second-Order Butterworth Lowpass + Bilinear A/D Transformation o Bilinear Transformation o Frequency Warping o Analog Prototype Filter o Examples + Equation-Error Filter Design o Equation Error Formulation o Error Weighting and Frequency Warping o Stability of Equation Error Designs o An FFT-Based Equation-Error Method o Prony's Method o The Pade-Prony Method * Matlab Utilities + Time Plots: myplot.m + Frequency Plots: freqplot.m + Saving Plots to Disk: saveplot.m + Frequency Response Plots: plotfr.m + Partial Fraction Expansion: residuez.m o Method o Example with Repeated Poles + Partial Fraction Expansion: residued.m o Method + Parallel SOS to Transfer Function: psos2tf + Group Delay Computation: grpdelay.m + Matlab listing: fold.m + Matlab listing: clipdb.m + Matlab listing: mps.m and test program o Matlab listing: mps.m o Matlab listing: tmps.m o Matlab diary: tmps.d + Signal Plots: swanalplot.m + Frequency Response Plot: swanalmainplot * Digital Filtering in Faust and PD + A Simple Faust Program + Generating Faust Block Diagrams + Testing a Faust Filter Section + A Look at the Generated C++ code + Generating a Pure Data (PD) Plugin o Generating the PD Plugin o Generating a PD Plugin-Wrapper Abstraction o A PD Test Patch for the Plugin Wrapper + Generating a LADSPA Plugin via Faust + Generating a VST Plugin via Faust o Bypassing Windows + Generating a MIDI Synthesizer for PD + MIDI Synthesizer Test Patch * Links to Online Resources * Bibliography * Index for this Document * About this document ... --------------------------------------------------------------------- Next | Index | JOS Index | JOS Pubs | JOS Home | Search --------------------------------------------------------------------- [How to cite this work] [Order a printed hardcopy] [Comment on this page via email] --------------------------------------------------------------------- ``Introduction to Digital Filters with Audio Applications'', by Julius O. Smith III, (September 2007 Edition) Copyright (c) 2024-09-03 by Julius O. Smith III Center for Computer Research in Music and Acoustics (CCRMA), Stanford University CCRMA