1
\$\begingroup\$

A pure/ideal integrator has transfer function H(s)= s. If we try to get its step response in MATLAB we get the error "Cannot simulate the time response of models with more zeros than poles".

Similarly, if we try to get a step response in Simulink, we get a sharp (very thin) vertical line, which apparently goes to infinity.

How can we convert this ideal (pure) differentiator into a practical one?

I have placed my MATLAB code below:

clc
clear
close all
den=[1]%denominator of transfer function
num=[1 0]%numerator of transfer function
sys=tf(num,den)%transfer function expression of ideal(pure) differentiator system
step(sys)%step response

I am also attaching a snapshot of the Simulink model:

enter image description here

Update: based upon recieved comment & answer, i updated my question and also included snapshot of simulink model where low pass filter transfer function is used in place of derivative block, i also placed snapshot of simulink model where high pass filter transfer function is used in place of derivative block. But i am still confused,which one(Low pass filter or high pass filter) will be better replacement of pure(ideal)derivative block as asked in main question title

enter image description here enter image description here

\$\endgroup\$
5
  • \$\begingroup\$ Make the transfer function a highpass: \$s\rightarrow\frac{s}{s+1}\$. Now it has a pole and the orders of the numerator and the denominator are equal. All that's left is to ensure that the pole is well outside the area of interest. \$\endgroup\$ Commented Nov 5, 2022 at 13:41
  • \$\begingroup\$ @aconcernedcitizen please try to check my updated question \$\endgroup\$
    – DSP_CS
    Commented Nov 7, 2022 at 9:48
  • \$\begingroup\$ Did you miss this part: "All that's left is to ensure that the pole is well outside the area of interest."? \$\endgroup\$ Commented Nov 7, 2022 at 12:10
  • \$\begingroup\$ Will you please elaborate "All that's left is to ensure that the pole is well outside the area of interest." I am not able to understand that properly .Do you mean samething that @Andy aka mentioned in his below answer & comments? \$\endgroup\$
    – DSP_CS
    Commented Nov 7, 2022 at 13:02
  • \$\begingroup\$ Where is the pole in \$\frac{s}{s+1}\$ and what is its value? What can you do to increase its value? How can you compensate for the gain in order to have the necessary slope and value at the desired frequency? If you can't answer these questions then maybe you should read some more before venturing further. \$\endgroup\$ Commented Nov 7, 2022 at 14:39

1 Answer 1

1
\$\begingroup\$

How can we convert this ideal (pure) differentiator into a practical one?

You prevent the anomaly of infinite rise/fall time by using a low-pass filter after your infeasible and impractical step input so that the rise and fall time are quite small but not zero.

\$\endgroup\$
5
  • \$\begingroup\$ How we can use low pass filter after step input? Which way? Using transfer function of Low pass filter or using Low pass filter block of dsp system toolbox? \$\endgroup\$
    – DSP_CS
    Commented Nov 7, 2022 at 4:29
  • \$\begingroup\$ If using transfer function,then what will be coefficients of numerator & denominator of the trasnfer fucntion? \$\endgroup\$
    – DSP_CS
    Commented Nov 7, 2022 at 4:31
  • \$\begingroup\$ A low pass TF will be typically \$\dfrac{1}{1+sRC}\$. How you implement that is up to you. I don't know what your DSP toolbox contains. \$\endgroup\$
    – Andy aka
    Commented Nov 7, 2022 at 9:17
  • \$\begingroup\$ please check my updated question. I have also included a snap of simulink where i am using Low pass TF. Is it ok now?or should i also place derivative block after Low pass TF? \$\endgroup\$
    – DSP_CS
    Commented Nov 7, 2022 at 9:43
  • \$\begingroup\$ You need to add the low-pass filter after the step change output and before the differentiator. I mean you can't get rid of the differentiator can you because you need it. The point of the low pass filter is to slow the edges of the step output to prevent the time anomaly @engr \$\endgroup\$
    – Andy aka
    Commented Nov 7, 2022 at 10:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.