This paper proposes a compact power conversion system (PCS) fo virtual power plants (VPPs) formed by an IoT aggregation of many residential solar and battery systems. The falling costs of IoT technology, batteries and solar systems have exposed power conversion costs as a growing part of the total system cost. The proposed PCS is based on an isolated three port converter (TPC) and an inverter stage to facilitate grid connection. The TPC solution seeks to reduce costs by combining several power conversion devices into a single package. Any single-phase conversion system must deal with double line frequency (DLF) power fluctuations. This TPC conversion allows the DLF power components to be selectively directed to any port. The DLF components can be restrained to a filter at the grid connection port or directed to a battery system. It is generally desirable to direct DLF currents away from the PV port. A 3-level square wave modulation method is adopted to control DLF flows in the PCS and to the converters soft switching capability. The simulation model with the proposed control methods for the PCS is developed in Matlab/Simulink. The simulation and experimental results show that the DLF voltage ripple on the dc-link is suppressed. The results also show that the active power of the PV port is free of DLF oscillations.