资源简介
正弦型转矩分配函数控制方法在开关磁阻电机中的应用,内涵仿真文件,仿真通过,文件安全 适合深入研究,各位研究开关磁阻电机的童鞋研究者们加油
代码片段和文件信息
function [sysx0strtssimStateCompliance] =sintsf(txuflagtheontheovtheoff)
switch flag
%%%%%%%%%%%%%%%%%%
% Initialization %
%%%%%%%%%%%%%%%%%%
case 0
[sysx0strtssimStateCompliance]=mdlInitializeSizes;
%%%%%%%%%%%%%%%
% Derivatives %
%%%%%%%%%%%%%%%
case 1
sys=mdlDerivatives(txu);
%%%%%%%%%%
% Update %
%%%%%%%%%%
case 2
sys=mdlUpdate(txu);
%%%%%%%%%%%
% Outputs %
%%%%%%%%%%%
case 3
sys=mdlOutputs(txutheontheovtheoff);
%%%%%%%%%%%%%%%%%%%%%%%
% GetTimeOfNextVarHit %
%%%%%%%%%%%%%%%%%%%%%%%
case 4
sys=mdlGetTimeOfNextVarHit(txu);
%%%%%%%%%%%%%
% Terminate %
%%%%%%%%%%%%%
case 9
sys=mdlTerminate(txu);
%%%%%%%%%%%%%%%%%%%%
% Unexpected flags %
%%%%%%%%%%%%%%%%%%%%
otherwise
DAStudio.error(‘Simulink:blocks:unhandledFlag‘ num2str(flag));
end
% end sfuntmpl
%
%=============================================================================
% mdlInitializeSizes
% Return the sizes initial conditions and sample times for the S-function.
%=============================================================================
%
function [sysx0strtssimStateCompliance]=mdlInitializeSizes
%
% 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 = 1;
sizes.NumInputs = 1;
sizes.DirFeedthrough = 1;
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 array of sample times
%
ts = [0 0];
% Specify the block simStateCompliance. The allowed values are:
% ‘UnknownSimState‘ < The default setting; warn and assume DefaultSimState
% ‘DefaultSimState‘ < Same sim state as a built-in block
% ‘HasNoSimState‘ < No sim state
% ‘DisallowSimState‘ < Error out when saving or restoring the model sim state
simStateCompliance = ‘UnknownSimState‘;
% end mdlInitializeSizes
%
%=============================================================================
% mdlDerivatives
% Return the derivatives for the continuous states.
%=============================================================================
%
function sys=mdlDerivatives(txu)
sys = [];
% end mdlDerivatives
%
%=============================================================================
% mdlUpdate
% Handle discrete state updates sample time hits and major time step
% requirements.
%=============================================================================
%
function sys=mdlUpdate(txu)
sys = [];
%
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 4562 2013-08-05 10:09 sintsf.m
文件 125668 2013-11-10 23:14 TSFsin.mdl
----------- --------- ---------- ----- ----
130230 2
- 上一篇:微信小程序ExpandableListView分组
- 下一篇:内点法的机组组合程序
评论
共有 条评论