Multi-objective test optimization method based on pareto dominance and euclidean distance
Patent Information
- Application Number
- CN202310693850.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-12
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2043-06-12
AI Technical Summary
实际上,各目标很难同时达到最优,需要寻找一种可以全面解答各优化目标的方法
[0041] This invention presents a multi-objective test optimization method based on Pareto dominance and Euclidean distance. It determines several optimization objectives for test optimization in an analog circuit as needed, treats the test schemes as individuals in a genetic algorithm, and uses the genetic algorithm iteratively to search for the optimal individual. During the iteration process, superior individuals are selected based on Pareto dominance and Euclidean distance. Each individual in the final population represents a test optimization scheme. This invention, based on Pareto optimality and Euclidean distance, optimizes individuals during the genetic algorithm iteration process, obtaining multiple analog circuit test optimization schemes that satisfy multiple objectives, better adapting to practical application needs.
Smart Images

Figure CN117151007B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of analog circuit technology, and more specifically, relates to a multi-objective test optimization method based on Pareto dominance and Euclidean distance. Background Technology
[0002] Currently, in the problem of fault diagnosis in analog circuits, how to select a test scheme so that the fault detection rate (FDR), false alarm rate (FAR), and various test costs (time, economy, etc.) simultaneously meet the constraints or even tend to be better is a problem that is constantly being explored in academic and engineering fields.
[0003] Currently, most test optimization methods in the testability design of analog circuits are: to minimize one of the following while meeting the testability requirements: total test cost, total test time, false alarm rate, number of test items, etc. This is a typical single-objective constrained optimization problem, as shown in the following formula.
[0004] min f(X)
[0005] Subject to g j (X)≤0,j=1,2,…,k
[0006] h j (X) = 0, j = 1, 2, ..., l
[0007] X = [x1, x2, ..., x D ],x d ∈{0.1}, d=1,2,…,D
[0008] Where: X is a D-dimensional binary decision vector, x d =1 indicates that test item d is selected, x d =0 indicates that the test item is not selected. f(X) is the optimization objective, which can be the total test time, total cost, false alarm rate, number of tests, etc. g j (X) represents an inequality constraint, such as requiring a fault isolation rate greater than 90%, expressed as g. j (X) = 0.9 - FIR ≤ 0. h j (X) represents an equality constraint, such as requiring a fault detection rate of 100%, expressed as h. j (X)=1-FDR=0.
[0009] To minimize multiple objectives (total test time, total cost, false alarm rate, number of tests, etc.) simultaneously, the commonly used method is to weight each objective, as shown in the following formula.
[0010]
[0011] During the process, corresponding weight coefficients are set according to the importance of each objective. The more important the objective, the larger the weight coefficient. Using the above multi-objective objective function, a compromise solution for many objectives can be obtained, but it is essentially a single-objective optimization problem. In reality, it is difficult for all objectives to reach their optimal state simultaneously, and a method that can comprehensively solve all optimization objectives is needed. Summary of the Invention
[0012] The purpose of this invention is to overcome the shortcomings of the prior art and provide a multi-objective test optimization method based on Pareto dominance and Euclidean distance. Based on Pareto optimality and Euclidean distance, individuals are optimized during the iteration process of the genetic algorithm to obtain multiple simulation circuit test optimization schemes that satisfy multiple objectives.
[0013] To achieve the above-mentioned objectives, the present invention provides a multi-objective testing optimization method based on Pareto dominance and Euclidean distance, comprising the following steps:
[0014] S1: Determine the optimization objectives and constraints for several test optimizations in the analog circuit as needed, denoted as M for the number of optimization objectives, and set the optimization objective function f for the test scheme. m (X), m = 1, 2, ..., M, the smaller the objective function value, the better the test plan; let the constraint condition be AA. * ≥0, A represents the constraint parameter, A * The parameter threshold is represented; then, D available test items are selected as alternative test items from the available test items of the analog circuit according to actual needs.
[0015] S2: Randomly generate N individuals X i =[x i,1 ,x i,2 ,…,x i,D ], i = 1, 2, ..., N, each individual represents a test plan, x i,d =0 indicates that the d-th alternative test item was not selected in the test plan corresponding to the individual, x i,d =1 indicates that the d-th candidate test item is selected from the test plan corresponding to the individual, where d = 1, 2, ..., D; the N randomly generated individuals constitute the initial population P in the genetic algorithm;
[0016] S3: Set the iteration count g = 1;
[0017] S4: Perform crossover operations on individuals in population P to generate population P′;
[0018] S5: Perform mutation operations on individuals in population P′ to generate population Q;
[0019] S6: Merge population P and population Q to obtain population S = P∪Q;
[0020] S7: Selecting superior individuals based on Pareto dominance and Euclidean distance, the specific steps include:
[0021] S7.1: Calculate the M optimization objective function values for each individual in population S, determine the Pareto dominance relationship between any two individuals based on the optimization objective function values, and count the number of times each individual is dominated.
[0022] S7.2: Set 2N sets L j For each j = 1, 2, ..., 2N, the individuals that have been dominated j-1 times are stored in set L. j middle;
[0023] S7.3: Let j = 1, and select the optimal set of individuals.
[0024] S7.4: Determine if If yes, proceed to step S7.8; otherwise, proceed to step S7.5.
[0025] S7.5: Determine if |L j |≤N-|K|, where || represents the number of individuals in the set. If yes, proceed to step S7.6; otherwise, proceed to step S7.7.
[0026] S7.6: Let K = K∪L j ;
[0027] S7.7: Determine if |K| < N. If yes, proceed to step S7.8; otherwise, the individual selection ends.
[0028] S7.8: Let j = j + 1, then return to step S7.4;
[0029] S7.9: For each optimization objective function, from set L j The individual with the smallest objective function value is selected as the corresponding single-objective optimal individual.
[0030] S7.10: Determine if M≤N-|K|. If not, proceed to step S7.11; otherwise, proceed to step S7.12.
[0031] S7.11: Randomly select N-|K| individuals from the M single-objective optimal individuals and add them to the preferred individual set K. The individual selection ends.
[0032] S7.12: Add the M single-objective optimal individuals to the preferred individual set K, and remove the M single-objective optimal individuals from set L. j Delete;
[0033] S7.13: For the current set L jEach individual in i j,h Represents the current set L j The original index of the h-th individual, h = 1, 2, ..., |L j |, calculate separately; and compare it with the |K| individuals X in the preferred individual set K. ik European distance i k Let |k| represent the original index of the k-th individual in the current preferred individual set K, where k = 1, 2, ..., |K|, and |K| represents the norm.
[0034] The minimum value among |K| Euclidean distances is taken as the individual. The distance to the preferred set of individuals K, i.e.
[0035] Then from the current set L j The individual with the largest distance from the selected set of individuals K is selected.
[0036] S7.14: Individual Add to the preferred individual set K, and remove it from set L j Delete;
[0037] S7.15: Determine whether the number of individuals in the current preferred individual set K is |K| < N. If yes, return to step S7.13; otherwise, the individual selection ends.
[0038] S8: Determine if the number of iterations g < G max G max This indicates the preset maximum number of iterations. If so, proceed to step S9; otherwise, proceed to step S10.
[0039] S9: Let the iteration number g = g + 1, let the population P = K, and return to step S4;
[0040] S10: Take each individual in the preferred individual set K as a test preferred solution.
[0041] This invention presents a multi-objective test optimization method based on Pareto dominance and Euclidean distance. It determines several optimization objectives for test optimization in an analog circuit as needed, treats the test schemes as individuals in a genetic algorithm, and uses the genetic algorithm iteratively to search for the optimal individual. During the iteration process, superior individuals are selected based on Pareto dominance and Euclidean distance. Each individual in the final population represents a test optimization scheme. This invention, based on Pareto optimality and Euclidean distance, optimizes individuals during the genetic algorithm iteration process, obtaining multiple analog circuit test optimization schemes that satisfy multiple objectives, better adapting to practical application needs. Attached Figure Description
[0042] Figure 1 This is a flowchart illustrating a specific implementation of the multi-objective testing optimization method based on Pareto dominance and Euclidean distance of the present invention.
[0043] Figure 2 This is a flowchart of individual selection in this invention;
[0044] Figure 3 This is the dependency matrix of test items and fault sources in this embodiment;
[0045] Figure 4 This is the target spatial distribution map of the initial population in this embodiment. Detailed Implementation
[0046] The specific embodiments of the present invention will now be described with reference to the accompanying drawings to enable those skilled in the art to better understand the invention. It should be particularly noted that in the following description, detailed descriptions of known functions and designs that might obscure the main content of the invention will be omitted here.
[0047] To better illustrate the technical solution of the present invention, the technical principles on which the present invention is based will be briefly explained first.
[0048] Multi-objective optimization problems (MaOPs) typically refer to problems involving three or more functions that need to be solved simultaneously, and can be represented by the following formula:
[0049] min F(X)={f1(X),f2(X),…,f M (X)}
[0050] Subject to g j (X)≤0,j=1,2,…,k
[0051] h j (X) = 0, j = 1, 2, ..., l
[0052] X = [x1, x2, ..., x D ],x d ∈{0.1}, d=1,2,…,D
[0053] Where M is the number of objectives to be optimized.
[0054] Multi-objective optimization algorithms select non-dominated individuals and remove dominated individuals using the Pareto dominance relation.
[0055] Pareto dominance is defined as follows: if the vector F(X) calculated from the preferred objective function... (1) ) and F(X (2)If the two phasors are not equal and F(X) (1) All elements in ) are not greater than F(X) (1) The element at the corresponding position in ) is called F(X). (1) Dominant F(X) (2) ), X (2) This is called the dominant solution, X (1) This is called a non-dominated solution, using express.
[0056] Pareto optimal solution: X * It is the optimal solution if and only if it does not exist. The solution is X.
[0057] Pareto optimal solution set (PS): all X * The set
[0058] As can be seen, the result of multi-objective optimization is a set of solutions, all of which are optimal, and there is no single "better" solution. Correspondingly, in test optimization, it means obtaining all the optimal solutions under the mutual constraints of various testability metrics, allowing for the selection of solutions with different emphases based on the application scenario.
[0059] Constraining Pareto dominance: X is considered to be dominant if one of the following conditions is met. (1) Constraint Domination X (2) , recorded as
[0060] (1) Individual X (1) and X (2) None of them satisfy all constraints, and X (1) The number of constraints violated is less than X (2) Number of constraints violated
[0061] (2) Only X (1) Satisfy all constraints
[0062] (3) Individual X (1) and X (2) All constraints are satisfied, and
[0063] The optimal testing method for analog circuits is a typical discrete optimization problem with a countable solution set (generally less than 100). Therefore, this invention takes into account Pareto dominance and Euclidean distance and proposes a multi-objective optimal testing method based on Pareto dominance and Euclidean distance. Figure 1 This is a flowchart illustrating a specific implementation of the multi-objective testing optimization method based on Pareto dominance and Euclidean distance of the present invention. Figure 1 As shown, the specific steps of the multi-objective test optimization method based on Pareto dominance and Euclidean distance of the present invention include:
[0064] S101: Determine the optimization objectives and test items for the preferred test:
[0065] Determine the optimization objectives and constraints for several test optimizations in the analog circuit as needed, denoted as M for the number of optimization objectives, and set the optimization objective function f for the test scheme. m (X), m = 1, 2, ..., M, the smaller the objective function value, the better the test plan. Let the constraint be AA. * ≥0, A represents the constraint parameter, A * This represents the parameter threshold. Then, D available test items are selected as candidate test items from the available test items of the analog circuit according to actual needs.
[0066] In the field of analog circuit fault diagnosis, the optimization objectives for test optimization include minimizing test costs, minimizing test time overhead, maximizing fault isolation, and maximizing fault detection rate. Clearly, when the optimization objective is to maximize these values, such as fault isolation and fault detection rate, the objective function can be set as the reciprocal of either fault isolation or fault detection rate. The optimization objectives for test optimization can be determined based on actual needs, selecting two or more of the above objectives. The parameters of the constraint conditions can generally be selected from one or more of fault isolation, fault detection rate, and false alarm rate.
[0067] S102: Initialize the population:
[0068] Randomly generate N individuals X i =[x i,1 ,x i,2 ,…,x i,D ], i = 1, 2, ..., N, each individual represents a test plan, x i,d =0 indicates that the d-th alternative test item was not selected in the test plan corresponding to the individual, x i,d =1 indicates that the d-th alternative test item is selected from the test plan corresponding to the individual, where d = 1, 2, ..., D. The N randomly generated individuals form the initial population P.
[0069] S103: Set the iteration count g = 1.
[0070] S104: Individual Crossover:
[0071] A crossover operation is performed on individuals in population P to generate population P′. Since each individual in this invention is a binary encoded vector, the classic single-point crossover method is used in this embodiment.
[0072] S105: Individual variation:
[0073] The individuals in population P′ are mutated to generate population Q. In this embodiment, the classic single-point mutation method is used for individual mutation.
[0074] S106: Merging populations:
[0075] The populations P and Q are merged to obtain the population S = P∪Q.
[0076] S107: Individual Choice
[0077] Next, the better individuals were selected based on Pareto dominance and Euclidean distance. Figure 2 This is a flowchart of the individual selection process in this invention. For example... Figure 2 As shown, the specific steps of individual selection in this invention include:
[0078] S201: Obtain Pareto dominance relationships between individuals:
[0079] Calculate the M optimization objective function values for each individual in population S, determine the Pareto dominance relationship between any two individuals based on the optimization objective function values, and count the number of times each individual is dominated.
[0080] S202: Individual Classification:
[0081] Set 2N sets L j For each j = 1, 2, ..., 2N, the individuals that have been dominated j-1 times are stored in set L. j In other words, all individuals that are not dominated are placed in set L1, individuals that have been dominated once are placed in set L2, and so on.
[0082] S203: Let j = 1, and optimize the set of individuals.
[0083] S204: Determine if If yes, proceed to step S208; otherwise, proceed to step S205.
[0084] S205: Determine if |L j |≤N-|K|, where || represents the number of individuals in the set. If yes, proceed to step S206; otherwise, proceed to step S209.
[0085] S206: Let K = K∪L j .
[0086] S207: Determine if |K| < N. If yes, proceed to step S208; otherwise, the individual selection ends.
[0087] S208: Let j = j + 1, then return to step S204.
[0088] S209: Selecting the optimal individual for a single objective:
[0089] For each optimization objective function, from set L jThe individual with the smallest objective function value is selected as the corresponding single-objective optimal individual.
[0090] S210: Determine if M≤N-|K|. If not, proceed to step S211; otherwise, proceed to step S212.
[0091] S211: Randomly add the optimal individual for a single objective:
[0092] From the M single-objective optimal individuals, N-|K| individuals are randomly selected and added to the preferred individual set K, and the individual selection ends.
[0093] S212: All individuals are added to the single-target optimal individual:
[0094] Add the M single-objective optimal individuals to the preferred individual set K, and remove the M single-objective optimal individuals from set L. j Delete it.
[0095] S213: Individual selection based on Euclidean distance:
[0096] For the current set L j Each individual in i j,h Represents the current set L j The original index of the h-th individual, h = 1, 2, ..., |L j |, respectively calculate its relationship with the |K| individuals X in the preferred individual set K. ik European distance i k Let |k| represent the original index of the k-th individual in the current preferred individual set K, where k = 1, 2, ..., |K|, and |K| represents the norm.
[0097] The minimum value among |K| Euclidean distances is taken as the individual. The distance to the preferred set of individuals K, i.e.
[0098] Then from the current set L j The individual with the largest distance from the selected set of individuals K is selected.
[0099] S214: Add an individual:
[0100] Individual Add to the preferred individual set K, and remove it from set L j Delete it.
[0101] S215: Determine whether the number of individuals in the current preferred individual set K is |K| < N. If yes, return to step S213; otherwise, the individual selection ends.
[0102] S108: Determine if the iteration count g < G max G max This indicates the preset maximum number of iterations. If so, proceed to step S109; otherwise, proceed to step S110.
[0103] S109: Let the iteration number g = g + 1, let the population P = K, and return to step S104.
[0104] S110: Obtain the optimal test solution:
[0105] Each individual in the preferred set of individuals K is used as a test preferred solution.
[0106] Example
[0107] To better illustrate the technical solution of the present invention, a specific example is used to experimentally verify the present invention.
[0108] For ease of explanation, this embodiment uses an automated dedicated test component as an example to illustrate the analog circuit. This automated dedicated test component includes 24 test items and 24 fault sources. Table 1 is an information table of test items and fault sources in this embodiment.
[0109]
[0110] Table 1
[0111] The dependency matrix between test items and fault sources can be obtained from the information table of test items and fault sources shown in Table 1. Figure 3 This is the dependency matrix of test items and fault sources in this embodiment. For example... Figure 3 As shown, the matrix element value d ij This indicates that test j can detect fault source i, 0 indicates that it cannot, and the normalized fault probability p for each fault is given. f Place Figure 2 The last column of the data table contains the test time c for each test item. t and testing cost c f Listed separately Figure 2 The last two rows of the data table.
[0112] For ease of explanation, this embodiment selects fault isolation rate and test time as optimization objectives, requires a fault detection rate of 100%, and has no requirement for test cost. The expression for the preferred objective is as follows:
[0113] min F(X)={f1(X),f2(X)}
[0114] Subject to h(X)=1-FDR=0
[0115] X = [x1, x2, ..., x24 ],x d ∈{0.1}, d=1,2,…,24
[0116] In the above formula, f1(X) = 1 - FIR, where FIR represents the fault isolation rate, and f2(X) = C T C T Indicates the fault isolation time.
[0117] In this embodiment, the crossover probability p is set. c =1, mutation probability p m = 1 / 24, number of iterations G max =100, number of individuals = 100, 100 individuals are randomly generated as the initial population. Table 2 is a partial example table of individuals in the initial population in this embodiment.
[0118] <![CDATA[X2]]> 1 0 1 0 1 1 0 1 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 0 <![CDATA[X3]]> 0 0 1 1 1 1 1 0 1 1 1 0 1 1 1 1 0 0 0 0 1 0 1 1 <![CDATA[X4]]> 0 1 0 0 1 1 0 1 0 1 1 0 0 1 0 0 1 0 1 1 0 1 1 1 <![CDATA[X5]]> 0 1 1 0 0 1 1 0 0 0 1 1 0 1 0 1 0 0 1 1 0 1 1 0
[0119] Table 2
[0120] As shown in Table 2. For example, the first element 0 of X1 in the first row indicates that test item 1 is not selected (the second row and fourth column of Table 1, "380V voltage monitoring"). The third element of X1 is 1, which indicates that test item 3 "inverter component function self-test abnormality" is selected, as shown in the fourth row and fourth column of Table 1.
[0121] Figure 4 This is the target spatial distribution map of the initial population in this embodiment. For example... Figure 4 As shown, 'o' represents the distribution of the initial population in the three-dimensional space formed by the objective function and the constraint 1-FDR. '*' represents the optimal individual distribution after the algorithm finishes running. From the definition of Pareto optimality, the optimal solution should be close to the origin. From the plan view (c), it can be seen that the initial population does not satisfy the equality constraint 1-FDR = 0, and most individuals can only achieve an FDR below 0.9 for their test items. After iteration, all individuals in the final population fall on the plane where 1-FDR = 0. From Figure (b), it can be seen that the initial population has many dominated solutions, and most of them are dominated by the final optimal solution. Some undominated solutions also do not satisfy the equality constraint.
[0122] Figure 4 The part marked with '*' contains 39 different non-dominated solutions, meaning that 39 different combinations of test items satisfying the equality constraints were found. These combinations are Pareto optimal solutions in the entire solution space, meaning that users can arbitrarily choose the optimal solution based on different priorities (isolation rate priority or test time priority).
[0123] Table 3 is the final test scheme and objective function value data table after iteration in this embodiment.
[0124]
[0125] Table 3
[0126] Table 3 shows a solution and its objective function in each row (the last two columns are the objective functions). It is evident that the objective functions of all solutions are independent of each other. The individual solutions starting from the second row correspond to... Figure 4 (b) Individuals marked with '*' from the left. Taking the first individual as an example, its FIR is the highest, reaching 1-0 = 100%, but at the cost of the longest testing time (0.9082). The last individual has the shortest testing time (0.4574), but its FIR is only 1-0.5580 = 44.2%. Users can choose one solution reasonably based on the importance of different indicators.
[0127] Although the illustrative specific embodiments of the present invention have been described above to enable those skilled in the art to understand the invention, it should be understood that the invention is not limited to the scope of the specific embodiments. For those skilled in the art, various changes are obvious as long as they are within the spirit and scope of the invention as defined and determined by the appended claims, and all inventions utilizing the concept of the present invention are protected.
Claims
1. A multi-objective test optimization method based on Pareto dominance and Euclidean distance, characterized in that, Includes the following steps: S1: Determine the optimization objectives and constraints for several test optimizations in the analog circuit as needed, denoted as M for the number of optimization objectives, and set the optimization objective function f for the test scheme. m (X), m = 1, 2, ..., M, the smaller the objective function value, the better the test plan; let the constraint condition be AA. * ≥0, A represents the constraint parameter, A * The parameter threshold is represented; then, D available test items are selected as alternative test items from the available test items of the analog circuit according to actual needs. S2: Randomly generate N individuals X i =[x i,1 ,x i,2 ,…,x i,D ], i = 1, 2, ..., N, each individual represents a test plan, x i,d =0 indicates that the d-th alternative test item was not selected in the test plan corresponding to the individual, x i,d =1 indicates that the d-th candidate test item is selected from the test plan corresponding to the individual, where d = 1, 2, ..., D; the N randomly generated individuals constitute the initial population P in the genetic algorithm; S3: Set the iteration count g = 1; S4: Perform crossover operations on individuals in population P to generate population P′; S5: Perform mutation operations on individuals in population P′ to generate population Q; S6: Merge population P and population Q to obtain population S = P∪Q; S7: Selecting superior individuals based on Pareto dominance and Euclidean distance, the specific steps include: S7.1: Calculate the M optimization objective function values for each individual in population S, determine the Pareto dominance relationship between any two individuals based on the optimization objective function values, and count the number of times each individual is dominated. S7.2: Set 2N sets L j For each j = 1, 2, ..., 2N, the individuals that have been dominated j-1 times are stored in set L. j middle; S7.3: Let j = 1, and select the optimal set of individuals. S7.4: Determine if If yes, proceed to step S7.8; otherwise, proceed to step S7.
5. S7.5: Determine if |L j |≤N-|K|, where || represents the number of individuals in the set. If yes, proceed to step S7.6; otherwise, proceed to step S7.
7. S7.6: Let K = K∪L j ; S7.7: Determine if |K| < N. If yes, proceed to step S7.8; otherwise, the individual selection ends. S7.8: Let j = j + 1, then return to step S7.4; S7.9: For each optimization objective function, from set L j The individual with the smallest objective function value is selected as the corresponding single-objective optimal individual. S7.10: Determine if M≤N-|K|. If not, proceed to step S7.11; otherwise, proceed to step S7.
12. S7.11: Randomly select N-|K| individuals from the M single-objective optimal individuals and add them to the preferred individual set K. The individual selection ends. S7.12: Add the M single-objective optimal individuals to the preferred individual set K, and remove the M single-objective optimal individuals from set L. j Delete; S7.13: For the current set L j Each individual in i j,h Represents the current set L j The original index of the h-th individual, h = 1, 2, ..., |L j |, calculate separately; and compare it with the |K| individuals X in the preferred individual set K. ik European distance i k Let |k| represent the original index of the k-th individual in the current preferred individual set K, where k = 1, 2, ..., |K|, and |k| represents the norm. The minimum value among |K| Euclidean distances is taken as the individual. The distance to the preferred set of individuals K, i.e. Then from the current set L j The individual with the largest distance from the selected set of individuals K is selected. S7.14: Individual Add to the preferred individual set K, and remove it from set L j Delete; S7.15: Determine whether the number of individuals in the current preferred individual set K is |K| < N. If yes, return to step S7.13; otherwise, the individual selection ends. S8: Determine if the number of iterations g < G max G max This indicates the preset maximum number of iterations. If so, proceed to step S9; otherwise, proceed to step S10. S9: Let the iteration number g = g + 1, let the population P = K, and return to step S4; S10: Take each individual in the preferred individual set K as a test preferred solution.
2. The preferred method for multi-target testing according to claim 1, characterized in that, In step S4, the individual crossover operation adopts the single-point crossover method.
3. The preferred method for multi-target testing according to claim 1, characterized in that, The individual mutation operation in step S5 uses the single-point mutation method.