Microwave filter automatic design method and system based on large language model and multiple agents
By using a large language model and a multi-agent joint optimization algorithm, the design of microwave filters is automated, which solves the problem of high dependence on manual labor in traditional design methods and improves design efficiency and reliability.
Patent Information
- Application Number
- CN202511837851.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-08
- Publication Date
- 2026-04-07
AI Technical Summary
Traditional microwave filter design methods rely on human experience, resulting in long design cycles, low efficiency, and difficulty in adapting to the needs of large-scale and rapid iteration.
An automated design method based on a large language model and multi-agents is adopted, combined with a joint optimization algorithm of simulated annealing and particle swarm optimization, to automatically select filter architecture, generate code, and perform simulation optimization, thereby realizing the automation of filter design.
Significantly improve design efficiency, reduce reliance on manual labor, meet electrical performance indicators and comply with actual engineering constraints, consider non-ideal factors in actual manufacturing, and enhance design reliability.
Smart Images

Figure CN121809227A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of filters, and in particular to an automatic design method and system for microwave filters based on large language models and multi-agent systems. Background Technology
[0002] Microwave filters, as core selective devices in modern communication systems, directly affect the quality and capacity of the entire system. These devices enable lossless signal transmission within a specific frequency band and effectively suppress out-of-band interference, thus ensuring the accuracy and reliability of communication. Currently, common microwave filter design methods, such as simulation methods based on single-port group delay analysis and spatial mapping, still heavily rely on the designer's experience and require full manual involvement in the simulation and optimization process. These methods are not only time-consuming and labor-intensive with low automation, but their design efficiency is also limited by the engineer's expertise, making them unsuitable for the demands of large-scale, rapid iteration filter design. Summary of the Invention
[0003] The purpose of this invention is to provide a multi-agent method and system for automatic design of microwave filters based on a large language model, so as to solve the problems of high dependence on manual operation, long design cycle and low efficiency in traditional design methods.
[0004] To achieve the above objectives, the present invention adopts the following technical solution:
[0005] An automatic design method for microwave filters based on large language models and multi-agent systems includes the following steps:
[0006] Step 1, Scheme Decision: Based on the design metrics input by the user, the pre-trained large language model agent selects the filter architecture and calls the preset computation model to determine the initial physical dimensions of the filter architecture, generating a design scheme report including the filter architecture and initial physical dimensions.
[0007] Step 2, Code Generation: Based on the filter architecture in the scheme report in Step 1, obtain a standardized ADS control code template that matches the filter architecture by querying the ADS control code knowledge base; based on the standardized code template, convert the design scheme report into executable ADS control code for creating schematics and performing scattering parameter simulations in the ADS environment;
[0008] Step 3, Joint Optimization: Construct a joint optimization algorithm based on simulated annealing and particle swarm optimization. Starting from the initial physical dimensions, use ADS control code as the simulation evaluation tool to generate an initial population, and set the basic parameters of the joint optimization algorithm.
[0009] Step 4, Iterative Optimization: Execute the ADS control code to perform simulation, calculate the fitness function, and update the particle states of the joint optimization algorithm; repeat this step until the termination condition is met to obtain the optimal combination of microwave filter physical dimensions; the fitness function is defined as the error function between the simulation results of scattering parameters and the target performance index, and a penalty term is introduced for physical dimension parameters that violate the process boundary conditions;
[0010] Step 5: Determine whether the optimal combination of physical dimensions simultaneously meets the predetermined electrical performance indicators and physical feasibility constraints. If so, generate and output the final microwave filter design schematic.
[0011] Furthermore, the large language model agent selects from a library of microwave filter physical architectures, including distributed parameter transmission line structures, based on design specifications; the distributed parameter transmission line structures include parallel-coupled microstrip line structures and hairpin microstrip line structures.
[0012] Furthermore, in step 2, The The ADS control code knowledge base stores predefined standardized ADS control code templates and ADS standard Python library files. The standardized ADS control code templates encapsulate the syntax specifications and control flow for instantiation of circuit components, declaration of simulation variables, setting of scattering parameter simulation controllers, and definition of optimization targets in ADS scripts.
[0013] Furthermore, in step 3, the initial population includes an individual calculated based on the initial physical size theory, and multiple individuals randomly generated within a preset parameter range.
[0014] Furthermore, in step 4, the fitness function has an error term that is the root mean square error between the target performance of the scattering parameters and the simulation results. Its penalty term is activated when the physical size parameters exceed the process boundary conditions, and the penalty value is proportional to the degree of constraint violation. The joint optimization algorithm is a joint optimization algorithm of simulated annealing and particle swarm optimization. In the early stage of optimization, standard particle swarm optimization is the main method, and in the later stage of optimization, simulated annealing mechanism is introduced.
[0015] Furthermore, the joint optimization algorithm based on simulated annealing and particle swarm optimization specifically includes:
[0016] Initialization phase: Set the optimization dimension corresponding to the physical size of the microwave filter, initialize the position and velocity of the particle swarm, and define the time-varying inertial weights and learning factors;
[0017] In each iteration, the position and velocity of the particles are updated based on the individual optimality and the global optimality; a simulated annealing mechanism is introduced, and solutions with deteriorating fitness are accepted with a preset probability based on the Boltzmann probability acceptance criterion; an exponential cooling strategy is adopted to update the simulated annealing temperature parameters and adjust the preset probability to gradually converge to the global optimal solution; throughout the optimization process, the updated particle positions are subjected to boundary processing to ensure that they meet the manufacturing process constraints.
[0018] Furthermore, the iterative optimization process in step 4 also includes an intelligent control step executed by a large language model agent: the agent monitors the convergence state and constraint violation of the optimization process, analyzes historical optimization data and generates parameter adjustment decisions, and generates a priority optimization strategy for specific types of physical sizes based on the spectral characteristics of the scattering parameter error.
[0019] A microwave filter automatic design system based on a large language model and multiple agents, characterized in that it includes:
[0020] A solution decision-making intelligent agent is used to execute the solution decision-making steps;
[0021] A code generation agent is used to execute the code generation steps;
[0022] The ADS control code knowledge base is built on a retrieval-enhanced generation technology architecture and is used to store and provide standardized ADS control code templates.
[0023] A joint optimization module is used to execute the joint optimization step and the iterative evaluation step;
[0024] The output module is used to perform the result output step.
[0025] By adopting the above technical solution, the present invention discloses the following technical effects:
[0026] 1. By combining filter design with large language models, microwave filter design is freed from dependence on experts, reducing repetitive and tedious work for engineers and significantly improving design efficiency.
[0027] 2. Compared with the automatic optimization method provided by ADS software, the number of optimizations required by the present invention is greatly reduced, and the physical size boundary of the microwave filter can be controlled by the user, which satisfies both electrical performance indicators and actual engineering constraints.
[0028] 3. The method provided by this invention, in addition to being able to automatically design and optimize schematic diagrams, can also be extended to automatically design and optimize layouts. Compared with simple schematic diagram simulation, it fully considers non-ideal factors such as distributed parameter effects, parasitic coupling, and process deviations in actual manufacturing, thereby further improving the reliability of the design.
[0029] In summary, the method and system provided by this invention apply optimization algorithms and large language models to the design and optimization of microwave filters. For computers, the entire process can be completed automatically. Increasing the order only means increasing the output parameters. There are no design difficulties that exist in manual design, which greatly saves manpower, improves design efficiency, and reduces design costs.
[0030] Instruction manual illustrations
[0031] Figure 1 This is a flowchart of the multi-agent method for automatic design of microwave filters in an embodiment;
[0032] Figure 2 These are the scattering parameters of the initial parallel-coupled microwave filter generated in the embodiment;
[0033] Figure 3 These are the scattering parameters of the optimized parallel-coupled microwave filter. Detailed Implementation
[0034] The technical solution of the present invention will be described in detail below with reference to the accompanying drawings and embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0035] like Figure 1 As shown in the figure, the automatic design method for microwave filters based on a large language model and multi-agent systems provided in this embodiment includes the following steps:
[0036] Step 101: Scheme Decision. Based on the user-input metrics, select the filter architecture and estimate the initial physical dimensions of the filter. The specific implementation method for this step is as follows:
[0037] Based on user-input design metrics, a pre-trained large language model agent selects a filter architecture and calls a preset computational model to determine the initial physical dimensions of the filter architecture, generating a design scheme report including the filter architecture and initial physical dimensions. In this embodiment, selectable microwave filter architectures include parallel-coupled microstrip line filters, hairpin line microstrip filters, etc. The computational model estimates the initial physical dimensions based on transmission line theory and empirical formulas.
[0038] Step 102: Code Generation. This step involves querying the ADS control code knowledge base and generating the ADS control code. The specific implementation method for this step is as follows:
[0039] Based on the microwave filter architecture specified in the report, a standardized ADS code template matching the filter architecture was obtained by querying the ADS control code knowledge base. Using this standardized code template, the design report was converted into executable ADS control code for creating schematics and performing scattering parameter simulations in the ADS environment.
[0040] The ADS control code knowledge base is constructed using a retrieval-enhanced generation technology architecture. It stores predefined standardized ADS code templates and ADS standard Python library files. The standardized ADS code templates encapsulate the syntax specifications and control flow of circuit component instantiation, simulation variable declaration, scattering parameter simulation controller settings, and optimization target definition in ADS scripts. By encapsulating the syntax specifications and control flow of ADS scripts, the ADS control code knowledge base provides a structured code generation basis for the code generation agent, enabling the agent to quickly assemble executable simulation scripts that conform to the ADS syntax specifications based on the filter design scheme.
[0041] Step 103: Build and initialize the SAPSO optimizer :
[0042] The SAPSO optimizer is constructed based on a joint optimization algorithm of simulated annealing and particle swarm optimization. Its input is an initial population built with initial physical dimensions, and the optimal physical dimensions are obtained through simulation evaluation using ADS control code. Specifically, the initial population starts with the initial physical dimensions, and the remaining individuals are randomly generated within the constraints of physical rules. Simultaneously, optimization parameters are set according to the design objectives, including the maximum number of iterations, population size, inertia weight, learning factor, and temperature parameters. Furthermore, the dimensions of the optimization problem are defined to correspond to the physical dimensions of each section of the filter, and the population position and velocity are initialized.
[0043] Step 104: Iterative optimization: Execute the ADS control code to perform simulation, calculate the fitness function, update the position and velocity of the particles based on individual optimality and global optimality, repeat this step until the termination condition is met, and finally obtain the optimal combination of microwave filter sizes.
[0044] In this embodiment, the fitness function is defined as the root mean square error between the simulation results of the scattering parameters and the target performance index. Its penalty term is implemented through a step function, activated when the physical size parameters exceed the process boundary conditions. When parameters exceed the limits, the particle fitness is significantly reduced, thus guiding the search away from infeasible solution regions. The penalty value is proportional to the degree of constraint violation. The SAPSO algorithm primarily uses standard particle swarm optimization in the early stages of optimization, guiding the particle search through individual and global optimum optimizations. In the later stages, a simulated annealing mechanism is introduced, allowing particles to accept inferior solutions with a certain probability based on the Boltzmann probability acceptance criterion. In the hybrid optimization stage, an exponential cooling strategy is used to control the temperature parameters of the simulated annealing process. The particle state is iteratively optimized through velocity and position update formulas, and a boundary handling mechanism is combined to ensure the validity of the solution. Finally, the algorithm minimizes the comprehensive fitness function including the penalty mechanism, ensuring that the inverted physical size combination satisfies both electrical performance indicators and practical engineering constraints.
[0045] Step 105: Determine whether the optimal combination of physical dimensions simultaneously meets the predetermined electrical performance indicators and physical feasibility constraints. If so, generate and output the final microwave filter design schematic. This step specifically includes:
[0046] The filter combination obtained in step 104 is compared with the predetermined (user-specified) electrical performance indicators and physical feasibility constraints. If it meets the electrical performance indicators and physical feasibility constraints, the ADS schematic file is automatically generated and returned, completing the design; otherwise, return to step 103 to reset the parameters of the SAPSO optimizer, adjust the population or cooling strategy, and execute the optimization loop again until a qualified design is obtained.
[0047] In practice, to achieve better results, the iterative optimization process of step 104 in this embodiment also includes an intelligent control step executed by a large language model agent: the agent monitors the convergence state and constraint violation of the optimization process, analyzes historical optimization data and generates parameter adjustment decisions, and generates a priority optimization strategy for specific types of physical sizes based on the spectral characteristics of the scattering parameter error.
[0048] This embodiment also provides a microwave filter automatic design system based on a large language model and multiple agents, comprising:
[0049] A solution decision-making intelligent agent is used to execute the solution decision-making steps;
[0050] A code generation agent is used to execute the code generation steps;
[0051] The ADS control code knowledge base is built on a retrieval-enhanced generation technology architecture and is used to store and provide standardized ADS control code templates.
[0052] The joint optimization module employs a joint optimization algorithm to execute joint optimization steps and iterative evaluation steps.
[0053] The output module is used to perform the result output step.
[0054] During implementation, after the code-generating agent completes the generation of ADS control code, the joint optimization module uses the initial physical dimensions provided by the scheme agent as one of the initial population components of the joint optimization algorithm. It then modifies the constraints and optimization objectives of the hybrid particle swarm optimization and simulated annealing algorithm based on the design goals. Simultaneously, the hyperparameters of the optimization algorithm need to be adjusted according to the design goals, covering key parameters such as maximum number of iterations, population size, inertia weight, individual learning factor, global learning factor, factor adjustment strategy, maximum speed, initial temperature, and cooling strategy. Then, iterative evaluation is performed. In this embodiment, during the iteration process, the parameters for each iteration are configured and stored in a locally specified path. The system creates an independent workspace in the ADS simulation environment based on this path and dynamically updates the storage address of the data files in the generated simulation control code. After each round of simulation tasks is completed, the joint optimization agent will automatically read the simulation result file, parse and extract the scattering parameter data related to the optimization target, evaluate the current simulation results according to the predefined fitness function, calculate the corresponding fitness score, and then update the particle state and algorithm parameters according to the score, driving the optimization process to continuously approach the physical size combination that meets the target performance, and finally obtain the required microwave filter physical size, thus completing the automatic design of the microwave filter.
[0055]
[0056] The pseudocode for the business logic of the SAPSO algorithm during this process is as follows:
[0057]
[0058] Experimental verification:
[0059] A bandpass filter operating at 5 GHz with a bandwidth of 400 MHz was designed using the aforementioned automatic microwave filter design system. The filter was required to have an S11 of less than -20 dB in the passband and a suppression of 60 dB at 6.5 GHz. Fr4 substrate was used, with a dielectric constant of 4.4 and a thickness of 0.508 mm. The minimum spacing between filter sections was no less than 0.1 mm. These requirements were input into the automatic microwave filter design system. The system determined that a parallel-coupled microstrip line filter architecture was appropriate and calculated the initial physical dimensions based on transmission line theory and empirical formulas. The initial physical dimensions and the optimized physical dimensions after SAPSO optimization are shown in Table 1, in millimeters.
[0060] Table 1. Initial theoretical values and optimized values of the filter using this design method
[0061]
[0062] Figure 2 The figure shows the simulation results of the scattering parameters of the initial parallel-coupled microwave filter generated by the multi-agent system. Figure 3 This is a simulation result of the scattering parameters of the optimized parallel-coupled microstrip line filter in ADS. Figure 2 , Figure 3 As can be seen, after optimization by this invention, my filter meets the performance requirements, and the scattering parameters match the target scattering parameters very well, indicating that the filter automatically designed by this invention can meet the needs of practical use.
[0063] This document uses specific examples to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. Furthermore, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. An automatic design method for microwave filters based on a large language model and multi-agent systems, characterized in that, Includes the following steps: Step 1, Scheme Decision: Based on the design metrics input by the user, the pre-trained large language model agent selects the filter architecture and calls the preset computation model to determine the initial physical dimensions of the filter architecture, generating a design scheme report including the filter architecture and initial physical dimensions. Step 2, Code Generation: Based on the filter architecture in the solution report in Step 1, obtain a standardized ADS control code template that matches the filter architecture by querying the ADS control code knowledge base; Based on standardized code templates, design reports are converted into executable ADS control code for creating schematics and performing scattering parameter simulations in the ADS environment. Step 3, Joint Optimization: Construct a joint optimization algorithm based on simulated annealing and particle swarm optimization. Starting from the initial physical dimensions, use ADS control code as the simulation evaluation tool to generate an initial population, and set the basic parameters of the joint optimization algorithm. Step 4, Iterative Optimization: Execute the ADS control code to perform simulation, calculate the fitness function, and update the particle state of the joint optimization algorithm; Repeat this step until the termination condition is met to obtain the optimal combination of physical dimensions for the microwave filter; the fitness function is defined as the error function between the simulation results of the scattering parameters and the target performance index, and a penalty term is introduced for violations of the process boundary conditions by the physical dimension parameters; Step 5: Determine whether the optimal combination of physical dimensions simultaneously meets the predetermined electrical performance indicators and physical feasibility constraints. If so, generate and output the final microwave filter design schematic.
2. The method according to claim 1, characterized in that, In step 1, the large language model agent selects from a library of microwave filter physical architectures, including distributed parameter transmission line structures, according to design specifications; the distributed parameter transmission line structures include parallel coupled microstrip line structures and hairpin microstrip line structures.
3. The method according to claim 1, characterized in that, In step 2, The The ADS control code knowledge base stores predefined standardized ADS control code templates and ADS standard Python library files. The standardized ADS control code templates encapsulate the syntax specifications and control flow for instantiation of circuit components, declaration of simulation variables, setting of scattering parameter simulation controllers, and definition of optimization targets in ADS scripts.
4. The method according to claim 1, characterized in that, In step 3, the initial population includes an individual calculated based on the initial physical size theory, and multiple individuals randomly generated within a preset parameter range.
5. The method according to claim 1, characterized in that, The fitness function in step 4 has an error term that is the root mean square error between the target performance of the scattering parameters and the simulation results. Its penalty term is activated when the physical size parameters exceed the process boundary conditions, and the penalty value is proportional to the degree of constraint violation. The joint optimization algorithm is a joint optimization algorithm of simulated annealing and particle swarm optimization. In the early stage of optimization, standard particle swarm optimization is the main method, and in the later stage of optimization, simulated annealing mechanism is introduced.
6. The method according to claim 5, characterized in that, The joint optimization algorithm based on simulated annealing and particle swarm optimization specifically includes: Initialization phase: Set the optimization dimension corresponding to the physical size of the microwave filter, initialize the position and velocity of the particle swarm, and define the time-varying inertial weights and learning factors; In each iteration, the position and velocity of the particles are updated based on the individual optimality and the global optimality; a simulated annealing mechanism is introduced, and solutions with deteriorating fitness are accepted with a preset probability based on the Boltzmann probability acceptance criterion; an exponential cooling strategy is adopted to update the simulated annealing temperature parameters and adjust the preset probability to gradually converge to the global optimal solution; throughout the optimization process, the updated particle positions are subjected to boundary processing to ensure that they meet the manufacturing process constraints.
7. The method according to claim 1, characterized in that, The iterative optimization process in step 4 also includes an intelligent control step executed by a large language model agent: the agent monitors the convergence state and constraint violation of the optimization process, analyzes historical optimization data and generates parameter adjustment decisions, and generates a priority optimization strategy for specific types of physical sizes based on the spectral characteristics of the scattering parameter error.
8. An automatic microwave filter design system based on a large language model and multi-agent technology, used to implement the method as described in any one of claims 1 to 7, characterized in that, include: A solution decision-making intelligent agent is used to execute the solution decision-making steps; A code generation agent is used to execute the code generation steps; The ADS control code knowledge base is built on a retrieval-enhanced generation technology architecture and is used to store and provide standardized ADS control code templates. A joint optimization module is used to execute the joint optimization step and the iterative evaluation step; The output module is used to perform the result output step.