Real time hardware implementation of power converters for grid integration of distributed generation and statcom systems