Skip to main content

Z-transform of a running sum

Short answer

The running sum satisfies y(k)-y(k-1)=x(k) with y(k)=0 for k<0. Taking the z-transform gives Y(z)=X(z)/(1-z^{-1}) = zX(z)/(z-1).

Consider the function y(k), which is a sum of functions x(h), where h=0,1,2,…,k, such that y(k) = Σ x(h) (sum from h = 0 to k), k=0,1,2,…, where y(k)=0 for k<0. Obtain Y(z).

y(k)y(k) is the running sum (accumulation) of x(k)x(k). Its z-transform is Y(z)=X(z)1−z−1=zz−1X(z)Y(z) = \dfrac{X(z)}{1-z^{-1}} = \dfrac{z}{z-1}X(z).

Step 1: Write a difference equation

y(k)=x(0)+x(1)+⋯+x(k−1)+x(k)y(k−1)=x(0)+x(1)+⋯+x(k−1)\begin{aligned} y(k) &= x(0) + x(1) + \dots + x(k-1) + x(k) \\ y(k-1) &= x(0) + x(1) + \dots + x(k-1) \end{aligned}

Subtracting:

y(k)−y(k−1)=x(k),k=0,1,2,…y(k) - y(k-1) = x(k), \qquad k = 0, 1, 2, \dots

This also holds at k=0k = 0 because y(−1)=0y(-1) = 0 (given y(k)=0y(k) = 0 for k<0k < 0), so y(0)=x(0)y(0) = x(0).

Step 2: Take the z-transform

Use the right-shift (delay) theorem Z[y(k−1)]=z−1Y(z)\mathcal{Z}[y(k-1)] = z^{-1}Y(z), which needs y(k)=0y(k) = 0 for k<0k < 0 (given):

Y(z)−z−1Y(z)=X(z)Y(z) - z^{-1}Y(z) = X(z) Y(z)=11−z−1X(z)=zz−1X(z)Y(z) = \frac{1}{1-z^{-1}}X(z) = \frac{z}{z-1}X(z)

Alternative view (convolution)

y(k)=∑h=0kx(h)⋅1(k−h)y(k) = \sum_{h=0}^{k} x(h)\cdot 1(k-h) is the convolution of x(k)x(k) with the unit step 1(k)1(k). Convolution in time is multiplication in zz:

Y(z)=X(z)⋅Z[1(k)]=X(z)⋅11−z−1Y(z) = X(z)\cdot \mathcal{Z}[1(k)] = X(z)\cdot\frac{1}{1-z^{-1}}

Example

Let x(k)=1x(k) = 1 for all k≥0k \ge 0 (unit step), so X(z)=zz−1X(z) = \dfrac{z}{z-1}. Then y(k)=k+1y(k) = k+1 and

Y(z)=zz−1⋅zz−1=z2(z−1)2Y(z) = \frac{z}{z-1}\cdot\frac{z}{z-1} = \frac{z^2}{(z-1)^2}

Check: Z[k+1]=z(z−1)2+zz−1=z+z(z−1)(z−1)2=z2(z−1)2\mathcal{Z}[k+1] = \dfrac{z}{(z-1)^2} + \dfrac{z}{z-1} = \dfrac{z + z(z-1)}{(z-1)^2} = \dfrac{z^2}{(z-1)^2}, which agrees.

Remarks

  • 11−z−1\dfrac{1}{1-z^{-1}} is the pulse transfer function of a digital accumulator (summer). It has a pole at z=1z = 1.
  • This result is the discrete version of integration (1/s1/s) and is used in the integral term of a digital PID controller.

Answer: Y(z)=X(z)1−z−1=z X(z)z−1Y(z) = \dfrac{X(z)}{1 - z^{-1}} = \dfrac{z\,X(z)}{z-1}.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Digital Control System chapter 2 questions →