Position encoder monitoring method, device, electronic device, storage medium and vehicle
By setting the duration to distinguish jumps under the motor drive command, filtering position information during inertial operation, and determining error conditions when the motor stops, the problem of inability to distinguish external interference from system failure in the prior art is solved, and the accuracy of fault judgment is improved and stability of the system.
Patent Information
- Application Number
- CN202211449822.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-18
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2042-11-18
AI Technical Summary
In the monitoring of position encoder, the prior art cannot effectively distinguish between extremely short-term jumps caused by external interference and system failures, and an error will also be triggered in non-failure situations.
By monitoring the duration of the jump under the motor drive command, the first time length is set to distinguish system failures; when inertial operation, the second time length is set to filter the effective position information; when the motor stops, the target position and actual Position determination error condition; after the motor is powered on again, check whether the fault is eliminated.
It improves the accuracy of system fault judgment, avoids error reports in non-failure situations, and ensures effective identification and correction of system faults.
Smart Images

Figure CN115773773B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present application relate to the field of motor control technology, and in particular, to a position encoder monitoring method, device, electronic device, storage medium and vehicle. Background Art
[0002] In the monitoring of the relevant position encoder, when the position information fed back by the position encoder jumps, a system fault will be reported. However, in the actual operation of the motor, other non-system fault factors such as external interference will also cause a very short jump, but the jump can be quickly restored and should not be regarded as a system failure, so there is no need to report an error.
[0003] Based on this, a solution is needed that can exclude the jumps caused by external interference and only report errors for the jumps caused by system failures. Summary of the invention
[0004] In view of this, the purpose of the present application is to propose a position encoder monitoring method, device, electronic device, storage medium and vehicle to solve the problem that jumps caused by factors other than system failures may cause system failure errors.
[0005] Based on the above objectives, the present application provides a position encoder monitoring method, comprising:
[0006] When a preset driving instruction is executed, the motor operates according to the driving instruction, determining whether a jump occurs in the position encoder of the motor, and in response to the jump occurring, determining whether a duration of the jump exceeds a preset first duration, and determining that a system failure occurs in response to the duration exceeding the first duration;
[0007] When the driving instruction ends, the motor runs by inertia, so that the position encoder feeds back position information that meets the preset time condition;
[0008] When the motor stops running, determining whether the position information when the motor stops is consistent with a preset target position, and in response to the position information being inconsistent with the target position, determining whether a preset error condition is satisfied, and in response to the error condition being satisfied, determining that the system fault occurs;
[0009] In response to the occurrence of the system fault, after the motor is powered on again, it is determined whether the system fault is eliminated.
[0010] Further, after determining whether the duration of the jump exceeds a preset first duration, the method further includes:
[0011] In response to the duration being less than or equal to the first time period, it is determined that the system failure has not occurred.
[0012] Furthermore, the position encoder is made to feedback position information that satisfies a preset time condition, including:
[0013] Monitoring the duration of the current position information of the position encoder;
[0014] In response to the duration of the current position information exceeding a preset second duration, determining the current position information as a valid value and feeding back the valid value;
[0015] In response to the duration of the current location information not exceeding the second duration, the previous location information of the current location information is determined as a valid value.
[0016] Further, judging whether the preset error reporting condition is met includes:
[0017] Determine the number of times the position information is trimmed using the motor drive instruction;
[0018] In response to the number exceeding a preset number limit, determining that the error reporting condition is satisfied;
[0019] In response to the number not exceeding a preset number limit, it is determined that the error reporting condition is not satisfied.
[0020] Furthermore, after determining whether the preset error reporting condition is met, it also includes:
[0021] In response to not satisfying the error condition, executing the driving instruction to correct the position information;
[0022] And determine again whether a system failure has occurred.
[0023] Further, after the motor is powered on again, determining whether the system fault is eliminated includes:
[0024] In response to the system being powered on again, detecting whether the position information currently fed back by the position encoder is consistent with the target position;
[0025] In response to the current feedback position information being consistent with the target position, determining that the system fault is recovered;
[0026] In response to the current fed-back position information being inconsistent with the target position, it is determined that the system fault has not been recovered.
[0027] Based on the same inventive concept, the present application also provides a position encoder monitoring device, including: a first operating state monitoring module, a second operating state monitoring module, a stop state monitoring module and a restart module;
[0028] Wherein, the first operation state monitoring module is configured to, when a preset drive instruction is executed, the motor operates according to the drive instruction, determine whether a jump occurs in the position encoder of the motor, and in response to the jump, determine whether the duration of the jump exceeds a preset first duration, and in response to the duration exceeding the first duration, determine that a system failure occurs;
[0029] The second operation state monitoring module is configured to, when the driving instruction ends, allow the motor to operate by inertia, so that the position encoder can feedback position information that meets a preset time condition;
[0030] The stop state monitoring module is configured to, when the motor stops running, determine whether the position information when the motor stops is consistent with a preset target position, and in response to the position information being inconsistent with the target position, determine whether a preset error reporting condition is met, and in response to the error reporting condition being met, determine that the system failure occurs;
[0031] The restart module is configured to, in response to the occurrence of the system fault, determine whether the system fault is eliminated after the motor is powered on again.
[0032] Based on the same inventive concept, the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a position encoder monitoring method as described in any one of the above items is implemented.
[0033] Based on the same inventive concept, the present application also provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the position encoder monitoring method as described above.
[0034] Based on the same inventive concept, the present application also provides a vehicle, which includes a position encoder monitoring device and an electronic device, and the electronic device executes the position encoder monitoring method as described in any one of the above items.
[0035] From the above, it can be seen that the position encoder monitoring method, device, electronic device, storage medium and vehicle provided by the present application, based on drive instructions and operating conditions, divide the working state of the motor into driven by drive instructions, driven only by inertia, and stopped running, and comprehensively consider the jump conditions under different operating conditions to make a judgment on the system fault; when the motor relies on the drive instruction to operate, by comparing the duration of the jump and the first duration, the jump caused by non-system faults can be excluded. When relying on inertia to operate, based on the designed duration conditions, the jump with too short duration, that is, the invalid value, can be excluded. When the motor stops, the designed error reporting conditions can be used to correct the problem of the motor's stop position error caused by non-system faults. Based on this, the accuracy of system fault judgment can be effectively improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the technical solutions in the present application or related technologies, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0037] Figure 1A A first division diagram of the code disk area of the position encoder according to an embodiment of the present application;
[0038] Figure 1B A second division diagram of the code disk area of the position encoder according to an embodiment of the present application;
[0039] Figure 2 A flow chart of a position encoder monitoring method according to an embodiment of the present application;
[0040] Figure 3 It is an execution logic diagram of the position encoder monitoring method according to an embodiment of the present application;
[0041] Figure 4 A schematic diagram of the rotation direction of the motor in an embodiment of the present application;
[0042] Figure 5 This is a schematic diagram of the structure of a position encoder monitoring device according to an embodiment of the present application;
[0043] Figure 6 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0044] In order to make the objectives, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.
[0045] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present application should be the usual meanings understood by people with ordinary skills in the field to which the present application belongs. The "first", "second" and similar words used in the embodiments of the present application do not represent any order, quantity or importance, but are only used to distinguish different components. "Including" or "comprising" and similar words mean that the elements or objects appearing in front of the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connecting" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0046] As described in the background technology section, the related position encoder monitoring method is still difficult to meet the needs of practical use.
[0047] In the process of implementing the present application, the applicant discovered that the main problem with the related position encoder monitoring method is that when the position encoder jumps, it is considered that there is a fault in the position encoder or the motor, so the drive motor will be stopped and an error will be reported.
[0048] However, in actual use, the position encoder may also jump due to other non-fault factors such as external interference. However, such jumps caused by other non-fault factors such as external interference can be restored in a very short time. Therefore, it is necessary to distinguish such non-fault jumps and not report errors for such jumps.
[0049] Based on this, one or more embodiments in the present application provide a position encoder monitoring method, which performs fault monitoring based on the two processes of the motor running under drive instructions and the motor running under inertia, so as to avoid system fault errors and other problems caused by short jumps in the position encoder due to external interference.
[0050] The embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0051] In the embodiments of the present application, a transfer case of a four-wheel drive vehicle is taken as a specific example.
[0052] In this example, the transfer case includes a transfer case control unit, which can monitor the rotational position of the position encoder to execute the position encoder monitoring method of the present application.
[0053] Furthermore, the transfer case further comprises a motor and a position encoder, wherein the position encoder has Figure 1AAs shown in the code disk, when the position encoder rotates with the motor, the current rotation position can be determined through the code disk, and the relevant position information can be fed back to the actuator control unit.
[0054] Specifically, in Figure 1A In the code disk shown, the following Figure 1B The four location areas shown are area A, area B, area C and area D. Figure 1A and Figure 1B The shaded part in the figure represents the metal part of the code disk, where Figure 1B As shown, when the position encoder's scribe contacts the metal part of each position area, the position encoder feeds back the position as 0 in the position information; when the position encoder's scribe does not contact the metal part of each position area, the position encoder feeds back the position as 1 in the position information, for example Figure 1B The 4-bit binary position code is shown in .
[0055] In this embodiment, under ideal conditions, the position encoder can rotate unidirectionally from left to right or from right to left with the motor. When the position encoder rotates unidirectionally from left to right, it will pass through Figure 1B For example, from Figure 1B The topmost position, that is, the position information is: position code 1111, position name LEFT STOP (left side - stop), passing through 1010, 2WD HIGH (two-wheel drive - high speed); 1011, ZONE1 (zone 1); 1001, ZONE2 (zone 2); 1011, ZONE3 (zone 3); 0011, 4WD HIGH (four-wheel drive - high speed); 0111, ZONE4 (zone 4); 0110, ZONE5 (zone 5); 1110, TRANSITION (transition); 0110, ZONE5; 1110, TRANSITION; 0110, ZONE5; 1110, ZONE6 (zone 6); 1100, 4WD LOW (four-wheel drive - low speed), and 1111, RIGHT STOP (right side - stop) 15 different positions; when the position encoder rotates unidirectionally from right to left, it will rotate from 1111, RIGHT STOP position to 1111, LEFT STOP position in the opposite order of the above positions.
[0056] The rotation of the transfer case motor can be based on the following two situations:
[0057] One of them is based on the situation that the transfer case control unit sends a driving instruction to the motor, and drives the motor to rotate and drives the position encoder to rotate by running the driving instruction.
[0058] Furthermore, another situation is that after the drive instruction is executed, the motor is driven to rotate and drive the position encoder to rotate only by the inertia of rotation.
[0059] refer to Figure 2 , a position encoder monitoring method according to an embodiment of the present application comprises the following steps:
[0060] Step S201, when running a preset drive instruction and the motor operates according to the drive instruction, determine whether a jump occurs in the position encoder of the motor; in response to the jump occurring, determine whether the duration of the jump exceeds a preset first duration; in response to the duration exceeding the first duration, determine that a system failure occurs.
[0061] In an embodiment of the present application, when the motor of the transfer case rotates based on a drive instruction, the position encoder can be continuously monitored in real time to see if a jump occurs based on the position information fed back by the position encoder. When a jump occurs, it can be determined based on a preset first time duration whether the jump can be determined as a system failure.
[0062] Specifically, when the motor of the transfer case receives a driving instruction sent by the transfer case control unit, a target position is specifically indicated, and the target position represents the position where the position encoder should be located when the rotation stops after the rotation.
[0063] Furthermore, when the position encoder rotates with the motor, each time the blade passes a position on the code disk, the position information of the current position will be fed back to the transfer case control unit. Based on the position information, it can be determined whether the position encoder has a jump.
[0064] Specifically, Figure 1B As shown, based on the drive instruction, the correct position information that the position encoder should feedback under ideal conditions and the feedback order of each position information can be determined.
[0065] In this embodiment, when the rotation of the position encoder is driven by a driving instruction, the fed-back position information can be regarded as a valid value without judging whether the position information is valid.
[0066] Furthermore, during the actual rotation of the position encoder, when the position information currently fed back does not match the expected correct position information, it is considered that a jump has occurred in the position encoder.
[0067] Furthermore, when the position information currently fed back by the position encoder is consistent with the expected correct position information, it is considered that the position encoder has not jumped.
[0068] Furthermore, when it is determined that a jump has occurred in the position encoder, in some cases the duration of the jump will be very short, that is, the position encoder is in the wrong position after the jump, but jumps back to the correct position in a very short time. In this case, it can be considered that the jump in a very short time will not affect the rotation of the motor and the operation of the transfer case. Therefore, there is no need to regard it as a system failure and there is no need to report an error.
[0069] Based on this, it can be determined whether the jump is classified as a system failure by further monitoring the duration of the jump.
[0070] Specifically, a first duration can be set as a time threshold. When the duration of the jump exceeds the set first duration, that is, is greater than the first duration, it can be considered that the duration of the jump is too long, and it should be regarded as a system failure, and the system should report an error.
[0071] Furthermore, when the duration of the jump does not exceed the set first duration, that is, is less than or equal to the first duration, it can be considered that the duration of the jump is short, and there is no need to regard it as a system failure, and the system does not need to report an error.
[0072] Furthermore, if the current position information indicates that the position encoder has not jumped, or the duration of the jump has not reached the first time length, the position encoder can continue to be monitored, and the next position information fed back by it can be compared with the above-mentioned first time length, as well as the system failure judgment, until the drive instruction is executed.
[0073] It can be seen that in this embodiment, when the motor rotates under the driving instruction, the feedback position information is regarded as a valid value. Based on this, it is possible to directly determine whether a jump occurs in each position information. Furthermore, by comparing the first duration and the duration of the jump, jumps with long duration and short duration can be distinguished, and only jumps with a duration longer than the first duration are attributed to system failures, and jumps with a duration less than or equal to the first duration are excluded from system failures, so as to avoid errors caused by jumps due to non-fault factors such as other external interference.
[0074] In another specific embodiment of the present application, Figure 3 As shown, based on the received driving instruction, the motor of the transfer case can execute step S301, where the driving instruction drives the motor to rotate.
[0075] Specifically, if Figure 4 As shown in the figure, under ideal conditions without faults and jumps, the drive command received by the motor can drive the motor and the position encoder to rotate from left to right. Specifically, the position encoder can be rotated from 0011, 4WD HIGH position to 1100, 4WD LOW position, and follow Figure 4 The ideal rotation direction marked in the figure passes through the positions: 0011, 4WD HIGH; 0111, ZONE4; 0110, ZONE5; 1110, TRANSITION; 0110, ZONE5; 1110, TRANSITION; 0110, ZONE5; 1110, ZONE6; and, 1100, 4WD LOW.
[0076] Furthermore, after the position encoder passes Figure 4 For each position shown in the figure, the corresponding position information is fed back to the transfer case control unit.
[0077] The target location can be Figure 4 Position shown: 1100, 4WD LOW.
[0078] Further, based on the position information fed back by the position encoder, step S302 may be executed to determine whether a jump occurs.
[0079] Specifically, Figure 4 As shown, during the actual rotation of the position encoder, the position encoder first rotates from the position 1011, ZONE3 to the position 0011, 4WD HIGH, and then fails to continue to rotate to the correct position 0111, ZONE4, but rotates to the position 1011, ZONE3, and then rotates from the position 1011, ZONE3 to the position 0011, 4WD HIGH again. Therefore, it can be determined that the position encoder has jumped.
[0080] Further, based on the judgment of the above step S302, when the judgment result is yes, step S303 can be executed to determine whether the jump time is greater than 100ms; and when the judgment result is no, step S304 can be executed to determine whether the next position jumps until the instruction ends.
[0081] Specifically, when the position encoder jumps, the duration of the jump can be monitored, that is, the duration of the position information staying at the position of 1011, ZONE3 after it rotates from 0011, 4WD HIGH to 1011, ZONE3, and the duration of staying at this position is compared with the preset first time length to determine whether the duration is greater than 100ms.
[0082] The first duration may be calibrated according to specific requirements, for example, it may be 100 ms.
[0083] Further, based on the judgment in the above step S303, when the judgment result is yes, step S311 may be executed to determine that the system fails.
[0084] Specifically, when the duration of the jump is greater than 100 ms, it can be determined that a system failure occurs, wherein the system may be, for example, a four-wheel drive system of a vehicle.
[0085] Further, based on the judgment of the above step S303, when the judgment result is no, step S304 can be executed to judge whether the next position jumps until the instruction ends.
[0086] Specifically, if the current position information indicates that the position encoder has not jumped, or the duration of the jump does not exceed 100ms, the next position information fed back by the position encoder can be monitored to determine whether the position encoder has jumped and whether the duration of the jump exceeds 100ms until the execution of the drive instruction is completed.
[0087] It can be seen that when the motor is driven by the drive instruction, based on considering each feedback position information as a valid value, it is possible to directly determine whether each position information has a jump. Based on this, after the position information jumps to 1011, ZONE3, according to the designed first duration of 100ms, when the duration of staying at 1011, ZONE3 exceeds 100ms, it is judged as a system fault, so as to exclude the case where the duration is less than or equal to 100ms, the jump caused by other external factors is judged as a system fault.
[0088] Step S202: When the driving instruction ends and the motor runs by inertia, the position encoder is made to feedback position information that meets a preset time condition.
[0089] In an embodiment of the present application, after the execution of the drive instruction is completed, the motor will only rely on inertia to operate, and the position encoder will continue to generate position information when passing each position. At this time, the duration of each position information can be monitored, and the valid position information can be filtered and fed back according to the preset duration conditions.
[0090] Specifically, after the execution of the driving instructions in the aforementioned steps is completed, the motor can still continue to operate by relying on inertia, thereby driving the position encoder to operate.
[0091] Furthermore, when the motor is running by inertia, the position encoder's slice will continue to read the position information of the corresponding area when passing through the area of the code disc.
[0092] Furthermore, for each piece of location information read, valid location information, that is, a valid value, can be screened out by monitoring the duration of existence of the location information.
[0093] Specifically, it takes a certain amount of time for the position encoder to pass through each position area of the code disk, and the length of time consumed varies depending on the size of the position area. Therefore, the duration of each position information read out is also different.
[0094] Based on this, a second duration can be set in advance, and the duration of the location information can be compared with the second duration. When the duration of the location information exceeds the second duration, that is, is greater than the second duration, the location information is judged as a valid value.
[0095] Further, when the duration of the location information does not exceed the second duration, that is, is less than or equal to the second duration, the location information is determined to be an invalid value.
[0096] Furthermore, based on the above determination, if the position information currently read by the position encoder is determined to be a valid value, the current position information can be directly fed back.
[0097] Furthermore, if the position currently read by the position encoder is determined to be an invalid value, the previous valid position information may be fed back.
[0098] Based on this, the location information that does not conform to the second duration can be filtered out to obtain all valid values.
[0099] It can be seen that when the motor only relies on inertia to operate, for each position information read, it is necessary to determine whether it is valid position information, so as to exclude invalid position information. Based on this, the feedback position information can be made valid values.
[0100] Among them, in the process of judging whether it is effective, the designed second time length can exclude the location information with too short a retention time, thereby screening out the location information with a retention time of a continuous time length, so that extremely short time jumps can be excluded from the feedback location information.
[0101] In another specific embodiment of the present application, Figure 3 As shown, based on the judgment of the aforementioned step S304, no system failure occurs during the execution of the drive instruction. When the motor drive instruction is executed, the motor will operate by its own inertia. During this process, based on each position information read, step S305 is executed to determine whether the duration of the position information reaches 40ms.
[0102] Specifically, the second duration can be set in advance, wherein the second duration can be set based on statistics on the duration of jumps caused by non-fault factors. That is to say, the second duration is used to exclude excessively short duration of location information that may be caused by short jumps. Therefore, a suitable duration is selected from 10ms to 100ms and set as the second duration.
[0103] In this specific example, it can be set to 40ms. For a more sophisticated motor system, it can also be set to 60ms, 70ms, or 80ms, etc.
[0104] Furthermore, taking 40 ms as an example, for each position information read, it is determined whether its duration is greater than 40 ms.
[0105] Further, based on the judgment in step S305, when the judgment result is yes, it is considered that the current position information is a valid value, and step S306 can be executed to feed back the current position information to feed back the current valid value.
[0106] Furthermore, when the judgment result is no, the current position information is considered to be an invalid value, and step S307 can be executed to feed back the previous valid position information to feed back the previous valid value.
[0107] Based on this, all valid values can be screened out and fed back.
[0108] It can be seen that when the drive command ends and the motor of the transfer case runs by inertia, the position information with a duration less than or equal to 40 ms can be excluded from the effective value through the designed second time length of 40 ms, and only the position information with a duration greater than 40 ms can be fed back.
[0109] Step S203, when the motor stops running, determine whether the position information when stopped is consistent with the preset target position, in response to the position information being inconsistent with the target position, determine whether a preset error condition is met, and in response to the error condition being met, determine that the system failure occurs.
[0110] In an embodiment of the present application, based on the feedback of the aforementioned steps, when the motor stops running, it is possible to determine whether to report a system fault by judging whether the effective value of the current feedback is consistent with the target position and by using preset error reporting conditions.
[0111] Specifically, when the position encoder stops rotating along with the motor, the position information corresponding to the position encoder at the time of stop can be determined.
[0112] Furthermore, through the judgment in the above steps, the last valid position information can be determined for comparison with the target position.
[0113] Specifically, through the judgment of the above steps, it is determined whether the position information when stopping is a valid value. When the position information when stopping is a valid value, the current corresponding position information is used for comparison; when the position information when stopping is an invalid value, the previous valid position information is used for comparison.
[0114] Further, based on the comparison result, when the last valid position information is consistent with the target position, the position where the motor stops is considered to be the target position. For the transfer case, it can be considered that the transfer case has completed the switching of the four-wheel drive system.
[0115] Furthermore, when the last valid position information is inconsistent with the target position, a preset error reporting condition can be used to determine whether a system failure occurs.
[0116] Specifically, when the last valid position information is inconsistent with the target position, the drive instruction can be executed again to drive the motor to rotate, so as to try to correct the position information of the position encoder to be consistent with the target position.
[0117] Furthermore, when the driving instruction is executed again, the aforementioned steps will be executed again, that is, it is continuously determined whether a jump occurs, the duration of the jump, the duration of the position information, and whether a system failure occurs.
[0118] In this embodiment, the error reporting condition can be constructed by presetting a limit on the number of corrections, and before each correction is performed, it is checked whether the error reporting condition has been met.
[0119] Specifically, when the number limit is not exceeded, it is considered that the error condition has not been met, and the running instruction can be driven again to make corrections.
[0120] Furthermore, when the number limit has been reached, it is considered that even if the number of corrections implemented is sufficient, it is still difficult to correct the position information to be consistent with the target position. Therefore, it can be considered that the error reporting condition has been met, a system failure is determined, and an error is reported.
[0121] It can be seen that when the motor stops running, by using the last valid position information, it is possible to determine whether the motor stays in the correct target position, and when the motor does not stay in the correct target position, the position of the motor can be corrected by running the drive command again, and the number of corrections can be limited by the designed error conditions to avoid the situation where the motor cannot be corrected to the correct target position after multiple corrections in the event of a system failure; and, when the failure of the motor to stay in the correct target position is caused by other non-system failure factors, in this case a limited number of corrections can often be used to make the motor stay in the correct target position, and a certain amount of fault tolerance can be given to this situation by limiting the number of corrections.
[0122] In another specific embodiment of the present application, Figure 3 As shown, based on the feedback of the aforementioned step S307 or S306, the fed-back position information can be used to execute step S308 to determine whether it is consistent with the target position.
[0123] Specifically, based on the target position 1100, 4DW LOW determined by the driving instruction in the above steps, it is determined whether the last valid position information currently fed back is consistent with the target position 1100, 4DW LOW.
[0124] Further, based on the judgment of step S308, when the judgment result is yes, it can be considered that the motor and the position encoder are both rotated to the target position, the transfer case completes the switching of the four-wheel drive system, and step S309 is executed to confirm that the switching is completed.
[0125] Furthermore, when the judgment result of step S308 is no, it is considered that the motor and the position encoder have not rotated to the target position, and it is determined whether to report an error based on the constructed error conditions, that is, step S310 is executed to determine whether the correction has reached 3 times.
[0126] Specifically, a limit on the number of times the position information is corrected may be preset, for example, set to 3 times.
[0127] Furthermore, when the judgment result of step S308 is no, it is determined how many times the driving code has been restarted and the position information has been corrected. If three corrections have been made, it is considered that the number of corrections is sufficient, and step S311 can be executed to determine a system failure.
[0128] Furthermore, if the number of corrections is less than 3 times, the process returns to step S301 to restart the driving code to drive the position encoder to rotate so as to adjust the position information when stopped.
[0129] It can be seen that when the motor stops, when the motor does not stay at the correct target position: 1100, 4DW LOW, the position of the motor can be corrected to 1100, 4DW LOW by running the drive command again. Through the designed three correction opportunities, the situation where the motor cannot be corrected to 1100, 4DW LOW after three corrections is determined to be a failure of the four-wheel drive system, and the situation that can be corrected within 3 times is excluded from the failure.
[0130] Step S204: In response to the occurrence of the system fault, after the motor is powered on again, determining whether the system fault is eliminated.
[0131] In an embodiment of the present application, based on the judgment of the system fault in the aforementioned steps, when it is determined that a system fault occurs, the system loading the motor can be powered off as a whole, and then powered on again as a whole, to re-judge whether the system fault in the aforementioned steps has been eliminated and whether the system has returned to normal.
[0132] Specifically, when the overall system is determined to have a fault, the user can power off the overall system and then power it back on. After powering on again, the user can determine whether the system fault has been eliminated by detecting whether the current position information corresponding to the position encoder is correct.
[0133] When detecting whether the position information currently corresponding to the position encoder is correct, it is firstly determined whether the position information belongs to one of the multiple position information identified in the encoder disk. If not, it is considered that the position information corresponding to the current stop state is wrong.
[0134] Further, if yes, then you can continue to detect whether the location information is consistent with the target location.
[0135] Furthermore, if they are consistent, it is considered that the position information is correct and the fault is eliminated. If they are inconsistent, it is considered that the system still has a fault.
[0136] It can be seen that when a system failure is determined, the entire system can be powered off and then recharged before the location information is tested again, thereby giving non-system failures one more chance to be eliminated.
[0137] In another specific embodiment of the present application, Figure 3 As shown, based on the above-mentioned step S311, it is determined that the four-wheel drive system has a fault. The driver of the vehicle can power off the entire vehicle and then power on the entire vehicle again to power off the entire four-wheel drive system including the transfer case motor and the position encoder, and then power on the entire system again.
[0138] Furthermore, after the vehicle is powered on, step S312 may be executed to determine whether the position information is correct.
[0139] Specifically, based on the last valid location information fed back in step S306 or step S307, it is determined whether the valid location information is correct.
[0140] Specifically, first determine whether the location information belongs to Figure 4 If it does not belong to one of the multiple positions shown in , it is determined that the position information is wrong, that is, the judgment result of step S312 is no, and it is considered that the fault of the four-wheel drive system still exists, and the process can return to step S311 to determine the system fault.
[0141] Further, if it is, continue to determine whether the position information is consistent with the target position: 4WD LOW; when the two are consistent, it is determined that the position information is correct, that is, the judgment result of step S312 is yes, and it is considered that the fault of the four-wheel drive system has been eliminated, and step S313 can be executed to determine that the fault has been eliminated.
[0142] Further, when the two are inconsistent, the position information is determined to be wrong, that is, the judgment result of step S312 is no, and it is considered that the fault of the four-wheel drive system still exists, and the process can return to step S311 to determine the system fault.
[0143] It can be seen that the position encoder monitoring method of the embodiment of the present application divides the working state of the motor into driven by drive instructions, driven only by inertia, and stopped running based on drive instructions and operating conditions, and comprehensively considers the jump conditions under different operating conditions to make a judgment on system faults; when the motor relies on drive instructions to operate, by comparing the duration of the jump and the first duration, the jump caused by non-system faults can be excluded. When it relies on inertia to operate, based on the designed duration conditions, the jump with too short a duration, that is, the invalid value, can be excluded. When the motor stops, the designed error conditions can be used to correct the problem of the motor's stop position error caused by non-system faults. Based on this, the accuracy of system fault judgment can be effectively improved.
[0144] It should be noted that the method of the embodiment of the present application can be performed by a single device, such as a computer or server. The method of this embodiment can also be applied to a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only perform one or more steps in the method of the embodiment of the present application, and the multiple devices will interact with each other to complete the described method.
[0145] It should be noted that the above describes some embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the above embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0146] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, an embodiment of the present application further provides a position encoder monitoring device.
[0147] refer to Figure 5 , the position encoder monitoring device comprises: a first operating state monitoring module 501, a second operating state monitoring module 502, a stop state monitoring module 503 and a restart module 504;
[0148] The first operation state monitoring module 501 is configured to, when a preset drive instruction is executed and the motor operates according to the drive instruction, determine whether a jump occurs in the position encoder of the motor, and in response to the jump, determine whether the duration of the jump exceeds a preset first duration, and in response to the duration exceeding the first duration, determine that a system failure occurs;
[0149] The second operation state monitoring module 502 is configured to, when the driving instruction ends, the motor operates by inertia, so that the position encoder feeds back position information that meets a preset time condition;
[0150] The stop state monitoring module 503 is configured to, when the motor stops running, determine whether the position information when the motor stops running is consistent with a preset target position, and in response to the position information being inconsistent with the target position, determine whether a preset error reporting condition is satisfied, and in response to the error reporting condition being satisfied, determine that the system failure occurs;
[0151] The restart module 504 is configured to, in response to the occurrence of the system fault, determine whether the system fault is eliminated after the motor is powered on again.
[0152] As an optional embodiment, the first operation status monitoring module 501 is specifically configured as follows:
[0153] After determining whether the duration of the jump exceeds a preset first duration, in response to the duration being less than or equal to the first duration, it is determined that the system failure has not occurred.
[0154] As an optional embodiment, the second operation status monitoring module 502 is specifically configured as follows:
[0155] Monitoring the duration of the current position information of the position encoder;
[0156] In response to the duration of the current position information exceeding a preset second duration, determining the current position information as a valid value and feeding back the valid value;
[0157] In response to the duration of the current location information not exceeding the second duration, the previous location information of the current location information is determined as a valid value.
[0158] As an optional embodiment, the stop state monitoring module 503 is specifically configured as follows:
[0159] Determine the number of times the position information is trimmed using the motor drive instruction;
[0160] In response to the number exceeding a preset number limit, determining that the error reporting condition is satisfied;
[0161] In response to the number not exceeding a preset number limit, it is determined that the error reporting condition is not satisfied.
[0162] Furthermore, after determining whether the preset error reporting condition is met, it also includes:
[0163] In response to not satisfying the error condition, executing the driving instruction to correct the position information;
[0164] And determine again whether a system failure has occurred.
[0165] As an optional embodiment, the restart module 504 is specifically configured to:
[0166] In response to the system being powered on again, detecting whether the position information currently fed back by the position encoder is consistent with the target position;
[0167] In response to the current feedback position information being consistent with the target position, determining that the system fault is recovered;
[0168] In response to the current fed-back position information being inconsistent with the target position, it is determined that the system fault has not been recovered.
[0169] For the convenience of description, the above devices are described in terms of functions and are divided into various modules. Of course, when implementing the embodiments of the present application, the functions of each module can be implemented in the same or multiple software and / or hardware.
[0170] The device of the above embodiment is used to implement the corresponding position encoder monitoring method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.
[0171] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, an embodiment of the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the position encoder monitoring method as described in any of the above embodiments is implemented.
[0172] Figure 6 A more specific schematic diagram of the hardware structure of an electronic device provided in this embodiment is shown, and the device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are connected to each other through the bus 1050 in the device.
[0173] The processor 1010 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application.
[0174] The memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 may store an operating system and other application programs. When the technical solution provided in the embodiment of the present application is implemented by software or firmware, the relevant program code is stored in the memory 1020 and is called and executed by the processor 1010.
[0175] The input / output interface 1030 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.
[0176] The communication interface 1040 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).
[0177] The bus 1050 includes a path that transmits information between the various components of the device (eg, the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040).
[0178] It should be noted that, although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040 and the bus 1050, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiment of the present application, and does not necessarily include all the components shown in the figure.
[0179] The device of the above embodiment is used to implement the corresponding position encoder monitoring method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.
[0180] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a vehicle, the vehicle comprising a position encoder monitoring device and an electronic device, the electronic device executing the position encoder monitoring method as described in any one of the above items.
[0181] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the position encoder monitoring method described in any of the above embodiments.
[0182] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, 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, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, 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.
[0183] The computer instructions stored in the storage medium of the above embodiments are used to enable the computer to execute the position encoder monitoring method described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0184] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present application (including the claims) is limited to these examples. In line with the concept of the present application, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of different aspects of the embodiments of the present application as described above, which are not provided in detail for the sake of simplicity.
[0185] In addition, to simplify the description and discussion, and in order not to make the embodiments of the present application difficult to understand, the known power supply / ground connection with the integrated circuit (IC) chip and other components may or may not be shown in the provided drawings. In addition, the device can be shown in the form of a block diagram to avoid making the embodiments of the present application difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform on which the embodiments of the present application will be implemented (that is, these details should be fully within the scope of understanding of those skilled in the art). In the case of elaborating specific details (e.g., circuits) to describe exemplary embodiments of the present application, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details or when these specific details are changed. Therefore, these descriptions should be considered illustrative rather than restrictive.
[0186] Although the present application has been described in conjunction with specific embodiments of the present application, many replacements, modifications and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.
[0187] The embodiments of the present application are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included in the protection scope of the present application.
Claims
1. A position encoder monitoring method, characterized in that: include: When a preset driving instruction is executed, the motor operates according to the driving instruction, determining whether a jump occurs in the position encoder of the motor, and in response to the jump occurring, determining whether a duration of the jump exceeds a preset first duration, and determining that a system failure occurs in response to the duration exceeding the first duration; When the driving instruction ends, the motor runs by inertia, so that the position encoder feeds back position information that meets the preset time condition; When the motor stops running, determining whether the position information when the motor stops is consistent with a preset target position, and in response to the position information being inconsistent with the target position, determining whether a preset error condition is satisfied, and in response to the error condition being satisfied, determining that the system fault occurs; In response to the occurrence of the system fault, after the motor is powered on again, determining whether the system fault is eliminated; The judgment whether the preset error reporting condition is met, include, Determine the number of times the motor uses the driving instruction to modify the position information; In response to the number exceeding a preset number limit, determining that the error reporting condition is satisfied; In response to the number not exceeding a preset number limit, it is determined that the error reporting condition is not satisfied.
2. The method according to claim 1, characterized in that: After determining whether the duration of the jump exceeds a preset first duration, the method further includes: In response to the duration being less than or equal to the first time period, it is determined that the system failure has not occurred.
3. The method according to claim 1, characterized in that The step of causing the position encoder to feedback position information that satisfies a preset time condition includes: Monitoring the duration of the current position information of the position encoder; In response to the duration of the current position information exceeding a preset second duration, determining the current position information as a valid value and feeding back the valid value; In response to the duration of the current location information not exceeding the second duration, the previous location information of the current location information is determined as a valid value.
4. The method according to claim 1, characterized in that: After determining whether the preset error reporting condition is met, the method further includes: In response to not satisfying the error condition, executing the driving instruction to correct the position information; And determine again whether a system failure has occurred.
5. The method according to claim 1, characterized in that After the motor is powered on again, determining whether the system fault is eliminated includes: In response to the system being powered on again, detecting whether the position information currently fed back by the position encoder is consistent with the target position; In response to the current feedback position information being consistent with the target position, determining that the system fault is recovered; In response to the current fed-back position information being inconsistent with the target position, it is determined that the system fault has not been recovered.
6. A position encoder monitoring device, characterized in that: include: A first operation state monitoring module, a second operation state monitoring module, a stop state monitoring module and a restart module; Wherein, the first operation state monitoring module is configured to, when a preset drive instruction is executed, the motor operates according to the drive instruction, determine whether a jump occurs in the position encoder of the motor, and in response to the jump, determine whether the duration of the jump exceeds a preset first duration, and in response to the duration exceeding the first duration, determine that a system failure occurs; The second operation state monitoring module is configured to, when the driving instruction ends, allow the motor to operate by inertia, so that the position encoder can feedback position information that meets a preset time condition; The stop state monitoring module is configured to, when the motor stops running, determine whether the position information when the motor stops is consistent with a preset target position, and in response to the position information being inconsistent with the target position, determine whether a preset error reporting condition is met, and in response to the error reporting condition being met, determine that the system failure occurs; The restart module is configured to, in response to the occurrence of the system fault, determine whether the system fault is eliminated after the motor is powered on again; The second operating status monitoring module is also configured to determine the number of times the motor uses the drive instruction to trim the position information; in response to the number exceeding the preset number limit, determine that the error condition is met; in response to the number not exceeding the preset number limit, determine that the error condition is not met.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable by the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 5 is implemented.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to make a computer execute the method according to any one of claims 1 to 5.
9. A vehicle, characterized in that: Comprising the position encoder monitoring device as described in claim 6 or the electronic device as described in claim 7.
