Designcon2012 Lecroy S-Parameters Discrete Frequency Continuous Response PDF
Designcon2012 Lecroy S-Parameters Discrete Frequency Continuous Response PDF
Designcon2012 Lecroy S-Parameters Discrete Frequency Continuous Response PDF
Author(s) Biography
Pete Pupalaikis was born in Boston, Massachusetts in 1964 and received the B.S. degree in
electrical engineering from Rutgers University, New Brunswick, New Jersey in 1988.
He has worked at LeCroy Corporation for 16 years and currently manages integrated-circuit
development and intellectual property as Vice President of Technology Development. Prior to
LeCroy, he served in the United States Army and as a consultant in embedded systems design.
Mr. Pupalaikis has numerous patents in the area of measurement instrument design and is a
member of Tau Beta Pi, Eta Kappa Nu and the IEEE signal processing, instrumentation, and
microwave societies.
Zs
Zl V sm =V lm
VS
V sm=V lm
a
Zs S 1 2
V so Zl
VS V lo
V so V lo
Introduction
A common and exemplary situation in a simulation is to determine the effect at a load of a circuit
driven at its source by a known waveform. One way to do this is to define a source waveform
under a normal set of conditions and to determine a transfer function that is a ratio of the voltage
at the load under conditions containing the circuit to the voltage at the source under more
normal and deterministic conditions.
A virtual probing1 simulation environment is shown in Figure 1 where a two port network is
driven with a source impedance Z s and a load impedance Z l . The relationship between the
voltage at the load with the two-port network in the system and the the voltage at the source and
load without the two-port network (i.e. source and load directly connected) can be shown to be
(1):
V lo S 21 (1−Γl Γ s )
H= = (1)
V sm 1−Γs S 11 −Γ l S 22 +Γs Γ l∣S∣
In (1), the reflection coefficients are related to the impedance Z by an arbitrary reference
impedance Z 0 , usually 50 Ω as (2):2
Z −Z 0
Γ= (2)
Z +Z 0
1
See P. J. Pupalaikis et al., “Virtual Probing”, US Patent 7,660,685, filed Aug 2007
2
Note that if the source and load impedance in (1) is matched to the reference impedance Z 0 , then (1) becomes
H =S 21 . This is the source of the simplification that the transfer function equals S 21 .
1
Setting Γl =1 and Γ s=−1 in (1) to correspond to a low-impedance source and a high-
impedance load, we obtain (3):
2 S 21
H= (3)
1+S 11−S 22 −∣S∣
Considering (3), here we have a transfer function that provides for a two-port circuit or network
situated between two buffers.3 The transfer function is providing the frequency response of the
system that supplies the relationship to the waveform at a receiver buffer to a waveform that
would be present when the source buffer is terminated in high-impedance. Since the network is
described by s-parameters, we know that we are provided a finite number of two-by-two
matrices containing complex numbers corresponding to a number of chosen frequency points.
The transfer function as shown is therefore valid for the same discrete frequencies as the s-
parameters and in this case is a single complex response per frequency point. Since the system is
linear, it is reasonable to convert this complex frequency response into an impulse response and
to convolve this impulse response with the time-domain waveform representing the output from
the source to obtain the waveform at the receive side. One reasonable way to do this is to use
inverse discrete Fourier transform (IDFT) methods.
Consider, for example purposes, that the two-port network is actually a series resistance followed
by a shunt capacitance as shown in Figure 2. The s-parameters of a two port network containing
a series impedance Z r connected to a shunt impedance to ground Z h is shown in (4):
Z r Z h+Z s Z 0 −Z 20
S=
1
(
2
Z r Z h +2 Z h Z 0 +Z r Z 0+Z 0 2 ZhZ0
2 ZhZ0
Z r Z h−Z r Z 0 −Z 20 ) (4)
Here, s= j 2 π f is the Laplace variable. The concept here is that (1) and (3) present discrete-
frequency transfer functions of s-parameters and (6) and (5) are related continuous-frequency
3
A buffer is considered as a device with unity forward gain, infinite input impedance and zero output impedance and
perfect reverse isolation.
2
functions. Since (3) and (1) involve only s-parameters, the concept of an RC network is lost.
This is one of the features and drawbacks of the direct use of s-parameters.
To summarize:
1. s-parameter based transfer functions involve discrete frequencies.
2. In s-parameter based transfer functions, the underlying topology of a network is lost.
These are both features and drawbacks of the use of s-parameters because while the circuit
topology is lost, it allows for the development of transfer functions that are independent of
topology. But it is assumed that the discrete-frequency nature of the system still allows for
proper simulation of systems as if the transfer function was continuous. Engineers rely on this
being true otherwise there would be no point in simulations in this manner. It will be shown that
discrete frequency s-parameters can provide valid simulations as long as certain criteria are met
to a large extent. When these criteria are not met, invalid and often nonsensical results come
from simulation. This paper is designed to help the user of s-parameters in simulation avoid
certain pitfalls.
It should be pointed out that all of the problems endemic to the direct usage of s-parameters can
be avoided by fitting models to a system. This means that given a knowledge of the circuit
topology, one can fit the values of the circuit elements such that the resulting model matches the
s-parameters provided. In this example, if we knew or assumed that the circuit consisted of an
RC network, we could utilize (4) and calculate the partial derivatives with respect to each
presumed circuit element, namely the series and shunt impedance. Better yet, and simpler,
would be to choose a value of τ that makes the transfer function in (6) match the transfer
function of (3) based on s-parameters provided.
There are many problems and benefits in fitting of models to s-parameters. This paper does not
deal with that topic and deals only with the direct usage of s-parameters in simulation.
While an RC network is not necessarily the most practical s-parameter usage example, we will
use an RC network for all of the examples in this paper because the expected characteristics of
the network are well known and because this type of network has certain characteristics that
highlight the type of problems that can crop up.
Equation (7) shows a very complicated relationship between the continuous- and discrete-
frequency responses and introduces certain notation. While stepping through this equation, we
will define various intermediate responses that will help our understanding.
3
The first step on the left inside the parentheses is to multiply the continuous-frequency response
H ( f ) by the rectangle, or boxcar function Π( fT ) . The boxcar function is defined with its
corresponding inverse Fourier transform as (8):
{ }
1
0 if ∣ f ∣>
2
Π( f )=rect ( f )= 1 1 sin(π t)
if ∣ f ∣= F −1 {Π( f )}=sinc(π t)= (8)
2 2 πt
1
1 if∣ f ∣<
2
The boxcar function limits the bandwidth of H ( f ) to 1/2T where T is defined as the sample
period4. Therefore we can define an intermediate band-limited response as (9):
H bwl ( f )=H ( f )⋅Π( fT ) (9)
Substituting (9) in (7) allows us to write (10):
Ĥ ( f )= H bwl ( f )⋅Δ ( f ) ∗Δ 1 ( f )
( 1
KT ) T
(10)
The next step is to multiply the band-limited response H bwl ( f ) by the sampling function
Δ 1 ( f ) where the sampling function is defined for both the time- and frequency-domain as
KT
(11) and (12) and K is defined as the integer impulse-response sample length:
+∞
Δ T (t )= ∑ δ(t−k T )=F −1 Δ 1 ( f )
{ } (11)
k =−∞ T
+∞
1 n
Δ 1 ( f )=
T ∑ δ( f −
T
)= F {Δ T ( t )} (12)
T n=−∞
The application of the sampling function effectively sampled the band-limited response such that
we are now left with discrete frequencies allowing the definition in (13):
H disc ( f )=H bwl ( f )⋅Δ 1 (f) (13)
KT
4
Note that the boxcar function limits both the positive and negative frequencies. The continuous-frequency response
is assumed to have both positive and negative frequency content.
4
H(f )
Band-limit
H bwl ( f )
Sample
H disc ( f )
Repeat
Ĥ ( f )
1
KT 1
1 2T
T
Figure 3 - Continuous- and Discrete-Frequency Response Relationship
The final step, therefore is to convolve the discrete-frequency response H disc ( f ) with the
sampling function Δ 1 ( f ) . Convolution with the sampling function causes the response to
T
repeat over and over again with a spacing of 1/T .
The frequency-domain implications of (7) are shown graphically in Figure 3. In Figure 3, we
see the conversion process from a continuous-frequency function to a repeating discrete-
frequency function.
Now let's examine each of these steps in detail from the time-domain perspective.
In the first step, we band-limited the response using a boxcar function. This boxcar function
limited the response to ±1/2T in frequency content. When the discrete-frequency response that
arises from s-parameter models is used, there is an implicit sample period T and corresponding
5
sample rate 1/ T associated with the response which is roughly5 twice the final frequency point.
As shown in (8), the boxcar function has the sinc function as its inverse Fourier transform. Since
we multiplied the response by the boxcar function in the frequency domain, this is the same as
convolving the impulse response with the sinc function in the time-domain. This band-limiting
step is the cause of most causality issues associated with s-parameter based simulations although
it will not cause tremendous issues unless you choose to simulate a sample rate that is different
than that specified by your s-parameters6. Obviously, the band-limiting step will not cause any
problems if the response itself is actually band-limited already.
Let's now define some time-domain responses:
−1
h(t)=F {H ( f ) } (15)
and:
t
h bwl (t )=F −1 {H bwl ( f ) }=h(t)∗sinc(π ) (16)
T
In the first step, we saw that the effect of limiting the bandwidth of the continuous-frequency
response which is the same as choosing the highest frequency point in the s-parameter data is a
first point of divergence from good s-parameter based models. The second step also has a large
and often ill-understood effect. We saw that that the second step is to frequency sample the
band-limited response with a frequency spacing of 1/KT by multiplying H bwl ( f ) by the
sampling function Δ 1 ( f ) to produce H ( f ) . K is the total number of frequency points that
disc
KT
will be present after sampling – but it contains both positive and negative frequencies of the
continuous-frequency response. Multiplication in the frequency domain is the same as
convolution in the time domain so we are effectively convolving the band-limited response with
a train of pulses:
+∞
h disc (t)=F −1 {H disc ( f ) }=h bwl (t )∗Δ KT (t)=h bwl (t )∗ ∑ δ (t −kKT ) (17)
k =−∞
Examine how the last part of (17) is written and realize that h disc ( t ) is periodic and is an infinite
sum of delayed and advanced values of h bwl (t ) that are separated by a time K T as shown in
Figure 4. We call h disc ( t ) the impulse train response. It is important to understand that
periodicity in one domain is always associated with discreteness in another domain. It is the
frequency sampling (i.e. the discreteness in frequency) that caused the time-domain periodicity.
The overlapping responses are another source of problems in s-parameter based simulation
models. We see that the frequency spacing of 1/KT as shown in Figure 3 and provided in (44)
determines the time spacing KT in the impulse train that produces the impulse train response. If
5
Strictly speaking, the sample rate might not be exactly twice the final frequency point depending on whether K is
chosen as even or odd.
6
While there are certainly other possibilities for causality issues, the effect outlined here is specifically caused by
using s-parameters because of their band-limited nature.
6
h( t+4 K T )
h( t+3 K T )
h( t+2 K T )
h( t+ K T )
h( t)
h( t− K T )
h p( t )
0 KT
Figure 4 - The Impulse Train Response
KT is chosen to be too short a time duration (or similarly if 1/KT is chosen as too long a
frequency duration), the impulse responses interfere with each other significantly. This effect is
called time-aliasing. Time-aliasing is caused by sampling the frequency response, just as the
more familiar effect of frequency-aliasing is caused by sampling time-domain waveforms.
The final step was to convolve the discrete-frequency response H disc ( f ) with the sampling
function Δ 1 ( f ) which caused the response to repeat over and over again in frequency with a
T
spacing of 1/T . Again looking at the time-domain, this is the same as multiplying the time-
domain response h disc ( t) with the sampling function Δ T (t) :
̂
h(t)=F
−1 ̂
{H ( f ) }=hdisc (t )⋅Δ T (t) (18)
From the time-domain perspective, this final step serves only to sample the continuous-time
response h disc (t) to make it into discrete elements.7 What is interesting about this effect is the
effect already mentioned in the frequency-domain – that of causing the frequency response to
repeat over and over with a period 1/T. If the response were not already band-limited to 1/2T,
frequency aliasing would occur because the overlapping responses would be summed together in
7
It's interesting that while H disc ( f ) was named for being discrete, it is discrete in the frequency-domain only.
h disc( t) is not discrete.
7
h(t )
( Tt )
sinc π
Band Limit
h bwl (t )
Δ KT (t)
h disc (t)
Δ T (t )
Sample
̂ )
h(t
the frequency-domain this time. But the band-limited nature causes only repetition. As it turns
̂
out, although the response h(t) is a sampled response, there is no possibility for frequency
aliasing as the band-limit frequency is always the same as pulse-train period in the frequency
domain. This makes sense because intuitively it is impossible to cause frequency aliasing by
taking frequency samples, just as it is impossible to cause time aliasing by sampling in the time-
domain. Sampling in one domain only has the possibility of aliasing in the other domain.
The time-domain implications of (7) are shown graphically in Figure 5.
In summary, in this section we have provided an equation (7) that provides both the frequency
and time-domain effects in the process of equating a continuous-frequency with its discrete-
frequency counterpart. During the examination of the steps in this process, we've identified two
specific areas of concern. The first area of concern is the band-limiting of the response. The
second area of concern is the possibility for time-aliasing. One area not of concern but
8
highlighted here is the implicit repetitive nature of both the time- and frequency-domain
response associated with the discrete-time and discrete-frequency responses.
The band-limiting of the response, although seemingly obvious, requires some discussion
because it creates some nonintuitive results. We see by examining Figure 5 that the band-limited
response of the RC network looks quite different from the continuous response as it exhibits the
familiar Gibbs phenomena with its pre-shoot and ringing. But note that this pre-shoot and
̂
ringing will not be present in the final response h(t) to a large degree. This seems strange until
you realize that the band-limit frequency is exactly one-half the reciprocal of the sample period.
In other words, if we sample the sinc function used to band-limit response which is sinc( π t /T )
with the sampling function used to sample the response which is Δ T (t) which is a train of
sample pulses separated by time T , we are sampling with a sample time t=kT and therefore
we have sinc(π k ) which is unity at time zero and zero elsewhere. There will still be slight
errors at the edges due to the phase, which we will talk about later.
We have chosen here to associate the sample period of the impulse response with the bandwidth
limit associated with the frequency response but this association does not hold when the discrete-
frequency response is re-sampled onto a different frequency grid for simulation at sample rates
other than that associated with the discrete-frequency response. When the discrete-frequency is
re-sampled, it's analogous to sampling the sinc function at a different rate which exposes the
Gibbs phenomena.
The second area of concern highlighted is the possibility for time-aliasing. We have shown that
this effect causes the continuous-time impulse responses to overlap.
Both of these areas of concern cannot usually be totally mitigated. The band-limiting effect is
mitigated by choosing the highest frequency for the discrete-frequency response as high as
possible. Generally, this means choosing it such that the response is significantly attenuated
prior to the band-limit response. In some situations this is easy, but when working with s-
parameter data, things become more difficult. This is because in high-frequency systems, while
the thru-response (e.g. S 21 of a two-port) drops with frequency, the return-loss (e.g. S 11 )
generally increases. In (1) and (3), we see a situation that depends on S 11 and S 22 . Often, in
microwave systems, it is impossible to choose a frequency that completely mitigates the band-
limit effects. The best that can be done is to ensure that the highest frequency point is equal or
above one-half the maximum sample rate used in simulation, to ensure that the frequency content
9
K K
k =0 +1 K −1
2 2
t=0 −T
KT − K −1 T
2 2 ( )
Figure 7 - Time Sense of Impulse Response
of any stimulus applied to the system is limited to this highest frequency and to examine transfer
functions to ensure that they are not overly sensitive to impedance match at high frequencies.
Mitigating the time-aliasing effect is achieved by taking enough frequency points with a small
enough frequency spacing such that the impulse responses that form the impulse train response
do not overlap. We can see that this is governed by the choice of K once the sample period T has
been chosen. This choice can often be inferred by knowledge of the electrical length of the
device. While KT is the impulse response length, it is not the electrical length. The impulse-
response length must usually be chosen such that it is significantly longer than the electrical
length. To understand this, consider a long cable that is significantly mismatched in impedance
with the source and load impedance. Stimulating this cable causes waves to reflect back and
forth from the interfaces. Fortunately, because of loss, these reflections eventually die down
sufficiently, but in cases with low loss, many multiples of the electrical length must be chosen
for KT . In highly lossy systems, especially systems that are well matched at frequencies where
loss is low, sometimes four times the electrical length is sufficient. One thing that should be
pointed out is that while it appears that the requirement is for the impulse response to die out
before KT time expires, the requirement is actually more stringent. This is because the impulse
train response causes us to lose absolute sense of time and we must make a choice. We must
decide whether the end of the impulse response near the time KT is the end of the impulse-
response or the beginning of the next in the impulse train response. This becomes important
when the band-limiting effect outlined previously causes causality violations, and the end of the
impulse response contains the causality violation in the next impulse-response in the train. To
deal with this, we enforce that the second half of the discrete-time impulse-response contains
response that occurs before time zero and that the first half of the discrete-time impulse-response
contains response that occurs before time zero. This is shown for even K in Figure 7.
10
If a continuous-frequency system has zero frequency response after 1/T and has an impulse
response strictly limited to KT /2 , then the discrete-frequency response, while in discrete form
contains all of the information necessary to completely replicate the continuous-frequency
response. This statement is analogous to the sufficiency of sampling rules most are familiar with
with regard to sampling of time-domain waveforms for no aliasing and perfect reconstruction.
It should be noted here that the relationship provided in (7) holds strictly for evenly spaced
frequency and time points. This is because the sampling function applied in the frequency-
domain is Δ 1 ( f ) . This situation has been chosen because, while not required, causes the
KT
discrete-frequency response and the associated discrete-time impulse-response to be related
through the discrete Fourier transform. We will show ways later for dealing with unevenly space
frequency points.
11
vector of responses at discrete-frequencies and the notation X is used to refer to DFT elements,
which are slightly different. We will refer to h as the vector of impulse-response points and the
notation x as the IDFT of X . We will use either notation depending on whether we're talking
about impulse responses or the IDFT.
With this said, before we talk about the two main choices of last frequency point and frequency
spacing, we should recognize that the specifics of both of these choices insofar as DFT methods
are concerned are intricately linked with the concept of sample rate and impulse-response length
from a digital simulation standpoint. Instead of providing pages of explanation on this
relationship, a concise set of equations are provided in Appendix A - Relationship Between
Response Elements and DFT Elements. Here all of the details are provided which are quite
wrapped up in choices of whether the final impulse-response length is chosen even or odd. It is
an arbitrary choice because for N +1 frequency points, we can always choose K =2N for an
even K or K =2N +1 for an odd K . Since it is undesirable to carry all of the details
associated with even or odd K forward through this paper, even K is chosen to illustrate all
subsequent points.
The first choice needed in dealing with a discrete-frequency response is to first choose the upper
frequency point. The nature of the choice is to choose the upper frequency high enough such
that the response is attenuated enough at and beyond the upper frequency for the band-limiting
effect to be as insignificant as possible. Unfortunately, the choice of upper frequency insofar as
s-parameter measurements are concerned are often dictated by the limitation of a measurement
instrument when s-parameter measurements are concerned. Another inconvenient fact regarding
high-frequency systems is that while the off-diagonal responses (the response from one port to
another) generally drop in magnitude as frequencies increase due to loss in the device, the
responses on the diagonal which determine the match of the port to the reference impedance
generally increase with frequency. In many cases, there is no real limit to how high of a
response you need and as you can see in systems like described in (1) and (3) , the response
depends on these diagonal elements ( S 11 and S 22 in the equations referenced). This can be a
real problem. The RC network example is really problematic (which is why it was chosen)
because it can be shown that the upper frequency required for the response in (6) to be attenuated
by a reasonable amount like -40 dB is 16/ τ meaning that for a response with a time-constant of
100 ps, a 160 GHz upper frequency is theoretically required!
For even K , this upper frequency point f N is exactly half the sample rate used for digital
simulations, so often the exact choice of sample rate factors into the determination of f N as
well. In other words, we choose a sample rate for the simulation such that half the sample rate
meets the attenuation criteria already stated.
Next, K is actually chosen in conjunction with the sample period T such that the impulse
response h is settled to near zero at and after time KT /2 . Note that in the case of the RC
network, five time constants is adequate to settle to less than 1/100th the initial voltage. If you
are provided with s-parameter data that has not been sufficiently sampled frequency-wise, there
is no good method of recovery. A good way to check the data is to verify whether more s-
parameter frequencies are needed is to verify that as the frequency spacing is changed that the
impulse response features all move in the right direction. For example, if one were to increase
12
KT and find that features in the impulse response move to the left, this is a sure sign that time-
aliasing is occurring. The goal is to produce data whose impulse train response does not exhibit
time-aliasing and whose response is settled to zero or near zero in the latter half of the response.
The reason why we want this is because of the time relationships offered in (37) and we will
want to be able to distinguish clearly between time before and after the impulse response to deal
with possible causality issues. In general, we say that the the latter half of the time domain
response h disc (t) contains the response before time zero and that the first half of the response
contains the response after time zero.
One note here is that engineers are often asking how many frequency points should they take for
the s-parameters. Since the end frequency is usually set, they are really asking about the
frequency spacing. Often the choice is made surrounding a notion of frequency resolution
needed to resolve various nooks and crannies of the frequency response but here we see that a
more compelling method is to base the choice on the time-domain! Note also that our example
here involved a simple RC network – not something that would seem to require large amounts of
frequency resolution. Clearly we can see that the value of KT should be chosen large enough to
mostly isolate the impulse responses.
e j θ +e− j θ
( )
n n
H N −σ = An (19)
2
Of course, the cosine waves are all summed together for each n for form the total time-domain
impulse-response. For K even, the last point is not paired, however, and the response
jθ
H N =A N e N
must be real for this summation to lead to real values of h .
This seems like a problem only for even K , but in reality, what this requirement really wants is
for the phase to be a continuous function, but strictly speaking, the continuity of phase is only
important when the magnitude response is non-zero near the discontinuity. In other words, the
smaller the magnitude response, the less important the phase discontinuity.
13
Figure 8 - Magnitude and Phase of an RC Network
To illustrate this, Figure 8 shows the magnitude and phase for an RC network. The negative
frequencies have been plotted to the right of half the sample rate to illustrate the discontinuity.
The magnitude is continuous at half the sample rate, but derivative discontinuous. The phase is
not continuous. As an exercise for the reader, try taking the DFT of samples from the impulse-
response of an RC network. You will find that the phase response starts it's downward trend as
in Figure 8, but then bends upward towards 0 at the end!
Given the discrete-frequency response H , we plot the discrete-time impulse response by
computing h k =∣H n∣cos (2 π f n t k +arg ( H n )) . Note we have side-stepped for the moment the fact
that H N is not real by not trying to compute the IDFT, but rather by simply summing co-
sinusoids. The result is plotted in Figure 9 where we see a causality issue.
To show where this is coming from, we determine a value Td such that:
− j 2 π f N Td
arg ( H N ) ' − j 2 π f n Td
e H N ∈ℜ Td= H n=e Hn (21)
2π f N
The phase response of H ' is plotted in Figure 10 where we can see that H N is indeed real.
Now we compute h k =∣H n∣cos (2 π f n t k +arg ( H n)) which is plotted in Figure 10 where we see
' ' '
that the causality issue has been largely resolved. There is an implication here that everything
14
Figure 10 - Phase and Impulse Response of Time Delayed RC Network
can be fixed by correcting the phase so that it reaches zero at the end frequency but in fact it
cannot. The phase is very smooth for the example used (i.e. nearly derivative continuous) which
will not generally be the case. When the phase is not smooth often no amount of fiddling with
phase through introduction of a time-delay can completely resolve the non-causality. Often, this
effect can only be minimized.
In this example provided, we advanced the impulse response8 to improve causality. This is
because the causality issue here was not caused by true causality violation, but rather because the
previously non-continuous group delay caused the main impulse point to appear inside of a
fractional sample. We could have just as well delayed the waveform to cause this same
improvement.
Dealing with causality this way requires us to remember the amount of advance or delay applied
so that it can be applied later in simulation. It turns out that this is only pushing the problem
upstream. This can be understood by realizing that to put the delay back in, in this case, would
require a fractional delay filter and a fractional delay filter is simply a sinc function again. In
this case, the frequency- and impulse-response of the fractional delay filter would be (22):
N
1
Hfrac n=e
− j 2 π f nTd
hfrac k = ∑ cos [2 π f n (t k −Td )]=sinc [ π (t k−Td )]
2 n=0
(22)
The impulse-response of the filter in (22) is shown for the example in Figure 11 where it is clear
that the fractional delay filter simply puts back the causality issues.
Although it seems that we're making a big deal of this, these issues do not generally cause large
problems in simulations geared toward signal-integrity. That's because generally, the frequency
content of the source waveform is attenuated enough such that the effects shown are not seen. It
is easy to get fixated on the impulse-responses and the purpose of the section was to illustrate the
reasons for the effects.
8
While the equations look like a delay was applied, the value in this case was a negative delay. It's clear from the
phase that the response was in fact advanced.
15
Figure 11 - Fractional Delay Filter
Before leaving this section, it is important to point out a few items. First, we side-stepped the
issue of dealing with H N ∉ ℜ by directly sampling the continuous-time waveform resulting
from the sum of co-sinusoids provided. This is always an option and is also an option for
dealing with unevenly space points provided as a response. In fact, we can always then compute
the DFT of the resulting discrete-time impulse response to compute a new response that has been
sampled onto an evenly spaced frequency grid.
Second, while we saw that a reason for ringing and causality issues in the time-domain response
were due to fractional sample group delay in the impulse response that was correlated with the
potential non-real value of H N and that the determination of a time-delay that makes H N real
did more to explain things than fix things, you will find that this technique is useful when going
in and out of the time-domain for the purpose of re-sampling frequency-domain data.
At this point, before addressing the topic of interpolation which is really at the heart of
connecting discrete-frequency and continuous-frequency responses, we diverge slightly to
address a related topic – that of the relationship between periodicity and discreteness.
16
we know that X must repeat in frequency and since X is discrete-frequency, then x must be
periodic in time. In other words, if they are discrete in both domains, they must be periodic in
both domains. The reason this is important is because wrapped up in this feature is the concept
of aliasing, upsampling and finally the important point of this paper – interpolation.
Note that when dealing with the DFT and the IDFT, both x and X are a finite number of
points giving the user the indication that the impulse response is limited and isolated in time and
the frequency response is limited in frequency. This is not the case and both finite sets of data
are finite only because the additional repeating data is redundant.
To see how repetition and discreteness are interrelated mathematically, consider a K element
time sequence x whose K element DFT with n ∈0 ... K −1 is given by (23) as:
K−1 nk
−j 2π
X n= ∑ x k e K
(23)
k =0
The DFT appears to produce a spectrum restricted to K points. Let's examine the effect of
repeating this spectrum on a new time sequence. Let M be the number of repetitions of the
frequency spectrum such that we now have K ' =MK frequency points such that for
k ' , n' ∈0... K ' we have:
'
X n = X n mod K
' ' (24)
'
In other words, X is X concatenated or repeated M times. The inverse DFT of this new
sequence is given by:
' ' ' ' ' ' '
K −1 nk K −1 nk K −1 M −1 ( Km+n) k
1 j 2π 1 j 2π 1 j2π
'
x = '
k'
K
∑ '
X e
n'
KM
= '
K
∑ X n mod K e
'
KM
= '
K
∑ Xn∑ e KM
'
n =0
'
n =0 n=0 m=0
K −1 n k ' M −1 m k'
(26)
1 j2π j2π
…=
KM
∑ X ne KM
∑e M
n=0 m=0
ḱ
j2π
M
In order to make some important observations about (26), define r =e causing the
summation at the end of (26) to become:
M −1
S = ∑ rm (27)
m=0
Our first observation is that when ḱ is a multiple of M , then r =1 making S = M in (27) and
(26) becomes:
17
Figure 12 - Frequency-Domain Repetition Effect on Time-Domain
'
1
K−1
j2π
nk
(28)
'
xk=
K
' ∑ X ne KM
=xk '
n=0 M
'
In other words, (28) says that whenever k ' is a multiple of M , x k is one of the original points
'
in x .
Our second observation is that when k ' is not a multiple of M , then we rewrite the summation
in (27) in its analytic form as:
'
M −1
m r M −1 e j 2 π k −1
S= ∑ r = = (29)
r−1
'
k
m=0 j 2π
e M −1
In (29) we see that the numerator is always zero and the denominator cannot be zero, meaning
'
that S =0 in this case which means that when k ' is not a multiple of M , we have x k =0 . '
We see that repeating the spectrum in one domain M times is the same as inserting a zero in
between every Mth point in the other domain. In fact the sequence in each domain is assumed to
repeat infinitely meaning that nothing exists between the points in the other domain. This is
what is meant by periodicity in one domain ensuring discreteness in the other.
18
continuous-frequency systems with only discrete-time and discrete-frequency data?” The answer
to this question is a question of interpolation. Most have heard of the famous Nyquist criteria
which says that if a time-domain waveform is sampled with sufficient conditions met, then the
continuous-time waveform can always be recovered.
We said earlier that if a system is band-limited in frequency response and time-limited in
impulse-response, we can achieve no error between the discrete-time response and the actual
underlying continuous-time response. In other words, the discrete-time response will be exact
samples of the continuous-time response. Not only that, If we can meet the band- and time-limit
criteria, we can reconstruct both the continuous-time and continuous-frequency responses from
the discrete information provided.
To see how this works, we'll draw on all of the information provided previously in this paper.
In the last section we saw the effect of repetition. To summarize the effect, if one is provided a
discrete-frequency response (which we know is representative of a response that repeats over and
over with frequency) and we repeat the response, then the discrete-time response is the same as
the original discrete-time response except that zeros are placed in between every sample. If we
knew or assumed, however that the original discrete-frequency response were truly limited in
frequency, then we can brick-wall filter the repeated discrete-frequency response to the original
band-limit prior to computing the inverse transform that produces the discrete-time response.
When we do this, we find that instead of a zero inserted between each point, we have inserted an
interpolated point. The interpolated point is interpolated using the commonly known method of
sinc interpolation and the interpolated point lies directly on the continuous time impulse-
response. This process of repetition followed by brick-wall filtering is the same as zero padding
the discrete-frequency response.
̂
In the mathematics vocabulary we've used so far, this process creates a version of h(t) which is
the same time length, but with double the number of points, and these extra points are samples of
the discrete-time response h disc ( t) . But since we also said that the response was time-limited
also, a period of h disc( t) is simply the isolated impulse response h bwl (t ) and because of the band
limiting is also exact samples of h( t) .
Finally, because we are allowed to make as many repetitions as we want of the discrete-
frequency response, we can obtain an arbitrarily continuous version of h( t) .
To summarize, if we have the discrete-frequency response which is band- and time-limited, then
we can perfectly reconstruct the continuous function h( t) by zero padding the discrete-
frequency response.
A similar situation exists with regard to the interpolation of the discrete-frequency response. If
we were to insert a zero between every discrete-frequency point and convert back to the time-
domain, this is the same as taking two periods of the response h( ̂ t) . But we said that the
response was actually time-limited, so we can set the repeated points to zero with no bad effect
except to double the period of Δ KT (t) used to produce the impulse-train response. Converting
this zero padded impulse-response back to the time-domain has the effect of converting the zeros
that we inserted into the discrete-frequency response into interpolated points. By virtue of the
19
time- and band-limiting, these points are actual points on H ( f ) just as the original points were.
̂
Since we can zero-pad the response h(t) as much as we'd like, we can determine to an arbitrary
degree the continuous response H ( f )
In summary, if a discrete-frequency response is both time- and frequency-limited and we meet
the sufficiency of sampling criteria in both frequency and frequency spacing, then the continuous
response associated with the discrete-frequency response can be completely reconstructed. Of
course real systems will not meet this criteria to some degree, but to the degree it does, this
capability for perfect reconstruction holds.
Two implementation notes regarding the DFT and IDFT are worthwhile to discuss.
Here, we have basically provided a method for interpolation of both the frequency-response and
the impulse-response. Regarding the frequency response, a method of interpolation would be to
compute the IDFT of X corresponding to H , pad the resulting x , and compute the new DFT
' '
X which corresponds to the new interpolated response H . If you do this, you need to be
careful about where the padding is applied insofar as x is concerned. Remember that in x the
first half of the samples correspond to positive time and the second half of the samples
correspond to negative time, according to the time rules outlined in (37). The padding must go
in between the boundary between the positive time and negative time samples to have the proper
effect. If this is not done, you will get wrong results.
The second detail involves interpolation of the impulse response through zero padding of the
discrete-frequency response. We have similar problems as in the previous paragraph in that the
second half of X represents negative frequencies. The padding must go between the boundary
between the positive and negative frequencies in X . Sometimes it is easier to convert X back
to H , apply the zero padding to the end to produce an H ' and convert back to an X ' using
the rules in Appendix A.
One final note regarding interpolation is that you are not obliged to interpolate through brick-
wall filtering of the repeated response in the frequency-domain, which is equivalent to zero
padding in the frequency-domain which is equivalent to convolution with a sinc function in the
time-domain. There are other possibilities that don't introduce the Gibbs phenomena when you
cannot utilize a high enough end frequency. This is why we explained zero padding as brick-
wall filtering of the repeated response in the first place. We can choose to filter the repeated
response in alternate fashions. For example, Figure 13 shows a comparison between sinc
interpolation with linear interpolation for a doubling of the end frequency. In Figure 13, the top
row shows first the sinc interpolating function which can be seen to have no effect on the
original time-domain response and to interpolate the points in between. Next, the frequency-
domain view is shown with the original RC network response repeated shown in the dotted line,
the brick-wall filter equivalent to the sinc interpolating function and the cross-hatched area
which shows the resulting frequency response. Finally, the interpolated impulse-response is
shown. Note that the original points fall on the faint gray response which is the actual
continuous-time response for a system which is not actually band-limited. The interpolated
points exhibit the Gibbs phenomena. In the next line we repeat the exercise for linear
interpolation. First we see that the linear interpolating filter also has the effect of not changing
20
Figure 13 - Comparison of Sinc Interpolation with Linear Interpolation
the original frequency points and taking the average of the two adjacent points for interpolation.
We can see also that to some extent it is a short, crude approximation of the sinc interpolating
function. Next we see the filter response and the effect on the dotted line repeated response in
the cross-hatched area. Here we see that we did not strictly limit the response, but instead altered
the original response and extrapolated to some extent the response out in frequency. Finally, the
time-domain effect is shown where we see the linearly interpolated impulse-response. There are
many issues to deal with in considering this type of interpolation method as a general practice,
most importantly that it causes non-linear effects. These non-linear effects stem from the fact
that repeating a spectrum is not a linear operation. Understand that linear operations cannot
cause a single frequency input to a system to produce other frequencies and clearly repeating a
spectrum introduces this effect. When the repeated spectrum is brick-wall filtered, this non-
linearity possibility is not present, but in other interpolation schemes, portions of the repeated
spectrum are retained.
21
ζ1
2 π M ϕ0 ζ0
A0
2 π ϕ0
2 π θ0
A0 W M0
ζM
22
For a finite duration sequence x consisting of K points, (30) reduces to:
K −1
H ( z )= ∑ x k z −k (31)
k=0
n
j2π
If we define, for n ∈0 ... K −1 , z =e K , we have z defined as points on the unit circle that
n
start at 1 and are equi-angularly spaced at angular increments of 2 π / K and we have:
K−1 nk
− j2π
X n= ∑ e K
(32)
k =0
ζ m= AW m A= A0 e j 2 πθ 0
W =W 0 e j 2 π ϕ
0
(33)
In (34), A0 , θ0 , W 0 , and ϕ0 are arbitrary constants that define the arc. To see how the arc is
defined, consider that when m=0 , ζ 0= A that the beginning of the arc is at radius A0 and at a
beginning angle of 2 π θ 0 and that when m= M , ζ M = A0 W 0M e [
j 2 π θ +M ϕ ]
meaning that the end
0 0
M
of the arc is at radius A0 W 0 and at an angle 2 π [ θ 0+M ϕ0 ] and therefore the arc spans the
angle 2 π M ϕ0 . Thus for each m∈0... M :
j 2 π [ θ0+m ϕ0 ]
ζ m= A0 W m0 e (35)
Here we see that the angle between each point on the arc is 2 π ϕ0 . This is all shown graphically
in Figure 14.
The CZT has many uses and has a fast implementation9. The use we are concerned with
regarding s-parameters is only the ability to re-sample onto a desired equally spaced frequency
scale. For our purposes, we define A0 =1 , W 0=1 , θ0 =0 , ϕ0=Δ f , so for M +1 frequency
points, we have:
K−1 K −1
X m= ∑ x k ζ−k
m = ∑ xk e
− j2π k m Δ f
(36)
k=0 k=0
9
See M. T. Jong, Methods of Discrete Signal and Systems Analysis. 1982. 198
23
Be aware that if you use this method of interpolation, you will need to deal with any of the points
in the CZT that involve frequencies beyond those provided in the original data, because the CZT
will wrap around the unit circle. These frequencies points can either be set to zero or filtered
with a different interpolation function as outlined in the previous section.
When the s-parameters or response provided are unevenly spaced, we can always express the
IDFT of the original response in the sum of cosines form, sample the continuous-time sum of
these cosines and apply the CZT.
Summary
We have explored the relationship between continuous-frequency and discrete-frequency
responses in both the frequency- and time-domains and have found that thinking about this
relationship in both domains provides the most insight. We found that to the extent that the
continuous-frequency response is band-limited and it's impulse response is time-limited, then if
the discrete-frequency response is properly sampled, then not only are the sampled frequency
response exact points on the continuous-frequency response, but the implied impulse-response
are exact points on the continuous-time impulse-response. We examined the mechanics of the
relationship and have seen the side-effects when the sufficiency of sampling conditions are not
met. We explored issues in handling discrete-frequency responses in providing real impulse-
responses. We examined the relationship between periodicity and discreteness in both domains
and expanded upon this to develop techniques for interpolation in one domain through zero-
padding in the other. Finally we provided some alternate interpolation techniques and provided
some re-sampling techniques that are necessary in utilizing s-parameters directly in simulation.
Acknowledgements
This year I experimented with writing my DesignCon paper in a free software environment and
was astounded by how good the many free tools are. I used:
• Ubuntu Linux 11.10 Oneiric Ocelot maintained by Canonical.
• LibreOffice Writer and Impress provided by the OpenOffice.org.
• WINE sponsored by CodeWeavers for emulating certain Windows programs under Linux
like MathCad 2000 by MathSoft.
• VirtualBox from Oracle for running a Windows 2000 environment under Linux.
• TpX written by Alex Tsyplakov for all of the drawings.
Thanks for all of this excellent free software!
24
Appendix A - Relationship Between Response
Elements and DFT Elements
Given a K element real time-domain sequence x, where k ∈K −1 , x k ∈ℜ which is related to a
K element complex frequency-domain sequence X through the DFT (i.e. X =DFT ( x) ), then we
define a sample period T and a corresponding sample rate F such that the sample times are
defined as (37):
{ }
k K
kT= if k≤
F 2
t k= (37)
1 K
(k −K )T =( k −K ) if k>
F 2
The following relationships hold between the DFT X and the response H :
For K even, define N = K /2 such that K =2N , n∈0 … N :
{ }
ℜ(H 0 ) if n=0
H n= X n X n= ℜ(H N ) if n=N (38)
Hn otherwise
n n F 1
f n= F= F = =2 f N (39)
K N 2 T
For enforcement of realness when K even, define σ∈1… N −1 :
X 0∈ ℜ X N ∈ℜ X N +σ= X ∗N −σ f N +σ =− f N −σ (40)
H n= X n X n=
{
ℜ(H 0 ) if n=0
Hn otherwise } (41)
n n 1 K 2N+1
f n= F= F F = = f N= fN (42)
K 2N+1 T N N
For enforcement of realness when K even, define σ∈1… N :
X 0 ∈ℜ X N +σ= X ∗N −σ+1 f N +σ =− f N −σ +1 (43)
F 1
The frequency spacing is always defined as: Δ f = = (44)
K KT
25