Text this: Minimum energy for linear systems with finite horizon