A pre-parameter matching algorithm for key components of active filter
By using a physical constraint-based normalized mapping and dual-pointer comparison method, the parameter matching of key components of active filters is optimized, solving the problem of efficient matching for large-scale sample sets. This achieves high-precision and efficient component parameter matching, meeting the matching requirements of large-scale sample sets.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BAODING EAGLE COMM & AUTOMATION
- Filing Date
- 2026-05-13
- Publication Date
- 2026-06-12
Smart Images

Figure CN122196587A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electronic technology, and in particular to a pre-parameter matching algorithm for key components of an active filter. Background Technology
[0002] The most commonly used algorithm for pre-parameter matching of circuit components is the sorting two-pointer method. The two-pointer method utilizes the ordered nature of arrays and the low complexity of two-pointer movement to efficiently match parameter combinations of multiple components, thereby achieving pre-parameter matching of circuit components. However, the classic two-pointer method is only suitable for situations with a small number of components or a small sample set. For applications involving pre-parameter matching of key components in active filters, the efficiency of the classic two-pointer method decreases significantly when there are many types of components and a large number of samples. However, a small sample set cannot achieve high-precision matching. To overcome the limitations of the two-pointer method, various methods have been proposed, such as the learning index method, the nearest neighbor search method, machine learning-based combined screening methods, and end-to-end neural network solvers. These methods have significant advantages in adapting to large-scale parameter matching situations; however, they require pre-training of the model and are prone to getting trapped in local optima, making them disadvantageous in situations with limited computational resources. In particular, existing methods have shortcomings when dealing with parameter matching problems like those for active filters, which require high precision, large batches, and constraints based on specific equations (such as equal RC products). Summary of the Invention
[0003] In view of the aforementioned existing problems, the present invention is proposed.
[0004] Therefore, the present invention provides a pre-parameter matching algorithm for key components of an active filter to solve the above-mentioned technical problems.
[0005] To solve the above-mentioned technical problems, the present invention provides the following technical solution:
[0006] An algorithm for pre-parameter matching of key components of an active filter includes the following steps: S1, Normalized mapping based on physical constraints: Obtain the parameter list of key components of the active filter, and divide the parameter list into two groups according to the frequency characteristic equality constraints that the key components must satisfy; calculate the absolute constraint value of all component combinations in each group, and divide the absolute constraint value by the preset constraint benchmark value V. S The relative constraint values are obtained; the first array S1 and the second array S2 are constructed from the relative constraint values and their corresponding component parameter numbers; S2, dual-pointer comparison and dynamic shrinkage: arrays S1 and S2 are sorted according to the relative constraint values, and the corresponding relative constraint value a is extracted by dual pointers i and j. i and a j Compare; if |a i -a jIf |≤ε, then the match is successful. The corresponding component parameter number is stored in the matching array M, and the data row corresponding to the successfully matched component parameter number is physically deleted from arrays S1 and S2 simultaneously; S3, offset trimming based on boundary evaluation: In each pointer adjustment cycle, the upper and lower bounds of the current remaining data in arrays S1 and S2 are obtained in real time. The difference between the upper and lower bounds is compared with the error range ε. Offset interval data in arrays S1 and S2 that do not overlap or whose data spacing exceeds the error range ε are deleted; S4, loop matching and termination: Under the condition that the pointer does not exceed the limit and arrays S1 and S2 are not empty, steps S2 and S3 are repeated until the termination condition is met; S5, result verification and output: Based on the parameter list and matching array M, the unmatched array F is determined. Error limit verification and matching error statistical analysis are performed on the unmatched array F, and the final component matching result is output.
[0007] Furthermore, in step S1: the frequency characteristic equation constraint includes the product equation of the key resistor and capacitor of the active filter; the constraint reference value V S The product of ideal design parameters under equality constraints is the absolute constraint value. The calculation method for absolute constraint values includes multiplying the resistance and capacitance values in the same group, or calculating mathematical expressions derived from equality constraints that include reciprocals or powers.
[0008] Furthermore, in step S2, if |a i -a j If |≤ε, then proceed with the matching failure logic, including: if condition a is satisfied. i j If -ε, then increment the pointer i of array S1 by 1; if condition a is satisfied... i >a j If +ε is added, the pointer j of array S2 is incremented by 1; after a successful match and the corresponding data row is physically deleted, the remaining arrays S1 and S2 are reordered, and the two pointers i and j are reset to the starting pointer positions of the current array.
[0009] Furthermore, the offset pruning based on boundary evaluation in step S3 specifically includes: obtaining the maximum value of the current remaining data in array S1 as the upper bound of S1 and the minimum value as the lower bound of S1, and similarly obtaining the upper bound and lower bound of S2; determining the interval relationship between arrays S1 and S2, which includes six topological states such as inclusion relationship, interleaving relationship, or complete separation relationship; if the difference between the upper bound of S1 and the lower bound of S2 is greater than the error range ε, or the difference between the upper bound of S2 and the lower bound of S1 is greater than the error range ε, then it is determined that there is an offset interval that does not meet the comparison conditions, the data rows corresponding to the offset interval are batch-pruned and deleted from the array, and the corresponding pointer positions are reset.
[0010] Furthermore, in step S5, an error limit check is performed on the unmatched array F, including: recalculating the actual relative constraint value difference of each component combination in the unmatched array F, filtering out component combinations whose actual relative constraint value difference is less than or equal to the error range ε, and using them as misjudged data to be added back to the matching array M, so as to complete the closed-loop verification of the algorithm matching operation.
[0011] Furthermore, the final component matching results are directly mapped to the automated assembly line of active filters, guiding the precise pairing and insertion of key resistors and capacitors with equality constraints within the same active filter.
[0012] The beneficial effects of this invention are:
[0013] 1. The pre-parameter matching algorithm for key components of this active filter simultaneously performs the component parameter matching operation and deletes successfully matched component combinations, effectively shortening the data length of S1 and S2, enhancing the algorithm's adaptability to matching large-scale sample sets, and improving parameter matching accuracy.
[0014] 2. The pre-parameter matching algorithm for key components of this active filter adjusts the relative pointers of S1 and S2 based on the data size and density, identifies and deletes offset data intervals that are too far apart to be compared. This optimization of the array further improves the algorithm's adaptability to matching large-scale sample sets and increases the matching success rate.
[0015] 3. The pre-parameter matching algorithm for key components of this active filter does not require a learning and training process, has no special requirements for the computing environment, is suitable for parameter matching scenarios with large sample data volumes, and has high matching efficiency. Attached Figure Description
[0016] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 This is a schematic diagram of the modules involved in the implementation of the algorithm of this invention;
[0018] Figure 2 This is a flowchart of the algorithm of the present invention;
[0019] Figure 3 This is a schematic diagram of six topological states for pointer adjustment and offset data clipping in this invention. Detailed Implementation
[0020] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0021] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0022] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.
[0023] Reference Figures 1-3 As one embodiment of the present invention, this embodiment provides a pre-parameter matching algorithm for key components of an active filter, comprising the following steps:
[0024] S1. Normalized Mapping Based on Physical Constraints: Obtain the parameter list of key components of the active filter, and divide the parameter list into two groups according to the frequency characteristic equality constraints that the key components must satisfy; calculate the absolute constraint value of all component combinations in each group, and divide the absolute constraint value by the preset constraint benchmark value V. S The relative constraint values are obtained; the first array S1 and the second array S2 are constructed from the relative constraint values and their corresponding component parameter numbers; S2, dual-pointer comparison and dynamic shrinkage: arrays S1 and S2 are sorted according to the relative constraint values, and the corresponding relative constraint value a is extracted by dual pointers i and j. i and a j Compare; if |a i -a jIf |≤ε, then the match is successful. The corresponding component parameter number is stored in the matching array M, and the data row corresponding to the successfully matched component parameter number is physically deleted from arrays S1 and S2 simultaneously; S3, offset trimming based on boundary evaluation: In each pointer adjustment cycle, the upper and lower bounds of the current remaining data in arrays S1 and S2 are obtained in real time. The difference between the upper and lower bounds is compared with the error range ε. Offset interval data in arrays S1 and S2 that do not overlap or whose data spacing exceeds the error range ε are deleted; S4, loop matching and termination: Under the condition that the pointer does not exceed the limit and arrays S1 and S2 are not empty, steps S2 and S3 are repeated until the termination condition is met; S5, result verification and output: Based on the parameter list and matching array M, the unmatched array F is determined. Error limit verification and matching error statistical analysis are performed on the unmatched array F, and the final component matching result is output.
[0025] Working principle: The algorithm flowchart of this invention is as follows Figure 2 As shown. The active filter key component pre-parameter matching algorithm provided by this invention first sets the matching error range ε and the reference value V. S Input a list of key component parameters obtained through precise measurement. Based on the constraints that the active filter must satisfy for the key component parameter values, divide the parameter list into two groups and calculate the constraint values for each component combination in each group. Divide the constraint value by the baseline value to obtain the relative value. Use the relative constraint values and the corresponding component parameter numbers to construct array pairs S1 and S2, respectively, and sort the data in S1 and S2 in ascending order of relative constraint values.
[0026] Then, set the matching array If empty, set an array. and The data pointers are respectively and The lengths of arrays S1 and S2 are respectively and Choose relative constraint values a from S1 and S2 respectively. i and a j Compare a i and a j Does it satisfy |a i -a j |≤ε. If satisfied, the match is successful. Add the component parameter number corresponding to the data pointer (i, j) to M, and delete the data row corresponding to the successfully matched component parameter number from S1 and S2. Adjust the pointers in the array, pruning the offset data segments in the array that do not meet the comparison conditions. If arrays S1 and S2 are empty, end the comparison operation; otherwise, loop the matching. If data a i and a j Not satisfied | a i -aj If |≤ε, then the data matching is unsuccessful, and the algorithm further determines a. i and a j The size of a. If a i j -ε, then the pointer i is incremented by 1; if a i >a j If ε is incremented, pointer j is incremented by 1. If i > L1 or j > L2, the matching process ends; otherwise, the matching continues in a loop.
[0027] After the cyclic matching process is completed, the non-matching array F is determined using the component parameter list and the matching array M. The correctness of the matching results is further verified by analyzing a small number of non-matching component combinations. Statistical analysis is performed on the matching errors of continuous random variables, and the matching results of key components are output.
[0028] Pointer adjustment and offset data clipping: A schematic diagram of the pointer adjustment in this invention is shown below. Figure 3 As shown, pointer adjustment and offset data trimming are further optimization processes for arrays S1 and S2. Arrays S1 and S2 have 6 possible relationships. Figure 3 (a) means "S2 is greater than S1". Figure 3 (b) means "S1 is greater than S2". Figure 3 (c) means "S1 contains S2". Figure 3 (d) means "S2 contains S1". Figure 3 (e) means "S2 is greater than S1 and has no common part". Figure 3 (f) indicates that "S1 is greater than S2 and has no common parts". The upper and lower bounds of arrays S1 and S2 are compared, i.e., the start and end pointers, and non-overlapping parts or parts with a data distance exceeding ε are deleted. Through pointer adjustment and offset data pruning, the structure of arrays S1 and S2 is further optimized, which helps improve matching efficiency and accuracy.
[0029] In practice, different programming languages are used depending on the computing environment. Different key resistor and capacitor components are determined based on the design purpose of the active filter. Constraints are set for the different resistor and capacitor parameter values to meet based on frequency response requirements. The calculation methods for constraint values typically include, but are not limited to, multiplication.
[0030] Example 1: Assume the key components of an active filter are R1, R2, C1, and C2. According to design requirements, the parameter values of these four key components must precisely satisfy the constraint: R1C1 = R2C2, to achieve zero and pole elimination of the transfer function and obtain good frequency characteristics. During mass production, the key components R1, R2, C1, and C2 of all products must be precisely matched. Ideally, R1 = 33kΩ, C1 = 10nF, R2 = 15kΩ, C2 = 22nF, and the reference value V... S = R1 C1=330×10 -6 s. Assume the matching error range ε = 1%, and the sample size for each component is 3 × 10. 3 The larger the sample size, the higher the matching success rate. The component parameter values follow a Weibull distribution, with a maximum error of ±10% for resistors and ±50% for capacitors. The components are divided into two groups: one group consists of R1 and C1, and the other group consists of R2 and C2. Each group of components is multiplied pairwise; the number of possible product combinations is 9 × 10^9. 6 That is to say, the lengths of arrays S1 and S2 are 9 × 10. 6 The active filter key component pre-parameter matching algorithm provided by this invention successfully matched 2991 component combinations, while 9 component combinations failed to match, achieving a success rate of 99.7%. The average matching error was 3.13 × 10⁻⁶. -4 The minimum value is 2.93 × 10 -10 The maximum value is 1×10 -2 The algorithm implements 3×10 3 The pre-matching of key components enables adaptability to large-scale samples and effectively reduces the adverse effects of component parameter dispersion on the frequency characteristics of active filters.
[0031] Example 2: For a second-order low-pass active filter with a Siren-Kai structure, assume the key components are R1, R2, C1, and C2. According to design requirements, the upper cutoff frequency f... C =10kHz, and f C =(2π(R1R2C1C2) 0.5 ) -1 Therefore, the parameter values of these four key components must precisely satisfy the constraint condition: R1C1=((2πf C ) 2 R2C2) -1 To obtain good frequency characteristics, R1, R2, C1, and C2 of all products must be precisely matched during mass production. Ideally, R1 = 2.5kΩ, C1 = 10nF, R2 = 1kΩ, C2 = 10nF, and the reference value V... S = R1 C1=2.5×10 -5s. Assume the matching error range ε = 1%, and the sample size for each component is 2 × 10. 3 The number of parameter combinations is 4×10 6 The component parameter values follow a Weibull distribution, with a maximum error of ±10% for resistors and ±50% for capacitors. The components are divided into two groups: one group consists of R1 and C1, and the other group consists of R2 and C2. The constraint value calculation formula for the first group of components is V1 = R1 C1, and the constraint value calculation formula for the second group of components is V2 = ((2πf...) C ) 2 R2C2) -1 The constraint value of each group is divided by the baseline value V. S The relative values are obtained, forming a structure of length 4×10. 6 The arrays S1 and S2 are provided. The pre-parameter matching algorithm for key components of the active filter provided by this invention successfully matched 1389 component combinations, while 611 component combinations failed to match, achieving a success rate of 69.45%. The average matching error is 9.2 × 10⁻⁶. -3 The minimum value is 2.3 × 10 -9 The maximum value is 1×10 -2 The algorithm implements 2×10 3 Pre-parameter matching of key components is performed, but the success rate is low due to the reciprocal operation of the constraints.
[0032] In summary, the active filter key component pre-parameter matching algorithm provided by this invention firstly, simultaneously performs component parameter matching and deletes successfully matched component combinations, effectively shortening the data lengths of S1 and S2. Secondly, based on the data size and density, the algorithm adjusts the S1 and S2 pointers, deleting non-overlapping components or those with data distances exceeding a certain threshold. In this part, offset data pruning is implemented. This optimization further improves the algorithm's adaptability to matching large-scale sample sets and increases matching accuracy. Furthermore, this algorithm does not require a learning training process, has no special requirements for the computing environment, has high matching efficiency, and is suitable for parameter matching scenarios with large sample data volumes.
[0033] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A pre-parameter matching algorithm for key components of an active filter, characterized in that, Includes the following steps: S1. Normalization mapping based on physical constraints: Obtain the parameter list of key components of the active filter, and divide the parameter list into two groups according to the frequency characteristic equation constraint conditions that the key components need to satisfy. Calculate the absolute constraint value for all component combinations in each group, and divide the absolute constraint value by the preset constraint reference value V. S The relative constraint values are obtained; a first array S1 and a second array S2 are constructed from the relative constraint values and their corresponding component parameter numbers; S2, dual-pointer comparison and dynamic shrinkage: arrays S1 and S2 are sorted according to the relative constraint values, and the corresponding relative constraint value a is extracted by dual pointers i and j. i and a j Compare; if |a i -a j If |≤ε, then the match is successful. The corresponding component parameter number is stored in the matching array M, and the data row corresponding to the successfully matched component parameter number is physically deleted from arrays S1 and S2 simultaneously; S3, offset clipping based on boundary evaluation: In each pointer adjustment cycle, the upper and lower bounds of the current remaining data in arrays S1 and S2 are obtained in real time. The difference between the upper and lower bounds is compared with the error range ε. Offset interval data in arrays S1 and S2 where the data ranges do not overlap or the data spacing exceeds the error range ε is deleted; S4. Loop Matching and Termination: Under the condition that the pointer does not exceed the limit and arrays S1 and S2 are not empty, repeat steps S2 and S3 until the termination condition is met; S5. Result Verification and Output: Determine the unmatched array F according to the parameter list and the matching array M, perform error limit verification and matching error statistical analysis on the unmatched array F, and output the final component matching result.
2. The active filter key component pre-parameter matching algorithm according to claim 1, characterized in that, In step S1: the frequency characteristic equation constraint condition includes the product equation of the key resistor and capacitor of the active filter; the constraint reference value V S The product value of the ideal design parameters under the equality constraints is given; the calculation method of the absolute constraint value includes multiplying the resistance and capacitance values in the same group, or calculating a mathematical expression derived from the equality constraints that includes reciprocal or exponentiation operations.
3. The active filter key component pre-parameter matching algorithm according to claim 1, characterized in that, In step S2, if |a i -a j If |≤ε, then proceed with the matching failure logic, including: if condition a is satisfied. i j If -ε, then increment the pointer i of array S1 by 1; if condition a is satisfied... i >a j If +ε is added, the pointer j of array S2 is incremented by 1; after a successful match and the corresponding data row is physically deleted, the remaining arrays S1 and S2 are reordered, and the two pointers i and j are reset to the starting pointer positions of the current array. 4. The active filter key component pre-parameter matching algorithm according to claim 1, characterized in that, The offset pruning based on boundary evaluation in step S3 specifically includes: obtaining the maximum value of the current remaining data in array S1 as the upper bound of S1 and the minimum value as the lower bound of S1, and similarly obtaining the upper bound and lower bound of S2; determining the interval relationship between arrays S1 and S2, the interval relationship including six topological states such as inclusion relationship, interleaving relationship or complete separation relationship; if it is determined that the difference between the upper bound of S1 and the lower bound of S2 is greater than the error range ε, or the difference between the upper bound of S2 and the lower bound of S1 is greater than the error range ε, then it is determined that there is an offset interval that does not meet the comparison conditions, the data rows corresponding to the offset interval are batch-pruned and deleted from the array, and the corresponding pointer positions are reset.
5. The active filter key component pre-parameter matching algorithm according to claim 1, characterized in that, In step S5, the unmatched array F is subjected to error limit verification, which includes: recalculating the actual relative constraint value difference of each component combination in the unmatched array F, filtering out component combinations whose actual relative constraint value difference is less than or equal to the error range ε, and using them as misjudged data to be added back to the matching array M to complete the closed-loop verification of the algorithm matching operation.
6. The active filter key component pre-parameter matching algorithm according to any one of claims 1 to 5, characterized in that: The final component matching results output are used to directly map to the automated assembly line of active filters, guiding the precise pairing and insertion of key resistors and capacitors with equality constraints within the same active filter.