Settling Time: What is it? (Formula And How To Find it in MATLAB)

Electrical4u
03/29/2024 10:44:55

What is Settling Time?

The settling time of a dynamic system is defined as the time required for the output to reach and steady within a given tolerance band. It is denoted as Ts. Settling time comprises propagation delay and time required to reach the region of its final value. It includes the time to recover the overload condition incorporated with slew and steady near to the tolerance band.

The tolerance band is a maximum allowable range in which the output can be settle. Generally, the tolerance bands are 2% or 5%.

Settling time in step response of a second-order system is as shown in the below figure.



settling time

Settling Time



Settling Time Formula

Settling time depends on natural frequency and response of the system. General equation of settling time is;


  

\[ T_S = \frac{ln(tolerance \, fraction)}{damping \, ratio \times Natural \, frequency} \]


The unit step response of second order system is expressed as;


  

\[ C(t) = 1 - \left( \frac{e^{-\zeta \omega_n t}}{\sqrt{1-\zeta^2}} \right) sin(\omega_d t + \theta) \]


This equation divides into two parts;

 

  

\[ exponential \, component = \left( \frac{e^{-\zeta \omega_n t}}{\sqrt{1-\zeta^2}} \right) \]



  

\[ sinusoidal \, component = sin(\omega_d t + \theta) \]


To calculate the settling time, we only need the exponential component as it cancels the oscillatory part of sinusoidal component. And the tolerance fraction is equal to the exponential component.

\[ Tolerance \, fraction = \frac{e^{-\zeta \omega_n t}}{\sqrt{1-\zeta^2}} \]



  

\[ t = T_S \]



  

\[ Tolerance \, fraction \times \sqrt{1-\zeta^2} = e^{-\zeta \omega_n T_S} \]



  

\[ ln \left( Tolerance \, fraction \times \sqrt{1-\zeta^2} \right) = -\zeta \omega_n T_S \]



  

\[ T_S = - \frac{ ln \left( Tolerance \, fraction \times \sqrt{1-\zeta^2} \right)}{\zeta \omega_n} \]

How to Calculate Settling Time

To calculate settling time, we consider a first order system with unit step response.


  

\[ \frac{C(s)}{R(s)} = \frac{\frac{1}{T}}{s+\frac{1}{T}}} \]


For unit step response,


  

\[ R(s) = \frac{1}{s} \]


Hence,


  

\[ C(s) = \frac{\frac{1}{T}}{s(s+\frac{1}{T})}} \]



  

\[ C(s) = \frac{A_1}{s} + \frac{A_2}{s+\frac{1}{T}} \]


Now, calculate the value for A1 and A2.

\[ \frac{\frac{1}{T}}{s(s+\frac{1}{T})}} = \frac{A_1(s+\frac{1}{T}) + A_2s}{s(s+\frac{1}{T})} \]



  

\[ \frac{1}{T} = A_1 (s+\frac{1}{T}) + A_2 s \]


Assume s = 0;


  

\[ \frac{1}{T} = A_1( 0 + \frac{1}{T}) + A_2 (0) \]



  

\[ \frac{1}{T} = A_1 \frac{1}{T} \]



  

\[ A_1 = 1 \]


Assume s = -1/T;


  

\[ \frac{1}{T} = A_1 (0) + A_2 (\frac{-1}{T}) \]



  

\[ \frac{1}{T} = -A_2 \frac{1}{T} \]



  

\[ A_2 = -1 \]



  

\[C(s) = \frac{1}{s} - \frac{1}{s+\frac{1}{T}} \]



  

\[ C(t) = L^{-1} C(s) \]

\[ C(t) = 1 - e^{\frac{-t}{T}} \]



  

\[ e^{\frac{-t}{T}} = 1 - C(t) \]

For 2% error, 1-C(t) = 0.02;


  

\[ e^{\frac{-t_s}{T}} = 0.02 \]



  

\[ \frac{-t_s}{T} = ln(0.02) \]



  

\[ \frac{-t_s}{T} = -3.9 \]



  

\[ t_s = 3.9T \]



  

\[ t_s \approx 4T \]


This equation gives settling time for first order system with unit step input.

For second order system, we need to consider below equation;


  

\[ C(t) = 1 - \frac{e^{- \zeta \omega_n t}}{\sqrt{1-\zeta^2}} sin(\omega_d t+\phi) \]


In this equation, exponential term is important to find the value of settling time.


  

\[ C(t) = 1 - \frac{e^{- \zeta \omega_n t}}{\sqrt{1-\zeta^2}} \]



  

\[ \frac{e^{- \zeta \omega_n t}}{\sqrt{1-\zeta^2}} = 1 - C(t) \]


Now, we consider 2% error. Therefore, 1 – C(t) = 0.02;


  

\[ \frac{e^{- \zeta \omega_n t}}{\sqrt{1-\zeta^2}} = 0.02 \]

The value of damping ratio (ξ) depends on the type of second order system. Here, we consider an underdamped second order system. And the value of ξ lies between 0 and 1.

So, denominator of above equation is nearly equal to 1. And to make an easy calculation, we can neglect it.


  

\[ e^{- \zeta \omega_n t_s} = 0.02 \]



  

\[ - \zeta \omega_n t_s = ln(0.02) \]



  

\[ - \zeta \omega_n t_s = -3.9 \]



  

\[ t_s = \frac{3.9}{\zeta \omega_n} \]



  

\[ t_s \approx \frac{4}{\zeta \omega_n} \]


This equation can be used only for 2% error band and underdamped second order system.

Similarly, for 5% error band; 1 – C(t) = 0.05;


  

\[ e^(- \zeta \omega_n t_s) = 0.05 \]



  

\[ - \zeta \omega_n t_s = ln(0.05) \]



  

