{"id":21323,"date":"2025-10-29T13:59:23","date_gmt":"2025-10-29T05:59:23","guid":{"rendered":"https:\/\/www.tosunai.com\/?p=21323"},"modified":"2025-10-29T13:59:26","modified_gmt":"2025-10-29T05:59:26","slug":"tsmaster-mbd-project-setup-and-analysis-guide","status":"publish","type":"post","link":"https:\/\/www.tosunai.com\/en\/tsmaster-mbd-project-setup-and-analysis-guide\/","title":{"rendered":"\u5e72\u8d27\u5206\u4eab | TSMaster MBD\u5de5\u7a0b\u642d\u5efa\u4e0e\u89e3\u6790\u6307\u5357"},"content":{"rendered":"

\u5728\u6c7d\u8f66\u7535\u5b50\u5f00\u53d1\u9886\u57df\uff0c\u57fa\u4e8e\u6a21\u578b\u7684\u8bbe\u8ba1\u4ee5\u5176\u9ad8\u6548\u7387\u3001\u9ad8\u96c6\u6210\u5ea6\u548c\u4fbf\u4e8e\u9a8c\u8bc1\u7684\u4f18\u52bf\uff0c\u6b63\u65e5\u76ca\u6210\u4e3a\u4e3b\u6d41\u7684\u5f00\u53d1\u8303\u5f0f\u3002\u4f5c\u4e3a\u8fde\u63a5\u6a21\u578b\u4e0e\u7269\u7406\u4e16\u754c\u7684\u6865\u6881\uff0cTSMaster\u7684MBD\u529f\u80fd\u6a21\u5757\u626e\u6f14\u7740\u81f3\u5173\u91cd\u8981\u7684\u89d2\u8272\u3002\u5b83\u5c06MATLAB\/Simulink\u6a21\u578b\u65e0\u7f1d\u96c6\u6210\u5230\u603b\u7ebf\u7f51\u7edc\u73af\u5883\u4e2d\uff0c\u4f7f\u5f97\u5de5\u7a0b\u5e08\u80fd\u591f\u5728\u771f\u5b9e\u7684\u786c\u4ef6\u5728\u73af\u6d4b\u8bd5\u53f0\u4e0a\uff0c\u5bf9\u63a7\u5236\u6a21\u578b\u8fdb\u884c\u5b9e\u65f6\u9a8c\u8bc1\uff0c\u6216\u5c06\u6a21\u578b\u4f5c\u4e3a\u865a\u62dfECU\u53c2\u4e0e\u5230\u6574\u4e2a\u7f51\u7edc\u4eff\u771f\u4e2d\u3002\u672c\u6587\u5c06\u6df1\u5165\u89e3\u6790TSMaster\u4e2dMBD\u5de5\u7a0b\u7684\u642d\u5efa\u6d41\u7a0b\u4e0e\u6838\u5fc3\u529f\u80fd\u3002<\/p>\n\n\n\n

<\/p>\n\n\n\n

Keywords:TSMaster, MBD<\/strong><\/strong><\/strong><\/strong><\/strong><\/p>\n\n\n\n

<\/div>\n\n\n\n

TSMaster MBD \u6982\u5ff5\u89e3\u6790<\/strong><\/h2>\n\n\n\n
\n\n\n\n
    \n
  1. MBD \u7684\u57fa\u672c\u6982\u5ff5<\/strong>
    \u57fa\u4e8e\u6a21\u578b\u7684\u8bbe\u8ba1\uff08Model-Based Design\uff0cMBD\uff09\u662f\u4e00\u79cd\u8f6f\u4ef6\u5de5\u7a0b\u65b9\u6cd5\uff0c\u5b83\u5728\u8bbe\u8ba1\u3001\u5f00\u53d1\u548c\u9a8c\u8bc1\u590d\u6742\u7cfb\u7edf\u65f6\u4f7f\u7528\u6a21\u578b\u4e3a\u4e2d\u5fc3\u7684\u65b9\u6cd5\u3002MBD\u901a\u8fc7\u4f7f\u7528\u6570\u5b66\u6a21\u578b\u6765\u63cf\u8ff0\u7cfb\u7edf\u7684\u884c\u4e3a\u548c\u7279\u6027\uff0c\u4e3a\u590d\u6742\u7cfb\u7edf\u7684\u5f00\u53d1\u63d0\u4f9b\u4e86\u4e00\u79cd\u6570\u5b66\u5316\u4e0e\u53ef\u89c6\u5316\u7684\u521b\u65b0\u65b9\u6cd5\u3002
    <\/li>\n\n\n\n
  2. TSMaster MBD \u6a21\u5757<\/strong>
    TSMaster\u6a21\u578b\u6846\u56fe\u6a21\u5757\u662f\u540c\u661f\u667a\u80fd\u5f00\u53d1\u7684\u7c7bSimulink\u7684\u5efa\u6a21\u6a21\u5757\uff0c\u7528\u4e8e\u652f\u6301\u57fa\u4e8e\u6a21\u578b\u5f00\u53d1\u6a21\u5f0f\uff08MBD\uff09\uff0c\u901a\u8fc7\u62d6\u653e\u6a21\u5757\u548c\u8fde\u63a5\u4fe1\u53f7\u7ebf\u6765\u6784\u5efa\u7cfb\u7edf\u6a21\u578b\uff0c\u652f\u6301\u8fde\u7eed\u65f6\u95f4\u3001\u79bb\u6563\u65f6\u95f4\u4ee5\u53ca\u6df7\u5408\u7cfb\u7edf\u7684\u4eff\u771f\u3002\u5f53\u524d\u5df2\u53d1\u5e03\u7684\u6a21\u5757\u529f\u80fd\u5305\u542b\u5982\u4e0b\u5185\u5bb9\uff1a<\/li>\n<\/ol>\n\n\n\n
      \n
    1. Rich Module Library: Contains predefined modules in the fields of mathematical operations, signal processing, control systems, communication systems, and so on;<\/li>\n\n\n\n
    2. Hierarchical modeling: supports the creation of hierarchical models through subsystems; can combine multiple modules into subsystems; supports multi-level subsystem nesting; can create conditional execution subsystems (enable, trigger, etc.);<\/li>\n\n\n\n
    3. Simulation function: support the parallel operation of subsystems with different sampling rates; automatically handle the signal transfer between modules with different rates;<\/li>\n\n\n\n
    4. Deep integration: data can be read directly from TSMaster system variables; simulation results can be exported to mbd files for analysis; relevant functions in the model block diagram can be called to operate on TSMaster;<\/li>\n\n\n\n
    5. MIL, SIL, HIL are supported;<\/li>\n\n\n\n
    6. Support directly load Simulink sldd, slx and other files simulation<\/li>\n<\/ol>\n\n\n
      \n
      \"\"<\/figure><\/div>\n\n\n
      <\/div>\n\n\n\n

      MBD \u5de5\u7a0b\u642d\u5efa\u5b9e\u6218<\/strong><\/h2>\n\n\n\n
      \n\n\n\n

      \u4ee5\u4e0b\u662f\u4e00\u4e2a\u8be6\u7ec6\u7684\u6b65\u9aa4\u6307\u5357\uff0c\u6f14\u793a\u5982\u4f55\u4ece\u96f6\u5f00\u59cb\u642d\u5efa\u4e00\u4e2a\u5b8c\u6574\u7684MBD\u5de5\u7a0b\u3002<\/p>\n\n\n\n

      \u672c\u6587\u4e2d\u4f7f\u7528\u7684\u6570\u636e\u5e93\u4e3aTSMaster\u8f6f\u4ef6\u4e2d\u9644\u5e26\u7684\u6570\u636e\u5e93CAN_FD_Powertrain.dbc\u6240\u5728\u5730\u5740\u4e3aTSMaster\u5b89\u88c5\u8def\u5f84\u4e0b\\Data\\Demo\\Databases\u6587\u4ef6\u5939\u4e2d\u3002\u5982\u4e0b\u56fe\u6240\u793a\uff1a<\/p>\n\n\n

      \n
      \"\"<\/figure><\/div>\n\n\n

      <\/p>\n\n\n\n

      CAN\u6570\u636e\u5e93\u4e2d\u7684Demo\u6570\u636e\u5e93\u5230TSMaster\u4e2d\uff0c\u5e76\u6fc0\u6d3bCAN\u603b\u7ebf\u4eff\u771f\uff0c\u4ee5\u4fbf\u540e\u7eed\u4fe1\u53f7\u6620\u5c04\u4e2d\u4f7f\u7528\u3002<\/p>\n\n\n\n

      \"\"<\/figure>\n\n\n\n

      1. \u53d8\u91cf\u51c6\u5907<\/strong><\/p>\n\n\n\n

      \u6dfb\u52a0CAN\u6570\u636e\u5e93\u548c\u7cfb\u7edf\u53d8\u91cf\uff0c\u5c06CAN\u6570\u636e\u4e2d\u7684\u4fe1\u53f7\u4e0e\u7cfb\u7edf\u53d8\u91cf\u6620\u5c04\u65b9\u5411\u8bbe\u7f6e\u4e3a\u53cc\u5411\u4f20\u9012\uff0c\u65b9\u4fbf\u540e\u7eed\u4fee\u6539\u7cfb\u7edf\u53d8\u91cf\u7684\u503c\u6765\u63a7\u5236CAN\u4fe1\u53f7\u7684\u53d8\u5316<\/p>\n\n\n\n

      \"\"<\/figure>\n\n\n\n

      <\/p>\n\n\n\n

      2. \u5de5\u7a0b\u642d\u5efa<\/strong><\/p>\n\n\n\n

      2.1 \u4fe1\u53f7\u8f93\u5165<\/p>\n\n\n\n

      Add the database in TSMaster beforehand. (Note: You cannot select a signal with a maximum and minimum value of 0.) In the signal mapping connect the CAN signals (\/EngineData\/EngSpeed as an example) with the system variables (Var0 as an example), and set the mapping direction to: from system variables to signals only.<\/p>\n\n\n\n

      The model block diagram of the added components Sine Wave and DataStoreWrite, DataStoreWrite binding system variables (Var0 as an example), the Sine Wave and DataStoreWrite connected together, the realization of the system variable value is Sine curve changes.<\/p>\n\n\n\n

      \"DataStoreWrite\u7ed1\u5b9a\"<\/figure>\n\n\n\n

      2.2 CAN\u4fe1\u53f7\u7684\u7b97\u6cd5\u5904\u7406<\/p>\n\n\n

      \n
      \"\"<\/figure><\/div>\n\n\n

      Simple CAN signal algorithm processing, example steps are as follows:<\/p>\n\n\n\n

      \uff081\uff09\u65b0\u5efaTSMaster\u5de5\u7a0b\uff0c\u52a0\u8f7d\u6570\u636e\u5e93\uff08\u4ee5CAN_FD_Powertrain.dbc\u4e3a\u4f8b\uff09<\/p>\n\n\n\n

      \"\"<\/figure>\n\n\n\n

      (2) Create system variable Var0<\/p>\n\n\n\n

      \"\"<\/figure>\n\n\n\n

      (3) Connect the system variable Var0 to the CAN signal (\/EngineData\/EngSpeed signal, for example) in the signal mapping, and select the mapping direction \"from system variable to signal only\".<\/p>\n\n\n\n

      \"\"<\/figure>\n\n\n\n

      (4) Add the model block diagram, add Sine Wave and ToWorkspace components in the model block diagram, ToWorkspace binds the system variable Var0, Sine Wave connects to ToWorkspace to realize the Sine change of the system variable value, and at the same time, realize the Sine change of the CAN signal value.<\/p>\n\n\n\n

      \"\"<\/figure>\n\n\n\n

      <\/p>\n\n\n\n

      \uff085\uff09CAN\u4fe1\u53f7\u7684\u7b97\u6cd5\u5904\u7406\uff1a\u6dfb\u52a0\u5b50\u7cfb\u7edfoperation\uff0c\u4f7f\u7528FromWorkspace\u8bfb\u53d6\u7cfb\u7edf\u53d8\u91cfVar0\u7684\u503c\u4f5c\u4e3a\u8f93\u5165\u5b50\u7cfb\u7edf\uff0cConstant\u4f5c\u4e3a\u53e6\u4e00\u4e2a\u8f93\u5165\u7ed9\u5b50\u7cfb\u7edf\u3002<\/p>\n\n\n\n

      The algorithm modules that can be added to the subsystem are:<\/p>\n\n\n\n