Why the peak values are evidently different under the impulse function to a second order function with zero damping?
    6 Ansichten (letzte 30 Tage)
  
       Ältere Kommentare anzeigen
    
    Tony Cheng
 am 30 Okt. 2024
  
    
    
    
    
    Beantwortet: Andrew Ouellette
    
 am 31 Okt. 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 Kommentare
Akzeptierte Antwort
  Vinay
 am 30 Okt. 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!
Weitere Antworten (1)
  Andrew Ouellette
    
 am 31 Okt. 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 Kommentare
Siehe auch
Kategorien
				Mehr zu Plot Customization finden Sie in Help Center und File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