\[ - \zeta \omega_n t_s = -3 \]



  

\[ t_s \approx \frac{3}{\zeta \omega_n} \]


For second order system, before finding settling time, we need to calculate the damping ratio.


Second-order System

Damping Ratio (ξ)

Setting Time (TS)

Underdamped

0<ξ<1

  

\[ T_S = \frac{4}{\zeta \omega_n }\]

Undamped

ξ = 0

  

\[ T_S = \infty \]

Critical damped

ξ = 1

  

\[ T_S = \frac{6}{\omega_n} \]

Overdamp

ξ > 1

Depends on dominant pole


Root Locus Settling Time

Settling time can be calculated by the root locus method. Settling time depends on the damping ratio and natural frequency.

These quantities can be derived with the help of root locus method. And we can find the settling time.

Let’s understand with an example.


  

\[ G(s) = \frac{K}{(s+1)(s+2)(s+3)} \]


And Overshoot = 20%


  

\[ damping \, ratio \, \zeta = \frac{-ln(\%OS/100)}{\sqrt{\pi^2 + ln^2(\%OS/100)}} \]



  

\[ \zeta = \frac{-ln(0.2)}{ \sqrt{\pi^2 + ln^2(0.2)}} \]



  

\[ \zeta = \frac{1.609}{ \sqrt{\pi^2 + 2.59}} \]



  

\[ \zeta = \frac{1.609}{3.529} \]



  

\[ \zeta = 0.4559 \]


From the root locus plot; you can find the dominant poles;


  

\[ P = -0.866 \pm j 1.691  = \sigma \pm j \omega_d \]



  

\[ \omega_d = 1.691 \]



  

\[ \omega_d = \omega_n \sqrt{1-\zeta^2} \]



  

\[ 1.691 = \omega_n \sqrt{1-0.207} \]



  

\[ \omega_n = \frac{1.691}{\sqrt{0.793}} \]



  

\[ \omega_n = \frac{1.691}{0.890} \]



  

\[ \omega_n = 1.9 \, rad/sec \]


Now, we have the value of ξ and ωn,


  

\[ settling \, time \, t_s = \frac{4}{\zeta \omega_m} \]



  

\[ t_s = \frac{4}{0.455 \times 1.9} \]



  

\[ t_s = 4.62 sec \]


The root locus plot is derived from MATLAB. For that use “sisotool”. Here, you can add a constraint for the percentage overshoot is equal to 20%. And get dominant poles easily.

The below figure shows the root locus plot from MATLAB.



root locus example

Root Locus Example



We can find the settling time with the help of MATLAB. The unit step response of this system is as shown below figure.



settling time in matlab

Settling Time in MATLAB



How to Reduce Settling Time

The settling time is the time required to achieve target. And for any control system, the settling time must be kept minimum.

Reduce the settling time is not an easy task. We need to design a controller to reduce the settling time.

As we know, there are three controllers; proportional (P), Integral (I), derivative (D). With a combination of these controllers, we can achieve our requirements of the system.

The gain of the controllers (KP, KI, KD) is chosen according to the system requirement.

Increase proportional gain KP, results in a small change in settling time. Increase in integral gain KI, settling time increases. And increase in derivative gain KD, settling time decreases.

Therefore, the derivative gain increases to decrease the setting time. While selecting the gain values of the PID controller, it may affect the other quantities also like rise time, overshoot, and Steady-state error.

How to Find Settling Time in MATLAB

In MATLAB, settling time can be found by a step function. Let’s understand by example.


  

\[ G(s) = \frac{25}{s^2 + 6s + 25} \]


First, we calculate the settling time by equation. For that, compare this transfer function with general transfer function of second order system.


  

\[ G(s) = \frac{\omega_n^2}{s^2 + 2 \zeta \omega_n s + \omega_n^2} \]


Therefore,


  

\[ 2 \zeta \omega_n = 6 \]



  

\[ \zeta \omega_n = 3 \]



  

\[ settling \, time \, (t_s) = \frac{4}{\zeta \omega_n} \]



  

\[ t_s = \frac{4}{3} \]



  

\[ t_s = 1.33 sec \]


This value is an approximate value as we have taken assumptions while calculating the equation of settling time. But in MATLAB, we get the exact value of settling time. So, this value may be slightly different in both cases.

Now, to calculate settling time in MATLAB, we use the step function.

clc; clear all; close all;
num = [0 0 25];
den = [1 6 25];
t = 0:0.005:5;
sys = tf(num,den);
F = step(sys,t);
H = stepinfo(F,t)

step(sys,t);

Output:

H =

RiseTime: 0.3708
SettlingTime: 1.1886
SettlingMin: 0.9071
SettlingMax: 1.0948
Overshoot: 9.4780
Undershoot: 0
Peak: 1.0948
PeakTime: 0.7850

And you get a graph of response as shown in the below figure.



settling time calculation in matlab

Settling time calculation in MATLAB



In MATLAB, by default percentage band of error is 2%. You can change this in graph for different error band. for that, right-click on graph > properties > options > “show settling time within ___ %”.



property editor matlab

Property Editor MATLAB



Another way to find the settling time by running a loop. As we know, for the 2% error band, we consider the response between 0.98 to 1.02.

clc; clear all; close all;

num = [0 0 25];
den = [1 6 25];

t = 0:0.005:5;

[y,x,t] = step(num,den,t);

S = 1001;
while y(S)>0.98 & y(S)<1.02;
    S=S-1;
end
settling_time = (S-1)*0.005

Output:

settling_time = 1.1886

Statement: Respect the original, good articles worth sharing, if there is infringement please contact delete.

Electrical4u

Electrical4U is dedicated to the teaching and sharing of all things related to electrical and electronics engineering.

Message
Email
Inquiry
Inquiry