Tuesday, May 28, 2013

Feedback FM with bells and whistles

Single oscillator feedback FM is a most economic technique for producing rich harmonic tones. However, the technique suffers from parasitic oscillations at the Nyquist frequency when the modulation index is turned up sufficiently high. The most obvious thing to try is to modify the original formula


x[n] = sin(ωn + Ix[n-1])

by lowpass filtering the feedback signal with some filter that has a zero at half the sample rate. A two point average increases the range the index can take before the spurious oscillations set in, but it cannot stop them at sufficiently high modulation indices. A complementary trick is to put a filter outside the feedback loop. Again, it helps to a certain extent, but should not be expected to solve the problem in all cases. Finally, there is the Overkill Solution of oversampling the system. Or maybe it's not so overkill after all. In any case, a high sample rate is recommended.

feedback FM
Feedback FM waveform with spurious oscillations and no attempt to squelch them.

Depending on the sample rate, the spurious oscillations will typically ring at such a high frequency that only domestic animals will notice them and possibly object to their presence. Nonetheless, the waveform will be contaminated by a conspicuous wiggle that may annoy any purist, whether or not they hear it. Of course, it is a spurious or parasitic oscillation since it follows the sampling rate rather than the synthesis parameters. Sometimes the parasitic oscillation happens at a third or fourth of the sample rate, or other subharmonics.

Single oscillator feedback FM is limited to harmonic spectra. Much flexibility is gained  by introducing a second oscillator since there are several ways to connect the two oscillators. Rather than listing all cases separately, we introduce coupling parameters c (cross terms) and b (self-modulation) in the coupled system

      x[n+1] = sin(θ[n] + b1x[n] + c1y[n])
(*)   y[n+1] = sin(φ[n] + b2y[n] + c2x[n])

where the phases θ and φ are incremented by the modulating and carrier frequencies. Which one is which depends on what signal you send to the output. Of course both signals can be used for stereo, but then it makes less sense to call one of the oscillators the carrier and the other one the modulator.

In FM synthesis, the phase variables usually depend only on their respective frequencies. By introducing an interaction term, phase coupling can be used to synchronize the oscillators. Hardsync may have been used with FM before, but the gentler kind of sync used in the Kuramoto model is useful here, as it is also suitable for synchronizing more than two oscillators. Now, the phases are incremented by the oscillators' frequencies as usual, but to that we add a coupling term with strength K:

      θ[n+1] = θ[n] + ωc - K sin(θ[n] - φ[n])
(#)   φ[n+1] = φ[n] + ωm - K sin(φ[n] - θ[n])

Turning up K too much will collapse the two oscillators into a single strong team working in perfect sync. The system (*, #) is just a four-dimensional map with seven parameters and may thus be studied with the appropriate methods of dynamic systems.

As often happens with iterated maps, the feedback FM system exhibits typical behaviour such as period two oscillations, and the period doubling route to chaos. The frequency terms may both be set to zero, which means the system (*) becomes autonomous. Then period doublings can be seen more easily, as shown below. The system has to be seeded with nonzero initial values for any oscillation to occur.

cross-FM
Colour legendgray, period 1; orange, period 2; blue, period 4, bright yellow, period 3, red, chaos. On the horizontal axis, -1 < c1 = c2 < 4, vertical axis: - 0.5 < b1 < 5 and b2 = 0.5 (constant). The modulator and carrier frequencies are both 0; hence the coupling term does not influence the dynamics.


We are not done with feedback FM!

Other things to try include modifying the feedback signals by waveshapers and filters. Even the phase coupled signal may be filtered. Each filter adds its state variables to the system and increases its dimension. This is complicated territory; suffice it to say that filters plus strong nonlinearities or high feedback gain equals noise!


No comments:

Post a Comment

I'm not home right now, but please leave a message and I'll get back to you in the next few years.