A reverse modeling method for microwave coupled filters
Through the dual-channel conditional diffusion model sampling and clustering in the coupling matrix space, the non-uniqueness problem in the reverse modeling of microwave coupled filters is solved, and high-precision coupling matrix parameter extraction is achieved, which improves design efficiency and automation level.
Patent Information
- Application Number
- CN202510644200.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-19
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2045-05-19
AI Technical Summary
In the prior art, the reverse modeling of microwave coupled filters has non-unique problems, making it difficult to achieve high-precision coupling matrix parameter extraction, and requires additional prior knowledge or manual intervention, which cannot be fully automated.
The dual-channel conditional diffusion model is adopted to construct sample sets and condition sets by sampling in the coupling matrix space, and the diffusion model is used to learn the mapping relationship between coupling parameters and S parameters. Multiple groups of candidate coupling parameters are generated through the stepwise noise addition and denoising process, and high-precision coupling parameters are screened out through clustering.
It effectively solves the multi-solution problems in reverse modeling, improves design efficiency and accuracy, realizes fully automated coupling matrix parameter extraction, and significantly improves the design and optimization capabilities of microwave filters.
Smart Images

Figure CN120180933B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of filter modeling, and in particular to a method for inverse modeling of a microwave coupled filter. Background Art
[0002] Microwave coupled filters are typically modeled using forward modeling, which takes physical or geometric variables as input and outputs the corresponding electrical response. Several forward modeling techniques have been developed, improving filter design efficiency by avoiding repetitive electromagnetic simulations.
[0003] However, inverse modeling, which uses the filter's S parameters as input and outputs the corresponding coupling matrix parameters, enabling the design and manufacture of filters with specific electrical properties, has gained increasing attention and development. Tuning is essential for practical filters, and the coupling matrix, as a navigation model, plays a key role in optimization techniques such as spatial mapping. Therefore, accurately solving the inverse problem (i.e., extracting the coupling matrix) is of great significance.
[0004] In existing technologies, the main challenge of inverse modeling is the lack of a clear one-to-one mapping relationship, which cannot be directly solved by analytical methods. Common methods are mainly divided into the following two categories.
[0005] The first type of method relies on numerical optimization techniques, such as the Cauchy method, vector fitting, and global optimization algorithms. These methods usually require multiple iterations and are particularly complex in the case of high-dimensional variables. Direct global optimization is not only time-consuming, but also difficult to quickly find the optimal solution. In addition, there is also the problem of non-uniqueness. Non-uniqueness means that the same or similar input S parameters may correspond to multiple contradictory output coupling matrices, which leads to large model training errors and the accuracy is difficult to meet actual needs.
[0006] The second type of method is based on deep learning. Through data generation and network training, it uses neural networks to approximate complex nonlinear multidimensional functions and applies artificial neural networks (ANN) to inverse modeling of filters. However, there is also a non-uniqueness problem, and it is difficult to obtain a high-precision inverse model by directly using neural networks.
[0007] To address the issue of non-uniqueness, some studies have proposed methods based on data grouping and model combination. For example, by partitioning the data to eliminate contradictory samples, multiple sub-models can be constructed and then combined. Furthermore, multi-valued neural networks use special training error functions to handle contradictory samples, enabling multiple solutions in inverse modeling. However, these methods often require additional prior knowledge or manual intervention, making them difficult to fully automate. Summary of the Invention
[0008] Based on this, it is necessary to provide a reverse modeling method for microwave coupling filters to address the above technical problems, which can realize the reverse modeling of microwave coupling filters and solve the non-uniqueness problem existing in the existing technology without the need for additional prior knowledge or manual intervention, and achieve full automation.
[0009] A method for inverse modeling of a microwave coupled filter, comprising:
[0010] Obtain the design objectives of the microwave coupled filter and define the ideal coupling matrix;
[0011] According to the ideal coupling matrix, a coupling matrix space is set, and sampling is performed in the coupling matrix space to obtain multiple coupling matrix samples to construct a sample set; the S parameter of each coupling matrix sample at the set frequency point is calculated to construct a condition set;
[0012] The sample set and the condition set are used as inputs of the diffusion model, and the diffusion model is trained to learn the mapping relationship between the coupling parameters and the S parameters, thereby obtaining a trained diffusion model.
[0013] Obtain target S parameters and input the target S parameters into the trained diffusion model multiple times to obtain multiple model outputs corresponding to the target S parameters; obtain multiple sets of initial coupling parameters based on the multiple model outputs;
[0014] Each set of initial coupling parameters is input into the forward model to obtain the corresponding S parameters of each set of initial coupling parameters; the mean square error between the target S parameters and the corresponding S parameters is calculated, and the results are screened according to the set threshold to obtain multiple sets of optimal coupling parameters;
[0015] Multiple groups of optimal coupling parameters are clustered, and the coupling parameter distribution is obtained according to the optimal coupling parameter with the smallest mean square error in each cluster to achieve inverse modeling of the microwave coupling filter.
[0016] In one embodiment, a coupling matrix space is set according to an ideal coupling matrix, and sampling is performed in the coupling matrix space to obtain a plurality of coupling matrix samples to construct a sample set, including:
[0017] Setting a tolerance range for each variable in the ideal coupling matrix to obtain the variable value space as the coupling matrix space;
[0018] Latin hypercube sampling is performed in the coupling matrix space, and a set of sampled coupling parameters is used as a sample to obtain multiple coupling matrix samples;
[0019] A sample set is constructed according to a plurality of coupling matrix samples.
[0020] In one embodiment, the S parameters of each coupling matrix sample at a set frequency point are calculated to construct a condition set, including:
[0021] Obtain the design objectives of the microwave coupled filter and define the frequency range and number of sampling points;
[0022] Generate a frequency point set according to the frequency range and the number of sampling points to obtain the set frequency point;
[0023] Calculating the normalized frequency variable of each coupling matrix sample at a set frequency point, and obtaining the S parameter of each coupling matrix sample at the set frequency point based on the coupling matrix sample and the normalized frequency variable;
[0024] Convert the S parameters into dB format to obtain the condition set.
[0025] In one embodiment, obtaining the S parameter of each coupling matrix sample at a set frequency point based on the coupling matrix samples and the normalized frequency variable includes:
[0026] Based on the coupling matrix samples and the normalized frequency variables, a transition matrix is constructed;
[0027] According to the transition matrix and different unit vectors, two linear equations are constructed and solved to obtain two transition parameters;
[0028] According to the two transition parameters, the S parameters of the coupling matrix sample at the set frequency point are obtained.
[0029] In one embodiment, a frequency point set is generated according to the frequency range and the number of sampling points to obtain a set frequency point, including:
[0030] Generate a frequency point set based on the frequency range and number of sampling points:
[0031] ;
[0032] in,
[0033] ;
[0034] Where, is the frequency point set, is the minimum value of the frequency range, is the maximum value of the frequency range, is the step length, For the frequency points, is the number of sampling points;
[0035] According to the frequency point set, the set frequency point is obtained.
[0036] In one embodiment, the sample set and the condition set are used as inputs of the diffusion model, and the diffusion model is trained to learn the mapping relationship between the coupling parameters and the S parameters, thereby obtaining a trained diffusion model, including:
[0037] Add noise to each set of coupling parameters in the sample set to generate noise-added parameters;
[0038] The noise parameters, S parameters in the condition set, and time steps are input into the diffusion model, and the diffusion model is trained. The training goal is to predict the added noise and minimize the mean square error between the predicted noise and the true noise, so as to learn the mapping relationship between the coupling parameters and the S parameters, so that the diffusion model can accurately predict the noise under different conditions and time steps, and obtain a trained diffusion model.
[0039] In one embodiment, multiple sets of initial coupling parameters are obtained based on multiple model outputs, including:
[0040] The model output is the predicted noise, with standard Gaussian noise as the initial noise;
[0041] According to the predicted noise and the initial noise, the intermediate state of each time step is calculated, and the conditional reverse generation is performed multiple times to map the added noise back to the coupling parameters through step-by-step denoising to obtain a set of initial coupling parameters.
[0042] In one embodiment, the noise parameters of the intermediate state at each time step are calculated based on the predicted noise and the initial noise, including:
[0043] ;
[0044] in,
[0045] ;
[0046] ;
[0047] Where, is the time step The noise parameter, is the time step The noise parameter, is the time step, For each time step, the noise weight is is the accumulation of noise weight, is the time step count, is the predicted noise output by the diffusion model, is the diffusion model, is the S parameter in the condition set, is the time step The noise term in , Used to add random noise to the intermediate states.
[0048] In one embodiment, each set of initial coupling parameters is input into the forward model to obtain the corresponding S parameters of each set of initial coupling parameters; the mean square error between the target S parameters and the corresponding S parameters is calculated, and the parameters are screened according to a set threshold to obtain multiple sets of preferred coupling parameters, including:
[0049] Input each set of initial coupling parameters into the forward model, calculate the frequency response of the filter, and obtain the corresponding S parameters of each set of initial coupling parameters;
[0050] Calculate the mean square error between the target S parameter and the corresponding S parameter;
[0051] Multiple groups of initial coupling parameters with mean square errors less than a set threshold are screened as preferred coupling parameters.
[0052] In one embodiment, the coupling parameter distribution is obtained based on the preferred coupling parameter with the minimum mean square error in each cluster, including:
[0053] The optimal coupling parameter with the smallest mean square error in each cluster is used as the coupling parameter of the cluster;
[0054] The set of coupling parameters of all clusters is used as the coupling parameter distribution.
[0055] The inverse modeling method of the microwave coupled filter is based on a dual-channel conditional diffusion model. It generates an ideal coupling matrix through conditions and performs parameter space sampling within a set tolerance range. In the sampling stage, the model generates the corresponding coupling matrix parameter distribution multiple times by inputting the same S parameter and noise with different distributions, and constructs a sample set of coupling parameters and corresponding S parameters. The sample set is input into the diffusion model for training, so that the model learns the mapping relationship between S parameters and coupling parameters. During the training process, the model uses the S parameter as a conditional input and applies progressive noise to the coupling matrix parameters. The error of the predicted noise is used to capture the non-uniqueness characteristics of the inverse problem. For the target S parameter, multiple sets of candidate coupling parameters are generated through multiple predictions. The forward model is used to calculate the actual S parameter corresponding to the predicted parameter, and the mean square error is used to screen out the data set with an error less than a set threshold. The screened parameter set is clustered in high-dimensional space, and the parameter with the smallest mean square error, i.e., the high-precision parameter, in each cluster is extracted, thereby achieving accurate modeling of the coupling matrix parameters under the target S parameter.
[0056] This method effectively utilizes the generation capability of the diffusion model, avoids the complex manual grouping and optimization process in traditional methods, significantly improves the automation level of inverse modeling, effectively solves the multi-solution problem, i.e., the non-uniqueness problem, in the inverse modeling of traditional microwave coupled filters, and improves design efficiency and accuracy. It can quickly and accurately extract coupling matrix parameters, providing an efficient and reliable solution for the design and optimization of microwave filters. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 1 is a flow chart of a method for inverse modeling of a microwave coupled filter in one embodiment;
[0058] Figure 2 A graph showing a changing trend of a loss function curve during training in a specific embodiment;
[0059] Figure 3 is a target S parameter curve diagram in a specific embodiment;
[0060] Figure 4 Schematic diagram showing the comparison between the target curve and the actual curve of the predicted S11 parameter of sample 1 in a specific embodiment;
[0061] Figure 5 Schematic diagram showing the comparison between the target curve and the actual curve of the predicted S11 parameter of sample 2 in a specific embodiment;
[0062] Figure 6 Schematic diagram showing the comparison between the target curve and the actual curve of the predicted S11 parameter of sample 3 in a specific embodiment;
[0063] Figure 7 Schematic diagram showing the comparison between the target curve and the actual curve for predicting the S21 parameter of sample 1 in a specific embodiment;
[0064] Figure 8 Schematic diagram showing the comparison between the target curve and the actual curve for predicting the S21 parameter of sample 2 in a specific embodiment;
[0065] Figure 9 Schematic diagram showing the comparison between the target curve and the actual curve for predicting the S21 parameter of sample 3 in a specific embodiment;
[0066] Figure 10 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0067] In order to make the purpose, technical solutions and advantages of this application more clearly understood, the present application is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely for explaining this application and are not intended to limit this application. All other embodiments obtained by persons of ordinary skill in the art based on the embodiments in this application without creative work are within the scope of protection of this application.
[0068] In addition, the terms "first," "second," and so on, used in this application are for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, features specified as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of this application, "multiple groups" means at least two groups, such as two groups, three groups, and so on, unless otherwise specifically defined.
[0069] In this application, unless otherwise specified or limited, the terms "connect," "fix," etc. should be understood in a broad sense. For example, "fix" can mean a fixed connection, a detachable connection, or an integral connection; it can mean a mechanical connection, an electrical connection, a physical connection, or a wireless communication connection; it can mean a direct connection or an indirect connection through an intermediate medium; it can mean internal communication between two elements or an interaction between two elements, unless otherwise specified. Those skilled in the art will understand the specific meanings of the above terms in this application based on the specific circumstances.
[0070] In addition, the technical solutions between the various embodiments of the present application can be combined with each other, but it must be based on the fact that ordinary technicians in this field can implement it. When the combination of technical solutions is mutually contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by this application.
[0071] This application provides a method for inverse modeling of a microwave coupled filter, such as Figure 1 The flowchart shown, in one embodiment, includes:
[0072] Step 101: Obtain a design goal of a microwave coupling filter and define an ideal coupling matrix.
[0073] In this step, a coupling matrix includes a set of coupling parameters, and each coupling parameter is a variable in the coupling matrix.
[0074] As for how to define an ideal coupling matrix based on the design goal of the microwave coupling filter, it belongs to the existing technology and will not be described in detail here.
[0075] Step 102: According to the ideal coupling matrix, a coupling matrix space is set, and sampling is performed in the coupling matrix space to obtain multiple coupling matrix samples to construct a sample set; the S parameter of each coupling matrix sample at the set frequency point is calculated to construct a condition set.
[0076] Specifically:
[0077] A tolerance range is set for each variable in the ideal coupling matrix to obtain the variable value space, which is used as the coupling matrix space; Latin hypercube sampling is performed in the coupling matrix space, and a set of sampled coupling parameters is used as a sample to obtain multiple coupling matrix samples; a sample set is constructed based on the multiple coupling matrix samples;
[0078] Obtain the design objectives of the microwave coupling filter and define the frequency range and number of sampling points. Generate a frequency point set based on the frequency range and number of sampling points to obtain a set frequency point. Calculate the normalized frequency variable of each coupling matrix sample at the set frequency point, and obtain the S-parameters of each coupling matrix sample at the set frequency point based on the coupling matrix samples and the normalized frequency variable. Convert the S-parameters to dB format to obtain a condition set.
[0079] More specifically:
[0080] Ideal coupling matrix for:
[0081] .
[0082] The ideal coupling matrix has symmetry, and each variable in the ideal coupling matrix is Setting tolerance range , and obtain the high-dimensional value space of the variable , as the coupling matrix space;
[0083] Latin hypercube sampling is performed in the coupling matrix space, and a set of sampled coupling parameters is used as a sample to obtain multiple (N) coupling matrix samples ;Construct a sample set based on multiple coupling matrix samples;
[0084] Obtain the design objectives of the microwave coupled filter and define the frequency range and number of sampling points;
[0085] Generate a frequency point set based on the frequency range and number of sampling points:
[0086] ;
[0087] in,
[0088] ;
[0089] Where, is the frequency point set, is the minimum value of the frequency range, is the maximum value of the frequency range, that is, the frequency range is expressed as ; is the step length, For the frequency points, is the number of sampling points;
[0090] According to the frequency point set, the set frequency point is obtained;
[0091] Calculate each coupling matrix sample Normalized frequency variable at a set frequency point:
[0092] ;
[0093] Where, is the normalized frequency variable, is the center frequency of the filter, is the normalized bandwidth;
[0094] Construct the transition matrix based on the coupling matrix samples and the normalized frequency variables:
[0095] ;
[0096] in,
[0097] ;
[0098] Where, is the transition matrix, is the coupling matrix sample, is the identity matrix, is the port matching matrix, is the imaginary unit, is the loss term, is the normalized quality factor, which represents the energy loss characteristics of the system;
[0099] According to the transition matrix and different unit vectors, two linear equations are constructed and solved to obtain two transition parameters:
[0100] ;
[0101] Where, and are two different transition parameters, and are two different unit vectors;
[0102] According to the two transition parameters, the S parameters of the coupling matrix sample at the set frequency point are obtained:
[0103] ;
[0104] ;
[0105] Where, for parameter, is the output amplitude at the exit of port 1, for parameter, is the output amplitude at the exit of port 2;
[0106] Convert the S parameters to dB format and get the condition set:
[0107]
[0108] ;
[0109] Where, In dB format parameter, In dB format parameter.
[0110] In this step, the ideal coupling matrix is perturbed to obtain the corresponding S parameters.
[0111] How to set tolerance ranges for variables and Latin Hypercube Sampling (LHS) are both existing technologies.
[0112] The number of coupling matrix samples can be determined according to actual needs and is not limited here. For example, 60,000 coupling matrix samples are obtained by sampling.
[0113] Step 103 : Using the sample set and the condition set as inputs of the diffusion model, the diffusion model is trained to learn the mapping relationship between the coupling parameters and the S parameters, thereby obtaining a trained diffusion model.
[0114] Specifically:
[0115] Add noise to each set of coupling parameters in the sample set to generate noise-added parameters;
[0116] The noise parameters, S parameters in the condition set, and time steps are input into the diffusion model, and the diffusion model is trained. The training goal is to predict the added noise and minimize the mean square error between the predicted noise and the true noise, so as to learn the mapping relationship between the coupling parameters and the S parameters, so that the diffusion model can accurately predict the noise under different conditions and time steps, and obtain a trained diffusion model.
[0117] More specifically:
[0118] Gaussian noise is added to each set of coupling parameters in the sample set to generate noise parameters. Through this forward diffusion process, the Transformed into data close to a standard normal distribution:
[0119] ;
[0120] Where, is the time step The noise parameter, is the coupling parameter (the coupling parameter without adding noise), For the time step The associated noise weight controls the intensity of the noise over time; is Gaussian noise;
[0121] The noise parameters, S parameters in the condition set, and time steps are input into the diffusion model to achieve conditional generation:
[0122] ;
[0123] Where, is the predicted noise output by the diffusion model; is a diffusion model; is the time step Noise parameters; Provide model condition constraints for the S parameters in the condition set; is the time step, which is used to guide the model to learn the characteristics of different diffusion stages;
[0124] The diffusion model is trained to predict the added noise And minimize the mean squared error between the predicted noise and the true noise:
[0125] ;
[0126] Where, is the loss function of mean square error, is the average loss under the current random variable distribution;
[0127] By continuously optimizing the model parameters , in order to learn the mapping relationship between coupling parameters and S parameters, so that the diffusion model can accurately predict different conditions and time steps The noise under the condition of noise is detected, so as to grasp the distribution characteristics of the noisy data and obtain a trained diffusion model.
[0128] In this step, the diffusion model may adopt a dual-channel conditional diffusion model so that the trained diffusion model has stronger fitting ability and better performance.
[0129] Step 104 , obtaining target S parameters, and inputting the target S parameters into the trained diffusion model multiple times to obtain multiple model outputs corresponding to the target S parameters; and obtaining multiple sets of initial coupling parameters based on the multiple model outputs.
[0130] Specifically:
[0131] Obtaining target S parameters. The specific method of obtaining them is an existing technology. For example, the data set includes a training set and a validation set. The training set is used for training, and the validation set is used for validation. The target S parameters are randomly selected from the validation set.
[0132] Input the target S parameters into the trained diffusion model multiple times to obtain multiple model outputs corresponding to the target S parameters;
[0133] The model output is the prediction noise, which is a standard Gaussian noise is the initial noise, that is, the reverse generation process starts with standard Gaussian noise, where T represents the time step of the diffusion process, and the initialization is completely random Gaussian noise;
[0134] Based on the predicted noise and initial noise, calculate the noise parameters of the intermediate state at each time step:
[0135] ;
[0136] in,
[0137] ;
[0138] ;
[0139] Where, is the time step The noise parameter, which is also the noise parameter of the intermediate state, can be restored to the coupling parameter without noise through step-by-step iteration. ; is the time step Noise parameters; is the time step, For the time step The associated noise weight, that is, the noise weight at each time step, is the accumulation of noise weight, is the time step count, is the prediction noise output by the diffusion model, is the diffusion model, is the S parameter in the condition set, is the time step The noise term in , Used to add random noise to the intermediate state to prevent the model from deterministically converging to a single state;
[0140] Calculate the intermediate state of each time step, perform the conditional reverse generation process and execute it multiple times (such as 20 times), each time generating a coupling matrix parameter sample to map the added noise back to the coupling parameter through step-by-step denoising , thereby capturing the multi-solution characteristics and obtaining a set of initial coupling parameters:
[0141] ;
[0142] Where, is the first set of coupling parameters predicted, is the second set of coupling parameters predicted, is the predicted Nth set of coupling parameters.
[0143] In this step, the target S parameters are input into the trained diffusion model as conditional data, and the corresponding coupling parameters are gradually predicted by utilizing the reverse generation capability of the diffusion model.
[0144] The target S parameters are input into the trained diffusion model to obtain a model output corresponding to the target S parameters and a set of initial coupling parameters; if multiple inputs are made, multiple sets of initial coupling parameters are obtained.
[0145] In step 105 , each set of initial coupling parameters is input into the forward model to obtain the corresponding S parameters of each set of initial coupling parameters; the mean square error between the target S parameters and the corresponding S parameters is calculated, and the results are screened according to a set threshold to obtain multiple sets of preferred coupling parameters.
[0146] Specifically:
[0147] Input each set of initial coupling parameters into the forward model, calculate the frequency response of the filter, and obtain the corresponding S parameters of each set of initial coupling parameters;
[0148] Calculate the mean square error between the target S parameter and the corresponding S parameter:
[0149] ;
[0150] Where, is the mean square error, is the total number of frequency points, is the corresponding S parameter (also the actual S parameter), is the target S parameter, is a set of frequency points;
[0151] Filter multiple sets of initial coupling parameters whose mean square error is less than a set threshold (such as 0.1) as the preferred coupling parameters:
[0152]
[0153] Where, is the optimal coupling parameter.
[0154] In this step, the results are screened to retain coupling parameters that closely match the target S parameters and remove data that do not meet the design requirements.
[0155] As for the forward model, it belongs to the existing technology and will not be described in detail here.
[0156] Step 106 , clustering the multiple groups of preferred coupling parameters, and obtaining a coupling parameter distribution based on the preferred coupling parameter with the smallest mean square error in each cluster, so as to achieve inverse modeling of the microwave coupling filter.
[0157] Specifically:
[0158] Perform high-dimensional space clustering on multiple sets of optimal coupling parameters to obtain multiple clusters, each cluster representing a similar distribution in the parameter space, so as to find all different possibilities through clustering;
[0159] Assume the clustering result is ,in For the clusters; for each cluster The optimal coupling parameter with the smallest mean square error is used as the coupling parameter for this cluster:
[0160] ;
[0161] Where, is the coupling parameter of clustering;
[0162] The set of coupling parameters of all clusters is used as the coupling parameter distribution under the target S parameter:
[0163] ;
[0164] This enables the inverse modeling of microwave coupled filters.
[0165] In this step, clustering belongs to the existing technology.
[0166] The inverse modeling method of the microwave coupled filter is based on a dual-channel conditional diffusion model. It generates an ideal coupling matrix through conditions and performs parameter space sampling within a set tolerance range. In the sampling stage, the model generates the corresponding coupling matrix parameter distribution multiple times by inputting the same S parameter and noise with different distributions, and constructs a sample set of coupling parameters and corresponding S parameters. The sample set is input into the diffusion model for training, so that the model learns the mapping relationship between S parameters and coupling parameters. During the training process, the model uses the S parameter as a conditional input and applies progressive noise to the coupling matrix parameters. The error of the predicted noise is used to capture the non-uniqueness characteristics of the inverse problem. For the target S parameter, multiple sets of candidate coupling parameters are generated through multiple predictions. The forward model is used to calculate the actual S parameter corresponding to the predicted parameter, and the mean square error is used to screen out the data set with an error less than a set threshold. The screened parameter set is clustered in high-dimensional space, and the parameter with the smallest mean square error, i.e., the high-precision parameter, in each cluster is extracted, thereby achieving accurate modeling of the coupling matrix parameters under the target S parameter.
[0167] This method effectively utilizes the generation capability of the diffusion model, avoids the complex manual grouping and optimization process in traditional methods, significantly improves the automation level of inverse modeling, effectively solves the multi-solution problem, i.e., the non-uniqueness problem, in the inverse modeling of traditional microwave coupled filters, and improves design efficiency and accuracy. It can quickly and accurately extract coupling matrix parameters, providing an efficient and reliable solution for the design and optimization of microwave filters.
[0168] It is important to note that this application applies the diffusion model to inverse modeling of microwave filters. The key is to transform the nonlinear relationship between electrical parameters (S parameters) and geometric parameters during the training phase into a nonlinear relationship between the electrical parameters as conditional information and the noisy and denoised geometric parameters. Through this transformation, the diffusion model not only learns how to model the relationship between electrical and geometric parameters but also effectively captures this complex nonlinear mapping through the noise perturbation process. The diffusion model is divided into three main phases: forward diffusion, model training, model prediction, and inverse generation. In the forward diffusion phase, noise is gradually added to the geometric parameters, ultimately transforming them into noise samples with a near-Gaussian distribution. In the model training phase, the diffusion model learns how to guide the noise removal process based on the electrical parameters by minimizing the error between the predicted noise and the actual noise. In the model prediction and inverse generation phases, geometric parameters that match the electrical parameters are recovered from the noise through a step-by-step denoising process. Multiple solutions are generated through multiple inverse generation cycles, effectively addressing the non-uniqueness issue in inverse modeling.
[0169] It should be understood that although Figure 1The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. In addition, Figure 1 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0170] In a specific embodiment, according to the filter design objectives, an ideal coupling matrix is defined as a benchmark. The specific indicators of the filter are a center frequency of 1.75 GHz, a bandwidth of 100 MHz, and a return loss of 20 dB. Its fourth-order ideal coupling matrix is:
[0171] .
[0172] Set the coupling matrix space and the tolerance range of each coupling parameter to ±0.8, where:
[0173] ;
[0174] ;
[0175] .
[0176] Based on this space, 60,000 coupling matrix samples are uniformly selected using Latin hypercube sampling (LHS) to construct a sample set. The frequency range is set to ±10% of the center frequency (i.e., 1.575 GHz to 1.925 GHz), the number of frequency sampling points is 20, and the S of each sample is calculated using the filter state equation. 11 Parameters and S 21 Parameters, convert them into dB format, and build a condition set.
[0177] The sample set and the corresponding condition set are input into the diffusion model for training, and the original coupling parameters are Add Gaussian noise to generate noise parameters , and the noise parameters , S parameters in the condition set and time step Jointly input the diffusion model to minimize the prediction noise of the diffusion model output With real noise The mean square error As the goal, optimize the model parameters and establish the inverse mapping relationship between S parameters and coupling parameters. The trend of the loss function curve during training is shown in the figure below. Figure 2 As shown, it can be seen that the model is constantly converging and can more accurately learn "under a given time step t and conditional information (such as S11, S21), the coupling coefficient is from X0 to X t That is, the model has captured the noise evolution law in the diffusion process and can establish an effective mapping relationship between the input data and its corresponding noise.
[0178] like Figure 3 The target S parameter curve shown in the figure is the target S parameter (including 20 frequency points) and response curve) as conditional information , combined with the time step The noise attenuation weight coefficient , input the trained diffusion model. The model starts with the initial Gaussian noise Departure, based on conditional information and time steps , through step-by-step iteration, the random noise is mapped to the coupling matrix parameter space that meets the target S parameter constraints. After performing 20 independent predictions, 20 sets of coupling matrix parameters are generated. .
[0179] Based on the generated 20 sets of coupling matrix parameters, the actual S parameters of each set of parameters are calculated frequency by frequency point. and By comparing with the target S parameter and Compare and calculate the mean square error:
[0180] .
[0181] Filter out The coupling matrix parameters of the , eliminating the samples with excessive errors, and finally forming a valid parameter set For subsequent clustering optimization, the number of effective coupling matrix samples screened is 12.
[0182] The selected coupling matrix parameters are clustered in high-dimensional space, and the set of parameters with the smallest mean square error is selected in each cluster to obtain the final coupling matrix parameter distribution under the target S parameter. The number of clusters finally determined is 3, and the three best samples selected are:
[0183]
[0184] The comparison between the corresponding target S parameter curve and the actual S parameter curve is as follows: Figures 4 to 9 As shown. It can be seen that at 20 frequency points and Within the specified range, although there are certain differences between the three sets of coupling matrix parameters, they all meet the requirements of the target S-parameter points well. In other words, each sample meets the requirements, but the distribution of each sample is different, which effectively solves the problem of inverse modeling of microstrip filters. In addition, the predicted S-parameter curve (curve with squares) and the target / real data (curve with dots) have a very high consistency across the entire frequency band, which shows that the samples predicted by the model can accurately fit the main resonant characteristics and bandwidth changes presented by the target S-parameter curve, and maintain a small error with the actual measurement results at each frequency point.
[0185] The present application also provides an inverse modeling device for a microwave coupled filter. In one embodiment, the device comprises: a first module, a second module, a third module, a fourth module, a fifth module, and a sixth module, wherein:
[0186] The first module is used to obtain the design goals of the microwave coupled filter, obtain the target S parameters, and define the ideal coupling matrix;
[0187] The second module is used to set the coupling matrix space according to the ideal coupling matrix, and perform sampling in the coupling matrix space to obtain multiple coupling matrix samples to construct a sample set; calculate the S parameters of each coupling matrix sample at the set frequency point to construct a condition set;
[0188] The third module is used to take the sample set and the condition set as inputs of the diffusion model, train the diffusion model to learn the mapping relationship between the coupling parameters and the S parameters, and obtain a trained diffusion model;
[0189] The fourth module is used to input the target S parameters into the trained diffusion model multiple times to obtain multiple model outputs corresponding to the target S parameters; and obtain multiple sets of initial coupling parameters based on the multiple model outputs;
[0190] The fifth module is used to input each set of initial coupling parameters into the forward model to obtain the corresponding S parameters of each set of initial coupling parameters; calculate the mean square error between the target S parameters and the corresponding S parameters, and screen them according to the set threshold to obtain multiple sets of optimal coupling parameters;
[0191] The sixth module is used to cluster multiple groups of preferred coupling parameters, and obtain the coupling parameter distribution according to the preferred coupling parameters with the smallest mean square error in each cluster to achieve inverse modeling of the microwave coupling filter.
[0192] The specific definition of a microwave coupled filter inverse modeling apparatus can be found in the definition of a microwave coupled filter inverse modeling method described above and will not be further elaborated here. Each module in the above-described apparatus can be implemented in whole or in part via software, hardware, or a combination thereof. Each of the above-described modules can be embedded in or independent of a processor in a computer device in hardware form, or stored in a computer device memory in software form, so that the processor can call and execute the corresponding operations of each module.
[0193] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 10 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a method for inverse modeling of a microwave coupling filter is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad provided on the computer device housing, or an external keyboard, touchpad or mouse.
[0194] Those skilled in the art will understand that Figure 10 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0195] In one embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps of the method in the above embodiment when executing the computer program.
[0196] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method in the above embodiment are implemented.
[0197] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0198] The contents not described in detail in this specification belong to the prior art known to professional and technical personnel in this field.
[0199] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0200] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.
Claims
1. A method for inverse modeling of a microwave coupled filter, characterized in that: include: Obtain the design objectives of the microwave coupled filter and define the ideal coupling matrix; According to the ideal coupling matrix, a coupling matrix space is set, and sampling is performed in the coupling matrix space to obtain multiple coupling matrix samples to construct a sample set; Calculate the S parameters of each coupling matrix sample at the set frequency point to construct a condition set; Taking the sample set and the condition set as inputs of the diffusion model, training the diffusion model to learn the mapping relationship between the coupling parameters and the S parameters, and obtaining a trained diffusion model; taking the sample set and the condition set as inputs of the diffusion model, training the diffusion model to learn the mapping relationship between the coupling parameters and the S parameters, and obtaining a trained diffusion model, including: adding noise to each set of coupling parameters in the sample set to generate noise-added parameters; inputting the noise-added parameters, the S parameters in the condition set, and the time step into the diffusion model to train the diffusion model, wherein the training goal is to predict the added noise and minimize the mean square error between the predicted noise and the actual noise, so as to learn the mapping relationship between the coupling parameters and the S parameters, so that the diffusion model accurately predicts the noise under different conditions and time steps, and obtains a trained diffusion model; Obtain target S parameters and input the target S parameters into the trained diffusion model multiple times to obtain multiple model outputs corresponding to the target S parameters; obtain multiple sets of initial coupling parameters based on the multiple model outputs; Each set of initial coupling parameters is input into the forward model to obtain the corresponding S parameters of each set of initial coupling parameters; the mean square error between the target S parameters and the corresponding S parameters is calculated, and the results are screened according to the set threshold to obtain multiple sets of optimal coupling parameters; Multiple groups of optimal coupling parameters are clustered, and the coupling parameter distribution is obtained according to the optimal coupling parameter with the smallest mean square error in each cluster to achieve inverse modeling of the microwave coupling filter.
2. The inverse modeling method of a microwave coupled filter according to claim 1, characterized in that: According to the ideal coupling matrix, a coupling matrix space is set, and sampling is performed in the coupling matrix space to obtain multiple coupling matrix samples to construct a sample set, including: Setting a tolerance range for each variable in the ideal coupling matrix to obtain the variable value space as the coupling matrix space; Latin hypercube sampling is performed in the coupling matrix space, and a set of sampled coupling parameters is used as a sample to obtain multiple coupling matrix samples; A sample set is constructed according to a plurality of coupling matrix samples.
3. The inverse modeling method of a microwave coupled filter according to claim 2, characterized in that: Calculate the S parameters of each coupling matrix sample at a set frequency point to construct a condition set, including: Obtain the design objectives of the microwave coupled filter and define the frequency range and number of sampling points; Generate a frequency point set according to the frequency range and the number of sampling points to obtain the set frequency point; Calculating the normalized frequency variable of each coupling matrix sample at a set frequency point, and obtaining the S parameter of each coupling matrix sample at the set frequency point based on the coupling matrix sample and the normalized frequency variable; Convert the S parameters into dB format to obtain the condition set.
4. The inverse modeling method of a microwave coupled filter according to claim 3, characterized in that: Based on the coupling matrix samples and the normalized frequency variables, the S parameters of each coupling matrix sample at the set frequency point are obtained, including: Based on the coupling matrix samples and the normalized frequency variables, a transition matrix is constructed; According to the transition matrix and different unit vectors, two linear equations are constructed and solved to obtain two transition parameters; According to the two transition parameters, the S parameters of the coupling matrix sample at the set frequency point are obtained.
5. The inverse modeling method of a microwave coupled filter according to claim 4, characterized in that: Generate a frequency point set based on the frequency range and number of sampling points to obtain the set frequency point, including: Generate a frequency point set based on the frequency range and number of sampling points: in, Where, is the frequency point set, is the minimum value of the frequency range, is the maximum value of the frequency range, is the step length, For the frequency points, is the number of sampling points; According to the frequency point set, the set frequency point is obtained.
6. The inverse modeling method of a microwave coupled filter according to any one of claims 1 to 5, characterized in that: Based on multiple model outputs, multiple sets of initial coupling parameters are obtained, including: The model output is the predicted noise, with standard Gaussian noise as the initial noise; According to the predicted noise and the initial noise, the intermediate state of each time step is calculated, and the conditional reverse generation is performed multiple times to map the added noise back to the coupling parameters through step-by-step denoising to obtain a set of initial coupling parameters.
7. The inverse modeling method of a microwave coupled filter according to claim 6, characterized in that: According to the predicted noise and initial noise, the noise parameters of the intermediate state of each time step are calculated, including: in, Where, is the time step The noise parameter, is the time step The noise parameter, is the time step, For each time step, the noise weight is is the accumulation of noise weight, is the time step count, is the prediction noise output by the diffusion model, is the diffusion model, is the S parameter in the condition set, is the time step The noise term in , Used to add random noise to the intermediate states.
8. The inverse modeling method of a microwave coupled filter according to any one of claims 1 to 5, characterized in that: Each set of initial coupling parameters is input into the forward model to obtain the corresponding S parameters of each set of initial coupling parameters; Calculate the mean square error between the target S parameter and the corresponding S parameter, and filter them according to the set threshold to obtain multiple sets of optimal coupling parameters, including: Input each set of initial coupling parameters into the forward model, calculate the frequency response of the filter, and obtain the corresponding S parameters of each set of initial coupling parameters; Calculate the mean square error between the target S parameter and the corresponding S parameter; Multiple groups of initial coupling parameters with mean square errors less than a set threshold are screened as preferred coupling parameters.
9. The inverse modeling method of a microwave coupled filter according to any one of claims 1 to 5, characterized in that: According to the optimal coupling parameters with the smallest mean square error in each cluster, the coupling parameter distribution is obtained, including: The optimal coupling parameter with the smallest mean square error in each cluster is used as the coupling parameter of the cluster; The set of coupling parameters of all clusters is used as the coupling parameter distribution.
Citation Information
Patent Citations
Microwave filter coupling parameter extraction method
CN108509671A
Modeling and intelligent design method of microstrip direct coupling filter
CN111832195A