  We present a method to design distributed generation and demand control
schemes for primary frequency regulation in power networks that guarantee
asymptotic stability and ensure fairness of allocation. We impose a passivity
condition on net power supply variables and provide explicit steady state
conditions on a general class of generation and demand control dynamics that
ensure convergence of solutions to equilibria that solve an appropriately
constructed network optimization problem. We also show that the inclusion of
controllable demand results in a drop in steady state frequency deviations. We
discuss how various classes of dynamics used in recent studies fit within our
framework and show that this allows for less conservative stability and
optimality conditions. We illustrate our results with simulations on the IEEE
68 bus system and observe that both static and dynamic demand response schemes
that fit within our framework offer improved transient and steady state
behavior compared with control of generation alone. The dynamic scheme is also
seen to enhance the robustness of the system to time-delays.
