Rotary transformer decoding processing method and device and electronic equipment
By adopting the redundant decoding scheme of two sets of rotary decoding devices and software phase-locking loop processing in the motor controller, the problems of decoding failures and errors in the prior art are solved, the accuracy and reliability of the decoding results are improved, and the requirements of functional safety are met.
Patent Information
- Application Number
- CN202411936285.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-04-25
AI Technical Summary
Existing motor controllers generally adopt a single solution of hard decoding or soft decoding, resulting in decoding failure or error, unable to handle angle errors, generating unexpected torque, failing to meet functional safety requirements, and low accuracy and reliability of decoding results.
Two sets of built-in rotation decoding devices are used to realize redundant decoding, read the information of the preset first rotation decoding device and the second rotation decoding device, respectively perform software phase-locking loop processing, generate redundant information, and generate target angle values through fusion processing to realize dual hardware decoding redundant rotation processing and solution based on functional safety.
Through redundant decoding and software phase-locking loop processing, possible faults or errors can be eliminated, and the accuracy and reliability of decoding results are significantly improved, and functional safety requirements are met.
Smart Images

Figure CN119879999A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device and electronic device for processing a resolver decoding process. Background Art
[0002] At present, there are usually two decoding schemes for resolver decoding. One is hard decoding, which uses a dedicated decoding chip, such as preset software for decoding. The software directly obtains the angle and speed through SPI. This method has built-in hardware compensation, high decoding accuracy and good linearity, but the cost is high. The other is a soft decoding scheme, which uses a single-chip microcomputer to synchronously obtain the sine and cosine signals from the envelope signal, and then uses phase-locked loop technology to decode the angle.
[0003] In the prior art, current motor controllers generally use a single solution of hard decoding or soft decoding for decoding.
[0004] However, in the prior art, since current motor controllers generally use a single solution of hard decoding or soft decoding for decoding, there may be decoding failures or errors, which may result in an inability to handle angle errors and generate unexpected torque, which does not meet the functional safety requirements and leads to low accuracy and reliability of the decoding results. Summary of the invention
[0005] The embodiments of the present application provide a method, device and electronic device for processing a resolver decoding, so as to achieve the effect of improving the accuracy and reliability of a decoding result.
[0006] In a first aspect, an embodiment of the present application provides a resolver decoding processing method, including:
[0007] Reading the first information of the preset first rotary decoding device and the second information of the preset second rotary decoding device; wherein the first information includes the first angle value and the first fault state information, and the second information includes the second angle value and the second fault state information;
[0008] Performing software phase-locked loop processing on the first angle value and the second angle value respectively to obtain third information of the first rotation decoding device and fourth information of the second rotation decoding device;
[0009] According to the first information, the second information, the third information and the fourth information, a resolution decoding process is performed to generate a target angle value.
[0010] In a possible implementation manner, the third information includes a third angle value and a first rotational speed, and the fourth information includes a fourth angle value and a second rotational speed.
[0011] In a possible implementation manner, performing resolution decoding processing according to the first information, the second information, the third information, and the fourth information to generate a target angle value includes:
[0012] Based on a preset reading cycle, reading a fifth angle value of a previous reading cycle of the first angle value and a sixth angle value of a previous reading cycle of the second angle value;
[0013] Determine a first angle increment value according to the first angle value and the fifth angle value; determine a second angle increment value according to the second angle value and the sixth angle value;
[0014] Determine a first fault state according to the first angle increment value and a preset angle threshold; and determine a second fault state according to the second angle increment value and the angle threshold; wherein the first fault state and the second fault state both represent whether an angle deviation fault occurs;
[0015] A target angle value is generated according to the first information, the second information, the first fault state, the second fault state, the third information, and the fourth information.
[0016] In a possible implementation manner, generating a target angle value according to the first information, the second information, the first fault state, the second fault state, the third information, and the fourth information includes:
[0017] Determine an angle generation mode according to the first fault state information in the first information, the second fault state information in the second information, the first fault state, and the second fault state; wherein the angle generation mode represents a processing step for determining a target angle value;
[0018] A target angle value is generated according to the angle generation mode, the first angle value, the second angle value, the first rotation speed in the third information, and the second rotation speed in the fourth information.
[0019] In a possible implementation, the angle generation mode includes a first angle generation mode, a second angle generation mode, a third angle generation mode, a fourth angle generation mode, and a fifth angle generation mode;
[0020] Among them, the condition corresponding to the first angle generation mode is that the first fault state information is no fault and the first fault state is no fault; the condition corresponding to the second angle generation mode is that the first fault state information is faulty and the second fault state information is no fault; the condition corresponding to the third angle generation mode is that the first fault state information is faulty and the second fault state information is faulty; the condition corresponding to the fourth angle generation mode is that the first fault state information is no fault, the first fault state is faulty, and the second fault state information is no fault; the condition corresponding to the fifth angle generation mode is that the first fault state information is no fault, the first fault state is faulty, and the second fault state information is faulty.
[0021] In a possible implementation manner, generating a target angle value according to the angle generation mode, the first angle value, the second angle value, the first rotation speed in the third information, and the second rotation speed in the fourth information includes:
[0022] If the angle generation mode is the first angle generation mode, determining the first angle value as a first target angle value; and determining the first rotational speed as a first target rotational speed;
[0023] Alternatively, if the angle generation mode is the second angle generation mode, determining the second angle value as a second target angle value; and determining the second rotational speed as a second target rotational speed;
[0024] Alternatively, if the angle generation mode is the third angle generation mode, determining the first angle value as a first target angle value, determining the first rotational speed as a first target rotational speed; determining the product of the first target rotational speed and a preset reading period, determining the sum of the product and the first target angle value, and determining the sum as the third target angle value;
[0025] Alternatively, if the angle generation mode is the fourth angle generation mode, the second angle value is determined to be the second target angle value; and the second rotational speed is determined to be the second target rotational speed;
[0026] Alternatively, if the angle generation mode is the fifth angle generation mode, the first angle value is determined to be the first target angle value, and the first rotational speed is determined to be the first target rotational speed; the product of the first target rotational speed and a preset reading period is determined, the sum of the product and the first target angle value is determined, and the sum is determined to be the third target angle value.
[0027] In a possible implementation manner, performing software phase-locked loop processing on the first angle value and the second angle value respectively to obtain third information of the first rotation decoding device and fourth information of the second rotation decoding device includes:
[0028] If it is determined that the first fault state information is a non-fault state, the first angle value is processed by a software phase-locked loop to obtain the third information of the first rotation decoding device; if it is determined that the second fault state information is a non-fault state, the second angle value is processed by a software phase-locked loop to obtain the fourth information of the second rotation decoding device.
[0029] In a possible implementation manner, the first fault status information and the second fault status information both include any one or more of the following:
[0030] Excitation signal failure, input disconnection failure, conversion failure, angle calibration failure, power short / open circuit failure, signal amplitude failure.
[0031] In a second aspect, an embodiment of the present application provides a resolver decoding processing device, including:
[0032] A reading module, used to read the first information of the preset first rotary decoding device and the second information of the preset second rotary decoding device; wherein the first information includes a first angle value and first fault state information, and the second information includes a second angle value and second fault state information;
[0033] a phase-locked loop module, configured to perform software phase-locked loop processing on the first angle value and the second angle value respectively, to obtain third information of the first rotation decoding device and fourth information of the second rotation decoding device;
[0034] A decoding module is used to perform resolution decoding processing according to the first information, the second information, the third information and the fourth information to generate a target angle value.
[0035] In a possible implementation manner, the third information includes a third angle value and a first rotational speed, and the fourth information includes a fourth angle value and a second rotational speed.
[0036] In a possible implementation, the decoding module includes:
[0037] a reading unit, configured to read, based on a preset reading cycle, a fifth angle value of a previous reading cycle of the first angle value and a sixth angle value of a previous reading cycle of the second angle value;
[0038] a first determining unit, configured to determine a first angle increment value according to the first angle value and the fifth angle value; and to determine a second angle increment value according to the second angle value and the sixth angle value;
[0039] A second determination unit is used to determine a first fault state according to the first angle increment value and a preset angle threshold; and to determine a second fault state according to the second angle increment value and the angle threshold; wherein the first fault state and the second fault state both represent whether an angle deviation fault occurs;
[0040] A generating unit is used to generate a target angle value according to the first information, the second information, the first fault state, the second fault state, the third information and the fourth information.
[0041] In a possible implementation, the generating unit includes:
[0042] a determination subunit, configured to determine an angle generation mode according to first fault state information in the first information, second fault state information in the second information, the first fault state, and the second fault state; wherein the angle generation mode represents a processing step for determining a target angle value;
[0043] A generating subunit is used to generate a target angle value according to the angle generating mode, the first angle value, the second angle value, the first rotation speed in the third information, and the second rotation speed in the fourth information.
[0044] In a possible implementation, the angle generation mode includes a first angle generation mode, a second angle generation mode, a third angle generation mode, a fourth angle generation mode, and a fifth angle generation mode;
[0045] Among them, the condition corresponding to the first angle generation mode is that the first fault state information is no fault and the first fault state is no fault; the condition corresponding to the second angle generation mode is that the first fault state information is faulty and the second fault state information is no fault; the condition corresponding to the third angle generation mode is that the first fault state information is faulty and the second fault state information is faulty; the condition corresponding to the fourth angle generation mode is that the first fault state information is no fault, the first fault state is faulty, and the second fault state information is no fault; the condition corresponding to the fifth angle generation mode is that the first fault state information is no fault, the first fault state is faulty, and the second fault state information is faulty.
[0046] In a possible implementation manner, the generating subunit is specifically used for:
[0047] If the angle generation mode is the first angle generation mode, determining the first angle value as a first target angle value; and determining the first rotational speed as a first target rotational speed;
[0048] Alternatively, if the angle generation mode is the second angle generation mode, determining the second angle value as a second target angle value; and determining the second rotational speed as a second target rotational speed;
[0049] Alternatively, if the angle generation mode is the third angle generation mode, determining the first angle value as a first target angle value, determining the first rotational speed as a first target rotational speed; determining the product of the first target rotational speed and a preset reading period, determining the sum of the product and the first target angle value, and determining the sum as the third target angle value;
[0050] Alternatively, if the angle generation mode is the fourth angle generation mode, the second angle value is determined to be the second target angle value; and the second rotational speed is determined to be the second target rotational speed;
[0051] Alternatively, if the angle generation mode is the fifth angle generation mode, the first angle value is determined to be the first target angle value, and the first rotational speed is determined to be the first target rotational speed; the product of the first target rotational speed and a preset reading period is determined, the sum of the product and the first target angle value is determined, and the sum is determined to be the third target angle value.
[0052] In a possible implementation manner, the phase-locked loop module is specifically used to:
[0053] If it is determined that the first fault state information is a non-fault state, the first angle value is processed by a software phase-locked loop to obtain the third information of the first rotation decoding device; if it is determined that the second fault state information is a non-fault state, the second angle value is processed by a software phase-locked loop to obtain the fourth information of the second rotation decoding device.
[0054] In a possible implementation manner, the first fault status information and the second fault status information both include any one or more of the following:
[0055] Excitation signal failure, input disconnection failure, conversion failure, angle calibration failure, power short / open circuit failure, signal amplitude failure.
[0056] In a third aspect, an embodiment of the present application provides an electronic device, including: a memory, a processor;
[0057] The memory stores computer-executable instructions;
[0058] The processor executes the computer-executable instructions stored in the memory, so that the processor executes the above first aspect and / or various possible implementations of the first aspect.
[0059] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the first aspect above and / or various possible implementations of the first aspect.
[0060] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the above first aspect and / or various possible implementation methods of the first aspect.
[0061] The resolver decoding processing method, device and electronic device provided in the embodiment of the present application read the first information of the preset first rotary decoding device and the second information of the second rotary decoding device; wherein the first information includes the first angle value and the first fault state information, and the second information includes the second angle value and the second fault state information. The first angle value and the second angle value are processed by software phase-locked loop respectively to obtain the third information of the first rotary decoding device and the fourth information of the second rotary decoding device. According to the first information, the second information, the third information and the fourth information, the resolver decoding processing is performed to generate the target angle value. In this scheme, two sets of built-in rotary decoding devices are fully utilized to realize redundant decoding. First, redundant information such as the first information and the second information are read, and then redundant information such as the third information and the fourth information are obtained by superimposing the software phase-locked loop angle processing, and these redundant information are fused and processed to generate the target angle value, realizing the dual hardware decoding redundant resolver processing and solution based on functional safety, and cooperating with the software phase-locked loop, thereby eliminating possible faults or errors, improving the accuracy and reliability of the solution results, so as to achieve the effect of improving the accuracy and reliability of the decoding results. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0063] Figure 1 A flowchart of a method for decoding a resolver provided in an embodiment of the present application Figure 1 ;
[0064] Figure 2 A flowchart of a method for decoding a resolver provided in this application Figure 2 ;
[0065] Figure 3 Another process diagram of a decoder processing method provided in the present invention Figure 3 ;
[0066] Figure 4 A flowchart of a method for decoding a resolver provided in this application Figure 4 ;
[0067] Figure 5 A flowchart of a method for decoding a resolver provided in this application Figure 5 ;
[0068] Figure 6 A system block diagram of a resolver decoding processing method provided by the present application;
[0069] Figure 7 A software module block diagram of a resolver decoding processing method provided in this application;
[0070] Figure 8 A schematic diagram of the structure of a resolver decoding processing device provided in an embodiment of the present application;
[0071] Fig. 9 A schematic diagram of the structure of another resolver decoding processing device provided in an embodiment of the present application;
[0072] Fig.10 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0073] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0074] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0075] At present, there are usually two decoding schemes for resolver decoding. One is hard decoding, which uses a dedicated decoding chip, such as preset software for decoding. The software directly obtains the angle and speed through SPI. This method has built-in hardware compensation, high decoding accuracy and good linearity, but the cost is high. The other is a soft decoding scheme, which uses a single-chip microcomputer to synchronously obtain the sine and cosine signals from the envelope signal, and then uses phase-locked loop technology to decode the angle.
[0076] In one example, current motor controllers generally use a single solution of hard decoding or soft decoding for decoding. However, in the prior art, since current motor controllers generally use a single solution of hard decoding or soft decoding for decoding, there may be decoding failures or errors, resulting in an inability to handle angle errors, which will generate unexpected torque and fail to meet functional safety requirements, resulting in low accuracy and reliability of the decoding results.
[0077] In combination with the above scenarios, it can be seen that in the prior art, there is a technical problem of low accuracy and reliability of decoding results.
[0078] The resolver decoding processing method provided in the present application makes full use of two sets of built-in resolver decoding devices to realize redundant decoding. First, redundant information such as the first information and the second information is read. Then, redundant information such as the third information and the fourth information is obtained by superimposing the software phase-locked loop angle processing. These redundant information are fused and processed to generate a target angle value. Redundant resolver processing and solution based on functional safety are realized, thereby eliminating possible faults or errors, improving the accuracy and reliability of the solution results, and solving the technical problem of poor accuracy and reliability of the decoding results.
[0079] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0080] Figure 1 A flowchart of a method for decoding a resolver provided in this application Figure 1 ,like Figure 1 As shown, the method includes:
[0081] S101, reading first information of a preset first rotation decoding device and second information of a preset second rotation decoding device; wherein the first information includes a first angle value and first fault state information, and the second information includes a second angle value and second fault state information.
[0082] For example, the execution subject of this embodiment may be an electronic device, or a terminal device, or a resolver decoding processing device or device, or other devices or equipment that can execute this embodiment, without limitation. This embodiment is described with the execution subject being an electronic device.
[0083] First, a chip control unit (MCU) is deployed in the electronic device, and the MCU includes two resolver-digital-converter (RDC) devices, namely a first rotary decoding device RDC1 and a second rotary decoding device RDC2. The two RDCs can be built-in or external to the MCU, and there is no limitation on this.
[0084] In this step, the electronic device reads the first information of the first rotation decoding device and the second information of the second rotation decoding device. The first information includes the first angle value θ 11 and the first fault status information F 11 , the second information includes a second angle value θ 21 and the second fault status information F 21 ; The first angle value θ 11 and the second angle value θ 21 All are original angle values. The first fault status information F 11 and the second fault status information F 21 , including any one or more of the following: excitation signal failure, input disconnection failure, conversion failure, angle calibration failure, power short / open circuit failure, signal amplitude failure.
[0085] S102 , performing software phase-locked loop processing on the first angle value and the second angle value respectively to obtain third information of the first rotation decoding device and fourth information of the second rotation decoding device.
[0086] For example, Figure 2 A flowchart of a method for decoding a resolver provided in this application Figure 2 ,like Figure 2 As shown, the processing process of the software phase-locked loop includes: a first angle value θ 11 ,θ 12 , Sin, Cos, based on θ 11 and Sin to get x, based on θ 11 and Sin to get x, the "+" summation sign, based on θ 12 and Sin to get x, based on θ 12 and Sin to obtain x, speed w, and the following formula:
[0087]
[0088] Among them, K p represents the preset proportionality factor; s represents the preset Laplace conversion factor; k i Indicates the preset integral coefficient.
[0089] In this step, if the first fault status information F read by RDC111 Indicates no fault, then the first angle value θ read 11 Proceed as Figure 2 The software phase-locked loop tracks the processed third information, the third information including the third angle value θ 12 and the first speed ω 12 If RDC2 reads the second fault status information F 21 Indicates no fault, then the second angle value θ read 21 Proceed as Figure 2 The software phase-locked loop tracks the processed fourth information, the fourth information including the fourth angle value θ 22 and the second speed ω 22 .
[0090] S103: Perform resolution decoding processing according to the first information, the second information, the third information and the fourth information to generate a target angle value.
[0091] For example, according to the first fault status information F in the first information 11 , the second fault status information F in the second information 21 , the third information and the fourth information are subjected to resolution decoding processing to generate a target angle value.
[0092] The resolver decoding processing method provided in the embodiment of the present application reads the first information of the preset first rotary decoding device and the second information of the second rotary decoding device; wherein the first information includes the first angle value and the first fault state information, and the second information includes the second angle value and the second fault state information. The first angle value and the second angle value are processed by software phase-locked loop respectively to obtain the third information of the first rotary decoding device and the fourth information of the second rotary decoding device. According to the first information, the second information, the third information and the fourth information, the resolver decoding processing is performed to generate the target angle value. In this scheme, two sets of built-in rotary decoding devices are fully utilized to realize redundant decoding. First, redundant information such as the first information and the second information are read, and then redundant information such as the third information and the fourth information are obtained by superimposing the software phase-locked loop angle processing, and these redundant information are fused and processed to generate the target angle value, realizing the dual hardware decoding redundant resolver processing and solution based on functional safety, and cooperating with the software phase-locked loop, thereby eliminating possible faults or errors, improving the accuracy and reliability of the solution results, so as to achieve the effect of improving the accuracy and reliability of the decoding results.
[0093] Figure 3 A flowchart of a method for decoding a resolver provided in this application Figure 3 ,like Figure 3 As shown, in this embodiment Figure 1 Based on the embodiment, a resolver decoding processing method is described in detail, and the method includes:
[0094] S201, read the first information of the preset first rotation decoding device and the second information of the preset second rotation decoding device; wherein the first information includes a first angle value and first fault state information, and the second information includes a second angle value and second fault state information.
[0095] In one example, the first fault status information and the second fault status information include any one or more of the following: excitation signal fault, input disconnection fault, conversion fault, angle verification fault, power short / open circuit fault, and signal amplitude fault.
[0096] For example, Figure 4 A flowchart of a method for decoding a resolver provided in this application Figure 4 ,like Figure 4 As shown, the first information of the preset first rotary decoding device RDC1 and the second information of the second rotary decoding device RDC2 are read respectively. The first information includes the first angle value θ 11 and the first fault status information F 11 , the second information includes a second angle value θ 21 and the second fault status information F 21 ; The first angle value θ 11 and the second angle value θ 21 All are original angle values. The first fault status information F 11 and the second fault status information F 21 , including any one or more of the following: excitation signal failure, input disconnection failure, conversion failure, angle calibration failure, power short / open circuit failure, signal amplitude failure.
[0097] S202 , performing software phase-locked loop processing on the first angle value and the second angle value respectively to obtain third information of the first rotation decoding device and fourth information of the second rotation decoding device.
[0098] In one example, the third information includes a third angle value and a first rotation speed, and the fourth information includes a fourth angle value and a second rotation speed.
[0099] In one example, S202 includes: if it is determined that the first fault status information is a non-fault state, performing software phase-locked loop processing on the first angle value to obtain third information of the first rotation decoding device; if it is determined that the second fault status information is a non-fault state, performing software phase-locked loop processing on the second angle value to obtain fourth information of the second rotation decoding device.
[0100] For example, Figure 4 As shown, if the first fault status information F read by RDC1 11 Indicates no fault, then the first angle value θ read11 Perform software phase locked loop (PLL) tracking to obtain processed third information, the third information includes a third angle value θ 12 and speed firstω 12 If RDC2 reads the second fault status information F 21 Indicates no fault, then the second angle value θ read 21 The software phase-locked loop PLL is tracked to obtain the processed fourth information, the fourth information including the fourth angle value θ 22 and the second speed ω 22 .
[0101] S203 . Based on a preset reading cycle, read a fifth angle value of a previous reading cycle of the first angle value and a sixth angle value of a previous reading cycle of the second angle value.
[0102] Exemplarily, the electronic device may read, based on a preset reading cycle, a fifth angle value of a previous reading cycle of the first angle value and a sixth angle value of a previous reading cycle of the second angle value.
[0103] S204, determining a first angle increment value according to the first angle value and the fifth angle value; and determining a second angle increment value according to the second angle value and the sixth angle value.
[0104] For example, Figure 4 As shown, the electronic device determines whether there is a fault in the angle jump. Specifically, the first angle value and the fifth angle value can be subtracted to determine the first angle increment value Δθ1. The second angle value and the sixth angle value can be subtracted to determine the second angle increment value Δθ2.
[0105] S205. Determine a first fault state according to the first angle increment value and a preset angle threshold; and determine a second fault state according to the second angle increment value and the angle threshold; wherein both the first fault state and the second fault state indicate whether an angle deviation fault occurs.
[0106] For example, Figure 4 As shown, the electronic device can compare the first angle increment value with the preset angle threshold to determine the first fault state F 12 The second angle increment value is compared with the angle threshold to determine the second fault state F 22 Among them, the first fault state F 12 and the second fault state F 22 Both indicate whether an angle deviation fault occurs. For example, if it indicates that the angle deviation has not failed or has failed.
[0107] S206. Generate a target angle value according to the first information, the second information, the first fault state, the second fault state, the third information and the fourth information.
[0108] In one example, S206 includes: determining an angle generation mode based on first fault state information in the first information, second fault state information in the second information, the first fault state, and the second fault state; wherein the angle generation mode represents the processing steps for determining the target angle value; generating the target angle value based on the angle generation mode, the first angle value, the second angle value, the first rotational speed in the third information, and the second rotational speed in the fourth information.
[0109] In one example, the angle generation mode includes a first angle generation mode, a second angle generation mode, a third angle generation mode, a fourth angle generation mode, and a fifth angle generation mode; wherein the condition corresponding to the first angle generation mode is that the first fault state information is no fault and the first fault state is no fault; the condition corresponding to the second angle generation mode is that the first fault state information is faulty and the second fault state information is no fault; the condition corresponding to the third angle generation mode is that the first fault state information is faulty and the second fault state information is faulty; the condition corresponding to the fourth angle generation mode is that the first fault state information is no fault, the first fault state is faulty, and the second fault state information is no fault; the condition corresponding to the fifth angle generation mode is that the first fault state information is no fault, the first fault state is faulty, and the second fault state information is faulty.
[0110] In one example, "generating a target angle value according to an angle generation mode, a first angle value, a second angle value, a first rotational speed in the third information, and a second rotational speed in the fourth information" includes: if the angle generation mode is the first angle generation mode, determining the first angle value to be a first target angle value; and determining the first rotational speed to be a first target rotational speed; or, if the angle generation mode is the second angle generation mode, determining the second angle value to be a second target angle value; and determining the second rotational speed to be a second target rotational speed; or, if the angle generation mode is the third angle generation mode, determining the first angle value to be a first target angle value, and determining the first rotational speed to be a third target rotational speed. A target speed; determining the product of the first target speed and a preset reading period, determining the sum of the product and the first target angle value, and determining the sum to be a third target angle value; or, if the angle generation mode is a fourth angle generation mode, determining the second angle value to be a second target angle value; and determining the second speed to be the second target speed; or, if the angle generation mode is a fifth angle generation mode, determining the first angle value to be a first target angle value, and determining the first speed to be the first target speed; determining the product of the first target speed and a preset reading period, determining the sum of the product and the first target angle value, and determining the sum to be a third target angle value.
[0111] For example, Figure 4 As shown, the electronic device can determine the angle generation mode according to the first fault state information in the first information, the second fault state information in the second information, the first fault state, and the second fault state. And in the angle generation mode, according to the first angle value, the second angle value, the first rotation speed in the third information, the second rotation speed in the fourth information, and the preset predefined fusion algorithm, the target angle value is generated, and the target rotation speed can also be generated. Among them, the angle generation mode represents the processing steps for determining the target angle value, and the angle generation mode includes a first angle generation mode, a second angle generation mode, a third angle generation mode, a fourth angle generation mode, and a fifth angle generation mode.
[0112] Figure 5 A flowchart of a method for decoding a resolver provided in this application Figure 5 ,like Figure 5 As shown, if the condition is the first fault state information F 11 No fault and the first fault state F 12 If there is no fault, the angle generation mode is the first angle generation mode. In this mode, the first angle value θ is directly determined. 11 is the first target angle value θ, that is, θ = θ 11 ; and determine the first speed ω 12 is the first target speed ω, that is, ω=ω 12 .
[0113] If the condition is the first fault status information F 11 There is a fault and the second fault status information F 21 If there is no fault, the angle generation mode is the second angle generation mode. In this mode, the second angle value θ is directly determined. 21 is the second target angle value θ, that is, θ = θ 21 ; and determine the second speed ω 22 is the second target speed ω, that is, ω=ω 22 .
[0114] If the condition is the first fault status information F 11 There is a fault and the second fault status information F 21 If there is a fault, the angle generation mode is the third angle generation mode. In this mode, the first angle value θ is determined 11 is the first target angle value θ, that is, θ = θ 11 , determine the first speed ω 12 is the first target speed ω, that is, ω=ω 12 . Determine the first target speed ω 12 and the product of the preset reading period ΔT, and determine the product and the first target angle value θ 11 and determine the sum as the third target angle value θ, that is, θ = θ11 +ω 12 *ΔT.
[0115] If the condition is the first fault status information F 11 There is no fault, and the first fault state F 12 There is a fault, and the second fault status information F 21 If there is no fault, the angle generation mode is the fourth angle generation mode. In this mode, the second angle value θ is directly determined. 21 is the second target angle value θ, that is, θ = θ 21 ; and determine the second speed ω 22 is the second target speed ω, that is, ω=ω 22 .
[0116] If the condition is the first fault status information F 11 There is no fault, and the first fault state F 12 There is a fault, and the second fault status information F 21 If there is a fault, the angle generation mode is the fifth angle generation mode. In this mode, the first angle value θ is determined. 11 is the first target angle value θ, that is, θ = θ 11 , determine the first speed ω 12 is the first target speed ω, that is, ω=ω 12 . Determine the first target speed ω 12 and the product of the preset reading period ΔT, and determine the product and the first target angle value θ 11 and determine the sum as the third target angle value θ, that is, θ = θ 11 +ω 12 *ΔT.
[0117] The resolver decoding processing method provided in the embodiment of the present application reads the first information of the preset first rotary decoding device and the second information of the second rotary decoding device; wherein the first information includes the first angle value and the first fault state information, and the second information includes the second angle value and the second fault state information. The first angle value and the second angle value are respectively processed by software phase-locked loop to obtain the third information of the first rotary decoding device and the fourth information of the second rotary decoding device. Based on the preset reading cycle, the fifth angle value of the previous reading cycle of the first angle value and the sixth angle value of the previous reading cycle of the second angle value are read. According to the first angle value and the fifth angle value, the first angle increment value is determined; according to the second angle value and the sixth angle value, the second angle increment value is determined. According to the first angle increment value and the preset angle threshold, the first fault state is determined; and according to the second angle increment value and the angle threshold, the second fault state is determined; wherein the first fault state and the second fault state both characterize whether the angle deviation fails. According to the first information, the second information, the first fault state, the second fault state, the third information and the fourth information, the target angle value is generated. In this solution, two sets of built-in rotary decoding devices are fully utilized to realize redundant decoding. First, redundant information such as the first information and the second information are read, and then the third information, the fourth information and other redundant information are obtained by superimposing the software phase-locked loop angle processing, and these redundant information are fused to generate the target angle value. Dual hardware decoding redundant resolver processing and solution based on functional safety are realized, and the software phase-locked loop is cooperated to eliminate possible faults or errors, improve the accuracy and reliability of the solution results, so as to achieve the effect of improving the accuracy and reliability of the decoding results.
[0118] Figure 6 A system block diagram of a resolver decoding processing method provided in this application, such as Figure 6 As shown, a chip control unit (MCU) is deployed in the electronic device, and the MCU includes two RDC resolver decoding (Resolver-Digital-Converter, RDC) devices, namely the first rotary decoding device RDC1 and the second rotary decoding device RDC2. RDC1 outputs an excitation signal (EXC1&EXC2) and inputs it to RDC2, and the excitation signal is input to the rotary transformer through the excitation output processing circuit. The rotary transformer generates a SIN signal (S1&S2) and a COS signal (C1&C2) according to the received excitation signal, and inputs the SIN signal (S1&S2) and the COS signal (C1&C2) to the input ends of RDC1 and RDC2 respectively through the SIN input processing circuit and the COS input processing circuit, and then RDC1 and RDC2 both receive the SIN signal (S1&S2) and the COS signal (C1&C2), and RDC1 generates a first angle value θ according to the SIN signal (S1&S2) and the COS signal (C1&C2). 11and the first fault status information F 11 , RDC2 generates a second angle value θ according to the SIN signal (S1&S2) and COS signal (C1&C2) 21 and the second fault status information F 21 .
[0119] exist Figure 6 Based on the embodiment shown, Figure 7 A software module block diagram of a resolver decoding processing method provided in this application, such as Figure 7 As shown, the MCU includes a signal reading module, a data processing module, a fault detection module and a data fusion module. Specifically,
[0120] Signal reading module: MCU reads θ1, θ2 and fault information F of RDC1 and RDC2 respectively 11、 F 21 Among them, F 11、 F 21 They include any one or more of the following: excitation signal failure, input disconnection failure, conversion failure, angle calibration failure, power short / open circuit failure and signal amplitude failure.
[0121] Data processing module: MCU performs software phase-locked loop processing on the angle values read from RDC1 and RDC2 to obtain the angle values and rotation speeds of the two RDCs respectively.
[0122] Fault detection module: According to the angle increments of RDC1 and RDC2, detect the angle jump of RDC1 and RDC2 to determine whether there is a fault and generate fault information.
[0123] Data fusion module: Based on the fault information of the signal reading module and the fault detection module, the final target angle value and speed decoding result are obtained according to the predefined fusion algorithm.
[0124] Figure 8 A structural diagram of a resolver decoding processing device provided in this application is shown in FIG. Figure 8 As shown, the resolver decoding processing device 30 provided in this embodiment includes:
[0125] A reading module 31 is used to read the first information of the preset first rotation decoding device and the second information of the second rotation decoding device; wherein the first information includes the first angle value and the first fault state information, and the second information includes the second angle value and the second fault state information;
[0126] A phase-locked loop module 32, used to perform software phase-locked loop processing on the first angle value and the second angle value respectively to obtain third information of the first rotation decoding device and fourth information of the second rotation decoding device;
[0127] The decoding module 33 is used to perform resolution decoding processing according to the first information, the second information, the third information and the fourth information to generate a target angle value.
[0128] Fig. 9 A schematic diagram of the structure of another resolver decoding processing device provided in an embodiment of the present application, Figure 8 Based on the embodiment shown, Fig. 9 As shown, the third information includes a third angle value and a first rotational speed, and the fourth information includes a fourth angle value and a second rotational speed.
[0129] In a possible implementation, the decoding module 33 includes:
[0130] A reading unit 331, configured to read, based on a preset reading cycle, a fifth angle value of a previous reading cycle of the first angle value and a sixth angle value of a previous reading cycle of the second angle value;
[0131] The first determining unit 332 is used to determine a first angle increment value according to the first angle value and the fifth angle value; and to determine a second angle increment value according to the second angle value and the sixth angle value;
[0132] A second determination unit 333 is used to determine a first fault state according to a first angle increment value and a preset angle threshold value; and to determine a second fault state according to a second angle increment value and the angle threshold value; wherein the first fault state and the second fault state both indicate whether an angle deviation fault occurs;
[0133] The generating unit 334 is used to generate a target angle value according to the first information, the second information, the first fault state, the second fault state, the third information and the fourth information.
[0134] In a possible implementation, the generating unit 334 includes:
[0135] The determination subunit 3341 is used to determine an angle generation mode according to the first fault state information in the first information, the second fault state information in the second information, the first fault state, and the second fault state; wherein the angle generation mode represents a processing step for determining a target angle value;
[0136] The generating subunit 3342 is used to generate a target angle value according to the angle generating mode, the first angle value, the second angle value, the first rotation speed in the third information, and the second rotation speed in the fourth information.
[0137] In a possible implementation, the angle generation mode includes a first angle generation mode, a second angle generation mode, a third angle generation mode, a fourth angle generation mode, and a fifth angle generation mode;
[0138] Among them, the condition corresponding to the first angle generation mode is the first fault state information F 11 No fault and the first fault state F 12 The condition corresponding to the second angle generation mode is that the first fault state information is faulty and the second fault state information is fault-free; the condition corresponding to the third angle generation mode is that the first fault state information is faulty and the second fault state information F 21 is faulty; the condition corresponding to the fourth angle generation mode is that the first fault state information is no fault, and the first fault state is a fault, and the second fault state information is no fault; the condition corresponding to the fifth angle generation mode is that the first fault state information is no fault, and the first fault state is a fault, and the second fault state information is a fault.
[0139] In a possible implementation, the generating subunit 3342 is specifically configured to:
[0140] If the angle generation mode is the first angle generation mode, determining the first angle value as the first target angle value; and determining the first rotation speed as the first target rotation speed;
[0141] Alternatively, if the angle generation mode is the second angle generation mode, the second angle value is determined to be a second target angle value; and the second rotational speed is determined to be a second target rotational speed;
[0142] Alternatively, if the angle generation mode is the third angle generation mode, the first angle value is determined to be the first target angle value, and the first rotation speed is determined to be the first target rotation speed; the product of the first target rotation speed and a preset reading period is determined, the sum of the product and the first target angle value is determined, and the sum is determined to be the third target angle value;
[0143] Alternatively, if the angle generation mode is the fourth angle generation mode, the second angle value is determined to be a second target angle value; and the second rotational speed is determined to be a second target rotational speed;
[0144] Alternatively, if the angle generation mode is the fifth angle generation mode, the first angle value is determined to be the first target angle value, and the first rotational speed is determined to be the first target rotational speed; the product of the first target rotational speed and the preset reading period is determined, the sum of the product and the first target angle value is determined, and the sum is determined to be the third target angle value.
[0145] In a possible implementation, the phase-locked loop module 32 is specifically configured to:
[0146] If it is determined that the first fault state information is a non-fault state, the first angle value is processed by software phase-locked loop to obtain the third information of the first rotation decoding device; if it is determined that the second fault state information is a non-fault state, the second angle value is processed by software phase-locked loop to obtain the fourth information of the second rotation decoding device.
[0147] In a possible implementation, the first fault status information and the second fault status information both include any one or more of the following:
[0148] Excitation signal failure, input disconnection failure, conversion failure, angle calibration failure, power short / open circuit failure, signal amplitude failure.
[0149] The device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and this embodiment will not be described in detail here.
[0150] Fig.10 This is a schematic diagram of the structure of the electronic device provided in this application. Fig.10 As shown, the electronic device 50 provided in this embodiment includes: at least one processor 501 and a memory 502. Optionally, the device 50 also includes a communication component 503. The processor 501, the memory 502 and the communication component 503 are connected via a bus 504.
[0151] In a specific implementation process, at least one processor 501 executes the computer-executable instructions stored in the memory 502, so that at least one processor 501 executes the above method.
[0152] The specific implementation process of the processor 501 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.
[0153] In the above embodiments, it should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the invention may be directly implemented as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.
[0154] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (Non-volatile Memory, NVM), such as at least one disk memory.
[0155] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.
[0156] The present application also provides a computer program product, including a computer program, which implements the above method when executed by a processor.
[0157] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the above method is implemented.
[0158] The above-mentioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.
[0159] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (Application Specific Integrated Circuits, referred to as: ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.
[0160] The division of units is only a logical function division, and there may be other divisions in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.
[0161] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0162] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0163] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0164] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0165] Finally, it should be noted that those skilled in the art will readily conceive of other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses or adaptations of the present invention, which follow the general principles of the present invention and include common knowledge or customary technical means in the art not disclosed by the present invention, are not limited to the precise structure described above and shown in the drawings, and may be modified and changed in various ways without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.
Claims
1. A resolver decoding processing method, characterized in that: include: Reading the first information of the preset first rotary decoding device and the second information of the preset second rotary decoding device; wherein the first information includes the first angle value and the first fault state information, and the second information includes the second angle value and the second fault state information; Performing software phase-locked loop processing on the first angle value and the second angle value respectively to obtain third information of the first rotation decoding device and fourth information of the second rotation decoding device; According to the first information, the second information, the third information and the fourth information, a resolution decoding process is performed to generate a target angle value.
2. The method according to claim 1, characterized in that The third information includes a third angle value and a first rotation speed, and the fourth information includes a fourth angle value and a second rotation speed.
3. The method according to claim 1, characterized in that The performing resolution decoding processing according to the first information, the second information, the third information and the fourth information to generate a target angle value includes: Based on a preset reading cycle, reading a fifth angle value of a previous reading cycle of the first angle value and a sixth angle value of a previous reading cycle of the second angle value; Determine a first angle increment value according to the first angle value and the fifth angle value; determine a second angle increment value according to the second angle value and the sixth angle value; Determine a first fault state according to the first angle increment value and a preset angle threshold; and determine a second fault state according to the second angle increment value and the angle threshold; wherein the first fault state and the second fault state both represent whether an angle deviation fault occurs; A target angle value is generated according to the first information, the second information, the first fault state, the second fault state, the third information, and the fourth information.
4. The method according to claim 3, characterized in that The generating a target angle value according to the first information, the second information, the first fault state, the second fault state, the third information and the fourth information comprises: Determine an angle generation mode according to the first fault state information in the first information, the second fault state information in the second information, the first fault state, and the second fault state; wherein the angle generation mode represents a processing step for determining a target angle value; A target angle value is generated according to the angle generation mode, the first angle value, the second angle value, the first rotation speed in the third information, and the second rotation speed in the fourth information.
5. The method according to claim 4, characterized in that The angle generation modes include a first angle generation mode, a second angle generation mode, a third angle generation mode, a fourth angle generation mode, and a fifth angle generation mode; Among them, the condition corresponding to the first angle generation mode is that the first fault state information is no fault and the first fault state is no fault; the condition corresponding to the second angle generation mode is that the first fault state information is faulty and the second fault state information is no fault; the condition corresponding to the third angle generation mode is that the first fault state information is faulty and the second fault state information is faulty; the condition corresponding to the fourth angle generation mode is that the first fault state information is no fault, the first fault state is faulty, and the second fault state information is no fault; the condition corresponding to the fifth angle generation mode is that the first fault state information is no fault, the first fault state is faulty, and the second fault state information is faulty.
6. The method according to claim 4, characterized in that The generating a target angle value according to the angle generation mode, the first angle value, the second angle value, the first rotation speed in the third information, and the second rotation speed in the fourth information includes: If the angle generation mode is the first angle generation mode, determining the first angle value as a first target angle value; and determining the first rotational speed as a first target rotational speed; Alternatively, if the angle generation mode is the second angle generation mode, determining the second angle value as a second target angle value; and determining the second rotational speed as a second target rotational speed; Alternatively, if the angle generation mode is the third angle generation mode, determining the first angle value as a first target angle value, determining the first rotational speed as a first target rotational speed; determining the product of the first target rotational speed and a preset reading period, determining the sum of the product and the first target angle value, and determining the sum as the third target angle value; Alternatively, if the angle generation mode is the fourth angle generation mode, the second angle value is determined to be the second target angle value; and the second rotational speed is determined to be the second target rotational speed; Alternatively, if the angle generation mode is the fifth angle generation mode, the first angle value is determined to be the first target angle value, and the first rotational speed is determined to be the first target rotational speed; the product of the first target rotational speed and a preset reading period is determined, the sum of the product and the first target angle value is determined, and the sum is determined to be the third target angle value.
7. The method according to claim 1, characterized in that The performing software phase-locked loop processing on the first angle value and the second angle value respectively to obtain third information of the first rotation decoding device and fourth information of the second rotation decoding device includes: If it is determined that the first fault state information is a non-fault state, the first angle value is processed by a software phase-locked loop to obtain the third information of the first rotation decoding device; if it is determined that the second fault state information is a non-fault state, the second angle value is processed by a software phase-locked loop to obtain the fourth information of the second rotation decoding device.
8. The method according to any one of claims 1 to 7, characterized in that: The first fault status information and the second fault status information both include any one or more of the following: Excitation signal failure, input disconnection failure, conversion failure, angle calibration failure, power short / open circuit failure, signal amplitude failure.
9. A resolver decoding processing device, characterized in that: include: A reading module, used to read the first information of the preset first rotary decoding device and the second information of the preset second rotary decoding device; wherein the first information includes a first angle value and first fault state information, and the second information includes a second angle value and second fault state information; a phase-locked loop module, configured to perform software phase-locked loop processing on the first angle value and the second angle value respectively, to obtain third information of the first rotation decoding device and fourth information of the second rotation decoding device; A decoding module is used to perform resolution decoding processing according to the first information, the second information, the third information and the fourth information to generate a target angle value.
10. An electronic device, characterized in that: include: Memory, processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor performs the method according to any one of claims 1 to 8.