%% Load Data for SPM-IPM-REL motors drives ------ Paolo Gherardo Carlet -%% clc; % Load motor parameters mot.R = 1.9; % Stator resistance [ohm] mot.Ld = 0.003; % d-axis inductance [H] mot.Lq = 0.003; % q-axis inductance [H] mot.Lambda_pm = 0.1; % Permanent magnet flux linkage [Vs] mot.p = 4; % Number of pole pairs mot.IN = 3.1*sqrt(2);% Nominal current [A-pk] mot.J = 1.8e-4; % Inertia [Kg m^2] mot.B = 6e-6; % Air friction mot.UDC = 300; % DC-bus voltage mot.TN = 3/2*mot.p*(mot.Lambda_pm)*mot.IN;% Nominal Torque [Nm] % ------------------------------------------------------------------------% % Simulation condition fs = 10000; % Switching frequency [Hz] Ts = 1/fs; % Control period [s] % Design of the speed control loop wctrl.Kp= 0.0391; wctrl.Ki= 10.3484; wctrl.IN= 4.3841; wctrl.Ts= Ts; % Design of the current control loop ictrl.Ts = Ts; ictrl.Kp = 10; ictrl.Ki = 1500; ictrl.UN = mot.UDC/sqrt(3);