Permanent magnet synchronous motor resolver position prediction method
By using the method of rotary change output position difference information and sampling tolerance in a permanent magnet synchronous motor, rotary change position prediction is corrected in real time, and the problem of cumulative error and high-frequency injection method is solved, which improves prediction accuracy and control performance.
Patent Information
- Application Number
- CN202411512992.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-28
- Publication Date
- 2025-02-14
AI Technical Summary
When the prediction period of the existing permanent magnet synchronous motor is increased, the cumulative error causes the predicted position to jump from the actual position, which may cause failures such as control overcurrent. The calculation time of the high-frequency injection method is long and cannot be calculated in real time. Rotor position affects control performance.
By outputting position difference information based on the current cycle and historical rotation position, the sampling tolerance is determined in combination with the current rotation speed of the permanent magnet synchronous motor, the rotation position prediction is corrected in real time, the accumulated error is identified and corrected, and the prediction accuracy is improved.
Real-time and accurate prediction of the rotational position is achieved, cumulative errors are reduced, faults such as overcurrent control are avoided, and motor control performance is improved.
Smart Images

Figure CN119448866A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of resolver control, and more specifically, to a method for predicting the position of a resolver of a permanent magnet synchronous motor. Background Art
[0002] Permanent Magnet Synchronous Motor (PMSM) is a common type of motor that uses permanent magnets to generate magnetic fields to achieve synchronous rotation of the motor. Permanent magnet synchronous motors are generally composed of stators, permanent magnet steel rotors, and resolvers. Resolvers are used as position sensors in motor control systems to measure the rotor position of permanent magnet synchronous motors, namely resolver position. The prediction accuracy of resolver position in permanent magnet synchronous motors is directly related to the motor's control performance, system stability and reliability, efficiency and energy consumption, and the ability to adapt to complex working conditions.
[0003] Chinese patent application No. 201910334924.8, application date 2019.04.24, discloses a method, system and device for moving forward with a rotary transformer fault in an electric vehicle drive system, which uses a rotating high-frequency voltage signal injected into the motor; samples the phase current of the motor, and uses a rotor position observer to estimate the estimated rotor position from the phase current; if the rotary transformer is faulty, the estimated rotor position is used to control the operation of the motor; if the rotary transformer is not faulty, it is determined whether the estimated error between the estimated rotor position and the actual rotor position obtained by the rotary transformer meets the preset error condition; if it is satisfied, the estimated error is used to correct the estimated parameters of the rotor position observer; if it is not satisfied, the estimated error is used to correct the estimated parameters of the rotor position observer. Although the patent adds a method for correcting the estimated error, it does not take into account that the deviation between the estimated position and the actual position will accumulate with the increase of the prediction period. The longer the prediction time, the greater the deviation. When the deviation is too large, the predicted position and the actual position will jump, and it is likely to cause faults such as control overcurrent. In addition, the high-frequency injection method takes a long time to calculate the rotor position and cannot calculate the rotor position in real time, which has a great impact on the control performance. Summary of the invention
[0004] In view of this, the present invention provides a method for predicting the resolver position of a permanent magnet synchronous motor, which can identify the accumulated error of the predicted resolver position in real time and accurately, thereby improving the accuracy of the predicted resolver position.
[0005] In order to achieve the above object, the present invention adopts the following technical scheme:
[0006] In a first aspect, the present invention provides a method for predicting the position of a permanent magnet synchronous motor resolver, the method comprising:
[0007] Determine the resolver output position difference information based on the resolver sampling position of the current cycle and the historical resolver position;
[0008] Determine the sampling tolerance according to the current speed of the permanent magnet synchronous motor;
[0009] The resolver output position corresponding to the current cycle is determined according to the resolver output position difference information, the resolver sampling position of the current cycle and the sampling tolerance.
[0010] The method provided by the present invention does not rely on the fault judgment of the resolver. Regardless of whether a fault is triggered or not, as long as the resolver signal is distorted, the resolver position can be predicted and corrected. The historical resolver position factor is taken into account, and the accumulated error of the predicted resolver position can be identified, thereby improving the accuracy of the predicted resolver position.
[0011] In a possible implementation, determining resolver output position difference information based on the resolver sampling position of the current cycle and the historical resolver position includes:
[0012] Obtain resolver sampling positions and resolver output positions of multiple consecutive cycles from historical resolver positions;
[0013] Generate a corresponding resolver output position difference group based on the resolver sampling position of the current cycle and the resolver sampling positions and resolver output positions of multiple consecutive cycles; wherein the resolver output position difference group includes multiple sub-resolver output position differences, and each sub-resolver output position difference is a position difference between the resolver sampling position of the next cycle and the resolver output position of the previous cycle in two adjacent cycles among the multiple consecutive cycles and the current cycle;
[0014] The resolver output position difference group is used as resolver output position difference information.
[0015] In a possible implementation, determining the resolver output position corresponding to the current period according to the resolver output position difference information, the resolver sampling position of the current period, and the sampling tolerance includes:
[0016] Determine the average resolver output position difference through the resolver output position difference group;
[0017] Determine a first allowable error range based on the average resolver output position difference and the sampling tolerance;
[0018] If the sub-resolver output position difference corresponding to the resolver output position difference group in the current cycle is within the first allowable error range, the resolver sampling position of the current cycle is used as the resolver output position corresponding to the current cycle.
[0019] In a possible implementation, the method further includes:
[0020] If the sub-resolver output position difference corresponding to the resolver output position difference group in the current cycle is not within the first allowable error range, then the second allowable error range is determined by averaging the resolver output position difference and the sampling tolerance; wherein the second allowable error range is greater than the first allowable error range;
[0021] If the sub-resolver output position difference corresponding to the resolver output position difference group in the current cycle is within the second allowable error range, the resolver output position of the current cycle is calculated according to the resolver output position of the previous cycle, the average resolver output position difference, the sampling tolerance and the sub-resolver output position difference corresponding to the resolver output position difference group in the current cycle.
[0022] In a possible implementation, the method further includes:
[0023] If the sub-resolver output position difference corresponding to the resolver output position difference group in the current cycle is not within the second allowable error range, the resolver output position of the current cycle is calculated according to the resolver output position of the previous cycle and the average resolver output position difference.
[0024] In a possible implementation, after calculating the resolver output position of the current cycle according to the resolver output position of the previous cycle and the average resolver output position difference, the method further includes:
[0025] Determine the resolver sampling position difference according to the resolver sampling position of the previous cycle and the resolver sampling position of the current cycle;
[0026] If the resolver sampling position difference is within the first allowable error range, then when the difference between the resolver output position of the current cycle and the resolver sampling position is within the first working range, the resolver output position of the current cycle is adjusted by the sum of the resolver output position of the current cycle and the sampling tolerance;
[0027] When the difference between the resolver output position and the resolver sampling position in the current cycle is within the second working range, the resolver output position in the current cycle is adjusted according to the difference between the resolver output position in the current cycle and the sampling tolerance.
[0028] In a possible implementation, determining the sampling tolerance according to the current speed of the permanent magnet synchronous motor includes:
[0029] Obtain the tolerance coefficient corresponding to the permanent magnet synchronous motor at the current speed;
[0030] The sampling tolerance is calculated based on the tolerance coefficient and the current speed.
[0031] In a second aspect, the present invention provides a motor controller comprising a processor and a memory; the memory stores a computer program or computer instructions that can be loaded by the processor and executed by a method for predicting the position of a permanent magnet synchronous motor transformer such as the first aspect and any possible implementation thereof.
[0032] In a third aspect, the present invention provides a vehicle, comprising the motor controller according to the second aspect.
[0033] In a fourth aspect, the present invention provides a computer-readable storage medium, which stores a computer program or computer instructions that can be loaded by a processor and executed by a method for predicting the position of a permanent magnet synchronous motor transformer such as the first aspect and any possible implementation thereof.
[0034] For the specific description of the second to fourth aspects and their various implementations in the present invention, reference can be made to the detailed description in the first aspect and its various implementations; and for the beneficial effects of the second to fourth aspects and their various implementations, reference can be made to the analysis of the beneficial effects in the first aspect and its various implementations, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the invention and, together with the description, serve to explain the principles of the invention.
[0036] Figure 1 It is a flow chart of a method for predicting the position of a permanent magnet synchronous motor resolver according to an embodiment of the present invention;
[0037] Figure 2 It is a flow chart of a method for obtaining a tolerance coefficient Fac in a method for predicting a position of a permanent magnet synchronous motor resolver according to an embodiment of the present invention;
[0038] Figure 3 It is a flow chart of a method for determining a resolver output position of a current cycle in a method for predicting a resolver position of a permanent magnet synchronous motor according to an embodiment of the present invention;
[0039] Figure 4 It is a flow chart of a method for determining a resolver output position of a current cycle by adding a compensation algorithm in a method for predicting a resolver position of a permanent magnet synchronous motor according to an embodiment of the present invention;
[0040] Figure 5 It is a block diagram of the internal structure of a motor controller according to an embodiment of the present invention. DETAILED DESCRIPTION
[0041] Various exemplary embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be noted that the relative arrangement of components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present invention unless otherwise specifically stated.
[0042] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses.
[0043] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered as part of the specification.
[0044] In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not limiting. Therefore, other examples of the exemplary embodiments may have different values.
[0045] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0046] In the following, the terms "first", "second", etc. are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first", "second", etc. may explicitly or implicitly include one or more of the features.
[0047] Embodiment 1:
[0048] The embodiment of the present invention provides a method for predicting the position of a permanent magnet synchronous motor resolver applied to a motor controller. Figure 1 , which is a flow chart of a method for predicting the position of a permanent magnet synchronous motor resolver provided by an embodiment of the present invention. Figure 1 As shown, the method for predicting the position of a permanent magnet synchronous motor resolver provided by the present invention mainly includes the following steps (steps S101 to S103):
[0049] Step S101, determining resolver output position difference information based on the resolver sampling position of the current cycle and the historical resolver position;
[0050] Step S102, determining a sampling tolerance according to a current rotation speed of the permanent magnet synchronous motor;
[0051] Step S103, determining the resolver output position corresponding to the current cycle according to the resolver output position difference information, the resolver sampling position of the current cycle and the sampling tolerance.
[0052] In this embodiment, the motor controller controls the resolver to continuously sample the motor rotor according to the sampling period, and decodes it through the resolver decoding chip. Each sampling period before the current period corresponds to a resolver sampling position and a resolver output position, and these resolver sampling positions and resolver output positions are historical resolver positions.
[0053] In some optional embodiments, the resolver sampling positions and resolver output positions of multiple continuous cycles are first obtained from the historical resolver positions, wherein the last cycle in the multiple continuous cycles is the previous cycle of the current cycle. Then, a corresponding resolver output position difference group is generated based on the resolver sampling position of the current cycle and the resolver sampling positions and resolver output positions of multiple continuous cycles; wherein the resolver output position difference group includes multiple sub-resolver output position differences, each of which is the position difference between the resolver sampling position of the next cycle and the resolver output position of the previous cycle in two adjacent cycles in the multiple continuous cycles and the current cycle; and then the resolver output position difference group is used as resolver output position difference information.
[0054] For each sampling cycle, the number of sub-resolver output position differences contained in the resolver output position difference group increases by 1. However, if the sub-resolver output position differences are continuously increased, the calculation pressure of the system will increase. Therefore, in order to improve the efficiency of resolver position prediction, the number of sub-resolver output position differences contained in the resolver output position difference group can be limited, as follows:
[0055] If the number of sub-resolver output position differences in the resolver output position difference group exceeds the preset number, the motor controller replaces the earliest added sub-resolver output position difference in the resolver output position difference group with the resolver sampling position P of the current cycle and the resolver output position P of the previous cycle. out '; if the number of sub-resolver output position differences in the resolver output position difference group does not exceed the preset number, the motor controller compares the resolver sampling position P of the current cycle with the resolver output position P of the previous cycle out ' is added to the resolver output position difference group.
[0056] For example, the preset number is set to 10. When a new position difference value is generated, if the number of sub-resolver output position differences in the resolver output position difference group is already 10, it is necessary to replace the earliest sub-resolver output position difference added to the resolver output position difference group with the resolver sampling position P of the current cycle and the resolver output position P of the previous cycle. out 'The position difference between them is δ1, δ1=P-P out '.
[0057] Furthermore, the number of bits x of the resolver decoding chip determines the value range of the decoded digital signal to be [0, 2 x ), if the value of δ1 is not in [0, 2 (x-1) ], that is, δ1 is less than 0 or δ1 is greater than 2 (x-1) , indicating that the resolver sampling position P of the current cycle and the resolver output position P' of the previous cycle are not in the same rotation cycle of the resolver. In this case, δ1 needs to be subtracted by 2. x Afterwards, it is added to the resolver output position difference group.
[0058] For example, the rotor position signal is collected at 10kHz, and sampling positions such as 7, 5, 3, 1, 4095, 4093, and 4091 are obtained successively; assuming x=12, the collected signal can only be between 0 and 4095, and 0 and 4096 overlap. The obtained sub-resolver output position differences are: -2, -2, -2, 4094, -2, and -2. The motor rotor generally changes continuously and evenly, and should all be -2. Since a new cycle has been crossed, 4094-4096=-2 is required.
[0059] Of course, if δ1 is in [0, 2 (x-1) ], it means that the resolver sampling position P of the current cycle is different from the resolver output position P of the previous cycle. out 'In the same rotation cycle of the resolver, there is no need to process δ1 and it can be directly added to the resolver output position difference group.
[0060] In this embodiment, only one input signal, namely the resolved position signal, is needed to correct the position signal when it is disturbed or the resolver system fails; and when an abnormality occurs, the position signal of each cycle is continuously predicted to ensure a smooth transition of the motor control. Compared with predicting when a resolver failure occurs, the accuracy is higher, because the judgment of the resolver failure is based on the relevant threshold set by humans. When there is a failure, it cannot be necessarily considered that the resolver position is unreliable, and when there is no failure, it cannot be necessarily considered that the resolver position is reliable. The reliability of the resolver failure and the position is not necessarily related.
[0061] It should be noted that the control cycle of the current single-chip microcomputer is very short, generally 100us, and due to the inertia of the motor, the position will not change suddenly when calculating the average value of multiple cycles. Therefore, the position delay in the process of calculating the average value of multiple cycles can be ignored, that is, it has almost no effect on the real-time performance of the position.
[0062] In this embodiment, the resolver sampling position P of the current cycle and the resolver sampling position P' of the previous cycle are sampling positions directly calculated from the resolver decoding chip, and the sampling times of the two sampling positions differ by one sampling cycle. When the previous cycle is completed, the value of the resolver sampling position P' of the previous cycle is processed by the algorithm, and the resolver output position P of the previous cycle is output. out '.
[0063] In addition, according to the control object, the steady-state data is sampled separately as a judgment of the algorithm's credible interval, which significantly reduces the possibility of false triggering and reduces the adverse impact of the algorithm on control.
[0064] Embodiment 2:
[0065] With respect to step S102 in the first embodiment, this embodiment needs to first obtain the tolerance coefficient corresponding to the permanent magnet synchronous motor at the current speed, and then calculate the sampling tolerance according to the tolerance coefficient and the current speed. The calculation formula of the sampling tolerance Thd is as follows:
[0066] Thd = Spd × Fac;
[0067] Wherein, Spd represents the current speed, and Fac represents the tolerance coefficient.
[0068] In some optional embodiments, the tolerance coefficient Fac needs to be obtained by processing the data of periodic continuous sampling of the rotary transformer position of the permanent magnet synchronous motor at multiple stable speeds. For specific solutions, please refer to Figure 2 , the scheme mainly includes the following steps (steps S201-S202):
[0069] Step S201, respectively obtaining the position difference δ between the sampling position of the latter cycle and the resolver output position of the previous cycle in all two adjacent cycles within a preset time length at multiple rotation speeds;
[0070] In this embodiment, for different speeds, the preset duration may be the same or different, and the preset duration is related to the sampling period. Assuming that the motor rotor speed is 1000r / min and is set to a stable speed, theoretically the motor rotor changes stably and evenly, that is, δ is a constant value; in actual situations, due to the fact that the rotation of mechanical parts cannot be completely stable, the minimum resolution of rotary sampling, and environmental interference during the sampling process, the actual δ is a value that fluctuates within a certain range. The motor rotor position is continuously sampled at a frequency of 10kHz (at least 10001 cycles), and the value of the position difference δ is calculated (at least 10000).
[0071] Step S202, respectively calculating the mean μ and standard deviation σ of the position difference δ at each speed;
[0072] Step S203, constructing a normal distribution probability density function at each speed based on the mean μ and the standard deviation σ, and drawing a normal distribution curve;
[0073] In step S203, the normal distribution probability density function is Here, e is the base of the natural logarithm, which is approximately 2.71828.
[0074] Step S204, integrating the normal distribution curve at each speed, and taking the value when the probability is a preset value as the sampling tolerance corresponding to each speed;
[0075] In step S204, the preset value may be set to 99%.
[0076] Step S205 , performing linear fitting on the sampling tolerances corresponding to all rotation speeds, and taking the slope as the tolerance coefficient Fac.
[0077] In step S205, linear fitting can be performed using linear fitting tools such as Matlab and Excel to obtain the slope.
[0078] In some optional embodiments, for the calculation of the current speed Spd of the permanent magnet synchronous motor, the speed description can be converted into a mechanical rotation frequency, and the position change δ' between the motor unit speed and a single sampling period is first calculated. The calculation formula of the position change δ' is:
[0079] δ'=Spd0×pp×2 x / 60×Ts;
[0080] Wherein, Spd0 represents the unit speed of the motor, for example, 1r / min, Ts represents the sampling period, pp represents the number of motor pole pairs, x represents the bit of the resolver decoding chip, and 60 represents 1min=60s.
[0081] Then substitute the values of δ' and δ1 into the formula Spd=δ1 / δ' to calculate the current rotation speed Spd.
[0082] Embodiment three:
[0083] With respect to step S103 in the first embodiment, this embodiment provides a specific method for determining the resolver output position of the current cycle based on the average resolver output position difference and the sampling tolerance. Figure 3 , which is a flow chart of a method for determining the output position of a resolver in the current cycle provided by an embodiment of the present invention. Figure 3 As shown, the method mainly includes the following steps (steps S301 to S306):
[0084] Step S301, determining an average resolver output position difference through a resolver output position difference group;
[0085] Step S302, determining a first allowable error range based on the average resolver output position difference and the sampling tolerance;
[0086] Step S303: if the sub-resolver output position difference corresponding to the resolver output position difference group in the current cycle is within the first allowable error range, the resolver sampling position of the current cycle is used as the resolver output position corresponding to the current cycle.
[0087] In this embodiment, the sub-resolver output position difference corresponding to the resolver output position difference group in the current cycle is the resolver sampling position P of the current cycle and the resolver output position P of the previous cycle. out 'The position difference between them is δ1.
[0088] This embodiment adopts a sliding average method to calculate the average value of the sub-resolver output position difference of multiple consecutive periods, which is used as a reference value for position prediction, thereby preventing a large error in the prediction result caused by position signal distortion of one or two periods.
[0089] In some optional embodiments, the average resolver output position difference δ AVG As the center, and with the sampling tolerance Thd as the upper and lower limits, set the first allowable error range [δ AVG -Thd, δ AVG +Thd], and then determine whether δ1 is within [δ AVG -Thd, δ AVG +Thd].
[0090] If δ1 is different from the average resolver output position by δ AVG Although a certain offset occurs, the offset does not exceed the sampling tolerance Thd, that is, δ1 is located in [δ AVG -Thd, δ AVG +Thd], the motor controller will think that the resolver sampling position P of the current cycle meets the credible interval. At this time, the resolver sampling position P of the current cycle can be directly used as the resolver output position P of the current cycle. out Output. Return the resolver output position P of the current cycle according to the credible interval. out , as the basis for updating the resolver output position difference group, can reduce the influence of abnormal data on the mean value array and ensure the validity of the reference range.
[0091] Further, after step S302, as Figure 3 As shown, the following steps are also included:
[0092] Step S304: if the sub-resolver output position difference corresponding to the resolver output position difference group in the current cycle is not within the first allowable error range, determining a second allowable error range by averaging the resolver output position difference and the sampling tolerance; wherein the second allowable error range is greater than the first allowable error range;
[0093] Step S305: if the sub-resolver output position difference corresponding to the resolver output position difference group in the current cycle is within the second allowable error range, the resolver output position of the current cycle is calculated according to the resolver output position of the previous cycle, the average resolver output position difference, the sampling tolerance and the sub-resolver output position difference corresponding to the resolver output position difference group in the current cycle.
[0094] If δ1 exceeds the first allowable error range, that is, δ1 is not within [δ AVG -Thd, δ AVG+Thd], the first allowable error range can be expanded, that is, the second allowable error range can be determined to further determine the error of δ1, and the corresponding resolver output position can be determined according to the error. For example, based on the average resolver output position difference and the sampling tolerance, the second allowable error range is expanded to [δ AVG -2×Thd,δ AVG +2×Thd]. If δ1 is within the second allowable error range, the motor controller believes that the resolver sampling position P of the current cycle meets the semi-credible interval. At this time, the predicted and sampled positions can be used to jointly determine the resolver output position P of the current cycle. out .
[0095] Further, after step S304, as Figure 3 As shown, the following steps are also included:
[0096] Step S306: if the corresponding sub-resolver output position difference in the resolver output position difference group in the current cycle is not within the second allowable error range, the resolver output position of the current cycle is calculated according to the resolver output position of the previous cycle and the average resolver output position difference.
[0097] If δ1 still does not fall within the second allowable error range, the motor controller considers that the resolver sampling position P of the current cycle meets the untrustworthy interval. At this time, the resolver output position P of the current cycle is determined entirely based on the predicted position. out , based on the resolver output position of the previous cycle and the average resolver output position difference, the resolver output position of the current cycle is determined.
[0098] In some optional embodiments, in step S305, the resolver output position of the current cycle is calculated according to the resolver output position of the previous cycle, the average resolver output position difference, the sampling tolerance, and the sub-resolver output position difference corresponding to the resolver output position difference group of the current cycle. Specifically, there are the following two cases:
[0099] (1) If δ1 is greater than δ AVG , then calculate the first intermediate position P b , the first intermediate position P b The calculation formula is P b =P out '+(δ AVG +Thd+δ1) / 2;
[0100] (2) If δ1 is not greater than δ AVG , then calculate the first intermediate position P b , the first intermediate position P b The calculation formula is P b =P out '+(δ AVG -Thd+δ1) / 2.
[0101] Since the number of bits x of the resolver decoding chip determines the value range of the decoded digital signal to be [0, 2 x ), if the calculated first intermediate position P b is a negative number, then directly change P b Assign the value of P out , which will lead to P out The assignment error affects the prediction result. Therefore, it is necessary to b The value and 0 are used to compare P out Assign a value.
[0102] Specifically, if P b is not less than 0, then P out =P b If P b If P is less than 0, out =P b +2 x .
[0103] In some optional embodiments, for calculating the resolver output position of the current cycle according to the resolver output position of the previous cycle and the average resolver output position difference in step S306, the second intermediate position P may be calculated first. c , the second intermediate position P c The calculation formula is P c =P out '+δ AVG .
[0104] Since the number of bits x of the resolver decoding chip determines the value range of the decoded digital signal to be [0, 2 x ), if the calculated second intermediate position P c is a negative number, then directly change P c Assign the value of P out , which will lead to P out The assignment error affects the prediction result. Therefore, it is necessary to c The value and 0 are used to compare P out Assign a value.
[0105] Specifically, if P c is not less than 0, then P out =P c If P c If P is less than 0, out =P c +2 x .
[0106] Furthermore, this embodiment will judge the slope of the sampling position separately. If the sampling slope is within the interval, but the actual output position slope is not within the interval, it is considered that the actual output position credibility is reduced and the sampling position credibility is improved. At this time, measures will be taken to offset the predicted position to the sampling position, use the sampling position to compensate the predicted position, and verify and correct the prediction process, which can avoid the expansion of the cumulative error, reduce the cumulative error, gradually correct it, and make the prediction system return to normal with strong robustness.
[0107] Specifically, after calculating the resolver output position of the current cycle in step S306, it is necessary to determine whether a compensation algorithm needs to be added. Figure 4 , which is a flow chart of a method for determining the output position of a resolver in the current cycle of an increase compensation algorithm provided by an embodiment of the present invention. Figure 4 As shown, the method mainly includes the following steps (steps S401-S402):
[0108] Step S401, determining a resolver sampling position difference according to a resolver sampling position of a previous cycle and a resolver sampling position of a current cycle;
[0109] Step S402: if the resolver sampling position difference is within the first allowable error range, then when the difference between the resolver output position and the resolver sampling position of the current cycle is within the first working range, the resolver output position of the current cycle is adjusted by the sum of the resolver output position of the current cycle and the sampling tolerance; when the difference between the resolver output position and the resolver sampling position of the current cycle is within the second working range, the resolver output position of the current cycle is adjusted by the difference between the resolver output position of the current cycle and the sampling tolerance.
[0110] In step S401, the position difference between the resolver sampling position P of the current cycle and the resolver sampling position P' of the previous cycle, that is, the resolver sampling position difference δ2, δ2 = P-P' is calculated.
[0111] Optionally, the first allowable error range is [δ AVG -Thd, δ AVG +Thd], if δ2 does not belong to [δ AVG -Thd, δ AVG +Thd], the resolver output position P of the current cycle calculated in step S305 is not changed. out If δ2 belongs to [δ AVG -Thd, δ AVG +Thd], then calculate the resolver output position P of the current cycle out The difference between the sampling position P and the resolver position δ3, δ3 = P out-P, continue to judge the relationship between δ3 and the first working range and the second working range, and adjust the resolver output position P of the current cycle according to the relationship between them. out Make compensating adjustments.
[0112] Specifically, the first working range can be set to [-2 (x-1) , 0), the second working range can be set to [0, 2 (x-1) ], if δ3 is between [-2 (x-1) , 0), then P out +Thd is output as the final resolver output position of the current cycle; if δ3 is between [0, 2 (x-1) ], then P out -Thd is output as the final resolver output position of the current cycle.
[0113] It should be noted that if δ3 is neither in [0, 2 (x-1) ], and not in [-2 (x-1) , 0), then there is no need to adjust the resolver output position P of the current cycle. out Make any compensating adjustments.
[0114] Embodiment 4:
[0115] Based on the same inventive concept, the embodiment of the present invention further provides a motor controller 500, the internal structure of the motor controller 500 is as follows: Figure 5 The motor controller 500 includes a memory 501 , a processor 502 and a communication bus 503 ; the memory 501 and the processor 502 are connected via the communication bus 503 .
[0116] The memory 501 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 501 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function, and instructions for implementing the method for predicting the position of a permanent magnet synchronous motor resolver provided in the above embodiment, etc.; the data storage area may store data involved in the method for predicting the position of a permanent magnet synchronous motor resolver provided in the above embodiment, etc.
[0117] The processor 502 may include one or more processing cores. The processor 502 executes various functions and processes data of the present invention by running or executing instructions, programs, code sets or instruction sets stored in the memory 501, calling the data stored in the memory 501. The processor 502 may be at least one of an application-specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), a programmable logic device (PLD), a field programmable gate array (FPGA), a central processing unit (CPU), a controller, a microcontroller and a microprocessor. It is understandable that for different devices, the electronic device used to implement the above-mentioned processor function may also be other, and the embodiment of the present invention is not specifically limited.
[0118] The communication bus 503 may include a path to transmit information between the above components. The communication bus 503 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The communication bus 503 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one double arrow is used in the diagram, but it does not mean that there is only one bus or one type of bus. Figure 5 The motor controller shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0119] Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a partial structure related to the scheme of the present invention, and does not constitute a limitation on the motor controller to which the scheme of the present invention is applied. The specific motor controller may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0120] Embodiment five:
[0121] Based on the fifth embodiment, the embodiment of the present invention further provides a vehicle including the motor controller described in the fourth embodiment.
[0122] Embodiment six:
[0123] In particular, according to an embodiment of the present invention, the process described in the above flowchart may be implemented as a computer software program.
[0124] The technical solution of the present invention, in essence, 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, and the computer software product is stored in a storage medium, that is, the embodiment of the present invention also provides a computer-readable storage medium, which includes a number of computer programs or computer instructions, which are used to enable an electronic device (which can be a personal computer, server or network device, etc.) or a processor to perform all or part of the steps of the methods of various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory, random access memory, disk or optical disk, etc., various media that can store program codes.
[0125] Embodiment seven:
[0126] Embodiments of the present invention also include a computer program product, which includes a computer program carried on a computer readable medium, the computer program including a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network, and / or installed from a removable medium. When the computer program is executed by a central processing unit (CPU), various functions defined in the present invention are executed.
[0127] Although some specific embodiments of the present invention have been described in detail by way of example, it will be appreciated by those skilled in the art that the above examples are for illustration only and are not intended to limit the scope of the present invention. It will be appreciated by those skilled in the art that the above embodiments may be modified without departing from the scope and spirit of the present invention. The scope of the present invention is defined by the appended claims.
Claims
1. A method for predicting the position of a permanent magnet synchronous motor resolver, characterized in that: include: Determine the resolver output position difference information based on the resolver sampling position of the current cycle and the historical resolver position; Determine the sampling tolerance according to the current speed of the permanent magnet synchronous motor; The resolver output position corresponding to the current cycle is determined according to the resolver output position difference information, the resolver sampling position of the current cycle and the sampling tolerance.
2. The method for predicting the position of a permanent magnet synchronous motor resolver according to claim 1, characterized in that: The determining of the resolver output position difference information based on the resolver sampling position of the current cycle and the historical resolver position includes: Obtain resolver sampling positions and resolver output positions of multiple consecutive cycles from historical resolver positions; Generate a corresponding resolver output position difference group based on the resolver sampling position of the current cycle and the resolver sampling positions and resolver output positions of multiple consecutive cycles; wherein the resolver output position difference group includes multiple sub-resolver output position differences, each of which is a position difference between the resolver sampling position of the next cycle and the resolver output position of the previous cycle in two adjacent cycles among the multiple consecutive cycles and the current cycle; The resolver output position difference group is used as the resolver output position difference information.
3. The method for predicting the position of a permanent magnet synchronous motor resolver according to claim 2, characterized in that: Determining the resolver output position corresponding to the current cycle according to the resolver output position difference information, the resolver sampling position of the current cycle and the sampling tolerance comprises: Determining an average resolver output position difference through the resolver output position difference group; Determine a first allowable error range based on the average resolver output position difference and the sampling tolerance; If the sub-resolver output position difference corresponding to the resolver output position difference group of the current cycle is within the first allowable error range, the resolver sampling position of the current cycle is used as the resolver output position corresponding to the current cycle.
4. The method for predicting the position of a permanent magnet synchronous motor resolver according to claim 3, characterized in that: Also includes: If the sub-resolver output position difference corresponding to the resolver output position difference group in the current period is not within the first allowable error range, determining a second allowable error range by using the average resolver output position difference and the sampling tolerance; wherein the second allowable error range is greater than the first allowable error range; If the sub-resolver output position difference corresponding to the current cycle in the resolver output position difference group is within the second allowable error range, the resolver output position of the current cycle is calculated according to the resolver output position of the previous cycle, the average resolver output position difference, the sampling tolerance and the sub-resolver output position difference corresponding to the current cycle in the resolver output position difference group.
5. The method for predicting the position of a permanent magnet synchronous motor resolver according to claim 4, characterized in that: Also includes: If the sub-resolver output position difference corresponding to the resolver output position difference group in the current cycle is not within the second allowable error range, the resolver output position of the current cycle is calculated according to the resolver output position of the previous cycle and the average resolver output position difference.
6. The method for predicting the position of a permanent magnet synchronous motor resolver according to claim 5, characterized in that: After calculating the resolver output position of the current cycle according to the resolver output position of the previous cycle and the average resolver output position difference, the method further includes: Determine a resolver sampling position difference according to the resolver sampling position of the previous cycle and the resolver sampling position of the current cycle; If the resolver sampling position difference is within the first allowable error range, then when the difference between the resolver output position of the current cycle and the resolver sampling position is within the first working range, adjusting the resolver output position of the current cycle by the sum of the resolver output position of the current cycle and the sampling tolerance; When the difference between the resolver output position and the resolver sampling position of the current cycle is within the second working range, the resolver output position of the current cycle is adjusted according to the difference between the resolver output position of the current cycle and the sampling tolerance.
7. The method for predicting the position of a permanent magnet synchronous motor resolver according to any one of claims 1 to 6, characterized in that: Determining the sampling tolerance according to the current speed of the permanent magnet synchronous motor includes: Obtaining a tolerance coefficient corresponding to the permanent magnet synchronous motor at the current speed; The sampling tolerance is calculated according to the tolerance coefficient and the current rotation speed.
8. A motor controller, characterized in that: including a processor and a memory; The memory stores a computer program or computer instructions that can be loaded by the processor and executed by the method for predicting the position of a permanent magnet synchronous motor resolver as described in any one of claims 1 to 7.
9. A vehicle, characterized in that: Comprising a motor controller as claimed in claim 8.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program or computer instructions that can be loaded by a processor and execute the method for predicting the position of a permanent magnet synchronous motor resolver as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Advancing method, system and device for fault of rotary transformer of electric drive system for vehicle
CN110061672A