• eddyseven
    了解作者
  • Visual C++
    开发工具
  • 113KB
    文件大小
  • rar
    文件格式
  • 0
    收藏次数
  • 10 积分
    下载积分
  • 63
    下载次数
  • 2014-02-26 13:51
    上传日期
在Matlab/Simulink环境下,把独立的功能模块和S函数相结合,构建了无刷直流 电机系统的仿真模型。系统采用双闭环控制:速度环采用离散PID控制,根据滞环电流跟踪型PWM 逆变器原理实现电流控制。仿真和试验结果与理论分析一致,验证了该方法的合理性和有效性。
wushuadianjitiaosu.rar
  • wushuadianji
  • CONT_MOD.mdl
    13.5KB
  • CONT_CORE.mdl
    40.6KB
  • IC.mdl
    14.9KB
  • inital.mdl
    12.7KB
  • delay.m
    2.2KB
  • cont_modifed.mdl
    39.8KB
  • deg_120_trig.mdl
    12.3KB
  • zerocross.mdl
    21.8KB
  • MYBLDC2.M
    16.1KB
  • changer.mdl
    10.4KB
  • NEW_CONTROLLER.mdl
    83.5KB
  • all_phase.mdl
    32.2KB
  • error_gen.mdl
    7.8KB
  • threshold_single.mdl
    11.2KB
  • all_phase_inv.mdl
    13.1KB
  • CONTROLLER_MOD.mdl
    35.8KB
  • cont_lower.mdl
    40KB
  • ind_trig.mdl
    8.6KB
  • SET3.mdl
    15.8KB
  • SET2.mdl
    15.8KB
  • mybldc_mdl2.mdl
    123.9KB
  • estimate.mdl
    10.9KB
  • SET1.mdl
    15.7KB
  • calc_core.m
    12.2KB
