A circuit board heating film layout optimization method based on a genetic algorithm
Patent Information
- Application Number
- CN202311126114.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-01
- Publication Date
- 2026-09-22
- Estimated Expiration
- 2043-09-01
AI Technical Summary
[0007]针对现有技术的上述缺陷和不足,为解决现有电路板加热膜布局设计主要依靠热设计工程师的个人经验进行设计所导致的设计效率低、加热均匀性得不到保证等技术问题,本发明提出了一种对电路板加热膜的布局方案进行自动优化的方法,具体是一种基于遗传算法的电路板加热膜布局优化方法,可以根据电路板表面的元件密度灵活设定加热膜覆盖面积,在实现优化设计的同时保证加热膜的尺寸满足规定需求,实现了加热膜布局方案的自动优化设计,提高了工作效率,保证了电路板在加热过程中的温度均匀性
[0053]同现有技术相比,本发明的基于遗传算法的电路板加热膜布局优化方法具有以下有益且显著的技术效果:
Smart Images

Figure CN117150909B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of thermal design of electronic devices, and to a method for optimizing the layout of heating films on circuit boards. In particular, it relates to a method for optimizing the layout of heating films on circuit boards based on genetic algorithms, which realizes automatic optimization design of the layout of heating films on circuit boards, improves work efficiency, and ensures the temperature uniformity of the circuit board during the heating process. Background Technology
[0002] Low temperatures have a significant impact on the operation of electronic equipment. When temperatures are too low, the performance of electronic components changes, causing circuit parameters to deviate from design values and even leading to malfunctions. For example, the impedance of passive components such as resistors, capacitors, and inductors changes with temperature, affecting the circuit's frequency response and filtering characteristics; the forward voltage, leakage current, and noise of active components such as transistors, diodes, and integrated circuits change with temperature, affecting the circuit's gain, distortion, and stability; LCD displays may exhibit slow response times and unclear display at low temperatures. In particular, some critical analog circuits and timing circuits, whose performance parameters are highly temperature-dependent, are prone to losing their normal operating capabilities under low-temperature conditions. To ensure the normal operation of equipment, temperature compensation or heating is necessary for electronic devices.
[0003] Electronic equipment in the aerospace and weaponry fields needs to operate in extremely cold environments such as high altitudes or polar regions. These devices are highly sensitive to changes in ambient temperature. Failure to provide timely thermal compensation can lead to signal errors and decreased stability. To ensure normal operation in low-temperature environments, electric heating films are commonly used for temperature compensation, ensuring that the equipment's parameters remain within their normal operating temperature range. Electric heating films are thin-film heaters made by pressing flexible insulating materials and foil-like conductive materials together. They can be applied to the surface or interior of electronic equipment, converting input DC or AC electrical energy into heat energy and transferring it to the heated object through heat conduction or radiation to produce a uniform surface heating effect. Currently, they are widely used in aerospace electronic equipment, precision instruments, and other applications, offering advantages such as low cost, light weight, and high customizability. They can achieve uniform and rapid heating, and precise temperature control can be achieved by adjusting the voltage.
[0004] When a heating film is attached to the surface of a circuit board for heating, the heat conduction between the heating film and the components directly affects the temperature rise rate and steady-state temperature distribution of the circuit board. The temperature uniformity of the circuit board is directly related to the layout of the heating film. A reasonable layout can ensure that critical areas receive sufficient heat, thereby achieving rapid and uniform heating of the entire circuit board. To achieve rapid and uniform heating, the heating film needs to be placed in critical areas of the circuit board, while comprehensively considering the power consumption distribution of the components, the overall structure of the board, and the thermal conductivity characteristics. Generally speaking, areas with higher power consumption, poorer heat dissipation conditions, and higher temperature requirements should be prioritized for heating film placement, and their supply voltage or duty cycle should be adjusted to achieve temperature balance. At the same time, heating film should be avoided in unimportant or already overheated areas to prevent waste or damage. In addition, the synergistic effect between the heating film and external heat dissipation devices should be considered to optimize airflow direction and heat dissipation efficiency. If the heat conduction effect is poor or the heating film is not properly placed, large temperature gradients may appear between different areas of the circuit board, causing local overheating or undercooling, which will lead to a decrease in the stability and reliability of the circuit board, and in severe cases, may even damage electronic components. Therefore, when designing and using electric heating films, the electric heating films should be arranged reasonably according to the actual situation to ensure that the circuit board reaches the ideal temperature state.
[0005] Current circuit board heating film layout design mainly relies on the personal experience or empirical formulas of thermal design engineers for calculation and simulation. This method has drawbacks such as low design efficiency and inability to guarantee heating uniformity. In order to improve the quality and efficiency of circuit board heating film layout, it is necessary to develop more advanced circuit board heating film layout optimization methods to optimize parameters such as the shape, size, and position of the heating film and ensure the temperature uniformity of the circuit board during the heating process. This is a technical problem that urgently needs to be solved. Summary of the Invention
[0006] (I) Purpose of the Invention
[0007] To address the aforementioned shortcomings and deficiencies of existing technologies, and to resolve the technical problems of low design efficiency and unreliable heating uniformity caused by the reliance on the personal experience of thermal design engineers in the design of existing circuit board heating film layouts, this invention proposes a method for automatically optimizing the layout scheme of circuit board heating films. Specifically, it is a circuit board heating film layout optimization method based on a genetic algorithm. This method can flexibly set the heating film coverage area according to the component density on the circuit board surface, ensuring that the heating film size meets the specified requirements while achieving optimized design. This realizes the automatic optimization design of the heating film layout scheme, improves work efficiency, and ensures the temperature uniformity of the circuit board during the heating process.
[0008] (II) Technical Solution
[0009] To achieve the objective of this invention and solve its technical problems, the present invention adopts the following technical solution:
[0010] A method for optimizing the layout of heating films on circuit boards based on genetic algorithms, characterized in that the method includes at least the following steps during implementation:
[0011] SS1. Perform grid division and set coding rules for the circuit board and its electronic components.
[0012] First, the circuit board and the electronic components located on the front of the circuit board are divided into uniform grid nodes on a plane according to two mutually orthogonal dimensions;
[0013] Secondly, the divided grid nodes are binary encoded according to the following rules: the back of the circuit board is the heating film layout area, and the grid nodes on the back of the circuit board are the encoding objects. Each grid node corresponds to a bit of encoding value. If a bit of encoding value is set to "1", it means that the area of the corresponding grid node needs to be covered with heating film. Conversely, if the encoding value is set to "0", it means that the area of the corresponding grid node does not need to be covered with heating film.
[0014] SS2. Initial Genetic Population Based on Initial Layout of Heating Film
[0015] First, define the size of the initial genetic population and determine the number of individuals in the initial genetic population;
[0016] Secondly, the initial layout of the heating film for each individual in the first-generation genetic population is generated as follows: Based on the grid nodes divided in step SS1, a grid node is randomly selected as the starting node in the heating film layout area and the heating film is placed. Then, the remaining heating film placement nodes are generated using the grid marking method. The grid marking method refers to marking the adjacent nodes of the determined heating film placement nodes, randomly selecting a grid node from the marked grid nodes as the next heating film placement node, and remarking the adjacent grid nodes each time a new heating film placement node is placed. This process is repeated until the number of heating film placement nodes reaches a preset value.
[0017] SS3. Solving for the corresponding circuit board temperature distribution based on the heating film layout of individuals in the population.
[0018] First, based on the mesh nodes defined in step SS1, the mesh nodes of the circuit board and electronic components are connected by the following linear heat conduction equation:
[0019]
[0020] Where C is the heat capacity of the grid node, T is the node temperature, t is time, Δt is the time step, i, j, k are the coordinates of any central grid node in three mutually orthogonal directions in space, N is the coordinate of any adjacent grid node of the central grid node, and G is the coordinate of any adjacent grid node of the central grid node. N Q is the thermal conductivity between any adjacent grid node and the central grid node. i,j,k For the heat source term at the central grid node;
[0021] Secondly, for the heating film layout of each individual in the genetic population, the heat conduction equations corresponding to all grid nodes are combined into a linear system of equations, and the temperature distribution of the entire circuit board is obtained by solving the Gauss-Seidel iterative method.
[0022] SS4. Calculate the fitness of each individual in the population based on the circuit board temperature distribution corresponding to each individual.
[0023] First, for the heating film layout of each individual in the genetic population, based on the circuit board temperature distribution obtained in step SS3, the individual fitness is calculated based on the following functional relationship:
[0024]
[0025] Where, for each individual in the genetic population, f is the individual fitness value, and T max T represents the maximum temperature value in the circuit board temperature distribution obtained in step SS3. min This refers to the minimum temperature value in the circuit board temperature distribution obtained in step SS3;
[0026] Secondly, based on the fitness value f of each individual obtained by calculation, the quality and degree of excellence of each individual in the genetic population are evaluated, and used as the basis for elimination or entry into the next generation of the genetic line.
[0027] SS5. Perform genetic operations to optimize the heating film layout of the circuit board.
[0028] First, a genetic algorithm is used to iteratively generate offspring populations generation by generation, with each individual in the offspring population corresponding to a circuit board heating film layout.
[0029] Secondly, for the circuit board heating film layout corresponding to each individual in the offspring population, the corresponding circuit board temperature distribution is obtained based on step SS3.
[0030] Then, based on the circuit board temperature distribution corresponding to each individual in the offspring population, the fitness value f of each individual in the offspring population is obtained by solving the individual fitness calculation function in step SS4.
[0031] SS6. Determine whether to end the optimization process based on whether the set number of iterations has been reached.
[0032] The number of iterations in the genetic optimization process is set. If the set number of iterations is not reached, the genetic population continues to perform the genetic optimization operation described in step SS5 and enters the next genetic optimization operation loop. If the set number of iterations is reached, the individual with the highest fitness value in the genetic population is selected as the optimal individual, and the circuit board heating film layout optimization process ends.
[0033] Preferably, in step SS3 above, the boundary conditions of the thermal conductivity equation are given based on the thermal conditions of the actual physical environment in which the circuit board is located.
[0034] Preferably, in step SS3 above, the initial temperature of the thermal conductivity equation is given based on the thermal conditions of the actual physical environment of the circuit board, the total heating power of the thermal conductivity equation is given based on the heating of the circuit board and its electronic components, the calculation termination time is determined based on the time range of the temperature simulation, and the time step is determined based on the calculation efficiency and simulation accuracy of the temperature simulation.
[0035] Preferably, in step SS5 above, the process of generating offspring populations generation by generation using genetic operations includes three sub-steps set sequentially: selection, crossover, and mutation. Before performing the genetic operations, a crossover probability and a mutation probability are set in advance.
[0036] Furthermore, in step SS5 above, when performing the selection sub-step, the individual with the highest fitness in each generation of the population is completely copied to the next generation, and the remaining individuals are selected by "roulette wheel" and then the subsequent crossover and mutation operations are performed in sequence.
[0037] Furthermore, in step SS5 above, when performing the crossover sub-step, a connectivity judgment method is used to perform the crossover operation, and the layout of the heating film on the circuit board is equivalent to a binary image. Each grid node represents a pixel in the image, and a binary image connectivity judgment algorithm is used for judgment.
[0038] Furthermore, in step SS5 above, the crossover sub-step is executed in the following manner:
[0039] For any individual i in the population, first determine whether it should participate in the crossover operation. Specifically, generate a random number between 0 and 1. If the random number is greater than the crossover probability, individual i skips the crossover operation directly. If the random number is less than the crossover probability, pair individual i with other individuals except itself.
[0040] Secondly, to ensure that the offspring after crossover satisfy the connected component constraint, it is first determined whether there is a common point between individual i and the selected paired individual j. If there is no common point, the paired individual j is removed and a new pairing is performed; if there is a common point, a common point is randomly selected as the crossover point to perform single-point crossover.
[0041] Next, the connectivity of the two offspring generated after the crossover is checked:
[0042] If both offspring satisfy connectivity, then randomly select one of the offspring to replace individual i;
[0043] If only one offspring satisfies connectivity, then select that offspring to replace individual i;
[0044] If neither offspring satisfies connectivity, the common point is removed from the list of possible common points, and a new common point is selected for single-point intersection until an offspring that satisfies connectivity is obtained.
[0045] If a child that satisfies connectivity cannot be obtained after all possible common points have been eliminated, then the paired individual j is eliminated and a new pairing is performed.
[0046] If an individual i cannot obtain offspring that satisfy connectivity after all its pairable individuals have been removed, the crossover operation is skipped.
[0047] Furthermore, in step SS5 above, the mutation operation determines the number of bits of code to be mutated based on the number of "1"s in the layout scheme of the heating film. When setting a certain bit to "1", a grid marking method is used. After setting a certain bit to "0", a connectivity judgment is required.
[0048] Furthermore, in step SS5 above, the mutation sub-step is executed in the following manner:
[0049] The heating film coverage area is determined based on the number of "1"s in the individual code to see if it matches the preset value. If it is greater than or less than the preset value, the difference between the two determines the number of bits in the code that need to be set to "0" or "1". If it is equal to the preset value, a set of random numbers between 0 and 1 is generated according to the individual's code length. All random numbers are compared with the mutation probability, and the number of random numbers less than the mutation probability is counted. This number is the number of bits in the code that need to be inverted.
[0050] When setting a certain bit code to "1", first mark the grid nodes around the heating film, then randomly select a grid node and set the code value of the corresponding grid node to "1".
[0051] After setting a bit to "0", the resulting individual must still meet the connectivity requirements; otherwise, cancel the setting operation and select another bit to set to "0" again until the offspring meet the connectivity requirements.
[0052] (III) Technical Effects
[0053] Compared with the prior art, the circuit board heating film layout optimization method based on genetic algorithm of the present invention has the following beneficial and significant technical effects:
[0054] 1. When performing genetic operations, this invention considers the constraints such as connectivity and coverage area of the heating film layout scheme, and adopts technical means such as grid marking method and connectivity judgment method to ensure that the offspring generated after crossover and mutation still meet the constraints such as connectivity and coverage area. This makes the grid nodes of the heating film arranged according to the optimization results of this invention a connected domain. Each circuit board only needs to lay one heating film and supply power, which is very convenient in practical applications.
[0055] 2. The circuit board heating film layout optimization method based on genetic algorithm of the present invention can flexibly set the heating film coverage area according to the component density on the circuit board surface. While achieving optimized design, it ensures that the size of the heating film meets the specified requirements, avoiding the blindness of relying on experience to design a given heating film area in the existing method, and making the setting of the heating film coverage area more reasonable and accurate.
[0056] 3. The circuit board heating film layout optimization method based on genetic algorithm of the present invention realizes the automatic optimization design of heating film layout scheme, improves work efficiency, and improves the temperature uniformity of circuit board during heating process.
[0057] 4. The circuit board heating film layout optimization method based on genetic algorithm of the present invention adopts grid partitioning and binary encoding to transform the circuit board heating film layout problem into a binary optimization problem, which simplifies the complexity of the problem and improves the calculation speed.
[0058] 5. The circuit board heating film layout optimization method based on genetic algorithm of the present invention utilizes the selection, crossover, and mutation operations of genetic algorithm to optimize the circuit board heating film layout scheme generation by generation. The individual fitness function is used to evaluate the circuit board temperature distribution corresponding to each layout scheme, thereby finding the optimal or near-optimal layout scheme. Furthermore, in solving the circuit board temperature distribution, the present invention employs the linear thermal conduction equation and the Gauss-Seidel iteration method. Based on the actual physical environment of the circuit board, boundary conditions, initial temperature, total heating power, time step, and other parameters are given, achieving accurate simulation of the circuit board temperature distribution. Attached Figure Description
[0059] Figure 1 This is a flowchart of the circuit board heating film layout optimization method based on genetic algorithm of the present invention.
[0060] Figure 2 This is a schematic diagram of the circuit board grid division in this invention.
[0061] Figure 3 This is a schematic diagram of the grid marking method in this invention.
[0062] Figure 4 This is a schematic diagram of the positional relationship of the grid nodes in this invention.
[0063] Figure 5 This is a schematic diagram of the boundary conditions for the heat conduction equation in this invention.
[0064] Figure 6 This is a schematic diagram of the connectivity determination method in this invention.
[0065] Figure 7 This is a flowchart of the cross-operation process in this invention.
[0066] Figure 8 This is a flowchart of the mutation operation in this invention.
[0067] Figure 9 This is a schematic diagram of the iterative curve of the optimal individual fitness value in this invention.
[0068] Figure 10 This is a comparison diagram of the geometric shapes before and after the optimization of the heating film layout in this invention.
[0069] Figure 11 This is a comparison diagram of simulation results before and after the optimization of the heating film layout in this invention. Detailed Implementation
[0070] To better understand the present invention, the following embodiments further illustrate its content. Throughout the accompanying drawings, the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions. The described embodiments are some, but not all, of the embodiments of the present invention. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain the present invention, and should not be construed as limiting the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention. The structure and technical solutions of the present invention will be further described in detail below with reference to the accompanying drawings, providing one embodiment of the present invention.
[0071] like Figure 1As shown, the circuit board heating film layout optimization method proposed in this invention includes the following steps: dividing the circuit board and its electronic components into grids and setting encoding rules; randomly generating an initial layout and generating the first generation of genetic population for a genetic algorithm; solving the circuit board temperature distribution corresponding to the heating film layout of individuals in the population; calculating the individual fitness based on the circuit board temperature distribution corresponding to each individual in the population; performing genetic operations to optimize the heating film layout of the circuit board; and determining whether the optimization process ends.
[0072] Taking a circuit board with dimensions of 120mm (length) × 110mm (width) × 2mm (height) as an example, a 2200mm² area needs to be arranged on the back of the circuit board. 2 The heating film, in this example, corresponds to 110 grid cells. The optimization process is configured as follows: population size is 50, crossover probability is 0.8, mutation probability is 0.01, and iteration termination step count is 2000.
[0073] Step 1. The process of mesh generation and coding of the circuit board and its electronic components is as follows:
[0074] The circuit board and electronic components are divided on a plane according to two mutually orthogonal dimensions, as follows: Figure 2 The uniform grid cells are shown. Then, the divided grid nodes are binary encoded according to the following rules: the grid nodes on the back of the circuit board are used as the encoding objects; each grid node corresponds to one bit of encoding. Setting a bit to 1 indicates that the corresponding grid node area is equipped with a heating film, while setting it to 0 indicates that the corresponding area is not equipped with a heating film.
[0075] Step 2. After completing the grid cell division of the circuit board and electronic components, the initial layout of the heating film is randomly generated as follows, and the initial genetic population of the genetic algorithm is generated based on the initial layout:
[0076] First, define the size of the initial genetic population and determine that the number of individuals in the initial genetic population is 50.
[0077] Secondly, the initial layout of the heating membrane for each individual in the first-generation genetic population is generated as follows: First, a starting node is randomly selected in the layout area to place the heating membrane, and then the remaining heating membrane nodes are generated using a grid marking method. For example... Figure 3 As shown, this marking method refers to marking the adjacent nodes (green) of the determined heating film node (red in the figure), randomly selecting a node from the marked nodes as the next heating film placement node, and remarking the adjacent nodes every time a new heating film node is placed, and so on, until the number of heating film nodes reaches the preset value of 110.
[0078] Step 3. The solution process for the temperature distribution corresponding to the heating film layout of individuals in the population is as follows:
[0079] First, based on the mesh nodes divided in step 1, such as Figure 4 As shown, the grid nodes of the circuit board and electronic components are connected by the thermal conductivity equation:
[0080]
[0081] Where C is the heat capacity of the grid node, T is the node temperature, t is time, Δt is the time step, i, j, k are the coordinates of any central grid node in three mutually orthogonal directions in space, N is the coordinate of any adjacent grid node of the central grid node, and G is the coordinate of any adjacent grid node of the central grid node. N Q is the thermal conductivity between any adjacent grid node and the central grid node. i,j,k This refers to the heat source term at the central grid node. For example... Figure 5 As shown, based on the actual heat exchange environment of the circuit board, the boundary conditions for the heat conduction equation are as follows: the inner surface of the chassis is used as the calculation boundary in the +z direction and is set as a constant-temperature wall with a temperature of -55℃; the five surfaces other than the +z surface are set as adiabatic walls. The initial temperature is -55℃, the total heating power is 30W, the calculation termination time is 120 seconds, and the time step is 0.5s.
[0082] Secondly, for the heating film layout of each individual in the genetic population, the heat conduction equations of all nodes are combined into a system of equations, and the temperature distribution is obtained by solving the Gauss-Seidel iterative method.
[0083] Step 4. Calculate the fitness of each individual in the population based on the temperature distribution corresponding to each individual.
[0084] First, for each individual in the genetic population, based on the heating film layout and the circuit board temperature distribution obtained in step SS3, the individual fitness is calculated. The specific formula for calculating individual fitness is as follows:
[0085]
[0086] Where f is the fitness value, T max T represents the maximum temperature of the circuit board at 120 seconds. min This represents the minimum temperature of the circuit board at the 120th second.
[0087] Secondly, based on the fitness value f of each individual obtained by calculation, the quality and degree of excellence of each individual in the genetic population are evaluated, and used as the basis for elimination or entry into the next generation of genetic inheritance.
[0088] Step 5. The execution flow of genetic operations is as follows:
[0089] First, a genetic algorithm is used to iteratively generate offspring populations generation by generation, with each individual in the offspring population corresponding to a circuit board heating film layout.
[0090] Secondly, for the circuit board heating film layout corresponding to each individual in the offspring population, the corresponding circuit board temperature distribution is obtained based on step 3.
[0091] Then, based on the circuit board temperature distribution corresponding to each individual in the offspring population, the fitness value f of each individual in the offspring population is obtained by solving the individual fitness calculation function in step 4.
[0092] Specifically, the process of using genetic manipulation to generate offspring populations generation by generation includes three sub-steps set sequentially: selection, crossover, and mutation.
[0093] The first step is to perform the selection operation. A "roulette wheel" method combined with the "optimal retention strategy" is adopted: the individual with the highest fitness in each generation is fully replicated to the next generation; after the remaining 49 individuals are selected by the "roulette wheel" method, crossover and mutation operations are performed to produce offspring.
[0094] The second step is to perform a cross operation, the execution flow of which is as follows: Figure 7 As shown. A random number between 0 and 1 is generated. If the random number is greater than the crossover probability, individual i skips the crossover operation; if it is less than the crossover probability, individual i is paired, and the available pairings include all other individuals except itself. To ensure that the offspring after crossover still satisfy the connectivity constraint, it is first determined whether individual i and its paired individual j have a common point: if there is no common point, paired individual j is removed and a new pairing is performed; if there is a common point, a common point is randomly selected as the crossover point to perform single-point crossover. The connectivity of the two offspring generated after crossover is checked, as shown... Figure 6 As shown, the connectivity determination method is as follows: the layout of the heating film is represented as a binary image, with each grid representing a pixel in the image. A binary image connectivity determination algorithm is used for judgment. If both offspring satisfy connectivity, an offspring is randomly selected to replace individual i; if only one offspring satisfies connectivity, that offspring is selected to replace individual i; if neither offspring satisfies connectivity, the common point is removed from the available common points, and a new common point is selected for single-point crossover until an offspring satisfying connectivity is obtained. If an offspring satisfying connectivity cannot be obtained after all available common points have been removed, paired individual j is removed and a new pairing is performed. When an offspring satisfying connectivity cannot be obtained after all available pairs of individual i have been removed, individual i skips the crossover operation.
[0095] The third step is to perform the mutation operation, the execution flow is as follows: Figure 8As shown. The number of "1"s in an individual's code determines whether the heating film coverage area is equal to the specified value. If it is greater than or less than 110, the difference determines the number of bits to be set to "0" or "1". If it is equal to 110, a set of random numbers between 0 and 1 is generated according to the individual's code length. All random numbers are compared with the mutation probability, and the number of random numbers less than the mutation probability is counted; this number is the number of bits to be inverted. When setting a code to "1", the grid around the heating film is first marked, then a grid is randomly selected, and the code value corresponding to that grid is set to "1". After setting a code to "0", the resulting individuals must still meet the connectivity requirements; otherwise, the "0" setting is canceled, and other code bits are selected for "0" setting again until the offspring meet the connectivity requirements.
[0096] Step 6. The method for determining whether to end the optimization process is as follows:
[0097] The genetic optimization process is set to run for 2000 iterations. If the number of iterations is not reached, the genetic operation is executed, and the process proceeds to the next iteration. If the number of iterations is reached, the optimal individual in the population is selected, and the optimization process ends. The fitness of the optimal individual changes with the number of iterations as follows: Figure 9 As shown, after about 1100 optimization steps, the iteration curve no longer changes significantly, and the fitness value of the best individual is 0.0368.
[0098] Figure 10 The yellow area in the diagram represents the heating film coverage area. Before optimization, the heating film was concentrated in the central area of the motherboard, while after optimization, its distribution on the motherboard surface is more dispersed. Numerical simulation analysis was performed on the design schemes before and after heating film layout optimization, and the results are as follows: Figure 11 As shown, after the heating film shape was optimized, the temperature uniformity of the motherboard during the heating process was significantly improved. It can be seen from the temperature rise curve that the temperature difference between the component with the highest temperature and the component with the lowest temperature was significantly reduced. At 120 seconds, the temperature range of the motherboard components was reduced from the original -24℃ to +21℃ to -15℃ to -1℃.
[0099] The objectives of this invention have been fully and effectively achieved through the above embodiments. Those skilled in the art will understand that this invention includes, but is not limited to, the contents described in the accompanying drawings and the specific embodiments described above. Although the invention has been described with reference to what is currently considered the most practical and preferred embodiments, it should be understood that the invention is not limited to the disclosed embodiments, and any modifications that do not depart from the functional and structural principles of the invention will be included within the scope of the claims.
Claims
1. A method for optimizing the layout of heating films on circuit boards based on genetic algorithms, characterized in that, The method, when implemented, includes at least the following steps: SS1. Divide the circuit board and its electronic components into a grid and set coding rules. First, the circuit board and the electronic components located on the front of the circuit board are divided into uniform grid nodes on a plane according to two mutually orthogonal dimensions; Secondly, the divided grid nodes are binary encoded according to the following rules: the back of the circuit board is the heating film layout area, and the grid nodes on the back of the circuit board are the encoding objects. Each grid node corresponds to a bit of encoding value. If a bit of encoding value is set to "1", it means that the area of the corresponding grid node needs to be covered with heating film. Conversely, if the encoding value is set to "0", it means that the area of the corresponding grid node does not need to be covered with heating film. SS2. Initial Genetic Population Based on Initial Layout Generation of Heating Film using Genetic Algorithm First, define the size of the initial genetic population and determine the number of individuals in the initial genetic population; Secondly, the initial layout of the heating film for each individual in the first-generation genetic population is generated as follows: Based on the grid nodes divided in step SS1, a grid node is randomly selected as the starting node in the heating film layout area and the heating film is placed. Then, the remaining heating film placement nodes are generated using the grid marking method. The grid marking method refers to marking the adjacent nodes of the determined heating film placement nodes, randomly selecting a grid node from the marked grid nodes as the next heating film placement node, and remarking the adjacent grid nodes each time a new heating film placement node is placed. This process is repeated until the number of heating film placement nodes reaches a preset value. SS3. Solving for the corresponding circuit board temperature distribution based on the heating film layout of individuals in the population. First, based on the mesh nodes defined in step SS1, the mesh nodes of the circuit board and electronic components are connected by the following linear heat conduction equation: Where C is the heat capacity of the grid node, T is the node temperature, t is time, Δt is the time step, i, j, k are the coordinates of any central grid node in three mutually orthogonal directions in space, N is the index value of any adjacent grid node of the central grid node, and G... N Q is the thermal conductivity between any adjacent grid node and the central grid node. i,j,k For the heat source term at the central grid node; Secondly, for the heating film layout of each individual in the genetic population, the heat conduction equations corresponding to all grid nodes are combined into a linear system of equations, and the temperature distribution of the entire circuit board is obtained by using the Gauss-Seidel iterative method. SS4. Calculate the fitness of each individual in the population based on the circuit board temperature distribution corresponding to each individual. First, for the heating film layout of each individual in the genetic population, based on the circuit board temperature distribution obtained in step SS3, the individual fitness is calculated based on the following functional relationship: Where, for each individual in the genetic population, f is the individual fitness value, and T max T represents the maximum temperature value in the circuit board temperature distribution obtained in step SS3. min This refers to the minimum temperature value in the circuit board temperature distribution obtained in step SS3; Secondly, based on the fitness value f of each individual obtained by calculation, the quality of each individual in the genetic population is evaluated and used as the basis for elimination or entry into the next generation of the genetic population. SS5. Perform genetic operations to optimize the heating film layout of the circuit board. First, a genetic algorithm is used to iteratively generate offspring populations generation by generation, with each individual in the offspring population corresponding to a circuit board heating film layout. Secondly, for the circuit board heating film layout corresponding to each individual in the offspring population, the corresponding circuit board temperature distribution is obtained based on step SS3. Then, based on the circuit board temperature distribution corresponding to each individual in the offspring population, the fitness value f of each individual in the offspring population is obtained by solving the individual fitness calculation function in step SS4. SS6. Determine whether to end the optimization process based on whether the set number of iterations has been reached. The number of iterations in the genetic optimization process is set. If the set number of iterations is not reached, the genetic population continues to perform the genetic optimization operation described in step SS5 and enters the next genetic optimization operation loop. If the set number of iterations is reached, the individual with the highest fitness value in the genetic population is selected as the optimal individual, and the circuit board heating film layout optimization process ends.
2. The circuit board heating film layout optimization method based on genetic algorithm according to claim 1, characterized in that, In step SS3 above, the boundary conditions of the heat conduction equation are given based on the thermal conditions of the actual physical environment in which the circuit board is located.
3. The circuit board heating film layout optimization method based on genetic algorithm according to claim 1, characterized in that, In step SS3 above, the initial temperature of the thermal conductivity equation is given based on the thermal conditions of the actual physical environment of the circuit board, the total heating power of the thermal conductivity equation is given based on the heating of the circuit board and its electronic components, the calculation termination time is determined based on the time range of the temperature simulation, and the time step is determined based on the calculation efficiency and simulation accuracy of the temperature simulation.
4. The circuit board heating film layout optimization method based on genetic algorithm according to claim 1, characterized in that, In step SS5 above, the process of generating offspring populations generation by generation using genetic operations includes three sub-steps set sequentially: selection, crossover, and mutation. Before performing the genetic operations, a crossover probability and a mutation probability are set in advance.
5. The circuit board heating film layout optimization method based on genetic algorithm according to claim 4, characterized in that, In step SS5 above, when performing the selection sub-step, the individual with the highest fitness in each generation of the population is completely copied to the next generation. The remaining individuals are selected by "roulette wheel" and then the subsequent crossover and mutation operations are performed in sequence.
6. The circuit board heating film layout optimization method based on genetic algorithm according to claim 4, characterized in that, In step SS5 above, when performing the crossover sub-step, a connectivity judgment method is used to perform the crossover operation. The layout of the heating film on the circuit board is equivalent to a binary image, with each grid node representing a pixel in the image. A binary image connectivity judgment algorithm is used for judgment.
7. The circuit board heating film layout optimization method based on genetic algorithm according to claim 5, characterized in that, In step SS5 above, the crossover sub-step is executed as follows: For any individual m in the population, first determine whether it should participate in the crossover operation. Specifically, generate a random number between 0 and 1. If the random number is greater than the crossover probability, individual m skips the crossover operation. If the random number is less than the crossover probability, pair individual m with other individuals except itself. Secondly, to ensure that the offspring after crossover satisfy the connected component constraint, it is first determined whether there is a common point between individual m and the selected paired individual n. If there is no common point, the paired individual n is removed and a new pairing is performed; if there is a common point, a common point is randomly selected as the crossover point to perform single-point crossover. Next, the connectivity of the two offspring generated after the crossover is checked: If both offspring satisfy connectivity, then randomly select one of the offspring to replace individual m; If only one offspring satisfies connectivity, then select that offspring to replace individual m; If neither offspring satisfies connectivity, the common point is removed from the list of possible common points, and a new common point is selected for single-point intersection until an offspring that satisfies connectivity is obtained. If a child that satisfies connectivity cannot be obtained after all possible common points have been eliminated, then the paired individual n is eliminated and a new pairing is performed. If an individual m cannot obtain offspring that satisfy connectivity after all its pairable individuals have been removed, the individual m skips the crossover operation.
8. The circuit board heating film layout optimization method based on genetic algorithm according to claim 4, characterized in that, In step SS5 above, the mutation operation determines the number of bits of code to be mutated based on the number of "1"s in the layout scheme of the heating film. When setting a bit to "1", a grid marking method is used. After setting a bit to "0", a connectivity judgment is required.
9. The circuit board heating film layout optimization method based on genetic algorithm according to claim 4, characterized in that, In step SS5 above, the mutation sub-step is executed in the following manner: The number of "1"s in the individual code determines whether the heating film coverage area is equal to the preset value. If it is greater than or less than the preset value, the number of bits in the code that need to be set to "0" or "1" is determined based on the difference between the two. If it equals the specified value, then generate a set of random numbers between 0 and 1 according to the individual's code length, compare all random numbers with the mutation probability, and count the number of random numbers less than the mutation probability. This number is the number of code bits that need to be inverted. When setting a certain bit code to "1", first mark the grid nodes around the heating film, then randomly select a grid node and set the code value of the corresponding grid node to "1". After setting a bit to "0", the resulting individual must still meet the connectivity requirements; otherwise, cancel the setting operation and select another bit to set to "0" again until the offspring meet the connectivity requirements.