Stability analysis of repetitive control: The port-Hamiltonian approach