frodonet
Posts:
5
From:
malaysia
Registered:
10/24/10


Re: [Matlab Question] Converting H(s) to H(z) using derivative approximation?
Posted:
Oct 24, 2010 6:57 PM


> Your method looks correct for first order derivative > method. > > The methods I know of are: > > 1. first order derivative approx: z=1/(1sT), > requires very large > sampling to work ok, good only for low pass filter > design > > 2. higher order derivative approximations from (1). > Do not know much > about it. > > 3. impulse invariance: z=exp(sT), zeros do not get > mapped correctly, > only poles. Aliasing problems. > > 4. matchedz: factor H(s) into (ssz)/(ssp) form, > where sz are the > zeros of the numerator and sp are zeros of the > denominator (ie. pols of > H(s), then replace all the (ssp) by (1exp(sp*T) > z^1) and replace all > the (ssz) by (1exp(sz*T) z^1) to obtain H(z). > Requires small T also, > like (1) > > 5. bilinear transformation: z= (1+(T/2)*z) / > (1(T/2)*z ) > requires frequency wrapping, but is the best one of > all, when in doubt > use. no aliasing. > > Now as far is which one is which in Matlab, I just > had a look at help on > c2d, and it says: > > 'zoh' Zeroorder hold on the inputs > 'foh' Linear interpolation of inputs (triangle > appx.) > 'impulse' Impulseinvariant discretization > 'tustin' Bilinear (Tustin) approximation. > 'matched' Matched polezero method (for SISO > systems only). > > Clearly the last 3 we now know what they are, the > description is clear. > > We just need to figure if zoh or foh are the first > first order > derivative or not? I am not sure now without spending > more time on it. > > My guess is that 'foh' is the first order > approximation. But a Matlab > expert on these might have a better answer. It could > be something > completely different. > > You can try your method and compare with Matlab's zoh > or foh and see > which gives the same result. > > Use 'tustin', it is supposed to be the best method, > this is the bilinear > method. > > Nasser > >
Hi Nasser,
Thanks again very much for your help.
After reading your suggestions and advice, i need to try all the solutions again.
I personally however, think that you are right about the first order approximation which is the foh,
actually we can try on a simple transfer function such as :
1  s + 1
and do a conversion to z transform manually by substituting s = (1  z^1 )/ T
and then compare it with the matlab using the sys command u recommended with 'foh'
see whether it gets the same answer..
I will try again and post the results!

