地址:999 Nanhuan West Road, Jiangyan District, Taizhou City, Jiangsu Province
电话:15252656781
邮箱:1907913533@qq.com
传真:0523-88151068
网址:http://www.jspydl.com
Diesel generator set, speed control, semi physical simulation
1 Introduction
The electronic governor is one of the key parts of diesel engine, and the performance of the actual load when the engine changes and does not match the design parameters of governor, diesel generator will not work, then need to modify the control parameters of governor. In addition, the performance test of the electronic governor before and after the factory is required to set the appropriate control parameters to meet its regulatory performance. It is neither safe nor economical to perform the parameter tuning, performance test and performance recovery of the electronic governor directly on the diesel engine. A semi physical simulation system before the actual test is an indispensable link of the governor, the idea is to build a full range of engineering work dynamic simulation model of diesel generator, connected by input and output interface circuit and the electronic governor to form a closed loop control system, from the relevant test and the completion of the electronic governor.
The simulation model of diesel generator set is the strength of Simulink. The semi physical simulation system need to be connected to specific hardware equipment, simulation programs need to customize the man-machine interface parameter settings and other functions, to achieve this function for Simulink is difficult to complete, which is Visual C++ (VC). VC visual C++ programming environment has powerful hardware control function and flexible and rich man-machine interface design function. But it is very difficult to build a simulation model of diesel generator directly using VC.
To solve this problem, this paper provides a method of smoothing from Simulink simulation model to Visual C++ integrated development environment. The specific implementation is to establish simulation model of diesel generator in Simulink, and then through the Matlab real-time workshop (RTW) Simulink simulation model is transformed into a portable embedded C++ code, and finally the Visual C++ project file integration constitute independent operation of real time semi physical simulation system.
Model construction of 2 diesel generator set and structure of semi physical simulation system
There are 2 ways of modeling diesel engines, one is mathematical mechanism modeling, and the other is experimental identification modeling. Starting with the mathematical mechanism modeling main original characteristics and structural parameters from the parts of the diesel engine, the model according to the mechanism of modeling dynamics and thermodynamics equation of the heavy workload, but also for the calculation of complex model brings certain difficulty. The test identification modeling is based on the test data of diesel engine test bench, and the mathematical model of diesel engine is established by different mathematical fitting method. For the study of electronic governor parameter tuning and engine test, the relationship between the external performance parameters of diesel engine and the internal thermal process of diesel engine can be neglected. As long as the diesel generator simulation model can simulate the diesel engine and its load characteristics more realistically, the test results can reflect the actual performance of the electronic governor more realistically.
Therefore, the test identification modeling method is applied, and the BP neural network is used to establish the diesel generator set model. As shown in figure 1. There are 3 main types of input and output signals for MTU396 diesel generator set:
(1) pulse width modulation (PWM) signal, that is, the actuator rack drive signal;
(2) frequency signal, that is analog diesel speed pulse signal;
(3) switch signal, that is, the electronic governor of all kinds of control signals, such as start, stop, speed up, deceleration control.
This system uses PCI-1780 counter Advantech card, he provides 8 16 bit counter channel 8 digital output and 8 digital input, can meet the needs of. As shown in figure 2.
Diesel generator, card was Jie diesel generator, diesel generator set, Cummins diesel generator, Weifang Diesel generator sets, silent diesel generator sets, mobile trailer diesel generator
Implementation of 3 semi physical simulation system
3.1 using RTW to generate portable C++ model code
RTW is an important supplementary functional module of the Matlab graphical modeling and simulation environment Simulink. In short, he is a Simulink based code automatic generation environment. He can produce optimized, portable code directly from the Simulink model to speed up the development of simulation systems and reduce research and development costs.
RTW can Simulink model in some parameters or signal settings as global variables, model of automatic generation of executable code running on the target system, can easily interact with the Simulink model, the realization of online parameter adjustment and signal communication. Using the RTW function, you can set parameters or signals that need to be adjusted and monitored in the model to be global variables. These variables form the bridge between modules in the subsequent VC simulation program.
RTW supports a variety of goals, so RTW automatically generates C++ model code with a variety of options; for VC, there are 3 goals to choose: universal, real-time (GRT) goals, generic real-time Malloc (GRTM) goals, and embedded targets. The general purpose real-time (GRT) target uses a real-time code format whose memory allocation is statically declared at compile time. The universal real time Malloc (GRTM) target uses a real-time Malloc code format that is very similar to the real-time code format, with the main difference from the real-time malloc code format for dynamic declarations of memory. Embedded targets can generate C++ code in embedded code format, which is optimized in terms of speed, memory usage, and simplification. Embedded code uses static memory allocation. In this paper, embedded targets are selected to automatically generate embedded code.
RTW automatically generated code is divided into 2 parts: part of the model code; the other part is the code running interface (run-ti