A fault diagnosis processing method, a micro control unit and an electric vehicle
By acquiring the motor angle value and rate of change from the angle sensor under fault conditions, and using differential and phase compensation processing to obtain the correct motor angle value, the problem of the MCU controlling the road feel simulation motor based on erroneous data is solved, and accurate steering resistance is provided under fault conditions.
Patent Information
- Application Number
- CN202410196399.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-22
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2044-02-22
AI Technical Summary
In fault conditions, the microcontroller unit (MCU) controls the road feel analog motor based on incorrect motor angle data, resulting in an inability to accurately provide steering resistance.
By acquiring the motor angle value and rate of change of the angle sensor at preset intervals, determining whether it exceeds the preset range or threshold, acquiring the excitation signal of the angle sensor, and using differential and phase compensation processing to obtain the correct motor angle value, the road feel simulates the motor output steering resistance.
In fault conditions, ensure that the microcontroller controls the road feel simulation motor based on the correct motor angle data, so that it accurately provides steering resistance.
Smart Images

Figure CN117962987B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of new energy vehicle technology, and in particular to a fault diagnosis and processing method, a microcontroller unit, and an electric vehicle. Background Technology
[0002] With the rapid development of new energy vehicles, the Steering-by-Wire (SBW) system has eliminated the mechanical connection between the steering wheel and the steering wheels, and the steering information transmission and control are achieved entirely by electrical signals. When the driver turns the steering wheel to make a steering request, the road feel simulation motor directly connected to the steering wheel will provide corresponding steering resistance according to the steering angle, simulating the road steering feeling of mechanical steering for the driver.
[0003] In existing technologies, microcontroller units (MCUs) typically use a motor angle sensor to detect the motor angle of the road feel analog motor in order to obtain the steering wheel angle, and then control the road feel analog motor to provide corresponding steering resistance. However, under fault conditions, the motor angle obtained by the MCU may be incorrect. This would cause the MCU to control the road feel analog motor based on erroneous motor angle data, resulting in an inaccurate provision of steering resistance. Summary of the Invention
[0004] This application provides a fault diagnosis and processing method, a microcontroller unit, and an electric vehicle to solve the problem in the prior art where, under fault conditions, the MCU controls the road feel simulation motor based on incorrect motor angle data, resulting in the road feel simulation motor failing to accurately provide steering resistance.
[0005] In a first aspect, this application provides a fault diagnosis and processing method, comprising: acquiring a first motor angle value from an angle sensor at preset time intervals, and determining whether the first motor angle value exceeds a preset angle range; acquiring a motor angle change rate based on the current first motor angle value and the previous first motor angle value, and determining whether the motor angle change rate is greater than or equal to a preset change rate threshold; when it is determined that the first motor angle value exceeds the preset angle range, or the motor angle change rate is greater than or equal to the preset change rate threshold, acquiring an excitation signal from the angle sensor, and acquiring a second motor angle value based on the excitation signal, so as to control a road feel simulation motor to output steering resistance corresponding to the second motor angle value.
[0006] In one specific embodiment, before obtaining the first motor angle value of the angle sensor, the method further includes: obtaining the configuration mode of the angle sensor; then, obtaining the first motor angle value of the angle sensor at preset intervals includes: obtaining the angle output value of the angle sensor at preset intervals, and performing conversion processing on the angle output value according to the configuration mode to obtain the first motor angle value of the angle sensor.
[0007] In one specific embodiment, acquiring the excitation signal from the angle sensor and acquiring the second motor angle value based on the excitation signal includes: acquiring a first cosine excitation signal and a first sine excitation signal from the angle sensor; performing differential processing on the first cosine excitation signal and the first sine excitation signal respectively to acquire a second cosine excitation signal and a second sine excitation signal respectively; performing phase compensation processing on the second cosine excitation signal and the second sine excitation signal respectively to acquire a third cosine excitation signal and a third sine excitation signal respectively; and acquiring the second motor angle value based on the third cosine excitation signal and the third sine excitation signal.
[0008] In one specific embodiment, before acquiring the first motor angle value of the angle sensor, the method further includes: determining whether the angle sensor has a hardware failure, and when it is determined that the angle sensor has a hardware failure, outputting a diagnostic result of the hardware failure of the angle sensor.
[0009] In one specific embodiment, the method further includes: when it is determined that the first motor angle value is within the preset angle range and the rate of change of the motor angle is less than the preset rate of change threshold, controlling the road feel simulation motor to output a steering resistance corresponding to the first motor angle value.
[0010] In one specific embodiment, the method further includes: when it is determined that the first motor angle value is within the preset angle range and the rate of change of the motor angle is less than the preset rate of change threshold, acquiring an excitation signal in the angle sensor; acquiring a second motor angle value based on the excitation signal, and performing verification processing on the first motor angle value based on the second motor angle value; and outputting a diagnostic result of the angle verification failure when it is determined that the verification of the first motor angle value has failed.
[0011] In one specific implementation, the step of verifying the first motor angle value based on the second motor angle value includes: obtaining the difference between the first motor angle value and the second motor angle value, and incrementing the angle verification failure count by 1 when the difference is determined to be greater than a preset difference threshold; and determining that the verification of the first motor angle value has failed when the angle verification failure count is determined to be greater than a preset count threshold.
[0012] Secondly, this application provides a microcontroller unit, comprising: an acquisition module, configured to acquire a first motor angle value from an angle sensor at preset time intervals, and determine whether the first motor angle value exceeds a preset angle range; the acquisition module is further configured to acquire a motor angle change rate based on the first motor angle value at the current moment and the first motor angle value at the previous moment, and determine whether the motor angle change rate is greater than or equal to a preset change rate threshold; and a processing module, configured to acquire an excitation signal from the angle sensor when it is determined that the first motor angle value exceeds the preset angle range, or the motor angle change rate is greater than or equal to the preset change rate threshold, and acquire a second motor angle value based on the excitation signal, so as to control a road feel analog motor to output steering resistance corresponding to the second motor angle value.
[0013] Thirdly, this application provides a microcontroller unit, including: a processor, a memory, and a communication interface; the memory is used to store executable instructions of the processor; wherein the processor is configured to execute the fault diagnosis processing method described in the first aspect by executing the executable instructions.
[0014] Fourthly, this application provides an electric vehicle, including: a microcontroller unit as described in the second or third aspect, a steering wheel, and a road feel simulation motor; wherein the road feel simulation motor includes an angle sensor.
[0015] This application provides a fault diagnosis and processing method, a microcontroller unit, and an electric vehicle. The method includes acquiring a first motor angle value from an angle sensor at preset time intervals and determining whether the first motor angle value exceeds a preset angle range; acquiring a motor angle change rate based on the current and previous first motor angle values and determining whether the motor angle change rate is greater than or equal to a preset change rate threshold; when it is determined that the first motor angle value exceeds the preset angle range, or the motor angle change rate is greater than or equal to the preset change rate threshold, acquiring an excitation signal from the angle sensor and acquiring a second motor angle value based on the excitation signal to control a road-sensing analog motor to output steering resistance corresponding to the second motor angle value. Compared to existing technologies, the fault diagnosis and processing method of this application can diagnose the angle range and change rate of the first motor angle value output by the angle sensor, thereby determining whether a fault condition has occurred. When a fault condition is determined to have occurred, the method acquires a second motor angle value based on the excitation signal from the angle sensor to control the road-sensing analog motor to output steering resistance based on the second motor angle value. In this way, even under fault conditions, the microcontroller unit can ensure that the road feel simulation motor controls the road feel simulation motor according to the correct motor angle data, so that the road feel simulation motor can accurately provide steering resistance. Attached Figure Description
[0016] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0017] Figure 1 This is a schematic diagram of the steer-by-wire system for an electric vehicle.
[0018] Figure 2 This application provides a structural schematic diagram of an electric vehicle;
[0019] Figure 3 A flowchart illustrating an embodiment of a fault diagnosis and processing method provided in this application;
[0020] Figure 4 A flowchart illustrating a second embodiment of a fault diagnosis and processing method provided in this application;
[0021] Figure 5a This is a schematic diagram of the motor angle output from the angle sensor in analog mode;
[0022] Figure 5b This is a schematic diagram of the motor angle output from the angle sensor in PWM mode;
[0023] Figure 5c This is a schematic diagram of the motor angle output from the angle sensor in SENT mode;
[0024] Figure 6 A flowchart illustrating a third embodiment of a fault diagnosis and processing method provided in this application;
[0025] Figure 7 A schematic diagram of the structure of an angle sensor provided in this application;
[0026] Figure 8 A flowchart illustrating Embodiment 4 of a fault diagnosis and processing method provided in this application;
[0027] Figure 9 A flowchart illustrating Embodiment 5 of a fault diagnosis and processing method provided in this application.
[0028] Figure 10 This application provides a schematic diagram of the structure of a microcontroller embodiment.
[0029] Figure 11 This is a schematic diagram of another embodiment of the microcontroller provided in this application.
[0030] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0031] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0032] With the rapid development of new energy vehicles, steer-by-wire systems have eliminated the mechanical connection between the steering wheel and the steering wheels, relying entirely on electrical signals to transmit and control steering information. When the driver turns the steering wheel to make a steering request, the road feel simulation motor directly connected to the steering wheel provides corresponding steering resistance based on the steering angle, simulating the road steering feel of mechanical steering for the driver.
[0033] Figure 1 This is a schematic diagram of the steer-by-wire system in an electric vehicle. Figure 1 As shown, the steer-by-wire system includes a steering wheel 11, a road feel simulation motor 12, a microcontroller unit (MCU) 13, a power steering motor 14, an angle displacement sensor 15, and wheels. The steering wheel 11 is connected to the road feel simulation motor 12, and the MCU is connected to both the road feel simulation motor 12 and the power steering motor 13 via wiring harnesses.
[0034] When the driver needs to turn, they will turn the steering wheel 11. The direct-drive road feel simulation motor 12, connected to the steering wheel 11, will provide steering resistance based on vehicle parameters to simulate the road steering feel during mechanical steering. The microcontroller unit (MCU) collects information from sensors in the steer-by-wire system, such as vehicle speed and lateral acceleration, via the CAN bus. After analyzing and processing this information, it transmits it to the logic calculation unit inside the MCU. After calculation by the internal control algorithm, the desired torque is output to the power steering motor 14, so that the power steering motor 14 drives the tie rod and wheels to complete the steer-by-wire operation. At the same time, the MCU feeds back information such as total rack force and steering wheel angle to the CAN bus.
[0035] In existing technologies, microcontroller units (MCUs) typically use a motor angle sensor to detect the motor angle of the road feel analog motor in order to obtain the steering wheel angle, and then control the road feel analog motor to provide corresponding steering resistance. However, under fault conditions, the motor angle obtained by the MCU may be incorrect, which would cause the MCU to control the road feel analog motor based on erroneous motor angle data, resulting in an inaccurate provision of steering resistance.
[0036] Based on the above-mentioned technical problems, the technical concept of this application is as follows: How to provide a fault diagnosis and processing method that can ensure that the MCU controls the road feel simulation motor according to the correct motor angle data under fault conditions, so that the road feel simulation motor can accurately provide steering resistance.
[0037] The fault diagnosis and processing method provided in this application aims to solve the above-mentioned technical problems in the prior art.
[0038] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0039] Figure 2 This is a structural schematic diagram of an electric vehicle provided in this application. Figure 1 As shown, the electric vehicle includes a steering wheel 11, a road feel simulation motor 12, and a microcontroller unit 13. The road feel simulation motor 12 includes an angle sensor 21. The microcontroller unit 13 can be connected to the motor angle output port of the angle sensor 21 to obtain a first motor angle value output by the angle sensor 21. The microcontroller unit 13 can also be connected to the excitation signal output port of the angle sensor 21 to obtain the excitation signal from the angle sensor 21.
[0040] The microcontroller unit can acquire the first motor angle value output by the angle sensor 21 at preset time intervals and determine whether the first motor angle value exceeds a preset angle range. For example, the preset angle range can be 0° to 360°.
[0041] The microcontroller unit can also obtain the motor angle change rate based on the current and previous motor angle values, and determine whether the motor angle change rate is greater than or equal to a preset change rate threshold. For example, the motor angle change rate = (current motor angle value - previous motor angle value) / preset time. For instance, the preset time can be 1 second, then the motor angle change rate is the change in the first motor angle value within 1 second. For example, the preset change rate threshold can be 10°.
[0042] When the microcontroller determines that the first motor angle value exceeds a preset angle range, or the motor angle change rate is greater than or equal to a preset change rate threshold, it can acquire the excitation signal from the angle sensor 21 and acquire the second motor angle value based on the excitation signal, so as to control the road feel analog motor 12 to output the steering resistance corresponding to the second motor angle value.
[0043] In this way, the microcontroller unit can diagnose the angle range and rate of change of the first motor angle value output by the angle sensor, thereby determining whether a fault condition has occurred. If a fault condition is determined, the microcontroller unit obtains the second motor angle value based on the excitation signal from the angle sensor, and controls the road feel simulation motor to output steering resistance based on the second motor angle value. This ensures that, even under fault conditions, the microcontroller unit controls the road feel simulation motor based on correct motor angle data, enabling the road feel simulation motor to accurately provide steering resistance.
[0044] Figure 3 This is a flowchart illustrating an embodiment of a fault diagnosis and processing method provided in this application. See also... Figure 3 This fault diagnosis and handling method can be executed by the microcontroller unit, and specifically includes the following steps:
[0045] Step S301: At preset time intervals, acquire the first motor angle value from the angle sensor and determine whether the first motor angle value exceeds the preset angle range.
[0046] In this embodiment, the microcontroller unit can acquire the first motor angle value from the angle sensor at preset time intervals and determine whether the first motor angle value exceeds a preset angle range. For example, the angle sensor can output a voltage value, which the microcontroller unit can convert into a first motor angle value. The preset angle range can be 0° to 360°.
[0047] Step S302: Based on the first motor angle value at the current moment and the first motor angle value at the previous moment, obtain the motor angle change rate and determine whether the motor angle change rate is greater than or equal to the preset change rate threshold.
[0048] In this embodiment, the microcontroller unit can obtain the motor angle change rate based on the first motor angle value at the current moment and the first motor angle value at the previous moment, and determine whether the motor angle change rate is greater than or equal to a preset change rate threshold.
[0049] For example, the motor angle change rate can be obtained using the following formula: Motor angle change rate = (Current motor angle value - Previous motor angle value) / Preset time. The motor angle change rate can be the change in the first motor angle value within a preset time. For example, the preset time can be 1 second, and the preset change rate threshold can be 10°.
[0050] Step S303: When it is determined that the first motor angle value exceeds the preset angle range, or the motor angle change rate is greater than or equal to the preset change rate threshold, the excitation signal in the angle sensor is acquired, and the second motor angle value is acquired according to the excitation signal, so as to control the road feel simulation motor to output the steering resistance corresponding to the second motor angle value.
[0051] In this embodiment, the microcontroller unit can determine that a fault condition has occurred when it determines that the first motor angle value exceeds a preset angle range, or the motor angle change rate is greater than or equal to a preset change rate threshold. This fault condition may include, for example: an open circuit or short circuit occurs in the connection between the motor angle output port of the angle sensor and the sampling port of the electronic control unit (ECU) in the microcontroller unit; a fault occurs in the underlying software processing of the ECU, such as data acquisition failure or acquisition malfunction in analog mode, PWM mode, or SENT mode; or an abnormal periodic task call occurs in the underlying software acquisition function module of the ECU.
[0052] When a fault condition is detected, the microcontroller unit can acquire the excitation signal from the angle sensor and obtain the second motor angle value based on the excitation signal. For example, it can acquire the first cosine excitation signals Cos_P and Cos_N and the first sine excitation signals Sin_P and Sin_N from the angle sensor, perform differential processing and phase compensation processing on the first cosine and first sine excitation signals, and then use an arctangent table to obtain the second motor angle value. The microcontroller unit can then control the road-feed analog motor to output the corresponding steering resistance based on the second motor angle value.
[0053] In this embodiment, at preset time intervals, the first motor angle value from the angle sensor is acquired, and it is determined whether the first motor angle value exceeds a preset angle range. Based on the current and previous first motor angle values, the motor angle change rate is acquired, and it is determined whether the motor angle change rate is greater than or equal to a preset change rate threshold. When it is determined that the first motor angle value exceeds the preset angle range, or the motor angle change rate is greater than or equal to the preset change rate threshold, an excitation signal from the angle sensor is acquired, and a second motor angle value is acquired based on the excitation signal to control the road feel simulation motor to output steering resistance corresponding to the second motor angle value. Compared to existing technologies, the fault diagnosis and processing method of this application can diagnose the angle range and change rate of the first motor angle value output by the angle sensor, thereby determining whether a fault condition has occurred. When a fault condition is determined, the second motor angle value is acquired based on the excitation signal from the angle sensor, and the road feel simulation motor is controlled to output steering resistance based on the second motor angle value. Thus, under fault conditions, it can ensure that the microcontroller unit controls the road feel simulation motor based on correct motor angle data, enabling the road feel simulation motor to accurately provide steering resistance.
[0054] Figure 4 This is a flowchart illustrating a second embodiment of a fault diagnosis and processing method provided in this application. See also... Figure 4 Prior to step S301 above, the fault diagnosis and processing method further includes the following steps:
[0055] Step S401: Obtain the configuration mode of the angle sensor.
[0056] In this embodiment, the angle sensor can have multiple configuration modes, including analog mode, PWM mode, or SENT mode. The angle sensor outputs different angles depending on the configuration mode.
[0057] Figure 5a This is a schematic diagram of the motor angle output from the angle sensor in analog mode. (Example:) Figure 5a As shown, in analog mode, the angle sensor outputs a voltage value between [a, b], corresponding to an angle range of [0°, 360°]. When the voltage value output by the angle sensor exceeds [a, b], it indicates an abnormal motor angle output in analog mode. A fault flag for analog mode can be set to ZmidAnalogFaultFlag. When the motor angle output in analog mode is abnormal, the fault flag ZmidAnalogFaultFlag is set to 1; otherwise, it is set to 0.
[0058] Figure 5b This is a schematic diagram showing the motor angle output from the angle sensor in PWM mode. (Example:) Figure 5bAs shown, in PWM mode, the angle sensor outputs the duty cycle value, which is between [x, y], corresponding to an angle range of [0°, 360°]. When the duty cycle value output by the angle sensor exceeds [x, y], it indicates that the motor angle output in PWM mode is abnormal. The fault flag bit for PWM mode can be set to ZmidPwmFaultFlag. When the motor angle output in PWM mode is abnormal, the fault flag bit ZmidPwmFaultFlag is set to 1; otherwise, it is set to 0.
[0059] Figure 5c This is a schematic diagram showing the motor angle output of the angle sensor in SENT mode. (Example:) Figure 5c As shown, in SENT mode, the angle output value of the angle sensor is a digital sample value, and the digital sample value is between [0, 4095], corresponding to an angle range of [0°, 360°]. When the digital sample value output by the angle sensor exceeds [0, 4095], it indicates that the motor angle output in SENT mode is abnormal. The fault flag bit for SENT mode can be set to ZmidSentFaultFlag. When the motor angle output in SENT mode is abnormal, the fault flag bit ZmidSentFaultFlag is set to 1; otherwise, it is set to 0.
[0060] The above step S301 specifically includes the following steps:
[0061] Step S402: At preset intervals, acquire the angle output value of the angle sensor, and convert the angle output value according to the configuration mode to obtain the first motor angle value of the angle sensor.
[0062] In this embodiment, the angle output value of the angle sensor can be obtained at preset intervals, and the angle output value can be converted according to different configuration modes to obtain the first motor angle value.
[0063] For example, when the angle sensor is configured in analog mode, the angle output value of the angle sensor is the voltage value A, and the voltage value A is between [a, b]. The voltage value A can be converted using the following formula to obtain the first motor angle value: First motor angle value = (Aa) * 360 / (ba).
[0064] In this embodiment, the angle output value of the angle sensor is acquired, and the angle output value is converted according to the configuration mode to obtain the first motor angle value of the angle sensor. In this way, the angle output values under various configuration modes can be converted into motor angle values, providing a prerequisite for subsequent diagnosis of the angle range and rate of change of the motor angle value, and thus determining whether a fault condition has occurred.
[0065] Figure 6 This is a flowchart illustrating a third embodiment of a fault diagnosis and processing method provided in this application. See also... Figure 6 The above step S303 specifically includes the following steps:
[0066] Step S601: When it is determined that the first motor angle value exceeds the preset angle range, or the motor angle change rate is greater than or equal to the preset change rate threshold, the first cosine excitation signal and the first sine excitation signal in the angle sensor are acquired.
[0067] In this embodiment, the microcontroller unit can determine that a fault condition has occurred when it determines that the first motor angle value exceeds a preset angle range, or that the motor angle change rate is greater than or equal to a preset change rate threshold. At this time, the microcontroller unit can acquire the first cosine excitation signal and the first sine excitation signal from the angle sensor.
[0068] Figure 7 This is a schematic diagram of an angle sensor provided in this application. The angle sensor can be a ZMID520x chip. Figure 7 As shown, the chip internally outputs excitation signals EP and EN. When the motor rotor rotates, due to the eddy current effect, cosine signals (the first cosine excitation signal) are generated at chip pins R1P and R1N; sinine signals (the first sine excitation signal) are generated at chip pins R2P and R2N. The integrated circuit module inside the chip calculates the motor angle based on the sin and cosine signals through physical circuitry. Then, it outputs the internally calculated motor angle to the chip pin SOUT through three signal transmission modes: analog signal format, PWM signal format, and SENT signal format, corresponding to the three configuration modes of the angle sensor: analog mode, PWM mode, and SENT mode.
[0069] However, under fault conditions, the motor angle obtained by the microcontroller from the angle sensor may be incorrect. Therefore, when the microcontroller determines that a fault condition has occurred, it directly acquires the excitation signals from the angle sensor, including the first cosine excitation signal and the first sine excitation signal. Specifically, the angle sensor is a ZMID520x chip, and its pins R1P, R1N, R2P, and R2N can be connected to the sampling port of the microcontroller to obtain the first cosine excitation signal (cos signal) and the first sine excitation signal (sin signal).
[0070] Step S602: Perform differential processing on the first cosine excitation signal and the first sine excitation signal respectively to obtain the second cosine excitation signal and the second sine excitation signal respectively.
[0071] In this embodiment, the microcontroller unit can perform differential processing on the first cosine excitation signal and the first sine excitation signal, respectively. Specifically, differential processing can be performed on the two cosine signals and the two sinine signals to cancel out the disturbance signals superimposed on them before differential processing, resulting in the cosine and sinine signals after interference elimination, which are the second cosine excitation signal and the second sine excitation signal.
[0072] Step S603: Perform phase compensation processing on the second cosine excitation signal and the second sine excitation signal respectively to obtain the third cosine excitation signal and the third sine excitation signal respectively.
[0073] In this embodiment, the microcontroller unit can perform phase compensation processing on the second cosine excitation signal and the second sine excitation signal, respectively. Specifically, phase compensation processing can be performed on the cosine signal and sin signal after interference elimination to eliminate phase error and obtain the third cosine excitation signal and the third sine excitation signal.
[0074] Step S604: Based on the third cosine excitation signal and the third sine excitation signal, obtain the second motor angle value, so as to control the road feel simulation motor to output the steering resistance corresponding to the second motor angle value.
[0075] In this embodiment, the microcontroller can obtain the second motor angle value using an arctangent table based on the third cosine excitation signal and the third sine excitation signal, and control the road feel simulation motor to output the corresponding steering resistance based on the second motor angle value.
[0076] In this embodiment, the microcontroller unit directly acquires the excitation signal from the angle sensor under fault conditions, and uses the excitation signal after differential processing and phase compensation to obtain the correct motor angle value. This allows the microcontroller unit to control the road feel simulation motor to output steering resistance based on the correct motor angle. Thus, under fault conditions, it ensures that the microcontroller unit controls the road feel simulation motor based on the correct motor angle data, enabling the road feel simulation motor to accurately provide steering resistance. This further solves the problem in existing technologies where, under fault conditions, the MCU controls the road feel simulation motor based on incorrect motor angle data, resulting in the road feel simulation motor failing to accurately provide steering resistance.
[0077] Figure 8 This is a flowchart illustrating a fourth embodiment of a fault diagnosis and processing method provided in this application. Figure 8 As shown, the fault diagnosis and handling method specifically includes the following steps:
[0078] Step S801: Determine whether the angle sensor has a hardware failure, and if it is determined that the angle sensor has a hardware failure, output the diagnostic result of the hardware failure of the angle sensor.
[0079] In this embodiment, the angle sensor may experience hardware failure. The microcontroller unit can first determine whether a hardware failure has occurred in the angle sensor. For example, the angle sensor can be a ZMID520x chip. Hardware failures include, but are not limited to: low power supply voltage failure; RxCosine coil open circuit failure, short circuit failure, amplitude failure, center value failure; RxSine coil open circuit failure, short circuit failure, amplitude failure, center value failure; Tx coil amplitude too low or too high failure, frequency exceeding limit failure; LC oscillator failure; CORDIC amplitude too high or too low; signal loss failure; internal EEPROM failure; ADC sampling overflow failure. When the above hardware failures occur, the angle sensor will not be able to correctly decode the motor angle, and the analog signals from the RxCosine and RxSine coils will no longer be reliable.
[0080] The microcontroller unit can set a hardware fault flag, ZmidHardwFaultFlag. When a hardware fault occurs in the angle sensor, the hardware fault flag ZmidHardwFaultFlag is set to 1; otherwise, it is set to 0.
[0081] When a hardware failure is detected in the angle sensor, the microcontroller unit can output a diagnostic result indicating that the angle sensor has experienced a hardware failure.
[0082] Step S802: At preset time intervals, acquire the first motor angle value from the angle sensor and determine whether the first motor angle value exceeds the preset angle range.
[0083] Step S803: Based on the first motor angle value at the current moment and the first motor angle value at the previous moment, obtain the motor angle change rate and determine whether the motor angle change rate is greater than or equal to the preset change rate threshold.
[0084] Step S804: When it is determined that the first motor angle value exceeds the preset angle range, or the motor angle change rate is greater than or equal to the preset change rate threshold, the excitation signal in the angle sensor is acquired, and the second motor angle value is acquired according to the excitation signal, so as to control the road feel simulation motor to output the steering resistance corresponding to the second motor angle value.
[0085] Step S805: When it is determined that the angle value of the first motor is within the preset angle range and the rate of change of the motor angle is less than the preset rate of change threshold, the road feel simulation motor is controlled to output the steering resistance corresponding to the angle value of the first motor.
[0086] In this embodiment, the microcontroller can acquire the first motor angle value of the angle sensor at preset time intervals, determine whether the first motor angle value exceeds the preset angle range, and acquire the motor angle change rate based on the first motor angle value at the current moment and the first motor angle value at the previous moment, and determine whether the motor angle change rate is greater than or equal to the preset change rate threshold.
[0087] The microcontroller unit can determine a fault condition when it determines that the angle value of the first motor exceeds a preset angle range, or that the rate of change of the motor angle is greater than or equal to a preset rate of change threshold. At this time, it acquires the excitation signal from the angle sensor and obtains the angle value of the second motor based on the excitation signal, so as to control the road feel simulation motor to output the corresponding steering resistance according to the angle value of the second motor.
[0088] The microcontroller unit can determine that no fault condition has occurred when the first motor angle value is within a preset angle range and the rate of change of the motor angle is less than a preset rate of change threshold. At this time, the road feel simulation motor can be controlled to output corresponding steering resistance based on the first motor angle value.
[0089] In this embodiment, the microcontroller unit can determine whether a fault condition has occurred before first determining that the angle sensor has a hardware fault. This avoids controlling the road feel simulation motor based on incorrect angle output and also avoids calculating the motor angle based on unreliable excitation signals. In this way, it avoids the problem that the microcontroller unit controls the road feel simulation motor based on incorrect motor angle data when the angle sensor has a hardware fault, which would prevent the road feel simulation motor from accurately providing steering resistance.
[0090] Figure 9 This is a flowchart illustrating a fifth embodiment of a fault diagnosis and processing method provided in this application. Figure 9 As shown, the fault diagnosis and handling method also includes the following steps:
[0091] Step S901: When it is determined that the first motor angle value is within the preset angle range and the motor angle change rate is less than the preset change rate threshold, the excitation signal in the angle sensor is acquired, and the second motor angle value is acquired based on the excitation signal.
[0092] Step S902: Obtain the difference between the first motor angle value and the second motor angle value, and determine whether the difference is greater than a preset difference threshold; if yes, proceed to step S903; if no, proceed to step S904.
[0093] Step S903: Increment the angle verification failure count by 1 and execute step S905.
[0094] Step S904: Decrease the angle verification failure count by 1. End.
[0095] Step S905: Determine whether the angle verification failure count is greater than the preset counting threshold; if so, proceed to step S906.
[0096] Step S906: Determine that the angle value verification for the first motor has failed, and output the diagnostic result of the angle verification failure fault.
[0097] In this embodiment, the microcontroller unit can perform verification processing on the first motor angle value when it determines that the first motor angle value is within a preset angle range and the rate of change of the motor angle is less than a preset rate of change threshold. Specifically, it can acquire the excitation signal from the angle sensor, acquire the second motor angle value based on the excitation signal, and then perform verification processing on the first motor angle value based on the second motor angle value.
[0098] Specifically, the microcontroller unit can obtain the difference between the angle value of the first motor and the angle value of the second motor. When it is determined that the difference is greater than a preset difference threshold, the angle verification failure count is increased by 1; when it is determined that the difference is less than or equal to the preset difference threshold, the angle verification failure count is decreased by 1.
[0099] The microcontroller unit can determine whether the angle verification failure count is greater than a preset counting threshold. If the angle verification failure count is greater than the preset counting threshold, the first motor angle value verification is determined to have failed.
[0100] The microcontroller unit can output a diagnostic result of the angle verification failure when it determines that the angle value verification of the first motor has failed.
[0101] In this embodiment, the microcontroller unit can determine that the first motor angle value is within a preset angle range and the rate of change of the motor angle is less than a preset rate of change threshold, and then further verify the first motor angle value. This further ensures that the microcontroller unit controls the road feel simulation motor based on correct motor angle data, enabling the road feel simulation motor to accurately provide steering resistance.
[0102] The following are embodiments of the apparatus described in this application, which can be used to execute the embodiments of the method described in this application. For details not disclosed in the apparatus embodiments of this application, please refer to the embodiments of the method described in this application.
[0103] Figure 10 This is a schematic diagram of a microcontroller embodiment provided in this application; as shown below. Figure 6As shown, the microcontroller unit 100 includes an acquisition module 101 and a processing module 102. The acquisition module 101 is used to acquire a first motor angle value from an angle sensor at preset time intervals and determine whether the first motor angle value exceeds a preset angle range. The acquisition module 101 is also used to acquire the motor angle change rate based on the current first motor angle value and the first motor angle value at the previous time, and determine whether the motor angle change rate is greater than or equal to a preset change rate threshold. The processing module 102 is used to acquire an excitation signal from the angle sensor when it is determined that the first motor angle value exceeds the preset angle range, or the motor angle change rate is greater than or equal to the preset change rate threshold, and acquire a second motor angle value based on the excitation signal, so as to control the road feel analog motor to output steering resistance corresponding to the second motor angle value.
[0104] The microcontroller unit provided in this application embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be repeated here.
[0105] In one possible implementation, the acquisition module 101 is further configured to acquire the configuration mode of the angle sensor before acquiring the first motor angle value of the angle sensor; specifically, the acquisition module 101 is configured to acquire the angle output value of the angle sensor at preset intervals, and perform conversion processing on the angle output value according to the configuration mode to acquire the first motor angle value of the angle sensor.
[0106] The microcontroller unit provided in this application embodiment executes the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be repeated here.
[0107] In one possible implementation, the processing module 102 is specifically configured to acquire a first cosine excitation signal and a first sine excitation signal from the angle sensor; perform differential processing on the first cosine excitation signal and the first sine excitation signal respectively to acquire a second cosine excitation signal and a second sine excitation signal respectively; perform phase compensation processing on the second cosine excitation signal and the second sine excitation signal respectively to acquire a third cosine excitation signal and a third sine excitation signal respectively; and acquire a second motor angle value based on the third cosine excitation signal and the third sine excitation signal.
[0108] The microcontroller unit provided in this application embodiment executes the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be repeated here.
[0109] In one possible implementation, the acquisition module 101 is further configured to determine whether the angle sensor has a hardware failure before acquiring the first motor angle value of the angle sensor, and output a diagnostic result of the hardware failure of the angle sensor when it is determined that the angle sensor has a hardware failure.
[0110] In one possible implementation, the processing module 102 is further configured to control the road feel simulation motor to output a steering resistance corresponding to the first motor angle value when it is determined that the first motor angle value is within the preset angle range and the rate of change of the motor angle is less than the preset rate of change threshold.
[0111] The microcontroller unit provided in this application embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be repeated here.
[0112] In one possible implementation, the processing module 102 is further configured to acquire an excitation signal from the angle sensor when it is determined that the first motor angle value is within a preset angle range and the rate of change of the motor angle is less than the preset rate of change threshold; acquire a second motor angle value based on the excitation signal, and perform verification processing on the first motor angle value based on the second motor angle value; and output a diagnostic result of the angle verification failure when it is determined that the verification of the first motor angle value has failed.
[0113] In one possible implementation, the processing module 102 is specifically used to obtain the difference between the first motor angle value and the second motor angle value, and when it is determined that the difference is greater than a preset difference threshold, increment the angle verification failure count by 1; when it is determined that the angle verification failure count is greater than a preset count threshold, it is determined that the verification of the first motor angle value has failed.
[0114] The microcontroller unit provided in this application embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be repeated here.
[0115] Figure 11 This is a schematic diagram of another embodiment of the microcontroller provided in this application. Figure 11 As shown, the microcontroller unit 110 includes a processor 111, a memory 112, and a communication interface 113; wherein, the memory 112 is used to store executable instructions of the processor 111; the processor 111 is configured to execute the technical solutions in any of the foregoing method embodiments by executing the executable instructions.
[0116] Optionally, the memory 112 can be either standalone or integrated with the processor 111.
[0117] Optionally, when the memory 112 is a device independent of the processor 111, the microcontroller unit 110 may further include a bus 114 for connecting the aforementioned devices.
[0118] The microcontroller unit is used to execute the technical solutions in any of the aforementioned method embodiments. Its implementation principle and technical effect are similar, and will not be described again here.
[0119] This application also provides an electric vehicle, including a microcontroller unit, a steering wheel, and a road feel simulation motor as provided in any of the foregoing embodiments; wherein the road feel simulation motor includes an angle sensor.
[0120] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.
[0121] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A fault diagnosis and processing method, characterized in that, include: At preset time intervals, the first motor angle value from the angle sensor is acquired, and it is determined whether the first motor angle value exceeds a preset angle range. Based on the first motor angle value at the current moment and the first motor angle value at the previous moment, obtain the motor angle change rate and determine whether the motor angle change rate is greater than or equal to a preset change rate threshold. When it is determined that the first motor angle value exceeds the preset angle range, or the motor angle change rate is greater than or equal to the preset change rate threshold, the excitation signal in the angle sensor is acquired, and the first cosine excitation signal and the first sine excitation signal in the angle sensor are differentially processed to acquire the second cosine excitation signal and the second sine excitation signal, respectively; the second cosine excitation signal and the second sine excitation signal are phase-compensated to acquire the third cosine excitation signal and the third sine excitation signal, respectively; based on the third cosine excitation signal and the third sine excitation signal, the second motor angle value is acquired to control the road feel simulation motor to output the steering resistance corresponding to the second motor angle value.
2. The fault diagnosis and processing method according to claim 1, characterized in that, Before acquiring the first motor angle value from the angle sensor, the method further includes: Obtain the configuration mode of the angle sensor; The step of acquiring the first motor angle value from the angle sensor at preset time intervals includes: At preset intervals, the angle output value of the angle sensor is acquired, and the angle output value is converted according to the configuration mode to obtain the first motor angle value of the angle sensor.
3. The fault diagnosis and processing method according to claim 1 or 2, characterized in that, Before acquiring the first motor angle value from the angle sensor, the method further includes: Determine whether the angle sensor has a hardware failure, and if it is determined that the angle sensor has a hardware failure, output the diagnostic result of the hardware failure of the angle sensor.
4. The fault diagnosis and processing method according to claim 1 or 2, characterized in that, The method further includes: When the angle value of the first motor is determined to be within the preset angle range, and the rate of change of the motor angle is less than the preset rate of change threshold, the road feel simulation motor is controlled to output the steering resistance corresponding to the angle value of the first motor.
5. The fault diagnosis and processing method according to claim 1 or 2, characterized in that, The method further includes: When the angle value of the first motor is determined to be within the preset angle range and the rate of change of the motor angle is less than the preset rate of change threshold, the excitation signal in the angle sensor is acquired. The second motor angle value is obtained based on the excitation signal, and the first motor angle value is verified based on the second motor angle value. When it is determined that the angle value verification of the first motor has failed, the diagnostic result of the angle verification failure is output.
6. The fault diagnosis and processing method according to claim 5, characterized in that, The step of verifying the first motor angle value based on the second motor angle value includes: Obtain the difference between the first motor angle value and the second motor angle value, and when it is determined that the difference is greater than a preset difference threshold, increment the angle verification failure count by 1; When the count of failed angle verifications is greater than a preset count threshold, it is determined that the verification of the angle value of the first motor has failed.
7. A microcontroller unit, characterized in that, include: The acquisition module is used to acquire the first motor angle value of the angle sensor at preset time intervals and determine whether the first motor angle value exceeds a preset angle range. The acquisition module is further configured to acquire the motor angle change rate based on the first motor angle value at the current moment and the first motor angle value at the previous moment, and determine whether the motor angle change rate is greater than or equal to a preset change rate threshold. The processing module is configured to, when determining that the first motor angle value exceeds the preset angle range, or the motor angle change rate is greater than or equal to the preset change rate threshold, acquire the excitation signal from the angle sensor, and perform differential processing on the first cosine excitation signal and the first sine excitation signal from the angle sensor respectively to acquire the second cosine excitation signal and the second sine excitation signal respectively; perform phase compensation processing on the second cosine excitation signal and the second sine excitation signal respectively to acquire the third cosine excitation signal and the third sine excitation signal respectively; and acquire the second motor angle value based on the third cosine excitation signal and the third sine excitation signal to control the road feel simulation motor to output the steering resistance corresponding to the second motor angle value.
8. A microcontroller unit, characterized in that, include: Processor, memory, communication interface; The memory is used to store the executable instructions of the processor; The processor is configured to execute the fault diagnosis processing method of any one of claims 1 to 6 by executing the executable instructions.
9. An electric vehicle, characterized in that, include: The microcontroller unit as described in claim 7 or 8, the steering wheel, and the road feel simulation motor; The road-sensing simulated motor includes an angle sensor.
Citation Information
Patent Citations
Rotary angle detector, brushless motor and motor operated power steering system
JP2002081961A
Rotation angle detector, and electric power steering device using this
JP2007010329A
