资源简介
BLDC matlab建模
代码片段和文件信息
%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
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 32968 2004-05-25 15:43 BLDC\simulator\all_phase.mdl
文件 13414 2004-04-09 16:26 BLDC\simulator\all_phase_inv.mdl
文件 12523 2004-05-25 23:12 BLDC\simulator\calc_core.m
文件 10669 2004-04-11 01:11 BLDC\simulator\changer.mdl
文件 36680 2004-05-25 11:24 BLDC\simulator\CONTROLLER_MOD.mdl
文件 41550 2004-04-13 03:49 BLDC\simulator\CONT_CORE.mdl
文件 40959 2004-04-14 00:21 BLDC\simulator\cont_lower.mdl
文件 13795 2004-05-24 09:39 BLDC\simulator\CONT_MOD.mdl
文件 40743 2004-04-14 00:23 BLDC\simulator\cont_modifed.mdl
文件 12614 2004-04-11 01:07 BLDC\simulator\deg_120_trig.mdl
文件 2247 2004-04-11 11:17 BLDC\simulator\delay.m
文件 7993 2004-04-11 11:37 BLDC\simulator\error_gen.mdl
文件 11197 2004-05-25 02:39 BLDC\simulator\estimate.mdl
文件 15245 2004-04-11 14:46 BLDC\simulator\IC.mdl
文件 8769 2001-04-04 14:23 BLDC\simulator\ind_trig.mdl
文件 12986 2004-04-10 22:44 BLDC\simulator\inital.mdl
文件 16489 2001-04-04 16:10 BLDC\simulator\MYBLDC2.M
文件 126901 2004-05-28 15:23 BLDC\simulator\mybldc_mdl2.mdl
文件 232960 2006-04-13 20:51 BLDC\simulator\mybldc_mdl2_sfun.mexw32
文件 85547 2004-04-14 01:01 BLDC\simulator\NEW_CONTROLLER.mdl
文件 11438224 2006-07-14 21:07 BLDC\simulator\result.mat
文件 16126 2004-05-25 23:50 BLDC\simulator\SET1.mdl
文件 16147 2004-05-25 23:50 BLDC\simulator\SET2.mdl
文件 16154 2004-05-25 23:49 BLDC\simulator\SET3.mdl
文件 2904 2006-04-13 20:51 BLDC\simulator\sfprj\build\mybldc_mdl2\sfun\info\binfo.mat
文件 32866 2006-04-13 20:50 BLDC\simulator\sfprj\build\mybldc_mdl2\sfun\src\c1_mybldc_mdl2.c
文件 1415 2006-04-13 20:50 BLDC\simulator\sfprj\build\mybldc_mdl2\sfun\src\c1_mybldc_mdl2.h
文件 26627 2006-04-13 20:51 BLDC\simulator\sfprj\build\mybldc_mdl2\sfun\src\c1_mybldc_mdl2.obj
文件 32864 2006-04-13 20:50 BLDC\simulator\sfprj\build\mybldc_mdl2\sfun\src\c2_mybldc_mdl2.c
文件 1415 2006-04-13 20:50 BLDC\simulator\sfprj\build\mybldc_mdl2\sfun\src\c2_mybldc_mdl2.h
............此处省略30个文件信息
- 上一篇:数字信号频带传输系统的仿真实现
- 下一篇:matlab三维网格化图像源码
相关资源
- Pattern Recognition and Machine Learning(高清
- MATLAB 编程 第二版 Stephen J. Chapman 著
- 均值滤波和FFT频谱分析Matlab代码
- 《MATLAB扩展编程》代码
- HDB3码、AMI码的MATLAB实现
- 3点GPS定位MATLAB仿真
- MATLAB数字信号处理85个实用案例精讲入
- matlab从入门到精通pdf94795
- 欧拉放大论文及matlab代码
- 跳一跳辅助_matlab版本
- 全面详解LTE MATLAB建模、仿真与实现
- MIMO-OFDM无线通信技术及MATLAB实现_孙锴
- MATLAB Programming for Engineers 4th - Chapman
- matlab 各种谱分析对比
- 分数阶chen混沌matlab程序
- 基于粒子群算法的非合作博弈的matl
- MATLAB车流仿真 包括跟驰、延误
- matlab空间桁架计算程序
- 基于MATLAB的图像特征点匹配和筛选
- DMA-TVP-FAVAR
- GPS信号的码捕获matlab代码.7z
- 一维光子晶体MATLAB仿真代码吸收率折
- newmark法源程序
- 传统关联成像、计算鬼成像matlab
- pri传统分选算法
- 摆动滚子推杆盘形凸轮设计
- 医学图像重建作业matlab源码
- Matlab实现混沌系统的控制
- 检测疲劳驾驶
- Matlab锁相环仿真-Phase Locked Loop.rar
评论
共有 条评论