Motor angle detection and diagnosis device, motor controller, electric vehicle and method

By designing a motor angle detection and diagnosis device in the motor controller, using a rotary transformer and excitation modulation signal, angle sampling above ASILC is achieved, avoiding the use of high-priced chips, reducing costs, and ensuring the safety of the motor controller. sex.

CN112689952BActive Publication Date: 2024-09-06HUAWEI DIGITAL POWER TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202080004978.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-05-28
Publication Date
2024-09-06
Estimated Expiration
2040-05-28

Smart Images

  • Figure CN112689952B
    Figure CN112689952B
Patent Text Reader

Abstract

The present application relates to a motor angle detection and diagnosis device and method in a vehicle-mounted motor controller, wherein the motor angle detection and diagnosis device is connected to a drive motor via a rotary transformer. The rotary transformer is used to output a rotary transformer feedback signal of the drive motor electrical angle. The angle sampling and diagnosis system in the motor angle detection and diagnosis device samples the rotary transformer feedback signal conditioned by the rotary transformer feedback processing circuit in two channels simultaneously, and calculates the first electrical angle and the second electrical angle respectively, and performs real-time diagnosis on the two-channel sampling data and the first electrical angle and the second electrical angle, and also diagnoses the hardware circuit, and controls the motor controller to enter a safe state when the diagnosis result is abnormal. The scheme samples through two sampling channels, uses software algorithms to implement angle software decoding, and adds a software diagnosis mechanism, which can achieve angle decoding above ASILC, avoids the use of safety decoding chips, and reduces production costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of vehicle-mounted motor control technology, and in particular to a motor angle detection and diagnosis device, a motor controller, an electric vehicle, and a motor angle detection and diagnosis method. Background Art

[0002] ISO 26262 "Road Vehicle Functional Safety" is a road vehicle functional safety standard derived from the basic standard IEC61508 for the functional safety of electronic, electrical and programmable devices. It is mainly aimed at specific electrical devices, electronic equipment, programmable electronic devices and other components specifically used in the automotive field in the automotive industry. It aims to improve the international standard for the functional safety of automotive electronic and electrical products. This standard determines the safety requirement level (Automotive Safety Integrity Level, ASIL) from A to D for the system or a component of the system according to the degree of safety risk, with D being the highest level. The higher the ASIL level, the higher the diagnostic coverage of the functional safety-related circuits, and the lower the corresponding hardware random failure probability metric.

[0003] Torque safety is the most important functional safety goal of electric vehicle motor controllers, which is generally defined as no unexpected torque acceleration, deceleration, or unexpected startup. The highest ASIL level of the torque functional safety goal of the motor controller is at least ASILC or ASILD. If the torque safety goal level is to reach ASILC or above, the input quantity (electrical angle of the motor) used to calculate the torque must be able to reach at least ASILC or above.

[0004] In the field of electric vehicles, rotary transformers (resolvers for short) are widely used to test the rotor position and speed of motors because of their reliable operation and strong environmental adaptability. Among them, the rotary transformer is a sensor that accurately measures the angular position and speed of rotating parts such as motors through the magnetic coupling of the primary winding and two secondary windings. Its primary winding and two orthogonal secondary windings are installed on the motor rotor and stator respectively. The excitation signal applied to the primary winding couples the sine resolver feedback signal and the cosine resolver feedback signal in the two secondary windings respectively. The sine resolver feedback signal and the cosine resolver feedback signal can be collectively referred to as resolver feedback signals. The angular position and speed information of the motor rotor can be obtained by demodulating and converting the sine resolver feedback signal and the cosine resolver feedback signal.

[0005] In order to obtain the sampling of the resolver electrical angle to reach the level above ASILC, the existing method is to directly input the resolver feedback signal of the electrical angle output by the resolver into a resolver decoding chip above ASILC level. The resolver decoding chip outputs the resolver excitation signal, obtains the resolver feedback signal to realize angle decoding, and diagnoses the input and output signals at the same time, so that the angle signal reaches the level above ASILC. However, although this solution can achieve angle sampling above ASILC level, the price of the safety decoding chip above ASILC level is relatively high, which leads to an increase in the material cost of the motor controller. Summary of the invention

[0006] The embodiments of the present application provide a motor controller for use in an electric vehicle, a motor angle detection and diagnosis device in the motor controller, and a motor angle detection and diagnosis method, which can achieve angle decoding above ASILC without the need for a security decoding chip, thereby reducing the material cost of the motor controller.

[0007] In the first aspect, the embodiment of the present application discloses a motor angle detection and diagnosis device, which is applied to a motor controller and can make the angle sampling reach the functional safety target ASILC level or above. The motor angle detection and diagnosis device is connected to the drive motor through a rotary transformer. The rotary transformer is used to output the rotary transformer feedback signal of the electrical angle of the drive motor. The motor angle detection and diagnosis device includes a signal generating module, a rotary transformer excitation processing circuit, a rotary transformer feedback processing circuit, an angle sampling and diagnosis system, a diagnostic signal sampling circuit and a first diagnostic module.

[0008] The signal generating module is used to generate an excitation modulation signal; wherein the excitation modulation signal is generated by comparing the excitation fundamental signal and the carrier signal. The resolver excitation processing circuit is connected between the signal generating module and the resolver, and is used to filter and amplify the excitation modulation signal to obtain an excitation signal, thereby driving the resolver to work. The resolver feedback processing circuit is connected to the resolver, and is used to condition the resolver feedback signal output by the resolver. The angle sampling and diagnostic system is used to simultaneously sample the resolver feedback signal conditioned by the resolver feedback processing circuit in two ways and calculate the first electrical angle and the second electrical angle respectively. wherein the first electrical angle is used for torque control, and the second electrical angle is used for torque monitoring.

[0009] The angle sampling and diagnosis system is also used to perform real-time diagnosis on the two sampling data and the first electrical angle and the second electrical angle, and control the motor controller to enter a safe state when the diagnosis result is abnormal. The diagnostic signal sampling circuit is connected to the resolver excitation processing circuit and the resolver feedback processing circuit respectively, and is used to collect the excitation signal and the resolver feedback signal conditioned by the resolver feedback processing circuit to generate a corresponding feedback detection signal. The first diagnostic module is electrically connected to the diagnostic signal sampling circuit, and is used to diagnose the excitation wave generation circuit and the resolver feedback sampling circuit according to the feedback detection signal, and control the motor controller to enter the safe state when a fault is diagnosed.

[0010] The technical solution of the first aspect is that the resolver feedback signal conditioned by the resolver feedback processing circuit is sampled in two ways at the same time, and the first electrical angle and the second electrical angle are calculated respectively, and real-time diagnosis is performed during the sampling and calculation process, and when the diagnosis result is abnormal, the motor controller is controlled to enter a safe state. In addition, the motor angle detection and diagnosis device also diagnoses the hardware circuit loops such as the excitation processing circuit and the feedback processing circuit by collecting the excitation signal and the processed resolver feedback signal, and when the diagnosis result is abnormal, the motor controller is controlled to enter a safe state, thereby making the motor angle detection and diagnosis device reach the corresponding ASILC level or above, ensuring that the entire vehicle or components can enter a controllable safe state in the event of a failure in the electronic system, thereby achieving the purpose of ensuring the personal safety of the driving participants.

[0011] According to the first aspect, in a possible implementation, the angle sampling and diagnosis system includes a first sampling module, a second sampling module, a first calculation module, a second calculation module and a second diagnosis module. The first sampling module is located in the basic function layer, the second sampling module is located in the monitoring layer, and the first sampling module and the second sampling module are the same. The first sampling module and the second sampling module are respectively used to sample the resolver feedback signal conditioned by the resolver feedback processing circuit to obtain the first target signal and the second target signal. The first calculation module and the second calculation module are respectively used to calculate the first electrical angle and the second electrical angle according to the first target signal and the second target signal. The second diagnosis module is used to diagnose the first target signal and the second target signal in real time, and is also used to diagnose the first electrical angle and the second electrical angle in real time. In this way, sampling through two identical sampling modules can improve the coverage of sampling diagnosis.

[0012] According to the first aspect, in a possible implementation, in order to ensure sampling accuracy, the first sampling module includes a first Σ△ analog-to-digital converter SD-ADC and a first demodulation module. The second sampling module includes a second SD-ADC and a second demodulation module. The resolver feedback signal includes a sine feedback signal and a cosine feedback signal. The resolver feedback processing circuit is used to convert the sine feedback signal into a sine differential signal matching the SD-ADC port level, and is also used to convert the cosine feedback signal into a cosine differential signal matching the SD-ADC port level. The first SD-ADC is used to sample the sine differential signal and the cosine differential signal to obtain a first sampling signal. The first demodulation module is used to demodulate the first sampling signal to separate the excitation signal and obtain the first target signal. The second SD-ADC is used to sample the sine differential signal and the cosine differential signal to obtain a second sampling signal. The second demodulation module is used to demodulate the second sampling signal to separate the excitation signal and obtain the second target signal.

