Online generalized droop-based demand response for frequency control in islanded microgrids