# Control Systems/Introduction to Digital Controls

| The Wikibook of: Control Systems and Control Engineering | Table of Contents | All Versions | PDF Version |
| The Wikibook of: Control Systems and Control Engineering | ← State-Space Stability | Routh-Hurwitz Criterion → | Glossary |

## Discrete-Time Stability

The stability analysis of a discrete-time or digital system is similar to the analysis for a continuous time system. However, there are enough differences that it warrants a separate chapter.

## Input-Output Stability
### Uniform Stability

An LTI causal system is uniformly BIBO stable if there exists a positive constant L such that the following conditions:
    $x[n_{0}]=0$
    $\|u[n]\|\leq k$
    $k\geq 0$
imply that
    $\|y[n]\|\leq L$

### Impulse Response Matrix

We can define the impulse response matrix of a discrete-time system as:
[Impulse Response Matrix]
    $G[n]=\left\{{\begin{matrix}CA^{k-1}B&{\mbox{ if }}k>0\\0&{\mbox{ if }}k\leq 0\end{matrix}}\right.$
Or, in the general time-varying case:
    $G[n]=\left\{{\begin{matrix}C\phi [n,n_{0}]B&{\mbox{ if }}k>0\\0&{\mbox{ if }}k\leq 0\end{matrix}}\right.$
A digital system is BIBO stable if and only if there exists a positive constant L such that for all non-negative k:
    $\sum _{n=0}^{k}\|G[n]\|\leq L$

## Stability of Transfer Function

A MIMO discrete-time system is BIBO stable if and only if every pole of every transfer function in the transfer function matrix has a magnitude less than 1. All poles of all transfer functions must exist inside the unit circle on the Z plane.

## Lyapunov Stability

There is a discrete version of the Lyapunov stability theorem that applies to digital systems. Given the discrete Lyapunov equation:
[Digital Lypapunov Equation]
    $A^{T}MA-M=-N$
We can use this version of the Lyapunov equation to define a condition for stability in discrete-time systems:

### Lyapunov Stability Theorem (Digital Systems)

    A digital system with the system matrix A is asymptotically stable if and only if there exists a unique matrix M that satisfies the Lyapunov Equation for every positive definite matrix N.

## Poles and Eigenvalues

Every pole of G(z) is an eigenvalue of the system matrix A. Not every eigenvalue of A is a pole of G(z). Like the poles of the transfer function, all the eigenvalues of the system matrix must have magnitudes less than 1. Mathematically:
    ${\sqrt {\operatorname {Re} (z)^{2}+\operatorname {Im} (z)^{2}}}\leq 1$
If the magnitude of the eigenvalues of the system matrix A, or the poles of the transfer functions are greater than 1, the system is unstable.

## Finite Wordlengths

Digital computer systems have an inherent problem because implementable computer systems have finite wordlengths to deal with. Some of the issues are:
* Real numbers can only be represented with a finite precision. Typically, a computer system can only accurately represent a number to a finite number of decimal points.
* Because of the fact above, computer systems with feedback can compound errors with each program iteration. Small errors in one step of an algorithm can lead to large errors later in the program.
* Integer numbers in computer systems have finite lengths. Because of this, integer numbers will either roll-over, or saturate, depending on the design of the computer system. Both situations can create inaccurate results.
| ← State-Space Stability | Control Systems | Routh-Hurwitz Criterion → |