I suspect that in your first case for C the substitution you cite is only applicable because of the form of C. In general, the ZOH approximation does not use that substitution. Though probably not implemented this way, the genaral form for the ZOH approximation can be implemented as shown below, and compared to what Matlab produces
P=5;Ti=6;Ts=.1;
C=tf(P*[Ti 1],[Ti 0]);
Cz=c2d(C,Ts,'zoh');
Cznew = minreal(c2d(C*tf(1,[1 0]),Ts,'impulse')*tf([1 -1],[1 0],Ts)/Ts);
[Cz Cznew]
ans =
From input 1 to output:
5 z - 4.917
-----------
z - 1
From input 2 to output:
5 z - 4.917
-----------
z - 1
Sample time: 0.1 seconds
Discrete-time transfer function.
R=10;Te = 5; W=tf(1,[R*Te 1]);
Wz=c2d(W,Ts,'zoh');
Wznew = minreal(c2d(W*tf(1,[1 0]),Ts,'impulse')*tf([1 -1],[1 0],Ts)/Ts);
[Wz Wznew]
ans =
From input 1 to output:
0.001998
---------
z - 0.998
From input 2 to output:
0.001998
---------
z - 0.998
Sample time: 0.1 seconds
Discrete-time transfer function.
Th substitution you cite, s = (z -1)/Ts, the forward rectangular rule, which appears to be an allowable, albeit undocumented, method input to c2d.
Best Answer