+

CN114004341A - Optical fiber preform preparation process optimization method based on genetic algorithm and BP neural network - Google Patents

Optical fiber preform preparation process optimization method based on genetic algorithm and BP neural network Download PDF

Info

Publication number
CN114004341A
CN114004341A CN202111345402.1A CN202111345402A CN114004341A CN 114004341 A CN114004341 A CN 114004341A CN 202111345402 A CN202111345402 A CN 202111345402A CN 114004341 A CN114004341 A CN 114004341A
Authority
CN
China
Prior art keywords
optical fiber
chromosome
neural network
fiber preform
fitness
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111345402.1A
Other languages
Chinese (zh)
Inventor
于景明
陈卫东
孙洋
张斌
李浩源
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Weihai Changhe Light Guide Technology Co ltd
Shandong University
Hongan Group Co Ltd
Original Assignee
Weihai Changhe Light Guide Technology Co ltd
Shandong University
Hongan Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Weihai Changhe Light Guide Technology Co ltd, Shandong University, Hongan Group Co Ltd filed Critical Weihai Changhe Light Guide Technology Co ltd
Priority to CN202111345402.1A priority Critical patent/CN114004341A/en
Publication of CN114004341A publication Critical patent/CN114004341A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • CCHEMISTRY; METALLURGY
    • C03GLASS; MINERAL OR SLAG WOOL
    • C03BMANUFACTURE, SHAPING, OR SUPPLEMENTARY PROCESSES
    • C03B37/00Manufacture or treatment of flakes, fibres, or filaments from softened glass, minerals, or slags
    • C03B37/01Manufacture of glass fibres or filaments
    • C03B37/012Manufacture of preforms for drawing fibres or filaments
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/12Computing arrangements based on biological models using genetic models
    • G06N3/126Evolutionary algorithms, e.g. genetic algorithms or genetic programming

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • Biophysics (AREA)
  • Health & Medical Sciences (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Biomedical Technology (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Evolutionary Biology (AREA)
  • Chemical & Material Sciences (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physiology (AREA)
  • Genetics & Genomics (AREA)
  • General Life Sciences & Earth Sciences (AREA)
  • Geochemistry & Mineralogy (AREA)
  • Manufacturing & Machinery (AREA)
  • Materials Engineering (AREA)
  • Organic Chemistry (AREA)
  • Optical Communication System (AREA)

Abstract

本申请提供了一种基于遗传算法及BP神经网络的光纤预制棒制备工艺优化方法,包括试验数据处理、构建基于BP神经网络的光纤预制棒制备质量预测模型net、构建遗传算法模型Genetic,对基于BP神经网络的光纤预制棒制备质量预测模型net的初始权值和阈值进行优化、将上述遗传算法优化出的权值和阈值赋给BP神经网络、BP神经网络训练、对基于BP神经网络的光纤预制棒制备质量预测模型net进行测试、根据测试误差对光纤预制棒制备质量预测模型net权值和阈值进行调整,得到基于BP神经网络的光纤预制棒制备质量预测模型;然后,通过遗传算法模型optimize,对输入数据进行寻优,找出最优的输入气体组合;本发明可运用神经网络替代大量的实验劳动,节省成本,提高效率。

Figure 202111345402

The present application provides a method for optimizing the preparation process of optical fiber preforms based on genetic algorithm and BP neural network, including experimental data processing, construction of a BP neural network-based optical fiber preform preparation quality prediction model net, and construction of a genetic algorithm model Genetic. Optimize the initial weights and thresholds of the fiber preform preparation quality prediction model net of the BP neural network, assign the weights and thresholds optimized by the above genetic algorithm to the BP neural network, train the BP neural network, and analyze the optical fiber based on the BP neural network. The preform preparation quality prediction model net is tested, and the weights and thresholds of the optical fiber preform preparation quality prediction model net are adjusted according to the test error, and a prediction model for the preparation quality of optical fiber preforms based on BP neural network is obtained. Then, the genetic algorithm model optimizes , to optimize the input data to find the optimal input gas combination; the invention can use the neural network to replace a lot of experimental labor, save costs and improve efficiency.

Figure 202111345402

Description

Optical fiber preform preparation process optimization method based on genetic algorithm and BP neural network
Technical Field
The invention relates to the technical field of optical fiber preform production, in particular to an optical fiber preform preparation process optimization method based on a genetic algorithm and a BP neural network.
Background
In the field of optical fiber preform production, a controlled variable method is mostly adopted for experiments in the aspect of optical fiber preform manufacturing quality, and in recent years, a neural network and a genetic algorithm are rapidly developed, so that the method is suitable for solving the complex relation and is better applied in the aspects of material preparation and optimization.
At present, the process optimization method in the field of optical fiber preform production needs to be carried out by experiments, and the influence of different gas components on the preparation quality of the optical fiber preform is tested by using a controlled variable method; however, the method has the characteristics of too many variables to be controlled, nonlinearity, strong coupling property and the like, and a great amount of experiments are needed to find a better process scheme, so that a great amount of manpower, material resources and time are consumed.
Disclosure of Invention
The invention aims to make up for the defects of the prior art, and provides an optimization method of a preparation process of an optical fiber preform based on a genetic algorithm and a BP neural network, wherein the technical scheme adopted by the invention is as follows:
an optical fiber perform preparation process optimization method based on a genetic algorithm and a BP neural network comprises the following specific steps:
step 1: collecting original data of optical fiber preform production, collecting gas flow of a blast burner and optical rod quality corresponding to the gas flow when the optical fiber preform is prepared, and respectively using the gas flow as input data and the optical rod quality as output data;
step 2: preprocessing the collected original data, and removing invalid data to obtain a preprocessed data set; the invalid data refers to the data of abnormal production conditions of the optical fiber preform and the quality of the optical fiber preform, and is caused by accidental factors in production;
and step 3: grading the quality of the optical rod, dividing the quality of the optical rod into a plurality of grades according to the optical performance of the optical rod, the transmission performance of the produced optical fiber and the mechanical performance, and grouping the preprocessed data sets according to the grade of the quality of the optical rod;
and 4, step 4: dividing each group of data into a training set and a testing set by adopting a retention method;
and 5: normalizing the training set by using a mapminmax function, normalizing input data and output data of the training set to be between-1 and 1, and outputting normalized input transformation data input train and output transformation data output train;
step 6: constructing an optical fiber preform preparation quality prediction model net based on a BP neural network;
and 7: constructing a Genetic algorithm model, optimizing an initial weight and a threshold of a BP neural network-based optical fiber preform preparation quality prediction model net to obtain an optimal individual x, wherein the optimal individual x comprises the initial weight and the threshold information of the optimized BP neural network;
and 8: assigning the weight value and the threshold value optimized by the genetic algorithm to a BP neural network; extracting an initial weight and a threshold value of the optimized BP neural network from the optimal individual x solved by the genetic algorithm, and assigning a value to the BP neural network after finishing;
and step 9: BP neural network training: setting training parameters, iteration times, learning efficiency and target precision; inputting normalized input transformation data input train and output transformation data output train by using a train function to complete the training of the neural network, namely completing the training of an optical fiber preform preparation quality prediction model based on the BP neural network;
step 10: normalizing the training set by using a mapminmax function, normalizing the input data of the test set and the output data of the test set to be between-1 and 1, and respectively outputting the normalized input test and output test;
step 11: testing an optical fiber preform preparation quality prediction model net based on a BP neural network; using a sim function, bringing the normalized test set input data input test into a trained optical fiber preform preparation quality prediction model net for testing to obtain a coded test result, and recording the coded test result as an; decoding the optical fiber preform, and recording a decoding result as test _ simul, namely a test result of the optical fiber preform quality prediction model;
step 12: the test result test _ simul is differed from the test set output data output test to obtain the test error of the optical fiber preform preparation quality prediction model; adjusting the weight and the threshold of a net model for predicting the preparation quality of the optical fiber preform according to the test error to obtain an optical fiber preform preparation quality prediction model based on the BP neural network;
step 13: storing the trained network data of the quality prediction model prepared by the optical fiber preform based on the BP neural network by using a save net function;
step 14: establishing a genetic algorithm model optimize, optimizing a preparation quality prediction model net of the optical fiber perform of the BP neural network, and searching a predicted optimal individual y of the quality of the optical fiber perform, wherein the optimal individual y comprises input conditions corresponding to the preparation of the optical fiber perform, namely optimal process conditions for preparing the optical fiber perform.
Optionally, in step 14, establishing the genetic algorithm model optisize includes the steps of:
step 14.1: initializing parameters of a genetic algorithm: setting iteration times maxgen2, population size sizepop2, cross probability pcross2 and variation probability pmutation2 of the network, and adjusting according to the data volume and difference;
step 14.2: defining a chromosome length lenchrom2 and a boundary value bound2 according to the number inputnum of BP neural network input data, wherein the chromosome length lenchrom2 is the same as the number inputnum of the BP neural network input data, and the boundary value bound2 is a matrix of rows and columns 2 of the inputnum, wherein the first column is a lower boundary, and the second column is an upper boundary;
step 14.3: population initialization: inputting the chromosome length lenchrom2 and the boundary value bound obtained in the previous step into a function code2, and randomly generating chromosome individuals to form a population individuals 2; defining a population structure, wherein the population individuals2 comprises the fitness of population individuals and the coding information of each chromosome;
step 14.4: calculating the fitness; loading the stored BP neural network optical fiber perform to prepare a quality prediction model net by using a load net function, and inputting individual chromosome information in population individuals2 to obtain information of the quality prediction model prepared by the BP neural network optical fiber perform; inputting the coded individual information of the chromosome and the information of the quality prediction model prepared by the BP neural network optical fiber perform into a fitness calculation function fun2 to obtain corresponding fitness individuals2. fitness2; finding out the chromosome bestchrom2 with the best fitness in each generation and recording the chromosome information, the best fitness value bestfittness 2 and the average fitness avgfittness 2 of the generation;
step 14.5: selecting operation: inputting the population information individuals2 and the population quantity sizpop2 into a selection function select2, and outputting a selected new population individuals 2; the selection mode in the selection function select2 is to determine the probability of selection according to the fitness value of each individual;
step 14.6: and (3) cross operation: inputting the cross probability pcross2, the chromosome length lenchrom2, the chromosome information chrom2 and the population quantity sizepop2 into a cross function cross2, selecting chromosome individuals needing cross operation from a new population individuals2 obtained by selection operation according to the cross operation probability pcross2 by the cross function cross2, randomly pairing every two chromosome individuals, and performing cross exchange on partial genes to obtain the crossed chromosome individuals chrom 2;
step 14.7: mutation operation: inputting the variation probability pmutation2, the chromosome length lenchrom2, the chromosome information chrom2, the population quantity sizepop2, the current iteration num2, the maximum iteration maxgen2 and the boundary bound2 of each individual into a variation function Mutation2, selecting individuals needing variation operation from the crossed chromosome chrom2, mutating certain genes on the individuals, and outputting the chromosome chrom2 after variation; wherein, the chromosome for mutation is randomly selected, and the mutation position is also randomly selected;
step 14.8: and (3) replacement operation: inputting the individual information of the mutated chromosome chrom2 into a fitness function fun2 one by one, and outputting and recording the fitness value individuals2.fitness2 of each individual; finding out chromosomes with minimum fitness and maximum fitness and positions of the chromosomes in the population, and replacing the chromosomes with maximum fitness by the chromosomes with minimum fitness values; recording the best fitness and the average fitness in each generation and the fitness of all individuals in the population;
step 14.9: iterative training: returning to the step 14.5, and carrying out next iteration; when the set maximum iteration times or the calculation result reaches the convergence condition, ending the iterative training of the genetic algorithm, and obtaining the chromosome y with the best fitness;
step 14.10: and outputting a result: and decoding the best chromosome y and outputting the optimal technological parameters for preparing the optical fiber preform.
Optionally, in said step 14.5, the selection in the selection function select2 is roulette.
Optionally, in the step 6, constructing the BP neural network-based optical fiber preform preparation quality prediction model net includes: the three-layer neural network structure comprises an input layer, a hidden layer and an output layer; the input layer to hidden layer transfer function is "tansig" and the hidden layer to output layer transfer function is "purelin"; the number m of the input layer neurons is adapted to the number of the types of gases of the blast burner during the preparation of the optical fiber preform, and the input layer neurons respectively input the gas flow rates corresponding to the input layer neurons; the number of neurons in the output layer is y, and the quality grade of the corresponding optical rod of the neurons in the output layer is; the number of hidden layer neurons is n, according to the number of input layersm and the number of neurons in the output layer y are adjusted by taking m ═ n + y)1/2+ a or m- ㏒2n or m ═ n (nl)1/2A is one of constants between 1 and 10.
Optionally, the number n of hidden layer neurons is determined by the formula (n + y)1/2+a。
Optionally, in step 7, the Genetic algorithm model (Genetic) comprises the steps of:
step 7.1: initializing parameters of a genetic algorithm, and setting parameters of the genetic algorithm according to the data volume of the preprocessed data set, wherein the parameters comprise iteration times maxgen, population scale sizepop, cross probability pcross and variation probability pmutation;
step 7.2: calculating the total number numsum of nodes of the BP neural network optical fiber perform quality prediction model, and adopting a formula numsum which is m + n + n + y; setting a chromosome length lenchrom and a boundary value bound, wherein the length lenchrom of the chromosome is the same as the total number of nodes numsum;
step 7.3: population initialization: inputting the chromosome length lenchrom and the boundary value bound obtained in the previous step into a function code, and randomly generating chromosome individuals to form a population individuals;
step 7.4: calculating the fitness: inputting the information of the chromosome individual into a BP neural network-based optical fiber perform preparation quality prediction model net to obtain the information of the BP neural network optical fiber perform preparation quality prediction model; inputting the coded individual information of the chromosome and the information of the quality prediction model prepared by the BP neural network optical fiber preform into a fitness calculation function fun to obtain corresponding fitness indicvidials. Finding out the chromosome bestchrom with the best fitness in each generation and recording the chromosome information, the best fitness value bestfittness and the average fitness avgfittness of the generation;
step 7.5: selecting operation: inputting the population information individuals and the population quantity sizpop into a selection function select, and outputting the selected new population individuals; the selection mode in the selection function select is to determine the probability of selection according to the fitness value of each individual;
step 7.6: and (3) cross operation: inputting the cross probability pcross, the chromosome length lenchrom, the chromosome information chrom and the population quantity sizepop into a cross function cross, selecting chromosomes needing cross operation from a new population individuals obtained by selection operation according to the cross operation probability pcross, randomly pairing every two chromosomes, and performing cross exchange on partial genes to obtain crossed chromosome individuals chrom;
step 7.7: mutation operation: inputting the variation probability pmutation, the chromosome length lenchrom, the chromosome information chrom, the population quantity sizepop, the current iteration number num, the maximum iteration number maxgen and the individual boundary bound into a variation function Mutation, selecting chromosomes needing variation operation from the crossed chromosomes according to the probability pmutation of the variation operation, then mutating certain genes on the chromosomes, and outputting the chromosome after variation; wherein, the chromosome for mutation is randomly selected, and the mutation position is also randomly selected;
step 7.8: and (3) replacement operation: inputting the chromosome population subjected to mutation operation into a fitness function fun one by one, recalculating fitness, selecting an optimal individual, outputting and recording the fitness value individuals. fittness of the chromosome, finding out the chromosomes with minimum and maximum fitness and the positions of the chromosomes in the population, and replacing the chromosomes with maximum fitness by the chromosomes with minimum fitness; recording the best fitness, the average fitness and the fitness of all chromosomes of the population in each generation;
step 7.9: performing iterative training, returning to the step 7.5, and performing next iteration; when the set maximum iteration times maxgen are reached, ending the iteration training to obtain the chromosome x with the maximum fitness;
step 7.10: and outputting a result: and decoding the best chromosome x, and outputting the optimal initial weight value and the threshold value.
Optionally, said step 7.5, the selection in the selection function select is roulette.
Optionally, in step 4, the ratio of the data amount of the training set to the data amount of the test set is 7 to 3.
Optionally, in step 9, the iteration number maxgen is set to 100, the learning efficiency is set to 0.05, and the target accuracy is set to 0.00001.
The invention has the following advantages:
the method adopts neural network operation, combines the gas flow of the blowtorch for preparing the optical fiber perform as the whole input data, uses the quality of the optical fiber perform as the output data, and constructs the optical fiber perform preparation quality prediction model based on the BP neural network, which can adapt to the nonlinear correlation and linear correlation characteristics of the input data and the output data, and can adapt to the coupling characteristic between the input data, thereby obtaining the prediction model with small deviation with the actual production; the gas flow combination of the blowtorch is integrally used as input data, so that an accurate prediction result can be obtained quickly; then, optimizing an optical fiber preform preparation quality prediction model net of the BP neural network by constructing a genetic algorithm for optimizing input data, and searching a predicted optical fiber preform quality optimal individual to obtain an input condition corresponding to the preparation of the optical fiber preform, namely an optimal process condition for preparing the optical fiber preform; different original data groups are input, different optimal process conditions can be obtained, a table of the optimal process conditions for preparing the optical fiber preform is made, the price of the optical rod prepared by combining the gas flow of the corresponding blowtorch is obtained by combining the price and the using amount of the gas of the blowtorch, the lowest preparation cost of the optical rod is found out, a large amount of labor for carrying out experiments through control variables is replaced, waste of raw materials such as the optical rod and paint is avoided, the cost is saved, and the efficiency is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without inventive labor.
FIG. 1 is a flow chart of constructing a BP neural network-based optical fiber preform preparation quality prediction model;
FIG. 2 is a flow chart of the whole method for optimizing the process of manufacturing an optical fiber preform based on a genetic algorithm and a BP neural network.
Detailed Description
In order to make the technical problems, technical solutions and advantageous effects to be solved by the present application clearer, the present application is further described in detail below with reference to the accompanying drawings.
Now, the optimization method of the optical fiber preform preparation process based on the genetic algorithm and the BP neural network is explained. The optimization method of the optical fiber preform preparation process based on the genetic algorithm and the BP neural network is shown in figure 2:
an optical fiber perform preparation process optimization method based on a genetic algorithm and a BP neural network comprises the following specific steps:
step 1: collecting original data of optical fiber preform production, collecting gas flow of a blast burner and optical rod quality corresponding to the gas flow when the optical fiber preform is prepared, and respectively using the gas flow as input data and the optical rod quality as output data;
step 2: preprocessing the collected original data, and removing invalid data to obtain a preprocessed data set; the invalid data refers to the data of abnormal production conditions of the optical fiber preform and the quality of the optical fiber preform, and is caused by accidental factors in production;
and step 3: grading the quality of the optical rod, dividing the quality of the optical rod into a plurality of grades according to the optical performance of the optical rod, the transmission performance of the produced optical fiber and the mechanical performance, and grouping the preprocessed data sets according to the grade of the quality of the optical rod;
and 4, step 4: dividing each group of data into a training set and a testing set by adopting a retention method;
and 5: normalizing the training set by using a mapminmax function, normalizing input data and output data of the training set to be between-1 and 1, and outputting normalized input transformation data input train and output transformation data output train;
step 6: constructing an optical fiber preform preparation quality prediction model net based on a BP neural network;
and 7: constructing a Genetic algorithm model, optimizing an initial weight and a threshold of a BP neural network-based optical fiber preform preparation quality prediction model net to obtain an optimal individual x, wherein the optimal individual x comprises the initial weight and the threshold information of the optimized BP neural network;
and 8: assigning the weight value and the threshold value optimized by the genetic algorithm to a BP neural network; extracting an initial weight and a threshold value of the optimized BP neural network from the optimal individual x solved by the genetic algorithm, and assigning a value to the BP neural network after finishing;
and step 9: BP neural network training: setting training parameters, iteration times, learning efficiency and target precision; inputting normalized input transformation data input train and output transformation data output train by using a train function to complete the training of the neural network, namely completing the training of an optical fiber preform preparation quality prediction model based on the BP neural network;
step 10: normalizing the training set by using a mapminmax function, normalizing the input data of the test set and the output data of the test set to be between-1 and 1, and respectively outputting the normalized input test and output test;
step 11: testing an optical fiber preform preparation quality prediction model net based on a BP neural network; using a sim function, bringing the normalized test set input data input test into a trained optical fiber preform preparation quality prediction model net for testing to obtain a coded test result, and recording the coded test result as an; decoding the optical fiber preform, and recording a decoding result as test _ simul, namely a test result of the optical fiber preform quality prediction model;
step 12: the test result test _ simul is differed from the test set output data output test to obtain the test error of the optical fiber preform preparation quality prediction model; adjusting the weight and the threshold of a net model for predicting the preparation quality of the optical fiber preform according to the test error to obtain an optical fiber preform preparation quality prediction model based on the BP neural network;
step 13: storing the trained network data of the quality prediction model prepared by the optical fiber preform based on the BP neural network by using a save net function;
step 14: establishing a genetic algorithm model optimize, optimizing a preparation quality prediction model net of the optical fiber perform of the BP neural network, and searching a predicted optimal individual y of the quality of the optical fiber perform, wherein the optimal individual y comprises input conditions corresponding to the preparation of the optical fiber perform, namely optimal process conditions for preparing the optical fiber perform.
Step 6, constructing the BP neural network-based optical fiber preform preparation quality prediction model net comprises the following steps: the three-layer neural network structure comprises an input layer, a hidden layer and an output layer; the input layer to hidden layer transfer function is "tansig" and the hidden layer to output layer transfer function is "purelin"; the number m of the input layer neurons is adapted to the number of the types of gases of the blast burner during the preparation of the optical fiber preform, and the input layer neurons respectively input the gas flow rates corresponding to the input layer neurons; the number of neurons in the output layer is y, and the quality grade of the corresponding optical rod of the neurons in the output layer is; the number of hidden layer neurons is n, and is adjusted according to the number m of input layers and the number y of output layer neurons, and one of m ═ n + y)1/2+ a, m ═ ㏒ 2n, and m ═ nl)1/2 is adopted, and a is one of constants between 1 and 10. Preferably, the number n of hidden layer neurons is determined using the formula m ═ n + y 1/2+ a.
Step 7, the Genetic algorithm model (Genetic) comprises the steps of:
step 7.1: initializing parameters of a genetic algorithm, and setting parameters of the genetic algorithm according to the data volume of the preprocessed data set, wherein the parameters comprise iteration times maxgen, population scale sizepop, cross probability pcross and variation probability pmutation;
step 7.2: calculating the total number numsum of nodes of the BP neural network optical fiber perform quality prediction model, and adopting a formula numsum which is m + n + n + y; setting a chromosome length lenchrom and a boundary value bound, wherein the length lenchrom of the chromosome is the same as the total number of nodes numsum;
step 7.3: population initialization: inputting the chromosome length lenchrom and the boundary value bound obtained in the previous step into a function code, and randomly generating chromosome individuals to form a population individuals;
step 7.4: calculating the fitness: inputting the information of the chromosome individual into a BP neural network-based optical fiber perform preparation quality prediction model net to obtain the information of the BP neural network optical fiber perform preparation quality prediction model; inputting the coded individual information of the chromosome and the information of the quality prediction model prepared by the BP neural network optical fiber preform into a fitness calculation function fun to obtain corresponding fitness indicvidials. Finding out the chromosome bestchrom with the best fitness in each generation and recording the chromosome information, the best fitness value bestfittness and the average fitness avgfittness of the generation;
step 7.5: selecting operation: inputting the population information individuals and the population quantity sizpop into a selection function select, and outputting the selected new population individuals; the selection mode in the selection function select is to determine the probability of selection according to the fitness value of each individual;
step 7.6: and (3) cross operation: inputting the cross probability pcross, the chromosome length lenchrom, the chromosome information chrom and the population quantity sizepop into a cross function cross, selecting chromosomes needing cross operation from a new population individuals obtained by selection operation according to the cross operation probability pcross, randomly pairing every two chromosomes, and performing cross exchange on partial genes to obtain crossed chromosome individuals chrom;
step 7.7: mutation operation: inputting the variation probability pmutation, the chromosome length lenchrom, the chromosome information chrom, the population quantity sizepop, the current iteration number num, the maximum iteration number maxgen and the individual boundary bound into a variation function Mutation, selecting chromosomes needing variation operation from the crossed chromosomes according to the probability pmutation of the variation operation, then mutating certain genes on the chromosomes, and outputting the chromosome after variation; wherein, the chromosome for mutation is randomly selected, and the mutation position is also randomly selected;
step 7.8: and (3) replacement operation: inputting the chromosome population subjected to mutation operation into a fitness function fun one by one, recalculating fitness, selecting an optimal individual, outputting and recording the fitness value individuals. fittness of the chromosome, finding out the chromosomes with minimum and maximum fitness and the positions of the chromosomes in the population, and replacing the chromosomes with maximum fitness by the chromosomes with minimum fitness; recording the best fitness, the average fitness and the fitness of all chromosomes of the population in each generation;
step 7.9: performing iterative training, returning to the step 7.5, and performing next iteration; when the set maximum iteration times maxgen are reached, ending the iteration training to obtain the chromosome x with the maximum fitness;
step 7.10: and outputting a result: and decoding the best chromosome x, and outputting the optimal initial weight value and the threshold value.
Step 7.5, the selection in the selection function select is performed by roulette.
Step 14, establishing the genetic algorithm model optime comprises the following steps:
step 14.1: initializing parameters of a genetic algorithm: setting iteration times maxgen2, population size sizepop2, cross probability pcross2 and variation probability pmutation2 of the network, and adjusting according to the data volume and difference;
step 14.2: defining a chromosome length lenchrom2 and a boundary value bound2 according to the number inputnum of BP neural network input data, wherein the chromosome length lenchrom2 is the same as the number inputnum of the BP neural network input data, and the boundary value bound2 is a matrix of rows and columns 2 of the inputnum, wherein the first column is a lower boundary, and the second column is an upper boundary;
step 14.3: population initialization: inputting the chromosome length lenchrom2 and the boundary value bound obtained in the previous step into a function code2, and randomly generating chromosome individuals to form a population individuals 2; defining a population structure, wherein the population individuals2 comprises the fitness of population individuals and the coding information of each chromosome;
step 14.4: calculating the fitness; loading the stored BP neural network optical fiber perform to prepare a quality prediction model net by using a load net function, and inputting individual chromosome information in population individuals2 to obtain information of the quality prediction model prepared by the BP neural network optical fiber perform; inputting the coded individual information of the chromosome and the information of the quality prediction model prepared by the BP neural network optical fiber perform into a fitness calculation function fun2 to obtain corresponding fitness individuals2. fitness2; finding out the chromosome bestchrom2 with the best fitness in each generation and recording the chromosome information, the best fitness value bestfittness 2 and the average fitness avgfittness 2 of the generation;
step 14.5: selecting operation: inputting the population information individuals2 and the population quantity sizpop2 into a selection function select2, and outputting a selected new population individuals 2; the selection mode in the selection function select2 is to determine the probability of selection according to the fitness value of each individual;
step 14.6: and (3) cross operation: inputting the cross probability pcross2, the chromosome length lenchrom2, the chromosome information chrom2 and the population quantity sizepop2 into a cross function cross2, selecting chromosome individuals needing cross operation from a new population individuals2 obtained by selection operation according to the cross operation probability pcross2 by the cross function cross2, randomly pairing every two chromosome individuals, and performing cross exchange on partial genes to obtain the crossed chromosome individuals chrom 2;
step 14.7: mutation operation: inputting the variation probability pmutation2, the chromosome length lenchrom2, the chromosome information chrom2, the population quantity sizepop2, the current iteration num2, the maximum iteration maxgen2 and the boundary bound2 of each individual into a variation function Mutation2, selecting individuals needing variation operation from the crossed chromosome chrom2, mutating certain genes on the individuals, and outputting the chromosome chrom2 after variation; wherein, the chromosome for mutation is randomly selected, and the mutation position is also randomly selected;
step 14.8: and (3) replacement operation: inputting the individual information of the mutated chromosome chrom2 into a fitness function fun2 one by one, and outputting and recording the fitness value individuals2.fitness2 of each individual; finding out chromosomes with minimum fitness and maximum fitness and positions of the chromosomes in the population, and replacing the chromosomes with maximum fitness by the chromosomes with minimum fitness values; recording the best fitness and the average fitness in each generation and the fitness of all individuals in the population;
step 14.9: iterative training: returning to the step 14.5, and carrying out next iteration; when the set maximum iteration times or the calculation result reaches the convergence condition, ending the iterative training of the genetic algorithm, and obtaining the chromosome y with the best fitness;
step 14.10: and outputting a result: and decoding the best chromosome y and outputting the optimal technological parameters for preparing the optical fiber preform.
Step 14.5, the selection in the selection function select2 is roulette.
The present application is described in further detail below with reference to examples, and it should be understood that the specific examples described herein are for purposes of illustration only and are not intended to limit the present application.
Example 1, a flowchart for constructing a model for predicting quality of an optical fiber preform based on a BP neural network is shown in fig. 1, and the following experiment was performed for the optical fiber preform production using the above flowchart.
Firstly, according to the step 1: collecting 100 groups of gas flow of a blast burner and the quality of an optical rod corresponding to the gas flow when the optical fiber preform is prepared, and respectively using the gas flow as input data and the output data as original data;
according to the step 2: preprocessing 100 groups of collected original data, and obtaining a preprocessed data set if invalid data are not found;
according to the step 3: dividing the quality of the optical fiber preform into 5 grades, and grouping the preprocessed data sets according to the grade of the quality of the optical fiber preform;
according to the step 4: dividing five groups of data according to a ratio of 7 to 3 by adopting a retention method, and dividing a training set and a test set;
according to the step 5: normalizing the training set by using a mapminmax function, normalizing input data and output data of the training set to be between-1 and 1, and outputting normalized input transformation data input train and output transformation data output train;
according to the step 6: constructing an optical fiber preform preparation quality prediction model net based on a BP neural network: the device comprises a three-layer neural network structure of an input layer, a hidden layer and an output layer; the input layer to hidden layer transfer function is "tansig" and the hidden layer to output layer transfer function is "purelin"(ii) a The number m of the neurons in the input layer is adapted to the number of the types of gases of the blast burner during the preparation of the optical fiber preform, and the neurons in the input layer respectively input the gas flow corresponding to the neurons; the number of neurons in the output layer is y, and the quality grade of the corresponding optical rod of the neurons in the output layer is; the number of hidden layer neurons is n, the adjustment is performed according to the number m of input layer neurons and the number y of output layer neurons, and m is (n + y)1/2+ a, a is one of constants between 1 and 10; in example 1, m is equal to 7, n is equal to 15, y is 1;
according to the step 7: constructing a Genetic algorithm model, optimizing an initial weight and a threshold of a BP neural network-based optical fiber preform preparation quality prediction model net to obtain an optimal individual x, wherein the optimal individual x comprises the initial weight and the threshold information of the optimized BP neural network;
according to the step 8: extracting an initial weight and a threshold value of the optimized BP neural network from the optimal individual x solved by the genetic algorithm, and assigning a value to the BP neural network after finishing;
according to the step 9: carrying out BP neural network training: setting training parameters, wherein the iteration times are 100, the learning efficiency is 0.05, and the target precision is 0.00001; inputting normalized input transformation data input train and output transformation data output train by using a train function to complete the training of the neural network, namely completing the training of an optical fiber preform preparation quality prediction model based on the BP neural network;
according to the step 10: normalizing the training set by using a mapminmax function, normalizing the input data of the test set and the output data of the test set to be between-1 and 1, and respectively outputting the normalized input test and output test;
according to the step 11: testing an optical fiber preform preparation quality prediction model net based on a BP neural network; using a sim function, bringing the normalized test set input data input test into a trained optical fiber preform preparation quality prediction model net for testing to obtain a coded test result, and recording the coded test result as an; decoding the optical fiber preform, and recording a decoding result as test _ simul, namely a test result of the optical fiber preform quality prediction model;
according to the step 12: the test result test _ simul is differed from the test set output data output test to obtain the test error of the optical fiber preform preparation quality prediction model; adjusting the weight and the threshold of a net model for predicting the preparation quality of the optical fiber preform according to the test error to obtain an optical fiber preform preparation quality prediction model based on the BP neural network;
step 13: and storing the trained network data of the quality prediction model prepared by the optical fiber preform based on the BP neural network by using the save net function.
Finally, under the condition of keeping other production conditions unchanged, changing the gas flow of the blowtorch during the preparation of the optical fiber preform, and randomly generating 16 groups of gas flows of the blowtorch during the preparation of the optical fiber preform for combination; respectively inputting the gas flow of the blowtorch when 16 groups of optical fiber preforms are prepared randomly into the trained BP neural network and used for actual production; recording and comparing the quality of the optical fiber preform obtained by the two modes with the same gas component, and analyzing the accuracy of predicting the preparation quality of the optical fiber preform by the BP neural network. Data from the above experiment are recorded as follows:
TABLE 1 optical fiber preform quality prediction experiment
Figure BDA0003353819730000131
Figure BDA0003353819730000141
As can be seen from Table 1, the deviation of the predicted result of the optical fiber preform preparation quality prediction model based on the BP neural network and the production experiment result is not large, only one group of data errors exceed 0.5, and the rest errors are far less than 0.5 and are within an acceptable range; therefore, the optical fiber perform preparation quality prediction model based on the BP neural network can realize accurate prediction of the quality of the optical fiber perform.
Example 2
Embodiment 1 completes the construction and storage of the optical fiber preform preparation quality prediction model based on the BP neural network, as shown in fig. 2, the flowchart of the optical fiber preform preparation process optimization method based on the genetic algorithm and the BP neural network is basically the same as the construction of the optical fiber preform preparation quality prediction model based on the BP neural network in embodiment 1, and the same points are not repeated.
The establishing of the genetic algorithm model optimize comprises the following steps:
step 14.1: initializing parameters of a genetic algorithm: setting iteration times maxgen2, population size sizepop2, cross probability pcross2 and variation probability pmutation2 of the network, and adjusting according to the data volume and difference; in this embodiment, the iteration number maxgen2 is set to 200, the population size sizepop2 is set to 23, the crossover probability pcross2 is set to 0.05, and the mutation probability pmutation2 is set to 0.00001;
step 14.2: defining a chromosome length lenchrom2 and a boundary value bound2 according to the number inputnum of BP neural network input data, wherein the chromosome length lenchrom2 is the same as the number inputnum of the BP neural network input data, and the boundary value bound2 is a matrix of rows and columns 2 of the inputnum, wherein the first column is a lower boundary, and the second column is an upper boundary;
step 14.3: population initialization: inputting the chromosome length lenchrom2 and the boundary value bound obtained in the previous step into a function code2, and randomly generating chromosome individuals to form a population individuals 2; defining a population structure, wherein the population individuals2 comprises the fitness of population individuals and the coding information of each chromosome;
step 14.4: calculating the fitness; loading the stored BP neural network optical fiber perform to prepare a quality prediction model net by using a load net function, and inputting individual chromosome information in population individuals2 to obtain information of the quality prediction model prepared by the BP neural network optical fiber perform; inputting the coded individual information of the chromosome and the information of the quality prediction model prepared by the BP neural network optical fiber perform into a fitness calculation function fun2 to obtain corresponding fitness individuals2. fitness2; finding out the chromosome bestchrom2 with the best fitness in each generation and recording the chromosome information, the best fitness value bestfittness 2 and the average fitness avgfittness 2 of the generation;
step 14.5: selecting operation: inputting the population information individuals2 and the population quantity sizpop2 into a selection function select2, and outputting a selected new population individuals 2; the selection mode in the selection function select2 is to determine the probability of selection according to the fitness value of each individual;
step 14.6: and (3) cross operation: inputting the cross probability pcross2, the chromosome length lenchrom2, the chromosome information chrom2 and the population quantity sizepop2 into a cross function cross2, selecting chromosome individuals needing cross operation from a new population individuals2 obtained by selection operation according to the cross operation probability pcross2 by the cross function cross2, randomly pairing every two chromosome individuals, and performing cross exchange on partial genes to obtain the crossed chromosome individuals chrom 2;
step 14.7: mutation operation: inputting the variation probability pmutation2, the chromosome length lenchrom2, the chromosome information chrom2, the population quantity sizepop2, the current iteration num2, the maximum iteration maxgen2 and the boundary bound2 of each individual into a variation function Mutation2, selecting individuals needing variation operation from the crossed chromosome chrom2, mutating certain genes on the individuals, and outputting the chromosome chrom2 after variation; wherein, the chromosome for mutation is randomly selected, and the mutation position is also randomly selected;
step 14.8: and (3) replacement operation: inputting the individual information of the mutated chromosome chrom2 into a fitness function fun2 one by one, and outputting and recording the fitness value individuals2.fitness2 of each individual; finding out chromosomes with minimum fitness and maximum fitness and positions of the chromosomes in the population, and replacing the chromosomes with maximum fitness by the chromosomes with minimum fitness values; recording the best fitness and the average fitness in each generation and the fitness of all individuals in the population;
step 14.9: iterative training: returning to the step 14.5, and carrying out next iteration; when the set maximum iteration times or the calculation result reaches the convergence condition, ending the iterative training of the genetic algorithm, and obtaining the chromosome y with the best fitness;
step 14.10: and outputting a result: and decoding the best chromosome y and outputting the optimal technological parameters for preparing the optical fiber preform.
Wherein, step 14.5, the selection in the selection function select2 is roulette.
Under the condition of keeping other production conditions unchanged, changing the gas flow of a blast burner when the optical fiber preform is prepared, generating a combination of 23 groups of gas flow of the blast burner when the optical fiber preform is prepared each time, inputting the combination into an optical fiber preform preparation quality prediction model net of a BP (back propagation) neural network for optimizing, and searching a predicted optical fiber preform quality optimal individual y to obtain an optimal process condition for preparing the optical fiber preform; respectively inputting the optimal process parameters of the optical fiber preform rod preparation output each time into the trained BP neural network and using the trained BP neural network for actual production; recording and comparing the quality of the optical fiber preform obtained by using the same gas component in the two modes; data from the above experiment are recorded as follows:
TABLE 2 statistics of optimization results of optical fiber preform process parameters
Figure BDA0003353819730000161
Figure BDA0003353819730000171
As can be seen from Table 2, the optimized technological parameters of the optical fiber preform preparation process optimization method based on the genetic algorithm and the BP neural network can produce the high-quality optical fiber preform in a production test; on the basis of the experimental data, the optimized result of the optical fiber preform preparation process optimization method based on the genetic algorithm and the BP neural network is the same as the production experimental result, the corresponding production cost is calculated according to the total amount of the used gas and the unit price of the gas, the gas flow combination with the cost within an acceptable range can be obtained, and the gas flow combination with the lowest production cost can also be obtained.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (9)

