Agent model construction method and device for motor design, equipment and storage medium
By adjusting the sampling tendency and re-acquisition of samples, a more uniform training data set is constructed, which solves the problem of uneven sampling effects of the proxy model training data set and improves the accuracy of the proxy model.
Patent Information
- Application Number
- CN202311763653.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-20
- Publication Date
- 2025-06-27
AI Technical Summary
The sampling effect of the training data set of the current proxy model is uneven, resulting in poor accuracy of the proxy model trained.
By collecting samples from the preset motor geometric parameter space and storing them into the training data set, adjusting the sampling tendency when collecting samples, re-acquisition of the corresponding samples, and storing them into the training data set, thereby building a more uniform training data set.
By adjusting the sampling tendency and re-acquisition of samples, ensuring sample uniformity in the training data set, thereby improving the accuracy of the trained proxy model.
Smart Images

Figure CN120217815A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of motor design, and in particular, to a method, device, equipment and storage medium for constructing a surrogate model for motor design. Background Technique
[0002] When optimizing the design of the motor geometry, the motor geometry parameters and the key performance indicators corresponding to the geometry parameters are usually selected as the training data set, and the corresponding surrogate model is trained according to the training data set to achieve the effect of predicting the performance of the motor geometry through the surrogate model.
[0003] Among them, the surrogate model is a regressor from the motor geometry parameters to the key performance indicators, that is: input the motor geometry parameters into the surrogate model, and the surrogate model directly predicts the value of the key performance indicators. The training data set of the surrogate model usually uses the Latin hypercube sampling method.
[0004] However, the Latin hypercube sampling method can sample uniformly from the parameter space of the motor geometry parameters according to the parameter intervals of the motor geometry parameters. However, the key performance indicators corresponding to the motor geometry parameters obtained by this sampling method have a certain tendency, and it is impossible to achieve the effect of uniform sampling for different key performance indicator intervals. Based on the training data set obtained in this way, after training the surrogate model, the accuracy of the surrogate model is poor. Summary of the Invention
[0005] The main purpose of the present application is to provide a method, device, equipment and storage medium for constructing a surrogate model for motor design, aiming to solve the technical problem that the sampling effect of the training data set of the current surrogate model is uneven, resulting in poor accuracy of the trained surrogate model.
[0006] To achieve the above object, the present application provides a method for constructing a surrogate model for motor design, and the method for constructing a surrogate model for motor design includes the following steps:
[0007] Collect corresponding samples from the preset motor geometry parameter space and store them in the training data set, where each sample in the training data set is composed of the structural parameters of the motor and the performance indicators obtained by performing performance simulation on the structural parameters;
[0008] According to the result of collecting the corresponding samples, adjust the sampling tendency when collecting samples, and according to the adjusted sampling tendency, re-collect the corresponding samples from the motor geometry parameter space and store them in the training data set;
[0009] Train the preset model to be trained according to the training data set to obtain a surrogate model for motor design.
[0010] Optionally, the step of adjusting the sampling tendency when collecting samples according to the results of collecting corresponding samples includes:
[0011] Performing sample performance simulation on the results of collecting corresponding samples to obtain performance indicators corresponding to each sample;
[0012] Determining a first probability density function corresponding to the performance indicator, and adjusting the sampling tendency of collecting samples from the motor geometric structure parameter space according to the first probability density function.
[0013] Optionally, after the step of re-collecting corresponding samples from the motor geometric structure parameter space according to the first probability density function and storing them in the training data set, the method further includes:
[0014] Determining a second probability density function of the re-collected corresponding samples;
[0015] Re-collecting corresponding samples from the motor geometric structure parameter space according to the second probability density function, storing them in the training data set, and returning to the step of determining the second probability density function of the re-collected corresponding samples until the number of times of re-collecting samples is equal to the preset number of times.
[0016] Optionally, the step of determining the second probability density function of the re-collected corresponding samples includes:
[0017] Dividing the value range of the performance indicator into multiple parameter intervals;
[0018] Estimating second probability density functions corresponding to the quantities of the multiple parameter intervals.
[0019] Optionally, the step of estimating the second probability density functions corresponding to the quantities of the multiple parameter intervals includes:
[0020] Estimating a set of probability density functions of each structural parameter corresponding to the performance indicator within each parameter interval, obtaining a set of probability density functions corresponding to the quantities of the multiple parameter intervals, and using it as the second probability density function.
[0021] Optionally, the step of collecting corresponding samples from the preset motor geometric structure parameter space further includes:
[0022] Determining the parameter ranges corresponding to each structural parameter in the preset motor geometric structure parameter space;
[0023] Collecting corresponding samples from the motor geometric structure parameter space in a uniform sampling manner according to the parameter ranges.
[0024] Optionally, the step of collecting corresponding samples from the motor geometric structure parameter space in a uniform sampling manner according to the parameter range includes:
[0025] Collecting a first preset number of structural samples from a preset motor geometric structure parameter space in a uniform sampling manner, where each structural sample corresponds to a second preset number of structural parameters;
[0026] Performing performance simulation on the structural samples to obtain performance indicators corresponding to the structural samples;
[0027] Storing the structural samples and the performance indicators in a training data set in the form of a vector group.
[0028] In addition, to achieve the above object, the present application also provides a proxy model construction device for motor design, and the proxy model construction device for motor design includes:
[0029] A first sampling module, configured to collect corresponding samples from a preset motor geometric structure parameter space and store them in a training data set, where each sample in the training data set is composed of the structural parameters of the motor and the performance indicators obtained by performing performance simulation on the structural parameters;
[0030] A second sampling module, configured to adjust the sampling tendency when collecting samples according to the result of collecting corresponding samples, and re-collect corresponding samples from the motor geometric structure parameter space according to the adjusted sampling tendency and store them in the training data set;
[0031] A training module, configured to train a preset model to be trained according to the training data set to obtain a proxy model for motor design.
[0032] In addition, to achieve the above object, the present application also provides a proxy model construction device for motor design, and the proxy model construction device for motor design includes: a memory, a processor, and a proxy model construction program for motor design stored on the memory and executable on the processor, and the proxy model construction program for motor design is configured to implement the steps of the above-mentioned proxy model construction method for motor design.
[0033] In addition, to achieve the above object, the present application also provides a computer-readable storage medium, on which a proxy model construction program for motor design is stored, and when the proxy model construction program for motor design is executed by a processor, it implements the steps of the above-mentioned proxy model construction method for motor design.
[0034] In this application, corresponding samples are collected from a preset motor geometric structure parameter space and stored in a training data set. Each sample in the training data set consists of the structural parameters of the motor and the performance indicators obtained by performing performance simulations on the structural parameters. According to the result of collecting the corresponding samples, the sampling tendency during sample collection is adjusted. Then, according to the adjusted sampling tendency, corresponding samples are recollected from the motor geometric structure parameter space and stored in the training data set. Thus, a preset model to be trained can be trained based on the training data set to obtain a surrogate model for motor design. That is, according to the result after the initial sampling, the sampling tendency during subsequent sampling is adjusted, and based on the adjusted sampling tendency, resampling is performed, and the content of the above sampling is stored in the training data set, thereby ensuring the uniformity of the samples in the training data set and the accuracy of the trained surrogate model. Description of the Drawings
[0035] Figure 1 It is a schematic flowchart of the first embodiment of the method for constructing a surrogate model for motor design in this application;
[0036] Figure 2 It is an effect diagram of the probability distribution of the performance indicators corresponding to the structural samples obtained by uniform sampling in the embodiment of this application;
[0037] Figure 3 It is a schematic flowchart of the refinement of step S20 in the second embodiment of the method for constructing a surrogate model for motor design in this application;
[0038] Figure 4 It is a schematic diagram of the effect of adjusting the sampling tendency in the embodiment of this application;
[0039] Figure 5 It is a schematic flowchart of adaptive sampling in the embodiment of this application;
[0040] Figure 6 It is the first schematic diagram of the difference in sample collection effects in the embodiment of this application;
[0041] Figure 7 It is the second schematic diagram of the difference in sample collection effects in the embodiment of this application;
[0042] Figure 8 It is the third schematic diagram of the difference in sample collection effects in the embodiment of this application;
[0043] Figure 9 It is the fourth schematic diagram of the difference in sample collection effects in the embodiment of this application;
[0044] Figure 10 It is a structural block diagram of an embodiment of the device for constructing a surrogate model for motor design in this application;
[0045] Figure 11 It is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present application.
[0046] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0047] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0048] Reference Figure 1 , Figure 1 A schematic flowchart of a first embodiment of a method for constructing a proxy model for motor design in the present application.
[0049] In a first embodiment, the method for constructing an agent model for motor design includes the following steps:
[0050] S10, collecting corresponding samples from a preset motor geometric structure parameter space and storing them in a training data set, wherein each sample in the training data set is composed of a motor structural parameter and a performance index obtained by a performance simulation of the structural parameter.
[0051] In this embodiment, the motor is an important energy conversion device. According to the requirements of the motor in different application scenarios, the designer needs to optimize the geometric parameters of the motor (in this embodiment, the structural parameters refer to the geometric parameters of the motor) in a targeted manner to meet the requirements of the motor in terms of key performance indicators, size, weight, cost, etc. In order to obtain the key performance indicators of the motor (in this embodiment, the performance indicators refer to the key performance indicators), time-consuming FEA (Finite Element Analysis) simulation is required.
[0052] In order to obtain the required motor geometry, it is usually necessary to use population-based optimization algorithms, such as genetic algorithms, to explore thousands to tens of thousands of different motor geometries, each of which must be simulated by FEA to obtain its key performance indicators. The whole process is very time-consuming. Whenever the application requirements change, the optimization process needs to be re-executed. Improving the efficiency of the motor geometry optimization process is very practical.
[0053] In order to improve the efficiency of the entire optimization process, a fast but approximate proxy model can be used to replace the time-consuming FEA simulation. The proxy model is a regressor from the motor geometry parameters to the key performance indicators, that is, the motor geometry parameters are input to the proxy model, and the value of the key performance indicators is directly predicted by the proxy model.
[0054] Among them, the surrogate model is usually constructed based on a data-driven method, which requires constructing a dataset consisting of a lot of data in vector form (structural parameters, performance indicators) in advance. Based on this dataset, different types of surrogate models are adopted to train a specific surrogate model.
[0055] Among them, different schemes such as the response surface method, Kriging model, multi-layer perceptron, convolutional neural network, variational autoencoder, etc. can be selected for the surrogate model type.
[0056] It should be noted that the surrogate model needs to have a high accuracy to replace the FEA simulation. The accuracy of the surrogate model depends on the quality of the dataset. The commonly used method for constructing the surrogate model dataset is as follows: for the parameterized geometric structure parameter space X of the motor, the Latin hypercube sampling method is used to sample this structure space to obtain different geometric structure samples. Each group of geometric structure samples contains several parameters, representing a specific motor structure. The FEA simulation is carried out on the motor structure to obtain the corresponding key performance indicators. The geometric structure parameters and the corresponding key performance indicators form a vector of data, which is stored in the dataset. After collecting a sufficient number of data, the dataset can be used to train the surrogate model.
[0057] It should be noted that for the optimal design of the motor geometric structure, it is necessary to evaluate the key performance indicators (such as average torque, motor efficiency) of the motor geometric structure through time-consuming FEA (finite element analysis) simulation. In order to accelerate the motor simulation efficiency, a fast and high-precision surrogate model is constructed to replace the FEA simulation, and this surrogate model is used to achieve efficient simulation. However, there are certain difficulties in constructing a high-precision surrogate model, especially in the construction of the dataset for training the surrogate model. There is usually a situation where the value range coverage of the key performance indicators is uneven, resulting in few samples in some intervals corresponding to the key performance indicators. As a result, the trained surrogate model has certain limitations and tendencies, that is, the surrogate model pays more attention to the content with a larger number of samples and will choose to ignore the content with fewer samples.
[0058] It should be noted that in this embodiment, when optimizing the geometric structure of the motor, it is necessary to refer to the performance conditions characterized by the geometric structure parameters. That is, through this Latin hypercube sampling, samples that are uniform and reasonable can be extracted from the uniform distribution parameters of the structure parameters in a uniform manner. However, the performances corresponding to these samples are different, or concentrated in a certain performance range. For example, the performance indexes that the extracted structure parameters can exhibit are all low-performance samples, and there are no or few high-performance samples in such samples, resulting in uneven performance of the samples. In this embodiment, it is necessary to solve the problem that the samples of the structure parameters obtained by the current uniform sampling also have uniform corresponding performance, so as to construct a training data set with a wide range of sample types and approximately average sample numbers.
[0059] Specifically, the step of collecting corresponding samples from the preset motor geometric structure parameter space further includes: determining the parameter ranges corresponding to the respective structure parameters in the preset motor geometric structure parameter space; and collecting corresponding samples from the motor geometric structure parameter space in a uniform sampling manner according to the parameter ranges.
[0060] It can be understood that the preset motor geometric structure parameter space is a space that aggregates various motor geometric structure parameters according to the empirical values of motor design, specifically including the structure parameters of the motor rotor and stator. When these parameters change correspondingly, they will affect the motor performance. However, there are certain limitations to such structures, that is, the structure parameters of the motor need to conform to actual applications. Therefore, there is a certain value selection range for the structure parameters of the motor, that is, the parameter ranges corresponding to the respective structure parameters. The parameter values that can be selected from the preset motor geometric structure parameter space are all within this parameter range.
[0061] It can be understood that in order to ensure the uniformity during sample collection, the Latin hypercube sampling method can be used, that is, various samples in the parameter range are extracted as samples of uniformly distributed structure parameters in a uniform sampling manner. For example, taking the parameter range of 10 - 100 as an example, the parameter range can be divided into 10 equal sub-intervals, and the same number of samples are extracted from each interval. 10 samples can be extracted from the interval of 10 - 20, 10 samples can be extracted from the interval of 21 - 30, and so on.
[0062] It should be noted that when collecting samples, multiple structural parameters are simultaneously extracted, and multiple structural parameter samples are combined to obtain the final sample, which characterizes the overall structure of the motor. In the existing solution, when constructing the dataset used to train the surrogate model, the geometric structure parameter space of the motor is sampled by the Latin hypercube sampling method. The Latin hypercube sampling covers the geometric parameters in this space uniformly and randomly, and the key performance indicators obtained by FEA simulation of these samples are not necessarily uniformly distributed over their value ranges, and there may be problems with high kurtosis and skewness.
[0063] Specifically, refer to Figure 2 , and by the Latin hypercube sampling method, sample the geometric structure parameter space of the motor, obtain the average torque of the motor corresponding to the sample through FEA simulation, and then observe the distribution of the sample over the value range [0, 80] N·m of the average torque. It can be seen that in the high torque range (the range from 50 N·m to 80 N·m), the sample distribution is extremely scarce, which makes it unlikely to train a high-precision surrogate model in this range.
[0064] Therefore, in this embodiment, after obtaining a set of samples by the uniform sampling method, other types of samples need to be collected to balance the various types of samples in the final training dataset.
[0065] Among them, the step of collecting corresponding samples from the motor geometric structure parameter space in a uniform sampling manner according to the parameter range includes: collecting a first preset number of structural samples from a preset motor geometric structure parameter space in a uniform sampling manner, where each structural sample corresponds to a second preset number of structural parameters; performing performance simulation on the structural samples to obtain the performance indicators corresponding to the structural samples; and storing the structural samples and the performance indicators in the training dataset in the form of a vector group.
[0066] It can be understood that when collecting samples from a preset motor geometric structure parameter space, the number of samples to be collected can be selected, that is, the first preset number of structural samples can be set, where each structural sample contains a second preset number of structural parameters, so that each structural sample can characterize a complete motor structure. Therefore, performance simulation can be performed on the structural sample to obtain the performance indicator corresponding to the structural sample. At this time, the structural sample and the performance indicator corresponding to the structural sample need to be stored in the training dataset in vector form.
[0067] Among them, the first preset number and the second preset number are selected according to the actual situation. For example, fifty samples or one hundred samples are selected, and each sample can contain eight parameters or ten parameters, etc. Specifically, it needs to be determined according to the content involved in motor design.
[0068] S20. According to the results of collecting corresponding samples, adjust the sampling tendency when collecting samples, and according to the adjusted sampling tendency, re-collect corresponding samples from the motor geometric structure parameter space, and store them in the training data set.
[0069] It can be understood that after the corresponding samples are currently collected, according to the above content, the samples collected are with structure parameters in a uniform distribution, while there is a certain tendency in the performance indicators corresponding to the structure samples. At this time, if the Latin hypercube sampling method is still used to collect corresponding samples, the training data set obtained will affect the accuracy of the finally trained surrogate model. Therefore, according to the current situation of the collected samples, the sampling tendency when collecting samples can be adjusted. For example, increase the sampling probability of part A samples and decrease the sampling probability of part B samples, where part A samples are the samples with a smaller quantity currently, and part B samples are the samples with a larger quantity currently (the so-called'more or less' mainly refers to the statistical results of the sample quantities corresponding to different performances after performance simulation).
[0070] It can be understood that the situation of collecting samples can be adjusted according to the adjusted sampling tendency, so as to obtain a new sample set with different effects from the previously collected samples, and then store the new samples and the old samples in the training data set together, so as to increase the diversity and quantity of samples.
[0071] S30. According to the training data set, train a preset model to be trained to obtain a surrogate model for motor design.
[0072] It can be understood that according to the training data set, a preset model to be trained can be trained to obtain a corresponding surrogate model for motor design.
[0073] It should be noted that the performance of the samples initially obtained by uniform sampling has a bias. After adjusting the sampling tendency, the performance of the samples obtained by sampling can be made more uniform, so as to increase the samples with different performance situations, thereby increasing the diversity of samples, and further ensuring the accuracy of the trained surrogate model.
[0074] In this embodiment, corresponding samples are collected from a preset motor geometric structure parameter space and stored in a training data set. Each sample in the training data set consists of the structural parameters of the motor and the performance indicators obtained by performing performance simulations on the structural parameters. According to the result of collecting the corresponding samples, the sampling tendency during sample collection is adjusted. According to the adjusted sampling tendency, corresponding samples are re-collected from the motor geometric structure parameter space and stored in the training data set. Thus, based on the training data set, a preset model to be trained can be trained to obtain a surrogate model for motor design. That is, according to the result after the initial sampling, the sampling tendency during subsequent sampling is adjusted, and according to the adjusted sampling tendency, re-sampling is performed, and the content of the above sampling is stored in the training data set, thereby ensuring the uniformity of the samples in the training data set and the accuracy of the trained surrogate model.
[0075] As Figure 3 shown, based on the first embodiment, a second embodiment of the method for constructing a surrogate model for motor design of the present application is proposed. In this embodiment, step S20 specifically includes:
[0076] S21, perform sample performance simulations on the results of collecting the corresponding samples to obtain the performance indicators corresponding to each sample.
[0077] It can be understood that when designing the motor structure, there are two types of parameters, structural parameters and performance indicators, and the structural parameters affect the performance indicators. When collecting subsequent samples according to the results of collecting the corresponding samples, the sampling tendency needs to be adjusted. At this time, sample performance simulations can be first performed on the results of collecting the corresponding samples to obtain the performance indicators corresponding to each sample, and the corresponding performance indicators are statistically analyzed to determine the situation of the performance indicators corresponding to the currently collected structural samples, so as to determine the tendency of the performance indicators corresponding to the currently collected samples. Based on this, the sampling tendency can be adjusted.
[0078] S22, determine the first probability density function corresponding to the performance indicator, and adjust the sampling tendency of collecting samples from the motor geometric structure parameter space according to the first probability density function.
[0079] It can be understood that when statistically analyzing the performance indicators, the first probability density function corresponding to the performance indicator can be determined, and the sampling tendency of collecting samples from the motor geometric structure parameter space can be adjusted through the first probability density function.
[0080] Specifically, divide the range that the performance metrics may cover into several sub - intervals. For each sub - interval, estimate the first probability density function of the samples falling within this interval in the motor geometric structure parameter space of the geometric structure. Then, sample the motor geometric structure parameter space according to the first probability density function. The performance metrics obtained by simulating the resulting samples are more likely to fall within the target sub - interval. By allocating appropriate sampling numbers to each sub - interval and then sampling with the first probability density function corresponding to the sub - interval, a sample set with a relatively uniform distribution in the entire target space can be obtained. Since the performance metrics of these data are more evenly distributed, using these data to train the surrogate model will have better accuracy than using the data obtained by Latin hypercube sampling to train the surrogate model.
[0081] Among them, it can be referred to Figure 4 , according to Figure 4 it can be known that the sampling can be adjusted according to the probability distribution of the samples corresponding to the relevant performance metrics, so as to change the distribution of the performance metrics corresponding to the structural samples obtained by acquisition.
[0082] In addition, after the step of re - sampling the corresponding samples from the motor geometric structure parameter space according to the first probability density function and storing them in the training data set, the method further includes: determining the second probability density function of the re - sampled corresponding samples; re - sampling the corresponding samples from the motor geometric structure parameter space according to the second probability density function, storing them in the training data set, and returning to the step of determining the second probability density function of the re - sampled corresponding samples until the number of times of re - sampling the samples is equal to the preset number of times.
[0083] It can be understood that for the collected structural samples, after adjusting the sampling tendency, the desired effect of the relevant personnel may not be achieved in one go. Therefore, multiple optimizations can be selected. That is, according to the first probability density function of the performance corresponding to the previously collected structural samples, adjust the sampling tendency, collect the next structural samples, and according to the second probability density function of the next structural samples, adjust the sampling tendency again, and collect the corresponding structural samples again, and so on in a cycle. After collecting the preset number of times, stop the cycle. Finally, a set of training samples with the preset number plus one is obtained to ensure that the number of training samples is sufficient for training the surrogate model.
[0084] Among them, after adjusting the sampling tendency multiple times, each collected sample will be different. Therefore, obtaining a set of training samples with the preset number plus one is also to ensure the diversity of the structural samples in the training data set.
[0085] In addition, the step of determining the second probability density function for the correspondingly re-sampled sample includes: dividing the value range of the performance metric into multiple parameter intervals, and estimating the second probability density functions corresponding to the quantities of the multiple parameter intervals.
[0086] Among them, the step of estimating the second probability density functions corresponding to the quantities of the multiple parameter intervals includes: estimating the set of probability density functions of each structural parameter corresponding to the performance metric within each parameter interval, obtaining the set of probability density functions corresponding to the quantities of the multiple parameter intervals, and using it as the second probability density function.
[0087] It can be understood that when statistically calculating the second probability density function of the corresponding performance metric, the value range of the corresponding performance metric can be first divided into multiple parameter intervals, and on this basis, the probability density function corresponding to each structural parameter in the structural sample can be determined. Specifically, taking the example that there are p structural parameters in the structural sample and the performance metric is correspondingly divided into k parameter intervals, the finally obtained probability density functions should be p * k.
[0088] In summary, reference can be made to Figure 5 , first, the geometric structure parameter space of the motor needs to be determined. This parameter space includes p geometric structure parameters, which are used to represent the main geometric structure of the motor. The value of each geometric structure parameter has a limited range.
[0089] Before the start of adaptive sampling (in this embodiment, the sampling method of adjusting the sampling tendency), perform a Latin hypercube sampling once to obtain the initial data set: for the entire geometric structure parameter space, sample m samples through the Latin hypercube sampling method, where each sample contains p geometric structure parameters. For these m samples, through FEA simulation, the key performance metric of the motor structure corresponding to each sample (this key performance metric is the performance metric, and the average torque is used as an example for explanation below) can be obtained, and the m sets of vector data (p structural parameters, average torque) are stored in the data set D.
[0090] Next is the adaptive sampling stage, which is iteratively executed n - 1 times in total. The specific steps are as follows: According to the value range of the average torque in the data set D, evenly divide it into k sub-intervals. The samples falling in the i-th (1 ≤ i ≤ k) interval form the set D i , denote the number of elements in the set D i as m i . According to the data set D i , the probability density function regarding p geometric structure parameters can be estimated through the kernel density estimation method. Here, it is assumed that the p geometric structure parameters are independent of each other, that is, each structural parameter corresponds to a probability density function, and there are a total of p probability density functions, forming a set P i={pdf i1 ,pdf i2 ,…,pdf ip}, the average torque obtained by simulating the motor composed of p geometric structure parameters sampled from these p probability density functions is more likely to fall within the i-th interval. According to k groups of probability density functions P i (1 ≤ i ≤ k), resample m samples, where P i samples m*(1 / m i ) / (1 / m1 +... + 1 / m k ) samples. In this way, if the original samples in the i-th interval are relatively few, P i will be responsible for resampling more samples, and vice versa, the number of samples will be reduced. Since the average torque obtained by simulating the samples sampled according to P i is more likely to fall within the i-th interval, the overall sample distribution tends to be more and more uniform. Store the m groups of data (p structural parameters, average torque) obtained in this round of iteration into the data set D. Iteratively execute this process n - 1 times.
[0091] Among them, the differences in the sampling effects of multiple iterations can be specifically referred to Figures 6 to 9 , where, during the multiple sampling processes corresponding to Figures 6 to 9 , as the number of collected samples increases, there is an obvious tendency in the performance indicators corresponding to the structural samples obtained by Latin hypercube sampling, while the performance indicators corresponding to the structural samples obtained by the adaptive sampling method are approximately uniform, and the performance index that the performance indicators can reach is also higher than that of the samples obtained by the Latin hypercube sampling method, that is, the uniformity and diversity of the structural samples obtained by the adaptive sampling method are both better than those of the structural samples obtained by Latin hypercube sampling.
[0092] After the adaptive sampling ends, the obtained data set D consists of n*m groups of data in vector form (p structural parameters, average torque), and the value range of the average torque is covered more evenly.
[0093] Finally, according to the data set D obtained by adaptive sampling, train a motor simulation proxy model that predicts the average torque from p structural parameters. Since the adaptive sampling covers the value range of the average torque more evenly than the hypercube sampling, the accuracy of the proxy model trained according to the data set D obtained by adaptive sampling will be better.
[0094] In this embodiment, by performing sample performance simulation on the results of collecting corresponding samples, performance indicators corresponding to each sample are obtained, and a first probability density function corresponding to the performance indicators is determined. Then, according to the first probability density function, the sampling tendency of collecting samples from the motor geometric structure parameter space is adjusted. Thus, according to the situation characterized by the performance indicators corresponding to each structural sample, the sampling tendency of collecting samples can be adaptively adjusted to ensure the uniformity of the collected samples.
[0095] In addition, an embodiment of the present application further provides a device for constructing a surrogate model for motor design. Referring to Figure 10 , the device for constructing a surrogate model for motor design includes:
[0096] A first sampling module 10, configured to collect corresponding samples from a preset motor geometric structure parameter space and store them in a training data set. Among them, each sample in the training data set is composed of the structural parameters of the motor and the performance indicators obtained by performing performance simulation on the structural parameters;
[0097] A second sampling module 20, configured to adjust the sampling tendency when collecting samples according to the results of collecting corresponding samples, and re-collect corresponding samples from the motor geometric structure parameter space according to the adjusted sampling tendency and store them in the training data set;
[0098] A training module 30, configured to train a preset model to be trained according to the training data set to obtain a surrogate model for motor design.
[0099] In this embodiment, by collecting corresponding samples from a preset motor geometric structure parameter space and storing them in a training data set, where each sample in the training data set is composed of the structural parameters of the motor and the performance indicators obtained by performing performance simulation on the structural parameters, and according to the results of collecting corresponding samples, the sampling tendency when collecting samples is adjusted, and according to the adjusted sampling tendency, corresponding samples are re-collected from the motor geometric structure parameter space and stored in the training data set. Thus, according to the training data set, a preset model to be trained can be trained to obtain a surrogate model for motor design, that is, by adjusting the sampling tendency during subsequent sampling according to the results after the initial sampling, re-sampling according to the adjusted sampling tendency, and storing the content of the above sampling in the training data set, so as to ensure the uniformity of the samples in the training data set and the accuracy of the trained surrogate model.
[0100] It should be noted that each module in the above device can be used to implement each step in the above method and achieve the corresponding technical effects, which will not be elaborated in this embodiment.
[0101] Referring to Figure 11 ,Figure 11 It is a schematic structural diagram of a device in the hardware operating environment related to the solution of the embodiment of the present application.
[0102] As shown in Figure 11 the figure, the device may include: a processor 1001, such as a CPU, a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display) and an input unit such as a keyboard (Keyboard). Optionally, the user interface 1003 may further include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. Optionally, the memory 1005 may also be a storage device independent of the foregoing processor 1001.
[0103] Those skilled in the art can understand that Figure 11 the structure shown in
[0104] does not constitute a limitation on the device, and may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements. Figure 11 As shown in
[0105] In Figure 11 the device shown in the figure, the network interface 1004 is mainly used for data communication with an external network; the user interface 1003 is mainly used for receiving input instructions from a user; the device calls the proxy model construction program for motor design stored in the memory 1005 through the processor 1001 and performs the following operations:
[0106] Collect corresponding samples from a preset motor geometric structure parameter space and store them in a training data set, where each sample in the training data set is composed of the structural parameters of the motor and the performance indicators obtained by performing performance simulation on the structural parameters;
[0107] According to the result of collecting the corresponding samples, adjust the sampling tendency when collecting samples, and according to the adjusted sampling tendency, re-collect corresponding samples from the motor geometric structure parameter space and store them in the training data set;
[0108] Train a preset model to be trained according to the training data set to obtain a proxy model for motor design.
[0109] Furthermore, the processor 1001 can call the proxy model construction program for motor design stored in the memory 1005 and further perform the following operations:
[0110] Perform sample performance simulation on the results of collecting corresponding samples to obtain performance indicators corresponding to each sample;
[0111] Determine the first probability density function corresponding to the performance indicator, and according to the first probability density function, adjust the sampling tendency of collecting samples from the motor geometric structure parameter space.
[0112] Furthermore, the processor 1001 can call the proxy model construction program for motor design stored in the memory 1005 and further perform the following operations:
[0113] Determine the second probability density function of the corresponding samples obtained by re - sampling;
[0114] According to the second probability density function, re - collect corresponding samples from the motor geometric structure parameter space, store them in the training data set, and return to the step of determining the second probability density function of the corresponding samples obtained by re - sampling until the number of times of re - sampling the samples is equal to the preset number of times.
[0115] Furthermore, the processor 1001 can call the proxy model construction program for motor design stored in the memory 1005 and further perform the following operations:
[0116] Divide the value range of the performance indicator into multiple parameter intervals;
[0117] Estimate the second probability density functions corresponding to the quantities of the multiple parameter intervals.
[0118] Furthermore, the processor 1001 can call the proxy model construction program for motor design stored in the memory 1005 and further perform the following operations:
[0119] Estimate the set of probability density functions of each structural parameter corresponding to the performance indicator within each parameter interval, obtain the set of probability density functions corresponding to the quantities of the multiple parameter intervals, and use it as the second probability density function.
[0120] Furthermore, the processor 1001 can call the proxy model construction program for motor design stored in the memory 1005 and further perform the following operations:
[0121] Determine the parameter ranges corresponding to each structural parameter in the preset motor geometric structure parameter space;
[0122] According to the parameter ranges, collect corresponding samples from the motor geometric structure parameter space in a uniform sampling manner.
[0123] Further, the processor 1001 may call the proxy model construction program for motor design stored in the memory 1005 and further perform the following operations:
[0124] According to the parameter range, a first preset number of structural samples are collected from a preset motor geometric structure parameter space in a uniform sampling manner, where each structural sample corresponds to a second preset number of structural parameters;
[0125] Perform performance simulation on the structural samples to obtain the performance indicators corresponding to the structural samples;
[0126] Store the structural samples and the performance indicators in a training data set in the form of a vector group.
[0127] In this embodiment, by collecting corresponding samples from a preset motor geometric structure parameter space and storing them in a training data set, where each sample in the training data set is composed of the structural parameters of the motor and the performance indicators obtained by performing performance simulation on the structural parameters, and according to the result of collecting the corresponding samples, the sampling tendency during sampling is adjusted, and according to the adjusted sampling tendency, corresponding samples are re - collected from the motor geometric structure parameter space and stored in the training data set, so that a preset model to be trained can be trained according to the training data set to obtain a proxy model for motor design, that is, by adjusting the sampling tendency during subsequent sampling according to the result of the initial sampling, re - sampling according to the adjusted sampling tendency, and storing the content of the above sampling in the training data set, thereby ensuring the uniformity of the samples in the training data set and the accuracy of the trained proxy model.
[0128] In addition, an embodiment of the present application further proposes a computer - readable storage medium, on which a proxy model construction program for motor design is stored. When the proxy model construction program for motor design is executed by a processor, the following operations are implemented:
[0129] Collect corresponding samples from a preset motor geometric structure parameter space and store them in a training data set, where each sample in the training data set is composed of the structural parameters of the motor and the performance indicators obtained by performing performance simulation on the structural parameters;
[0130] According to the result of collecting the corresponding samples, adjust the sampling tendency during sampling, and according to the adjusted sampling tendency, re - collect corresponding samples from the motor geometric structure parameter space and store them in the training data set;
[0131] Train a preset model to be trained according to the training data set to obtain a proxy model for motor design.
[0132] In this embodiment, corresponding samples are collected from a preset motor geometric structure parameter space and stored in a training data set. Each sample in the training data set consists of the structural parameters of the motor and the performance indicators obtained by performing performance simulations on the structural parameters. According to the result of collecting the corresponding samples, the sampling tendency during sample collection is adjusted. According to the adjusted sampling tendency, corresponding samples are recollected from the motor geometric structure parameter space and stored in the training data set. Thus, based on the training data set, a preset model to be trained can be trained to obtain a surrogate model for motor design. That is, according to the result after the initial sampling, the sampling tendency during subsequent sampling is adjusted, and according to the adjusted sampling tendency, resampling is performed, and the content of the above sampling is stored in the training data set, thereby ensuring the uniformity of the samples in the training data set and ensuring the accuracy of the trained surrogate model.
[0133] It should be noted that when the above computer-readable storage medium is executed by a processor, the various steps in the above method can also be implemented, and the corresponding technical effects can be achieved. This embodiment will not be elaborated here.
[0134] It should be noted that in this article, the term "including", "comprising" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or system. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of another identical element in the process, method, article or system including the element.
[0135] The serial numbers of the embodiments of the present application above are only for description and do not represent the superiority or inferiority of the embodiments.
[0136] Through the description of the above embodiments, those skilled in the art can clearly understand that the above embodiment method can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art can be embodied in the form of a software product. The computer software product is stored in a storage medium as described above (such as ROM / RAM, magnetic disk, optical disc), and includes several instructions for causing a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in the various embodiments of the present application.
[0137] The above are only the preferred embodiments of the present application, and do not limit the patent scope of the present application accordingly. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of the present application, or directly or indirectly applied in other related technical fields, shall be similarly included in the patent protection scope of the present application.
Claims
1. A method for constructing a surrogate model of a motor design, characterized in that, The method for constructing a surrogate model for motor design includes the following steps: Collect corresponding samples from a preset motor geometric structure parameter space and store them in a training data set. Among them, each sample in the training data set is composed of the structural parameters of the motor and the performance indicators obtained by performing performance simulations on the structural parameters; According to the result of collecting corresponding samples, adjust the sampling tendency when collecting samples. And according to the adjusted sampling tendency, re-collect corresponding samples from the motor geometric structure parameter space and store them in the training data set; Train a preset model to be trained according to the training data set to obtain a surrogate model for motor design.
2. The method for constructing an agent model of the motor design according to claim 1, characterized in that, The step of adjusting the sampling tendency when collecting samples according to the result of collecting corresponding samples includes: Perform sample performance simulations on the result of collecting corresponding samples to obtain the performance indicators corresponding to each sample; Determine the first probability density function corresponding to the performance indicators, and adjust the sampling tendency of collecting samples from the motor geometric structure parameter space according to the first probability density function.
3. The method for constructing an agent model of the motor design according to claim 2, wherein, After the step of re-collecting corresponding samples from the motor geometric structure parameter space according to the first probability density function and storing them in the training data set, the method further includes: Determine the second probability density function of the re-collected corresponding samples; According to the second probability density function, re-collect corresponding samples from the motor geometric structure parameter space and store them in the training data set, and return to the step of determining the second probability density function of the re-collected corresponding samples until the number of times of re-collecting samples is equal to the preset number of times.
4. The method for constructing an agent model of the motor design according to claim 3, characterized in that The step of determining the second probability density function of the re-collected corresponding samples includes: Divide the value range of the performance indicators into multiple parameter intervals; Estimate the second probability density functions corresponding to the quantities of the multiple parameter intervals.
5. The method for constructing an agent model of the motor design according to claim 4, wherein, The step of estimating the second probability density functions corresponding to the quantities of the multiple parameter intervals includes: Estimate the set of probability density functions of each structural parameter corresponding to the performance indicators within each parameter interval to obtain the set of probability density functions corresponding to the quantities of the multiple parameter intervals, and use it as the second probability density function.
6. The method for constructing an agent model of the motor design according to claim 1, wherein, The step of collecting corresponding samples from a preset motor geometric structure parameter space further includes: Determine the parameter ranges corresponding to each structural parameter in the preset motor geometric structure parameter space; According to the parameter ranges, collect corresponding samples from the motor geometric structure parameter space in a uniform sampling manner.
7. The method for constructing an agent model of the motor design according to claim 6, wherein, The step of collecting corresponding samples from the motor geometric structure parameter space in a uniform sampling manner according to the parameter ranges includes: According to the parameter ranges, collect a first preset number of structural samples from the preset motor geometric structure parameter space in a uniform sampling manner, where each structural sample corresponds to a second preset number of structural parameters; Perform performance simulations on the structural samples to obtain the performance indicators corresponding to the structural samples; Store the structural samples and the performance indicators in the training data set in the form of a vector group.
8. An apparatus for constructing a surrogate model of a motor design, characterized in that, The apparatus for constructing a surrogate model of motor design includes: A first sampling module, configured to collect corresponding samples from a preset motor geometric structure parameter space and store them in a training data set. Each sample in the training data set consists of the structural parameters of the motor and the performance indicators obtained by performing performance simulation on the structural parameters. A second sampling module, configured to adjust the sampling tendency when collecting samples according to the result of collecting corresponding samples, and re-collect corresponding samples from the motor geometric structure parameter space according to the adjusted sampling tendency and store them in the training data set. A training module, configured to train a preset model to be trained according to the training data set to obtain a surrogate model of motor design.
9. An apparatus for constructing a surrogate model of a motor design, characterized in that, The device for constructing a surrogate model of motor design includes: a memory, a processor, and a program for constructing a surrogate model of motor design stored on the memory and executable on the processor. The program for constructing a surrogate model of motor design is configured to implement the steps of the method for constructing a surrogate model of motor design according to any one of claims 1 to 7.
10. A storage medium, characterized in that, A program for implementing the method for constructing a surrogate model of motor design is stored on a storage medium. The program for implementing the method for constructing a surrogate model of motor design is executed by a processor to implement the steps of the method for constructing a surrogate model of motor design according to any one of claims 1 to 7.