carsim输入模块设置问题

 Mode 和 Initial value 是可以选择的,可以选择替换、增加或者是做乘法,意思就是我们从simulink导入carsim的这些量是在原来基础上替换呢还是在原来的基础上加上我们的导入值还是乘以我们的导入值的意思。

Figure 1

 where keyword is the name of the import variable, mode is one of three possible modes for using the import (ADD, MULTIPLY, or REPLACE), and initial_value is the numerical value of the imported variable during initialization. Note that mode and initial_value are optional. The keyword mode determines how the imported variable is combined with a native value embedded in the VS model. For example, if the imported variable is the brake control and the mode is REPLACE, then the brake control within the VS model is replaced with the imported value. If the mode is ADD, then the internal value is added to the imported variable. If the mode is MULTIPLY, then the internal value is multiplied by the imported value. If not specified, the default is that the mode is ADD.

Not all import variables support all three modes. The Readme file, such as the one shown in Figure 2, indicates whether the import variable is linked to an internal variable or to a constant (typically 0) in column E. For example, Figure 2 indicates that IMP_DVBK_L/R (line 61-64) is linked to an internal variable. This means that the imported value can be set for any of the three modes: ADD, MULTIPLY, or REPLACE. On the other hand, the rest of the import variables that follow (lines 44 – 60) are linked to a constant internal value 0. That means that the mode MULTIPLY would have no effect (import * 0 = 0), and that the modes ADD and REPLACE would have the same effect of using the imported variable (import + 0 = import).

Figure 2

点击下方卡片,加入会员全年无限制学习后台(MPC各矩阵的底层逻辑、MPC纵向控制、模型验证、MPC自适应巡航控制、非线性系统如何线性化及MPC动力学跟踪任何轨迹、约束添加及新求解器的求解、轨迹规划、纵向规划等80个系列)会员专享爆品课程及资源,同时获得分佣资格,可赚回自己的学费! 

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值