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, *T*_{s} at switching frequency, *f*_{s} = 1/*T*_{s}. 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 *T*_{s}. On the *n*th iteration of the interrupt code, the variables are of the form *x*(*n* x *T*_{s}) and on the previous iteration through the code were of the form *x*[(*n* – 1) x *T*_{s}]. Successive cycles of a discrete-time waveform, *x*(*t*), can be expressed as *x*(*t*) delayed by successive integer multiples, *n*, of *T*_{s}, or as *x*(*t* − *n* x *T*_{s}). 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 (*f*_{n}/(*f*_{s}) 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. *T*_{0} 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 *T*_{0} 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 *T*_{0}, 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 *T*_{mid} 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, ||*x*_{O}/*x*_{I}||.

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 *z*_{i} and *p*_{i} 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/*T*_{s} or *f*_{s} 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*/(*f*_{s}/2) occurs frequently in the *z*-domain. The frequency, *f*_{s}/2, is the *Nyquist frequency*. The frequency interval, [0, *f*_{s}/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 *T*_{s}. 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 *T*_{s} 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, *x*_{o}[(*n* – 1) x *T*_{s}] is *x*_{o} [*n* x *T*_{s}] delayed by one interrupt cycle and in the *z*-domain converts to *z*^{–1} x *x*_{o}(*z*). It is *x*_{o} of the previous iteration; *x*_{o} is delayed by one iteration time. Before the memory location for *x*_{o} is updated by the new calculated value, the old value must first be moved to the previous *x*_{o} 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 *T*_{s}) 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.