CN116560428A - Poultry house temperature prediction control system and control method based on LMBP neural network - Google Patents

Poultry house temperature prediction control system and control method based on LMBP neural network Download PDF

Info

Publication number
CN116560428A
CN116560428A CN202310693737.5A CN202310693737A CN116560428A CN 116560428 A CN116560428 A CN 116560428A CN 202310693737 A CN202310693737 A CN 202310693737A CN 116560428 A CN116560428 A CN 116560428A
Authority
CN
China
Prior art keywords
temperature
poultry house
module
prediction
neural network
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
CN202310693737.5A
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.)
Shandong University of Science and Technology
Original Assignee
Shandong University of Science and Technology
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 Shandong University of Science and Technology filed Critical Shandong University of Science and Technology
Priority to CN202310693737.5A priority Critical patent/CN116560428A/en
Publication of CN116560428A publication Critical patent/CN116560428A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D23/00Control of temperature
    • G05D23/19Control of temperature characterised by the use of electric means
    • G05D23/20Control of temperature characterised by the use of electric means with sensing elements having variation of electric or magnetic properties with change of temperature
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A40/00Adaptation technologies in agriculture, forestry, livestock or agroalimentary production
    • Y02A40/70Adaptation technologies in agriculture, forestry, livestock or agroalimentary production in livestock or poultry

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Housing For Livestock And Birds (AREA)

Abstract

The invention relates to the technical field of poultry house cultivation, in particular to a poultry house temperature prediction control system and a poultry house temperature prediction control method based on an LMBP neural network. The invention comprises the following components: the temperature controller module comprises a temperature prediction model, performs online prediction according to the LMBP neural network model provided by the server module, obtains a predicted temperature of the poultry house, and determines the running state of control equipment according to the difference value between the target temperature of the poultry house and the predicted temperature of the poultry house through a temperature control algorithm in the temperature controller module; the server module comprises an LMBP neural network model, updates the training data set in the moving window in real time according to the environmental data uploaded by the temperature controller module, increases the sample space dimension by adding a delay step length to the time sequence data, and further realizes the training of the neural network in an off-line mode, so that the temperature prediction model in the temperature controller module can be continuously updated, and real-time decision support is provided for the temperature controller module.

Description

