📄 cur_mod.m
字号:
function [theta_e,h] = cur_mod(ide,iqe,wr,h,p)
% This function compute the rotor flux angle based on the current for
% Indirect field Oriented Control of Induction machine
% Inputs:
% ide = Synchronously rotating d-axis stator current (pu)
% iqe = Synchronously rotating q-axis stator current (pu)
% wr = Rotor electrically angular velocity (pu)
% h = [ime; theta_old]
% p = [T; Rr; Lr; fb]
% 1 2 3
% Outputs:
% theta_e = Rotor flux angle (pu)
% where
% ime = Synchronously rotating d-axis magnetizing current (pu)
% theta_old = Previous rotor flux angle (pu)
% T = Sampling period (sec)
% Rr = Rotor resistance referred to stator (ohm)
% Lr = Rotor self inductance referred to stator (H)
% fb = Base frequency (Hz)
% Defining constants based on machine parameters
Tr = p(3)/p(2); % Tr = Lr/Rr, Rotor time constant; depending on Rr
% Constants
Kr = p(1)/Tr;
Kt = 1/(Tr*2*pi*p(4));
K = p(1)*p(4);
% Name the variables
ime = h(1);
theta_old = h(2);
ime = ime + Kr*(ide-ime);
w_slip = Kt*iqe/ime;
we = wr + w_slip;
theta_e = theta_old + K*we;
if theta_e > 1
theta_e = theta_e - 1;
elseif theta_e < 0
theta_e = 1 + theta_e;
end
% Update history
h = [ime; theta_e];
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -