Wave rider shape controllable generation method based on CVAE-GAN model
Through the controllable generation method of wave multiplication body shape based on the CVAE-GAN model, the problem of limited design space diversity in the prior art is solved, and the generalized characterization and controllable generation of wave multiplication body shape is realized, and the optimization design efficiency is improved.
Patent Information
- Application Number
- CN202411672765.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-21
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2044-11-21
AI Technical Summary
When the prior art generates the appearance of the wave-multiplier body, the diversity of the design space is limited, making it difficult to achieve changes in the topology of the aerodynamic layout, limiting the potential of optimized design.
The wave multiplication body shape controllable generation method based on the CVAE-GAN model is adopted. By constructing the training data set and the CVAE-GAN model, the encoder, decoder and discriminator are used for training to generate a variety of shapes that meet the geometric characteristics control conditions of the target wave multiplication body.
The generalized characterization and controllable generation of wave-multiplexing body shape are realized, which significantly improves the optimization design efficiency of wave-multiplexing body shape layout and can directly output the shape in a common digital-analog format, which is easy to use and practical.
Smart Images

Figure CN119625208A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of aircraft aerodynamic optimization design, and in particular relates to a method for controllable generation of waverider body shape based on a CVAE-GAN model. Background Art
[0002] As a key design element of hypersonic aircraft, waveriders are widely used in aerospace, missiles, and high-speed aircraft due to their unique streamlined shape and superior aerodynamic characteristics. The design goal of a waverider is to optimize its lift-to-drag ratio, smoothness, and stability to ensure optimal performance under supersonic flight conditions. The quality of the waverider aerodynamic shape optimization method directly determines the capacity of the design space and the optimization design efficiency, which is of great significance to the performance improvement and rapid iterative design of the waverider.
[0003] When optimizing the aerodynamic shape of a waverider, the optimization algorithm is often used to obtain the waverider optimization control parameters, and then a variety of specific waverider shapes are generated based on the waverider optimization control parameters. Aerodynamic tests are then performed on each of the obtained waverider shapes to test its aerodynamic performance and obtain the best waverider shape.
[0004] It can be seen that when optimizing the aerodynamic shape of a waverider, how to quickly and efficiently generate a variety of waverider shapes that meet the waverider optimization control parameters directly affects the optimization efficiency of the waverider aerodynamic shape.
[0005] In the prior art, when generating the waverider shape, there are the following deficiencies: the design space defined by the traditional method is used, and the "diversity" of the generated waverider shape is limited. For example, the most commonly used Class-Shape-Transformation (CST) method or Free-Form Deformation (FFD) method actually performs perturbation modification on the basis of the reference shape. The final generated waverider shape result depends largely on the initial scheme, and it is difficult to achieve changes in the aerodynamic layout topology level, thereby limiting the potential for optimized design. Summary of the invention
[0006] In view of the defects of the prior art, the present invention provides a controllable generation method of waverider shape based on the CVAE-GAN model, which can effectively solve the above problems.
[0007] In order to achieve the above object, the present invention adopts the following technical solution:
[0008] The present invention provides a method for controllably generating a waverider shape based on a CVAE-GAN model, comprising the following steps:
[0009] Step 1: Given a set of waverider reference shapes, including L waverider reference shapes, they are expressed as: waverider reference shapes x1, x2, ..., x L ; Wherein, each waverider body reference shape is represented by the waverider body shape surface point cloud data;
[0010] Step 2: Build a training dataset:
[0011] For each waverider reference shape x k , k=1,2,...,L, use parameterization method to perturb it, and get k The waverider training shape set formed by waverider training shapes is expressed as:
[0012] Therefore, for L waverider reference shapes x1, x2, ..., x L , corresponding to L waverider training shape sets, which are then integrated to form a training data set X = [X1, X2, ..., X L ];
[0013] Step 3, constructing a CVAE-GAN model; the CVAE-GAN model includes an encoder, a decoder and a discriminator;
[0014] Step 4: Use the training data set to train the CVAE-GAN model, and use the gradient descent algorithm to optimize the model parameters of the CVAE-GAN model to obtain the trained CVAE-GAN model. The specific training and optimization methods are as follows:
[0015] Step 4.1, dividing the training data set into a plurality of batches of training data subsets; selecting a plurality of waverider training shapes contained in each batch of training data subsets to form a waverider training shape subset x i , and at the same time determine the geometric characteristics control condition c of the waverider;
[0016] Step 4.2: Set the waverider training shape subset x i and the waverider geometric feature control condition c to form an input sample x, which is input to the encoder. The encoder calculates the variance σ and mean μ of the latent code z of each waverider training shape in the input sample x, thereby obtaining a Gaussian distribution N(μ, σ) according to the variance σ and mean μ of the latent code z, and the obtained Gaussian distribution N(μ, σ) is used as the latent code distribution q(z|x) of the latent code space;
[0017] Step 4.3, the decoder randomly samples the latent code distribution q(z|x) obtained by the encoder to obtain a latent code z;
[0018] Assume that the prior distribution p(z) of the latent code in the latent code space is a standard Gaussian distribution N(0, 1), sample the prior distribution p(z) to obtain the false latent code z′;
[0019] The decoder performs a decoding operation on the latent code z to obtain a true waverider shape x" corresponding to the waverider geometric characteristic control condition c;
[0020] The decoder performs a decoding operation on the pseudo latent code z′ to obtain a pseudo waverider shape x′;
[0021] Among them: the true waverider shape x" and the false waverider shape x' are both point cloud data of the waverider shape surface;
[0022] Step 4.4, the input sample x, the true waverider shape x", and the false waverider shape x' are input to the discriminator; the discriminator obtains the probability that the input sample x is judged to be true, the probability that the true waverider shape x" is judged to be true, and the probability that the false waverider shape x' is judged to be true;
[0023] Step 4.5, calculating the loss value of the loss function of the CVAE-GAN model;
[0024] Step 4.6, according to the loss value, respectively calculate the gradient of the model parameters of the encoder, the decoder and the discriminator, and use the gradient descent algorithm to back-propagate and update the parameter values of the model parameters;
[0025] Step 4.7, return to step 4.1, and train the CVAE-GAN model in a loop until the model converges, thereby obtaining the trained CVAE-GAN model and latent code space;
[0026] Step 5: According to the design requirements, a latent code is randomly sampled in the latent code space, represented as z * , and the geometric characteristics control conditions of the target waverider c are given * ;
[0027] The potential code z * and the target waverider geometric characteristics control condition c * The decoder decodes the latent code z* to obtain the true waverider target shape corresponding to the target waverider geometric feature control condition c*, which is the surface point cloud data of the waverider target shape, thereby realizing the controllable waverider shape generation.
[0028] Preferably, the encoder includes a three-layer convolutional network and a three-layer fully connected network connected in series; the decoder includes a three-layer fully connected network and a three-layer deconvolutional network connected in series; and the discriminator includes a three-layer fully connected network.
[0029] Preferably, in step 4.5, the loss function of the CVAE-GAN model is:
[0030] L Enc =L prior +L like
[0031] L Dnc =L like —L GAN
[0032] L Dis =L GAN
[0033] in:
[0034] L Enc represents the loss function of the encoder;
[0035] L prior Represents the KL divergence between the latent code distribution q(z|x) and the prior distribution p(z) in the encoder;
[0036] L like represents the reconstruction error of the decoder given the encoder inference result, that is, the latent code distribution q(z|x);
[0037] L Dnc represents the loss function of the decoder;
[0038] L GAN Represents the discriminative loss of the discriminator;
[0039] L Dis represents the loss function of the discriminator.
[0040] Preferably, the KL divergence between the latent distribution q(z|x) and the prior distribution p(z) is expressed as D KL , obtained by the following formula:
[0041]
[0042] in:
[0043] J represents the dimension of the latent code z;
[0044] represents the j-th dimension of the latent code z;
[0045] σ j and μ j , respectively represent the variance and mean of the j-th dimension of the latent code z inferred by the encoder.
[0046] Preferably, the discriminant loss L of the discriminator GAN Obtained by the following formula:
[0047] LGAN =log(Dis(x))+log(1-Dis(Dec(z')))++log(1-Dis(Dec(Enc(x))))where:
[0048] Dis(x) represents the probability that the discriminator judges the input sample x to be true;
[0049] Dis(Dwc(z′)) represents the probability that the discriminator determines that the false waverider shape x′ is true;
[0050] Dis)Dec)Emc)x))) represents the probability that the discriminator judges the true waverider shape x" to be true.
[0051] Preferably, step 4.6 is specifically as follows:
[0052] The following formula is used to calculate the gradient of the loss function obtained by inference on the model parameters of the encoder, decoder and discriminator respectively, and the parameter values of the model parameters are updated by backpropagation using the gradient descent algorithm:
[0053]
[0054] in:
[0055] θ Enc ,θ Dec and θ Dis , respectively the model parameters of the encoder, decoder and discriminator;
[0056] Represents the gradient operation.
[0057] Preferably, it also includes:
[0058] Step 6: Store the generated surface point cloud data of the true waverider target shape in the CPACS standard universal data format and perform efficient data management, and convert the surface point cloud data into IGS and STP digital model formats.
[0059] Preferably, it also includes: when the same target waverider geometric characteristic control condition c* is given, multiple random sampling is performed from the latent code space, and each time a latent code is randomly sampled, a true waverider target shape corresponding to the target waverider geometric characteristic control condition c* is obtained; therefore, by performing multiple random sampling from the latent code space, multiple true waverider target shapes that meet the target waverider geometric characteristic control condition c* are eventually obtained.
[0060] The present invention provides a controllable generation method of waverider shape based on CVAE-GAN model, which has the following advantages:
[0061] By adopting the controllable generation method of waverider shape based on the CVAE-GAN model provided by the present invention, the generalized characterization and controllable generation of the waverider shape can be realized. By performing multiple random samplings in the latent code space, a variety of target waverider shapes that meet the control conditions of the target waverider geometric characteristics can be obtained, thereby significantly improving the efficiency of the waverider shape layout optimization design; the method directly outputs the shape in a common digital analog format, and is easy to use and practical in engineering practice. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] Figure 1 A schematic diagram of a flow chart of a method for controllable generation of waverider shape based on a CVAE-GAN model provided by the present invention;
[0063] Figure 2 This is a schematic diagram of the principle of cone-guided waverider;
[0064] Figure 3 A diagram showing some samples of a class A waverider shape training data set provided by an embodiment of the present invention;
[0065] Figure 4 A schematic diagram of the geometric shape of a type B waverider provided in an embodiment of the present invention;
[0066] Figure 5 A diagram showing some samples of a training data set generated for a type B waverider shape disturbance provided by an embodiment of the present invention;
[0067] Figure 6 Schematic diagram of the CVAE-GAN model structure and training process provided by the present invention;
[0068] Figure 7 A display diagram of the appearance of a portion of the waverider generated by generalization after the CVAE-GAN model provided by the present invention is trained;
[0069] Figure 8 A diagram showing the control conditions of a waverider provided in an embodiment of the present invention;
[0070] Fig. 9 The embodiment of the present invention provides the basis Figure 8 The waverider control conditions are used to generate a waverider target appearance display diagram. DETAILED DESCRIPTION
[0071] In order to make the technical problems, technical solutions and beneficial effects solved by the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0072] In view of the shortcomings of the existing waverider shape optimization method, the present invention proposes a controllable generation method of waverider shape based on the CVAE-GAN model. By combining the conditional variational autoencoder (CVAE) and the generative adversarial network (GAN) model to form a CVAE-GAN fusion model, which is applied to the controllable generation of waverider shape, the target waverider that meets the control conditions of the target waverider geometric characteristics can be quickly generated, and the controllable generation of waverider shapes of different categories can be met, which provides a basis for the optimization design of the waverider shape and improves the efficiency of the optimization design of the waverider shape.
[0073] See also Figure 1 The present invention provides a method for controllable generation of waverider shape based on CVAE-GAN model, comprising the following steps:
[0074] Step 1: Given a set of waverider reference shapes, including L waverider reference shapes, they are expressed as: waverider reference shapes x1, x2, ..., x L ; Among them, each waverider body reference shape is represented by the waverider body shape surface point cloud data, and each surface point is specifically represented by coordinate form.
[0075] Step 2: Build a training dataset:
[0076] For each waverider reference shape x k , k=1,2,...,L, use CST, FFD and other parameterization methods to perturb it, and get k The waverider training shape set formed by waverider training shapes is expressed as:
[0077] Therefore, for L waverider reference shapes x1, x2, ..., x L , corresponding to L waverider training shape sets, which are then integrated to form a training data set X = [X1, X2, ..., X L ];
[0078] Step 3, constructing a CVAE-GAN model; the CVAE-GAN model includes an encoder, a decoder and a discriminator;
[0079] The CVAE-GAN model is a CVAE-GAN model built by combining the conditional variational autoencoder CVAE and the generative adversarial network GAN. As a specific structure, the encoder includes a three-layer convolutional network and a three-layer fully connected network in series; the decoder includes a three-layer fully connected network and a three-layer deconvolutional network in series; the discriminator includes a three-layer fully connected network.
[0080] Step 4: Use the training data set to train the CVAE-GAN model, and use the gradient descent algorithm to optimize the model parameters of the CVAE-GAN model to obtain the trained CVAE-GAN model. The specific training and optimization methods are as follows:
[0081] Step 4.1, dividing the training data set into a plurality of batches of training data subsets; selecting a plurality of waverider training shapes contained in each batch of training data subsets to form a waverider training shape subset x i , and at the same time determine the geometric characteristics control condition c of the waverider;
[0082] Step 4.2: Set the waverider training shape subset x i and the waverider geometric feature control condition c to form an input sample x, which is input to the encoder. The encoder calculates the variance σ and mean μ of the latent code z of each waverider training shape in the input sample x, thereby obtaining a Gaussian distribution N(μ, σ) according to the variance σ and mean μ of the latent code z, and the obtained Gaussian distribution N(μ, σ) is used as the latent code distribution q(z|x) of the latent code space;
[0083] Step 4.3, the decoder randomly samples the latent code distribution q(z|x) obtained by the encoder to obtain a latent code z;
[0084] Assume that the prior distribution p(z) of the latent code in the latent code space is a standard Gaussian distribution N(0, 1), sample the prior distribution p(z) to obtain the false latent code z′;
[0085] The decoder performs a decoding operation on the latent code z to obtain a true waverider shape x" corresponding to the waverider geometric characteristic control condition c;
[0086] The decoder performs a decoding operation on the pseudo latent code z′ to obtain a pseudo waverider shape x′;
[0087] Among them: the true waverider shape x" and the false waverider shape x' are both point cloud data of the waverider shape surface;
[0088] Step 4.4, the input sample x, the true waverider shape x", and the false waverider shape x' are input to the discriminator; the discriminator obtains the probability that the input sample x is judged to be true, the probability that the true waverider shape x" is judged to be true, and the probability that the false waverider shape x' is judged to be true;
[0089] Step 4.5, calculate the loss value of the loss function of the CVAE-GAN model; specifically, input each input sample x into the encoder, and then input the output of the encoder into the decoder, perform forward reasoning, and use the following loss functions to calculate the loss values respectively. In practical applications, the encoder, decoder, and discriminator can be represented as: encoder E, decoder G, and discriminator D, respectively.
[0090] In the present invention, the loss function of the CVAE-GAN model consists of three parts:
[0091] L Enc =L prior +L like
[0092] L Dnc =L like —L GAN
[0093] L Dis =L GAN
[0094] in:
[0095] L Enc represents the loss function of the encoder;
[0096] L prior Represents the KL divergence between the latent code distribution q(z|x) and the prior distribution p(z) in the encoder;
[0097] L like It represents the reconstruction error of the decoder under the condition of a given encoder inference result, that is, the latent code distribution q(z|x), which can be the mean square error (MSE) or the cross entropy loss.
[0098] L Dnc represents the loss function of the decoder;
[0099] L GAN Represents the discriminative loss of the discriminator;
[0100] L Dis represents the loss function of the discriminator.
[0101] In the above formula description:
[0102] The KL divergence between the latent distribution q(z|x) and the prior distribution p(z), denoted as D KL , obtained by the following formula:
[0103]
[0104] in:
[0105] J represents the dimension of the latent code z;
[0106] j represents the jth dimension of the latent code z;
[0107] σ j and μ j , respectively represent the variance and mean of the j-th dimension of the latent code z inferred by the encoder.
[0108] In the above formula description:
[0109] The discriminant loss L of the discriminator GAN Obtained by the following formula:
[0110] L GAN =log(Dis(x))+log(1-Dis(Dec(z′)))+log(1-Dis(Dec(Enc(x))))
[0111] in:
[0112] Dis(x) represents the probability that the discriminator judges the input sample x to be true;
[0113] Dis(Dec(z′)) represents the probability that the discriminator determines that the false waverider shape x′ is true;
[0114] Dis(Dec(Enc(x))) represents the probability that the discriminator judges the true waverider shape x" to be true.
[0115] Step 4.6, according to the loss value, respectively calculate the gradient of the model parameters of the encoder, the decoder and the discriminator, and use the gradient descent algorithm to back-propagate and update the parameter values of the model parameters;
[0116] Specifically, the following formula is used to calculate the gradient of the model parameters of the encoder, decoder and discriminator using the loss function obtained by inference, and the parameter values of the model parameters are updated by backpropagation using the gradient descent algorithm:
[0117]
[0118] in:
[0119] θ Enc ,θ Dec and θ Dis , respectively the model parameters of the encoder, decoder and discriminator;
[0120] Represents the gradient operation.
[0121] Step 4.7, return to step 4.1, and train the CVAE-GAN model in a loop until the model converges, thereby obtaining the trained CVAE-GAN model and latent code space;
[0122] Step 5: According to the design requirements, a latent code is randomly sampled in the latent code space, represented as z * , and the geometric characteristics control conditions of the target waverider c are given * ;
[0123] The potential code z * and the target waverider geometric characteristics control condition c * Input to the decoder, the decoder decodes the latent code z * Perform decoding operation to obtain the geometric characteristics control condition c of the target waverider * The corresponding true waverider target shape is the surface point cloud data of the waverider target shape, thereby realizing controllable waverider shape generation.
[0124] In the present invention, since it is assumed that the prior distribution p(z) of the latent code in the latent code space is the standard Gaussian distribution N(0, 1) when the CVAE-GAN model is trained, in the loss function of the training, the KL divergence measures the difference between the latent code distribution q(z|x) and the prior distribution p(z). Therefore, after the CVAE-GAN model is trained, the difference between the latent code distribution q(z|x) and the prior distribution p(z) becomes smaller and smaller. Therefore, the latent code distribution q(z|x) of the latent code space after the training is completed is very similar to the standard Gaussian distribution N(0, 1). Therefore, when sampling a latent code from the latent code space, in actual operation, it can also be directly sampled from the latent code space that conforms to the standard Gaussian distribution N(0, 1).
[0125] In the present invention, given the same target waverider geometric characteristic control condition c * When , multiple random sampling is performed from the latent code space. Each time a latent code is randomly sampled, the control condition c of the geometric characteristics of the target waverider is obtained. * The corresponding true waverider target shape; therefore, by performing multiple random sampling from the latent code space, the target waverider geometric feature control condition c is finally obtained. * Therefore, the present invention can improve the generation efficiency of the waverider target shape that meets the target waverider geometric feature control conditions.
[0126] Also includes:
[0127] Step 6: Store the surface point cloud data of the generated true waverider target shape in the CPACS standard universal data format and perform efficient data management, convert the surface point cloud data into common digital and analog formats such as IGS and STP, and realize the rapid conversion of the generated true waverider target shape into common digital and analog formats such as IGS and STP.
[0128] The present invention provides a controllable generation method of waverider shape based on CVAE-GAN model, which has the following advantages:
[0129] The generalized representation and controllable generation of waverider shapes can be achieved. By performing multiple random samplings in the latent code space, a variety of target waverider shapes that meet the control conditions of the target waverider geometric characteristics can be obtained, thereby significantly improving the efficiency of the waverider shape layout optimization design. This method directly outputs the shape in a common digital-analog format, and is easy to use and practical in engineering practice.
[0130] An example is listed below:
[0131] The embodiment of the present invention performs generalized characterization and controllable generation of two types of waverider reference shapes.
[0132] The reference shape of a type waverider is the analytically generated cone-guided waverider: Figure 2 As shown, a straight cone flow field is used as the reference flow field to generate a cone-guided waverider. For a given incoming flow Mach number and a cone shock wave angle input, the corresponding cone flow field can be obtained by solving the Taylor-Maccoll flow control equation. After the cone flow field is generated, the bottom profile of the upper surface is first customized, and the profile is projected in the opposite direction of the flow direction so that it intersects with the cone shock wave to form the leading edge line of the waverider. The leading edge line is discretized into a point cloud, and streamlines are traced in a two-dimensional plane from each point cloud to generate the lower surface of the waverider. Through the above steps, the point cloud contour of the waverider reference shape is obtained, and further formed by CAD software to obtain the digital model of the waverider reference shape. 5000 shapes are generated by spatial sampling at the incoming flow Mach number of 5 to 30 and the shock wave angle of 5° to 40°, and a waverider training shape set corresponding to the type a waverider reference shape is obtained, as shown in Figure 3 , showing some sample shapes in the training shape set formed by the class A waverider benchmark shape.
[0133] The B-type waverider reference shape is a designed waverider shape, and its geometric shape is as follows Figure 4 As shown. Based on this shape, the FFD parameterization method is used to deform it and generate a large number of different layout shapes. Constrained-FFD is used in the deformation process to prevent the generation of unreasonable shapes. 5000 shapes are generated by perturbation. Figure 5 Some sample shapes in the waverider training shape set formed by the class B waverider benchmark shape are shown.
[0134] Build a CVAE-GAN model; input a total of 10,000 waverider training shape data formed by the two types of waverider benchmark shapes a and b into the CVAE-GAN model in batches for training. The CVAE-GAN model structure and training process are as follows Figure 6 shown.
[0135] After training, the CVAE-GAN model has the ability to generalize and generate. Figure 7 The generalized waverider shape generated after the model training is completed is shown. The present invention can quickly obtain the corresponding target waverider shape by changing the target waverider geometric feature control conditions.
[0136] After training, the CVAE-GAN model has controllable generation capabilities. Figure 8 To control the geometric characteristics of the waverider, it is stipulated that the plane shape of the generated waverider should be similar to Figure 8 The parabolic family shape shown in Figure 8 In the figure, there are five parabolas, one parabola represents a control condition of the geometric characteristics of the waverider; Fig. 9 Shown in Figure 8 The corresponding target waverider shape is generated under the control conditions, that is, for each waverider geometric characteristic control condition, a corresponding target waverider shape is generated.
[0137] In summary, the present invention discloses a controllable generation method of waverider shape based on the CVAE-GAN model, which can realize the generalized characterization and controllable generation of waverider shape. By performing multiple random samplings in the latent code space, a variety of target waverider shapes that meet the control conditions of the target waverider geometric characteristics can be obtained, thereby significantly improving the efficiency of waverider shape layout optimization design. The method directly outputs the shape in a common digital-analog format, and is easy to use and practical in engineering practice.
[0138] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be considered as the scope of protection of the present invention.
Claims
1. A controllable generation method of waverider shape based on CVAE-GAN model, characterized in that: The following steps are involved: Step 1: Given a set of waverider reference shapes, including L waverider reference shapes, they are expressed as: waverider reference shapes x1, x2, ..., x L ; Wherein, each waverider body reference shape is represented by the waverider body shape surface point cloud data; Step 2: Build a training dataset: For each waverider reference shape x k , k=1,2,...,L, use parameterization method to perturb it, and get k The waverider training shape set formed by waverider training shapes is expressed as: Therefore, for L waverider reference shapes x1, x2, ..., x L , corresponding to L waverider training shape sets, which are then integrated to form a training data set X = [X1, X2, ..., X L ]; Step 3, constructing a CVAE-GAN model; the CVAE-GAN model includes an encoder, a decoder and a discriminator; Step 4: Use the training data set to train the CVAE-GAN model, and use the gradient descent algorithm to optimize the model parameters of the CVAE-GAN model to obtain the trained CVAE-GAN model. The specific training and optimization methods are as follows: Step 4.1, dividing the training data set into a plurality of batches of training data subsets; selecting a plurality of waverider training shapes contained in each batch of training data subsets to form a waverider training shape subset x i , and at the same time determine the geometric characteristics control condition c of the waverider; Step 4.2: Set the waverider training shape subset x i and the waverider geometric feature control condition c to form an input sample x, which is input to the encoder. The encoder calculates the variance σ and mean μ of the latent code z of each waverider training shape in the input sample x, thereby obtaining a Gaussian distribution N(μ, σ) according to the variance σ and mean μ of the latent code z, and the obtained Gaussian distribution N(μ, σ) is used as the latent code distribution q(z|x) of the latent code space; Step 4.3, the decoder randomly samples the latent code distribution q(z|x) obtained by the encoder to obtain a latent code z; Assume that the prior distribution p(z) of the latent code in the latent code space is a standard Gaussian distribution N(0, 1), sample the prior distribution p(z) to obtain the false latent code z′; The decoder performs a decoding operation on the latent code z to obtain a true waverider shape x" corresponding to the waverider geometric characteristic control condition c; The decoder performs a decoding operation on the pseudo latent code z′ to obtain a pseudo waverider shape x′; Among them: the true waverider shape x" and the false waverider shape x' are both point cloud data of the waverider shape surface; Step 4.4, the input sample x, the true waverider shape x", and the false waverider shape x' are input to the discriminator; the discriminator obtains the probability that the input sample x is judged to be true, the probability that the true waverider shape x" is judged to be true, and the probability that the false waverider shape x' is judged to be true; Step 4.5, calculating the loss value of the loss function of the CVAE-GAN model; Step 4.6, according to the loss value, respectively calculate the gradient of the model parameters of the encoder, the decoder and the discriminator, and use the gradient descent algorithm to back-propagate and update the parameter values of the model parameters; Step 4.7, return to step 4.1, and train the CVAE-GAN model in a loop until the model converges, thereby obtaining the trained CVAE-GAN model and latent code space; Step 5: According to the design requirements, a latent code is randomly sampled in the latent code space, represented as z * , and the geometric characteristics control conditions of the target waverider c are given * ; The potential code z * and the target waverider geometric characteristics control condition c * Input to the decoder, the decoder decodes the latent code z * Perform decoding operation to obtain the geometric characteristics control condition c of the target waverider * The corresponding true waverider target shape is the surface point cloud data of the waverider target shape, thereby realizing controllable waverider shape generation.
2. According to the method for controllable generation of waverider shape based on CVAE-GAN model in claim 1, it is characterized in that: The encoder includes a three-layer convolutional network and a three-layer fully connected network connected in series; the decoder includes a three-layer fully connected network and a three-layer deconvolutional network connected in series; and the discriminator includes a three-layer fully connected network.
3. The method for controllable generation of waverider shape based on CVAE-GAN model according to claim 1, characterized in that: In step 4.5, the loss function of the CVAE-GAN model is: L Ene =L prior +L llike L Dne =L llike -L GAN L Dis =L GAN in: L Enc represents the loss function of the encoder; L prior Represents the KL divergence between the latent code distribution q(z|x) and the prior distribution p(z) in the encoder; L llike represents the reconstruction error of the decoder given the encoder inference result, that is, the latent code distribution q(z|x); L Dnc represents the loss function of the decoder; L GAN Represents the discriminative loss of the discriminator; L Dis represents the loss function of the discriminator.
4. The method for controllable generation of waverider shape based on CVAE-GAN model according to claim 3 is characterized in that: The KL divergence between the latent distribution q(z|x) and the prior distribution p(z), denoted as D KL , obtained by the following formula: in: J represents the dimension of the latent code z; j represents the jth dimension of the latent code z; σ j and μ j , respectively represent the variance and mean of the j-th dimension of the latent code z inferred by the encoder.
5. The method for controllable generation of waverider shape based on CVAE-GAN model according to claim 3, characterized in that: The discriminant loss L of the discriminator GAN Obtained by the following formula: L GAN =log(Dis(x))+log(1-Dis(Dec(z')))+log(1-Dis(Dec(Enc(x)))) in: Dis(x) represents the probability that the discriminator judges the input sample x to be true; Dis(Dec(z′)) represents the probability that the discriminator determines that the false waverider shape x′ is true; Dis(Dec)Emc)x))) represents the probability that the discriminator judges the true waverider shape x" to be true.
6. The method for controllable generation of waverider shape based on CVAE-GAN model according to claim 3, characterized in that: Step 4.6 is as follows: The following formula is used to calculate the gradient of the loss function obtained by inference on the model parameters of the encoder, decoder and discriminator respectively, and the parameter values of the model parameters are updated by backpropagation using the gradient descent algorithm: in: θ Enc ,θ Dec and θ Dis , respectively the model parameters of the encoder, decoder and discriminator; Represents the gradient operation.
7. The method for controllable generation of waverider shape based on CVAE-GAN model according to claim 3, characterized in that: Also includes: Step 6: Store the generated surface point cloud data of the true waverider target shape in the CPACS standard universal data format and perform efficient data management, and convert the surface point cloud data into IGS and STP digital model formats.
8. The method for controllable generation of waverider shape based on CVAE-GAN model according to claim 1, characterized in that: Also includes: Given the same target waverider geometric characteristic control condition c*, multiple random samplings are performed from the latent code space. Each time a latent code is randomly sampled, the corresponding latent code is obtained. * The corresponding true waverider target shape; therefore, by performing multiple random sampling from the latent code space, the target waverider geometric feature control condition c is finally obtained. * Multiple true waverider target shapes.
Citation Information
Patent Citations
Multi-design space coupling aerodynamic shape optimization method and system based on Info-GAN
CN114756980A
Unmanned aerial vehicle sensor zero sample fault detection method based on CVAE-GAN model
CN117034020A