Computer optimization of transducer transfer functions using constraints on bandwidth, ripple, and loss