Simulation of a PID controlled system for a reference step input. Input arguments are process dynamics and PID parameters. Output parameters are step response data and state trajectories.
This function is an extension of the conventional step function designed to simulate closed loop systems. Process dynamics defined using function handle, state space model and transfer function are accepted. The controlled variable must be the first state.
[y,x] = step_pid(sys,t,Kp,Ki,Kd,N,R)
[y,x] = step_pid(sys,t,Kp,Ki,Kd,N,R,S)
sys - Function handle, state space of transfer function.
t - time vector
Kp, Ki, Kd - Controller gains
N - Derivative filter coefficient
R - Step amplitude
S - Number of state variables (Only for sys=function handle)
y - Step response data
x - State trajectories
André de Souza Mendes (2021). step_pid (https://github.com/andresmendes/step_pid/releases/tag/1.0.3), GitHub. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!