Inverse Z Transform in Matlab Programming

MATLAB Illustration

In Digital Signal Processing (DSP) and control systems engineering, the Z-Transform transforms discrete-time signals into the complex frequency domain (Z-domain) to simplify stability analysis and filter design. However, to implement physical systems or analyze time-domain responses, you must convert the frequency representation back to a discrete sequence using the Inverse Z-Transform.

MATLAB provides built-in tools within the Symbolic Math Toolbox, primarily the iztrans() function, to compute exact symbolic inverse Z-transforms.

What Is the Inverse Z-Transform?

The Inverse Z-Transform converts a Z-domain transfer function (X(z)) back to its corresponding discrete-time sequence (x[n]):

[x[n] = mathcal{Z}^{-1}{X(z)}]

This conversion is vital for determining impulse responses, evaluating difference equations, and inspecting transient behaviors in digital filters.

MATLAB Function Syntax: iztrans()

The standard syntax for computing inverse Z-transforms in MATLAB is:

MATLAB
x = iztrans(F) x = iztrans(F, z, n)
  • F: Symbolic expression in the Z-domain.
  • z: Z-domain variable.
  • n: Discrete-time index variable.

Step-by-Step Examples

Example 1: Basic First-Order System

Find the inverse Z-transform of the first-order transfer function:

[X(z) = frac{z}{z - 0.5}]
MATLAB
syms z n X = z / (z - 0.5);
x = iztrans(X, z, n)

Output:

MATLAB
x = (1/2)^n

This result represents a geometrically decaying discrete-time sequence characteristic of stable first-order systems.

Example 2: Second-Order Polynomial Transfer Function

Find the inverse Z-transform of:

[X(z) = frac{z^2}{z^2 - 1.5z + 0.5}]
MATLAB
syms z n X = z^2 / (z^2 - 1.5*z + 0.5);
x = iztrans(X, z, n)

Output:

MATLAB
x = 1^n + (1/2)^n

The response combines a unit step component and a decaying exponential, matching second-order system dynamics.

Example 3: Generalized Symbolic Constant

Compute the inverse Z-transform using an arbitrary constant a:

MATLAB
syms z n a X = z / (z - a);
x = iztrans(X, z, n)

Output:

MATLAB
x = a^n

Visualizing Time-Domain Sequences in MATLAB

To inspect discrete-time sequence values, evaluate the output over a time index array and plot it with stem():

MATLAB
n_vals = 0:10;
x_vals = (0.5).^n_vals;
stem(n_vals, x_vals, 'filled', 'MarkerFaceColor', 'b');
title('Discrete-Time Sequence x[n] = (0.5)^n');
xlabel('Sample index n');
ylabel('Amplitude x[n]');
grid on;

Summary

  • Use iztrans() to solve inverse Z-transforms symbolically in MATLAB.
  • Always define syms z n before declaring Z-domain transfer functions.
  • Pair your symbolic analytical results with stem() for discrete-time visualization.
Verified Feedback

What Engineering Students Say

Real feedback from students across top engineering universities worldwide.

Verified Student

“I got full marks on my MATLAB DSP assignment! The filter design code was completely vectorized, the frequency response plots were exact, and the delivery was 8 hours before my deadline. Highly recommended!”

AS

Aditi Sharma

IIT Bombay • Signal Processing Coursework
Verified Student

“Our Simulink EV powertrain model had severe algebraic loop and solver errors. The MATLABSolutions team fixed the solver configuration in 4 hours and provided an annotated scope diagram. Lifesaver for my final year!”

JM

John M.

Monash University, Australia • Simulink Dynamic Model
Technical Knowledge Base

Latest MATLAB Guides & Tutorials

Explore deep-dive technical articles written by our engineering team to master complex MATLAB & Simulink topics.

MATLAB Guide 5 Min Read

How to Solve Differential Equations in MATLAB (ode45, ode15s, bvp4c)

Differential equation assignments usually boil down to three scenarios: standard initial value problems, stiff systems that crash normal solvers, and boundary value problems whe...

MATLAB Guide 5 Min Read

Physics-Informed Neural Networks (PINNs) in MATLAB: Complete Guide

1. Why Standard AI Fails on Real-World Physics Problems If you've ever tried training a standard deep learning model to predict fluid dynamics, structural stress, or h...