Abstract-The Interconnection and Damping AssignmentPassivity-Based Control (IDA-PBC) problem for port-controlled Hamiltonian systems is revisited. We propose a methodology that exploits the novel notion of algebraic solution of the socalled matching equation. This notion is instrumental for the construction of an energy function, defined on an extended statespace, which does not rely upon the solution of any partial differential equation. This yields, differently from the classical solution, a dynamic state feedback that stabilizes a desired equilibrium point. In addition, conditions that allow to preserve the port-controlled Hamiltonian structure in the extended closedloop system are provided. The theory is validated on two physical systems: the magnetic levitated ball and a third order food-chain system. A dynamic control law is constructed for both these systems by assigning a damping factor that cannot be assigned by the classical IDA-PBC.