Regression analysis using orthogonal polynomials in the time domain is used to derive a digital filter with an infinite impulse response that satisfies maximally flat design constraints near dc. The low-frequency phase, and high-frequency gain, may be adjusted for lead or lag compensation of plant dynamics. Simulated design examples are used to show how the compensating filter may be intuitively tuned for the desired closed-loop response. It is shown that the second-order instantiation of the compensating filter reduces to a proportional-differential plus filter controller, with improved noise attenuation; closed-form expressions for the filter coefficients, as a function of two design parameters, are provided.