All problems
Settling Time Estimate
Problem
For a second-order system with damping ratio zeta and natural frequency omega_n, the 2-percent settling time is commonly estimated as t_s = 4 / (zeta * omega_n).
Given zeta > 0 and omega_n > 0, return this estimate.
Hint
The envelope decays like e^(-zeta*omega_n*t); four time constants give 2 percent.
Test cases
case 1
in: [0.5,4]
expected: 2
case 2
in: [0.2,5]
expected: 4
case 3
in: [0.8,2]
expected: 2.5
case 4
in: [0.25,2]
expected: 8
Starter codePython
def settling_time(zeta, omega_n):
# Your code here
pass4 test cases · run your code against them in the editor