Motor design method and motor design device based on action probability
Through the motor design method based on action probability, the weight matrix obtained by artificial intelligence network training is used to calculate the probability of candidate actions and determine the target actions, which solves the problem of relying on designers' experience in the prior art, and achieves efficient and empirically independent motor design.
Patent Information
- Application Number
- CN202111469337.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-03
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2041-12-03
AI Technical Summary
Existing motor design software is highly dependent on the design experience of motor designers, resulting in different levels of designers using the same software to design motor products with different performance and economic performance.
The motor design method based on the action probability is adopted, by obtaining the motor requirement information input by the user, the probability of the candidate action is calculated, and the target action is determined based on the probability, and the motor design information including the target action is output. This method uses the weight matrix obtained by artificial intelligence network training to reduce the dependence on designer experience.
It realizes motor design that does not rely on designer experience, and can design motor products with high performance levels, improving design efficiency.
Smart Images

Figure CN114117865B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of motor design, and more particularly to a motor design method and a motor design device based on action probability. Background Art
[0002] Motor, commonly known as motor, refers to an electromagnetic device that realizes the conversion or transmission of electrical energy according to the law of electromagnetic induction. As a motor, it can provide power to the load, and as a generator, it can convert mechanical energy into electrical energy. Motors are widely used in many industries and have become an indispensable role in production and life.
[0003] Before using the motor, it is necessary to use motor design software to design a motor product that meets the requirements. Motor designers operate the motor design software based on their own motor design experience to design the motor product.
[0004] However, existing motor design software is highly dependent on the design experience of motor designers. Even if motor designers of different levels use the same motor design software, the motor products they design often have different performance levels or economic performance. Summary of the invention
[0005] The embodiments of the present application provide a motor design method and a motor design device based on action probability.
[0006] A motor design method based on action probability, comprising:
[0007] Get the motor requirement information input by the user;
[0008] Obtaining a first state through the motor requirement information, wherein the first state indicates a motor state in which each geometric dimension and each electromagnetic data of the motor has a unique value;
[0009] Calculating the probability of a candidate action according to a first weight matrix and the first state, wherein the first weight matrix is a matrix obtained through training of an artificial intelligence network, and the candidate action represents an operation on a certain geometric dimension of the motor;
[0010] Based on the probability, determining a target action, where the target action is one of the candidate actions;
[0011] Motor design information including information of the target motion is output.
[0012] Optionally, after obtaining the first state through the motor requirement information and before calculating the probability of the candidate action according to the first weight matrix and the first state, the method further includes:
[0013] determining the first state as a second state;
[0014] A third state and a reward are obtained according to the second state and the first action, wherein the first action is a random action, the third state is the state after the second state takes the first action, and the reward represents an evaluation from the second state to the third state;
[0015] Save the second state to a state array, save the first action to an action array, and save the reward to a reward array;
[0016] Determine whether the number of states in the state array is less than an upper limit value, wherein the upper limit value is a preset value;
[0017] If it is greater than or equal to, it is determined that the number of states in the state array has reached the upper limit value;
[0018] If it is less than, determining the third state as the second state;
[0019] Return to execute to obtain the third state and reward according to the second state and the first action, until if it is greater than or equal to, it is determined that the number of states in the state array has reached the upper limit value;
[0020] A reward array is calculated according to the state array, the action array and the reward array, wherein the reward array includes a plurality of accumulated rewards, and the accumulated rewards represent a comprehensive evaluation of the corresponding actions;
[0021] Determine training data according to the state array, the action array and the reward array, the training data including training state, training action and training cumulative reward, the training state is a state in the state array, the training action is an action taken by the training state, and the training cumulative reward corresponds to the training action;
[0022] Determine the randomly initialized matrix as the second weight matrix;
[0023] Based on a preset state value function, a state value is calculated through the training state, the second action and the second weight matrix, the second action represents all preset actions, and the state value represents the performance level of the motor when in the training state;
[0024] Based on a preset state value function, calculating the gradient of the state value function with respect to the second weight matrix through the training state, the training action and the training cumulative reward;
[0025] Calculating by using the second weight matrix and the gradient to obtain a third weight matrix;
[0026] Determining whether the reciprocal of the state value is less than a preset threshold;
[0027] If yes, determining the third weight matrix as the first weight matrix;
[0028] If not, determining the third weight matrix as the second weight matrix, and determining another state in the state array as the training state;
[0029] Return to execute based on the preset state value function, calculate the state value through the training state, the second action and the second weight matrix, until if yes, the third weight matrix is determined as the first weight matrix.
[0030] Optionally, a reward array is calculated according to the state array, the action array and the reward array, including:
[0031] According to the state array, the action array and the reward array, multiple cumulative rewards are calculated by the following formula to obtain a reward array:
[0032] G n-1 =βG n +r n-1 ,n≠k;
[0033] G n =r n ,n=k;
[0034] Said n is a positive integer, n=2, 3, 4, ..., k;
[0035] The β is the attenuation coefficient, which can be preset according to the requirements and is generally set to 0.9;
[0036] The G n represents the cumulative reward of the nth action;
[0037] The r n represents the reward of the nth action.
[0038] Optionally, based on a preset state value function, the state value is calculated by using the training state, the second action and the second weight matrix, including:
[0039] The state value is calculated by the training state, the second action and the second weight matrix based on the following formula:
[0040]
[0041] The d π (s) is π θ (a|s) The stationary distribution of the Markov chain induced;
[0042] The π θ(a|s) represents the probability of the corresponding action in state s;
[0043] The s represents the training state;
[0044] The a represents the second action;
[0045] The θ represents the second weight matrix;
[0046] The Q π (s, a) represents the action value of the corresponding action in the s state, and the action value represents the performance level of the motor when the corresponding action is taken.
[0047] Optionally, calculating by the second weight matrix and the gradient to obtain a third weight matrix includes:
[0048] Based on the following formula, a third weight matrix is obtained by calculating the second weight matrix and the gradient:
[0049]
[0050] The θ' is the third weight matrix;
[0051] The θ is the second weight matrix;
[0052] The α represents the learning rate, which is generally 0.001;
[0053] The γ represents the conversion rate, which is generally 0.9 to 0.99;
[0054] The t represents the ordinal number of the corresponding action;
[0055] Said represents the gradient.
[0056] Optionally, after acquiring the motor requirement information input by the user and before obtaining the first state through the motor requirement information, the method further includes:
[0057] Determine whether there is a motor model matching the motor requirement information in the database;
[0058] If it exists, the motor model is called to process and the result is output;
[0059] If not, it is determined that the first state is obtained through the motor requirement information.
[0060] Optionally, after outputting the motor design information including the information of the target action, the method further includes:
[0061] Draw three-dimensional and two-dimensional drawings according to the motor design information;
[0062] Performing electromagnetic field finite element analysis according to the motor design information;
[0063] Performing a finite element analysis of the temperature field according to the motor design information;
[0064] Performing structural finite element analysis according to the motor design information;
[0065] Performing vibration and noise analysis according to the motor design information;
[0066] A system simulation analysis is performed based on the motor design information.
[0067] A motor design device, comprising:
[0068] An acquisition unit, used for acquiring motor requirement information input by a user;
[0069] A processing unit, configured to obtain a first state through the motor requirement information, wherein the first state indicates a motor state in which each geometric dimension and each electromagnetic data of the motor has a unique value;
[0070] a calculation unit, configured to calculate a probability of a candidate action according to a first weight matrix and the first state, wherein the first weight matrix is a matrix obtained through training of an artificial intelligence network, and the candidate action represents an operation on a certain geometric dimension of the motor;
[0071] a determining unit, configured to determine a target action based on the probability, wherein the target action is one of the candidate actions;
[0072] The output unit is used to output the motor design information including the information of the target action.
[0073] A motor design device, comprising:
[0074] CPU, memory and input / output interface;
[0075] The memory is a short-term storage memory or a persistent storage memory;
[0076] The central processing unit is configured to communicate with the memory and execute instructions in the memory to perform the above method.
[0077] A computer-readable storage medium includes instructions. When the instructions are executed on a computer, the computer executes the above method.
[0078] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:
[0079] After obtaining the motor requirement information input by the user, the first state can be obtained, and then combined with the first weight matrix, the probability of the candidate action can be calculated. Finally, the target action is determined based on the probability, and the motor design information including the information of the target action is output. In this way, it is not necessary to rely on the design experience of the designer, and a motor product with a higher performance level can be designed, thereby improving the design efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0080] Figure 1 A schematic diagram of an embodiment of a motor design method based on action probability according to an embodiment of the present application;
[0081] Figure 2 A schematic diagram of another embodiment of the motor design method based on action probability according to an embodiment of the present application;
[0082] Figure 3 A schematic diagram of an embodiment of a motor design device according to an embodiment of the present application;
[0083] Figure 4 A schematic diagram of another embodiment of the motor design device according to an embodiment of the present application. DETAILED DESCRIPTION
[0084] The embodiments of the present application provide a motor design method and a motor design device based on action probability.
[0085] In order to solve the problem of strong dependence on the design experience of motor designers, a motor design method based on action probability is provided in an embodiment of the present application. The basic principle is that, for the motor state required by the customer, the probability of each possible action is calculated, and the design action is randomly selected according to the probability. This mode of selecting design actions according to probability can generate more possibilities for optimized design.
[0086] The following describes a motor design method and a motor design device based on action probability in an embodiment of the present application.
[0087] See also Figure 1 , an embodiment of the motor design method based on action probability of the present application embodiment includes:
[0088] 101. Obtain motor requirement information input by the user;
[0089] Obtain the motor requirement information input by the user. Specifically, the user can input the motor requirement information through the interactive interface provided by the software. The motor requirement information includes parameters such as power, voltage, speed, number of phases, power factor, altitude, ambient temperature, etc.
[0090] 102. Obtain a first state through the motor requirement information;
[0091] The first state is obtained through the motor requirement information. Among them, the state represents the motor state in which each geometric dimension and each electromagnetic data of the motor has a unique value, and the first state is the initialized state. For the motor, it has geometric dimensions, such as the motor stator outer diameter dimension, the motor stator inner diameter dimension, the motor stator length dimension, the number of stator slots, the slot shape dimension, the rotor related dimensions, etc. It also has electromagnetic data, such as stator winding electrical density, stator magnetic flux density, efficiency, weight, etc. All these geometric dimensions and electromagnetic data have unique values under a certain scheme, which constitutes a motor state.
[0092] 103. Calculate the probability of the candidate action according to the first weight matrix and the first state;
[0093] The probability of the candidate action is calculated using the first weight matrix and the first state. The first weight matrix is a matrix obtained through training of an artificial intelligence network, and the action represents an operation on one of the geometric dimensions of the motor. For example, increasing the outer diameter of the stator is an action, reducing the outer diameter of the stator is also an action, increasing the length of the stator is an action, and keeping the length of the stator unchanged is also an action. There are multiple candidate actions, which are pre-set by humans to provide conditions for subsequent operations. The probability is the probability of the corresponding candidate action being selected. Generally, the greater the probability, the more likely the corresponding candidate action is to be selected.
[0094] 104. Determine a target action based on the probability;
[0095] Based on the obtained probability, the target action is determined. Specifically, a selection is made based on multiple probabilities, and one of the candidate actions is randomly selected as the target action. The target action is not necessarily the corresponding action with the highest probability, but can be any action among multiple candidate actions, but the action with the highest probability is more likely to be determined as the target action.
[0096] Specifically, a deep artificial intelligence network is constructed, and the first state and the first weight matrix are input to the input layer. The activation function of the input layer is relu. Hidden layers and discarded layers are set, and the melting probability of the discarded layers is set to prevent falling into local optimality and overfitting from the beginning. Finally, the output layer outputs the designed action of the motor, that is, the target action. The activation function of the output layer is softmax.
[0097] 105. Output motor design information including information of the target action.
[0098] After the target action is determined, the motor design information including the information of the target action is outputted. For example, the motor design information may include basic performance information of the motor, the target action taken, the optimal state obtained, etc.
[0099] In the embodiment of the present application, after obtaining the motor requirement information input by the user, the first state can be obtained, and then combined with the first weight matrix, the probability of the candidate action is calculated. Finally, the target action is determined based on the probability, and the motor design information including the information of the target action is output. In this way, it is not necessary to rely on the design experience of the designer, and a motor product with a higher performance level can be designed, thereby improving the design efficiency.
[0100] See also Figure 2 Another embodiment of the motor design method based on action probability of the embodiment of the present application includes:
[0101] 201. Obtaining motor requirement information input by a user;
[0102] Obtain the motor requirement information input by the user. Specifically, the user can input the motor requirement information through the interactive interface provided by the software. The motor requirement information includes parameters such as power, voltage, speed, number of phases, power factor, altitude, ambient temperature, etc.
[0103] 202. Determine whether there is a motor model matching the motor requirement information in the database;
[0104] It is determined whether there is a motor model matching the motor requirement information in the database. If yes, step 203 is executed; if no, step 204 is executed.
[0105] 203. Call the motor model for processing and output the result;
[0106] If there is motor product information matching the motor requirement information in the database, relevant data of the corresponding motor product information in the database is called for processing to obtain a design result.
[0107] 204. Determine that the first state is obtained through the motor requirement information;
[0108] Prompt information is obtained that there is no motor model matching the motor requirement information in the database, and it is determined that the first state is obtained through the motor requirement information.
[0109] 205. Obtain a first state through the motor requirement information;
[0110] The first state is obtained through the motor requirement information. Specifically, a motor design agent is constructed, and then the motor environment is built, and the first state is obtained in combination with the motor requirement information. The motor design agent is a program, similar to a motor design engineer, responsible for communicating with the motor environment, and can perform actions, sampling, and calculate losses.
[0111] For the motor, it has geometric dimensions, such as the outer diameter of the motor stator, the inner diameter of the motor stator, the length of the motor stator, the number of stator slots, the slot shape, and the rotor-related dimensions. It also has electromagnetic data, such as stator winding electric density, stator magnetic flux density, efficiency, weight, etc. All these geometric dimensions and electromagnetic data constitute the motor environment. Under a certain scheme, each geometric dimension and each electromagnetic data of the motor environment has a unique value, which constitutes a motor state. Among them, the first state is the initialized state.
[0112] 206. Determine the first state as a second state;
[0113] The first state is determined as the second state. Specifically, the first state value is determined as the initial value of the second state, and the second state does not represent a specific state, and its value will change through the following steps.
[0114] 207. Obtain a third state and a reward according to the second state and the first action;
[0115] The third state and reward are obtained according to the second state and the first action. The first action is a random action, which is obtained by the motor design agent calling the motor environment sampling module for random sampling. The third state is the state after the second state takes the first action.
[0116] Reward is an evaluation of the transition from the second state to the third state. The standard of reward can be set artificially according to the demand to evaluate the action. For example, if the action of increasing the outer diameter of the stator is taken, the corresponding electromagnetic data will change accordingly, and the values of stator winding electric density, stator tooth magnetic density and efficiency will change. Set the standard, reward_J is the reward for stator winding electric density. When the stator winding electric density is greater than 8A / mm^2 and less than 10A / mm^2, reward_J=0, otherwise, reward_J=-10; reward_B is the reward for stator tooth magnetic density. When the stator tooth magnetic density is greater than 1.5T and less than 1.8T, reward_B=0, otherwise reward_B=-10; reward_eff is the efficiency reward, reward_eff=motor efficiency*1000. The reward for this action is specified as Reward=reward_J+reward_B+reward_eff, and the reward can be calculated.
[0117] 208. Save the second state to a state array, save the first action to an action array, and save the reward to a reward array;
[0118] Save the second state, first action and reward separately. The state array saves the state data, the action array saves the action data, and the reward array saves the reward data. The data in the array is the data used for training in the subsequent steps, and saving the array data is a prerequisite for providing training.
[0119] 209. Determine whether the number of states in the state array is less than an upper limit value;
[0120] Determine whether the number of states in the state array is less than an upper limit value, where the upper limit value is a preset value, and the upper limit value can be set to num according to requirements. If not, that is, the number of states in the state array is greater than or equal to num, then execute step 210; if yes, that is, the number of states in the state array is less than num, then execute step 211 and then execute step 207;
[0121] 210. Determine that the number of states in the state array has reached the upper limit;
[0122] Determine that the number of states in the state tuple has reached an upper limit. Specifically, determine that the number of states in the state tuple has reached num, or in other words, step 207 and step 208 have been repeated a total of num times.
[0123] 211. Determine the third state as the second state;
[0124] If the number of states in the state array is less than num, the third state is determined to be the second state, so as to repeat the above steps to obtain new data.
[0125] For ease of understanding, the process from step 206 to step 211 is described below by way of example. For example, the first state is determined as the initial value s1 of the second state, and the motor design agent calls the motor environment sampling module for random sampling to obtain the current value a1 of the first action. The current value s2 of the third state and the current value r1 of the reward can be obtained through s1 and a1. S1 is saved to the state array, a1 is saved to the action array, and r1 is saved to the reward array. If the current number 1 of states in the state array is less than num, s2 is determined as the current value of the second state, and the current value a2 of the first action is obtained by random sampling. The current value s3 of the third state and the current value r2 of the reward can be obtained through s2 and a2, and s2, a2, and r2 are saved. Repeat the above process num times to obtain the state array, action array, and reward array:
[0126] state array: [s1, s2, s3, ..., sn];
[0127] Action array: [a1, a2, a3, ..., an];
[0128] Reward array: [r1, r2, r3, ..., rn].
[0129] 212. Calculate a reward array according to the state array, the action array, and the reward array;
[0130] The reward array is calculated based on the state array, action array and reward array, where the reward array includes multiple cumulative rewards, and the cumulative rewards represent the comprehensive evaluation of the corresponding actions. Multiple cumulative rewards can be calculated by the following formula to obtain the reward array:
[0131] G n-1 =βG n +r n-1 ,n≠k;
[0132] G n =r n ,n=k;
[0133] Said n is a positive integer, n=2, 3, 4, ..., k;
[0134] The β is the attenuation coefficient, which can be preset according to the requirements and is generally set to 0.9;
[0135] The G n represents the cumulative reward of the nth action;
[0136] The r n represents the reward of the nth action.
[0137] In general, we first calculate the cumulative reward of the last action, and then calculate the cumulative rewards of the previous ordinal numbers. For example, assuming k is 10, we first calculate Gn=G10=r10, then calculate G9=0.9*G10+r9, and so on, until we calculate G1, thus obtaining the reward array: [G1, G2, G3, ..., G10].
[0138] 213. Determine training data according to the state array, the action array, and the reward array;
[0139] The training data is determined according to the state array, the action array and the reward array. The training data includes the training state, the training action and the training cumulative reward, the training state is a state in the state array, the training action is an action taken by the training state, and the training cumulative reward corresponds to the training action.
[0140] 214. Determine the randomly initialized matrix as a second weight matrix;
[0141] The randomly initialized matrix is determined as the second weight matrix. Specifically, a matrix is initialized by a software program, and then the matrix is determined as the second weight matrix for training. The second weight matrix does not refer to a specific matrix, and it will change through the following steps.
[0142] 215. Based on a preset state value function, calculate the state value through the training state, the second action and the second weight matrix;
[0143] Based on the preset state value function, the state value is calculated by the training state, the second action and the second weight matrix. The second action represents all preset actions, and the state value represents the performance level of the motor when it is in the training state. Specifically, it can be calculated by the following formula:
[0144]
[0145] The d π (s) is π θ (a|s) The stationary distribution of the Markov chain induced;
[0146] The π θ (a|s) represents the probability of the corresponding action in state s;
[0147] The s represents the training state;
[0148] The a represents the second action;
[0149] The θ represents the second weight matrix;
[0150] The Q π (s, a) represents the action value of the corresponding action in the s state, and the action value represents the performance level of the motor when the corresponding action is taken.
[0151] 216. Based on a preset state value function, calculate the gradient of the state value function with respect to the second weight matrix through the training state, the training action and the training cumulative reward;
[0152] The gradient of the state value function to the second weight matrix is calculated through the training state, training action and training cumulative return. The gradient can be understood as the partial derivative of the state value function to the second weight matrix.
[0153] 217. Perform calculation using the second weight matrix and the gradient to obtain a third weight matrix;
[0154] Based on the following formula, a third weight matrix is obtained by calculating the second weight matrix and the gradient:
[0155]
[0156] The θ' is the third weight matrix;
[0157] The θ is the second weight matrix;
[0158] The α represents the learning rate, which is generally 0.001;
[0159] The γ represents the conversion rate, which is generally 0.9 to 0.99;
[0160] The t represents the ordinal number of the corresponding action;
[0161] Said represents the gradient.
[0162] Let's use an example to illustrate the formula. When the selected action is s1, t=1, when the selected action is s2, t=2, and so on. Find the gradient in the s1 state and substitute it into the formula to get the result.
[0163] 218. Determine whether the inverse of the state value is less than a preset threshold;
[0164] It is determined whether the inverse of the state value is less than a preset threshold, wherein the preset threshold can be determined according to the requirements, for example, it can be set to 0.00001, and the specific details are not limited here. If yes, step 219 is executed, if not, step 220 is executed, and then step 215 is executed.
[0165] 219. Determine the third weight matrix as the first weight matrix;
[0166] If the inverse of the state value is less than the preset threshold, the third weight matrix is determined as the first weight matrix, and the matrix training process ends.
[0167] 220. Determine the third weight matrix as the second weight matrix, and determine another state in the state array as the training state;
[0168] If the inverse of the state value is greater than or equal to the preset threshold, the third weight matrix is determined as the second weight matrix, and another state in the state array is determined as the training state to perform the next round of training.
[0169] For ease of understanding, the process from step 213 to step 220 is described below by way of example. For example, training data is determined based on a state array, an action array, and a reward array. Among them, a state s1 in the state array is selected as the current value of the training state, the current value of the training action is a1, and the current value of the training cumulative reward is G1. Through software random initialization, θ1 is used as the initial value of the second weight matrix. Based on the preset state value function, calculation is performed through s1, the second action, and θ1. Among them, the second action represents all preset actions. Assuming that all preset actions are only four, the second action includes an increase in the outer diameter of the stator, a decrease in the outer diameter of the stator, an increase in the length of the stator, and an unchanged length of the stator. First, the action value of each action is obtained, and then the probability of each action is obtained. The action value and probability of the same action are multiplied, and then the four multiplication results are added, and then other mathematical calculations are performed to obtain the current value of the state value J(θ1). Then, the gradient of the state value function to θ1 is calculated through s1, a1, and G1, and then a new matrix value θ2 is obtained based on the gradient and θ1, where the value of t is 1. If the reciprocal of J(θ1) is greater than or equal to 0.00001, θ2 is determined as the current value of the second weight matrix, another state s2 in the state array is selected as the current value of the training state, the current value of the training action is a2, and the current value of the training cumulative reward is G2. Repeat the above steps to find the new state value J(θ2) and the new matrix value θ3, and then make a judgment. And so on.
[0170] 221. Calculate the probability of the candidate action according to the first weight matrix and the first state;
[0171] The probability of the candidate action is calculated using the first weight matrix and the first state. The first weight matrix is a matrix obtained through training of an artificial intelligence network, and the action represents an operation on one of the geometric dimensions of the motor. For example, increasing the outer diameter of the stator is an action, reducing the outer diameter of the stator is also an action, increasing the length of the stator is an action, and keeping the length of the stator unchanged is also an action. There are multiple candidate actions, which are pre-set by humans to provide conditions for subsequent operations. The probability is the probability of the corresponding candidate action being selected. Generally, the greater the probability, the more likely the corresponding candidate action is to be selected.
[0172] 222. Determine a target action based on the probability;
[0173] Based on the obtained probability, the target action is determined. Specifically, a selection is made based on multiple probabilities, and one of the candidate actions is randomly selected as the target action. The target action is not necessarily the corresponding action with the highest probability, but can be any action among multiple candidate actions, but the action with the highest probability is more likely to be determined as the target action.
[0174] Specifically, a deep artificial intelligence network is constructed, and the first state and the first weight matrix are input to the input layer. The activation function of the input layer is relu. Hidden layers and discarded layers are set, and the melting probability of the discarded layers is set to prevent falling into local optimality and overfitting from the beginning. Finally, the output layer outputs the designed action of the motor, that is, the target action. The activation function of the output layer is softmax.
[0175] 223. Outputting motor design information including information of the target action;
[0176] After the target action is determined, the motor design information including the information of the target action is outputted. For example, the motor design information may include basic performance information of the motor, the target action taken, the optimal state obtained, etc.
[0177] 224. Draw three-dimensional and two-dimensional drawings according to the motor design information;
[0178] According to the motor design information, drawing software is automatically called to draw three-dimensional and two-dimensional drawings.
[0179] 225. Perform electromagnetic field finite element analysis according to the motor design information;
[0180] According to the motor design information, electromagnetic field finite element analysis software is automatically called to perform electromagnetic field finite element analysis.
[0181] 226. Performing a finite element analysis of the temperature field according to the motor design information;
[0182] According to the motor design information, the temperature field finite element analysis software is automatically called to perform the temperature field finite element analysis.
[0183] 227. Perform structural finite element analysis according to the motor design information;
[0184] According to the motor design information, structural finite element analysis software is automatically called to perform structural finite element analysis.
[0185] 228. Perform vibration and noise analysis according to the motor design information;
[0186] According to the motor design information, vibration and noise analysis software is automatically called to perform vibration and noise analysis.
[0187] 229. Perform system simulation analysis based on the motor design information.
[0188] According to the motor design information, the simulation software is automatically called to perform system simulation analysis.
[0189] In this embodiment, after obtaining the motor requirement information input by the user, if there is no existing motor model, the first state can be obtained according to the motor requirement information, and then combined with the first weight matrix, the probability of the candidate action is calculated. Finally, the target action is determined based on the probability, and the motor design information including the information of the target action is output. In this way, it is not necessary to rely on the design experience of the designer, and a motor product with a higher performance level can be designed, thereby improving the design efficiency.
[0190] The following describes the motor design device in the embodiment of the present application. Figure 3 , an embodiment of the motor design device of the present application embodiment includes:
[0191] An acquisition unit 301 is used to acquire motor requirement information input by a user;
[0192] A processing unit 302 is used to obtain a first state through the motor requirement information, wherein the first state indicates a motor state in which each geometric dimension and each electromagnetic data of the motor has a unique value;
[0193] A calculation unit 303 is used to calculate the probability of a candidate action according to a first weight matrix and the first state, wherein the first weight matrix is a matrix obtained through training of an artificial intelligence network, and the candidate action represents an operation on a certain geometric dimension of the motor;
[0194] A determination unit 304, configured to determine a target action based on the probability, wherein the target action is one of the candidate actions;
[0195] The output unit 305 is used to output the motor design information including the information of the target action.
[0196] In this embodiment, after the acquisition unit 301 acquires the motor requirement information input by the user, the first state can be obtained, and then the probability of the candidate action can be calculated by the calculation unit 303 in combination with the first weight matrix. Finally, the target action is determined based on the probability by the determination unit 304, and the output unit 305 outputs the motor design information including the information of the target action. In this way, it is not necessary to rely on the design experience of the designer, and a motor product with a higher performance level can be designed, thereby improving the design efficiency.
[0197] The functions and processes performed by each unit in the motor design device of this embodiment are similar to those of the aforementioned Figure 1 to Figure 2 The functions and processes performed by the motor design device are similar and will not be repeated here.
[0198] Figure 44 is a schematic diagram of the structure of a motor design device provided in an embodiment of the present application. The motor design device 400 may include one or more central processing units (CPU) 401 and a memory 405. The memory 405 stores one or more application programs or data.
[0199] The memory 405 may be a volatile storage or a persistent storage. The program stored in the memory 405 may include one or more modules, each of which may include a series of instruction operations in the motor design device 400. Furthermore, the central processor 401 may be configured to communicate with the memory 405 and execute a series of instruction operations in the memory 405 on the motor design device 400.
[0200] The motor design device 400 may also include one or more power supplies 402, one or more wired or wireless network interfaces 403, one or more input and output interfaces 404, and / or one or more operating systems, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
[0201] The CPU 401 can execute the aforementioned Figure 1 to Figure 2 The operations performed by the motor design device in the illustrated embodiment will not be described in detail here.
[0202] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0203] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0204] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0205] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0206] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, read-only memory), random access memory (RAM, random access memory), disk or optical disk and other media that can store program code.
Claims
1. A motor design method based on action probability, characterized by comprising: Get the motor requirement information input by the user; Obtaining a first state through the motor requirement information, wherein the first state indicates a motor state in which each geometric dimension and each electromagnetic data of the motor has a unique value; Calculating the probability of a candidate action according to a first weight matrix and the first state, wherein the first weight matrix is a matrix obtained through training of an artificial intelligence network, and the candidate action represents an operation on one of the geometric dimensions of the motor; Based on the probability, determining a target action, where the target action is one of the candidate actions; outputting motor design information including information of the target motion; After obtaining the first state through the motor requirement information and before calculating the probability of the candidate action according to the first weight matrix and the first state, the method further includes: 1.
1. Determine the first state as the second state; 1.
2. Obtain a third state and a reward according to the second state and the first action, wherein the first action is a random action, the third state is the state after the second state takes the first action, and the reward represents an evaluation from the second state to the third state; 1.
3. Save the second state to the state array, save the first action to the action array, and save the reward to the reward array; 1.
4. Determine whether the number of states in the state array is less than an upper limit value, where the upper limit value is a preset value; 1.
5. If it is greater than or equal to, it is determined that the number of states in the state array has reached the upper limit value; 1.
6. If it is less than, the third state is determined as the second state; Return to step 1.2 to step 1.4 until step 1.5 is executed; A reward array is calculated according to the state array, the action array and the reward array, wherein the reward array includes a plurality of accumulated rewards, and the accumulated rewards represent a comprehensive evaluation of the corresponding actions; Determine training data according to the state array, the action array and the reward array, the training data including training state, training action and training cumulative reward, the training state is a state in the state array, the training action is an action taken by the training state, and the training cumulative reward corresponds to the training action; 2.
1. Determine the randomly initialized matrix as the second weight matrix; 2.
2. Based on a preset state value function, a state value is calculated through the training state, the second action and the second weight matrix, wherein the second action represents all preset actions, and the state value represents the performance level of the motor when in the training state; 2.
3. Based on a preset state value function, the gradient of the state value function to the second weight matrix is calculated through the training state, the training action and the training cumulative reward; 2.
4. Calculate the third weight matrix using the second weight matrix and the gradient; 2.
5. Determine whether the reciprocal of the state value is less than a preset threshold; 2.
6. If yes, determine the third weight matrix as the first weight matrix; 2.
7. If not, determining the third weight matrix as the second weight matrix, and determining another state in the state array as the training state; Return to step 2.2 to step 2.5 until step 2.
6.
2. The motor design method according to claim 1, characterized in that: The reward array is calculated according to the state array, the action array and the reward array, including: According to the state array, the action array and the reward array, multiple cumulative rewards are calculated by the following formula to obtain a reward array: ; ; Said is a positive integer, ; Said is the attenuation coefficient, is the attenuation coefficient, which can be preset according to requirements; Said Indicates The cumulative reward of each action; Said Indicates Reward for an action.
3. The motor design method according to claim 1, characterized in that: Based on a preset state value function, the state value is calculated by the training state, the second action and the second weight matrix, including: The state value is calculated by the training state, the second action and the second weight matrix based on the following formula: ; Said Reason Stationary distribution of the induced Markov chain; Said express The probability of the corresponding action in the state; Said indicating the training status; Said represents the second action; Said represents the second weight matrix; Said express The action value of the corresponding action under the state represents the performance level of the motor when the corresponding action is taken.
4. The motor design method according to claim 1, characterized in that: The third weight matrix is obtained by calculating the second weight matrix and the gradient, including: Based on the following formula, a third weight matrix is obtained by calculating the second weight matrix and the gradient: ; Said is the third weight matrix; Said is the second weight matrix; Said represents the learning rate, which is 0.001; Said It represents the conversion rate, ranging from 0.9 to 0.99; Said Indicates the ordinal number of the corresponding action; Said represents the gradient.
5. The motor design method according to claim 1, characterized in that: After obtaining the motor requirement information input by the user and before obtaining the first state through the motor requirement information, the method further includes: Determine whether there is a motor model matching the motor requirement information in the database; If it exists, the motor model is called to process and the result is output; If not, it is determined that the first state is obtained through the motor requirement information.
6. The motor design method according to claim 1, characterized in that: After outputting the motor design information including the information of the target action, the method further includes: Draw three-dimensional and two-dimensional drawings according to the motor design information; Performing electromagnetic field finite element analysis according to the motor design information; Performing a finite element analysis of the temperature field according to the motor design information; Performing structural finite element analysis according to the motor design information; Performing vibration and noise analysis according to the motor design information; A system simulation analysis is performed based on the motor design information.
7. A motor design device, characterized in that: include: CPU, memory and input / output interface; The memory is a short-term storage memory or a persistent storage memory; The central processing unit is configured to communicate with the memory and execute instructions in the memory to perform the method according to any one of claims 1 to 6.
8. A computer-readable storage medium, characterized in that: The method comprises instructions, which, when executed on a computer, cause the computer to execute the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Small unmanned helicopter fixed-height control method based on reinforcement learning
CN110083168A
Unsupervised self-evolutionary motor design method and system
CN112131787A