Pretreatment matrix multiplexing method and device, electronic equipment and storage medium
By grouping harmonic frequencies and using a shared representative frequency to construct a preprocessing matrix, the problem of high storage overhead of LU matrices is solved, thereby improving simulation efficiency and optimizing storage resources.
Patent Information
- Application Number
- CN202610280870.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-09
- Publication Date
- 2026-07-07
AI Technical Summary
In harmonic balance methods, the storage overhead of the LU matrix is large, resulting in excessive storage requirements for the simulation circuit.
The harmonic frequencies of the circuit to be simulated are divided into multiple frequency groups, and a preprocessing matrix is constructed based on the representative frequency. The preprocessing matrix of the same frequency group is shared, which reduces the storage amount of the LU matrix.
It significantly reduces the storage overhead of the LU matrix, improves simulation efficiency, and ensures the convergence of simulation results.
Smart Images

Figure CN122347110A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of integrated circuit simulation, specifically to a preprocessing matrix multiplexing method, apparatus, electronic device, and storage medium. Background Technology
[0002] Harmonic balance (HB) is a mainstream method in radio frequency circuit simulation for analyzing the steady-state response of nonlinear circuits. The HB method expresses the circuit response as a Fourier series, thus transforming the time-domain differential equations into a set of harmonic balance nonlinear equations in the frequency domain. In related techniques, Newton's iteration method is typically used to solve this set of harmonic balance nonlinear equations.
[0003] Since the HB method requires solving all harmonic components simultaneously, its matrix size is typically 10 to 1000 times that of the transient simulation matrix, making direct solution impractical. Therefore, iterative algorithms are often used. The Generalized Minimal Residual (GMRES) method is currently the most widely used iterative solution algorithm.
[0004] Furthermore, since the HB method uses the DC matrix of the circuit to be simulated as a preprocessor, depending on the simulation user's settings, the preprocessing matrices for each harmonic are typically generated based on the DC matrix. Therefore, the linear equations that need to be solved in the HB method become (taking the right-hand preprocessing as an example):
[0005] ; Where J is the Jacobian matrix, P is the preprocessing matrix, and b is the right-hand side term of the linear equation system.
[0006] Since the DC matrix is chosen as the preprocessor, and the preprocessor matrix P has a block diagonal structure with each harmonic corresponding to an independent sub-block, the inverse of the preprocessor matrix corresponding to each harmonic can be solved individually. However, the actual solution is not obtained during the solution process. Instead, the LU (Lower-Upper) decomposition method is used to solve it, so the corresponding LU matrix needs to be stored for each harmonic.
[0007] Therefore, the storage overhead of the LU matrix is relatively large in post-simulation circuits. Summary of the Invention
[0008] This application provides a preprocessing matrix multiplexing method, apparatus, electronic device, and storage medium to solve the technical problem of high storage overhead in LU matrices.
[0009] In a first aspect, embodiments of this application provide a preprocessing matrix reuse method, the method comprising: Obtain the simulation parameters of the circuit to be simulated, and generate the frequencies corresponding to each harmonic based on the fundamental frequency and the maximum harmonic order in the simulation parameters; According to the magnitude of the frequency corresponding to each harmonic, the frequencies corresponding to each harmonic are divided into multiple frequency groups; Determine the representative frequency for each frequency group, and construct the preprocessing matrix corresponding to each frequency group based on the representative frequency.
[0010] In some embodiments, the frequencies corresponding to each harmonic are divided into multiple frequency groups according to the magnitude of the frequencies corresponding to each harmonic, including: Based on the magnitude of the frequencies corresponding to each harmonic, and according to the preset frequency grouping rules, the frequencies corresponding to each harmonic are divided into multiple frequency groups. The preset frequency grouping rule is that the ratio of the difference between the maximum and minimum frequencies within the same frequency group to the maximum frequency does not exceed a preset threshold.
[0011] In some embodiments, based on the magnitude of the frequencies corresponding to each harmonic and a preset frequency grouping rule, the frequencies corresponding to each harmonic are divided into multiple frequency groups, including: Arrange the frequencies corresponding to each harmonic in ascending order; The minimum frequency after sorting is used as the starting frequency of the current frequency group, and the subsequent frequencies are traversed in turn. For the frequency currently being traversed, determine the difference between the current frequency and the starting frequency of the current frequency group, and the ratio of the difference to the current frequency. If the ratio does not exceed the preset threshold, the frequency currently being traversed will be grouped into the current frequency group. If the ratio exceeds a preset threshold, the frequency currently being traversed is determined as the starting frequency of the next frequency group, and the traversal of subsequent frequencies continues until the traversal is completed, resulting in multiple frequency groups.
[0012] In some embodiments, determining the representative frequency of each frequency group includes: Determine the frequency in the middle position within each frequency group; The frequency in the middle position is used as the representative frequency of the corresponding frequency group.
[0013] In some embodiments, a preprocessing matrix corresponding to each frequency group is constructed based on the representative frequency, including: Obtain the DC matrix of the circuit to be simulated; Based on the representative frequency and the DC matrix, determine the element value of each matrix element in the preprocessing matrix corresponding to the representative frequency.
[0014] In some embodiments, the matrix elements of the DC matrix include DC conductance. and capacitance value ; The element value of each matrix element in the preprocessing matrix representing the frequency is determined in the following way: ; in, The value of the element at position (i,j) in the preprocessing matrix representing the frequency is... This represents the frequency.
[0015] In some embodiments, the method provided by the first aspect further includes: Based on the constructed preprocessing matrix, the harmonic balance nonlinear equations of the circuit to be simulated are solved by Newton's iteration method to obtain the simulation results of the circuit to be simulated.
[0016] Secondly, embodiments of this application provide a preprocessing matrix multiplexing apparatus, the apparatus comprising: The acquisition module is used to acquire the simulation parameters of the circuit to be simulated, and generate the frequencies corresponding to each harmonic based on the fundamental frequency and the maximum harmonic order in the simulation parameters. The grouping module is used to divide the frequencies corresponding to each harmonic into multiple frequency groups according to the magnitude of the frequency corresponding to each harmonic. The module is used to determine the representative frequency of each frequency group and construct the preprocessing matrix corresponding to each frequency group based on the representative frequency.
[0017] Thirdly, embodiments of this application provide an electronic device, including: a processor and a memory for storing a computer program capable of running on the processor, wherein, when the processor runs the computer program, it performs the method described in any embodiment of the first aspect.
[0018] Fourthly, embodiments of this application provide a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to perform the methods described in any embodiment of the first aspect.
[0019] The preprocessing matrix reuse method provided in this application divides the frequencies corresponding to each harmonic in the simulation parameters of the circuit to be simulated into multiple frequency groups according to the magnitude of the frequency. Then, it determines the representative frequency of each frequency group and constructs a preprocessing matrix corresponding to each frequency group based on the representative frequency. Since the frequencies within the same frequency group meet a preset degree of closeness, the preprocessing matrix constructed based on the representative frequency can effectively approximate the ideal preprocessing matrix corresponding to all frequencies within the frequency group. Thus, while ensuring the convergence of the Newton iteration method, the preprocessing matrix that originally needed to be constructed separately for each harmonic is reduced to only one preprocessing matrix for each frequency group. This significantly reduces the number of LU matrices that need to be stored, thereby greatly reducing the storage overhead caused by LU matrix storage. This achieves the beneficial effect of improving simulation efficiency while maintaining simulation convergence.
[0020] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0021] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are merely embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort, and this application can be applied to other similar scenarios based on the provided drawings.
[0022] Figure 1 A flowchart illustrating a preprocessing matrix reuse method provided in an embodiment of this application; Figure 2 A flowchart illustrating the frequency grouping method provided in an embodiment of this application; Figure 3 A flowchart illustrating the preprocessing matrix construction method provided in this application embodiment; Figure 4 A schematic diagram of a preprocessing matrix multiplexing device provided in an embodiment of this application; Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0023] The present application will now be described in further detail with reference to the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. The described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0024] It should be noted that the terms "system," "device," "unit," and / or "module" used in this application are methods of distinguishing different components, elements, parts, sections, or assemblies at different levels. However, if other terms can achieve the same purpose, they can be replaced by other expressions.
[0025] Hereinafter, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first," "second," or "third" may explicitly or implicitly include one or more of that feature.
[0026] In related technologies, when using the HB method to simulate the circuit to be simulated, each harmonic in the simulation parameters of the circuit to be simulated needs to be preprocessed into a corresponding matrix. For each preprocessed matrix, LU matrix needs to be used for LU decomposition and storage, resulting in huge storage overhead of LU matrix.
[0027] For each harmonic, the element value of each matrix element in the preprocessing matrix is determined as follows: ; in, The value of the element at position (i,j) in the preprocessing matrix representing the frequency is... Let k be the frequency of the kth harmonic. and These are the DC conductance and capacitance values in the matrix elements of the DC matrix, respectively.
[0028] Therefore, the matrix elements at the same position (i,j) in the preprocessed matrix and The fundamental reason why the preprocessing matrices differ even when the values are the same is that... different.
[0029] Based on the above discussion, if the same preprocessing matrix can be used to replace the preprocessing matrices corresponding to different harmonics, the number of LU matrices that need to be stored can be effectively reduced, thereby effectively reducing the storage overhead of the LU matrices.
[0030] Based on this, in order to solve the problem of huge storage overhead of LU matrix caused by the need to construct corresponding preprocessing matrix for each harmonic, the embodiments of this application provide a preprocessing matrix reuse method, device, electronic device and storage medium. By dividing harmonics with similar frequencies into the same frequency group and sharing the preprocessing matrix, the number of LU matrices that need to be stored is effectively reduced, and the storage overhead of LU matrix is reduced.
[0031] Figure 1 This is a flowchart illustrating a preprocessing matrix reuse method provided in an embodiment of this application.
[0032] like Figure 1 As shown, the preprocessing matrix multiplexing method provided in this application embodiment can be executed by an electronic device. Electronic devices include, but are not limited to, servers, personal computers, laptops, tablets, simulation workstations, and other devices with data processing capabilities. The preprocessing matrix multiplexing method includes the following steps: Step 101: Obtain the simulation parameters of the circuit to be simulated, and generate the frequencies corresponding to each harmonic based on the fundamental frequency and the maximum harmonic order in the simulation parameters. In some embodiments, the circuit to be simulated can be a radio frequency circuit or other circuits, which are not limited in this application.
[0033] In some embodiments, the simulation parameters of the circuit to be simulated include, but are not limited to, the fundamental frequency and the maximum harmonic order; wherein, the simulation parameters are usually set by the user according to the operating frequency range and simulation accuracy requirements of the circuit to be simulated.
[0034] In some embodiments, the frequency corresponding to the kth harmonic is... ;in, Indicates the fundamental frequency.
[0035] For example, for an RF amplifier operating at 2.4GHz, the user can set the base frequency to 2.4GHz and the maximum harmonic order to 10. Then, the frequencies corresponding to the 0th (DC) to 10th harmonics need to be generated: 0GHz, 2.4GHz, 4.8GHz, 7.2GHz, ..., 24GHz.
[0036] Step 102: Divide the frequencies corresponding to each harmonic into multiple frequency groups according to the magnitude of the frequencies corresponding to each harmonic. In some embodiments, in order not to significantly affect the convergence of solving the harmonic balance nonlinear equations of the circuit to be simulated using the Newton-Raphson iteration method, the frequencies within the same frequency group should be as close as possible.
[0037] For example, within the same frequency group, the difference between the maximum and minimum frequencies should be within a preset range. For instance, if the preset difference is set to 0.5 GHz, frequencies with values in the range of [2.0 GHz, 2.5 GHz] can be grouped into the same frequency group.
[0038] Alternatively, for example, the ratio of the difference between the maximum and minimum frequencies within the same frequency group to the maximum frequency does not exceed a preset threshold.
[0039] Alternatively, for example, the geometric spacing between frequencies can be calculated, and adjacent frequencies with a geometric spacing less than a preset threshold can be grouped into the same group. This frequency grouping method is suitable for scenarios where frequencies exhibit an exponential distribution.
[0040] Alternatively, clustering algorithms can be used to automatically group the frequencies corresponding to each harmonic, making the frequencies within the same group as close as possible and the frequency differences between different groups as large as possible. Similarity metrics for clustering algorithms can include Euclidean distance or logarithmic distance.
[0041] Step 103: Determine the representative frequency of each frequency group and construct the preprocessing matrix corresponding to each frequency group based on the representative frequency.
[0042] In some embodiments, a representative frequency refers to a frequency in each frequency group that is close in magnitude to all frequencies in that frequency group.
[0043] In some embodiments, the frequency in the middle of a frequency group can be used as the representative frequency of that frequency group. Specifically, for a frequency group containing M frequencies, if M is odd, the (M+1) / 2th frequency is selected as the representative frequency; if M is even, the M / 2th or M / 2+1th frequency can be selected as the representative frequency, or the average of the two can be taken. For example, if a frequency group contains frequencies {2.4GHz, 2.5GHz, 2.6GHz}, then 2.5GHz is selected as the representative frequency of that frequency group.
[0044] In some embodiments, the arithmetic mean of all frequencies in a frequency group can also be calculated as the representative frequency of that frequency group.
[0045] In some embodiments, for scenarios where the frequency range is wide or the frequency exhibits an exponential distribution within a frequency group, the geometric mean of all frequencies within the frequency group can be used as the representative frequency of that frequency group.
[0046] The preprocessing matrix reuse method provided in this application divides the frequencies corresponding to each harmonic in the simulation parameters of the circuit to be simulated into multiple frequency groups according to the magnitude of the frequency. Then, it determines the representative frequency of each frequency group and constructs a preprocessing matrix corresponding to each frequency group based on the representative frequency. Since the frequencies within the same frequency group meet a preset degree of closeness, the preprocessing matrix constructed based on the representative frequency can effectively approximate the ideal preprocessing matrix corresponding to all frequencies within the frequency group. Thus, while ensuring the convergence of the Newton iteration method, the preprocessing matrix that originally needed to be constructed separately for each harmonic is reduced to only one preprocessing matrix for each frequency group. This significantly reduces the number of LU matrices that need to be stored, thereby greatly reducing the storage overhead caused by LU matrix storage. This achieves the beneficial effect of improving simulation efficiency while maintaining simulation convergence.
[0047] In some embodiments, based on the description of step 102, step 102 may further include: dividing the frequencies corresponding to each harmonic into multiple frequency groups according to the magnitude of the frequencies corresponding to each harmonic and based on a preset frequency grouping rule. The preset frequency grouping rule is that the ratio of the difference between the maximum and minimum frequencies within the same frequency group to the maximum frequency does not exceed a preset threshold.
[0048] In some embodiments, the maximum frequency within the same frequency group is defined as The minimum frequency is If the preset threshold is α, then the mathematical expression for the preset frequency grouping rule is: α.
[0049] In some embodiments, the preset threshold can be 5%. It is understood that the size of the preset threshold can also be adjusted appropriately according to the requirements of the iteration convergence speed; for example, if the requirement for iteration convergence speed is high, the preset threshold can be appropriately reduced; conversely, if the requirement for iteration convergence speed is low, the preset threshold can be appropriately increased.
[0050] In some embodiments, the size of the preset threshold can also be dynamically adjusted; for example, if the storage overhead is large at the current time, the preset threshold can be increased appropriately; conversely, if the storage overhead is small at the current time, the preset threshold can be decreased appropriately.
[0051] Figure 2 This is a flowchart illustrating the frequency grouping method provided in an embodiment of this application.
[0052] In some embodiments, such as Figure 2 As shown, based on the magnitude of the frequencies corresponding to each harmonic and a preset frequency grouping rule, the frequencies corresponding to each harmonic are divided into multiple frequency groups, including the following steps: Step 201: Sort the frequencies corresponding to each harmonic in ascending order; Step 202: Use the smallest sorted frequency as the starting frequency of the current frequency group, and traverse the subsequent frequencies in turn. Step 203: For the frequency currently being traversed, determine the difference between the current frequency and the starting frequency of the current frequency group, and the ratio of the difference to the current frequency being traversed. Step 204: If the ratio does not exceed the preset threshold, the frequency currently traversed is assigned to the current frequency group; if the ratio exceeds the preset threshold, the frequency currently traversed is determined as the starting frequency of the next frequency group, and the subsequent frequencies are traversed until the traversal is completed, resulting in multiple frequency groups.
[0053] In some embodiments, based on the description of step 103, determining the representative frequency of each frequency group in step 103 may include: Determine the frequency in the middle position within each frequency group; The frequency in the middle position is used as the representative frequency of the corresponding frequency group.
[0054] In some embodiments, the preprocessing matrix corresponding to the frequency of the kth harmonic within the same frequency group is defined as follows: The preprocessing matrix representing the frequency within this frequency group is: ,but and Should meet: ; in, The identity matrix is used to ensure that it does not significantly affect the convergence of the harmonic balance nonlinear equations of the circuit to be simulated using Newton's iteration method.
[0055] Figure 3 This is a flowchart illustrating the preprocessing matrix construction method provided in an embodiment of this application.
[0056] In some embodiments, since the preprocessing matrix corresponding to each harmonic is constructed based on its frequency and the DC matrix of the circuit to be simulated, as follows: Figure 3 As shown, step 103, which involves constructing the preprocessing matrix corresponding to each frequency group based on the representative frequency, includes the following steps: Step 301: Obtain the DC matrix of the circuit to be simulated; In some embodiments, the matrix elements of the DC matrix include DC conductance. and capacitance value Where (i,j) represents the position of a matrix element in the DC matrix; specifically, This represents the conductance at position (i,j) in the DC matrix. This represents the capacitance value at position (i,j) in the DC matrix.
[0057] Step 302: Based on the representative frequency and the DC matrix, determine the element value of each matrix element in the preprocessing matrix corresponding to the representative frequency.
[0058] In some embodiments, the element value of each matrix element in the preprocessing matrix representing the frequency is determined in the following manner: ; in, The value of the element at position (i,j) in the preprocessing matrix representing the frequency is... This represents the frequency.
[0059] In some embodiments, the purpose of constructing the preprocessing matrix is to simulate the circuit to be simulated using the HB method to obtain the simulation results of the circuit to be simulated. Based on this, after step 103, the preprocessing matrix reuse method provided in this application embodiment further includes the following steps: Based on the constructed preprocessing matrix, the harmonic balance nonlinear equations of the circuit to be simulated are solved by Newton's iteration method to obtain the simulation results of the circuit to be simulated.
[0060] In some embodiments, it is understood that the preprocessing matrix constructed based on the representative frequency can effectively approximate the ideal preprocessing matrix corresponding to all frequencies within the frequency group. Thus, while ensuring the convergence of the Newton iteration method, the preprocessing matrix that originally needed to be constructed separately for each harmonic is reduced to only one preprocessing matrix for each frequency group. This significantly reduces the number of LU matrices that need to be stored, thereby greatly reducing the storage overhead caused by storing LU matrices. This achieves the beneficial effect of improving simulation efficiency while maintaining simulation convergence.
[0061] The beneficial effects of the preprocessing matrix reuse method provided in the embodiments of this application are further illustrated in Table 1 below: Table 1. Schematic diagram of the beneficial effects of the preprocessing matrix reuse method provided in the embodiments of this application.
[0062] In Table 1, the column fields corresponding to the test cases represent the test case number. In the setting field, base indicates the method of simulating the circuit to be simulated without using the preprocessing matrix multiplexing method provided in the embodiments of this application, that is, the method of constructing a preprocessing matrix for each harmonic during the simulation of the circuit to be simulated using the HB method; check indicates the method of simulating the circuit to be simulated using the preprocessing matrix multiplexing method provided in the embodiments of this application.
[0063] As shown in Table 1: In Test Case 1, the number of Gmres iterations and harmonics were the same in both the base and check methods. However, because the check method grouped harmonics, the harmonics within the same group reused the same preprocessing matrix. Therefore, the preprocessing memory consumption and overall memory consumption in the base method were significantly greater than those in the check method. Test Cases 2 and 3 showed the same effect, further demonstrating that the preprocessing matrix reuse method provided in this application significantly reduced the number of LU matrices that needed to be stored, thereby greatly reducing the storage overhead caused by LU matrix storage and achieving the beneficial effect of improving simulation efficiency while maintaining simulation convergence.
[0064] To implement the preprocessing matrix multiplexing method provided in the embodiments of this application, the embodiments of this application also provide a preprocessing matrix multiplexing apparatus. For example... Figure 4 As shown, Figure 4 A schematic diagram of a preprocessing matrix multiplexing device provided in an embodiment of this application. The preprocessing matrix multiplexing device includes: The acquisition module 401 is used to acquire the simulation parameters of the circuit to be simulated, and generate the frequencies corresponding to each harmonic based on the fundamental frequency and the maximum harmonic order in the simulation parameters. Grouping module 402 is used to divide the frequencies corresponding to each harmonic into multiple frequency groups according to the magnitude of the frequencies corresponding to each harmonic. Module 403 is used to determine the representative frequency of each frequency group and construct the preprocessing matrix corresponding to each frequency group based on the representative frequency.
[0065] In some embodiments, the grouping module 402 is specifically used for: Based on the magnitude of the frequencies corresponding to each harmonic, and according to the preset frequency grouping rules, the frequencies corresponding to each harmonic are divided into multiple frequency groups. The preset frequency grouping rule is that the ratio of the difference between the maximum and minimum frequencies within the same frequency group to the maximum frequency does not exceed a preset threshold.
[0066] In some embodiments, the grouping module 402 is further specifically used for: Arrange the frequencies corresponding to each harmonic in ascending order; The minimum frequency after sorting is used as the starting frequency of the current frequency group, and the subsequent frequencies are traversed in turn. For the frequency currently being traversed, determine the difference between the current frequency and the starting frequency of the current frequency group, and the ratio of the difference to the current frequency. If the ratio does not exceed the preset threshold, the frequency currently being traversed will be grouped into the current frequency group. If the ratio exceeds a preset threshold, the frequency currently being traversed is determined as the starting frequency of the next frequency group, and the traversal of subsequent frequencies continues until the traversal is completed, resulting in multiple frequency groups.
[0067] In some embodiments, the construction module 403 is specifically used for: Determine the frequency in the middle position within each frequency group; The frequency in the middle position is used as the representative frequency of the corresponding frequency group.
[0068] In some embodiments, the construction module 403 is further specifically used for: Obtain the DC matrix of the circuit to be simulated; Based on the representative frequency and the DC matrix, determine the element value of each matrix element in the preprocessing matrix corresponding to the representative frequency.
[0069] In some embodiments, the matrix elements of the DC matrix include DC conductance. and capacitance value ; The element value of each matrix element in the preprocessing matrix representing the frequency is determined in the following way: ; in, The value of the element at position (i,j) in the preprocessing matrix representing the frequency is... This represents the frequency.
[0070] In some embodiments, the preprocessing matrix multiplexing apparatus provided in this application further includes a simulation module, which is used for: Based on the constructed preprocessing matrix, the harmonic balance nonlinear equations of the circuit to be simulated are solved by Newton's iteration method to obtain the simulation results of the circuit to be simulated.
[0071] The above embodiments of this application describe the apparatus provided in the embodiments of this application. To implement the functions of the methods provided in the above embodiments of this application, the preprocessing matrix multiplexing apparatus may include hardware structures and software modules, and may implement the above functions in the form of hardware structures, software modules, or a combination of hardware structures and software modules. One of the above functions may be executed in the form of hardware structures, software modules, or a combination of hardware structures and software modules.
[0072] Figure 5 This is a block diagram illustrating an electronic device 500 for implementing the preprocessing matrix multiplexing method described above, according to an exemplary embodiment. For example, the electronic device 500 may be a computer, a personal digital assistant, etc.
[0073] Reference Figure 5The electronic device 500 may include a communication interface 501, capable of interacting with other devices; a processor 502, connected to the communication interface 501 to interact with other devices, used to execute the methods provided by one or more of the above-described technical solutions when running a computer program; and a memory 503, on which the computer program is stored. Specifically, the specific processing operations of the processor 502 can refer to the preprocessing matrix multiplexing method described in the above embodiments of this disclosure.
[0074] Of course, in practical applications, the various components in electronic device 500 are coupled together through bus system 504. It can be understood that bus system 504 is used to realize the connection and communication between these components. In addition to a data bus, bus system 504 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, in... Figure 5 The general designated all buses as Bus System 504.
[0075] The memory 503 in this embodiment is used to store various types of data to support the operation of the electronic device 500. Examples of such data include any computer program used to operate on the electronic device 500.
[0076] The methods disclosed in the embodiments of this application can be applied to processor 502, or implemented by processor 502. Processor 502 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuit of the hardware in processor 502 or by instructions in software form. The processor 502 may be a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Processor 502 can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. A general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the methods disclosed in the embodiments of this application can be directly manifested as being executed by a hardware decoding processor, or being executed by a combination of hardware and software modules in the decoding processor. The software modules may be located in a storage medium, which is located in memory 503. Processor 502 reads the information in memory 503 and combines its hardware to complete the steps of the aforementioned method.
[0077] In an exemplary embodiment, the electronic device 500 may be implemented by one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers (MCUs), microprocessors, or other electronic components to perform the aforementioned method.
[0078] Embodiments of this disclosure also propose a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to execute the preprocessing matrix multiplexing method described in the above embodiments of this disclosure.
[0079] Embodiments of this disclosure also propose a computer program product, including a computer program that, when executed by a processor, implements the preprocessing matrix multiplexing method described in the above embodiments of this disclosure.
[0080] Embodiments of this disclosure also propose a chip including one or more interface circuits and one or more processors; the interface circuits are used to receive signals from the memory of an electronic device and send signals to the processors, the signals including computer instructions stored in the memory, which, when executed by the processor, cause the electronic device to perform the preprocessing matrix multiplexing method described in the above embodiments of this disclosure.
[0081] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0082] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with an embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0083] Any description of operation or method in the flowchart or otherwise described herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing a particular logical function or operation, and the scope of the preferred embodiments of the invention includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as will be understood by those skilled in the art to which embodiments of the invention pertain.
[0084] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processing module, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (control method), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic device, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which programs can be printed, because programs can be obtained electronically, for example, by optically scanning the paper or other media, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.
[0085] It should be understood that various parts of the embodiments of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0086] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by instructing related hardware through an operation sequence, and the program can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the method embodiments.
[0087] Furthermore, the functional units in the various embodiments of the present invention can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc.
[0088] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.
Claims
1. A method for reusing a preprocessed matrix, characterized in that, The method includes: Obtain the simulation parameters of the circuit to be simulated, and generate the frequencies corresponding to each harmonic based on the fundamental frequency and the maximum harmonic order in the simulation parameters; According to the magnitude of the frequency corresponding to each harmonic, the frequencies corresponding to each harmonic are divided into multiple frequency groups; Determine the representative frequency of each frequency group, and construct the preprocessing matrix corresponding to each frequency group based on the representative frequency.
2. The method according to claim 1, characterized in that, The process of dividing the frequencies corresponding to each harmonic into multiple frequency groups based on their magnitude includes: Based on the magnitude of the frequencies corresponding to each harmonic, and according to the preset frequency grouping rules, the frequencies corresponding to each harmonic are divided into multiple frequency groups. The preset frequency grouping rule is as follows: the ratio of the difference between the maximum and minimum frequencies within the same frequency group to the maximum frequency does not exceed a preset threshold.
3. The method according to claim 2, characterized in that, The process involves dividing the frequencies corresponding to each harmonic into multiple frequency groups based on the magnitude of the frequencies and a preset frequency grouping rule, including: Arrange the frequencies corresponding to each harmonic in ascending order; The minimum frequency after sorting is used as the starting frequency of the current frequency group, and the subsequent frequencies are traversed in turn. For the frequency currently being traversed, determine the difference between the current frequency and the starting frequency of the current frequency group, and the ratio of the difference to the current frequency. If the ratio does not exceed the preset threshold, the frequency currently traversed will be grouped into the current frequency group. If the ratio exceeds the preset threshold, the frequency currently being traversed is determined to be the starting frequency of the next frequency group, and the traversal of subsequent frequencies continues until the traversal is completed, resulting in multiple frequency groups.
4. The method according to claim 1, characterized in that, Determining the representative frequency for each frequency group includes: Determine the frequency in the middle position within each frequency group; The frequency in the middle position is used as the representative frequency of the corresponding frequency group.
5. The method according to claim 1, characterized in that, The step of constructing the preprocessing matrix corresponding to each frequency group based on the representative frequency includes: Obtain the DC matrix of the circuit to be simulated; Based on the representative frequency and the DC matrix, determine the element value of each matrix element in the preprocessing matrix corresponding to the representative frequency.
6. The method according to claim 5, characterized in that, The matrix elements of the DC matrix include DC conductance. and capacitance value ; The element value of each matrix element in the preprocessing matrix corresponding to the frequency is determined in the following way: ; in, Let (i,j) be the element value at position (i,j) in the preprocessing matrix representing the frequency. The frequency represented is denoted as .
7. The method according to claim 1, characterized in that, After constructing the preprocessing matrix corresponding to each frequency group, the method further includes: Based on the constructed preprocessing matrix, the harmonic balance nonlinear equations of the circuit to be simulated are solved by Newton's iteration method to obtain the simulation results of the circuit to be simulated.
8. A preprocessing matrix multiplexing device, characterized in that, The device includes: The acquisition module is used to acquire the simulation parameters of the circuit to be simulated, and generate the frequencies corresponding to each harmonic based on the fundamental frequency and the maximum harmonic order in the simulation parameters. The grouping module is used to divide the frequencies corresponding to each harmonic into multiple frequency groups according to the magnitude of the frequency corresponding to each harmonic. A construction module is used to determine the representative frequency of each frequency group and construct the preprocessing matrix corresponding to each frequency group based on the representative frequency.
9. An electronic device, characterized in that, include: A processor and a memory for storing a computer program capable of running on the processor, wherein the processor, when running the computer program, performs the method of any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to perform the method according to any one of claims 1 to 7.