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

29 views (last 30 days)
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!

Accepted Answer

Vinay
Vinay on 30 Oct 2024 at 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!

More Answers (1)

Andrew Ouellette
Andrew Ouellette on 31 Oct 2024 at 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;

Products


Release

R2024b

Community Treasure Hunt

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

Start Hunting!