Poultry house temperature prediction control system and control method based on LMBP neural network
Technical Field
The invention relates to the technical field of poultry house cultivation, in particular to a poultry house temperature prediction control system and a poultry house temperature prediction control method based on an LMBP neural network.
Background
Because the outside of the poultry house has uncontrollable and unmeasurable disturbance such as temperature outside the poultry house, illumination intensity, wind speed and the like, the temperature of the poultry house is required to be accurately regulated according to different ages of poultry, and therefore, higher requirements are put forward on the design of a temperature control system.
The current temperature control system of the poultry house depends on parameter environment data collected by an on-site sensor to determine the running state of control equipment, the parameter environment data collected by the on-site sensor can only reflect the current environment state of the poultry house, the prediction of the future environmental parameter temperature of the poultry house can not be realized, and the environmental factor control effect of the poultry house is difficult to ensure. The problems of heat stress, cold stress and the like of the poultry are easy to cause, so that the egg and meat yield is reduced, the poultry house energy consumption is increased, the economic benefit of poultry cultivation is reduced, and the stable development of poultry cultivation is not facilitated.
Disclosure of Invention
The invention aims to solve the technical problems that: the utility model provides a poultry house temperature predictive control system and control method based on LMBP neural network, which determines the running state of control equipment according to the difference between the poultry house predictive temperature and the poultry house target temperature, thereby improving the control precision.
The technical scheme of the invention is as follows:
an LMBP neural network-based poultry house temperature prediction control system comprises the following components:
the temperature controller module comprises a temperature prediction model, performs online prediction according to the LMBP neural network model provided by the server module, obtains a predicted temperature of the poultry house, and determines the running state of control equipment according to the difference value between the target temperature of the poultry house and the predicted temperature of the poultry house through a temperature control algorithm in the temperature controller module;
the temperature prediction model is used for predicting the internal temperature of the poultry house at a specific step moment in the future or called the internal prediction temperature of the poultry house as a model output quantity according to the internal temperature of the poultry house, the humidity of the poultry house, the external temperature of the poultry house, the ventilation quantity and the heating temperature as model input quantity, so as to form a multi-input single-output model for carrying out online prediction on the internal temperature of the poultry house in the future;
the server module updates the training data set in the moving window in real time according to the environmental data uploaded by the temperature controller module, increases the dimension of the sample space by increasing the delay step length on the time sequence data, and further realizes the training of the neural network in an off-line manner, so that the temperature prediction model in the temperature controller module can be continuously updated, and real-time decision support is provided for the temperature controller module;
the LMBP neural network model comprises the steps of setting moving window parameters, setting neural network parameters, establishing a temperature prediction model according to a training set, and transmitting the temperature prediction model to the temperature controller module;
the temperature controller module takes the target temperature of the poultry house as a setting input, and determines the running state of control equipment through a temperature control algorithm in the temperature controller module according to the difference value between the predicted temperature of the poultry house and the target temperature of the poultry house, so that closed-loop control of the temperature of the poultry house is realized.
Preferably, the control system further comprises a comparison point module, a fan module, a poultry house module, a TDL module and a poultry house prediction module, wherein the comparison point module is connected with a temperature controller module, the temperature controller module is connected with the fan module, the fan module is connected with the poultry house module, the poultry house module is connected with the TDL module, the TDL module is connected with the poultry house prediction module, and the poultry house prediction module is connected with the comparison point module.
Preferably, the comparison point module is used for determining the difference between the target temperature of the poultry house and the predicted temperature of the poultry house, namely the target temperature T in the poultry house at the initial moment of the kth period 0 (k) Predicted temperature T of poultry house at initial moment of k+p cycle p The difference between (k+p) (p is the predicted step size), the temperature deviation T is calculated e (k);
T e (k)=|T p (k)-T 0 (k+p)|。
Preferably, the temperature controller module is used for controlling the temperature deviation T according to the initial moment of the kth period e (k) Calculating a k period control signal; root of Chinese characterAccording to the control signal, the running state of the fan is adjusted;
if T e (k)>T emax Starting part of fans;
if T e (k)<T emin Closing part of the fans;
if T emin <T e (k)<T emax The load duration delta of the current starting fan is adjusted;
wherein T is emax Indicating the upper limit of temperature deviation, T emin Indicating a lower temperature deviation limit; the load duration rate delta is the duration t of the fan keeping a certain rotation speed to work in a working period with the duration t w1 The proportion of the working period duration t;
the ratio of the duration of the fan operation to the duty cycle, wherein the duty cycle duration is also called full cycle time, and consists of two parts of load duration and idle time.
Preferably, the fan module is used as an actuator, and a continuous periodic operation system is adopted, and the fan module operates according to a series of identical operation periods, wherein each period consists of a constant load operation time and an idle time;
and adjusting the running state of the fan according to the k-th period control signal, including starting part of the fan, closing part of the fan, or adjusting the load duration delta of the current started fan.
Preferably, the dimensions of the poultry house module, as controlled objects, are 120m long, 13m wide and 4.4m high.
Preferably, the TDL module is used as a tap delay line and used for storing and outputting k, k-1 … … k-d time data, wherein d is a delay step length, and the information comprises the temperature of the poultry house, the humidity of the poultry house, the temperature outside the poultry house, the ventilation quantity and the heating temperature.
Preferably, the poultry house prediction module is used for predicting the poultry at the moment of k, k-1 … … k-d according to the output data of the TDL moduleHouse temperature, house humidity, house outside temperature, ventilation and heating temperature, the house predicted temperature T at the initial time of the kth+p cycle p And (k+p) is used for predicting and outputting to a comparison point module so as to be applied to a control system and determine the running state of the control equipment.
The control system has the beneficial effects that:
the poultry house temperature prediction control system based on the LMBP neural network is used for determining the running state of control equipment according to the difference value between the poultry house predicted temperature and the poultry house target temperature, so that the control precision is improved.
The invention adopts the following additional technical scheme:
an aviary temperature prediction control method based on an LMBP neural network comprises the following steps:
s1, offline modeling: comprises setting a moving window parameter, setting a neural network parameter, and according to a training set D r Establishing a temperature prediction model f r The method comprises the following steps:
s11, setting moving window parameters, including a time sequence delay step d, a prediction step p, a moving window length L, a moving window moving speed c and a rolling statistical window length b;
s12, setting neural network parameters, including maximum iteration times, hidden layer node number, model training algorithm, data set dividing mode, error function and early stop test times;
s13, establishing a temperature prediction model according to the training set, and transmitting the temperature prediction model to an online prediction part for online prediction of the internal temperature of the future poultry house;
s2, online prediction: including adding a new sample I k ,I k-1 ,……I k-d According to the temperature prediction model f r Determination ofJudging whether the number of the newly added samples reaches c, and updating the training set through a moving window, wherein the method comprises the following steps:
s21, adding a new sample I k ,I k-1 ,……I k-d Namely, the temperature of the poultry house, the humidity of the poultry house, the temperature outside the poultry house, the ventilation quantity and the heating temperature at the moment k, k-1 and … … k-d;
s22, according to the temperature prediction model f r Determination ofNamely, the predicted temperature of the poultry house at the moment k+p:
s23, judging whether the number of the newly added samples reaches c, if the number of the newly added samples does not reach c, after 1 minute, k=k+1, returning to the step 2, and repeating the above processes; if the newly increased sample number reaches c, entering a step 4, and updating the training set through a moving window process; wherein c is the moving speed of the moving window;
s24, updating the training set through a moving window process, adding c latest samples, removing c oldest samples, keeping the length L of the moving window unchanged, and updating the training set D r Updated to D r+1 Training set D r+1 Will be transmitted to the offline modeling part for updating the temperature prediction model f r+1
Preferably, the accuracy of the online prediction in step S2 is evaluated by the following 5 indexes, namely, a mean square error MSE, a mean absolute error MAE, a root mean square error RMSE and a decision coefficient R 2 Modeling time mean S, expressed mathematically as follows:
wherein y represents the true temperature of the poultry house,indicating the predicted temperature of the poultry house,/-, and>representing a predicted temperature mean of the poultry house;
determining the coefficient R 2 Representing the fitting degree between the true output value and the model output value of the poultry house, R 2 The closer to 1, the better the fitting effect is, and the higher the prediction precision is; the modeling time mean S measures the time used for online modeling, and the total time of a modeling program is T M Modeling times N M S is in seconds.
The control method has the beneficial effects that:
a temperature prediction model is established by using a test Method, a two-layer feedforward neural network is selected as a model structure, and a Levenberg-Marquardt (The Levenberg-Marquardt Method) algorithm is selected as an identification algorithm. In order to ensure that the parameters of the poultry house prediction model change in time along with weather, solve the problems of large temperature difference between spring and autumn and great difficulty in prediction, realize higher prediction precision, and update the training set data of the neural network in real time through a moving window on the basis of the LMBP neural network, thereby realizing online identification; and the model prediction accuracy is further improved by increasing the delay step length to the time series data to increase the sample space dimension.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the description of the embodiments or the prior art will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a block diagram of a poultry house temperature closed loop control system.
Fig. 2 is a control schematic diagram of a poultry house temperature closed loop control system.
Fig. 3 is a logic flow diagram of a temperature controller module.
FIG. 4 is a logic flow diagram of a temperature prediction model.
Fig. 5 is a diagram of the reasoning steps of the moving window over p-step prediction.
Fig. 6 is a logic flow diagram of a two-layer feedforward neural network.
Fig. 7 is a flowchart of an LMBP neural network prediction algorithm based on a moving window.
Fig. 8 is one of the online prediction effect maps in embodiment 2.
FIG. 9 is a second graph of the on-line prediction effect in example 2.
Fig. 10 is an online predictive evaluation index bar graph.
Detailed Description
In order to make the technical solution of the present invention better understood by those skilled in the art, the technical solution of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
Example 1
Because the temperature of the poultry house has a significant effect on the feeding amount of the poultry and the egg and meat yield, the closed loop control system of the poultry house selects the temperature of the poultry house as the control amount. As shown in fig. 1, the embodiment provides a poultry house temperature prediction control system based on an LMBP neural network, which comprises the following components:
the temperature controller module comprises a temperature prediction model, performs online prediction according to the LMBP neural network model provided by the server module, obtains a predicted temperature of the poultry house, and determines the running state of control equipment according to the difference value between the target temperature of the poultry house and the predicted temperature of the poultry house through a temperature control algorithm in the temperature controller module;
the temperature prediction model is used for predicting the internal temperature of the poultry house at a specific step moment in the future or called the internal prediction temperature of the poultry house as a model output quantity according to the internal temperature of the poultry house, the humidity of the poultry house, the external temperature of the poultry house, the ventilation quantity and the heating temperature as model input quantity, so as to form a multi-input single-output model for carrying out online prediction on the internal temperature of the poultry house in the future;
the server module updates the training data set in the moving window in real time according to the environmental data uploaded by the temperature controller module, increases the dimension of the sample space by increasing the delay step length on the time sequence data, and further realizes the training of the neural network in an off-line manner, so that the temperature prediction model in the temperature controller module can be continuously updated, and real-time decision support is provided for the temperature controller module;
the LMBP neural network model comprises the steps of setting moving window parameters, setting neural network parameters, establishing a temperature prediction model according to a training set, and transmitting the temperature prediction model to the temperature controller module;
the temperature controller module takes the target temperature of the poultry house as a setting input, and determines the running state of control equipment through a temperature control algorithm in the temperature controller module according to the difference value between the predicted temperature of the poultry house and the target temperature of the poultry house, so that closed-loop control of the temperature of the poultry house is realized.
As shown in fig. 1, the present invention includes a server module and a controller module.
The poultry house temperature closed-loop control system takes the poultry house target temperature as a set input, determines the running state of control equipment through a temperature control algorithm in a controller module according to the difference value between the poultry house predicted temperature and the poultry house target temperature, and realizes the closed-loop control of the poultry house temperature.
The server module is connected with a controller module, and the controller module is connected with the server module.
And the server module performs offline modeling according to the data provided by the controller module, so as to provide a temperature prediction model for the controller, perform online prediction according to the past data and provide decision support for the controller.
And the controller module is used for carrying out online prediction according to the LMBP neural network model provided by the server module, obtaining the predicted temperature of the poultry house, and determining the running state of the control equipment according to the difference value between the target temperature of the poultry house and the predicted temperature of the poultry house by a temperature control algorithm in the controller module.
As shown in fig. 2, the poultry house temperature closed-loop control system comprises a comparison point module, a temperature controller module, a fan module, a poultry house module, a TDL (time delay line tapping) module and a poultry house prediction module.
The poultry house temperature closed-loop control system takes the poultry house target temperature as a setting input, and determines a control signal through a temperature controller according to the difference value between the poultry house predicted temperature and the poultry house target temperature. According to the control signal, the running state of the fan is adjusted, so that the closed-loop control of the temperature of the poultry house is realized.
The temperature control device is characterized in that the comparison point module is connected with a temperature controller module, the temperature controller module is connected with a fan module, the fan module is connected with a poultry house module, the poultry house module is connected with a TDL module, the TDL module is connected with a poultry house prediction module, and the poultry house prediction module is connected with the comparison point module.
A comparison point module for comparing the target temperature T in the house at the initial moment of the kth period 0 (k) Predicted temperature T of poultry house at initial moment of k+p cycle p The difference between (k+p) (p is the predicted step size), the temperature deviation T is calculated e (k)。
T e (k)=|T p (k)-T 0 (k+p)|
As shown in FIG. 3, the temperature controller module is used for controlling the temperature deviation T according to the initial moment of the kth period e (k) The kth period control signal is calculated. And adjusting the running state of the fan according to the control signal.
If T e (k)>T emax A start partA fan; if T e (k)<T emin Closing part of the fans; if T emin <T e (k)<T emax And adjusting the load duration rate delta of the current starting fan. Wherein T is emax Indicating the upper limit of temperature deviation, T emin Indicating a lower temperature deviation limit.
The load duration rate delta is the duration t of the fan keeping a certain rotation speed to work in a working period with the duration t w The proportion of the duty cycle duration t. The ratio of the duration of the fan operation to the duty cycle, wherein the duty cycle duration is also called full cycle time, and consists of two parts of load duration and idle time.
The fan module is used as an actuator and is operated according to a series of same working cycles by adopting a continuous cycle working system, and each cycle consists of a constant load operation time and an idle time. And adjusting the running state of the fan according to the k-th period control signal, including starting part of the fan, closing part of the fan, or adjusting the load duration delta of the current started fan.
The poultry house module is used as a controlled object, and the poultry house is 120m long and 13m wide and has an effective height of 4.4m.
TDL (Tappeddelayline) module, as a tapped delay line, is used for storing and outputting k, k-1 … … k-d time data (d is delay step length), and the information includes temperature of the poultry house, humidity of the poultry house, temperature outside the poultry house, ventilation quantity and heating temperature.
The poultry house prediction module is used for predicting the poultry house temperature T at the initial moment of the k+p cycle according to the output data of the TDL module, namely the poultry house temperature at the moment of k, k-1 … … k-d, the poultry house humidity, the external temperature, the ventilation quantity and the heating temperature p And (k+p) is used for predicting and outputting to a comparison point module so as to be applied to a control system and determine the running state of the control equipment.
The temperature prediction model takes the temperature of the poultry house, the humidity of the poultry house, the temperature outside the poultry house, the ventilation quantity and the heating temperature at the moment k, k-1 … … k-d as model input quantity, and takes the temperature of the poultry house at the moment k+p or the temperature of the poultry house as model output quantity to form a multi-input single-output model. Where d is the delay step and p is the prediction step.
Wherein the poultry house temperature is obtained by sensors within the poultry house in units of c. The humidity of the poultry house is obtained through a humidity sensor, the unit is% RH, the high humidity early warning is set to be 90% RH, and the low humidity early warning is set to be 20% RH. The off-house temperature is obtained by an off-house sensor in degrees celsius. The ventilation quantity corresponds to the load duration rate of the fan and is expressed in different levels. The heating temperature is the temperature of the heater in the poultry house in units of ℃.
Example 2
On the basis of the embodiment 1, as shown in fig. 7, the invention provides a poultry house temperature prediction control method based on an LMBP neural network, which comprises the following steps:
s1, offline modeling: comprises setting a moving window parameter, setting a neural network parameter, and according to a training set D r Establishing a temperature prediction model f r The method comprises the following steps:
s11, setting moving window parameters, including a time sequence delay step d, a prediction step p, a moving window length L, a moving window moving speed c and a rolling statistical window length b;
s12, setting neural network parameters, including maximum iteration times, hidden layer node number, model training algorithm, data set dividing mode, error function and early stop test times;
s13, establishing a temperature prediction model according to the training set, and transmitting the temperature prediction model to an online prediction part for online prediction of the internal temperature of the future poultry house;
s2, online prediction: including adding a new sample I k ,I k-1 ,……I k-d According to the temperature prediction model f r Determination ofJudging whether the number of the newly added samples reaches c, and updating the training set through a moving window, wherein the method comprises the following steps:
s21, adding a new sample I k ,I k-1 ,……I k-d Namely, the temperature of the poultry house, the humidity of the poultry house, the temperature outside the poultry house, the ventilation quantity and the heating temperature at the moment k, k-1 and … … k-d;
s22, according to the temperature prediction model f r Determination ofNamely, the predicted temperature of the poultry house at the moment k+p:
s23, judging whether the number of the newly added samples reaches c, if the number of the newly added samples does not reach c, after 1 minute, k=k+1, returning to the step 2, and repeating the above processes; if the newly increased sample number reaches c, entering a step 4, and updating the training set through a moving window process; wherein c is the moving speed of the moving window;
s24, updating the training set through a moving window process, adding c latest samples, removing c oldest samples, keeping the length L of the moving window unchanged, and updating the training set D r Updated to D r+1 Training set D r+1 Will be transmitted to the offline modeling part for updating the temperature prediction model f r+1
As shown in FIG. 4, X k The humidity of the poultry house at the time k, the temperature outside the house, the ventilation quantity and the heating temperature are respectively expressed as x 1 ,x 2 ,x 3 ,x 4 The representation is:
definition of sample I at time k k Wherein y is k The poultry house temperature at time k:
defining a temperature prediction model obtained by stepr as f r The mapping relationship between the model input and the model output is as follows:
in the mapping relation, p is a prediction step length, d is a delay step length,the predicted temperature of the poultry house at time k+p is shown. The proper delay step length d can increase the dimension of a sample space, obviously improve the accuracy of online prediction and reduce the time length used for online prediction.
As shown in fig. 5, a moving window is defined, a set of samples with fixed length is defined as a window, a sample set formed by the samples in the window is used as a training set, and a prediction model is built through training. And after a period of fixed length, the window moves for a fixed length, a new sample is acquired, the old sample is removed, so that a new sample set, namely a training set, is formed, modeling is performed according to the new training set, after modeling is completed, the next window movement is waited, and the rolling process is called moving the window.
The sample set used for establishing the prediction model is called training set D, and the training set obtained after the r-1 th window movement is defined as D r The total number of samples is L.
The training set iteration process is as follows, D r The resulting training set is shifted for the r-th window:
D 1 is used for establishing the 1 st predictive model f 1 Is a training set of the training set. Wherein L is the total number of samples of the training set, defined as the moving window length L, c is the number of samples increased or decreased each time the window moves, and defined as the moving window moving speed c.
When the 1 st window moves, c samples with the latest (the shortest time span from the test set) are added, c samples with the oldest (the greatest time span from the test set) are removed, the moving window length L is kept unchanged, and a 2 nd prediction model f is formed 2 Training set D 2 . The rolling process is repeated after the window moves for a plurality of times, and when the r-1 th window moves, a prediction model f for building the r is formed r Training set D r
Prediction model f 1 Will be used for predictionI.e. p steps of house predicted temperature for the last c samples. Prediction model f 2 Will be used for prediction +.>Prediction model f r Will be used for prediction
The movable window can update the model training set sample in real time, and the problem of poor model generalization capability possibly caused by the old sample is avoided when the new sample is used for modeling, so that the timely change of the prediction model parameters along with weather is ensured, the problems of large temperature difference between spring and autumn and large prediction difficulty are solved, and the higher prediction precision of the prediction model is realized. I.e. the distance test set time span is small, and the old distance test set time span is large.
The prediction model parameters have certain difference in different seasonal change speeds, such as lower or higher air temperature in winter in northern China and higher air temperature in summer, and the environment change is slow, but in autumn in northern China, the temperature reduction or heating is obvious, the temperature difference between day and night is large, the environment change is fast, if the original moving window length L is still kept, the moving window moving speed c is unchanged, the prediction effect is poor, and further the problems of high production energy consumption, poor control effect and the like of a poultry house control system are caused. At this time, the moving window length L and the moving window moving speed c can be adjusted, so that the negative influence of the old data on the model is reduced on the premise of ensuring the enrichment of the sample data set. Thereby obtaining excellent online prediction effect.
As shown in fig. 6, the poultry house is used as a relatively closed small environment system, the internal environment factors are strongly coupled, the physical process and the physiological process exist simultaneously, and the external uncontrollable disturbance exists, so that the mechanism method is difficult to establish an accurate poultry house mechanism model. The identification model is built by using a test Method, the model structure is a two-layer feedforward neural network, and The identification algorithm is a Levenberg-Marquardt (The Levenberg-Marquardt Method) algorithm.
The BP neural network is a three-layer neural network consisting of an input layer neuron, a hidden layer neuron with a Sigmoid function and an output layer neuron, and can be used for mapping the relation between input data and target data under the condition of giving rich data and proper hidden layer neuron number, thereby realizing excellent fitting effect.
Input data is composed of I k ,I k-1 ,……I k-d The composition is k, k-1, … … k-d time samples respectively. Target data is composed of y k+p The composition is the predicted temperature of the poultry house at time k+p. The input data and the target data constitute training data. From this, the kth training data T can be defined k
The BP neural network adjusts the parameter matrix according to an error Back Propagation (Back Propagation) algorithm. The two-layer feedforward neural network structure consisting of the input layer, the hidden layer and the output layer can be expressed as a lower graph, wherein a delay step d=2, a prediction step p=5 and the number of neurons of the hidden layer is 10.
The connection line between the neurons is a connection weight, hereinafter referred to as a weight, and the LMBP neural network learning process is that in a plurality of iterations, the neural network parameter v, including the weight w and the threshold b, is updated according to training data until the error requirement is met or the maximum iteration number is reached. The neural network parameter update formula is as follows, wherein Deltav is the parameter correction value.
v k+1 =v k +Δv
The LMBP neural network algorithm is The Levenberg-Marquardt Method (also called an attenuation least square Method), and on The basis of The Gaussian Newton Method, a positive diagonal matrix mu I is added, the defect of lack of robustness of The Gaussian Newton Method is corrected to a certain extent, and The requirements of on-line prediction on instantaneity and accuracy can be met, so that The neural network based on The Levenberg-Marquardt Method is selected in The on-line prediction. The lycemberg-marquardt method is as follows:
v k+1 =v k -(J k T J k +μI) -1 ·g k
v k for the parameter matrix at time k, v k+1 Is a parameter matrix at the time of k+1 after correction, wherein g k Refers to gradient information at time k, (J) k T Jk+μI) -1 For learning step size or learning rate.
H k Hessian matrix, J, representing the current k-time k Representing the Jacobian matrix at the current k time. I is an identity matrix, mu is a non-negative number, mu I is dominant when mu is large, the LM algorithm approximates a gradient descent method, J when mu is small k T J predominates and the LM algorithm approximates gaussian newton's method.
The basic steps of the LMBP algorithm are as follows:
the first step: for all parameters v in the neural network k (w, b, μ) is randomly assigned in the range of (0, 1).
And a second step of: according to the current parameter v k Calculating model output valuesAnd error function E k
And a third step of: computing Jacobian matrix J k And analyze J k T J k If the +muI matrix is positive, the method proceeds to the next step, and if the +muI matrix is not positive, the method increases mu until J k T J k The +μi matrix is a positive definite matrix.
Fourth step: calculating a parameter correction value Deltav, and obtaining v according to parameter update k+1 And calculate the error function E k+1
Fifth step, if E k+1 >E k Indicating that the step size is too large and the optimum point is crossed, the mu is increased k Thereby reducing the step size. If at this time E k+1 <E k If the step size is proper, the mu is reduced k Thereby increasing the step size and thus accelerating the convergence, and then letting k=k+1, returning to the second step and repeating the above procedure.
Sixth step, when the error E k Meets the requirement, or the iteration number k reaches the maximum iteration number k max When the LMBP algorithm ends.
The data processing comprises data correction, normalization and inverse normalization.
(1) Data correction: the measured data of the environmental factor suddenly rises or falls at some sampling points due to the influence of sensor failure, electromagnetic interference, etc., and exceeds the maximum variable range of the physical quantity, and the sampled data with excessive fluctuation is called an outlier. In order to ensure the generalization capability of the temperature prediction model, outliers need to be removed before modeling. In the present invention, the outlier detection method is a rolling statistical method.
Taking poultry house temperature y as an example:
β k =μ k ±5σ k
definition { y } k ,y k-1 ,…y k-b And the number of samples is b, and the number of samples is b. Beta k Is according to { y } k ,y k-1 ,…y k-b Dynamic boundary determined if sample y k+1 Beyond the dynamic boundary, we consider as outliers, we will y k+1 Corrected to mu k . Wherein mu k Sigma, the mean value of the samples in the rolling statistical window k Standard deviation for samples within the rolling statistics window:
environmental variables requiring data modification, including poultry house humidity x 1 External temperature x of house 2 Poultry house temperature y.
(2) Normalization: because the dimensions are different among different features, the change intervals are different, and if normalization is not performed, certain sample change trends are ignored. In order to ensure the generalization capability of the temperature prediction model, samples in the training set need to be normalized before on-line modeling.
Taking poultry house temperature y as an example:
wherein { y } 1+(r-1)c ,y 2+(r-1)c ,…y k ,…y L+(r-1)c Is training set D r Temperature y of poultry house k Time series of composition, min (y k ) For the minimum in the sequence, max (y k ) Is the maximum in this sequence. Variables requiring normalization, including poultry house humidity x 1 External temperature x of house 2 Ventilation x 3 Heating temperature x 4 Poultry house temperature y.
(3) Anti-return to homeAnd (3) a step of: the characteristics of normalization are changed into original dimension and change interval by inverse normalization, the inverse normalization is performed into the inverse normalization process, and the variables of the normalization are the predicted temperature of the poultry house
The poultry house module has the advantages that the poultry house size is 120m long, 13m wide and 4.4m effective height. The stock of the poultry house is about 32500 chickens, and the age of the out-of-stock is 38 days.
The poultry house sample data were 2022, 2, 10, 00:00:54 to 2022, 3, 14, 23:58:36, a total of 47460 samples in a sample set covering 33 days of operation, with data sampling intervals of about 1 minute (one sample per minute).
The moving window setting parameters are as follows: the time series delay step d=2 minutes, the prediction step p=5 minutes, the moving window length l=3 days (72 hours), and the moving window moving speed c=1 hour are determined. (days/hour/minute was used instead of the number of samples for ease of understanding)
The neural network setting parameters are as follows: the maximum iteration number is determined to be 1000, the number of hidden layer nodes selected by the neural network model is 10, the model training algorithm is the Levenberg-Marquardt algorithm, the data dividing mode is a training data set of 90%, the data dividing mode is a generalization data set of 10%, and the error function is the mean square error MSE. The parameters of the moving window and the neural network are set as follows:
table 1: parameter table for setting moving window and setting neural network
The humidity of the poultry house, the temperature outside the poultry house and the outlier accounts for 0.05374%,0.15937% and 0.06301% respectively through data correction and detection. The predicted temperature of the poultry house is detected by data processing, and the outlier accounts for 0.2107 percent.
After 168.8183 seconds of the online prediction program based on the moving window, the online prediction performance evaluation output is as follows:
table 2: on-line prediction performance evaluation table for predicting 5 minutes
Fig. 8 is a graph of online prediction effects from 2022, 2, 10, 00:00:54 to 2022, 3, 14, 23:58:36, and fig. 9 is a graph of online prediction effects from 2022, 2, 20, 00:00:03 to 2022, 2, 20, 02:00:03.
Experiments prove that the data number with the prediction error exceeding 1 ℃ accounts for 0.09482% of the total data number, the mean square error MSE is 0.02429, the mean absolute error MAE is 0.11412, the root mean square error RMSE is 0.15586, and the coefficient R is determined 2 The modeled time average S was 0.21463S as 0.9959. And when the prediction step length is 5 minutes, the LMBP neural network poultry house prediction module based on the moving window is effective.
To verify the prediction effect of the house prediction module of the LMBP neural network based on the moving window on different prediction steps, the house prediction modules for predicting 5 minutes, 15 minutes, 30 minutes and 60 minutes are established, and the prediction effect is shown in figure 10.
Table 3: on-line prediction performance evaluation table for predicting different times
Experiments prove that the LMBP neural network poultry house prediction module based on the moving window is effective when the prediction step length is 5 minutes, 15 minutes and 30 minutes. But the prediction accuracy is poor when predicting samples with a prediction step of 60 minutes.
Although the present invention has been described in detail by way of preferred embodiments with reference to the accompanying drawings, the present invention is not limited thereto. Various equivalent modifications and substitutions may be made in the embodiments of the present invention by those skilled in the art without departing from the spirit and scope of the present invention, and it is intended that all such modifications and substitutions be within the scope of the present invention/be within the scope of the present invention as defined by the appended claims. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. An LMBP neural network-based poultry house temperature prediction control system is characterized by comprising the following components:
the temperature controller module comprises a temperature prediction model, performs online prediction according to the LMBP neural network model provided by the server module, obtains a predicted temperature of the poultry house, and determines the running state of control equipment according to the difference value between the target temperature of the poultry house and the predicted temperature of the poultry house through a temperature control algorithm in the temperature controller module;
the temperature prediction model is used for predicting the internal temperature of the poultry house at a specific step moment in the future, or called the internal prediction temperature of the poultry house, as a model output quantity according to the internal temperature of the poultry house, the humidity of the poultry house, the external temperature of the poultry house, the ventilation quantity and the heating temperature as model input quantity, so as to form a multi-input single-output model for carrying out online prediction on the internal temperature of the poultry house in the future;
the server module updates the training data set in the moving window in real time according to the environmental data uploaded by the temperature controller module, increases the dimension of the sample space by increasing the delay step length on the time sequence data, and further realizes the training of the neural network in an off-line manner, so that the temperature prediction model in the temperature controller module can be continuously updated, and real-time decision support is provided for the temperature controller module;
the LMBP neural network model comprises the steps of setting moving window parameters, setting neural network parameters, establishing a temperature prediction model according to a training set, and transmitting the temperature prediction model to the temperature controller module;
the temperature controller module takes the target temperature of the poultry house as a setting input, and determines the running state of control equipment through a temperature control algorithm in the temperature controller module according to the difference value between the predicted temperature of the poultry house and the target temperature of the poultry house, so that closed-loop control of the temperature of the poultry house is realized.
2. The LMBP neural network-based poultry house temperature prediction control system of claim 1, further comprising a comparison point module, a blower module, a poultry house module, a TDL module, and a poultry house prediction module, wherein the comparison point module is connected with a temperature controller module, the temperature controller module is connected with the blower module, the blower module is connected with the poultry house module, the poultry house module is connected with the TDL module, the TDL module is connected with the poultry house prediction module, and the poultry house prediction module is connected with the comparison point module.
3. The control system for predicting the temperature of a poultry house based on an LMBP neural network as set forth in claim 2, wherein said comparison point module is configured to determine a target temperature T in the poultry house at an initial time of a kth cycle based on a difference between the target temperature of the poultry house and the predicted temperature of the poultry house 0 (k) Predicted temperature T of poultry house at initial moment of k+p cycle p The difference between (k+p) (p is the predicted step size), the temperature deviation T is calculated e (k);
T e (k)=|T p (k)-T 0 (k+p)|。
4. The LMBP neural network-based poultry house temperature predictive control system of claim 2, wherein the temperature controller module is configured to vary the temperature bias T based on a kth cycle initiation time e (k) Calculating a k period control signal; according to the control signal, the running state of the fan is adjusted;
if T e (k)>T emax Starting part of fans;
if T e (k)<T emin Closing part of the fans;
if T emin <T e (k)<T emax The load duration delta of the current starting fan is adjusted;
wherein T is emax Indicating the upper limit of temperature deviation, T emin Indicating a lower temperature deviation limit; the load duration rate delta is the duration t of the fan keeping a certain rotation speed to work in a working period with the duration t w1 The proportion of the working period duration t;
the ratio of the duration of the fan operation to the duty cycle, wherein the duty cycle duration is also called full cycle time, and consists of two parts of load duration and idle time.
5. The LMBP neural network-based poultry house temperature predictive control system of claim 2, wherein the blower module, as an actuator, operates in a series of identical duty cycles using a continuous periodic duty cycle, each cycle consisting of a constant load operation time and an idle time;
and adjusting the running state of the fan according to the k-th period control signal, including starting part of the fan, closing part of the fan, or adjusting the load duration delta of the current started fan.
6. The LMBP neural network-based poultry house temperature prediction control system of claim 2, wherein the poultry house module has a length of 120m, a width of 13m, and a height of 4.4m as a controlled object.
7. The LMBP neural network-based poultry house temperature predictive control system of claim 2, wherein the TDL module is configured to store and output k, k-1 … … k-d time data as a tapped delay line, where d is a delay step, and the information includes a poultry house temperature, a poultry house humidity, an off-house temperature, a ventilation quantity, and a heating temperature.
8. The house temperature prediction control system based on the LMBP neural network as set forth in claim 2, wherein the house prediction module is configured to predict the house temperature T for the initial time of the k+p cycle based on the output data of the TDL module, namely the house temperature, the house humidity, the house outside temperature, the ventilation quantity, and the heating temperature at time k, k-1 … … k-d p And (k+p) is used for predicting and outputting to a comparison point module so as to be applied to a control system and determine the running state of the control equipment.
9. An LMBP neural network-based poultry house temperature prediction control method, which adopts the poultry house temperature prediction control system based on the LMBP neural network as set forth in any one of claims 1 to 8, and is characterized by comprising the following steps:
s1, offline modeling: comprises setting a moving window parameter, setting a neural network parameter, and according to a training set D r Establishing a temperature prediction model f r The method comprises the following steps:
s11, setting moving window parameters, including a time sequence delay step d, a prediction step p, a moving window length L, a moving window moving speed c and a rolling statistical window length b;
s12, setting neural network parameters, including maximum iteration times, hidden layer node number, model training algorithm, data set dividing mode, error function and early stop test times;
s13, establishing a temperature prediction model according to the training set, and transmitting the temperature prediction model to an online prediction part for online prediction of the internal temperature of the future poultry house;
s2, online prediction: including adding a new sample I k ,I k-1 ,……I k-d According to the temperature prediction model f r Determination ofJudging whether the number of the newly added samples reaches c, and updating the training set through a moving window, wherein the method comprises the following steps:
s21, adding a new sample I k ,I k-1 ,……I k-d Namely, the temperature of the poultry house, the humidity of the poultry house, the temperature outside the poultry house, the ventilation quantity and the heating temperature at the moment k, k-1 and … … k-d;
s22, according to the temperature prediction model f r Determination ofI.e. k+pPredicted temperature of the carved poultry house:
s23, judging whether the number of the newly added samples reaches c, if the number of the newly added samples does not reach c, after 1 minute, k=k+1, returning to the step 2, and repeating the above processes; if the newly increased sample number reaches c, entering a step 4, and updating the training set through a moving window process; wherein c is the moving speed of the moving window;
s24, updating the training set through a moving window process, adding c latest samples, removing c oldest samples, keeping the length L of the moving window unchanged, and updating the training set D r Updated to D r+1 Training set D r+1 Will be transmitted to the offline modeling part for updating the temperature prediction model f r+1
10. The method for controlling temperature prediction of poultry house based on LMBP neural network as set forth in claim 9, wherein the accuracy of online prediction in step S2 is evaluated by 5 indexes including mean square error MSE, mean absolute error MAE, root mean square error RMSE, and decision coefficient R, respectively 2 Modeling time mean S, expressed mathematically as follows:
wherein y represents the true temperature of the poultry house,indicating the predicted temperature of the poultry house,/-, and>representing a predicted temperature mean of the poultry house;
determining the coefficient R 2 Representing the fitting degree between the true output value and the model output value of the poultry house, R 2 The closer to 1, the better the fitting effect is, and the higher the prediction precision is; the modeling time mean S measures the time used for online modeling, and the total time of a modeling program is T M Modeling times N M S is in seconds.
CN202310693737.5A 2023-06-13 2023-06-13 Poultry house temperature prediction control system and control method based on LMBP neural network Pending CN116560428A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310693737.5A CN116560428A (en) 2023-06-13 2023-06-13 Poultry house temperature prediction control system and control method based on LMBP neural network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310693737.5A CN116560428A (en) 2023-06-13 2023-06-13 Poultry house temperature prediction control system and control method based on LMBP neural network

