This paper proposes a decentralized algorithm for real-time control of oscillatory dynamics in power systems. The algorithm integrates dynamic state estimation (DSE) with an extended linear quadratic regulator (ELQR) for optimal control. The control for one generation unit only requires measurements and parameters for that unit, and hence the control at a unit remains completely independent of other units. The control gains are updated in real-time, therefore the control scheme remains valid for any operating condition. The applicability of the proposed algorithm has been demonstrated on a representative power system model.