Preserving the LTI system topology in s- to z-plane transforms

Similar documents
DIGITAL SIGNAL PROCESSING UNIT III INFINITE IMPULSE RESPONSE DIGITAL FILTERS. 3.6 Design of Digital Filter using Digital to Digital

A NONLINEAR DIGITAL MODEL OF THE EMS VCS3 VOLTAGE CONTROLLED FILTER

Digital Signal Processing Lecture 8 - Filter Design - IIR

E : Lecture 1 Introduction

Lecture 19 IIR Filters

Generation of bandlimited sync transitions for sine waveforms

1 1.27z z 2. 1 z H 2

Chapter 7: IIR Filter Design Techniques

Antialiased Soft Clipping using an Integrated Bandlimited Ramp

Lecture 7 - IIR Filters

Oversampling Converters

Switched-Capacitor Circuits David Johns and Ken Martin University of Toronto

EE482: Digital Signal Processing Applications

ECSE 512 Digital Signal Processing I Fall 2010 FINAL EXAMINATION

Digital Signal Processing

PS403 - Digital Signal processing

Lecture 3 - Design of Digital Filters

The Wien Bridge Oscillator Family

Design IIR Filters Using Cascaded Biquads

Stability Condition in Terms of the Pole Locations

Digital Signal Processing IIR Filter Design via Bilinear Transform

Laplace Transform Analysis of Signals and Systems

ECE4270 Fundamentals of DSP Lecture 20. Fixed-Point Arithmetic in FIR and IIR Filters (part I) Overview of Lecture. Overflow. FIR Digital Filter

ON THE USE OF VOLTERRA SERIES FOR REAL-TIME SIMULATIONS OF WEAKLY NONLINEAR ANALOG AUDIO DEVICES: APPLICATION TO THE MOOG LADDER FILTER

DSP Design Lecture 2. Fredrik Edman.

DSP Configurations. responded with: thus the system function for this filter would be

DIGITAL SIGNAL PROCESSING. Chapter 6 IIR Filter Design

Fourier Series Representation of

Ch. 7: Z-transform Reading

Multirate Digital Signal Processing

Digital Filters Ying Sun

UNIT - III PART A. 2. Mention any two techniques for digitizing the transfer function of an analog filter?

DHANALAKSHMI COLLEGE OF ENGINEERING DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING EC2314- DIGITAL SIGNAL PROCESSING UNIT I INTRODUCTION PART A

Digital Filter Structures. Basic IIR Digital Filter Structures. of an LTI digital filter is given by the convolution sum or, by the linear constant

INF3440/INF4440. Design of digital filters

Matched Second Order Digital Filters

Discrete-time signals and systems

Introduction to DSP Time Domain Representation of Signals and Systems

System on a Chip. Prof. Dr. Michael Kraft

ECE 410 DIGITAL SIGNAL PROCESSING D. Munson University of Illinois Chapter 12

Lecture 17 Date:

Filter structures ELEC-E5410

( ) John A. Quinn Lecture. ESE 531: Digital Signal Processing. Lecture Outline. Frequency Response of LTI System. Example: Zero on Real Axis

DEPARTMENT OF ELECTRICAL AND ELECTRONIC ENGINEERING EXAMINATIONS 2010

Chapter 10 Feedback. PART C: Stability and Compensation

R13 SET - 1

Discrete Time Signals and Switched Capacitor Circuits (rest of chapter , 10.2)

IT DIGITAL SIGNAL PROCESSING (2013 regulation) UNIT-1 SIGNALS AND SYSTEMS PART-A

Digital Control & Digital Filters. Lectures 21 & 22

Computer Engineering 4TL4: Digital Signal Processing

Module 1: Signals & System

REAL TIME DIGITAL SIGNAL PROCESSING

ELEG 305: Digital Signal Processing

Second and Higher-Order Delta-Sigma Modulators

Digital Signal Processing:

Discrete Time Signals and Switched Capacitor Circuits (rest of chapter , 10.2)

