Text this: A Generalized Model and Control for Supermagnetic and Supercapacitor Energy Storage