Automatic distribution method for electric connector point position signals

Through a hybrid algorithm of genetic algorithm and simulated annealing algorithm, the electrical connector point signal is automatically allocated, which solves the problem of inefficient electrical system design in the existing technology, and achieves the efficiency and accuracy of electrical system design.

CN120387355APending Publication Date: 2025-07-29BEIJING JIAOTONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510141729.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-08
Publication Date
2025-07-29

AI Technical Summary

Technical Problem

In existing electrical system design software, the distribution of electrical connector point signal depends on manual experience, resulting in inefficient design efficiency and error-prone, making it difficult to automatically generate the optimal signal allocation solution.

Method used

A hybrid algorithm using a genetic algorithm and a simulated annealing algorithm is used to combine signal classification and spatial position relationship to automatically allocate the electrical connector point signal, and optimize the signal allocation process through the objective function to generate an optimal allocation scheme.

Benefits of technology

It improves the efficiency and accuracy of electrical system design, reduces the workload of manual design, and improves the automation level of electrical system design software.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120387355A_ABST
    Figure CN120387355A_ABST
Patent Text Reader

Abstract

The invention discloses an automatic distribution method for electric connector point position signals. The method comprises the steps that 1, the relative position relation and types of connector point positions are confirmed; 2, calculating the spatial position relation and the distance of the connector point locations, and storing the spatial position relation and the distance as a distance table; step 3, classifying the signals, dividing the signals to be distributed into different categories according to the characteristics of the signals, and endowing a unique classification index to the signals of each category; and 4, designing a hybrid algorithm of a genetic algorithm and a simulated annealing algorithm to solve the electric connector point location signal distribution problem, and obtaining a signal distribution scheme. According to the method, the point position signals of the electric connectors are automatically distributed during the design of an electrical system, actual constraint conditions are considered, and the optimal distribution result is generated. The workload of manual design is reduced, the efficiency and accuracy in electrical system design can be remarkably improved, and the automation level of electrical system design software is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of signal distribution, and particularly relates to an automatic distribution method for electrical connector point signals. Background Art

[0002] Electrical system design software is a type of computer application program used to assist in the design of electrical systems and is widely used in various engineering projects. Its main functions include electrical schematic drawing, selection of equipment and components, circuit layout, load calculation, signal distribution, etc.

[0003] The problem of electrical connector point signal distribution is to reasonably distribute various signals to the pins of the connector considering various signal characteristics, pin characteristics, and other constraint conditions to ensure system performance and stability while meeting a series of design constraints and optimization goals. As a key component for signal transmission in electronic devices, the signal distribution scheme of the points of the electrical connector directly affects the stability and reliability of the entire system. In current design software, the signal distribution method relies on engineers to assign corresponding signals to these electrical connectors according to some rules and experiences, which consumes a lot of time, resulting in low design efficiency; at the same time, it is prone to errors.

[0004] The problem of electrical connector point signal distribution is a discrete optimization problem, which solves how to find a special solution from a finite or infinite solution set that can optimize the target to be optimized. Currently, commonly used optimization algorithms include genetic algorithms, simulated annealing algorithms, ant colony algorithms, particle swarm algorithms, etc. These algorithms search for the global optimal solution by simulating the evolutionary or physical processes in nature, thereby achieving the best signal distribution. Summary of the Invention

[0005] The technical problem to be solved by the present invention is: in electrical system design software, considering constraints such as the distribution positions of positive and negative signals on the electrical connector, the correspondence between signal types and electrical connector pin types, etc., automatically generate an optimal electrical connector point signal distribution scheme to improve the efficiency of electrical system design and reduce the complexity of design.

