Motor parameter optimization method, device, electronic device and storage medium

By constructing the position vector of the motor parameters through the whale optimization algorithm and combining it with the motor evaluation model, the problem of premature optimization of motor parameters is solved, and more efficient and accurate motor parameter optimization is achieved.

CN119891848BActive Publication Date: 2025-10-14GREE ELECTRIC APPLIANCE INC OF ZHUHAI
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411990536.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-10-14
Estimated Expiration
2044-12-31

AI Technical Summary

Technical Problem

In the prior art, motor parameter optimization is prone to premature failure, resulting in inaccurate results and lowering the motor's operating efficiency.

Method used

The whale optimization algorithm is used to construct the position vector of the motor parameters, the fitness is determined by the pre-built motor evaluation model, and the best whale individual is selected to determine the optimal motor parameters.

Benefits of technology

The efficiency and accuracy of motor parameter optimization are improved, premature failure is avoided, and the effectiveness of motor parameter optimization is ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119891848B_ABST
    Figure CN119891848B_ABST
Patent Text Reader

Abstract

The application relates to an electric machine parameter optimization method and device, electronic equipment and a storage medium. The method comprises the following steps: obtaining a plurality of groups of parameter values corresponding to a plurality of different electric machine parameters to be optimized, and obtaining a group of parameter values from the plurality of groups of parameter values for any whale individual in a preset whale population to construct a position vector of the whale individual; wherein each group of parameter values comprises one parameter value corresponding to each electric machine parameter; inputting the position vector of any whale individual into a pre-constructed electric machine evaluation model to obtain the fitness of the whale individual; in the case that the fitness is less than a preset threshold, determining an optimal whale individual from the whale population according to the fitness of each whale individual; and determining optimal electric machine parameters according to the position vector of the optimal whale individual. Thus, the accuracy of electric machine parameter optimization can be improved, and the effectiveness of electric machine parameter optimization is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of motor parameter adjustment, and in particular to a method, device, electronic device and storage medium for optimizing motor parameters. Background Art

[0002] In existing motor control systems for permanent magnet synchronous motors, the motor's dynamic parameters are easily affected by environmental factors such as high temperature and high humidity, so there is uncertainty in the motor's dynamic parameters. The motor control algorithm is highly dependent on the motor's real-time parameters. At this time, if constant parameters are still used as the algorithm's control input, large control errors will result. Therefore, it is particularly important to optimize the motor parameters.

[0003] In related technologies, a particle swarm algorithm is generally used to optimize motor parameters. However, this method is prone to premature failure and inaccurate results, which can easily lead to large deviations when optimizing motor parameters and reduce the working efficiency of the motor. Summary of the Invention

[0004] The present application provides a method, device, electronic device and storage medium for optimizing motor parameters to solve the technical problem in the prior art that the optimization of motor parameters is prone to premature optimization and inaccurate results, thereby easily resulting in large deviations when optimizing motor parameters and reducing the working efficiency of the motor.

[0005] In a first aspect, the present application provides a method for optimizing motor parameters, the method comprising:

[0006] Obtaining multiple sets of parameter values ​​corresponding to multiple different motor parameters to be optimized, and obtaining a set of parameter values ​​for any individual whale in a preset whale population from the multiple sets of parameter values ​​to construct a position vector of the individual whale; wherein each set of parameter values ​​includes a parameter value corresponding to each of the motor parameters;

[0007] For any individual whale, the position vector of the individual whale is input into a pre-built motor evaluation model to obtain the fitness of the individual whale;

[0008] When the fitness is less than a preset threshold, determining the best whale individual from the whale population according to the fitness of each of the whale individuals;

[0009] Optimal motor parameters are determined according to the position vector of the best individual whale.

[0010] In a second aspect, the present application provides a device for optimizing motor parameters, the device comprising:

[0011] An acquisition module is configured to acquire multiple sets of parameter values ​​corresponding to multiple different motor parameters to be optimized, and for any individual whale in a preset whale population, acquire a set of parameter values ​​from the multiple sets of parameter values ​​to construct a position vector of the individual whale; wherein each set of parameter values ​​includes a parameter value corresponding to each of the motor parameters;

[0012] A first determination module is configured to input the position vector of any individual whale into a pre-built motor evaluation model to obtain the fitness of the individual whale;

[0013] A second determining module is configured to determine the best whale individual from the whale population according to the fitness of each of the whale individuals when the fitness is less than a preset threshold;

[0014] The third determination module is used to determine the optimal motor parameters according to the position vector of the best whale individual.

[0015] In a third aspect, the present application provides an electronic device comprising: a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; the memory is used to store a computer program; and the processor is used to implement the motor parameter optimization method described in any one of the first aspects when executing the computer program.

[0016] In a fourth aspect, the present application provides a storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for optimizing motor parameters described in any one of the first aspects.

[0017] The above-mentioned technical solution provided by the embodiment of the present application has the following advantages compared with the existing technology: the method provided by the embodiment of the present application, by constructing the position vector of each whale individual by including parameter values ​​corresponding to multiple different motor parameters, and determining the fitness of each whale individual in combination with a pre-built evaluation model, the best whale individual can be determined according to the fitness, and an optimal motor parameter can be determined according to the best position vector. Since a whale individual integrates multiple motor parameters, the efficiency of motor parameter optimization can be improved, and the whale optimization algorithm has few adjustable parameters, a clear structure, and includes a whale random search process, which avoids premature phenomenon, improves the accuracy of motor parameter optimization, and ensures the effectiveness of motor parameter optimization. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or prior art description will be briefly introduced as follows. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without any creative effort.

[0020] One or more embodiments are illustrated by way of example in the drawings that are not intended to be limiting of the embodiments. Like references indicate similar elements in the drawings and the specification. The drawings are not necessarily to scale, the emphasis instead being placed upon illustrating the principles of the embodiments.

[0021] Figure 1 An embodiment flow chart of a motor parameter optimization method provided by the embodiment of the present application;

[0022] Figure 2 An embodiment flow chart of another motor parameter optimization method provided by the embodiment of the present application;

[0023] Figure 3 A structure schematic diagram of a motor vector control sub-model provided by the embodiment of the present application;

[0024] Figure 4 A structure schematic diagram of a motor evaluation model provided by the embodiment of the present application;

[0025] Figure 5 An embodiment flow chart of still another motor parameter optimization method provided by the embodiment of the present application;

[0026] Figure 6 An embodiment flow chart of yet another motor parameter optimization method provided by the embodiment of the present application;

[0027] Figure 7 An embodiment flow chart of still another motor parameter optimization method provided by the embodiment of the present application;

[0028] Figure 8 A schematic diagram of a fitness change curve provided by the embodiment of the present application;

[0029] Figure 9 A schematic diagram of a fitness change curve in the prior art provided by the embodiment of the present application;

[0030] Figure 10 A comparison diagram of an electronic resistance optimization curve provided by the embodiment of the present application;

[0031] Figure 11 An embodiment block diagram of a motor parameter optimization device provided by the embodiment of the present application;

