For a continuous system design, we often use the Final Value Theorem

to find steady-state system errors. There is also the Final Value Theorem for discrete systems. The discrete Final Value Theorem is defined as

if all poles of (1-z^-1)X(z) are inside the unit circle.

For example, suppose we have the following discrete transfer function

First, let's obtain the poles of this transfer function and see if they are located inside the unit circle. We can find the poles by hand or by the following MATLAB commands.

```numDz = [1 0.5];
denDz = [1 -0.6 0.3];
sys_d = tf(numDz,denDz,-1);

[p,z]=pzmap(sys_d)
```

Either way, you should get

```	p =

0.3000+0.4583i
0.3000-0.4583i
```

Since both poles are inside the unit circle, we can go ahead and apply the Final Value Theorem.

## Finding steady-state error to the step input

Let the U(z) be the unit step input

and

Applying the Final Value Theorem yields

so the steady-state value of the above discrete system to the step input is 2.14. This corresponds to the steady-state error of 114%.

Let's confirm this by obtaining a step response plot of the system. Create an new m-file and enter the following commands. Running this m-file in the command window gives you the step response shown below.

```numDz = [1 0.5];
denDz = [1 -0.6 0.3];
T = .05;
sys = tf(numDz,denDz,T);

[x,t]=step(sys,5);
stairs(t,x)
```

The steady-state value is 2.14 as we expected.

## Finding steady-state error to the impulse input

Now change the input U(z) from the unit step to the unit impulse.

Applying the Final Value Theorem yields

so that the steady-state value of the system to the impulse input is 0. This corresponds to the steady-state error of 0%.

Change the step in the above m-file to impulse and rerun it . You should see the following impulse response.

From this plot, we see the steady-state value to the unit impulse is 0 as we expected.