资源简介
内部有4个模型,都是无刷直流电机的,有电机模型,还有直接用数学模型搭建的smulink电机模型
代码片段和文件信息
%this is an S function that calculates the current profile that is required
%
function [sysx0strts] = control1(txuflagJDFNBMRrRldeltaKPKIKDbasecurr)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% THE INPUTS EXPECTED ARE:
%(1): wn: THE VALUE OF ROTOR ELECTRICAL SPEED
%(2): THETA: THE VALUE OF ROTOR ELECTRICAL ANGLE(NORMALISED TO 2*PI)
%(3): wreq: THE DESIRED ROTOR ELECTRICAL SPEED
%(4): ERR_1: THE VALUE OF THE ERROR AT THE PREVIOUS TIME STEP
% THE OUTPUTS ARE:
%(1): IUstar: THE COMMAND PHASE U CURRENT
%(2): IVstar: THE COMMAND PHASE V CURRENT
%(3): IWstar: THE COMMAND PHASE W CURRENT
%(4): err: THE VALUE OF THE ERROR AT CURRENT TIME STEP
%(5): Treq: THE REQUIRED VALUE OF TORQUE TO FULFIL THE SPEED
%COMMAND
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Copyright 2003-2004 Devendra RaiNITK.
% $Revision: xx
%
% The following outlines the general structure of an S-function.
%
switch flag
%%%%%%%%%%%%%%%%%%
% Initialization %
%%%%%%%%%%%%%%%%%%
case 0
[sysx0strts]=mdlInitializeSizes(JDFNBMRrRldeltaKPKIKDbasecurr);
%%%%%%%%%%%%%%%
% Derivatives %
%%%%%%%%%%%%%%%
case 1
sys=mdlDerivatives(txuJDFNBMRrRldeltaKPKIKDbasecurr);
%%%%%%%%%%
% Update %
%%%%%%%%%%
case 2
sys=mdlUpdate(txu);
%%%%%%%%%%%
% Outputs %
%%%%%%%%%%%
case 3
sys=mdlOutputs(txuJDFNBMRrRldeltaKPKIKDbasecurr);
%%%%%%%%%%%%%%%%%%%%%%%
% GetTimeOfNextVarHit %
%%%%%%%%%%%%%%%%%%%%%%%
case 4
sys=mdlGetTimeOfNextVarHit(txu);
%%%%%%%%%%%%%
% Terminate %
%%%%%%%%%%%%%
case 9
sys=mdlTerminate(txu);
%%%%%%%%%%%%%%%%%%%%
% Unexpected flags %
%%%%%%%%%%%%%%%%%%%%
otherwise
error([‘Unhandled flag = ‘num2str(flag)]);
end
% end sfuntmpl
%
%=============================================================================
% mdlInitializeSizes
% Return the sizes initial conditions and sample times for the S-function.
%=============================================================================
%
function [sysx0strts]=mdlInitializeSizes(JDFNBMRrRldeltaKPKIKDbasecurr)
%
% call simsizes for a sizes structure fill it in and convert it to a
% sizes array.
%
% Note that in this example the values are hard coded. This is not a
% recommended practice as the characteristics of the block are typically
% defined by the S-function parameters.
%
sizes = simsizes;
sizes.NumContStates = 0;
sizes.NumDiscStates = 0;
sizes.NumOutputs = 5;
sizes.NumInputs = 4;
sizes.DirFeedthrough = 4;
sizes.NumSampleTimes = 1; % at least one sample time is needed
sys = simsizes(sizes);
%
% initialize the initial conditions
%
x0 =[];
%
% str is always an empty matrix
%
str = [];
%
% initialize the ar
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 516063 2004-05-28 16:01 BLDC\up_report.pdf
目录 0 2004-05-28 16:11 BLDC\simulator\
文件 22372 2004-04-08 23:41 BLDC\simulator\zerocross.mdl
文件 11441 2004-05-28 16:07 BLDC\simulator\threshold_single.mdl
文件 16154 2004-05-25 23:49 BLDC\simulator\SET3.mdl
文件 16147 2004-05-25 23:50 BLDC\simulator\SET2.mdl
文件 16126 2004-05-25 23:50 BLDC\simulator\SET1.mdl
文件 85547 2004-04-14 01:01 BLDC\simulator\NEW_CONTROLLER.mdl
文件 126901 2004-05-28 15:23 BLDC\simulator\mybldc_mdl2.mdl
文件 12986 2004-04-10 22:44 BLDC\simulator\inital.mdl
文件 8769 2001-04-04 14:23 BLDC\simulator\ind_trig.mdl
文件 15245 2004-04-11 14:46 BLDC\simulator\IC.mdl
文件 11197 2004-05-25 02:39 BLDC\simulator\estimate.mdl
文件 7993 2004-04-11 11:37 BLDC\simulator\error_gen.mdl
文件 12614 2004-04-11 01:07 BLDC\simulator\deg_120_trig.mdl
文件 36680 2004-05-25 11:24 BLDC\simulator\CONTROLLER_MOD.mdl
文件 40743 2004-04-14 00:23 BLDC\simulator\cont_modifed.mdl
文件 13795 2004-05-24 09:39 BLDC\simulator\CONT_MOD.mdl
文件 40959 2004-04-14 00:21 BLDC\simulator\cont_lower.mdl
文件 41550 2004-04-13 03:49 BLDC\simulator\CONT_CORE.mdl
文件 10669 2004-04-11 01:11 BLDC\simulator\changer.mdl
文件 13414 2004-04-09 16:26 BLDC\simulator\all_phase_inv.mdl
文件 32968 2004-05-25 15:43 BLDC\simulator\all_phase.mdl
文件 16489 2001-04-04 16:10 BLDC\simulator\MYBLDC2.M
文件 2247 2004-04-11 11:17 BLDC\simulator\delay.m
文件 12523 2004-05-25 23:12 BLDC\simulator\calc_core.m
目录 0 2004-05-28 16:10 BLDC\
- 上一篇:电机标定报告.pdf
- 下一篇:blas_win32.lib
评论
共有 条评论