[0032] Figure 12 A structural schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0033] To make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described below in connection with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.

[0034] The following disclosure provides many different embodiments, or examples, for implementing different structures of the present application. For the purpose of simplicity, the elements and settings of particular examples in the following description are shown in great detail. Of course, they are merely examples and are presented to provide an enabling description of the application. In addition, the present application can refer to a reference numeral and / or letter in different examples. Such repetition is for the purpose of simplicity and clarity and does not indicate a relationship between the various embodiments and / or settings discussed.

[0035] In order to solve the technical problem that the existing technology is prone to premature in optimizing motor parameters, the result is inaccurate, and thus a large deviation is prone to occur in optimizing motor parameters, thereby reducing the working efficiency of the motor, the present application provides a motor parameter optimization method, which can realize constructing a position vector of each whale individual containing parameter values corresponding to multiple different motor parameters, determining the fitness of each whale individual in combination with a pre-constructed evaluation model, determining the best whale individual according to the fitness, and determining an optimal motor parameter according to the best position vector. Since one whale individual integrates multiple motor parameters, the efficiency of motor parameter optimization can be improved, and the whale optimization algorithm has few adjustable parameters, a clear structure, and a whale random search process, thereby avoiding the premature phenomenon, improving the accuracy of motor parameter optimization, and ensuring the effectiveness of motor parameter optimization.

[0036] The motor parameter optimization method provided by the present application will be further explained and described in specific embodiments in connection with the drawings below, and the embodiments do not constitute a limitation on the embodiments of the present application.

[0037] Reference is made to Figure 1 An embodiment flowchart of a motor parameter optimization method provided by an embodiment of the present application. As shown in Figure 1 The flowchart can include the following steps:

[0038] In step 101, a plurality of groups of parameter values corresponding to a plurality of different motor parameters to be optimized are obtained, and for any whale individual in a preset whale population, a group of parameter values is obtained from the plurality of groups of parameter values to construct a position vector of the whale individual, wherein each group of parameter values includes a parameter value corresponding to each motor parameter.

[0039] The motor parameters, the related parameters of motor operation, the motor can be a permanent magnet synchronous motor, or other motors, and the embodiments of the present application do not limit this. The motor parameters can include but are not limited to: stator resistance, flux linkage, cross-axis inductance, direct-axis inductance, and rotor moment of inertia.

[0040] The plurality of groups of parameter values refer to different combinations of parameter values corresponding to different motor parameters, that is, each motor parameter can correspond to a plurality of parameter values, and each group of parameter values includes a parameter value corresponding to each motor parameter. For example, different motor parameters are 5, and each motor parameter corresponds to three parameter values, so there are 243 groups of parameter values.

[0041] The whale population is a population that is set in advance and includes a preset number of whales. The number of whales in the whale population can be 55, 60, or other values, and the embodiments of the present application do not limit this.

[0042] The position vector refers to a vector representing the position of the whale individual. Since it is constructed by each group of parameter values, and each group of parameter values includes parameter values corresponding to a plurality of motor parameters, the position vector is a multidimensional vector, and each dimension can correspond to a motor parameter.

[0043] In the embodiments of the present application, the subject of the embodiments of the present application can obtain a plurality of groups of parameters corresponding to a plurality of different motor parameters to be optimized. Then, for any whale individual in a preset whale population, a group of parameter values is obtained from the plurality of groups of parameter values to construct a position vector of the whale individual according to the group of parameter values.

[0044] In step 102, for any whale individual, the position vector of the whale individual is input into a pre-constructed motor evaluation model to obtain the fitness of the whale individual.

[0045] In step 103, in the case where the fitness is less than a preset threshold, the best whale individual is determined from the whale population according to the fitness of each whale individual.

[0046] In step 104, the optimal motor parameters are determined according to the position vector of the best whale individual.

[0047] The steps 102 to 104 are described as follows:

[0048] The above fitness is used to evaluate the advantages and disadvantages of the whale individual. In the embodiments of the present application, the smaller the fitness is, the closer the whale individual is to the optimal motor parameter.

[0049] The above motor evaluation model refers to a model that is constructed in advance and used to determine the current fitness of the whale individual.

[0050] The above optimal whale individual refers to the best whale individual in the current whale population. The motor parameter corresponding to the position vector of the best whale individual is the best in the current whale population, that is, the efficiency of the motor running under the motor parameter is higher than that of the motor running under the motor parameters corresponding to the position vectors of other whale individuals.

[0051] In the embodiments of the present application, after the subject of the embodiments of the present application constructs each whale individual in the preset whale population, the subject can input the position vector of each whale individual into the pre-constructed motor evaluation model to obtain the fitness of the whale individual.

[0052] As to how to obtain the fitness of the whale individual, the following Figure 2 flowchart will be described, which will not be described in detail here.

[0053] Then, it can be determined whether the fitness is less than a preset threshold.

[0054] Optionally, in the case where it is determined that the fitness is less than the preset threshold, it is indicated that the best whale individual can be determined according to the currently constructed whale population. Therefore, the best whale individual can be determined from the whale population according to the fitness of each whale individual.

[0055] As an optional implementation manner, the whale individual with the smallest fitness in the whale population can be determined as the best whale individual in the whale population. The best whale individual can represent the optimal solution of the motor parameter.

[0056] Then, since the position vector of the whale individual is constructed according to the parameter values of the plurality of motor parameters, the optimal motor parameter can be determined according to the position vector of the above best whale individual.

[0057] As an optional implementation manner, the position vector of the best whale individual can be analyzed to obtain the motor parameter corresponding to the position vector, and the motor parameter can be determined as the optimal motor parameter.

[0058] The technical scheme provided by the embodiments of the present application comprises the following steps: obtaining a plurality of groups of parameter values corresponding to a plurality of different motor parameters to be optimized; obtaining a group of parameter values from the plurality of groups of parameter values for any whale individual in a preset whale group, and constructing a position vector of the whale individual, wherein each group of parameter values comprises one parameter value corresponding to each motor parameter; inputting the position vector of the whale individual into a pre-constructed motor evaluation model to obtain the fitness of the whale individual; determining the best whale individual from the whale group according to the fitness of each whale individual; and determining the optimal motor parameter according to the position vector of the best whale individual. This technical scheme can determine the best whale individual according to the fitness by constructing the position vector of each whale individual comprising the parameter values corresponding to a plurality of different motor parameters, and determining the fitness of each whale individual in combination with the pre-constructed evaluation model, and can determine an optimal motor parameter according to the best position vector, which can improve the efficiency of motor parameter optimization, and the whale optimization algorithm has few adjustable parameters, a clear structure, and a whale random search process, thereby avoiding the premature phenomenon, improving the accuracy of motor parameter optimization, and ensuring the effectiveness of motor parameter optimization.

[0059] Referring to Figure 2 An embodiment flowchart of another motor parameter optimization method provided by the embodiments of the present application is shown. Figure 2 The flowchart shown in Figure 1 Based on the flowchart shown in Figure 2 The flowchart shown in Figure 2 The flowchart can comprise the following steps:

