I'm currently working on an DC servomotor. I managed to find it transfer function using System Identification theory and Matlab.

The transfer function is given as $$H(Z) = \frac{1 - 0.4952z^{-1} + 0.01826z^{-2}}{1.612z^{-1} - 0.02492z^{-2}}$$

Now, I have a pre-defined velocity profile. That mean at each sampling time $nT_s$, I have to reached a certain speed. In other words, I have a matrix of required output at time $nT_s$.

Now my question is, is it possible to calculate the input to the transfer function $u(t)$ so that the output approximates the desired velocity? If it is possible, could you kindly give me some broad instruction or some reference so that I can study on it? If no, is there any possible theory that can solve my problem, that is find required Input to get desired Output?

My process so far: Well, I simply inverse that transfer function and ask Matlab to find the required input for me. However, the inversed is not proper and thus it is not possible to do that. So I add some fast-orders (first time hearing this, not sure what it means) to the denominator to make it proper. The function runs, but the results is quite... not right.

This is my desired Output vRequired, stored in a $1$x$714$ matrix and plot for clarity.

My velocity profile

And this is the result with the function lsim(reservedTf, vRequired):

lsim result

where reservedTf is my transfer function reserved with fast-orders:

$$ H^{-1}(z) = \frac{z^{-1} - 0.4952 z^{-2} + 0.01826 z^{-3}}{1.612*10^{-10} + 3.224*10^{-5} z^{-1} + 1.612 z^{-2} - 0.02492 z^{-3}} $$

I very much appreciate all your help. Please tell me if there is anything wrong with my post here.

  • $\begingroup$ I think you might be confusion a couple of things. Namely the transfer function you gave is not proper, unless all the powers of $z$ should have been negated. Either way when I draw its bode plot it doesn't look like something I would associate with a DC servomotor. How did you do system identification and could it be that the fitted model is in the $s$ domain (continuous) instead of $z$ domain (discrete)? Also note that for ideal input calculation you want $H(z)\,H^{-1}(z)=1$. Lastly $H^{-1}(z)$ would be openloop (feedforward) but in practice it is also smart to use closedloop (feedback). $\endgroup$
    – fibonatic
    May 19, 2020 at 3:01

1 Answer 1


The transfer function is given as ...

Your transfer functions seems wrong. It's not "proper", i.e. there ought to be a $1$ in the denominator. You can try to rewrite it this way, but it would make it non-causal. Not sure if that's a typo or an error of your System Identification

However, the inversed is not proper

No, your original transfer function is improper, the inverse is just fine.

If it is possible, could you kindly give me some broad instruction

  1. Make sure your original transfer function is proper, fix this first
  2. Check if your corrected transfer function is causal, stable & minimum phase, i.e. all poles and zeros inside the unit circle. If that's true, you can simply invert it by exchanging poles and zeros.
  3. If you have zeros outside of the unit circle, you can still invert this, but the result will be non-causal. You can still approximate an inverse by either adding bulk delay (if your application can tolerate that) or by least square error time domain solution.

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.