96 kHz.org
Advanced Audio Recording

Frequency Shifting with Sub Sample Delay

For audio and music applications with DDS or jitter compensation, it is often necessary to slightly change the frequency of a clock for some percentages which is mostly a problem in digital domains: When resampling an incoming signal, all periods are multiples of the sampling period which often is too coarse.

 

This page shows an example for direct frequency tuning by just adding short delays into the signal. Performing this dynamically it is possible to slow down or accelerate a given clock frequency by only a very small percentage the smoothed way.

 

FPGA Circuit

 Sub sample periods can be added this way leading to a very precise frequency shifting:

frequency tuning 96kHz by percentage - Juergen Schuhmacher

 

The example above shows a circuit being appropriate for up to 100 MHz. It is capable to change the frequency in 1/256 steps. By e.g. adding a time step every 100th clock cycle, the resulting frequency was 96,000003 Hz. The shifting was performed this way on Cyclone Altera FPGA and in the first version done at a slower Spartan 2 FPGA. See the Spartan 2 platform. Because the newer FPGAs are much quicker, it requires some chaining of LUTs in order to achieve the desired delay or 0,65ns. The FPGA Editor was used for this.

 

Example Timing

vibrato by frequency tuning of audio the sample clock

In the example, in addition to the green fundamental wave, 3 further waves can be seen, each shifted by 45°. When using the inverted and non-inverted signals, 8 different clock signals are available. By simply switching between the delayed clocks in forward or reverse direction, the resulting period is either shortened- or lengthened, thus slightly lowering or raising the frequency. This can thus be done in smaller steps than would be possible with a clocked circuit. A DDS can operate much more smoothed. In this way, jitter can be added or also compensated for. With an intelligent control circuit, a finely structured vibrato could also be added to an audio sound.

 

Conclusion

Classical DDS techniques can be enhanced by dynamically shifted clock frequencies leading to a smoothed behavior and low jitter

 

 Read an earlier article about Smoothed Frequency Shifting

 

 

© 2008 J.S.