As the penetration of photovoltaic (PV) systems on building rooftops increases, the accumulated effects of the rooftop PV output fluctuation on the electric utility are no longer negligible. Energy storage systems have been used to smooth PV power, especially when the building load becomes low. Commercial buildings are increasingly expected to charge or discharge plug-in hybrid electric vehicles (PHEVs), which can be regarded as distributed energy storage. This paper presents an alternative power system for commercial buildings, which compensates for rooftop PV power fluctuation by charging or discharging PHEV batteries, and moreover, participates in tracking frequency regulation signals. The proposed system is designed and implemented using steady-state and dynamic models of power converters and controllers. Simulation studies performed in MATLAB/SIMULINK verify that the objective can be achieved under various conditions, determined by such factors as the maximum voltage, minimum state-of-charge, and desired PHEV charging end-time.