1.一种基于遗传算法及BP神经网络的光纤预制棒制备工艺优化方法,具体步骤为:1. An optical fiber preform preparation process optimization method based on genetic algorithm and BP neural network, the concrete steps are: 步骤1:收集光纤预制棒生产的原始数据,收集制备光纤预制棒时喷灯的气体流量以及与之对应的光棒质量,分别作为输入数据、输出数据;Step 1: Collect the raw data of the optical fiber preform production, collect the gas flow rate of the torch and the quality of the light rod corresponding to it when preparing the optical fiber preform, and use them as input data and output data respectively; 步骤2:对收集的原始数据进行预处理,去除其中的无效数据,得到预处理数据集;无效数据是指光纤预制棒的生产条件与光棒质量异常的数据,生产中的偶然因素造成;Step 2: Preprocessing the collected raw data, removing invalid data, and obtaining a preprocessing data set; invalid data refers to the abnormal data of the production conditions of the optical fiber preform and the quality of the optical rod, which are caused by accidental factors in production; 步骤3:对光棒质量进行评级,根据光棒的光学性能、成产光纤的传输性能、机械性能,将光棒质量分成多个等级,并根据光棒质量的等级对预处理数据集进行分组;Step 3: Rank the quality of the light rods. According to the optical properties of the light rods, the transmission performance of the produced optical fiber, and the mechanical properties, the quality of the light rods is divided into multiple grades, and the preprocessing datasets are grouped according to the grades of the light rod quality. ; 步骤4:采用保留法对每组数据进行分割,划分成训练集、测试集;Step 4: Use the retention method to divide each group of data into training set and test set; 步骤5:运用mapminmax函数对训练集进行归一化处理,将训练集输入数据及训练集输出数据都归一化到-1到1之间,输出归一后的输入转化数据input train和输出转化数据output train;Step 5: Use the mapminmax function to normalize the training set, normalize the input data of the training set and the output data of the training set to between -1 and 1, and output the normalized input transformation data input train and output transformation data output train; 步骤6:构建基于BP神经网络的光纤预制棒制备质量预测模型net;Step 6: Build a prediction model net for the preparation quality of optical fiber preforms based on BP neural network; 步骤7:构建遗传算法模型Genetic,对基于BP神经网络的光纤预制棒制备质量预测模型net的初始权值和阈值进行优化,得到最优个体x,包含优化的BP神经网络的初始权值和阈值信息;Step 7: Build a genetic algorithm model Genetic, optimize the initial weights and thresholds of the fiber preform preparation quality prediction model net based on the BP neural network, and obtain the optimal individual x, including the initial weights and thresholds of the optimized BP neural network information; 步骤8:将上述遗传算法优化出的权值和阈值赋给BP神经网络;从遗传算法解出的最优个体x中提取优化的BP神经网络的初始权值和阈值,整理后赋值给BP神经网络;Step 8: Assign the weights and thresholds optimized by the genetic algorithm to the BP neural network; extract the initial weights and thresholds of the optimized BP neural network from the optimal individual x solved by the genetic algorithm, and assign them to the BP neural network after sorting. network; 步骤9:BP神经网络训练:设置训练参数,迭代次数,学习效率,目标精度;运用train函数,输入归一化后的输入转化数据input train和输出转化数据output train,完成对神经网络的训练,即完成基于BP神经网络的光纤预制棒制备质量预测模型的训练;Step 9: BP neural network training: set the training parameters, the number of iterations, the learning efficiency, and the target accuracy; use the train function to input the normalized input transformation data input train and output transformation data output train to complete the training of the neural network. That is, the training of the optical fiber preform preparation quality prediction model based on BP neural network is completed; 步骤10:运用mapminmax函数对训练集进行归一化处理,将测试集输入数据及测试集输出数据进行归一化都归一化到-1到1之间,分别输出归一后的input test和output test;Step 10: Use the mapminmax function to normalize the training set, normalize the test set input data and test set output data to be between -1 and 1, and output the normalized input test and test set respectively. output test; 步骤11:对基于BP神经网络的光纤预制棒制备质量预测模型net进行测试;运用sim函数,将归一化处理的测试集输入数据input test带入到训练好的光纤预制棒制备质量预测模型net中进行测试,得到编码的测试结果,记为an;将其进行解码,解码结果记为test_simu,即为光纤预制棒制备质量预测模型的测试结果;Step 11: Test the optical fiber preform preparation quality prediction model net based on the BP neural network; use the sim function to bring the normalized test set input data input test into the trained optical fiber preform preparation quality prediction model net. Carry out the test in and obtain the encoded test result, which is recorded as an; decode it, and the decoding result is recorded as test_simu, which is the test result of the optical fiber preform preparation quality prediction model; 步骤12:将此测试结果test_simu与测试集输出数据output test做差,得到光纤预制棒制备质量预测模型的测试误差;根据测试误差对光纤预制棒制备质量预测模型net权值和阈值进行调整,得到基于BP神经网络的光纤预制棒制备质量预测模型;Step 12: Compare the test result test_simu with the test set output data output test to obtain the test error of the optical fiber preform preparation quality prediction model; adjust the net weight and threshold of the optical fiber preform preparation quality prediction model according to the test error to obtain Prediction model of optical fiber preform preparation quality based on BP neural network; 步骤13:运用save net函数保存训练好的基于BP神经网络的光纤预制棒制备质量预测模型的网络数据;Step 13: use the save net function to save the network data of the trained optical fiber preform preparation quality prediction model based on the BP neural network; 步骤14:建立遗传算法模型optimize,对BP神经网络的光纤预制棒制备质量预测模型net进行寻优,寻找预测的光纤预制棒质量最优个体y,包含制备光纤预制棒对应的输入条件,即制备光纤预制棒最优的工艺条件。Step 14: Establish a genetic algorithm model optimize, optimize the fiber preform preparation quality prediction model net of the BP neural network, and find the optimal individual y for the predicted optical fiber preform quality, including the input conditions corresponding to the preparation of the optical fiber preform, that is, the preparation Optimal process conditions for optical fiber preforms. 2.根据权利要求1所述的基于遗传算法及BP神经网络的光纤预制棒制备工艺优化方法,其特征在于所述步骤14,建立遗传算法模型optimize包括步骤为:2. the optical fiber preform preparation process optimization method based on genetic algorithm and BP neural network according to claim 1, it is characterized in that described step 14, establishing genetic algorithm model optimize comprises the steps of: 步骤14.1:遗传算法参数初始化:设置网络的迭代次数maxgen2、种群规模sizepop2、交叉概率pcross2、变异概率pmutation2,根据数据体量及不同进行调整;Step 14.1: Genetic algorithm parameter initialization: set the number of network iterations maxgen2, population size sizepop2, crossover probability pcross2, mutation probability pmutation2, and adjust according to the data volume and difference; 步骤14.2:根据BP神经网络输入数据的数量inputnum定义染色体长度lenchrom2及边界值bound2,染色体长度lenchrom2和BP神经网络输入数据的数量inputnum相同,边界值bound2为inputnum行2列的矩阵,其中第一列为下边界,第二列为上边界;Step 14.2: Define the chromosome length lenchrom2 and the boundary value bound2 according to the quantity inputnum of the BP neural network input data. The chromosome length lenchrom2 is the same as the quantity inputnum of the BP neural network input data, and the boundary value bound2 is a matrix with inputnum rows and 2 columns, of which the first column is the lower boundary, and the second column is the upper boundary; 步骤:14.3:种群初始化:将上步得到的染色体长度lenchrom2以及边界值bound输入到函数code2中,随机生成的染色体个体,组成种群individuals2;定义种群结构,种群individuals2包括种群个体的适应度以及各染色体的编码信息;Step: 14.3: Population initialization: Input the chromosome length lenchrom2 and the boundary value bound obtained in the previous step into the function code2, and the randomly generated chromosome individuals form population individuals2; define the population structure, and the population individuals2 includes the fitness of the population individuals and each chromosome. coded information; 步骤14.4:计算适应度;运用load net函数加载保存好的BP神经网络光纤预制棒制备质量预测模型net,输入种群individuals2中的染色体个体信息,得到BP神经网络光纤预制棒制备质量预测模型的信息;将编码后的染色体个体信息及BP神经网络光纤预制棒制备质量预测模型的信息输入到适应度计算函数fun2中,得到相应的适应度individuals2.fitness2;找出每一代中适应度最好的染色体bestchrom2并记录此染色体信息及此最好的适应度值bestfitness2和此代的平均适应度avgfitness2;Step 14.4: Calculate the fitness; use the load net function to load the saved BP neural network optical fiber preform preparation quality prediction model net, input the chromosome individual information in the population individuals2, and obtain the information of the BP neural network optical fiber preform preparation quality prediction model; Input the encoded chromosome individual information and the information of the BP neural network optical fiber preform preparation quality prediction model into the fitness calculation function fun2 to obtain the corresponding fitness individuals2.fitness2; find out the chromosome bestchrom2 with the best fitness in each generation And record the chromosome information and the best fitness value bestfitness2 and the average fitness avgfitness2 of this generation; 步骤14.5:选择操作:将种群信息individuals2及种群数量sizpop2输入到选择函数select2中,输出选择后的新种群individuals2;其中,选择函数select2中的选择方式是根据每个个体的适应度值来确定被选择的概率;Step 14.5: Selection operation: Input the population information individuals2 and the population number sizpop2 into the selection function select2, and output the selected new population individuals2; wherein, the selection method in the selection function select2 is to determine the selected population according to the fitness value of each individual. probability of selection; 步骤14.6:交叉操作:将交叉概率pcross2、染色体长度lenchrom2、染色体信息chrom2、种群数量sizepop2输入到交叉函数cross2中,交叉函数cross2按照交叉操作概率pcross2从选择操作得到的新种群individuals2中选出需要进行交叉操作的染色体个体,随机两两配对,部分基因进行交叉互换,得到交叉后的染色体个体chrom2;Step 14.6: Crossover operation: Input the crossover probability pcross2, chromosome length lenchrom2, chromosome information chrom2, and population sizepop2 into the crossover function cross2. The crossover function cross2 is selected from the new population individuals2 obtained by the selection operation according to the crossover operation probability pcross2. Cross-operated chromosome individuals are randomly paired in pairs, and some genes are cross-exchanged to obtain the crossed chromosome individual chrom2; 步骤14.7:变异操作:将变异概率pmutation2、染色体长度lenchrom2、染色体信息chrom2、种群数量sizepop2、当前迭代次数num2、最大迭代次数maxgen2、每个个体的边界bound2输入到变异函数Mutation2中,从交叉后的染色体chrom2中选择出需要进行变异操作的个体,然后对这些个体上的某位基因进行突变,输出变异后的染色体chrom2;其中,进行变异的染色体是随机选择的,变异位置也是随机选择的;Step 14.7: Mutation operation: Input the mutation probability pmutation2, chromosome length lenchrom2, chromosome information chrom2, population size sizepop2, current iteration number num2, maximum iteration number maxgen2, and the boundary bound2 of each individual into mutation function Mutation2. Select the individuals that need to be mutated from the chromosome chrom2, then mutate a gene on these individuals, and output the mutated chromosome chrom2; among them, the mutated chromosome is randomly selected, and the mutation position is also randomly selected; 步骤14.8:替换操作:将变异后的染色体chrom2个体信息逐个输入到适应度函数fun2中,输出并记录每个个体的适应度值individuals2.fitness2;找到适应度最小和最大的染色体以及他们在种群中的位置,用适应度值最小的染色体取代适应度最大的染色体;记录每一代中最好的适应度、平均适应度以及种群所有个体的适应度;Step 14.8: Replacement operation: Input the individual information of the mutated chromosome chrom2 into the fitness function fun2 one by one, output and record the fitness value of each individual individuals2.fitness2; find the chromosomes with the smallest and largest fitness and their distribution in the population position, replace the chromosome with the largest fitness value with the chromosome with the smallest fitness value; record the best fitness, average fitness and fitness of all individuals in the population in each generation; 步骤14.9:迭代训练:返回步骤14.5,进行下一次迭代;达到设定的最大迭代次数或计算结果达到收敛条件,结束遗传算法的迭代训练,此时得到的适应度最好的染色体y;Step 14.9: Iterative training: return to step 14.5, and perform the next iteration; when the set maximum number of iterations is reached or the calculation result reaches the convergence condition, the iterative training of the genetic algorithm is ended, and the chromosome y with the best fitness is obtained at this time; 步骤14.10:输出结果:对最好的染色体y进行解码,输出光纤预制棒制备的最优工艺参数。Step 14.10: Output result: decode the best chromosome y, and output the optimal process parameters for fiber preform preparation. 3.根据权利要求2所述的基于遗传算法及BP神经网络的光纤预制棒制备工艺优化方法,其特征在于所述步骤14.5,选择函数select2中的选择方式采用轮盘赌法。3. The optical fiber preform preparation process optimization method based on genetic algorithm and BP neural network according to claim 2, characterized in that in said step 14.5, the selection method in the selection function select2 adopts the roulette method. 4.根据权利要求1至3中任意一项所述的基于遗传算法及BP神经网络的光纤预制棒制备工艺优化方法,其特征在于所述步骤6,构建基于BP神经网络的光纤预制棒制备质量预测模型net包括:输入层、隐藏层和输出层的三层神经网络结构;输入层到隐藏层传递函数为“tansig”,隐藏层到输出层的递函数为“purelin”;其中,所述输入层神经元的数量m与制备光纤预制棒时喷灯的气体种类数量相适应,输入层神经元分别输入与之对应的气体流量;所述输出层神经元个数为y,输出层神经元对应光棒质量等级;隐藏层神经元的个数为n,根据输入层的数量m和输出层神经元的数量y进行调整,采用m=(n+y)1/2+a或m=㏒2n或m=(nl)1/2中的一个,a为1至10之间的常数中的一个。4. the optical fiber preform preparation process optimization method based on genetic algorithm and BP neural network according to any one of claims 1 to 3, it is characterized in that described step 6, constructs the optical fiber preform preparation quality based on BP neural network The prediction model net includes: a three-layer neural network structure of an input layer, a hidden layer and an output layer; the transfer function from the input layer to the hidden layer is "tansig", and the transfer function from the hidden layer to the output layer is "purelin"; wherein, the input The number m of neurons in the layer is adapted to the number of gas types of the torch when preparing the optical fiber preform, and the neurons in the input layer respectively input the corresponding gas flow; the number of neurons in the output layer is y, and the neurons in the output layer correspond to light Stick quality level; the number of neurons in the hidden layer is n, which is adjusted according to the number m of the input layer and the number of neurons in the output layer y, using m=(n+y) 1/2 +a or m=㏒ 2 n or m = one of (nl) 1/2 , a is one of the constants between 1 and 10. 5.根据权利要求4所述的基于遗传算法及BP神经网络的光纤预制棒制备工艺优化方法,其特征在于确定隐藏层神经元的个数n,采用公式m=(n+y)1/2+a。5. The optical fiber preform preparation process optimization method based on genetic algorithm and BP neural network according to claim 4, is characterized in that determining the number n of hidden layer neurons, using formula m=(n+y) 1/2 +a. 6.根据权利要求4所述的基于遗传算法及BP神经网络的光纤预制棒制备工艺优化方法,其特征在于所述步骤7,遗传算法模型(Genetic)包括步骤为:6. the optical fiber preform preparation process optimization method based on genetic algorithm and BP neural network according to claim 4, is characterized in that described step 7, genetic algorithm model (Genetic) comprises the steps of: 步骤7.1:遗传算法参数初始化,根据预处理数据集数据量设置遗传算法的参数,包括迭代次数maxgen、种群规模sizepop、交叉概率pcross、变异概率pmutation;Step 7.1: Initialize the parameters of the genetic algorithm, set the parameters of the genetic algorithm according to the data volume of the preprocessing data set, including the number of iterations maxgen, the population size sizepop, the crossover probability pcross, and the mutation probability pmutation; 步骤7.2:计算BP神经网络光纤预制棒质量预测模型的节点总数numsum,采用公式numsum=m*n+n+n*y+y;设置染色体长度lenchrom及边界值bound,染色体的长度lenchrom与节点总数numsum相同;Step 7.2: Calculate the total number of nodes numsum of the BP neural network optical fiber preform quality prediction model, using the formula numsum=m*n+n+n*y+y; set the chromosome length lenchrom and the boundary value bound, the chromosome length lenchrom and the total number of nodes numsum is the same; 步骤7.3:种群初始化:将上步得到的染色体长度lenchrom以及边界值bound输入到函数code中,随机生成的染色体个体,组成种群individuals;Step 7.3: Population initialization: Input the chromosome length lenchrom and the boundary value bound obtained in the previous step into the function code, and randomly generate chromosome individuals to form the population individuals; 步骤7.4:计算适应度:将染色体个体的信息输入基于BP神经网络的光纤预制棒制备质量预测模型net,得到BP神经网络光纤预制棒制备质量预测模型的信息;将编码后的染色体个体信息及BP神经网络光纤预制棒制备质量预测模型的信息输入到适应度计算函数fun中,得到相应的适应度individuals.fitness;找出每一代中适应度最好的染色体bestchrom并记录此染色体信息及此最好的适应度值bestfitness和此代的平均适应度avgfitness;Step 7.4: Calculate fitness: input the information of chromosome individuals into the BP neural network-based optical fiber preform preparation quality prediction model net, and obtain the information of the BP neural network optical fiber preform preparation quality prediction model; put the encoded chromosome individual information and BP The information of the neural network optical fiber preform preparation quality prediction model is input into the fitness calculation function fun to obtain the corresponding fitness individuals.fitness; find out the chromosome bestchrom with the best fitness in each generation and record the chromosome information and the best The fitness value bestfitness and the average fitness avgfitness of this generation; 步骤7.5:选择操作:将种群信息individuals及种群数量sizpop输入到选择函数select中,输出选择后的新种群individuals;其中,选择函数select中的选择方式是根据每个个体的适应度值来确定被选择的概率;Step 7.5: Selection operation: input the population information individuals and population number sizpop into the selection function select, and output the new population individuals after selection; among them, the selection method in the selection function select is to determine the selected population according to the fitness value of each individual. probability of selection; 步骤7.6:交叉操作:将交叉概率pcross、染色体长度lenchrom、染色体信息chrom、种群数量sizepop输入到交叉函数cross中,交叉函数cross,按照交叉操作概率pcross从选择操作得到的新种群individuals中选出需要进行交叉操作的染色体,随机两两配对,部分基因进行交叉互换,得到交叉后的染色体个体chrom;Step 7.6: Crossover operation: Input the crossover probability pcross, chromosome length lenchrom, chromosome information chrom, and population size sizepop into the crossover function cross, the crossover function cross, according to the crossover operation probability pcross, select the desired population from the new populations obtained by the selection operation. The chromosomes subjected to the crossover operation are randomly paired in pairs, and some genes are crossed and exchanged to obtain the crossed chromosome individual chrom; 步骤7.7:变异操作:将变异概率pmutation、染色体长度lenchrom、染色体信息chrom、种群数量sizepop、当前迭代次数num、最大迭代次数maxgen、个体的边界bound输入到变异函数Mutation中,变异函数Mutation,按照变异操作的概率pmutation,从交叉后的染色体chrom中选择出需要进行变异操作的染色体,然后对这些染色体上的某位基因进行突变,输出变异后的染色体chrom;其中,进行变异的染色体是随机选择的,变异位置也是随机选择的;Step 7.7: Mutation operation: input mutation probability pmutation, chromosome length lenchrom, chromosome information chrom, population sizepop, current iteration number num, maximum iteration number maxgen, and individual boundary bound into mutation function Mutation, mutation function Mutation, according to mutation The probability pmutation of the operation selects the chromosomes that need to be mutated from the crossed chromosome chrom, then mutates a gene on these chromosomes, and outputs the mutated chromosome chrom; among them, the mutated chromosome is randomly selected , the mutation position is also randomly selected; 步骤7.8:替换操作:将经过变异操作的染色体种群逐个输入到适应度函数fun中,重新计算适应度,选出最优个体,输出、记录染色体的适应度值individuals.fitness,找到适应度最小和最大的染色体以及他们在种群中的位置,用适应度值最小的染色体取代适应度最大的染色体;记录每一代中最好的适应度、平均适应度以及种群所有染色体的适应度;Step 7.8: Replacement operation: Input the mutated chromosome populations into the fitness function fun one by one, recalculate the fitness, select the optimal individual, output and record the fitness value of the chromosome individuals.fitness, and find the minimum fitness and The largest chromosomes and their positions in the population, replace the chromosome with the largest fitness value with the chromosome with the smallest fitness value; record the best fitness in each generation, the average fitness and the fitness of all chromosomes in the population; 步骤7.9:迭代训练,返回步骤7.5,进行下一次迭代;达到设定的最大迭代次数maxgen,结束迭代训练,得到适应度最大的染色体x;Step 7.9: Iterative training, return to step 7.5, and perform the next iteration; when the set maximum number of iterations maxgen is reached, the iterative training ends, and the chromosome x with the greatest fitness is obtained; 步骤7.10:输出结果:对最好的染色体x进行解码,输出最优初始权值和阈值。Step 7.10: Output result: decode the best chromosome x, and output the optimal initial weight and threshold. 7.根据权利要求6所述的基于遗传算法及BP神经网络的光纤预制棒制备工艺优化方法,其特征在于所述步骤7.5,选择函数select中的选择方式采用轮盘赌法。7. The optical fiber preform preparation process optimization method based on genetic algorithm and BP neural network according to claim 6, characterized in that in said step 7.5, the selection method in the selection function select adopts the roulette method. 8.根据权利要求1至3中任意一项所述的基于遗传算法及BP神经网络的光纤预制棒制备工艺优化方法,其特征在于所述步骤4,所述训练集与测试集的数据量比值为7比3。8. The optical fiber preform preparation process optimization method based on genetic algorithm and BP neural network according to any one of claims 1 to 3, it is characterized in that in described step 4, the data volume ratio of described training set and test set 7 to 3. 9.根据权利要求1至3中任意一项所述的基于遗传算法及BP神经网络的光纤预制棒制备工艺优化方法,其特征在于所述步骤9,迭代次数maxgen设为100,学习效率设为0.05,目标精度设为0.00001。9. The optical fiber preform preparation process optimization method based on genetic algorithm and BP neural network according to any one of claims 1 to 3, characterized in that in step 9, the number of iterations maxgen is set to 100, and the learning efficiency is set to 0.05, the target precision is set to 0.00001.
CN202111345402.1A 2021-11-15 2021-11-15 Optical fiber preform preparation process optimization method based on genetic algorithm and BP neural network Pending CN114004341A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111345402.1A CN114004341A (en) 2021-11-15 2021-11-15 Optical fiber preform preparation process optimization method based on genetic algorithm and BP neural network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111345402.1A CN114004341A (en) 2021-11-15 2021-11-15 Optical fiber preform preparation process optimization method based on genetic algorithm and BP neural network

