Locking of an oscillator by injecting an input signal directly into the oscillator