# Sampling H(z) to get DFT

Suppose that I have a $H(z)$ and I sample it to get a DFT of 15 values. Let's call this DFT $H_{1}[k]$. Then, suppose I antitransform $H(z)$ and grab the first 10 values of the sequence, and then I add 5 zeros. After this, I calculate the DFT of this new sequence. Let's call it $H_{2}[k]$. What differences would these two DFTs have between each other (if any)?

• so you're changing it from sampling $H(e^{j \omega})$ 15 equally-spaced points around the unit circle ($|\omega|=1$) to something like $H(e^{j \omega})$ being sampled 20 equally-spaced points on the unit circle. Jan 28, 2016 at 0:18
• @robertbristow-johnson OP truncates $h[n]$ before adding those 5 zeros, so it would still be something ($H(e^{jw})$ convolved with the transform of a rectangular window) sampled at 15 equally-spaced point on the unit circle. Jan 28, 2016 at 0:54
• @SleuthEye Yes, both of them turn out to be a sequence of 15 points. But are they the same or do they have differences between each other? Jan 28, 2016 at 0:58
• Unless those truncated sample were already zeros, the result wouldn't be the same. Jan 28, 2016 at 1:03
• @robertbristow-johnson No, OP grabs 10 values (ie. removes 5), then adds back 5 values. Net result he's left with 15 points. Jan 28, 2016 at 1:15

When grabbing the first 10 samples of $h_1[n]$ you are essentially multiplying the whole sequence $h_1[n]$ with the rectangular window

$$w[n] = \begin{cases} 1 & 0 \leq n < 10 \\ 0 & \mbox{otherwise} \end{cases}$$

whose DFT is given by:

\begin{align} W\left[k\right] &= \sum_{n=0}^{9} e^{-j 2\pi k n / N} \\ &= \frac{1 - e^{-j 2\pi k \cdot 10/15}}{1 - e^{-j 2\pi k / 15}} \end{align}

By the circular convolution theorem:

Multiplication in the discrete-time domain becomes circular convolution in the discrete-frequency domain. Circular convolution in the discrete-time domain becomes multiplication in the discrete-frequency domain.

In other words,

$$\mbox{DFT}\left\{h_1[n] \cdot w[n]\right\} = \frac{1}{N} H_1\left[k\right] \otimes W\left[k\right]$$

where $\otimes$ is the circular convolution operator. This can be seen with the following matlab script (you can play around with h1 to see what happens with other waveforms):

n = [0:14]; % discrete-time index
k = [0:14];
h1 = sin(pi*n/14); % some arbitrary function

% window function
w = [ones(1,10) zeros(1,5)];

% time domain operation
h2  = h1.*w;
% convert to frequency domain
H2t = fft(h2);

% frequency domain operation
W   = fft(w);
H1  = fft(h1);
H2f = cconv(W,H1) / 15;

% Compare H2t & H2f
figure(1);
subplot(2,1,1);
hold off; plot(k, abs(H2t), 'b');
hold on;  plot(k, abs(H2t), 'bx');
hold on;  plot(k, abs(H2f), 'ro');
title('Magnitude');
subplot(2,1,2);
hold off; plot(k, angle(H2t), 'b');
hold on;  plot(k, angle(H2t), 'bx');
hold on;  plot(k, angle(H2f), 'ro');
title('Phase'); Note that if $h_1[n]$ is already no longer than 10 samples (i.e. if those truncated samples are already zero), then windowing in the time-domain will have no effect and similarly the circular convolution with $W[k]$ in the frequency domain will happen to produce $H_1[k] = \frac{1}{N} H_1[k] \otimes W[k]$ (but only as a special case).

Note that if your original H is not representative of a sufficiently time limited window, the sampling process will be lossy.

H2 would be the transform of an even shorter time domain window. A rectangular window in one DFT domain is equivalent to circular convolution with a Sinc function in the other DFT domain. The shorter the rectangular window, the wider the Sinc, likely making H2 "blurrier" (unless the 5 zeroed values are already zero).