FUNCTION REFERENCE
pid
Parallel-form PID controller object.
Parallel-form PID controller object.
Syntax
C = pid(Kp)Syntax
C = pid(Kp,Ki)Syntax
C = pid(Kp,Ki,Kd)Syntax
C = pid(Kp,Ki,Kd,Tf)Syntax
C = pid(Kp,Ki,Kd,Tf,Ts)Syntax
C = pid(Cstd)C = Kp + Ki/s + Kd*s/(Tf*s+1); missing gains are zero, Tf = 0 means an unfiltered derivative. Properties Kp, Ki, Kd, Tf, Ts, IFormula, DFormula, InputName and OutputName are read and assigned with dot syntax (assignments are validated). Discrete controllers (Ts > 0) use the forward-Euler integrator Ts/(z-1) for both the integral and the derivative filter. C converts to a transfer function in one place, so tf(C), zpk(C), ss(C), C*G, feedback, series, step, bode and margin work as for that transfer function. pid(Cstd) converts a pidstd object.
Example
C=pid(2,1,0.5,0.1); G=tf(1,[1 2 1]); T=feedback(C*G,1); [y,t]=step(T,0:0.1:5);Example
C=pid(1,2); C.Ki=4; tf(C)Example
Cd=pid(1,0.5,0,0,0.1)Differences from MATLAB: scalar SISO controllers only (no arrays of controllers, delays or time units); IFormula and DFormula accept only 'ForwardEuler', other formulas are not supported yet. ss(C) of an unfiltered derivative is rejected (improper).
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.