step response but wrong answer from matlab!

4 visualizaciones (últimos 30 días)
Mohammadreza
Mohammadreza el 11 de Feb. de 2024
Respondida: Star Strider el 11 de Feb. de 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');

Respuestas (1)

Star Strider
Star Strider el 11 de Feb. de 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.
.

Categorías

Más información sobre Get Started with Control System Toolbox en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by