A self-learning method and device for resolvers based on automotive functional safety
By collecting the frequencies of the sine and cosine signals of the resolver, calculating the error, adjusting the sampling period, and determining the calibration value, the problems of large calculation errors and high resource consumption of the resolver rotation angle are solved, and efficient and accurate resolver angle calculation is achieved.
Patent Information
- Application Number
- CN202310574654.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-18
- Publication Date
- 2026-11-17
- Estimated Expiration
- 2043-05-18
AI Technical Summary
In the existing technology, the calculation of the rotation angle of the resolver motor has the problems of large error and high system resource consumption. In particular, the calculation error and resource consumption caused by hardware differences affect the software working efficiency.
By acquiring the frequency values of sine and cosine signals based on the preset excitation signal frequency of the target resolver motor, calculating the frequency error, adjusting the actual sampling period, determining the calibration value, and using the calibration value to calculate the rotation angle of the resolver motor, the system resource consumption is reduced.
It improves the accuracy of resolver rotation angle calculation, reduces system resource consumption, avoids errors caused by hardware differences, and ensures efficient calculation under functional safety conditions.
Smart Images

Figure CN116800158B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of vehicle safety and motor control technology, specifically relating to a resolver self-learning method and device based on automotive functional safety. Background Technology
[0002] ISO 26262 – Functional Safety of Road Vehicles – The functional safety concept requires fault detection and failure mitigation measures, safe state transitions, and fault tolerance mechanisms. When a failure of the motor resolver hardware decoding is detected, a safe state transition is performed to keep the system in a safe state. At this point, it is necessary to switch to another solution to complete the motor resolver decoding.
[0003] Traditional software decoding uses AD acquisition to collect the outer envelope of SIN and COS (sine and cosine waveforms) at certain intervals to calculate the angle value. This method can lead to increasingly larger calculation errors due to hardware differences, or it can consume a lot of system resources, affecting the efficiency of the software. Summary of the Invention
[0004] To improve the accuracy of resolver rotation angle calculation and reduce computational resource consumption, a first aspect of this invention provides a resolver self-learning method based on automotive functional safety, comprising: acquiring the frequency values of a sine and cosine signal of the target resolver based on the frequency of a preset excitation signal of the target resolver; calculating the frequency error between the preset excitation signal and the sine and cosine signals respectively, and determining the actual sampling period of the sine and cosine signals based on the frequency error; determining a calibration value of the preset excitation signal based on the actual sampling period; and calculating the rotation angle of the target resolver based on the calibration value and the real-time frequency values of the sine and cosine signals of the target resolver.
[0005] In some embodiments of the present invention, the step of calculating the error between the preset excitation signal and the sine signal and the cosine signal respectively, and determining the actual sampling period of the sine signal and the cosine signal based on the error includes: calculating the error between the preset excitation signal and the sine signal and the cosine signal respectively; adjusting the actual sampling period of the sine signal and the cosine signal based on the error, and sampling according to the adjusted actual sampling period until the sine signal sampling value or the cosine signal sampling value reaches the maximum value.
[0006] Furthermore, determining the calibration value of the preset excitation signal based on the actual sampling period includes: collecting the frequency value of the sine or cosine signal of the target resolver motor within a preset time until the maximum value tends to stabilize, thereby obtaining the calibration value of the preset excitation signal.
[0007] In some embodiments of the present invention, calculating the rotation angle of the target resolver motor based on the calibration value and the real-time frequency values of the sine and cosine signals of the target resolver motor includes: determining whether the real-time frequency of the sine and cosine signals of the target resolver motor is consistent with the calibration value; calculating the envelope of the sine and cosine signals of the target resolver motor based on the consistent calibration value; and calculating the rotation angle of the target resolver motor based on the envelope of the sine and cosine signals.
[0008] Furthermore, the calculation of the rotation angle of the target resolver motor based on the envelope of the sine and cosine signals includes: determining the sine period and cosine period of the rotation of the target resolver motor based on the envelope of the sine and cosine signals; and calculating the rotation angle of the target resolver motor based on the sine and cosine periods of the rotation of the target resolver motor.
[0009] In the above embodiments, the step of collecting the frequency values of the sine and cosine signals of the target resolver motor based on the frequency of the preset excitation signal of the target resolver motor includes: using the frequency of the preset excitation signal of the target resolver motor as the sampling frequency; and collecting the frequency values of the sine and cosine signals of the target resolver motor within a preset time based on the sampling frequency.
[0010] A second aspect of the present invention provides a resolver self-learning device based on automotive functional safety, comprising: a data acquisition module for acquiring frequency values of a sine signal and a cosine signal of a target resolver motor based on the frequency of a preset excitation signal of the target resolver motor; a determination module for calculating the frequency error between the preset excitation signal and the sine signal and the cosine signal, respectively, and determining the actual sampling period of the sine signal and the cosine signal based on the frequency error; and a calculation module for determining a calibration value of the preset excitation signal based on the actual sampling period; and calculating the rotation angle of the target resolver motor based on the calibration value and the real-time frequency values of the sine signal and the cosine signal of the target resolver motor.
[0011] Furthermore, the calculation module includes: a calculation unit, used to calculate the error between the preset excitation signal and the sine signal and the cosine signal respectively; and an adjustment unit, used to adjust the actual sampling period of the sine signal and the cosine signal based on the error, and to sample according to the adjusted actual sampling period until the sampled value of the sine signal or the cosine signal reaches the maximum value.
[0012] A third aspect of the present invention provides an electronic device comprising: one or more processors; and a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the self-learning method for automotive functional safety based on the first aspect of the present invention.
[0013] In a fourth aspect, the present invention provides a computer-readable medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the resolver self-learning method based on automotive functional safety provided in the first aspect of the present invention.
[0014] The beneficial effects of this invention are:
[0015] This invention relates to a resolver self-learning method and apparatus based on automotive functional safety. The method includes: acquiring the frequency values of a sine and cosine signal of the target resolver motor based on the frequency of a preset excitation signal of the target resolver motor; calculating the frequency error between the preset excitation signal and the sine and cosine signals respectively, and determining the actual sampling period of the sine and cosine signals based on the frequency error; determining the calibration value of the preset excitation signal based on the actual sampling period; and calculating the rotation angle of the target resolver motor based on the calibration value and the real-time frequency values of the sine and cosine signals of the target resolver motor. It can be seen that the resolver self-learning method provided by this invention is based on AD acquisition. Through a certain period of self-learning, the acquired calibration value is stored in an internal storage area. After entering normal operation, the calibration value is retrieved for angle acquisition and calculation. This method can avoid hardware difference errors and use fewer system resources. Attached Figure Description
[0016] Figure 1 This is a schematic diagram of the basic process of the resolver self-learning method based on automotive functional safety in some embodiments of the present invention.
[0017] Figure 2 This is a waveform diagram of the excitation signal, sine signal, cosine signal, and corresponding envelope in some embodiments of the present invention;
[0018] Figure 3 This is a schematic diagram illustrating the sampling principle of the resolver self-learning method based on automotive functional safety in some embodiments of the present invention;
[0019] Figure 4 This is a schematic diagram of the structure of a resolver self-learning device based on automotive functional safety in some embodiments of the present invention;
[0020] Figure 5 This is a schematic diagram of the structure of an electronic device in some embodiments of the present invention. Detailed Implementation
[0021] The principles and features of the present invention are described below with reference to the accompanying drawings. The examples given are only for explaining the present invention and are not intended to limit the scope of the present invention.
[0022] refer to Figures 1 to 4In a first aspect of the present invention, a resolver self-learning method based on automotive functional safety is provided, comprising: S100. acquiring the frequency values of a sine signal and a cosine signal of a target resolver motor based on the frequency of a preset excitation signal of the target resolver motor; S200. calculating the frequency errors between the preset excitation signal and the sine signal and the cosine signal, respectively, and determining the actual sampling period of the sine signal and the cosine signal based on the frequency errors; S300. determining the calibration value of the preset excitation signal based on the actual sampling period; and calculating the rotation angle of the target resolver motor based on the calibration value and the real-time frequency values of the sine signal and the cosine signal of the target resolver motor.
[0023] It should be noted that the excitation signal of the resolver motor is consistent with the sine and cosine cycles of the motor rotation. The sine and cosine signals are usually the current or voltage values on the secondary side of the resolver motor. Therefore, the angle needs to be calculated by acquiring the sine or cosine values through periodic AD converters in the circuit. However, due to hardware differences, the period of the excitation signal can only be estimated to be a rough range.
[0024] In view of this, in step S100 of the embodiments of this disclosure, the step of collecting the frequency values of the sine and cosine signals of the target resolver motor based on the frequency of the preset excitation signal of the target resolver motor includes: using the frequency of the preset excitation signal of the target resolver motor as the sampling frequency; and collecting the frequency values of the sine and cosine signals of the target resolver motor within a preset time based on the sampling frequency.
[0025] Specifically, assuming the preset excitation signal is set to 20kHz, the actual frequency output of the sine and cosine signals of the resolver motor sampled is 19.36Hz. If a period of 20kHz is used to collect the sine and cosine signals of the resolver motor, the error will become increasingly larger.
[0026] In step S200 of some embodiments of the present invention, the step of calculating the error between the preset excitation signal and the sine signal and the cosine signal respectively, and determining the actual sampling period of the sine signal and the cosine signal based on the error includes:
[0027] S201. Calculate the error between the preset excitation signal and the sine and cosine signals respectively; S202. Based on the error, adjust the actual sampling period of the sine and cosine signals, and sample according to the adjusted actual sampling period until the sine signal sampling value or the cosine signal sampling value reaches the maximum value.
[0028] Specifically, upon power-up, the system first enters a self-learning state, initially acquiring AD values according to a set excitation signal cycle, for example, at a frequency of 20kHz. Then, the cycle value is finely adjusted, for example, changing it to 19.9kHz. If the acquired AD value is lower than the previous one, the frequency value is increased, for example, to 20.1kHz. This continues until the maximum AD value is acquired, which represents the peak values of SIN and COS.
[0029] Furthermore, in step S300 of some embodiments of the present invention, determining the calibration value of the preset excitation signal based on the actual sampling period includes: S301. Acquiring the frequency values of the sine or cosine signal of the target resolver motor within a preset time until the maximum value tends to stabilize, thereby obtaining the calibration value of the preset excitation signal. That is, after the maximum AD value acquired has been stable for a period of time, the actual period value of the current excitation signal can be determined, and this value is written into the storage module as the calibration value.
[0030] refer to Figure 3 In step S300 of some embodiments of the present invention, calculating the rotation angle of the target resolver motor based on the calibration value and the real-time frequency values of the sine and cosine signals of the target resolver motor includes: S302. Determining whether the real-time frequency of the sine and cosine signals of the target resolver motor is consistent with the calibration value; S303. Calculating the envelope of the sine and cosine signals of the target resolver motor based on the consistent calibration value; S304. Calculating the rotation angle of the target resolver motor based on the envelope of the sine and cosine signals. Figure 3 In the diagram, Uref, U1, and U2 represent the voltage values of the preset excitation signal, sine signal, and cosine signal, respectively. The minimum overlap period of the preset excitation signal is determined by comparing the waveforms of the sine and cosine signals and their envelopes.
[0031] Specifically, after the calibration values are collected and stored, the system can switch to normal operation mode. By following the calibration cycle, it can be ensured that the cycle of each collection is consistent with the actual SIN and COS cycles, and the envelope can be calculated to determine the actual motor operating angle.
[0032] Further, in step S304, calculating the rotation angle of the target resolver motor based on the envelope of the sine and cosine signals includes: S3041. Determining the sine period and cosine period of the target resolver motor's rotation based on the envelope of the sine and cosine signals; S3042. Calculating the rotation angle of the target resolver motor based on the sine and cosine periods of the target resolver motor's rotation.
[0033] Example 2
[0034] refer to Figure 4A second aspect of the present invention provides a resolver self-learning device 1 based on automotive functional safety, comprising: a data acquisition module 11, configured to acquire frequency values of a sine signal and a cosine signal of a target resolver motor based on the frequency of a preset excitation signal of the target resolver motor; a determination module 12, configured to calculate the frequency error between the preset excitation signal and the sine signal and the cosine signal respectively, and determine the actual sampling period of the sine signal and the cosine signal based on the frequency error; and a calculation module 13, configured to determine a calibration value of the preset excitation signal based on the actual sampling period; and calculate the rotation angle of the target resolver motor based on the calibration value and the real-time frequency values of the sine signal and the cosine signal of the target resolver motor.
[0035] Furthermore, the calculation module 13 includes: a calculation unit, used to calculate the error between the preset excitation signal and the sine signal and the cosine signal respectively; and an adjustment unit, used to adjust the actual sampling period of the sine signal and the cosine signal based on the error, and to sample according to the adjusted actual sampling period until the sampled value of the sine signal or the cosine signal reaches the maximum value.
[0036] Example 3
[0037] refer to Figure 5 A third aspect of the present invention provides an electronic device comprising: one or more processors; and a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the self-learning method for automotive functional safety based on the first aspect of the present invention.
[0038] Electronic device 500 may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 502 or a program loaded from storage device 508 into random access memory (RAM) 503. The RAM 503 also stores various programs and data required for the operation of electronic device 500. The processing unit 501, ROM 502, and RAM 503 are interconnected via bus 504. An input / output (I / O) interface 505 is also connected to bus 504.
[0039] Typically, the following devices can be connected to I / O interface 505: input devices 506 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 507 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 508 including, for example, hard disks; and communication devices 509. Communication device 509 allows electronic device 500 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 5An electronic device 500 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively. Figure 5 Each box shown can represent a device or multiple devices as needed.
[0040] Specifically, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 509, or installed from a storage device 508, or installed from a ROM 502. When the computer program is executed by a processing device 501, it performs the functions defined in the methods of embodiments of this disclosure. It should be noted that the computer-readable medium described in embodiments of this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In embodiments of this disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In embodiments of this disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. Program code contained on a computer-readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0041] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device. The aforementioned computer-readable medium carries one or more computer programs, which, when executed by the electronic device, cause the electronic device to:
[0042] Computer program code for performing the operations of embodiments of this disclosure can be written in one or more programming languages or a combination thereof. Programming languages include object-oriented programming languages—such as Java, Smalltalk, C++, and Python—and conventional procedural programming languages—such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0043] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0044] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A self-learning method for resolvers based on automotive functional safety, characterized in that, include: Based on the frequency of the preset excitation signal of the target resolver, the frequency values of the sine and cosine signals of the target resolver are collected. Calculate the frequency errors between the preset excitation signal and the sine and cosine signals respectively, and determine the actual sampling period of the sine and cosine signals based on the frequency errors; The step of calculating the frequency errors between the preset excitation signal and the sine and cosine signals respectively, and determining the actual sampling period of the sine and cosine signals based on the frequency errors, includes: Calculate the frequency errors between the preset excitation signal and the sinusoidal and cosine signals respectively; Based on the frequency error, the actual sampling period of the sine and cosine signals is adjusted, and sampling is performed according to the adjusted actual sampling period until the sine signal sampling value or the cosine signal sampling value reaches its maximum value. The calibration value of the preset excitation signal is determined based on the actual sampling period; The determination of the calibration value of the preset excitation signal based on the actual sampling period includes: The frequency values of the sine or cosine signals of the target resolver are collected within a preset time until the maximum value tends to stabilize, and the calibration value of the preset excitation signal is obtained. The rotation angle of the target resolver is calculated based on the calibration value and the real-time frequency values of the sine and cosine signals of the target resolver.
2. The method for self-learning of a rotary transformer based on automotive functional safety according to claim 1, characterized in that, The calculation of the rotation angle of the target resolver motor based on the calibration value and the real-time frequency values of the sine and cosine signals of the target resolver motor includes: Determine whether the real-time frequency of the sine signal and the real-time frequency of the cosine signal of the target resolver motor are consistent with the calibration values; Based on the consistent calibration values, calculate the envelopes of the sine and cosine signals of the target resolver motor; The rotation angle of the target resolver motor is calculated based on the envelopes of the sine and cosine signals.
3. The method for self-learning of a rotary transformer based on automotive functional safety according to claim 2, characterized in that, The calculation of the rotation angle of the target resolver motor based on the envelope of the sine and cosine signals includes: Based on the envelopes of the sinusoidal and cosine signals, the sinusoidal and cosine periods of the rotation of the target resolver motor are determined. The rotation angle of the target resolver is calculated based on the sine and cosine periods of its rotation.
4. The automotive function safety based rotary variator self-learning method according to any one of claims 1 to 3, characterized in that, The frequency values of the sine and cosine signals of the target resolver motor, based on the frequency of the preset excitation signal of the target resolver motor, include: The frequency of the preset excitation signal of the target resolver motor is used as the sampling frequency; Based on the sampling frequency, the frequency values of the sine and cosine signals of the target resolver motor are collected within a preset time.
5. A car function safety based rotary transformer self-learning device applying the method according to any one of claims 1-4, characterized in that, include: The acquisition module is used to acquire the frequency values of the sine and cosine signals of the target resolver motor based on the frequency of the preset excitation signal of the target resolver motor. The determination module is used to calculate the frequency error between the preset excitation signal and the sine and cosine signals respectively, and determine the actual sampling period of the sine and cosine signals based on the frequency error; The calculation module is used to determine the calibration value of the preset excitation signal based on the actual sampling period; The rotation angle of the target resolver is calculated based on the calibration value and the real-time frequency values of the sine and cosine signals of the target resolver.
6. The automotive function safety based rotary transformer self-learning device according to claim 5, characterized in that, The computing module includes: The calculation unit is used to calculate the frequency error between the preset excitation signal and the sine and cosine signals, respectively. The adjustment unit is used to adjust the actual sampling period of the sine and cosine signals based on the frequency error, and to sample according to the adjusted actual sampling period until the sampled value of the sine or cosine signal reaches the maximum value.
7. An electronic device, comprising: One or more processors; A storage device for storing one or more programs, which, when executed by one or more processors, cause the one or more processors to implement the self-learning method for automotive functional safety as described in any one of claims 1 to 4.
8. A computer readable medium having stored thereon a computer program, wherein, When the computer program is executed by the processor, it implements the self-learning method for rotating components based on automotive functional safety as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Square wave excitation signal-based shaft angle conversion device and method of rotation transformer
CN107659224A
Motor position detection method and motor control method
CN109639191A
