ImageVerifierCode 换一换
格式:DOCX , 页数:8 ,大小:335.82KB ,
资源ID:963604      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/963604.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(机械优化设计作业_精品文档.docx)为本站会员(b****2)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

机械优化设计作业_精品文档.docx

1、机械优化设计作业在MATLAB下编程如下:在MATLAB下编程如下:先编写M文件,建立目标函数function f=zuoye2(x)f=-x(1)*x(2)*x(3); 主程序如下: x0=1;1;1;A=-1,-2 ,-2;1,2,2;b=0;72;lb=zeros(3,1);x,fval,exitflag,output=fmincon(zuoye2,x0,A,b,lb)Warning: Trust-region-reflective algorithm does not solve this type of problem, using active-setalgorithm. You

2、could also try the interior-point or sqp algorithms: set the Algorithm option tointerior-point or sqp and rerun. For more help, see Choosing the Algorithm in the documentation. In fmincon at 472Local minimum possible. Constraints satisfied.fmincon stopped because the predicted change in the objectiv

3、e functionis less than the default value of the function tolerance and constraints were satisfied to within the default value of the constraint tolerance.Active inequalities (to within options.TolCon = 1e-006): lower upper ineqlin ineqnonlin 2 x = 23.9997 12.0001 12.0001fval = -3.4560e+003exitflag =

4、 5output = iterations: 9 funcCount: 42 lssteplength: 1 stepsize: 3.3708e-004 algorithm: medium-scale: SQP, Quasi-Newton, line-search firstorderopt: 0.0025 constrviolation: 0 message: 1x777 char 由题,先选取设计变量。一、设计变量由于材料已经给定,其质量只是内径d、外径D、跨距L及外伸端a的函数。因此设计变量为X=x1,x2,x2T=l,D,aT (1)二、目标函数依据题意,以主轴自身质量最小为设计目标,

5、即Fx=14x1+x3x22-d2 (2)为材料密度。三、约束条件1)挠度要求y=Fa2(l+a)3EIy0 (3)上式中惯性矩I=(D4-d4)64,E为主轴弹性模量。将I、E代入得:64Fx32(x1+x3)3E(x24-d4)y0 (4)2)强度要求max=MmaxWz (5)Wz=(D4-d4)32D (6)由(5)(6)式可得:32Fx2x3(x24-d4) (7)3)边界约束条件300x1650,60x2110,90x3150 (8)四、将物理模型转化为数学模型minfx=14x1+x3x22-d2 (9)S.t.(10)在MATLAB中先建立目标函数M文件function f=m

6、yfun(x)f=6.16225*(x(1)+x(3)*(x(2)2-900)/1000000;因为约束为非线性,所以同样建立非线性约束M文件function c,ceq=mycon(x)F=15000;y0=0.05;c(1)=9.71*x(3)2*(x(1)+x(3)/(x(2)4-304)-1;c(2)=32*F*x(2)*x(3)/(3.14*(x(2)4-304)*180)-1;ceq=;在MATLAB命令窗口给出初始搜索值和线性约束,并调用优化程序:a=-1/300 0 0 0 -1/60 0 0 1/110 0 0 0 -1/90; 注:相比较式(10)的约束作了一个变形b=-1

7、;-1;1;-1; x0=300;100;100; lb=zeros(3,1);x,fval,exitflag,output=fmincon(myfun,x0,a,b,lb,mycon)Warning: Trust-region-reflective algorithm does not solve this type of problem, using active-setalgorithm. You could also try the interior-point or sqp algorithms: set the Algorithm option tointerior-point o

8、r sqp and rerun. For more help, see Choosing the Algorithm in the documentation. In fmincon at 472Local minimum found that satisfies the constraints.Optimization completed because the objective function is non-decreasing in feasible directions, to within the default value of the function tolerance,a

9、nd constraints were satisfied to within the default value of the constraint tolerance.Active inequalities (to within options.TolCon = 1e-006): lower upper ineqlin ineqnonlin 1 1 4 x = 300.0000 74.9069 90.0000fval = 11.3220exitflag = 1output = iterations: 7 funcCount: 33 lssteplength: 1 stepsize: 2.9

10、587e-005 algorithm: medium-scale: SQP, Quasi-Newton, line-search firstorderopt: 1.1603e-009 constrviolation: 1.6105e-012 message: 1x788 char经比较可发现和此前的结果一致。同上,先建立目标函数M文件function f=fun(x)f=(x(1)-3)2+x(2)2;再建立非线性约束M文件function c,ceq=funcon(x)c(1)=x(1)2+x(2)-4;ceq=;在MATLAB命令窗口给出初始搜索值和线性约束,并调用优化程序: x0=1,1

11、; a=-1 0;0 -1 b=-0.5;0 lb=zeros(2,1) x,fval,exitflag,output=fmincon(fun,x0,a,b,lb,funcon)Active inequalities (to within options.TolCon = 1e-006): lower upper ineqlin ineqnonlin 2 2 1x = 2.0000 0fval = 1.0000exitflag = 1output = iterations: 4 funcCount: 16 lssteplength: 1 stepsize: 7.9012e-005 algorithm: medium-scale: SQP, Quasi-Newton, line-search firstorderopt: 7.5958e-007 constrviolation: 6.2446e-009 message: 1x788 char

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1