Why continuous and discrete transfer function have different results

24 次查看(过去 30 天)
I am trying to determine why the continuous and discrete transfer functions yield different results when each is fed with a sinusoidal input for a first order transfer function. How can I reduce or remove the error between the two transfer functions?
I am modeling a first order continuous system with a pole at s = -5. The objective is to determine a discrete transfer function that matches the continuous transfer function. To determine the discrete transfer function, I use the c2d command. I run the following code.
a = 5;
Ts = 1e-4;
trans = tf(1, [1, a]);
trans_matlab_match = c2d(trans, Ts, 'matched')
I determine that
1
-----
s + 5
in s domain maps to
9.998e-05
----------
z - 0.9995
in z domain.
I create a simulink model with the continuous and discrete transfer functions connected to the same input, and compare their outputs, shown below.
The parameters are taken from the Matlab script: The continuous transfer function parameters are:
Numerator: 1
Denominator: [1 5]
The discrete transfer function parameters are:
Numerator: 9.998e-05
Denominator:[1 -0.9995]
Ts = 1e-4
The amplitude of the sine wave generator is 1. The frequency is 2*pi*10. The solver is running in fixed step, with a step size of 'Ts' (i.e. 1e-4).
The difference block shows the error between the two transfer functions. Scope2 is shown below.
Should there be an error between the 2 transfer functions? If so, why is this happening?
Thanks.

回答(2 个)

Azzi Abdelmalek
Azzi Abdelmalek 2016-4-1
You are not expecting to get to get the same result from the two transfer function, the sample time will cause some difference, but in your case the error seems to be very small, 10^-5

davood mansouri
davood mansouri 2017-9-27
I have simulated a in model(control of inverters) that I have to use transfer function on that simulation. because of speeding of time of simulation I used discrete model and discrete transfer functions. but always i get zero out put until I get that "by using discrete transfer function block you get zero output". I have simulate in continues mode and the simulation runs well. the question is how is it possible to improve the response of discrete transfer function block?

类别

Help CenterFile Exchange 中查找有关 Linearization 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by