[0060] Step 201: setting the motor parameters of the motor module in the motor vector control submodel according to the position vector of the whale individual.

[0061] Step 202: inputting the preset expected speed into the updated motor vector control submodel to obtain the speed difference value output by the motor vector control submodel in the running time period.

[0062] The following uniformly describes steps 201 and 202:

[0063] The motor vector control submodel refers to a pre-built motor vector control model, for example, a simulation model built in Simulink (simulation system), which can be used for vector control of the motor.

[0064] For example, refer to Figure 3 A structure diagram of a motor vector control sub-model provided for an embodiment of the present application. As shown in the figure, the structure can include a speed regulation loop, a current regulation loop, a dq-αβ conversion module, an SVPWM (Space Vector Pulse Width Modulation) vector modulation module, an IGBT (Insulated gate bipolar transistor) switching module, a permanent magnet synchronous motor, an abc-αβ conversion module, and an αβ-dq conversion module. Figure 3

[0065] The model shown in the figure can control the motor system by limiting the expected d-axis current to be equal to zero. The specific control action is as follows: the deviation e(t) between the expected speed and the speed feedback is selected as the input of the current regulation loop, the expected d-axis current is limited to be equal to zero, the q-axis current is adjusted, the expected q-axis voltage is controlled, the 2 / 2 conversion is performed jointly with the d-axis expected voltage, the SVPWM vector modulation is performed to generate the switching signal of the IGBT, and then the three-phase current abc acting on the permanent magnet synchronous motor is generated, the motor end output electrical angle θ, the three-phase current and the electrical angle θ are subjected to 3 / 2 conversion and 2 / 2 conversion, respectively, to form the q-axis current feedback and the d-axis current feedback, and the difference between them and the expected current value corresponding thereto is formed to form a closed-loop feedback, and the entire motor vector control model is completed. Figure 3 The expected speed mentioned above refers to the expected speed value of the motor module reached in advance.

[0066] In an embodiment, after receiving the position vector of the whale individual sent by the execution subject of the above embodiment, the motor model can set the motor parameters of the motor module in the motor vector control sub-model according to the position vector of the whale individual, so that the motor module runs based on the motor parameters corresponding to the whale individual. The motor module mentioned above can be a motor included in the motor vector control sub-model, for example

[0067] the permanent magnet synchronous motor shown in the figure. Figure 3

[0068] Then, the preset expected speed can be input into the updated motor vector control sub-model to obtain the speed difference value output by the motor vector control sub-model in the running time period. The speed difference value here refers to the difference between the expected speed and the actual speed fed back by the motor module.

[0069] ​​As an optional implementation method, after receiving the expected speed, the updated motor vector control sub-model can run the updated motor module based on the above-mentioned expected speed, and obtain the actual speed output by the motor module. Thereafter, the above-mentioned speed difference can be obtained by subtracting the above-mentioned actual speed from the above-mentioned expected speed.

[0070] As an exemplary embodiment, the above-mentioned speed difference can be determined through iterative steps until the feedback direct-axis current fed back by the motor vector control sub-model and the preset expected direct-axis current meet preset conditions, wherein the preset condition can be that the feedback direct-axis current reaches the above-mentioned expected direct-axis current, or that the difference between the feedback direct-axis current and the expected direct-axis current is less than a preset difference threshold.

[0071] The iterative steps are as follows:

[0072] First, the speed deviation is obtained by subtracting the expected speed from the actual speed obtained in the previous round. When the current round is the first round, the actual speed can be a preset value, that is, during the first round of iteration, the motor module in the motor vector control submodel has not yet fed back the actual speed. Therefore, a preset value can be added as the actual speed of the first round. The preset value can be determined according to the expected speed, for example, it can be the expected speed multiplied by a preset percentage, or it can be a value determined according to historical records. This embodiment of the present application does not limit this. The actual speed refers to the motor module in the motor vector control submodel (for example Figure 3 The actual speed of the permanent magnet synchronous motor (shown) is actually fed back in the previous round.

[0073] Then, the above speed deviation and the preset desired quadrature axis current (for example Figure 3 The desired q-axis current shown in FIG), and the preset desired direct-axis current (eg Figure 3 The desired d-axis current shown in FIG. 1 is input into a preset current regulation module to obtain the desired quadrature-axis voltage output by the current regulation module. The above-mentioned current regulation module can be used to regulate the current in the motor vector control sub-model, for example Figure 3 In the current regulation loop shown, the above-mentioned desired direct-axis current can be 0. In this method, the desired quadrature-axis voltage can be controlled by limiting the desired direct-axis current to zero (it can also be other values ​​greater than zero, which is not limited in the embodiments of the present application) and adjusting the quadrature-axis current.

[0074] Next, the three-phase currents acting on the motor module can be determined based on the expected quadrature-axis voltage and the preset expected direct-axis voltage. As an optional implementation, the expected quadrature-axis voltage and the expected direct-axis voltage can be converted into a 2 / 2 ratio, and SVPWM vector modulation can be used to generate the switching signals that control the IGBTs, thereby generating the three-phase currents abc acting on the permanent magnet synchronous motor.

[0075] Thereafter, the three-phase current can be input into the motor module to obtain the electrical angle and actual speed fed back by the motor module.

[0076] Finally, the feedback direct-axis current corresponding to the desired direct-axis current can be determined based on the three-phase current and the electrical angle. In addition, the feedback quadrature-axis current corresponding to the desired quadrature-axis current can also be obtained.

[0077] As an optional implementation method, the three-phase current and electrical angle can be transformed into feedback quadrature-axis current and feedback direct-axis current respectively through 3 / 2 transformation and 2 / 2 transformation, and the difference between them and the corresponding expected current values ​​is made to form closed-loop feedback.

[0078] At this point, the above iterative steps are completed, wherein each round of iteration can obtain a feedback direct-axis current and an actual speed. After the feedback direct-axis current is obtained, it can be determined whether the feedback direct-axis current and the above expected direct-axis current meet the preset conditions.

[0079] Optionally, if the condition is satisfied, the iteration may be terminated to obtain the actual rotation speed of the final wheel, and the actual rotation speed may be subtracted from the expected rotation speed to obtain the rotation speed deviation.

[0080] Optionally, if not satisfied, proceed to the next round of iteration.

[0081] Step 203: Input the speed difference into the evaluation function sub-model to obtain the fitness of the individual whale output by the evaluation function sub-model.

[0082] The above-mentioned evaluation function sub-model refers to a model used to determine the fitness of individual whales.

[0083] In the embodiment of the present application, by inputting the rotation speed difference obtained in the above steps into a preset evaluation function sub-model, the fitness of the individual whale output by the evaluation function sub-model can be obtained.

[0084] As an optional implementation method, the above speed difference can be input into the evaluation function formula shown in the following formula (1) to obtain the fitness of the individual whale corresponding to the speed difference:

[0085]

[0086] Among them, the above J is the fitness of the whale individual, the above t is the total duration corresponding to the operation time period of the motor module in the whale individual corresponding motor parameters, and the above e(t) is the speed difference.

[0087] As another optional implementation, the above evaluation function sub-model may include: Figure 4 The model structure shown. Figure 4, is a schematic diagram of the structure of a motor evaluation model provided in an embodiment of the present application. Figure 4 As shown, the motor evaluation model may include an evaluation function sub-model and Figure 3 The motor vector control sub-model is shown in Figure 2. Figure 4 As shown, the evaluation function sub-model may include a multiplier, an integrator, and an output module.

[0088] Based on this, the absolute value of the speed difference and the total duration of the motor module's operation during the whale's individual motor parameters can be input into the multiplier to obtain the product of the absolute value and the total duration. This product can then be input into an integrator to integrate it based on the total duration. The integrated result is output through an output module to obtain the fitness of the whale.

[0089] The technical solution provided by the embodiment of the present application sets the motor parameters of the motor module in the motor vector control sub-model according to the position vector of the individual whale, inputs the preset expected speed into the updated motor vector control sub-model, obtains the speed difference output by the motor vector control sub-model during the operation time period, inputs the speed difference into the above-mentioned evaluation function sub-model, and obtains the fitness of the individual whale output by the evaluation function sub-model. This technical solution determines the fitness of each individual whale through the motor evaluation model, and the motor evaluation module includes a motor vector control sub-model and an evaluation function sub-model. The motor vector control sub-model can simulate the speed deviation of the motor under the motor parameters corresponding to the individual whale, and the evaluation function sub-model can determine the fitness of the individual whale based on the speed deviation. The above two sub-models can be used together to simulate the fitness of the motor under the motor parameters corresponding to the individual whale. The obtained fitness is more consistent with the actual situation and more accurate, achieving a more efficient and accurate determination of the fitness of the individual whale.

[0090] See also Figure 5 , which is a flow chart of an embodiment of another method for optimizing motor parameters provided in an embodiment of the present application. Figure 5 The process shown in Figure 1 Based on the process shown in the figure, it describes how to determine the optimal motor parameters when the fitness of the individual whale is greater than or equal to the preset threshold. Figure 5 As shown, the process may include the following steps:

[0091] Step 501: When the fitness of a whale individual is greater than or equal to a preset threshold, for any whale individual, the current position vector of the whale individual is adjusted according to the position vector of the best whale individual to obtain a first position vector.

[0092] The best whale individuals mentioned above refer to those that have been Figure 1The best individual whales in the current whale population as determined by the process shown.

[0093] In the embodiment of the present application, when it is determined that the fitness of a whale individual is greater than or equal to a preset threshold, it means that there is at least one whale individual to be optimized in the whale population at this time. Figure 1 The best position vector of the whale individual is determined by the process shown, and the current position vector of the whale individual is adjusted to obtain a first position vector.

[0094] As for how to adjust the current position vector of the whale individual according to the position vector of the best whale individual to obtain the first position vector, please refer to the following Figure 6 The process shown here will not be described in detail. Figure 6 The process shown in the figure describes how to adjust the position vector of the current round of the whale individual according to the position vector of the best whale individual in the current round to obtain the second position vector. Based on this, in this embodiment, Figure 1 The best whale individual determined by the process shown is used as the best whale individual in the current round, and the current position vector of the whale individual is used as the position vector of the current round of the whale individual, and according to Figure 6 The process shown uses the obtained second position vector as the above-mentioned first position vector.

[0095] Step 502: Use the first position vector as the position vector of the first iteration. For any individual whale, input the position vector of the current round of the individual whale into a pre-built motor evaluation model to obtain the fitness of the individual whale.

[0096] Step 503: Determine the best whale individual in the current round from the whale population based on the fitness of the individual whales.

[0097] Step 504: For any whale individual, adjust the position vector of the current round of the whale individual according to the position vector of the best whale individual in the current round to obtain a second position vector.

[0098] The following is a unified description of steps 502 to 504:

[0099] The above motor evaluation model can be a model for evaluating the motor parameters corresponding to individual whales, for example Figure 1 Motor evaluation model in the shown process.

[0100] The above fitness is used to evaluate the quality of individual whales. In the embodiment of the present application, the smaller the fitness, the closer the individual whale is to the optimal motor parameters.

[0101] In the embodiment of the present application, when determining Figure 1When the fitness of each whale individual determined by the process shown is greater than or equal to a preset threshold, the current position vector of the whale individual can be adjusted to a first position vector based on the position vector of the best whale individual, and the first position vector can be used as the position vector of the whale individual in the first round of iteration to iterate the whale individuals in the whale population.

[0102] In one embodiment, for any individual whale, the position vector of the current wheel of the individual whale may be input into a pre-built motor evaluation model to obtain the fitness of the individual whale.

[0103] As an optional implementation, the process of determining the fitness of individual whales through the motor evaluation model can be referred to Figure 2 The process shown will not be described in detail here.

[0104] Afterwards, the best whale individual for the current round can be determined from the whale population based on the fitness of each whale individual.

[0105] As an optional implementation method, the whale individual with the smallest fitness can be determined as the best whale individual in the current round in the whale population.

[0106] In one embodiment, during this round of iteration, after determining the best whale individual for the current wheel, in order to further optimize the motor parameters corresponding to the position vector of the whale individual, the executive body of the embodiment of the present application may adjust the position vector of the current wheel of the whale individual according to the position vector of the best whale individual for the current wheel after determining the best whale individual for the current wheel, to obtain an adjusted second position vector.

[0107] As for how to adjust the position vector of the current round of the whale individual according to the position vector of the best whale individual in the current round to obtain the adjusted second position vector, it can be found in the following text. Figure 6 The process shown is explained below and will not be described in detail here.

[0108] Step 505: Determine whether the current number of iterations reaches a preset threshold, or whether the fitness of any individual whale is less than the preset threshold. If it is determined that the number of iterations does not reach the threshold, and the fitness of any individual whale is greater than or equal to the preset threshold, use the second position vector as the position vector for the next round, and return to step 502. If yes, execute step 506.

[0109] Step 506: After the iteration is completed, the optimal motor parameters are determined based on the position vector of the best whale individual obtained in the last round.

[0110] The following is a unified description of step 505 and step 506:

[0111] In an embodiment of the present application, after each iteration, the execution subject of the embodiment of the present application can determine whether the preset iteration end condition is met at present.

[0112] As an optional implementation, it can be determined whether the current iteration number reaches a preset number threshold. If the iteration number reaches the number threshold, it can be determined that the iteration end condition is met at present. If the iteration number does not reach the number threshold, it can be determined that the iteration end condition is not met at present.

[0113] As another optional implementation, the execution subject of the embodiment of the present application can determine whether the fitness of any whale individual at present is less than a preset threshold. If it is determined that the fitness of any whale individual is less than the preset threshold, it can be determined that the iteration end condition is met at present. If it is determined that the fitness of at least one whale individual is greater than or equal to the preset threshold, it can be determined that the iteration end condition is not met at present.

[0114] As still another optional implementation, the execution subject of the embodiment of the present application can determine whether the current iteration number reaches a preset number threshold, and determine whether the fitness of any whale individual is less than a preset threshold.

[0115] Optionally, in a case where it is determined that the current iteration number reaches the preset number threshold, or the fitness of any whale individual is less than the preset threshold, it can be determined that the preset iteration end condition is met at present.

[0116] Optionally, in a case where it is determined that the current iteration number does not reach the number threshold, and the fitness of at least one whale individual is greater than or equal to the preset threshold, it can be determined that the preset iteration end condition is not met at present.

[0117] In an embodiment, after it is determined that the preset iteration end condition is met at present, the optimal motor parameter can be determined according to the position vector of the best whale individual obtained in the last round.

[0118] As an optional implementation, the motor parameter represented by the position vector of the best whale individual obtained in the last round can be determined, and the motor parameter is determined as the optimal motor parameter.

[0119] The technical solution provided by the embodiment of the present application is that, when the fitness of the whale individual is greater than or equal to a preset threshold, for any whale individual, the current position vector of the whale individual is adjusted according to the position vector of the above-mentioned best whale individual to obtain a first position vector, and the above-mentioned first position vector is used as the position vector of the first round of iteration. For any whale individual, the position vector of the current round of the above-mentioned whale individual is input into a pre-constructed motor evaluation model to obtain the fitness of the whale individual, and according to the fitness of the whale individual, the best whale individual of the current round is determined from the above-mentioned whale population. For any whale individual, the position vector of the current round of the whale individual is adjusted according to the position vector of the best whale individual of the current round to obtain a second position vector, and it is determined whether the current number of iterations reaches a preset number threshold or the fitness of any whale individual is less than the preset threshold. If it is determined that the number of iterations does not reach the number threshold and the fitness of any whale individual is greater than or equal to the preset threshold, the second position vector is used as the position vector of the next round, and the iteration step is returned to be executed; if not, after the iteration is completed, the optimal motor parameters are determined according to the position vector of the best whale individual obtained in the last round. This technical solution uses the whale optimization algorithm to iteratively optimize the motor parameters to be optimized. It can achieve one-time operation and simultaneously optimize multiple parameters of the motor. The whale optimization algorithm has few adjustable parameters. The existence of the whale random search process effectively avoids the algorithm from falling into premature phenomenon, thereby improving the accuracy of the motor parameters while ensuring the effectiveness of the optimization results.

[0120] See also Figure 6 , which is a flow chart of an embodiment of another method for optimizing motor parameters provided in an embodiment of the present application. Figure 6 The process shown in Figure 5 Based on the process shown in FIG, it is described how to adjust the position vector of the current round of the whale individual according to the position vector of the best whale individual in the current round to obtain the second position vector. Figure 6 As shown, the process may include the following steps:

[0121] Step 601: Determine the current shrinkage coefficient.

[0122] The above-mentioned shrinkage coefficient refers to the degree of shrinkage of the current whale population.

[0123] In one embodiment, when determining the current shrinkage and enveloping coefficient, the execution subject of the embodiment of the present application may first obtain the current linear weight value and input the linear weight value into the following formula (2) to obtain the shrinkage and enveloping coefficient, wherein the linear weight value may be inversely proportional to the number of iterations:

[0124]

[0125] Among them, the above Represents the shrinkage coefficient, the above represents the above linear weight value, and the above rand represents a random positive number not exceeding 1.

[0126] Step 602: Perform a first adjustment on the position vector of the current round of the whale individual according to the prey encirclement sub-algorithm in the preset whale optimization algorithm, the best whale individual in the current round, and the shrinkage encirclement coefficient.

[0127] The above-mentioned prey encirclement sub-algorithm refers to the step used to encircle prey in the whale optimization algorithm. It aims to use the best whale individual in the current round as prey, and other whale individuals approach the prey, thereby achieving the purpose of optimizing the position vector of the whale individual.

[0128] In the embodiment of the present application, when the execution subject of the embodiment of the present application performs a first adjustment on the position vector of the current round of the whale individual according to the surrounding prey sub-algorithm, the best whale individual in the current round, and the shrinking surrounding coefficient, the position vector of the current round of the whale individual, the position vector of the best whale individual in the current round, and the shrinking surrounding system can be input into the following formula (3) to obtain the first adjusted whale individual:

[0129]

[0130] Among them, the above is the position vector of the whale individual after the first adjustment, is the position vector of the best whale individual in the current round, the above is the shrinkage coefficient, the above is a random positive number not exceeding the preset value. is the position vector of the current round of the whale individual. It can be a preset multiple of the random integer rand in formula (2), for example, 2 times.

[0131] Step 603: Generate a random number and determine whether the random number is greater than or equal to a first preset threshold. If so, execute step 604; if not, execute step 605.

[0132] Step 604: Based on the bubble net attack sub-algorithm in the whale optimization algorithm and the best whale individual in the current round, a second adjustment is made to the position vector of the whale individual in the current round to obtain a second position vector.

[0133] Step 605: Perform a second adjustment on the position vector of the current wheel of the whale individual based on the shrinkage and enveloping coefficient to obtain a second position vector.

[0134] The following is a unified description of steps 603 to 605:

[0135] In an embodiment of the present application, in order to make the individual whale closer to the best individual whale, the execution subject of the embodiment of the present application may generate a random number and make a second adjustment to the position vector of the individual whale based on the generated random number.

[0136] As an optional implementation method, it can be determined whether the random number is greater than or equal to a first preset threshold. The above-mentioned first preset threshold is a pre-set threshold, which can be 0.5 or other values. The embodiment of the present application does not limit this.

[0137] As an exemplary embodiment, when it is determined that the random number is greater than or equal to the above-mentioned first preset threshold, the position vector of the current round of the whale individual can be adjusted for the second time according to the bubble net attack sub-algorithm in the above-mentioned whale optimization algorithm and the best whale individual in the current round to obtain a second position vector.

[0138] As an implementation method, the position vector of the current round of the whale individual and the position vector of the current best whale individual can be input into the following formula (IV) to obtain the second position vector of the second adjusted whale individual:

[0139]

[0140] Among them, the above is the second position vector of the whale individual is the position vector of the best whale individual in the current round, the above is the position vector of the current wheel of the whale individual, the above b is the first preset parameter, and the above l is the second preset parameter.

[0141] As another exemplary embodiment, when it is determined that the random number is less than the first preset threshold, a second adjustment may be made to the position vector of the current round of the individual whale based on the shrinkage and envelopment coefficient to obtain a second position vector.

[0142] As an implementation method, it can be determined whether the absolute value of the shrinkage coefficient is less than a second preset threshold. The second preset threshold can be a preset range that indicates that the current shrinkage range of the whale population is in a smaller range, such as 1.

[0143] Optionally, when it is determined that the absolute value of the shrinkage and encirclement coefficient is less than a second preset threshold, it means that the shrinkage range of the whale population is small at this time. Therefore, the position vector of the current round of the whale individual can be adjusted for the second time according to the prey encirclement sub-algorithm, the best whale individual in the current round, and the shrinkage and encirclement coefficient to obtain a second position vector.

[0144] As an exemplary implementation, the bubble net attack sub-algorithm shown in the above formula (IV) can be used to perform a second adjustment on the position vector of the current round of the whale individual to obtain a second position vector.

[0145] Optionally, when it is determined that the absolute value of the shrinkage envelopment coefficient is greater than or equal to a second preset threshold, it means that the shrinkage range of the whale population is larger at this time. Therefore, according to the random search sub-algorithm in the whale optimization algorithm, the position vector of the current round of the individual whale can be adjusted for the second time to obtain the second position vector.

[0146] As an exemplary embodiment, the position vector of the current wheel of any random whale individual can be obtained, and the position vector of the current wheel of the above whale individual and the position vector of the current wheel of the random whale individual are input into the following formula (5) to obtain the second position vector of the second adjusted whale individual:

[0147]

[0148] Among them, the above is the second position vector of the above-mentioned individual whale, is the position vector of the current round of the random whale individual mentioned above is the above shrinkage coefficient, is a random positive number not exceeding the preset value. is the position vector of the current round of the whale individual.

[0149] The technical solution provided in the embodiment of the present application first adjusts the position vector of the current round of the whale individual according to the prey encirclement sub-algorithm in the preset whale optimization algorithm, the best whale individual in the current round, and the shrinkage encirclement coefficient, generates a random number, and determines whether the random number is greater than or equal to a first preset threshold. If so, the position vector of the current round of the whale individual is second-adjusted according to the bubble net attack sub-algorithm in the whale optimization algorithm and the best whale individual in the current round to obtain a second position vector; if not, the position vector of the current round of the whale individual is second-adjusted based on the shrinkage encirclement coefficient to obtain a second position vector. This technical solution uses the whale optimization algorithm to adjust the position vectors of the whale individuals in the whale population twice to make the whale individuals closer to the best whale individuals, so that the best whale individual in the final round can be obtained through multiple iterations. The adjustment of the whale individuals by the random search sub-algorithm effectively avoids the algorithm from falling into premature phenomenon, thereby improving the accuracy of the motor parameters while ensuring the effectiveness of the optimization results.

[0150] See also Figure 7 , provides a flow chart of an embodiment of a method for optimizing motor parameters for the embodiment of the present application. Figure 7 As shown, the process may include the following steps:

[0151] 1. Whale algorithm deployment settings:

[0152] (1) First, the permanent magnet synchronous motor dynamics model is built in Simulink, as shown in Figure 4 ;

[0153] (2) At the same time, the whale algorithm is programmed in Matlab.

[0154] (3) Whale algorithm originates from the simulation of the feeding phenomenon of a group of marine humpback whales, and the three steps of whale algorithm implementation are: random search prey, surround prey and bubble prey steps.

[0155] (4) The core advantage of the whale algorithm is that compared with other group optimization algorithms, it has a clear structure, and due to the existence of the random search step, it will not fall into local optimum. The application considers that the motor parameter identification system design exactly needs few adjustable parameters, reliable identification results, and will not fall into local optimum, so the whale algorithm is selected as the best algorithm for parameter identification.

[0156] (5) The whale position vector designed in the application is five-dimensional, and each dimension represents five identified parameters, namely stator resistance, flux, cross-axis inductance, and rotor moment of inertia. After the update iteration as shown in the flow Figure 3 , the optimal whale position vector generated represents the optimal value of the to-be-identified parameters.

[0157] (6) The application uses a suitable function as an evaluation index of the accuracy of the motor system identification result, which will be introduced one by one.

[0158] 2. Introduction of three steps of whale algorithm:

[0159] (1) The surround prey step is the first action taken by the whale after discovering the prey, and this step is described by the function as follows:

[0160]

[0161] In the formula: represents the intermediate vector of the whale algorithm; represents the optimal position whale vector in the current iteration; represents the distance of the next generation of whale swimming; represents the t+1 generation whale position vector; represents the t generation whale position vector; rand represents a random positive number not exceeding 1; represents a vector decreasing from 2 to 0.

[0162] (2) The bubble net attack step is a simulation of the hunting process, and there are two different postures for hunting, which can be represented by the function as follows:

[0163]

[0164] Where: p is a random positive number not exceeding 1; Represents the intermediate vector of the whale algorithm; Represents the optimal position whale vector in the current iteration; represents the distance the next generation of whales will swim; represents the position vector of the whale in generation t+1; represents the position vector of the whale in the tth generation; rand represents a random positive number not exceeding 1; Represents a vector that decreases from 2 to 0; l and b are the parameters that determine the whale's ascending spiral.

[0165] (3) The random search step is the key to the algorithm's superiority over other algorithms. The existence of whale random search avoids the defect of premature learning.

[0166]

[0167] Where, represents a random whale position; The distance vector representing a random whale from other whale groups; Represents the intermediate vector of the whale algorithm; represents the position vector of the whale in generation t+1; Represents the position vector of the whale in generation t.

[0168] The specific steps for using the Whale Algorithm with the motor to perform parameter identification are as follows:

[0169] 1. Such as Figure 7 The dashed box on the left side of the flowchart shows the design steps for the whale algorithm deployment module in this application. The first step is to initialize the number of whales. The number of whales is equivalent to the set of solutions for the motor parameters to be identified. Through each round of whale iteration, the algorithm controls the whales to iterate in the direction that minimizes the evaluation function. This value is selected according to the actual task complexity. In the field of motor identification, this invention sets the number of whales to 55.

[0170] 2. After the whale individuals are generated, each whale individual is actually a five-dimensional vector containing the parameters to be identified. In the first round of iteration, the fitness of the whale individual will be randomly generated according to the evaluation function we set. The best fitness among these 55 whale individuals is marked as the optimal whale position.

[0171]

[0172] 3. Update relevant parameters according to the Whale Algorithm formula (VI).

[0173] 4. By introducing a random variable p and comparing it with the value of 0.5, the comparison result determines whether the whale chooses to adaptively switch between the two postures determined by formula (7) to catch prey.

[0174] 5. By judgment The relationship between the size of 1 and this time determines whether the whale performs a random search process formula (eight), that is, when When it is greater than 1, the whale is randomly searched by formula (8). The existence of the random search process ensures that the result of the motor parameter identification jumps out of the local optimum.

[0175] 6. After the algorithm program proposed in this application is carried out, it is necessary to determine whether the whale algorithm meets the iteration end conditions. The present invention sets the motor parameter identification evaluation function index in the form of formula (9) to determine whether the algorithm meets the iteration end index.

[0176] 7. Take the integral of the absolute value of the product of time t and the permanent magnet synchronous motor system speed loop error e(t) as the motor parameter identification evaluation function index J. The expression of the evaluation function index J is as follows:

[0177]

[0178] Among them, the above J is the fitness of the whale individual, the above t is the total duration corresponding to the operation time period of the motor module in the whale individual corresponding motor parameters, and the above e(t) is the speed difference.

[0179] Among them, for the above-mentioned evaluation function, since the motor parameter identification system designed in this application will continuously obtain the parameters of the motor speed loop error e(t) as the motor system runs, and each round of iteration, a fitness value will be generated accordingly through the evaluation index shown in the above formula (IX). The smaller the value, the smaller the deviation of the speed loop of the motor system, that is, the system has reached a steady state at this time, and the identified motor parameters are more accurate. After completing each round of whale iteration, if the optimal fitness has not been reached at this time, the system will trigger the second set of algorithm logic end conditions, that is, to determine whether the preset number of iterations has been reached. If the conditions are not met, the program will return to the second step, reassign the whale individual, and start a new round of iteration until the optimal motor fitness value is output.

[0180] The technical solution provided in the embodiment of the present application can realize multi-parameter identification of the motor in one run by integrating the whale algorithm into the method of motor parameter optimization. In addition, the algorithm takes into account the fact that the whale algorithm has few adjustable parameters and the existence of the whale random search process, which effectively avoids the algorithm from falling into premature phenomenon, and advantageously ensures the validity of the identification results.

[0181] In addition, in order to further illustrate the motor parameter optimization method provided in the present application, the following is exemplified:

[0182] Suppose the initial motor parameters of the motor are as shown in Table 1:

[0183] Table 1

[0184] Based on this, the motor parameter optimization method provided in the present application can obtain the fitness change curve as shown in Figure 8 , see Figure 8 , which is a schematic diagram of a fitness change curve provided in an embodiment of the present application.

[0185] Continuing to suppose that, based on Table 1, the particle swarm algorithm in the prior art is used to optimize the motor parameters, the fitness change curve as shown in Figure 9 , see Figure 9 , which is a schematic diagram of a fitness change curve in the prior art provided in an embodiment of the present application.

[0186] By comparing Figure 8 and Figure 9 , it can be seen that the optimal fitness value of the motor parameters of the permanent magnet synchronous motor based on the particle swarm algorithm tends to be stable after 24 iterations, and the final fitness value is stable and about 4.10; by contrast, the optimal fitness value based on the motor parameter optimization method of the present application no longer changes after the 12th iteration, and at this time the optimal fitness value is 3.543. As can be seen from the form of the fitness expression (IX), the size of the fitness depends on the first definite integral of the product of the motor running time t and the absolute value of the motor speed loop deviation e(t), so the lower the fitness, the more stable the motor system, and at this time the identified motor parameters are also optimal.

[0187] As can be seen, the motor parameter optimization method provided in the present application not only takes less time, but also achieves better performance release compared to the motor parameter identification system based on the particle swarm.

[0188] Finally, after the motor parameter identification system completes the iteration and is optimized by the motor parameter optimization method provided in the present application, the final motor parameters are: Rs=2.931Ω, Ld=0.00851H, Lq=0.00851H, Jm=0.001043Kg·m2, and the final motor parameters obtained by the particle swarm algorithm identification strategy are: Rs=3.028Ω, Ld=0.00961H, Lq=0.00961H, Jm=0.001833Kg.m2, the detailed identification parameter condition based on the optimization method of motor parameters provided in the application is shown in Table 2, the identification parameter condition based on the particle swarm algorithm is shown in Table 3, in this process, the motor parameter optimization curve of each algorithm, taking the stator resistance parameter optimization as an example, the curve is shown in Figure 10 Figure 10 Figure 10

[0189] Table 2

[0190] Parameter name unit True value Identification value Error rate Identifying time stator resistance Ω 2.875 2.931 1.95% 0.01s Magnetic Link Wb 0.175 0.1736 0.80% 0.004s Direct-axis inductor H 0.0085 0.00851 0.12% 8e-4s Quadrature-axis inductance H 0.0085 0.00851 0.12% 8e-4s moment of inertia Kg·m2 0.001 0.001043 4.3% 0.01s

[0191] Table 3

[0192] Parameter name unit True value Identification value Error rate Identifying time stator resistance Ω 2.875 3.028 5.32% 0.16s Magnetic Link Wb 0.175 0.2239 27.9% 0.04s Direct-axis inductor H 0.0085 0.00961 13.06% 0.01s Quadrature-axis inductance H 0.0085 0.00961 13.06% 0.01s moment of inertia Kg·m2 0.001 0.001833 83.3% 0.16s

[0193] According to the above analysis result, the optimization error of the motor parameter optimization method provided in the application is not more than 4.3%, and the identification time is very fast; compared with this, the parameter error based on the particle swarm identification is very large, because: on the one hand, the motor parameter itself is a very small number, at this time, even a very small parameter perturbation will cause a large parameter error, which also reflects the importance of accurate parameter identification of the motor. On the other hand, from the fitness optimization curves of the two, it can also be seen that the data convergence time of the optimization algorithm based on the motor parameter provided in the application is shorter, and the value is more accurate.

[0194] In summary, the permanent magnet motor parameter identification strategy proposed in the application adopts the whale algorithm with low structural complexity and strong algorithm efficiency as the bottom algorithm, gives a control strategy for automatically identifying and optimizing motor parameters by setting evaluation function indicators, and gives the specific implementation. Through the simulation test of the permanent magnet synchronous motor parameter identification model, the motor parameter identification test based on the particle swarm algorithm is designed for comparison, and the test results prove that the motor parameter identification based on the whale algorithm proposed in the application has the effect of faster search, more reliable convergence of identification results to true value in the field of multi-parameter identification, and has good applicability.

[0195] Figure 11 Figure 11

[0196] ​​​​​​An acquisition module 111 is configured to acquire multiple sets of parameter values ​​corresponding to multiple different motor parameters to be optimized, and for any individual whale in a predetermined whale population, acquire a set of parameter values ​​from the multiple sets of parameter values ​​to construct a position vector of the individual whale; wherein each set of parameter values ​​includes a parameter value corresponding to each motor parameter;

[0197] A first determination module 112 is configured to input the position vector of any individual whale into a pre-built motor evaluation model to obtain the fitness of the individual whale;

[0198] A second determining module 113 is configured to determine the best whale individual from the whale population according to the fitness of each of the whale individuals when the fitness is less than a preset threshold;

[0199] The third determination module 114 is configured to determine optimal motor parameters according to the position vector of the optimal individual whale.

[0200] like Figure 12 As shown, it is a structural diagram of an electronic device provided in an embodiment of the present application, including a processor 1201, a communication interface 1202, a memory 1203 and a communication bus 1204, wherein the processor 1201, the communication interface 1202, and the memory 1203 communicate with each other through the communication bus 1204.

[0201] Memory 1203, used for storing computer programs;

[0202] In one embodiment of the present application, the processor 1201 is configured to implement the motor parameter optimization method provided by any one of the aforementioned method embodiments when executing the program stored in the memory 1203, including:

[0203] Obtaining multiple sets of parameter values ​​corresponding to multiple different motor parameters to be optimized, and obtaining a set of parameter values ​​for any individual whale in a preset whale population from the multiple sets of parameter values ​​to construct a position vector of the individual whale; wherein each set of parameter values ​​includes a parameter value corresponding to each of the motor parameters;

[0204] For any individual whale, the position vector of the individual whale is input into a pre-built motor evaluation model to obtain the fitness of the individual whale;

[0205] When the fitness is less than a preset threshold, determining the best whale individual from the whale population according to the fitness of each of the whale individuals;

[0206] Optimal motor parameters are determined according to the position vector of the best individual whale.

[0207] An embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the motor parameter optimization method provided in any of the aforementioned method embodiments are implemented.

[0208] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of this embodiment.

[0209] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a general hardware platform, or of course, by hardware. Based on this understanding, the above technical solution, in essence, or the part that contributes to the relevant technology, can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or certain parts of the embodiment.

[0210] It should be understood that the terms used herein are for the purpose of describing specific example embodiments only and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "said" as used herein may also be meant to include plural forms. The terms "comprise", "include", "contain" and "have" are inclusive and therefore specify the presence of stated features, steps, operations, elements and / or parts, but do not exclude the presence or addition of one or more other features, steps, operations, elements, parts, and / or combinations thereof. The method steps, processes, and operations described herein are not to be construed as necessarily requiring them to be performed in the specific order described or illustrated, unless the order of execution is clearly indicated. It should also be understood that additional or alternative steps may be used.

[0211] The foregoing description is intended only to provide specific embodiments of the present invention, which will enable those skilled in the art to understand and implement the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not intended to be limited to the embodiments shown herein, but is intended to be accorded the widest scope consistent with the principles and novel features claimed herein.

Claims

1. A method for optimizing motor parameters, characterized in that: The method comprises: Obtaining multiple sets of parameter values ​​corresponding to multiple different motor parameters to be optimized, and obtaining a set of parameter values ​​for any individual whale in a preset whale population from the multiple sets of parameter values ​​to construct a position vector of the individual whale; wherein each set of parameter values ​​includes a parameter value corresponding to each of the motor parameters; For any individual whale, the position vector of the individual whale is input into a pre-built motor evaluation model to obtain the fitness of the individual whale; When the fitness is less than a preset threshold, determining the best whale individual from the whale population according to the fitness of each of the whale individuals; Optimal motor parameters are determined according to the position vector of the best individual whale.

2. The method according to claim 1, characterized in that The method further comprises: When the fitness is greater than or equal to a preset threshold, for any of the whale individuals, adjusting the current position vector of the whale individual according to the position vector of the best whale individual to obtain a first position vector; Iteratively perform the following steps until the number of iterations reaches a preset threshold, or the fitness of any of the individual whales is less than a preset threshold; For any of the individual whales, the position vector of the current wheel of the individual whale is input into a pre-built motor evaluation model to obtain the fitness of the individual whale; Determining the best whale individual of the current round from the whale population according to the fitness of the whale individual; For any of the whale individuals, adjusting the position vector of the current round of the whale individual according to the position vector of the best whale individual in the current round to obtain a second position vector; The position vector of the first round is the first position vector, and the second position vector is the position vector of the next round; After the iteration is completed, the optimal motor parameters are determined based on the position vector of the best whale individual obtained in the last round.

3. The method according to claim 1, characterized in that The motor evaluation model includes a motor vector control sub-model and an evaluation function sub-model, and the motor vector control sub-model includes a motor module; Inputting the position vector of the individual whale into a pre-built motor evaluation model to obtain the fitness of the individual whale includes: The position vector of the individual whale is input into the motor evaluation model, so that the motor evaluation model obtains the fitness of the individual whale in the following manner: Setting motor parameters of the motor module in the motor vector control sub-model according to the position vector of the individual whale; Inputting a preset expected speed into the updated motor vector control sub-model to obtain a speed difference output by the motor vector control sub-model within an operating time period; The rotation speed difference is input into the evaluation function sub-model to obtain the fitness of the individual whale output by the evaluation function sub-model.

4. The method according to claim 3, characterized in that After receiving the desired speed, the updated motor vector control sub-model determines the speed difference in the following manner: Running the updated motor module based on the expected speed to obtain an updated actual speed output by the motor module; The actual speed is subtracted from the desired speed to obtain the speed difference.

5. The method according to claim 3, characterized in that Inputting the speed difference into the evaluation function sub-model to obtain the fitness of the individual whale output by the evaluation function sub-model includes: The speed difference is input into the following evaluation function formula to obtain the fitness of the individual whale: Wherein, J is the fitness of the individual whale, t is the total duration corresponding to the running time period, and e(t) is the speed difference.

6. The method according to claim 1, characterized in that Determining the best whale individual from the whale population according to the fitness of each of the whale individuals comprises: The whale individual with the smallest fitness is determined as the best whale individual in the whale population.

7. The method according to claim 2, characterized in that The adjusting the position vector of the current round of the whale individual according to the position vector of the best whale individual in the current round to obtain a second position vector includes: Determine the current shrinkage factor; Performing a first adjustment on the position vector of the current round of the whale individual according to the prey encirclement sub-algorithm in the preset whale optimization algorithm, the best whale individual in the current round, and the shrinkage encirclement coefficient; Generate a random number, and determine whether the random number is greater than or equal to a first preset threshold; When it is determined that the random number is greater than or equal to the first preset threshold, performing a second adjustment on the position vector of the current round of the whale individual according to the bubble net attack sub-algorithm in the whale optimization algorithm and the best whale individual in the current round to obtain a second position vector; When it is determined that the random number is less than the first preset threshold, a second adjustment is performed on the position vector of the current round of the whale individual based on the shrinkage and enveloping coefficient to obtain a second position vector.

8. A motor parameter optimization device, characterized in that: The device comprises: An acquisition module is configured to acquire multiple sets of parameter values ​​corresponding to multiple different motor parameters to be optimized, and for any individual whale in a preset whale population, acquire a set of parameter values ​​from the multiple sets of parameter values ​​to construct a position vector of the individual whale; wherein each set of parameter values ​​includes a parameter value corresponding to each of the motor parameters; A first determination module is configured to input the position vector of any individual whale into a pre-built motor evaluation model to obtain the fitness of the individual whale; A second determining module is configured to determine the best whale individual from the whale population according to the fitness of each of the whale individuals when the fitness is less than a preset threshold; The third determination module is used to determine the optimal motor parameters according to the position vector of the best whale individual.

9. An electronic device, characterized in that: include: A processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus; The memory is used to store a computer program; the processor is used to implement the motor parameter optimization method according to any one of claims 1 to 7 when executing the computer program.

10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for optimizing motor parameters according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Permanent magnet synchronous motor multi-parameter identification method and system based on improved whale algorithm

    CN115765560A

  • Multi-node path planning method for electric tractor

    CN116149334A