[0013] According to the first aspect, in a possible implementation, the second diagnostic module is further used to read back the configuration registers of the first SD-ADC and the second SD-ADC at a preset period to diagnose whether the current configuration of the configuration register is the same as the initial configuration. In this way, by adding a corresponding safety mechanism, it can be further ensured that the angle sampling reaches the ASILC level or above.

[0014] According to the first aspect, in a possible implementation, in order to ensure sampling accuracy, the first sampling module includes a first successive approximation register analog-to-digital converter SAR-ADC. The second sampling module includes a second SAR-ADC. The resolver feedback signal includes a sine feedback signal and a cosine feedback signal. The resolver feedback processing circuit is used to convert the sine resolver feedback signal into a sine single-ended signal, and is also used to convert the cosine feedback signal into a cosine single-ended signal. The first SAR-ADC is used to sample the sine single-ended signal and the cosine single-ended signal to obtain the first target signal. The second SAR-ADC is used to sample the sine single-ended signal and the cosine single-ended signal to obtain the second target signal.

[0015] According to the first aspect, in a possible implementation, the second diagnostic module is further used to perform a power-on test mode on the second SAR-ADC; wherein the power-on test mode refers to injecting a preset voltage through an external port to determine whether the recovery voltage is the same as the preset voltage. In this way, by adding a corresponding safety mechanism, it can be further ensured that the angle sampling reaches the ASILC level or above.

[0016] According to the first aspect, in a possible implementation, in order to improve the coverage of sampling diagnosis, the second diagnostic module is further used to read back the configuration registers of the first SAR-ADC and the second SAR-ADC at a preset period to diagnose whether the current configuration of the configuration register is the same as the initial configuration. In this way, by adding a corresponding safety mechanism, it can be further ensured that the angle sampling reaches the ASILC level or above.

[0017] According to the first aspect, in a possible implementation, the first target signal includes a first target sine signal and a first target cosine signal; the second target signal includes a second target sine signal and a second target cosine signal. The second diagnostic module is used to compare in real time whether the first target sine signal and the second target sine signal are within a preset noise range, and is also used to compare in real time whether the first target cosine signal and the second target cosine signal are within a preset noise range. In this way, the diagnostic coverage of the sampling branch can be improved.

[0018] According to the first aspect, in a possible implementation, in order to further improve the coverage of sampling branch diagnosis, the second diagnostic module is also used to verify in real time whether the sum of the square value of the second target sine signal and the square value of the second target cosine signal is within a preset value range. In this way, it is possible to diagnose anomalies caused by common cause failures.

[0019] According to the first aspect, in a possible implementation, the second diagnostic module is also used to monitor whether the software program flow used to obtain the sampling value is triggered periodically, so as to further improve the diagnostic coverage of the sampling branch, thereby being sufficient to ensure that the sampling module reaches the ASILC level or above.

[0020] According to the first aspect, in a possible implementation, in order to improve the coverage of angle diagnosis, the second diagnostic module is used to perform a real-time comparison of the first electrical angle and the second electrical angle to determine whether the difference between the first electrical angle and the second electrical angle is within a preset range, and also diagnose the calculation process of the first electrical angle and the second electrical angle, thereby ensuring that the first electrical angle and the second electrical angle reach ASILC level or above.

[0021] According to the first aspect, in a possible implementation manner, the first calculation module and the second calculation module use different algorithms to calculate the angle to improve the accuracy of angle diagnosis.

[0022] According to the first aspect, in a possible implementation, in order to further diagnose the excitation wave generation circuit and the resolver feedback sampling circuit, the return detection signal includes the single-ended signal and the differential signal of the excitation signal; the first diagnostic module is used to detect the voltage range of the excitation modulation signal according to the single-ended signal of the excitation signal, and is also used to detect the frequency and duty cycle of the excitation modulation signal according to the differential signal of the excitation signal, thereby diagnosing the excitation wave generation circuit. The return detection signal also includes the single-ended signal of the resolver feedback signal, and the first diagnostic module is also used to diagnose the resolver feedback sampling circuit according to the single-ended signal of the resolver feedback signal.

[0023] In a second aspect, an embodiment of the present application discloses a motor controller, comprising an inverter circuit; the input end of the inverter circuit is connected to a power battery, and the output end of the inverter circuit is connected to a drive motor; the inverter circuit is used to convert the high-voltage direct current output by the power battery into alternating current for the drive motor to operate. The motor controller also includes a motor angle detection and diagnosis device as described in the first aspect and any possible implementation of the first aspect. The motor angle detection and diagnosis device is connected to the drive motor via a rotary transformer.

[0024] In a third aspect, an embodiment of the present application discloses an electric vehicle, comprising a motor controller as described in the second aspect and any possible implementation method of the second aspect.

[0025] In a fourth aspect, an embodiment of the present application discloses a motor angle detection and diagnosis method, which is applied to a motor controller and can enable angle sampling to reach a functional safety target ASILC level or above. The motor controller is connected to the drive motor through a rotary transformer. The rotary transformer is used to output a rotary transformer feedback signal of the drive motor angle. The motor angle detection and diagnosis method includes: generating an excitation modulation signal; wherein the excitation modulation signal is generated by comparing an excitation fundamental wave signal and a carrier signal; filtering and amplifying the excitation modulation signal to obtain an excitation signal, thereby driving the resolver to work and outputting the resolver feedback signal; conditioning the resolver feedback signal; sampling the conditioned resolver feedback signal in two channels simultaneously, and calculating a first electrical angle and a second electrical angle respectively, and performing real-time diagnosis on the two sampling data and the first electrical angle and the second electrical angle; wherein the first electrical angle is used for torque control and the second electrical angle is used for torque monitoring; and sampling the excitation signal and the conditioned resolver feedback signal to generate a corresponding return detection signal, and diagnosing the excitation wave generation circuit and the resolver feedback sampling circuit according to the return detection signal; and controlling the motor controller to enter the safe state when the diagnosis result is abnormal.

[0026] The technical solution described in the fourth aspect, because the conditioned resolver feedback signal is sampled in two ways at the same time, and the first electrical angle and the second electrical angle are calculated respectively, and real-time diagnosis is performed during the sampling and calculation process, and when the diagnosis result is abnormal, the motor controller is controlled to enter a safe state. In addition, the scheme also diagnoses the hardware circuit loops such as the excitation wave generation circuit and the resolver feedback sampling circuit by collecting the excitation signal and the processed resolver feedback signal, and when the diagnosis result is abnormal, the motor controller is controlled to enter a safe state, so that the sampling angle reaches the corresponding ASILC level or above, ensuring that the whole vehicle or components can enter a controllable safe state in the event of a failure in the electronic system, thereby achieving the purpose of protecting the personal safety of the driving participants.

[0027] According to the fourth aspect, in a possible implementation manner, the motor controller includes a first sampling module located at a basic function layer and a second sampling module located at a monitoring layer, and the first sampling module and the second sampling module are the same.

[0028] The method of sampling the conditioned resolver feedback signal in two ways at the same time, calculating the first electrical angle and the second electrical angle respectively, and performing real-time diagnosis on the two ways of sampling data and the first electrical angle and the second electrical angle comprises: sampling the resolver feedback signal conditioned by the resolver feedback processing circuit through the first sampling module and the second sampling module respectively to obtain the first target signal and the second target signal; calculating the first electrical angle and the second electrical angle respectively according to the first target signal and the second target signal; performing real-time diagnosis on the first target signal and the second target signal, and also performing real-time diagnosis on the first electrical angle and the second electrical angle.

[0029] According to the fourth aspect, in a possible implementation, the first sampling module includes a first Σ△ analog-to-digital converter SD-ADC, and the second sampling module includes a second SD-ADC; the resolver feedback signal includes a sine feedback signal and a cosine feedback signal. The conditioning of the resolver feedback signal output by the resolver includes: converting the sine feedback signal into a sine differential signal matching the SD-ADC port level, and also converting the cosine feedback signal into a cosine differential signal matching the SD-ADC port level. The sampling of the resolver feedback signal conditioned by the resolver feedback processing circuit by the first sampling module and the second sampling module respectively to obtain a first target signal and a second target signal includes: sampling the sine differential signal and the cosine differential signal by the first SD-ADC to obtain a first sampling signal, and sampling the sine differential signal and the cosine differential signal by the second SD-ADC to obtain a second sampling signal; demodulating the first sampling signal to separate the excitation signal to obtain the first target signal, and demodulating the second sampling signal to separate the excitation signal to obtain the second target signal.

[0030] According to the fourth aspect, in a possible implementation, the motor angle detection and diagnosis method further includes: reading back the configuration registers of the first SD-ADC and the second SD-ADC at a preset period, respectively, to diagnose whether the current configuration of the configuration register is the same as the initial configuration.

