基于 MATLAB6的磁化曲线拟合_第1页
基于 MATLAB6的磁化曲线拟合_第2页
基于 MATLAB6的磁化曲线拟合_第3页
基于 MATLAB6的磁化曲线拟合_第4页
基于 MATLAB6的磁化曲线拟合_第5页
已阅读5页,还剩2页未读 继续免费阅读

下载本文档

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

文档简介

基于MATLAB6.5的磁化曲线拟合一、问题的提出。在进行感应电机磁路计算时,需要根据定转子齿部和轭部磁通密度确定相应的磁场强度。数据手册中磁通密度和磁场强度是以数据表的形式给出的。因此,在确定磁场强度时就有必要进行查询。采用直接查表然后进行带入运算在进行手算程序时对精度要求不是很高的情况下尚可满足要求。但是在进行计算机电机程序设计时,通过查询数表操作来完成运算时却显得很不方便。最关键的是直接查询数表有相当大的局限性。对与哪些没有落在数表内点上的数据,往往要进行局部线性化的近似处理,这就给程序设计带来了一定的麻烦。因此,是否可以通过找到一个与一系列离散数据高度拟合的连续曲线来通过代入任意一个磁通密度值确定磁场强度?二、问题分析。本问题中涉及到的铁磁物质型号为D23,在《电机设计•机械工业出版社》一书附录5中对应有磁通密度和磁场强度数据150组。将这150组数据描点后必有一条曲线与这150组数据高度拟合。考虑到傅里叶级数定义任何周期函数都可以用正弦函数和余弦函数构成的无穷级数来表示,若对一个非周期函数进行周期延拓后便可适用于傅里叶级数分解。由此,可以假设任取一个经周期延拓的非周期函数曲线上的一段,可以表示成正弦函数和余弦函数级数的和的形式。因此,借助于MATLAB6.5,可以选用三角函数sinx,cosx,sin2x,cos2x,„sin(mx),cos(mx)为基底函数,进行最小二乘法拟合。MATLAB6.5中命令x=lsqcurvefit(fun,x0,xdata,ydata)

[x,resnorm]=lsqcurvefit(fun,x0,xdata,ydata)的功能是根据给定的数据(xdata,ydata),按函数文件fun给定的函数,以x0为初值作最小二乘拟合,返回函数fun中的系数向量x和残差的平方和范数resnorm。根据以上分析,函数文件fun中的函数可定义为f=A1sinx+A2cosx+A3sin2x+A4cos2x+A5sin3x+A6cos3x+„三、问题解决。根据以上分析,编写m文件,对磁化曲线进行拟合,源程序如下所示。源程序段1:定义拟合函数文件,保存名为hanshu.mfunctionf=hanshu(a,B)f=a(1);fori=1:1:30f=f+a(2*i+1)*cos(B.*(i))+a(2*i)*sin(B.*(i));end源程序段2:磁化曲线拟合函数,保存名为magnetization_curve_fit.m%%%%%%%%%%%%%%%%%%%%%%%%%%%%中小型三相感应电动机电磁计算程序%%%%%%%%%电机设计作业——磁路计算;%%%%%%姓名:孙鹏学号:08044017班级:08044017;%%%%已知数据:输出功率PN=13KW,电压U1=380V(A-△接法),相数m1=3,频率f=50Hz,极数2p=6,同步转速n1=1000r/min,效率n=0.875,功率因数cos©=0.83;clcclearB=0.40:0.01:1.89;H=[1.38,1.40,1.42,1.44,1.46,1.48,1.50,1.52,1.54,1.56,...1.58,1.60,1.62,1.64,1.66,1.69,1.71,1.74,1.76,1.78,...1.81,1.84,1.86,1.89,1.91,1.94,1.97,2.00,2.03,2.06,...2.10,2.13,2.16,2.20,2.24,2.28,2.30,2.36,2.40,2.45,...2.50,2.55,2.60,2.65,2.70,2.76,2.81,2.87,2.93,2.99,...3.06,3.13,3.19,3.26,3.33,3.41,3.49,3.57,3.65,3.74,...3.92,4.01,4.11,4.22,4.33,4.44,4.56,4.67,4.80,...5.07,5.21,5.36,5.52,5.68,5.84,6.00,6.16,6.33,...6.52,6.72,6.94,7.16,7.38,7.62,7.86,8.10,8.36,8.62,...8.90,9.20,9.50,9.80,10.1,10.5,10.9,11.3,11.7,12.1,...12.6,13.1,13.6,14.2,14.8,15.5,16.3,17.1,18.1,19.1,...20.1,21.2,22.4,23.7,25.0,26.7,28.5,30.4,32.6,35.1,...37.8,40.7,43.7,46.8,50.0,53.4,56.8,60.4,64.0,67.8,...72.0,76.4,80.8,85.4,90.2,95.0,100,105,110,116,...122,128,134,140,146,152,158,165,172,180];a0=zeros(1,61);[a,resnorm]=lsqcurvefit(@hanshu,a0,B,H)y1=a(1);fori=1:1:30y1=y1+a(2*i+1)*cos(B.*(i))+a(2*i)*sin(B.*(i));endplot(B,y1,'r')holdonplot(B,H,'.')运行magnetization_curve_fit.m文件,程序运行结果如下图所示。8I-16L4020In一80604020on-图一拟合磁化曲线附图说明:图中蓝色的散点是已知的150组磁通密度和磁化强度的描点图,红色曲线为用最小二乘法拟合出的函数曲线。由源程序段2可知,拟合函数总共有61项,其中a(1)为常数项,其余为三角函数项。由运行所得图像可见,上述程序进行拟合的程度是很好的,通过增加拟合函数的项还可以进一步提高拟合程度。拟合数据分析见EXCEL工作表“D23磁化曲线拟合数据”现将数据处理结果列表如下。

