Nonlinear controller based on the Newton-Raphson flow: theory and applications