I was wondering if anyone could explain the best method is to calculate the settling time of a continuous transfer function when given a unit step input? The settling time, or time to steady-state, can be approximated, I think (what I've tried to outline below), but I would like to know how to calculate it exactly for any transfer function (1st order, 2nd order, 3rd order, etc.). Below is just some approximation testing, the above question is what I'm interested in, below I'm just going through a little work to prove the approximations are not what Matlab is returning for the settling time of a step response. I want to be able to calculate the settling time that Matlab returns for a step response (assuming that is the correct settling time value). I have not been able to find a source or examples that discuss the best method to perform this calculation. I have been using Matlab as my comparison test. If this is not the best, please let me know... it just happens to be what I have access to. In reading through "Digital Control of Dynamic Systems" by Franklin, they present the "qualitative guide" formula for the settling time as: 4.6 ---- zeta*omegaN Which equals: 4.6 ---- sigma Where the equation characterizes, "the transient response of a system having no finite zeros and two complex poles with undamped natural frequency omegaN, damping ratio zeta, and negative real part, sigma. In analysis and design, it is used to obtain a rough estimate of settling time for just about any system." Also, when I look at the Wikipedia entry for settling time (http:// en.wikipedia.org/wiki/Settling_time), they present, "Settling time depends on the system response and time constant. The settling time for a 2nd order, underdamped system responding to a step response can be approximated if the damping ratio zeta << 1," which yields the equation: ln(tolerance fraction - --------------------------------------------- damping ratio * natural frequency Which equals, for a settling time to within 2%: ln(0.02) - ------------ zeta*omegaN I tried these two approximation methods in Matlab with the transfer function: 2s + 4 ----------------- s^2 + 3s + 7 Matlab:>> g = tf([2 4],[1 3 7]); >> stepinfo(g)ans = RiseTime: 0.2967 SettlingTime: 2.7446 SettlingMin: 0.5447 SettlingMax: 0.7566 Overshoot: 32.4125 Undershoot: 0 Peak: 0.7566 PeakTime: 0.8477 A settling time of 2.7446 The approximation from Franklin provides: Poles = -1.5 +- 2.1794i SettlingTime = 4.6 / 1.5 = 3.0667 Or, from Wikipedia: SettlingTime = log(0.02) / 1.5 = 2.6080 These approximations are close, but I would like to be able to calculate the actual settling time, using whatever calculation may be required. If anyone could provide me some insight, I would be very appreciative. Thanks, John N.

# Calculate Settling Time of a Transfer Function

Started by ●August 27, 2010

Posted by ●August 27, 2010

On 08/27/2010 03:35 PM, John N. wrote:> I was wondering if anyone could explain the best method is to > calculate the settling time of a continuous transfer function when > given a unit step input? > > The settling time, or time to steady-state, can be approximated, I > think (what I've tried to outline below), but I would like to know how > to calculate it exactly for any transfer function (1st order, 2nd > order, 3rd order, etc.). > > Below is just some approximation testing, the above question is what > I'm interested in, below I'm just going through a little work to prove > the approximations are not what Matlab is returning for the settling > time of a step response. I want to be able to calculate the settling > time that Matlab returns for a step response (assuming that is the-- snip --> These approximations are close, but I would like to be able to > calculate the actual settling time, using whatever calculation may be > required. If anyone could provide me some insight, I would be very > appreciative.For a discrete transfer function it's easy enough to just run the filter with a step input and check. It's not that much harder to do so with a continuous-time transfer function. To my knowledge there aren't any universal closed-form solutions. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Do you need to implement control loops in software? "Applied Control Theory for Embedded Systems" was written for you. See details at http://www.wescottdesign.com/actfes/actfes.html

Posted by ●August 27, 2010

John N.wrote: >I was wondering if anyone could explain the best method is to >calculate the settling time of a continuous transfer function when >given a unit step input? >[snip] >These approximations are close, but I would like to be able to >calculate the actual settling time >[snip]It would be very helpful to know which of the following you are looking for: An analytical expression for settling time (given some defined class of transfer functions); An approximation to the settling time (given some defined class of transfer functions); or a methodology for measuring the settling time, given a waveform. I read your post twice and could not discern which of these you are looking for, but that could just be poor reading comprehension on my part. Steve

Posted by ●August 27, 2010

John N. wrote:> I was wondering if anyone could explain the best method is to > calculate the settling time of a continuous transfer function when > given a unit step input? > The settling time, or time to steady-state, can be approximated, I > think (what I've tried to outline below), but I would like to know how > to calculate it exactly for any transfer function (1st order, 2nd > order, 3rd order, etc.).You have to: 1) get the time domain step response function in the closed form, which is going to be a transcendental function. 2) solve the transcendental equation for the settling time. There could be closed form solutions for some special cases however neither 1) nor 2) is doable in the general case. VLV

Posted by ●August 27, 2010

On Aug 28, 10:35�am, "John N."wrote: > I was wondering if anyone could explain the best method is to > calculate the settling time of a continuous transfer function when > given a unit step input? > > The settling time, or time to steady-state, can be approximated, I > think (what I've tried to outline below), but I would like to know how > to calculate it exactly for any transfer function (1st order, 2nd > order, 3rd order, etc.). > > Below is just some approximation testing, the above question is what > I'm interested in, below I'm just going through a little work to prove > the approximations are not what Matlab is returning for the settling > time of a step response. I want to be able to calculate the settling > time that Matlab returns for a step response (assuming that is the > correct settling time value). I have not been able to find a source or > examples that discuss the best method to perform this calculation. I > have been using Matlab as my comparison test. If this is not the best, > please let me know... it just happens to be what I have access to. > > In reading through "Digital Control of Dynamic Systems" by Franklin, > they present the "qualitative guide" formula for the settling time as: > > 4.6 > ---- > zeta*omegaN > > Which equals: > > 4.6 > ---- > sigma > > Where the equation characterizes, "the transient response of a system > having no finite zeros and two complex poles with undamped natural > frequency omegaN, damping ratio zeta, and negative real part, sigma. > In analysis and design, it is used to obtain a rough estimate of > settling time for just about any system." > > Also, when I look at the Wikipedia entry for settling time (http:// > en.wikipedia.org/wiki/Settling_time), they present, "Settling time > depends on the system response and time constant. The settling time > for a 2nd order, underdamped system responding to a step response can > be approximated if the damping ratio zeta << 1," which yields the > equation: > > � �ln(tolerance fraction > - --------------------------------------------- > � �damping ratio * natural frequency > > Which equals, for a settling time to within 2%: > > � � ln(0.02) > - ------------ > � �zeta*omegaN > > I tried these two approximation methods in Matlab with the transfer > function: > > 2s + 4 > ----------------- > s^2 + 3s + 7 > > Matlab:>> g = tf([2 4],[1 3 7]); > >> stepinfo(g) > > ans = > > � � � � RiseTime: 0.2967 > � � SettlingTime: 2.7446 > � � �SettlingMin: 0.5447 > � � �SettlingMax: 0.7566 > � � � �Overshoot: 32.4125 > � � � Undershoot: 0 > � � � � �� Peak: 0.7566> � � � � PeakTime: 0.8477 > > A settling time of 2.7446 > > The approximation from Franklin provides: > > Poles = -1.5 +- 2.1794i > SettlingTime = 4.6 / 1.5 = 3.0667 > > Or, from Wikipedia: > > SettlingTime = log(0.02) / 1.5 = 2.6080 > > These approximations are close, but I would like to be able to > calculate the actual settling time, using whatever calculation may be > required. If anyone could provide me some insight, I would be very > appreciative. > > Thanks, > John N.Doesn't exist except for 2nd order cases. Hardy

Posted by ●August 29, 2010

John N. wrote:> I was wondering if anyone could explain the best method is to > calculate the settling time of a continuous transfer function when > given a unit step input? > > The settling time, or time to steady-state, can be approximated, I > think (what I've tried to outline below), but I would like to know how > to calculate it exactly for any transfer function (1st order, 2nd > order, 3rd order, etc.). > > Below is just some approximation testing, the above question is what > I'm interested in, below I'm just going through a little work to prove > the approximations are not what Matlab is returning for the settling > time of a step response. I want to be able to calculate the settling > time that Matlab returns for a step response (assuming that is the > correct settling time value). I have not been able to find a source or > examples that discuss the best method to perform this calculation. I > have been using Matlab as my comparison test. If this is not the best, > please let me know... it just happens to be what I have access to. > > In reading through "Digital Control of Dynamic Systems" by Franklin, > they present the "qualitative guide" formula for the settling time as: > > 4.6 > ---- > zeta*omegaN > > Which equals: > > 4.6 > ---- > sigma > > Where the equation characterizes, "the transient response of a system > having no finite zeros and two complex poles with undamped natural > frequency omegaN, damping ratio zeta, and negative real part, sigma. > In analysis and design, it is used to obtain a rough estimate of > settling time for just about any system." > > Also, when I look at the Wikipedia entry for settling time (http:// > en.wikipedia.org/wiki/Settling_time), they present, "Settling time > depends on the system response and time constant. The settling time > for a 2nd order, underdamped system responding to a step response can > be approximated if the damping ratio zeta << 1," which yields the > equation: > > ln(tolerance fraction > - --------------------------------------------- > damping ratio * natural frequency > > Which equals, for a settling time to within 2%: > > ln(0.02) > - ------------ > zeta*omegaN > > I tried these two approximation methods in Matlab with the transfer > function: > > 2s + 4 > ----------------- > s^2 + 3s + 7 > > Matlab: >>> g = tf([2 4],[1 3 7]); >>> stepinfo(g) > ans = > > RiseTime: 0.2967 > SettlingTime: 2.7446 > SettlingMin: 0.5447 > SettlingMax: 0.7566 > Overshoot: 32.4125 > Undershoot: 0 > Peak: 0.7566 > PeakTime: 0.8477 > > A settling time of 2.7446 > > The approximation from Franklin provides: > > Poles = -1.5 +- 2.1794i > SettlingTime = 4.6 / 1.5 = 3.0667 > > Or, from Wikipedia: > > SettlingTime = log(0.02) / 1.5 = 2.6080 > > These approximations are close, but I would like to be able to > calculate the actual settling time, using whatever calculation may be > required. If anyone could provide me some insight, I would be very > appreciative. > > Thanks, > John N.Compute the step response and apply your favorite definition of "settling time" to the result. After all, the definition will have some impact on the result and will likely have some practical relevance. How to compute the step response? You said that you have a "continous transfer function" so I'll presume that it's the Laplace Transform version of the transfer function. Multiply by 1/s to get the unit step response. Inverse transform to get the time response. Fred

Posted by ●August 30, 2010

On Aug 28, 12:35�am, "John N."wrote: > I was wondering if anyone could explain the best method is to > calculate the settling time of a continuous transfer function when > given a unit step input?...> I have not been able to find a source or...> they present the "qualitative guide" formula for the settling time as:Lots of very smart people have worked for ages on most problems. The fact that you either 1) Don't find examples / methods at all for what you want 2) Only find 'qualitative' guides go a long way as a hint: What you want is not possible. If it were, it would have been all over the textbooks aeons ago. Rune

Posted by ●August 31, 2010

Thank you all for the responses. It seems that there is a consensus that what I was asking (a method for calculating the settling time for a general transfer function) does not exist. This brings up another question: How is Matlab getting their value for the settling time? Are they just doing an approximation of their own that is less general than the approximations I provided? Might their approximation be using knowledge of the steady-state value of the transfer function's step response and from that calculating a value of the settling time somehow from the step response values, to within a certain percentage specified by the user (default is 2%)? On Aug 27, 6:05�pm, Tim Wescottwrote: > For a discrete transfer function it's easy enough to just run the filter > with a step input and check. �It's not that much harder to do so witha> continuous-time transfer function. > > To my knowledge there aren't any universal closed-form solutions.Interesting. I was hoping there would be a general equation that could be used to display the settling time of a transfer function's unit step response without having to look a step response plot. Much in the way that Matlab calculates and displays the value for settling time using the function "stepdata(transferFunctionName)." On Aug 27, 8:04�pm, HardySpicerwrote: > Doesn't exist except for 2nd order cases. > > HardyThere is not even a way to calculate it exactly for a first order transfer function? On Aug 27, 7:36�pm, spop...@speedymail.org (Steve Pope) wrote:> It would be very helpful to know which of the following you > are looking for: > > An analytical expression for settling time (given some defined > class of transfer functions); > > An approximation to the settling time (given some defined > class of transfer functions); > > or a methodology for measuring the settling time, given a > waveform. > > I read your post twice and could not discern which of these > you are looking for, but that could just be poor reading > comprehension on my part. > > SteveSteve, I was looking for a general equation, or method, to exactly calculate the settling time to within a certain percentage of the steady-state value for the step response, without having to look at the step response. I was hoping this could somehow be derived from the continuous transfer function, much in the same way that the steady- state value of a unit step response can be found with just the transfer function. I am interested in a method which would allow me to find the settling time for a "general" transfer function (might be 1st order, might be 2nd order, might be 3rd order). On Aug 29, 5:21�pm, Fred Marshallwrote: > Compute the step response and apply your favorite definition of > "settling time" to the result. �After all, the definition will havesome> impact on the result and will likely have some practical relevance. > > FredFred, Do you have a "favorite definition of 'settling time'," that you are partial to? Is there an approximation that might be good for a general transfer function? The problem is that I might want to change the transfer function dimensions for testing or practice, but would still like to be able to calculate the settling time, not just for "special cases." Are the examples I provided pretty standard? The Franklin text indicates that, "In analysis and design, it is used to obtain a rough estimate of settling time for just about any system." Does that mean that this is a pretty standard way of estimating the settling time of a step response, or just their "standard" way of doing it? That is, the equation that uses: 4.6 ---- maxRealPoleValue> How to compute the step response? > You said that you have a "continous transfer function" so I'll presume > that it's the Laplace Transform version of the transfer function. > Multiply by 1/s to get the unit step response. > Inverse transform to get the time response.I am computing the step response by converting to a discrete transfer function (Matlab's c2d) and then running the result through Matlab's filter, which, from what I gather is the way that Matlab might be doing it. I was hoping there was a way to calculate the settling time directly from the continuous transfer function, given that other information, like the steady-state can be found just by looking at the continuous transfer function and doing a simple calculation. On Aug 29, 11:08�pm, Rune Allnorwrote: > Lots of very smart people have worked for ages on most problems. > The fact that you either > > 1) Don't find examples / methods at all for what you want > 2) Only find 'qualitative' guides > > go a long way as a hint: What you want is not possible. > If it were, it would have been all over the textbooks aeons ago. > > RuneRune, I know and definitely much smarter than me... However, I asked the question because most of the references I had seen (textbooks, etc.) blindly say something to the extent of: "To calculate the settling time, open Matlab, and do the following: g = tf([num],[den]); stepinfo(g) From this we can see the settling time of the transfer function's step response is: someNumber sec." Therefore, I asked the question because evidently Matlab is using a different approximation than the simple equations I found to generate their value of the settling time. I can't find anyone who explains what algorithm or analysis they are using to get that result. I thought that they might be using an exact calculation, since the settling time is returned for any size of transfer function (a general case equation or algorithm). I suppose that might have been naive on my part, but sometimes texts glaze over seemingly simple details or rigorous calculations when there is an easier, quicker way to type it. I tried looking through Matlab's documentation and didn't find any explanation, thus I arrived here to pose the question. Thank you all for your responses. John N.

Posted by ●February 20, 2011

>Thank you all for the responses. It seems that there is a consensus >that what I was asking (a method for calculating the settling time for >a general transfer function) does not exist. > >This brings up another question: How is Matlab getting their value for >the settling time? Are they just doing an approximation of their own >that is less general than the approximations I provided? Might their >approximation be using knowledge of the steady-state value of the >transfer function's step response and from that calculating a value of >the settling time somehow from the step response values, to within a >certain percentage specified by the user (default is 2%)? > >On Aug 27, 6:05=A0pm, Tim Wescottfilterwrote: >> For a discrete transfer function it's easy enough to just run the >> with a step input and check. =A0It's not that much harder to do so witha>> continuous-time transfer function. >> >> To my knowledge there aren't any universal closed-form solutions. > >Interesting. I was hoping there would be a general equation that could >be used to display the settling time of a transfer function's unit >step response without having to look a step response plot. Much in the >way that Matlab calculates and displays the value for settling time >using the function "stepdata(transferFunctionName)." > >On Aug 27, 8:04=A0pm, HardySpicersom=wrote: >> Doesn't exist except for 2nd order cases. >> >> Hardy > >There is not even a way to calculate it exactly for a first order >transfer function? > >On Aug 27, 7:36=A0pm, spop...@speedymail.org (Steve Pope) wrote: >> It would be very helpful to know which of the following you >> are looking for: >> >> An analytical expression for settling time (given some defined >> class of transfer functions); >> >> An approximation to the settling time (given some defined >> class of transfer functions); >> >> or a methodology for measuring the settling time, given a >> waveform. >> >> I read your post twice and could not discern which of these >> you are looking for, but that could just be poor reading >> comprehension on my part. >> >> Steve > >Steve, > >I was looking for a general equation, or method, to exactly calculate >the settling time to within a certain percentage of the steady-state >value for the step response, without having to look at the step >response. I was hoping this could somehow be derived from the >continuous transfer function, much in the same way that the steady- >state value of a unit step response can be found with just the >transfer function. > >I am interested in a method which would allow me to find the settling >time for a "general" transfer function (might be 1st order, might be >2nd order, might be 3rd order). > >On Aug 29, 5:21=A0pm, Fred Marshall >wrote: >> Compute the step response and apply your favorite definition of >> "settling time" to the result. =A0After all, the definition will have >e >> impact on the result and will likely have some practical relevance. >> >> Fred > >Fred, > >Do you have a "favorite definition of 'settling time'," that you are >partial to? Is there an approximation that might be good for a general >transfer function? The problem is that I might want to change the >transfer function dimensions for testing or practice, but would still >like to be able to calculate the settling time, not just for "special >cases." > >Are the examples I provided pretty standard? The Franklin text >indicates that, "In analysis and design, it is used to obtain a rough >estimate of settling time for just about any system." Does that mean >that this is a pretty standard way of estimating the settling time of >a step response, or just their "standard" way of doing it? That is, >the equation that uses: > >4.6 >---- >maxRealPoleValue > >> How to compute the step response? >> You said that you have a "continous transfer function" so I'll presume >> that it's the Laplace Transform version of the transfer function. >> Multiply by 1/s to get the unit step response. >> Inverse transform to get the time response. > >I am computing the step response by converting to a discrete transfer >function (Matlab's c2d) and then running the result through Matlab's >filter, which, from what I gather is the way that Matlab might be >doing it. > >I was hoping there was a way to calculate the settling time directly >from the continuous transfer function, given that other information, >like the steady-state can be found just by looking at the continuous >transfer function and doing a simple calculation. > >On Aug 29, 11:08=A0pm, Rune AllnorI suddenly stumbed on this discussion held long back on the settling time computation. John's quest for a computational solution was negated by all replies and hence he wondered how MATLAB is then computing it. Well, I have a limited knowledge on this topic and hence I may like to add a few of mine into this discussion. It is though after a long gap from the date of discussion and so I wonder if anybody would go through it ever, I still like to add a few lines. First, the solution or computation depends on the range of zeta. The curve drawn for the settling time tolerance band (2% or 5%) vs different zeta values shows discontinuity, that can be checked from standard Control System texts. Within a known range of zeta the calculation is done by equating: [sqrt(1-zeta*zeta)]*exp(-zeta*OmegaN*Settling Time) = 0.05 or 0.02 One can recognize the lhs expression as the part of the transient portion of the time response of second order system when the sine function is ignored, because this damping factor is responsible for the settling time. Now, if we consider very low value of zeta, then [sqrt(1-zeta*zeta)] can be ignored. This gives Settling Time = -ln(0.02)/[zeta*OmegaN] or -ln(0.05)/[zeta*OmegaN] Since ln(0.02) = -2.996 and ln(0.05) = -3.912, we consider approximate value of settling time as 3/sigma or 4/sigma. In MATLAB, one can get the exact values. For this one can write a small script analysing the response curve. Check from the farther end (the other end of axis) when the value of any response point just crosses the tolerance band. The time coordinate at this point will give the settling time. You can get the script from the text book on Modern Control System by Katsuhiko Ogata. Hope this gives you some answer, John, if you are still there.wrote: >> Lots of very smart people have worked for ages on most problems. >> The fact that you either >> >> 1) Don't find examples / methods at all for what you want >> 2) Only find 'qualitative' guides >> >> go a long way as a hint: What you want is not possible. >> If it were, it would have been all over the textbooks aeons ago. >> >> Rune > >Rune, > >I know and definitely much smarter than me... However, I asked the >question because most of the references I had seen (textbooks, etc.) >blindly say something to the extent of: > >"To calculate the settling time, open Matlab, and do the following: > >g =3D tf([num],[den]); >stepinfo(g) > >From this we can see the settling time of the transfer function's step >response is: someNumber sec." > >Therefore, I asked the question because evidently Matlab is using a >different approximation than the simple equations I found to generate >their value of the settling time. I can't find anyone who explains >what algorithm or analysis they are using to get that result. I >thought that they might be using an exact calculation, since the >settling time is returned for any size of transfer function (a general >case equation or algorithm). I suppose that might have been naive on >my part, but sometimes texts glaze over seemingly simple details or >rigorous calculations when there is an easier, quicker way to type it. >I tried looking through Matlab's documentation and didn't find any >explanation, thus I arrived here to pose the question. > >Thank you all for your responses. >John N. > >

Posted by ●February 20, 2011

>Thank you all for the responses. It seems that there is a consensus >that what I was asking (a method for calculating the settling time for >a general transfer function) does not exist. > >This brings up another question: How is Matlab getting their value for >the settling time? Are they just doing an approximation of their own >that is less general than the approximations I provided? Might their >approximation be using knowledge of the steady-state value of the >transfer function's step response and from that calculating a value of >the settling time somehow from the step response values, to within a >certain percentage specified by the user (default is 2%)? > >On Aug 27, 6:05=A0pm, Tim Wescottfilterwrote: >> For a discrete transfer function it's easy enough to just run the >> with a step input and check. =A0It's not that much harder to do so witha>> continuous-time transfer function. >> >> To my knowledge there aren't any universal closed-form solutions. > >Interesting. I was hoping there would be a general equation that could >be used to display the settling time of a transfer function's unit >step response without having to look a step response plot. Much in the >way that Matlab calculates and displays the value for settling time >using the function "stepdata(transferFunctionName)." > >On Aug 27, 8:04=A0pm, HardySpicersom=wrote: >> Doesn't exist except for 2nd order cases. >> >> Hardy > >There is not even a way to calculate it exactly for a first order >transfer function? > >On Aug 27, 7:36=A0pm, spop...@speedymail.org (Steve Pope) wrote: >> It would be very helpful to know which of the following you >> are looking for: >> >> An analytical expression for settling time (given some defined >> class of transfer functions); >> >> An approximation to the settling time (given some defined >> class of transfer functions); >> >> or a methodology for measuring the settling time, given a >> waveform. >> >> I read your post twice and could not discern which of these >> you are looking for, but that could just be poor reading >> comprehension on my part. >> >> Steve > >Steve, > >I was looking for a general equation, or method, to exactly calculate >the settling time to within a certain percentage of the steady-state >value for the step response, without having to look at the step >response. I was hoping this could somehow be derived from the >continuous transfer function, much in the same way that the steady- >state value of a unit step response can be found with just the >transfer function. > >I am interested in a method which would allow me to find the settling >time for a "general" transfer function (might be 1st order, might be >2nd order, might be 3rd order). > >On Aug 29, 5:21=A0pm, Fred Marshall >wrote: >> Compute the step response and apply your favorite definition of >> "settling time" to the result. =A0After all, the definition will have >e >> impact on the result and will likely have some practical relevance. >> >> Fred > >Fred, > >Do you have a "favorite definition of 'settling time'," that you are >partial to? Is there an approximation that might be good for a general >transfer function? The problem is that I might want to change the >transfer function dimensions for testing or practice, but would still >like to be able to calculate the settling time, not just for "special >cases." > >Are the examples I provided pretty standard? The Franklin text >indicates that, "In analysis and design, it is used to obtain a rough >estimate of settling time for just about any system." Does that mean >that this is a pretty standard way of estimating the settling time of >a step response, or just their "standard" way of doing it? That is, >the equation that uses: > >4.6 >---- >maxRealPoleValue > >> How to compute the step response? >> You said that you have a "continous transfer function" so I'll presume >> that it's the Laplace Transform version of the transfer function. >> Multiply by 1/s to get the unit step response. >> Inverse transform to get the time response. > >I am computing the step response by converting to a discrete transfer >function (Matlab's c2d) and then running the result through Matlab's >filter, which, from what I gather is the way that Matlab might be >doing it. > >I was hoping there was a way to calculate the settling time directly >from the continuous transfer function, given that other information, >like the steady-state can be found just by looking at the continuous >transfer function and doing a simple calculation. > >On Aug 29, 11:08=A0pm, Rune AllnorI suddenly stumbed on this discussion held long back on the settling time computation. John's quest for a computational solution was negated by all replies and hence he wondered how MATLAB is then computing it. Well, I have a limited knowledge on this topic and hence I may like to add a few of mine into this discussion. It is though after a long gap from the date of discussion and so I wonder if anybody would go through it ever, I still like to add a few lines. First, the solution or computation depends on the range of zeta. The curve drawn for the settling time tolerance band (2% or 5%) vs different zeta values shows discontinuity, that can be checked from standard Control System texts. Within a known range of zeta the calculation is done by equating: [sqrt(1-zeta*zeta)]*exp(-zeta*OmegaN*Settling Time) = 0.05 or 0.02 One can recognize the lhs expression as the part of the transient portion of the time response of second order system when the sine function is ignored, because this damping factor is responsible for the settling time. Now, if we consider very low value of zeta, then [sqrt(1-zeta*zeta)] can be ignored. This gives Settling Time = -ln(0.02)/[zeta*OmegaN] or -ln(0.05)/[zeta*OmegaN] Since ln(0.02) = -2.996 and ln(0.05) = -3.912, we consider approximate value of settling time as 3/sigma or 4/sigma. In MATLAB, one can get the exact values. For this one can write a small script analysing the response curve. Check from the farther end (the other end of axis) when the value of any response point just crosses the tolerance band. The time coordinate at this point will give the settling time. You can get the script from the text book on Modern Control System by Katsuhiko Ogata. Hope this gives you some answer, John, if you are still there.wrote: >> Lots of very smart people have worked for ages on most problems. >> The fact that you either >> >> 1) Don't find examples / methods at all for what you want >> 2) Only find 'qualitative' guides >> >> go a long way as a hint: What you want is not possible. >> If it were, it would have been all over the textbooks aeons ago. >> >> Rune > >Rune, > >I know and definitely much smarter than me... However, I asked the >question because most of the references I had seen (textbooks, etc.) >blindly say something to the extent of: > >"To calculate the settling time, open Matlab, and do the following: > >g =3D tf([num],[den]); >stepinfo(g) > >From this we can see the settling time of the transfer function's step >response is: someNumber sec." > >Therefore, I asked the question because evidently Matlab is using a >different approximation than the simple equations I found to generate >their value of the settling time. I can't find anyone who explains >what algorithm or analysis they are using to get that result. I >thought that they might be using an exact calculation, since the >settling time is returned for any size of transfer function (a general >case equation or algorithm). I suppose that might have been naive on >my part, but sometimes texts glaze over seemingly simple details or >rigorous calculations when there is an easier, quicker way to type it. >I tried looking through Matlab's documentation and didn't find any >explanation, thus I arrived here to pose the question. > >Thank you all for your responses. >John N. > >

Posted by ●August 31, 2010

Thank you all for the responses. It seems that there is a consensus that what I was asking (a method for calculating the settling time for a general transfer function) does not exist. This brings up another question: How is Matlab getting their value for the settling time? Are they just doing an approximation of their own that is less general than the approximations I provided? Might their approximation be using knowledge of the steady-state value of the transfer function's step response and from that calculating a value of the settling time somehow from the step response values, to within a certain percentage specified by the user (default is 2%)? On Aug 27, 6:05�pm, Tim Wescottwrote: > For a discrete transfer function it's easy enough to just run the filter > with a step input and check. �It's not that much harder to do so witha> continuous-time transfer function. > > To my knowledge there aren't any universal closed-form solutions.Interesting. I was hoping there would be a general equation that could be used to display the settling time of a transfer function's unit step response without having to look a step response plot. Much in the way that Matlab calculates and displays the value for settling time using the function "stepdata(transferFunctionName)." On Aug 27, 8:04�pm, HardySpicerwrote: > Doesn't exist except for 2nd order cases. > > HardyThere is not even a way to calculate it exactly for a first order transfer function? On Aug 27, 7:36�pm, spop...@speedymail.org (Steve Pope) wrote:> It would be very helpful to know which of the following you > are looking for: > > An analytical expression for settling time (given some defined > class of transfer functions); > > An approximation to the settling time (given some defined > class of transfer functions); > > or a methodology for measuring the settling time, given a > waveform. > > I read your post twice and could not discern which of these > you are looking for, but that could just be poor reading > comprehension on my part. > > SteveSteve, I was looking for a general equation, or method, to exactly calculate the settling time to within a certain percentage of the steady-state value for the step response, without having to look at the step response. I was hoping this could somehow be derived from the continuous transfer function, much in the same way that the steady- state value of a unit step response can be found with just the transfer function. I am interested in a method which would allow me to find the settling time for a "general" transfer function (might be 1st order, might be 2nd order, might be 3rd order). On Aug 29, 5:21�pm, Fred Marshallwrote: > Compute the step response and apply your favorite definition of > "settling time" to the result. �After all, the definition will havesome> impact on the result and will likely have some practical relevance. > > FredFred, Do you have a "favorite definition of 'settling time'," that you are partial to? Is there an approximation that might be good for a general transfer function? The problem is that I might want to change the transfer function dimensions for testing or practice, but would still like to be able to calculate the settling time, not just for "special cases." Are the examples I provided pretty standard? The Franklin text indicates that, "In analysis and design, it is used to obtain a rough estimate of settling time for just about any system." Does that mean that this is a pretty standard way of estimating the settling time of a step response, or just their "standard" way of doing it? That is, the equation that uses: 4.6 ---- maxRealPoleValue> How to compute the step response? > You said that you have a "continous transfer function" so I'll presume > that it's the Laplace Transform version of the transfer function. > Multiply by 1/s to get the unit step response. > Inverse transform to get the time response.I am computing the step response by converting to a discrete transfer function (Matlab's c2d) and then running the result through Matlab's filter, which, from what I gather is the way that Matlab might be doing it. I was hoping there was a way to calculate the settling time directly from the continuous transfer function, given that other information, like the steady-state can be found just by looking at the continuous transfer function and doing a simple calculation. On Aug 29, 11:08�pm, Rune Allnorwrote: > Lots of very smart people have worked for ages on most problems. > The fact that you either > > 1) Don't find examples / methods at all for what you want > 2) Only find 'qualitative' guides > > go a long way as a hint: What you want is not possible. > If it were, it would have been all over the textbooks aeons ago. > > RuneRune, I know and definitely much smarter than me... However, I asked the question because most of the references I had seen (textbooks, etc.) blindly say something to the extent of: "To calculate the settling time, open Matlab, and do the following: g = tf([num],[den]); stepinfo(g) From this we can see the settling time of the transfer function's step response is: someNumber sec." Therefore, I asked the question because evidently Matlab is using a different approximation than the simple equations I found to generate their value of the settling time. I can't find anyone who explains what algorithm or analysis they are using to get that result. I thought that they might be using an exact calculation, since the settling time is returned for any size of transfer function (a general case equation or algorithm). I suppose that might have been naive on my part, but sometimes texts glaze over seemingly simple details or rigorous calculations when there is an easier, quicker way to type it. I tried looking through Matlab's documentation and didn't find any explanation, thus I arrived here to pose the question. Thank you all for your responses. John N.

Posted by ●August 30, 2010

On Aug 28, 12:35�am, "John N."wrote: > I was wondering if anyone could explain the best method is to > calculate the settling time of a continuous transfer function when > given a unit step input?...> I have not been able to find a source or...> they present the "qualitative guide" formula for the settling time as:Lots of very smart people have worked for ages on most problems. The fact that you either 1) Don't find examples / methods at all for what you want 2) Only find 'qualitative' guides go a long way as a hint: What you want is not possible. If it were, it would have been all over the textbooks aeons ago. Rune

Posted by ●August 29, 2010

John N. wrote:> I was wondering if anyone could explain the best method is to > calculate the settling time of a continuous transfer function when > given a unit step input? > > The settling time, or time to steady-state, can be approximated, I > think (what I've tried to outline below), but I would like to know how > to calculate it exactly for any transfer function (1st order, 2nd > order, 3rd order, etc.). > > Below is just some approximation testing, the above question is what > I'm interested in, below I'm just going through a little work to prove > the approximations are not what Matlab is returning for the settling > time of a step response. I want to be able to calculate the settling > time that Matlab returns for a step response (assuming that is the > correct settling time value). I have not been able to find a source or > examples that discuss the best method to perform this calculation. I > have been using Matlab as my comparison test. If this is not the best, > please let me know... it just happens to be what I have access to. > > In reading through "Digital Control of Dynamic Systems" by Franklin, > they present the "qualitative guide" formula for the settling time as: > > 4.6 > ---- > zeta*omegaN > > Which equals: > > 4.6 > ---- > sigma > > Where the equation characterizes, "the transient response of a system > having no finite zeros and two complex poles with undamped natural > frequency omegaN, damping ratio zeta, and negative real part, sigma. > In analysis and design, it is used to obtain a rough estimate of > settling time for just about any system." > > Also, when I look at the Wikipedia entry for settling time (http:// > en.wikipedia.org/wiki/Settling_time), they present, "Settling time > depends on the system response and time constant. The settling time > for a 2nd order, underdamped system responding to a step response can > be approximated if the damping ratio zeta << 1," which yields the > equation: > > ln(tolerance fraction > - --------------------------------------------- > damping ratio * natural frequency > > Which equals, for a settling time to within 2%: > > ln(0.02) > - ------------ > zeta*omegaN > > I tried these two approximation methods in Matlab with the transfer > function: > > 2s + 4 > ----------------- > s^2 + 3s + 7 > > Matlab: >>> g = tf([2 4],[1 3 7]); >>> stepinfo(g) > ans = > > RiseTime: 0.2967 > SettlingTime: 2.7446 > SettlingMin: 0.5447 > SettlingMax: 0.7566 > Overshoot: 32.4125 > Undershoot: 0 > Peak: 0.7566 > PeakTime: 0.8477 > > A settling time of 2.7446 > > The approximation from Franklin provides: > > Poles = -1.5 +- 2.1794i > SettlingTime = 4.6 / 1.5 = 3.0667 > > Or, from Wikipedia: > > SettlingTime = log(0.02) / 1.5 = 2.6080 > > These approximations are close, but I would like to be able to > calculate the actual settling time, using whatever calculation may be > required. If anyone could provide me some insight, I would be very > appreciative. > > Thanks, > John N.Compute the step response and apply your favorite definition of "settling time" to the result. After all, the definition will have some impact on the result and will likely have some practical relevance. How to compute the step response? You said that you have a "continous transfer function" so I'll presume that it's the Laplace Transform version of the transfer function. Multiply by 1/s to get the unit step response. Inverse transform to get the time response. Fred

Posted by ●August 27, 2010

On Aug 28, 10:35�am, "John N."wrote: > I was wondering if anyone could explain the best method is to > calculate the settling time of a continuous transfer function when > given a unit step input? > > The settling time, or time to steady-state, can be approximated, I > think (what I've tried to outline below), but I would like to know how > to calculate it exactly for any transfer function (1st order, 2nd > order, 3rd order, etc.). > > Below is just some approximation testing, the above question is what > I'm interested in, below I'm just going through a little work to prove > the approximations are not what Matlab is returning for the settling > time of a step response. I want to be able to calculate the settling > time that Matlab returns for a step response (assuming that is the > correct settling time value). I have not been able to find a source or > examples that discuss the best method to perform this calculation. I > have been using Matlab as my comparison test. If this is not the best, > please let me know... it just happens to be what I have access to. > > In reading through "Digital Control of Dynamic Systems" by Franklin, > they present the "qualitative guide" formula for the settling time as: > > 4.6 > ---- > zeta*omegaN > > Which equals: > > 4.6 > ---- > sigma > > Where the equation characterizes, "the transient response of a system > having no finite zeros and two complex poles with undamped natural > frequency omegaN, damping ratio zeta, and negative real part, sigma. > In analysis and design, it is used to obtain a rough estimate of > settling time for just about any system." > > Also, when I look at the Wikipedia entry for settling time (http:// > en.wikipedia.org/wiki/Settling_time), they present, "Settling time > depends on the system response and time constant. The settling time > for a 2nd order, underdamped system responding to a step response can > be approximated if the damping ratio zeta << 1," which yields the > equation: > > � �ln(tolerance fraction > - --------------------------------------------- > � �damping ratio * natural frequency > > Which equals, for a settling time to within 2%: > > � � ln(0.02) > - ------------ > � �zeta*omegaN > > I tried these two approximation methods in Matlab with the transfer > function: > > 2s + 4 > ----------------- > s^2 + 3s + 7 > > Matlab:>> g = tf([2 4],[1 3 7]); > >> stepinfo(g) > > ans = > > � � � � RiseTime: 0.2967 > � � SettlingTime: 2.7446 > � � �SettlingMin: 0.5447 > � � �SettlingMax: 0.7566 > � � � �Overshoot: 32.4125 > � � � Undershoot: 0 > � � � � �� Peak: 0.7566> � � � � PeakTime: 0.8477 > > A settling time of 2.7446 > > The approximation from Franklin provides: > > Poles = -1.5 +- 2.1794i > SettlingTime = 4.6 / 1.5 = 3.0667 > > Or, from Wikipedia: > > SettlingTime = log(0.02) / 1.5 = 2.6080 > > These approximations are close, but I would like to be able to > calculate the actual settling time, using whatever calculation may be > required. If anyone could provide me some insight, I would be very > appreciative. > > Thanks, > John N.Doesn't exist except for 2nd order cases. Hardy

Posted by ●August 27, 2010

John N. wrote:> I was wondering if anyone could explain the best method is to > calculate the settling time of a continuous transfer function when > given a unit step input? > The settling time, or time to steady-state, can be approximated, I > think (what I've tried to outline below), but I would like to know how > to calculate it exactly for any transfer function (1st order, 2nd > order, 3rd order, etc.).You have to: 1) get the time domain step response function in the closed form, which is going to be a transcendental function. 2) solve the transcendental equation for the settling time. There could be closed form solutions for some special cases however neither 1) nor 2) is doable in the general case. VLV

Posted by ●August 27, 2010

John N.wrote: >I was wondering if anyone could explain the best method is to >calculate the settling time of a continuous transfer function when >given a unit step input? >[snip] >These approximations are close, but I would like to be able to >calculate the actual settling time >[snip]It would be very helpful to know which of the following you are looking for: An analytical expression for settling time (given some defined class of transfer functions); An approximation to the settling time (given some defined class of transfer functions); or a methodology for measuring the settling time, given a waveform. I read your post twice and could not discern which of these you are looking for, but that could just be poor reading comprehension on my part. Steve

Posted by ●August 27, 2010

On 08/27/2010 03:35 PM, John N. wrote:> I was wondering if anyone could explain the best method is to > calculate the settling time of a continuous transfer function when > given a unit step input? > > The settling time, or time to steady-state, can be approximated, I > think (what I've tried to outline below), but I would like to know how > to calculate it exactly for any transfer function (1st order, 2nd > order, 3rd order, etc.). > > Below is just some approximation testing, the above question is what > I'm interested in, below I'm just going through a little work to prove > the approximations are not what Matlab is returning for the settling > time of a step response. I want to be able to calculate the settling > time that Matlab returns for a step response (assuming that is the-- snip --> These approximations are close, but I would like to be able to > calculate the actual settling time, using whatever calculation may be > required. If anyone could provide me some insight, I would be very > appreciative.For a discrete transfer function it's easy enough to just run the filter with a step input and check. It's not that much harder to do so with a continuous-time transfer function. To my knowledge there aren't any universal closed-form solutions. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Do you need to implement control loops in software? "Applied Control Theory for Embedded Systems" was written for you. See details at http://www.wescottdesign.com/actfes/actfes.html

Posted by ●August 27, 2010

I was wondering if anyone could explain the best method is to calculate the settling time of a continuous transfer function when given a unit step input? The settling time, or time to steady-state, can be approximated, I think (what I've tried to outline below), but I would like to know how to calculate it exactly for any transfer function (1st order, 2nd order, 3rd order, etc.). Below is just some approximation testing, the above question is what I'm interested in, below I'm just going through a little work to prove the approximations are not what Matlab is returning for the settling time of a step response. I want to be able to calculate the settling time that Matlab returns for a step response (assuming that is the correct settling time value). I have not been able to find a source or examples that discuss the best method to perform this calculation. I have been using Matlab as my comparison test. If this is not the best, please let me know... it just happens to be what I have access to. In reading through "Digital Control of Dynamic Systems" by Franklin, they present the "qualitative guide" formula for the settling time as: 4.6 ---- zeta*omegaN Which equals: 4.6 ---- sigma Where the equation characterizes, "the transient response of a system having no finite zeros and two complex poles with undamped natural frequency omegaN, damping ratio zeta, and negative real part, sigma. In analysis and design, it is used to obtain a rough estimate of settling time for just about any system." Also, when I look at the Wikipedia entry for settling time (http:// en.wikipedia.org/wiki/Settling_time), they present, "Settling time depends on the system response and time constant. The settling time for a 2nd order, underdamped system responding to a step response can be approximated if the damping ratio zeta << 1," which yields the equation: ln(tolerance fraction - --------------------------------------------- damping ratio * natural frequency Which equals, for a settling time to within 2%: ln(0.02) - ------------ zeta*omegaN I tried these two approximation methods in Matlab with the transfer function: 2s + 4 ----------------- s^2 + 3s + 7 Matlab:>> g = tf([2 4],[1 3 7]); >> stepinfo(g)ans = RiseTime: 0.2967 SettlingTime: 2.7446 SettlingMin: 0.5447 SettlingMax: 0.7566 Overshoot: 32.4125 Undershoot: 0 Peak: 0.7566 PeakTime: 0.8477 A settling time of 2.7446 The approximation from Franklin provides: Poles = -1.5 +- 2.1794i SettlingTime = 4.6 / 1.5 = 3.0667 Or, from Wikipedia: SettlingTime = log(0.02) / 1.5 = 2.6080 These approximations are close, but I would like to be able to calculate the actual settling time, using whatever calculation may be required. If anyone could provide me some insight, I would be very appreciative. Thanks, John N.