System Response

Solving difference equations using Z-transform.

Darshan N
Updated: 19 March 2026
7 min read

The Z-transform provides a systematic method to solve linear constant-coefficient difference equations, the mathematical models of digital filters and systems. Instead of iterative time-domain recursion, the Z-transform converts the difference equation into an algebraic equation in z, solves for Y(z), and then inverts to find y[n]. This approach handles both zero-state and zero-input responses in a structured way, and it is a core exam skill for GATE DSP problems.

Solving Difference Equations Using Z-TransformStep 1: Difference Equation (Time Domain)y[n] + a₁y[n-1] + a₂y[n-2] = b₀x[n] + b₁x[n-1] with initial conditions y[-1], y[-2]Step 2: Apply Unilateral Z-TransformY(z) + a₁[z⁻¹Y(z) + y[-1]] + a₂[z⁻²Y(z) + y[-2] + y[-1]z⁻¹] = B(z)X(z)Step 3: Solve for Y(z) AlgebraicallyY(z) = H(z)·X(z) + H(z)·[initial condition terms] = Y_ZS(z) + Y_ZI(z)Step 4: Inverse Z-TransformApply partial fractions to Y(z) → y[n] = y_ZS[n] + y_ZI[n] (zero-state + zero-input)Zero-state response: output due to input only (zero initial conditions). Zero-input response: output due to initial conditions only (zero input).
Figure 1: Z-transform solution procedure for difference equations — separates zero-state and zero-input responses systematically.

Core Concept Explanation

The system response of a digital system is the output y[n] for a given input x[n] and initial conditions. For an LTI system described by a linear constant-coefficient difference equation (LCCDE), the total response has two components: the zero-state response (output when all initial conditions are zero, driven only by the input) and the zero-input response (output driven only by initial conditions, with zero input). The Z-transform handles both components simultaneously in a single algebraic framework.

When the unilateral Z-transform is applied to both sides of the difference equation, time-shifted terms like y[n-k] introduce initial condition values y[-1], y[-2], and so on. These initial conditions appear as explicit additive terms in the Z-domain equation. This is the key advantage of the unilateral Z-transform over the bilateral form for solving initial-value problems — initial conditions are automatically absorbed into the algebraic equation.

After solving for Y(z) algebraically, the result is split into Y_ZS(z) = H(z)·X(z) (the zero-state part) and Y_ZI(z) (the zero-input part involving initial conditions). The zero-state part directly shows the transfer function H(z) acting on the input. Both parts are then inverted separately using partial fractions or standard Z-transform pairs to obtain the total y[n].

The natural (homogeneous) response contains terms of the form pₖⁿ for each pole pₖ of H(z), decaying for |pₖ| < 1 and growing for |pₖ| > 1. The forced (particular) response contains terms related to the input signal's Z-transform poles. For a stable system driven by a bounded input, the natural response decays to zero as n→∞ (transient part), and only the forced response remains in steady state.

Mathematical Expression

For the unilateral Z-transform, the time-shifting property for y[n-1] gives z⁻¹Y(z) + y[-1]. For y[n-2], it gives z⁻²Y(z) + y[-2] + y[-1]z⁻¹. Applying this to a second-order LCCDE y[n] + a₁y[n-1] + a₂y[n-2] = b₀x[n] results in Y(z)(1 + a₁z⁻¹ + a₂z⁻²) = B(z)X(z) + a₁y[-1] + a₂y[-2] + a₂y[-1]z⁻¹. Rearranging gives Y(z) = H(z)X(z) + [initial condition terms]/A(z), where H(z) = B(z)/A(z) is the transfer function.

The initial conditions generate poles at the same locations as the natural frequencies of the system (the poles of H(z)). Therefore the zero-input response always has the form Σ Cₖ·pₖⁿ·u[n] for a causal system, where pₖ are the system poles and Cₖ are constants determined by the specific initial condition values.

Practical Understanding

In digital filter implementations such as IIR filters, the difference equation is directly programmed using multiply-accumulate operations. When a DSP processor starts running with nonzero internal register values (initial conditions), the output will include a zero-input transient that decays if the filter is stable. The Z-transform solution quantifies exactly how long this transient lasts based on the pole magnitudes.

For FIR filters, the denominator A(z) = 1, meaning there are no feedback poles and no zero-input response. The output depends only on the current and past input values, making FIR filters inherently stable. This is a key practical advantage of FIR designs over IIR designs in applications requiring guaranteed stability.

