Text this: Optimization with Time and Frequency Constraints Using Automatic Differentiation: Application to an Aircraft Electrical Power Channel