www.gusucode.com > control 案例程序 matlab源码代码 > control/SecondOrderTransferFunctionFromDampingAndFrequencyExample.m
%% Second-Order Transfer Function from Damping and Natural Frequency % Create a |tf| model that represents a second-order system with % known natural frequency and damping ratio. %% % The transfer function of a second-order system, expressed in terms of its % damping ratio $\zeta$ and natural frequency $\omega_0$, is: %% % % $$H\left( s \right) = \frac{{\omega _0^2}}{{{s^2} + 2\zeta {\omega _0}s + \omega _0^2}}.$$ % %% % Represent this transfer function in MATLAB using the |tf| command. For % example, suppose you have a system with $\zeta$ = 0.25 and $\omega_0$ = 3 % rad/s. % Copyright 2015 The MathWorks, Inc. zeta = 0.25; w0 = 3; H = tf(w0^2,[1,2*zeta*w0,w0^2]) %% % Examine the response of this transfer function to a step input. stepplot(H) %% % The plot shows the ringdown expected of a second-order system with a low % damping ratio.