[0031] According to the fourth aspect, in a possible implementation manner, the first sampling module includes a first SAR-ADC; the second sampling module includes a second SAR-ADC; and the resolver feedback signal includes a sine feedback signal and a cosine feedback signal.

[0032] The conditioning of the resolver feedback signal output by the resolver includes: converting the sinusoidal resolver feedback signal into a sinusoidal single-ended signal, and converting the cosine feedback signal into a cosine single-ended signal. The sampling of the resolver feedback signal conditioned by the resolver feedback processing circuit by the first sampling module and the second sampling module to obtain a first target signal and a second target signal includes: sampling the sinusoidal single-ended signal and the cosine single-ended signal by the first SAR-ADC to obtain the first target signal, and sampling the sinusoidal single-ended signal and the cosine single-ended signal by the second SAR-ADC to obtain the second target signal.

[0033] According to the fourth aspect, in a possible implementation, the motor angle detection and diagnosis method further includes: performing a power-on test mode on the second SAR-ADC; wherein the power-on test mode refers to injecting a preset voltage through an external port to determine whether the recovered voltage is the same as the preset voltage.

[0034] According to the fourth aspect, in a possible implementation, the motor angle detection and diagnosis method further includes: reading back the configuration registers of the first SAR-ADC and the second SAR-ADC at a preset period, respectively, to diagnose whether the current configuration of the configuration register is the same as the initial configuration.

[0035] According to the fourth aspect, in a possible implementation, the resolver feedback signal includes a sine feedback signal and a cosine feedback signal; the first target signal includes a first target sine signal and a first target cosine signal; the second target signal includes a second target sine signal and a second target cosine signal. The real-time diagnosis of the first target signal and the second target signal includes: comparing the first target sine signal and the second target sine signal in real time to see if they are within a preset noise range, and also comparing the first target cosine signal and the second target cosine signal in real time to see if they are within a preset noise range.

[0036] According to the fourth aspect, in a possible implementation, the real-time diagnosis of the first target signal and the second target signal also includes: real-time verification whether the sum of the square value of the second target sine signal and the square value of the second target cosine signal is within a preset numerical range.

[0037] According to the fourth aspect, in a possible implementation manner, the motor angle detection and diagnosis method further includes: monitoring whether a software program flow for obtaining sampling values ​​is triggered periodically.

[0038] According to the fourth aspect, in a possible implementation, the real-time diagnosis of the first electrical angle and the second electrical angle includes: real-time comparison of the first electrical angle and the second electrical angle to determine whether the difference between the first electrical angle and the second electrical angle is within a preset range, and also diagnosing the calculation process of the first electrical angle and the second electrical angle.

[0039] According to the fourth aspect, in a possible implementation, the feedback detection signal includes a single-ended signal and a differential signal of the excitation signal and a single-ended signal of the resolver feedback signal. The diagnosing the excitation wave generation circuit and the resolver feedback sampling circuit according to the feedback detection signal includes: detecting the voltage range of the excitation modulation signal according to the single-ended signal of the excitation signal, and also detecting the frequency and duty cycle of the excitation modulation signal according to the differential signal of the excitation signal, thereby diagnosing the excitation wave generation circuit; and diagnosing the resolver feedback sampling circuit according to the single-ended signal of the resolver feedback signal. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to illustrate the technical solutions in the embodiments of the present application or the background technology, the drawings required for use in the embodiments of the present application or the background technology will be described below.

[0041] Figure 1 Schematic diagram of the structure of an electric vehicle in one embodiment of the present application.

[0042] Figure 2 for Figure 1 Schematic diagram of the structure and application of the motor control controller in.

[0043] Figure 3 Schematic diagram of the structure of a motor angle detection and diagnosis device in one embodiment of the present application.

[0044] Figure 4 Schematic diagram of the structure of a motor angle detection and diagnosis device in another embodiment of the present application.

[0045] Figure 5 Schematic diagram of the structure of a motor angle detection and diagnosis device in another embodiment of the present application.

[0046] Figure 6 Flow chart of a motor angle detection and diagnosis method in one embodiment of the present application.

[0047] Figure 7 Based Figure 1 Sub-flow chart of step S14 in .

[0048] Figure 8 Flow chart of a motor angle detection and diagnosis method in another embodiment of the present application.

[0049] Fig. 9 This is a flow chart of a motor angle detection and diagnosis method in yet another embodiment of the present application. DETAILED DESCRIPTION

[0050] The embodiments of the present application provide an electric vehicle, a motor controller used in the electric vehicle, a motor angle detection and diagnosis device in the motor controller, and a motor angle detection and diagnosis method, which can achieve angle decoding above ASILC without the need for a security decoding chip, thereby reducing the material cost of the motor controller.

[0051] Among them, electric vehicles include battery electric vehicles (BEV), hybrid electric vehicles (HEV) and plug-in hybrid electric vehicles (PHEV).

[0052] A battery electric vehicle comprises an electric motor, wherein the energy source of the electric motor is a power battery. The power battery of a battery electric vehicle can be recharged from an external power grid. The power battery of a battery electric vehicle is practically the only source of on-board energy for vehicle propulsion.

[0053] A hybrid electric vehicle includes an internal combustion engine and an electric motor, wherein the energy source of the engine is fuel and the energy source of the electric motor is a power battery. The engine is the main source of energy for vehicle propulsion, and the power battery of the hybrid electric vehicle provides supplementary energy for vehicle propulsion (the power battery of the hybrid electric vehicle buffers fuel energy and recovers kinetic energy in the form of electricity).

[0054] The difference between a plug-in hybrid electric vehicle and a hybrid electric vehicle is that the plug-in hybrid electric vehicle power battery has a larger capacity than the hybrid electric vehicle power battery, and the plug-in hybrid electric vehicle power battery can be recharged from the power grid. The plug-in hybrid electric vehicle power battery is the main source of energy for vehicle propulsion until the plug-in hybrid electric vehicle power battery is depleted to a low energy level, at which time the plug-in hybrid electric vehicle operates like a hybrid electric vehicle for vehicle propulsion.

[0055] The following describes the embodiments of the present application in conjunction with the accompanying drawings. In the embodiments of the present application, a battery electric vehicle is taken as an example to illustrate the structure of the electric vehicle.

[0056] like Figure 1 As shown, the electric vehicle 1000 specifically includes a motor drive system 100 for driving the vehicle, an on-board energy system 200 for providing energy, and an auxiliary system 300. Specifically, the motor drive system 100 includes a vehicle controller 110, a motor controller 120, a drive motor 130, a transmission device 140, and a wheel 150. The on-board energy system 200 includes a power battery 210, a battery management system 220, and a charger 230.

[0057] The vehicle control unit (VCU) 110, also called the powertrain controller, is the core control component of the entire vehicle, equivalent to the brain of the vehicle. It collects accelerator pedal signals, brake pedal signals and other component signals, and after making corresponding judgments, controls the actions of the lower-level component controllers to drive the vehicle to run normally. As the command and management center of the vehicle, the main functions of the vehicle controller include: driving torque control, optimal control of braking energy, energy management of the entire vehicle, maintenance and management of the CAN (Controller Area Network) network, fault diagnosis and processing, vehicle status monitoring, etc. It plays a role in controlling the operation of the vehicle. Therefore, the quality of the vehicle controller directly determines the stability and safety of the vehicle.

[0058] The motor controller 120 is an integrated circuit that actively controls the drive motor 130 to work in a set direction, speed, angle, and response time, and is connected to the vehicle controller 130 for communication. In the electric vehicle 1000, the function of the motor controller 120 is to convert the electric energy stored in the power battery 210 into the electric energy required by the drive motor 130 according to the gear position, accelerator, brake and other instructions, to control the start-up operation, forward and backward speed, climbing strength and other driving states of the electric vehicle 1000, or to help the electric vehicle 1000 brake and store part of the braking energy in the power battery 210.

[0059] The drive motor 130 (commonly known as "motor") refers to an electromagnetic device that realizes electrical energy conversion or transmission according to the law of electromagnetic induction, which is electrically connected to the motor controller 120 and mechanically connected to the transmission device 140. Its main function is to generate driving torque as a power source for the wheel 150. In some embodiments, the drive motor 130 can also convert mechanical energy into electrical energy, that is, it can be used as a generator.

[0060] Specifically, the drive motor 130 can be a motor of the type of a permanent-magnet synchronous motor (PMSM). The drive motor 130 can be composed of a stator and a rotor, wherein the stator includes a stator winding. The rotor can rotate around a central axis relative to the stator. The drive motor 130 can be controlled by passing a general sinusoidal current through the stator winding. The amplitude and frequency of the current can be changed to control the torque and speed of the rotor. The stator current generates an electromagnetic field, which interacts with a permanent magnet as a component of the rotor. The electromagnetic field causes the rotor to rotate.

[0061] For example, the drive motor 130 may be a three-phase motor. That is, the stator winding may include three separate phase windings. In order to control the drive motor 130, a three-phase voltage wave or a three-phase current wave is applied to the phase windings. The three-phase wave separates the signal of each phase by a phase difference of 120 degrees.

