A portable dynamometer measuring device
Through the portable dynamometer measurement device, the rotary encoder, magnetoelectric sensor and air pressure sensor are used to collect data, and combined with the microcontroller and touch screen, the high-precision measurement and real-time display of the diesel engine cylinder pressure dynamometer is realized, which solves the problem of low traditional measurement accuracy. and complex data processing problems, improving the efficiency of fault diagnosis.
Patent Information
- Application Number
- CN202211449820.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-18
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2042-11-18
AI Technical Summary
Traditional mechanical dynamometers measure the diesel engine cylinder pressure dynamometer with low accuracy, cannot directly display the P-Φ diagram, and require a computer host computer for data processing, which limits the ship's engineer's real-time understanding of the diesel engine's operating conditions and fault diagnosis.
A portable dynamometer measuring device is designed, which uses a rotary encoder, a magnetoelectric sensor and an air pressure sensor to collect crank angle, top dead center and air pressure signals. It combines the single-chip computer STM32F767IGT6 and the ALIENTEK 7-inch RGB capacitive touch screen to realize human-computer interaction display. , convert the P-Φ diagram into a P-V power display curve through the interval compression method and the connection completion method, providing real-time display.
It achieves high-precision measurement and real-time display of the diesel engine cylinder pressure indicator diagram, is easy to operate, can quickly diagnose faults, and improves the ship's engineer's understanding of the operating status of the diesel engine.
Smart Images

Figure CN115727985B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of fully automated products and relates to a portable dynamometer diagram measuring device. Background Art
[0002] According to incomplete statistics, more than 90% of global commodity trade freight is transported by sea. The shipping industry plays a pivotal role in the process of economic globalization with its strong transportation capacity and low freight rates. The vast majority of ships use marine diesel engines as their main propulsion devices because they have the advantages of wide power application range, compact structure, high thermal efficiency, long service life, and convenient maintenance. It can be said that the development and progress of diesel engine technology affects the "lifeline" of the shipping industry.
[0003] Many universities and research institutions at home and abroad have invested a lot of effort in the development of diesel engine technology, such as using exhaust gas turbocharging technology to improve the utilization rate of diesel engine exhaust energy, using fully electronic control valves and injectors to improve combustion efficiency, etc. At present, modern diesel engine technology has reached a relatively mature level. In the daily use of marine diesel engines, the cylinder pressure indicator diagram is an important reference for ship engineers to master the working conditions of diesel engines. The indicator diagram displays the working process in the cylinder of the diesel engine in the form of an image, and can also be used as a data for studying the process and law of combustion heat release in the cylinder, and can also be used to evaluate the scavenging process of marine diesel engines. Some data show that through a more in-depth analysis of the cylinder pressure indicator diagram, up to 40 types of data information can be obtained. Therefore, accurately measuring the cylinder pressure indicator diagram of the diesel engine is crucial in the performance test of the diesel engine.
[0004] The traditional way to measure the dynamometer is to measure it through a mechanical dynamometer, and what is often obtained is a PV diagram (pressure-volume dynamometer). The dynamometer obtained through a mechanical dynamometer cannot directly display the data, and the image accuracy is not high. With the rapid development of modern microelectronics technology, the high-frequency and high-precision advantages of electronic measurement technology are gradually emerging. The electronic dynamometer can not only display the P-Φ diagram (pressure angle dynamometer) and the PV diagram, but also clearly obtain the accurate pressure value corresponding to each crank angle. Modern large ocean-going ships are equipped with products for measuring diesel engine dynamometer data, and most of them require the use of computer host software to calculate and process the data before display. Summary of the invention
[0005] In order to solve the above problems, the present invention provides a technical solution adopted by the present invention: a portable dynamometer diagram measuring device, comprising:
[0006] Rotary encoder for collecting crank angle signals of ship diesel engines,
[0007] Magnetoelectric sensor for collecting top dead center signal of ship diesel engine,
[0008] n air pressure sensors, a human-machine interactive display module and a controller for respectively collecting the internal air pressure signals of n cylinders of a ship diesel engine;
[0009] The controller simultaneously receives the internal air pressure signal of the ship diesel engine cylinder transmitted by the air pressure sensor, the crank angle signal of the ship diesel engine transmitted by the rotary encoder, and the top dead center signal of the ship diesel engine transmitted by the magnetoelectric sensor, and receives the cylinder firing sequence of the ship diesel engine, the physical parameters of the cylinder and the number of cycles of data collection input based on the human-computer interaction display mode, obtains the P-Φ indicator diagram of the n cylinders of the ship diesel engine, and then combines it with the piston movement law in the diesel engine cylinder to obtain the PV indicator diagram of the n cylinders;
[0010] The human-machine interaction display module receives the P-Φ indicator diagram of n cylinders of the ship diesel engine and the n-cylinder PV indicator diagram transmitted by the controller, and displays the P-Φ indicator diagram of n cylinders of the ship diesel engine and the n-cylinder PV indicator diagram under different working switching modes.
[0011] Furthermore: the single chip microcomputer model used by the controller is STM32F767IGT6.
[0012] Furthermore: the human-computer interaction display module adopts an ALIENTEK 7-inch RGB capacitive touch screen.
[0013] Further: the human-machine interactive display module receives the P-Φ indicator diagram of n cylinders of the marine diesel engine and the PV indicator diagram of n cylinders transmitted by the controller, and displays the P-Φ indicator diagram of n cylinders of the marine diesel engine and the PV indicator diagram of n cylinders in different working switching modes, wherein the PV indicator diagram of diesel engines with different parameters is displayed, including the selection of relative working volume on the horizontal axis;
[0014] First, all the angles collected in one cycle must be converted into volumes;
[0015] Then the relative volume is calculated and the data is processed using the interval compression method and the line completion method;
[0016] The interval compression method is as follows: when the relative volume changes very little and its change value is less than the minimum division value of the horizontal axis, the maximum value of the air pressure between two adjacent minimum division values is selected as the display value of the point on the curve;
[0017] The connecting line completion method is as follows: when the volume change is large, the relative volume change between the two angles exceeds the minimum division value of the horizontal axis, and the intermediate value is completed by connecting the two determined values;
[0018] By using the above method, the P-Φ indicator diagram data is converted into a continuous PV indicator curve.
[0019] Further: the process in which the controller simultaneously receives the internal air pressure signal of the ship diesel engine cylinder transmitted by the air pressure sensor, the crank angle signal of the ship diesel engine transmitted by the rotary encoder, and the top dead center signal of the ship diesel engine transmitted by the magnetoelectric sensor is as follows:
[0020] First, enable the external interrupt of the top dead center signal and the crank angle signal, and start the A / D analog-to-digital conversion channel;
[0021] The digital quantity is converted into analog quantity, and the converted digital quantity will be stored in the ADC_DR regular data register of ADC;
[0022] The top dead center signal external interrupt serves as the start and end points of the entire sampling cycle, and the crank angle signal external interrupt is responsible for reading the air pressure signal from the ADC_DR register;
[0023] In the top dead center signal interrupt, the Capture_State state flag is added. Each time the top dead center signal interrupt service function is executed, the Bool variable Capture_State will perform a negation operation. Only when Capture_State is True will the reception of the crankshaft angle signal external interrupt be enabled. When Capture_State is False, the crankshaft angle signal external interrupt will be disabled and the reading of the air pressure data signal will be stopped.
[0024] The ADC_Temp_Value array is opened on the data stack to receive the temporary data storage array in the ADC_DR register.
[0025] Furthermore: the human-computer interaction display module adopts the MVP architecture.
[0026] The present invention provides a portable dynamometer measuring device, which is mainly aimed at enabling ship engineers to better grasp the operating status of ship diesel engines in real time. If a ship diesel engine fails, the fault factor can be more quickly identified. The system allows ship engineers to use it easily. The system is a portable, easy-to-operate electronic dynamometer for ship diesel engines, which can accurately display the collected information parameters and display the dynamometer curve in real time. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0028] Figure 1 It is the acquisition schematic diagram of the system;
[0029] Figure 2 It is a simplified diagram of the working of the diesel engine cylinder;
[0030] Figure 3 It is an abnormal situation diagram of the null value in the middle of the curve;
[0031] Figure 4 It is a schematic diagram of the interval compression method;
[0032] Figure 5 It is a schematic diagram of the median completion method;
[0033] Figure 6 It is a diagram of the process of obtaining sensor data;
[0034] Figure 7 The framework of the entire interactive program is shown in the figure;
[0035] Figure 8 It is the human-computer interaction display module interface;
[0036] Fig. 9 It is the P-Φ indicator diagram display interface diagram;
[0037] Fig.10 It is the PV indicator diagram display interface diagram;
[0038] Fig.11 This is a data chart of the actual measured power display part of a two-stroke diesel engine;
[0039] Fig.12 This is the schematic diagram of PWM signal generation;
[0040] Fig.13 It is a schematic diagram of the framework of the analog signal generation program. DETAILED DESCRIPTION
[0041] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0042] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. The following description of at least one exemplary embodiment is actually only illustrative and is by no means intended to limit the present invention and its application or use. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0043] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0044] Unless otherwise specifically stated, the relative arrangement of the parts and steps described in these embodiments, the numerical expressions and numerical values do not limit the scope of the present invention. At the same time, it should be clear that, for ease of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship. The technology, methods and equipment known to ordinary technicians in the relevant field may not be discussed in detail, but in appropriate cases, the technology, methods and equipment should be regarded as part of the authorization specification. In all examples shown and discussed here, any specific value should be interpreted as merely exemplary, rather than as a limitation. Therefore, other examples of exemplary embodiments may have different values. It should be noted that similar numbers and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further discussed in subsequent drawings.
[0045] In the description of the present invention, it is necessary to understand that the directions or positional relationships indicated by directional words such as "front, back, up, down, left, right", "lateral, vertical, perpendicular, horizontal" and "top, bottom" are usually based on the directions or positional relationships shown in the drawings. They are only for the convenience of describing the present invention and simplifying the description. Unless otherwise specified, these directional words do not indicate or imply that the device or element referred to must have a specific direction or be constructed and operated in a specific direction. Therefore, they cannot be understood as limiting the scope of protection of the present invention: the directional words "inside and outside" refer to the inside and outside relative to the contours of each component itself.
[0046] For ease of description, spatially relative terms such as "above", "above", "on the upper surface of", "above", etc. may be used here to describe the spatial positional relationship between a device or feature and other devices or features as shown in the figure. It should be understood that spatially relative terms are intended to include different orientations of the device in use or operation in addition to the orientation described in the figure. For example, if the device in the accompanying drawings is inverted, the device described as "above other devices or structures" or "above other devices or structures" will be positioned as "below other devices or structures" or "below their position devices or structures". Thus, the exemplary term "above" can include both "above" and "below". The device can also be positioned in other different ways (rotated 90 degrees or in other orientations), and the spatially relative descriptions used here are interpreted accordingly.
[0047] In addition, it should be noted that the use of terms such as "first" and "second" to limit components is only for the convenience of distinguishing the corresponding components. If not otherwise stated, the above terms have no special meaning and therefore cannot be understood as limiting the scope of protection of the present invention.
[0048] A portable dynamometer diagram measuring device, comprising: a rotary encoder, a magnetoelectric sensor, n air pressure sensors, a controller and a human-computer interaction display module;
[0049] The rotary encoder collects the crank angle signal of the ship diesel engine, the magnetoelectric sensor collects the top dead center signal of the ship diesel engine, and the n air pressure sensors collect the internal air pressure signals of the n cylinders of the ship diesel engine respectively; the number of n is determined by the structure of the ship diesel engine, n=6 or 8;
[0050] Figure 1 It is the acquisition schematic diagram of the system;
[0051] The controller simultaneously receives the internal air pressure signal of the ship diesel engine cylinder transmitted by the air pressure sensor, the crank angle signal of the ship diesel engine transmitted by the rotary encoder, and the top dead center signal of the ship diesel engine transmitted by the magnetoelectric sensor, and receives the cylinder firing sequence of the ship diesel engine, the physical parameters of the cylinder and the number of cycles of data collection input based on the human-computer interaction display mode, obtains the P-Φ indicator diagram of the n cylinders of the ship diesel engine, and then combines it with the piston movement law in the diesel engine cylinder to obtain the PV indicator diagram of the n cylinders;
[0052] The human-machine interaction display module receives the P-Φ indicator diagram of n cylinders of the ship diesel engine and the n-cylinder PV indicator diagram transmitted by the controller, and displays the P-Φ indicator diagram of n cylinders of the ship diesel engine and the n-cylinder PV indicator diagram under different working switching modes.
[0053] The different working switching modes include a two-stroke mode button and a four-stroke mode;
[0054] The single-chip microcomputer model used in the controller is STM32F767IGT6. The STM32F767IGT6 single-chip microcomputer is a high-performance microcontroller based on the ARM Cortex-M7 core. It uses a 90nm process, has an operating frequency of up to 216MHz, and has a 6-stage super-standard pipeline. This means that compared with single-chip microcomputers based on Cortex-M3 and Cortex-M4 cores, its one clock cycle can process more instructions and the clock cycle is shorter. Cortex-M7 uses a tightly coupled memory technology TCM (Tightly-Coupled Memory (TCM) interfaces), which allows program code to be precisely controlled compared to cache. In terms of floating-point operations, the DSP (Digital Signal Processing) of Cortex-M7 improves the precision of floating-point operations from single precision to double precision compared to the DSP of Cortex-M4.
[0055] The STM32F767IGT6 microcontroller has also made great improvements in peripheral interfaces. It supports the FMC (Flexible memory controller) interface, which enables the microcontroller to support up to 256MB of external SDRAM (synchronous dynamic random-access memory). Such a large-capacity SDRAM can support the output of richer image data. The STM32F767IGT6 microcontroller also has a DMA2D controller (Chrom-Art Accelerator TM The Chrom-Art accelerator is a DMA dedicated to image data operations. When using an LCD (Liquid Crystal Display) screen, this technology uses a dedicated DMA for data communication, eliminating the need for the MCU to access the cache to update the image data.
[0056] The human-computer interaction display module adopts ALIENTEK 7-inch RGB capacitive touch screen, adopts parallel 24-bit RGB interface, supports RGB888 color depth and is compatible with RGB565. The screen touch chip is a stable FT5426 chip, and the touch communication adopts IIC communication interface, which supports up to 5 points of simultaneous touch. The 7-inch large screen with a resolution of 800*480 can display clear images.
[0057] The measurement principle of the electronic dynamometer diagram is as follows: The two most commonly used dynamometer diagrams are the P-Φ diagram and the PV diagram. The PV diagram can be calculated by combining the P-Φ diagram with the cylinder diameter, stroke length, connecting rod length and compression ratio of the diesel engine cylinder. The basic requirement for measuring the diesel engine cylinder dynamometer diagram is to obtain the cylinder internal pressure signal and the crankshaft angle signal synchronously.
[0058] In order to obtain the internal cylinder pressure at different crank angles within a cycle, at least three signals need to be measured. They are the cylinder internal pressure signal, crank angle signal and top dead center signal. This measurement system adopts the equal crank angle measurement method, and uses the rotary encoder to use the crank angle as the microcontroller to trigger the air pressure sensor to perform sampling. The rotary encoder will generate a fixed number of pulse signals for each rotation, which will not be affected by the change of diesel engine crankshaft speed like the equal time interval sampling method. Through the equal crank angle measurement method, the system will sequentially obtain the P-Φ graph data within a working cycle.
[0059] The function of the top dead center signal is to serve as the start and end signals of a working cycle during the data collection process. The drawing of the indicator diagram often collects the internal air pressure data of the cylinder within a whole working cycle. There are many ways to collect the top dead center signal, such as installing a wedge-shaped magnetic material at the top dead center of the cam mark of the ship diesel engine (usually the top dead center position of the first cylinder of the diesel engine), and then detecting the arrival of the wedge-shaped magnetic material through the magnetoelectric sensor installed opposite this place, and sending an electric pulse signal of the arrival of the top dead center. Using thermodynamic experience in engineering applications, the measurement of the top dead center is determined by calculating the coordinates of the air pressure values on both sides of the air pressure peak to determine the position of the top dead center. For the electronic indicator diagram measurement system that can realize the measurement of multi-cylinder indicator diagrams, it is also necessary to combine the cylinder ignition sequence of the ship diesel engine to calculate the phase difference of the working cycle of each cylinder and obtain the top dead center position of other cylinders.
[0060] Furthermore, the conversion principle from P-Φ diagram to PV diagram is as follows:
[0061] The working volume V of the diesel engine cylinder a It refers to the volume swept by the piston in the cylinder from the bottom dead center to the top dead center. When the diesel engine is working, when the piston reaches the top dead center, there is a certain clearance volume V between the top of the piston and the cylinder head. c Therefore, the cylinder volume V is the working volume V a and clearance volume V c The sum of the two. The geometric compression ratio ε of the cylinder is an important parameter of the diesel engine. It is the ratio of the cylinder volume to the clearance volume. This parameter is not only used in the PV diagram conversion, but also reflects the power performance of the diesel engine. The schematic diagram of the diesel engine cylinder is as follows Figure 2 As shown;
[0062] The relationship between the volume enclosed by the piston top, cylinder head and cylinder wall and the crankshaft angle (Φ) can be expressed as:
[0063]
[0064] V=V a +V c (2)
[0065]
[0066]
[0067] In the formula: the top dead center is the starting point of the circular motion, that is, Φ = 0, V, V a 、V c The total volume, working volume and clearance volume (L) of the cylinder that change respectively; Φ represents the crankshaft angle (°C A); Ε represents the geometric compression ratio, D represents the cylinder diameter (m), S represents the piston stroke (m), and λ represents the connecting rod crankshaft ratio.
[0068] The working volume V of the diesel engine cylinder a It refers to the volume swept by the piston in the cylinder from the bottom dead center to the top dead center. When the diesel engine is working, when the piston reaches the top dead center, there is a certain clearance volume V between the top of the piston and the cylinder head. c Therefore, the cylinder volume V is the working volume V a and clearance volume V c The geometric compression ratio ε of the cylinder is an important parameter of the diesel engine. It is the ratio of the cylinder volume to the clearance volume. This parameter is not only used in the PV diagram conversion, but also reflects the power performance of the diesel engine.
[0069] Further: the human-machine interactive display module receives the P-Φ indicator diagram of the n cylinders of the marine diesel engine and the PV indicator diagram of the n cylinders transmitted by the controller, and displays the P-Φ indicator diagram of the n cylinders of the marine diesel engine and the PV indicator diagram of the n cylinders in different working switching modes, wherein the PV indicator diagram of the diesel engine with different parameters is displayed.
[0070] From formula (4), we know that each Φ angle in a cycle corresponds to a volume. The data of the P-Φ graph can be calculated by the formula to obtain a set of air pressure values corresponding to the volume at each angle.
[0071] Furthermore, the PV dynamometer diagram conversion software implementation method is as follows:
[0072] The line drawing function divides a curve into evenly spaced points, draws these points, and then connects them to form a continuous curve. If the middle points are not assigned values, the program cannot automatically fill them with reasonable values. The whole curve will appear as follows: Figure 3 The abnormal situation diagram of the null value in the middle of the curve shown;
[0073] After the direct conversion by formula (3), the volume parameter intervals corresponding to each angle are different, and in order to conveniently display the PV indicator diagram of diesel engines with different parameters on the display screen, the horizontal axis selects the relative working volume. When inputting different diesel engine cylinder parameters, the horizontal axis of the PV indicator diagram is Vr∈[0~100%]. In this way, the use of relative volume processing also avoids the situation where the volume parameter value is too small.
[0074] After the volume parameters are processed relatively, the intervals between them are still unequal. The working volume changes very little when the Φ angle is around 0° and 180°, and changes greatly when it is around 90° and 270°.
[0075] On the display screen, the most accurate display method of the curve is to display one value per pixel. If a display area of 500 pixels is reserved for the PV indicator diagram, the minimum scale value of the horizontal axis is 0.2% Vr. The relative volume change of two angles near 0° is less than 0.2%, while the volume change of two angles near 90° is as high as 0.87%. Therefore, direct use of volume parameters will result in local data point compression and local data vacancies.
[0076] The pressure changes greatly near 0°, but the relative volume changes very little, and its change value is less than the minimum scale value of the horizontal axis. In order to ensure the accuracy of the maximum explosion pressure of the PV indicator diagram, the maximum pressure between two adjacent minimum scale values is selected as the display value of the point on the curve. Figure 4 This is a schematic diagram of the interval compression method.
[0077] When the volume changes greatly, the relative volume change between the two angles exceeds the minimum division value of the horizontal axis. In order to ensure the continuity of the curve drawing function, the method of connecting the two determined values to complete the intermediate value is adopted. Figure 5 This is a schematic diagram of the median completion method. By using the above method, the P-Φ indicator diagram data can be converted into a continuous PV indicator curve from the software.
[0078] Figure 6It is a process diagram for obtaining sensor data; in order to prevent the real-time update of a large amount of data from occupying a large amount of microcontroller running memory and causing the program to run slowly, the data acquisition program adopts the method of collecting data when needed. When the user issues a collection request, the entire collection program starts running. First, the external interrupt of the top dead center signal and the external interrupt of the crankshaft angle signal are enabled, and the A / D (analog-to-digital conversion) channel is turned on. After turning on the A / D conversion channel, the ADC of the microcontroller can start converting the analog quantity, and the converted digital quantity will be stored in the ADC_DR (rule data register) of the ADC. If the converted result is not read, it will be overwritten by the new converted digital quantity. Keeping the A / D channel of the microcontroller turned on can save the time of repeatedly turning on the A / D channel and reduce the delay when reading the air pressure signal data.
[0079] The top dead center signal external interrupt is used as the start and end point of the entire sampling cycle, and the crank angle signal external interrupt is specifically responsible for reading the air pressure signal from the ADC_DR register. From a logical point of view, when the top dead center arrives, the MCU should immediately start reading the air pressure signal value. When the next top dead center signal arrives, the MCU does not need to read the air pressure signal data. Therefore, the interrupt priority of the former is higher than the latter, which means that the top dead center signal interrupt can interrupt the reading of the crank angle signal.
[0080] For the convenience of control, the Capture_State status flag is added to the program in the top dead center signal interrupt. Each time the top dead center signal interrupt service function is executed, the Bool variable Capture_State will perform a negation operation. (Bool variables have only two values, True or False) Only when Capture_State is True will the reception of the crankshaft angle signal external interrupt be enabled. When Capture_State is False, the crankshaft angle signal external interrupt will be disabled and the reading of the air pressure data signal will stop.
[0081] Adhering to the "fast in, fast out" principle of the interrupt service function, the program opens up the ADC_Temp_Value array on the data stack to receive the temporary data storage array in the ADC_DR register. The data in the ADC_Temp_Value array cannot be used directly, and the subsequent data processing is performed by the data processing program.
[0082] The data acquisition program also supports multi-cycle continuous acquisition. The program provides a parameter interface for users to input the number of continuous sampling cycles. Users can adjust the number of continuous data sampling cycles according to their needs.
[0083] Furthermore, the human-computer interaction display module adopts the MVP architecture. The MVP architecture is a program architecture for generating software for GUI (Graphical User Interface) development using Touch GFX software. The MVP architecture is currently the most advanced GUI program architecture, and Google is currently promoting this architecture. MVP refers to the three layers of Model, View, and Presenter.
[0084] The View layer is the view layer. The main function of the code in this layer is to control the display of the interface and provide users with good interface interaction. The Model layer is the data layer. The main function of the code in this layer is to serve as a database. It is the "communication bridge" for data between the entire GUI program and other programs on the microcontroller. The role of the Present layer is to serve as a "communication bridge" for data between the Model layer and the View layer.
[0085] Take the application in this system as an example. View1 wants to display the P-Φ curve. In the View, the pointer present needs to be used to call the public members (variables, functions, etc.) in the Present object. (Usage in the View layer is as follows: model->Return_PressuerSignal) Functions in the Present layer can use the model pointer to use the public members (variables, functions, etc.) in the model object, but the model pointer cannot be used directly in the view. (Usage in the Present layer is as follows: model->Return_PressuerSignal)
[0086] When data is actively transferred from the Model layer to the View layer, the modelListener pointer in the architecture is needed. The modelListener pointer always points to the interface that the user is currently using, so when the GUI program has multiple interfaces, there will be no problem of transferring the wrong object when transferring data from the Model to the View. In the Model, the pointer modelListener is used to call the public members (variables, functions, etc.) in the Present object. (Usage in the Model layer is like: modelListener->Renew()). In the Present layer, the public members can be directly called through the view object. (Usage in the Present layer is like: view.Renew()).
[0087] When switching interfaces, all the data used by controls in the interface will be destroyed. Before each interface is displayed, the setupscreen() function is automatically called in the View layer, through which the controls to be used in the screen can be constructed. When switching interfaces, the teardown() function is automatically called in the View layer, through which the data that needs to be retained in the interface can be transferred to the Model layer for storage. The next time you return to the interface, the setupscreen() function can obtain data from the Model and restore the user's usage status before destruction.
[0088] In this way, dividing the entire program into modules can greatly reduce the difficulty of understanding the code. Separating the graphics display code from the data storage and data logic operation code also makes it easier to correct errors, adjust parameters, and expand functions when debugging the program.
[0089] The human-computer interaction display module, the framework of the entire interactive program is as follows Figure 7 As shown, there are 5 display interfaces in total. You can switch to different interfaces by pressing the buttons in the display interface. The black arrows in the figure are the switching paths of the interfaces.
[0090] The human-computer interaction display module interface is as follows Figure 8 As shown;
[0091] The start interface of the human-computer interaction display module is mainly responsible for collecting the parameters to be used by the entire system. The number of collection cycles is a parameter for setting how many cycles are collected continuously at a time when data is collected. The parameters required for the conversion from P-Φ to PV diagram are cylinder diameter, stroke length, cylinder compression ratio, and connecting rod length. The cylinder firing sequence is a parameter used to calculate and estimate the top dead center position of other cylinders of the diesel engine. The digital keyboard function is used to input values to each parameter in the interface. The function of the two-stroke mode button and the four-stroke mode button is to switch to the appropriate P-Φ diagram display interface. The function of the small boat button is to clear the data in the interface.
[0092] The way to input each parameter on the interface is to touch the area to be input first to select it. A green border will appear around the selected input box. Then use the numeric keys on the right side of the interface to input numbers, and finally press the enter key to enter the parameters into the input box. Among the 6 parameters on the screen, considering that the firing order of the cylinders is a random arrangement of numbers 1-6, the program sets parameter judgment here. If an unreasonable firing order is entered, the input box will not be completed.
[0093] Through the data transmission route described in the MVP program architecture, when entering the two-stroke (or four-stroke mode) switching interface, the parameters entered by the user in the interface are transferred to the Model for storage through the teardown() function in the View. When the user needs to modify the parameters again, return to the start interface, and the setupscreen() function of the View will obtain the stored relevant parameters from the Model for display. To facilitate the user to reset the data, the small boat button in the upper right corner of the interface can clear the number of the entire page input box to 0.
[0094] The P-Φ indicator diagram display interface is as follows Fig. 9 As shown;
[0095] The curve display area in the P-Φ indicator diagram display interface has a horizontal axis value range of -180° to 180° for the angle axis, and a vertical axis value range of 0-15MPa for the air pressure value. The minimum scale of the horizontal axis is 0.5°, and the minimum scale of the vertical axis is 0.01MPa. Each signal curve has 720 data points. The colored digital buttons in the interface control the acquisition switch from different signal sources. Each digital button controls the signal curve of the same color, and each digital button uses a different color to facilitate the distinction when reading the signal. The function of the double arrow cycle button is to refresh the data of the signal source that has been turned on. An information query bar is set in the interface. The query button controls the switch of the query function and is equipped with a small light icon to display the switch status of the query function. The selection of the cylinder number is completed by sliding the list, and the cylinder air pressure value corresponding to the crank angle of the queried data will be displayed in their respective information display boxes. The maximum burst pressure is a commonly used parameter. When the spark-shaped button is turned on, the function of one-click query of the maximum burst pressure can be realized. The house-shaped button is used to return to the main page, and the right-pointing triangle button is used to switch to the PV indicator diagram display interface.
[0096] When entering this interface, touch the digital button to start the collection of air pressure data. When the data collection is completed, the corresponding curve will be displayed in the curve display area. The query function can only be used normally when the signal collection switch is turned on, that is, when there is a signal display. Otherwise, touching and pressing the query button will not turn on the query function, and the light icon will remain black. The light icon lights up, indicating that the query function can be used normally. When the query function is normal, the light icon lights up, and the cylinder number number is slid up and down to select the cylinder to be queried. Press the spark button and the maximum explosion pressure of the cylinder in one working cycle will be displayed.
[0097] The PV indicator diagram display interface is as follows: Fig.10 As shown;
[0098] This interface is similar to the P-Φ indicator diagram interface. Due to the characteristics of the PV indicator diagram, the PV indicator diagram is not drawn from zero due to the existence of the clearance volume. The volume parameters are processed proportionally through the parameters entered in the start interface, and the boundaries of the PV indicator curve are marked by the relative volume minimum line and the relative volume maximum line. The 6-color digital buttons and query function keys are the same as the P-Φ indicator diagram display interface.
[0099] The process of debugging and testing the dynamometer electronic measurement system is as follows:
[0100] S1: Perform signal source simulation on the dynamometer electronic measurement system;
[0101] S11: simulating the air pressure signal;
[0102] The air pressure sensor converts the air pressure signal inside the cylinder into an electrical signal, which is then converted into an analog voltage signal of 0-3.3V in proportion by the voltage regulating circuit, and finally received by the ADC channel of the microcontroller after analog-to-digital conversion. The air pressure signal can be simulated using the DAC (digital-to-analog converter) of the microcontroller.
[0103] The air pressure signal is an analog signal, and the signals used in the microcontroller are all digital signals. The DAC built into the STM32F767 microcontroller can convert digital signals into analog signals. The DAC supports 12-bit or 8-bit output, which means that the voltage value between 0-3.3V is evenly divided into 2 12 (4096) copies or 2 8 (256) copies.
[0104] Fig.11 This is a data chart of the actual measured power indicator part of a two-stroke diesel engine;
[0105] The air pressure data corresponding to each crank angle can be obtained by formula (5) to obtain the digital value transmitted to the DAC. If the air pressure value 0-15MPa is used as the range of air pressure measurement, after calculation, the DAC selects 8 bits for output, and the minimum division value of the voltage analog signal is about 0.06MPa. If the output bit is selected as 12 bits, the minimum division value of the voltage analog signal is about 0.0037MPa. In order to ensure that the accuracy of the analog pneumatic electrical signal output reaches 0.01MPa, the DAC selects 12-bit data output.
[0106]
[0107] In the formula: value represents the digital quantity input to DAC, P represents the air pressure data, and bit represents the number of DAC output bits;
[0108] S12: simulating the crankshaft angle signal and the top dead center signal;
[0109] The crankshaft angle signal is a square wave signal. The PWM wave signal can be generated by using the timer of the microcontroller, and then the frequency and duty cycle parameters of the signal can be appropriately adjusted to complete the simulation of the crankshaft angle signal.
[0110] The principle of PWM signal generation is as follows Fig.12 As shown in the figure, when the internal timer of the microcontroller is turned on, the internal counter will continue to count. The timer can be set to count upward from 0. When the count value is equal to the preset comparison value, the PWM signal output pin will instantly jump from low level to high level until the count value reaches the set upper limit value, and then the next cycle will be started. By setting the counting cycle, comparison value and counting frequency to the internal timer of the microcontroller, the expected simulated crank angle square wave signal can be obtained.
[0111] The top dead center signal is a sharp pulse signal generated by a magnetoelectric sensor. The principle of the dynamometer measurement system receiving this signal is to use the rising edge jump of its electrical signal to trigger the top dead center external interrupt service function. Therefore, the simulated top dead center signal can also be simulated by a low-frequency square wave signal.
[0112] S13: The process of implementing the air pressure signal, the crankshaft angle signal and the top dead center signal is as follows:
[0113] like Fig.13 As shown in the figure, the diesel engine simulated gas pressure signal, simulated crank angle signal and simulated top dead center signal are realized by using the timer and DAC (analog-to-digital converter) of the single-chip microcomputer. When the diesel engine is in working state, the gas pressure signal, crank angle signal and top dead center signal are generated synchronously. This feature must be realized when using the single-chip microcomputer to simulate these three signals.
[0114] The timer of the microcontroller can not only generate PWM signals, but also generate an overflow interrupt event at the end of a counting cycle. From the above PWM signal generation principle, it can be seen that a rising edge of an electrical signal can be generated within a counting cycle of the timer. When the emitted electrical signal has a rising edge jump, it is equivalent to the diesel engine crankshaft turning a small angle in reality. The overflow interrupt of the timer can be used to trigger the conversion of the DAC and emit an analog pneumatic electrical signal. Therefore, it is only necessary to make the position of the rising edge of the PWM signal as close as possible to the end of the cycle, so that the analog pneumatic electrical signal can be emitted while emitting the crankshaft angle analog signal.
[0115] In the program, timer 1 is responsible for outputting analog top dead center signal and controlling DAC conversion cycle and shutdown. Timer 2 is responsible for outputting analog crank angle signal and triggering DAC to perform analog-to-digital conversion on air pressure data. DAC is responsible for analog-to-digital conversion and outputting analog air pressure electrical signal. After timer 1 transmits the cycle start signal to DAC, each overflow interrupt of timer 2 will trigger DAC to sequentially convert air pressure data. When the next cycle start signal arrives, each overflow interrupt of timer 2 will re-trigger DAC to sequentially convert air pressure data.
[0116] S2: Optimize the simulation experiment and data of the dynamometer measurement;
[0117] S21: Setting parameters of the analog signal;
[0118] Table 1 Diesel engine parameters of simulation experiment
[0119]
[0120] The basic parameters of the diesel engine used in this experiment (as shown in Table 1) and the cylinder pressure data when the diesel engine is working (as shown in Table 2). It can be calculated from these parameters that the frequency of the analog top dead center electrical signal is 2Hz. Considering that the minimum division value of the crankshaft angle coordinate is 0.5° in the two-stroke mode on the display side, and considering the memory size issue. The frequency of the analog crankshaft angle electrical signal is set to 1440Hz. The parameters set for timer 1 and timer 2 of the single-chip microcomputer are shown in the following table.
[0121]
[0122]
[0123] The air pressure analog signal, crank angle analog signal and top dead center analog signal output by the single chip are displayed by an oscilloscope. The results displayed on the oscilloscope meet the requirements of the simulation experiment.
[0124] S22: Processing of air pressure signal data
[0125] The simulation measurement experiment is carried out in an indoor laboratory environment. The portable dynamometer measurement system collects the air pressure analog signal, crank angle analog signal and top dead center analog signal output by the microcontroller. The pins of the two microcontrollers are connected by ordinary DuPont wires.
[0126] In the experiment, the power measurement system collected three signals many times. The power curve displayed on the screen was not smooth and had interference signals, but the power curve did not shift in phase. The experimental phenomenon shows that when collecting the air pressure analog electrical signal, it was interfered by the high-frequency signal in the room. The power curve did not shift in phase, indicating that the effect of the top dead center analog electrical signal was not affected by the weak delay effect of analog-to-digital conversion and digital-to-analog conversion.
[0127] S23: Data processing algorithm
[0128] (1) Calculation of the mean air pressure at the same rotation angle.
[0129] After the digital filter removes the high-frequency clutter signal in the room during the measurement experiment, the collected data will have a slight fluctuation. In order to improve the accuracy of data collection, a continuous signal source is used for multiple sampling, and finally the average value of the air pressure data of different cycles at the same crankshaft angle in one cycle is obtained. This data group is used as the data displayed on the final dynamometer curve. The calculation formula is as follows:
[0130]
[0131] Where: P Φ AV It represents the average value of pressure data of different cycle pressures at the same crankshaft angle; P Φ j It indicates the pressure data of different cycles under the same crankshaft angle; n indicates the number of cycles;
[0132] (2) Sliding average low-pass filtering
[0133] If the data after multi-cycle crank angle mean processing is directly used for display, the final collected data will be affected by high-frequency random noise, resulting in uneven fluctuations in the displayed curve. Low-pass digital filtering is usually used to filter high-frequency random signals from the power data curve to make the final displayed curve closer to reality. When low-pass filtering is performed on the data, the filtering is mainly performed on the sawtooth segment, and at the same time, it must be ensured that the peak of the curve is not excessively weakened by smoothing, which affects the accuracy of the maximum burst pressure measurement.
[0134] The calculation formula of the sliding average low-pass filter method used in this measurement system is as follows (taking 6 sampling periods as an example):
[0135]
[0136]
[0137]
[0138]
[0139]
[0140] In the formula: Y represents the original data, Y′ represents the smoothed data, and n represents the total number of data;
[0141] The sliding average low-pass filter algorithm processes the array from front to back. The length of the sampling period will have a great impact on the filtering effect. The filtering effect of a short period is weaker, and it has a weaker impact on the high-frequency components of the real signal. In the application, it can weaken the impact of the filtering algorithm on the real air pressure value in the combustion stage, but the overall filtering effect is not good and more sawtooth fluctuations will appear. The filtering effect of a long period is stronger, and it can restore the low-frequency signal in the real signal very well, but it has a great impact on the high-frequency signal in the real signal.
[0142] S24: Conduct simulation measurement experiment
[0143] After calculating the air pressure values of the same crankshaft angle for multiple cycles, the fluctuation of the data measured multiple times has been much smaller. Due to the characteristics of the sliding average low-pass filter algorithm, this system chooses the method of multiple segmented filtering. First, the sliding average low-pass filter with a sampling period of 14 is selected for the air pressure data of the entire cycle. At this time, the air pressure value in the range of 15° before the top dead center to 30 degrees after the top dead center is less affected by the filtering while eliminating noise fluctuations. Then, the sliding average low-pass filter with a sampling period of 32 is selected for the two intervals of crankshaft angle -180° to -15° and 30° to 180°. The sampling period is set to more than 40, and the data collected multiple times is relatively stable and is closer to the true value after filtering.
[0144] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A portable dynamometer measuring device, characterized in that: include: Rotary encoder for collecting crank angle signals of ship diesel engines, Magnetoelectric sensor for collecting top dead center signal of ship diesel engine, n air pressure sensors, a human-machine interactive display module and a controller for respectively collecting the internal air pressure signals of n cylinders of a ship diesel engine; The controller simultaneously receives the internal air pressure signal of the ship diesel engine cylinder transmitted by the air pressure sensor, the crank angle signal of the ship diesel engine transmitted by the rotary encoder, and the top dead center signal of the ship diesel engine transmitted by the magnetoelectric sensor, and receives the cylinder firing sequence of the ship diesel engine, the physical parameters of the cylinder and the number of cycles of data collection based on the input of the human-computer interaction display module, obtains the P-Φ indicator diagram of the n cylinders of the ship diesel engine, and then converts it into the PV indicator diagram of the n cylinders in combination with the piston movement law in the diesel engine cylinder; The human-machine interactive display module receives the P-Φ indicator diagram of the n cylinders of the marine diesel engine and the PV indicator diagram of the n cylinders transmitted by the controller, and displays the P-Φ indicator diagram of the n cylinders of the marine diesel engine and the PV indicator diagram of the n cylinders in different working switching modes, wherein the PV indicator diagram of the diesel engine with different parameters is displayed, including the selection of the relative working volume on the horizontal axis; First, all the angles collected in one cycle must be converted into volumes; Then the relative volume is calculated and the data is processed using the interval compression method and the line completion method; The interval compression method is as follows: when the relative volume changes very little and its change value is less than the minimum division value of the horizontal axis, the maximum value of the air pressure between two adjacent minimum division values is selected as the display value of the point on the curve; The connecting line completion method is as follows: when the volume change is large, the relative volume change between the two angles exceeds the minimum division value of the horizontal axis, and the intermediate value is completed by connecting the two determined values; By using the above method, the P-Φ indicator diagram data is converted into a continuous PV indicator curve; The human-machine interaction display module receives the P-Φ indicator diagram of n cylinders of the ship diesel engine and the PV indicator diagram of n cylinders transmitted by the controller, and displays the P-Φ indicator diagram of n cylinders of the ship diesel engine and the PV indicator diagram of n cylinders in different working switching modes; The process in which the controller simultaneously receives the internal air pressure signal of the ship diesel engine cylinder transmitted by the air pressure sensor, the crank angle signal of the ship diesel engine transmitted by the rotary encoder, and the top dead center signal of the ship diesel engine transmitted by the magnetoelectric sensor is as follows: First, enable the external interrupt of the top dead center signal and the crank angle signal, and start the A / D analog-to-digital conversion channel; The analog quantity is converted into digital quantity, and the converted digital quantity will be stored in the ADC_DR regular data register of ADC; The top dead center signal external interrupt serves as the start and end points of the entire sampling cycle, and the crank angle signal external interrupt is responsible for reading the air pressure signal from the ADC_DR register; In the top dead center signal interrupt, the Capture_State state flag is added. Each time the top dead center signal interrupt service function is executed, the Bool variable Capture_State will perform a negation operation. Only when Capture_State is True will the reception of the crankshaft angle signal external interrupt be enabled. When Capture_State is False, the crankshaft angle signal external interrupt will be disabled and the reading of the air pressure data signal will be stopped. The ADC_Temp_Value array is opened on the data stack to receive the temporary data storage array in the ADC_DR register; The process of debugging and testing the dynamometer measurement device is as follows: S1: Perform signal source simulation on the dynamometer measurement device; S11: simulating the air pressure signal; S12: simulating the crankshaft angle signal and the top dead center signal; S13: The process of implementing the air pressure signal, the crankshaft angle signal and the top dead center signal is as follows: The diesel engine simulated pneumatic signal, simulated crank angle signal and simulated top dead center signal are realized by using the timer and DAC of the single chip microcomputer; when the diesel engine is in working state, the pneumatic signal, crank angle signal and top dead center signal are generated synchronously; The timer of the single-chip microcomputer can not only generate PWM signals, but also generate an overflow interrupt event at the end of a counting cycle. From the above PWM signal generation principle, it can be seen that a rising edge of an electrical signal can be generated within a counting cycle of the timer; when the emitted electrical signal has a rising edge jump, it is equivalent to the diesel engine crankshaft turning a small angle in reality; the overflow interrupt of the timer can be used to trigger the conversion of the DAC and emit an analog pneumatic electrical signal. Therefore, it is only necessary to make the position of the rising edge of the PWM signal as close as possible to the end of the cycle, so that the analog pneumatic electrical signal can be emitted while emitting the crankshaft angle analog signal; S2: Optimize the simulation experiment and data of the dynamometer measurement; S21: Setting parameters of the analog signal; S22: Processing air pressure signal data; S23: calculation of the mean value of the air pressure at the same rotation angle and sliding average low-pass filtering; S24: Conduct a simulation measurement experiment.
2. A portable dynamometer measuring device according to claim 1, characterized in that: The single chip microcomputer model used in the controller is STM32F767IGT6.
3. A portable dynamometer measuring device according to claim 1, characterized in that: The human-computer interaction display module adopts ALIENTEK 7-inch RGB capacitive touch screen.
4. A portable dynamometer measuring device according to claim 1, characterized in that: The human-computer interaction display module adopts the MVP architecture.
