A LSTM-based predictive control parameter setting method for intelligent building systems
By applying the predictive control parameter tuning method based on LSTM in an intelligent building system, the problem of difficulty and low efficiency of MPC parameter tuning is solved, and fast and accurate control parameter tuning is achieved, which improves the control effect and calculation accuracy.
Patent Information
- Application Number
- CN202111528493.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-14
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2041-12-14
AI Technical Summary
In intelligent building energy consumption systems, model predictive control (MPC) parameters are difficult to adjust quickly and accurately, resulting in poor control effects and increasing costs and time.
The intelligent building system prediction control parameter tuning method based on long and short-term memory artificial neural network (LSTM) is adopted, and the training samples are obtained through the MPC algorithm, and the LSTM network is established and trained to predict the control parameters of the intelligent building system.
This method can quickly and accurately sort out the control parameters of the intelligent building system, reduce costs and time, improve control effects, and has better calculation accuracy than the traditional BP and RBF neural network parameter tuning algorithms.
Smart Images

Figure CN114237049B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a method for setting predictive control parameters of an intelligent building system, and in particular to a method for setting predictive control parameters of an intelligent building system based on LSTM. Background Art
[0002] Since industrial processes often have the characteristics of nonlinearity, time-varying, strong coupling and uncertainty, it is difficult to obtain an accurate mathematical model, and the control effect will be greatly reduced. The advent of model predictive control (MPC) solves these problems and has been widely used.
[0003] With the rapid development of society, energy consumption has also increased rapidly. As a pillar industry of the national economy, the construction industry consumes a lot of energy while promoting social development. Among energy consumption, building energy consumption is one of the three major energy consumption giants. Therefore, it is necessary to carry out robust control of building energy consumption systems. However, model predictive control has also been widely used in modern intelligent building energy consumption systems.
[0004] In the process of model predictive control of building energy consumption system, taking variable air volume air conditioning system as an example, Figure 1 As shown in Figure 1, given a reference input, a closed-loop control is formed through MPC, so that the system achieves a desired response. Figure 2 As shown in the figure, the parameters of the model predictive controller have a significant impact on the response performance of the controlled system. Changing its control parameters will change the response of the controlled system. In the prior art, most controller parameters are determined based on artificial experience methods to achieve the desired response of the system. With the increase in the complexity of the controlled object and the increase in the degree of freedom, the empirical method will determine that the adjustment is difficult, time-consuming, and costly. This has hindered the further promotion and application of model predictive control in actual industry to a certain extent.
[0005] Model predictive control parameter tuning algorithm. In system control, the corresponding relationship between the control parameters and the performance indicators of the system response is known. The control parameters of the predictive controller are adjusted through the parameter tuning algorithm. Although this solves the shortcomings of debugging by manual experience method, another problem arises: finding the corresponding relationship between the control parameters and the performance indicators of the system response. Summary of the invention
[0006] The purpose of the present invention is to overcome the shortcomings of the above-mentioned prior art and provide a method for adjusting predictive control parameters of an intelligent building system based on LSTM, which can realize the adjustment of predictive control parameters of the intelligent building system and has the characteristics of low cost and high speed.
[0007] To achieve the above object, the LSTM-based intelligent building system predictive control parameter setting method of the present invention comprises the following steps:
[0008] 1) Obtain training samples based on the MPC algorithm;
[0009] 2) Establishing a long short-term memory artificial neural network, and training the long short-term memory artificial neural network according to the training samples obtained in step 1);
[0010] 3) Use the trained long short-term memory artificial neural network to predict the control parameters of the intelligent building system.
[0011] The training samples in step 1) include the prediction step length N of the intelligent building system p , control step length N c , weight coefficient r w , overshoot σ, rise time t p and adjustment time t s .
[0012] The specific process of step 1) is:
[0013] The prediction output function of the intelligent building system is:
[0014] Y=[y(k+1|k),y(k+2|k)…y(k+N p |k)] T (8)
[0015] The change matrix ΔU of the control quantity is:
[0016] ΔU=[Δu(k),Δu(k+1)…Δu(k+Nc-1)] T (9)
[0017] The optimization cost function is defined as:
[0018]
[0019] Substituting equations (8) and (9) into equation (10), we get the quadratic optimization function:
[0020] J=(R s -Fx(k)) T (R s -Fx(k))+Δu T EΔu+2Δu T F n (11)
[0021] Taking the change of the control quantity Δu as the optimization variable, calculate the prediction output function of the optimal intelligent building system corresponding to the minimum J;
[0022] A response curve is drawn according to the predicted output function of the optimal intelligent building system, and then the overshoot, rise time and adjustment time of the response curve are obtained.
[0023] The LSTM artificial neural network consists of three input layers, three output layers and twelve hidden layers.
[0024] The present invention has the following beneficial effects:
[0025] The LSTM-based intelligent building system predictive control parameter setting method described in the present invention obtains training samples based on the MPC algorithm during specific operation, and uses the trained long short-term memory artificial neural network to predict the control parameters of the intelligent building system. The network has strong data processing capabilities, more accurate prediction performance, and has the characteristics of low cost and high speed. Through experiments, the present invention is compared with the BP and RBF neural network parameter setting algorithms. The expected performance error of the present invention is smaller than that of the BP and RBF neural network parameter setting algorithms, and the calculation accuracy is better. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 It is a model predictive control process diagram;
[0027] Figure 2 is a model predictive controller;
[0028] Figure 3 It is a flowchart of the present invention;
[0029] Figure 4 Schematic diagram of the normalized training sample set;
[0030] Figure 5 It is a flow chart of the present invention. DETAILED DESCRIPTION
[0031] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is only an embodiment of a part of the present invention, not all embodiments, and is not intended to limit the scope of the present invention. In addition, in the following description, the description of well-known structures and technologies is omitted to avoid unnecessary confusion of the concepts disclosed in the present invention. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work should fall within the scope of protection of the present invention.
[0032] The accompanying drawings show schematic diagrams of structures according to embodiments disclosed in the present invention. These figures are not drawn to scale, and some details are magnified and some details may be omitted for the purpose of clear expression. The shapes of various regions and layers shown in the figures and the relative sizes and positional relationships therebetween are only exemplary, and may deviate in practice due to manufacturing tolerances or technical limitations, and those skilled in the art may additionally design regions / layers with different shapes, sizes, and relative positions according to actual needs.
[0033] refer to Figures 1 to 5 The LSTM-based intelligent building system predictive control parameter setting method of the present invention comprises the following steps:
[0034] 1) Obtain training samples based on the MPC algorithm;
[0035] The training samples include prediction step length, control step length, weight coefficient, overshoot, rise time and adjustment time;
[0036] The specific operations of step 1) are:
[0037] For a system with n-dimensional input and m-dimensional output, the transfer function is:
[0038]
[0039] or
[0040] Where: K is the open-loop gain, T is the time constant, τ is the delay time, ζ is the damping ratio, ω n is the natural frequency.
[0041] The system is expressed as:
[0042] y (S) =G (S) u (S) (2)
[0043] Among them, y (S) is the output of the system, u (S) is the input of the system, G (S) is the transfer function of the system.
[0044] The cost function is defined as:
[0045] Optimization problem:
[0046] Obey:u max <Δu min
[0047] Among them, R s is the reference trajectory, is the weighting matrix, r w is the weight coefficient, Δu is the change of the control quantity, u max and u min is the constraint of Δu, and u is the control quantity.
[0048] The transfer function G (S) Transformed into state space, that is:
[0049]
[0050] Among them, A, B, C and D are model matrices of corresponding dimensions in the continuous state space, x is the state variable, and y is the system output.
[0051] Assume the time domain length is N p , the control time domain is N c , then k+N p The state space equation at time is:
[0052]
[0053] k+N p The predicted output sequence is:
[0054]
[0055] The predicted output of the system is:
[0056] Y=Fx(k)+ΦΔu(k) (7)
[0057] Then there is Y=[y(k+1|k),y(k+2|k)…y(k+N p |k)] T (8)
[0058] ΔU=[Δu(k),Δu(k+1)…Δu(k+Nc-1)] T (9)
[0059]
[0060]
[0061] Substituting formula (8) into formula (9), the quadratic optimization function is:
[0062] J=(R s -Fx(k)) T (R s -Fx(k))+Δu T EΔu+2Δu T F n (10)
[0063] in, F n =Φ T Fx(k)-Φ T R s ;
[0064] Take Δu as the variable, solve the optimal optimization function Y corresponding to the minimum J, draw the response curve according to the optimal optimization function Y, and then obtain the overshoot, rise time and adjustment time σ,t of the response curve p ,t s ;
[0065] Get the overshoot, rise time and adjustment time σ,t p ,t s As well as the prediction step size, control step size and weight coefficient N p ; N c ; r w ;
[0066] The specific process of solving the optimal optimization function Y corresponding to the minimum J is shown in Table 1:
[0067] Table 1
[0068]
[0069] 2) Establishing a long short-term memory artificial neural network (LSTM), and training the LSTM artificial neural network according to the training samples obtained in step 1);
[0070] Specifically, the specific architecture of the long short-term memory artificial neural network is as follows Figure 2 As shown, Figure 2 In, x t is the network input at the current moment, y t-1 is the network output at the previous moment, S t-1 is the network state of neurons at the previous moment.
[0071] Since the final output of LSTM is determined by the output gate and the cell state, its output is expressed as:
[0072] o t =y t *tanh(s t ) (11)
[0073] Among them, t is the final output, y t is the output of the network, and tanh is the activation function.
[0074] Assume the error function is:
[0075]
[0076] Where E is the error, o s is the expected output.
[0077] LSTM training has 8 sets of parameters, namely the weight matrix w of the input gate i , the weight matrix w of the forget gate f , the weight matrix w of the output gate f , the state matrix w i , and the corresponding offset term b i ,b f ,b o ,b s .
[0078] Since the direction of the weight matrix in back propagation is different, these four weights should be written separately. Therefore, the LSTM parameter adjustment factor is:
[0079]
[0080] According to the dimension of the MPC system response, the input layer is set to:
[0081]
[0082] Among them, N i is the number of input layers of the network.
[0083] Set the output layer to:
[0084]
[0085] Among them, N o is the number of network output layers.
[0086] According to the MPC algorithm, the response and control parameters of the system are used as the input and output of the neural network, and the neural network modeling is performed according to the above parameters. The selection of the hidden layer can be based on the empirical formula as shown below:
[0087]
[0088] Among them, h is the number of hidden layers, m is the input layer node, n is the output layer node, and α is an integer between 1 and 10.
[0089] The parameter optimization process in LSTM is shown in Table 2:
[0090] Table 2
[0091]
[0092]
[0093] Among them, num is the number of times the system collects data, D is the sample set for LSTM training, Δw is the update of the weights of each part, and Δb is the update of the bias term.
[0094] 3) Use the trained long short-term memory artificial neural network to predict the control parameters of the intelligent building system.
[0095] The correctness of the present invention is verified by using a variable air volume system. Given the expected indicators of the system response, the control parameters of the predictive controller are adjusted by the present invention. The controller parameters allow the system to obtain a response within the error range, and its feasibility is verified in a variable air volume air conditioning system.
Claims
1. A method for predictive control parameter setting of intelligent building system based on LSTM, characterized in that: The following steps are involved: 1) Obtain training samples based on the MPC algorithm; 2) Establishing a long short-term memory artificial neural network, and training the long short-term memory artificial neural network according to the training samples obtained in step 1); 3) Use the trained LSTM artificial neural network to predict the control parameters of the intelligent building system; The training samples in step 1) include the prediction step length N of the intelligent building system p , control step length N c , weight coefficient r w , overshoot σ, rise time t p and adjustment time t s ; The specific process of step 1) is: The prediction output matrix of the intelligent building system is: And=[y(k+1|k),y(k+2|k)…y(k+N p |k)] T (8) The control variable change matrix ΔU is: ΔU=[Δu(k),Δu(k+1)…Δu(k+Nc-1)] T (9) The optimization cost function is defined as: Substituting equations (8) and (9) into equation (10), we get the quadratic optimization function: J=(R s -Fx(k)) T (R s -Fx(k))+Δu T EΔu+2Δu T F n (11) Where k is the instantaneous moment; R s is the reference trajectory; is the weighting matrix; Δu is the control quantity increment; Taking the change of the control quantity Δu as the optimization variable, calculate the prediction output function of the optimal intelligent building system corresponding to the minimum J; Draw a response curve according to the predicted output function of the optimal intelligent building system, and then obtain the overshoot, rise time and adjustment time of the response curve; The LSTM ANN consists of three input layers, three output layers, and twelve hidden layers; Let x t is the network input at the current moment, y t-1 is the network output at the previous moment, S t-1 is the network state of neurons at the previous moment; Since the final output of LSTM is determined by the output gate and the cell state, its output is expressed as: o t =y t *fishy t ) Among them, t is the final output, y t is the output of the network, and tanh is the activation function; Assume the error function is: Where E is the error, o s is the expected output; LSTM training has 8 sets of parameters, namely the weight matrix w of the input gate i , the weight matrix w of the forget gate f , the weight matrix w of the output gate f , the state matrix w i , and the corresponding offset term b i ,b f ,b o ,b s ; Since the directions of the weight matrices in back propagation are different, these four weights should be written separately; therefore, the LSTM parameter adjustment factors are: According to the dimension of the MPC system response, the input layer is set to: Among them, N i is the number of input layers of the network; Set the output layer to: Among them, N O is the number of network output layers.
Citation Information
Patent Citations
Self-adaption control method and device based on deep learning
CN106990714A
SOC (state of charge) reference trajectory based energy management method for plug-in hybrid electric vehicles
CN109895760A