Page  398 ï~~Analyzing the Moog VCF for Digital Implementation Tim Stilson (stiltimccrma. stanf Julius Smith (josmccrma. stanf ord. edu) CCRMA (http" //www-ccrma. stanford. edu/) Music Department, Stanford University Abstract Various alternatives are explored for converting the Moog four-pole Voltage Controlled Filter (VCF) to discrete-time form for digital implementation in such a way as to preserve the usefulness of its control signals. The well known bilinear transform method and backward-difference method yield a delay-free loop and cannot be used without introducing an ad-hoc delay. Methods from digital control theory help guide the changes made to compensate for this delay 1 Introduction The Voltage-Controlled Filter (VCF) designed and implemented by Robert Moog is an influential filter in the history of electronic music. In this paper, the filter is analyzed in continuous time (CT) and then several transformations of the filter into discrete time (DT) are analyzed for various properties such as efficiency, ease of implementation, and the retention of certain of the original filter's good properties, such as constant-Q, and separability of the Q and tuning controls. The Root-Locus, a particularly useful tool from control systems, is used extensively in the analysis of the VCFs and provides hints for finding new filters. In this work, Root-Locus techniques were found to be useful. The Root-Locus comes from controlsystems analysis and has particular usefulness in the analysis of systems with sweepable control inputs (inputs intended to have sampling-rate updates) The rules of how the root locus works also give the designer new tools and hints for sweepable filter design. 2 The Moog VCF The VCF used in Moog synthesizers employs the filter structure shown in Fig. 1. x(1) E G(ts))G1(s) G1(.0 Gj) yQ) Figure 1: The Moog VCF. The transfer function of each section is Gi(s) = 1 1 + s wC The four real poles at s = -w, combine to provide a lowpass filter with cut-off frequency (-3 dB point) at w = w,. The overall transfer function with feedback as shown is H(s) o Y(s) _ G4(s) _ 1 X(s) - 1 Â~ k G(s) - k + (1 + s/w )4 where g is the feedback gain which is varied between 0 and 4. Each real pole section can be implemented as a simple (buffered) RC section. Moog implemented the RC sections using a highly innovative discrete analog circuit known as the "Moog ladder" [Moog 1965, Hutchins 1975]. At w = w,, the complex gain of each pole section is G1(jw c) = 1 _=7-=eJ'4 Therefore, the gain and phase of all four sections together is 1. 1 G (jwc) = e - (-1) 4 4 I.e., the total gain is 1/4 and the phase is -180 degrees (inverting). In contrast, at w = 0, the gain is 1 and the phase is 0 degrees (non-inverting), while at w = oo, the gain is 0, and the phase is -360 degrees (also non-inverting). In summary, the four one-pole sections comprise a lowpass filter with cutoff frequency w = we, which is inverting at cut-off. Therefore, the use of inverting feedback provides resonance at the cut-off frequency. This is called "corner peaking" in analog synthesizer VCF design [Hutchins 1975, p. 5d(12)]. As the feedback gain k approaches 4, the total loop gain approaches 1, and the gain at resonance goes to infinity. 20. m c= C -...........-.0....... 40............................ i i.................! 100 101 102 Frequency (rad/sec) Figure 2: Amplitude response of the analog Moog VCF for different levels of feedback (wc = l0rad/sec). At k = 0, the filter has no corner peaking. Also shown are k = 4[0.3,0.6,0.9,0.99]. As k increases, corner peaking develops at the cut-off frequency. At k = 4, the lowpass filter oscillates at its cut-off frequency. Stilson & Smith 398 ICMC Proceedings 1996

Page  399 ï~~Root-Locus Interpretation We can also analyze the VCF with the root-locus technique. Root Locus is a method popular in the field of control systems analysis that gives various rules for feedback-loop pole location movement in terms of the open-loop transfer function and the variations of the feedback gain. While originally intended for analysis of control systems, there is no reason why it cannot be used to analyze audio filters (indeed, linear control systems are filters, just dealing with different frequency ranges). Various rules have developed over the years to aid in the hand drawing of root-loci, and can be found in any introductory book on control systems (such as Franklin, et al)'. Although it is now trivial to use computers to calculate root-loci via brute-force, familiarity with the rules and the common root-locus shapes allows one to use root-locus as a design tool. The MoogVCF Analyzed t.....::;....:: J....::...::............. / Q....................., i......::...................... -6 -4 -2 mu--4 -2 0 Figure 3: A Root-Loci for the Moog VCF. Left: varying k E [0, 5], multiple p; Right: varying p, multiple k The root locus for the Moog VCF is shown in Figure 3. It has four root tracks, starting at the one-pole filters' pole locations (at k = 0) and extending to cc (at k -+ oo) along 45-degree lines, which cross the jw axis at k = 4. This gives the filter a trivial corner-frequency control via the pole location of the cascaded one-pole filters. Resonance Control: One can also evaluate a root locus of the VCF with w, as the free variable. Algebraic solution of (s + w,)4 + kw4 = 0 gives s = wC (-1 Â~ k1/4eÂ~ji/4) Which shows the 45-degree root-locus lines mentioned earlier. If we keep k constant, and look at the dominant poles (the ones that approach the jw axis), we get: s =aeÂ~3O, whereQa= + tan-' (~k ) So sweeping wc while keeping k constant gives root-locus lines that keep a constant angle from the jw axis. This gives the filters a constant Q across sweeps in we, so that k becomes a Q control. Thus the Moog VCF has simple, uncoupled controls of corner frequency and resonance. 'The same rules apply in discrete-time filters (root-locus in z) as in continuous-time (root-locus in s), the only difference being the pole-location interpretation. in this paper, Q will be defined in terms of pole location rather than the center/bandwidth definition. This follows from the definition of Q: "the number of cycles for the envelope of the impulse response to decay to 1/e'" [Morse, p. 25] (assuming pole dominance). This gives DT Constant-Q pole locations along logarithmic spirals in the z-plane according to the transform z E-- esT. 3 Discretizing the VCF It is desired to create digital filters with frequency and resonance controls as simple and efficient as those in the analog VCF. In particular, we desire filters whose controls (1) are uncoupled, (2) control useful parameters, such as frequency and Q, and (3) are efficient to control (not requiring expensive conversions, such as transcendentals, to get from the desired parameter to the actual control value). Filters based on the Moog VCF topology are explored here because it is hoped that at least some of the good features of the filter will translate well into the digital realm. In order to preserve controllability, the CT VCF equations must be translated to DT using some transformation of the transfer function. as opposed to doing a impulse-response discretization, or a DT filter design based on the CT frequency response, because these methods typically aren't parameterizable, nor do they preserve any parameterization of the original system. Two popular transforms are the BackwardDifference Transform s +- (z - 1)/(z T), and the Bilinear Transform. s -- 2(z - 1)/(z + 1)T Implementability: An unfortunate fact in the discretization of the VCF topology is that most of the above-mentioned transforms will produce one-pole filters that have a delay-free path from input to output. This makes the feedback system unrealizable 2. Thus the systems must be modified to make them realizable, typically by adding a unit delay into the loop. Unfortunately, this addition interferes with many of the features of the filters, including, most notably, causing the controls to no longer be uncoupled. Therefore, a major part of the design process is finding transforms (or directly designing DT systems in the Moog VCF topology) that minimize the distortions required in the realizations. Bilinear Transform The bilinearly transformed onepole is: Gi(z) = (pÂ~ l)z+1 (Bilinear) G' (z) has a delay-free path, so to implement this, a unit delay has been added to the loop. This kills 2unless the feedback loop is collapsed via block-diagram algebra, but this destroys the efficiency of the control. ICMC Proceedings 1996 399 Stilson & Smith

Page  400 ï~~the uncoupled nature of p and k for frequency and resonance control, as shown in Figure 4. (If the controls were uncoupled, the traces would be flat.) frequencies is desirable. For many effects where exact Q isn't necessary, the variation in Q vs. p may be tolerable. If more closely constant Q is required, then the techniques described for the bilinear case (the use of a separation table) apply with similar results. The tuning curve when evaluated is more drastic than in the bilinear case, which makes the use of a tuning table more necessary in practice. 'Compromise' Version The reader may have noticed that the Q curves for the two preceding cases have nearly opposite behaviors (for the bilinear, Q goes up with p when not using a separation table, and for the backwards difference, it goes down). The big difference between these two architecturally is the placement of the one-pole filters' zeros: the bilinear case places them at z = -1, and the backwards difference places them at z = 0. This suggests finding an intermediate position that may flatten out the Q curves and give p-sweeps more close to constant-Q. A few quick tries gave a zero location z = -0.3: Figure 4: Feedback gains vs. p to get various Q, Bilinear case To have stability for all p, we must keep k < 1.0 if we wish to keep it constant. This causes the Q at low frequencies to be quite low. The current fix is to use a "separation" table to scale the feedback gain as function of the pole location p: kactuai = kdesired Table(p) Where Table(p) is given by the top trace of Figure 4, and kdesired E [0, 1). Because the lower traces in Figure 4 are not simple scalings of the top trace, Q rises at very high corner frequencies, making this filter not a true constant-Q sweepable filter (see Figure 6). This is considered tolerable, though, because in most normal operation, those corner frequencies aren't used (especially at f, = 44.1 kHz). To get exact constant-Q sweeps, Table(p) would also have to be a function of Q, which vastly increases the storage requirements for the table. Another table lookup is also necessary if exact tuning is deemed necessary. The tuning curve for the filter can be determined experimentally. At low frequencies, it turns out that the tuning curve is almost linear, so may be unnecessary. Also, tuning is often calculated at a slower rate (only at the beginning and end of sweeps, for example), which makes this less of an efficiency hit. Backward Difference Transform The backward-difference transformed onepole is: G (z) = (p + 1) z+0.3 1.3 z+p (Compromise) Again, a delay is put in the loop. Referring to Figure 6, we see that in the frequency range [0, f8/4] and for Q up to about 100, the filter is quite close to constant-Q and the controls p and k are almost completely uncoupled controls of frequency and Q, without the use of a separation table, although a tuning table may be necessary, as in all these cases. An optimization could be performed to arrive at the "best" zero location, maybe even optimizing the four zeros to different locations. Thoughts on Exact Constant-Q: It is likely that the auditory system is not extremely sensitive to variations in Q (i.e. the JND is probably large). [Smith86, p. 130]. A JND would tell us how close to constant-Q we need to get in our filters. It is likely that there is quite a bit of leeway. Comparisons Root Loci: The Root Loci for the abovementioned filters (Figure 5) are quite informative. These plots show dominant-pole locations versus sweeps of p and k (or scaled k in the Bilinear case). Constant-Q pole locations are shown on the z-plane grid, so we can see how the filters deviate from constant-Q (at least at high frequencies). The loci also show how the tuning acts versus p. Note how the use of a separation table (Figure 5) guarantees stability, at the expense of the extra table lookup. Constancy of Q: These plots (Figure 6) show the frequency ranges and Q ranges over which the filters approximate constant-Q (again, this is based Ga(z) = (p + (Back-Diff) Again, this requires an extra delay in the loop to become implementable, And, as in the bilinear case, a table is required for separability. This filter, however, can be used without a separation table with better results than in the bilinear case because, as we can see from Figure 6, the Q falls as p increases, for a given k. This allows the user to sweep p without worrying about stability as long as the Q at low Stilson & Smith 400 ICMC Proceedings 1996

Page  401 ï~~Figure 5: Dominant pole locations for p and k sweeps, Left: Bilinear with separation table, Middle: Back-Diff and Right: Compromise, both with no separation table 10 10 "..- -.... 010 10 10 10 10 free (radians) 10..........\. 10 10 10-3 10- 10" 10Â~ trey (radiansl Figure 6: Q vs. corner freq. for various k. Left: Bilinear with separation table; Right: Compromise, no separation table Bode P14 20 take up mu 0 - p sweep is 2 (Figure 7). -40- 4 Con Implements 20 Moog VCF M verted using -2 be tweaked -20 Some transf -40 ers, but bes ter directly 20 control-syst 0 Referer ir -20 Â~' [Hutchins 19 -40 Handbook. 10-3 10-2 10-1 100 [Moog 1965] freq (rad) Low-Pass Figure 7: Bode plots, constant k (medium Q), vari- cessing." ous p. Top: Bilinear with separation table; Middle: 413(Oct.). Back-Diff, no separation table; Bottom: Compromise, no separation table [Franklin & Emami-N on the location of the dominant poles). These show Systems,. the Q vs. p varies, with k held constant at various [Morse 1981] values (except in the bilinear case, where the sep- Acoustica aration table is used3). This type of plot is one of the more useful pieces of information when design- [Smith 1983] ital Filter ing VCFs that are intended to be constant-Q. plicationt 3 Again, separation tables would also work in the other University cases to get better curves, but the intention is to find filters for which the use of a separation table is unnecessary. It is A longer necessary in the bilinear case for stability reasons. http://www 10z 10- 10" 10o trea (radians) separation table; Middle: Back-Diff, no ots: A complete set of Bode plots would ich too much space, so instead a single shown for each filter, at a medium Q iclusion bility issues make the conversion of the to a digital form nontrivial. Once cong standard techniques, the filter must to recover some of the original features. forms preserve features better than oth-;t results come from redesigning the fllin the discrete domain. Methods from ems theory prove useful in this redesign. ices )75] Hutchins, B. 1975. Musical Engineer's Ithaca, New York: Electronotes. Moog, R. A. 1965. "A Voltage-Controlled High-Pass Filter for Audio Signal ProAudio Eng. Soc. Convention, Preprint Powell 1994] Franklin, G., J. D. Powell, A. aeini, 1994 Feedback Control of Dynamic 3rd Edition Reading: Addison Wesley Morse, P. 1981 Vibration and Sound [ Society of America. Smith, J. 0. III 1983 "Techniques for DigDesign and System Identification With Apto the Violin." Ph.D./EE Thesis, Stanford CCRMA Report STAN-M-14 version of this paper can be found at Â~ccra, stanford. edu"stilti/papers ICMC Proceedings 1996 401 Stilson & Smith