{"id":851,"date":"2022-09-28T11:33:09","date_gmt":"2022-09-28T03:33:09","guid":{"rendered":"https:\/\/www.tosunai.com\/?p=851"},"modified":"2024-03-22T22:04:20","modified_gmt":"2024-03-22T14:04:20","slug":"tsmaster-hil-simulation","status":"publish","type":"post","link":"https:\/\/www.tosunai.com\/tsmaster-hil-simulation\/","title":{"rendered":"\u4f7f\u7528TSMaster\u4ece\u96f6\u6253\u9020\u8f66\u8f86\u63a7\u5236\u5668HIL\u5b9e\u65f6\u4eff\u771f"},"content":{"rendered":"\t\t
\u5b9e\u65f6\u4eff\u771f\u5728\u6c7d\u8f66\u96f6\u90e8\u4ef6\u7684\u5f00\u53d1\u548c\u6d4b\u8bd5\u4e2d\u5360\u636e\u7740\u91cd\u8981\u5730\u4f4d\uff0c\u901a\u5e38\u60c5\u51b5\u4e0b\uff0c\u8981\u5b9e\u73b0\u5b9e\u65f6\u4eff\u771f\u548c\u786c\u4ef6\u5728\u73af\u6d4b\u8bd5\uff0c\u514d\u4e0d\u4e86\u8981\u548cNI\u3001Veristand\u3001Dspace\u7b49\u7b49\u8fd9\u4e9b\u5927\u724c\u7684\u8f6f\u4ef6\u6216\u8005\u786c\u4ef6\u4ea7\u54c1\u6253\u4ea4\u9053\uff0c\u8fd9\u4e9b\u4ea7\u54c1\u7684\u6210\u672c\u9ad8\u6602\uff0c\u4e5f\u6709\u4e00\u5b9a\u7684\u51c6\u5165\u95e8\u69db\uff0c\u5e76\u4e0d\u5229\u4e8e\u5927\u9762\u79ef\u63a8\u5e7f\u3002\u800cTSMaster\u7684\u51fa\u73b0\u5219\u6253\u7834\u4e86\u8fd9\u6837\u4e00\u4e2a\u5c40\u9762\u3002<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t \u9996\u5148\uff0c\u89e3\u91ca\u4e00\u4e0b\u5b9e\u65f6\u4eff\u771f\u4e2d\u7684\u5b9e\u65f6\u6027\uff0c\u5b83\u4e0d\u8981\u6c42\u4eff\u771f\u901f\u5ea6\u8981\u6709\u591a\u5feb\uff0c\u800c\u662f\u5bf9\u4eff\u771f\u8ba1\u7b97\u4efb\u52a1\u7684\u8fd4\u56de\u7ed3\u679c\u7684\u65f6\u523b\u63d0\u51fa\u4e86\u786e\u5b9a\u6027\u7684\u8981\u6c42\u3002\u6bd4\u5982ECU\u4e2d\u7684\u4e00\u4e2a\u4efb\u52a1\uff0c\u5b83\u7684\u6267\u884c\u5468\u671f\u662f5\u6beb\u79d2\uff0c\u5b9e\u65f6\u6027\u5bf9\u5b83\u7684\u6700\u57fa\u672c\u8981\u6c42\u4fbf\u662f\u8fd9\u4e2a\u4efb\u52a1\u5fc5\u987b\u5728\u5f53\u524d\u76845\u6beb\u79d2\u5185\u6267\u884c\u5b8c\u6bd5\uff0c\u800c\u4e0d\u80fd\u63a8\u8fdf\u5230\u4e0b\u4e00\u4e2a5\u6beb\u79d2\u5468\u671f\uff0c\u8fd9\u4ec5\u4ec5\u53ea\u662f\u6700\u57fa\u672c\u7684\u8981\u6c42\u3002\u56e0\u4e3aECU\u7684\u5904\u7406\u5668\u7684\u8ba1\u7b97\u8d44\u6e90\u6709\u9650\uff0c\u5176\u4e2d\u6709\u4f17\u591a\u4e0d\u540c\u5468\u671f\u7684\u4efb\u52a1\uff0c\u90fd\u9700\u8981\u5728\u6307\u5b9a\u65f6\u95f4\u5185\u5b8c\u6210\uff0c\u8fd9\u5c31\u662f\u4e3a\u4f55\u9700\u8981\u4f7f\u7528\u5b9e\u65f6\u7cfb\u7edf\u6765\u6267\u884c\u4eff\u771f\u4efb\u52a1\uff0c\u5b9e\u65f6\u7cfb\u7edf\u5b8c\u5168\u6a21\u62df\u4e86ECU\u63a7\u5236\u5668\u7684\u8fd0\u884c\u73af\u5883\u3002 \u9996\u5148\uff0c\u89e3\u91ca\u4e00\u4e0b\u5b9e\u65f6\u4eff\u771f\u4e2d\u7684\u5b9e\u65f6\u6027\uff0c\u5b83\u4e0d\u8981\u6c42\u4eff\u771f\u901f\u5ea6\u8981\u6709\u591a\u5feb\uff0c\u800c\u662f\u5bf9\u4eff\u771f\u8ba1\u7b97\u4efb\u52a1\u7684\u8fd4\u56de\u7ed3\u679c\u7684\u65f6\u523b\u63d0\u51fa\u4e86\u786e\u5b9a\u6027\u7684\u8981\u6c42\u3002\u6bd4\u5982ECU\u4e2d\u7684\u4e00\u4e2a\u4efb\u52a1\uff0c\u5b83\u7684\u6267\u884c\u5468\u671f\u662f5\u6beb\u79d2\uff0c\u5b9e\u65f6\u6027\u5bf9\u5b83\u7684\u6700\u57fa\u672c\u8981\u6c42\u4fbf\u662f\u8fd9\u4e2a\u4efb\u52a1\u5fc5\u987b\u5728\u5f53\u524d\u76845\u6beb\u79d2\u5185\u6267\u884c\u5b8c\u6bd5\uff0c\u800c\u4e0d\u80fd\u63a8\u8fdf\u5230\u4e0b\u4e00\u4e2a5\u6beb\u79d2\u5468\u671f\uff0c\u8fd9\u4ec5\u4ec5\u53ea\u662f\u6700\u57fa\u672c\u7684\u8981\u6c42\u3002\u56e0\u4e3aECU\u7684\u5904\u7406\u5668\u7684\u8ba1\u7b97\u8d44\u6e90\u6709\u9650\uff0c\u5176\u4e2d\u6709\u4f17\u591a\u4e0d\u540c\u5468\u671f\u7684\u4efb\u52a1\uff0c\u90fd\u9700\u8981\u5728\u6307\u5b9a\u65f6\u95f4\u5185\u5b8c\u6210\uff0c\u8fd9\u5c31\u662f\u4e3a\u4f55\u9700\u8981\u4f7f\u7528\u5b9e\u65f6\u7cfb\u7edf\u6765\u6267\u884c\u4eff\u771f\u4efb\u52a1\uff0c\u5b9e\u65f6\u7cfb\u7edf\u5b8c\u5168\u6a21\u62df\u4e86ECU\u63a7\u5236\u5668\u7684\u8fd0\u884c\u73af\u5883\u3002 \u6211\u4eec\u4f1a\u4ece\u96f6\u4e00\u6b65\u6b65\u57fa\u4e8eTSMaster\u6765\u642d\u5efaABS\u7b97\u6cd5\u7684\u5b9e\u65f6\u4eff\u771f\u73af\u5883\u3002\u901a\u8fc7Simulink\u5c06ABS\u7684\u7b97\u6cd5\u81ea\u52a8\u751f\u6210\u5d4c\u5165\u5f0f\u4ee3\u7801\uff0c\u5c06\u5b83\u4f5c\u4e3a\u4e00\u4e2a\u5c0f\u7a0b\u5e8f\u8fd0\u884c\u5728TSMaster\u7684\u5b9e\u65f6\u73af\u5883\u4e2d\u3002\u6211\u4eec\u9996\u5148\u5c06\u6a21\u578b\u53e6\u5b58\uff0c\u7136\u540e\u9700\u8981\u4fee\u6539\u8def\u5f84\uff0c\u8ba9\u4ee3\u7801\u7684\u751f\u6210\u653e\u7f6e\u5728\u8fd9\u4e2a\u65b0\u7684\u8def\u5f84\u4e2d\u3002\u968f\u540e\u6211\u4eec\u9700\u8981\u5728\u6a21\u578b\u4e0a\u505a\u4e00\u4e9b\u4fee\u6539\u8ba9\u5176\u53ef\u4ee5\u751f\u6210\u5d4c\u5165\u5f0f\u4ee3\u7801\u3002\u9996\u5148\u5c31\u9700\u8981\u5220\u9664\u793a\u6ce2\u5668\u7b49\u7b49\u4e00\u7cfb\u5217\u65e0\u7528\u7684\u63a7\u4ef6\uff0c\u518d\u5220\u9664CarSim\u7684s function\uff0c\u5c06s function\u7684\u63a5\u53e3\u8f6c\u5316\u4e3ain \u548c out\u3002<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t \u4e3a\u4e86\u6b63\u786e\u7684\u751f\u6210\u5d4c\u5165\u5f0f\u4ee3\u7801\uff0c\u8fd8\u9700\u8981\u5728\u4ee3\u7801\u751f\u6210\u4e0a\u505a\u4e00\u756a\u4fee\u6539\uff0c\u6253\u5f00\u914d\u7f6e\uff0c\u9996\u5148\u662fstop time\uff0c\u8bbe\u7f6e\u4e3ainf\uff0c\u7136\u540e\u662fsalvar\uff0c\u518d\u6b21\u4f7f\u7528\u7684\u662f\u5b9a\u6b65\u957f\uff0cstep\u6211\u4eec\u4f7f\u7528\u4e86\u4e1a\u754c\u901a\u7528\u76845\u6beb\u79d2\u3002\u63a5\u4e0b\u6765\u6765\u5230\u4ee3\u7801\u751f\u6210\u7684\u73af\u8282\uff0cTarget file\u81ea\u7136\u662fert\uff0c\u6211\u4eec\u8fd8\u9700\u8981\u8f6c\u5230interface\uff0c\u5728\u8fd9\u91cc\u5c06continuous time\u52fe\u4e0a\uff0c\u56e0\u4e3a\u8f6e\u7f38\u538b\u529b\u6a21\u578b\u4e2d\u95f4\u7528\u5230\u7684\u662f\u4f20\u9012\u51fd\u6570\uff0c\u662f\u8fde\u7eed\u72b6\u6001\uff0c\u968f\u540e\u6309Ctrl+B\u751f\u6210\u4ee3\u7801\uff0c\u5f88\u5feb\u4ee3\u7801\u5c31\u751f\u6210\u5b8c\u6bd5\u4e86\u3002\u90a3\u4e48\u5728\u8fd9\u4efd\u4ee3\u7801\u4e2d\uff0c\u6211\u4eec\u9700\u8981\u5c06ABS.c.h\u4ee5\u53ca\u4e00\u4e9b\u5217\u7684\u5176\u4ed6\u7684\u5934\u6587\u4ef6\u590d\u5236\u7c98\u8d34\u5230TSMaster\u7684\u5c0f\u7a0b\u5e8f\u7684\u6587\u4ef6\u5939\u4e2d\u95f4\u53c2\u4e0e\u7f16\u8bd1\u8fc7\u7a0b\u3002<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t \u4e0d\u8bba\u6211\u4eec\u7684ABS\u7b97\u6cd5\u662f\u5904\u5728TSMaster\u7684\u5c0f\u7a0b\u5e8f\u4e2d\uff0c\u8fd8\u662f\u5904\u5728\u771f\u5b9e\u7684ECU\u786c\u4ef6\u4e2d\uff0c\u5b83\u7684\u8fd0\u884c\u5fc5\u7136\u90fd\u9700\u8981\u8f93\u5165\u5916\u90e8\u73af\u5883\u7ed9\u5b83\u63d0\u4f9b\u7684\u8f6e\u901f\u7b49\u4fe1\u53f7\uff0c\u5b83\u7684\u8f93\u51fa\u4e5f\u5fc5\u7136\u8981\u65bd\u52a0\u5230\u5916\u90e8\u7684\u73af\u5883\u4e2d\uff0c\u8fd9\u91cc\u7684\u5916\u90e8\u73af\u5883\u5c31\u662f\u6307\u6574\u8f66\u4ee5\u53ca\u5176\u4ed6\u7684\u63a7\u5236\u5668\u3002\u5f88\u660e\u663e\uff0c\u6211\u4eec\u9700\u8981\u4e00\u4e2a\u6574\u8f66\u6a21\u578b\u6765\u53c2\u4e0e\u4eff\u771f\u7684\u8fc7\u7a0b\uff0c\u901a\u5e38\u610f\u4e49\u4e0a\uff0c\u8fd9\u4e2a\u6574\u8f66\u6a21\u578b\u5c31\u662fCarSim\u7684RT\u7248\u672c\u3002<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t \u57fa\u4e8e\u524d\u9762\u6211\u4eec\u5bf9HIL\u4eff\u771f\u7684\u5b9e\u65f6\u6027\u63a2\u8ba8\uff0c\u6211\u4eec\u540c\u6837\u53ef\u4ee5\u4f7f\u7528\u975eRT\u7248\u672c\u7684CarSim\uff0c\u800c\u4ec5\u4ec5\u901a\u8fc7\u5b9e\u65f6\u8c03\u7528CarSim\u76f8\u5173\u7684API\u51fd\u6570\uff0c\u5c06\u6574\u8f66\u6a21\u578b\u642c\u5230\u4e2a\u4eba\u7535\u8111\u4e0a\u6765\u8fd0\u884c\u3002\u6211\u4eec\u4e13\u95e8\u4e3aCarSim\u6253\u9020\u7684CarSim Controller\uff0c\u5b83\u76f8\u5f53\u4e8eCarSim\u7684RT\u7248\u672c\uff0c\u5177\u6709\u5728\u4e2a\u4eba\u7535\u8111\u4e0a\u9ad8\u7cbe\u5ea6\u7684\u4eff\u771f\u8f66\u8f86\u6a21\u578b\u7684\u80fd\u529b\u3002<\/p> \u57fa\u4e8eTSMaster\u7684\u8f6f\u4ef6\u5e73\u53f0\uff0c\u6211\u4eec\u53ef\u4ee5\u8f7b\u6613\u7684\u5e72\u9884ECU\u7b97\u6cd5\u4e2d\u7684\u4efb\u610f\u53d8\u91cf\u3002\u9700\u8981\u8bf4\u660e\u7684\u662fCarSim Controller\u4ec5\u4ec5\u662f\u5c06\u4e00\u4e2a\u52a8\u529b\u5b66\u8f6f\u4ef6CarSim\u505a\u5230\u5b9e\u65f6\u63a7\u5236\u7684\u5343\u4e07\u79cd\u65b9\u6cd5\u4e2d\u7684\u4e00\u79cd\u3002\u57fa\u4e8e\u6b64\u539f\u7406\uff0c\u540c\u6837\u53ef\u4ee5\u5b9e\u73b0Carmaker\u7b49\u7b49\u5176\u4ed6\u52a8\u529b\u5b66\u8f6f\u4ef6\u7684\u5b9e\u65f6\u63a7\u5236\u3002<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t \u4e0a\u9762\u6211\u4eec\u4ecb\u7ecd\u4e86ABS\u7b97\u6cd5\u4eff\u771f\u548c\u8f66\u8f86\u6a21\u578b\u7684\u8fd0\u884c\uff0c\u5b83\u4eec\u7684\u529f\u80fd\u5e76\u4e0d\u662f\u7b80\u7b80\u5355\u5355\u5730\u7ed8\u5236\u66f2\u7ebf\uff0c\u641c\u96c6\u8fd0\u884c\u6570\u636e\uff0c\u800c\u662f\u6709\u7740\u66f4\u6df1\u5c42\u6b21\u7684\u76ee\u7684\uff0c\u90a3\u5c31\u662f\u4e0e\u5916\u90e8\u4e16\u754c\u8054\u52a8\uff0c\u5c06\u8f93\u5165\u548c\u8f93\u51fa\u6570\u636e\u5b8c\u5b8c\u5168\u5168\u66b4\u9732\u5728\u771f\u5b9e\u4e16\u754c\u4e2d\uff0c\u8fbe\u5230HIL\u7684\u771f\u6b63\u76ee\u7684\u2014\u2014\u786c\u4ef6\u5728\u73af\u3002\u4e0e\u5916\u90e8\u4e16\u754c\u4ea4\u4e92\u8fd9\u4e2a\u8fc7\u7a0b\u53ef\u4ee5\u8bf4\u5341\u5206\u7b80\u5355\uff0c\u53ea\u9700\u8981\u4e3a\u6b64\u4e13\u95e8\u8bbe\u8ba1\u4e00\u4e2adbc\u6587\u4ef6\uff0c\u52a0\u8f7dTSMaster\u4e2d\uff0c\u518d\u5c06\u7cfb\u7edf\u53d8\u91cf\u4e2d\u7684\u5185\u5bb9\u6620\u5c04\u5230\u603b\u7ebf\u4e0a\u5373\u53ef\u3002
\u6982\u8ff0<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t
<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t\u4e00\u3001\u5b9e\u65f6\u4eff\u771f\u539f\u7406<\/a><\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t
<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t
\u4e8c\u3001ECU\u5d4c\u5165\u5f0f\u4ee3\u7801\u4e0eTSMaster\u5c0f\u7a0b\u5e8f\u96c6\u6210
<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t
\u4e09\u3001\u8131\u79bbRT\u7684\u8f66\u8f86\u6a21\u578b\u7684\u5b9e\u65f6\u4eff\u771f<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t\u56db\u3001ECU HIL\u4eff\u771f\u7684\u5177\u4f53\u5b9e\u65bd<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t
<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t