A method, system, product, and medium for overload protection suitable for permanent magnet synchronous motors
Patent Information
- Application Number
- CN202611129622.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-28
- Publication Date
- 2026-10-13
AI Technical Summary
而电机在不同电流倍率下的散热条件和热容量存在差异,在偏离标定工作点的电流区间,计算得到的保护动作时间与电机实际允许的过载时间之间产生偏差,部分区间保护动作时间短于实际耐受时间而限制电机短时过载能力,另一部分区间保护动作时间长于实际耐受时间而使电机面临热损坏风险
[0025]1、由于采用了多个过载曲线样本点反算保护时间常数K形成K值样本集合、对K值样本集合拟合指数衰减函数得到随电流百分比连续变化的拟合参数、驱动器根据实时电流百分比和拟合参数计算当前K值代入反时限保护公式得到保护时间并据此更新热累计触发报警的技术手段,所以保护时间常数K可随电流百分比变化以匹配电机在不同过载区间的耐受特性,有效解决了现有技术中固定K值仅能匹配单一工作点、偏离标定区间的保护动作时间与电机实际允许过载时间偏差较大的问题,进而实现了全电流范围内保护动作时间与电机实际过载耐受时间的贴合。
Smart Images

Figure CN122908074A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of motor control, and in particular to an overload protection method, system, product, and medium suitable for permanent magnet synchronous motors. Background Technology
[0002] Permanent magnet synchronous motors are widely used in servo drives, industrial robots, and CNC machine tools due to their high power density and efficiency. During motor operation, load fluctuations may cause the current to exceed the rated value for extended periods, leading to problems such as excessive winding temperature rise or demagnetization of the permanent magnets. Therefore, motor drive systems need to be equipped with overload protection functions to allow for short-term overloads while protecting against prolonged overloads.
[0003] In existing overload protection technologies for permanent magnet synchronous motors, inverse time protection is a common method. This method calculates a fixed protection time constant based on a specific current on the motor overload curve and the protection time operating point. This fixed constant is written into the driver, which uses this fixed protection time constant in conjunction with the real-time current to calculate the protection action time at various current levels using the inverse time formula, and then performs the protection judgment accordingly.
[0004] Since the aforementioned fixed protection time constant is calibrated using a single current operating point, the shape of the protection curve determined by this constant remains unchanged throughout the entire current range. However, the heat dissipation conditions and heat capacity of the motor vary at different current ratios. In current ranges deviating from the calibrated operating point, a deviation occurs between the calculated protection action time and the motor's actual allowable overload time. In some ranges, the protection action time is shorter than the actual withstand time, limiting the motor's short-term overload capacity; in other ranges, the protection action time is longer than the actual withstand time, exposing the motor to the risk of thermal damage. Summary of the Invention
[0005] This application provides an overload protection method, system, product, and medium suitable for permanent magnet synchronous motors, used to reduce the deviation between the protection action time in each current range and the actual allowable overload time of the motor.
[0006] Firstly, this application provides an overload protection method for permanent magnet synchronous motors, applied to a motor drive system including a servo driver and a permanent magnet synchronous motor. The method includes: acquiring overload curve sample points of the permanent magnet synchronous motor; calculating the protection time constant corresponding to each overload curve sample point according to the inverse time protection formula; forming a K-value sample set by combining the protection time constants K corresponding to each current percentage; fitting an exponential decay function to the K-value sample set to obtain fitting parameters, which include an amplitude coefficient, a decay rate coefficient, and an offset constant; calculating the stator current amplitude based on the direct-axis feedback current and quadrature-axis feedback current of the permanent magnet synchronous motor, and converting the stator current amplitude into the current current percentage; when the current current percentage reaches an overload threshold, calculating the current protection time constant K based on the current current percentage and the fitting parameters; substituting the current protection time constant K and the current current percentage into the inverse time protection formula to calculate the current protection time; updating the motor thermal accumulation value in each preset protection cycle according to the current protection time; and triggering a motor overload alarm when the motor thermal accumulation value reaches an alarm threshold.
[0007] In the above embodiment, the protection time constant K corresponding to each current percentage is calculated by back-calculating multiple overload curve sample points, and an exponential decay function is fitted to the K value sample set, enabling the driver to calculate the K value matching the current level based on the real-time current percentage. During actual motor operation, the low overload range corresponds to a larger K value and a longer protection time, allowing the motor to maintain short-term operation under slight overload; the high overload range corresponds to a smaller K value and a shorter protection time, enabling the driver to trigger an alarm in time before the motor winding temperature rises to a dangerous level. This method allows the same set of protection parameters to cover the overload tolerance characteristics of the motor under different load impact conditions, reducing false protection in the low overload range and protection lag in the high overload range.
[0008] In conjunction with some embodiments of the first aspect, in some embodiments, the step of fitting an exponential decay function to a K-value sample set to obtain fitting parameters specifically includes: based on the physical characteristic that the protection time constant K decreases monotonically with increasing current percentage and is always positive, establishing parameter constraints that the amplitude coefficient is greater than zero, the decay rate coefficient is less than or equal to zero, and the offset constant is greater than zero; under the parameter constraints, taking the minimization of the sum of squared residuals between the protection time constant K of each sample point in the K-value sample set and the output value of the exponential decay function at the corresponding current percentage as the optimization objective, iteratively optimizing the three fitting parameters to be solved; stopping the iteration when the change in the sum of squared residuals during the iteration process is less than a preset convergence threshold, and outputting the current amplitude coefficient, decay rate coefficient, and offset constant as fitting parameters.
[0009] In the above embodiments, parameter constraints are introduced when fitting the exponential decay function to ensure that the fitted K value remains monotonically decreasing and always positive throughout the entire current range. In actual motor overload scenarios, this constraint ensures that the larger the current, the shorter the protection time, avoiding abnormally increased protection time in a certain current range due to fitting deviation, and preventing the motor from facing the risk of winding overheating or permanent magnet demagnetization due to prolonged operation in that range. By iteratively solving by minimizing the sum of squared residuals and terminating at the convergence threshold, this fitting process can obtain a continuous K-value curve that conforms to the thermal characteristic trend of the motor under limited sample points, which is suitable for engineering scenarios where only a small number of overload curve feature points can be obtained.
[0010] In conjunction with some embodiments of the first aspect, in some embodiments, the step of updating the motor thermal accumulation value according to the current protection time in each preset protection cycle, and triggering a motor overload alarm when the motor thermal accumulation value reaches an alarm threshold, specifically includes: converting the current protection time into a thermal accumulation time parameter expressed in a preset time unit; within each preset protection cycle, using the ratio of the preset thermal accumulation base value to the thermal accumulation time parameter as the thermal accumulation increment for the current cycle, adding the thermal accumulation increment to the motor thermal accumulation value to obtain the updated motor thermal accumulation value, and limiting the updated motor thermal accumulation value to a non-negative range; triggering a motor overload alarm when the updated motor thermal accumulation value reaches an alarm threshold.
[0011] In the above embodiment, the protection time calculated by the inverse time formula is converted into a thermal accumulation increment under discrete protection cycles, enabling the driver to update the motor thermal accumulation value in fixed steps within each protection cycle. During motor operation, when the load current remains in the overload range, the thermal accumulation value increases cycle by cycle at a rate inversely proportional to the protection time. The higher the current ratio, the faster the thermal accumulation increases, consistent with the temperature rise trend caused by copper losses in the motor windings. When the motor recovers to below the rated current after a short-term load impact, the thermal accumulation value gradually decreases through cooling, avoiding false alarms triggered by brief overloads. This method enables the driver to complete the thermal accumulation update within millisecond-level protection cycles, meeting the real-time protection response requirements of servo drive systems.
[0012] In conjunction with some embodiments of the first aspect, in some embodiments, after the step of fitting an exponential decay function to the K-value sample set to obtain fitting parameters, the method further includes: normalizing each parameter in the fitting parameters to obtain a normalized ratio value corresponding to each parameter; discretizing each normalized ratio value into a parameter index, and splicing them according to a preset bit-domain structure to form a fixed-length compressed parameter data; writing the compressed parameter data into the encoder non-volatile memory of the permanent magnet synchronous motor; reading the compressed parameter data from the encoder non-volatile memory during power-on initialization, splitting the compressed parameter data according to the preset bit-domain structure to obtain each parameter index, restoring each parameter index to a normalized ratio value, and then performing inverse normalization processing to recover the fitting parameters.
[0013] In the above embodiments, the fitted parameters are normalized and discretized into parameter indices, which are then concatenated into fixed-length compressed parameter data according to a preset bit-domain structure and stored in the encoder's non-volatile memory. In engineering scenarios involving mixed production lines of multiple motor models or on-site motor replacement, each motor's encoder carries corresponding overload protection parameters. When the driver is powered on and initialized, these parameters are read and denormalized to restore the fitted parameters, enabling protection to be performed according to the actual overload characteristics of the connected motor. This method eliminates the need for the driver firmware to pre-store complete overload curve tables for different motor models, reducing driver storage space requirements and firmware version maintenance workload. It is suitable for applications where the same driver platform can accommodate multiple power levels of permanent magnet synchronous motors.
[0014] In conjunction with some embodiments of the first aspect, in some embodiments, the step of discretizing each normalized ratio value into parameter indices and splicing them according to a preset bit-field structure to form compressed parameter data of a fixed length specifically includes: performing logarithmic operations on fitting parameters whose value ranges span multiple orders of magnitude, performing linear normalization within a preset logarithmic value range to obtain the corresponding normalized ratio value; performing linear normalization directly on fitting parameters whose value ranges are within the same order of magnitude within their respective preset linear value ranges to obtain the corresponding normalized ratio value; assigning differentiated index bit widths to each parameter according to the degree of influence of each fitting parameter on the calculation accuracy of the current protection time, uniformly discretizing each normalized ratio value into the corresponding parameter index according to its assigned index bit width; sequentially splicing the bit fields of each parameter index according to the assigned index bit width to obtain compressed parameter data, and splitting the compressed parameter data into multiple storage values adapted to the storage interface bit width for storage.
[0015] In the above embodiments, the corresponding normalization method is selected according to the differences in the numerical range of each fitted parameter. Logarithmic normalization is used for parameters spanning multiple orders of magnitude to reduce the impact of large-scale numerical changes on discretization accuracy, while linear normalization is used for parameters of the same order of magnitude. Differentiated index bit widths are allocated to each parameter based on its impact on the accuracy of the protection time calculation, ensuring a reasonable distribution of limited storage bits among the parameters. Under engineering conditions where the encoder's non-volatile memory capacity is limited, this method can store all fitted parameters describing a complete overload protection curve within two 16-bit storage units, while maintaining the protection time calculation accuracy after driver inversion to meet the engineering requirements of motor overload protection.
[0016] In conjunction with some embodiments of the first aspect, in some embodiments, after the step of fitting an exponential decay function to obtain fitting parameters for a set of K-value samples, the method further includes: calculating the fitting error between the protection time constant K of each sample point in the set of K-value samples and the fitting K value calculated based on the fitting parameters at the current percentage of that sample point; when the fitting error of any sample point exceeds a preset error threshold or any parameter in the fitting parameters exceeds its preset reasonable value range, performing parameter anomaly handling, which includes at least one of the following: performing amplitude limiting processing on fitting parameters that exceed the range, adjusting the parameter value range and then re-performing function fitting, adding sample points to the overload curve sample points and then re-performing inverse calculation and function fitting, and adopting a standard lookup table protection mode.
[0017] In the above embodiments, the fitting error of each sample point is calculated after fitting is completed, and the fitting result is quantitatively verified. In engineering scenarios where motor parameters are written in batches on the production line, if the fitting deviation of a certain set of overload curve sample points exceeds a preset threshold due to data anomalies, the parameter generation end can detect the anomaly and perform corresponding processing before writing it into the memory, including limiting amplitude, refitting, supplementing sample points, or falling back to the standard lookup table protection mode. This verification mechanism avoids the situation where the protection action time does not match the actual withstand time of the motor after writing protection parameters with excessive deviations into the motor memory, reducing the risk of motor overheating damage or frequent false alarms due to parameter anomalies.
[0018] In conjunction with some embodiments of the first aspect, in some embodiments, the step of calculating the current protection time constant K based on the current current percentage and the fitted parameters, and substituting the current protection time constant K and the current current percentage into the inverse time protection formula to calculate the current protection time specifically includes: substituting the current current percentage into the exponential decay function determined by the fitted parameters to obtain the current protection time constant K; converting the current current percentage into the current current multiplier, and calculating the original protection time based on the current protection time constant K and the current current multiplier; applying gain correction and bias correction to the original protection time to obtain the corrected protection time, and applying minimum protection time limiting to the corrected protection time to obtain the current protection time.
[0019] In the above embodiment, after substituting the current current percentage into the exponential decay function to obtain the current K value, the original protection time is calculated using the inverse-time formula, and then gain correction, bias correction, and minimum protection time limit are applied. In different application scenarios, motor installation conditions, ambient temperature, and heat dissipation methods vary. Gain correction and bias correction provide engineers with a means to adjust the protection margin; the minimum protection time limit preserves a safe response time for the driver and motor at extremely high current rates, preventing excessively short protection times from causing heat accumulation to trigger abruptly within a single protection cycle. This method, while maintaining the inverse-time protection principle, adapts to the differentiated protection margin requirements of different motor installation conditions and driver hardware conditions.
[0020] In a second aspect, embodiments of this application provide a motor drive system, the motor drive system comprising: one or more processors and a memory; the memory is coupled to the one or more processors, the memory being used to store computer program code, the computer program code including computer instructions, the one or more processors calling the computer instructions to cause the motor drive system to perform the method described in the first aspect and any possible implementation thereof.
[0021] Thirdly, embodiments of this application provide a computer-readable storage medium including instructions that, when executed on a motor drive system, cause the motor drive system to perform the method described in the first aspect and any possible implementation thereof.
[0022] Fourthly, embodiments of this application provide a computer program product containing instructions that, when the computer program product is run on a motor drive system, cause the motor drive system to perform the method described in the first aspect and any possible implementation thereof.
[0023] Understandably, the motor drive system provided in the second aspect, the computer storage medium provided in the third aspect, and the computer program product provided in the fourth aspect are all used to execute the methods provided in the embodiments of this application. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods, and will not be repeated here.
[0024] One or more technical solutions provided in the embodiments of this application have at least the following technical effects or advantages:
[0025] 1. By employing multiple overload curve sample points to back-calculate the protection time constant K to form a K-value sample set, fitting an exponential decay function to the K-value sample set to obtain fitting parameters that continuously change with the current percentage, and having the driver calculate the current K value based on the real-time current percentage and fitting parameters, substitute it into the inverse time protection formula to obtain the protection time, and update the thermal accumulation trigger alarm accordingly, the protection time constant K can change with the current percentage to match the motor's tolerance characteristics in different overload ranges. This effectively solves the problem in existing technologies where a fixed K value can only match a single operating point, and the protection action time deviates significantly from the actual allowable overload time of the motor when it deviates from the calibration range. Thus, it achieves a close match between the protection action time and the actual overload tolerance time of the motor within the entire current range.
[0026] 2. By adopting the physical characteristic that the K value is monotonically decreasing and always positive, the parameter constraints are established with the amplitude coefficient being greater than zero, the attenuation rate coefficient being less than or equal to zero, and the offset constant being greater than zero. Under the constraints, the fitting parameters are iteratively solved with the goal of minimizing the sum of squared residuals and the iteration stops at the convergence threshold. Therefore, the fitting function maintains the K value being monotonically decreasing and positive throughout the entire current range. This effectively solves the problem in the existing technology where the lack of physical constraints in fitting a small number of sample points leads to an abnormal increase in the protection time in some current ranges and the risk of overheating of the motor windings or demagnetization of the permanent magnet. As a result, a continuous K value curve that conforms to the trend of the motor's thermal characteristics is generated.
[0027] 3. By adopting the technical means of converting the protection time into a thermal accumulation time parameter, updating the motor thermal accumulation value cycle by cycle with the ratio of the preset thermal accumulation base value to the thermal accumulation time parameter as the thermal accumulation increment in each protection cycle and limiting it to a non-negative range, and triggering an alarm when the alarm threshold is reached, the higher the current, the faster the thermal accumulation increases, and the thermal accumulation can be gradually released when the current recovers to below the rated value. This effectively solves the problems of inconsistency between the accumulated alarm time and the target protection time when the continuous protection time is mapped to the embedded discrete protection cycle in the existing technology, and the easy triggering of false alarms by short-term impact loads. Thus, the numerical correspondence between the thermal accumulation alarm time and the inverse time protection time under the millisecond-level protection cycle is realized. Attached Figure Description
[0028] Figure 1 This is a block diagram of the overload protection system in the embodiments of this application;
[0029] Figure 2 This is an overall flowchart of the overload protection algorithm in the embodiments of this application;
[0030] Figure 3 This is a flowchart illustrating an overload protection method for permanent magnet synchronous motors in an embodiment of this application.
[0031] Figure 4This is a schematic diagram of a 32-bit compressed storage structure in an embodiment of this application;
[0032] Figure 5 This is a flowchart of driver parameter reading and denormalization in an embodiment of this application;
[0033] Figure 6 This is another flowchart illustrating an overload protection method applicable to permanent magnet synchronous motors in this application embodiment;
[0034] Figure 7 This is a flowchart of the parameter generation end in the embodiments of this application;
[0035] Figure 8 This is a flowchart of the real-time overload protection of the driver in the embodiments of this application;
[0036] Figure 9 This is a schematic diagram of the motor overload characteristic curve in an embodiment of this application;
[0037] Figure 10 This is a schematic diagram of the physical device structure of a motor drive system in an embodiment of this application. Detailed Implementation
[0038] The terminology used in the following embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. As used in the specification of this application, the singular expressions “a,” “an,” “the,” “the,” and “this” are intended to include the plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in this application refers to any or all possible combinations including one or more of the listed items.
[0039] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.
[0040] To facilitate understanding, the application scenarios of the embodiments of this application are described below.
[0041] Please see Figure 1 This is a block diagram of the overload protection system in an embodiment of this application. Figure 1As shown, the overload protection system involved in this application embodiment comprises three parts: a parameter generation end, a parameter storage end, and a driver operation end. The parameter generation end includes a motor overload curve sample point input module, a K-value inverse calculation module, a K-value exponential fitting module, a parameter normalization and discretization module, a parameter compression and packaging module, and an electrically erasable programmable read-only memory (EEPROM) writing module or a motor parameter writing module. The parameter generation end can be host computer software, debugging software, or a production line parameter tool. The parameter storage end includes a non-volatile memory, which can be an encoder EEPROM or a motor parameter area. The driver operation end includes a driver parameter reading module, a parameter inverse normalization module, a driver real-time overload protection module, a current sampling module, a motor overload thermal accumulation module, a driver overload thermal accumulation module, and an alarm output module. The driver operation end runs in the microcontroller or digital signal processor of the servo driver. In the data flow, the motor overload curve sample point input module sends the current percentage and protection time samples to the K-value inverse calculation module. The K-value inverse calculation module calculates the protection time constant K corresponding to each sample point. The K-value exponential fitting module fits the curve parameters based on multiple K-value samples. The parameter normalization and discretization module converts the fitted parameters into a normalized index. The parameter compression and packaging module compresses the index into storage parameters and writes them to non-volatile memory via an electrically erasable programmable read-only memory writing module or a motor parameter writing module. When the driver is powered on or initialized, the driver parameter reading module reads the compressed overload protection parameters from the non-volatile memory, the parameter inverse normalization module recovers the fitted parameters, and sends them to the driver real-time overload protection module. The current sampling module provides real-time current information to the driver real-time overload protection module, which calculates the current protection time. The motor overload thermal accumulation module updates the thermal accumulation value based on the protection time. The alarm output module outputs a motor overload alarm when the thermal accumulation value reaches the alarm threshold. The driver operating end may also include a driver overload thermal accumulation module, which is used to calculate the motor thermal accumulation and driver thermal accumulation separately within the same protection cycle, and trigger the motor overload alarm and driver overload alarm separately, so as to independently judge the thermal risk of motor windings and the thermal risk of driver power devices.
[0042] Please see Figure 2 This is a flowchart illustrating the overall overload protection algorithm in this application embodiment. Figure 2As shown, the overload protection algorithm provided in this application embodiment is generally divided into four stages: parameter generation, parameter storage, driver initialization, and real-time protection. In the parameter generation stage, the parameter generation terminal inputs sample points of the motor overload curve, calculates the protection time constant K corresponding to each sample point according to the inverse time formula, and fits curve parameters describing the relationship between K and the current percentage. Then, the fitted parameters are normalized and discretized, and finally compressed into storage parameters. In the parameter storage stage, the parameter generation terminal writes the compressed storage parameters into non-volatile memory or the motor parameter area. In the driver initialization stage, the driver reads the stored parameters, reverse-engineers and recovers the curve parameters, and saves them as the motor overload protection parameters for runtime. In the real-time protection stage, the driver samples the motor current according to the protection cycle, calculates the current protection time based on the recovered fitted parameters, updates the motor thermal accumulation value, and outputs a motor overload alarm when the thermal accumulation value reaches the alarm threshold; otherwise, it continues the protection calculation for the next cycle. The specific steps corresponding to the above four stages in this application embodiment will be described in detail below.
[0043] To facilitate understanding, the method provided in this implementation will be described in detail below, using the above scenario as an example. Please refer to [link / reference]. Figure 3 This is a flowchart illustrating an overload protection method for permanent magnet synchronous motors in this application embodiment.
[0044] S301. Obtain the overload curve sample points of the permanent magnet synchronous motor. Calculate the protection time constant corresponding to each overload curve sample point according to the inverse time protection formula. Combine the protection time constants K corresponding to each current percentage into a K-value sample set.
[0045] Among them, the overload curve sample points refer to the data pairs of current percentage and corresponding protection action time selected from the motor overload characteristic curve; the inverse time protection formula is T=K / (m^n−1), which is used to describe the inverse proportional relationship between the protection action time T and the current ratio m; the protection time constant K is used to represent the parameter in the inverse time protection formula that controls the speed of the protection action time; the K value sample set refers to the data set consisting of the current percentage Pi of each sample point and its corresponding Ki calculated in reverse.
[0046] First, obtain sample points for the motor overload curve. These sample points can come from the motor manufacturer's specifications, experimental test data, existing protection curves, or engineering targets. Each sample point includes a current percentage Pi and a corresponding protection action time Ti, where Pi is in percentage and Ti is in seconds.
[0047] The sample point set is represented as
[0048] ,
[0049]
[0050] m is the number of sample points.
[0051] The selected sample points should be three or more, covering the low overload, medium overload, and high overload regions respectively. The sample points should satisfy the following conditions: Pi > 100%, Ti > 0, and overall, the protection action time decreases as the current percentage increases.
[0052] The protection time constant K is calculated from the sample points, without directly fitting the protection action time T. Instead, the protection time constant K is first calculated from each sample point according to the inverse time protection formula. The inverse time protection formula is:
[0053]
[0054] Where T is the protection action time, K is the protection time constant, Is is the current, Ie is the motor rated current, and n is the inverse time exponent. For motor overload protection, n can be 2 to reflect the heating characteristic of the square of the current, or it can be set to other positive numbers according to the motor's thermal characteristics.
[0055] Let the current multiplier of the i-th sample point be:
[0056]
[0057] Where Pi is the current percentage at the i-th sample point, the protection time constant corresponding to the i-th sample point is:
[0058]
[0059] When n is 2
[0060]
[0061] This step transforms the original "current percentage - protection action time" sample into a "current percentage - protection time constant K" sample. The technical advantage of this is that it preserves the physical constraints of the inverse time-limit formula and reduces errors caused by large numerical ranges when directly fitting protection action times.
[0062] In some embodiments, overload curve sample points can be obtained and the protection time constant K can be calculated in reverse in various ways: Optionally, engineers can manually select sample points covering low, medium, and high overload zones from the overload characteristic curve diagram in the motor manufacturer's specifications. The parameter generation terminal calculates the K value for each sample point using Ki=Ti×(mi²−1) and forms a K value sample set. Optionally, the continuous running time when the winding temperature reaches the upper limit can be recorded at multiple overload current levels through motor temperature rise experiments as sample points, and the parameter generation terminal automatically completes the K value calculation. It is understood that other methods can also be used to obtain sample points, such as importing from an existing database, which is not limited here.
[0063] S302. Fit the K-value sample set with an exponential decay function to obtain the fitting parameters.
[0064] Wherein, the K-value sample set refers to the {(Pi, Ki)} data set obtained by back-calculation in step S301; the exponential decay function is in the form of K(P)=a×e^(b×P)+c; the amplitude coefficient a is used to adjust the amplitude of the K-value curve; the decay rate coefficient b is used to adjust the decay rate of the K-value as the current percentage increases; and the offset constant c is used to adjust the baseline offset of the K-value curve in the high current region.
[0065] After completing the inverse calculation of the K value, multiple sample points of "current percentage - protection time constant K" are obtained, i.e.
[0066]
[0067] Where Pi is the current percentage at the i-th sample point, Ki is the protection time constant corresponding to the i-th sample point, and m is the number of sample points. The parameter generation end performs function fitting on the above sample points through software to obtain fitting parameters that describe the relationship between the K value and the current percentage.
[0068] As one implementation method, the present invention uses an exponential function to fit the K value, and the fitting function is:
[0069]
[0070] Where P is the current percentage, K(P) is the protection time constant corresponding to the current percentage P, e is the natural constant, and a, b, and c are the fitting parameters to be determined. a is used to adjust the amplitude of the K-value curve, b is used to adjust the decay rate of the K-value as the current percentage increases, and c is used to adjust the offset of the K-value curve.
[0071] The parameter generation end aims to minimize the sum of squared errors for each sample point. For each sample point, the fitting error is:
[0072]
[0073] The fitting objective function is:
[0074]
[0075] Right now
[0076]
[0077] The parameter generator automatically solves for a, b, and c based on the objective function, making the fitted curve as close as possible to each K-value sample point.
[0078] As one implementation method, the parameter generation end can use a nonlinear least squares method to solve the above objective function. Specifically, the parameter generation end first sets the initial values and allowable ranges of a, b, and c, and then calculates the sum of squared errors based on the sample points; subsequently, iterative optimization continuously adjusts a, b, and c to gradually reduce the sum of squared errors; when the change in the sum of squared errors is less than a preset convergence threshold, the number of iterations reaches a preset upper limit, or the fitting error meets the requirements, the iteration stops and the current a, b, and c are output. The iterative optimization algorithm is gradient descent, trust region algorithm, Levenberg-Marquardt algorithm, or other nonlinear optimization algorithms. The specific numerical optimization algorithm used is not limited to the scope of protection of this invention, as long as it can obtain fitting parameters describing the relationship between the K value and the percentage change of current based on multiple K value sample points.
[0079] To ensure the fitting results conform to the motor overload protection law, constraints can be set on the fitting parameters at the parameter generation end. One implementation method is to set the constraints as follows: a > 0, b < or equal to 0, and c > 0. Specifically, a > 0 ensures that the exponential term contributes positively to the K value; b < or equal to 0 causes the K value to decrease or stabilize as the current percentage increases; and c > 0 ensures that the K value remains positive in the high current range. Through these constraints, the fitted curve better reflects the overload protection trend of "the greater the current, the shorter the protection action time."
[0080] After the parameter generation end completes the fitting, it outputs the fitted parameters a, b, and c, and can further calculate the fitting error for each sample point. As one implementation method, the parameter generation end can calculate the absolute error and the relative error, where the absolute error is... The relative error is When the fitting error exceeds the preset threshold, or the fitting parameters exceed the allowable range, the parameter generation terminal can prompt engineers to adjust the sample points, limit the fitting parameters, refit after adjusting the parameter range, refit after adding sample points, or revert to the standard lookup table to protect the parameters.
[0081] After fitting a, b, and c, the protection time constant corresponding to any current percentage P is:
[0082]
[0083] Substituting K(P) into the inverse time protection formula, we can obtain the protection action time corresponding to the current percentage:
[0084]
[0085] When n is 2
[0086]
[0087] Therefore, the parameter generation end uses software to convert discrete "current percentage - protection action time" sample points into continuous inverse-time overload protection curves. This method does not directly fit the protection action time T, but first calculates the protection time constant K based on the inverse-time formula, and then fits the K value function, thereby improving the multi-point curve adaptation capability while retaining the physical constraints of inverse-time protection.
[0088] In some embodiments, function fitting can be performed on the K-valued sample set in several ways: Optionally, the Levenberg-Marquardt algorithm can be used, setting initial values for a, b, and c and the constraint range, and then iteratively solving the problem. The fitted parameters are output when the change in the sum of squared residuals is less than the convergence threshold. Optionally, gradient descent can be used, initializing the parameters within the constraint range and gradually updating the parameters along the direction of partial derivatives with a preset learning rate until the objective function converges. It is understood that other optimization methods, such as the trust region algorithm, can also be used to solve for the fitted parameters; this is not limited here.
[0089] S303. Calculate the stator current amplitude based on the direct-axis feedback current and quadrature-axis feedback current of the permanent magnet synchronous motor, and convert the stator current amplitude into the current percentage.
[0090] Wherein, the direct-axis feedback current Id refers to the current component in the D-axis direction of the motor vector control; the quadrature-axis feedback current Iq refers to the current component in the Q-axis direction; the stator current amplitude Is=√(Id²+Iq²) represents the magnitude of the current vector after the two components are combined; the current percentage MT_CurPer represents the percentage of the stator current amplitude relative to the motor's rated current, in units of 0.1%.
[0091] The driver performs overload protection calculations according to a preset protection cycle. In one implementation, the protection cycle is 1 millisecond. The driver collects the direct-axis and quadrature-axis feedback currents, which can also be represented as the D-axis and Q-axis, commonly abbreviations for direct and quadrature axes in motor vector control. Let the direct-axis feedback current be Id and the quadrature-axis feedback current be Iq, then the stator current amplitude... .
[0092] The driver converts the current current amplitude into a percentage of the motor's rated current. MT_CurPer represents the percentage of the motor's rated current, where Ie is the motor's rated current. The unit of MT_CurPer is 0.1%, meaning 1000 represents 100.0%.
[0093] In some embodiments, the stator current amplitude can be calculated and converted into the current percentage in several ways: Optionally, the driver collects the three-phase current through a current sensor, obtains Id and Iq through Clarke and Park transformations, calculates Is, divides it by the rated current, and multiplies it by 1000 to obtain MT_CurPer; Optionally, the driver directly obtains the existing Id and Iq feedback values from the current loop control module, calculates Is using fixed-point arithmetic, and then converts it into MT_CurPer. It is understood that other methods can also be used to obtain current information, and this is not limited here.
[0094] S304. When the current current percentage reaches the overload threshold, the current protection time constant K is calculated based on the current current percentage and the fitted parameters. The current protection time constant K and the current current percentage are then substituted into the inverse time protection formula to calculate the current protection time.
[0095] Among them, the overload threshold refers to the current percentage threshold value for determining whether the motor has entered an overload state. For example, setting it to 115.0% corresponds to the internal value 1150. The current protection time constant K refers to the real-time K value obtained by substituting the current current percentage into K(P)=a×e^(b×P)+c. The current protection time refers to the protection action time used for heat accumulation after engineering correction and minimum protection time limit. The heat accumulation time parameter MotolVale is in units of 0.1 seconds, with positive values indicating overload heating and negative values indicating cooling release.
[0096] The driver determines whether to initiate overload protection calculations based on the current current percentage. As one implementation, the overload threshold can be set to 115.0%, corresponding to an internal value of 1150.
[0097] In each protection cycle, the driver first obtains the motor current percentage MT_CurPer based on the sampled current. As one implementation, MT_CurPer is in units of 0.1%, meaning 1000 represents 100.0%. Subsequently, the current percentage used for the motor-side lookup table protection can be corrected according to the motor load current correction factor.
[0098]
[0099] Where MT_CurPeradj is the corrected percentage of motor-side current; LoadMoteCurCoef is the motor load current correction coefficient, used for engineering correction of the motor-side overload protection curve. As one implementation method, the inverse-time fitting mode can use the uncorrected MT_CurPer to calculate the K-value curve, maintaining consistency between the fitted curve and the original sample points; the standard lookup table mode and cooling judgment can use the corrected MT_CurPeradj.
[0100] MotolVale is a time parameter used for updating the motor's thermal accumulation, with units of 0.1 seconds. When MotolVale is greater than 0, it indicates the allowable protection time under the current overload condition, and the thermal accumulation increases; when MotolVale is less than 0, it indicates that the current state is in cooling release, and the thermal accumulation decreases. The calculation of MotolVale includes the following three paths.
[0101] The first path is the cooling path. When the motor current percentage is below the overload threshold, the driver uses the motor cooling meter to calculate MotorVale. First, the cooling meter index is determined based on the current current percentage:
[0102]
[0103] Where i is the cooling table index, and int() is used to round down the calculation result; since the unit of MT_CurPeradj is 0.1%, dividing by 100 indicates that the index is taken according to the 10% current range.
[0104] Then, read the cooling time parameter from the motor cooling table and take a negative value:
[0105]
[0106] Where MotoCooling[i] is the i-th cooling time parameter in the motor cooling table; OverLoadThreshold is the overload threshold. Since MotolVale is assigned a negative value, subsequent thermal accumulation updates will... The value is negative, which reduces the cumulative heat value of the motor.
[0107] The second approach is the inverse-time fitting approach. When the current is higher than or equal to the overload threshold and the inverse-time fitting mode is effective, the driver calculates the current protection time based on the fitting parameters a, b, and c, and then converts it to MotorVale. As one implementation method, the effective conditions for the inverse-time fitting mode include: the fitting protection function is enabled, and the compressed-stored fitting parameters are valid.
[0108] The first step is to convert the internal current percentage into a percentage for fitting calculations:
[0109]
[0110] For example, when MT_CurPer is 1500, x is 150.0%, which means that the current current is 150.0% of the rated current.
[0111] The second step is to calculate the current K value:
[0112]
[0113] Where K is the protection time constant corresponding to the current percentage; a, b, and c are the fitting parameters of K value obtained by the driver from the inverse solution of the compression parameters.
[0114] The third step is to convert the internal current percentage into a current multiplier:
[0115]
[0116] For example, when MT_CurPer is 1500, m is 1.5.
[0117] Step 4: Calculate the inverse time protection time:
[0118]
[0119] When n is 2:
[0120]
[0121] Where Traw is the protection action time without engineering correction, in seconds; m is the ratio of the current to the motor's rated current; and n is the inverse time exponent. As one implementation, n is set to 2 to correspond to the current square heating characteristic.
[0122] The fifth step is to perform engineering corrections to the protection time. One implementation method can be gain and bias corrections:
[0123]
[0124] Where Gain is the protection time gain parameter and Bias is the protection time bias parameter.
[0125] Step 6: Implement minimum protection time limit:
[0126]
[0127] Tmin is the minimum protection time limit value, used to prevent the protection time from being calculated too small.
[0128] Step 7: Convert the second-level protection time into 0.1s of thermal cumulative usage. Unit:
[0129]
[0130] For example, if Tadj is 5s, then MotolVale is 50, indicating that the subsequent thermal accumulation model will accumulate according to 50 protection times of 0.1s.
[0131] The third path is the standard table lookup path. If the inverse-time fitting mode is not enabled, or the fitting parameters are invalid, the driver can use the existing standard motor overload table for interpolation calculation as a compatibility solution. First, determine the overload table range based on the corrected motor current percentage:
[0132]
[0133] Where i is the range index of the standard motor overload table; 1000 represents 100.0% of the rated current; each increase of 100 corresponds to a 10% current range.
[0134] The offset within the interval is:
[0135]
[0136] Where r is the offset of the current between two adjacent points in the table, and its value is usually between 0 and 99.
[0137] Then, linear interpolation is performed on two adjacent table points to obtain the lookup protection time parameter:
[0138]
[0139] Where MotoOverLoad[i] and MotoOverLoad[i+1] are the protection time parameters corresponding to two adjacent current points in the standard motor overload table, respectively; OVLoad_Vale is the original protection time parameter obtained by interpolation.
[0140] Finally, the table lookup results were corrected based on the motor overload time coefficient.
[0141]
[0142] MtLoadCoef is the motor overload time correction factor, used to amplify or reduce the standard lookup table protection time. Therefore, under the standard lookup table path, MotolVale is the motor protection time parameter after linear interpolation and time coefficient correction, still in units of 0.1s.
[0143] In some embodiments, the current protection time can be calculated in several ways: Optionally, in the fitted inverse-time mode, the current percentage is substituted into the exponential decay function to obtain the K value, the original protection time is calculated using the inverse-time formula, and after applying gain and bias corrections, the minimum protection time limit is applied, then multiplied by 10 to convert it to MotolVale in 0.1-second units; Optionally, in the standard lookup table mode, the standard overload table is linearly interpolated based on the corrected current percentage, and then scaled according to the overload time correction factor to obtain MotolVale. It is understood that other methods can also be used to calculate the protection time, which are not limited here.
[0144] S305. Update the motor thermal accumulation value in each preset protection cycle according to the current protection time. When the motor thermal accumulation value reaches the alarm threshold, trigger the motor overload alarm.
[0145] Among them, the preset protection period refers to the fixed time interval for the driver to perform overload protection calculations, such as 1 millisecond; the motor thermal accumulation value refers to the cumulative value reflecting the thermal state of the motor inside the driver; the alarm threshold ERRSUM is the upper limit of the thermal accumulation that triggers the overload alarm, such as 2097152000; the thermal accumulation base value Base is the numerator constant in the thermal accumulation update formula, such as 2097152.
[0146] The driver updates the motor thermal accumulation value according to the motor-side thermal accumulation time parameter MotolVale in each protection cycle. In one implementation, the protection cycle is 1 ms, and the thermal accumulation threshold is ERRSUM.
[0147] The hot cumulative update formula is:
[0148]
[0149] Wherein, MotoHeatSumnew is the cumulative heat value for the current cycle, MotoHeatSumold is the cumulative heat value for the previous cycle, Base is the base value for cumulative heat, which can be 2097152; MotolVale is the protection time parameter in 0.1s units and cannot be 0.
[0150] When MotolVale is positive, the accumulated heat increases; when MotolVale is negative, the accumulated heat decreases. To prevent the accumulated heat from becoming negative, the following limit is applied:
[0151]
[0152] When the accumulated heat exceeds the alarm threshold, a motor overload alarm is triggered, i.e.:
[0153]
[0154] One implementation method:
[0155]
[0156] because:
[0157]
[0158] When the protection time represented by MotolVale is V times 0.1s, the theoretical time to accumulate from 0 to the alarm threshold is:
[0159]
[0160] Where tact represents the actual time required for thermal accumulation to rise from 0 to the alarm threshold, and Ncycle represents the number of action cycles. Therefore, the thermal accumulation model has the same protection time unit as that calculated by the inverse time-delay formula.
[0161] In some embodiments, the motor thermal accumulation value can be updated and an alarm can be triggered in several ways: Optionally, the driver calculates the increment Base / MotolVale every 1-millisecond cycle and adds it to the thermal accumulation value. After applying a non-negative limit to the result, it is compared with ERRSUM. If the limit is reached, an alarm is output. Optionally, the driver first determines whether the current state is overload heating or cooling release, updates the thermal accumulation value with positive or negative increments respectively, limits it, and compares it with an alarm threshold. It is understood that other thermal accumulation update and alarm determination methods can also be used, and are not limited here.
[0162] In some embodiments, after the step of fitting an exponential decay function to obtain fitting parameters to a set of K-value samples, the method further includes:
[0163] The fitting parameters are normalized to obtain the corresponding normalized ratio values. For fitting parameters whose values span multiple orders of magnitude, a logarithmic operation is first performed, followed by linear normalization within a preset logarithmic range to obtain the corresponding normalized ratio values. For fitting parameters whose values are within the same order of magnitude, linear normalization is performed directly within their respective preset linear ranges to obtain the corresponding normalized ratio values. Differentiated index bit widths are assigned to each fitting parameter based on their impact on the calculation accuracy of the current protection time. The normalized ratio values are then distributed according to their assigned bit widths. The index bit width is uniformly discretized into corresponding parameter indices. Each parameter index is sequentially concatenated according to its assigned index bit width to obtain compressed parameter data. The compressed parameter data is then split into multiple storage values that adapt to the storage interface bit width and stored. The compressed parameter data is written into the encoder non-volatile memory of the permanent magnet synchronous motor. During power-on initialization, the compressed parameter data is read from the encoder non-volatile memory. The compressed parameter data is split into each parameter index according to the preset bit field structure. After each parameter index is restored to a normalized proportional value, inverse normalization processing is performed to recover the fitted parameters.
[0164] Among them, normalization ratio refers to mapping the fitted parameters from their original value range to dimensionless values in the interval of 0 to 1; logarithmic normalization refers to taking the natural logarithm of parameters whose value range spans multiple orders of magnitude and then performing linear normalization, for example, parameter a is logarithmically normalized using ln(a); linear normalization refers to directly mapping proportionally according to the upper and lower limits of the parameter value range, for example, parameters b and c are linearly normalized; parameter index refers to uniformly quantizing the normalization ratio into integer codes according to the allocated index bit width, for example, Aidx occupies 12 bits, Bidx occupies 12 bits, and Cidx occupies 8 bits; compressed parameter data refers to fixed-length binary data obtained by concatenating the parameter indices according to the bit fields, for example, concatenating them into 32-bit combined parameters Packed; encoder non-volatile memory refers to electrically erasable programmable read-only memory installed inside the motor encoder, used to retain data after power failure.
[0165] Specifically, since the three fitting parameters a, b, and c have different numerical ranges, and the dynamic range of a is relatively large, this invention normalizes the fitting parameters. As one implementation method, parameter a is logarithmically normalized:
[0166]
[0167] Where a is the magnitude parameter obtained by fitting the K-value exponential function; Anorm is the normalized value of parameter a, used for subsequent discretization and storage; ln() is the natural logarithm function; Amin is the lower limit of the allowed range of values for parameter a; Amax is the upper limit of the allowed range of values for parameter a; and Ascale is the scaling factor of the normalized parameter a, used to map the normalization ratio from 0 to 1 to a numerical range suitable for integer storage. Since parameter a may span multiple orders of magnitude, using ln(a) for logarithmic normalization can reduce the impact of large-scale numerical variations on storage accuracy.
[0168] The corresponding inverse normalization formula is:
[0169]
[0170] in, This represents the normalization ratio of parameter 'a' within the allowed range; This indicates the range of values for the logarithmic value of parameter a; the inverse normalization calculation is used to recover the fitted parameter a that actually participates in the protection time calculation based on Anorm after the driver reads the stored parameters.
[0171] The parameter b is linearly normalized:
[0172]
[0173] Where b is the exponential decay parameter obtained by fitting an exponential function to the K value, used to characterize the rate at which the K value changes with the increase of the current percentage; Bnorm is the normalized value of the b parameter; Bmin is the lower limit of the allowed range of the b parameter; Bmax is the upper limit of the allowed range of the b parameter; and Bscale is the scaling factor of the normalized b parameter. Since the b parameter is usually limited to a narrow range, such as between -1 and 0, linear normalization is sufficient to meet the storage accuracy requirements.
[0174] The corresponding inverse normalization formula is:
[0175]
[0176] in, This represents the normalization ratio of parameter b within the allowable range; This indicates the span of the allowed range of values for parameter b; this formula is used to recover the actual fitted parameter b from the normalized stored values.
[0177] The c parameter is linearly normalized:
[0178]
[0179] Where c is the bias parameter obtained by fitting the K-value exponential function, used to characterize the basic value that the K-value curve approaches in the high current range; Cnorm is the normalized value of the c parameter; Cmin is the lower limit of the allowed range of the c parameter; Cmax is the upper limit of the allowed range of the c parameter; and Cscale is the scaling factor of the normalized c parameter. Since the c parameter is used to ensure that the K value remains positive and to adjust the curve bias, its range can be set according to the actual time range of the motor overload protection curve.
[0180] The corresponding inverse normalization formula is:
[0181]
[0182] in, This represents the normalization ratio of parameter c within the allowed range; This indicates the span of the allowed range of values for parameter c; this formula is used to recover the actual fitted parameter c from the normalized stored values.
[0183] As one example, the parameter range and scaling base can be set as follows:
[0184]
[0185] The above values are not intended to limit the scope of protection of this invention, and can be adjusted according to the motor series, overload curve range, and storage accuracy requirements.
[0186] To adapt to encoder electrically erasable programmable read-only memory or finite motor parameter areas, this invention further discretizes and packages the normalized parameters. As one implementation method, the normalization ratio from 0 to 1 is uniformly divided into 4096 levels, forming a parameter index:
[0187] Aidx: The index corresponding to the normalization ratio of parameter a, ranging from 0 to 4095, occupying 12 bits.
[0188] Bidx: The index corresponding to the normalization ratio of the b parameter, ranging from 0 to 4095, occupying 12 bits.
[0189] Cidx: The index corresponding to the normalized value of the c parameter, ranging from 0 to 255, occupying 8 bits.
[0190] The three indexes mentioned above are combined into a 32-bit combined parameter based on their bit fields. The bit field structure is as follows: Figure 2 As shown: the 31st to the 20th position is the first index, the 19th to the 8th position is the second index, and the 7th to the 0th position is the third index.
[0191] The combination formula is:
[0192]
[0193] Where Packed represents the combined 32-bit parameter, "<<" indicates a left shift operation, and "|" indicates a bitwise OR operation. To adapt to common 16-bit motor parameter storage methods, the 32-bit combined parameter is split into a lower 16-bit storage value and a higher 16-bit storage value:
[0194]
[0195]
[0196] Low16 represents the lower 16 bits of the storage value, High16 represents the higher 16 bits of the storage value, "&" indicates a bitwise AND operation, and ">>" indicates a right shift operation.
[0197] Using the above method, a personalized motor overload protection curve described by a, b, and c can be represented by two 16-bit storage values. When implemented independently, the index bit width can also be set to other bit widths, such as 24 bits, 48 bits, 64 bits, or multiple storage words, depending on storage capacity and accuracy requirements.
[0198] When the driver is powered on, initialized, or the motor parameters are loaded, the lower 16 bits and the higher 16 bits of the stored value are read and combined to obtain a 32-bit combined parameter:
[0199]
[0200] The subsequent split yielded three indices:
[0201]
[0202] The driver can convert Aidx and Bidx to normalized scales Aratio and Bratio from 0 to 1 using a 4096-point scaling table:
[0203]
[0204] Where ScaleTable[i] is a uniform distribution table:
[0205]
[0206] Then, inverse normalization is performed to obtain a, b, and c:
[0207]
[0208] The driver saves the inverse kinematics a, b, and c to a runtime protection structure or equivalent storage unit for use in real-time protection calculations.
[0209] Please see Figure 4 This is a schematic diagram of a 32-bit compressed storage structure in an embodiment of this application. Figure 4 As shown,
[0210] The bit field structure of the 32-bit combined parameter Packed is as follows: bits 31 to 20 are the index Aidx for parameter 'a', occupying 12 bits, with an index value range of 0 to 4095; bits 19 to 8 are the index Bidx for parameter 'b', occupying 12 bits, with an index value range of 0 to 4095; bits 7 to 0 are the index Cidx for parameter 'c', occupying 8 bits, with an index value range of 0 to 255. The combination formula is Packed equal to Aidx shifted left by 20 bits bitwise, or Bidx shifted left by 8 bits bitwise, or Cidx. To adapt to the common 16-bit motor parameter storage interface, the 32-bit combined parameter is split into a lower 16-bit storage value (Low16) and a higher 16-bit storage value (High16). Low16 is equal to Packed bitwise ANDed with the hexadecimal number FFFF, and High16 is equal to Packed right-shifted by 16 bits. Using the above method, a personalized motor overload protection curve described by the amplitude coefficient a, the attenuation rate coefficient b, and the offset constant c can be represented by two 16-bit storage values. In standalone implementation, the index bit width can also be set to other bit widths according to storage capacity and accuracy requirements, such as 24 bits, 48 bits, 64 bits, or multiple storage words. The overall bit field splicing and splitting principle is the same as the method described above.
[0211] Please see Figure 5 This is a flowchart illustrating the driver parameter reading and denormalization process in an embodiment of this application. Figure 5As shown, the parameter recovery process during driver initialization includes the following steps: First, upon power-on or initialization, the driver reads the lower 16-bit storage value Low16 and the higher 16-bit storage value High16 from the encoder's electrically erasable programmable read-only memory. Then, the driver shifts High16 left by 16 bits and performs a bitwise OR operation with Low16 to obtain the 32-bit parameter Packed. Subsequently, the driver splits Packed to obtain three indices: Aidx equals Packed shifted right by 20 bits, Bidx equals Packed shifted right by 8 bits and performs a bitwise AND operation with the hexadecimal number FFF, and Cidx equals Packed and performs a bitwise AND operation with the hexadecimal number FF. After obtaining the three indices, the driver performs denormalization processing on each. For Aidx and Bidx, the driver converts the indices into normalized scale values of 0 to 1 using a 4096-point scaling table; for Cidx, the driver converts the index into an 8-bit normalized scale value. Subsequently, the driver performs logarithmic inverse normalization on parameter 'a', recovering the actual amplitude coefficient 'a' based on the normalization ratio and the lower and upper limits of the allowed range of parameter 'a'. It then performs linear inverse normalization on parameter 'b', recovering the actual attenuation rate coefficient 'b' based on the normalization ratio and the lower and upper limits of the allowed range of parameter 'b'. Finally, it performs linear inverse normalization on parameter 'c', recovering the actual offset constant 'c' based on the normalization ratio and the lower and upper limits of the allowed range of parameter 'c'. Finally, the driver saves the fitted parameters 'a', 'b', and 'c' obtained from the inverse solution to the runtime protection structure or equivalent storage unit for subsequent real-time overload protection calculations.
[0212] In some embodiments, after the step of fitting an exponential decay function to obtain fitting parameters to a set of K-value samples, the method further includes:
[0213] Calculate the fitting error between the protection time constant K for each sample point in the K-value sample set and the fitted K value calculated based on the current percentage at that sample point according to the fitting parameters;
[0214] When the fitting error of any sample point exceeds the preset error threshold or any parameter in the fitting parameters exceeds its preset reasonable value range, parameter anomaly handling is performed. The parameter anomaly handling includes at least one of the following: performing amplitude limiting processing on fitting parameters that exceed the range, adjusting the parameter value range and then re-performing function fitting, adding sample points to the overload curve sample points and then re-performing inverse calculation and function fitting, and using standard lookup table protection mode.
[0215] Among them, fitting error refers to the deviation between the actual protection time constant Ki of each sample point in the K-value sample set and the fitted K value K(Pi) calculated based on the fitting parameters, including absolute error |Ki−K(Pi)| and relative error |Ki−K(Pi)| / Ki; preset error threshold refers to the upper limit of the fitting error preset by the parameter generation end; preset reasonable value range refers to the allowable value range of each fitting parameter under the constraints of physical meaning and engineering experience; parameter anomaly handling refers to the corrective measures performed by the parameter generation end when the fitting result does not meet the accuracy or range requirements.
[0216] Specifically, after completing the fitting outputs a, b, and c, the parameter generation end calculates the fitted K value K(Pi) = a × e^(b × Pi) + c for each sample point in the K value sample set, and compares it with the actual Ki calculated for that sample point to obtain the absolute and relative errors of each sample point. When the fitting error of any sample point exceeds the preset error threshold, or any of the fitted parameters a, b, and c exceeds its preset reasonable value range, the parameter generation end performs parameter anomaly handling. Specific handling methods include: performing amplitude limiting on fitted parameters that exceed the range to bring them back to the reasonable range; adjusting the parameter value range and re-executing the function fitting; adding sample points to the overload curve sample points and re-executing from the K value inversion step; and reverting to the standard lookup table protection mode as a fallback solution. This verification mechanism detects anomalies before the parameters are written to memory, preventing excessively biased protection parameters from causing a mismatch between the protection action time and the actual withstand time of the motor during operation.
[0217] The following provides a more detailed description of the process of the method provided in this implementation. Please refer to [link / reference]. Figure 6 This is another flowchart illustrating an overload protection method applicable to permanent magnet synchronous motors in this application embodiment.
[0218] S601. Obtain the overload curve sample points of the permanent magnet synchronous motor. Calculate the protection time constant corresponding to each overload curve sample point according to the inverse time protection formula. Combine the protection time constants K corresponding to each current percentage into a K-value sample set.
[0219] In some embodiments, this step is similar to step S301, and will not be described again here.
[0220] S602. Based on the physical characteristic that the protection time constant K decreases monotonically with the increase of the current percentage and is always positive, establish parameter constraints that the amplitude coefficient is greater than zero, the attenuation rate coefficient is less than or equal to zero, and the offset constant is greater than zero.
[0221] Among them, the physical characteristic of the protection time constant K is that the value of K decreases monotonically as the current percentage increases and is always positive. This characteristic is derived from the basic law in motor overload protection that "the larger the current, the shorter the allowable protection time". The parameter constraint condition refers to the value restriction imposed on the fitting parameters during the function fitting solution process, which is used to ensure that the fitting result conforms to the above physical characteristics.
[0222] Specifically, before performing exponential decay function fitting on the K-value sample set, the parameter generation end establishes parameter constraints based on the physical characteristics of the protection time constant K. In the exponential decay function K(P)=a×e^(b×P)+c, a greater than zero ensures that the contribution of the exponential term to the K-value is positive; b less than or equal to zero ensures that the exponential term a×e^(b×P) monotonically decreases or remains unchanged as the current percentage P increases, thus preventing the K-value from abnormally increasing with the current; c greater than zero ensures that the K-value remains positive when the exponential term decays to near zero in the high current range, avoiding zero or negative K-values that would cause abnormal calculations in the inverse time protection formula. When calling the optimization algorithm, the parameter generation end uses the above three constraints as parameter boundary inputs. During the optimization process, all iterative candidate solutions must satisfy these constraints, thus ensuring that the fitted K-value curve remains monotonically decreasing and always positive throughout the entire current range.
[0223] S603. Under parameter constraints, with the goal of minimizing the sum of squared residuals between the protection time constant K and the output value of the exponential decay function at the corresponding current percentage for each sample point in the K-value sample set, the three fitting parameters to be solved are iteratively optimized.
[0224] Among them, the residual sum of squares refers to the sum of squares of the differences between the actual protection time constant Ki of each sample point in the K-value sample set and the output value a×e^(b×Pi)+c calculated by the exponential decay function at the current percentage Pi of that sample point, S=Σ[Ki−(a×e^(b×Pi)+c)]², which is used to quantify the overall deviation between the fitted curve and the sample points; iterative optimization solution refers to the process of gradually adjusting the fitting parameters through numerical optimization algorithms to continuously reduce the residual sum of squares.
[0225] Specifically, under the parameter constraints established in step S602, the parameter generation end solves for three fitting parameters a, b, and c with the goal of minimizing the sum of squared residuals. The parameter generation end first sets initial values for a, b, and c within the allowable range of the constraints, and then continuously adjusts the values of a, b, and c through an iterative optimization algorithm. After each iteration, the sum of squared residuals S is recalculated to gradually decrease S. The iterative optimization algorithm used is one of the following: the Levenberg-Marquardt algorithm, the trust region algorithm, or the gradient descent method. In each iteration, the optimization algorithm calculates the parameter update direction and step size based on the current residuals and the derivatives of the residuals with respect to each parameter. The updated parameter values must satisfy the constraints established in step S602, i.e., a > zero, b < or equal to zero, and c > zero.
[0226] S604. When the change in the sum of squared residuals during the iteration process is less than the preset convergence threshold, stop the iteration and output the current amplitude coefficient, decay rate coefficient and offset constant as fitting parameters.
[0227] The preset convergence threshold refers to a pre-set threshold for the change in the sum of squared residuals used to determine whether the iterative optimization has converged. When the decrease in the sum of squared residuals between two adjacent iterations is less than this threshold, the optimization is considered to have converged.
[0228] Specifically, after each iteration, the parameter generator calculates the change ΔS between the current residual sum of squares and the residual sum of squares from the previous iteration. When ΔS is less than a preset convergence threshold, the parameter generator stops iterating and outputs the current amplitude coefficient a, decay rate coefficient b, and offset constant c as the final fitting parameters. Furthermore, the parameter generator sets an upper limit on the number of iterations. When the upper limit is reached, iteration also stops and the current parameters are output to avoid iteration not terminating due to the non-convexity of the objective function or the special distribution of sample points. The output fitting parameters a, b, and c determine the specific form of the exponential decay function K(P) = a × e^(b × P) + c. The subsequent driver calculates the corresponding protection time constant K at any current percentage based on this function. After outputting the fitting parameters, the parameter generator further calculates the absolute error |Ki−K(Pi)| and the relative error |Ki−K(Pi)| / Ki for each sample point. When the fitting error of any sample point exceeds a preset error threshold or the fitting parameters exceed a preset reasonable value range, parameter anomaly handling is performed.
[0229] Please see Figure 7 This is a flowchart of the parameter generation end in an embodiment of this application. For example... Figure 7As shown, the processing flow of the parameter generation end includes the following steps: First, the parameter generation end receives the current percentage P and protection time T sample points input by the engineer; then, the parameter generation end calculates the K value corresponding to each sample point according to the inverse time limit formula; subsequently, the parameter generation end performs function fitting on the K value to obtain fitting parameters a, b, and c; next, the parameter generation end judges whether the fitting parameters and fitting error meet the requirements. If not, it returns to adjust the sample points or the range of fitting parameters and refits; if they meet the requirements, it continues to execute the subsequent steps; after the parameters and error meet the requirements, the parameter generation end performs logarithmic normalization on parameter a and linear normalization on parameters b and c; then, the normalized parameters are discretized into parameter indices Aidx, Bidx, and Cidx; then, the three indices are packaged into a 32-bit combined parameter Packed according to the bit field structure; finally, the 32-bit combined parameter is split into the lower 16-bit storage value Low16 and the higher 16-bit storage value High16 for writing into the encoder electrically erasable programmable read-only memory or the motor parameter area. The specific implementation methods of normalization, discretization, and compressed storage in the above parameter generation process will be further explained in subsequent embodiments.
[0230] S605. Calculate the stator current amplitude based on the direct-axis feedback current and quadrature-axis feedback current of the permanent magnet synchronous motor, and convert the stator current amplitude into the current percentage.
[0231] In some embodiments, this step is similar to step S303, and will not be described again here.
[0232] Please see Figure 8 This is a flowchart illustrating the real-time overload protection of the driver in an embodiment of this application. Figure 8 As shown, the driver performs overload protection calculations according to a preset protection cycle. In one implementation, the protection cycle is 1 millisecond. The processing flow for each protection cycle is as follows:
[0233] First, the driver collects the motor feedback current, obtaining the direct-axis and quadrature-axis feedback currents, calculates the current amplitude, and converts it into a percentage of the motor current. Then, the driver determines if the current percentage is below the overload threshold. If it is, the driver enters the cooling path, queries the motor cooling table to obtain the cooling release time parameter, and sets the thermal accumulation time parameter to a negative value, thus reducing the motor's thermal accumulation value during subsequent updates. If the current percentage is not below the overload threshold, the driver further determines if the fitted inverse-time mode is effective. If effective, the driver calculates the current protection time constant K based on the fitted parameters obtained from the compression parameter inverse solution and the current current percentage, then calculates the protection time using the inverse-time formula and converts it into a thermal accumulation time parameter. If inverse-time mode is ineffective, the driver uses a standard overload table for interpolation to obtain the protection time parameter as a compatibility scheme. Subsequently, the driver updates the motor's thermal accumulation value based on the thermal accumulation time parameter; the thermal accumulation increases during overload and decreases during cooling. Finally, the driver determines whether the cumulative heat value of the motor exceeds the alarm threshold. If it does, it triggers a motor overload alarm; otherwise, it ends the current cycle and waits for the next protection cycle.
[0234] S606. When the current current percentage reaches the overload threshold, substitute the current current percentage into the exponential decay function determined by the fitting parameters to obtain the current protection time constant K.
[0235] Among them, the exponential decay function refers to K(P)=a×e^(b×P)+c obtained by fitting from steps S602 to S604, where a is the amplitude coefficient, b is the decay rate coefficient, and c is the offset constant; the current protection time constant K refers to the real-time K value calculated by substituting the current current percentage P into the function.
[0236] Specifically, when the driver determines that the current percentage has reached the overload threshold, it converts the current percentage from the internal 0.1% unit to a percentage x = MT_CurPer / 10.0, and then substitutes it into the exponential decay function K = a × e^(b × x) + c to calculate the current protection time constant K. For example, when MT_CurPer is 1500, x is 150.0, and the driver substitutes 150.0 into the exponential decay function to calculate the K value at that current level. Since the fitting parameters a, b, and c have been deduced from the compressed storage parameters and saved in the runtime protection structure during the driver initialization phase, this step only needs to perform one exponential function operation and one addition operation in each protection cycle to complete the K value calculation, meeting the real-time requirement of a 1-millisecond protection cycle.
[0237] S607. Convert the current current percentage to the current current multiplier, and calculate the original protection time based on the current protection time constant K and the current current multiplier.
[0238] Among them, the current current ratio refers to the ratio of the current current to the rated current of the motor. The calculation formula is m=MT_CurPer / 1000.0. For example, when MT_CurPer is 1500, the current ratio m is 1.5. The original protection time refers to the protection action time Traw obtained by directly calculating the protection action time without engineering correction by substituting the K value and the current ratio into the inverse time protection formula. The unit is seconds.
[0239] Specifically, the driver converts the internal current percentage into a current multiplier m = MT_CurPer / 1000.0, and then calculates the original protection time Traw = K / (m^n−1) using the inverse-time protection formula based on the current protection time constant K and the current multiplier m. When the inverse-time exponent n is 2, the formula simplifies to Traw = K / (m²−1). For example, when K is 420 and the current multiplier m is 1.5, Traw = 420 / (1.5²−1) = 420 / (2.25−1) = 420 / 1.25 = 336 seconds. The original protection time reflects the protection action time corresponding to the inverse-time protection law determined according to the fitted K value curve at the current current level. The larger the current multiplier, the larger m²−1 and the shorter the original protection time.
[0240] S608. Apply gain correction and offset correction to the original protection time to obtain the corrected protection time, and apply minimum protection time limiting to the corrected protection time to obtain the current protection time.
[0241] Among them, gain correction refers to scaling the original protection time by multiplying it by the protection time gain parameter Gain; bias correction refers to adding the protection time bias parameter Bias after gain correction for translation adjustment; minimum protection time limit refers to comparing the corrected protection time with the preset minimum protection time limit value Tmin. If the corrected protection time is less than Tmin, then Tmin is taken as the current protection time.
[0242] Specifically, the driver applies gain and bias corrections to the original protection time Traw, calculated as Tadj = Traw × Gain + Bias. Gain is the protection time gain parameter used to scale the overall protection time to adapt to different motor installation conditions and ambient temperatures, while Bias is the protection time bias parameter used to shift and adjust the protection time. After correction, the driver performs a minimum protection time limit: if Tadj is less than Tmin, Tadj is set to Tmin. This minimum protection time limit prevents the calculated protection time from being too small at extremely high current rates, which could cause a jump in heat accumulation within a single protection cycle, thus preserving a safe response time for the driver and motor. The limited Tadj is the current protection time, used for subsequent conversion of the heat accumulation time parameter.
[0243] S609. Convert the current protection time into a thermal cumulative time parameter expressed in a preset time unit.
[0244] The preset time unit refers to the time unit used in the thermal accumulation calculation, which is 0.1 seconds in this embodiment; the thermal accumulation time parameter MotolVale is the integer value obtained after converting the current protection time from seconds to 0.1 seconds, which is used for the calculation of subsequent thermal accumulation increments.
[0245] Specifically, the driver multiplies the current protection time Tadj by 10 to convert it into a thermal accumulation time parameter in 0.1-second units, i.e., MotolVale = Tadj × 10. For example, when Tadj is 5 seconds, MotolVale is 50, indicating that the subsequent thermal accumulation model is updated according to 50 protection times of 0.1 seconds; when Tadj is 0.3 seconds, MotolVale is 3. This conversion ensures that the time parameter in the thermal accumulation update formula is consistent with the driver's internal protection time system, which uses 0.1-second units as the basic unit, ensuring that the actual time required for subsequent thermal accumulation to grow from zero to the alarm threshold corresponds numerically to the protection action time calculated by the inverse time protection formula.
[0246] S610. Within each preset protection cycle, the ratio of the preset thermal accumulation base value to the thermal accumulation time parameter is used as the thermal accumulation increment for the current cycle. The thermal accumulation value of the motor is added to the thermal accumulation increment to obtain the updated thermal accumulation value of the motor, and the updated thermal accumulation value of the motor is limited to a non-negative range.
[0247] Wherein, the preset thermal accumulation base value Base refers to the numerator constant in the thermal accumulation update formula, which is taken as 2097152 in this embodiment; the thermal accumulation increment refers to the change in the motor thermal accumulation value in each protection cycle, which is equal to Base divided by MotolVale; the limit to non-negative range means that when the updated motor thermal accumulation value is negative, it is set to zero.
[0248] Specifically, the driver performs a thermal accumulation update every 1-millisecond protection cycle, using the formula MotoHeatSumnew = MotoHeatSumold + Base / MotolVale. When MotolVale is positive, Base / MotolVale is also positive, increasing the motor's thermal accumulation value and indicating an overload heating state. Higher current results in a smaller MotolVale, a larger thermal accumulation increment, and a faster increase in the thermal accumulation value. Conversely, when MotolVale is negative, Base / MotolVale is also negative, decreasing the motor's thermal accumulation value and indicating a cooling release state. After the update, the driver applies a non-negative lower limit to the motor's thermal accumulation value: if MotoHeatSumnew is less than zero, it is set to zero. This limiting operation prevents the thermal accumulation value from becoming negative after prolonged light-load operation, ensuring that the thermal accumulation value remains within a valid range above zero.
[0249] S611. When the updated cumulative motor thermal value reaches the alarm threshold, a motor overload alarm is triggered.
[0250] Among them, the alarm threshold ERRSUM refers to the upper limit of the thermal accumulation that triggers the motor overload alarm. In this embodiment, it is taken as Base×1000, which is 2097152000. The motor overload alarm refers to the protection action signal output by the driver after detecting that the motor thermal accumulation value has reached the alarm threshold.
[0251] Specifically, after updating the motor thermal accumulation value in each protection cycle, the driver compares the updated MotoHeatSumnew with the alarm threshold ERRSUM. When MotoHeatSumnew is greater than or equal to ERRSUM, the driver triggers a motor overload alarm through the alarm output module, notifying the upper control system to perform speed reduction or shutdown operations to protect the motor windings and permanent magnets. When the protection time represented by MotolVale is V times 0.1 seconds, the theoretical time required for the thermal accumulation value to accumulate from zero to the alarm threshold is tact=(ERRSUM / (Base / V))×0.001=(1000×V)×0.001=V×0.1 seconds, which is numerically consistent with the protection time calculated by the inverse time protection formula, verifying the correspondence between the thermal accumulation model and the inverse time protection time. When the motor recovers to a current range below the overload threshold before the alarm is triggered, the driver reduces the thermal accumulation value cycle by cycle with a negative MotolVale according to the cooling path. The motor thermal accumulation value will not reach the alarm threshold, and the driver will not trigger an alarm.
[0252] The overload protection method provided in this application will be further illustrated below through a specific embodiment.
[0253] In this embodiment, a 750W servo driver and a 750W permanent magnet synchronous motor are used to form a test system. Please refer to Figure 9 , which is a schematic diagram of the motor overload characteristic curve in the embodiment of the present application. As shown in Figure 9 , the abscissa of the overload characteristic curve is the motor torque percentage with the unit of percentage, the ordinate is the allowable continuous operation time with the unit of second, and the ordinate adopts a logarithmic scale. This curve reflects the maximum allowable continuous operation time of the motor under different overload multiples, presenting an inverse time characteristic that the larger the current percentage, the shorter the allowable continuous time. According to Figure 9 the shown overload characteristic curve, three sample points are selected: the first sample point is 110% current corresponding to a protection action time of 2000 seconds, the second sample point is 130% current corresponding to a protection action time of 250 seconds, and the third sample point is 300% current corresponding to a protection action time of 3 seconds. The three sample points above cover the low overload zone, the medium overload zone and the high overload zone respectively. After obtaining the sample points, the parameter generation end tool is used to automatically complete the K-value inverse calculation, K-value function fitting, fitting parameter normalization, discretization, compression and packaging, and the processing flow is as shown in Figure 7 . After the parameter generation end tool runs, the output overload protection storage parameters are the low 16-bit storage parameter 0x3629 and the high 16-bit storage parameter 0x495F. The debugging software supporting the servo driver is used to write the high 16-bit and low 16-bit storage parameters into the encoder electrically erasable programmable read-only memory of the motor. After the driver is powered on again, three fitting parameters are restored according to the parameter reading and inverse normalization process as shown in Figure 5 , where the amplitude coefficient a is 1173, the attenuation rate coefficient b is 3894, and the offset constant c is 41. After the driver solves the fitting parameters, according to the driver real-time overload protection process as shown in Figure 8 , the current amplitude is calculated every 1 millisecond based on the sampled motor current feedback. When the current is greater than the overload threshold, the driver calculates the K value in real time through the exponential attenuation function according to the current current feedback percentage P, and then calculates the overload protection time through the inverse time protection formula. The driver converts the protection time into a thermal accumulation time parameter, and updates the motor thermal accumulation value periodically. When the motor thermal accumulation value reaches the alarm threshold, the driver outputs a motor overload alarm. The above real-time protection process corresponds to the real-time protection stage in the overall process of the present application, as shown in Figure 2As shown. When operating on this 750W motor, typical operating results are as follows: When the motor operates at 100% of its rated current or below, the driver does not perform overload heating accumulation; the existing heat accumulation is gradually released, and the motor can operate for extended periods. When the motor operates continuously at 150% of its rated current, the target protection time is approximately 64 seconds. The driver calculates the protection time according to the fitted curve, and the heat accumulation increases cycle by cycle. When the motor operates at 200% of its rated current, the target protection time is approximately 9.8 seconds; the protection time is shortened, and the heat accumulation reaches the threshold more quickly. When the motor operates at 300% of its rated current, the target protection time is approximately 3 seconds; the heat accumulation accumulates rapidly and triggers a motor overload alarm. When the motor recovers to a current range below the overload threshold before the alarm, the driver reduces the heat accumulation value according to the cooling curve, without immediately triggering an alarm. The above operating results indicate that the K value varies with the current percentage; the higher the current, the shorter the calculated protection time and the faster the heat accumulation increases. The overall protection behavior is consistent with... Figure 9 The motor overload characteristic curves shown are consistent.
[0254] The motor drive system in the embodiments of this invention is described below from the perspective of hardware processing. Please refer to [link / reference]. Figure 10 This is a schematic diagram of the physical device structure of a motor drive system in an embodiment of this application.
[0255] It should be noted that, Figure 10 The structure of the motor drive system shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present invention.
[0256] like Figure 10 As shown, the motor drive system includes a CPU 1001, which can perform various appropriate actions and processes according to a program stored in ROM 1002 or a program loaded into RAM 1003 from storage section 1008, such as executing the methods described in the above embodiments. RAM 1003 also stores various programs and data required for system operation. The CPU 1001, ROM 1002, and RAM 1003 are interconnected via bus 1004. I / O interface 1005 is also connected to bus 1004.
[0257] The following components are connected to I / O interface 1005: input section 1006 including audio input devices, push-button switches, etc.; output section 1007 including a liquid crystal display (LCD) and audio output devices, indicator lights, etc.; storage section 1008 including a hard disk, etc.; and communication section 1009 including a network interface card such as a LAN (Local Area Network) card, modem, etc. Communication section 1009 performs communication processing via a network such as the Internet. Drive 1010 is also connected to I / O interface 1005 as needed. Removable media 1011, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 1010 as needed so that computer programs read from them can be installed into storage section 1008 as needed.
[0258] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing computer programs for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 1009, and / or installed from removable medium 1011. When the computer program is executed by CPU 1001, it performs the various functions defined in the present invention.
[0259] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. Each block in a flowchart or block diagram may represent a module, program segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those shown in the drawings.
[0260] Specifically, the motor drive system of this embodiment includes a processor and a memory. The memory stores a computer program. When the computer program is executed by the processor, it implements the overload protection method for permanent magnet synchronous motors provided in the above embodiment.
[0261] In another aspect, the present invention also provides a computer-readable storage medium, which may be included in the motor drive system described in the above embodiments; or it may exist independently and not assembled into the motor drive system. The storage medium carries one or more computer programs that, when executed by a processor of the motor drive system, cause the motor drive system to implement the overload protection method for permanent magnet synchronous motors provided in the above embodiments.
[0262] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
[0263] As used in the above embodiments, depending on the context, the term "when..." can be interpreted as meaning "if...", "after...", "in response to determining...", or "in response to detecting...". Similarly, depending on the context, the phrase "when determining..." or "if (the stated condition or event) is interpreted as meaning "if determining...", "in response to determining...", "when (the stated condition or event) is detected", or "in response to detecting (the stated condition or event)".
Claims
1. An overload protection method suitable for permanent magnet synchronous motors, characterized in that, Applied to a motor drive system, the motor drive system comprising a servo driver and a permanent magnet synchronous motor, the method includes: Obtain the overload curve sample points of the permanent magnet synchronous motor, and calculate the protection time constant corresponding to each overload curve sample point according to the inverse time protection formula. Then, form a K value sample set by combining the protection time constant K corresponding to each current percentage. The fitting parameters are obtained by fitting an exponential decay function to the K-value sample set, and the fitting parameters include an amplitude coefficient, a decay rate coefficient, and a shift constant. The stator current amplitude is calculated based on the direct-axis feedback current and quadrature-axis feedback current of the permanent magnet synchronous motor, and the stator current amplitude is converted into the current percentage. When the current current percentage reaches the overload threshold, the current protection time constant K is calculated based on the current current percentage and the fitted parameters. The current protection time constant K and the current current percentage are then substituted into the inverse time protection formula to calculate the current protection time. The motor thermal accumulation value is updated in each preset protection cycle according to the current protection time. When the motor thermal accumulation value reaches the alarm threshold, the motor overload alarm is triggered.
2. The method according to claim 1, characterized in that, The step of fitting an exponential decay function to the K-value sample set to obtain fitting parameters specifically includes: Based on the physical characteristic that the protection time constant K decreases monotonically with the increase of the current percentage and is always positive, the parameter constraints of the amplitude coefficient being greater than zero, the attenuation rate coefficient being less than or equal to zero, and the offset constant being greater than zero are established. Under the parameter constraints, the optimization objective is to minimize the sum of squared residuals between the protection time constant K of each sample point in the K-value sample set and the output value of the exponential decay function at the corresponding current percentage. The three fitting parameters to be solved are iteratively optimized and solved. When the change in the sum of squared residuals during the iteration process is less than a preset convergence threshold, the iteration stops, and the current amplitude coefficient, decay rate coefficient, and offset constant are output as the fitting parameters.
3. The method according to claim 1, characterized in that, The step of updating the motor thermal accumulation value in each preset protection cycle according to the current protection time, and triggering a motor overload alarm when the motor thermal accumulation value reaches the alarm threshold, specifically includes: Convert the current protection time into a thermal cumulative time parameter expressed in a preset time unit; Within each preset protection cycle, the ratio of the preset thermal accumulation base value to the thermal accumulation time parameter is used as the thermal accumulation increment for the current cycle. The thermal accumulation value of the motor is added to the thermal accumulation increment to obtain the updated thermal accumulation value of the motor, and the updated thermal accumulation value of the motor is limited to a non-negative range. The motor overload alarm is triggered when the updated cumulative motor thermal value reaches the alarm threshold.
4. The method according to claim 1, characterized in that, After the step of fitting the exponential decay function to obtain the fitting parameters for the K-value sample set, the method further includes: The normalization ratio value corresponding to each parameter in the fitting parameters is obtained by normalizing each parameter. Each of the normalized ratio values is discretized into parameter indices and spliced together according to a preset bit field structure to form compressed parameter data of a fixed length. The compressed parameter data is then written into the encoder non-volatile memory of the permanent magnet synchronous motor. During power-on initialization, the compression parameter data is read from the encoder's non-volatile memory. The compression parameter data is then split according to the preset bit field structure to obtain each parameter index. After restoring each parameter index to the normalization ratio value, inverse normalization processing is performed to recover the fitted parameters.
5. The method according to claim 4, characterized in that, The step of discretizing each of the normalized ratio values into parameter indices and concatenating them according to a preset bit-field structure to form compressed parameter data of a fixed length specifically includes: For fitting parameters whose logarithmic values span multiple orders of magnitude, a logarithmic operation is first performed, and then linear normalization is performed within a preset logarithmic value range to obtain the corresponding normalization ratio. For fitting parameters whose logarithmic values are within the same order of magnitude, linear normalization is performed directly within their respective preset linear value ranges to obtain the corresponding normalization ratio. Based on the degree of influence of each fitting parameter on the calculation accuracy of the current protection time, a differentiated index bit width is assigned to each parameter, and each normalization ratio value is uniformly discretized into the corresponding parameter index according to its assigned index bit width. The compressed parameter data is obtained by concatenating the bit fields of each parameter index according to the allocated index bit width, and then splitting the compressed parameter data into multiple storage values that are adapted to the storage interface bit width for storage.
6. The method according to claim 1, characterized in that, After the step of fitting the exponential decay function to obtain the fitting parameters for the K-value sample set, the method further includes: Calculate the fitting error between the protection time constant K for each sample point in the K-value sample set and the fitted K value calculated based on the fitting parameters at the current percentage of that sample point; When the fitting error of any sample point exceeds a preset error threshold or any parameter in the fitting parameters exceeds its preset reasonable value range, parameter anomaly handling is performed. The parameter anomaly handling includes at least one of the following: performing amplitude limiting processing on fitting parameters that exceed the range, adjusting the parameter value range and then re-performing function fitting, adding sample points to the overload curve sample points and then re-performing the inverse calculation and function fitting, and using a standard lookup table protection mode.
7. The method according to claim 1, characterized in that, The step of calculating the current protection time constant K based on the current current percentage and the fitted parameters, and substituting the current protection time constant K and the current current percentage into the inverse time protection formula to calculate the current protection time specifically includes: Substituting the current current percentage into the exponential decay function determined by the fitting parameters, we obtain the current protection time constant K; The current current percentage is converted into the current current multiplier, and the original protection time is calculated based on the current protection time constant K and the current current multiplier. The original protection time is modified by applying gain correction and offset correction, and the modified protection time is then subjected to minimum protection time limiting to obtain the current protection time.
8. A motor drive system, characterized in that, The motor drive system includes: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code including computer instructions, and the one or more processors call the computer instructions to cause the motor drive system to perform the method as described in any one of claims 1-7.
9. A computer-readable storage medium comprising instructions, characterized in that, When the instructions are executed on the motor drive system, the motor drive system performs the method as described in any one of claims 1-7.
10. A computer program product, characterized in that, When the computer program product is run on the motor drive system, it causes the motor drive system to perform the method as described in any one of claims 1-7.