0 calificaciones0% encontró este documento útil (0 votos)
5 vistas1 página
This document contains code for calculating and plotting the step response and impulse response of a second-order system based on inputs for the undamped natural frequency and damping ratio. It first defines variables for the natural frequency, damping ratio, damped natural frequency, and other parameters needed. It then defines the numerator and denominator polynomials for the transfer function and plots the step response, impulse response, and holds the plot.
This document contains code for calculating and plotting the step response and impulse response of a second-order system based on inputs for the undamped natural frequency and damping ratio. It first defines variables for the natural frequency, damping ratio, damped natural frequency, and other parameters needed. It then defines the numerator and denominator polynomials for the transfer function and plots the step response, impulse response, and holds the plot.
This document contains code for calculating and plotting the step response and impulse response of a second-order system based on inputs for the undamped natural frequency and damping ratio. It first defines variables for the natural frequency, damping ratio, damped natural frequency, and other parameters needed. It then defines the numerator and denominator polynomials for the transfer function and plots the step response, impulse response, and holds the plot.
wn = input('Enter value of undamped natural frequency')
z = input('Enter value of damping ratio')
n = [wn*wn] p = sqrt(1-(z^2)) wd = wn*p; h = [p/z]; k = atan(h) m = pi-k; tr = [m/wd] p = [pi/wd] q = z*wn ts = [4/q] r = z*pi f = [r/p] mp = exp(-f) num = [0 0 n] den = [1 z*z*wn n] s = tf(num,den) hold on step(s) impulse(s) hold off