交流感应电动机控制方法.doc_第1页
交流感应电动机控制方法.doc_第2页
交流感应电动机控制方法.doc_第3页
交流感应电动机控制方法.doc_第4页
交流感应电动机控制方法.doc_第5页
已阅读5页,还剩18页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

第9章 交流感应电动机控制方法例1、基于无速度传感器的感应电动机控制仿真感应电动机无速度传感器直接磁场定向控制仿真框图感应电动机无速度传感器直接磁场定向控制仿真% 相关模块:% 1. aci.m- 感应电动机模型% 2. aci_se.m - 开环速度估计器% 3. aci_fe.m - 磁通估计器% 4. pid_reg3.m - PID控制器% 5. park.m - PARK变换% 9. inv_park.m - PARK逆变换% 7. ramp_gen.m - 谐波生成器 T = 5e-04; % 仿真模型的采样时间(秒) * 仿真方式选择 *phase1_inc_build = 0; % 磁通/速度估计测试(ACI_FE/ACI_SE)phase2_inc_build = 1; % 闭环调速测试* 仿真方式选择 * * 电动机参数 *Rs = 1.723; % 定子阻抗(ohm) Rr = 2.011; % 转子阻抗(ohm)Ls = (7.387+159.232)*1e-03; % 定子电感(H)Lr = (9.732+159.232)*1e-03; % 转子电感(H)Lm = 159.232*1e-03; % 励磁电感(H)P = 4; % 磁极数J = 0.001; % 转子转动惯量(kg.m2)B = 0.0001; % 阻尼系数(N.m.sec/rad)Tl = 0; % 负载扭矩(N.m)np = P/2; % 磁极对数* 电动机参数 * * 系统参数 *fb = 60; % 供电频率(Hz)Wb = 2*pi*fb; % 电角速度(rad/sec)Ib = 5; % 相电流(amp)Vb = 320/sqrt(3); % 相电压(volt)%Lb = 220*sqrt(2/3)/(2*pi*60); % 磁链 (volt.sec/rad)Lb = Lm*Ib; % 磁链 (volt.sec/rad)Tb = (3*Vb*Ib/2)*(np/(2*pi*60); % 扭矩(N.m)SPb = 120*fb/P; % 同步速度(rpm) * 系统参数 * * 参数初始化 *% 感应电动机X = 0;0;0;0; % X = psi_rq; psi_rd; i_sq; i_sd Wr = 0; % 转子电角速度(rad/sec)Iq = 0;Id = 0;% 感应电动机的矢量参数p_im = T; Rs; Rr; Ls; Lr; Lm; np; J; B; Tl/Tb; Wb; Ib; Vb; Lb; Tb; % 磁通估计器h_fe = 0; 0; 0; 0; 0; 0; 0; 0; % theta_psi_r; psi_rD_i; psi_sd_v; % psi_sq_v; ui_sd; ui_sq; e_sd; e_sqtheta_psi_r = 0; % 转子励磁角度 (pu)p_fe = T; Rs; Rr; Ls; Lr; Lm; 0.055; 1e-06; Ib; Vb; % T; Rs; Rr; Ls; Lr; Lm; Kp; Ti; Ib; Vb % 开环速度估计器h_se = 0;0; % theta_r_se; wr_psi_rp_se = T; Rr; Lr; Lm; 200; 0.97; 0.03; fb; % T; Rr; Lr; Lm; fc; diff_max_limit; diff_min_limit; fbwr_hat_se = 0; % PID - IQ 控制器h_iq = 0;0;0; % h_pid = up_reg3; ui_reg3; ud_reg3 p_iq = T; 2*Ib/Vb; 0.001; 0.0001; 0.1; 0.71; -0.71; % T; Kp; Ti; Td; Kc; Umax; Umin; % PID - ID 控制器h_id = 0;0;0; % h_pid = up_reg3; ui_reg3; ud_reg3 p_id = T; 2*Ib/Vb; 0.001; 0.0001; 0.1; 0.71; -0.71; % T; Kp; Ti; Td; Kc; Umax; Umin; % PID 速度控制h_sp = 0;0;0; % h_pid = up_reg3; ui_reg3; ud_reg3 p_sp = T; 0.00334*SPb/Ib; 0.01; 0.0001; 0.9; 1; -1; % T; Kp; Ti; Td; Kc; Umax; Umin; * 参数初始化 * * 仿真输入参数 *Tt = 0.5120; % 仿真时间(sec) %Tt = 29*T; % 仿真时间 (sec) t = 0:T:Tt; % 仿真时间设置 (sec) speed_ref = 900/SPb; % 参考速度 (pu)Id_ref = 2/Ib; % 旋转坐标同步参考d轴电流(pu) Iq_ref = 0/Ib; % 旋转坐标同步参考q轴电流(pu) * 仿真输入参数 * * 仿真程序 *for i = 1:length(t), if phase1_inc_build=1 % Phase 1 incremental build rmp_out = ramp_gen(2*pi/(2*pi),0,speed_ref*fb,t(i); Uq_ref,Y,h_iq = pid_reg3(Iq_ref,Iq,h_iq,p_iq); Ud_ref,Y,h_id = pid_reg3(Id_ref,Id,h_id,p_id); uq_ref,ud_ref = inv_park(Uq_ref,Ud_ref,rmp_out); Te,Wr,X = aci(Wr,X,uq_ref; ud_ref,p_im); Iq,Id = park(X(3),X(4),rmp_out); psi_rq,psi_rd,theta_psi_r,h_fe = aci_fe(X(3),X(4),uq_ref,ud_ref,h_fe,p_fe); wr_hat_se,h_se = aci_se(X(3),X(4),psi_rq,psi_rd,theta_psi_r,h_se,p_se); rmp(i) = rmp_out; elseif phase2_inc_build=1 % Phase 2 incremental build %Iq_ref,Y,h_sp = pid_reg3(speed_ref,Wr,h_sp,p_sp); % 带速度传感器 Iq_ref,Y,h_sp = pid_reg3(speed_ref,wr_hat_se,h_sp,p_sp); % 无速度传感器 Uq_ref,Y,h_iq = pid_reg3(Iq_ref,Iq,h_iq,p_iq); Ud_ref,Y,h_id = pid_reg3(Id_ref,Id,h_id,p_id); uq_ref,ud_ref = inv_park(Uq_ref,Ud_ref,theta_psi_r); Te,Wr,X = aci(Wr,X,uq_ref; ud_ref,p_im); psi_rq,psi_rd,theta_psi_r,h_fe = aci_fe(X(3),X(4),uq_ref,ud_ref,h_fe,p_fe); wr_hat_se,h_se = aci_se(X(3),X(4),psi_rq,psi_rd,theta_psi_r,h_se,p_se); Iq,Id = park(X(3),X(4),theta_psi_r); end i_qe(i) = Iq; i_de(i) = Id; v_qe(i) = Uq_ref; v_de(i) = Ud_ref; ibeta(i) = X(3); ialfa(i) = X(4); vbeta(i) = uq_ref; valfa(i) = ud_ref; psi_r_beta(i) = X(1); psi_r_alfa(i) = X(2); psi_r_beta_hat(i) = psi_rq; psi_r_alfa_hat(i) = psi_rd; theta_r(i) = theta_psi_r; torque(i) = Te; wr(i) = Wr; wr_hat(i) = wr_hat_se; t(i) end * 仿真程序结束 * 仿真子程序 * 感应电动机模型 *function Te,Wr,X = aci(Wr0,X0,U,p)% 该函数仿真定子参考坐标系下感应电动机的动态相应% 输入参数: % Wr0 = 转子电角速度 (rad/sec)% X0 = psi_rq; psi_rd; i_sq; i_sd % U = v_sq; v_sd = 定子相电压 (volt)% p = T; Rs; Rr; Ls; Lr; Lm; np; J; B; Tl; Wb; Ib; Vb; Lb; Tb% 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15% 输出参数:% Te = 电磁转矩 (N.m)% Wr= 转子电角速度 (rad/sec)% X = psi_rq; psi_rd; i_sq; i_sd % 其中 % psi_rq = 静止参考坐标q-轴转子磁链(flux linkage volt.sec/rad)% psi_rd = 静止参考坐标d-轴转子磁链(flux linkage volt.sec/rad)% i_sq = 静止参考坐标q-轴定子电流(amp)% i_sd = 静止参考坐标d-轴定子电流(amp)% v_sq = 静止参考坐标q-轴定子电压(volt)% v_sd = 静止参考坐标d-轴定子电压(volt)% T = 采样周期(sec)% Rs = 定子阻抗 (ohm)% Rr = 转子阻抗(ohm)% Ls = 定子自感(H)% Lr = 转子自感(H)% Lm = 励磁电感 (H)% np = 磁极对数% J = 转子转动惯量(kg.m2)% B = 阻尼系数 (N.m.sec/rad) - always ignored% Tl = 负载转矩 (N.m)% Wb = 电磁角速度 (rad/sec)% Ib = 相电流 (amp)% Vb = 相电压 (volt)% Lb = 磁链系数 (volt.sec/rad)% Tb = 转矩 (N.m) % 根据电动机参数定义的常数sig = 1-p(6)2/(p(4)*p(5); % sig = 1-Lm2/(Ls*Lr)gam = (p(6)2*p(3)+p(5)2*p(2)/(sig*p(4)*p(5)2);% gam = (Lm2*Rr+Lr2*Rs)/(sig*Ls*Lr2) alp = p(3)/p(5); % alp = Rr/Lr (depending on Rr)Tr = p(5)/p(3); % Tr = Lr/Rr, 转子时间常数bet = p(6)/(sig*p(4)*p(5); % bet = Lm/(sig*Ls*Lr) % 常数定义K1 = p(1)*alp;K2 = p(1)*p(11);K3 = p(1)*alp*p(6)*p(12)/p(14);K4 = p(1)*alp*bet*p(14)/p(12);K5 = p(1)*bet*p(14)*p(11)/p(12);K6 = p(1)*gam;K7 = p(1)*(1/(sig*p(4)*(p(13)/p(12);K8 = 1.5*p(7)*(p(6)/p(5)*(p(14)*p(12)/p(15);K9 = p(1)*p(9)/p(8);K10 = p(1)*p(7)*(1/p(8)*(p(15)/p(11); %转子磁通/定子电流计算/alpha = 0.01; % 变量定义psi_r_beta = X0(1);psi_r_alfa = X0(2);ibeta = X0(3);ialfa = X0(4);ubeta = U(1);ualfa = U(2);wr = Wr0;load_torque = p(10); % Predictorpsi_r_beta_p = psi_r_beta - K1*psi_r_beta + K2*wr*psi_r_alfa + K3*ibeta; psi_r_alfa_p = psi_r_alfa - K1*psi_r_alfa - K2*wr*psi_r_beta + K3*ialfa;ibeta_p = ibeta + K4*psi_r_beta - K5*wr*psi_r_alfa - K6*ibeta + K7*ubeta; ialfa_p = ialfa + K4*psi_r_alfa + K5*wr*psi_r_beta - K6*ialfa + K7*ualfa; % Correctordpsi_r_beta_p = - K1*psi_r_beta_p + K2*wr*psi_r_alfa_p + K3*ibeta_p; dpsi_r_alfa_p = - K1*psi_r_alfa_p - K2*wr*psi_r_beta_p + K3*ialfa_p;dibeta_p = K4*psi_r_beta_p - K5*wr*psi_r_alfa_p - K6*ibeta_p + K7*ubeta; dialfa_p = K4*psi_r_alfa_p + K5*wr*psi_r_beta_p - K6*ialfa_p + K7*ualfa; %dpsi_r_beta = - K1*psi_r_beta + K2*wr*psi_r_alfa + K3*ibeta; %dpsi_r_alfa = - K1*psi_r_alfa - K2*wr*psi_r_beta + K3*ialfa;%dibeta = K4*psi_r_beta - K5*wr*psi_r_alfa - K6*ibeta + K7*ubeta; %dialfa = K4*psi_r_alfa + K5*wr*psi_r_beta - K6*ialfa + K7*ualfa; dpsi_r_beta = psi_r_beta_p - psi_r_beta; dpsi_r_alfa = psi_r_alfa_p - psi_r_alfa; dibeta = ibeta_p - ibeta; dialfa = ialfa_p - ialfa; psi_r_beta = psi_r_beta + 0.5*(1+alpha)*dpsi_r_beta_p + (1-alpha)*dpsi_r_beta);psi_r_alfa = psi_r_alfa + 0.5*(1+alpha)*dpsi_r_alfa_p + (1-alpha)*dpsi_r_alfa); ibeta = ibeta + 0.5*(1+alpha)*dibeta_p + (1-alpha)*dibeta);ialfa = ialfa + 0.5*(1+alpha)*dialfa_p + (1-alpha)*dialfa); % 电磁转据计算torque = K8*(psi_r_alfa*ibeta - psi_r_beta*ialfa); % 转子速度计算 */ wr_p = wr - K9*wr + K10*(torque - load_torque); dwr_p = - K9*wr_p + K10*(torque - load_torque);%dwr = - K9*wr + K10*(torque - load_torque);dwr = wr_p - wr; wr = wr + 0.5*(1+alpha)*dwr_p + (1-alpha)*dwr); %返回结果X(1) = psi_r_beta;X(2) = psi_r_alfa;X(3) = ibeta;X(4) = ialfa;Wr = wr;Te = torque; * 磁通估计函数 *function psi_rq,psi_rd,theta_psi_r,h_out = aci_fe(i_sq,i_sd,u_sq,u_sd,h_in,p)% 该函数估计感应电动机的转子磁通和角度% 输入: % i_sq= 静止参考坐标q-轴定子电流(amp)% i_sd = 静止参考坐标d-轴定子电流(amp)% u_sq = 静止参考坐标q-轴定子电压(volt)% u_sd = 静止参考坐标d-轴定子电压(volt)% h_in = theta_psi_r_prev; psi_rD_i_prev; psi_sd_v_prev; psi_sq_v_prev;% ui_sd_prev; ui_sq_prev; e_sd_prev; e_sq_prev% p = T; Rs; Rr; Ls; Lr; Lm; Kp; Ti; Ib; Vb% 输出:% psi_rq = 静止参考坐标q-轴转子磁链(flux linkage volt.sec/rad)% psi_rd = 静止参考坐标d-轴转子磁链(flux linkage volt.sec/rad)% theta_psi_r = 同步转子磁通角0-2*pi (rad)% h_out = theta_psi_r_curr; psi_rD_i_curr; psi_sd_v_curr; psi_sq_v_curr;% ui_sd_curr; ui_sq_curr; e_sd_curr; e_sq_curr% 其中: % T = 采样周期(sec)% Rs = 定子阻抗 (ohm)% Rr = 转子阻抗(ohm)% Ls = 定子自感(H)% Lr = 转子自感(H)% Lm = 励磁电感 (H)% Kp = 比例增益% Ti = 积分时间和复位事件(sec)% theta_psi_r_prev,theta_psi_r_curr = 以前和现在转子磁通角(rad)% psi_rD_i_prev,psi_rD_i_curr = 以前和现在转子磁通 (volt.sec)% psi_sd_v_prev,psi_sd_v_curr= 以前和现在定子磁通 (volt.sec)% psi_sq_v_prev,psi_sq_v_curr = 以前和现在转子磁通 (volt.sec)% ui_sd_prev,ui_sd_curr = 以前和现在积分电压 (volt)% ui_sq_prev,ui_sq_curr = 以前和现在积分电压 (volt)% e_sd_prev,e_sd_curr = 以前和现在反电动势emf (volt)% e_sq_prev,e_sq_curr = 以前和现在反电动势emf (volt) % 根据电动机参数定义常数Tr = p(5)/p(3); % Tr = Lr/Rr % 常数定义K1_fe = Tr/(Tr+p(1); K2_fe = p(1)/(Tr+p(1); K3_fe = p(6)/p(5);K4_fe = (p(4)*p(5)-p(6)*p(6)/(p(5)*p(6); K5_fe = p(9)*p(2)/p(10); K6_fe = p(10)*p(1)/(p(6)*p(9); K7_fe = p(5)/p(6); K8_fe = (p(4)*p(5)-p(6)*p(6)/(p(6)*p(6); % 变量定义i_qs_fe = i_sq;i_ds_fe = i_sd;u_qs_fe = u_sq;u_ds_fe = u_sd;theta_r_fe = h_in(1);flx_dr_e = h_in(2);psi_ds_fe = h_in(3);psi_qs_fe = h_in(4);ui_ds = h_in(5);ui_qs = h_in(6);emf_ds = h_in(7);emf_qs = h_in(8); Kp_fe = p(7);Ki_fe = p(8)/p(1); % 根据检测的定子电流进行Park变换 theta_e = 2*pi*theta_r_fe; i_ds_e = i_qs_fe*sin(theta_e)+i_ds_fe*cos(theta_e); % 估计模型 flx_dr_e = K1_fe*flx_dr_e - K2_fe*i_ds_e; % 逆Park变换 flx_dr_s = flx_dr_e*cos(theta_e); flx_qr_s = flx_dr_e*sin(theta_e); % 根据当前建立的模型计算钉子磁通 flx_ds_s = K3_fe*flx_dr_s + K4_fe*i_ds_fe; flx_qs_s = K3_fe*flx_qr_s + K4_fe*i_qs_fe; % 转换 PI 控制器 error = psi_ds_fe - flx_ds_s; ucomp_ds = Kp_fe*error + ui_ds; ui_ds = Kp_fe*Ki_fe*error + ui_ds; error = psi_qs_fe - flx_qs_s; ucomp_qs = Kp_fe*error + ui_qs; ui_qs = Kp_fe*Ki_fe*error + ui_qs; % 根据定子上的反电动势估计定子磁通 emf_old = emf_ds; emf_ds = u_ds_fe - ucomp_ds - K5_fe*i_ds_fe; psi_ds_fe = psi_ds_fe + K6_fe*(0.5)*(emf_ds + emf_old); emf_old = emf_qs; emf_qs = u_qs_fe - ucomp_qs - K5_fe*i_qs_fe; psi_qs_fe = psi_qs_fe + K6_fe*(0.5)*(emf_qs + emf_old); % 根据定子上的反电动势估计转子磁通 psi_dr_fe = K7_fe*psi_ds_fe - K8_fe*i_ds_fe; psi_qr_fe = K7_fe*psi_qs_fe - K8_fe*i_qs_fe; % 计算转子磁通角 theta_r_fe = rem(2*pi+atan2(psi_qr_fe,psi_dr_fe),2*pi)/(2*pi); % 重新命名变量 psi_rd = psi_dr_fe;psi_rq = psi_qr_fe;theta_psi_r = theta_r_fe; % 刷新数据h_out = theta_r_fe; flx_dr_e; psi_ds_fe; psi_qs_fe; ui_ds; ui_qs; emf_ds; emf_qs;* 速度估计函数 *function wr_hat_se,h_out = aci_se(i_sq,i_sd,psi_rq,psi_rd,theta_psi_r,h_in,p)% 利用该函数估计转子速度% 输入: % i_sq = Stationary q-axis stator current (amp)% i_sd= Stationary d-axis stator current (amp)% psi_rq = Stationary q-axis rotor flux linkage (volt.sec/rad)% psi_rd = Stationary d-axis rotor flux linkage (volt.sec/rad)% theta_psi_r = Synchronously rotating rotor flux angle (rad)% h_in = theta_psi_r_prev; We_prev% p = T; Rr; Lr; Lm; fc; diff_max_limit; diff_min_limit; fb% 输出:% wr_hat_se = 估计的转子电角速度 (rad/sec)% h_out = theta_psi_r_curr; We_curr% 其中% T = 采样周期 (sec)% Rr = 转子阻抗 (ohm)% Lr = 转子自感阻抗 (H)% Lm = 励磁电感 (H)% fc = 低通滤波的截至频率 (Hz) % diff_max_limit = 最大差分限度 (%)% diff_min_limit = 最小差分限度 (%)% theta_psi_r_prev,theta_psi_r_curr = 过去和当前的转子磁通角 (rad)% We_prev,We_curr= 过去和当前估计的同步角速度 (rad/sec)% 根据电动机参数计算常数Tr = p(3)/p(2); % Tr = Lr/Rr% 计算低通滤波时间常数tc = 1/(2*pi*p(5); % Tc = 1/(2*pi*fc) (sec) Wb = 2*pi*p(8); % 常数定义K1_se = 1/(Wb*Tr);K2_se = 1/(p(8)*p(1); K3_se = tc/(tc+p(1); K4_se = p(1)/(tc+p(1); % 变量定义i_qs_se = i_sq;i_ds_se = i_sd;psi_qr_se = psi_rq;psi_dr_se = psi_rd;theta_r_se = theta_psi_r;theta_r_old = h_in(1);wr_psi_r = h_in(2); % 谐波计算psi_r_2 = psi_dr_se*psi_dr_se + psi_qr_se*psi_qr_se;w_slip = K1_se*(psi_dr_se*i_qs_se - psi_qr_se*i_ds_se)/psi_r_2; % 同步速度计算 if (theta_r_se p(7) w_syn = K2_se*(theta_r_se-theta_r_old);else w_syn = wr_psi_r;end % 低通滤波器 wr_psi_r = K3_se*wr_psi_r + K4_se*w_syn; theta_r_old = theta_r_se;wr_hat_se = w_syn - w_slip; if (wr_hat_se 1) wr_hat_se = 1;elseif (wr_hat_se 0 % ramp from 0 to 1 如果 freq 0 (for gain=1, offset=0) out = gain*(1/T_ramp)*time_rmp + offset;else % ramp from 1 to 0如果freq pid_out_max) pid_out_reg3 = pid_out_max;elseif (uprsat_reg3 pid_out_min) pid_out_reg3 = pid_out_min; else pid_out_reg3 = uprsat_reg3;end saterr_reg3 = pid_out_reg3 - uprsat_reg3; ui_reg3 = ui_reg3 + Ki_reg3*up_reg3 + Kc_reg3*saterr_reg3; ud_reg3 = Kd_reg3*(up_reg3 - up1_reg3); h_out = up_reg3; ui_reg3; ud_reg3; % 返回计算结果Y = e_reg3; uprsat_reg3; saterr_reg3; up_reg3; ui_reg3; ud_reg3; 例2、无速度传感器的感应电动机控制实现/* =文件名称:ACI3_4.C功能描述:无速度传感器直接磁场定向控制三相交流感应电动机= */#include .dmclibcIQmathincludeIQmathLib

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论