CN106896724B - Tracking system and tracking method for solar tracker - Google Patents
Tracking system and tracking method for solar tracker Download PDFInfo
- Publication number
- CN106896724B CN106896724B CN201710228320.6A CN201710228320A CN106896724B CN 106896724 B CN106896724 B CN 106896724B CN 201710228320 A CN201710228320 A CN 201710228320A CN 106896724 B CN106896724 B CN 106896724B
- Authority
- CN
- China
- Prior art keywords
- network
- fitness
- population
- tracking
- crossover
- 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.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B13/00—Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion
- G05B13/02—Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion electric
- G05B13/04—Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion electric involving the use of models or simulators
- G05B13/042—Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion electric involving the use of models or simulators in which a parameter or coefficient is automatically adjusted to optimise the performance
Landscapes
- Engineering & Computer Science (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Evolutionary Computation (AREA)
- Medical Informatics (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Automation & Control Theory (AREA)
- Feedback Control In General (AREA)
Abstract
Description
技术领域technical field
本发明涉及太阳跟踪器技术领域,具体来说是用于太阳跟踪器的跟踪系统及跟踪方法。The invention relates to the technical field of solar trackers, in particular to a tracking system and a tracking method for solar trackers.
背景技术Background technique
为了能够精确的跟踪太阳,用于太阳能发电和移动车载测量的掩日通量遥测技术(Solar-occulation flux,SOF)的太阳跟踪器应运而生。用于太阳能发电的太阳跟踪器是定点监测,目前多采用双轴太阳跟踪器,根据经纬度信息,可算出太阳实时的方位角和高度角,该输出做出控制信号用于调节俯仰轴和方位轴的状态从而实现太阳跟踪。而用于车载SOF的太阳跟踪器,目前采用PSD作为反馈元件,根据PSD上光斑的位置作为反馈信号用于调节主反射镜的位置,从而使后端的光谱仪获得最大的光强。而在控制算法上,根据PSD输出信号的大小设置不同的调节步长。In order to accurately track the sun, solar trackers based on solar-occulation flux (SOF) telemetry for solar power generation and mobile vehicle-mounted measurements emerge as the times require. The solar tracker used for solar power generation is fixed-point monitoring. At present, dual-axis solar trackers are mostly used. According to the latitude and longitude information, the real-time azimuth and altitude angles of the sun can be calculated. state to achieve sun tracking. The solar tracker used in the vehicle SOF currently uses the PSD as the feedback element, and the position of the light spot on the PSD is used as the feedback signal to adjust the position of the main reflector, so that the spectrometer at the back end can obtain the maximum light intensity. In the control algorithm, different adjustment step sizes are set according to the size of the PSD output signal.
其中,x为调节步长,a,b为常数,且a>b,e为PSD输出的太阳实际位置与中心点的误差信号,e0为设定的阈值常数。目前的控制算法跟踪速度慢和精度差且鲁棒性差,当车辆出现颠簸或有其他因素带来的干扰信号时,会出现跟踪效果差甚至不能跟踪的情况。为了改进移动太阳跟踪器的性能,采用GA算法优化BP网络的二自由度PID控制。Among them, x is the adjustment step size, a, b are constants, and a>b, e is the error signal between the actual position of the sun and the center point output by the PSD, and e 0 is the set threshold constant. The current control algorithm has slow tracking speed, poor accuracy and poor robustness. When the vehicle is bumped or there are interference signals caused by other factors, the tracking effect will be poor or even unable to track. In order to improve the performance of the mobile solar tracker, the GA algorithm is used to optimize the two-degree-of-freedom PID control of the BP network.
发明内容SUMMARY OF THE INVENTION
本发明的目的是为了解决现有技术中太阳跟踪器的控制算法跟踪速度慢和精度差且鲁棒性差,当车辆出现颠簸或有其他因素带来的干扰信号时,会出现跟踪效果差甚至不能跟踪的缺陷,提供用于太阳跟踪器的跟踪系统及跟踪方法来解决上述问题。The purpose of the present invention is to solve the problem that the control algorithm of the sun tracker in the prior art has slow tracking speed, poor accuracy and poor robustness. When the vehicle is bumped or there are interference signals caused by other factors, the tracking effect will be poor or even unable to Tracking defects, a tracking system and a tracking method for a solar tracker are provided to solve the above problems.
为了实现上述目的,本发明的技术方案如下:In order to achieve the above object, technical scheme of the present invention is as follows:
用于太阳跟踪器的跟踪系统,包括GA样本数据预处理模块、BP网络调整模块、PID控制器模块;Tracking system for solar tracker, including GA sample data preprocessing module, BP network adjustment module, PID controller module;
所述GA样本数据预处理模块根据样本数据进行个体寻优,得到适应度最大的个体并传递给BP网络调整模块作为最优初值进行训练;The GA sample data preprocessing module performs individual optimization according to the sample data, obtains the individual with the largest fitness, and transmits it to the BP network adjustment module as the optimal initial value for training;
在最优初值的基础上,通过BP网络调整模块反向传输,调整隐含层和输出层的权值和阈值,使得到的误差评价函数小于设定的误差阈值,得到调整好的P、I、D参数;On the basis of the optimal initial value, reverse transmission through the BP network adjustment module, adjust the weights and thresholds of the hidden layer and the output layer, so that the obtained error evaluation function is smaller than the set error threshold, and the adjusted P, I, D parameters;
BP网络调整模块将调整好的P、I、D参数传递给PID控制器模块,PID控制器模块根据二自由度对被控对象进行控制,使PID控制器跟踪性能和抗干扰性能达到最佳。The BP network adjustment module transfers the adjusted P, I, D parameters to the PID controller module, and the PID controller module controls the controlled object according to the two degrees of freedom, so that the PID controller has the best tracking performance and anti-interference performance.
优选的,跟踪系统还包括反馈系统模块;所述反馈系统获取被控对象的输出信号和PID控制器的输入信息,反馈系统根据给定的输入信号和被控对象的输出信号求得误差信号并根据误差信号进行调节,形成一个闭环控制。Preferably, the tracking system further includes a feedback system module; the feedback system obtains the output signal of the controlled object and the input information of the PID controller, the feedback system obtains the error signal according to the given input signal and the output signal of the controlled object, and Adjust according to the error signal to form a closed-loop control.
优选的,所述GA样本数据预处理模块包括选择、交叉、变异算子操作单元;所述选择、交叉、变异算子操作单元对交叉率pc和变异率pm进行自适应调整求得种群中适应度最优的个体,并将适应度最优的个体不经任何交叉、变异操作直接进入下一代种群,即新种群。Preferably, the GA sample data preprocessing module includes a selection, crossover, and mutation operator operation unit; the selection, crossover, and mutation operator operation unit performs adaptive adjustment on the crossover rate p c and the mutation rate p m to obtain the population The individual with the best fitness in the middle, and the individual with the best fitness will directly enter the next generation population, that is, the new population, without any crossover and mutation operations.
优选的,所述GA样本数据预处理模块还包括灾变判断单元;所述灾变判断单元计算所述新种群的适应度,若灾变停止或到达设定的灾变次数,则GA算法预处理完成,将得到的最优初始权值和阈值传递给BP网络。Preferably, the GA sample data preprocessing module further includes a catastrophe judgment unit; the catastrophe judgment unit calculates the fitness of the new population, if the catastrophe stops or reaches the set number of catastrophes, the GA algorithm preprocessing is completed, and the The obtained optimal initial weights and thresholds are passed to the BP network.
优选的,所述BP网络调整模块包括BP网络训练单元;所述BP网络训练单元获取优化后的权值和阈值作为初始值,根据动量-自适应学习率调整初始权值和阈值,并采用Levenberg-Marquardt算法最优化算法寻找最优的PID参数值。Preferably, the BP network adjustment module includes a BP network training unit; the BP network training unit obtains the optimized weights and thresholds as initial values, adjusts the initial weights and thresholds according to the momentum-adaptive learning rate, and adopts Levenberg -Marquardt algorithm optimization algorithm to find the optimal PID parameter value.
本发明还提供一种应用于上述任一所述的用于太阳跟踪器的跟踪系统的跟踪方法,该方法首先以跟踪性能最佳为控制目标进行PID参数调节,再以抗干扰性能最佳为控制目标进行参数调节,具体调节步骤如下:The present invention also provides a tracking method applied to any of the above-mentioned tracking systems for solar trackers. The method firstly adjusts the PID parameters with the best tracking performance as the control target, and then adjusts the PID parameters with the best anti-interference performance as the control target. The parameters of the control target are adjusted, and the specific adjustment steps are as follows:
1)样本数据预处理1) Sample data preprocessing
先通过GA算法对样本数据进行个体寻优,得到适应度最大的个体并传递给BP网络作为最优初值进行训练;First, the sample data is optimized by the GA algorithm, and the individual with the largest fitness is obtained and passed to the BP network as the optimal initial value for training;
2)BP网络训练2) BP network training
在最优初值的基础上,通过BP网络反向传输,调整隐含层和输出层的权值和阈值,使得到的误差评价函数小于设定的误差阈值,得到调整好的P、I、D参数;On the basis of the optimal initial value, reverse transmission through the BP network, adjust the weights and thresholds of the hidden layer and the output layer, so that the obtained error evaluation function is less than the set error threshold, and the adjusted P, I, D parameter;
3)PID控制3) PID control
BP网络调整模块将调整好的P、I、D参数传递给PID控制器模块,PID控制器模块根据二自由度对被控对象进行控制,使PID控制器跟踪性能和抗干扰性能达到最佳。The BP network adjustment module transfers the adjusted P, I, D parameters to the PID controller module, and the PID controller module controls the controlled object according to the two degrees of freedom, so that the PID controller has the best tracking performance and anti-interference performance.
优选的,所述跟踪方法还包括信号反馈调节过程;具体为:Preferably, the tracking method further includes a signal feedback adjustment process; specifically:
所述反馈系统获取被控对象的输出信号和PID控制器的输入信息,反馈系统根据PID控制器的输入信号和被控对象的输出信号求得误差信号并根据误差信号进行调节,形成一个闭环控制。The feedback system obtains the output signal of the controlled object and the input information of the PID controller, the feedback system obtains the error signal according to the input signal of the PID controller and the output signal of the controlled object, and adjusts according to the error signal, forming a closed-loop control .
优选的,所述步骤1)中,具体为通过选择、交叉、变异算子操作单元对交叉率pc和变异率pm进行自适应调整求得种群中适应度最优的个体,并将适应度最优的个体不经任何交叉、变异操作直接进入下一代种群,即新种群;采用的自适应交叉率pc和变异率pm的计算公式为:Preferably, in the step 1), the individual with the best fitness in the population is obtained by adaptively adjusting the crossover rate p c and the mutation rate p m through the selection, crossover, and mutation operator operation units, and adapting the The individual with the best degree of degree directly enters the next generation population without any crossover and mutation operations, that is, the new population; the calculation formulas of the adaptive crossover rate p c and mutation rate p m are as follows:
其中,α1,α2为两个大于0的常数,pc1,pc2,pm1,pm2为根据经验得出的常数,分别为0.85、0.65、0.1、0.001;favg、fmax、f'分别为该种群的平均适应度、总适应度、该个体的适应度。Among them, α 1 , α 2 are two constants greater than 0, p c1 , p c2 , p m1 , p m2 are constants obtained by experience, which are 0.85, 0.65, 0.1, 0.001 respectively; f avg , f max , f' are the average fitness of the population, the total fitness, and the fitness of the individual.
优选的,得到所述新种群后,再对该新种群的适应度进行灾变判断,若灾变停止或到达设定的灾变次数,则GA算法预处理完成,将得到的最优初始权值和阈值传递给BP网络。Preferably, after the new population is obtained, catastrophic judgment is performed on the fitness of the new population. If the catastrophic stops or the set number of catastrophes is reached, the preprocessing of the GA algorithm is completed, and the obtained optimal initial weights and thresholds passed to the BP network.
优选的,所述步骤2)中,所述BP网络训练单元获取优化后的权值和阈值作为初始值,根据动量-自适应学习率调整初始权值和阈值,并采用Levenberg-Marquardt算法最优化算法寻找最优的PID参数值;其中,动量-自适应学习速率调整计算公式为:Preferably, in the step 2), the BP network training unit obtains the optimized weights and thresholds as initial values, adjusts the initial weights and thresholds according to the momentum-adaptive learning rate, and uses the Levenberg-Marquardt algorithm to optimize The algorithm finds the optimal PID parameter value; among them, the calculation formula of momentum-adaptive learning rate adjustment is:
β(k+1)=τ*3λ*β(k)β(k+1)=τ*3 λ *β(k)
其中,β为学习速率因子,λ为梯度方向,τ为学习误差系数,w为权重函数;Among them, β is the learning rate factor, λ is the gradient direction, τ is the learning error coefficient, and w is the weight function;
Levenberg-Marquardt算法的计算公式为:The calculation formula of the Levenberg-Marquardt algorithm is:
Δw=(JTJ+μI)-1JTeΔw=(J T J+μI) -1 J T e
其中,e为误差量,J是网络误差度对权值的雅可比矩阵,I为的单位矩阵,μ为比例系数,Δw为权重增量。Among them, e is the error amount, J is the Jacobian matrix of the network error degree to the weight, I is the identity matrix, μ is the scale coefficient, and Δw is the weight increment.
本发明的与现有技术相比,具有以下有益效果:Compared with the prior art, the present invention has the following beneficial effects:
二自由度ID分别采用跟踪性能最佳和抗干扰能力最佳为控制参数,分别对PID参数进行调整。将遗传算法与神经网络相结合,充分利用了两者的优点,使控制系统既有神经网络的学习功能,鲁棒性和泛化能力,又有遗传算法的全局搜索优化能力。The two-degree-of-freedom ID adopts the best tracking performance and the best anti-interference ability as the control parameters, and adjusts the PID parameters respectively. The combination of genetic algorithm and neural network makes full use of their advantages, so that the control system not only has the learning function, robustness and generalization ability of neural network, but also has the global search and optimization ability of genetic algorithm.
在本专利中采用GA算法优化BP网络根据控制参数分别完成PID参数的整定,从而在最短的时间内,得到最精确的P、I、D参数,从而输入更准确地控制信号,对于在太阳跟踪器而言,即是实现太阳的实时精确跟踪。In this patent, the GA algorithm is used to optimize the BP network to complete the tuning of the PID parameters according to the control parameters, so as to obtain the most accurate P, I, D parameters in the shortest time, so as to input more accurate control signals. As far as the instrument is concerned, it is to achieve real-time accurate tracking of the sun.
采用启发式学习规则中的动量项和自适应学习率和数字优化学习方法相结合的方法,每个改进方法互补,有效的改善了BP网络存在的收敛速度缓慢,已陷入极小值的缺点,大大改善了后期的控制精度和速度。The momentum term in the heuristic learning rule is combined with the adaptive learning rate and the numerical optimization learning method. Each improvement method is complementary, which effectively improves the slow convergence speed of the BP network and has fallen into a minimum value. Greatly improved the control precision and speed in the later stage.
该算法用于对闭环的太阳跟踪系统的控制,具有跟踪精度高调节时间短,抗干扰能力强的特点This algorithm is used to control the closed-loop sun tracking system, and has the characteristics of high tracking accuracy, short adjustment time and strong anti-interference ability.
附图说明Description of drawings
图1为本发明实施例1的模块结构框图;1 is a block diagram of a module structure of Embodiment 1 of the present invention;
图2为本发明实施例1的系统原理框图;2 is a system principle block diagram of Embodiment 1 of the present invention;
图3为本发明实施例2中的4:7:3BP网络拓扑结构图;Fig. 3 is a 4:7:3BP network topology structure diagram in
图4为本发明实施例2的算法流程图;Fig. 4 is the algorithm flow chart of
图5为本发明实施例2的算法功能模块框图;5 is a block diagram of an algorithm function module according to
图6为本发明实施例3中太阳跟踪器的控制回路图。FIG. 6 is a control loop diagram of the solar tracker in Embodiment 3 of the present invention.
具体实施方式Detailed ways
为使对本发明的结构特征及所达成的功效有更进一步的了解与认识,用以较佳的实施例及附图配合详细的说明,说明如下:In order to have a further understanding and understanding of the structural features of the present invention and the effects achieved, the preferred embodiments and accompanying drawings are used in conjunction with detailed descriptions, and the descriptions are as follows:
概念说明:下述中的样本为所有个体的组合,种群是一定数量个体的组合,这个数量由设定的种群大小决定。而个体则是神经网络初始值或是随机产生的训练数据。Concept description: The sample in the following is a combination of all individuals, and the population is a combination of a certain number of individuals, which is determined by the set population size. The individual is the initial value of the neural network or randomly generated training data.
实施例1Example 1
如图1、图2所示,用于太阳跟踪器的跟踪系统,包括GA样本数据预处理模块、BP网络调整模块、PID控制器模块、反馈系统模块。As shown in Figure 1 and Figure 2, the tracking system for solar trackers includes a GA sample data preprocessing module, a BP network adjustment module, a PID controller module, and a feedback system module.
GA样本数据预处理模块根据样本数据进行个体寻优,得到适应度最大的个体并传递给BP网络调整模块作为最优初值进行训练;The GA sample data preprocessing module performs individual optimization according to the sample data, obtains the individual with the largest fitness and transmits it to the BP network adjustment module as the optimal initial value for training;
在最优初值的基础上,通过BP网络调整模块反向传输,调整隐含层和输出层的权值和阈值,使得到的误差评价函数小于设定的误差阈值,得到调整好的P、I、D的参数;On the basis of the optimal initial value, reverse transmission through the BP network adjustment module, adjust the weights and thresholds of the hidden layer and the output layer, so that the obtained error evaluation function is smaller than the set error threshold, and the adjusted P, Parameters of I and D;
BP网络调整模块将调整好的P、I、D的参数传递给PID控制器模块,PID控制器模块根据二自由度进行控制,分别使跟踪性能和抗干扰性能达到最佳。The BP network adjustment module transfers the adjusted parameters of P, I and D to the PID controller module, and the PID controller module controls according to the two degrees of freedom, so as to achieve the best tracking performance and anti-interference performance respectively.
被控对象的输出信号通过反馈系统模块传输到PID控制器的输入端,反馈系统根据PID控制器的输入信号和被控对象的输出信号求得误差信号并根据误差信号进行调节,形成一个闭环控制。The output signal of the controlled object is transmitted to the input end of the PID controller through the feedback system module. The feedback system obtains the error signal according to the input signal of the PID controller and the output signal of the controlled object, and adjusts according to the error signal to form a closed-loop control. .
其中,GA样本数据预处理模块包括设置迭代次数和参数初值单元、编码单元、适应度计算单元、选择/交叉/变异算子操作单元、灾变判断单元;BP网络调整模块包括网络结构确定单元、初始化网络单元、获取初始值单元、BP网络训练单元、精度判断单元。Among them, the GA sample data preprocessing module includes a unit for setting the number of iterations and initial values of parameters, a coding unit, a fitness calculation unit, a selection/crossover/mutation operator operation unit, and a disaster judgment unit; the BP network adjustment module includes a network structure determination unit, Initialize the network unit, obtain the initial value unit, BP network training unit, and accuracy judgment unit.
首先通过设置迭代次数和参数初值单元初始化GA算法的迭代次数n、交叉率pc、变异率pm、种群规模m;然后通过网络结构确定单元确定BP网络的拓扑结构,网络总共为三层:输入层、隐含层、输出层;其中输入层有4个神经元分别为指定输入信号rin(k),实际输出信号yout(k),误差量e(k)和常数a;输出层的三个神经元分别对应PID控制的三个参数kp,ki,kd;而隐含层的神经元个数根据经验公式为基础,经过不断地仿真调试,确定隐含层神经元的个数为7个,即BP网络的拓扑结构为4:7:3,如图3所示。初始化网络单元对BP网络的权值和阈值初始值以及误差评价函数和误差阈值,并计算在初始值的情况下误差信号是否小于误差阈值,若是,则BP网络无需训练,直接进入测试阶段,否则,进入训练阶段。First, initialize the iteration number n, crossover rate pc , mutation rate pm, and population size m of the GA algorithm by setting the number of iterations and the parameter initial value unit; then determine the topology structure of the BP network through the network structure determination unit. : input layer, hidden layer, output layer; the input layer has 4 neurons for the specified input signal r in (k), the actual output signal y out (k), the error amount e (k) and the constant a; output The three neurons of the layer correspond to the three parameters k p , k i , k d of the PID control respectively; and the number of neurons in the hidden layer is based on the empirical formula Based on continuous simulation and debugging, it is determined that the number of neurons in the hidden layer is 7, that is, the topology of the BP network is 4:7:3, as shown in Figure 3. Initialize the weights and thresholds of the network unit to the initial value of the BP network, as well as the error evaluation function and error threshold, and calculate whether the error signal is less than the error threshold under the initial value. , into the training phase.
如果进入训练阶段,则通过编码单元对含有BP网络初始值的种群进行实数编码,并将适应度函数定义为期望数据与实际输出数据之差,然后通过适应度计算单元进行适应度计算,具体为GA操作包括选择算子、交叉算子、变异算子;其中交叉率pc和变异率pm采用自适应方法求得该种群中适应度最优的个体,然后将适应度最优的个体不经任何交叉、变异操作直接进入下一代种群,即新种群,其他的个体进入下一种群的概率与其在整个种群中的相对适应度成正比;采用的自适应交叉率pc和变异率pm的计算公式为:If the training stage is entered, the population containing the initial value of the BP network is encoded with real numbers by the coding unit, and the fitness function is defined as the difference between the expected data and the actual output data, and then the fitness calculation unit is used to calculate the fitness, specifically: The GA operation includes selection operator, crossover operator, and mutation operator; in which the crossover rate p c and the mutation rate p m use the adaptive method to obtain the individual with the best fitness in the population, and then the individual with the best fitness is not selected. After any crossover and mutation operations, it directly enters the next generation population, that is, the new population, and the probability of other individuals entering the next population is proportional to their relative fitness in the entire population; the adaptive crossover rate p c and mutation rate p m are used. The calculation formula is:
其中,α1、α2为两个大于0的常数,pc1,pc2,pm1,pm2为根据经验得出的常数,分别为0.85、0.65、0.1、0.001;favg、fmax、f'分别为该种群的平均适应度、总适应度、该个体的适应度,最后通过灾变判断单元计算产生的新种群的总适应度,若连续n代未出现更优秀的个体时,这说明GA算法出现了早熟线程,陷入局部极小值,此时需要进行灾变,杀死当前种群所有优秀的个体,进入一下代。若若干次灾变后,适应度值与未灾变前一样,则停止灾变;若灾变停止或到达设定的灾变次数,则GA算法预处理完成,将得到的最优初始权值和阈值传递给获取初始值单元,获取初始值单元将获取到的初始值传输给BP网络训练单元。BP网络训练单元根据动量-自适应学习率调整初始权值和阈值,并采用Levenberg-Marquardt算法最优化算法寻找最优的PID参数值;Among them, α 1 and α 2 are two constants greater than 0, p c1 , p c2 , p m1 , and p m2 are constants obtained according to experience, which are 0.85, 0.65, 0.1, and 0.001 respectively; f avg , f max , f' is the average fitness of the population, the total fitness, and the fitness of the individual, and finally the total fitness of the new population is calculated by the catastrophe judgment unit. If there is no better individual for n consecutive generations, this means that The GA algorithm has a precocious thread and falls into a local minimum. At this time, a catastrophe needs to be carried out to kill all the outstanding individuals of the current population and enter the next generation. If after several disasters, the fitness value is the same as before no disasters, then stop the disasters; if the disasters stop or reach the set number of disasters, the GA algorithm preprocessing is completed, and the obtained optimal initial weights and thresholds are passed to the acquisition. The initial value unit, the obtaining initial value unit transmits the obtained initial value to the BP network training unit. The BP network training unit adjusts the initial weights and thresholds according to the momentum-adaptive learning rate, and uses the Levenberg-Marquardt algorithm to find the optimal PID parameter values;
动量-自适应学习速率调整计算公式为:The momentum-adaptive learning rate adjustment is calculated as:
β(k+1)=τ*3λ*β(k)β(k+1)=τ*3 λ *β(k)
其中,β为学习速率因子,λ为梯度方向,τ为学习误差系数,w为权重函数;Among them, β is the learning rate factor, λ is the gradient direction, τ is the learning error coefficient, and w is the weight function;
Levenberg-Marquardt算法的计算公式为:The calculation formula of the Levenberg-Marquardt algorithm is:
Δw=(JTJ+μI)-1JTeΔw=(J T J+μI) -1 J T e
其中,e为误差量,J是网络误差度对权值的雅可比矩阵,I为的单位矩阵,μ为比例系数,Δw为权重增量;当μ很大时,即为Gauss-Newton算法,当μ很小时,接近梯度下降法。精度判断单元进行最后评价,当BP网络的误差评价函数小于误差阈值时,则整个BP网络的学习过程完成,然后再用测试数据测试BP网络的学习效果和泛化能力。Among them, e is the error amount, J is the Jacobian matrix of the network error degree to the weight, I is the unit matrix, μ is the proportional coefficient, Δw is the weight increment; when μ is large, it is the Gauss-Newton algorithm, When μ is small, it is close to the gradient descent method. The accuracy judgment unit performs the final evaluation. When the error evaluation function of the BP network is less than the error threshold, the learning process of the entire BP network is completed, and then the learning effect and generalization ability of the BP network are tested with the test data.
实施例2Example 2
如图4、图5所示,用于太阳跟踪器的跟踪方法,应用于实施例1提供的跟踪系统中。该算法首先以跟踪性能最佳为控制目标进行PID参数调节,再以抗干扰性能最佳为控制目标进行参数调节,具体调节步骤如下:As shown in FIG. 4 and FIG. 5 , the tracking method for a solar tracker is applied to the tracking system provided in Embodiment 1. The algorithm firstly adjusts the PID parameters with the best tracking performance as the control goal, and then adjusts the parameters with the best anti-interference performance as the control goal. The specific adjustment steps are as follows:
步骤1.随机产生2000组数据,其中1500组数据用于训练BP网络,另外500组数据用于测试BP网络,并将数据进行归一化处理;Step 1. Randomly generate 2000 sets of data, of which 1500 sets of data are used to train the BP network, and the other 500 sets of data are used to test the BP network, and the data is normalized;
步骤2.确定BP网络结构
首先确定网络总共为三层:输入层、隐含层、输出层;其中输入层有4个神经元分别为指定输入信号rin(k),实际输出信号yout(k),误差量e(k)和常数a;输出层的三个神经元分别对应PID控制的三个参数kp,ki,kd;而隐含层的神经元个数根据经验公式为基础,经过不断地仿真调试,确定隐含层神经元的个数为7个,即BP网络的拓扑结构为4:7:3,如图3所示。First, determine that the network has three layers in total: input layer, hidden layer, and output layer; the input layer has 4 neurons, which are the specified input signal r in (k), the actual output signal y out (k), and the error amount e ( k) and constant a; the three neurons in the output layer correspond to the three parameters k p , k i , k d of the PID control respectively; and the number of neurons in the hidden layer is based on the empirical formula Based on continuous simulation and debugging, it is determined that the number of neurons in the hidden layer is 7, that is, the topology of the BP network is 4:7:3, as shown in Figure 3.
步骤3.初始化BP网络Step 3. Initialize the BP network
设置BP网络的权值和阈值初始值以及误差评价函数和误差阈值,并计算在初始值的情况下误差信号是否小于误差阈值,若是,则BP网络无需训练,直接进入测试阶段,否则,进入步骤4);其中初始值为权值和阈值初值;Set the initial value of the weights and thresholds of the BP network, the error evaluation function and the error threshold, and calculate whether the error signal is less than the error threshold under the initial value. If so, the BP network does not need to be trained, and directly enters the testing phase, otherwise, enter the step 4); where the initial value is the weight and the initial value of the threshold;
步骤4.初始化GA算法的进化次数n、交叉率pc、变异率pm、种群规模m;Step 4. Initialize the evolution times n, crossover rate pc , mutation rate pm, and population size m of the GA algorithm;
步骤5.对含有BP网络初始值的种群进行实数编码,并将适应度函数定义为期望数据与实际输出数据之差;Step 5. Real-number coding is performed on the population containing the initial value of the BP network, and the fitness function is defined as the difference between the expected data and the actual output data;
步骤6.执行GA操作Step 6. Perform GA operations
GA操作包括选择算子、交叉算子、变异算子;其中交叉率pc和变异率pm采用自适应方法求得该种群中适应度最优的个体,然后将适应度最优的个体不经任何交叉、变异操作直接进入下一代种群,即新种群,其他的个体进入下一种群的概率与其在整个种群中的相对适应度成正比;采用的自适应交叉率pc和变异率pm的计算公式为:The GA operation includes selection operator, crossover operator, and mutation operator; in which the crossover rate p c and the mutation rate p m use the adaptive method to obtain the individual with the best fitness in the population, and then the individual with the best fitness is not selected. After any crossover and mutation operations, it directly enters the next generation population, that is, the new population, and the probability of other individuals entering the next population is proportional to their relative fitness in the entire population; the adaptive crossover rate p c and mutation rate p m are used. The calculation formula is:
其中,α1,α2为两个大于0的常数,pc1,pc2,pm1,pm2为根据经验得出的常数,分别为0.85、0.65、0.1、0.001;favg、fmax、f'分别为该种群的平均适应度、总适应度、该个体的适应度;Among them, α 1 , α 2 are two constants greater than 0, p c1 , p c2 , p m1 , p m2 are constants obtained by experience, which are 0.85, 0.65, 0.1, 0.001 respectively; f avg , f max , f' are the average fitness of the population, the total fitness, and the fitness of the individual;
步骤7.灾变判断,计算产生的新种群的总适应度,若连续n代未出现更优秀的个体时,这说明GA算法出现了早熟线程,陷入局部极小值,此时需要进行灾变,杀死当前种群所有优秀的个体,进入一下代。若若干次灾变后,适应度值与未灾变前一样,则停止灾变;若灾变停止或到达设定的灾变次数,则GA算法优化完成,将得到的最优初始权值和阈值传递给BP网络;Step 7. Catastrophe judgment, calculate the total fitness of the new population generated, if there is no better individual for n consecutive generations, it means that the GA algorithm has a premature thread and falls into a local minimum value. All outstanding individuals of the current population will be killed and will enter the next generation. If after several disasters, the fitness value is the same as before the disaster, then stop the disaster; if the disaster stops or reaches the set number of disasters, the GA algorithm is optimized, and the obtained optimal initial weights and thresholds are passed to the BP network ;
步骤8.BP网络训练Step 8. BP network training
根据接收到的GA算法优化后的权值和阈值作为初始值,根据动量-自适应学习率调整初始权值和阈值,并采用Levenberg-Marquardt算法最优化算法寻找最优的PID参数值;According to the received weights and thresholds optimized by the GA algorithm as the initial values, adjust the initial weights and thresholds according to the momentum-adaptive learning rate, and use the Levenberg-Marquardt algorithm to find the optimal PID parameter values;
动量-自适应学习速率调整计算公式为:The momentum-adaptive learning rate adjustment is calculated as:
β(k+1)=τ*3λ*β(k)β(k+1)=τ*3 λ *β(k)
其中,β为学习速率因子,λ为梯度方向,τ为学习误差系数,w为权重函数;Among them, β is the learning rate factor, λ is the gradient direction, τ is the learning error coefficient, and w is the weight function;
Levenberg-Marquardt算法的计算公式为:The calculation formula of the Levenberg-Marquardt algorithm is:
Δw=(JTJ+μI)-1JTeΔw=(J T J+μI) -1 J T e
其中,e为误差量,J是网络误差度对权值的雅可比矩阵,I为的单位矩阵,μ为比例系数,Δw为权重增量;当μ很大时,即为Gauss-Newton算法,当μ很小时,接近梯度下降法。Among them, e is the error amount, J is the Jacobian matrix of the network error degree to the weight, I is the unit matrix, μ is the proportional coefficient, Δw is the weight increment; when μ is large, it is the Gauss-Newton algorithm, When μ is small, it is close to the gradient descent method.
步骤9.当BP网络的误差评价函数小于误差阈值时,则整个BP网络的学习过程完成,然后再用测试数据测试BP网络的学习效果和泛化能力。Step 9. When the error evaluation function of the BP network is less than the error threshold, the learning process of the entire BP network is completed, and then the learning effect and generalization ability of the BP network are tested with the test data.
实施例3Example 3
本实施例将介绍现有技术到实施例2提供的算法的演变过程。This embodiment will introduce the evolution process from the prior art to the algorithm provided in
二自由度two degrees of freedom
PID控制系统的控制指标主要有:外扰抑制作用和目标跟踪特性,在采用一自由度控制时,两者呈现相反的变化趋势,不同同时达到最优性能。二自由度PID(Two degree offreedom PID,2DOF PID)控制就是使目标跟踪特性为最优和外扰抑制特性为最优的PID参数分别进行整定,使整个控制系统的性能达到最佳。The main control indicators of the PID control system are: external disturbance suppression and target tracking characteristics. When one degree of freedom control is used, the two show opposite trends, and they achieve optimal performance at the same time. Two degrees of freedom PID (Two degree of freedom PID, 2DOF PID) control is to set the PID parameters with the optimal target tracking characteristics and the optimal external disturbance suppression characteristics respectively, so as to achieve the best performance of the entire control system.
在采用2DOF PID控制时,需满足易懂,结构简单,与传统技术有较好的结合性且能继承其技术成果的要求。在对于太阳跟踪器的控制回路中,采用目标值滤波器型的2DOFPID控制。控制回路图6所示。When using 2DOF PID control, it needs to meet the requirements of easy to understand, simple structure, good combination with traditional technology and can inherit its technical achievements. In the control loop for the solar tracker, the target value filter type 2DOFPID control is used. The control loop is shown in Figure 6.
目标值滤波器H(s)可表示为:The target value filter H(s) can be expressed as:
其中,α为比例增益的二自由度化系数(一般0≤α≤1),β为积分时间的二自由度化系数(一般0≤β<1),γ为微分时间的二自由度化系数(一般0≤γ<2),1/η为微分增益(一般0.1≤γ≤1)。Among them, α is the 2-DOF coefficient of the proportional gain (generally 0≤α≤1), β is the 2-DOF coefficient of the integral time (generally 0≤β<1), and γ is the 2-DOF coefficient of the differential time (generally 0≤γ<2), 1/η is the differential gain (generally 0.1≤γ≤1).
采用二自由度化系数可变的方法进行太阳跟踪器的PID控制,调整步骤为:加外扰,调整Kp,Ki,Kd,使外扰抑制特性为最佳;根据Chian-Hrone-Reswick(CHR)调整法初步得到α,γ的值,根据工程经验,取β=0.15;根据目标值的变化量,在设定值附近微调二自由度化系数α,β,γ,使目标跟踪特性为最佳。The PID control of the solar tracker is carried out by adopting the method with variable two-degree-of-freedom coefficient. The adjustment steps are: adding external disturbance, adjusting K p , K i , and K d to make the external disturbance suppression characteristic the best; according to Chian-Hrone- The Reswick (CHR) adjustment method initially obtains the values of α and γ. According to engineering experience, β = 0.15. According to the change of the target value, fine-tune the two-degree-of-freedom coefficients α, β, and γ near the set value to make the target track. Features are the best.
二自由度既能改善控制特性,又易进行调整,只需增加目标值滤波器,在保证结构简单的情况下,可实现控制性能达到最佳。Two degrees of freedom can not only improve the control characteristics, but also easy to adjust, only need to increase the target value filter, in the case of ensuring the simple structure, can achieve the best control performance.
BP网络BP network
人工神经网络出现在20世纪40年代,由众多的而神经元可调的连接权值连接而成,在智能控制领域取得很好的应用成果.作为应用最广泛的人工神经网络模型,误差反向传播神经网络(BPNN)具有实现任何复杂非线性映射的能力,能以任何精度逼近任何非线性连续函数;并行分布处理方式;具有自学习能力;具有一定的推广,概括和自适应能力,具有泛化能力,即将这组权值应用于一般情形的能力;数据融合的能力,可同时处理定量和定性信息;可用于多变量系统和在线学习的能力。The artificial neural network appeared in the 1940s. It is formed by connecting a large number of neurons with adjustable connection weights. It has achieved good application results in the field of intelligent control. As the most widely used artificial neural network model, the error reverse Propagation neural network (BPNN) has the ability to realize any complex nonlinear mapping, and can approximate any nonlinear continuous function with any precision; parallel distributed processing mode; has self-learning ability; the ability to apply this set of weights to general situations; the ability of data fusion, which can process quantitative and qualitative information at the same time; the ability to be used in multivariate systems and online learning.
BP算法基本思想是最小二乘法,它采用梯度搜索技术,使网络的实际输出值与期望输出值的误差均方值为最小。算法的学习过程由信息的正向传播和误差的反向传播组成。输入信息从输入层经隐含层逐层处理后传向输出层,每层神经元节点的状态只影响下一层神经元的状态。当输出层不能得到期望的输出时,则转入反向传播,将误差信号沿着原来的连接通路返回,通过修改各层神经元的连接权值和闭值,使误差函数沿着负梯度方向下降,最终达到实际输出值与期望输出值之间的误差最小。The basic idea of BP algorithm is the least square method, which uses gradient search technology to minimize the mean square error between the actual output value and the expected output value of the network. The learning process of the algorithm consists of forward propagation of information and back propagation of error. The input information is transmitted from the input layer to the output layer after being processed layer by layer through the hidden layer, and the state of each layer of neuron nodes only affects the state of the next layer of neurons. When the output layer cannot get the expected output, it turns to backpropagation, returns the error signal along the original connection path, and modifies the connection weights and closed values of neurons in each layer to make the error function follow the direction of the negative gradient. decrease, and finally the error between the actual output value and the expected output value is minimized.
BP神经网路有输入层,隐层和输出层,每层都不同的神经元个数。根据研究对象结构和复杂程度不同,神经网络的拓扑结构也各不相同。在该系统中,采用一个输入层,一个隐含层,一个输出层,且神经元个数为3:5:3的拓扑结构。The BP neural network has an input layer, a hidden layer and an output layer, and each layer has a different number of neurons. According to the structure and complexity of the research object, the topology of the neural network is also different. In this system, an input layer, a hidden layer, and an output layer are adopted, and the topology structure of the number of neurons is 3:5:3.
三个输入信号分别为指定输入信号rin(k),实际输出信号yout(k),误差量e(k)。三个输出信号分别对应PID控制的三个参数kp,ki,kd。The three input signals are the specified input signal r in (k), the actual output signal y out (k), and the error amount e (k). The three output signals correspond to the three parameters k p , k i , and k d of the PID control respectively.
BP网络的学习过程由正向传播和反向传播两部分组成。首先是信号的正向传播过程,输入层的信息向前传播到隐含层的节点上,经过个单元的激活函数运算,并把隐含层的信息传输到输出层的节点,再经过输出层上各节点的激活函数的运算输出。在正向传播过程中,每一层的神经元状态只影响下一层神经元网络。若实际输出与期望输出值之间的误差大于设定的误差函数阈值,则转向反向传播过程,将误差信号反向传播,逐次修改各层神经元的权值,再经正向传播得到修正后的输出,两个过程的反复应用,使得误差信号最小。当实际误差信号小于设定的误差阈值时,网络的学习过程结束。The learning process of BP network consists of two parts: forward propagation and back propagation. The first is the forward propagation process of the signal. The information of the input layer is propagated forward to the nodes of the hidden layer, after the activation function operation of each unit, and the information of the hidden layer is transmitted to the nodes of the output layer, and then passes through the output layer. The operation output of the activation function of each node above. During forward propagation, the neuron state of each layer only affects the next layer of neuron network. If the error between the actual output and the expected output value is greater than the set error function threshold, turn to the backpropagation process, backpropagate the error signal, modify the weights of neurons in each layer successively, and then get the correction through forward propagation After the output, the two processes are applied iteratively to minimize the error signal. When the actual error signal is less than the set error threshold, the learning process of the network ends.
在正向传播过程中,隐含层节点的输入输出为:In the forward propagation process, the input and output of the hidden layer nodes are:
输出层的输入输出为:The input and output of the output layer are:
wij,wjk分别为输入层与隐含层,隐含层与输出层之间的连接权值。分别为隐含层和输出层的输出值。f(k),g(k)为激活函数,用来加入非线性因素,从而弥补线性模型表达力不够的缺点,激活函数的选择需满足单调递增有界且一阶可微的特点,经过仿真,隐含层的激活函数双极S形函数:w ij , w jk are the connection weights between the input layer and the hidden layer, and the hidden layer and the output layer, respectively. are the output values of the hidden layer and the output layer, respectively. f(k), g(k) are activation functions, which are used to add nonlinear factors to make up for the lack of expressiveness of linear models. The selection of activation functions should meet the characteristics of monotonically increasing bounded and first-order differentiable. After simulation , the activation function of the hidden layer bipolar sigmoid function:
误差评估函数表示为: The error evaluation function is expressed as:
根据误差评估函数经反向传播过程对每个节点的权值进行调整,权值的修正量与误差的负梯度方向成正比,即:令则 According to the error evaluation function, the weight of each node is adjusted through the back-propagation process, and the correction of the weight is proportional to the negative gradient direction of the error, namely: make but
隐含层与输入层之间的权值调整量为:The weight adjustment between the hidden layer and the input layer is:
令有Δwij=ηδjxi make have Δw ij = ηδ j x i
其中,η为学习步长,即学习速率。下一次迭代时隐含层与输出层任一节点之间的权值,输入层与隐含层之间的权值分别为:Among them, η is the learning step size, that is, the learning rate. The weight between the hidden layer and any node of the output layer in the next iteration, and the weight between the input layer and the hidden layer are:
wjk(k)=Δwjk+wjk(k)w jk (k)=Δw jk +w jk (k)
wij(k)=Δwij+wij(k)w ij (k)=Δw ij +w ij (k)
然而,这种标准的BP神经网路实际上也是一种梯度下降搜索法,存在收敛速度慢,易陷入局部极小值的缺点,而这些缺点可以通过使用改进的BP算法进行校正,改进的BP算法可分为两类,一是采用启发式学习规则,如添加附加动量项,采用自适应学习率等;二是基于数值优化的学习方法,如共轭梯度法,拟牛顿法和Levenberg-Marquardt方法(简称L-M法),However, this standard BP neural network is actually a gradient descent search method, which has the shortcomings of slow convergence and easy to fall into local minima, and these shortcomings can be corrected by using the improved BP algorithm. Algorithms can be divided into two categories, one is using heuristic learning rules, such as adding additional momentum terms, using adaptive learning rate, etc.; the other is learning methods based on numerical optimization, such as conjugate gradient method, quasi-Newton method and Levenberg-Marquardt method method (L-M method for short),
1.加入动量项1. Add momentum term
为了加快收敛速度,在权值的修正量加上上一次修正权系数,把他作为本次修正的依据之一,即有:In order to speed up the convergence speed, add the last correction weight coefficient to the weight correction, and use it as one of the basis for this correction, namely:
Δwij(k+1)=ηδjxi+αΔwij(k)Δw ij (k+1)=ηδ j x i +αΔw ij (k)
其中,α为动量因子。where α is the momentum factor.
2.动量-自适应学习速率调整算法2. Momentum-Adaptive Learning Rate Adjustment Algorithm
在进行学习速率的自适应调整时,基本思想是在学习收敛的情况下,增大η,以缩短学习时间;当η偏大致使不能收敛时,要及时减小η,直到收敛为止。In the self-adaptive adjustment of the learning rate, the basic idea is to increase η to shorten the learning time in the case of learning convergence; when η is too large to converge, decrease η in time until convergence.
β(k+1)=τ*3λ*β(k)β(k+1)=τ*3 λ *β(k)
其中,β为学习速率因子,λ为梯度方向,τ为学习误差系数,w为权重函数。Among them, β is the learning rate factor, λ is the gradient direction, τ is the learning error coefficient, and w is the weight function.
3.采用Levenberg-Marquardt算法3. Using the Levenberg-Marquardt algorithm
L-M法实质上是梯度下降法和牛顿法的结合,网络权值较少时具有很高的收敛速度。L-M优化算法的权值调整率为:The L-M method is essentially a combination of the gradient descent method and the Newton method, and has a high convergence speed when the network weights are small. The weight adjustment rate of the L-M optimization algorithm is:
Δw=(JTJ+μI)-1JTeΔw=(J T J+μI) -1 J T e
其中,e为误差量,J是网络误差度对权值的雅可比矩阵,I为的单位矩阵,μ为比例系数,,Δw为权重增量。当μ很大时,即为Gauss-Newton算法,当μ很小时,接近梯度下降法。Among them, e is the error amount, J is the Jacobian matrix of the network error degree to the weight, I is the unit matrix, μ is the scale coefficient, Δw is the weight increment. When μ is large, it is Gauss-Newton algorithm, and when μ is small, it is close to the gradient descent method.
动量项的加入改善了收敛速度,但是对学习率的选择存在困难,且对初值要求较高;自适应学习速率大大的改善了易陷入局部极小值的缺点,但是收敛速度较慢。The addition of the momentum term improves the convergence speed, but it is difficult to choose the learning rate and requires a high initial value; the adaptive learning rate greatly improves the disadvantage of being easily trapped in local minima, but the convergence speed is slow.
Levenberg-Marquardt算法大大的提高了收敛速度,但是却并不能改善易陷入局部极小值的问题,采用启发式学习规则中的动量项和自适应学习率和数字优化学习方法相结合的方法,每个改进方法互补,有效的改善了BP网络存在的收敛速度缓慢,已陷入极小值的缺点,大大改善了后期的控制精度和速度。The Levenberg-Marquardt algorithm greatly improves the convergence speed, but it cannot improve the problem of being easily trapped in local minima. The momentum term in the heuristic learning rule is combined with the adaptive learning rate and the numerical optimization learning method. These improved methods complement each other, effectively improve the shortcomings of the BP network that the convergence speed is slow and has fallen into a minimum value, and greatly improves the control accuracy and speed in the later stage.
改进的BP算法降低了进入局部极小值得概率,但是没有从根本上实现快速的全局搜索,GA算法GA时一种模拟自然界生物进化机制的搜索技术,具有全局搜索的能力,因此,采用GA算法和BP网络相结合的模式可以更好地进行网络权值的调节,实现快速,高精度的PID控制。The improved BP algorithm reduces the probability of entering the local minimum value, but does not fundamentally realize fast global search. GA algorithm GA is a search technology that simulates the natural biological evolution mechanism and has the ability to search globally. Therefore, the GA algorithm is used. The mode combined with the BP network can better adjust the network weights and achieve fast and high-precision PID control.
GA算法:GA algorithm:
GA-BPNN算法的主要思想:首先用GA算法较快地搜索到最优解附近,在解空间中定位出一个较好的搜索空间,并给BP网络提供较好的初始值,然后采用BP算法在这个小的搜索空间搜索出最优解。GA算法与BP算法之间的切换可通过误差的大小来实现,如果误差大于某个值时采用GA算法,当小于该值时采用BP算法,直到达到所限制的精度或最大步数为止。The main idea of the GA-BPNN algorithm: firstly use the GA algorithm to quickly search for the vicinity of the optimal solution, locate a better search space in the solution space, and provide a better initial value for the BP network, and then use the BP algorithm The optimal solution is found in this small search space. The switching between the GA algorithm and the BP algorithm can be realized by the size of the error. If the error is greater than a certain value, the GA algorithm is used, and when the error is smaller than the value, the BP algorithm is used until the limited accuracy or the maximum number of steps is reached.
简单的GA算法使用了选择算子,交叉算子,变异算子,GA过程如下:The simple GA algorithm uses the selection operator, the crossover operator, and the mutation operator. The GA process is as follows:
1.确定编码方式:实现解空间到搜索空间的转换,编码形式为:1. Determine the encoding method: realize the conversion from the solution space to the search space, and the encoding form is:
其中,分别为输入层与隐含层,隐含层与输出层之间的连接权值。in, are the connection weights between the input layer and the hidden layer, and the hidden layer and the output layer, respectively.
2.确定参数:群体大小,交叉,变异概率,终止迭代的次数;2. Determine the parameters: population size, crossover, mutation probability, number of termination iterations;
3.初始化:随机生成n个个体,提供初始种群P(0);3. Initialization: randomly generate n individuals to provide the initial population P(0);
4.评价:译码到解空间,计算候补解,解集合的适应度,平均适应度。4. Evaluation: Decode to the solution space, calculate the candidate solutions, the fitness of the solution set, and the average fitness.
5.GA操作:包括选择算子、交叉算子、变异算子,对种群P(t)进行操作,产生下一代5. GA operation: including selection operator, crossover operator, mutation operator, operate on the population P(t) to generate the next generation
P(t+1)。P(t+1).
6.重复4,5,直至参数收敛或达到预定的指标。6. Repeat 4 and 5 until the parameters converge or reach the predetermined target.
简单的GA算法以易出现早熟,即过早的想局部最优解收敛的情况,因此,需要对交叉率和变异率进行自适应调整。改进的自适应交叉率pc和变异率pm的计算公式为:The simple GA algorithm is prone to precociousness, that is, premature convergence of the local optimal solution. Therefore, the crossover rate and mutation rate need to be adaptively adjusted. The calculation formulas of the improved adaptive crossover rate pc and mutation rate pm are:
α1,α2为两个大于0的常数,pc1,pc2,pm1,pm2为根据经验得出的常数,分别为0.9、0.6、0.1、0.001。α 1 , α 2 are two constants greater than 0, p c1 , p c2 , p m1 , and p m2 are constants obtained from experience, which are 0.9, 0.6, 0.1, and 0.001, respectively.
以上显示和描述了本发明的基本原理、主要特征和本发明的优点。本行业的技术人员应该了解,本发明不受上述实施例的限制,上述实施例和说明书中描述的只是本发明的原理,在不脱离本发明精神和范围的前提下本发明还会有各种变化和改进,这些变化和改进都落入要求保护的本发明的范围内。本发明要求的保护范围由所附的权利要求书及其等同物界定。The foregoing has shown and described the basic principles, main features and advantages of the present invention. It should be understood by those skilled in the art that the present invention is not limited by the above-mentioned embodiments. The above-mentioned embodiments and descriptions describe only the principles of the present invention. Without departing from the spirit and scope of the present invention, there are various Variations and improvements are intended to fall within the scope of the claimed invention. The scope of protection claimed by the present invention is defined by the appended claims and their equivalents.
Claims (9)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710228320.6A CN106896724B (en) | 2017-04-10 | 2017-04-10 | Tracking system and tracking method for solar tracker |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710228320.6A CN106896724B (en) | 2017-04-10 | 2017-04-10 | Tracking system and tracking method for solar tracker |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106896724A CN106896724A (en) | 2017-06-27 |
CN106896724B true CN106896724B (en) | 2020-08-04 |
Family
ID=59196419
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710228320.6A Active CN106896724B (en) | 2017-04-10 | 2017-04-10 | Tracking system and tracking method for solar tracker |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106896724B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110518625B (en) * | 2019-01-22 | 2023-07-25 | 电子科技大学 | A DC Component Suppression Method of Grid-connected Inverter Controlled by Variable Learning Rate BP-PID |
CN110068759B (en) * | 2019-05-22 | 2021-11-09 | 华雁智能科技(集团)股份有限公司 | Fault type obtaining method and device |
CN112666830A (en) * | 2020-12-24 | 2021-04-16 | 西南技术物理研究所 | Tracking precision control method based on RBF neural network |
CN116449685B (en) * | 2023-04-23 | 2024-03-29 | 上海交通大学 | A fast tracking and precise control ship gas turbine control method and device |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102096373A (en) * | 2010-12-07 | 2011-06-15 | 昆明理工大学 | Microwave drying PID (proportion integration differentiation) control method based on increment improved BP (back propagation) neural network |
CN104835215A (en) * | 2015-05-11 | 2015-08-12 | 上海航盛实业有限公司 | Safety monitoring system of automobile data recorder |
CN105303252A (en) * | 2015-10-12 | 2016-02-03 | 国家计算机网络与信息安全管理中心 | Multi-stage nerve network model training method based on genetic algorithm |
CN106503802A (en) * | 2016-10-20 | 2017-03-15 | 上海电机学院 | A kind of method of utilization genetic algorithm optimization BP neural network system |
-
2017
- 2017-04-10 CN CN201710228320.6A patent/CN106896724B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102096373A (en) * | 2010-12-07 | 2011-06-15 | 昆明理工大学 | Microwave drying PID (proportion integration differentiation) control method based on increment improved BP (back propagation) neural network |
CN104835215A (en) * | 2015-05-11 | 2015-08-12 | 上海航盛实业有限公司 | Safety monitoring system of automobile data recorder |
CN105303252A (en) * | 2015-10-12 | 2016-02-03 | 国家计算机网络与信息安全管理中心 | Multi-stage nerve network model training method based on genetic algorithm |
CN106503802A (en) * | 2016-10-20 | 2017-03-15 | 上海电机学院 | A kind of method of utilization genetic algorithm optimization BP neural network system |
Non-Patent Citations (4)
Title |
---|
基于自适应学习速率的改进型BP算法研究;杨甲沛;《中国优秀硕士学位论文全文数据库》;20090915(第9期) * |
基于遗传神经网络的光伏阵列多峰最大功率点追踪;白静晶;《中国优秀硕士学位论文全文数据库》;20120415(第4期) * |
基于遗传算法-BP神经网络的PID控制器的设计;曲尔光;《机床与液压》;20070731;第35卷(第7期) * |
白静晶.基于遗传神经网络的光伏阵列多峰最大功率点追踪.《中国优秀硕士学位论文全文数据库》.2012,(第4期), * |
Also Published As
Publication number | Publication date |
---|---|
CN106896724A (en) | 2017-06-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109117951B (en) | BP neural network-based probability load flow online calculation method | |
CN106896724B (en) | Tracking system and tracking method for solar tracker | |
CN109858647A (en) | A kind of Regional Flooding Hazard Risk Assessment and predictor method coupling GIS and GBDT algorithm | |
CN113126676B (en) | Livestock and poultry house breeding environment parameter intelligent control system | |
CN109816008A (en) | An abnormal prediction method of light curve of astronomical big data based on long short-term memory network | |
CN110824915B (en) | Intelligent monitoring method and system for wastewater treatment based on GA-DBN network | |
CN110363349B (en) | ASCS-based LSTM neural network hydrological prediction method and system | |
CN114154401B (en) | Soil erosion modulus calculation method and system based on machine learning and observation data | |
CN108632764B (en) | A Multi-sensor Selective Measurement Data Fusion Estimation Method | |
CN113031555A (en) | Intelligent purification system for harmful gas in environment of livestock and poultry house | |
CN109800517B (en) | Improved reverse modeling method for magnetorheological damper | |
CN114666729B (en) | Underwater acoustic communication error compensation method for underwater cluster UUV collaborative navigation positioning | |
CN103886395A (en) | Reservoir optimal operation method based on neural network model | |
CN114199248A (en) | An AUV Co-localization Method Based on Hybrid Metaheuristic Algorithm to Optimize ANFIS | |
CN108764475A (en) | The Gyro Random error compensating method and system of genetic wavelet neural network | |
CN104050505A (en) | Multilayer-perceptron training method based on bee colony algorithm with learning factor | |
CN108537366A (en) | Reservoir scheduling method based on optimal convolution bidimensionalization | |
CN106371316A (en) | PSO-LSSVM-based on-line control method and apparatus for dosing of water island | |
CN112651519A (en) | Secondary equipment fault positioning method and system based on deep learning theory | |
CN105956715A (en) | Soil moisture status prediction method and device | |
CN105469142A (en) | Neural network increment-type feedforward algorithm based on sample increment driving | |
CN113448245A (en) | Deep learning-based dissolved oxygen control method and system in sewage treatment process | |
CN114880734A (en) | BP-LSTM-based steel-concrete combined bridge deck system temperature field and temperature effect prediction method | |
Jafarkazemi et al. | Performance prediction of flat-plate solar collectors using MLP and ANFIS | |
CN118917205A (en) | Multi-information-source-fused ballistic wind identification method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |