CN-117072676-B - Gear checking method and device, electronic equipment and readable storage medium
Abstract
The application discloses a gear checking method, a gear checking device, electronic equipment and a readable storage medium, wherein the method comprises the following steps: acquiring a first stop lever position signal and a second stop lever position signal, wherein the stop lever position signal is a voltage signal output after the electronic gear shifter shifts, determining a first stop lever position state according to the first stop lever position signal, determining a second stop lever position state according to the second stop lever position signal, determining a first steady state time length of the first stop lever position state and a second steady state time length of the second stop lever position state, judging whether the first stop lever position state is the same as the second stop lever position state or not, obtaining a judging result, and determining an output gear instruction according to the first steady state time length, the second steady state time length and the judging result. The application effectively prevents the position state of the stop lever from changing within a certain time by detecting the steady-state time length, and reduces the influence of the self error of the system on the position signal of the stop lever by mutual verification of the position states of the two stop levers.
Inventors
- YANG MINGYUAN
Assignees
- 上海汽车集团股份有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20230822
Claims (8)
- 1. A gear inspection method, the method comprising: Acquiring a first stop lever position signal and a second stop lever position signal, wherein the first stop lever position signal and the second stop lever position signal are voltage signals output after the electronic gear shifter shifts; Determining a first bar position state according to the first bar position signal, and determining a second bar position state according to the second bar position signal; determining a first steady state duration of the first bar position state and a second steady state duration of the second bar position state; Judging whether the position state of the first stop lever is the same as the position state of the second stop lever or not, and obtaining a judging result; determining an output gear instruction according to the first steady state duration, the second steady state duration and the judging result; The type of the first stop lever position state and the type of the second stop lever position state are non-fault types, and the determining the output gear instruction according to the first steady state duration, the second steady state duration and the judging result comprises the following steps: if the first steady-state time length and the second steady-state time length are both longer than a first preset time length and the judging result is the same, determining a gear change instruction according to any one of the first gear lever position signal and the second gear lever position signal and outputting the gear change instruction as the gear instruction; if the first steady-state duration and the second steady-state duration are both longer than the first preset duration and are not longer than the second preset duration, and the judgment results are different, determining that the output gear instruction is a gear unchanged instruction; if the first steady-state duration and the second steady-state duration are both longer than the second preset duration and are not longer than a third preset duration, and the judgment results are different, determining that the output gear instruction is a gear unchanged instruction, wherein the second preset duration is longer than the first preset duration, and the third preset duration is longer than the second preset duration; And if the first steady state duration and the second steady state duration are both longer than the third preset duration and the judging result is different, determining that the output gear instruction is a gear unchanged instruction.
- 2. The method of claim 1, wherein determining a first bar position state from the first bar position signal and determining a second bar position state from the second bar position signal comprises: Performing analog-to-digital conversion on the first stop lever position signal to obtain a converted first analog value, and performing analog-to-digital conversion on the second stop lever position signal to obtain a converted second analog value; if the first modulus value falls into a first preset range, determining a state corresponding to the first preset range as the first stop lever position state; and if the second modulus value falls into a second preset range, determining the state corresponding to the second preset range as the second stop lever position state.
- 3. The method of claim 1, wherein the type of the first bar position state and the type of the second bar position state are both non-faulty types, the method further comprising: And if at least one of the first steady-state duration and the second steady-state duration is not greater than a first preset duration, determining that the output gear instruction is a gear unchanged instruction.
- 4. The method as recited in claim 1, further comprising: If the type of the first stop lever position state and the type of the second stop lever position state are both fault types, determining that the output gear instruction is a gear unchanged instruction; And/or the number of the groups of groups, And if the type of the first stop lever position state is a fault type and the type of the second stop lever position state is a non-fault type, determining that the output gear instruction is a gear change instruction according to the second stop lever position state.
- 5. A gear check device, the device comprising: the signal acquisition unit is used for acquiring a first stop lever position signal and a second stop lever position signal, wherein the first stop lever position signal and the second stop lever position signal are voltage signals output after the electronic gear shifter shifts; the state determining unit is used for determining a first stop lever position state according to the first stop lever position signal and determining a second stop lever position state according to the second stop lever position signal; the time length determining unit is used for determining a first stable time length of the first stop lever position state and a second stable time length of the second stop lever position state; the judging unit is used for judging whether the position state of the first stop lever is the same as the position state of the second stop lever or not, and obtaining a judging result; The instruction determining unit is used for determining an output gear instruction according to the first steady-state duration, the second steady-state duration and the judging result; the first stop lever position state type and the second stop lever position state type are both non-fault types, and the instruction determining unit is specifically configured to: if the first steady-state time length and the second steady-state time length are both longer than a first preset time length and the judging result is the same, determining a gear change instruction according to any one of the first gear lever position signal and the second gear lever position signal and outputting the gear change instruction as the gear instruction; if the first steady-state duration and the second steady-state duration are both longer than the first preset duration and are not longer than the second preset duration, and the judgment results are different, determining that the output gear instruction is a gear unchanged instruction; if the first steady-state duration and the second steady-state duration are both longer than the second preset duration and are not longer than a third preset duration, and the judgment results are different, determining that the output gear instruction is a gear unchanged instruction, wherein the second preset duration is longer than the first preset duration, and the third preset duration is longer than the second preset duration; And if the first steady state duration and the second steady state duration are both longer than the third preset duration and the judging result is different, determining that the output gear instruction is a gear unchanged instruction.
- 6. The apparatus according to claim 5, wherein the state determining unit includes: The signal conversion subunit is used for carrying out analog-to-digital conversion on the first stop lever position signal to obtain a converted first analog value, and carrying out analog-to-digital conversion on the second stop lever position signal to obtain a converted second analog value; And the range determining subunit is used for determining the state corresponding to the first preset range as the first stop lever position state if the first modulus value falls into a first preset range, and determining the state corresponding to the second preset range as the second stop lever position state if the second modulus value falls into a second preset range.
- 7. An electronic device comprising a memory and a processor; The memory is used for storing programs; The processor being adapted to execute the program for carrying out the steps of the gear checking method according to any one of claims 1-4.
- 8. A readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the gear checking method according to any of claims 1-4.
Description
Gear checking method and device, electronic equipment and readable storage medium Technical Field The present application relates to the field of vehicle engineering, and more particularly, to a gear inspection method, apparatus, electronic device, and readable storage medium. Background With the development of the technology in the automotive field, the gear shifting of a vehicle is gradually changed from the manual mechanical gear shifting to the electric signal control gear shifting, and a driver can realize the gear shifting of the vehicle only through an electronic gear shifter. The circuit structure in the electronic gear shifter comprises two circuits and six Hall chips, wherein three Hall chips are arranged in one circuit, and the other three Hall chips are arranged in the other circuit. One Hall chip in one circuit and one Hall chip in the other circuit are a group of Hall chips. After the electronic gear shifter changes gear, a group of Hall chips are conducted, two paths of different resistance signals are output, and therefore two paths of different voltage signals are collected. The controller in the electronic gear shifter recognizes the voltage signal and outputs a target gear of the driver according to the voltage signal. Because the system inevitably generates errors, the situation that the voltage signal after the gear shifting of the driver is sampled by the controller is easy to generate, the controller outputs an error gear, and the vehicle generates unexpected movement, so that the safety problem is caused. Disclosure of Invention In view of the above, the present application provides a gear checking method, apparatus, electronic device, and readable storage medium for solving the problem of a controller outputting an erroneous gear. In order to achieve the above object, the following solutions have been proposed: A gear verification method, the method comprising: acquiring a first stop lever position signal and a second stop lever position signal, wherein the stop lever position signals are voltage signals output after the electronic gear shifter shifts; Determining a first bar position state according to the first bar position signal, and determining a second bar position state according to the second bar position signal; determining a first steady state duration of the first bar position state and a second steady state duration of the second bar position state; Judging whether the position state of the first stop lever is the same as the position state of the second stop lever or not, and obtaining a judging result; And determining an output gear instruction according to the first steady state duration, the second steady state duration and the judging result. Optionally, the determining the first bar position state according to the first bar position signal and determining the second bar position state according to the second bar position signal includes: Performing analog-to-digital conversion on the first stop lever position signal to obtain a converted first analog value, and performing analog-to-digital conversion on the second stop lever position signal to obtain a converted second analog value; if the first modulus value falls into a first preset range, determining a state corresponding to the first preset range as the first stop lever position state; and if the second modulus value falls into a second preset range, determining the state corresponding to the second preset range as the second stop lever position state. Optionally, the type of the first lever position state and the type of the second lever position state are both non-fault types, and determining the output gear instruction according to the first steady state duration, the second steady state duration and the judgment result includes: If the first steady-state duration and the second steady-state duration are both longer than a first preset duration and the judging result is the same, determining a gear change instruction according to any one of the first stop lever position and the second stop lever position and outputting the gear change instruction as the gear instruction; if the first steady-state duration and the second steady-state duration are both longer than the first preset duration and are not longer than the second preset duration, and the judgment results are different, determining that the output gear instruction is a gear unchanged instruction; if the first steady-state duration and the second steady-state duration are both longer than the second preset duration and are not longer than a third preset duration, and the judgment results are different, determining that the output gear instruction is a gear unchanged instruction, wherein the second preset duration is longer than the first preset duration, and the third preset duration is longer than the second preset duration; And if the first steady state duration and the second steady state duration are both longer than the third preset duration and