Part 1.
while▹ continue until the settling time is determined
▹ increasing time by
The first mechanism of recording (orange dots on Figure 11):
ifthen▹ where [ ] represents the floor function
▹ when the signal crosses decimal values a reference time is recorded (orange dots on Figure 11).
if
then ▹ if this is the first a reference time is recorded, then
▹ assign this value to both and
else
▹ renewing only the maximum reference time
end if
end if
▹ calculate time step
See Part 2 for further explanation.
Part 2.
The second mechanism of recording involves an extremum search (green dots on Figure 11). Since the function is continuous, a moment of time when the derivative changes sign implies a local extremum.
ifthen▹ changes sign, so a local extremum occurs in
▹ record the local extremum time and the number of them
▹ amplitude at the extremum
if
then ▹ we have found a larger peak
▹ percentage overshoot
end if
if
then ▹ if there are multiple extremums
▹ the amplitude difference between the neighbor oscillations
▹ recording the maximum
end if
if
then ▹ if this is the first extremum. This is done so that the does not increase uncontrollably.
▹ the condition is needed so that does not increase uncontrollably
else
▹ record the time between oscillations for additional accuracy (Nyquist theorem)
▹ in case this time is lower that the current or larger than the current value of
end if
end if
▹ calculate time step
Cont.
At last, let us describe the test for finding
ifthen▹ the signal appeared in the 3% range
▹ record the time and assign zero to the logic parameter m needed for the following cycle
while AND
do ▹ starting from for the time length of we check for the 3% criteria
if
then ▹ the signal exited the 3% area
▹ therefore, the test for settling time stops and the algorithm resumes its work
end if
end while
if
then ▹ if the 3% condition did not break once during this test
▹ we have found the settling time
end if
end if