An Energetic Interpretation of Nonlinear Wave Digital Filter Lookup Table Error (Invited Paper) Kurt James Werner , Julius O. Smith III Center for Computer Research in Music and Acoustics (CCRMA) Stanford University, Stanford, California 94305 Email: [kwerner, jos]@ccrma.stanford.edu Abstract—In this paper, we study error in wave digital filter nonlinearities from an energetic perspective. By ensuring that power dissipation corresponding to this error is non-negative, we respect the basic wave digital filter premise that errors should not correspond to an increase in system energy. In particular, this has implications for the formation of lookup tables and the choice of lookup table interpolation method. We give recommendations for both based on the sign and second derivative of the wave-domain function which is to be tabulated. These recommendations are used to study interpolation of a diode characteristic. I. I NTRODUCTION Nonlinear circuit elements present unique challenges in circuit modeling applications. Nonlinear circuit elements are described by nonlinear equations, which in general are not guaranteed to have analytic solutions. Often and especially in real-time applications, we would like to avoid iterative solutions of nonlinear equations, which may not be guaranteed to converge without a good initial guess and may have a non-fixed (and high) cost. To this end, lookup tables can be used to store pre-computed solutions to nonlinear equations. Solutions between sampled table points are approximated by an interpolation method such as linear (secant) interpolation or linear tangent extrapolation. This technique is common in Virtual Analog (VA) applications, which are usually required to run in real time and with fixed cost. In nonlinear circuit simulations that rely on lookup tables, the quality of the lookup table is a limiting factor in the sim- ulation quality [1]. Some things to consider in table creation are: how much storage space is available for the table? How expensive is table access? How expensive is interpolation? In what domain are solutions required? We add a new question to this list: is the error introduced by the interpolation method physically plausible? In this paper, we’ll investigate the energetic implications of table interpolation in the context of wave digital filters (WDFs) [2]. Techniques for forming “canonical” piecewise- linear representations of nonlinear surfaces with minimized sum of squared errors have been explored in, e.g., [3]. We’ll introduce another viewpoint on table creation and interpolation that is in harmony with the foundational energetic principles of the WDF formulation, i.e. that the instantaneous interpolation error should always be either zero or corresponds to a decrease in system energy, but never an increase in system energy. The rest of the paper is structured as follows. In §II, we’ll review previous work on WDFs, including nonlinearities and (pseudo)power. 1 In §III, we’ll derive equations for the incremental power of interpolation error. From these equations, we’ll develop guidelines for incrementally passive interpola- tion methods. In §IV, we’ll demonstrate an application of these guidelines to a one-port nonlinear circuit element: a diode. §V will conclude and give recommendations for future work. II. PREVIOUS WORK In this section we review WDF basics. A full review of WDF principles is beyond the scope of this paper; the reader is referred to Fettweis’ landmark article [2] which comprehensively cites work up to 1986 as well as more recent literature reviews [5]–[7] 2 . A. WDF basics WDFs are a special way of designing digital filters from the design criteria of analog reference circuits. WDFs are created from analog reference circuits by two transformations: 1) replacing Kirchhoff (K) quantities (current i and voltage v) with wave (w) quantities (incident wave a and reflected wave b) and 2) discretization via the bilinear transform (BLT). The standard voltage wave definition and its inverse are: K w: a=v + iR , b=v - iR (1) w K: v=(a + b) /2 , i=(a - b) / (2R) (2) where R indicates an arbitrary positive port resistance. The BLT is accomplished by using the following discretization [7] 3 on the Laplace differentiation operator s, which appears in reactive component equations (e.g. I (s)= CsV (s) for a capacitor and V (s)= Ls I (s) for an inductor): s = c(1 - z 1 )/(1 + z 1 ), c> 0 . (3) c =1 is typical in a WDF context [2]. Using these two transformations produces a modular WDF comprised of 1) memoryless wave scattering matrices (called “adaptors” in WDF parlance) and 2) discretized one-ports, which appear as digital filters in the WDF domain and may 1 Although the prefix “pseudo-” is standard in the WDF literature [4]— e.g. “pseudo-power,” “pseudo-passivity,” “pseudo-losslessness”—we’ll drop the prefix in this paper for simplicity. 2 https://ccrma.stanford.edu/ ˜ jos/pasp/Wave_Digital_ Filters.html 3 https://ccrma.stanford.edu/ ˜ jos/pasp/Bilinear_ Transformation.html 978-1-4673-7488-0/15/$31.00 ©2015 IEEE