Engine test data classification method, electronic device and readable storage medium
1. An engine test data classification method, characterized by comprising:
obtaining engine test data, and resampling the engine test data according to a set sampling frequency to form a first array;
sorting the data in the first array from small to large to form a second array;
dividing the second array into a plurality of test windows;
and sequentially judging the stability of the data in each test window so as to detect multiple groups of running interval values in the second array according to the stability of the data in each test window, and sequentially outputting the multiple groups of running interval values to form a final array.
2. The engine test data classification method of claim 1, wherein, prior to sequentially determining the stability of the data within each of the test windows, the engine test data classification method comprises:
and calculating the maximum value, the minimum value and the average value of the data in each test window so as to judge the stability of the data corresponding to the test window.
3. The engine test data classification method according to claim 2, wherein the method of detecting multiple sets of operating interval values in the second set based on the stability of the data within each of the test windows comprises:
sequentially judging whether the size of the maximum value, the minimum value and the average value in each test window meets set conditions or not;
and if the set conditions are met, taking the data in the test window meeting the set conditions as a new operation interval value.
4. The engine test data sorting method according to claim 3, wherein when the final array is empty, the setting condition includes:
max > Avg × Fct1, and Min < Avg × Fct 2; wherein the content of the first and second substances,
max denotes the maximum value within the corresponding test window, Min denotes the minimum value within the corresponding test window, and Fct1 and Fct2 denote adjustable scaling factors, respectively.
5. The engine test data classification method according to claim 3, wherein when the final array is not empty, the setting conditions include:
max > Avg Fct1, and Min < Avg Fct2, and Avg > Dout(-1)Fct 3; wherein the content of the first and second substances,
max represents the maximum value in the corresponding test window, Min represents the minimum value in the corresponding test window, Dout(-1)The last data in the operation interval value representing the last output, Fct1, Fct2, and Fct3 represent adjustable scaling factors, respectively.
6. The engine test data classification method of claim 3, wherein the method of detecting multiple sets of operating interval values in the second set based on the stability of the data within each of the test windows further comprises:
if the set condition is not met and the final array is not empty, judging whether the length of the data left in the second array is larger than the length of the test window or not, and if so, judging the stability of the data in the next window.
7. The engine test data classification method according to claim 3, wherein the method of detecting a plurality of sets of operation interval values in the second group according to the stability of the data in each of the test windows after the data in the test window satisfying a set condition is taken as a new operation interval value further comprises:
and judging whether the length of the remaining data in the second array is greater than that of the test window, if so, judging the stability of the data in the next window.
8. The engine test data classification method according to claim 6 or 7, wherein the method of detecting multiple sets of operating interval values in the second set based on the stability of the data within each of the test windows further comprises:
and judging whether the length of the data left in the second array is greater than that of the test window, if not, finishing the judgment of the stability of the data in the test window.
9. An electronic device comprising a processor and a memory, the memory having stored thereon a computer program which, when executed by the processor, implements the method of any of claims 1 to 8.
10. A readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method of any one of claims 1 to 8.
Background
In the development process of a new vehicle type, in order to reduce pollutant emission, reduce oil consumption, improve drivability and the like as much as possible, parameters are generally scanned in a traversing manner in a working range allowed by an engine, pollutant emission and oil consumption related parameters (log data) in the working range (taking the rotation speed and the air intake amount as examples) are obtained, and optimal control parameters are selected according to targets. Currently, after obtaining such data, engineers manually record and group analyze the scanned operating ranges in the project by importing the recorded engine operating condition (log) data into specific software. For example, after the carbon tank flow is tested, the PWM (pulse width modulation) value controlled by the solenoid valve during the test of the item needs to be manually calculated to obtain the working range of the test and the calculation of the subsequent control parameters, however, such manual software analysis log is opened, and the manual analysis and summary mode is not suitable for performing the analysis and optimization of the control parameters in large data automation.
Disclosure of Invention
The invention aims to provide an engine test data classification method, electronic equipment and a readable storage medium, so that accurate operation interval grouping can be automatically obtained from a data file of a data test through a software algorithm, and the problems of inconvenience, low reliability and low efficiency in test analysis of test data in the prior art are solved.
In order to solve the technical problem, the invention provides an engine test data classification method, which comprises the following steps:
obtaining engine test data, and resampling the engine test data according to a set sampling frequency to form a first array;
sorting the data in the first array from small to large to form a second array;
dividing the second array into a plurality of test windows;
and sequentially judging the stability of the data in each test window so as to detect multiple groups of running interval values in the second array according to the stability of the data in each test window, and sequentially outputting the multiple groups of running interval values to form a final array.
Optionally, in the engine test data classification method, before sequentially determining the stability of the data in each test window, the engine test data classification method includes:
and calculating the maximum value, the minimum value and the average value of the data in each test window so as to judge the stability of the data corresponding to the test window.
Optionally, in the method for classifying engine test data, the method for detecting multiple sets of operating interval values in the second group according to the stability of the data in each test window includes:
sequentially judging whether the size of the maximum value, the minimum value and the average value in each test window meets set conditions or not;
and if the set conditions are met, taking the data in the test window meeting the set conditions as a new operation interval value.
Optionally, in the engine test data classification method, when the final array is empty, the setting conditions include:
max > Avg × Fct1, and Min < Avg × Fct 2; wherein the content of the first and second substances,
max denotes the maximum value within the corresponding test window, Min denotes the minimum value within the corresponding test window, and Fct1 and Fct2 denote adjustable scaling factors, respectively.
Optionally, in the engine test data classification method, when the final array is not empty, the setting conditions include:
max > Avg Fct1, and Min < Avg Fct2, and Avg > Dout(-1)Fct 3; wherein the content of the first and second substances,
max represents the maximum value in the corresponding test window, Min represents the minimum value in the corresponding test window, Dout(-1)The last data in the operation interval value representing the last output, Fct1, Fct2, and Fct3 represent adjustable scaling factors, respectively.
Optionally, in the method for classifying engine test data, the method for detecting multiple sets of operating interval values in the second set according to the stability of the data in each test window further includes:
if the set condition is not met and the final array is not empty, judging whether the length of the data left in the second array is larger than the length of the test window or not, and if so, judging the stability of the data in the next window.
Optionally, in the engine test data classification method, after the data in the test window that meets the set condition is used as a new operation interval value, the method for detecting multiple groups of operation interval values in the second group according to the stability of the data in each test window further includes:
and judging whether the length of the remaining data in the second array is greater than that of the test window, if so, judging the stability of the data in the next window.
Optionally, in the method for classifying engine test data, the method for detecting multiple sets of operating interval values in the second set according to the stability of the data in each test window further includes:
and judging whether the length of the data left in the second array is greater than that of the test window, if not, finishing the judgment of the stability of the data in the test window.
Based on the same inventive concept, the present invention also provides an electronic device, comprising a processor and a memory, wherein the memory stores a computer program, and the computer program realizes the method as described above when being executed by the processor.
Based on the same inventive concept, the present invention also provides a readable storage medium, in which a computer program is stored, which, when executed by a processor, implements the method as described above.
Compared with the prior art, the technical scheme of the invention has the following beneficial effects:
the engine test data classification method, the electronic device and the readable storage medium provided by the invention have the advantages that after the engine test data are obtained, the engine test data are resampled according to the set sampling frequency to form a first array, the data in the first array are sorted from small to large to form a second array, the second array is divided into a plurality of test windows, the stability of the data in each test window is further sequentially judged, a plurality of groups of operation interval values are detected in the second array according to the stability of the data in each test window, the operation interval values are sequentially output to form a final array, so that accurate operation interval groups can be automatically obtained from a data file of the engine test, and precondition is provided for subsequent automatic analysis, control parameters and the like, moreover, the software algorithm is adopted, so that the implementation process is more efficient, quicker and simpler.
Drawings
FIG. 1 is a flow chart of a method of classifying engine test data according to an embodiment of the present invention;
FIG. 2 is a process diagram illustrating the steps of the engine test data classification method according to an embodiment of the present invention.
Detailed Description
The engine test data classification method, the electronic device and the readable storage medium according to the present invention will be described in further detail with reference to the accompanying drawings and specific embodiments. Advantages and features of the present invention will become apparent from the following description and from the claims. It is to be noted that the drawings are in a very simplified form and are not to precise scale, which is merely for the purpose of facilitating and distinctly claiming the embodiments of the present invention. Further, the structures illustrated in the drawings are often part of actual structures. In particular, the drawings may have different emphasis points and may sometimes be scaled differently.
Referring to fig. 1, an embodiment of the present invention provides a method for classifying engine test data, including the following steps:
s1, obtaining engine test data, and resampling the engine test data according to a set sampling frequency to form a first array;
s2, sorting the data in the first array from small to large to form a second array;
s3, dividing the second array into a plurality of test windows;
and S4, sequentially judging the stability of the data in each test window, detecting multiple groups of operation interval values in the second array according to the stability of the data in each test window, and sequentially outputting the multiple groups of operation interval values to form a final array (Dout array).
Generally, in an automobile development stage, performance parameters of an automobile under various working conditions are correspondingly tested, the types of the tests are, for example, a knock test, an exhaust temperature test, a high-temperature road test, a highland road test and a alpine road test, an electromagnetic interference and electromagnetic compatibility test, a steady-state dynamometer test, a closed-loop fuel control test, a transient fuel control test, an idle speed control test, a start control test, an oil injection control test, an air conditioner control test, a hundred kilometers acceleration test, a start-stop test and the like, and each test corresponds to a corresponding working condition of the automobile, for example, the idle speed control test is a performance test of the automobile running under the idle speed working condition. In each test process, engine test data such as engine speed, engine water temperature, oil temperature, intake air pressure, intake air temperature, engine water temperature, intake air pressure, transmission gear, gear use frequency, vehicle speed, accelerator opening (i.e. throttle opening), acceleration, engine load, vibration frequency, and engine operation time are respectively collected through corresponding signal collection devices such as an engine speed sensor, a coolant temperature sensor, an oil temperature sensor, an intake air temperature sensor, a throttle position sensor, an accelerator pedal position sensor, and an air conditioner switch sensor, and the engine test data can also be called log files.
According to the characteristics of engine calibration and test, aiming at the data of steady-state operation test: the switching of the operation interval is required to have a certain discrimination (for example, the intake air amount is switched from 15kg/h to 25kg/h), and the operation is performed for a certain time length (for example, 10 seconds) in a steady state, so that in the finally output array, a plurality of sets of operation interval values should be presented in a "step" form, and in step S4, it is detected in the second array according to the stability of the data in each test window that the plurality of sets of operation interval values are developed based on the result, and the data which should be located in different "steps" are distinguished by judging the stability of the data.
Therefore, referring to fig. 2, before determining the stability of the data in each test window in step S4, step S41 is executed to calculate the maximum value, the minimum value and the average value of the data in each test window for the determination of the stability of the data corresponding to the test window in the next step.
When the stability of data in a certain test window is judged, whether a numerical value exists in the Dout array influences the judgment basis of the Dout array, because the operation interval value has a relatively obvious change when the 'step' (operation interval value) is switched, when the Dout array is not empty, namely the 'step' is generated, the value of a new step to be generated is compared with the last value of the generated 'step', and only when a certain size relation is met, namely the generation condition of the new 'step' is met, the new 'step' can be generated. In view of this, before step S42, the method further includes: judging whether the Dout array is empty or not, and correspondingly, setting conditions can be specifically set as follows:
(1) when the Dout array is empty, the setting conditions comprise:
max > Avg × Fct1, and Min < Avg × Fct 2; wherein the content of the first and second substances,
max denotes the maximum value within the corresponding test window, Min denotes the minimum value within the corresponding test window, and Fct1 and Fct2 denote adjustable scaling factors, respectively.
(2) When the Dout array is not empty, the setting conditions comprise:
max > Avg Fct1, and Min < Avg Fct2, and Avg > Dout(-1)Fct 3; wherein the content of the first and second substances,
max represents the maximum value in the corresponding test window, Min represents the minimum value in the corresponding test window, Dout(-1)The last data in the operation interval value representing the last output, Fct1, Fct2, and Fct3 represent adjustable scaling factors, respectively.
On this basis, the method for detecting multiple sets of operation interval values in the second array according to the stability of the data in each test window may specifically include the following steps:
s42, sequentially judging whether the size of the maximum value, the minimum value and the average value in each test window meets set conditions; if the set condition is met, whether the Dout array is empty or not, executing the step S43 and the step S44 in sequence; if the setting condition is not satisfied and the final array is not empty, executing step S44;
s43, taking the data in the current test window as a new operation interval value;
s44, judging whether the length of the data left in the second array is larger than the length of the test window, if so, executing a step S45, and if not, executing a step S46;
s45, judging the stability of the data in the next window;
and S46, finishing the judgment of the stability of the data in the measurement window.
In step S45, when the stability of the data in the next window is determined, since the Dout array already inputs a part of the operation interval values, the stability should be determined according to the setting condition (2).
After the steps are completed, the engine test data classification method provided by the implementation automatically obtains accurate operation section groups from the data files of the engine test, so that preconditions are provided for subsequent automatic analysis, control parameters and the like, and the implementation process is more efficient, quicker and more convenient due to the adoption of a software algorithm form.
Based on the same inventive concept, an embodiment of the present invention further provides an electronic device, where the electronic device includes a processor and a memory, and the memory stores a computer program, and when the computer program is executed by the processor, the engine test data classification method provided in an embodiment of the present invention is implemented.
The Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like that is the control center for the electronic device and that connects the various parts of the overall electronic device using various interfaces and wires.
The memory may be used to store the computer program, and the processor may implement various functions of the electronic device by running or executing the computer program stored in the memory and calling data stored in the memory.
The memory may include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
Based on the same inventive concept, an embodiment of the present invention further provides a readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, can implement the engine test data classification method according to an embodiment of the present invention.
The readable storage medium may be a tangible device that can hold and store instructions for use by an instruction execution device, such as, but not limited to, an electronic memory device, a magnetic memory device, an optical memory device, an electromagnetic memory device, a semiconductor memory device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a Static Random Access Memory (SRAM), a portable compact disc read-only memory (CD-ROM), a Digital Versatile Disc (DVD), a memory stick, a floppy disk, a mechanical coding device, such as punch cards or in-groove projection structures having instructions stored thereon, and any suitable combination of the foregoing. The computer programs described herein may be downloaded from a readable storage medium to a respective computing/processing device, or to an external computer or external storage device via a network, such as the internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. The network adapter card or network interface in each computing/processing device receives the computer program from the network and forwards the computer program for storage in a readable storage medium in the respective computing/processing device. Computer programs for carrying out operations of the present invention may be assembly instructions, Instruction Set Architecture (ISA) instructions, machine related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer program may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider). In some embodiments, the electronic circuitry, such as a programmable logic circuit, a Field Programmable Gate Array (FPGA), or a Programmable Logic Array (PLA), can execute computer-readable program instructions to implement various aspects of the present invention by utilizing state information of a computer program to personalize the electronic circuitry.
Aspects of the present invention are described herein with reference to flowchart illustrations and/or block diagrams of methods, systems and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer programs. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the programs, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. Such a computer program may also be stored in a readable storage medium that can direct a computer, programmable data processing apparatus, and/or other devices to function in a particular manner, such that the readable storage medium storing the computer program comprises an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer program may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the computer program which executes on the computer, other programmable apparatus or other devices implements the functions/acts specified in the flowchart and/or block diagram block or blocks.
In summary, the engine test data classification method, the electronic device and the readable storage medium of the present invention can automatically obtain the accurate operation interval grouping from the data file of the data test through the software algorithm, thereby solving the problems of the prior art that the test analysis of the test data is not simple and convenient, the reliability is low and the efficiency is low.
The above description is only for the purpose of describing the preferred embodiments of the present invention, and is not intended to limit the scope of the present invention, and any variations and modifications made by those skilled in the art based on the above disclosure are within the scope of the appended claims.