Laplace to Z transform for second order lag.

I have a problem with verifying the results for the conversion of a Laplace transform to a z transform. The Laplace transform is in a table and is:

(b-a)/((s+a)*(s+b))

The z transform for this transfer function is:

( z*(exp(-a*T)-exp(-b*T))/((z-exp(-a*T)*(z-exp(-b*T))

Now let: a=1 b=2 T=.001 Where a and b are the poles and T is the sample interval.

When s->0 the Laplace transfer functions gain is 1/2, but when z->1, the z transfer function's gain is way to big. I notice that if z transfer function is multiplied by T then it approaches the correct value of 1/2 as T gets smaller. However the equations in the Laplace to z transform tables DO NOT have a T in the numerator. Are the tables wrongs or am I making some wrong assumptions. I have noticed that some of the other second order conversions DO have T in the numerator.

I would be grateful for an explaination as to why this is so?

Peter Nachtwey

Reply to
Peter Nachtwey
Loading thread data ...

Because of the difference in representation between the z-domain and the s-domain. In the z-domain you either consider all values to be Dirac delta functions and state their energy (in which case the s-domain impulse and the z-domain impulse are the same thing), or you consider all values to be "just numbers", and you define the impulse differently.

If you take the first case then the two transfer functions have the same impulse response, but their step responses are different because the s-domain step is a step, and the z-domain step is a train of impulses where u(t) = sum(d(t - n*T))_n=0^{infinity}.

If you take the second case then the step functions mean the same thing (more or less), but the output of the z-domain transfer function has a different meaning than the s-domain transfer function.

In either case you cannot get a Laplace/z-transform pair that have the same impulse and step response (except, perhaps for T(z) = T(s) = A, but that's trivial).

You _can_, if you have a plant transfer function in the s-domain and a sampled-time system with an ADC and DAC, get a model in the z-domain that will tell you _exactly_ how the plant will behave at the ADC given any DAC output. You do this by modeling the DAC as a first-order hold and the ADC as a "perfect sampler" that multiplies the input by a train of pulses repeating every T seconds.

For a plant who's transfer function is T(s) = a/(s+a) you get:

T_z(s) = (1-e^{T s})/s * a/(s+a).

Do the partial-fraction expansion on this to get:

T_z(s) = (1-e^{-T*s}) * (a/s - a/(s+a)).

Do a z-transform to the pieces:

T_z(z) = (z-1)/z * (z/(z-1) - z/(z-d)), where d = e^{-T*a}.

Simplify:

T_z(z) = (z-1)/z * z(z-d - z + 1)/((z-1)(z-d)) = (1-d)/(z-d)

to get something that makes sense, has the right DC gain, and all that wonderful stuff.

Note that you _cannot_ go back to the s-domain this way, because in going from the continuous-time case to the sampled time case you're taking advantage of the fact that the sampling happens at exactly 1/T, so you can ignore it's effects on the z-domain system. You _cannot_ do this going back without running into mathematical difficulties of epic proportions. This means that you're stuck with doing all your analysis in the z domain then verifying after the fact that the stair-step action of the DAC doesn't cause you any problems with your real plant.

Usually the plant will act as a low-pass filter to the extent that any edges in the DAC output will be filtered down to negligible proportions. If not you'll need a reconstruction filter on the DAC which will mess up your plant performance, driving you to higher sampling rates -- at which point you may no longer need the reconstruction filter!

Reply to
Tim Wescott

I think I've found the subject for my next article. Thanks, Peter. Watch this space, I'll announce it when I get it posted (which may be a while; I've got some paying work that kinda takes precedence, dang it all).

Reply to
Tim Wescott

...

Thanks for a bang-up summary and rundown. With more like that, I may get the hang of this stuff yet!

Jerry

Reply to
Jerry Avins

Tim, this part explains my misunderstanding or bad assumption. Specifically the:

I forgot the ZOH part. Now I will hide in a hole for a period of time for forgeting that.

Thanks

Peter Nachtwey

Reply to
Peter Nachtwey

As Tim pointed out I forgot the ZOH. This is (z-1)/(z*s). This means that for a second order lag I should have used:

z-1 a*b

----*Z(-------------------) z s*(s+a)*(s+b)

This works when the table entry

1

------------------- s*(s+a)*(s+b)

is used.

Peter Nachtwey

Reply to
Peter Nachtwey

You have a table entry for _that_? What book are you using?

You realize, of course, that you don't need a table at all beyond the

1st-order stuff, because all the rest can be handled with partial fraction expansion, even 2nd-order resonant polynomials if you allow complex numbers.

MathCad is also good for this using their symbolic notation.

Reply to
Tim Wescott

Scilab is also a good math package and it's free.

formatting link

Reply to
Gary Schnabl

I have a very good control book with Laplace to z transform tables called "Digital Control System Analysis and Design" by Charles L Phillips and H. Troy Nagle. Another book I have with about the same table is "Control Strategies for Dynamic Systems" by John H Lumkes who as a professor at MSOE.

Yes. My books provide the converion up to second order equations. Beyond that I must use partial fractions.

I have Mathcad too. Matlab is good for getting answers. Mathcad is good for deriving the equations that provide the answers. However, Mathcad doesn't do a direct conversion from the s to the z domain. I find I need to convert to the time domain and then substitute nT for t and then select n and then do the conversion to the z domain. Using a table or using Mathcad makes no difference if you leave out the ZOH :( I save all the transfer functions in individual files that I can include using Insert->Reference. Once is have these equations for the transfer functions there is little need to regenerate them for each worksheet. This is why I forgot about the ZOH. I hadn't done this for awhile.

Peter Nachtwey

Reply to
Peter Nachtwey

Might you be from Milwaukee?

Gary

Reply to
Gary Schnabl

No, I got the book and went to one of John Lumkes' seminars at a IPFE show in Las Vegas. I have visited Milwaukee twice.

Peter Nachtwey

Reply to
Peter Nachtwey

I was born and educated there. Your surname is German-enough (night way?) to be from Milwaukee.

Gary

Reply to
Gary Schnabl

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.