AVL cruise and Simulink joint simulation installation tutorial

Joint simulation directory of AVL cruise and Simulink

提示:上一期详细介绍了该软件的安装步骤:点击下列连接直达
AVL cruise 2019 installation tutorial


最近有人找我做一个AVl 与Cruise的联合仿真的项目,当时光搭建环境就找了很多教程好几天,但是很少能解决实质性问题,需要一些插件啊找不到等各种情况老出现

Preface


CRUISE与MATLAB 有四种连接方式
1. MATLAB DLL
generates a dynamic link library (DLL) file through Simulink's RTW and integrates it into CRUISE for coupled simulation
2. Online joint simulation of MATLAB API
CRUISE and MATLAB (CRUISE is in the foreground, and MATLAB is in the called state)
3. CRUISE Interface
Online joint simulation of CRUISE and MATLAB (MATLAB is in the foreground, and CRUISE is in the called state)
4. CRUISE Interface CMC
CRUISE is compiled by CMC and integrated into MATLAB in the form of S-function for coupled simulation

1. Advantages of MATLAB DLL co-simulation:

  1. It is suitable for engineers who have perfected the control strategy and mainly focus on the power and economic performance of the vehicle;
  2. The generated DLL file can no longer view the internal logic of the Simulink model, which has a good confidentiality effect on the model;
  3. Once the DLL file is generated, it can be used without MATLAB software by any computer with CRUISE software installed;
  4. The calculation speed is fast, comparable to the calculation speed of CRUISE alone;

2. Version Description

The MATLAB DLL co-simulation method requires a compiler in the process of generating DLL files. 64-bit MATLAB does not come with a compiler and requires additional installation.

3. Installation steps

  1. Open the MATLAB software under the AVL cruise installation path and you will see the install.m software.
    Insert image description here
  2. Open the install.m software in MATLAB and click Run. The following results indicate success.
    Insert image description here

3.1 Editor installation

A compiler is required in the process of generating DLL files. For 64-bit MATLAB, it can be installed in the following ways:

  1. Enter mex –setup in the MATLAB command bar and press Enter;
  2. The system will prompt you for a link to download the editor. Just click on the link and download the editor. The main thing is to connect the software in the picture below.
    main
    3. The editor configuration is completed, as shown below, it is successful
    Insert image description here

3.2 cruise configuration

Drag the Matlab dll into the software

  1. After building the cruise model, click Create mdl-File
    Insert image description here
  2. An mdl file will be generated under the project. Double-click it and it will be opened in MATLAB/Simulink to build your own model.
    Insert image description here
  3. Click Simulink Coder in Matlab/APP for further settings

Insert image description here

  1. dll target file generation
    Insert image description here
    Insert image description here
    5. Click Build. After compilation is completed, the target file can be generated.
    Insert image description here

Guess you like

Origin blog.csdn.net/m0_58857684/article/details/130628634