Using a small sample time to create a discrete Transfer Function of a continuous system using the function C2D, it can become less accurate.
Reproduction steps:
%%Transfer function 3th order
s = tf('s');I1 = 5; R1 = 7.38; R2 = 10.08; R3 = 4.09;C1 = 10; C2 = 46; C3 = 35;Hc = 1/(R1+R2+R3)/(s*C1+(1+R1*s*C1)*s*C2+(s*C1*R2+(1+R1*s*C1)*(1+R2*s*C2))*(1/R3+s*C3))%%Input
U0 = I1*(R1+R2+R3);%%Set time domain, sample time
T_end = 1000; Ts = [0.01; 0.001];for i = 1:2; samples = T_end/Ts(i); t = linspace(0,T_end,samples); Hz{i} = c2d(Hc,Ts(i),'tustin') end%%Compare system response of discrete
figurestep(Hc,Hz{1},Hz{2},T_end);legend('H_c','H_z Ts = 0.01','H_z Ts = 0.001',2)figurebode(Hc,Hz{1},Hz{2})legend('H_c','H_z Ts = 0.01','H_z Ts = 0.001')
The first figure shows that using a sample time of Ts = 0.001 the discrete system is not accurate for T > 400 [s] to the continuous system.
Best Answer