cur_mod.m

来自「异步电机间接磁通量控制」· M 代码 · 共 48 行

M
48
字号
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 + =
减小字号Ctrl + -
显示快捷键?