Text this: Non-ideal two-level battery charger—modeling and simulation