Rtds-Based Design And Simulation Of Distributed P-Q Power Resources In Smart Grid