# Mixed-Signal Circuits, Part 1: From s to z – The Discrete Complex-Frequency Domain

Analog circuit design is increasingly encountering mixed-signal circuits, and analog engineers need some understanding of discrete-time sampling circuits, whether they are sample-and-hold circuits or ADCs and DACs. This article series is a mini-tutorial on the discrete complex-frequency domain and its complex variable denoted as z . Only a few decades ago, this was the specialized area of DSP, but now DSP is in the mainstream of what an electronics engineer needs to know. “Mixed-signal” waveforms are discrete in time but continuous (analog) in value.

ADCs and DACs have the same dynamics, only as inverse functions. What applies to one inversely applies to the other. The latch following an ADC performs the hold function and the clock the sampling function. The same is true for a DAC, except that the latch precedes the analog circuitry instead of following it.

Discrete-Time Waveforms and How z Relates to s

Discrete-time intervals are almost always regular intervals of switching period, Ts at switching frequency, fs = 1/Ts . In μC software, these times are usually interrupt times where the interrupt is driven by a fixed clock, usually a system timer. Each successive iteration of the interrupt code is delayed by Ts . On the n th iteration of the interrupt code, the variables are of the form x (n x Ts ) and on the previous iteration through the code were of the form x [(n – 1) x Ts ]. Successive cycles of a discrete-time waveform, x (t ), can be expressed as x (t ) delayed by successive integer multiples, n , of Ts , or as x (tn x Ts ). In the s -domain these delayed cycles in time (meaning that they happen in the future, or to the right on an oscilloscope screen) are Laplace-transformed to become The second factor appears so often in continuous-frequency expressions of discrete-time circuits that it is defined as where s is the usual complex frequency, ζ is the damping and ω n is the undamped or resonant frequency, the magnitude of s . Expressed in pole angle, φ , then ζ = cosφ and When z is expanded as an s -domain expression, substituting for s , In polar form, the magnitude of z is related to s by Because z is a function of a complex number, s , it is also complex. The angle of z , or ϑ , is related to the angle of s as ϑ is related to φ by the scaling factor, 2 x π x (fn /(fs ) and varies nonlinearly (sinusoidally) with φ . Real poles and zeros in s (pole angle, φ = 0) are real in z (ϑ = 0).

Normalized Transfer Functions and Frequencies – a Digression

Functions in z are often considered to be in the “discrete complex-frequency domain”, but that expression can be misleading. In the s -domain, s is a frequency, in units of s −1 or Hz. Both real ( σ ) and imaginary ( ω ) components of s have the same units. Then transfer functions in s can be expressed in normalized form as Normalized form makes the transfer function s -dependent factor – the rational function – to have a value of one at s = 0 s –1 for n = 0. T0 is the quasistatic (0+ Hz) gain. With one or more poles at the origin (n ≠ 0), the transfer function value at s = 0 s –1 is infinite. The downward-sloping magnitude plot can be moved up or down by the value(s) of p 0 . Instead of having T0 as the quasistatic gain, an alternative characterization is where the slope of the plot from the origin crosses a gain of one, at p 0 . Sometimes p 0 is lumped in with T0 , but then the unity-crossing frequency is lost, a frequency which helps to characterize the Bode magnitude plot.

As an example, the magnitude plot shown below has a pole at the origin which decreases at a slope of −1 on a log-log graph until a zero at z 1 bends it to the horizontal. In the mid-frequency range, the gain is a constant Tmid until another zero bends the plot upwards at zero, z 2 . If the slope of the pole at the origin is projected to the gain-of-one axis (0 dB), it intercepts it at a frequency of ωp . This is p 0 in the normalized transfer function expression, ||xO /xI ||. By expressing transfer functions in normalized form, the units of the poles and zeros and s can be either s −1 or Hz, but must be the same. Usually, s is in units of s −1 , but can be in Hz if the zi and pi are also in Hz because the 2 x π factors in 2 x π x f of each cancel when in ratios.

However, the discrete variable, z (not a transfer function zero) is not defined as a frequency as is s . The 1/Ts or fs factor of s in the exponential of z is in Hz and can be expressed in the steady-state as z (j x ω ); The ratio of frequencies, f /(fs /2) occurs frequently in the z -domain. The frequency, fs /2, is the Nyquist frequency . The frequency interval, [0, fs /2) is the Nyquist interval . At and above the Nyquist frequency, waveform aliasing in the time-domain behavior occurs. Within the Nyquist interval, design and analysis of time-domain (or “real-time”) systems usually occurs.

Why z Is Useful

Instead of being a frequency, z consequently is a function of a ratio of frequencies, or frequency normalized to the Nyquist interval. In the time domain, z is a time advance (because the exponential is positive) of Ts . A time delay of one switching cycle is then z −1 . This makes transformation from difference equations in time of sampled circuits to the z -domain simple. Computer algorithms in particular are all written as difference equations in time. Values of variables from previous iterations at intervals of Ts are combined in code. Likewise, a control algorithm expressed in z can easily be implemented in interrupt-driven code as difference equations in time. z can be regarded as a time-sequence domain.

For instance, suppose in the μC some code implements the following equation for a feedback loop compensator: where a and b are constants. The variable, xo [(n – 1) x Ts ] is xo [n x Ts ] delayed by one interrupt cycle and in the z -domain converts to z –1 x xo (z ). It is xo of the previous iteration; xo is delayed by one iteration time. Before the memory location for xo is updated by the new calculated value, the old value must first be moved to the previous xo memory location.

The above recursion equation converts to The transfer function in z is thus This transforms to the s -domain by substituting z = exp(s x Ts ) and results not in a continuous (analog) function but in a piecewise-continuous function that in the time-domain is a stair-stepped waveform. However, we began with discrete sample-points in time for a waveform. To go from z to s , a sample-hold function is required, to convert sample points to stair-steps. To investigate this aspect of discrete behavior further, we look further at sample-point sequences in the s -domain.

Discrete-Time Waveforms in the s -Domain

From math, a series is a sum of a sequence . In the s -domain, an infinite series of delays of Ts can be expressed as When inverse-transformed to t , this is not a sequence of discrete sample points but instead is a sequence (or “train”) of impulses, δ P (t ), shown below along with its s -domain transformation, ΔP (s ), which is also an impulse train with frequencies occurring at harmonics of the sampling frequency. The inverse Laplace transform of 1 is δ (t ), the impulse function, denoted graphically by an upward-pointing arrow. A unit impulse occurs at a point in time, having infinite amplitude and an integrated area of one. Thus, by integrating an impulse train, a sequence of discrete points in time results at the sampling instants, n x Ts with a value of one. This is what the hold function of a sample-and-hold (S&H) circuit does. ADCs and DACs are essentially S&H functions with different representations of the same quantity at their inputs and outputs.

By multiplying v (t ) by δP (t ), the result is an impulse-sampled sequence of v (t , expressed in the s -domain as the series, where the * (“splat” or “star”) indicates an impulse train or sampled function. If this is rewritten in z , it becomes and the rightmost expression can be transformed easily to time-domain difference equations. Actually, it is in the time domain if you interpret z–k as a time delay of k x Ts . Consequently, we can move easily from t through z to s in this way, though dynamic analysis can also be done in z , with somewhat different rules than the control-theory rules that apply in the s -domain. To summarize an important transformation, The above notation has taken the liberty of using the same symbol, x , in all the domains when in fact, the functions are transformed into different functions in each of the domains. That is why the symbol for the Laplace transform of x is conventionally the upper-case X , to denote a different though corresponding function. With multiple domains, however, multiple different function symbols can become unwieldy. By using the same symbol for different functions, the independent variable of the function (the domain variable) identifies the function. In other words, x (z ) is not x (s ) with z substituted for s ; it is x (s ) transformed to x (z ). (Used in this way, x is a “super-function”, otherwise referred to in group theory as an isomorphism .) And while we are on notation, an often-used short-cut notation for writing x (k x Ts ) in some literature is x k , keeping in mind that k iterates in time by multiples of Ts .

Discrete-time difference equations transform easily to and from the z -domain as the previous example showed. To go from z to s , substitute the s -domain definition of z (and not s for z ). The result is not a continuous x (s ) but a discrete s -domain x *(s ). What we can do with an impulse-train representation of v , or v *, remains to be seen. Impulse trains are an abstraction, an artificial construct that can simplify thinking about sampling systems. Sampler circuits exist, for example, in sampling oscilloscopes. When they occur in sample-and-hold circuits (as are ADCs and DACs), samplers are always followed by hold circuits. The functional decomposition into separate sampling and hold functions is conceptual and mathematical. In the circuitry, they occur together.

In the s -domain, z is an infinite series of poles, derived from the polynomial power-series expansion of z as an exponential in s . Familiar s -domain analysis becomes unwieldy with too many poles or zeros, which has led to the use of z for sampled or discrete-time systems. Because of the infinite series in s , a waveform, v *(s ), repeats along the jω-axis at frequency intervals of s , or This is the familiar effect of modulation from communications theory. The Nyquist interval is the first of this repeated sequence of frequency bands fs -wide along j ω , and in communications circuits is the baseband waveform of v (t ).

In Part 2, we will look at mixed-signal circuits that have feedback loops implemented partly in analog and partly in digital (microcomputer) circuits.

## 0 comments on “Mixed-Signal Circuits, Part 1: From s to z – The Discrete Complex-Frequency Domain”

This site uses Akismet to reduce spam. Learn how your comment data is processed.