[0062] The transmission device 140 is also mechanically connected to the wheels 150, and is used to transmit the power source generated by the drive motor 130 to the wheels 150 to drive the electric vehicle 1000. In some embodiments, the transmission device 140 may include a drive shaft (not shown) connected between the two wheels 150 and a differential (not shown) disposed on the drive shaft.

[0063] The power battery 210 is electrically connected to the motor controller 120 for storing and providing electrical energy. The power battery 210 includes but is not limited to a lead-acid battery, a lithium iron phosphate battery, a nickel-hydrogen battery, a nickel-cadmium battery, etc. In some embodiments, the power battery 210 may also include a supercapacitor.

[0064] The battery management system 220 is electrically connected to the power battery 210 and is in communication connection with the vehicle controller 110. The battery management system 220 is used to monitor and estimate the status of the power battery 210 under different working conditions to improve the utilization rate of the power battery 210, prevent the power battery 210 from being overcharged and over-discharged, and thus extend the service life of the power battery 210. Specifically, the main functions of the battery management system 220 may include: real-time monitoring of battery physical parameters; battery status estimation; online diagnosis and early warning; charge, discharge and pre-charge control; balance management and thermal management, etc.

[0065] The charger 230 is electrically connected to the power battery 210 and is used to connect to an external power source to charge the power battery 210. Specifically, when the electric vehicle 1000 is connected to an external power source (such as a charging pile), the charger 230 converts the AC power provided by the external power source into DC power to charge the power battery 219. In addition, the battery management system 220 is also connected to the charger 230 to monitor the charging process of the power battery 210.

[0066] The auxiliary system 300 includes a DC / DC converter 310, an auxiliary battery 320, a low-voltage load 330, and a high-voltage load 340. One end of the DC / DC converter 310 is connected to the power battery 210, and the other end is connected to the auxiliary battery 320 and the low-voltage load 330 respectively. The DC / DC converter 310 is used to convert the high voltage (such as 380V) output by the power battery 210 into a low voltage (such as 12V) to charge the auxiliary battery 320 and power the low-voltage load 330. In some embodiments, the low-voltage load 330 includes low-voltage automotive accessories, such as a cooling pump, a fan, a heater, a power steering device, a brake, etc. Of course, the auxiliary battery 320 can also power the low-voltage load 330. In addition, the power battery 210 is also connected to the high-voltage load 340 to power the high-voltage load 340. In some embodiments, the high-voltage load 340 includes a PTC heater and an air conditioning unit, etc.

[0067] It should be noted that the electronic modules in the electric vehicle 1000 can communicate via one or more vehicle networks. The vehicle network may include multiple channels for communication. One channel of the vehicle network may be a serial bus such as a Controller Area Network (CAN). One of the channels of the vehicle network may include Ethernet defined by the Institute of Electrical and Electronics Engineers (IEEE) 802 family of standards. Other channels of the vehicle network may include discrete connections between modules and may include power signals from the auxiliary battery 130. Different signals may be transmitted through different channels of the vehicle network. For example, a video signal may be transmitted via a high-speed channel (e.g., Ethernet), while a control signal may be transmitted via CAN or a discrete signal. The vehicle network may include any hardware components and software components that assist in transmitting signals and data between modules. The vehicle network is Figure 1 Not shown, but implied, the vehicle network may be connected to any electronic module present in the electric vehicle 1000. For example, a vehicle controller 110 may be present to coordinate the operation of various components.

[0068] It is understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electric vehicle 1000. In other embodiments of the present application, the electric vehicle 1000 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0069] As the core power component of the electric vehicle 1000, the functional safety of the motor controller 120 is particularly important. Among them, the ISO 26262 "Road Vehicle Functional Safety" international standard determines the safety requirement level (Automotive Safety Integrity Level, Automotive Safety Integrity Level ASIL) from A to D for the system or a component of the system according to the degree of safety risk. The higher the ASIL level, the higher the diagnostic coverage of the functional safety-related circuits, and the lower the corresponding hardware random failure probability measurement index. This standard provides how to comply with the corresponding specifications from a design perspective, so that the product reaches the corresponding ASIL level, ensuring that the entire vehicle or component can enter a controllable safety state in the event of a failure in the electronic system, thereby achieving the purpose of protecting the personal safety of driving participants.

[0070] Torque safety is the most important functional safety target of the motor controller 120, which is generally defined as no unexpected torque acceleration, deceleration, or unexpected startup. The highest ASIL (Automotive Safety Integration Level) of the torque functional safety target of the motor controller 120 is at least ASILC or ASILD.

[0071] There are two methods for torque safety estimation: power method and flux method. The flux method requires fewer physical quantities to be sampled and has higher accuracy, while the input quantities required by the flux method are three-phase current and the electrical angle of the motor. In other words, if the torque safety target level is to reach ASILC or above, the electrical angle of the motor, one of the input quantities used to calculate the torque, must be able to reach at least ASILC or above. The key to whether the motor electrical angle can reach at least ASILC or above lies in the sampling and diagnosis of the electrical angle.

[0072] The structure and corresponding functions of the motor controller 120 in the embodiment of the present application are described in detail below. The torque function safety of the motor controller 120 in the embodiment of the present application meets the ASILC level or above.

[0073] like Figure 2 As shown, the motor controller 120 includes an inverter circuit 120a and a motor angle detection and diagnosis device 120b. The input end of the inverter circuit 120a is connected to the power battery 210, and the output end of the inverter circuit 120a is connected to the drive motor 130. The inverter circuit 120a is used to convert the high-voltage direct current output by the power battery 210 into alternating current (such as three-phase alternating current) for the drive motor 130 to work.

[0074] The motor angle detection and diagnosis device 120b is connected to the drive motor 130 through a resolver (resolver / transformer) 160 to decode the resolver feedback signal output by the resolver 160 to obtain the electrical angle of the drive motor 130. Among them, the resolver 160 is a sensor that accurately measures the angular position and speed of rotating parts such as motors through the magnetic coupling of the primary winding and two secondary windings. Its primary winding and two orthogonal secondary windings are respectively installed on the motor rotor and stator, and the excitation signal applied to the primary winding is coupled to the two secondary windings to respectively couple out a sine resolver feedback signal and a cosine resolver feedback signal, which can be collectively referred to as a resolver feedback signal. The angular position and speed information of the motor rotor can be obtained by demodulating and converting the sine resolver feedback signal and the cosine resolver feedback signal.

[0075] It is understandable that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the motor controller 120. In other embodiments of the present application, the motor controller 120 may include more components than shown in the figure, for example, an auxiliary power supply circuit, a charging circuit, a voltage / current detection circuit, etc.

[0076] See also Figure 3 , Figure 3 FIG. 1 is a schematic diagram of the structure of a motor angle detection and diagnosis device in an embodiment of the present application. Figure 3 As shown, the motor angle detection and diagnosis device 120b includes a microprocessor 10, a resolver excitation processing circuit 20, a resolver feedback processing circuit 30 and a diagnostic signal sampling circuit 40. The microprocessor 10 includes a signal generating module 11, an angle sampling and diagnosis system 101 and a first diagnosis module 12.

[0077] The signal generating module 11 is used to generate an excitation modulation signal. In some embodiments, the signal generating module 11 is used to generate an excitation fundamental wave signal and a carrier signal, and generate the excitation modulation signal after comparing the excitation fundamental wave signal and the carrier signal. In this embodiment, the excitation fundamental wave signal is a sine wave signal, which can be obtained by looking up a table. The carrier signal is a symmetrical triangular wave signal, which can be realized by a counter. Therefore, the excitation modulation signal in the embodiment of the present application is a high-frequency PWM (Pulse width modulation) signal containing an excitation fundamental wave component.

[0078] The resolver excitation processing circuit 20 is connected between the microprocessor 10 and the input end of the resolver 160, and is used to obtain an excitation signal after filtering and amplifying the excitation modulation signal to drive the resolver 160 to work, so that the resolver 160 outputs a resolver feedback signal of the electrical angle of the drive motor 130. The resolver feedback signal includes a sine feedback signal and a cosine feedback signal. The excitation signal is a sine wave signal.

[0079] The resolver feedback processing circuit 30 is connected between the output end of the resolver 160 and the microprocessor 10 , and is used to condition the resolver feedback signal and send the conditioned resolver feedback signal to the microprocessor 10 .

[0080] The angle sampling and diagnosis system 101 is used to simultaneously sample the resolver feedback signal conditioned by the resolver feedback processing circuit 30 in two channels, and calculate the first electrical angle and the second electrical angle respectively. The first electrical angle is used for torque control, and the second electrical angle is used for torque monitoring. The angle sampling and diagnosis system 101 is also used to perform real-time diagnosis on the two-channel sampling data and the first electrical angle and the second electrical angle, and control the motor controller 120 to enter a safe state when the diagnosis result is abnormal.

