You are on page 1of 4

data_obj = iddata(output, input, 1);

est_tf = tfest(data_obj, 1, 1);

Warning: For transient data (step or impulse experiment), make sure that the change in input signal does not
happen too early relative to the order of the desired model. You can achieve this by prepending sufficient
number of zeros (equilibrium values) to the input and output signals. For example, a step input must be
represented as [zeros(nx,1); ones(N,1)] rather than ones(N,1), such that nx > model order.

disp('Analysis Results:');

Analysis Results:

disp(['Estimated Transfer Function: ', num2str(est_tf.Numerator), '/',


num2str(est_tf.Denominator)]);

Estimated Transfer Function: 0.013134 0.092542/1 0.092915

analysis_results = stepinfo(est_tf);
system_gain = est_tf.Numerator;
system_damping_ratio = analysis_results.Overshoot / 100;
system_natural_frequency = 1 / (2 * pi * analysis_results.PeakTime);
system_poles_zeros = pole(est_tf);
system_settling_time = analysis_results.SettlingTime;
system_rise_time = analysis_results.RiseTime;
system_percent_overshoot = analysis_results.Overshoot;
disp(['Gain: ', num2str(system_gain)]);

Gain: 0.013134 0.092542

disp(['Damping Ratio: ', num2str(system_damping_ratio)]);

Damping Ratio: 0

disp(['Natural Frequency: ', num2str(system_natural_frequency)]);

Natural Frequency: 0.0020196

disp(['Poles/Zeros: ', num2str(system_poles_zeros)]);

Poles/Zeros: -0.092915

disp(['Settling Time: ', num2str(system_settling_time)]);

Settling Time: 41.9628

disp(['Rise Time: ', num2str(system_rise_time)]);

Rise Time: 23.65

disp(['Percent Overshoot: ', num2str(system_percent_overshoot)]);

Percent Overshoot: 0

figure;
pzmap(est_tf);

1
title('Pole-Zero Map');
figure;
bode(est_tf);
title('Bode Plot');

2
figure;
impulse(est_tf);

3
title('Impulse Response');
figure;
step(est_tf);

title('Step Response');

You might also like