/usr/share/octave/packages/control-3.0.0/optiPIDctrl.m is in octave-control 3.0.0-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | % ===============================================================================
% optiPIDctrl Lukas Reichlin February 2012
% ===============================================================================
% Return PID controller with roll-off for given parameters Kp, Ti and Td.
% ===============================================================================
function C = optiPIDctrl (Kp, Ti, Td)
tau = Td / 10; % roll-off
num = Kp * [Ti*Td, Ti, 1];
den = conv ([Ti, 0], [tau^2, 2*tau, 1]);
C = tf (num, den);
end
% ===============================================================================
|