step response but wrong answer from matlab!
조회 수: 4 (최근 30일)
이전 댓글 표시
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)))
% 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');
댓글 수: 0
답변 (1개)
Star Strider
2024년 2월 11일
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)))
% 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.
.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Get Started with Control System Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

