> Your method looks correct for first order derivative > method. > > The methods I know of are: > > 1. first order derivative approx: z=1/(1-sT), > 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. matched-z: factor H(s) into (s-sz)/(s-sp) 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 (s-sp) by (1-exp(sp*T) > z^-1) and replace all > the (s-sz) by (1-exp(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' Zero-order hold on the inputs > 'foh' Linear interpolation of inputs (triangle > appx.) > 'impulse' Impulse-invariant discretization > 'tustin' Bilinear (Tustin) approximation. > 'matched' Matched pole-zero 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 > >
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'