Why the peak values are evidently different under the impulse function to a second order function with zero damping?

29 次查看(过去 30 天)
Hi there,
I am using impulse function to get the impulse response of a second order function where the damping is zero. The codes are like these:
clear ; clc ; close
t = 0 : 0.01 : 2 ;
ksai = 0 ;
omega_n = 50 ;
num = omega_n ^ 2 ;
den = [ 1 , 2 * ksai * omega_n , omega_n ^ 2 ] ;
G_fun = tf( num , den ) / omega_n ;
[ Y1 , T ] = impulse( G_fun , t ) ;
plot( T , Y1 ) ; grid ;
and the plot result is
However, we find the numerical peak values are a little bit different. Theoretically, the impulse response of a second order function with zero damping is a sine curve, and the peak values should be identical. Why the differences appear in this figure?
Many thanks!

采纳的回答

Vinay
Vinay 2024-10-30,2:19
The issue can be resolved by using a finer time step resolution, which captures the impulse response more accurately. A larger time step can miss critical points in the waveform, leading to distortion at the peaks. Reducing the time step should align the numerical and theoretical results more closely.
t = 0 : 0.0001 : 2 ;
I hope this helps!

更多回答(1 个)

Andrew Ouellette
Andrew Ouellette 2024-10-31,19:21
Hello,
You can use the impulseplot() syntax of providing a final time to have MATLAB automatically choose a resolution for your time grid.
tend = 2;
ksai = 0;
omega_n = 50;
num = omega_n^2;
den = [1 2*ksai*omega_n omega_n^2];
G_fun = tf(num,den)/omega_n;
ip = impulseplot(G_fun,tend);
ip.AxesStyle.GridVisible = true;
Additionally, by using the ImpulsePlot chart provided by Control System Toolbox, you can enable characteristics on your chart via the right-click context menu or its API to see information like the peak response (although, as this system is undamped, the "peak" occurs at t=Inf).
ip.Characteristics.PeakResponse.Visible = true;

产品


版本

R2024b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by