This bug has been fixed in Release 14 Service Pack 3 (R14SP3). For previous product releases, read below for any possible workarounds:
The Impulse Invariant discretization method implemented in the C2D function with the 'imp' option is such that the impulse responses for the continuous system and the obtained discretized system match. For example,
n=1;d=[1 1];
sc=ss(tf(n,d));
sd1=c2d(sc,0.01,'imp');
figure
impulse(sc,sd1)
However the frequency responses for the systems may not match due to the scaling factor (the sampling time). For example,
Thus, the Impulse Invariant method is a good choice if the same impulse response is desired. It may not be a good choice for obtaining the same frequency response, since it is susceptible to aliasing. In general, a bilinear transform (such as 'tustin') is a better choice for obtaining a discretized system with matching frequency response. For example,
bode(sc,c2d(sc,0.01,'tustin'),c2d(sc,0.2,'tustin'),c2d(sc,0.5,'tustin'))
To obtain similar frequency responses between the continuous and discretized systems with the Impulse Invariant method, adjust the scaling factor in the C2D function inputs. Matching frequency responses for the continuous and discretized systems can then be obtained as shown in the following code:
Ts=[0.1 0.01 0.001];
n=1;d=[1 1];
sc=ss(tf(n,d));
sd1=c2d(sc*Ts(1),Ts(1),'imp');
sd2=c2d(sc*Ts(2),Ts(2),'imp');
sd3=c2d(sc*Ts(3),Ts(3),'imp');
bode(sc,sd1,sd2,sd3,{0.01,100});
Best Answer