Updated current limit

The firmware allows now to set higher currents than 15 A/motor.
NOTE: You can change this limit at your own risk. I do not take any responsability if your boards gets damaged.
This commit is contained in:
EmanuelFeru
2019-11-03 12:45:13 +01:00
parent 0fb080ad1b
commit 9a9eed7d10
9 changed files with 83 additions and 79 deletions

View File

@@ -138,10 +138,11 @@ cf_iqKpLimProt = 7.2; % [-] Current limit protection gain (onl
cf_iqKiLimProt = 40.7 / f_ctrl; % [-] Current limit protection integral gain (only used in SPD_MODE)
i_max = 15; % [A] Maximum allowed motor current (continuous)
i_max = i_max * i_sca;
iq_max_XA = 0:15:i_max;
iq_max_M1 = sqrt(i_max^2 - iq_max_XA.^2); % Current circle limitations map
iq_maxSca_XA = 0:0.02:0.99;
iq_maxSca_XA = fixpt_evenspace_cleanup(iq_maxSca_XA, ufix(16), 2^-16); % Make sure the data is evely spaced up to the last bit
iq_maxSca_M1 = sqrt(1 - iq_maxSca_XA.^2); % Current circle limitations map
% figure
% stairs(iq_max_XA, iq_max_M1); legend('i_{max}');
% stairs(iq_maxSca_XA, iq_maxSca_M1); legend('i_{maxSca}');
%-------------------------------
%% F05_Control_Type_Management