CHANNEL PROCESSING TWIN DETECTORS CHANNEL PROCESSING TWIN DETECTORS CHANNEL PROCESSING TWIN DETECTORS CHANNEL PROCESSING TWIN DETECTORS

Lecture 11 FIR Filters

Discrete-Time Systems

LECTURE NOTES DIGITAL SIGNAL PROCESSING III B.TECH II SEMESTER (JNTUK R 13)

Analysis of Finite Wordlength Effects

Grades will be determined by the correctness of your answers (explanations are not required).

Solution of Nonlinear Equations

! Introduction. ! Discrete Time Signals & Systems. ! Z-Transform. ! Inverse Z-Transform. ! Sampling of Continuous Time Signals

Let H(z) = P(z)/Q(z) be the system function of a rational form. Let us represent both P(z) and Q(z) as polynomials of z (not z -1 )

Grades will be determined by the correctness of your answers (explanations are not required).

Lecture 18: Stability

ECE503: Digital Signal Processing Lecture 6

Linear Circuit Experiment (MAE171a) Prof: Raymond de Callafon

2. CONVOLUTION. Convolution sum. Response of d.t. LTI systems at a certain input signal

Music 420 Lecture Elementary Finite Different Schemes

Frequency Dependent Aspects of Op-amps

Discrete-Time Signals & Systems

Digital Signal Processing Lecture 4

ECE 255, Frequency Response

Digital Signal Processing Lecture 10 - Discrete Fourier Transform

Multidimensional digital signal processing

Transform analysis of LTI systems Oppenheim and Schafer, Second edition pp For LTI systems we can write

MUS420 Lecture Mass Striking a String (Simplified Piano Model)

Connectedness. Proposition 2.2. The following are equivalent for a topological space (X, T ).

2.161 Signal Processing: Continuous and Discrete Fall 2008

On the Frequency-Domain Properties of Savitzky-Golay Filters

University Question Paper Solution

3.1 Overview 3.2 Process and control-loop interactions

Ideal String Struck by a Mass

Digital Signal Processing

ECGR4124 Digital Signal Processing Exam 2 Spring 2017

Positioning Servo Design Example

INFINITE-IMPULSE RESPONSE DIGITAL FILTERS Classical analog filters and their conversion to digital filters 4. THE BUTTERWORTH ANALOG FILTER

DEPARTMENT OF EI DIGITAL SIGNAL PROCESSING ASSIGNMENT 1

Chapter 13 Digital Control

Analysis of Discrete-Time Systems

Quadrature-Mirror Filter Bank

Input and Output Impedances with Feedback

Analog and Digital Filter Design

Power Amplifier Linearization Using Multi- Stage Digital Predistortion Based On Indirect Learning Architecture

Multimedia Signals and Systems - Audio and Video. Signal, Image, Video Processing Review-Introduction, MP3 and MPEG2

MULTIRATE SYSTEMS. work load, lower filter order, lower coefficient sensitivity and noise,

Discrete-Time David Johns and Ken Martin University of Toronto

EEL3135: Homework #4

Transcription:

