# Optimum "L" filter

The Optimum "L" filter (also known as a Legendre–Papoulis filter) was proposed by Athanasios Papoulis in 1958. It has the maximum roll off rate for a given filter order while maintaining a monotonic frequency response. It provides a compromise between the Butterworth filter which is monotonic but has a slower roll off and the Chebyshev filter which has a faster roll off but has ripple in either the passband or stopband. The filter design is based on Legendre polynomials which is the reason for its alternate name and the "L" in Optimum "L".

## Synthesizing the characteristic polynomials

The solution to N order Optimum L filter characteristic polynomial synthesis emanates from solving for the characteristic polynomial, $L_{N}(\omega ^{2})$, given the below constraints and definitions.
${\begin{aligned}&L_{N}(0)=0\\&L(1)=1\\&{dL_{N}(\omega ^{2}) \over d\omega }\geq {\text{ 0 for 0 }}\leq \omega \leq 1\\&{dL_{N}(\omega ^{2}) \over d\omega }{\biggr |}_{\omega =1}{\text{ is maximum}}\\\end{aligned}}$
The odd order case and even order case may both be solved using Legendre polynomials as follows.
${\begin{aligned}&{\text{N Odd:}}\\&L_{N}(\omega ^{2})={\frac {2}{N+1}}\int _{-1}^{2\omega ^{2}-1}{\bigg\sum _{i=0}^{i=k}a_{i}P_{i}(x){\bigg )}^{2}dx\\&{\text{Where}}\\&P_{i}(x){\text{ is the Legendre polynomial of the first kind of order i}}\\&k={\frac {N-1}{2}}\\&a_{i}={\frac {2i+1}{\sqrt {2(k+1)}}}\\&\\&\\&{\text{N Even:}}\\&L_{N}(\omega ^{2})=\int _{-1}^{2\omega ^{2}-1}(x+1){\bigg\sum _{i=0}^{i=k}a_{i}P_{i}(x){\bigg )}^{2}dx\\&{\text{Where}}\\&k={\frac {N-2}{2}}\\&a_{i}={\begin{cases}{\frac {2i+1}{\sqrt {(k+2)(k+1)}}},&{\text{if }}i{\text{ is odd and }}k{\text{ is odd OR }}i{\text{ is even and }}k{\text{ is even}}\\0,&{\text{otherwise}}\\\end{cases}}\\\end{aligned}}$

## Frequency response and transfer function

The magnitude frequency magnitude is created using the following formula. Since the Optimum "L" characteristic function is already in squared form, it should not be squared again as is done for other filter types such as Chebyshev filters and Butterworth filters.
${\begin{aligned}&T(\omega )={\sqrt {\frac {1}{1+\epsilon ^{2}L_{N}(\omega ^{2})}}}\\&\epsilon ^{2}=10^{|\delta |/10}-1.\\&\delta ={\text{magnitude attenuation of the passband in dB, usually 3.0103}}\\\end{aligned}}$
To obtain the transfer function, $T(j\omega )$, make the $L_{N}(\omega ^{2})$ coefficients all positive to account the $j\omega$ frequency axis, and then use the left half plane poles to construct $T(j\omega )$. Note that $L_{N}((j\omega )^{2})$ is +1 for even N and -1 for odd N (See $L_{N}(\omega ^{2})$ table below). The sign of $L_{N}((j\omega )^{2})$ must be factored into the equations for $T(j\omega )$ below.
${\begin{aligned}&T(j\omega )={\sqrt {\frac {1}{a+\epsilon ^{2}L_{N}((j\omega )^{2})}}}{\bigg |}_{\text{Left half plane}}\\&{\text{Where:}}\\&a={\begin{cases}1,&{\text{if }}N{\text{ is even}}\\-1,&{\text{if }}N{\text{ is odd}}\end{cases}}\\&\epsilon ^{2}=10^{|\delta |/10}-1.\\&\delta ={\text{magnitude attenuation of the passband in dB, usually 3.010}}\\\end{aligned}}$
The "Left Half Plane" constraint refers to finding the roots in all the polynomials contained in the brackets, selecting only roots in the left half plane, and recreating the polynomials from those roots.

### Example: 4th order transfer function

