gusucode.com > 异步电机的无速度传感器的矢量控制matlab源码程序 > code/indirect_sensorlessini.m

    global Rs;
global Rr;
global Tr;
global Ls;
global Lr;
global Lm;
global o;
global Pn;
global J;
global Bm;
global Ki;
global T;
global TL;
%-------------------
global Wc;
global flux_command;
global flux;
global flux_s;
global we_estimated;
global wr_estimated;
global vdss;
global vqss;
global idss;
global iqss;
global edss;
global eqss;
global flux_d;
global flux_q;
global flux_d_o;
global flux_q_o;
global flux_d_r;
global flux_q_r;
global flux_d_r_o;
global flux_q_r_o;
global cos_theta;
global sin_theta;
global wr_filter;
global we_filter;
global we;
global wc;
global wsl;
global we_o;
global wr_estimated_o;
global reg1;
global reg2;
global reg3;
global flux_d_comp;
global flux_q_comp;
global theta;
%------------------------------------%

global counter;
%------------------------------------%
%-----------------------ASR---------------------%
global iqse;
global ek;
global ek_old;
global fdre;
%---------------------------------
Rs=2.7981/3;
Rr=2.1303/3;
Lr=0.2560/3;
Ls=0.2560/3;
Lm=0.2456/3;
Pn=2;
J=0.0039;
Bm=0;
Tr=Lr/Rr;
o=1-(Lm^2/(Lr*Ls));
%-----------------------------------%

%-----------------------------------%
T=0.0001;
TL=0;

%-----------------------------------%
ek=0;
iqse=10;
ek_old=0;
%-----------------------------------
Wc=12;
flux_command=0.544;
vdss=0;
vqss=0;
idss=0;
iqss=0;
edss=0;
eqss=0;
flux_d=0;
flux_q=0;
flux_d_o=0;
flux_q_o=0;
flux_d_r=0;
flux_q_r=0;
flux_d_r_o=0;
flux_q_r_o=0;
cos_theta=1;
sin_theta=0;
we_estimated=0;
wr_estimated=0;
wr_filter=0;
counter=0;
tehta=0;
fdre=0;
we=0;
wsl=0;
we_filter=0;
we_o=0;
wr_estiamted=0;
flux=0;
flux_s=0;
reg1=0;
reg2=0;
reg3=0;
flux_d_comp=0;
flux_q_comp=0;
wc=20;