[0006] In view of the problems and defects described in the above prior art, the present invention provides an automatic distribution method for electrical connector point signals, including: Step 1: Confirm the relative position relationship and type of connector points; Step 2: Calculate the spatial position relationship and distance of connector points and save them as a distance table; Step 3: Signal classification, classify the signals to be distributed according to signal characteristics into different categories, and each category of signal is assigned a unique classification index; Step 4: Design a hybrid algorithm of genetic algorithm and simulated annealing algorithm to solve the problem of electrical connector point signal allocation, and obtain a signal allocation scheme.

[0007] Further, the specific steps of Step 1 include: in the connector end face diagram model, using template matching technology, comparing the pre-designed template with the points in the actual image to identify and determine the relative positions of each point in the two-dimensional plane and the pin types of the points.

[0008] Further, the specific steps of Step 2 include: based on the point coordinates obtained in Step 1, calculating the spatial relationship and distance between points; calculating the straight-line distance between any two points by applying the distance formula between two points; sorting the data into a distance table to record the distance relationship between points and providing spatial information for subsequent signal allocation.

[0009] Further, in Step 3, the characteristics of the signal include frequency, intensity, and type.

[0010] Further, in Step 4, the objective function determined by the algorithm is as follows: When allocating specific positive and negative signal pairs, ensure that the positions of the two signals are far apart, and establish an objective function for the sum of the distances between positive and negative signals : ; Where, represents the priority weight of signal ; represents the priority weight of signal ; represents the set of pins, represents the th; represents the th; pin represents the set of pin numbers for positive signal allocation, represents the set of pin numbers for negative signal allocation; When allocating specific same-name signals, ensure that the signal positions are close, and establish an objective function for the sum of the distances between same-name signals : ; Where, represents the set of pin numbers for same-name signal allocation; For signals that need to be collected frequently, allocate them to the outer side of the connector, and establish an objective function for the sum of the distances between the signals distributed on the outer side and the center of the connector : ; Where, The set of pin numbers representing the signals distributed on the outer side; Determine the connector pins of the corresponding type for distribution according to the type of signal, and establish an objective function , reflecting the matching degree between the signal type and the connector pin type: .

[0011] Furthermore, in step 4, the hybrid algorithm includes the following steps: Step 401: Initialize the genetic population and parameters: Set the initial population and related parameters required by the algorithm; Initialize the simulated annealing parameters: Set the initial temperature and other parameters of the simulated annealing algorithm; Step 402: Calculate the fitness function: Evaluate the fitness of each individual in the current population; Step 403: Check whether the current iteration number reaches the preset maximum iteration number. If the current iteration number does not reach the maximum iteration number, continue to execute the following steps; Otherwise, jump to step 409; Step 404: Selection operation: Select individuals from the population to inherit to the next generation; Step 405: Adaptive crossover operation: Perform crossover operation according to the set rules to generate new individuals; Step 406: Adaptive mutation operation: Mutate individuals according to the set rules to increase the diversity of the population; Step 407: Calculate the fitness difference: Calculate the fitness difference between the newly generated individuals and the original individuals; Determine whether the fitness difference is greater than or equal to 0. If the fitness difference is greater than or equal to 0, accept the new solution; Otherwise, decide whether to accept the new solution according to the Metropolis criterion; Step 408: Check whether the current temperature is lower than the termination temperature. If the current temperature is lower than the termination temperature, end the algorithm; Otherwise, update the current temperature of the simulated annealing and return to step 403 to continue the iteration.

[0012] Step 409: The algorithm ends and outputs the final result.

[0013] Furthermore, step 401 specifically includes: The gene coding adopts the real number coding method, and each individual's gene is represented by a dictionary coding method; The gene of each individual represents a specific pin assignment scheme, the key of the dictionary is the pin number, and the value is the signal object.

[0014] Furthermore, step 404 specifically includes: Adopt the roulette wheel selection method, the chromosome The probability of being selected is:

[0015] Among them, the population size is , and the fitness of the current chromosome is , being the cumulative chromosome fitness.

[0016] Furthermore, the step 405 specifically includes: The partially matched crossover method is adopted, ensuring that each gene in each chromosome appears only once, and ensuring that there will be no duplicate allocation schemes during the signal allocation process.

