Modeling and Control of a Solid State Transformer and verification with Controller Hardware in the Loop