Preserving the LTI system topology in s- to z-plane transforms Vadim Zavalishin May 5, 2008 Abstract A method for preserving the LTI system topology during the application of an s- to z-plane transform is described. The produced discrete-time systems keep the important characteristics of the original continuous-time systems in cases of modulated parameters. A further extension to the case of contained nonlinearities is made. 1 Introduction In music DSP applications, two approaches for conversions of continuous-time (s-plane) LTI systems into the discrete-time (z-plane) case are widely used. The first approach is a general DSP one. It assumes the application of an s- to z-plane transform substitution, usually the bilinear one, to the system s transfer function H(s). The resulting discrete-time transfer function H(z) is subsequently decomposed into biquad sections, with optional 1st-order sections, which are then implemented in one of the classic discrete-time forms such as direct or canonic one, including transposed versions of those. The transfer function H(z) is obviously in the desired relation to H(s), which in case of the bilinear transform can be considered reasonably perfect. However, the specific set of state variables and the topology of the original continuous-time system are completely ignored in this approach. As a result, the obtained discrete-time systems usually exhibit strong undesired artifacts if the system parameters are modulated, especially at a high rate, which is not unlikely in the music DSP Native Instruments GmbH area. Besides, the completely different system topology makes it impossible to model the nonlinearities contained in the original system. The second approach is rather music DSP specific. It starts with decomposing the s-plane system into lower-order elements such as integrators or one-pole filters, which are then converted to the z-plane using the transform approach. For those lower-order systems, one can often construct topologies, which feature nice modulation behaviors. These lowerorder discrete-time blocks are then connected to each other in exactly the same way as their continuoustime counterparts. Therefore, the state variables and the system topology are preserved to a good extent, which usually ensures good modulated-case behavior and also makes it possible to clone nonlinear elements present in the original system. Unfortunately, the resulting systems often turn out to have delayless feedback loops, which means they are not directly implementable. A trivial approach is commonly in use here, to simply put additional z 1 delays into the offending feedback paths. This often results in acceptable transfer functions, except for the high frequency areas and/or certain values of system parameters, where the transfer function gets distorted beyond reasonable, often leading to unstable systems. The usual ways to counteract these effects are to clip the parameters to safe ranges, to design specific methods for the parameter prewarping ([1]), and/or to simply increase the sampling rate. Apparently, a third possiblity exists, which combines the benefits of the first two. Surprisingly, it is much less known. Particularly, the important works on music DSP filter design, such as [1] and [2], make no mention of it. It seems, as if only brief hints to this 1

+ + ω c /2 z 1 + Figure 1: Bilinear integrator. approach, such as [3] exist. 12 This article is supposed to fill the gap. 2 The basics We begin by mentioning the fact, that any differential LTI system can be implemented in a structure diagram consisting only of adders, gain elements and integrators, with a possibility to extend the spectrum of such systems by allowing delay elements. Of these, adders, gain elements, and delays are naturally present in discrete-time systems as well. The integrators need to be converted by means of some s- to z-plane transform, the bilinear one being probably the best choice. A good possible topology for a bilinear-transformed integrator H(s) = ω c /s, where ω c is the cutoff, is shown in Fig. 1 (in some cases, the opposite order of the IIR and FIR parts could be used). Thus, all basic elements are available for the discrete-time case as well. So, for a given continuoustime structure we simply need to replace the integrators by their digital models. Notice, that the transform used to convert the integrators thereby becomes the transform applied to the entire system. Let s take a basic 1-pole lowpass RC-filter as an example. Such filter can be completely equivalently represented in the state-variable form (Fig. 2). Replacing the integrator with its digital model, such as the one in Fig. 1, we obtain a bilinear-transformed 1 While [3] is the first known to the author reference to the discussed approach, the author would like to mention that he has come up with a similar idea independently. 2 Due to the limited author s acquaintance with the respective literature, it might as well be that the approach is already documented elsewhere. Anyway, the author hopes that this article will not be useless. Figure 2: Equivalent state-variable representation of a 1-pole lowpass RC-filter. The cutoff of the integrator is set to ω c = 1/RC. + G(z) k Figure 3: A generic discrete-time system with feedback. digital implementation of the original filter. Notice that the transfer function H(z) of the resulting filter is exactly the result of bilinear-transform substitution into H(s). However, since the integrator in Fig. 1 contains a delayless path from input to the output, our digital filter is not directly implementable. This is pretty much the intermediate result we would have obtained from the second approach mentioned in the introduction. 3 The method Now, instead of inserting a z 1 delay into the feedback, we are going to claim that the digital filter corresponding to Fig. 2 is implementable. We can even extend it to a somewhat more general case, pictured in Fig. 3. Let s consider a fixed discrete time moment n, at which we consider the output signal value y = y[n] as a function of the input signal value x = x[n]. For any difference LTI system, and for G(z) in Fig. 3 in particular, this function will have the linear form: y = f(x) = gx + s where x is the system input, y is the system output, the offset s is defined by the state of the system and by the system parameters, and the instant gain g is 2