[0017] Furthermore, the step 406 specifically includes: The insertion mutation operation is adopted, and new chromosomes are generated by inserting the genes at the gene loci into the remaining gene loci of the chromosomes.

[0018] The present invention has the following beneficial technical effects: The present invention proposes an automatic signal allocation method for the positions of an electrical connector, which solves the problem of signal allocation for the positions of the electrical connector based on a hybrid algorithm of a genetic algorithm and a simulated annealing algorithm. When designing an electrical system, it realizes the automatic allocation of the signals at the positions of the electrical connector, takes into account the actual constraint conditions, and generates an optimal allocation result. It reduces the workload of manual design, can significantly improve the efficiency and accuracy in the design of the electrical system, and improves the automation level of the electrical system design software. BRIEF DESCRIPTION OF THE DRAWINGS Figure 1 is a flowchart of an automatic signal allocation method for the positions of an electrical connector according to the present application; Figure 2 is a schematic diagram of the end face diagram model of the electrical connector according to the present application; Figure 3 is a flowchart of the hybrid algorithm based on the genetic algorithm and the simulated annealing algorithm according to the present application; Figure 4 is a schematic diagram of the gene coding method according to the present application; Figure 5 is a schematic diagram of the crossover operation according to the present application; Figure 6 is a schematic diagram of the mutation operation according to the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0020] To make the above objects, features, and advantages of the present application more obvious and understandable, the present application will be further described in detail below with reference to the attached Figure 1-6 drawings and specific embodiments.

[0021] To solve the above problems, the technical solution of the present invention is to provide an automatic signal allocation method for the positions of an electrical connector, as Figure 1As shown below, it includes the following steps: Step 1: Confirm the relative position relationship and type of the connector points; In the connector end-face diagram model, a connector contains various types of points. Using template matching technology, compare the pre-designed template with the points in the actual image to identify and determine the relative position of each point on the two-dimensional plane and the pin type of this point.

[0022] Step 2: Calculate the spatial position relationship and distance of the connector points, and save them as a distance table; Specifically, based on the point coordinates obtained in Step 1, this step will calculate the spatial relationship and distance between the points. By applying the distance formula between two points, the straight-line distance between any two points can be calculated. These data will be organized into a distance table to record the distance relationship between the points and provide the necessary spatial information for subsequent signal allocation.

[0023] Step 3: Signal classification. Classify the signals to be allocated according to signal characteristics such as frequency, intensity, type, etc. Each category of signals will be assigned a unique classification index; Step 4: Design a hybrid algorithm of genetic algorithm and simulated annealing algorithm for the electrical connector points.

[0024] Solve the signal allocation problem of the points to obtain a better signal allocation scheme; specifically, Step 4 specifically includes: Define the following parameters: represents the signal set, represents the th signal. represents the pin set, represents the th pin. Each pin can only connect one signal to ensure the uniqueness of signal allocation; represents the relative position coordinates of the th pin; represents the priority weight of signal ; represents the preference weight for signal type to be allocated to the connector pin type ; Determine the following objective function according to the defined model: (1) When allocating some specific positive and negative signal pairs, try to ensure that the two signals are far apart to reduce the interference between the same signals and reduce the risk of possible short circuits. Establish an objective function for the sum of the distances of positive and negative signal pairs : ; Among them, represents the set of pin numbers for positive signal distribution, represents the set of pin numbers for negative signal distribution.

[0025] (2) When allocating some specific signals with the same name, try to ensure that the signal positions are relatively close to reduce the interference of other signals and ensure the signal transmission efficiency. Establish an objective function for the sum of the distances of signals with the same name : ; Among them, represents the set of pin numbers for the distribution of signals with the same name.

[0026] (3) Considering that some signals often need to be collected during debugging, they should be allocated to the outer positions of the connector for convenient wiring. Establish an objective function for the sum of the distances between the signals distributed on the outer side and the center of the connector : ; Among them, represents the set of pin numbers for the signals distributed on the outer side.

