Distributed genration control architecture towards improved power quality and grid stability for active distribution network