Text this: Modeling and Control of a Photovoltaic Energy System Using the State-Space Averaging Technique