defined by the system parameters. Both s and g are fixed at a given n. Typically, g > 0. Often, g 1. Therefore, for the entire system in Fig. 3 one could write: y = f(x ky) = g(x ky) + s (1) where x and y are this time the input and output of the entire system. Instead of rushing to solve the above equation, we first examine its meaning. In the analog world, the signals cannot abruptly change their value. Each element of the circuit, including wires, would have a (possibly negligibly small, but still nonzero) complex impedance, all such impedances working together to smooth the sudden changes. It is suggested to treat the digital structures with a similar approach. E.g. in the case of (1) we would not assume that y instantly takes the value equal to the solution of the equation. Initially y would retain its value from the previous sample y 0 = y[n 1]. Then f(x ky 0 ) would be computed according to (1) producing a new desired value for y. Now the value of y will start changing in a continuous way towards this new value. Simultaneously f(x ky) will be changing further, correcting the destination value for y until both of them coincide, in which case the system has reached the state corresponding to the solution of (1), all of that happening within the duration of the current sample. Solving (1) according to the above spirit we get gx + s 1 + gk y = + sgn[(gx + s) (1 + gk)y 0 ] if 1 + gk > 0 otherwise (2) Notice that for a typical G(z), the system would be unstable for k 1 anyway, although if 1 + gk > 0 such instability would take more than one sample to reach the infinity. Thus we have just described a way to treat the digital system in Fig. 3 as implementable. If the feedback path doesn t contain any nonlinearities, then, by incorporating the explicit computation of (2) into the system structure, the latter can be converted into an equivalent structure without delayless feedback. Of- y + + 1/Q Figure 4: 2-pole state-variable lowpass filter. ten however, one might simply use (2) during the implementation of the system in program code. An extension of the method to the cases of multiple feedback paths is simple, if all paths share at least one common point. E.g. for a 2-pole state-variable filter (Fig. 4) we simply can (temporarily) choose the feedback signal as y, again resulting in an equation of the form (1) (with k = 1). The case of a system, where some interdependent delayless feedback loops do not have a common point, is somewhat more complicated. Still, it is always possible to write a linear equation or a system of linear equations analogous to (1). The extension of the approach to this case is clear. Also, often it is possible to separate the smaller loops into LTI subsystems, which can be converted to equivalent structures without delayless feedback as mentioned earlier. E.g. the ladder filter structure can be decomposed into a number of serially connected 1-pole filters, where each one of those would be converted independently first, thereafter the entire system having only a single delayless feedback loop. 4 Nonlinearities The described method can be extended to the case of systems containing nonlinear elements. We use the ladder filter emulation ([1], [2]) as an example. To reduce the problem complexity, including the computational one, we choose to use a single saturation stage at the feedback mix-in point (Fig. 5). This should be the best point, if only a single saturator is to be used. Notice that the structure in Fig. 5 has a generic character, not restricted to the ladder filter. Let the saturator in Fig. 5 be a memoryless wave- 3