[0081] The safe state means that the drive output is turned off, and the motor controller 120 enters an active short circuit state or a bridge arm natural shutdown state. That is, the inverter circuit 120a of the motor controller 120 stops outputting electrical energy to the drive motor 130, thereby ensuring that the entire vehicle or components can enter a controllable safe state in the event of a failure in the electronic system, thereby achieving the purpose of ensuring the personal safety of the driving participants.

[0082] The diagnostic signal sampling circuit 40 is electrically connected to the resolver excitation processing circuit 20 and the resolver feedback processing circuit 30, respectively, and is used to collect the excitation signal and the resolver feedback signal processed by the resolver feedback processing circuit 30 and generate a corresponding feedback detection signal. The first diagnostic module 12 is connected to the diagnostic signal sampling circuit 40, and is used to diagnose whether the excitation processing circuit 20 and the feedback processing circuit 30 are faulty according to the feedback detection signal, and control the motor controller 120 to enter a safe state when a fault is diagnosed.

[0083] In this embodiment, the return detection signal includes a single-ended signal and a differential signal of the excitation signal. The first diagnostic module 12 detects whether the voltage range (amplitude) of the excitation modulation signal is normal according to the single-ended signal of the excitation signal, and also detects whether the frequency and duty cycle of the excitation modulation signal are normal according to the differential signal of the excitation signal, thereby diagnosing the excitation wave generation circuit. In addition, the return detection signal also includes a single-ended signal of the resolver feedback signal, and the first diagnostic module 12 also diagnoses the resolver feedback sampling circuit according to the single-ended signal of the resolver feedback signal. Among them, the excitation wave generation circuit includes a signal generation module 11 and a resolver excitation processing circuit 20. The resolver feedback sampling circuit includes a resolver feedback processing circuit 30.

[0084] The motor angle detection and diagnosis device 120b disclosed in the implementation of the present application performs two-way simultaneous sampling of the resolver feedback signal conditioned by the resolver feedback processing circuit 30, and respectively calculates the first electrical angle and the second electrical angle, and performs real-time diagnosis during the sampling and calculation process, and when the diagnosis result is abnormal, controls the motor controller 120 to enter a safe state. In addition, the motor angle detection and diagnosis device 120b also diagnoses the hardware circuit loops such as the excitation processing circuit 20 and the feedback processing circuit 30 by collecting the excitation signal and the processed resolver feedback signal, and when the diagnosis result is abnormal, controls the motor controller 120 to enter a safe state, thereby enabling the motor angle detection and diagnosis device 120b to reach the corresponding ASILC level or above, ensuring that the entire vehicle or components can enter a controllable safe state in the event of a failure in the electronic system, thereby achieving the purpose of ensuring the personal safety of the driving participants.

[0085] That is, the angle detection and diagnosis device 120b in the implementation of the present application performs sampling through two sampling channels, implements angle software decoding using software algorithms, and adds a software diagnosis mechanism on this basis, thereby achieving angle decoding above ASILC. This solution avoids the use of the security decoding chip in the prior art, thereby reducing the production cost of the corresponding product.

[0086] Specifically, the angle sampling and diagnosis system 101 includes a first sampling module 13, a second sampling module 14, a first calculation module 15, a second calculation module 16 and a second diagnosis module 17. The first sampling module 13 and the second sampling module 14 are the same.

[0087] The first sampling module 13 is used to sample the resolver feedback signal conditioned by the resolver feedback processing circuit 30 to obtain a first target signal, and the second sampling module 14 is used to sample the resolver feedback signal conditioned by the resolver feedback processing circuit 30 to obtain a second target signal. The first target signal includes a first target sine signal and a first target cosine signal; the second target signal includes a second target sine signal and a second target cosine signal.

[0088] The first calculation module 15 is used to calculate the first electrical angle according to the first target signal, and the second calculation module 16 is used to calculate the second electrical angle according to the second target signal.

[0089] The second diagnosis module 17 is used to perform fault diagnosis on the first target signal and the second target signal in real time, and is also used to perform fault diagnosis on the first electrical angle and the second electrical angle in real time.

[0090] It can be understood that in order to make the most of the existing design and increase reuse, the system of the motor controller 120 generally adopts the EGAS three-layer architecture. The main design concept of the motor controller EGAS architecture is to design the control system in layers, that is, to divide it into a basic function layer (Level 1), a function monitoring layer (Level 2) and a processor monitoring layer (Level 3). The basic function layer (Level 1) mainly implements the basic functions of the control system, which is the output of the execution torque for the motor controller 120. The function monitoring layer (Level 2) mainly implements the monitoring of Level 1, which includes component monitoring, input / output variable diagnosis, and the execution of the system's fault response function when a fault is detected. For example, the actual output value of the calculated torque is monitored to determine whether the Level 1 software is correct, etc. Once a fault is diagnosed, the system's fault response will be triggered and executed by Level 2. The processor monitoring layer (Level 3) mainly monitors whether the Level 2 processor fails in the form of questions and answers, and needs to be implemented by an independent application-specific integrated circuit ASIC or microprocessor; when a fault occurs, the system's fault response is triggered and executed independently of Level 1.

[0091] Therefore, in the embodiment of the present application, in order to make full use of the existing design and increase multiplexing, the signal generation module 11, the first sampling module 13 and the first calculation module 15 are distributed in the basic function layer. The first diagnosis module 12, the second sampling module 14, the second calculation module 16 and the second diagnosis module 17 are distributed in the function monitoring layer. Among them, the second sampling module 14 is used to monitor and diagnose the first sampling module 13, thereby improving the coverage of the diagnosis.

[0092] As a specific implementation, the second diagnostic module 17 is specifically used to compare in real time whether the first target sine signal and the second target sine signal are within a preset noise range, and is also used to compare in real time whether the first target cosine signal and the second target cosine signal are within a preset noise range. The preset noise range refers to the noise range of the ADC, for example, the lower 4-5 bits can be considered. When the comparison result exceeds the preset noise range, it is determined that the sampling channel is abnormal, and the motor controller 120 is controlled to enter a safe state. In this way, the diagnostic coverage of the sampling branch can be improved.

[0093] In some embodiments, in order to further improve the coverage of sampling branch diagnosis, the second diagnostic module 17 is also used to verify in real time whether the sum of the square value of the second target sine signal and the square value of the second target cosine signal is within a preset value range. The preset value range is between 0.65 and 1.35 (i.e., 1±35%), which is not specifically limited and can be set according to actual conditions.

[0094] It should be noted that although the sampling channels used in the two groups of comparisons are the same module, because the input signal is a dynamic variable, the full range can be covered, and the safety mechanism is sufficient, such as SIN 2 (θ)+COS 2 (θ) = 1, which can cover more than 99% of common cause failures.

[0095] In addition, in some implementations, the second diagnostic module 17 is also used to monitor whether the software program flow used to obtain the sampling value is triggered regularly, so as to further improve the diagnostic coverage of the sampling branch, thereby being sufficient to ensure that the sampling module reaches the ASILC level or above.

[0096] Similarly, in order to improve the diagnostic coverage of the calculation module, in some embodiments, the second diagnostic module 17 is also used to perform real-time comparison of the first electrical angle and the second electrical angle to determine whether the difference between the first electrical angle and the second electrical angle is within a preset range, and also diagnose the calculation process of the first electrical angle and the second electrical angle.

[0097] In addition, in some implementations, the first calculation module 15 and the second calculation module 16 may also use different algorithms to calculate the angle to improve the accuracy of angle diagnosis. Of course, in other implementations, the first calculation module 15 and the second calculation module 16 may also use the same algorithm to calculate the angle, which is not specifically limited here.

[0098] See also Figure 4 , Figure 4 FIG. 1 is a schematic diagram of the structure of a motor angle detection and diagnosis device in another embodiment of the present application. Figure 4As shown, in the embodiment of the present application, the first sampling module 13 includes a first SigmaDelta Analog to Digital Converter (SD-ADC) 13a and a first demodulation module 13b. The second sampling module 14 includes a second SD-ADC 14a and a second demodulation module 14b. The clocks of the first SD-ADC 13a and the second SD-ADC 14a are synchronized to ensure that two groups of sampling are performed simultaneously.

[0099] In this implementation, the resolver feedback processing circuit 30 is used to convert the sinusoidal feedback signal into a sinusoidal differential signal matching the SD-ADC port level, and is also used to convert the cosine feedback signal into a cosine differential signal matching the SD-ADC port level.

[0100] Specifically, the first SD-ADC 13a is used to sample the sine differential signal and the cosine differential signal to obtain a first sampled signal. The first demodulation module 13b is used to demodulate the first sampled signal to separate the excitation signal and obtain the first target signal.

[0101] The second SD-ADC 14a is used to sample the sine differential signal and the cosine differential signal to obtain a second sampled signal. The second demodulation module 14b is used to demodulate the second sampled signal to separate the excitation signal and obtain the second target signal.

