ZOH Frequency response and matlab
ZOH Frequency response and matlab
(OP)
I am struggling little bit in trying to understand the frequency response of the ZOH with matlab. I was wondering if you have any thoughts on this.
Here are few things that I understand ( coorect me if these are not right)
1) ZOH is linear but not Time Invariant
2) The frequency response of the ZOH is given by H_zoh(s) =( 1- exp(-sT)) / s. This is works for the fundamental component of the ZOH output. Since the actual output of the ZOH consists of lot of high frequency components due to fast transitions.
H_zoh(s) has low pass like characteristics with zero on multiples of the sampling frequency
3) c2d(sys,'zoh',Ts) is a matlab function used to discretize continous domain system (sys( to discrete domain with ZOH and sampling time of Ts.
Problem:
To get the frequency response of ZOH I have set the sys = tf(1,1). When I try the bode of resultant discrete system I get perfectly flat response with frequency ( Basically I don't see H_zoh(s) characteristics).
In past I have explicitly used the explicit expression of H_zoh to do analysis in frequency domain. I was wondering why matlab c2d don't take in account the response of the H_zoh ?
Also,
The output of the ZOH can be approximated as input signal delayed by Ts/2 , Ts being the sampling time. I was wondering when is this approximation valid?
I was wondering if you have good reference on his kind of stuff. I looked into following text w/o getting a coherent description of this issue.
1) Franklin and Powell , Digital Control of Dynamic systems.
2) Ogata, Discrete time Control Systems
RE: ZOH Frequency response and matlab
http://www.dsp-bg.info/
RE: ZOH Frequency response and matlab
ZOH cannot be linear, by definition.
TTFN
RE: ZOH Frequency response and matlab
Thanks for your pointer to matlab forum.
Actually I did a bit of search on this. ZOH is linear and this aspect is well documented too.
It satisfies superposition and scaling property. It is sruprinsing but true. Try it !
-SK
RE: ZOH Frequency response and matlab
TTFN
RE: ZOH Frequency response and matlab
Is discountinuity in first derivative a condition for the system to be Linear ?
I thought following two conditions are suffcient for a systemto be Linear .
1) Superposition : Sum of outputs is same as output of sum of inputs
2) Scaling : Scaling input by a conatct scales output by same factor.
Cheers
-SK
RE: ZOH Frequency response and matlab
ZOH(t1+t2) = ZOH(t1)+ZOH(t2)
for any t1 or t2?
TTFN
RE: ZOH Frequency response and matlab
Just to make sure i have understood your notation. I am restating it.
Superposition:
Given:
y1(t) = ZOH {x1(t)} and
y2(t) = ZOH {x2(t)}
Implies
y(t) = ZOH {x1(t)+x2(t)}= y1(t)+y2(t)
Scaling:
If y1(t) = ZOH {x1(t)}
Then
a *y1(t) = ZOH {a*x1(t)}
RE: ZOH Frequency response and matlab
TTFN
RE: ZOH Frequency response and matlab
sysZohA = tf( 1, 1 );, Ts = 1;, c2d( sysZohA, Ts, 'zoh' )
gives: Transfer function: 1
Since you have stated that the zoh is already known to be H_zoh(s) =( 1- exp(-sT)) / s, you could ask MATLAB to determine the best fit discrete system. We could use a Pade approximation of the delay exp(-sT), then build the zoh(s). [ bPade, aPade ] = pade( Ts, 5 );, sysZohA = tf( [ aPade - bPade ], [ bPade 0 ] )
Transfer function:
-2 s^5 - 840 s^3 - 3.024e004 s
---------------------------------------------------------------
s^6 - 30 s^5 + 420 s^4 - 3360 s^3 + 1.512e004 s^2 - 3.024e004 s
This will get you an approximation to a ZOH in the continuous s domain. Then sysZohD = c2d( sysZohA, Ts, 'zoh' ) should work. I have not chekced to see if the order is backwards, but it should be a discrete approximation using the zoh method of an approximation to a continuous domain approximation of the zoh.
John Solar