Frequency generator for generating a controlled signal having a controlled frequency, comprising: - a frequency ratio generator arranged for generating a frequency ratio, comprising: - an input configured for receiving the controlled signal; - a first controlled frequency divider arranged for generating a first divided signal having a first divided frequency being substantially equal to J Z the controlled frequency divided by a first frequency ratio; - a converter arranged for generating an excitation signal having the first divided frequency based on the first divided signal, wherein the excitation signal is provided to a resonator for excitation of the resonator; - the resonator is arranged for generating a resonance signal having a first resonance frequency; - a first frequency phase detector arranged for generating a first phase difference signal based on a first frequency phase difference between the first divided frequency and the first resonance frequency; - a first inner loop filter arranged for generating the first frequency ratio signal; and - an output configured for providing a frequency ratio signal based on the first frequency ratio signal indicative of the frequency ratio between the controlled frequency and the first resonance frequency; wherein a first frequency ratio generator loop is formed by the first controlled frequency divider, the first divided signal, the first frequency phase detector, the first phase difference signal, the first inner loop filter and the first frequency ratio signal; wherein a second frequency ratio generator loop is formed by the first controlled frequency divider, the first divided signal, the converter, the excitation signal, the resonator, the resonance signal, the first frequency phase detector, the first phase difference signal, the first inner loop filter and the first frequency ratio signal; wherein the first inner loop filter filters the first phase difference signal such that instability of the frequency ratio generator loops are prevented; and wherein the frequency generator further comprises: - a comparator arranged for generating a comparison signal based on the comparison of the frequency ratio with a target ratio; and - a controlled oscillator circuit comprising: - connectors for connecting an oscillator for generating an oscillating signal having an oscillator frequency; and - a PLL arranged for generating the controlled signal having the controlled frequency based on the oscillator a frequency, wherein the oscillator frequency is adapted based on the comparison signal. - a frequency ratio generator arranged for generating a frequency ratio, comprising: - an input configured for receiving the controlled signal; - a first controlled frequency divider arranged for generating a first divided signal having a first divided frequency being substantially equal to J Z the controlled frequency divided by a first frequency ratio; - a converter arranged for generating an excitation signal having the first divided frequency based on the first divided signal, wherein the excitation signal is provided to a resonator for excitation of the resonator; - the resonator is arranged for generating a resonance signal having a first resonance frequency; - a first frequency phase detector arranged for generating a first phase difference signal based on a first frequency phase difference between the first divided frequency and the first resonance frequency; - a first inner loop filter arranged for generating the first frequency ratio signal; and - an output configured for providing a frequency ratio signal based on the first frequency ratio signal indicative of the frequency ratio between the controlled frequency and the first resonance frequency; wherein a first frequency ratio generator loop is formed by the first controlled frequency divider, the first divided signal, the first frequency phase detector, the first phase difference signal, the first inner loop filter and the first frequency ratio signal; wherein a second frequency ratio generator loop is formed by the first controlled frequency divider, the first divided signal, the converter, the excitation signal, the resonator, the resonance signal, the first frequency phase detector, the first phase difference signal, the first inner loop filter and the first frequency ratio signal; wherein the first inner loop filter filters the first phase difference signal such that instability of the frequency ratio generator loops are prevented; and wherein the frequency generator further comprises: - a comparator arranged for generating a comparison signal based on the comparison of the frequency ratio with a target ratio; and - a controlled oscillator circuit comprising: - connectors for connecting an oscillator for generating an oscillating signal having an oscillator frequency; and - a PLL arranged for generating the controlled signal having the controlled frequency based on the oscillator a frequency, wherein the oscillator frequency is adapted based on the comparison signal. - a comparator arranged for generating a comparison signal based on the comparison of the frequency ratio with a target ratio; and - a controlled oscillator circuit comprising: - connectors for connecting an oscillator for generating an oscillating signal having an oscillator frequency; and - a PLL arranged for generating the controlled signal having the controlled frequency based on the oscillator a frequency, wherein the oscillator frequency is adapted based on the comparison signal.