### Creating Minimum Phase Filters and Signals

Author: Andrew Simper
Date: 2002 July 17th

This Mathematica notebook was created from the Matlab scripts by Julius Smith III which are located at:
http://www-ccrma.stanford.edu/~jos/filters/Creating_Minimum_Phase_Filters.html

Function ReMps[s_]:
Returns a (real) time domain minimum phase FIR filter kernel from (real) input time domain FIR filter kernel

Function Mps[s_]:
Returns a minimum phase spectrum from the complex spectrum s

Function Clipdb[s_, cutoff_]:
Clip the magnitude of s at its maximum + cutoff in dB. Example Clipdb[s, -N] returns s with the minimum magnitude of s not more than NdB below its maximum magnitude

Function FoldBack[r_]:
This "time-aliases" the non-causal part of a function onto its causal part. When applied to the inverse fourier transform of a log-spectrum, it converts non-minimum-phase zeros to minimum-phase zeros.
Fold the left wing of fft vector onto the right wing.

Testing of the mps function. The input magnitude response is given by 'spec', the calculated Mps[spec] response is shown to be equal but only in magnitude not phase. The time domain FIR kernels are then plotted.

 1.` 1.` 0.9999999999999999` 0.000010000000000000021` 0.000010000000000000021` 0.000010000000000000021` 0.9999999999999999` 0.9999999999999988`

Application to generating a minimum phase sinc
The ideal and array sinc function are generated below. A minimum phase version of the sinc function is generated using the Mps function. This is shown to have the same magnitude response and the original sinc function. The time domain FIR filter kernels are then plotted for each.

The minimum phase sinc can now be integrated ready for generating band limited oscillators.

Converted by Mathematica      July 17, 2002