Mechanical structure optimization design method and storage medium based on simulated annealing algorithm
Through the simulation annealing algorithm, the mechanical structure design is optimized, and the problems of low efficiency and difficult performance improvement of traditional design methods are solved, and more efficient and diversified mechanical structure design is achieved.
Patent Information
- Application Number
- CN202210746813.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-28
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2042-06-28
AI Technical Summary
The existing mechanical structure design methods are limited by manual experience and inertial thinking, resulting in low design efficiency and difficult to significantly improve product performance.
Using a mechanical structure optimization design method based on a simulated annealing algorithm, we automatically find the optimal mechanical structure that meets the constraints by encoding spatial regions, determining the simulated annealing algorithm parameters, randomly generating solutions and performing simulation verification.
It improves the efficiency of mechanical structural design and generates more flexible, diverse and intelligent structural styles, ensuring the optimality of the design scheme and reducing human intervention.
Smart Images

Figure CN115017651B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of mechanical structure design, and in particular to a mechanical structure optimization design method based on a simulated annealing algorithm and a storage medium. Background Art
[0002] At present, most traditional mechanical structure designs are based on existing experience and use common geometric shapes as materials for design. They are easily disturbed by preconceived inertial thinking patterns, and the performance of the designed products cannot be greatly improved. In addition, repeated parameter modifications and simulation verifications also consume the designer's physical and mental energy, and the work efficiency is not high. Summary of the invention
[0003] The purpose of the present invention is to provide a mechanical structure optimization design method and storage medium based on simulated annealing algorithm, which can solve the problem that the manual design work efficiency in the prior art is low and the performance of the designed product cannot be greatly improved.
[0004] The objective of the present invention is achieved through the following technical solutions:
[0005] In a first aspect, the present invention provides a mechanical structure optimization design method based on a simulated annealing algorithm, comprising the following steps:
[0006] Step S1, determining the geometric constraints of the mechanical structure of the product to be designed, the minimum performance index constraints that the product needs to meet, and the optimal target index;
[0007] Step S2, determining a coding rule, performing binary coding on the spatial region of the mechanical structure, and determining the number n of unknown variables;
[0008] Step S3, determining simulated annealing algorithm parameters;
[0009] Step S4, randomly generate a set of solutions that meet the constraints;
[0010] Step S5, substituting the solution of step S4 into the simulation software to obtain the value of the target indicator;
[0011] Step S6: randomly change each variable of the current solution to generate a new solution, and substitute it into the simulation software to obtain the value of the new target indicator;
[0012] Step S7, determine whether the new target indicator is better than the old target indicator, if not, discard it, otherwise select a number R from a random number uniformly distributed in the (0,1) interval, and determine whether R is less than Pk, if so, accept this solution as the current solution, otherwise, discard the solution;
[0013] Step S8, complete one iteration process, increase the number of iterations by 1, and determine whether the number of iterations is less than N. If so, return to step S6 and loop through steps S6 to S8; otherwise, exit the loop and the current solution is the optimal solution.
[0014] Furthermore, the simulated annealing algorithm parameters include: the number of iterations N and the new solution acceptance judgment criterion function Pk.
[0015] Furthermore, the mechanical structure is a mechanical structure of a uniform material, and the mechanical structure is a closed area connected together without a hole in the middle.
[0016] Furthermore, the spatial region is a two-dimensional plane region or a three-dimensional spatial region.
[0017] Furthermore, the number of the geometric constraints or the minimum performance index constraints is greater than one, and the optimal target index is unique.
[0018] In a second aspect, the present invention provides a storage medium storing a computer program, which can execute the above-mentioned mechanical structure optimization design method by running the computer program.
[0019] The mechanical structure optimization design method and storage medium based on simulated annealing algorithm of the present invention use artificial intelligence to change the inherent thinking obstacles in the field of structural design and obtain a more flexible, diverse and intelligent structural style. The present invention combines simulated annealing algorithm and mechanical structure performance simulation software to propose a building block type mechanical structure optimization method. Each adjustment of data is equivalent to rearranging the stacking method of building blocks, which greatly enhances the diversity of design results; the performance of the design structure is verified by using mechanical structure performance simulation software to ensure the optimality of the design scheme; the algorithm can be repeated and circulated, and the design process does not require human intervention. Designers only need to list design constraints and performance requirements to obtain ideal structural dimensions, which improves the work efficiency of designers. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 It is a flow chart of the mechanical structure optimization design method based on simulated annealing algorithm of the present invention;
[0021] Figure 2 This is a comparison diagram before and after optimization of the rotor permanent magnet mechanical structure of a two-pole permanent magnet synchronous motor. DETAILED DESCRIPTION
[0022] The embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.
[0023] The following describes the embodiments of the present disclosure through specific examples, and those skilled in the art can easily understand other advantages and effects of the present disclosure from the contents disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all of the embodiments. The present disclosure can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present disclosure. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present disclosure.
[0024] The mechanical structure optimization design method based on simulated annealing algorithm of the present invention comprises the following steps:
[0025] Step S1: determine the geometric constraints of the mechanical structure of the product to be designed, the minimum performance index constraints that the product needs to meet, and the optimal target index.
[0026] The geometric constraints and minimum performance index constraints of the present invention can be multiple constraints, and the optimal target index is the only index, which needs to be selected according to the requirements of the designer.
[0027] Geometric constraints, minimum performance index constraints and optimal target indexes are determined according to different products. The setting of these parameters is based on experience summary, customer needs, etc. Users can specify geometric constraints between two-dimensional objects or points on objects. When you edit the constrained geometry later, the constraints will be retained. Therefore, by using geometric constraints, users can achieve their design requirements. For example: determine the shape, maximum outer diameter, local minimum size, steering, etc. of the product to be designed.
[0028] Step S2: determine the coding rules, use 0 and 1 to perform binary coding on the spatial region, and determine the number n of unknown variables.
[0029] Among them, 0 represents no stacking of building blocks, and 1 represents stacking of building blocks. The binary (0 and 1) method of the present invention is encoded, and the encoding rules are not unique. The number of bits required for binary is determined according to the actual situation and the design accuracy requirements, and the computing power of the computer and the waiting computing time should be considered.
[0030] The spatial region can be a two-dimensional plane region or a three-dimensional space region, and the encoding rules are adjusted according to the region type.
[0031] Step S3, determine the simulated annealing algorithm parameters: number of iterations N, new solution acceptance judgment criterion function Pk.
[0032] Step S4: randomly generate a set of solutions that satisfy the constraints.
[0033] Step S5: Substitute the solution of step S4 into the simulation software to obtain the value of the target indicator.
[0034] Step S6: randomly change each variable of the current solution to generate a new solution, and substitute it into the simulation software to obtain the value of the new target indicator.
[0035] Step S7, determine whether the new target indicator is better than the old target indicator. If not, discard it. Otherwise, select a number R from a random number uniformly distributed in the (0,1) interval, and determine whether R is less than Pk. If so, accept this solution as the current solution. Otherwise, discard the solution.
[0036] Step S8, complete one iteration process, increase the number of iterations by 1, and determine whether the number of iterations is less than N. If so, return to step S6 and loop through steps S6 to S8; otherwise, exit the loop and the current solution is the optimal solution.
[0037] The mechanical structure targeted by the design method of the present invention is a mechanical structure made of uniform material, and the mechanical structure is a closed area connected together without a hole in the middle.
[0038] The mechanical structure optimization design method of the present invention is based on simulated annealing algorithm and simulation calculation, combined with the building block mechanical structure design idea, and solidified in the form of a step program to form a set of design methods that automatically find the optimal mechanical structure that meets the constraints without external intervention. The overall idea of the present invention is to use the building block stacking method to build a mechanical structure that meets the requirements from scratch. At the beginning, the stacking method is random, and the stacking method with poor performance is gradually eliminated according to the performance effect of the stacked shape, leaving the optimal stacking method, that is, the optimal mechanical structure.
[0039] In order to illustrate the beneficial effects of the present invention, the mechanical structure optimization design method based on the simulated annealing algorithm of the present invention is used to design a rotor permanent magnet mechanical structure of a two-pole permanent magnet synchronous motor to meet the requirement of maximizing the average air gap magnetic field density generated by the permanent magnet per unit volume under the geometric size constraint. The specific implementation method includes the following steps:
[0040] (1) Determine the geometric constraints of the permanent magnet: the thinnest part must not be less than 3 mm, and the permanent magnet must be an axisymmetric shape; the minimum performance indicator constraints that the product needs to meet: the average air gap magnetic field must not be less than 0.3 T; the optimal target indicator: the average air gap magnetic field / permanent magnet area, the larger the value, the better the performance.
[0041] (2) Determine the encoding rule, transform the two-dimensional plane into a 6*11 matrix, the number of unknown variables n=6, consider that the permanent magnet is an axisymmetric figure, only 1 can be placed in the middle of each row, the number of 1s is uncertain, and the rest are 0. As shown in the following table, the data represented by the encoding is: [00111111100,00001110000,00011111000,001111111100,01111111110,00011111000].
[0042] 0 0 1 1 1 1 1 1 1 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 1 0 0 0
[0043] Table 1
[0044] (3) Determine the parameters of the simulated annealing algorithm: number of iterations N = 100, new solution acceptance judgment criterion function Where △y is the difference between the two most recent target indicator values, T=12.
[0045] (4) Randomly generate a set of initial solutions that satisfy the constraints: [x 10 ,x 20 ,...x 60 ]=[00111111100,00001110000,00011111000,001111111100,01111111110,00011111000].
[0046] (5) Substitute the solution from the previous step into the simulation software and obtain the value of the target index as 61.5.
[0047] (6) Randomly change each variable of the current solution to generate a new solution [x 11 ,x 21 ,...x 61 ]=[011111111110,00011111000,00111111100,000011110000,00111111100,00111111100], and substitute it into the simulation software to obtain the new target indicator value of 68.7.
[0048] (7) Determine whether the new target indicator is better than the old target indicator. If not, discard it. Otherwise, select a number R = 0.53 from a random number uniformly distributed in the (0, 1) interval and calculate P k =0.64, because R is less than P k , then accept this solution as the current solution.
[0049] (8) Add 1 to the number of iterations and check whether the number of iterations is less than 100. If so, return to step 6 and loop through steps 6-8; otherwise, exit the loop.
[0050] If the number of iterations reaches 100, the current solution is the optimal solution, and the geometric shape of the permanent magnet is determined, such as Figure 2 As shown, the left figure shows the geometric shape of the traditional permanent magnet, and the right figure shows the geometric shape of the optimized permanent magnet.
[0051] The optional implementation modes of the embodiments of the present invention are described in detail above in conjunction with the accompanying drawings. However, the embodiments of the present invention are not limited to the specific details in the above implementation modes. Within the technical concept of the embodiments of the present invention, various simple modifications can be made to the technical scheme of the embodiments of the present invention, and these simple modifications all belong to the protection scope of the embodiments of the present invention.
[0052] It should also be noted that the various specific technical features described in the above specific implementations can be combined in any suitable manner without contradiction, such as changing the encoding rules, etc. In order to avoid unnecessary repetition, the embodiments of the present invention will not further describe various possible combinations.
[0053] Those skilled in the art will appreciate that all or part of the steps in the above-mentioned embodiment method can be implemented through a program, and the implementation method of the program can adopt different programming languages.
[0054] The present invention also provides a storage medium, in which a computer program is stored. When the computer program is run, the above-mentioned mechanical structure optimization design method can be executed.
[0055] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral one; it can be a mechanical connection, an electrical connection, or communication with each other; it can be a direct connection, or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements, unless otherwise clearly defined. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
Claims
1. A mechanical structure optimization design method based on simulated annealing algorithm, characterized in that: The following steps are involved: Step S1, determining the geometric constraints of the mechanical structure of the product to be designed, the minimum performance index constraints that the product needs to meet, and the optimal target index; Step S2, determining a coding rule, using 0 and 1 to perform binary coding on the spatial region of the mechanical structure, and determining the number n of unknown variables, wherein the spatial region is a two-dimensional plane region or a three-dimensional space region, wherein 0 represents no stacking of building blocks, and 1 represents stacking of building blocks; Step S3, determining the simulated annealing algorithm parameters, including: the number of iterations N and the new solution acceptance judgment criterion function Pk; Step S4, randomly generate a set of solutions that meet the constraints; Step S5, substituting the solution of step S4 into the simulation software to obtain the value of the target indicator; Step S6: randomly change each variable of the current solution to generate a new solution, and substitute it into the simulation software to obtain the value of the new target indicator; Step S7, determine whether the new target indicator is better than the old target indicator, if not, discard it, otherwise select a number R from a random number uniformly distributed in the (0,1) interval, and determine whether R is less than Pk, if so, accept this solution as the current solution, otherwise, discard the solution; Step S8, complete one iteration process, increase the number of iterations by 1, and determine whether the number of iterations is less than N. If so, return to step S6 and loop through steps S6 to S8; otherwise, exit the loop and the current solution is the optimal solution.
2. The mechanical structure optimization design method according to claim 1, characterized in that: The mechanical structure is a mechanical structure of a uniform material, and the mechanical structure is a closed area connected together without a hole in the middle.
3. The mechanical structure optimization design method according to claim 1, characterized in that: The number of the geometric constraints or minimum performance index constraints is greater than one, and the optimal target index is unique.
4. A storage medium storing a computer program, characterized in that: Running the computer program can execute the mechanical structure optimization design method described in any one of claims 1 to 3.