表电工硅钢薄板(0・5mm)的磁化曲线拟合数据说明:B25=1.54T(D23),B、H为已知磁通密度和磁场强度,I丫为拟合后对应的磁场强度单位:H-A/cmB-TB0.40.410.420.430.440.450.460.470.480.49H1.381.41.421.441.461.481.51.521.541.56H'1.38661.41581.4411.45941.47111.47861.48481.49311.5061.525误差0.48%1.12%1.46%1.33%0.75%0.09%1.02%1.80%2.26%2.30%B0.50.510.520.530.540.550.560.570.580.59H1.581.61.621.641.661.691.711.741.761.78H'1.55051.58151.61621.65251.68771.721.74761.771.78731.8006误差1.90%1.17%0.24%0.76%1.64%1.74%2.15%1.69%1.53%1.14%B0.60.610.620.630.640.650.660.670.680.69H1.811.841.861.891.911.941.9722.032.06H'1.81151.82221.83481.85121.8731.9011.93521.9752.01892.0654误差0.08%0.98%1.37%2.10%1.98%2.05%1.80%1.27%0.55%0.26%B0.70.710.720.730.740.750.760.770.780.79H2.12.132.162.22.242.282.32.362.42.45H'2.11252.15822.20122.24032.27542.30682.33552.36312.39162.4229误差0.59%1.31%1.87%1.80%1.56%1.16%1.52%0.13%0.35%1.12%B0.80.810.820.830.840.850.860.870.880.89H2.52.552.62.652.72.762.812.872.932.99H'2.45882.50092.54992.60612.6692.73742.80992.88442.95913.0322误差1.68%1.96%1.96%1.68%1.16%0.83%0.00%0.50%0.98%1.39%B0.90.910.920.930.940.950.960.970.980.99H3.063.133.193.263.333.413.493.573.653.74H'3.10263.16943.23283.29333.35253.41213.47423.5413.61443.6959误差1.37%1.24%1.32%1.01%0.67%0.06%0.45%0.82%0.98%1.19%B11.011.021.031.041.051.061.071.081.09H3.933.924.014.114.224.334.444.564.674.8H'3.78643.8863.99414.10964.23064.35534.48164.60794.73284.8558误差3.79%0.87%0.40%0.01%0.25%0.58%0.93%1.04%1.33%1.15%B1.11.111.121.131.141.151.161.171.181.19H4.935.075.215.365.525.685.8466.166.33H'4.97725.09795.21985.34525.47665.61675.76795.93216.11016.3024误差0.95%0.55%0.19%0.28%0.79%1.13%1.25%1.14%0.82%0.44%

B1.21.211.221.231.241.251.261.271.281.29H6.526.726.947.167.387.627.868.18.368.62H'6.50816.72586.95347.18837.42817.67067.91448.15898.40478.6535误差0.18%0.09%0.19%0.39%0.65%0.66%0.69%0.72%0.53%0.39%B1.31.311.321.331.341.351.361.371.381.39H8.99.29.59.810.110.510.911.311.712.1H'8.90839.17269.45089.747610.06710.41410.79111.19911.64112.116误差0.09%0.30%0.52%0.54%0.33%0.83%1.01%0.90%0.51%0.13%B1.41.411.421.431.441.451.461.471.481.49H12.613.113.614.214.815.516.317.118.119.1H'12.62413.16313.73414.33714.97415.64716.36517.13417.96718.876误差0.19%0.48%0.98%0.96%1.16%0.94%0.40%0.20%0.74%1.19%B1.51.511.521.531.541.551.561.571.581.59H20.121.222.423.72526.728.530.432.635.1H'19.87620.98322.21323.58225.10326.78828.64630.68232.89935.296误差1.13%1.03%0.84%0.50%0.41%0.33%0.51%0.92%0.91%0.56%B1.61.611.621.631.641.651.661.671.681.69H37.840.743.746.85053.456.860.46467.8H'37.86940.61343.52246.58949.80753.17356.68260.33464.12968.069误差0.18%0.21%0.41%0.45%0.39%0.43%0.21%0.11%0.20%0.40%B1.71.711.721.731.741.751.761.771.781.79H7276.480.885.490.295100105110116H'72.15976.40180.79985.35890.07894.959100105.2110.56116.07误差0.22%0.00%0.00%0.05%0.14%0.04%0.00%0.19%0.51%0.06%B1.81.811.821.83

温馨提示

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

评论

0/150

提交评论