+ S k G(z) Figure 5: Saturation in feedback ( S is a memoryless saturator). s g s h(y) g x/k s + g y shaper defined by the function g In this case (1) becomes x out = S(x in ) (3) y = gs(x ky) + s (4) If S (x) 0 x and if k 0 and g 0 then (4) always has a unique solution, this solution also being in agreement with the nonzero-impedance paradigm. Therefore, we can simply solve (4). If (3) is a second-order polynomial equation relative to x in and x out, then (4) can be easily solved analytically. The same obviously holds, if (3) defines a curve which can be broken into multiple secondorder segments (although a search for the applicable segment will be necessary). This is particularly the case for parabolic: and hyperbolic: { x (4 x ) if x < 2 S(x) = 4 sgn x otherwise S(x) = x 1 + x saturation curves. A very nice curve to use for such saturator is a hyperbolic tangent. It particularly occurs in differential amplifiers, such as ones used in the transistor ladder filter ([2]). In this case (4) takes the form y = g tanh(x ky) + s (5) and is obviously not solvable analytically. Therefore one needs to resort to numeric methods. Figure 6: Graphical illustration of (5). One possibility would be to break tanh x into second-order approximation segments. Another approach is to build an approximation of a function F (u, v) defined as: F (u, v) = tanh(u vf (u, v)) (6) where u = x ks, v = gk. Otherwise the Newton- Raphson method looks like a good candidate, except that some convergence problems may occur for poorly chosen initial values. To come up with a reasonably good initial value choice we consider (5) as an intersection of a hyperbolic tangent curve g tanh(x ky) with a straight line y s (Fig. 6). Looking at the picture, we come up with the following rule. If s g < x/k < s + g, then the initial point is y = x/k. Otherwise one of the points s g and s+g (the one lying between s and x/k) is chosen. This choice ensures the monotonous 3 convergence of the algorithm. For 0 < g 1 and 0 k 8, which are reasonable ranges (particularly for the ladder filter), it was found that about 5 iterations are generally necessary for the convergence to 10 5 precision. Yet another iteration will generally double the number of digits. A number of tricks can be further employed to reduce the computation times. E.g. one could use an approximate computation with reduced precision at earlier iterations. A second-order segmented approximation of tanh x or an approximation of (6) might be 3 Because the initial point is lying between y = x/k and the true solution. 4

used improve the initial value choice. Once could also first check whether the previous output value y[n1] doesn t provide a better initial guess, although the convergence speed may significantly vary in this case. Returning to the generic nonlinearity S(x), we d like to mention a cheap and dirty but computationally efficient approach, which is to simply solve (1) against x ky, allowing the possibility of infinite results, and then compute S(x ky) just once. The discussed nonlinear-case method can be also generalized to a case of multiple contained nonlinearities, However, the solution of the equation similar to (4) will become more computationally intensive, and in certain cases more challenging. If k < 0 and/or if the saturation curve is having a complex shape, such that (4) can have multiple solutions, the nonzero-impedance approach can be used to pick up the right one. 5 Conclusion The described method allows the conversion of continuous-time LTI system prototypes to discretetime implementations with the transfer function mapped according to the desired transform formula, while the system topology and state variables are preserved. Thus one can obtain implementations which have high quality amplitude and phase responses and simultaneously have nice behavior in the modulatedparameter case and (if desired) certain nonlinear elements of the original prototype. Obviously the same method also can be applied to the direct construction of discrete-time systems. The practical cases of application of the method include filters, phasers, flangers, etc. Since even bilinear-transformed systems feature significant highfrequency warping in their responses compared to the original prototypes, sampling rates higher than 44kHz might still be desired. The nonlinear case, often requiring iterative numeric methods, is significantly more computationally intensive. Taking the aliasing produced by the nonlinearities into account, an oversampling at a higher rate instead of solving (4) might often provide a reasonable compromise at better performance. Acknowledgements The author would like to thank NI, particularly Daniel Haver, Tom Kurth, Nicolas Gross, and Andreas Gloggengiesser for their support and for helping him to release this article. Very special thanks to Stephan Schmitt. References [1] Stilson T., Smith J.O. III Analysing the Moog VCF with Considerations for Digital Implementation. http://ccrma.stanford.edu/ stilti/papers [2] Huovilainen A. Non-linear Digital Implmentation of the Moog Ladder Filter. Proc. of the 7th Int. Conference on Digital Audio Effects (DAFx 04), Naples, Italy, October 5-8, 2004 http://dafx04.na.infn.it [3] Landeholm E. Zero delay feedback using sample prediction. Posted Mar 8, 2002 to the music-dsp mailing list http://music.columbia.edu/pipermail/music-dsp c Vadim Zavalishin. The right is hereby granted to freely distribute this article further, provided no profit is made from such distribution. 5