Skip to main content

Difference equation with u(K+1) and u(K) step inputs

Short answer

Assuming the intended coefficient is 1.3679, apply z-transform with given initial conditions and step input U(z)=z/(z-1). Solve for X(z) and expand in partial fractions. The solution is x(k)=k-1+(0.3679)^k = k-1+e^{-k} for k≥0.

Solve the following difference equation: x(K+2)-1.379x(K+1)+0.3679x(K)=0.3679u(K+1)+0.2642u(K), where u(K) is input which has initial values x(0)=0, x(1)=0.3679, u(K)=1 for K≥ 0.

Assumption: the coefficient "1.379" is read as 1.3679. This is the standard textbook equation, where 1.3679=1+e−11.3679 = 1 + e^{-1} and 0.3679=e−10.3679 = e^{-1}, and it agrees with the given x(1)=0.3679x(1) = 0.3679. A note at the end gives the values for 1.379 as printed.

Step 1: Z-transform with initial conditions

Use Z[x(k+2)]=z2X−z2x(0)−zx(1)\mathcal{Z}[x(k+2)] = z^2X - z^2x(0) - zx(1), Z[x(k+1)]=zX−zx(0)\mathcal{Z}[x(k+1)] = zX - zx(0), and Z[u(k+1)]=zU−zu(0)\mathcal{Z}[u(k+1)] = zU - zu(0). Substitute x(0)=0x(0) = 0, x(1)=0.3679x(1) = 0.3679, u(0)=1u(0) = 1:

z2X−0.3679z−1.3679zX+0.3679X=0.3679zU−0.3679z+0.2642Uz^2X - 0.3679z - 1.3679zX + 0.3679X = 0.3679zU - 0.3679z + 0.2642U

The −0.3679z-0.3679z terms on both sides cancel:

X(z) (z2−1.3679z+0.3679)=(0.3679z+0.2642) U(z)X(z)\,(z^2 - 1.3679z + 0.3679) = (0.3679z + 0.2642)\,U(z)

Step 2: Substitute the step input U(z)=zz−1U(z) = \dfrac{z}{z-1}

z2−1.3679z+0.3679=(z−1)(z−0.3679)z^2 - 1.3679z + 0.3679 = (z-1)(z-0.3679), so

X(z)=z(0.3679z+0.2642)(z−1)2(z−0.3679)X(z) = \frac{z(0.3679z + 0.2642)}{(z-1)^2(z-0.3679)}

Step 3: Partial fractions of X(z)/zX(z)/z

X(z)z=0.3679z+0.2642(z−1)2(z−0.3679)=A(z−1)2+Bz−1+Cz−0.3679\frac{X(z)}{z} = \frac{0.3679z + 0.2642}{(z-1)^2(z-0.3679)} = \frac{A}{(z-1)^2} + \frac{B}{z-1} + \frac{C}{z-0.3679} A=[0.3679z+0.2642z−0.3679]z=1=0.63210.6321=1C=[0.3679z+0.2642(z−1)2]z=0.3679=0.1354+0.2642(0.6321)2=0.39960.3996=1B=ddz[0.3679z+0.2642z−0.3679]z=1=[0.3679(z−0.3679)−(0.3679z+0.2642)(z−0.3679)2]z=1=−0.39960.3996=−1\begin{aligned} A &= \left[\frac{0.3679z + 0.2642}{z - 0.3679}\right]_{z=1} = \frac{0.6321}{0.6321} = 1 \\ C &= \left[\frac{0.3679z + 0.2642}{(z-1)^2}\right]_{z=0.3679} = \frac{0.1354 + 0.2642}{(0.6321)^2} = \frac{0.3996}{0.3996} = 1 \\ B &= \frac{d}{dz}\left[\frac{0.3679z + 0.2642}{z - 0.3679}\right]_{z=1} = \left[\frac{0.3679(z-0.3679) - (0.3679z+0.2642)}{(z-0.3679)^2}\right]_{z=1} = \frac{-0.3996}{0.3996} = -1 \end{aligned} X(z)=z(z−1)2−zz−1+zz−0.3679X(z) = \frac{z}{(z-1)^2} - \frac{z}{z-1} + \frac{z}{z - 0.3679}

Step 4: Inverse transform

Using z(z−1)2→k\dfrac{z}{(z-1)^2} \to k, zz−1→1\dfrac{z}{z-1} \to 1, zz−e−1→e−k\dfrac{z}{z-e^{-1}} \to e^{-k}:

x(k)=k−1+(0.3679)k=k−1+e−k,k=0,1,2,…x(k) = k - 1 + (0.3679)^k = k - 1 + e^{-k}, \quad k = 0, 1, 2, \dots

Step 5: Check

kk012345
Formula00.36791.13532.04983.01834.0067
Recursion00.36791.13542.04983.01834.0067

The recursion is x(k+2)=1.3679x(k+1)−0.3679x(k)+0.6321x(k+2) = 1.3679x(k+1) - 0.3679x(k) + 0.6321. The two agree to rounding. The double pole at z=1z = 1 makes the output grow like a ramp (x(k)≈k−1x(k) \approx k - 1 for large kk). This is the step response of an open-loop system containing an integrator.

Note: with 1.379 as printed

The recursion x(k+2)=1.379x(k+1)−0.3679x(k)+0.6321x(k+2) = 1.379x(k+1) - 0.3679x(k) + 0.6321 gives 0,0.3679,1.1394,2.0680,3.0647,4.0975,…0, 0.3679, 1.1394, 2.0680, 3.0647, 4.0975, \dots. The roots of z2−1.379z+0.3679z^2 - 1.379z + 0.3679 are then z=1.0174z = 1.0174 and 0.36160.3616, so the output grows slightly faster than a ramp.

Answer (1.3679): x(k)=k−1+e−k=k−1+(0.3679)kx(k) = k - 1 + e^{-k} = k - 1 + (0.3679)^k for k≥0k \ge 0.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Digital Control System chapter 2 questions →