Co-simulation applied to power systems with high penetration of distributed energy resources