Why the peak values are evidently different under the impulse function to a second order function with zero damping?
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Tony Cheng
le 30 Oct 2024
Réponse apportée : Andrew Ouellette
le 31 Oct 2024
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!
0 commentaires
Réponse acceptée
Vinay
le 30 Oct 2024
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!
Plus de réponses (1)
Andrew Ouellette
le 31 Oct 2024
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;
0 commentaires
Voir également
Catégories
En savoir plus sur Plot Customization dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
