Text this: Modeling and control of a photovoltaic energy system using the state-space averaging technique