Publications (1)

Publication Number Publication Date
CN114004341A true CN114004341A (en) 2022-02-01

Family

ID=79928962

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111345402.1A Pending CN114004341A (en) 2021-11-15 2021-11-15 Optical fiber preform preparation process optimization method based on genetic algorithm and BP neural network

Country Status (1)

Country Link
CN (1) CN114004341A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114707743A (en) * 2022-04-15 2022-07-05 西安邮电大学 Air quality prediction method and system based on adaptive gated recurrent neural network
CN115526072A (en) * 2022-08-26 2022-12-27 南昌航空大学 GABP network prediction method for carbon fiber composite material ultrasonic vibration assisted drilling quality
CN115796011A (en) * 2022-11-16 2023-03-14 四川大学 A Method for Optimizing Heat Transfer Performance of Hydrogen Storage Bed Based on Neural Network and Genetic Algorithm
CN116596056A (en) * 2023-05-24 2023-08-15 杭州电子科技大学 A Deep Optical Neural Network Training Method and System Based on a Hybrid Mutation Strategy Genetic Algorithm
CN116730607A (en) * 2023-05-22 2023-09-12 江苏斯德雷特光纤科技有限公司 Automatic rod matching method for sleeve rod making
CN117952194A (en) * 2024-01-31 2024-04-30 安徽理工大学 A multi-output regression prediction method for small samples in laser processing
CN120024898A (en) * 2025-02-07 2025-05-23 南通罡丰科技有限公司 Synthesis method capable of improving the output rate of solid-phase synthesis of silicon carbide and silicon carbide synthesis furnace

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004063831A2 (en) * 2003-01-15 2004-07-29 Bracco Imaging S.P.A. System and method for optimization of a database for the training and testing of prediction algorithms
CN112053019A (en) * 2019-06-06 2020-12-08 湖南师范大学 An intelligent method for optical fiber preform deposition process based on big data model predictive control framework
CN112100940A (en) * 2020-09-17 2020-12-18 浙江大学 Method and device for predicting primary stretching technological parameters of optical fiber preform
CN113449930A (en) * 2021-07-27 2021-09-28 威海长和光导科技有限公司 Optical fiber preform preparation quality prediction method based on BP neural network

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004063831A2 (en) * 2003-01-15 2004-07-29 Bracco Imaging S.P.A. System and method for optimization of a database for the training and testing of prediction algorithms
CN112053019A (en) * 2019-06-06 2020-12-08 湖南师范大学 An intelligent method for optical fiber preform deposition process based on big data model predictive control framework
CN112100940A (en) * 2020-09-17 2020-12-18 浙江大学 Method and device for predicting primary stretching technological parameters of optical fiber preform
CN113449930A (en) * 2021-07-27 2021-09-28 威海长和光导科技有限公司 Optical fiber preform preparation quality prediction method based on BP neural network

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114707743A (en) * 2022-04-15 2022-07-05 西安邮电大学 Air quality prediction method and system based on adaptive gated recurrent neural network
CN115526072A (en) * 2022-08-26 2022-12-27 南昌航空大学 GABP network prediction method for carbon fiber composite material ultrasonic vibration assisted drilling quality
CN115526072B (en) * 2022-08-26 2025-08-15 南昌航空大学 GABP network prediction method for ultrasonic vibration assisted drilling quality of carbon fiber composite material
CN115796011A (en) * 2022-11-16 2023-03-14 四川大学 A Method for Optimizing Heat Transfer Performance of Hydrogen Storage Bed Based on Neural Network and Genetic Algorithm
CN116730607A (en) * 2023-05-22 2023-09-12 江苏斯德雷特光纤科技有限公司 Automatic rod matching method for sleeve rod making
CN116596056A (en) * 2023-05-24 2023-08-15 杭州电子科技大学 A Deep Optical Neural Network Training Method and System Based on a Hybrid Mutation Strategy Genetic Algorithm
CN117952194A (en) * 2024-01-31 2024-04-30 安徽理工大学 A multi-output regression prediction method for small samples in laser processing
CN120024898A (en) * 2025-02-07 2025-05-23 南通罡丰科技有限公司 Synthesis method capable of improving the output rate of solid-phase synthesis of silicon carbide and silicon carbide synthesis furnace

