Reverse design method and system for active composite cantilever beam material distribution
By combining genetic algorithms and neural networks, the problem of reverse design of material distribution of active composite cantilever beams is solved, and convenient and efficient design tools are realized, which releases the potential of active composite cantilever beams in 4D printing, shortens the computing time and improves the efficiency.
Patent Information
- Application Number
- CN202411134168.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-19
- Publication Date
- 2024-12-03
AI Technical Summary
Due to the huge design flexibility of active composite cantilever beams, it is difficult to design material distribution given a specified deformation.
Using a method of combining genetic algorithms and neural networks, the fitness function is constructed by determining the central point description matrix corresponding to the deformation specified by the active composite cantilever beam, and a fitness function is constructed. The deformation prediction neural network model is used to generate the offspring material distribution matrix, including elite offspring and hybrid offspring. and mutated offspring until the material distribution of the specified deformation is reached.
It provides a convenient, universal and efficient design tool, shortens computing time, improves computing efficiency, and can find the appropriate optimal solution faster, unlocking the potential of active composite cantilever beams in 4D printing.
Smart Images

Figure CN119066857A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of computers and composite materials, and in particular to a reverse design method and system for material distribution of an active composite cantilever beam. Background Art
[0002] The active composite cantilever is composed of two or more materials, usually one of which is an active material and the other is an inert material; when receiving external stimuli, the active material exhibits obvious response characteristics, mainly referring to volume change, color change, etc., while the inert material often does not change. Based on the different responsiveness of the active material and the inert material to external stimuli, the active composite cantilever will produce a corresponding response, such as deformation. Accordingly, by designing the material distribution inside the active composite cantilever, when receiving external stimuli, the cantilever will produce a specific deformation; It is precisely because the active composite cantilever has such great design flexibility that it is widely used in the field of 4D printing, which has greatly promoted the development of soft robots, biomedicine and tissue testing and other fields. However, it is also due to the great design flexibility of the active composite cantilever that the material distribution design for a given specified deformation remains to be solved.
[0003] Genetic algorithm draws on the law of evolution of similar species, survival of the fittest, to find the optimal solution under given constraints. It is widely used in various fields and is a common optimization algorithm. Specifically, given a task environment, many offspring will be generated to accept the evaluation of the fitness function. The genes of the offspring with high scores are retained because they are more in line with the task constraints, and the genes of the offspring with low scores are discarded because they are relatively inconsistent with the task constraints. In this way, as the number of evolutions increases, good genes gradually accumulate, and eventually the optimal solution that meets the constraints is found. Neural network is a data-driven method that can efficiently utilize data. After training, it has extremely high computational efficiency, so it is widely used in various regressions or predictions to improve computational efficiency. The combination of genetic algorithm and neural network provides a new solution for the inverse design of material distribution of active composite cantilever beams with specified deformation. Summary of the invention
[0004] In view of the above-mentioned shortcomings of the prior art, the purpose of the present invention is to provide a reverse design method and system for material distribution of an active composite cantilever beam, so as to solve the problem that it is difficult to design its material distribution given a specified deformation due to the huge design flexibility of the active composite cantilever beam.
[0005] To achieve the above objectives and other related objectives, the present invention provides the following technical solutions:
[0006] An inverse design method for material distribution of an active composite cantilever beam is applied to an active composite cantilever beam for specifying a deformation, and comprises the following steps: determining a center point description matrix corresponding to the specified deformation of the active composite cantilever beam, and determining a primary material distribution matrix related to the active composite cantilever beam according to the center point description matrix corresponding to the specified deformation; inputting the primary material distribution matrix into a trained deformation prediction neural network model, and obtaining a primary center point description matrix corresponding to the primary material distribution matrix through the deformation prediction neural network model; constructing a fitness function according to the center point description matrix corresponding to the specified deformation, and using the fitness function to evaluate all primary center point description matrices, and confirming whether to generate a descendant material distribution matrix according to the evaluation result, wherein the descendant material distribution matrix includes elite offspring, hybrid offspring and mutant offspring; and determining the material distribution matrix of the active composite cantilever beam corresponding to the specified deformation according to the confirmation result.
[0007] A reverse design system for material distribution of an active composite cantilever beam, comprising: a determination module, used to determine a center point description matrix corresponding to a specified deformation of the active composite cantilever beam, and determine a primary material distribution matrix related to the active composite cantilever beam according to the center point description matrix corresponding to the specified deformation; a deformation prediction module, used to input the primary material distribution matrix into a trained deformation prediction neural network model, and obtain a primary center point description matrix corresponding to the primary material distribution matrix through the deformation prediction neural network model; an evaluation module, used to construct a fitness function according to the center point description matrix corresponding to the specified deformation, and use the fitness function to evaluate all primary center point description matrices, and confirm whether to generate a descendant material distribution matrix according to the evaluation result, wherein the descendant material distribution matrix includes elite offspring, hybrid offspring and mutant offspring; and determine the material distribution matrix of the active composite cantilever beam corresponding to the specified deformation according to the confirmation result.
[0008] An electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can perform the inverse design method of the material distribution of the active composite cantilever beam as described above.
[0009] In one embodiment of the present invention, a center point description matrix is used to describe the deformation of the active composite cantilever beam; wherein the center point description matrix is a matrix composed of XY coordinates of the center points. For an active composite cantilever beam, it needs to be cut into multiple segments along the axial direction before using the center point description matrix, that is, cut into N segments, and there are N center points for describing the deformation of the active composite cantilever beam. Therefore, the specified deformation of the active composite cantilever beam has a corresponding center point description matrix;
[0010] The active composite cantilever beam is described using a material distribution matrix; wherein the material distribution matrix is composed of 0 or 1, 0 represents active material, and 1 represents inert material. Considering that material distribution is the intrinsic cause of the bending of the active composite cantilever beam, the material distribution matrix and the center point description matrix corresponding to the specified deformation need to correspond one to one. Specifically, the number of segments along the axial direction should be the same, which is reflected in the first dimension (N) of the matrix should be the same. For the second dimension of the material distribution matrix, there is no numerical restriction along the tangential direction.
[0011] In one embodiment of the present invention, before the initial material distribution matrix is input into the trained deformation prediction neural network model and the initial center point description matrix corresponding to the initial material distribution matrix is obtained through the deformation prediction neural network model, it also includes: determining the material distribution matrix and the center point description matrix related to the active composite cantilever beam according to the physical parameters of the active composite cantilever beam, and constructing the combination of the material distribution matrix and the center point description matrix into a training data set; using the training data set to train the deformation prediction neural network model, and obtaining a trained deformation prediction neural network model according to the training results.
[0012] In one embodiment of the present invention, constructing a fitness function according to the center point description matrix corresponding to the specified deformation, and using the fitness function to evaluate all the initial center point description matrices, includes: using the following fitness function to evaluate all the initial center point description matrices:
[0013] Among them, F fitness represents the fitness function; N is the number of segments that the active composite cantilever beam is divided into along the axial direction; w x and w y are the weight factors of the X and Y coordinates respectively; (x k ,y k ) is the true value coordinate of the kth center point along the axis direction; (X k ,Y k ) are the predicted coordinates of the kth center point along the axis.
[0014] In one embodiment of the present invention, the confirmation of producing elite offspring based on the evaluation results includes: all first-generation center point description matrices can be sorted according to the evaluation results of the fitness function, among which the first-generation center point description matrices ranked in the top ten percent, that is, the first-generation material distribution matrices corresponding to the top ten first-generation center point description matrices, are considered to be elite offspring.
[0015] In one embodiment of the present invention, the step of confirming that hybrid offspring will be produced according to the evaluation results includes: randomly selecting two fathers from all primary material distribution matrices as fathers for producing hybrid offspring, and then exchanging chromosomes between the fathers to produce hybrid offspring. The specific formula is as follows:
[0016] Among them, C1 and C2 are the two hybrid offspring produced by hybridization, which serve as the components of the next generation; P1 and P2 are the two fathers selected for hybridization; r1 and r2 are two random variables between 0 and 1 used to make the two offspring have different material distributions; σ(·) is a restriction function used to restrict each component element in the result of hybridization to 0 or 1, which fits the specific physical meaning of the material distribution matrix.
[0017] In one embodiment of the present invention, the step of confirming that a variant offspring is to be generated according to the evaluation result includes: generating a variant offspring from a parent generation or generating a variant offspring from a hybrid offspring;
[0018] The method of generating mutant offspring from the parent generation includes: randomly selecting a parent from all the primary material distribution matrices as the parent for generating hybrid offspring, and then randomly selecting a gene from all the genes of the parent for mutation to obtain mutant offspring. The specific formula is as follows: Mutation from parent: M p =1-P[i,j]; where M p is the mutant offspring generated from the parent generation as a component of the next generation; P is the parent selected for mutation; [i, j] consists of two random variables, representing the index of the mutant gene. The specific mutation operation is to switch between 0 and 1. If the previous gene is 1, it becomes 0, and if the previous gene is 0, it becomes 1;
[0019] The method of generating mutant offspring from hybrid offspring includes: selecting a parent from all hybrid offspring as the parent for generating mutant offspring, and then randomly selecting a gene from all genes of the parent to mutate to obtain mutant offspring. The specific calculation is as follows: Mutaion from parent: M c =1-C[i,j]; where M c is the mutated offspring generated from the parent generation as a component of the next generation; C is the parent selected for mutation; [i, j] consists of two random variables, representing the index of the mutated gene. The specific mutation operation is to switch between 0 and 1. If the previous gene is 1, it becomes 0, and if the previous gene is 0, it becomes 1.
[0020] In one embodiment of the present invention, the material distribution matrix of the active composite cantilever beam corresponding to the specified deformation is determined based on the confirmation result, including: judging whether the initial center point description matrix is close enough to the center point description matrix corresponding to the specified deformation based on the evaluation result generated by using the fitness function; if so, then stopping the generation of the offspring material distribution matrix; if not, then generating the offspring material distribution matrix, and inputting the offspring material distribution matrix into the trained deformation prediction neural network model for deformation prediction, and repeating the subsequent steps until the material distribution matrix of the active composite cantilever beam corresponding to the specified deformation is evaluated.
[0021] As described above, the inverse design method and system of the material distribution of an active composite cantilever beam of the present invention have the following beneficial effects: the present invention adopts a combination of genetic algorithm and neural network to solve the inverse design problem of the material distribution of an active composite cantilever beam of a specified deformation, and provides a convenient, universal and efficient design tool for the application of active composite cantilever beams, which can further release the potential of active composite cantilever beams in 4D printing, thereby playing a role in various fields; the present invention also constructs a suitable fitness function for the specified deformation, and the fitness function can accurately measure the similarity between the predicted deformation and the expected deformation of the active composite cantilever beam from an overall perspective, so as to guide the genetic algorithm to find a suitable optimal solution more quickly; and the present invention proposes a new hybridization and mutation operation for the specified deformation, which can explore other areas more quickly under the premise of retaining the dominant genes as much as possible, thereby speeding up the process of the genetic algorithm finding the optimal solution, which not only shortens the calculation time, but also improves the calculation efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 is a flow chart of a reverse design method for material distribution of an active composite cantilever beam in a first embodiment of the present invention;
[0023] Figure 2 is a schematic diagram of a reverse design system for material distribution of an active composite cantilever beam in a second embodiment of the present invention;
[0024] Figure 3 is a schematic diagram of an electronic device in a third embodiment of the present invention;
[0025] Figure 4 It is a flowchart that generally describes the inverse design method of the material distribution of the active composite cantilever beam in the present invention;
[0026] Figure 5 It is a flow chart that describes in detail the overall inverse design method of the active composite cantilever beam material distribution in the present invention;
[0027] Figure 6 is a schematic diagram of using a trained deformation prediction neural network model to perform deformation prediction in the present invention;
[0028] Figure 7 It is a specific schematic diagram of hybridization operation producing hybrid offspring in the present invention;
[0029] Figure 8 It is a specific schematic diagram of generating mutant offspring from the mutation of the parent generation in the present invention;
[0030] Fig. 9 It is a specific schematic diagram of producing mutant offspring from hybrid offspring in the present invention;
[0031] Fig.10 It is a schematic diagram showing the results of the inverse design of the material distribution of the active cantilever beam for a specified deformation in the present invention. DETAILED DESCRIPTION
[0032] The following describes the embodiments of the present invention through specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.
[0033] The first embodiment of the present invention relates to a reverse design method for material distribution of an active composite cantilever beam, the process is as follows: Figure 1 As shown, the details are as follows:
[0034] Step 101, determining a center point description matrix corresponding to a specified deformation of an active composite cantilever beam, and determining a primary material distribution matrix related to the active composite cantilever beam according to the center point description matrix corresponding to the specified deformation.
[0035] Specifically, the deformation of the active composite cantilever beam is described using a center point description matrix; wherein the center point description matrix is a matrix composed of the XY coordinates of the center points. For an active composite cantilever beam, it needs to be cut into multiple segments along the axial direction before using the center point description matrix, that is, cut into N segments, and there are N center points for describing the deformation of the active composite cantilever beam, so the specified deformation of the active composite cantilever beam has a corresponding center point description matrix; in the embodiment of the present invention, N is 24, and the center point description matrix is a two-dimensional matrix of 24*2;
[0036] The active composite cantilever beam is described using a material distribution matrix; wherein the material distribution matrix is composed of 0 or 1, 0 represents active material, and 1 represents inert material. Considering that material distribution is the intrinsic cause of the bending of the active composite cantilever beam, the material distribution matrix and the center point description matrix corresponding to the specified deformation need to correspond one to one. Specifically, the number of segments along the axial direction should be the same, which is reflected in the first dimension (N) on the matrix. For the second dimension of the material distribution matrix, there is no numerical restriction along the tangential direction. In the embodiment of the present invention, the material distribution matrix is a 24*4 two-dimensional matrix. Considering the computational efficiency and exploration capability, 100 separate individuals are constructed in the initial material distribution matrix in the embodiment of the present invention, and each subsequent generation contains 100 separate individuals. In addition, the center point description matrix corresponding to the specified deformation has no relationship with the initial material distribution matrix, except that the first dimension (N) on the matrix is the same.
[0037] Step 102, inputting the primary material distribution matrix into the trained deformation prediction neural network model, and obtaining the primary center point description matrix corresponding to the primary material distribution matrix through the deformation prediction neural network model.
[0038] Specifically, before using the trained deformation prediction neural network model, it is necessary to train the deformation prediction neural network model. The specific training process is: firstly, a training data set of the deformation prediction neural network model is generated according to the task, and then the deformation prediction neural network model is trained using the generated training data set;
[0039] Among them, a training data set of a deformation prediction neural network model is generated according to the task, and the specific steps are: first determine the physical parameters of the active composite cantilever beam (the length and width of the active composite cantilever beam along the axial direction), and then determine how many sections the active composite cantilever beam is divided into along the axial direction and how many sections it is divided into along the tangential direction according to the physical parameters. In an embodiment of the present invention, it is divided into 24 sections along the axial direction and 4 sections along the tangential direction; after determining the segmentation method, the specific dimensions of the material distribution matrix and the center point description matrix can be determined. In an embodiment of the present invention, the material distribution matrix is a 24*4 two-dimensional matrix, and the center point description matrix is a 24*2 two-dimensional matrix. Then, finite element simulation software is used to simulate the deformation of the composite active cantilever beam to obtain a series of combinations of material distribution matrices and center point description matrices. Then, these data are used to form a training data set of the deformation prediction neural network model, wherein the material distribution matrix is used as the input of the deformation prediction neural network model, and the center point description matrix is used as the output of the deformation prediction neural network model;
[0040] The generated training data set is used to train the deformation prediction neural network model. The specific steps are: the deformation prediction neural network model is trained in a supervised manner, and the root mean square error between the true value and the predicted value is used as the loss function. The specific loss function calculation is as follows: Wherein, N=24 is the number of segments formed by cutting the active composite cantilever beam along the axial direction; (x k ,y k ) is the true value coordinate of the kth center point along the axis direction; (X k ,Y k ) are the predicted coordinates of the kth center point along the axis.
[0041] More specifically, in an embodiment of the present invention, a TensorFlow framework is used to construct a deformation prediction neural network model. Specifically, the trained model can be stored in a checkpoint format file for subsequent deployment; when using the trained deformation prediction neural network model, the saved trained deformation prediction neural network model is loaded, that is, the saved checkpoint file is loaded, so that the deformation prediction neural network model is restored to a trained state and can be used for deformation prediction; the trained deformation prediction neural network model is used to perform deformation prediction, and the trained deformation prediction neural network model can convert material distribution into active composite cantilever beam deformation, as shown in FIG. Figure 6 shown.
[0042] Step 103, constructing a fitness function according to the center point description matrix corresponding to the specified deformation, and using the fitness function to evaluate all the first-generation center point description matrices, and determining whether to generate a descendant material distribution matrix according to the evaluation result.
[0043] Specifically, all the initial center point description matrices are evaluated using the following fitness function: Among them, F fitness represents the fitness function; N is the number of segments that the active composite cantilever beam is divided into along the axial direction; w x and w y are the weight factors of the X and Y coordinates respectively; (x k ,y k ) is the true value coordinate of the kth center point along the axis direction; (X k ,Y k) is the predicted coordinate of the kth center point along the axis direction; the fitness function is used to evaluate all the initial center point description matrices or the subsequent center point description matrices, specifically to measure the difference between the initial center point description matrix or the subsequent center point description matrix and the specified deformation. The smaller the value, the more similar they are, and the deformation of the active composite cantilever beam represented by the center point description matrix is closer to the specified deformation.
[0044] More specifically, the offspring material distribution matrix includes elite offspring, hybrid offspring and mutant offspring;
[0045] Among them, confirming that elite offspring are to be generated according to the evaluation results includes: all the first-generation center point description matrices can be sorted according to the evaluation results of the fitness function, among which the first-generation center point description matrices ranked in the top ten percent, that is, the first-generation material distribution matrices corresponding to the top ten first-generation center point description matrices, are considered to be elite offspring, which are closer to the specified deformation than other offspring and are directly retained as the composition of the next generation;
[0046] According to the evaluation results, it is confirmed that hybrid offspring will be produced, including: randomly selecting two fathers from all the primary material distribution matrices as the fathers of the hybrid offspring, and then exchanging chromosomes between the fathers. The specific task is to add the material distribution of the two fathers and then add a random variable, and then limit each component to 0 or 1 to produce hybrid offspring. The specific formula is as follows: Among them, C1 and C2 are two hybrid offsprings produced by hybridization, which serve as components of the next generation; P1 and P2 are two fathers selected for hybridization; r1 and r2 are two random variables between 0 and 1 used to make the two offspring have different material distributions; σ(·) is a restriction function used to restrict each component element in the hybridization result to 0 or 1, which fits the specific physical meaning of the material distribution matrix; Figure 7 A specific example of hybridization is given. Specifically, in the embodiment of the present invention, 50 percent of the individuals that produce offspring are produced by hybridization, that is, 50 offspring are produced by hybridization;
[0047] According to the evaluation results, it is confirmed that the mutant offspring will be generated, including: generating mutant offspring from the parent generation or generating mutant offspring from the hybrid offspring; wherein, generating mutant offspring from the parent generation includes: randomly selecting a parent from all the primary material distribution matrices as the parent for generating hybrid offspring, and then randomly selecting a gene from all the genes of the parent to mutate to obtain the mutant offspring. The specific formula is as follows: Mutation from parent: M p =1-P[i,j]; where M pis the mutant offspring generated from the parent generation as a component of the next generation; P is the parent selected for mutation; [i, j] consists of two random variables, representing the index of the mutant gene. The specific mutation operation is to switch between 0 and 1. If the previous gene is 1, it becomes 0, and if the previous gene is 0, it becomes 1; Figure 8 A specific example of generating variant offspring from a parent generation is given. Specifically, in the embodiment of the present invention, the variant offspring generated from the parent generation account for 20% of the number of offspring individuals, that is, 20 offspring are generated by mutation from the parent generation;
[0048] Producing mutant offspring from hybrid offspring includes: selecting a parent from all hybrid offspring as the parent to produce mutant offspring, and then randomly selecting a gene from all genes of the parent to mutate to obtain mutant offspring. The specific calculation is as follows: Mutatio from parent: M c =1-C[i,j]; where M c is the mutant offspring generated from the parent generation as a component of the next generation; C is the parent selected for mutation; [i, j] consists of two random variables, representing the index of the mutant gene. The specific mutation operation is to switch between 0 and 1. If the previous gene is 1, it becomes 0, and if the previous gene is 0, it becomes 1; Fig. 9 A specific example of generating variant offspring from hybrid offspring is given. Specifically, in the embodiment of the present invention, the variant offspring generated from the hybrid offspring account for 20% of the number of offspring individuals, that is, 20 offspring are generated by mutation from the hybrid offspring.
[0049] Furthermore, the offspring material distribution matrix consists of elite offspring, hybrid offspring and mutant offspring. The 10 elite offspring, 50 hybrid offspring, 20 offspring obtained from paternal mutations and 20 offspring obtained from hybrid offspring generated in the above steps are integrated together to form 100 independent individuals of the next generation for subsequent evaluation, hybridization and mutation.
[0050] Step 104, determining a material distribution matrix of the active composite cantilever beam corresponding to the specified deformation according to the confirmation result.
[0051] Specifically, the evaluation result generated by the fitness function is used to determine whether the initial center point description matrix is close enough to the center point description matrix corresponding to the specified deformation; if so, the generation of the offspring material distribution matrix will be stopped; if not, the offspring material distribution matrix will be generated, and the offspring material distribution matrix will be input into the trained deformation prediction neural network model for deformation prediction, and the subsequent steps will be repeated until the material distribution matrix of the active composite cantilever beam corresponding to the specified deformation is evaluated.
[0052] More specifically, the fitness function is constructed based on the center point description matrix corresponding to the specified deformation, so the restriction condition is set in the fitness function based on the center point description matrix corresponding to the specified deformation, and the evaluation result generated by using the fitness function is used to judge whether the initial center point description matrix has reached the restriction condition, that is, whether the optimal initial center point description matrix can be close enough to the specified deformation requirement; in the example of the present invention, the restriction condition is that the specific value of the fitness function is less than 0.1. If the requirement is met, the generation of the offspring material distribution matrix will be stopped, and the algorithm will be terminated to obtain the active composite cantilever beam material distribution matrix of the final composite requirement; if the requirement is not met, steps 102 to 104 will be repeated to continuously generate offspring material distribution matrices and evaluate until there is an optimal offspring material distribution matrix that meets the restriction condition; in order to comprehensively verify the performance of the method proposed in the present invention, a variety of specified deformation tests were carried out, including different lengths and different bending angles, and the specific results can be seen. Fig.10 .
[0053] Furthermore, the specific steps of the present invention can also be summarized as follows: first, specify the deformation of the active composite cantilever beam, then initialize the primary material distribution matrix, and complete the algorithm preparation; then use the trained deformation prediction neural network model to predict the deformation of all primary material distribution matrices, that is, convert the material distribution into the deformation of the active composite cantilever beam; then construct a suitable fitness function to evaluate all the primary center point description matrices, and then determine whether to generate a child material distribution matrix based on the evaluation results; finally generate the material distribution of the active composite cantilever beam corresponding to the specified deformation, which can be specifically referred to in Figure 4 , please refer to the overall detailed flow chart of the present invention Figure 5 .
[0054] The second embodiment of the present invention relates to a reverse design system for material distribution of an active composite cantilever beam, see Figure 2 ,include:
[0055] A determination module, used to determine a center point description matrix corresponding to a specified deformation of the active composite cantilever beam, and determine a primary material distribution matrix related to the active composite cantilever beam according to the center point description matrix corresponding to the specified deformation;
[0056] A deformation prediction module is used to input the primary material distribution matrix into the trained deformation prediction neural network model, and obtain the primary center point description matrix corresponding to the primary material distribution matrix through the deformation prediction neural network model;
[0057] The evaluation module is used to construct a fitness function according to the center point description matrix corresponding to the specified deformation, and use the fitness function to evaluate all the initial center point description matrices, and confirm whether to generate a descendant material distribution matrix based on the evaluation results, wherein the descendant material distribution matrix includes elite offspring, hybrid offspring and mutant offspring; and determine the material distribution matrix of the active composite cantilever beam corresponding to the specified deformation based on the confirmation results.
[0058] It is not difficult to find that this embodiment is a system embodiment corresponding to the first embodiment, and this embodiment can be implemented in conjunction with the first embodiment. The relevant technical details mentioned in the first embodiment are still valid in this embodiment, and in order to reduce repetition, they are not repeated here. Accordingly, the relevant technical details mentioned in this embodiment can also be applied in the first embodiment.
[0059] It is worth mentioning that all modules involved in this embodiment are logic modules. In practical applications, a logic unit can be a physical unit, a part of a physical unit, or a combination of multiple physical units. In addition, in order to highlight the innovative part of the present invention, this embodiment does not introduce units that are not closely related to solving the technical problem proposed by the present invention, but this does not mean that there are no other units in this embodiment.
[0060] The third embodiment of the present invention relates to an electronic device, see Figure 3 ,include:
[0061] At least one processor; and a memory in communication with the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can perform the inverse design method for the material distribution of the active composite cantilever beam as described above.
[0062] Among them, the memory and the processor are connected in a bus manner, and the bus may include any number of interconnected buses and bridges, and the bus connects various circuits of one or more processors and memories together. The bus can also connect various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be one element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium. The data processed by the processor is transmitted on a wireless medium via an antenna, and further, the antenna also receives data and transmits the data to the processor.
[0063] The processor is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. Memory can be used to store data used by the processor when performing operations.
[0064] A fourth embodiment of the present invention relates to a computer-readable storage medium storing a computer program, and the computer program implements the above method embodiment when executed by a processor.
[0065] That is, those skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, and the program is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of each embodiment method 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 codes.
[0066] In summary, the present invention adopts a combination of genetic algorithm and neural network to solve the inverse design problem of material distribution of active composite cantilever beams with specified deformation, and provides a convenient, universal and efficient design tool for the application of active composite cantilever beams, which can further release the potential of active composite cantilever beams in 4D printing, so as to play a role in various fields; the present invention also constructs a suitable fitness function for the specified deformation, and the fitness function can accurately measure the similarity between the predicted deformation and the expected deformation of the active composite cantilever beam from an overall perspective, so as to guide the genetic algorithm to find a suitable optimal solution more quickly; and the present invention proposes a new hybridization and mutation operation for the specified deformation, which can explore other areas more quickly under the premise of retaining the dominant genes as much as possible, so as to speed up the process of genetic algorithm finding the optimal solution, which not only shortens the calculation time but also improves the calculation efficiency.
[0067] The above embodiments are merely illustrative of the principles and effects of the present invention, and are not intended to limit the present invention. All equivalent modifications or changes made by those skilled in the art without departing from the spirit and technical ideas disclosed by the present invention shall still be covered by the claims of the present invention.
Claims
1. An inverse design method for material distribution of an active composite cantilever beam, applied to an active composite cantilever beam for a specified deformation, characterized in that: The method comprises the following steps: Determine a center point description matrix corresponding to a specified deformation of the active composite cantilever beam, and determine a primary material distribution matrix related to the active composite cantilever beam according to the center point description matrix corresponding to the specified deformation; Inputting the primary material distribution matrix into a trained deformation prediction neural network model, and obtaining a primary center point description matrix corresponding to the primary material distribution matrix through the deformation prediction neural network model; Constructing a fitness function according to the center point description matrix corresponding to the specified deformation, and using the fitness function to evaluate all the first-generation center point description matrices, and confirming whether to generate a progeny material distribution matrix according to the evaluation result, wherein the progeny material distribution matrix includes elite progeny, hybrid progeny and mutant progeny; The material distribution matrix of the active composite cantilever beam corresponding to the specified deformation is determined based on the validation results.
2. The inverse design method for material distribution of an active composite cantilever beam according to claim 1, characterized in that: The deformation of the active composite cantilever beam is described using a center point description matrix; wherein the center point description matrix is a matrix composed of XY coordinates of the center points. For an active composite cantilever beam, it needs to be cut into multiple segments along the axial direction before using the center point description matrix, that is, cut into N segments, so there are N center points for describing the deformation of the active composite cantilever beam, so the specified deformation of the active composite cantilever beam has a corresponding center point description matrix; The active composite cantilever beam is described using a material distribution matrix; wherein the material distribution matrix is composed of 0 or 1, 0 represents active material, and 1 represents inert material. Considering that material distribution is the intrinsic cause of the bending of the active composite cantilever beam, the material distribution matrix and the center point description matrix corresponding to the specified deformation need to correspond one to one. Specifically, the number of segments along the axial direction should be the same, which is reflected in the first dimension (N) of the matrix should be the same. For the second dimension of the material distribution matrix, there is no numerical restriction along the tangential direction.
3. The inverse design method for material distribution of an active composite cantilever beam according to claim 1, characterized in that: Before inputting the primary material distribution matrix into the trained deformation prediction neural network model and obtaining the primary center point description matrix corresponding to the primary material distribution matrix through the deformation prediction neural network model, the method further includes: Determining a material distribution matrix and a center point description matrix related to the active composite cantilever beam according to the physical parameters of the active composite cantilever beam, and constructing a combination of the material distribution matrix and the center point description matrix into a training data set; The deformation prediction neural network model is trained using the training data set, and a trained deformation prediction neural network model is obtained according to the training result.
4. The inverse design method for material distribution of an active composite cantilever beam according to claim 1, characterized in that: The step of constructing a fitness function according to the center point description matrix corresponding to the specified deformation, and using the fitness function to evaluate all the initial center point description matrices includes: Use the following fitness function to evaluate all initial center point description matrices: Among them, F fitness represents the fitness function; N is the number of segments that the active composite cantilever beam is divided into along the axial direction; w x and w y are the weight factors of the X and Y coordinates respectively; (x k ,y k ) is the true value coordinate of the kth center point along the axis direction; (X k ,Y k ) are the predicted coordinates of the kth center point along the axis.
5. The inverse design method for material distribution of an active composite cantilever beam according to claim 4, characterized in that: The confirmation of producing elite offspring based on the evaluation results includes: According to the evaluation results of the fitness function on all first-generation center point description matrices, all first-generation center point description matrices can be sorted, among which the first-generation center point description matrices ranked in the top ten percent, that is, the first-generation material distribution matrices corresponding to the top ten first-generation center point description matrices, are considered to be elite offspring.
6. The inverse design method for material distribution of an active composite cantilever beam according to claim 5, characterized in that: The step of confirming that hybrid offspring will be produced according to the evaluation results comprises: Randomly select two from the distribution matrix of all primary materials as the fathers of hybrid offspring, and then exchange chromosomes with each other to produce hybrid offspring. The specific formula is as follows: Among them, C1 and C2 are the two hybrid offspring produced by hybridization, which serve as the components of the next generation; P1 and P2 are the two fathers selected for hybridization; r1 and r2 are two random variables between 0 and 1 used to make the two offspring have different material distributions; σ(·) is a restriction function used to restrict each component element in the result of hybridization to 0 or 1, which fits the specific physical meaning of the material distribution matrix.
7. The inverse design method for material distribution of an active composite cantilever beam according to claim 6, characterized in that: The step of confirming that a variant offspring is to be produced according to the evaluation results comprises: Producing variant offspring from parents or producing variant offspring from hybrids; Wherein, generating variant offspring from the parent generation includes: Randomly select one of the primary material distribution matrices as the father of the hybrid offspring, and then randomly select one gene from all the genes of the father to mutate to obtain the mutant offspring. The specific formula is as follows: Mutation from parent:M p =1-P[i,j]; Among them, M p is the mutant offspring generated from the parent generation as a component of the next generation; P is the parent selected for mutation; [i, j] consists of two random variables, representing the index of the mutant gene. The specific mutation operation is to switch between 0 and 1. If the previous gene is 1, it becomes 0, and if the previous gene is 0, it becomes 1; The method of producing variant offspring from hybrid offspring comprises: Select one of all the hybrid offspring as the father to produce the mutant offspring, and then randomly select one gene from all the genes of the father to mutate to obtain the mutant offspring. The specific calculation is as follows: Mutation from parent:M c =1-C[i,j]; Among them, M c is the mutated offspring generated from the parent generation as a component of the next generation; C is the parent selected for mutation; [i, j] consists of two random variables, representing the index of the mutated gene. The specific mutation operation is to switch between 0 and 1. If the previous gene is 1, it becomes 0, and if the previous gene is 0, it becomes 1.
8. The inverse design method for material distribution of an active composite cantilever beam according to claim 1, characterized in that: The method of determining the material distribution matrix of the active composite cantilever beam corresponding to the specified deformation according to the confirmation result includes: According to the evaluation results generated by the fitness function, it is judged whether the initial center point description matrix is close enough to the center point description matrix corresponding to the specified deformation; if so, the generation of the offspring material distribution matrix will be stopped; if not, the offspring material distribution matrix will be generated, and the offspring material distribution matrix will be input into the trained deformation prediction neural network model for deformation prediction, and the subsequent steps will be repeated until the material distribution matrix of the active composite cantilever beam corresponding to the specified deformation is evaluated.
9. A reverse design system for material distribution of an active composite cantilever beam, characterized in that: include: A determination module, used to determine a center point description matrix corresponding to a specified deformation of the active composite cantilever beam, and determine a primary material distribution matrix related to the active composite cantilever beam according to the center point description matrix corresponding to the specified deformation; A deformation prediction module, used for inputting the primary material distribution matrix into a trained deformation prediction neural network model, and obtaining a primary center point description matrix corresponding to the primary material distribution matrix through the deformation prediction neural network model; An evaluation module is used to construct a fitness function according to a center point description matrix corresponding to a specified deformation, and use the fitness function to evaluate all initial center point description matrices, and confirm whether to generate a descendant material distribution matrix according to the evaluation results, wherein the descendant material distribution matrix includes elite offspring, hybrid offspring and mutant offspring; and determine the material distribution matrix of the active composite cantilever beam corresponding to the specified deformation according to the confirmation results.
10. An electronic device, characterized in that: include: at least one processor; as well as, A memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor so that the at least one processor can execute an inverse design method for material distribution of an active composite cantilever beam as described in any one of claims 1 to 8.
