Disclosure of Invention
The embodiment of the application provides a fault processing method and system for a brake switch and a computer storage medium, and aims to solve the problem that in the related technology, the state of the brake switch cannot be identified due to Bus Off fault of a chassis CAN or full or partial loss of ESC node communication.
In a first aspect, a method for handling a fault of a brake switch is provided, which is applied to a vehicle control unit VCU on a motor vehicle, where the vehicle control unit VCU is connected to both a normally open circuit and a normally closed circuit of the brake switch, and the method includes the following steps:
detecting switch signals of a normally open circuit and a normally closed circuit of the brake switch, and determining whether the brake switch is abnormal or not;
if the brake switch is abnormal, when the effective flag bit of the pressure of the brake master cylinder acquired by the ESC of the electronic stability control system is detected to be true, determining whether to prohibit the torque output of the motor or control the limping of the vehicle according to the pressure of the brake master cylinder acquired by the ESC, otherwise,
stopping power output according to the detected effective zone bit of the vehicle speed collected by the ESC, or
And when determining that the road gradient is obtained according to the acceleration collected by the acceleration sensor and the opening degree of the accelerator pedal collected by the accelerator pedal sensor meets the set limiting condition, determining whether to prohibit the torque output of the motor or control the limp of the vehicle according to the detected deceleration obtained according to the vehicle speed collected by the ESC.
In some embodiments, the specific step of determining whether to inhibit the motor torque output or control vehicle limp home based on the brake master cylinder pressure obtained by the ESC comprises:
determining the pressure of a brake master cylinder acquired by the ESC;
and judging whether the detected pressure of the brake master cylinder is greater than a set first threshold value, if so, prohibiting the torque output of the motor and giving a first alarm, otherwise, controlling the vehicle to limp and giving a second alarm.
In some embodiments, the specific steps of determining that the road gradient is obtained according to the acceleration collected by the acceleration sensor and the accelerator opening meets the set limit condition according to the acceleration collected by the accelerator sensor include:
acquiring acceleration acquired by an acceleration sensor to obtain a road gradient;
acquiring the opening degree of an accelerator pedal acquired by an accelerator pedal sensor;
when the road gradient is in a set gradient section and the accelerator opening is smaller than a set opening threshold value, the road gradient and the accelerator opening meet set limiting conditions.
In some embodiments, the specific step of determining whether to inhibit motor torque output or control vehicle limp home based on the detected deceleration from ESC collected vehicle speed comprises:
acquiring the speed of the ESC;
obtaining a detection deceleration within a detection duration according to the obtained vehicle speed;
and judging whether the obtained detected deceleration is larger than a set second threshold value, if so, prohibiting the torque output of the motor and giving a first alarm, and otherwise, controlling the vehicle to limp and giving a second alarm.
In some embodiments, the step of determining whether the brake switch is abnormal or not includes:
if the switch signal output by the normally open circuit is different from that output by the normally closed circuit, the brake switch is judged to be normal;
and if the switch signal output by the normally open circuit is the same as that output by the normally closed circuit, judging that the brake switch is abnormal.
In some embodiments, the switching signal includes a high level and a low level.
In some embodiments, after said determining whether to inhibit motor torque output or control vehicle limp home, further comprising the steps of:
and judging whether the normally closed circuit or the normally open circuit of the brake switch is short-circuited or open-circuited according to the switching signal.
In some embodiments, the specific step of determining whether the normally closed circuit or the normally open circuit of the brake switch is short-circuited or open-circuited according to the switch signal includes:
if the torque output of the motor is determined to be forbidden, when the output switching signal is in a high level, the normally closed circuit is in a short circuit with the power supply, and when the output switching signal is in a low level, the normally open circuit is in a ground connection or an open circuit;
if the limp home control is determined, when the output switching signal is at a high level, the normally open circuit is short-circuited to the power supply, and when the output switching signal is at a low level, the normally closed circuit is grounded or disconnected.
In a second aspect, a fault handling system for a brake switch is provided, including:
the brake switch comprises a normally open circuit and a normally closed circuit which are respectively used for outputting a switch signal;
the electronic stability control system ESC is used for acquiring a brake master cylinder pressure effective mark position, brake master cylinder pressure and vehicle speed;
a motor controller MCU for outputting a torque of the motor;
an acceleration sensor for acquiring acceleration;
an accelerator pedal sensor for acquiring an accelerator pedal opening degree;
VCU of vehicle control unit for
Detecting switch signals of a normally open circuit and a normally closed circuit of the brake switch, and determining whether the brake switch is abnormal or not;
if the brake switch is abnormal, when the effective flag bit of the pressure of the brake master cylinder acquired by the ESC of the electronic stability control system is detected to be true, determining whether to prohibit the torque output of the motor or control the limping of the vehicle according to the pressure of the brake master cylinder acquired by the ESC, otherwise,
stopping power output according to the detected effective zone bit of the vehicle speed collected by the ESC, or
And when determining that the road gradient is obtained according to the acceleration collected by the acceleration sensor and the opening degree of the accelerator pedal collected by the accelerator pedal sensor meets the set limiting condition, determining whether to prohibit the torque output of the motor or control the limp of the vehicle according to the detected deceleration obtained according to the vehicle speed collected by the ESC.
In a third aspect, a computer storage medium is provided, and a readable fault processing program of a brake switch is stored on the computer storage medium, wherein when the fault processing program of the brake switch is executed by a processor, the steps of the fault processing method of the brake switch are implemented.
The beneficial effect that technical scheme that this application provided brought includes: the comprehensive diagnosis of the brake switch fault is ensured, and the running safety of the motor vehicle is ensured when the brake switch is abnormal.
The embodiment of the application provides a fault processing method and system of a brake switch and a computer storage medium, when a VCU of a vehicle control unit determines that the brake switch is abnormal, whether a brake master cylinder pressure effective zone bit and a brake master cylinder pressure acquired by an ESC (electronic stability control) system can be detected or not is judged, and if yes, whether motor torque output is forbidden or vehicle limping is controlled is determined according to the brake master cylinder pressure acquired by the ESC; if not, stopping power output according to the detectable ESC collected speed, or determining to prohibit motor torque output or control vehicle limp-home according to the detected deceleration obtained by the ESC collected speed when the road gradient and the accelerator pedal opening meet the set limit conditions. Therefore, when Bus Off fault occurs in the chassis CAN or ESC node communication is completely or partially lost to cause that the state of the brake switch CAN not be identified, the embodiment of the application CAN still comprehensively diagnose the fault of the brake switch, and the driving safety of the motor vehicle is ensured.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The embodiment of the application provides a method for processing speed faults of an electric automobile, which ensures the comprehensiveness of fault diagnosis of a brake switch and ensures the driving safety of a motor vehicle when the brake switch is abnormal.
The embodiment of the application provides a fault processing method of a brake switch, which is applied to a vehicle control unit VCU on a motor vehicle, wherein the vehicle control unit VCU is connected with a normally open circuit and a normally closed circuit of the brake switch, and the fault processing method is characterized by comprising the following steps of:
detecting switch signals of a normally open circuit and a normally closed circuit of the brake switch, and determining whether the brake switch is abnormal or not;
if the brake switch is abnormal, when the effective flag bit of the pressure of the brake master cylinder acquired by the ESC of the electronic stability control system is detected to be true, determining whether to prohibit the torque output of the motor or control the limping of the vehicle according to the pressure of the brake master cylinder acquired by the ESC, otherwise,
stopping power output according to the detected effective zone bit of the vehicle speed collected by the ESC, or
And when determining that the road gradient is obtained according to the acceleration collected by the acceleration sensor and the opening degree of the accelerator pedal collected by the accelerator pedal sensor meets the set limiting condition, determining whether to prohibit the torque output of the motor or control the limp of the vehicle according to the detected deceleration obtained according to the vehicle speed collected by the ESC.
In the above fault handling method, as shown in fig. 2, the brake switch is connected to the vehicle control unit VCU through a normally open circuit and a normally closed circuit, the normally open circuit and the normally closed circuit output a switch signal to the vehicle control unit, the vehicle control unit determines whether the brake switch is abnormal according to the received two switch signals, if the brake switch is normal, the process is finished, if the brake switch is abnormal, when the detected effective flag bit of the pressure of the brake master cylinder obtained by the ESC is true, the motor torque output is prohibited or the vehicle limping is controlled according to the pressure of the brake master cylinder obtained by the ESC, when the detected effective flag bit of the pressure of the brake master cylinder obtained by the ESC is false, the effective flag bit of the vehicle speed collected by the ESC is determined to be true, if the valid flag bit is false, namely, the chassis CAN communication has a fault or the ESC node is lost, the power output is stopped, if the valid flag bit is true, the vehicle speed is detected by the vehicle control unit VCU, and if the pressure signal of the brake master cylinder is invalid, determining whether to prohibit the torque output of the motor or control the limp of the vehicle according to the detected deceleration obtained by the vehicle speed acquired by the ESC when determining that the road gradient obtained according to the acceleration acquired by the acceleration sensor and the opening degree of the accelerator acquired by the accelerator sensor meet the set limiting conditions.
Therefore, when Bus Off fault occurs in the chassis CAN or ESC node communication is completely or partially lost to cause that the state of the brake switch CAN not be identified, the embodiment of the application CAN still comprehensively diagnose the fault of the brake switch, and the driving safety of the motor vehicle is ensured.
Preferably, the specific step of determining whether to prohibit the motor torque output or control the vehicle limp home according to the brake master cylinder pressure acquired by the ESC comprises:
determining the pressure of a brake master cylinder acquired by the ESC;
and judging whether the detected pressure of the brake master cylinder is greater than a set first threshold value, if so, prohibiting the torque output of the motor and giving a first alarm, otherwise, controlling the vehicle to limp and giving a second alarm.
In the embodiment of the application, a vehicle control unit VCU communicates with an ESC node on a chassis CAN, when the effective flag bit of the pressure of a brake master cylinder acquired by ESC is detected to be 1, master cylinder pressure auxiliary diagnosis is carried out, namely whether the detected pressure of the brake master cylinder is greater than a set first threshold value K1 is judged, if yes, a signal of a brake switch is broadcasted to fail to be trusted, a fault code is recorded, motor torque output is forbidden, if not, a signal of the brake switch is broadcasted to have a circuit fault, the fault code is recorded, and vehicle limping is controlled. The first threshold value K1 is determined empirically or calibrated according to the corresponding relationship between the master cylinder pressure and the brake pedal by considering the hysteresis characteristic of the brake pedal.
Preferably, the concrete steps of determining that the road gradient is obtained according to the acceleration collected by the acceleration sensor and the accelerator opening meets the set limit condition according to the acceleration collected by the accelerator sensor include:
acquiring acceleration acquired by an acceleration sensor to obtain a road gradient;
acquiring the opening degree of an accelerator pedal acquired by an accelerator pedal sensor;
when the road gradient is in a set gradient section and the accelerator opening is smaller than a set opening threshold value, the road gradient and the accelerator opening meet set limiting conditions.
In the embodiment of the application, the precondition for determining whether the road gradient and the accelerator pedal opening meet the set limiting conditions is that an effective flag bit of the vehicle speed collected by the ESC detected by the vehicle control VCU is true. The road gradient is calculated according to the collected acceleration and the longitudinal dynamics principle, and the opening threshold is 3% in the embodiment.
Further, the specific step of determining whether to inhibit the motor torque output or control vehicle limp home from the detected deceleration based on the ESC collected vehicle speed comprises:
acquiring the speed of the ESC;
obtaining a detection deceleration within a detection duration according to the obtained vehicle speed;
and judging whether the obtained detected deceleration is larger than a set second threshold value, if so, prohibiting the torque output of the motor and giving a first alarm, and otherwise, controlling the vehicle to limp and giving a second alarm.
In the embodiment of the application, when the vehicle speed acquired by the ESC is detected by the VCU of the vehicle controller, the vehicle speed auxiliary diagnosis is carried out, that is, whether the detected deceleration detected by the ESC is greater than a set second threshold value K2 is judged, if yes, a signal of the brake switch is reported, a fault code is recorded, the torque output of the motor is forbidden, and if not, a signal of the brake switch is reported, a circuit fault occurs, the fault code is recorded, and the limping of the vehicle is controlled. The second threshold K2 is determined empirically or determined through dynamic simulation, a certain margin is required, and the second threshold K2 is verified through a real vehicle test.
When the driver releases the accelerator pedal, the vehicle control unit VCU performs auxiliary diagnosis on the vehicle speed variation per unit time (also referred to as the detection duration), that is, determines whether the detected deceleration detected by the ESC is greater than the set second threshold K2.
Further, the specific step of determining whether the brake switch is abnormal or not includes:
if the switch signal output by the normally open circuit is different from that output by the normally closed circuit, the brake switch is judged to be normal;
and if the switch signal output by the normally open circuit is the same as that output by the normally closed circuit, judging that the brake switch is abnormal.
Further, the switching signal includes a high level and a low level.
In this application embodiment, when the level signal of normally open circuit with normally closed circuit output is high level signal or is low level signal simultaneously, judges brake switch unusual, when the level signal of normally open circuit with normally closed circuit output is a high level signal low level signal, brake switch is normal.
Preferably, after the determination of whether to prohibit the motor torque output or control the vehicle limp home, further comprising the steps of:
and judging whether the normally closed circuit or the normally open circuit of the brake switch is short-circuited or open-circuited according to the switching signal.
Furthermore, the specific step of determining whether the normally closed circuit or the normally open circuit of the brake switch is short-circuited or open-circuited according to the switch signal includes:
if the torque output of the motor is determined to be forbidden, when the output switching signal is in a high level, the normally closed circuit is in a short circuit with the power supply, and when the output switching signal is in a low level, the normally open circuit is in a ground connection or an open circuit;
if the limp home control is determined, when the output switching signal is at a high level, the normally open circuit is short-circuited to the power supply, and when the output switching signal is at a low level, the normally closed circuit is grounded or disconnected.
In the embodiment of the application, the motor torque output is forbidden to correspond to the signal unreliable fault broadcasting the brake switch, the vehicle limping is controlled to correspond to the circuit fault broadcasting the signal of the brake switch, and then when the signal unreliable fault or the circuit fault occurs, which circuit of the brake switch has the fault and what fault can be determined according to the output high and low levels.
Meanwhile, if the effective zone bit of the vehicle speed detected by the VCU of the vehicle controller is false, stopping power output and giving an alarm, reporting that the vehicle speed cannot acquire a serious fault, and when the effective zone bit of the vehicle speed detected is false, namely the vehicle speed cannot be detected, judging the abnormal condition of a brake switch, so that the circuit fault condition under the condition of stopping power output is not discussed.
As shown in fig. 1, assuming that the communication between the VCU and the ESC is normal, the VCU can receive a brake master cylinder signal and a vehicle speed signal output by the ESC, and the method for processing the fault of the brake switch includes the following steps:
s1: determining whether the brake switch is abnormal according to the detected switch signals of the normally open circuit and the normally closed circuit of the brake switch, if so, turning to S3, and if not, turning to S2;
s2: the brake switch is normal;
s3: judging whether a brake master cylinder signal acquired by an electronic stability control system ESC is effective or not, if so, turning to S4, and if not, turning to S5 when a road gradient is obtained according to acceleration acquired by an acceleration sensor and an accelerator pedal opening degree acquired by an accelerator pedal sensor meets set limiting conditions;
s4: according to whether the pressure of the brake master cylinder acquired by the ESC is larger than a set first threshold value or not, inhibiting the torque output of the motor or controlling the limping of the vehicle
S5: and according to whether the detected deceleration obtained by the ESC-collected vehicle speed is larger than a set second threshold value, prohibiting the torque output of the motor or controlling the vehicle to limp.
In general, the embodiment of the application CAN be applied to various situations that normal communication cannot be carried out on the CAN bus, but part of nodes of the ESC are lost or master cylinder pressure signals are invalid, CAN comprehensively process abnormal situations of the brake switch, and improves the driving safety of motor vehicles.
As shown in fig. 2, an embodiment of the present application further provides a fault handling system for a brake switch, including:
the brake switch comprises a normally open circuit and a normally closed circuit which are respectively used for outputting a switch signal;
the electronic stability control system ESC is used for acquiring a brake master cylinder pressure effective mark position, brake master cylinder pressure and vehicle speed;
a motor controller MCU for outputting a torque of the motor;
an acceleration sensor for acquiring acceleration;
an accelerator pedal sensor for acquiring an accelerator pedal opening degree;
VCU of vehicle control unit for
Detecting switch signals of a normally open circuit and a normally closed circuit of the brake switch, and determining whether the brake switch is abnormal or not;
if the brake switch is abnormal, when the effective flag bit of the pressure of the brake master cylinder acquired by the ESC of the electronic stability control system is detected to be true, determining whether to prohibit the torque output of the motor or control the limping of the vehicle according to the pressure of the brake master cylinder acquired by the ESC, otherwise,
and when determining that the road gradient is obtained according to the acceleration collected by the acceleration sensor and the opening degree of the accelerator pedal collected by the accelerator pedal sensor meets the set limiting condition, determining whether to prohibit the torque output of the motor or control the limp of the vehicle according to the detected deceleration obtained according to the vehicle speed collected by the ESC.
As shown in fig. 2, the brake switch is connected with the vehicle control unit VCU through a normally open circuit and a normally closed circuit, the normally open circuit and the normally closed circuit output a switching signal to the vehicle control unit, the vehicle control unit determines whether the brake switch is abnormal according to the received two switching signals, if the brake switch is normal, the operation is finished, if the brake switch is abnormal, when the detected effective zone bit of the pressure of the brake master cylinder obtained by the ESC is true, the torque output of the motor is prohibited or the vehicle limp is controlled according to the pressure of the brake master cylinder obtained by the ESC, when the detected effective zone bit of the pressure of the brake master cylinder obtained by the ESC is false or the detected effective zone bit of the pressure of the brake master cylinder obtained by the ESC is not detected, whether the vehicle speed collected by the detected ESC is zero is judged, if the detected vehicle speed is zero, the vehicle is stationary or the vehicle control unit VCU does not detect the vehicle speed, that is a chassis CAN communication has a fault or an ESC node is lost, and stopping power output, if the power output is not zero, the VCU of the vehicle controller detects the vehicle speed, the pressure signal of the brake master cylinder is effective, and when determining that the road gradient is obtained according to the acceleration acquired by the acceleration sensor and the opening degree of the accelerator pedal acquired by the accelerator pedal sensor meets the set limiting condition, determining whether to prohibit motor torque output or control vehicle limping according to the detected deceleration obtained according to the vehicle speed acquired by the ESC.
Therefore, when Bus Off fault occurs in the chassis CAN or ESC node communication is completely or partially lost to cause that the state of the brake switch CAN not be identified, the embodiment of the application CAN still comprehensively diagnose the fault of the brake switch, and the driving safety of the motor vehicle is ensured.
The system embodiments provided in the embodiments of the present application have been explained in detail in the above method embodiments, and are not repeated herein.
The embodiment of the present application further provides a computer storage medium, which can be read by the computer storage medium, and the fault processing program of the brake switch is stored on the computer storage medium, wherein when the fault processing program of the brake switch is executed by a processor, the steps of the fault processing method of the brake switch are implemented as described above.
In the description of the present application, it should be noted that the terms "upper", "lower", and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, which are only for convenience in describing the present application and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed in a specific orientation, and operate, and thus, should not be construed as limiting the present application. Unless expressly stated or limited otherwise, the terms "mounted," "connected," and "connected" are intended to be inclusive and mean, for example, that they may be fixedly connected, detachably connected, or integrally connected; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meaning of the above terms in the present application can be understood by those of ordinary skill in the art as appropriate.
It is noted that, in the present application, relational terms such as "first" and "second", and the like, are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The above description is merely exemplary of the present application and is presented to enable those skilled in the art to understand and practice the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.