Hi everyone,
I'm working on my own MATLAB PID code that should be initiated within an external algorithm coded as a function in another m-file.
The PID part (without anti-windup) looks like this one:
clc
clear
s = tf('s');
t = (0:0.05:30)';
opt = stepDataOptions('InputOffset', Offset, 'StepAmplitude', 1);
OLTF = 1/(1.2 * s + 1);
Gm = 1/(0.1*s + 1);
Kp = 3.71580598721178;
Ki = 3.30711176584135;
Kd = 1.80393204651312;
TauD = 0.0;
Gc = Kp + Ki/s + Kd*s / (TauD * s + 1);
CLTF = feedback(Gc * OLTF, Gm);
y = step(CLTF, t, opt);
I'm struggling to implement anti-windup in this m-file code.
I think there is one approach by thinking of it as a parallel transfer function, but I don't have any clue!
Any help is highly appreciated .. Thank you so much