Professional Documents
Culture Documents
04
04
04
Theory:
Steps to Determine Time Domain Response and
Performance Parameters:
1. Define System Parameters:
• Set the values of ωn\omega_nωn and ζ\zetaζ for the second-order system.
numerator = wn^2;
% Peak time
peak_time = t(peak_index);
final_value = step_response(end);
settling_time = t(settling_start_index);
% Overshoot and rise time
% Theoretical values
wn_theoretical = sqrt(numerator);
zeta_theoretical = zeta;
% Display results
fprintf('Performance Parameters:\n');
fprintf('\nTheoretical Values:\n');
figure;
grid on;
xlabel('Time (sec)');
ylabel('Amplitude');
title('Step Response of Second Order System');
Explanation:
• System Parameters:
o wn and zeta are defined to specify the natural frequency and
damping ratio of the second-order system.
• Transfer Function:
o sys is created using the tf function to represent the transfer
function of the system.
• Step Response Analysis:
o The step function computes the step response of the system over
time t.
• Performance Parameters Calculation:
o Peak time, settling time, overshoot, and rise time are calculated
based on the step response data.
• Theoretical Values:
o Theoretical values of natural frequency and damping ratio are
computed.
• Plotting:
o Displays the step response graphically for visual inspection.
Graph:
Conclusion:
This MATLAB program allows for the comprehensive analysis of a second-
order system's time-domain response to a step input. It calculates and compares
performance parameters such as peak time, settling time, overshoot, and rise
time with their theoretical expectations based on system parameters. This
analysis is crucial for understanding and evaluating the behavior of second-
order systems in control and signal processing applications. Adjust the system
parameters (wn and zeta) according to your specific system to see how the
response changes.