[0027] (4) It is necessary to determine what type of connector pins should be allocated according to the type of signal. Therefore, establish an objective function , reflecting the matching degree between the signal type and the connector pin type.

[0028] ;

[0029] Perform dimensionless processing on the multi-objective function: For the objective function First, find its maximum and minimum values. The processed objective function is as shown in the formula: ; Among them, is the minimum value of the objective function , is the maximum value of the objective function .

[0030] Similarly, perform dimensionless processing on the objective function respectively: ; ; ; Convert the multi-objective function into a single-objective function: The multi-objective function is transformed by the linear weighted combination method, the weights of each function in the multi-objective function are calculated, and then they are linearly added to be transformed into a single-objective function: ;

[0031] Among them, the constraint conditions are satisfied: ;

[0032] Such as Figure 2 shown, a genetic algorithm and a simulated annealing algorithm in the step 4 include: Step 401, initialize the genetic population and parameters: set the initial population and related parameters required by the algorithm. Initialize the simulated annealing parameters: set parameters such as the initial temperature of the simulated annealing algorithm; Step 402, calculate the fitness function: evaluate the fitness of each individual in the current population; Step 403, check whether the current iteration number reaches the preset maximum iteration number. If the current iteration number does not reach the maximum iteration number, continue to execute the following steps; otherwise, jump to step 409; Step 404, selection operation: select individuals from the population to inherit to the next generation; Step 405, adaptive crossover operation: perform a crossover operation according to the set rules to generate new individuals; Step 406, adaptive mutation operation: perform a mutation operation on the individuals according to the set rules to increase the diversity of the population; Step 407, calculate the fitness difference: calculate the fitness difference between the newly generated individuals and the original individuals. Judge whether the fitness difference is greater than or equal to 0. If the fitness difference is greater than or equal to 0, accept the new solution; otherwise, decide whether to accept the new solution according to the Metropolis criterion.

[0033] Step 408, check whether the current temperature is lower than the termination temperature. If the current temperature is lower than the termination temperature, end the algorithm; otherwise, update the current temperature of the simulated annealing and return to step 403 to continue the iteration.

[0034] Step 409, the algorithm ends and outputs the final result.

[0035] Further explanation, the step 401 specifically includes: Such as Figure 3 shown, the gene coding adopts the real number coding method, and each individual's gene is represented by a dictionary coding method. Each individual's gene represents a specific pin assignment scheme, the key of the dictionary is the pin number, and the value is the signal object.

[0036] The population initialization includes the following steps: a) Read all signals and their priority information and store them in the signal set ; read the information of all pins and store them in the pin set ; b) Then perform priority sorting: sort the signals in the signal set from high to low according to their priorities; c) Initialize the pin allocation list: create an empty list with the same number of elements as the pins in the pin set to store the allocation results of each pin; d) Take out a signal in sequence from the signal set , select an unused pin from the pin set , allocate the signal to the pin , and record the allocation result in the pin allocation list; e) Delete the allocated signal from the signal set to ensure that the signal will not be allocated repeatedly.

[0037] Specifically, step 404 includes: Using the roulette wheel selection method, the probability that a chromosome is selected is: ;

[0038] where the population size is , the fitness of the current chromosome is , is the cumulative chromosome fitness; Furthermore, step 405 includes: As Figure 4 shown, using the partially matched crossover method ensures that each gene in a chromosome appears only once, ensuring that no duplicate allocation schemes will occur during the signal allocation process.

[0039] The specific steps are as follows: a) Randomly select the start and end positions of several genes in a pair of chromosomes (parents), and the selected positions of the two chromosomes are the same; b) Exchange the positions of these two groups of genes; c) Perform conflict detection, establish a mapping relationship based on the two exchanged groups of genes, and convert the conflicting signals according to the mapping relationship until there is no conflict.