Similar Documents

Publication Publication Date Title
CN114004341A (en) Optical fiber preform preparation process optimization method based on genetic algorithm and BP neural network
CN113449930A (en) Optical fiber preform preparation quality prediction method based on BP neural network
CN113836791B (en) Mobile semi-implicit particle method key parameter optimization method for severe accident analysis of nuclear power plant
CN112659548B (en) Surface exposure 3D printing process optimization method based on genetic algorithm and BP neural network
CN113094980A (en) Solder paste printing quality prediction method and system based on IGA-DNN
CN115310664B (en) Oil production prediction method and prediction system of oil wells based on RBF neural network and gene regulation genetic algorithm
CN109932903A (en) The air-blower control Multipurpose Optimal Method of more parent optimization networks and genetic algorithm
CN116205164B (en) Multi-agent injection and production optimization method based on self-adaptive basis function selection
CN118643891A (en) A big data optimization control method and system based on genetic algorithm
CN114004153B (en) A method for predicting penetration depth based on multi-source data fusion
CN108053032A (en) A kind of choosing method of the data model training sample based on genetic algorithm
CN114241267A (en) Structural entropy sampling-based multi-target architecture search osteoporosis image identification method
CN116882323B (en) Self-adaptive agent policy optimization method considering time sequence and subdivision tasks
CN108154003A (en) Prediction of Blasting Vibration method based on the optimization of Spark gene expressions
CN107220708A (en) Adaptive Simulated Annealing Genetic Algorithm for Feature Selection in Sleep EEG Staging
CN113095477A (en) Wind power prediction method based on DE-BP neural network
CN119311898A (en) A method and system for completing knowledge graph in the field of numerical control programming
CN112800673A (en) Method for predicting blasting block degree based on SA-GA-BP algorithm
CN118569146B (en) A centrifugal pump optimization method
CN116992926A (en) Evolutionary neural network method for cooperatively optimizing convolutional neural network structure and weight
CN117974194A (en) Cost prediction method, device and system based on self-adaptive NSGA-II-SVR
CN118094484A (en) Intelligent interface tension prediction method for genetic algorithm optimization
CN117492107A (en) Gas content prediction method in deep coal seams based on genetic algorithm optimization neural network
CN114943866B (en) Image classification method based on evolutionary neural network structure search
CN116306880A (en) Improved MetaPrunting-based neural network channel pruning method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20220201

RJ01 Rejection of invention patent application after publication
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载