Publications (1)

Publication Number Publication Date
CN116560428A true CN116560428A (en) 2023-08-08

Family

ID=87496583

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310693737.5A Pending CN116560428A (en) 2023-06-13 2023-06-13 Poultry house temperature prediction control system and control method based on LMBP neural network

Country Status (1)

Country Link
CN (1) CN116560428A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117784849A (en) * 2024-02-27 2024-03-29 泰安德图自动化仪器有限公司 Automatic control system of refrigeration constant temperature tank based on artificial intelligence

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117784849A (en) * 2024-02-27 2024-03-29 泰安德图自动化仪器有限公司 Automatic control system of refrigeration constant temperature tank based on artificial intelligence
CN117784849B (en) * 2024-02-27 2024-05-07 泰安德图自动化仪器有限公司 Automatic control system of refrigeration constant temperature tank based on artificial intelligence

Similar Documents

Publication Publication Date Title
CN112817354B (en) Livestock and poultry house cultivation environment temperature prediction control system and regulation and control method thereof
CN111795484B (en) Intelligent air conditioner control method and system
CN111932015B (en) Prediction method and system for regional cooling and heating cold and heat load
CN111353631A (en) Thermal power plant condenser vacuum degree prediction method based on multilayer LSTM
CN111222674A (en) Short-term photovoltaic power generation capacity prediction method based on long-term and short-term memory neural network
CN113705922B (en) Improved ultra-short-term wind power prediction algorithm and model building method
CN104484715A (en) Neural network and particle swarm optimization algorithm-based building energy consumption predicting method
CN109948824B (en) Method for predicting heat load of heating power station by using pattern recognition technology
CN116560428A (en) Poultry house temperature prediction control system and control method based on LMBP neural network
CN113031555B (en) Intelligent purification system for harmful gas in environment of livestock and poultry house
CN103197538B (en) Brooder temperature control method based on process neural network
CN113283156A (en) Subway station air conditioning system energy-saving control method based on deep reinforcement learning
CN112418495A (en) Building energy consumption prediction method based on longicorn stigma optimization algorithm and neural network
CN109445484A (en) A kind of hatching house&#39;s temprature control method based on cat group optimization and immune fuzzy PID
CN113361744A (en) Indoor temperature prediction method based on LSTM algorithm
CN115310727B (en) Building cooling, heating and power load prediction method and system based on transfer learning
CN113065749A (en) Building material&#39;s curing room environment intelligent system
CN117469774B (en) Air conditioning system regulation and control method and device, electronic equipment and storage medium
CN115907191A (en) Adaptive building photovoltaic skin model prediction control method
CN117519353A (en) Cabinet temperature control method and device and air conditioner
CN117272829A (en) MC-GRU-based cold chain temperature prediction method
CN114897245A (en) Large-scale wind power ultra-short term power prediction error correction method based on long-short term memory neural network
CN114530214A (en) Vegetable nutrient solution self-maintenance method and system
CN113625557A (en) HVAC system model prediction control method of online optimization model
Tijskens et al. Neural networks to predict the hygrothermal response of building components in a probabilistic framework

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
CB03 Change of inventor or designer information

Inventor after: Zhong Ningfan

Inventor after: He Kaixun

Inventor after: Gao Luning

Inventor after: Cao Pengfei

Inventor after: Zhang Ji

Inventor after: Jin Xin

Inventor before: Zhong Ningfan

Inventor before: He Kaixun

Inventor before: Gao Luning

Inventor before: Cao Pengfei

Inventor before: Zhang Yi

Inventor before: Jin Xin

CB03 Change of inventor or designer information