if Pqflag = true:
Ipmax = min(VDL2_out, Imax);
Ipmin = -Ipmax;
Iqmax = min(VDL1_out, sqrt(Imax^2 Ipcmd^2);
Iqmin = -Iqmax;
end
if Pqflag = false:
Ipmax = min(VDL2_out, sqrt(Imax^2 - Iqcmd^2));
Ipmin = -Ipmax;
Iqmax = min(VDL1_out, Imax);
Iqmin = -Iqmax;
end
The modelling of the current limit logic for the REECB electrical controller is based on the following references: