Ellipse filter automatic generation method and system based on diffusion model
Patent Information
- Application Number
- CN202610966190.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-01
- Publication Date
- 2026-10-09
AI Technical Summary
1、设计效率低
[0013]本申请实施例针对椭圆滤波器因通带与阻带纹波及相位响应非线性较强而易于引起信号失真的问题,提供一种避免手动优化纹波参数的自动化设计方法。通过智能化方法自动优化纹波、衰减和过渡带等指标,降低计算复杂度与设计门槛。
Smart Images

Figure CN122891017A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of elliptic filter design technology, and in particular to an automatic generation method and system for elliptic filters based on a diffusion model. Background Technology
[0002] Elliptic filters are high-performance filters widely used in electronic engineering, communications, and signal processing. Their core advantage lies in their ability to achieve the steepest transition between the passband and stopband for a given filter order, thus meeting stringent frequency selectivity requirements at a lower order. This characteristic makes them irreplaceable in applications requiring steep cutoff characteristics, such as anti-aliasing, channel selection, and RF front-ends. However, the superior selectivity of elliptic filters comes at the cost of their inherent characteristics. The amplitude-frequency response of an elliptic filter is not monotonic in either the passband or stopband, but exhibits equiripple. This ripple can cause signal amplitude modulation, potentially leading to distortion in some high-fidelity or precision measurement applications. Similar to other types of classical filters (such as Butterworth and Chebyshev filters), the phase response of an elliptic filter exhibits significant nonlinearity. This results in different delays for different frequency components of the signal, causing phase distortion in the time domain, which is particularly detrimental to the processing of pulse signals or complex modulated signals.
[0003] In practical applications, elliptic filters exhibit ripple in both their passband and stopband, and their phase response is highly nonlinear, easily leading to signal distortion. During manual design, designers need to calculate the elliptic function and optimize multiple parameters, such as ripple, attenuation, and transition band. This computational complexity is highly sensitive to parameter changes, and discrepancies between the actual lumped-parameter components and the ideal design can easily alter or even worsen the performance. Furthermore, unlike the dual-band microstrip filters addressed in "Inverse Design of Dual-Band Microstrip Filters Based on Generative Adversarial Network" (IEEE MWTL, 2024), elliptic filters have equal ripple in both their passband and stopband, and their Jacobian elliptic function exhibits more pronounced nonlinearity. This necessitates that the diffusion model simultaneously address the dual constraints of passband flatness and stopband attenuation depth during conditional constraints, significantly increasing the learning difficulty of the conditional diffusion model.
[0004] Traditional circuit design methods for elliptic filters rely on Jacobian elliptic functions, whose theoretical derivation and calculation processes are more complex than those for Butterworth or Chebyshev filters. Traditional design methods typically depend on pre-calculated normalized design tables and complex numerical calculation software (such as MATLAB). Designers need to solve for or select filter order and transfer function coefficients that meet multiple criteria, including passband cutoff frequency, stopband start frequency, maximum passband ripple, and minimum stopband attenuation. This process not only requires designers to have a strong professional background, but also involves tedious and time-consuming trade-offs and adjustments between parameters.
[0005] Traditional optimization algorithms for automatic design model elliptic filter design as a multi-objective, constrained numerical optimization problem. Design variables typically include filter order, cutoff frequency, and characteristic impedance. The objective function is set to minimize passband ripple, maximize stopband attenuation, and satisfy constraints such as transition band width. Commonly used optimization algorithms include global optimization algorithms such as genetic algorithms, particle swarm optimization, and simulated annealing. These algorithms iteratively search in the parameter space, evaluating the filter frequency response corresponding to a set of parameters in each iteration, and guiding the search direction according to the objective function until an optimal set of parameters satisfying all indices is found.
[0006] Traditional neural network design methods, using neural networks as surrogate models, can quickly predict filter performance under given design parameters, replacing electromagnetic simulation and thus accelerating the optimization iteration process. For computational simplicity, traditional schemes still rely on empirical formula topologies, i.e., the classic elliptic filter structure. This structure has a limited number of modifiable parameters, cannot assess whether it reaches the global optimum, and its model performance is heavily dependent on the quality and size of the training dataset, limiting its ability to handle complex constraints.
[0007] The main drawbacks of existing technologies include: 1. Low design efficiency In the traditional design process, designers need to select a filter that meets the requirements based on multiple indicators such as passband cutoff frequency, stopband start frequency, passband maximum ripple and stopband minimum attenuation. The process of balancing and adjusting the various parameters is cumbersome and time-consuming.
[0008] 2. High computational cost Traditional optimization algorithms require a complete filter performance evaluation during the iteration process, which involves a large amount of computation and slow convergence speed, resulting in a lengthy automated design process that is difficult to meet the development needs of rapid iteration.
[0009] 3. Weak ability to handle complex, rigid constraints. Existing neural networks, in the end-to-end generation process, struggle to accurately and reliably meet the user-defined multi-objective and stringent performance constraints (such as precise numerical boundaries for passband ripple, stopband attenuation, and transition bandwidth), and require additional post-processing optimization steps, making the process cumbersome. Summary of the Invention
[0010] This application provides an automatic generation method and system for elliptic filters based on a diffusion model, which simplifies the design process and automatically optimizes indicators such as ripple, attenuation, and transition band through intelligent methods, thereby reducing computational complexity and design threshold.
[0011] This application provides an embodiment of an automatic elliptic filter generation method based on a diffusion model, including: Obtain preset performance indicators for an elliptic filter, wherein the performance indicators include at least the upper limit of passband ripple and the lower limit of stopband attenuation. The performance index of the elliptic filter is encoded into mutually independent dimension components in the condition vector to construct dual constraint condition information. Based on the trained denoised diffusion probability model, random noise is used as the initial input, and back sampling inference is performed in combination with the dual constraint information. At each time step of backsampling, the intermediate structure predicted at the current time is evaluated using a pre-trained performance prediction network to obtain a prediction performance index, and the deviation gradient between the prediction performance index and the preset performance index is calculated. The noise prediction results of the denoising diffusion probability model are corrected using the deviation gradient, guiding the sampling trajectory to shift towards the target topological region that satisfies the dual constraint conditions. Output the target filter structure matrix that meets the preset elliptic filter performance index, wherein the structure matrix is a binarized pixel matrix.
[0012] This application provides an automatic elliptic filter generation system based on a diffusion model, including a processor and a memory. The memory stores a computer program, which, when executed by the processor, implements the steps of the aforementioned automatic elliptic filter generation method based on a diffusion model.
[0013] This application addresses the problem of signal distortion easily caused by the strong nonlinearity of passband and stopband ripple and phase response in elliptic filters by providing an automated design method that avoids manual optimization of ripple parameters. It automatically optimizes parameters such as ripple, attenuation, and transition band using intelligent methods, reducing computational complexity and design threshold.
[0014] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description
[0015] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the scope of this application. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1 This is a schematic diagram of the elliptic filter design in the automatic elliptic filter generation method of this application embodiment; Figure 2 This is a schematic diagram of the filter structure matrix of the automatic elliptic filter generation method according to an embodiment of this application; Figure 3 This describes the forward diffusion training process of the automatic elliptic filter generation method in this application embodiment; Figure 4 This describes the sampling and generation process of the automatic elliptic filter generation method in this application embodiment; Figure 5 This is a schematic diagram of the U-Net network structure of the automatic elliptic filter generation method in this application embodiment; Figure 6 This is a schematic diagram of the predicted elliptic filter structure and its amplitude-frequency response curve according to the automatic elliptic filter generation method of this application embodiment. Detailed Implementation
[0016] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
[0017] This application provides an automatic generation method for elliptic filters based on a diffusion model. Figure 1The main framework of the method in this application is illustrated. A dataset containing filter structures and amplitude-frequency responses is generated through simulation using the Python-HFSS API interface. The filter structure is used as data information, and the amplitude-frequency response is used as conditional information to train a diffusion model. The diffusion model continuously predicts the filter structure under the conditional information and compares and optimizes it with the actual filter structure. After training, only the required elliptic filter parameters need to be determined. Their normalized amplitude and parameter weights can then be passed to the diffusion model, which can then generate the actual structure of the required elliptic filter. Specific embodiments of the method in this application include the following steps: In step S101, preset performance indicators for the elliptic filter are obtained. These performance indicators include at least an upper limit for passband ripple and a lower limit for stopband attenuation. This application embodiment and subsequent embodiments use the generation of a 2-4 GHz elliptic filter as an example for specific illustration. In this example, the elliptic filter's starting frequency is required to be set to 2 GHz, the cutoff frequency to 4 GHz, the passband ripple to be less than or equal to 0.2 dB, and the stopband attenuation to be greater than or equal to 50 dB at 5 GHz.
[0018] In step S102, the performance indicators of the elliptic filter are encoded as independent dimensional components in the condition vector, constructing dual-constraint condition information. Addressing the coexistence of passband and stopband ripple in elliptic filters, this application introduces a dual-constraint mechanism in the conditional diffusion model. Specifically, during the conditional encoding stage, the upper limit of the passband ripple (e.g., ≤0.2dB) and the lower limit of the stopband attenuation (e.g., ≥50dB@5GHz) are encoded as two independent dimensional components in the Condition vector. Unlike ordinary classifier-guided modes, this allows the diffusion model to simultaneously perceive and optimize both passband flatness and stopband suppression depth during iterative denoising. This dual-constraint mechanism can more accurately guide the generation process towards convergence in a direction that satisfies the dual-ripple indicators of the elliptic filter.
[0019] In step S103, based on the trained denoised diffusion probability model, random noise is used as the initial input, and backsampling inference is performed in conjunction with the dual-constraint information. Specifically, a large dataset within the target frequency range can be generated in batches using the Python-HFSS API interface, and this dataset can be used to train the diffusion model. The dataset is defined as a combination of a pixel matrix and its corresponding frequency response curve. Figure 2 As shown, in some specific embodiments, the pixel matrix can be defined as a 16×16 0 / 1 binary matrix, where 0 represents that there is no metal in this area and 1 represents that there is metal in this area.
[0020] In step S104, at each time step of backsampling, the intermediate structure predicted at the current time is evaluated using a pre-trained performance prediction network to obtain a prediction performance index, and the deviation gradient between the prediction performance index and the preset performance index is calculated. This application additionally trains a performance prediction network that uses the predicted structure at intermediate time steps of the diffusion model... As input, output the key electrical parameters corresponding to the predicted structure, such as passband ripple amplitude, stopband attenuation depth, and transition band steepness.
[0021] At each time step of backsampling, the gradient of the deviation between the predicted performance metric and the target metric with respect to the input structure is calculated. This gradient is then superimposed onto the noise prediction output of the diffusion model as a correction direction, guiding the sampling process to shift towards the target electrical performance region. Compared to traditional unguided sampling, this mechanism enables the generated elliptic filter structure to accurately meet the target metric constraints and significantly reduces the dependence on post-processing optimization steps.
[0022] In step S105, the noise prediction result of the denoising diffusion probability model is corrected by using the deviation gradient, and the sampling trajectory is guided to shift towards the target topological region that satisfies the dual constraint information, thereby guiding the generation process to shift towards the direction that satisfies the target indicators such as passband ripple and stopband attenuation, and achieving end-to-end accurate generation without post-processing.
[0023] In step S106, a target filter structure matrix that meets the preset elliptic filter performance index is output. The structure matrix is a binarized pixel matrix. In some examples, the elliptic filter structure is implemented using a 16×16 pixel matrix. The final generation requires defining parameters such as the target operating frequency to determine the normalized amplitude of the filter. This normalized amplitude, along with target weights such as passband ripple, is then input into the diffusion model.
[0024] This application addresses the problem of signal distortion easily caused by the strong nonlinearity of passband and stopband ripples and phase response in elliptic filters by providing an automated design method that avoids manual optimization of ripple parameters. It solves the problems of time-consuming, inefficient, and costly traditional design methods in complex circuit design. Through a diffusion model, it achieves automated and intelligent design of filter circuits, reducing computational complexity and lowering the design threshold.
[0025] In some embodiments, a topology validity masking mechanism is also included to perform the following operations at each time step of backsampling, for example, to ensure that the 16×16 binary matrix generated by the diffusion model is physically manufacturable: Electrical connectivity constraint: Perform an electrical connectivity check on the filter structure matrix predicted at the current time step to determine if there is at least one continuous metal path extending from the input port to the output port; Minimum feature size constraint: Perform minimum feature size check on the filter structure matrix predicted at the current time step, identify and correct metal lines and gaps with width or spacing smaller than the preset manufacturing threshold; Sharp angle detection is performed on the filter structure matrix predicted at the current time step, and morphological dilation is applied to diagonally adjacent isolated metal pixels to eliminate sharp edges. In other words, diagonally adjacent metal pixels are widened to avoid sharp angles that could affect performance. These constraints project intermediate structures that do not meet topological validity requirements back into the effective space, thus allowing the model to avoid unmanufacturable structures during generation.
[0026] The inspected and corrected structure matrix is projected back into the sampling space as input for the next time step. This application uses a topology validity masking mechanism to ensure that the generated elliptic filter structure is electrically connected and manufacturable, effectively avoiding unmanufacturable structures such as isolated metal islands and excessively thin lines commonly found in traditional pixelated inverse design methods, thus improving the engineering practicality of the design results.
[0027] This application also proposes a multi-level resolution generation strategy from coarse to fine. In some embodiments, the backsampling inference adopts the following multi-level resolution generation strategy from coarse to fine: Pre-sampling is performed in a low-resolution latent space to generate a coarse topological profile characterizing the filter's main resonant path. Based on the previous example, in the initial stage of sampling generation, the model generates a coarse topological profile of the structure in a low-resolution 8×8 latent space, capturing only the filter's main resonant path and coupling region.
[0028] Upsample the latent space to a medium resolution, perform mid-range sampling, and complete the branch coupling structure of the filter. For example, gradually upsample to a medium resolution of 12×12 in the middle of the sampling process to supplement the details of the branch structure.
[0029] The latent space is ultimately upsampled to the target resolution for subsequent sampling, refining the boundary between the metal and dielectric. For example, in the later stages of sampling, it is refined to the target 16×16 resolution to precisely define the metal / dielectric boundary. The sampling process at each resolution level is constrained by the aforementioned topology validity masking mechanism. The method in this application configures an independent topology validity masking constraint for each resolution level, ensuring that the generation process always takes place within a physically manufacturable space. Compared to directly generating a 16×16 matrix, this strategy significantly reduces the search difficulty and uncertainty of high-dimensional structural spaces, improving the topological rationality and electrical performance stability of the generated structure.
[0030] After the training set is processed, the diffusion model weights the noise and samples, feeds it along with the current time t into the U-Net network for learning and prediction of the weighted noise, calculates whether the loss due to the noise meets the requirements, updates the weights, and continues until the network training is complete. Figure 3 As shown, this is the forward diffusion training process: Samples were drawn from the training set. ; Add noise to the current sample noise+ according to the scheduler. Enter U-net; Randomly sample time t from time points 1, 2, ..., T, calculate the sinusoidal position code based on t, and input it into U-net; The U-net predicts noise, the loss is calculated, and the weights are updated.
[0031] For elliptic filters, it is necessary to predict their desired structure; this process is the sampling generation process of the diffusion model, such as... Figure 4 As shown. During the forward diffusion training and sampling generation processes, the time step T is set to 200 steps. The sampling generation process is as follows: At t=T, randomly generated noise ; The time series T, T-1,...,2,1 are executed sequentially, and the sinusoidal position code is calculated based on t. U-Net network output prediction results ; Prediction results x calculate and take it as a new .
[0032] In some embodiments, the denoising network of the denoising diffusion probability model adopts a U-Net architecture, and the U-Net network structure used is as follows: Figure 5 As shown, the structure of the U-Net network mainly includes convolutional layers, downsampling layers, self-attention downsampling layers, self-attention upsampling layers, and upsampling layers.
[0033] The U-Net architecture includes at least one self-attention layer, wherein the feature dimension of the self-attention layer is configured to be 256-dimensional to enhance the ability to capture long-range dependencies of the metal-dielectric boundary in the binary structure matrix. Specifically, the dimensions of the U-Net downsampling layer and upsampling layer are 128, while the dimensions of the self-attention downsampling layer and self-attention upsampling layer are both 256. Setting the self-attention layer dimension to 256 is a specific optimization choice for the elliptic filter structure matrix. Since the metal / dielectric boundary region in the elliptic filter structure matrix is highly sensitive to structural accuracy, a higher-dimensional self-attention mechanism can better capture long-range dependencies in the boundary space, thereby achieving accurate modeling of key structural features of the elliptic filter within a compact 16×16 pixel matrix.
[0034] In some embodiments, the performance prediction network takes the prediction structure at an intermediate time step of the denoising diffusion probability model as input; The output of the performance prediction network includes several key electrical parameters, including passband ripple amplitude, stopband attenuation depth, and transition band steepness; the deviation gradient is calculated based on the Jacobian matrix of the key electrical parameters relative to the input structure.
[0035] In some embodiments, the training process of the denoising diffusion probability model includes: A training dataset is constructed, comprising multiple sets of filter physical structures and their corresponding amplitude-frequency response curves obtained from batch simulations. Based on the aforementioned example, a large dataset within the target frequency range can be generated in batches using the Python-HFSS API interface, and this dataset can be used to train the diffusion model.
[0036] The physical structure of the filter is converted into a binary matrix as a training sample, and the amplitude-frequency response curve and the corresponding performance index parameters are used as training conditions. For example, the pixel matrix is defined as a 16×16 0 / 1 binary matrix.
[0037] Noise is introduced into the training samples using a forward diffusion process, and a noise predictor is used to calculate the Smooth L1 loss between the predicted noise and the actual noise. For example, in some embodiments, the network has a maximum of 1000 iterations, the loss function is the Smooth L1 function, and the training objective is the predicted filter structure. Compared with the actual filter structure in the training set The loss function is minimized, that is, the loss function of the predicted elliptic filter and the actual elliptic filter structure is minimized.
[0038] In the calculation of the Smooth L1 loss, a first loss weight is assigned to pixels located at the edge of the metal region in the binarized matrix, and a second loss weight is assigned to pixels located inside the metal region. The first loss weight is greater than the second loss weight to improve the model's fitting accuracy to the structural boundary. In some specific examples, in the elliptic filter design of this application, small geometric changes in the filter structure, especially small offsets of the metal edge, can significantly affect the transmission characteristics of electromagnetic waves. If a standard uniformly weighted loss function is used, the model will ignore the boundary accuracy, which is crucial to electromagnetic performance. The standard Smooth L1 loss function can be improved by introducing a differentiated weight allocation mechanism based on pixel position. Specifically: Edge pixel recognition, in acquiring training samples Next, edge detection is performed on the matrix. Let M be the set of pixels with a value of 1 and D be the set of pixels with a value of 0. For each pixel in set M, if there are pixels belonging to set D within its eight-neighborhood, then the pixel is determined to be an edge pixel of the metal region; otherwise, if all eight neighbors are metal pixels, then it is determined to be a pixel inside the metal region.
[0039] Construct a weight matrix W with the same size as the structure matrix. Assign values to the weight matrix based on the aforementioned recognition results: For pixels at the edge of the identified metal region, a first loss weight α is assigned; for pixels inside the identified metal region, a second loss weight β is assigned; and for pixels in the medium region, a basic weight is assigned.
[0040] In this embodiment, α is set to be greater than β, preferably α is set to be 2 to 5 times β. For example, α = 3.0 and β = 1.0. This setting makes the model pay more attention to the prediction accuracy of the boundary region during training, thereby forcing the self-attention mechanism of the U-Net network to focus on learning the topological features at the metal-dielectric interface. The standard Smooth L1 loss function is rewritten into a weighted form according to the weights.
[0041] In some embodiments, the dual-constraint information is randomly deactivated using a conditional dropout strategy during the model training phase to enhance the model's generalization ability to unseen metric parameters during the inference phase. For example, a conditional dropout mask is constructed, and a conditional dropout probability is set. In a preferred embodiment, The value is set between 0.1 and 0.2, for example, selecting... =0.15. Before each training iteration, a random mask variable δ, which follows a Bernoulli distribution and δ∈{0,1}, is generated. When δ=1, the conditional discarding mechanism is triggered.
[0042] The final predicted elliptic filter structure is obtained by inputting the normalized amplitude and parameter weights into the diffusion model and generating a suitable elliptic filter structure through sampling. For example... Figure 6 The figure shows the predicted filter structure and its simulated amplitude-frequency response in simulation software. The horizontal axis represents frequency, and the vertical axis represents amplitude. The goal is to achieve an in-band insertion loss of no less than 3dB in the passband (2GHz-4GHz), a passband ripple of less than or equal to 0.2dB, and a stopband attenuation of greater than or equal to 50dB at 5GHz for the elliptic filter. As shown in the figure, the predicted elliptic filter performs well in the passband (2GHz-4GHz) and exhibits attenuation greater than 50dB and sidelobe suppression greater than 60dB at the stopband (5GHz), meeting the design requirements.
[0043] The method in this application embodiment can realize the design of complex elliptic filters. It can basically realize the design of complex elliptic filters in the broadband range, in the frequency range of 1~10GHz, and can obtain accurate design results in a short time, avoiding tedious manual calculations and multiple iterations.
[0044] Traditional design processes, when faced with complex design specifications, require first generating a filter within a general range, and then continuously optimizing and updating it. This process is tedious and can potentially degrade performance. The design method for elliptic filters using a diffusion model can effectively avoid the time wasted on continuous optimization when dealing with complex design specifications. After the diffusion model is trained, a compliant elliptic filter structure can be directly generated.
[0045] The method in this application utilizes a pixel-shaped structure, which expands the design space of elliptic filters to the entire two-dimensional plane, enabling the exploration of a wider range of design parameters and the discovery of innovative design solutions that may be overlooked by traditional design methods. In contrast, traditional filters are designed using distributed parameters, resulting in a large circuit area and low overall circuit area utilization.
[0046] This application also proposes an automatic elliptic filter generation system based on a diffusion model, including a processor and a memory. The memory stores a computer program, which, when executed by the processor, implements the steps of the aforementioned automatic elliptic filter generation method based on a diffusion model.
[0047] It should be noted that, in the embodiments of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0048] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0049] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0050] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims. All of these forms are within the protection scope of this application.
Claims
1. A method for automatically generating elliptic filters based on a diffusion model, characterized in that, include: Obtain preset performance indicators for an elliptic filter, wherein the performance indicators include at least the upper limit of passband ripple and the lower limit of stopband attenuation. The performance index of the elliptic filter is encoded into mutually independent dimension components in the condition vector to construct dual constraint condition information. Based on the trained denoised diffusion probability model, random noise is used as the initial input, and back sampling inference is performed in combination with the dual constraint information. At each time step of backsampling, the intermediate structure predicted at the current time is evaluated using a pre-trained performance prediction network to obtain a prediction performance index, and the deviation gradient between the prediction performance index and the preset performance index is calculated. The noise prediction results of the denoising diffusion probability model are corrected using the deviation gradient, guiding the sampling trajectory to shift towards the target topological region that satisfies the dual constraint conditions. Output the target filter structure matrix that meets the preset elliptic filter performance index, wherein the structure matrix is a binarized pixel matrix.
2. The automatic generation method for elliptic filters based on a diffusion model as described in claim 1, characterized in that, It also includes a topology validity masking mechanism for performing the following operations at each time step of backsampling: Perform an electrical connectivity check on the filter structure matrix predicted at the current time step to determine that there is at least one continuous metal path extending from the input port to the output port; Perform a minimum feature size check on the filter structure matrix predicted at the current time step, identify and correct metal lines and gaps with widths or spacings smaller than a preset manufacturing threshold; Sharp edges are eliminated by performing acute angle detection on the filter structure matrix predicted at the current time step and morphological dilation on diagonally adjacent isolated metal pixels. The structure matrix, after inspection and correction, is projected back into the sampling space and used as the input for the next time step.
3. The automatic generation method for elliptic filters based on a diffusion model as described in claim 2, characterized in that, The backsampling inference employs the following multi-level resolution generation strategy, from coarse to fine: Pre-sampling is performed in the low-resolution latent space to generate a coarse topological profile characterizing the main resonant path of the filter. Upsample the latent space to a medium resolution, perform mid-range sampling, and complete the branch coupling structure of the filter; The latent space is ultimately upsampled to the target resolution for subsequent sampling, which refines the boundary between the metal and the medium. The sampling process at each resolution level is constrained by the topological validity masking mechanism.
4. The automatic generation method for elliptic filters based on a diffusion model as described in claim 1, characterized in that, The denoising network of the denoising diffusion probability model adopts the U-Net architecture; The U-Net architecture includes at least one self-attention layer, wherein the feature dimension of the self-attention layer is configured to be 256-dimensional to enhance the ability to capture long-range dependencies of metal-dielectric boundaries in the binary structure matrix.
5. The automatic generation method for elliptic filters based on a diffusion model as described in claim 1, characterized in that, The performance prediction network takes the prediction structure at an intermediate time step of the denoising diffusion probability model as input. The output of the performance prediction network includes passband ripple amplitude, stopband attenuation depth, and transition band steepness. The bias gradient is calculated based on the Jacobian matrix of the performance prediction network output index relative to the input structure.
6. The automatic generation method for elliptic filters based on a diffusion model as described in claim 1, characterized in that, The training process of the denoising diffusion probability model includes: Construct a training dataset, which includes multiple sets of filter physical structures and their corresponding amplitude-frequency response curves obtained from batch simulations; The physical structure of the filter is converted into a binary matrix as training samples, and the amplitude-frequency response curve and the corresponding performance index parameters are used as training conditions. Noise is applied to the training samples using a forward diffusion process, and a noise predictor is used to calculate the Smooth L1 loss between the predicted noise and the actual noise. In the calculation of the Smooth L1 loss, a first loss weight is set for the pixels located at the edge of the metal region in the binarized matrix, and a second loss weight is set for the pixels located inside the metal region. The first loss weight is greater than the second loss weight to improve the model's fitting accuracy to the structural boundary.
7. The automatic generation method for elliptic filters based on a diffusion model as described in claim 1, characterized in that, The dual constraint information is randomly deactivated during the model training phase using a conditional discarding strategy to enhance the model's generalization ability to unseen index parameters during the inference phase.
8. An automatic elliptic filter generation system based on a diffusion model, characterized in that, It includes a processor and a memory, wherein the memory stores a computer program that, when executed by the processor, implements the steps of the automatic generation method for elliptic filters based on a diffusion model as described in any one of claims 1 to 7.