Calculate Time Constant of Discrete or Continuous Transfer Function

Is there a function to provide the value of the time constant of a Continuous or Discrete time transfer function? I mean, I know how to calculate it by hand, but it seems this is so fundamental, I should find a function like tau = TimeConstant(G(s),'step')... Or it should be an output of stepinfo...
Seems such a basic thing in controls, or maybe it's so trivial, no one feels the need for it? Perhaps my google-fu is just really weak tonight?
Thanks for any feedback.
Edit: I should clarify that at this point, I'm just looking at 1st or 2nd order systems.

 Akzeptierte Antwort

Birdman
Birdman am 24 Okt. 2017

1 Stimme

Try this function. It takes a first order continuous transfer function as an input and outputs the time constant of it. Hope it helps.

5 Kommentare

Thanks. That's a good approach. It's still surprising to me that there isn't something built in to matlab. It can do SOO much, this just seems so relatively trivial.
Thanks for the feedback.
By the way, if this is useful for you, then accept the answer so that other people having the same problem will know that there is a working solution.
Does this function work on 2nd order transfer funktions? It returns one time constant when I try. However, I need two time constants for the 2nd order transfer funktion.
2nd order transfer functions still only have one time constant, but they also have a natural frequency and damping coeffecient.
There was an error in your function: "den" was changed before it was used in the "num" calculation, so "num" would remain the same, as den(len) equals 1.
Here the corrected version.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu MATLAB finden Sie in Hilfe-Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by