PV system and distribution system are easily modeled in MATLAB simulation but how can we integrate them and what are the useful control strategies to make system balance and how it affects local distribution grid.
You may learn from the example of Spain that I highlighted in my paper "Wind Power Deployment - Why Spain succeeded?" published by the Renewable Energy Law and Policy Review in September 2012. For PV Solar, a similar consolidation or integration into a renewable energy sub-system could improve the management of the availability (or intermittency) of PV Solar and Wind power. Managed as a portfolio, the subsystem is better able to complement the individual volatilities in volumes that are not correlated that smoothens the peaks and troughs relative to what individual suppliers experience. This proved successful with wind power in Spain where the record supply from intermittent supplies (mostly wind) exceeded 65% of the total at a given period without adversely affecting network security in Spain. These levels of supplies has been reached more frequently over the past four years. For PV Solar, you need to consider some form of "smart" metering where inflows from the grid are measured accurately (this is what traditional grid does), while also able to measure the outflows from the household of power fed to the grid when the household is not using the power generated from the solar panels. These innovations are more readily adapted in developed or efficiently managed power networks. In markets where network infrastructures are weak or under-developed, strengthening the basic infrastructures and grid management is needed before they can apply a similar system that is proving successful in Spain.
Once you have the out put from PV, you may have an inverter for your AC loads that is tied to the AC bus and if you have any spare enrgy, the DC power from the DC bus will flow to the distribution grid through grid tied inverter (which synchronizes the PV power to the grid in magnitude and direction) and energy meter in case you need power from the grid in time of solar irradiation fluctuation. Concerning the effect on the grid distribution system, there is power quality problem the PV system causes due to its switching devices.