[0102] It should be noted that the excitation signal of the resolver 160 itself is a high-frequency sinusoidal signal. According to the working principle of the resolver, the sine and cosine signals induced in the two stator windings contain this high-frequency signal. Although the analog signal output by the resolver is further extracted and filtered after passing through the SD-ADC to obtain a high-resolution digital signal, this digital signal still contains a carrier signal. Therefore, in order to obtain the sine and cosine target signals directly related to the angle, a demodulation module must be used to demodulate the carrier signal from the digital signal.

[0103] In order to improve the diagnostic coverage of the SD-ADC sampling and decoding branch, it is necessary to add more safety mechanisms so that the corresponding sampling reaches the ASILC level or above. Therefore, in some embodiments, before the first SD-ADC13a and the second SD-ADC14a are sampled, the second diagnostic module 17 is also used to read back the configuration registers of the first SD-ADC13a and the second SD-ADC14a at a preset period to diagnose whether the current configuration of the configuration register is the same as the initial configuration. If the current configuration of the configuration register is different from the initial configuration, it is determined that the diagnostic result is abnormal, and the motor controller 120 is controlled to enter the safe state.

[0104] See also Figure 5 , Figure 5 This is a schematic diagram of the structure of a motor angle detection and diagnosis device in another embodiment of the present application. In this embodiment, the first sampling module 13 includes a first successive approximation register analog-to-digital converter (Successive Approximation Register ADC, SAR-ADC) 13c. The second sampling module 14 includes a second SAR-ADC 14c. Among them, the SAR-ADC has high sampling accuracy, and also has the characteristics of ease of use and low power consumption, which can facilitate integration and reduce system power consumption.

[0105] In this implementation, the resolver feedback processing circuit 30 is used to convert the sinusoidal resolver feedback signal into a sinusoidal single-ended signal, and is also used to convert the cosine feedback signal into a cosine single-ended signal.

[0106] Specifically, the first SAR-ADC 13c is used to sample the sine single-ended signal and the cosine single-ended signal to obtain the first target signal. The second SAR-ADC 14c is used to sample the sine single-ended signal and the cosine single-ended signal to obtain the second target signal.

[0107] In order to improve the diagnostic coverage of the SAR-ADC sampling branch, it is necessary to add more safety mechanisms so that the corresponding sampling reaches the ASILC level or above. Therefore, in some embodiments, before the first SAR-ADC13c and the second SD-ADC14c are sampled, the second diagnostic module 17 is also used to perform a power-on test mode on the second SAR-ADC. Among them, the power-on test mode refers to injecting a preset voltage through an external port to determine whether the recovery voltage is the same as the preset voltage. If the recovery voltage is different from the preset voltage, it is determined that the diagnostic result is abnormal, and the motor controller 120 is controlled to enter a safe state.

[0108] In addition, the second diagnostic module 17 is also used to read back the configuration registers of the first SAR-ADC13c and the second SAR-ADC14c at a preset period to diagnose whether the current configuration of the configuration register is the same as the initial configuration. If the current configuration of the configuration register is different from the initial configuration, it is determined that the diagnostic result is abnormal, and the motor controller 120 is controlled to enter the safe state. In this way, the diagnostic coverage of the sampling branch can be further improved.

[0109] It should be noted that the basic converter architecture of the SAR-ADC samples the input signal once at each conversion start edge, performs bit ratio at each clock edge, and adjusts the output of the digital-to-analog converter through control logic until the output closely matches the analog input. Therefore, it requires N clock cycles from an independent external clock to achieve a single N-bit conversion in an iterative manner. Therefore, in this embodiment, in order to ensure the accuracy of sampling and diagnosis, the SAR-ADC13c and the second SAR-ADC14c need to be triggered synchronously.

[0110] In some embodiments, in order to trigger the SAR-ADC, the first motor angle detection and diagnosis device 120b also includes a shaping circuit 50. The microprocessor 10 also includes a trigger module 18. The shaping circuit 50 is connected between the resolver excitation processing circuit 20 and the trigger module 18, and is used to shape the excitation signal to obtain a square wave signal. When the trigger module 18 captures the rising edge of the square wave signal, a synchronous counter is cleared, and the counter is used to obtain a trigger signal to trigger the sampling of the SAR-ADC. After the sampling is completed, an interrupt is entered, the sampling value is obtained, and the angle calculation is performed. Among them, the trigger delay of the counter can be set to a reasonable value according to the circuit delay, avoiding the zero crossing point of the excitation signal, that is, to ensure that the sampling is performed near the peak point of the excitation fundamental signal as much as possible, thereby avoiding a relatively large calculation error caused by the divisor being close to 0, and improving the sampling accuracy.

[0111] It can be understood that in other embodiments, the shaping circuit 50 can be omitted, and the excitation signal can be sent to the diagnostic signal sampling circuit 40 , and the diagnostic signal sampling circuit 40 will shape the excitation signal and send it to the trigger module 18 .

[0112] See also Figure 6 , Figure 6 This is a flow chart of a motor angle detection and diagnosis method in an embodiment of the present application. The motor angle detection and diagnosis is applied to the aforementioned Figure 3-Figure 5 In the motor angle detection and diagnosis device 120b, the motor angle detection and diagnosis method comprises the following steps.

[0113] Step S11, generating an excitation modulation signal; wherein the excitation modulation signal is generated by comparing an excitation fundamental wave signal and a carrier signal.

[0114] In this embodiment, the excitation fundamental wave signal is a sine wave signal, which can be obtained by looking up a table. The carrier signal is a symmetrical triangular wave signal, which can be realized by a counter. Therefore, the excitation modulation signal in the embodiment of the present application is a high-frequency PWM (Pulse width modulation) signal containing an excitation fundamental wave component.

[0115] Step S12, filtering and amplifying the excitation modulation signal to obtain an excitation signal, thereby driving the resolver to work and outputting the resolver feedback signal.

[0116] The resolver feedback signal includes a sine feedback signal and a cosine feedback signal.

[0117] Step S13, conditioning the resolver feedback signal.

[0118] Step S14, sampling the conditioned resolver feedback signal in two channels simultaneously, and calculating the first electrical angle and the second electrical angle respectively, and performing real-time diagnosis on the two channels of sampled data and the first electrical angle and the second electrical angle. If the diagnosis result is normal, execute step S15; if the diagnosis result is abnormal, execute step S17.

[0119] Step S15, sampling the excitation signal and the conditioned resolver feedback signal to generate a corresponding feedback detection signal, and diagnosing the excitation wave generating circuit and the resolver feedback sampling circuit according to the feedback detection signal. If the diagnosis result is normal, execute step S16; if the diagnosis result is abnormal, execute step S17.

[0120] Step S16, outputting a first electrical angle for torque control, and outputting a second electrical angle for torque monitoring.

[0121] Step S17, controlling the motor controller to enter the safe state.

[0122] In some embodiments, in order to improve sampling accuracy and diagnostic coverage, the motor controller includes a first sampling module located at the basic function layer and a second sampling module located at the monitoring layer, and the first sampling module and the second sampling module are the same. Figure 7 As shown, in this embodiment, Figure 6 Step S14 in specifically includes the following steps.

[0123] Step S141 , sampling the resolver feedback signal conditioned by the resolver feedback processing circuit through the first sampling module and the second sampling module respectively to obtain a first target signal and a second target signal.

[0124] The first target signal includes a first target sine signal and a first target cosine signal; the second target signal includes a second target sine signal and a second target cosine signal.

[0125] Step S142: Calculate the first electrical angle and the second electrical angle according to the first target signal and the second target signal respectively.

[0126] Step S143: diagnose the first target signal and the second target signal in real time, and also diagnose the first electrical angle and the second electrical angle in real time.

[0127] See also Figure 8 , Figure 8 This is a flow chart of a motor angle detection and diagnosis method in another embodiment of the present application. The motor angle detection and diagnosis is applied to the aforementioned Figure 4 In the motor angle detection and diagnosis device 120b. In this embodiment, the motor angle detection and diagnosis method includes the following steps.

[0128] Step S201, generating an excitation modulation signal; wherein the excitation modulation signal is generated by comparing an excitation fundamental wave signal and a carrier signal.

[0129] Step S202, filtering and amplifying the excitation modulation signal to obtain an excitation signal, thereby driving the resolver to work and outputting the resolver feedback signal; the resolver feedback signal includes a sine feedback signal and a cosine feedback signal.

[0130] Step S203: convert the sinusoidal feedback signal into a sinusoidal differential signal matching the SDADC port level, and convert the cosine feedback signal into a cosine differential signal matching the SDADC port level.

[0131] Step S204, read back the configuration registers of the first SDADC and the second SDADC at a preset period to diagnose whether the current configuration of the configuration register is the same as the initial configuration. If the diagnosis result is normal, execute step S205; if the diagnosis result is abnormal, execute step S214.

