Processing method and processing device for engine rotating speed signal and storage medium
By automatically adjusting the threshold according to the status of the electronic control unit and the signal peak in the engine speed signal processing, the problem of inaccurate recognition caused by the fluctuation of the speed signal during the engine startup phase is solved, and higher signal recognition accuracy and engine synchronization are achieved.
Patent Information
- Application Number
- CN202410748155.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-11
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2044-06-11
AI Technical Summary
In the existing technology, the engine speed signal fluctuates violently during the starting stage and the gear disc is not smooth, resulting in inaccurate identification, resulting in missing or multiple teeth errors, making it impossible to successfully start the vehicle.
By determining whether the electronic control unit is powered on, the initial speed signal is obtained, and filtered according to different signal thresholds. The threshold is automatically adjusted to identify accurate signals, eliminate interference, and improve the accuracy of speed signal identification.
During the engine starting stage and high speed conditions, the accuracy of speed signal recognition is improved to avoid mis-identification or unrecognition of signals and ensure engine synchronization and normal operation.
Smart Images

Figure CN118686704A
Abstract
Description
Technical Field
[0001] The present application relates to the field of engines, and in particular, to a method for processing an engine speed signal, a device for processing an engine speed signal, a computer-readable storage medium, and a computer program product. Background Art
[0002] In the prior art, there are two problems in the recognition of engine speed signals:
[0003] Question 1: During the engine startup phase, the speed fluctuates violently, and the crankshaft signal voltage amplitude fluctuates. When the voltage is high, the threshold will be raised, resulting in the high threshold not being able to recognize the normal signal when the speed drops, causing a missing tooth error, resulting in loss of synchronization, and failure to start the vehicle successfully.
[0004] Problem 2: The surface of the sprocket is not smooth and has protrusions other than normal teeth, or the sprocket design is unreasonable, resulting in abnormal magnetic flux of the magnetoelectric sensor. Under high speed conditions, an interference signal similar to a normal signal will be formed. After being identified as a normal speed signal, multiple tooth errors will occur, resulting in loss of synchronization.
[0005] Therefore, there is an urgent need for a method to solve the problem of inaccurate recognition of engine speed signals in the prior art. Summary of the invention
[0006] The main purpose of the present application is to provide a method for processing an engine speed signal, a device for processing an engine speed signal, a computer-readable storage medium, and a computer program product, so as to at least solve the problem of inaccurate engine speed signal recognition in the prior art.
[0007] According to one aspect of the present application, a method for processing an engine speed signal is provided, comprising: determining whether an electronic control unit is powered on, and when the electronic control unit is powered on, acquiring the engine speed signal to obtain an initial speed signal; acquiring a first signal threshold, and performing a first filtering process on the initial speed signal according to the first signal threshold to obtain a first target speed signal, and sending the first target speed signal to the electronic control unit, wherein the first signal threshold is a preset filtering threshold of the first filtering process, and the first target speed signal is a square wave signal; determining whether the electronic control unit receives the first target speed signal, and when the electronic control unit receives the first target speed signal, determining a second signal threshold at least according to a peak value of the initial speed signal, wherein the second signal threshold is greater than or equal to the first signal threshold; performing a second filtering process on the initial speed signal according to the second signal threshold to obtain a second target speed signal, wherein the second target speed signal is a square wave signal.
[0008] Optionally, according to the first signal threshold, the initial speed signal is subjected to a first filtering process to obtain a first target speed signal, including: determining whether the initial speed signal corresponding to each moment is greater than the first signal threshold, and when the initial speed signal is greater than the first signal threshold, outputting a first high-level signal corresponding to the moment; when the initial speed signal is less than or equal to the first signal threshold, outputting a first low-level signal corresponding to the moment; the first high-level signal or the first low-level signal corresponding to each moment forms the first target speed signal.
[0009] Optionally, a second signal threshold is determined at least based on the peak value of the initial speed signal, including: determining whether the engine is in a synchronous state, and when the engine is not in the synchronous state, determining the signal threshold corresponding to the peak value of the initial speed signal as the second signal threshold based on a mapping relationship between the speed signal peak value and the signal threshold and the peak value of the initial speed signal, wherein the mapping relationship is used to characterize the positive correlation between the speed signal peak value and the signal threshold; when the engine is in the synchronous state, determining a third signal threshold based on the peak value of the initial speed signal, and determining the maximum value between the third signal threshold and the fourth signal threshold as the second signal threshold, wherein the fourth signal threshold is a pre-set filtering threshold for filtering processing when the engine is in the synchronous state, and the fourth signal threshold is greater than the first signal threshold.
[0010] Optionally, the engine includes at least a crankshaft and a camshaft, and determining whether the engine is in the synchronous state includes: obtaining a rotation angle of a first characteristic tooth of the crankshaft to obtain a first rotation angle, wherein the first characteristic tooth is one of the multiple gears of the crankshaft and the shape of the gear is different from the other gears; obtaining a rotation angle of a second characteristic tooth of the camshaft to obtain a second rotation angle, wherein the second characteristic tooth is one of the multiple gears of the camshaft and the shape of the gear is different from the other gears; determining whether the first rotation angle and the second rotation angle are the same, and if the first rotation angle and the second rotation angle are the same, determining that the engine is in the synchronous state; if the rotation angle of the first characteristic tooth and the rotation angle of the second characteristic tooth are different, determining that the engine is not in the synchronous state.
[0011] Optionally, when the engine is not in the synchronous state, according to the mapping relationship between the speed signal peak value and the signal threshold value and the peak value of the initial speed signal, the signal threshold corresponding to the peak value of the initial speed signal is determined to be the second signal threshold value, including: determining whether the peak value of the initial speed signal is less than the first peak threshold value, and when the peak value of the initial speed signal is less than the first peak threshold value, determining the first signal threshold value to be the second signal threshold value; when the peak value of the initial speed signal is greater than or equal to the first peak threshold value, determining whether the peak value of the initial speed signal is less than the second peak threshold value, and when the peak value of the initial speed signal is less than the second peak threshold value, determining a first predetermined value to be the second signal threshold value, wherein the second peak threshold value is greater than the first peak threshold value, and the first predetermined value is a preset value greater than the first signal threshold value and less than the fourth signal threshold value; the peak value of the initial speed signal is When the value is greater than or equal to the second peak threshold, determine whether the peak value of the initial speed signal is less than the third peak threshold. When the peak value of the initial speed signal is less than the third peak threshold, determine the fourth signal threshold as the second signal threshold, wherein the third peak threshold is greater than the second peak threshold; when the peak value of the initial speed signal is greater than or equal to the third peak threshold, determine whether the peak value of the initial speed signal is less than the fourth peak threshold. When the peak value of the initial speed signal is less than the fourth peak threshold, determine the second predetermined value as the second signal threshold, wherein the fourth peak threshold is greater than the third peak threshold, and the second predetermined value is a preset value greater than the fourth signal threshold; when the peak value of the initial speed signal is greater than or equal to the fourth peak threshold, determine the third predetermined value as the second signal threshold, wherein the third predetermined value is a preset value greater than the second predetermined value.
[0012] Optionally, when the engine is in the synchronous state, the third signal threshold is determined according to the peak value of the initial speed signal, including: determining whether the peak value of the initial speed signal is less than the first peak threshold value, and when the peak value of the initial speed signal is less than the first peak threshold value, determining the first signal threshold value as the third signal threshold value; when the peak value of the initial speed signal is greater than or equal to the first peak threshold value, determining whether the peak value of the initial speed signal is less than the second peak threshold value, and when the peak value of the initial speed signal is less than the second peak threshold value, determining a first predetermined value as the third signal threshold value, wherein the second peak threshold value is greater than the first peak threshold value, and the first predetermined value is a pre-set value greater than the first signal threshold value and less than the fourth signal threshold value; when the peak value of the initial speed signal is greater than or equal to the second peak threshold value, determining Whether the peak value of the initial speed signal is less than the third peak threshold value, and when the peak value of the initial speed signal is less than the third peak threshold value, the fourth signal threshold value is determined to be the third signal threshold value, wherein the third peak threshold value is greater than the second peak threshold value; when the peak value of the initial speed signal is greater than or equal to the third peak threshold value, it is determined whether the peak value of the initial speed signal is less than the fourth peak threshold value, and when the peak value of the initial speed signal is less than the fourth peak threshold value, the second predetermined value is determined to be the third signal threshold value, wherein the fourth peak threshold value is greater than the third peak threshold value, and the second predetermined value is a preset value greater than the fourth signal threshold value; when the peak value of the initial speed signal is greater than or equal to the fourth peak threshold value, the third predetermined value is determined to be the third signal threshold value, wherein the third predetermined value is a preset value greater than the second predetermined value.
[0013] Optionally, the initial speed signal is subjected to a second filtering process according to the second signal threshold to obtain a second target speed signal, including: determining whether the initial speed signal corresponding to each moment is greater than the second signal threshold, and when the initial speed signal is greater than the second signal threshold, outputting a second high-level signal corresponding to the moment; when the initial speed signal is less than or equal to the second signal threshold, outputting a second low-level signal corresponding to the moment; the second high-level signal or the second low-level signal corresponding to each moment forms the second target speed signal.
[0014] According to another aspect of the present application, a device for processing an engine speed signal is provided, comprising: a determination unit, for determining whether an electronic control unit is powered on, and when the electronic control unit is powered on, acquiring the engine speed signal to obtain an initial speed signal; a first processing unit, for acquiring a first signal threshold, and performing a first filtering process on the initial speed signal according to the first signal threshold to obtain a first target speed signal, and sending the first target speed signal to the electronic control unit, wherein the first signal threshold is a preset filtering threshold of the first filtering process, and the first target speed signal is a square wave signal; determining whether the electronic control unit receives the first target speed signal, and when the electronic control unit receives the first target speed signal, determining a second signal threshold at least according to a peak value of the initial speed signal, wherein the second signal threshold is greater than or equal to the first signal threshold; performing a second filtering process on the initial speed signal according to the second signal threshold to obtain a second target speed signal, wherein the second target speed signal is a square wave signal.
[0015] According to another aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute any one of the methods described.
[0016] According to another aspect of the present application, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the steps of any one of the methods described are implemented.
[0017] By applying the technical solution of the present application, in the method for processing an engine speed signal, first, it is determined whether the electronic control unit is powered on. When the electronic control unit is powered on, the engine speed signal is acquired to obtain an initial speed signal; then, according to a first signal threshold, a first filtering process is performed on the initial speed signal to obtain a first target speed signal, and the first target speed signal is sent to the electronic control unit; then, it is determined whether the electronic control unit receives the first target speed signal. When the electronic control unit receives the first target speed signal, a second signal threshold is determined at least based on a peak value of the initial speed signal; finally, according to the second signal threshold, a second filtering process is performed on the initial speed signal to obtain a second target speed signal. Since the engine speed fluctuates violently in the startup phase when it is just powered on, the crankshaft signal voltage amplitude fluctuates, and the speed signal recognition is inaccurate. In this phase, by setting a smaller first signal threshold for filtering, the low speed signal when the engine is just started can be processed in time, thereby improving the speed signal recognition accuracy. When the electronic control unit receives the first target speed signal, an interference signal similar to a normal signal will be formed. After being recognized as a normal speed signal, the speed signal recognition is inaccurate. In this phase, the corresponding signal threshold is determined by the peak value of the speed signal to automatically adjust the threshold, thereby avoiding the problem that the signal voltage fluctuates, and setting a fixed threshold will lead to misidentification or non-recognition of the signal. Therefore, the above method adopts different signal recognition schemes based on different speed conditions, accurately identifies valid signals, and eliminates the interference of invalid signals, thereby improving the signal recognition accuracy, thereby solving the technical problem of inaccurate engine speed signal recognition in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The drawings constituting part of the present application are used to provide a further understanding of the present application. The exemplary embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0019] Figure 1 A hardware structure block diagram of a mobile terminal for executing a method for processing an engine speed signal provided in an embodiment of the present application is shown;
[0020] Figure 2 A schematic flow chart of a method for processing an engine speed signal provided according to an embodiment of the present application is shown;
[0021] Figure 3 A schematic diagram of a process for obtaining a first target speed signal according to an embodiment of the present application is shown;
[0022] Figure 4 A schematic diagram of a process for determining a second signal threshold according to an embodiment of the present application is shown;
[0023] Figure 5 A hardware circuit diagram for determining a second signal threshold value according to a peak value of an initial rotation speed signal provided in accordance with an embodiment of the present application is shown;
[0024] Figure 6 A structural block diagram of an engine speed signal processing device provided according to an embodiment of the present application is shown.
[0025] The above drawings include the following reference numerals:
[0026] 102, processor; 104, memory; 106, transmission device; 108, input and output devices. DETAILED DESCRIPTION
[0027] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0028] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0029] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0030] As introduced in the background technology, the prior art does not accurately identify the engine speed signal. To solve the above problem, an embodiment of the present application provides a method for processing an engine speed signal, a device for processing an engine speed signal, a computer-readable storage medium, and a computer program product.
[0031] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0032] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 FIG. 1 is a hardware structure block diagram of a mobile terminal of an engine speed signal processing method according to an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is for illustration only and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0033] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the method for processing the engine speed signal in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, the above method is implemented. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of the above network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof. The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0034] In this embodiment, a method for processing an engine speed signal running on a mobile terminal, a computer terminal or a similar computing device is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0035] Figure 2 FIG. 1 is a flow chart of a method for processing an engine speed signal according to an embodiment of the present application. Figure 2 As shown, the method comprises the following steps:
[0036] Step S201, determining whether the electronic control unit is powered on, and if the electronic control unit is powered on, acquiring the engine speed signal to obtain an initial speed signal;
[0037] Specifically, the following methods can be used to determine whether the electronic control unit (ECU) is powered on: by connecting to the vehicle's OBD-II interface, these tools can read the status and parameters of the ECU, including whether the ECU is powered on. Or by checking whether the vehicle's power system or the grounding status of the ECU is good, determine whether the ECU is powered on.
[0038] Step S202, obtaining a first signal threshold, and performing a first filtering process on the initial speed signal according to the first signal threshold to obtain a first target speed signal, and sending the first target speed signal to the electronic control unit, wherein the first signal threshold is a preset filtering threshold of the first filtering process, and the first target speed signal is a square wave signal;
[0039] Specifically, the initial speed signal is generally a chaotic non-square wave signal, and the first filtering process can be implemented by a limiting filter, a Schmitt trigger, a digital filter, a low-pass filter, a high-pass filter, a band-pass filter, an active filter, etc. to convert the non-square wave signal into a square wave signal. The first signal threshold can be manually set through a serial peripheral interface register.
[0040] Step S203, determining whether the electronic control unit receives the first target speed signal, and if the electronic control unit receives the first target speed signal, determining a second signal threshold value at least according to the peak value of the initial speed signal, wherein the second signal threshold value is greater than or equal to the first signal threshold value;
[0041] Specifically, when the electronic control unit receives the first target speed signal, it indicates that the engine has entered the high-speed mode, and an interference signal similar to a normal signal will be formed, which is easily identified as a normal speed signal. Therefore, a different processing scheme is adopted from the startup phase when the ECU is just powered on. The corresponding signal threshold is determined by the peak value of the speed signal to automatically adjust the threshold, so as to avoid the signal voltage fluctuating. Setting a fixed threshold will lead to the problem of misidentification or non-identification of the signal.
[0042] Step S204: performing a second filtering process on the initial speed signal according to the second signal threshold to obtain a second target speed signal, wherein the second target speed signal is a square wave signal.
[0043] Specifically, the second filtering process can be implemented by a limiting filter, a Schmitt trigger, a digital filter, a low-pass filter, a high-pass filter, a band-pass filter, an active filter, etc., to convert the non-square wave signal into a square wave signal. The first target speed signal and the second target speed signal can be used to monitor the performance or failure of the engine to ensure that it operates within a safe and effective working range. In an ignition engine, the first target speed signal and the second target speed signal can also be used to determine the optimal ignition timing to improve fuel efficiency and reduce emissions. In a fuel injection system, the speed signal can help control the timing and amount of fuel injection to adapt to different engine operating conditions.
[0044] Through this embodiment, in the method for processing the engine speed signal, first, it is determined whether the electronic control unit is powered on. When the electronic control unit is powered on, the engine speed signal is obtained to obtain an initial speed signal; then, according to the first signal threshold, the initial speed signal is subjected to a first filtering process to obtain a first target speed signal, and the first target speed signal is sent to the electronic control unit; then, it is determined whether the electronic control unit receives the first target speed signal. When the electronic control unit receives the first target speed signal, the second signal threshold is determined at least based on the peak value of the initial speed signal; finally, the initial speed signal is subjected to a second filtering process according to the second signal threshold to obtain a second target speed signal. Since the engine speed fluctuates violently in the startup phase when it is just powered on, the crankshaft signal voltage amplitude fluctuates, and the speed signal recognition is inaccurate. In this phase, by setting a smaller first signal threshold for filtering, the low speed signal when the engine is just started can be processed in time, thereby improving the speed signal recognition accuracy. When the electronic control unit receives the first target speed signal, an interference signal similar to a normal signal will be formed. After being recognized as a normal speed signal, the speed signal recognition is inaccurate. In this phase, the corresponding signal threshold is determined by the peak value of the speed signal to automatically adjust the threshold, thereby avoiding the problem that the signal voltage fluctuates, and setting a fixed threshold will lead to misidentification or non-recognition of the signal. Therefore, the above method adopts different signal recognition schemes based on different speed conditions, accurately identifies valid signals, and eliminates the interference of invalid signals, thereby improving the signal recognition accuracy, thereby solving the technical problem of inaccurate engine speed signal recognition in the prior art.
[0045] In the specific implementation process, Figure 3 As shown, the above step S202 can be implemented by the following steps: step S2021, determining whether the above initial speed signal corresponding to each moment is greater than the above first signal threshold, and outputting the first high level signal corresponding to the above moment when the above initial speed signal is greater than the above first signal threshold; step S2022, outputting the first low level signal corresponding to the above moment when the above initial speed signal is less than or equal to the above first signal threshold; step S2023, the above first high level signal or the first low level signal corresponding to each moment forms the above first target speed signal. The method can further form the above first target speed signal quickly through the above first filtering process.
[0046] Specifically, the first filtering process can limit the voltage value of the input signal within a specific range, and the first filtering process can be implemented by a limiting filter. The circuit design of the limiting filter is relatively simple, requiring only a few passive components (such as resistors, capacitors) and / or one or more diodes. In addition, the first filtering process can quickly respond to changes in the input signal and limit the signal within a set range with almost no delay; it can also remove noise that exceeds a set threshold, reduce overshoot and undershoot in the signal, and thus improve the stability of the signal.
[0047] In order to further determine the precise second signal threshold, as Figure 4 As shown, the above-mentioned step S203 of the present application can be implemented by the following steps: Step S2031, determining whether the above-mentioned engine is in the synchronous state, when the above-mentioned engine is not in the above-mentioned synchronous state, determining the above-mentioned signal threshold corresponding to the peak value of the above-mentioned initial speed signal as the above-mentioned second signal threshold according to the mapping relationship between the speed signal peak value and the signal threshold and the peak value of the above-mentioned initial speed signal, wherein the above-mentioned mapping relationship is used to characterize the positive correlation between the above-mentioned speed signal peak value and the above-mentioned signal threshold; Step S2032, when the above-mentioned engine is in the above-mentioned synchronous state, determining the third signal threshold according to the peak value of the above-mentioned initial speed signal, and determining the maximum value of the above-mentioned third signal threshold and the fourth signal threshold as the above-mentioned second signal threshold, wherein the above-mentioned fourth signal threshold is a pre-set filtering threshold for filtering processing when the engine is in the above-mentioned synchronous state, and the above-mentioned fourth signal threshold is greater than the above-mentioned first signal threshold.
[0048] Specifically, when the engine is in the synchronous state, it indicates that the speed reaches a high speed, and the maximum value of the third signal threshold and the fourth signal threshold is taken as the actual execution threshold. When there is a small-amplitude interference signal at a high speed, it will also be effectively filtered out. Therefore, the accuracy of determining the second target speed signal can be further improved.
[0049] The engine at least includes a crankshaft and a camshaft. The step S2031 can be implemented in other ways, for example: step S20311, obtaining the rotation angle of the first characteristic tooth of the crankshaft to obtain the first rotation angle, the first characteristic tooth is one of the multiple gears of the crankshaft and the shape of the gear is different from the other gears; step S20312, obtaining the rotation angle of the second characteristic tooth of the camshaft to obtain the second rotation angle, the second characteristic tooth is one of the multiple gears of the camshaft and the shape of the gear is different from the other gears; step S20313, determining whether the first rotation angle is the same as the second rotation angle, and if the first rotation angle is the same as the second rotation angle, determining that the engine is in the synchronous state; step S20314, if the rotation angle of the first characteristic tooth is different from the rotation angle of the second characteristic tooth, determining that the engine is not in the synchronous state. This method can further quickly determine whether the engine is in the synchronous state.
[0050] Specifically, the first rotation angle and the second rotation angle can be monitored by providing a crankshaft position sensor at the crankshaft and a camshaft position sensor at the camshaft, and then the sensor provides real-time data to the engine control unit.
[0051] In some embodiments, the above-mentioned step S2031 can also be specifically implemented through the following steps: step S20315, determining whether the peak value of the above-mentioned initial speed signal is less than the first peak threshold value, and when the peak value of the above-mentioned initial speed signal is less than the above-mentioned first peak threshold value, determining the above-mentioned first signal threshold value to be the above-mentioned second signal threshold value; step S20316, when the peak value of the above-mentioned initial speed signal is greater than or equal to the above-mentioned first peak threshold value, determining whether the peak value of the above-mentioned initial speed signal is less than the second peak threshold value, and when the peak value of the above-mentioned initial speed signal is less than the above-mentioned second peak threshold value, determining the first predetermined value to be the above-mentioned second signal threshold value, wherein the above-mentioned second peak threshold value is greater than the above-mentioned first peak threshold value, and the above-mentioned first predetermined value is a pre-set value greater than the above-mentioned first signal threshold value and less than the above-mentioned fourth signal threshold value; step S20317, when the peak value of the above-mentioned initial speed signal is greater than or equal to the above-mentioned second peak threshold value, determining the above-mentioned initial speed signal to be the above-mentioned In step S20318, if the peak value of the initial speed signal is greater than or equal to the third peak threshold, determine whether the peak value of the initial speed signal is less than the fourth peak threshold, if the peak value of the initial speed signal is less than the fourth peak threshold, determine the second predetermined value to be the second signal threshold, wherein the fourth peak threshold is greater than the third peak threshold, and the second predetermined value is a preset value greater than the fourth signal threshold; in step S20319, if the peak value of the initial speed signal is greater than or equal to the fourth peak threshold, determine the third predetermined value to be the second signal threshold, wherein the third predetermined value is a preset value greater than the second predetermined value. This method can further quickly determine the second signal threshold.
[0052] Specifically, the mapping relationship table between the peak value of the above-mentioned initial speed signal and the second signal threshold is shown in Table 1. The first peak threshold is VPeak1, the second peak threshold is VPeak2, the third peak threshold is VPeak3, and the fourth peak threshold is VPeak4. The above-mentioned VPeak1 can be 0.53~3V, the above-mentioned VPeak2 can be 4~5V, the above-mentioned VPeak3 can be 6~7V, and the above-mentioned VPeak4 can be 8~10V. The above-mentioned first signal threshold VTH1 can be 100~150mV, the first predetermined value VTH2 can be 200~250mV, the fourth signal threshold VTH3 can be 350~450mV, the second predetermined value VTH4 can be 1000~1100mV, and the third predetermined value VTH5 can be 1550~1650mV. It can be achieved by Figure 5The circuit structure shown realizes the adaptation of the above-mentioned second signal threshold.
[0053] Table 1
[0054] Peak range of initial speed signal Second signal threshold Less than VPeak1 VTH1 VPeak1-VPeak2 VTH2 VPeak2-VPeak3 VTH3 VPeak3-VPeak4 VTH4 Greater than VPeak4 VTH5
[0055] The above-mentioned step S2032 can be implemented through the following steps: Step S20321, determine whether the peak value of the above-mentioned initial speed signal is less than the first peak threshold value. When the peak value of the above-mentioned initial speed signal is less than the above-mentioned first peak threshold value, determine the above-mentioned first signal threshold value as the above-mentioned third signal threshold value; Step S20322, when the peak value of the above-mentioned initial speed signal is greater than or equal to the above-mentioned first peak threshold value, determine whether the peak value of the above-mentioned initial speed signal is less than the second peak threshold value. When the peak value of the above-mentioned initial speed signal is less than the above-mentioned second peak threshold value, determine the first predetermined value as the above-mentioned third signal threshold value, wherein the above-mentioned second peak threshold value is greater than the above-mentioned first peak threshold value, and the above-mentioned first predetermined value is a pre-set value greater than the above-mentioned first signal threshold value and less than the above-mentioned fourth signal threshold value; Step S20323, when the peak value of the above-mentioned initial speed signal is greater than or equal to the above-mentioned second peak threshold value, determine the peak value of the above-mentioned initial speed signal Whether it is less than the third peak threshold, when the peak value of the initial speed signal is less than the third peak threshold, determine the fourth signal threshold as the third signal threshold, wherein the third peak threshold is greater than the second peak threshold; step S20324, when the peak value of the initial speed signal is greater than or equal to the third peak threshold, determine whether the peak value of the initial speed signal is less than the fourth peak threshold, when the peak value of the initial speed signal is less than the fourth peak threshold, determine the second predetermined value as the third signal threshold, wherein the fourth peak threshold is greater than the third peak threshold, and the second predetermined value is a preset value greater than the fourth signal threshold; step S20325, when the peak value of the initial speed signal is greater than or equal to the fourth peak threshold, determine the third predetermined value as the third signal threshold, wherein the third predetermined value is a preset value greater than the second predetermined value. This method can further quickly determine the third signal threshold.
[0056] Specifically, the mapping relationship table between the peak value of the initial speed signal and the third signal threshold is shown in Table 2, the first peak threshold is VPeak1, the second peak threshold is VPeak2, the third peak threshold is VPeak3, and the fourth peak threshold is VPeak4. The first signal threshold VTH1 can be 100-150mV, the first predetermined value VTH2 can be 200-250mV, the fourth signal threshold VTH3 can be 350-450mV, the second predetermined value VTH4 can be 1000-1100mV, and the third predetermined value VTH5 can be 1550-1650mV.
[0057] Table 2
[0058] Peak range of initial speed signal The third signal threshold Less than VPeak1 VTH1 VPeak1-VPeak2 VTH2 VPeak2-VPeak3 VTH3 VPeak3-VPeak4 VTH4 Greater than VPeak4 VTH5
[0059] The above step S204 can be implemented by the following steps: step S2041, determining whether the above initial speed signal corresponding to each moment is greater than the above second signal threshold, and outputting the second high level signal corresponding to the above moment when the above initial speed signal is greater than the above second signal threshold; step S2042, outputting the second low level signal corresponding to the above moment when the above initial speed signal is less than or equal to the above second signal threshold; step S2043, the above second high level signal or the second low level signal corresponding to each moment forms the above second target speed signal. The method can further form the above second target speed signal quickly through the above second filtering process.
[0060] Specifically, the second filtering process can limit the voltage value of the input signal within a specific range, and the second filtering process can be implemented by a limiting filter. The circuit design of the limiting filter is relatively simple, requiring only a few passive components (such as resistors, capacitors) and / or one or more diodes. In addition, the second filtering process can quickly respond to changes in the input signal and limit the signal within a set range with almost no delay; it can also remove noise that exceeds a set threshold, reduce overshoot and undershoot in the signal, and thus improve the stability of the signal.
[0061] In order to enable those skilled in the art to more clearly understand the technical solution of the present application, the implementation process of the method for processing the engine speed signal of the present application will be described in detail below in combination with specific embodiments.
[0062] This embodiment relates to a specific method for processing an engine speed signal, comprising the following steps:
[0063] Step S1: After the ECU is powered on, the threshold mode is configured to be the minimum threshold VTH1, so that it can promptly process the low speed signal when the engine is just started;
[0064] Step S2: Once the speed is identified, the threshold mode is configured as a fully adaptive threshold mode, and the threshold is automatically adjusted by identifying the speed signal peak to avoid the signal voltage fluctuating. Setting a fixed threshold may result in misidentification or non-identification of the signal.
[0065] Step S3: After the engine is synchronized and the speed reaches a high speed, the threshold mode is configured as the limited adaptive threshold mode, and the minimum recognition threshold is manually set to VTH3. At the same time, the threshold is automatically adjusted by identifying the peak of the speed signal, and the larger threshold is taken as the actual execution threshold. In this way, when there is a small-amplitude interference signal at a high speed, it will also be effectively filtered out.
[0066] The embodiment of the present application also provides a device for processing an engine speed signal. It should be noted that the device for processing an engine speed signal in the embodiment of the present application can be used to execute the method for processing an engine speed signal provided in the embodiment of the present application. The device is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware for a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation in hardware, or a combination of software and hardware, is also possible and conceivable.
[0067] The following is an introduction to the engine speed signal processing device provided in an embodiment of the present application.
[0068] Figure 6 Schematic diagram of an engine speed signal processing device according to an embodiment of the present application. Figure 6 As shown, the device comprises:
[0069] The acquisition unit 10 is used to determine whether the electronic control unit is powered on, and when the electronic control unit is powered on, acquire the engine speed signal to obtain an initial speed signal;
[0070] Specifically, the following methods can be used to determine whether the electronic control unit (ECU) is powered on: by connecting to the vehicle's OBD-II interface, these tools can read the status and parameters of the ECU, including whether the ECU is powered on. Or by checking whether the vehicle's power system or the grounding status of the ECU is good, determine whether the ECU is powered on.
[0071] The first processing unit 20 is used to obtain a first signal threshold, and perform a first filtering process on the initial speed signal according to the first signal threshold to obtain a first target speed signal, and send the first target speed signal to the electronic control unit, wherein the first signal threshold is a preset filtering threshold of the first filtering process, and the first target speed signal is a square wave signal;
[0072] Specifically, the initial speed signal is generally a chaotic non-square wave signal, and the first filtering process can be implemented by a limiting filter, a Schmitt trigger, a digital filter, a low-pass filter, a high-pass filter, a band-pass filter, an active filter, etc. to convert the non-square wave signal into a square wave signal. The first signal threshold can be manually set through a serial peripheral interface register.
[0073] a determination unit 30, configured to determine whether the electronic control unit receives the first target speed signal, and if the electronic control unit receives the first target speed signal, determine a second signal threshold value at least according to a peak value of the initial speed signal, wherein the second signal threshold value is greater than or equal to the first signal threshold value;
[0074] Specifically, when the electronic control unit receives the first target speed signal, it indicates that the engine has entered the high-speed mode, and an interference signal similar to a normal signal will be formed, which is easily identified as a normal speed signal. Therefore, a different processing scheme is adopted from the startup phase when the ECU is just powered on. The corresponding signal threshold is determined by the peak value of the speed signal to automatically adjust the threshold, so as to avoid the signal voltage fluctuating. Setting a fixed threshold will lead to the problem of misidentification or non-identification of the signal.
[0075] The second processing unit 40 is used to perform a second filtering process on the initial speed signal according to the second signal threshold to obtain a second target speed signal, wherein the second target speed signal is a square wave signal.
[0076] Specifically, the second filtering process can be implemented by a limiting filter, a Schmitt trigger, a digital filter, a low-pass filter, a high-pass filter, a band-pass filter, an active filter, etc., to convert the non-square wave signal into a square wave signal. The first target speed signal and the second target speed signal can be used to monitor the performance or failure of the engine to ensure that it operates within a safe and effective working range. In an ignition engine, the first target speed signal and the second target speed signal can also be used to determine the optimal ignition timing to improve fuel efficiency and reduce emissions. In a fuel injection system, the speed signal can help control the timing and amount of fuel injection to adapt to different engine operating conditions.
[0077] Through this embodiment, in the processing device of the engine speed signal, the acquisition unit determines whether the electronic control unit is powered on, and when the electronic control unit is powered on, the engine speed signal is acquired to obtain an initial speed signal; the first processing unit performs a first filtering process on the initial speed signal according to a first signal threshold value, obtains a first target speed signal, and sends the first target speed signal to the electronic control unit; the second processing unit determines whether the electronic control unit receives the first target speed signal, and when the electronic control unit receives the first target speed signal, determines a second signal threshold value at least based on a peak value of the initial speed signal; the determination unit performs a second filtering process on the initial speed signal according to the second signal threshold value to obtain a second target speed signal. During the startup phase of the engine when it is just powered on, the speed fluctuates violently, the crankshaft signal voltage amplitude fluctuates, and the speed signal recognition is inaccurate. In this phase, by setting a smaller first signal threshold for filtering, the low-speed signal when the engine is just started can be processed in time, thereby improving the speed signal recognition accuracy. When the electronic control unit receives the first target speed signal, an interference signal similar to a normal signal will be formed. After being recognized as a normal speed signal, the speed signal recognition is inaccurate. In this phase, the corresponding signal threshold is determined by the peak value of the speed signal to automatically adjust the threshold, thereby avoiding the problem that the signal voltage fluctuates and setting a fixed threshold will lead to misidentification or non-recognition of the signal. Therefore, the above-mentioned device adopts different signal recognition schemes based on different speed conditions, accurately identifies valid signals, and eliminates the interference of invalid signals, thereby improving the signal recognition accuracy, thereby solving the technical problem of inaccurate engine speed signal recognition in the prior art.
[0078] In the specific implementation process, the first processing unit includes a first output module, a second output module and a first forming module, wherein the first output module is used to determine whether the initial speed signal corresponding to each moment is greater than the first signal threshold, and output the first high-level signal corresponding to the moment when the initial speed signal is greater than the first signal threshold; the second output module is used to output the first low-level signal corresponding to the moment when the initial speed signal is less than or equal to the first signal threshold; the first forming module is used to form the first target speed signal with the first high-level signal or the first low-level signal corresponding to each moment. The device can further quickly form the first target speed signal through the first filtering process.
[0079] Specifically, the first filtering process can limit the voltage value of the input signal within a specific range, and the first filtering process can be implemented by a limiting filter. The circuit design of the limiting filter is relatively simple, requiring only a few passive components (such as resistors, capacitors) and / or one or more diodes. In addition, the first filtering process can quickly respond to changes in the input signal and limit the signal within a set range with almost no delay; it can also remove noise that exceeds a set threshold, reduce overshoot and undershoot in the signal, and thus improve the stability of the signal.
[0080] In order to further determine the precise second signal threshold, the determination unit includes a first determination module and a second determination module, wherein the first determination module is used to determine whether the engine is in a synchronous state, and when the engine is not in the synchronous state, the signal threshold corresponding to the peak value of the initial speed signal is determined as the second signal threshold according to the mapping relationship between the speed signal peak value and the signal threshold and the peak value of the initial speed signal, wherein the mapping relationship is used to characterize the positive correlation between the speed signal peak value and the signal threshold; the second determination module is used to determine the third signal threshold according to the peak value of the initial speed signal when the engine is in the synchronous state, and determine the maximum value of the third signal threshold and the fourth signal threshold as the second signal threshold, wherein the fourth signal threshold is a pre-set filtering threshold for filtering processing when the engine is in the synchronous state, and the fourth signal threshold is greater than the first signal threshold.
[0081] Specifically, when the engine is in the synchronous state, it indicates that the speed reaches a high speed, and the maximum value of the third signal threshold and the fourth signal threshold is taken as the actual execution threshold. When there is a small-amplitude interference signal at a high speed, it will also be effectively filtered out. Therefore, the accuracy of determining the second target speed signal can be further improved.
[0082] The engine at least includes a crankshaft and a camshaft, and the first determination module includes a first acquisition submodule, a second acquisition submodule, a first determination submodule and a second determination submodule, wherein the first acquisition submodule is used to acquire the rotation angle of the first characteristic tooth of the crankshaft to obtain the first rotation angle, and the first characteristic tooth is one of the multiple gears of the crankshaft and the shape of the other gears is different; the second acquisition submodule is used to acquire the rotation angle of the second characteristic tooth of the camshaft to obtain the second rotation angle, and the second characteristic tooth is one of the multiple gears of the camshaft and the shape of the other gears is different; the first determination submodule is used to determine whether the first rotation angle is the same as the second rotation angle, and when the first rotation angle is the same as the second rotation angle, it is determined that the engine is in the synchronous state; the second determination submodule is used to determine that the engine is not in the synchronous state when the rotation angle of the first characteristic tooth is different from the rotation angle of the second characteristic tooth. The device can further quickly determine whether the engine is in the synchronous state.
[0083] Specifically, the first rotation angle and the second rotation angle can be monitored by providing a crankshaft position sensor at the crankshaft and a camshaft position sensor at the camshaft, and then the sensor provides real-time data to the engine control unit.
[0084] In some embodiments, the first determination module includes a third determination submodule, a fourth determination submodule, a fifth determination submodule, a sixth determination submodule and a seventh determination submodule, wherein the third determination submodule is used to determine whether the peak value of the initial speed signal is less than the first peak threshold value, and when the peak value of the initial speed signal is less than the first peak threshold value, determine the first signal threshold value as the second signal threshold value; the fourth determination submodule is used to determine whether the peak value of the initial speed signal is less than the second peak threshold value when the peak value of the initial speed signal is greater than or equal to the first peak threshold value, and when the peak value of the initial speed signal is less than the second peak threshold value, determine the first predetermined value as the second signal threshold value, wherein the second peak threshold value is greater than the first peak threshold value, and the first predetermined value is a pre-set value greater than the first signal threshold value and less than the fourth signal threshold value; the fifth determination submodule is used to determine whether the peak value of the initial speed signal is less than the second peak threshold value when the peak value of the initial speed signal is greater than or equal to the second peak threshold value The sixth determination submodule is used for determining whether the peak value of the initial speed signal is less than the third peak value threshold value when the peak value of the initial speed signal is greater than or equal to the third peak value threshold value, and determining the fourth signal threshold value as the second signal threshold value when the peak value of the initial speed signal is less than the third peak value threshold value, wherein the third peak value threshold value is greater than the second peak value threshold value; the sixth determination submodule is used for determining whether the peak value of the initial speed signal is less than the fourth peak value threshold value when the peak value of the initial speed signal is greater than or equal to the third peak value threshold value, and determining the second predetermined value as the second signal threshold value when the peak value of the initial speed signal is less than the fourth peak value threshold value, wherein the fourth peak value threshold value is greater than the third peak value threshold value, and the second predetermined value is a preset value greater than the fourth signal threshold value; the seventh determination submodule is used for determining the third predetermined value as the second signal threshold value when the peak value of the initial speed signal is greater than or equal to the fourth peak value threshold value, wherein the third predetermined value is a preset value greater than the second predetermined value. The device can further quickly determine the second signal threshold value.
[0085] Specifically, the mapping relationship table between the peak value of the above-mentioned initial speed signal and the second signal threshold is shown in Table 1. The first peak threshold is VPeak1, the second peak threshold is VPeak2, the third peak threshold is VPeak3, and the fourth peak threshold is VPeak4. The above-mentioned VPeak1 can be 0.53~3V, the above-mentioned VPeak2 can be 4~5V, the above-mentioned VPeak3 can be 6~7V, and the above-mentioned VPeak4 can be 8~10V. The above-mentioned first signal threshold VTH1 can be 100~150mV, the first predetermined value VTH2 can be 200~250mV, the fourth signal threshold VTH3 can be 350~450mV, the second predetermined value VTH4 can be 1000~1100mV, and the third predetermined value VTH5 can be 1550~1650mV. It can be achieved by Figure 5 The circuit structure shown realizes the adaptation of the above-mentioned second signal threshold.
[0086] The above-mentioned second determination module includes an eighth determination submodule, a ninth determination submodule, a tenth determination submodule, an eleventh determination submodule and a twelfth determination submodule, wherein the eighth determination submodule is used to determine whether the peak value of the above-mentioned initial speed signal is less than the first peak threshold value, and when the peak value of the above-mentioned initial speed signal is less than the first peak threshold value, determine the above-mentioned first signal threshold value as the above-mentioned third signal threshold value; the ninth determination submodule is used to determine whether the peak value of the above-mentioned initial speed signal is less than the second peak threshold value when the peak value of the above-mentioned initial speed signal is greater than or equal to the first peak threshold value, and when the peak value of the above-mentioned initial speed signal is less than the second peak threshold value, determine the first predetermined value as the above-mentioned third signal threshold value, wherein the above-mentioned second peak threshold value is greater than the above-mentioned first peak threshold value, and the above-mentioned first predetermined value is a pre-set value greater than the above-mentioned first signal threshold value and less than the above-mentioned fourth signal threshold value; the tenth determination submodule is used to determine whether the peak value of the above-mentioned initial speed signal is less than the second peak threshold value when the peak value of the above-mentioned initial speed signal is greater than or equal to the second peak threshold value. In the case of the peak value of the initial speed signal being less than the third peak value threshold, the fourth signal threshold is determined to be the third signal threshold when the peak value of the initial speed signal is less than the third peak value threshold, wherein the third peak value threshold is greater than the second peak value threshold; the eleventh determination submodule is used to determine whether the peak value of the initial speed signal is less than the fourth peak value threshold when the peak value of the initial speed signal is greater than or equal to the third peak value, and determine the second predetermined value to be the third signal threshold when the peak value of the initial speed signal is less than the fourth peak value, wherein the fourth peak value is greater than the third peak value, and the second predetermined value is a preset value greater than the fourth signal threshold; the twelfth determination submodule is used to determine the third predetermined value to be the third signal threshold when the peak value of the initial speed signal is greater than or equal to the fourth peak value, wherein the third predetermined value is a preset value greater than the second predetermined value. The device can further quickly determine the third signal threshold.
[0087] Specifically, the mapping relationship table between the peak value of the initial speed signal and the third signal threshold is shown in Table 2, the first peak threshold is VPeak1, the second peak threshold is VPeak2, the third peak threshold is VPeak3, and the fourth peak threshold is VPeak4. The first signal threshold VTH1 can be 100-150mV, the first predetermined value VTH2 can be 200-250mV, the fourth signal threshold VTH3 can be 350-450mV, the second predetermined value VTH4 can be 1000-1100mV, and the third predetermined value VTH5 can be 1550-1650mV.
[0088] The second processing unit includes a third output module, a fourth output module and a second forming module, wherein the third output module is used to determine whether the initial speed signal corresponding to each moment is greater than the second signal threshold, and output the second high level signal corresponding to the moment when the initial speed signal is greater than the second signal threshold; the fourth output module is used to output the second low level signal corresponding to the moment when the initial speed signal is less than or equal to the second signal threshold; the second forming module is used to form the second target speed signal from the second high level signal or the second low level signal corresponding to each moment. The device can further quickly form the second target speed signal through the second filtering process.
[0089] Specifically, the second filtering process can limit the voltage value of the input signal within a specific range, and the second filtering process can be implemented by a limiting filter. The circuit design of the limiting filter is relatively simple, requiring only a few passive components (such as resistors, capacitors) and / or one or more diodes. In addition, the second filtering process can quickly respond to changes in the input signal and limit the signal within a set range with almost no delay; it can also remove noise that exceeds a set threshold, reduce overshoot and undershoot in the signal, and thus improve the stability of the signal.
[0090] The engine speed signal processing device includes a processor and a memory. The acquisition unit, the first processing unit, the determination unit, and the second processing unit are all stored in the memory as program units, and the processor executes the program units stored in the memory to implement corresponding functions. The modules are all located in the same processor; or, the modules are located in different processors in any combination.
[0091] The processor includes a kernel, which retrieves the corresponding program unit from the memory. One or more kernels can be set to process the engine speed signal by adjusting kernel parameters.
[0092] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0093] An embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method for processing the engine speed signal.
[0094] Specifically, the method for processing the engine speed signal includes:
[0095] Step S201, determining whether the electronic control unit is powered on, and if the electronic control unit is powered on, acquiring the engine speed signal to obtain an initial speed signal;
[0096] Specifically, the following methods can be used to determine whether the electronic control unit (ECU) is powered on: by connecting to the vehicle's OBD-II interface, these tools can read the status and parameters of the ECU, including whether the ECU is powered on. Or by checking whether the vehicle's power system or the grounding status of the ECU is good, determine whether the ECU is powered on.
[0097] Step S202, obtaining a first signal threshold, and performing a first filtering process on the initial speed signal according to the first signal threshold to obtain a first target speed signal, and sending the first target speed signal to the electronic control unit, wherein the first signal threshold is a preset filtering threshold of the first filtering process, and the first target speed signal is a square wave signal;
[0098] Specifically, the initial speed signal is generally a chaotic non-square wave signal, and the first filtering process can be implemented by a limiting filter, a Schmitt trigger, a digital filter, a low-pass filter, a high-pass filter, a band-pass filter, an active filter, etc. to convert the non-square wave signal into a square wave signal. The first signal threshold can be manually set through a serial peripheral interface register.
[0099] Step S203, determining whether the electronic control unit receives the first target speed signal, and if the electronic control unit receives the first target speed signal, determining a second signal threshold value at least according to the peak value of the initial speed signal, wherein the second signal threshold value is greater than or equal to the first signal threshold value;
[0100] Specifically, when the electronic control unit receives the first target speed signal, it indicates that the engine has entered the high-speed mode, and an interference signal similar to a normal signal will be formed, which is easily identified as a normal speed signal. Therefore, a different processing scheme is adopted from the startup phase when the ECU is just powered on. The corresponding signal threshold is determined by the peak value of the speed signal to automatically adjust the threshold, so as to avoid the signal voltage fluctuating. Setting a fixed threshold will lead to the problem of misidentification or non-identification of the signal.
[0101] Step S204: performing a second filtering process on the initial speed signal according to the second signal threshold to obtain a second target speed signal, wherein the second target speed signal is a square wave signal.
[0102] Specifically, the second filtering process can be implemented by a limiting filter, a Schmitt trigger, a digital filter, a low-pass filter, a high-pass filter, a band-pass filter, an active filter, etc., to convert the non-square wave signal into a square wave signal. The first target speed signal and the second target speed signal can be used to monitor the performance or failure of the engine to ensure that it operates within a safe and effective working range. In an ignition engine, the first target speed signal and the second target speed signal can also be used to determine the optimal ignition timing to improve fuel efficiency and reduce emissions. In a fuel injection system, the speed signal can help control the timing and amount of fuel injection to adapt to different engine operating conditions.
[0103] An embodiment of the present invention provides a processor, and the processor is used to run a program, wherein the method for processing the engine speed signal is executed when the program is run.
[0104] An embodiment of the present invention provides a device, the device including a processor, a memory, and a program stored in the memory and executable on the processor, and when the processor executes the program, at least the following steps are implemented:
[0105] Step S201, determining whether the electronic control unit is powered on, and if the electronic control unit is powered on, acquiring the engine speed signal to obtain an initial speed signal;
[0106] Step S202, obtaining a first signal threshold, and performing a first filtering process on the initial speed signal according to the first signal threshold to obtain a first target speed signal, and sending the first target speed signal to the electronic control unit, wherein the first signal threshold is a preset filtering threshold of the first filtering process, and the first target speed signal is a square wave signal;
[0107] Step S203, determining whether the electronic control unit receives the first target speed signal, and if the electronic control unit receives the first target speed signal, determining a second signal threshold value at least according to the peak value of the initial speed signal, wherein the second signal threshold value is greater than or equal to the first signal threshold value;
[0108] Step S204: performing a second filtering process on the initial speed signal according to the second signal threshold to obtain a second target speed signal, wherein the second target speed signal is a square wave signal.
[0109] The devices in this article can be servers, PCs, PADs, mobile phones, etc.
[0110] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program for initializing at least the following method steps:
[0111] Step S201, determining whether the electronic control unit is powered on, and if the electronic control unit is powered on, acquiring the engine speed signal to obtain an initial speed signal;
[0112] Step S202, obtaining a first signal threshold, and performing a first filtering process on the initial speed signal according to the first signal threshold to obtain a first target speed signal, and sending the first target speed signal to the electronic control unit, wherein the first signal threshold is a preset filtering threshold of the first filtering process, and the first target speed signal is a square wave signal;
[0113] Step S203, determining whether the electronic control unit receives the first target speed signal, and if the electronic control unit receives the first target speed signal, determining a second signal threshold value at least according to the peak value of the initial speed signal, wherein the second signal threshold value is greater than or equal to the first signal threshold value;
[0114] Step S204: performing a second filtering process on the initial speed signal according to the second signal threshold to obtain a second target speed signal, wherein the second target speed signal is a square wave signal.
[0115] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0116] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0117] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0118] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0119] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0120] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0121] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0122] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0123] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0124] From the above description, it can be seen that the above embodiments of the present application achieve the following technical effects:
[0125] 1) The method for processing the engine speed signal of the present application first determines whether the electronic control unit is powered on. When the electronic control unit is powered on, the engine speed signal is obtained to obtain an initial speed signal; then, according to a first signal threshold, the initial speed signal is subjected to a first filtering process to obtain a first target speed signal, and the first target speed signal is sent to the electronic control unit; then, it is determined whether the electronic control unit receives the first target speed signal. When the electronic control unit receives the first target speed signal, a second signal threshold is determined at least according to a peak value of the initial speed signal; finally, according to the second signal threshold, the initial speed signal is subjected to a second filtering process to obtain a second target speed signal. Since the engine speed fluctuates violently in the startup phase when it is just powered on, the crankshaft signal voltage amplitude fluctuates, and the speed signal recognition is inaccurate. In this phase, by setting a smaller first signal threshold for filtering, the low speed signal when the engine is just started can be processed in time, thereby improving the speed signal recognition accuracy. When the electronic control unit receives the first target speed signal, an interference signal similar to a normal signal will be formed. After being recognized as a normal speed signal, the speed signal recognition is inaccurate. In this phase, the corresponding signal threshold is determined by the peak value of the speed signal to automatically adjust the threshold, thereby avoiding the problem that the signal voltage fluctuates, and setting a fixed threshold will lead to misidentification or non-recognition of the signal. Therefore, the above method adopts different signal recognition schemes based on different speed conditions, accurately identifies valid signals, and eliminates the interference of invalid signals, thereby improving the signal recognition accuracy, thereby solving the technical problem of inaccurate engine speed signal recognition in the prior art.
[0126] 2) The engine speed signal processing device of the present application, the acquisition unit determines whether the electronic control unit is powered on, and when the electronic control unit is powered on, the engine speed signal is acquired to obtain an initial speed signal; the first processing unit performs a first filtering process on the initial speed signal according to a first signal threshold value to obtain a first target speed signal, and sends the first target speed signal to the electronic control unit; the second processing unit determines whether the electronic control unit receives the first target speed signal, and when the electronic control unit receives the first target speed signal, determines a second signal threshold value at least based on a peak value of the initial speed signal; the determination unit performs a second filtering process on the initial speed signal according to the second signal threshold value to obtain a second target speed signal. During the startup phase of the engine when it is just powered on, the speed fluctuates violently, the crankshaft signal voltage amplitude fluctuates, and the speed signal recognition is inaccurate. In this phase, by setting a smaller first signal threshold for filtering, the low-speed signal when the engine is just started can be processed in time, thereby improving the speed signal recognition accuracy. When the electronic control unit receives the first target speed signal, an interference signal similar to a normal signal will be formed. After being recognized as a normal speed signal, the speed signal recognition is inaccurate. In this phase, the corresponding signal threshold is determined by the peak value of the speed signal to automatically adjust the threshold, thereby avoiding the problem that the signal voltage fluctuates and setting a fixed threshold will lead to misidentification or non-recognition of the signal. Therefore, the above-mentioned device adopts different signal recognition schemes based on different speed conditions, accurately identifies valid signals, and eliminates the interference of invalid signals, thereby improving the signal recognition accuracy, thereby solving the technical problem of inaccurate engine speed signal recognition in the prior art.
[0127] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for processing an engine speed signal, characterized in that: include: Determine whether the electronic control unit is powered on, and when the electronic control unit is powered on, obtain a speed signal of the engine to obtain an initial speed signal; Acquire a first signal threshold, and perform a first filtering process on the initial speed signal according to the first signal threshold to obtain a first target speed signal, and send the first target speed signal to the electronic control unit, wherein the first signal threshold is a preset filtering threshold of the first filtering process, and the first target speed signal is a square wave signal; determining whether the electronic control unit receives the first target speed signal, and determining a second signal threshold value at least according to a peak value of the initial speed signal when the electronic control unit receives the first target speed signal, wherein the second signal threshold value is greater than or equal to the first signal threshold value; The initial rotation speed signal is subjected to a second filtering process according to the second signal threshold to obtain a second target rotation speed signal, wherein the second target rotation speed signal is a square wave signal.
2. The method according to claim 1, characterized in that According to the first signal threshold, performing a first filtering process on the initial speed signal to obtain a first target speed signal includes: Determine whether the initial speed signal corresponding to each moment is greater than the first signal threshold, and output a first high-level signal corresponding to the moment when the initial speed signal is greater than the first signal threshold; When the initial speed signal is less than or equal to the first signal threshold, outputting a first low-level signal corresponding to the moment; The first high-level signal or the first low-level signal corresponding to each moment forms the first target speed signal.
3. The method according to claim 1, characterized in that Determining a second signal threshold at least according to the peak value of the initial rotation speed signal includes: determining whether the engine is in a synchronous state, and if the engine is not in the synchronous state, determining the signal threshold corresponding to the peak value of the initial speed signal as the second signal threshold according to a mapping relationship between a speed signal peak value and a signal threshold value and a peak value of the initial speed signal, wherein the mapping relationship is used to characterize a positive correlation between the speed signal peak value and the signal threshold value; When the engine is in the synchronous state, the third signal threshold is determined according to the peak value of the initial speed signal, and the maximum value between the third signal threshold and the fourth signal threshold is determined as the second signal threshold, wherein the fourth signal threshold is a pre-set filtering threshold for filtering processing when the engine is in the synchronous state, and the fourth signal threshold is greater than the first signal threshold.
4. The method according to claim 3, characterized in that The engine includes at least a crankshaft and a camshaft, and determining whether the engine is in the synchronous state includes: Obtaining a rotation angle of a first characteristic tooth of the crankshaft to obtain a first rotation angle, wherein the first characteristic tooth is a gear among a plurality of gears of the crankshaft that has a shape different from that of the other gears; Obtaining a rotation angle of a second characteristic tooth of the camshaft to obtain a second rotation angle, wherein the second characteristic tooth is a gear among the multiple gears of the camshaft that has a shape different from that of the other gears; determining whether the first rotation angle and the second rotation angle are the same, and determining that the engine is in the synchronous state when the first rotation angle and the second rotation angle are the same; In a case where the rotation angle of the first characteristic tooth and the rotation angle of the second characteristic tooth are different, it is determined that the engine is not in the synchronous state.
5. The method according to claim 3, characterized in that: When the engine is not in the synchronous state, determining the signal threshold corresponding to the peak value of the initial speed signal as the second signal threshold according to the mapping relationship between the speed signal peak value and the signal threshold value and the peak value of the initial speed signal, including: determining whether the peak value of the initial rotation speed signal is less than a first peak value threshold, and determining the first signal threshold to be the second signal threshold when the peak value of the initial rotation speed signal is less than the first peak value threshold; When the peak value of the initial rotation speed signal is greater than or equal to the first peak value threshold, determine whether the peak value of the initial rotation speed signal is less than a second peak value threshold, and when the peak value of the initial rotation speed signal is less than the second peak value threshold, determine a first predetermined value as the second signal threshold, wherein the second peak value threshold is greater than the first peak value threshold, and the first predetermined value is a preset value greater than the first signal threshold and less than the fourth signal threshold; When the peak value of the initial rotation speed signal is greater than or equal to the second peak value threshold, determining whether the peak value of the initial rotation speed signal is less than a third peak value threshold, and when the peak value of the initial rotation speed signal is less than the third peak value threshold, determining the fourth signal threshold to be the second signal threshold, wherein the third peak value threshold is greater than the second peak value threshold; When the peak value of the initial rotation speed signal is greater than or equal to the third peak value threshold, determining whether the peak value of the initial rotation speed signal is less than a fourth peak value threshold, and when the peak value of the initial rotation speed signal is less than the fourth peak value threshold, determining a second predetermined value as the second signal threshold, wherein the fourth peak value threshold is greater than the third peak value threshold, and the second predetermined value is a preset value greater than the fourth signal threshold; When the peak value of the initial rotation speed signal is greater than or equal to the fourth peak value threshold, a third predetermined value is determined to be the second signal threshold, wherein the third predetermined value is a preset value greater than the second predetermined value.
6. The method according to claim 3, characterized in that When the engine is in the synchronous state, determining a third signal threshold according to the peak value of the initial speed signal includes: determining whether the peak value of the initial rotation speed signal is less than a first peak value threshold, and determining the first signal threshold as the third signal threshold when the peak value of the initial rotation speed signal is less than the first peak value threshold; When the peak value of the initial rotation speed signal is greater than or equal to the first peak value threshold, determine whether the peak value of the initial rotation speed signal is less than the second peak value threshold, and when the peak value of the initial rotation speed signal is less than the second peak value threshold, determine a first predetermined value as the third signal threshold, wherein the second peak value threshold is greater than the first peak value threshold, and the first predetermined value is a preset value greater than the first signal threshold and less than the fourth signal threshold; When the peak value of the initial rotation speed signal is greater than or equal to the second peak value threshold, determining whether the peak value of the initial rotation speed signal is less than a third peak value threshold, and when the peak value of the initial rotation speed signal is less than the third peak value threshold, determining the fourth signal threshold to be the third signal threshold, wherein the third peak value threshold is greater than the second peak value threshold; When the peak value of the initial rotation speed signal is greater than or equal to the third peak value threshold, determine whether the peak value of the initial rotation speed signal is less than a fourth peak value threshold, and when the peak value of the initial rotation speed signal is less than the fourth peak value threshold, determine a second predetermined value to be the third signal threshold, wherein the fourth peak value threshold is greater than the third peak value threshold, and the second predetermined value is a preset value greater than the fourth signal threshold; When the peak value of the initial rotation speed signal is greater than or equal to the fourth peak value threshold, a third predetermined value is determined to be the third signal threshold, wherein the third predetermined value is a preset value greater than the second predetermined value.
7. The method according to claim 1, characterized in that Performing a second filtering process on the initial speed signal according to the second signal threshold to obtain a second target speed signal includes: Determine whether the initial speed signal corresponding to each moment is greater than the second signal threshold, and output a second high level signal corresponding to the moment when the initial speed signal is greater than the second signal threshold; When the initial speed signal is less than or equal to the second signal threshold, outputting a second low level signal corresponding to the moment; The second high-level signal or the second low-level signal corresponding to each moment forms the second target speed signal.
8. A device for processing an engine speed signal, characterized in that: include: an acquisition unit, used to determine whether the electronic control unit is powered on, and when the electronic control unit is powered on, acquire a speed signal of the engine to obtain an initial speed signal; a first processing unit, configured to obtain a first signal threshold, and perform a first filtering process on the initial speed signal according to the first signal threshold to obtain a first target speed signal, and send the first target speed signal to the electronic control unit, wherein the first signal threshold is a preset filtering threshold of the first filtering process, and the first target speed signal is a square wave signal; a determination unit, configured to determine whether the electronic control unit receives the first target speed signal, and, if the electronic control unit receives the first target speed signal, determine a second signal threshold value at least according to a peak value of the initial speed signal, wherein the second signal threshold value is greater than or equal to the first signal threshold value; The second processing unit is used to perform a second filtering process on the initial speed signal according to the second signal threshold to obtain a second target speed signal, wherein the second target speed signal is a square wave signal.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method according to any one of claims 1 to 7.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Engine rotating speed signal identification method, device and equipment and storage medium
CN115856344A
Engine rotating speed control method and device, vehicle and storage medium
CN118049320A
Pilotless automobile device and pilotless automobile system
CN218966851U
Method and device for controlling a throttle valve of an internal combustion engine
EP4273392A1
Method of determining engine speed
GB0130628D0
Cited By
Rotating speed integration method and circuit for data acquisition
CN120195422A
Engine synchronous control method, electronic injection controller and storage medium
CN121047683A
High-noise-margin self-adaptive rotating speed signal processing device, tachometer and rotating speed determination method
CN121805616A
High-noise-tolerance adaptive rotational speed signal processing device, tachometer and rotational speed determination method
CN121805616B
Engine rotating speed detection circuit and method and electric automobile
CN121805617A