N = 4 (forth order), pass band attenuation = -3.010 at 1 r/s.
A forth order filter has a value for k of 1, which is odd, so the summation uses only odd values of i for $a_{i}$and $P_{i}(x)$, which includes only the i=1 term in the summation.
The transfer function, $T_{4}(j\omega )$, may be derived as follows:
${\begin{aligned}&k={\frac {N-2}{2}}=1{\text{}k{\text{ is odd)}}\\&a_{1}={\frac {2(1)+1}{\sqrt {((1)+2)((1)+1)}}}=1.2247449\\&P_{1}(x)=x\\&(x+1){\bigg\sum _{i=0}^{i=k}a_{i}P_{i}(x){\bigg )}^{2}=(x+1){\bigr1.2247449(x){\bigr )}^{2}=1.5x^{3}+1.5x^{2}\\&L_{4}(x^{2})=\int _{-1}^{2x^{2}-1}1.5x^{3}+1.5x^{2}{\text{ }}dx=6x^{8}-8x^{6}+3x^{4}\\&L_{4}(x^{2})=6x^{8}-8x^{6}+3x^{4}\\&L_{4}(j\omega ^{2})=6(j\omega )^{8}+8(j\omega )^{6}+3(j\omega )^{4}\\&echo={\sqrt {\epsilon ^{3.0103/10}-1}}=1\\&T_{4}(j\omega )={\bigg{\frac {1}{1+1^{2}(6(j\omega )^{8}+8(j\omega )^{6}+3(j\omega )^{4})}}{\bigg ]}_{\text{Left Half Plane}}\\&\\&T_{4}(j\omega )={\frac {1}{2.4494897(j\omega )^{4}+3.8282201(j\omega )^{3}+4.6244874(j\omega )^{2}+3.0412127(j\omega )+1}}\end{aligned}}$
A quick sanity check of $T_{4}(j)$ computes a value of -3.0103dB, which is what is expected.

### Table of first 10 characteristic polynomials

| N | $L_{N}(\omega ^{2})$ |
| 1 | ω$^2${\textstyle \omega ^{2}} |
| 2 | ω$^4${\textstyle \omega ^{4}} |
| 3 | 3ω$^6$−3ω$^4$+ω$^2${\textstyle 3\omega ^{6}-3\omega ^{4}+\omega ^{2}} |
| 4 | 6ω$^8$−8ω$^6$+3ω$^4${\textstyle 6\omega ^{8}-8\omega ^{6}+3\omega ^{4}} |
| 5 | 20ω$^{10}$−40ω$^8$+28ω$^6$−8ω$^4$+ω$^2${\textstyle 20\omega ^{10}-40\omega ^{8}+28\omega ^{6}-8\omega ^{4}+\omega ^{2}} |
| 6 | 50ω$^{12}$−120ω$^{10}$+105ω$^8$−40ω$^6$+6ω$^4${\textstyle 50\omega ^{12}-120\omega ^{10}+105\omega ^{8}-40\omega ^{6}+6\omega ^{4}} |
| 7 | 175ω$^{14}$−525ω$^{12}$+615ω$^{10}$−355ω$^8$+105ω$^6$−15ω$^4$+ω$^2${\textstyle 175\omega ^{14}-525\omega ^{12}+615\omega ^{10}-355\omega ^{8}+105\omega ^{6}-15\omega ^{4}+\omega ^{2}} |
| 8 | 490ω$^{16}$−1668ω$^{14}$+2310ω$^{12}$−1624ω$^{10}$+615ω$^8$−120ω$^6$+10ω$^4${\textstyle 490\omega ^{16}-1668\omega ^{14}+2310\omega ^{12}-1624\omega ^{10}+615\omega ^{8}-120\omega ^{6}+10\omega ^{4}} |
| 9 | 1764ω$^{18}$−7056ω$^{16}$+11704ω$^{14}$−10416ω$^{12}$+5376ω$^{10}$−1624ω$^8$+276ω$^6$−24ω$^4$+ω$^2${\textstyle 1764\omega ^{18}-7056\omega ^{16}+11704\omega ^{14}-10416\omega ^{12}+5376\omega ^{10}-1624\omega ^{8}+276\omega ^{6}-24\omega ^{4}+\omega ^{2}} |
| 10 | 5292ω$^{20}$−23520ω$^{18}$+44100ω$^{16}$−45360ω$^{14}$+27860ω$^{12}$−10416ω$^{10}$+2310ω$^8$−280ω$^6$+15ω$^4${\textstyle 5292\omega ^{20}-23520\omega ^{18}+44100\omega ^{16}-45360\omega ^{14}+27860\omega ^{12}-10416\omega ^{10}+2310\omega ^{8}-280\omega ^{6}+15\omega ^{4}} |
The table is calculated from the above equations for $L_{N}(\omega ^{2})$