[0132] In this implementation manner, if the current configuration of the configuration register is the same as the initial configuration, then the diagnosis result is determined to be normal; otherwise, then the diagnosis result is determined to be abnormal.

[0133] Step S205 : sampling the sine differential signal and the cosine differential signal through the first SDADC to obtain a first sampled signal, and sampling the sine differential signal and the cosine differential signal through the second SDADC to obtain a second sampled signal.

[0134] Step S206: demodulate the first sampling signal to separate the excitation signal to obtain the first target signal, and demodulate the second sampling signal to separate the excitation signal to obtain the second target signal. The first target signal includes a first target sine signal and a first target cosine signal; the second target signal includes a second target sine signal and a second target cosine signal.

[0135] Step S207, compare the first target sine signal and the second target sine signal in real time to see if they are within the preset noise range, and also compare the first target cosine signal and the second target cosine signal in real time to see if they are within the preset noise range. If the diagnosis result is normal, execute step S208; if the diagnosis result is abnormal, execute step S214.

[0136] In this embodiment, if the comparison result of the first target sine signal and the second target sine signal is within the preset noise range, and the comparison result of the first target cosine signal and the second target cosine signal is within the preset noise range, the diagnosis result is determined to be normal; otherwise, the diagnosis result is determined to be abnormal.

[0137] Step S208, real-time verification of whether the sum of the square value of the second target sine signal and the square value of the second target cosine signal is within a preset value range. If the diagnosis result is normal, step S209 is executed; if the diagnosis result is abnormal, step S214 is executed.

[0138] In this implementation, if the sum of the square value of the second target sine signal and the square value of the second target cosine signal is within a preset value range, the diagnosis result is determined to be normal; otherwise, the diagnosis result is determined to be abnormal.

[0139] Step S209, monitoring whether the software program flow for obtaining the sample value is triggered regularly. If the diagnosis result is normal, then executing step S210; if the diagnosis result is abnormal, then executing step S214.

[0140] In this implementation manner, if the software program flow for acquiring the sampling value is triggered regularly, the diagnosis result is determined to be normal; otherwise, the diagnosis result is determined to be abnormal.

[0141] Step S210, calculating a first electrical angle according to the first target sine signal and the first target cosine signal, and calculating a second electrical angle according to the second target sine signal and the second target cosine signal.

[0142] Step S211, compare the first electrical angle and the second electrical angle in real time to determine whether the difference between the first electrical angle and the second electrical angle is within a preset range, and diagnose the calculation process of the first electrical angle and the second electrical angle. If the diagnosis result is normal, execute step S212; if the diagnosis result is abnormal, execute step S214.

[0143] In this implementation, if the difference between the first electrical angle and the second electrical angle is within a preset range and the calculation process is normal, the diagnosis result is determined to be normal; otherwise, the diagnosis result is determined to be abnormal.

[0144] Step S212, sampling the excitation signal and the conditioned resolver feedback signal to generate a corresponding feedback detection signal, and diagnosing the excitation wave generating circuit and the resolver feedback sampling circuit according to the feedback detection signal. If the diagnosis result is normal, execute step S213; if the diagnosis result is abnormal, execute step S214.

[0145] In this implementation manner, if the corresponding excitation signal and the resolver feedback signal are detected to be within the allowable range through the feedback detection signal, the diagnosis result is determined to be normal; otherwise, the diagnosis result is determined to be abnormal.

[0146] Step S213, outputting a first electrical angle for torque control and outputting a second electrical angle for torque monitoring.

[0147] Step S214, controlling the motor controller to enter the safe state.

[0148] See also Fig. 9 , Fig. 9 This is a flow chart of a motor angle detection and diagnosis method in another embodiment of the present application. The motor angle detection and diagnosis is applied to the aforementioned Figure 5 In the motor angle detection and diagnosis device 120b. In this embodiment, the motor angle detection and diagnosis method includes the following steps.

[0149] Step S301, generating an excitation modulation signal; wherein the excitation modulation signal is generated by comparing an excitation fundamental wave signal and a carrier signal.

[0150] Step S302, filtering and amplifying the excitation modulation signal to obtain an excitation signal, thereby driving the resolver to work and output a resolver feedback signal; the resolver feedback signal includes a sine feedback signal and a cosine feedback signal.

[0151] Step S303: convert the sinusoidal resolver feedback signal into a sinusoidal single-ended signal, and convert the cosine feedback signal into a cosine single-ended signal.

[0152] Step S304, power-on test mode is performed on the second SARADC; wherein the power-on test mode refers to injecting a preset voltage through an external port to determine whether the recovered voltage is the same as the preset voltage. If the diagnosis result is normal, step 305 is executed; if the diagnosis result is abnormal, step S314 is executed.

[0153] In this embodiment, if the recovery voltage is the same as the preset voltage, the diagnosis result is determined to be normal; otherwise, the diagnosis result is determined to be abnormal.

[0154] Step S305, read back the configuration registers of the first SARADC and the second SARADC at a preset period to diagnose whether the current configuration of the configuration register is the same as the initial configuration. If the diagnosis result is normal, execute step 306; if the diagnosis result is abnormal, execute step S314.

[0155] In this implementation manner, if the current configuration of the configuration register is the same as the initial configuration, then the diagnosis result is determined to be normal; otherwise, then the diagnosis result is determined to be abnormal.

[0156] Step S306: Sample the sine single-ended signal and the cosine single-ended signal through the first SAR ADC to obtain the first target signal, and sample the sine single-ended signal and the cosine single-ended signal through the second SAR ADC to obtain the second target signal.

[0157] Step S307, compare the first target sine signal and the second target sine signal in real time to see if they are within the preset noise range, and also compare the first target cosine signal and the second target cosine signal in real time to see if they are within the preset noise range. If the diagnosis result is normal, execute step 308; if the diagnosis result is abnormal, execute step S314.

[0158] This step is similar to step S207 and will not be described again here.

[0159] Step S308, real-time verification of whether the sum of the square value of the second target sine signal and the square value of the second target cosine signal is within a preset value range. If the diagnosis result is normal, step S309 is executed; if the diagnosis result is abnormal, step S314 is executed.

[0160] This step is similar to step S208 and will not be described again here.

[0161] Step S309, monitoring whether the software program flow for obtaining the sample value is triggered regularly. If the diagnosis result is normal, then executing step S310; if the diagnosis result is abnormal, then executing step S314.

[0162] This step is similar to step S309 and will not be described again here.

[0163] Step S310, calculating a first electrical angle according to the first target sine signal and the first target cosine signal, and calculating a second electrical angle according to the second target sine signal and the second target cosine signal.

[0164] Step S311, compare the first electrical angle and the second electrical angle in real time to determine whether the difference between the first electrical angle and the second electrical angle is within a preset range, and diagnose the calculation process of the first electrical angle and the second electrical angle. If the diagnosis result is normal, execute step S312; if the diagnosis result is abnormal, execute step S314.

[0165] This step is similar to step S211 and will not be described again here.

[0166] Step S312, sampling the excitation signal and the conditioned resolver feedback signal to generate a corresponding feedback detection signal, and diagnosing the excitation wave generating circuit and the resolver feedback sampling circuit according to the feedback detection signal. If the diagnosis result is normal, execute step S313; if the diagnosis result is abnormal, execute step S314.

[0167] This step is similar to step S212 and will not be described again here.

[0168] Step S313, outputting a first electrical angle for torque control, and outputting a second electrical angle for torque monitoring.

[0169] Step S314, controlling the motor controller to enter the safe state.

[0170] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes in the implementation of each method described above can refer to the corresponding processes of each module in the aforementioned device embodiment, and will not be repeated here.

[0171] It should be noted that, for the sake of simplicity of description, the aforementioned method embodiments are all expressed as a series of action combinations, but those skilled in the art should know that the present application is not limited by the described order of actions, because according to the present application, some steps can be performed in other orders or simultaneously.

[0172] The steps in the method of the embodiment of the present application can be adjusted in order, combined and deleted according to actual needs.

[0173] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in this application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integration. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk), etc.

[0174] In short, the above description is only an embodiment of the technical solution of the present invention, and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made according to the disclosure of the present invention shall be included in the protection scope of the present invention.

Claims

