matlab的sqpare,optimization with sqp algorithm

fun = @(x) C*((Fx_v-(x(1)*cos(x(5)+SW_1)+x(2)*cos(x(6)+SW_2)+x(3)*cos(x(7)+SW_3)+x(4)*cos(x(8)+SW_4)-x(5)*sin(x(5)+SW_1)*c_w-x(6)*sin(x(6)+SW_2)*c_w-x(7)*sin(x(7)+SW_3)*c_w-x(8)*sin(x(8)+SW_4)*c_w))^2+ (Fy_v-(x(1)*sin(x(5)+SW_1)+x(2)*sin(x(6)+SW_2)+x(3)*sin(x(7)+SW_3)+x(4)*sin(x(8)+SW_4)+x(5)*cos(x(5)+SW_1)*c_w+x(6)*cos(x(6)+SW_2)*c_w+x(7)*cos(x(7)+SW_3)*c_w+x(8)*cos(x(8)+SW_4)*c_w))^2+ (Mz_v-(x(1)*(-cos(x(5)+SW_1)*w_vl+l_v*sin(x(5)+SW_1))+x(2)*(cos(x(6)+SW_2)*w_vr+sin(x(6)+SW_2)*l_v)+x(3)*(-cos(x(7)+SW_3)*w_hl-l_h*sin(x(7)+SW_3))+x(4)*(cos(x(8)+SW_4)*w_hr-sin(x(8)+SW_4)*l_h)+x(5)*(sin(x(5)+SW_1)*c_w*w_vl+cos(x(5)+SW_1)*c_w*l_v)+x(6)*(-sin(x(6)+SW_2)*c_w*w_vr+cos(x(6)+SW_2)*c_w*l_v)+x(7)*(sin(x(7)+SW_3)*c_w*w_hl-cos(x(7)+SW_3)*c_w*l_h)+x(8)*(-cos(x(8)+SW_4)*c_w*l_h-sin(x(8)+SW_4)*c_w*w_hl)))^2);%(f_lag >= 0).*((A/SOC_1)*(x(1))^2+(A/SOC_2)*(x(2))^2+(A/SOC_3)*(x(3))^2+(A/SOC_4)*(x(4))^2+(d_delay_1-(SW_1+x(5)))^2+(d_delay_2-(SW_2+x(6)))^2+(d_delay_3-(SW_3+x(7)))^2+(d_delay_4-(SW_4+x(8)))^2) + (f_lag == -1).*((((B*(M_reg_1/(M_reg_1+M_reg_2+M_reg_3+M_reg_4)))/SOC_1)*(1/(x(1)^2)))+(((B*(M_reg_2/(M_reg_1+M_reg_2+M_reg_3+M_reg_4)))/SOC_2)*(1/(x(2)^2)))+(((B*(M_reg_3/(M_reg_1+M_reg_2+M_reg_3+M_reg_4)))/SOC_3)*(1/(x(3)^2)))+(((B*(M_reg_4/(M_reg_1+M_reg_2+M_reg_3+M_reg_4)))/SOC_4)*(1/(x(4)^2)))+(d_delay_1-(SW_1+x(5)))^2+(d_delay_2-(SW_2+x(6)))^2+(d_delay_3-(SW_3+x(7)))^2+(d_delay_4-(SW_4+x(8)))^2);

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值