Rotor position angle calibration method, device, chip and electronic device
Through the combination of hardware calculator and phase-locked loop, rapid iteration of rotor position angle and high-precision output of the rotor position angle of the rotor of the transformer are achieved, solving the problem of software calculations occupying CPU resources and inaccurate angles, and improving system performance and flexibility.
Patent Information
- Application Number
- CN202411579592.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-06
- Publication Date
- 2025-01-17
- Estimated Expiration
- 2044-11-06
AI Technical Summary
Existing rotary transformers use software to calculate the rotor position angle to take up a large amount of CPU resources, and inaccurate calculations lead to system performance being affected.
The trigonometric function hardware calculator and digital phase-locking loop are used to implement the tangent method and the angle observer method to calculate the rotor position angle by matching the two results, and the accurate angle is determined to generate alarm data to avoid inaccurate angles affecting the system.
It reduces CPU resource usage, improves system performance, and realizes fast iteration and high-precision rotor position angle output through hardware calculations, with high flexibility and avoids long-term use of inaccurate angles to affect system functions.
Smart Images

Figure CN119123952B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of chips, and in particular to a rotor position angle calibration method, device, chip and electronic equipment. Background Art
[0002] The sine-cosine resolver is an electromagnetic sensor widely used to measure angles and speeds. It is a precision angle, position, and speed detection device that is suitable for all occasions where rotary encoders are used, especially in high temperature, severe cold, humidity, high speed, high vibration, and other occasions where rotary encoders cannot work properly. Due to the above characteristics of the resolver, the resolver can completely replace the photoelectric rotary encoder and is widely used in angle detection systems in various fields.
[0003] The structure and working principle of the resolver are based on the general design of the resolver, that is, the degree of electromagnetic coupling between the stator and the rotor changes with the rotor position angle (i.e., the angle corresponding to the rotor position). The rotor rotation angle is converted into a voltage signal using the characteristics of the sine and cosine functions. The relationship between the voltage signal and the rotor position angle can be calculated by sine or cosine function conversion, which enables the output signal to directly reflect the rotor rotation angle.
[0004] After the analog-to-digital conversion of the existing resolver, the demodulation process of the output digital signal is completed by software, and the software calculates the rotor position angle based on a certain method, such as the tangent method, the angle observer method, etc. However, calculating the rotor position angle by software requires a large amount of CPU resources, and any method for calculating the rotor position angle cannot confirm the accuracy of the calculation. The wrong rotor position angle will cause the related functions to fail to work properly, affecting the system performance. Summary of the invention
[0005] In view of this, the embodiments of the present application propose a rotor position angle verification method, device, chip and electronic device to solve the following problems in the prior art: calculating the rotor position angle by software requires a large amount of CPU resources, and any method of calculating the rotor position angle cannot confirm the accuracy of the calculation. An incorrect rotor position angle will cause related functions to fail to work properly, affecting system performance.
[0006] On the one hand, an embodiment of the present application proposes a method for verifying a rotor position angle, wherein the verification method calculates the rotor position angle of a rotary transformer through a trigonometric function hardware calculator and a digital phase-locked loop set by hardware, wherein the trigonometric function hardware calculator is used to implement the tangent method to calculate the rotor position angle, and the digital phase-locked loop is used to implement the angle observer method to calculate the rotor position angle; the verification method includes: determining a first rotor position angle of first sine-cosine waveform data through the trigonometric function hardware calculator, wherein the first sine-cosine waveform data includes first sine waveform data and first cosine waveform data; determining a second rotor position angle of second sine-cosine waveform data through the digital phase-locked loop, wherein the second sine-cosine waveform data is the same data as the first sine-cosine waveform data; detecting whether the second rotor position angle matches the first rotor position angle according to a predetermined delay time; when the second rotor position angle does not match the first rotor position angle, determining that the rotor position angle output according to the predetermined output requirement is an inaccurate rotor position angle, and generating alarm data, wherein the rotor position angle output according to the predetermined output requirement is the first rotor position angle or the second rotor position angle.
[0007] In some embodiments, the method also includes: detecting whether the digital phase-locked loop is in an unlocked state; when the digital phase-locked loop is in the unlocked state, obtaining the first rotor position angle; determining a new second rotor position angle based on the first rotor position angle and the predetermined delay time, so as to re-lock the digital phase-locked loop according to the new second rotor position angle.
[0008] In some embodiments, the method further comprises: adjusting output of the first rotor position angle or the second rotor position angle according to a change in the predetermined output requirement.
[0009] In some embodiments, adjusting the output of the first rotor position angle or the second rotor position angle according to the change of the predetermined output requirement includes: outputting the second rotor position angle when the acceleration or deceleration of the rotor of the rotary transformer is less than a predetermined speed; outputting the first rotor position angle when the acceleration or deceleration of the rotor of the rotary transformer is greater than the predetermined speed.
[0010] In some embodiments, after detecting whether the second rotor position angle matches the first rotor position angle according to a predetermined delay time, it also includes: when the second rotor position angle matches the first rotor position angle, determining that the rotor position angle output according to the predetermined output requirement is an accurate rotor position angle.
[0011] In some embodiments, before determining the first rotor position angle of the first sine-cosine waveform data by the trigonometric function hardware calculator, it also includes: copying the sine-cosine waveform data of the rotary transformer output by the demodulator to obtain the first sine-cosine waveform data and the second sine-cosine waveform data.
[0012] In some embodiments, the predetermined delay time is determined according to parameters of the rotor and analog sampling system parameters input to the demodulator.
[0013] On the other hand, an embodiment of the present application proposes a rotor position angle verification device, wherein the verification device calculates the rotor position angle of the rotary transformer through a trigonometric function hardware calculator and a digital phase-locked loop set by hardware, wherein the trigonometric function hardware calculator is used to implement the tangent method to calculate the rotor position angle, and the digital phase-locked loop is used to implement the angle observer method to calculate the rotor position angle; the verification device includes: a first determination module, used to determine the first rotor position angle of the first sine-cosine waveform data through the trigonometric function hardware calculator, wherein the first sine-cosine waveform data includes first sine waveform data and first cosine waveform data; a second determination module, used to determine the second rotor position angle of the second sine-cosine waveform data through the digital phase-locked loop, wherein the second sine-cosine waveform data and the first sine-cosine waveform data are the same data; a matching module, used to detect whether the second rotor position angle matches the first rotor position angle according to a predetermined delay time; a third determination module, used to determine that the rotor position angle output according to the predetermined output requirement is an inaccurate rotor position angle when the second rotor position angle does not match the first rotor position angle, and generate alarm data, wherein the rotor position angle output according to the predetermined output requirement is the first rotor position angle or the second rotor position angle.
[0014] On the other hand, an embodiment of the present application provides a chip storing a computer program, wherein the computer program implements the steps of the above method when executed by a processor.
[0015] On the other hand, an embodiment of the present application proposes a computer device, which includes at least a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps of the above method when executing the computer program in the memory.
[0016] The embodiment of the present application sets up two types of hardware to calculate the rotor position angle, and determines whether the currently output set of rotor position angles is accurate through the matching degree of the two sets of rotor position angles. If it is inaccurate, an alarm can be given in time to avoid long-term use of inaccurate rotor position angles affecting the accurate implementation of related functions; and, in the embodiment of the present application, one set of hardware implements the tangent method, which can quickly iterate and calculate the real-time rotor position angle, and the other set of hardware implements the angle observer method, which can output a higher-precision rotor position angle. In specific implementation, the rotor position angle output by any set of hardware can be selected according to needs, which has high flexibility and can better realize the system function. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0018] Figure 1 A flow chart of a method for verifying a rotor position angle provided in the first embodiment of the present application;
[0019] Figure 2 A schematic diagram of the structure of a rotor position angle calibration device provided in the second embodiment of the present application;
[0020] Figure 3 Another structural schematic diagram of a rotor position angle verification device provided in the second embodiment of the present application;
[0021] Figure 4 A schematic diagram of the structure of an electronic device provided in the fourth embodiment of the present application. DETAILED DESCRIPTION
[0022] In order to make the purpose, technical solution and advantages of the embodiment of the present application clearer, the technical solution of the embodiment of the present application will be clearly and completely described in conjunction with the drawings of the embodiment of the present application. Obviously, the described embodiment is a part of the embodiment of the present application, not all of the embodiments. Based on the described embodiment of the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0023] Unless otherwise defined, the technical terms or scientific terms used in this application should be understood by people with ordinary skills in the field to which this application belongs. "First", "second" and similar words used in this application do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprise" and similar words mean that the elements or objects appearing before the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0024] In order to keep the following description of the embodiments of the present application clear and concise, the present application omits detailed descriptions of known functions and known components.
[0025] The first embodiment of the present application provides a method for verifying the rotor position angle. The verification method calculates the rotor position angle of the rotary transformer by means of a trigonometric function hardware calculator and a digital phase-locked loop set in hardware. The trigonometric function hardware calculator is used to implement the tangent method to calculate the rotor position angle, and the digital phase-locked loop is used to implement the angle observer method to calculate the rotor position angle. The flow of the verification method is as follows: Figure 1 As shown, steps S101 to S104 are included:
[0026] S101, determining a first rotor position angle of first sine-cosine waveform data by using a trigonometric function hardware calculator, wherein the first sine-cosine waveform data includes first sine waveform data and first cosine waveform data.
[0027] Since the embodiment of the present application needs to calculate two sets of rotor position angles, before calculating the first rotor position angle and the second rotor position angle, the sine and cosine waveform data of the rotary transformer output by the demodulator needs to be copied to obtain the first sine and cosine waveform data and the second sine and cosine waveform data. Subsequently, the two identical waveform data are input into the two sets of hardware, and the calculated data are of the same source, which can further ensure the accuracy of the obtained rotor position angle.
[0028] S102, determining a second rotor position angle of second sine-cosine waveform data through a digital phase-locked loop, wherein the second sine-cosine waveform data is the same as the first sine-cosine waveform data.
[0029] The tangent method responds quickly to data changes, but the accuracy decreases near 0 and 180 degrees and the calculation process takes up relatively more system resources. The angle observer can obtain the angle with high accuracy, but there is a time delay between the actual position and the data position, there is a startup stabilization time requirement, it responds slowly to sudden high-speed changes, and there is a possibility of position changes beyond the traceable range leading to data errors. In high-reliability applications, the problems of these two methods will limit the scope of application scenarios.
[0030] In the prior art, since software is used to calculate the rotor position angle, if multiple methods are used to calculate the rotor position angle at the same time, CPU resources will be greatly consumed, affecting the overall performance of the system. Therefore, the prior art does not consider calculating two rotor position angles at the same time in the embodiment of the present application.
[0031] The embodiment of the present application does not use software when calculating the rotor position angle, but instead sets up hardware. The hardware itself can calculate the rotor position angle. The calculation process does not require the participation of the CPU and does not occupy CPU resources. After the calculation is completed, only the CPU needs to read the calculation result, which greatly reduces the occupancy of CPU resources and improves the overall performance of the system.
[0032] After the above two sets of hardware output the first rotor position angle and the second rotor position angle respectively, the first rotor position angle or the second rotor position angle can be adjusted according to the change of the predetermined output requirement. In specific implementation, when the acceleration or deceleration of the rotor of the rotary transformer is less than the predetermined speed, the second rotor position angle is output; when the acceleration or deceleration of the rotor of the rotary transformer is greater than the predetermined speed, the first rotor position angle is output. The embodiment of the present application will output the rotor position angle corresponding to different hardware under different circumstances, utilizing the respective advantages of the tangent method and the angle observer method, and improving the accuracy of the output rotor position angle.
[0033] The embodiment of the present application combines the above two methods. While selecting the respective advantages of the tangent method and the angle observer method, the tangent method and the angle observer method are implemented by hardware, thereby avoiding the great occupation of the CPU by software calculations, and any set of rotor position angles output by hardware can be selected as needed, and the flexibility and accuracy are greatly improved. The embodiment of the present application uses two complementary methods of accuracy and speed to calculate the rotor position angle, which is a better implementation scheme, that is, the least hardware is used to achieve accuracy detection. Under the guidance of the ideas of this application, those skilled in the art can set more than two sets of hardware to calculate the rotor position angle, which is also within the protection scope of this application.
[0034] S103, detecting whether the second rotor position angle matches the first rotor position angle according to a predetermined delay time.
[0035] The predetermined delay time is determined based on the parameters of the rotor and the analog sampling system parameters input to the demodulator.
[0036] S104, when the second rotor position angle does not match the first rotor position angle, determine that the rotor position angle output according to the predetermined output requirement is an inaccurate rotor position angle, and generate alarm data, wherein the rotor position angle output according to the predetermined output requirement is the first rotor position angle or the second rotor position angle.
[0037] In specific implementation, when the second rotor position angle matches the first rotor position angle, it can be directly determined that the rotor position angle output according to the predetermined output requirement is the accurate rotor position angle. At this time, the matching result can be recorded to facilitate subsequent maintenance personnel to call and view.
[0038] The embodiment of the present application sets up two types of hardware to calculate the rotor position angle, and determines whether the currently output set of rotor position angles is accurate through the matching degree of the two sets of rotor position angles. If it is inaccurate, an alarm can be given in time to avoid long-term use of inaccurate rotor position angles affecting the accurate implementation of related functions; and, in the embodiment of the present application, one set of hardware implements the tangent method, which can quickly iterate and calculate the real-time rotor position angle, and the other set of hardware implements the angle observer method, which can output a higher-precision rotor position angle. In specific implementation, the rotor position angle output by any set of hardware can be selected according to needs, which has high flexibility and can better realize the system function.
[0039] It is also possible to detect whether the digital phase-locked loop is in an unlocked state. When the digital phase-locked loop is in an unlocked state, the first rotor position angle is obtained, and a new second rotor position angle is determined according to the first rotor position angle and a predetermined delay time, so as to relock the digital phase-locked loop according to the new second rotor position angle. The rotor position angle output by one set of hardware in the embodiment of the present application can assist another set of hardware in performing fault repair in the event of a fault, further ensuring the stability of the system.
[0040] The second embodiment of the present application provides a rotor position angle verification device, which calculates the rotor position angle of the rotary transformer through a trigonometric function hardware calculator and a digital phase-locked loop set by hardware, wherein the trigonometric function hardware calculator is used to implement the tangent method to calculate the rotor position angle, and the digital phase-locked loop is used to implement the angle observer method to calculate the rotor position angle; the verification device is as follows Figure 2 As shown, including:
[0041] The first determination module 10 is used to determine the first rotor position angle of the first sine-cosine waveform data through the trigonometric function hardware calculator 50, wherein the first sine-cosine waveform data includes the first sine waveform data and the first cosine waveform data; the second determination module 20 is used to determine the second rotor position angle of the second sine-cosine waveform data through the digital phase-locked loop 60, wherein the second sine-cosine waveform data and the first sine-cosine waveform data are the same data; the matching module 30 is coupled to the first determination module 10 and the second determination module 20, and is used to detect whether the second rotor position angle matches the first rotor position angle according to a predetermined delay time; the third determination module 40 is coupled to the matching module 30, and is used to determine that the rotor position angle output according to the predetermined output requirement is an inaccurate rotor position angle when the second rotor position angle does not match the first rotor position angle, and generate alarm data, wherein the rotor position angle output according to the predetermined output requirement is the first rotor position angle or the second rotor position angle.
[0042] The embodiment of the present application combines the tangent method and the angle observer method through hardware implementation to obtain a rotor position angle with rapid response and high reliability.
[0043] In specific implementation, the third determination module is also used to determine that the rotor position angle output according to the predetermined output requirement is the accurate rotor position angle when the second rotor position angle matches the first rotor position angle. In this case, the matching result can be recorded to facilitate subsequent maintenance personnel to call and view.
[0044] The above-mentioned first determination module 10 can be implemented by a trigonometric function hardware calculator 50, or the result of the trigonometric function hardware calculator can be output to the first determination module 10; similarly, the second determination module 20 can also be implemented by a digital phase-locked loop 60, or the result of the digital phase-locked loop 60 can be output to the second determination module 20. Figure 2 In order to output the hardware result to the determination module, the subsequent embodiments are illustrated by another method of implementing the determination module by hardware, and its structure can be as follows: Figure 3 shown.
[0045] Figure 3 The verification device shown also includes a data copying module 70 coupled to the trigonometric function hardware calculator 50 and the digital phase-locked loop 60. The copying module 70 is used to copy the sine and cosine waveform data of the rotary transformer output by the demodulator to obtain the first sine and cosine waveform data and the second sine and cosine waveform data. Subsequently, the two identical waveform data are input into two sets of hardware, and the calculated data are of the same source, which can further ensure the accuracy of the obtained rotor position angle.
[0046] The first sine-cosine waveform data and the second sine-cosine waveform data are output synchronously. Group one calculates the inverse tangent function through the trigonometric function hardware calculator 50 (such as the coordinate rotation algorithm cordic), and quickly iterates to calculate the real-time rotor position angle. Group two uses a digital phase-locked loop calculation method to output a high-precision rotor position angle after position tracking and locking after a period of time. There is a fixed predetermined delay time in the time domain between group one and group two; through calibration, the position data obtained by the inverse tangent can be delayed and compared with the phase-locked loop data to ensure the accuracy of the position data, and low-latency or high-precision data can be output according to application requirements. The backup data path serves as a safety redundancy to monitor the data in real time to see if there is any abnormality. The above-mentioned predetermined delay time is determined according to the parameters of the rotor and the parameters of the analog sampling system input to the demodulator.
[0047] The tangent method responds quickly to data changes, but the accuracy decreases near 0 and 180 degrees and the calculation process takes up relatively more system resources. The angle observer method can obtain the angle with high accuracy, but there is a time delay between the actual position and the data position, there is a startup stabilization time requirement, it responds slowly to sudden high-speed changes, and there is a possibility of position changes beyond the traceable range leading to data errors. The problems of these two methods in high-reliability applications will limit the scope of application scenarios.
[0048] In the prior art, since software is used to calculate the rotor position angle, if multiple methods are used to calculate the rotor position angle at the same time, CPU resources will be greatly consumed, affecting the overall performance of the system. Therefore, the prior art does not consider calculating two rotor position angles at the same time in the embodiment of the present application.
[0049] The embodiment of the present application does not use software when calculating the rotor position angle, but instead sets up hardware. The hardware itself can calculate the rotor position angle. The calculation process does not require the participation of the CPU and does not occupy CPU resources. After the calculation is completed, only the CPU needs to read the calculation result, which greatly reduces the occupancy of CPU resources and improves the overall performance of the system.
[0050] The above-mentioned verification device also includes an output module, which is used to adjust the output of the first rotor position angle or the second rotor position angle according to the change of the predetermined output requirement. The output module is specifically used to: output the second rotor position angle when the acceleration or deceleration of the rotor of the rotary transformer is less than the predetermined speed; output the first rotor position angle when the acceleration or deceleration of the rotor of the rotary transformer is greater than the predetermined speed. In the application, the two sets of data can select the output data source according to the application requirements. For example, in an application with drastic acceleration and deceleration, the current rotor position speed needs to be obtained quickly, then the inverse tangent data is selected as the output data, and the data is compared with the phase-locked loop result after a predetermined delay time to ensure data reliability. If the rotor is expected to perform slow acceleration and deceleration rotation, the phase-locked loop data can be selected as the output data to improve the data accuracy, and the inverse tangent result is compared with the current data to ensure data reliability. When the rotor undergoes rapid acceleration and deceleration rotation, the data source is temporarily switched to ensure system stability. The embodiment of the present application will output the rotor position angle corresponding to different hardware under different circumstances, utilizing the respective advantages of the tangent method and the angle observer method, and improving the accuracy of the output rotor position angle.
[0051] The embodiment of the present application combines the above two methods. While selecting the respective advantages of the tangent method and the angle observer method, the tangent method and the angle observer method are implemented by hardware, thereby avoiding the great occupation of the CPU by software calculations, and any set of rotor position angles output by hardware can be selected as needed, and the flexibility and accuracy are greatly improved. The embodiment of the present application uses two complementary methods of accuracy and speed to calculate the rotor position angle, which is a better implementation scheme, that is, the least hardware is used to achieve accuracy detection. Under the guidance of the ideas of this application, those skilled in the art can set more than two sets of hardware to calculate the rotor position angle, which is also within the protection scope of this application.
[0052] The embodiment of the present application uses a digital phase-locked loop to implement the angle observer method, but the digital phase-locked loop is hardware and may lose lock. The embodiment of the present application can also use the inverse tangent data to quickly lock and converge when the phase-locked loop loses lock. When implementing the above functions, the verification device also includes: a detection module for detecting whether the digital phase-locked loop is in a lost state; an acquisition module for acquiring the first rotor position angle when the digital phase-locked loop is in a lost state; a relocking module for determining a new second rotor position angle based on the first rotor position angle and a predetermined delay time, so as to relock the digital phase-locked loop according to the new second rotor position angle.
[0053] The embodiment of the present application sets up two types of hardware to calculate the rotor position angle, and determines whether the currently output set of rotor position angles is accurate through the matching degree of the two sets of rotor position angles. If it is inaccurate, an alarm can be given in time to avoid long-term use of inaccurate rotor position angles affecting the accurate implementation of related functions; and, in the embodiment of the present application, one set of hardware implements the tangent method, which can quickly iterate and calculate the real-time rotor position angle, and the other set of hardware implements the angle observer method, which can output a higher-precision rotor position angle. In specific implementation, the rotor position angle output by any set of hardware can be selected according to needs, which has high flexibility and can better realize the system function.
[0054] A third embodiment of the present application provides a chip, which stores a computer program. When the computer program is executed by a processor, the method provided by any embodiment of the present application is implemented. The verification method calculates the rotor position angle of the rotary transformer through a trigonometric function hardware calculator and a digital phase-locked loop set by hardware, wherein the trigonometric function hardware calculator is used to implement the tangent method to calculate the rotor position angle, and the digital phase-locked loop is used to implement the angle observer method to calculate the rotor position angle; the verification method includes the following steps S11 to S14:
[0055] S11, determining a first rotor position angle of first sine-cosine waveform data by a trigonometric function hardware calculator, wherein the first sine-cosine waveform data includes first sine waveform data and first cosine waveform data;
[0056] S12, determining a second rotor position angle of second sine-cosine waveform data through a digital phase-locked loop, wherein the second sine-cosine waveform data is the same as the first sine-cosine waveform data;
[0057] S13, detecting whether the second rotor position angle matches the first rotor position angle according to a predetermined delay time;
[0058] S14, when the second rotor position angle does not match the first rotor position angle, determine that the rotor position angle output according to the predetermined output requirement is an inaccurate rotor position angle, and generate alarm data, wherein the rotor position angle output according to the predetermined output requirement is the first rotor position angle or the second rotor position angle.
[0059] The predetermined delay time is determined according to the parameters of the rotor and the analog sampling system parameters input to the demodulator.
[0060] The computer program is specifically also executed by the processor to perform the following steps: detecting whether the digital phase-locked loop is in an unlocked state; when the digital phase-locked loop is in an unlocked state, obtaining the first rotor position angle; determining a new second rotor position angle based on the first rotor position angle and a predetermined delay time, so as to re-lock the digital phase-locked loop according to the new second rotor position angle.
[0061] The computer program is specifically further executed by the processor to perform the following steps: adjusting the output of the first rotor position angle or the second rotor position angle according to a change in a predetermined output requirement.
[0062] When the computer program is executed by the processor to adjust the output of the first rotor position angle or the second rotor position angle according to the change of the predetermined output requirement, the processor specifically executes the following steps: when the acceleration or deceleration of the rotor of the rotary transformer is less than the predetermined speed, the second rotor position angle is output; when the acceleration or deceleration of the rotor of the rotary transformer is greater than the predetermined speed, the first rotor position angle is output.
[0063] After the computer program is executed by the processor to detect whether the second rotor position angle matches the first rotor position angle based on a predetermined delay time, the processor also executes the following steps: when the second rotor position angle matches the first rotor position angle, determining that the rotor position angle output according to the predetermined output requirement is the accurate rotor position angle.
[0064] The computer program is executed by the processor before determining the first rotor position angle of the first sine-cosine waveform data through the trigonometric function hardware calculator, and the processor also executes the following steps: copying the sine-cosine waveform data of the rotary transformer output by the demodulator to obtain the first sine-cosine waveform data and the second sine-cosine waveform data.
[0065] The embodiment of the present application sets up two types of hardware to calculate the rotor position angle, and determines whether the currently output set of rotor position angles is accurate through the matching degree of the two sets of rotor position angles. If it is inaccurate, an alarm can be given in time to avoid long-term use of inaccurate rotor position angles affecting the accurate implementation of related functions; and, in the embodiment of the present application, one set of hardware implements the tangent method, which can quickly iterate and calculate the real-time rotor position angle, and the other set of hardware implements the angle observer method, which can output a higher-precision rotor position angle. In specific implementation, the rotor position angle output by any set of hardware can be selected according to needs, which has high flexibility and can better realize the system function.
[0066] Optionally, in this embodiment, the processor executes the method steps recorded in the above embodiment according to the program code stored in the chip. Optionally, the specific examples in this embodiment can refer to the examples described in the above embodiment and the optional implementation mode, and this embodiment will not be repeated here. Obviously, it should be understood by those skilled in the art that the above-mentioned modules or steps of the present application can be implemented with a general computing device, which can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented with executable program codes of computing devices, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be performed in a different order from that here, or they can be made into each integrated circuit module respectively, or multiple modules or steps therein can be made into a single integrated circuit module to implement. In this way, the present application is not limited to any specific combination of hardware and software.
[0067] A fourth embodiment of the present application provides an electronic device. The structural diagram of the electronic device can be as follows: Figure 4 As shown, at least a memory 901 and a processor 902 are included, the memory 901 stores a computer program, and the processor 902 implements the method provided by any embodiment of the present application when executing the computer program on the memory 901. Exemplarily, the verification method calculates the rotor position angle of the rotary transformer through a trigonometric function hardware calculator and a digital phase-locked loop set by hardware, wherein the trigonometric function hardware calculator is used to implement the tangent method to calculate the rotor position angle, and the digital phase-locked loop is used to implement the angle observer method to calculate the rotor position angle; the steps of the electronic device computer program are as follows S21 to S24:
[0068] S21, determining a first rotor position angle of first sine-cosine waveform data by a trigonometric function hardware calculator, wherein the first sine-cosine waveform data includes first sine waveform data and first cosine waveform data;
[0069] S22, determining a second rotor position angle of second sine-cosine waveform data through a digital phase-locked loop, wherein the second sine-cosine waveform data is the same as the first sine-cosine waveform data;
[0070] S23, detecting whether the second rotor position angle matches the first rotor position angle according to a predetermined delay time;
[0071] S24, when the second rotor position angle does not match the first rotor position angle, determines that the rotor position angle output according to the predetermined output requirement is an inaccurate rotor position angle, and generates alarm data, wherein the rotor position angle output according to the predetermined output requirement is the first rotor position angle or the second rotor position angle.
[0072] The predetermined delay time is determined according to the parameters of the rotor and the analog sampling system parameters input to the demodulator.
[0073] The processor also specifically executes the following computer program: detecting whether the digital phase-locked loop is in an unlocked state; when the digital phase-locked loop is in an unlocked state, obtaining a first rotor position angle; determining a new second rotor position angle based on the first rotor position angle and a predetermined delay time, so as to re-lock the digital phase-locked loop based on the new second rotor position angle.
[0074] The processor specifically further executes the following computer program: adjusting the output of the first rotor position angle or the second rotor position angle according to a change in a predetermined output requirement.
[0075] When the processor executes a computer program stored in the memory that adjusts the output of the first rotor position angle or the second rotor position angle according to changes in a predetermined output requirement, the processor specifically executes the following computer program: when the acceleration or deceleration of the rotor of the rotary transformer is less than a predetermined speed, the second rotor position angle is output; when the acceleration or deceleration of the rotor of the rotary transformer is greater than a predetermined speed, the first rotor position angle is output.
[0076] After executing a computer program stored in the memory for detecting whether the second rotor position angle matches the first rotor position angle based on a predetermined delay time, the processor also executes the following computer program: when the second rotor position angle matches the first rotor position angle, determining that the rotor position angle output according to a predetermined output requirement is an accurate rotor position angle.
[0077] Before executing the computer program stored in the memory for determining the first rotor position angle of the first sine-cosine waveform data by means of a trigonometric function hardware calculator, the processor also executes the following computer program: copying the sine-cosine waveform data of the rotary transformer output by the demodulator to obtain the first sine-cosine waveform data and the second sine-cosine waveform data.
[0078] The embodiment of the present application sets up two types of hardware to calculate the rotor position angle, and determines whether the currently output set of rotor position angles is accurate through the matching degree of the two sets of rotor position angles. If it is inaccurate, an alarm can be given in time to avoid long-term use of inaccurate rotor position angles affecting the accurate implementation of related functions; and, in the embodiment of the present application, one set of hardware implements the tangent method, which can quickly iterate and calculate the real-time rotor position angle, and the other set of hardware implements the angle observer method, which can output a higher-precision rotor position angle. In specific implementation, the rotor position angle output by any set of hardware can be selected according to needs, which has high flexibility and can better realize the system function.
[0079] In addition, although exemplary embodiments have been described herein, the scope includes any and all embodiments based on the present application with equivalent elements, modifications, omissions, combinations (e.g., various embodiments intersecting schemes), adaptations or changes. The elements in the claims are to be interpreted broadly based on the language adopted in the claims, and are not limited to the examples described in this specification or during the practice of this application, and the examples are to be interpreted as non-exclusive. Therefore, this specification and examples are intended to be considered as examples only, and the true scope and spirit are indicated by the following claims and the full scope of their equivalents.
[0080] The above description is intended to be illustrative rather than restrictive. For example, the above examples (or one or more of them) may be used in combination with each other. For example, a person of ordinary skill in the art may use other embodiments when reading the above description. In addition, in the above-mentioned specific embodiments, various features may be grouped together to simplify the present application. This should not be interpreted as an intention that a feature of an application that does not require protection is necessary for any claim. On the contrary, the subject matter of the present application may be less than all the features of an embodiment of a particular application. Thus, the following claims are incorporated herein as examples or embodiments in the specific embodiments, wherein each claim is independently a separate embodiment, and it is considered that these embodiments may be combined with each other in various combinations or arrangements. The scope of the present application should be determined with reference to the attached claims and the full scope of equivalent forms granted by these claims.
[0081] Multiple embodiments of the present application are described in detail above, but the present application is not limited to these specific embodiments. Those skilled in the art can make various variations and modifications to the embodiments based on the concept of the present application, and these variations and modifications should all fall within the scope of protection required by the present application.
Claims
1. A method for checking a rotor position angle, characterized in that: The verification method calculates the rotor position angle of the rotary transformer by means of a trigonometric function hardware calculator and a digital phase-locked loop set in hardware, wherein the trigonometric function hardware calculator is used to implement the tangent method to calculate the rotor position angle, and the digital phase-locked loop is used to implement the angle observer method to calculate the rotor position angle; The verification method comprises: Copying the sine-cosine waveform data of the rotary transformer output by the demodulator to obtain first sine-cosine waveform data and second sine-cosine waveform data; Determining a first rotor position angle of first sine-cosine waveform data by the trigonometric function hardware calculator, wherein the first sine-cosine waveform data includes first sine waveform data and first cosine waveform data; Determine a second rotor position angle of second sine-cosine waveform data by the digital phase-locked loop, wherein the second sine-cosine waveform data is the same as the first sine-cosine waveform data; detecting whether the second rotor position angle matches the first rotor position angle according to a predetermined delay time, wherein the predetermined delay time is determined according to parameters of the rotor and parameters of an analog sampling system input to the demodulator; In the case where the second rotor position angle does not match the first rotor position angle, determining that the rotor position angle output according to the predetermined output requirement is an inaccurate rotor position angle, and generating alarm data, wherein the rotor position angle output according to the predetermined output requirement is the first rotor position angle or the second rotor position angle; The verification method further comprises: Detecting whether the digital phase-locked loop is in an unlocked state; When the digital phase-locked loop is in the unlocked state, acquiring the first rotor position angle; A new second rotor position angle is determined according to the first rotor position angle and the predetermined delay time, so as to re-lock the digital phase locked loop according to the new second rotor position angle.
2. The rotor position angle calibration method according to claim 1, characterized in that: The method further comprises: The first rotor position angle or the second rotor position angle is adjusted and output according to a change in the predetermined output requirement.
3. The rotor position angle calibration method according to claim 2, characterized in that: The adjusting and outputting the first rotor position angle or the second rotor position angle according to the change of the predetermined output requirement comprises: When the acceleration or deceleration of the rotor of the rotary transformer is less than a predetermined speed, outputting the second rotor position angle; When the acceleration or deceleration of the rotor of the resolver is greater than the predetermined speed, the first rotor position angle is output.
4. The rotor position angle calibration method according to any one of claims 1 to 3, characterized in that: After detecting whether the second rotor position angle matches the first rotor position angle according to the predetermined delay time, the method further includes: In a case where the second rotor position angle matches the first rotor position angle, it is determined that the rotor position angle output according to the predetermined output requirement is an accurate rotor position angle.
5. A rotor position angle calibration device, characterized in that: The verification device calculates the rotor position angle of the rotary transformer through a trigonometric function hardware calculator and a digital phase-locked loop set in hardware, wherein the trigonometric function hardware calculator is used to implement the tangent method to calculate the rotor position angle, and the digital phase-locked loop is used to implement the angle observer method to calculate the rotor position angle; The verification device comprises: A first determination module, configured to determine a first rotor position angle of first sine-cosine waveform data by using the trigonometric function hardware calculator, wherein the first sine-cosine waveform data includes first sine waveform data and first cosine waveform data; A second determination module, configured to determine a second rotor position angle of second sine-cosine waveform data through the digital phase-locked loop, wherein the second sine-cosine waveform data is the same as the first sine-cosine waveform data; a matching module, configured to detect whether the second rotor position angle matches the first rotor position angle according to a predetermined delay time; The third determination module is used to determine that the rotor position angle output according to the predetermined output requirement is an inaccurate rotor position angle and generate alarm data when the second rotor position angle does not match the first rotor position angle, wherein the rotor position angle output according to the predetermined output requirement is the first rotor position angle or the second rotor position angle.
6. A chip storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
7. An electronic device, comprising at least a memory and a processor, wherein a computer program is stored in the memory, wherein: The processor implements the steps of the method of any one of claims 1 to 4 when executing the computer program on the memory.
Citation Information
Patent Citations
Apparatus and method for compensating output signals of magnetic encoder using digital phase-locked loop
US20150030104A1
Digital phase tracking filter for position sensing
US20210302200A1