step response but wrong answer from matlab!

4 Ansichten (letzte 30 Tage)
Mohammadreza
Mohammadreza am 11 Feb. 2024
Beantwortet: Star Strider am 11 Feb. 2024
I just copy matlab code of step response of PIDT1 from "https://wiki.ibkastl.de/view/PIDT1-Glied" but the anser is completely defferent in compare of expected! Just look at the attached photo, you understand it?
% Transfer Function: FPIDT1 (First-Order PD Controller in Discrete-Time)
Kp = 8;
Tv = 1e-5;
Tn = 1e-5;
T1 = 2e-3;
s = tf('s');
FPIDT1 = Kp * (1 + (1 / (Tn * s)) + ((Tv + s) / (1 + T1 * s)))
FPIDT1 = 8.016e-05 s^2 + 0.01608 s + 8 ----------------------------- 2e-08 s^2 + 1e-05 s Continuous-time transfer function.
% Plot Bode, Step, and Impulse Responses for FPIDT1
figure;
subplot(3, 1, 1);
bode(FPIDT1);
title('Bode Plot - FPIDT1');
subplot(3, 1, 2);
step(FPIDT1);
title('Step Response - FPIDT1');
subplot(3, 1, 3);
impulse(FPIDT1);
title('Impulse Response - FPIDT1');

Antworten (1)

Star Strider
Star Strider am 11 Feb. 2024
f you plot the step respoonse on the same time scale, the MATLAB plot is the same.
See the added fourth subplot
% Transfer Function: FPIDT1 (First-Order PD Controller in Discrete-Time)
Kp = 8;
Tv = 1e-5;
Tn = 1e-5;
T1 = 2e-3;
s = tf('s');
FPIDT1 = Kp * (1 + (1 / (Tn * s)) + ((Tv + s) / (1 + T1 * s)))
FPIDT1 = 8.016e-05 s^2 + 0.01608 s + 8 ----------------------------- 2e-08 s^2 + 1e-05 s Continuous-time transfer function.
% Plot Bode, Step, and Impulse Responses for FPIDT1
figure;
subplot(4, 1, 1);
bode(FPIDT1);
title('Bode Plot - FPIDT1');
subplot(4, 1, 2);
step(FPIDT1);
title('Step Response - FPIDT1');
subplot(4, 1, 3);
impulse(FPIDT1);
title('Impulse Response - FPIDT1');
subplot(4, 1, 4);
step(FPIDT1);
xlim([0 0.02])
title('Step Response - FPIDT1 - Zoomed Time Range (0 \rightarrow 0.02 s)');
It could be seen even more easily if plotted in its own figure.
.

Kategorien

Mehr zu Get Started with Control System Toolbox 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!

Translated by