foc_adrc.m 806 B

123456789101112131415161718192021
  1. % Clear workspace
  2. close all
  3. clear
  4. clc
  5. % Load model parameters
  6. Ts = 5e-7; % [s] Model sampling time (200 KHz)
  7. Ts_ctrl = 6e-5; % [s] Controller sampling time (50us)5e-5
  8. f_speed_ctrl = 500; % [Hz] Speed/torque Controller frequency = (500 Hz)
  9. Ts_Spd_ctl = 1/f_speed_ctrl;
  10. %Simulink provider Motor parameters
  11. n_polePairs = 4; % [-] Number of motor pole pairs
  12. PM = 0.01688; % Permanent magnet flux linkage,
  13. Ld = 0.07e-3;% d-axis inductance,
  14. Lq = 0.150e-3; % q-axis inductance,
  15. Rs = 0.011; % Stator resistance,
  16. J = 0.03945; % Moment of inertia,
  17. bandwith = 5000;
  18. i_Udc = 96; % DCbus max voltage