# DTLTI Systems

*Pieter P*

#### Table of Contents *list*

## Signals

A signal is a discrete function that maps an integer
(the time step or point in time) to a real value or a vector of real values.

A signal that is zero for all

## Discrete-Time Linear Time-Invariant Systems

Discrete-Time Linear Time-Invariant Systems, or DTLTI
systems for short, are systems that perform a linear transformation on
signals. Time-invariance means that the
transformation doesn't change over time, it is independent of the time step

A DTLTI system maps one signal to another:

We'll define the properties of DTLTI systems mathematically:

- The transformation is linear:
$T(a\cdot h[n]+b\cdot g[n])=a\cdot T(h[n])+b\cdot T(g[n])$ - The transformation is time-invariant:
If
, then$y[n]\triangleq T(h[n])$ $\mathrm{\forall}k\in \mathbb{N}:T(h[n-k])=y[n-k]$

### Nonlinear systems

As an example of a system that is not linear, consider the system

Nonlinear systems are many times more complicated than linear systems, so
they will not be covered in this series of articles.

### Time-varying systems

The system

All systems in the following discussions will be time-invariant.

## Example

### Mathematical description

We'll define and plot a simple example signal, and then we'll apply a simple
transformation to it.
The input signal

The input signal

### Block diagram

The system could be implemented as follows.

The arrows indicate the direction of the data flow. The rectangular

### Python implementation

A possible implementation of this system in Python is given in the code
snippet below.

We just have to save the input to the delay element on each time step,
because we need it to calculate the next output.

`from numpy import array, arange, cos, pi`

`class ExampleDTLTISystem:`

`def __init__(self, initial_state: float = 0.0):`

`self.state = initial_state`

`def __call__(self, x_n: float) -> float:`

`# y[n] = (x[n] + x[n-1]) / 2`

`y_n = (x_n + self.state) / 2.0`

`# x[n] will be x[n-1] on the next time step,`

`# so save it in the system's state`

`self.state = x_n`

`return y_n`

`n = arange(9) # Create the time variable [0,1,2,…,7,8]`

`x = cos(pi * n) + 2 # Generate the input signal x[n]`

`T = ExampleDTLTISystem(1.0) # Instantiate the system with x[-1] = 1`

`y = map(T, x) # Apply the transformation y[n] = T(x[n])`

It is a good exercise to try to understand how these three representations
of the same system are related (the mathematical definition of