- For individual users
- Instant access to solutions
- Ask your tech questions
- Start your 30-day Free Trial
Main Topics
Browse All TopicsHi~~ I having difficulty on using MatLab Simulink on converting a S domain transform function to Z domain~ I just wondor anyone have experience on this~
I get a transform function
H = tf([27.75 2.51675 0.5513 0],[4.2946e-8 0.00096105 6.4387 13587 2.6318e6 1.9954e5 4371])
27.75 s^3 + 2.517 s^2 + 0.5513 s
--------------------------
4.295e-008 s^6 + 0.000961 s^5 + 6.439 s^4 + 13587 s^3 + 2.632e006 s^2 + 199540 s + 4371
and wanna convert it into Z-domain by
>> Hd=c2d(H,0.0001,'zoh')
Transfer function:
6.27e-005 z^5 - 4.2e-005 z^4 - 0.0002297 z^3 + 0.0003141 z^2 - 8.462e-005 z - 2.049e-005
--------------------------
z^6 - 4.497 z^5 + 8.211 z^4 - 7.753 z^3 + 3.97 z^2 - 1.037 z + 0.1067
Sampling time: 0.0001
The Step response looks fine in
step(Hd)
but I cannot obtain the result to put into Simulink using Discrete Transform Function Block?? which I have also set the sampling time to 0.0001 already~ Anyone have exp. this as well and can share your solution with me?
Thanks~
James.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: prashant_n_mhatrePosted on 2002-11-14 at 16:19:29ID: 7450925
Basically you want to store the numerator and denominator matrices.
) d) tf2ss(bs,a s); ; delta); hd); ltas,omega s,1); as,omegas, 1); as,omegas, 1);
01,0)
Save the following function in a file 'stoz.m'
function [bz,az,zd]=stoz(bs,as,h,td
%
%[bz,az,zd]=stoz(bs,as,h,t
% Convert s domain SISO transfer function to z domain.
% It can deal with fractional dead-times.
%
% bs Zero polynomial
% as Pole polynomial
% h sample-time
% td time delay
% bz z-domain Zero polynomial (includes leading zeros for delay)
% az z-domain Pole polynomial
% zd Units of discrete time delays (represented seperately also);
%
x=td/h; k=fix(x); delta=td-k*h;
[phis,gams,deltas,omegas]=
[phi,gam]=c2d(phis,gams,h)
if delta > 0;
[phi2,gam2]=c2d(phis,gams,
hd=h-delta;
[phi3,gam3]=c2d(phis,gams,
b2=phi3*gam2;
[bz1,az]=ss2tf(phi,gam3,de
[bz2,az]=ss2tf(phi,b2,delt
bz=[bz1 0]+[0 bz2];
else;
[bz,az]=ss2tf(phi,gam,delt
end;
if k>0, bz=[zeros(1,k) bz];end;
zd=k;
return
Now define:
bs=[27.75 2.51675 0.5513 0]
as=[4.2946e-8 0.00096105 6.4387 13587 2.6318e6 1.9954e5 4371]
[bz,az,zd]=stoz(bs,as,0.00
This will give you bz and az matrices that you could use in simulink through workspace.