Implementation of Data Communication in a Vehicle Transmission System Simulation Platform Based on DCS and MATLAB
2026-04-06 09:47:18··#1
[b]1 Introduction[/b] Currently, Distributed Control Systems (DCS) are widely used in industrial control fields such as petroleum, chemical, power, and metallurgy. In practical engineering applications of DCS, specific control schemes are usually designed according to different controlled objects, and then implemented on the DCS through control configuration. However, due to the limitations of actual engineering, it is difficult to test newly designed control strategies and algorithms on-site. Therefore, it is necessary to design simulation models of the controlled objects for DCS testing. In recent years, MATLAB, a powerful software widely used in the control field, has emerged, which can be used to easily build simulation models for various controlled objects. If DCS and MATLAB can be connected, with DCS performing control calculations and MATLAB providing simulation models of the controlled objects, the advantages of both can be fully utilized, and it can also greatly help researchers develop new control strategies and algorithms. This paper takes the tracked vehicle transmission system as an example, and establishes a vehicle transmission system simulation platform based on the EDPF-NT system of Guodian Zhicheng and MATLAB. On this platform, an electronic control simulator for the vehicle transmission system is developed in the EDPF-NT system to control the operation of the transmission system. MATLAB is used to build a transmission system model to simulate the operation of the transmission system. This platform can easily simulate the gear shifting process of a transmission system, providing a better simulation environment for optimizing gear shifting strategies and improving the overall performance of the transmission system. The overall structure of the simulation platform is shown in Figure 1. [b]2 Hardware Composition of the Simulation Platform[/b] When constructing the transmission system simulation platform, the hardware design problem must first be solved. It mainly consists of the EDPF-NT system's engineering station, DPU card, COM card, I/O card, and host computer. The engineering station's function is to configure and design control schemes, while the host computer mainly runs the transmission system MATLAB model and data communication program. [b]3 Implementation of Data Communication in the Simulation Platform[/b] In the process of constructing the transmission system simulation platform, achieving fast and accurate data communication within the platform is a key research topic, mainly addressing the data communication between the EDPF-NT system and MATLAB. For security reasons, the EDPF-NT system database only allows reading and not writing. Therefore, data communication between the EDPF-NT system and the MATLAB model needs to be implemented in three parts: first, the engineer station reads the real-time data from the EDPF-NT system and sends it to the host computer; second, the MATLAB model reads the EDPF-NT system data sent to the host computer; and finally, the host computer sends the data after the MATLAB model runs back to the EDPF-NT system via a COM card. 3.1 Reading Data from the EDPF-NT System The data from the EDPF-NT system is stored in a specific format in the database and cannot be directly read or written. To facilitate user access to the data, Guodian Zhicheng provides the NTClient.dll file, which can be called by software such as VC and VB. Users can read the real-time data from the EDPF-NT system using the functions provided by NTClient.dll. This paper uses VB to develop a program that reads data from the EDPF-NT system and uses the Winsock control to send the read data to the host computer. This program consists of three parts: 1) Declaring the functions provided by NTClient.dll; 2) Reading data from the EDPF-NT system; 3) Sending data to the host computer. 3.2 MATLAB's Use of EDPF-NT Data As the most popular simulation software, MATLAB plays a crucial role in control system analysis and design. However, MATLAB itself does not provide a low-level communication interface, requiring other methods to achieve data communication over a network. Therefore, data sent from the EDPF-NT system engineering station to the host computer is first received by a VB-written program, and then accessed via OPC technology. When transferring data between different programs, a suitable communication interface needs to be selected; for this purpose, the OPC (OLE for Process Control) technology, a software interface standard in the industrial control industry, is introduced. OPC technology attempts to solve the data exchange problem between different programs and devices using a standardized method. It adopts a server/client model; as long as a server with a unified OPC interface is provided, data exchange can be achieved by accessing the server through a consistent OPC client interface. MATLAB can also function as an ActiveX automation controller. Through ActiveX automation controller technology, users can control ActiveX automation servers in various ways within MATLAB by writing M-files. This document describes how to develop an OPC ActiveX control using the OPC automation interface in VB. A communication module is added to the OPC ActiveX control to receive data from the EDPF-NT system and assign this data to the control's properties. MATLAB can then retrieve the corresponding property values from the OPC ActiveX control, enabling MATLAB to access EDPF-NT system data using OPC technology. The process involves: first, creating the OPC ActiveX control and setting up the network in the initialization of its internal working variables; second, adding network communication code to the OPC ActiveX program to receive data sent from the EDPF-NT system's engineering station to the host computer; and finally, assigning the received data to the ActiveX control's properties, generating the OPC ActiveX control, and registering it. The OPC ActiveX control for data reception can then be used by MATLAB. Before using an ActiveX component in MATLAB, it is necessary to find the object's name (ProglD) and understand its methods, properties, and events. Using this information, the object can be applied in MATLAB through ActiveX client support. The `actxcontrol` function is used to create an ActiveX component to enable communication between MATLAB and OPC. The syntax for creating an ActiveX component in the graphics window is `h = actxcontrol1(progid[, position[, handle...[, callback {event1 eventhander1; ... event2 eventhandler2; }]]]`. Functions such as `get`, `set`, `invoke`, `propedit`, `release`, and `delete` can be used to manipulate the OPC ActiveX control, ultimately enabling MATLAB to access EDPF-NT data. 3.3 EDPF-NT System Data Input Implementation As mentioned earlier, for security reasons, the EDPF-NT system database only allows reading, not direct writing. Therefore, the Modbus protocol must be used to send the data from the MATLAB model execution to the EDPF-NT system via a COM card. The Modbus Master communication control in VB allows for convenient data transmission from the Master to the Modbus Slave (COM card). When transmitting data to the EDPF-NT system, the corresponding communication parameters need to be set, including port, baud rate, response timeout, data bits (RTU/ASCII), parity check, stop bits, and the slave address associated with the COM card and the physical start address of the COM card when sending data. After each run of the MATLAB model, it will automatically send the data to the COM card of the EDPF-NT system via the Modbus network, and the EDPF-NT system will read the data sent to the COM card. [b]4 Data Communication Test[/b] After the hardware and software debugging is completed, the accuracy and reliability of the platform's data communication are tested using manual gear shifting as an example. First, the platform is put into operation, and control is performed on the transmission control simulator developed by the EDPF-NT system. The operation interface of the control simulator is shown in Figure 3. The control signals of the EDPF-NT system can be quickly sent to the transmission system model in the host computer to control the operation of the model. At the same time, the host computer sends the data obtained after the model runs back to the EDPF-NT system and displays it on the interface of the control simulator. During the test, the operation is performed on the control simulator, shifting from first gear to fourth gear one by one. After receiving the shift control signal, the transmission system model located in the host computer operates according to the given gear. The output speed curve of the transmission system gearbox after operation is shown in Figure 4. Testing shows that the data communication within the simulation platform is rapid, accurate, and reliable, meeting the requirements of the simulation experiment. [b]5 Conclusion[/b] This paper addresses the problem of data sharing between different devices and software in a vehicle transmission system simulation platform based on the Guodian Zhishen EDPF-NT system and MATLAB. A relatively complete solution is provided, realizing data communication within the entire platform. Operation shows that the entire simulation platform runs well, with accurate and rapid data communication, providing assistance for the research of vehicle transmission systems. Editor: He Shiping