1. A motor angle detection and diagnosis device, characterized in that: The motor angle detection and diagnostic device is connected to the drive motor via a rotary transformer, and the rotary transformer is used to output a sine feedback signal and a cosine feedback signal of the drive motor electrical angle. The motor angle detection and diagnostic device includes a rotary transformer feedback processing circuit and an angle sampling and diagnostic system. The angle sampling and diagnostic system includes a first sampling module, a second sampling module, a first calculation module, a second calculation module, and a second diagnostic module, wherein: The resolver feedback processing circuit is connected to the resolver, and is used to convert the sinusoidal feedback signal into a sinusoidal single-ended signal. The resolver feedback processing circuit is also used to convert the cosine feedback signal into a cosine single-ended signal. The first sampling module is located at the basic function layer, and the first sampling module includes a first successive approximation register analog-to-digital converter SAR-ADC, and the first SAR-ADC is used to sample the sine single-ended signal and the cosine single-ended signal to obtain a first target signal; The second sampling module is located at the monitoring layer, the second sampling module is the same as the first sampling module, and the second sampling module includes a second SAR-ADC, and the second SAR-ADC is used to sample the sine single-ended signal and the cosine single-ended signal to obtain a second target signal; The first calculation module and the second calculation module are used to calculate a first electrical angle and a second electrical angle according to the first target signal and the second target signal, respectively, the first electrical angle is used for torque control, and the second electrical angle is used for torque monitoring; The second diagnostic module is used to diagnose the first target signal, the second target signal, the first electrical angle and the second electrical angle in real time. If the second diagnostic module diagnoses an abnormality, the controller of the drive motor enters a safe state.

2. The motor angle detection and diagnosis device according to claim 1, wherein: The second diagnostic module is further configured to perform a power-on test mode on the second SAR-ADC. The power-on test mode involves injecting a preset voltage through an external port to determine whether the recovered voltage is the same as the preset voltage.

3. The motor angle detection and diagnosis device according to claim 2, characterized in that: The second diagnostic module is further configured to read back the configuration registers of the first SAR-ADC and the second SAR-ADC at a preset period, and the second diagnostic module diagnoses whether the current configuration of the configuration register is the same as the initial configuration.

4. The motor angle detection and diagnosis device according to claim 3, characterized in that: The motor angle detection and diagnosis device further includes a signal generating module, a resolver excitation processing circuit, a diagnostic signal sampling circuit and a first diagnostic module, wherein: The signal generating module is used to generate an excitation modulation signal, wherein the excitation modulation signal is generated by comparing an excitation fundamental wave signal and a carrier signal; The resolver excitation processing circuit is connected between the signal generating module and the resolver, and is used to filter and amplify the excitation modulation signal to obtain an excitation signal, and the excitation signal drives the resolver to output the sine feedback signal and the cosine feedback signal; The diagnostic signal sampling circuit is connected to the resolver excitation processing circuit and the resolver feedback processing circuit respectively, and is used to collect the excitation signal, the sine feedback signal and the cosine feedback signal, and generate a corresponding feedback detection signal; The first diagnostic module is electrically connected to the diagnostic signal sampling circuit. The first diagnostic module is used to diagnose the excitation wave generation circuit and the resolver feedback sampling circuit according to the feedback detection signal. When the first diagnostic module diagnoses a fault, the controller of the drive motor enters the safe state.

5. The motor angle detection and diagnosis device according to claim 4, characterized in that: The first target signal includes a first target sine signal and a first target cosine signal, the second target signal includes a second target sine signal and a second target cosine signal, the second diagnostic module is used to compare in real time whether the first target sine signal and the second target sine signal are within a preset noise range, and the second diagnostic module is also used to compare in real time whether the first target cosine signal and the second target cosine signal are within a preset noise range.

6. The motor angle detection and diagnosis device according to claim 5, characterized in that: The second diagnostic module is further used to verify in real time whether the sum of the square value of the second target sine signal and the square value of the second target cosine signal is within a preset value range.

7. The motor angle detection and diagnosis device according to claim 6, characterized in that: The second diagnosis module is further used to monitor whether the software program flow for obtaining the sampling value is triggered regularly.

8. The motor angle detection and diagnosis device according to claim 7, characterized in that: The second diagnostic module is used to perform real-time comparison of the first electrical angle and the second electrical angle. The second diagnostic module determines whether the difference between the first electrical angle and the second electrical angle is within a preset range. The second diagnostic module also diagnoses the calculation process of the first electrical angle and the second electrical angle.

9. The motor angle detection and diagnosis device according to any one of claims 4 to 8, characterized in that: The feedback detection signal includes the single-ended signal and the differential signal of the excitation signal, as well as the single-ended signal of the sine feedback signal and the single-ended signal of the cosine feedback signal. The first diagnostic module is used to detect the voltage range of the excitation modulation signal according to the single-ended signal of the excitation signal. The first diagnostic module is also used to detect the frequency and duty cycle of the excitation modulation signal according to the differential signal of the excitation signal. The first diagnostic module diagnoses the excitation wave generation circuit. The first diagnostic module is also used to diagnose the resolver feedback sampling circuit according to the single-ended signal of the sine feedback signal and the single-ended signal of the cosine feedback signal.

10. A motor controller, characterized in that: The motor controller includes an inverter circuit and the motor angle detection and diagnostic device according to claim 9, the input end of the inverter circuit is connected to the power battery, and the output end of the inverter circuit is connected to the drive motor. The inverter circuit is used to convert the high-voltage direct current output by the power battery into alternating current to power the drive motor. The motor angle detection and diagnostic device is connected to the drive motor through a rotating transformer.

11. An electric vehicle, characterized in that: The electric vehicle includes the motor controller according to claim 10 .

12. A motor angle detection and diagnosis method, applied to a motor angle detection and diagnosis device, capable of achieving a functional safety target ASILC or higher for drive motor angle sampling. The motor angle detection and diagnosis device is connected to the drive motor via a rotary transformer, the rotary transformer being configured to output a sine feedback signal and a cosine feedback signal of the drive motor angle. The motor angle detection and diagnosis method comprises: Converting the sinusoidal feedback signal into a sinusoidal single-ended signal, and converting the cosine feedback signal into a cosine single-ended signal; The motor angle detection and diagnosis device includes a first successive approximation register analog-to-digital converter SAR-ADC, the first SAR-ADC is used to sample the sine single-ended signal and the cosine single-ended signal to obtain a first target signal; The motor angle detection and diagnosis device includes a second SAR-ADC, which is used to sample the sine single-ended signal and the cosine single-ended signal to obtain a second target signal; Calculating a first electrical angle and a second electrical angle according to the first target signal and the second target signal, wherein the first electrical angle is used for torque control and the second electrical angle is used for torque monitoring; The first target signal, the second target signal, the first electrical angle, and the second electrical angle are diagnosed in real time, and if an abnormality is diagnosed, the controller of the drive motor enters a safe state.

13. The motor angle detection and diagnosis method according to claim 12, wherein: The motor angle detection and diagnosis method further includes: The second SAR-ADC performs a power-on test mode, where a preset voltage is injected through an external port to determine whether the recovered voltage is the same as the preset voltage.

14. The motor angle detection and diagnosis method according to claim 13, wherein: The motor angle detection and diagnosis method further includes: The configuration registers of the first SAR-ADC and the second SAR-ADC are read back within a preset period to diagnose whether the current configuration of the configuration registers is the same as the initial configuration.

15. The motor angle detection and diagnosis method according to claim 14, wherein: The motor angle detection and diagnosis method further includes: generating an excitation modulation signal, wherein the excitation modulation signal is generated by comparing an excitation fundamental wave signal and a carrier signal; Filtering and amplifying the excitation modulation signal to obtain an excitation signal, wherein the excitation signal drives the rotary transformer to output the sine feedback signal and the cosine feedback signal; Collecting the excitation signal, the sine feedback signal and the cosine feedback signal to generate corresponding feedback detection signals; The excitation wave generating circuit and the resolver feedback sampling circuit are diagnosed according to the feedback detection signal, and a fault is diagnosed, and the controller of the drive motor enters the safe state.

16. The motor angle detection and diagnosis method according to claim 15, wherein: The first target signal includes a first target sine signal and a first target cosine signal, and the second target signal includes a second target sine signal and a second target cosine signal. The first target sine signal and the second target sine signal are compared in real time to see whether they are within a preset noise range, and the first target cosine signal and the second target cosine signal are compared in real time to see whether they are within a preset noise range.

17. The motor angle detection and diagnosis method according to claim 16, wherein: Check in real time whether the sum of the square value of the second target sine signal and the square value of the second target cosine signal is within a preset value range.

18. The motor angle detection and diagnosis method according to claim 17, wherein: Monitor whether the software program flow used to obtain sample values ​​is triggered regularly.

19. The motor angle detection and diagnosis method according to claim 18, wherein: The first electrical angle and the second electrical angle are compared in real time to determine whether the difference between the first electrical angle and the second electrical angle is within a preset range, and the calculation process of the first electrical angle and the second electrical angle is diagnosed.

20. The motor angle detection and diagnosis method according to any one of claims 15 to 19, wherein: The feedback detection signal includes the single-ended signal and differential signal of the excitation signal, the single-ended signal of the sine feedback signal, and the single-ended signal of the cosine feedback signal. The voltage range of the excitation modulation signal is detected according to the single-ended signal of the excitation signal, and the frequency and duty cycle of the excitation modulation signal are detected according to the differential signal of the excitation signal. The excitation wave generating circuit is diagnosed, and the resolver feedback sampling circuit is diagnosed according to the single-ended signal of the sine feedback signal and the single-ended signal of the cosine feedback signal.