[0040] Set the crossover probability, based on SigmoidThe adaptive crossover formula of the activation function is as follows. In this way, the crossover probability will be adaptively adjusted inside the algorithm.

[0041] ;

[0042] In the above formula, and respectively represent the lower and upper limits of the crossover rate value; represents the average fitness function value of the individuals in the population; represents the maximum fitness function value of the individuals in the population; represents the larger one of the fitness function values of the two individuals in the crossover operation; is Sigmoid the adjustment parameter of the activation function.

[0043] For further explanation, the step 406 includes: As Figure 5 shown, the operation of insertion mutation is adopted. By inserting the gene at a certain locus into other loci of the chromosome, a new chromosome is generated. The specific steps are as follows: a) Randomly select a chromosome; b) Randomly select a gene on the chromosome and randomly move this gene to other loci in the chromosome to generate an offspring chromosome.

[0044] Set the mutation probability. The adaptive mutation formula based on the Sigmoid activation function is as follows. In this way, the mutation probability will be adaptively adjusted inside the algorithm.

[0045] ;

[0046] In the above formula, and respectively represent the lower and upper limits of the mutation rate value; represents the fitness function value of the individual to be mutated; The adaptive crossover and mutation method makes and 's adaptive curves be slowly adjusted at and improve the fitness in a large range and the and of similar individuals, expand the search area, and improve the diversity of the signal allocation results; at the same time, it reduces the and of the individuals with high fitness, and protects the excellent individuals with high fitness in the population from being discarded. At the same time, as Figure 6 shown, based on the sigmoid function, the adaptive adjustment curves of the crossover rate and mutation rate, no matter and No matter how the difference between them changes, it has a large gap from the linear adaptive operator and the adaptive operator based on the cosine function.

[0047] For further illustration, the step 408 includes: When the termination annealing condition is not met, update the current temperature of the simulated annealing and perform a cooling operation. The cooling strategy is as shown in the formula, and it is easy to control the temperature reduction rate using this strategy.

[0048] ;

[0049] In the formula represents the temperature after the k-th cooling; represents the cooling rate.

[0050] The above has introduced in detail a method for automatically allocating signals at the points of an electrical connector provided in this application. Specific examples are used in this article to elaborate on the principle and implementation manner of this application. The description of the above embodiments is only used to help understand the method and its core idea of this application; at the same time, for those of ordinary skill in the art, based on the idea of this application, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to this application.

[0051] The above embodiments have described in detail the technical solutions of the present invention. Obviously, the present invention is not limited to the described embodiments. Based on the embodiments of the present invention, those skilled in the art can also make various changes accordingly, but any changes equivalent or similar to the present invention belong to the scope of protection of the present invention. The content not described in detail in this specification belongs to the prior art well-known to those skilled in the art.

Claims

1. An automatic allocation method for point signals of an electrical connector, characterized in that including: Step 1: Confirm the relative position relationship and type of the connector points; Step 2: Calculate the spatial position relationship and distance of the connector points, and save them as a distance table; Step 3: Signal classification, classifying the signals to be allocated into different categories according to the characteristics of the signals, and each category of signals is assigned a unique classification index; Step 4: Design a hybrid algorithm of genetic algorithm and simulated annealing algorithm to solve the problem of signal allocation for the electrical connector points, and obtain a signal allocation scheme.

2. The automatic allocation method for the point signals of an electrical connector according to claim 1, wherein, In the specific implementation of Step 1, in the connector end face diagram model, using template matching technology, compare the pre-designed template with the points in the actual image to identify and determine the relative position of each point on the two-dimensional plane and the pin type of the points.

3. The method for automatically allocating electrical connector position signals according to claim 2, wherein: In the specific implementation of Step 2, based on the point coordinates obtained in Step 1, calculate the spatial relationship and distance between the points; by applying the distance formula between two points, calculate the straight-line distance between any two points; organize the data into a distance table to record the distance relationship between the points and provide spatial information for subsequent signal allocation.

