# The $z$-Transform

*This Jupyter notebook is part of a [collection of notebooks](../index.ipynb) in the bachelors module Signals and Systems, Comunications Engineering, Universität Rostock. Please direct questions and suggestions to [Sascha.Spors@uni-rostock.de](mailto:Sascha.Spors@uni-rostock.de).*

## Properties

The $z$-transform has a number of specific properties which can be concluded directly from its definition. The most important ones in the context of signals and systems are reviewed in the following.

### Linearity

As can be concluded from its definition, the $z$-transform is a linear operation. For two signals $x_1[k]$ and $x_2[k]$ with $z$-transforms $X_1(z) = \mathcal{Z} \{ x_1[k] \}$ and $X_2(z) = \mathcal{Z} \{ x_2[k] \}$ the following holds

\begin{equation}
\mathcal{Z} \{ A \cdot x_1[k] + B \cdot x_2[k] \} = A \cdot X_1(z) + B \cdot X_2(z)
\end{equation}

with $A, B \in \mathbb{C}$. The region of convergence (ROC) of the superposition $A x_1[k] + B x_2[k]$ is as least as large as the intersection of the ROCs of $x_1[k]$ and $x_2[k]$

\begin{equation}
\text{ROC} \{ A \cdot x_1[k] + B \cdot x_2[k] \} \supseteq \text{ROC} \{ x_1[k] \} \cap \text{ROC} \{ x_2[k] \}
\end{equation}

The $z$-transform of a weighted superposition of signals is equal to the weighted superposition of the individual $z$-transforms. This property is useful to derive the transform of signals that can be expressed as superposition of other signals for which the $z$-transform is known or can be calculated easier.

#### Transformation of the cosine and sine signal

The Laplace transform of the causal cosine $\epsilon[k] \cdot \cos(\Omega_0 k)$ and sine $\epsilon[k] \cdot \sin(\Omega_0 k)$ signal with $\Omega_0 \in \mathbb{R}$ is derived by expressing the cosine/sine as a superposition of harmonic exponential signals using [Euler's formula](https://en.wikipedia.org/wiki/Euler's_formula)

\begin{align}
\cos(\Omega_0 k) &= \frac{1}{2} \left( e^{j \Omega_0 k} + e^{-j \Omega_0 k} \right) \\
\sin(\Omega_0 k) &= \frac{1}{2j} \left( e^{j \Omega_0 k} - e^{-j \Omega_0 k} \right)
\end{align}

