Sie sind auf Seite 1von 4

1 | Mensun Lakhemaru, 640419

Objective:
To Determine the Z transform of any given function and finding out its inverse.

Theory:
Z transform is a mathematical tool commonly used for the analysis and synthesis of the discrete time
control system.
Consider a sequence f(n).The z-transform is defined as

F(z) = Z[f(n)] =  f ( n) z
0
n

where z is a complex variable.

In Matlab we do mathematical operations to symbolic varaibles which are data structures to represent
symbolic varaibles, expressions and matrices.
Symbolic variables are simply created by sym or syms command.
a = sym(‘a’) command simply returns a printing a as a symbol.
Similarly syms a b c creates a, b and c as symbolic objects.

Mathematical Operations
Z transform
F = ztrans(f) is the z-transform of the scalar symbol f with default independent variable n. The default
return is a function of z. The default return is a function of z.
F = ztrans(f,w) makes F a function of the symbol w instead of the default z. i.e. F=F(w)
F = ztrans(f,k,w) takes f to be a function of the symbolic variable k.

Inverse Z-transform
F=iztrans(F) is the inverse z-transform of the scalar symbolic object F with default independent variable
z. The default return is a function of n.
If F = F(n), iztrans returns a function of k. i.e. f = f(k)
f=iztrans(F,k) makes f a function of k instead of the default n. Here k is a scalar symbolic object.
f = iztrans(F,w,k) takes F to be a function of w instead of the default findsym(F) and returns a function of
k.
Laplace transform
L = laplace(F) is the Laplace transform of the scalar symbol F with default independent variable t. The
default return is a function of s. The Laplace transform is applied to a function of t and returns a function
of s.
L = laplace(F,t) makes L a function of t instead of the default s.
L = laplace(F,w,z) makes L a function of z and F a function of w instead of the default variables s and t,
respectively.

Inverse Laplace transform


2 | Mensun Lakhemaru, 640419

F = ilaplace(L) is the inverse Laplace transform of the scalar symbolic object L with default independent
variable s. The default return is a function of t. The inverse Laplace transform is applied to a function of
s and returns a function of t.
F = ilaplace(L,y) makes F a function of y instead of the default t.
F = ilaplace(L,y,x) takes F to be a function of x and L a function of y instead of the default variables t and
s, respectively.

Practice
Practice to find z-transform of the following:

i> f(t) = t ii> f(t)= t 2


>> syms t T a k n; >> f=t.*t;
>> f=t; >> f=subs(f,t,k*T);
>> f=subs(f,t,k*T); >> F=ztrans(f)
>> F=ztrans(f) F=
F= T^2*z*(z+1)/(z-1)^3
T*z/(z-1)^2 >> f=iztrans(F,k)
>> f=iztrans(F,k) f=
f= T^2*k^2
T*k
>> f=subs(f,k*T,t)
f=
t

iii> f(t) = e at iv> f(t) =sin(at)


>> t=sym(k*T); >> t=sym(k*T);
>> f=exp(a*t) >> f=sin(a*t)
f= f=
exp(a*k*T) sin(a*k*T)
>> F=ztrans(f) >> F=ztrans(f)
F= F=
z/exp(a*T)/(z/exp(a*T)-1) z*sin(a*T)/(z^2-2*z*cos(a*T)+1)
>> f=iztrans(F,k) >> f=iztrans(F,k)
f= f=
exp(a*T)^k sin(a*T*k)
3 | Mensun Lakhemaru, 640419

v> f(t)=cos(at) vi> f(t) = a k


>> t=sym(k*T); >> f=a^k
>> f=cos(a*t) f=
f= a^k
cos(a*k*T) >> F=ztrans(f)
>> F=ztrans(f) F=
F= z/a/(z/a-1)
(z-cos(a*T))*z/(z^2-2*z*cos(a*T)+1) >> simplify(F)
>> f=iztrans(F,k) ans =
f= -z/(-z+a)
cos(a*T*k)

Practice to find the z-transform from laplace transform:


i> f(s)=1/s^2 ii> f(s) = 2/s^3
>> syms f F L s k t T >> L=2/s^3
>> L=1/(s*s) L=
L= 2/s^3
1/s^2 >> f=ilaplace(L)
>> f=ilaplace(L) f=
f= t^2
t >> f=subs(f,t,k*T)
>> f=subs(f,t,k*T) f=
f= k^2*T^2
k*T >> F=ztrans(f)
>> F=ztrans(f) F=
F= T^2*z*(z+1)/(z-1)^3
T*z/(z-1)^2

iii> f(s) = 24/s^5 iv> f(s) = 1/(s-a)


>> L=24/s^5 >> L=1/(s-a)
L= L=
24/s^5 1/(s-a)
>> f=ilaplace(L) >> f=ilaplace(L)
f= f=
t^4 exp(a*t)
>> f=subs(f,t,k*T) >> f=subs(f,t,k*T)
f= f=
k^4*T^4 exp(a*k*T)
>> F=ztrans(f) >> F=ztrans(f)
F= F=
T^4*z*(z^3+11*z^2+11*z+1)/(z-1)^5 z/exp(a*T)/(z/exp(a*T)-1)

v> f(s) = a/(s^2+a^2) vi> f(s) = s/(s^2+a^2)


4 | Mensun Lakhemaru, 640419

>> L=a/(s^2+a^2) >> L=s/(s^2+a^2)


L= L=
a/(s^2+a^2) s/(s^2+a^2)
>> f=ilaplace(L) >> f=ilaplace(L)
f= f=
sin(a*t) cos(a*t)
>> f=subs(f,t,k*T) >> f=subs(f,t,k*T)
f= f=
sin(a*k*T) cos(a*k*T)
>> F=ztrans(f) >> F=ztrans(f)
F= F=
z*sin(a*T)/(z^2-2*z*cos(a*T)+1) (z-cos(a*T))*z/(z^2-2*z*cos(a*T)+1)

Discussion:
In this lab we used built in matlab function to evaluate z-transform of given functions ,their inverse z-
transform and ztrasform for system in s-domain. Using ztrans() function we found z-transform and
iztrans() function, we found inverse z-transform. The function in s domain were first brought to time
domain using inverse laplace transform carried out using ilaplace() function.The time domain funtion is
ztransformed using ztrans() function.

Conclusion:
Hence, we learnt z-transform,laplace transform and their inverse operations.

Das könnte Ihnen auch gefallen