Example
Given:
y[n] - 0.5y[n-1] = x[n]
x[n] = u[n] (unit step input)
y[-1] = 2 (initial condition)

Why this formula applies:
First-order LCCDE with initial condition. Apply unilateral Z-transform.
Time-shift: Z{y[n-1]} = z⁻¹Y(z) + y[-1]

Formula:
Y(z) - 0.5[z⁻¹Y(z) + y[-1]] = X(z)
Y(z)(1 - 0.5z⁻¹) = X(z) + 0.5·y[-1]

Substitution:
X(z) = z/(z-1)  [Z-transform of u[n]]
y[-1] = 2
Y(z)(1 - 0.5z⁻¹) = z/(z-1) + 0.5·2 = z/(z-1) + 1

Calculation:
Multiply through by z/(z-0.5):
Y(z) = z²/[(z-1)(z-0.5)] + z/(z-0.5)

Partial fractions of z²/[(z-1)(z-0.5)] = 2z/(z-1) - z/(z-0.5)
Combining: Y(z) = 2z/(z-1) - z/(z-0.5) + z/(z-0.5) = 2z/(z-1)

Wait — recheck:
Y(z)(z-0.5)/z = [z/(z-1) + 1]·1
Y(z) = z·[z/(z-1) + 1]/(z-0.5)
     = [z²/(z-1) + z]/(z-0.5)
     = z[z + (z-1)] / [(z-1)(z-0.5)]
     = z[2z-1] / [(z-1)(z-0.5)]

Partial fractions on Y(z)/z = (2z-1)/[(z-1)(z-0.5)]:
A = (z-1)·(2z-1)/[(z-1)(z-0.5)] at z=1 = 1/0.5 = 2
B = (z-0.5)·(2z-1)/[(z-1)(z-0.5)] at z=0.5 = 0/(-0.5) = 0

So Y(z)/z = 2/(z-1) → Y(z) = 2z/(z-1)

Final Answer:
y[n] = 2·u[n]
Exam Tip: In GATE problems involving difference equations with initial conditions, always use the unilateral Z-transform. Remember that Z{y[n-1]} = z⁻¹Y(z) + y[-1] — the initial condition term appears with a positive sign. Forgetting this leads to wrong Y(z) and wrong y[n].
Total System Response: ZSR and ZIR ComponentsZero-State Response (ZSR)Initial conditions = 0Input x[n] drives the outputY_ZS(z) = H(z) · X(z)Inverse Z-transform givesy_ZS[n] = h[n] * x[n](convolution of impulse response with input)Zero-Input Response (ZIR)Input = 0; initial conditions drive outputResponse = natural frequencies onlyY_ZI(z) = IC terms / A(z)Inverse gives y_ZI[n] = Σ Cₖ pₖⁿ u[n]where pₖ = poles of H(z)(decays to zero for stable system)Total Responsey[n] = y_ZS[n] + y_ZI[n]For stable system: ZIR decays to zero. Steady-state = forced (ZSR) component only.
Figure 2: Total response = ZSR (due to input) + ZIR (due to initial conditions). For stable systems, ZIR decays and steady-state equals ZSR.
  • Zero-state response: set all initial conditions to zero; Y_ZS(z) = H(z)·X(z).
  • Zero-input response: set input to zero; only initial conditions drive the output.
  • Unilateral Z-transform shift: Z{y[n-k]} = z⁻ᵏY(z) + initial condition terms.
  • Natural response poles = system poles; forced response poles = input signal poles.
  • For a stable system, natural response decays; steady-state equals the forced response only.

Quick Revision

  • Z-transform converts LCCDE into algebraic equation Y(z) = H(z)X(z) + ZI terms.
  • Unilateral shift: Z{y[n-1]} = z⁻¹Y(z) + y[-1].
  • Total response: y[n] = y_ZS[n] (input-driven) + y_ZI[n] (IC-driven).
  • ZIR always involves natural frequencies (system poles) of H(z).
  • Stable system: ZIR → 0 as n→∞; steady state determined by ZSR.
  • FIR filter: A(z) = 1, no feedback poles, always stable, no ZIR from system poles.
  • Trap: Applying bilateral Z-transform to initial-condition problems loses the IC terms — always use unilateral for such problems.

System Response Quiz

Test your knowledge on this topic!

Question 1 of 3

Q1.When solving linear constant-coefficient difference equations using the unilateral Z-transform, what handles non-zero initial conditions?