z-transform of unit step function?

조회 수: 12 (최근 30일)
Diamond
Diamond 2014년 5월 26일
댓글: Nour 2024년 11월 12일
i have this n-domain function H[n]= (0.5^n)*u[n] and i need to find z transformation of this function. i've tried this one:
>> syms n z
>> y = ((0.5)^n)*heaviside(n);
>> yz = ztrans (y,n,z)
yz =
1/(2*z - 1) + 1/2
isn't supposed to be 1/(-0.5^z-1)+1 ? is there any solution to solve this z transform?

채택된 답변

Geoff Hayes
Geoff Hayes 2014년 5월 27일
I don't have the Symbolic Toolbox but I think that the provided answer is correct. If
x[n] = 0.5^n * u[n]
=> x[n] = {,0,0,0.5^0 * 0, 0.5^1 * 1, 0.5^2 * 1,}
then the z-transform is
sum(n=-Inf:+Inf)(0.5^n)*(z^-n)
= sum(n=0:+Inf)(0.5^n)*(z^-n) % ignore all n<0
= 0.5 + sum(n=1:+Inf)(0.5^n)*(z^-n)
= 0.5 + sum(n=1::+Inf)(0.5/z)^n
= 0.5 + (0.5/z)/(1-(0.5/z)) % assuming abs(0.5/z)<1
= 0.5 + 0.5/(z-0.5)
= 1/2 + (1/2)/(z-1/2)
= 1/(2*z - 1) + 1/2
  댓글 수: 2
Diamond
Diamond 2014년 5월 27일
편집: Diamond 2014년 5월 27일
is it same with the 3rd row formula of this table ? or am i wrong to define u[n] by heaviside (n)?
Geoff Hayes
Geoff Hayes 2014년 5월 27일
As Azzi mentions below, MATLAB's heaviside defines H(0) to be 0.5, whereas other definitions of the same function define H(0) to be 1. (See http://en.wikipedia.org/wiki/Heaviside_step_function#Zero_argument for details.)
The formula in the third row of your table assumes that H(0)=1 and can be derived similar to above.
I think that it is fine to define u[n] with heaviside(n) as long as your are aware (and state) that heaviside(0) = 0.5.

댓글을 달려면 로그인하십시오.

추가 답변 (2개)

Amine BENZOUBIR
Amine BENZOUBIR 2019년 10월 22일
use this commande to change the origine to 1
v=1;
sympref('HeavisideAtOrigin', v);

Azzi Abdelmalek
Azzi Abdelmalek 2014년 5월 27일
편집: Azzi Abdelmalek 2014년 5월 27일
The heaveaside function of Matlab is defined with heaviside(0) equal to 0.5
If you look at the table using another definition of heaviside (e(0)=1), you will find the z-transform of a^n is z/(z-a) . The heaviside defined in Matlab can be written as
heaviside(n)=e(n)-delta(n) (delta is Kronecker function), the z-transform is z/(z-a)-0.5
In your case replace a by 0.5
  댓글 수: 1
Diamond
Diamond 2014년 5월 27일
is it same with the 3rd row formula of this table? or am i wrong to define u[n] by heaviside (n)?

댓글을 달려면 로그인하십시오.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by