4. The automatic allocation method for the point signals of an electrical connector according to claim 3, characterized in that, In Step 3, the characteristics of the signals include frequency, intensity, and type.

5. The automatic allocation method for the point signals of an electrical connector according to claim 4, characterized in that, In Step 4, the objective function determined by the algorithm is as follows: When allocating specific positive and negative signal pairs, ensure that the two signals are located far apart, and establish an objective function for the sum of the distances between the positive and negative signals : ; Among them, represents the priority weight of signal ; represents the priority weight of signal ; represents a set of pins, represents the th; represents the th; pin represents the set of pin numbers for positive signal allocation, represents the set of pin numbers for negative signal allocation; When allocating specific signals with the same name, ensure that the signal positions are relatively close, and establish an objective function for the sum of the distances of signals with the same name : ; Among them, represents the set of pin numbers for the same-name signal distribution; For signals that need to be frequently collected, allocate them to the outer positions of the connector, and establish an objective function for the sum of the distances between the signals distributed on the outer side and the center of the connector : ; Among them, represents the set of pin numbers for signal distribution allocated on the outer side; Determine the corresponding type of connector pins to be allocated according to the type of signal, and establish an objective function , reflecting the matching degree between the signal type and the connector pin type: 。 6. The method for automatically allocating electrical connector position signals according to claim 5, wherein: In Step 4, the algorithm includes the following steps: Step 401: Initialize the genetic population and parameters: Set the initial population and related parameters required by the algorithm; Initialize the simulated annealing parameters: Set the initial temperature and other parameters of the simulated annealing algorithm; Step 402: Calculate the fitness function: Evaluate the fitness of each individual in the current population; Step 403: Check whether the current iteration number reaches the preset maximum iteration number. If the current iteration number does not reach the maximum iteration number, continue to execute the following steps; otherwise, jump to Step 409; Step 404: Selection operation: Select individuals from the population to inherit to the next generation; Step 405: Adaptive crossover operation: Perform crossover operation according to the set rules to generate new individuals; Step 406: Adaptive mutation operation: Mutate individuals according to the set rules to increase the diversity of the population; Step 407: Calculate the fitness difference: Calculate the fitness difference between the newly generated individuals and the original individuals; Judge whether the fitness difference is greater than or equal to 0. If the fitness difference is greater than or equal to 0, accept the new solution; otherwise, decide whether to accept the new solution according to the Metropolis criterion; Step 408: Check whether the current temperature is lower than the termination temperature. If the current temperature is lower than the termination temperature, end the algorithm; otherwise, update the current temperature of the simulated annealing and return to Step 403 to continue the iteration; Step 409: The algorithm ends and outputs the final result.

7. The automatic allocation method for the point signals of an electrical connector according to claim 6, wherein In the specific implementation of Step 401, gene coding adopts a real number coding method, and represents the genes of each individual through a dictionary coding method; the genes of each individual represent a specific pin allocation scheme, the keys of the dictionary are pin numbers, and the values are signal objects.

8. The automatic allocation method for the position signals of an electrical connector according to claim 7, characterized in that In the specific implementation of Step 404, it includes: Using the roulette wheel selection method, the chromosome The probability of being selected is as follows: ; Among them, the population size is , the current chromosome has a fitness of , is the cumulative chromosome fitness.

9. The automatic allocation method for the point position signals of an electrical connector according to claim 8, characterized in that In the specific implementation of Step 405, it includes: The partial matching crossover method is adopted to ensure that each gene in a chromosome appears only once, ensuring that no duplicate allocation schemes will occur during the signal allocation process.

10. The automatic allocation method for the point signals of an electrical connector as described in claim 9, wherein, The specific steps of step 406 include: The operation of insertion mutation is adopted to generate a new chromosome by inserting the gene at the locus into the remaining loci of the chromosome.