资源简介
学习BLDC电机MatlabSimulink建模分享学习资料-BLDC.rar
这段时间在学习BLDC电机控制系统的建模。从网上找资料,再研究代码,花了1个月时间搞定一个系统模型(几个印度大学生的设计,在Mathworks上找的),继续分享学习资料。希望对大家有帮助。
关于基础部分,可以参考我之前的“Simulink 连续系统,Simulink入门,讲解分析详细详细”,呵呵。
这段时间在学习BLDC电机控制系统的建模。从网上找资料,再研究代码,花了1个月时间搞定一个系统模型(几个印度大学生的设计,在Mathworks上找的),继续分享学习资料。希望对大家有帮助。
关于基础部分,可以参考我之前的“Simulink 连续系统,Simulink入门,讲解分析详细详细”,呵呵。
代码片段和文件信息
%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\BLDC simulator\all_phase.mdl
文件 13414 2004-04-09 16:26 BLDC\BLDC simulator\all_phase_inv.mdl
文件 12523 2004-05-25 23:12 BLDC\BLDC simulator\calc_core.m
文件 10669 2004-04-11 01:11 BLDC\BLDC simulator\changer.mdl
文件 36680 2004-05-25 11:24 BLDC\BLDC simulator\CONTROLLER_MOD.mdl
文件 41550 2004-04-13 03:49 BLDC\BLDC simulator\CONT_CORE.mdl
文件 40959 2004-04-14 00:21 BLDC\BLDC simulator\cont_lower.mdl
文件 13795 2004-05-24 09:39 BLDC\BLDC simulator\CONT_MOD.mdl
文件 40743 2004-04-14 00:23 BLDC\BLDC simulator\cont_modifed.mdl
文件 12614 2004-04-11 01:07 BLDC\BLDC simulator\deg_120_trig.mdl
文件 2247 2004-04-11 11:17 BLDC\BLDC simulator\delay.m
文件 7993 2004-04-11 11:37 BLDC\BLDC simulator\error_gen.mdl
文件 11197 2004-05-25 02:39 BLDC\BLDC simulator\estimate.mdl
文件 15245 2004-04-11 14:46 BLDC\BLDC simulator\IC.mdl
文件 8769 2001-04-04 14:23 BLDC\BLDC simulator\ind_trig.mdl
文件 12986 2004-04-10 22:44 BLDC\BLDC simulator\inital.mdl
文件 16489 2001-04-04 16:10 BLDC\BLDC simulator\MYBLDC2.M
文件 126901 2004-05-28 15:23 BLDC\BLDC simulator\mybldc_mdl2.mdl
文件 85547 2004-04-14 01:01 BLDC\BLDC simulator\NEW_CONTROLLER.mdl
文件 16126 2004-05-25 23:50 BLDC\BLDC simulator\SET1.mdl
文件 16147 2004-05-25 23:50 BLDC\BLDC simulator\SET2.mdl
文件 16154 2004-05-25 23:49 BLDC\BLDC simulator\SET3.mdl
文件 11441 2004-05-28 16:07 BLDC\BLDC simulator\threshold_single.mdl
文件 22372 2004-04-08 23:41 BLDC\BLDC simulator\zerocross.mdl
文件 516063 2004-05-28 16:01 BLDC\up_report.pdf
目录 0 2004-05-28 16:11 BLDC\BLDC simulator
目录 0 2008-10-24 14:24 BLDC
----------- --------- ---------- ----- ----
1141592 27
............此处省略0个文件信息
相关资源
- 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
评论
共有 条评论