# DSP / Control System / Z-Transform Question

**URL:** <https://boards.straightdope.com/t/dsp-control-system-z-transform-question/657541>\
**Category:** Factual Questions\
**Created:** [May 5, 2013, 1:31pm UTC](https://boards.straightdope.com/t/dsp-control-system-z-transform-question/657541 "2013-05-05T13:31:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dgrdfd](https://avatars.discourse-cdn.com/v4/letter/d/eb8c5e/32.png) [@dgrdfd](https://boards.straightdope.com/u/dgrdfd)\
**Post date:** [May 5, 2013, 1:31pm UTC](https://boards.straightdope.com/t/dsp-control-system-z-transform-question/657541/1 "2013-05-05T13:31:45Z")

</div>

Suppose I have a system modeled as y’'=u. Taking the Laplace Transform with zero initial conditions yields G(s) = 1/(s^2).

No biggie, I am interested in the discrete time transfer function so I look up a Z-Transform table and get:

If, G(s) = 1/(s^2), then G(z) = Tz/((z-1)^2)

However, using the state space representation one may find the DT transfer function (assuming A,B,C,D matrices are DT) using:

G(z) = C\*(sI - A)^-1\*B + D

These yield two totally different transfer functions and accordingly step responses. Using Matlab I get:

k\_sys=tf(1,[1 0 0]) %define 1/(s^2)  
t\_sys\_d=c2d(k\_sys,1) %convert to D.T. transfer function

## 0.5 z + 0.5

z^2 - 2 z + 1

Which is NOT the Z transform from the table, but does match the  
G(z) = C\*(sI - A)^-1\*B + D.

Can anyone explain why the Z-Transform tables do not yield the same discrete time transfer function?

Sources: [Readings | Dynamic Systems and Control | Electrical Engineering and Computer Science | MIT OpenCourseWare](http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-241j-dynamic-systems-and-control-spring-2011/readings/MIT6_241JS11_chap25.pdf) (page 5 for D.T. Transfer Function Equation from D.T. State Space Representation)

[Laplace and Z Transforms](http://lpsa.swarthmore.edu/LaplaceZTable/LaplaceZFuncTable.html) (Z Transform Table)

---

<div class="post-metadata">

**Author:** ![Isilder](https://avatars.discourse-cdn.com/v4/letter/i/cc9497/32.png) [@Isilder](https://boards.straightdope.com/u/Isilder)\
**Post date:** [May 6, 2013, 4:45am UTC](https://boards.straightdope.com/t/dsp-control-system-z-transform-question/657541/2 "2013-05-06T04:45:13Z")

</div>

Thinking you are finding/comparing the difference between continuous and discrete time.  
Z transform for discrete

laplace transform for continuous.

---

<div class="post-metadata">

**Author:** ![dgrdfd](https://avatars.discourse-cdn.com/v4/letter/d/eb8c5e/32.png) [@dgrdfd](https://boards.straightdope.com/u/dgrdfd)\
**Post date:** [May 6, 2013, 11:32am UTC](https://boards.straightdope.com/t/dsp-control-system-z-transform-question/657541/3 "2013-05-06T11:32:53Z")

</div>

> [@Isilder](#):
>
> Thinking you are finding/comparing the difference between continuous and discrete time.  
> Z transform for discrete
> 
> laplace transform for continuous.

I think understand that piece. I just don’t understand why the discrete time transfer functions given in the tables do not match the transfer function given by G(z) = C\*(sI - A)^-1\*B + D.

In continuous, G(s) = 1/(s^2) yields G(z) = Tz/((z-1)^2) using the tables

## Mapping G(s) = 1/(s^2) into the continuous state space, then discrete state space, then using the G(z) = C\*(sI - A)^-1\*B + D yields a G(z) = 0.5 z + 0.5

z^2 - 2 z + 1

and my arithmetic is confirmed with Matlab so I am sure I’m doing it right. I just don’t understand why two ostensibly equal methods are yielding different results.