The $z$-transform of the harmonic exponential signal can be derived from the spectrum of the [causal complex exponential signal](definition.ipynb#Transformation-of-the-Causal-Complex-Exponential-Signal) as

\begin{equation}
\mathcal{Z} \{ \epsilon[k] \cdot e^{j \Omega_0 k} \} = \frac{z}{z - e^{j \Omega_0}} \qquad \text{for } |z| > 1
\end{equation}

Exploiting the linearity of the $z$-transform yields

\begin{equation}
\mathcal{Z} \{ \epsilon[k] \cdot \cos(\Omega_0 k) \} = 
\frac{1}{2} \left( \frac{z}{z - e^{j \Omega_0}} + \frac{z}{z - e^{-j \Omega_0}} \right) =
\frac{z ( z - \cos(\Omega_0))}{z^2 - 2 z \cos(\Omega_0) + 1}
\qquad \text{for } |z| > 1
\end{equation}

and

\begin{equation}
\mathcal{Z} \{ \epsilon[k] \cdot \sin(\Omega_0 k) \} = 
\frac{1}{2j} \left( \frac{z}{z - e^{j \Omega_0}} - \frac{z}{z - e^{-j \Omega_0}} \right) =
\frac{z \sin(\Omega_0)}{z^2 - 2 z \cos(\Omega_0) + 1}
\qquad \text{for } |z| > 1
\end{equation}

**Exercise**

* Determine the zeros and poles of above $z$-transforms. What specific symmetries do the zeros and poles show in the $z$-plane?

### Symmetry for Real-Valued Signals

The $z$-transform of a conjugated signal $x^*[k]$ is given as

\begin{equation}
\mathcal{Z} \{ x^*[k] \} = \sum_{k = -\infty}^{\infty} x^*[k] \, z^{-k} 
= \left( \sum_{k = -\infty}^{\infty} x[k] \, (z^*)^{-k} \right)^* 
= X^*(z^*)
\end{equation}

where $X(z) = \mathcal{Z} \{ x[k] \}$. The ROC of $x^*[k]$ is equal to the ROC of $x[k]$. Above result is used to derive the $z$-transform of the real part of the signal $x[k]$

\begin{equation}
\mathcal{Z} \left\{ \Re \{ x[k] \} \right\} = \mathcal{Z} \left\{ \frac{1}{2} ( x[k] + x^*[k] ) \right\} = \frac{1}{2} \left[ X(z) + X^*(z^*) \right]
\end{equation}

and imaginary part

\begin{equation}
\mathcal{Z} \left\{ \Im \{ x[k] \} \right\} = \mathcal{Z} \left\{ \frac{1}{2j} ( x[k] - x^*[k] ) \right\} = \frac{1}{2j} \left[ X(z) - X^*(z^*) \right]
\end{equation}

For a real-valued signal $x[k] \in \mathbb{R}$ with $\Im \{ x[k] \} = 0$ it follows that

\begin{equation}
X(z) = X^*(z^*)
\end{equation}

It can be concluded, that the $z$-transform of a real valued signal shows complex conjugate symmetry. 

The poles and zeros of a [$z$-transform which can be expressed as a rational function](definition.ipynb#Representation) in $z$ 

\begin{equation}
X(s) = \frac{\sum_{m=0}^{M} \beta_m z^{-m}}{\sum_{n=0}^{N} \alpha_n z^{-n}} = K \cdot \frac{\prod_{\mu=0}^{Q} (z - z_{0 \mu})}{\prod_{\nu=0}^{P} (z - z_{\infty \nu})}
\end{equation}

with $Q=M-1$ and $P=N-1$ show also specific symmetries. From above condition for the $z$-transform of a real-valued signal $x[k] \in \mathbb{R}$, it can be concluded that the coefficients $\alpha_n, \beta_m$ of the numerator and denominator are real-valued. The [complex conjugate root theorem](https://en.wikipedia.org/wiki/Complex_conjugate_root_theorem) states that the roots of a polynomial with real valued coefficients are either real-valued or complex conjugate pairs. Hence, the zeros and poles of the $z$-transform $X(z)$ of a real-valued signal $x[k]$ are either real-valued or complex conjugate pairs.

**Example**

As example for a real-valued signal, the poles and zeros of the $z$-transform $X(z) = \mathcal{Z} \{ \epsilon[k] \cos(\Omega_0 k) \}$ are investigated. First the transform, as derived above, is defined in `SymPy`


```python
import sympy as sym
%matplotlib inline
sym.init_printing()

z = sym.symbols('z', complex=True)
W0 = sym.symbols('Omega0', real=True)

X = z * (z - sym.cos(W0)) / (z**2 - 2*z*sym.cos(W0) + 1)
X
```

The roots of $X(z)$ are computed


```python
poles = sym.roots(sym.denom(X), z)
poles
```

as well as its zeros


```python
zeros = sym.roots(sym.numer(X), z)
zeros
```

Finally the pole-zero plot is plotted for $\Omega = \frac{\pi}{4}$


```python
from pole_zero_plot import pole_zero_plot

X2 = X.subs(W0, sym.pi/4)
pole_zero_plot(sym.roots(sym.denom(X2), z), sym.roots(sym.numer(X2), z))
```


    

    


**Copyright**

This notebook is provided as [Open Educational Resource](https://en.wikipedia.org/wiki/Open_educational_resources). Feel free to use the notebook for your own purposes. The text is licensed under [Creative Commons Attribution 4.0](https://creativecommons.org/licenses/by/4.0/), the code of the IPython examples under the [MIT license](https://opensource.org/licenses/MIT). Please attribute the work as follows: *Sascha Spors, Continuous- and Discrete-Time Signals and Systems - Theory and Computational Examples*.

933c29edce293fc598c3d3352c1398263009b910
ipynb
Jupyter Notebook
z_transform/properties.ipynb
spatialaudio/signals-and-systems-lecture
93e2f3488dc8f7ae111a34732bd4d13116763c5d
MIT
2016-04-01T14:21:00.000Z
2022-03-28T20:35:09.000Z
z_transform/properties.ipynb
iamzhd1977/signals-and-systems-lecture
b134608d336ceb94d83cdb66bc11c6d4d035f99c
MIT
2016-04-11T06:28:17.000Z
2021-11-10T10:59:35.000Z
z_transform/properties.ipynb
iamzhd1977/signals-and-systems-lecture
b134608d336ceb94d83cdb66bc11c6d4d035f99c
MIT
2017-04-20T00:46:03.000Z
2022-03-30T14:07:09.000Z
Qwen/Qwen-72B
1. YES
2. YES