内容介绍
function [sys,x0,str,ts] = bldc(t,x,u,flag,N,R,L,M,BM,Rl,Rr,DF,J,P,F0,Fs) % BLDC An example M-file S-function for defining a system of % The expected input vector is: % (1): I_U: The U phase instantaneous current %(2): I_V: The V phase instantaneous current %(3): I_W:The W phase instantaneous current %(4): wn: The current angular velocity %(5): Theta: The current angle (INTEGRAL OF wn) %OUTPUT VECTOR GENERATED BY THE SYSTEM: %(1): EMF_u %(2): EMF_v %(3): EMF_w %(4): Torque Phase U %(5): Torque Phase V %(6): Torque Phase W %(7): Friction generated %(8): angular position of rotor (Normalised by 2*pi) % Dispatch the flag. switch flag, case 0, [sys,x0,str,ts]=mdlInitializeSizes(N,R,L,M,BM,Rl,Rr,DF,J,P,F0,Fs); % Initialization case 1, sys = mdlDerivatives(t,x,u,N,R,L,M,BM,Rl,Rr,DF,J,P,F0,Fs); % Calculate derivatives case 2, %model update sys = mdlUpdate(t,x,u,N,R,L,M,BM,Rl,Rr,DF,J,P,F0,Fs); % update the model case 3, sys = mdlOutputs(t,x,u,N,R,L,M,BM,Rl,Rr,DF,J,P,F0,Fs); % Calculate outputs case 4, % Unused flags sys = []; case 'reset' name = 'mybldc_mdl2/mybldc/my state-space'; LocalResetController(name); case 9, sys=mdlTerminate(t,x,u); %%%%%%%%%%%%%%%%%%%% % Unexpected flags % %%%%%%%%%%%%%%%%%%%% otherwise error(['Unhandled flag = ',num2str(flag)]); end % End of csfunc. %============================================================== % mdlInitializeSizes % Return the sizes, initial conditions, and sample times for the % S-function. %============================================================== % function [sys,x0,str,ts] = mdlInitializeSizes(N,R,L,M,BM,Rl,Rr,DF,J,P,F0,Fs) % % Call simsizes for a sizes structure, fill it in and convert it % to a sizes array. % sizes = simsizes; sizes.NumContStates = 0; sizes.NumDiscStates = 0; sizes.NumOutputs = 8; sizes.NumInputs = 5; sizes.DirFeedthrough = 8; % Matrix D is nonempty. sizes.NumSampleTimes = 1; sys = simsizes(sizes); % % Initialize the initial conditions. % x0 = []; % % str is an empty matrix. % str = []; % % Initialize the array of sample times; in this example the sample % time is continuous, so set ts to 0 and its offset to 0. % ts = [0 0]; % End of mdlInitializeSizes. % %============================================================== % mdlDerivatives % Return the derivatives for the continuous states. % Nothing needs to be done here. %============================================================== function sys = mdlDerivatives(t,x,u,N,R,L,M,BM,Rl,Rr,DF,J,P,F0,Fs) sys=[]; %============================================================== % mdlUpdate % Update the model parameters. % Nothing needs to be done here %============================================================== function sys = mdlUpdate(t,x,u,N,R,L,M,BM,Rl,Rr,DF,J,P,F0,Fs); % update the model sys=[]; %============================================================== % mdlOutput % calculate the model outputs and update other blocks ( Adaptive coefficients) %============================================================== function sys = mdlOutputs(t,x,u,N,R,L,M,BM,Rl,Rr,DF,J,P,F0,Fs) theta = rem (u(5),2*pi); % make theta betweeen 2*pi and -2*pi sys(8)=theta; %output normalised angular position if (theta>=0 & theta<pi/6) LA= 6*theta/pi; LB=-1; LC=1; sys(1)= LA*N*BM*Rl*Rr*u(4); % Back emf for phase U sys(2)=LB*N*BM*Rl*Rr*u(4); %Back emf for phase V sys(3)=LC*N*BM*Rl*Rr*u(4); %Back emf for phase W sys(4)=BM*Rl*Rr*N*LA*u(1); % Phase Torque U sys(5)=BM*Rl*Rr*N*LB*u(2); %Phase Torque V sys(6)=BM*Rl*Rr*N*LC*u(3); %Phase Torque W end; if (theta>=pi/6 & theta<pi/3) LA=1; LB=-1; LC=-6*(theta-(2*pi/6))/pi; sys(1)= LA*N*BM*Rl*Rr*u(4); % Back emf for phase U sys(2)=LB*N*BM*Rl*Rr*u(4); %Back emf for phase V sys(3)=LC*N*BM*Rl*Rr*u(4); %Back emf for phase W sys(4)=BM*Rl*Rr*N*LA*u(1); % Phase Torque U sys(5)=BM*Rl*Rr*N*LB*u(2); %Phase Torque V sys(6)=BM*Rl*Rr*N*LC*u(3); %Phase Torque W end; if (theta>=pi/3 & theta<pi/2) LA=1; LB=-1; LC=-6*(theta-(2*pi/6))/pi; sys(1)= LA*N*BM*Rl*Rr*u(4); % Back emf for phase U sys(2)=LB*N*BM*Rl*Rr*u(4); %Back emf for phase V sys(3)=LC*N*BM*Rl*Rr*u(4); %Back emf for phase W sys(4)=BM*Rl*Rr*N*LA*u(1); % Phase Torque U sys(5)=BM*Rl*Rr*N*LB*u(2); %Phase Torque V sys(6)=BM*Rl*Rr*N*LC*u(3); %Phase Torque W end; if (theta>=pi/2 & theta<2*pi/3) LA=1; LB=( theta-(4*pi/6) )*6/pi; LC=-1; sys(1)= LA*N*BM*Rl*Rr*u(4); % Back emf for phase U sys(2)=LB*N*BM*Rl*Rr*u(4); %Back emf for phase V sys(3)=LC*N*BM*Rl*Rr*u(4); %Back emf for phase W sys(4)=BM*Rl*Rr*N*LA*u(1); % Phase Torque U sys(5)=BM*Rl*Rr*N*LB*u(2); %Phase Torque V sys(6)=BM*Rl*Rr*N*LC*u(3); %Phase Torque W end; if(theta>=2*pi/3 & theta<5*pi/6) LA=1; LB=( theta-(2*pi/3) )*6/pi; LC=-1; sys(1)= LA*N*BM*Rl*Rr*u(4); % Back emf for phase U sys(2)=LB*N*BM*Rl*Rr*u(4); %Back emf for phase V sys(3)=LC*N*BM*Rl*Rr*u(4); %Back emf for phase W sys(4)=BM*Rl*Rr*N*LA*u(1); % Phase Torque U sys(5)=BM*Rl*Rr*N*LB*u(2); %Phase Torque V sys(6)=BM*Rl*Rr*N*LC*u(3); %Phase Torque W end; if (theta>=5*pi/6 & theta<pi) LA=(pi-theta)*6/pi; LB=1; LC=-1; sys(1)= LA*N*BM*Rl*Rr*u(4); % Back emf for phase U sys(2)=LB*N*BM*Rl*Rr*u(4); %Back emf for phase V sys(3)=LC*N*BM*Rl*Rr*u(4); %Back emf for phase W sys(4)=BM*Rl*Rr*N*LA*u(1); % Phase Torque U sys(5)=BM*Rl*Rr*N*LB*u(2); %Phase Torque V sys(6)=BM*Rl*Rr*N*LC*u(3); %Phase Torque W end; if(theta>=pi & theta<7*pi/6) LA=(pi-theta)*6/pi; LB=1; LC=-1; sys(1)= LA*N*BM*Rl*Rr*u(4); % Back emf for phase U sys(2)=LB*N*BM*Rl*Rr*u(4); %Back emf for phase V sys(3)=LC*N*BM*Rl*Rr*u(4); %Back emf for phase W sys(4)=BM*Rl*Rr*N*LA*u(1); % Phase Torque U sys(5)=BM*Rl*Rr*N*LB*u(2); %Phase Torque V sys(6)=BM*Rl*Rr*N*LC*u(3); %Phase Torque W end; if(theta>=7*pi/6 & theta<4*pi/3) LA= -1; LB=1; LC=( theta-(4*pi/3))*6/pi; sys(1)= LA*N*BM*Rl*Rr*u(4); % Back emf for phase U sys(2)=LB*N*BM*Rl*Rr*u(4); %Back emf for phase V sys(3)=LC*N*BM*Rl*Rr*u(4); %Back emf for phase W sys(4)=BM*Rl*Rr*N*LA*u(1); % Phase Torque U sys(5)=BM*Rl*Rr*N*LB*u(2); %Phase Torque V sys(6)=BM*Rl*Rr*N*LC*u(3); %Phase Torque W end; if (theta>=4*pi/3 & theta<3*pi/2) LA= -1; LB=1; LC=( theta -(4*pi/3))*6/pi; sys(1)= LA*N*BM*Rl*Rr*u(4); % Back emf for phase U sys(2)=LB*N*BM*Rl*Rr*u(4); %Back emf for phase V sys(3)=LC*N*BM*Rl*Rr*u(4); %Back emf for phase W sys(4)=BM*Rl*Rr*N*LA*u(1); % Phase Torque U sys(5)=BM*Rl*Rr*N*LB*u(2); %Phase Torque V sys(6)=BM*Rl*Rr*N*LC*u(3); %Phase Torque W end; if(theta>=3*pi/2 & theta<5*pi/3) LA= -1; LB=((5*pi/3)-theta)*6/pi; LC=1; sys(1)= LA*N*BM*Rl*Rr*u(4); % Back emf for phase U sys(2)=LB*N*BM*Rl*Rr*u(4); %Back emf for phase V sys(3)=LC*N*BM*Rl*Rr*u(4); %Back emf for phase W sys(4)=BM*Rl*Rr*N*LA*u(1); % Phase Torque U sys(5)=BM*Rl*Rr*N*LB*u(2); %Phase Torque V sys(6)=BM*Rl*Rr*N*LC*u(3); %Phase Torque W end; if(theta>=5*pi/3 & theta<11*pi/6) LA= -1; LB=((5*
评论
    相关推荐
    • BLDC_three_pwm_on.zip
      直流无刷电机 转速、电流双闭环控制simulink模型,做的还是比较好,希望对大家有帮助
    • Brushless_DC_Motor_Control_System_and_Implementati
      简单介绍了无刷直流电动机的工作原理,分析并确定了主回路的导通方式,控制器一是以专用芯片MC33035来进行设计,位置反馈元件有霍尔传感器反馈接口和编码器接口,开关器件采用MOSFET管,设计有转速反馈闭环控制、正...
    • Matlabmodel.rar
      快速性和有效性 模型采用分段线性法生成梯形波反电动势 系统采用双闭环控制 速度环采用 PI 控制 电流环采用滞环电流控制 仿真结果证明了该方法的有效性 同时也适用于验证其他控制算法的合理性 为实际电机控制系统的...
    • TI_Motor_Director.rar
      TI提供了一系列的模拟产品,数字控制器和软件来精确控制机械传动装置的位置,数率和转矩。...同时也介绍了比较大的传动装置,像交流开环(变频器)和闭环(伺服)系统使 用非常高的电压,典型值为几百伏。
    • Brushless-DC-Motor-Speed-Control.zip
      无刷直流电机速度闭环仿真;仿真文件
    • 有感双...HVPM_28335_Motor_PMSM_48V200W_190529.zip
      PMSM电机闭环例程 eg2开头命名; eg2集成了开环、有感(带编码器)双闭环、无感双闭环
    • brushless-front-feedback.rar
      恒功率无刷电机前馈控制算法matlab simulink 仿真
    • 基于DSP的无刷直流电机驱动设计
      基于DSP的无刷直流电机驱动设计
    • SimpleFOC .zip
      SimpleFOC 1.3.2制造资料对应DIY不足百元的无刷电机闭环驱动教程
    • matlabcnhelp.rar
      matlab中文帮助很难找的,快速下载