A power management optimization method based on a smart building green energy system
By employing Fourier time-frequency analysis and a multi-level MPC control strategy, the time-varying nature of photovoltaic output and load demand in intelligent building green energy systems was resolved, achieving high-precision prediction and minute-level dynamic optimization, thereby improving the system's energy utilization efficiency and stability.
Patent Information
- Application Number
- CN202510528754.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-25
- Publication Date
- 2026-01-27
- Estimated Expiration
- 2045-04-25
AI Technical Summary
Existing smart building green energy systems suffer from response lag, insufficient prediction accuracy, and difficulties in coordinating and controlling multiple time scales when dealing with the highly time-varying nature of photovoltaic output and load demand. This results in low renewable energy utilization efficiency, high operating costs, and poor system stability.
By employing Fourier time-frequency analysis combined with a multi-level MPC control strategy, and through system modeling and state estimation, the frequency domain characteristics of photovoltaic power output and load demand at multiple time scales are extracted. A multi-time-scale prediction model is then constructed, and a hierarchical MPC control framework is established to achieve minute-level dynamic optimization scheduling.
It improves the accuracy of photovoltaic power output and load demand forecasting, realizes multi-timescale coordination and optimization from day-ahead planning to minute-level real-time control, quickly responds to energy supply and demand fluctuations, enhances the dynamic performance and reliability of the system, and reduces building energy costs.
Smart Images

Figure SMS_1 
Figure SMS_2 
Figure SMS_3
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent building energy management technology, and specifically to a power management optimization method based on an intelligent building green energy system. Background Technology
[0002] With the increasing severity of global climate change, statistics show that building energy consumption accounts for approximately 40% of total societal energy consumption, the majority of which comes from fossil fuel consumption. As a crucial component of urban energy systems, smart buildings, by integrating distributed photovoltaic power generation, energy storage devices, and intelligent energy-consuming equipment, hold the promise of achieving low-carbon and intelligent energy consumption. However, in actual operation, traditional static energy dispatching methods face numerous challenges due to the intermittent and fluctuating nature of photovoltaic power generation and the randomness and time-varying nature of building loads.
[0003] 1. Photovoltaic Power Output Fluctuation: Affected by meteorological conditions, photovoltaic (PV) output power exhibits significant intraday fluctuations and seasonal variations. Particularly under cloudy weather conditions, solar irradiance can change drastically within minutes, leading to substantial fluctuations in PV output power. According to relevant research data, PV output power can fluctuate by as much as 80% within 10 minutes during alternating cloudy and sunny weather, severely impacting the stable operation of the system. Furthermore, PV systems in different seasons and geographical locations exhibit different output characteristics, making it difficult to apply uniform forecasting and control methods.
[0004] 2. Randomness of Load Demand: Building loads are influenced by various factors such as weather conditions, indoor occupant activities, and equipment operating status, exhibiting strong randomness and uncertainty. For example, air conditioning loads are affected by a combination of factors including outdoor temperature, number of indoor occupants, and building envelope characteristics; lighting loads are affected by sunlight conditions and occupant work and rest schedules; and office equipment loads are closely related to working hours and occupant habits. The random combination of these factors results in complex and variable time-series characteristics for building loads.
[0005] 3. The inherent lag of traditional dispatching methods: Existing energy dispatching methods are mainly based on hourly forecasts and typically employ static optimization methods for scheduling plans, making them ill-suited to handle minute-level fluctuations in energy supply and demand. These methods often rely on historical data for statistical analysis, lacking the ability to respond promptly to sudden events (such as sudden weather changes or equipment failures). Furthermore, traditional methods usually treat forecasting and control as two independent processes, meaning that errors in the forecast results cannot be effectively compensated for during the control process, leading to a decline in control performance.
[0006] 4. Multi-timescale characteristics of energy systems: Building energy systems simultaneously involve dynamic processes of power electronic equipment at the second level, energy supply and demand fluctuations at the minute level, and operating cost optimization problems at the hour level. Traditional methods struggle to coordinate and handle these multi-timescale issues within a unified framework. This leads to inconsistent or even conflicting control objectives at different levels of the system, impacting overall energy utilization efficiency.
[0007] 5. Challenges in Optimizing Energy Storage Systems: As a crucial component in balancing photovoltaic power generation and load demand, the charging and discharging strategies of energy storage systems directly impact the system's economy and reliability. However, the limited capacity, imperfect charging and discharging efficiency, and limited cycle life of energy storage systems increase the difficulty of optimal scheduling. Maximizing the economic benefits while ensuring the healthy operation of energy storage systems has become a significant challenge for smart building energy systems.
[0008] Existing technologies have proposed several solutions to the above problems, mainly including:
[0009] Traditional forecasting methods for photovoltaic (PV) power generation primarily employ physical modeling, statistical methods, and artificial intelligence (AI) methods. Physical modeling relies on detailed meteorological data and PV module parameters, resulting in complex calculations and insufficient real-time performance. Statistical methods, such as time series analysis (ARIMA), struggle to capture nonlinear characteristics. While AI methods (such as neural networks and support vector machines) offer high accuracy, they require extensive training data, lack interpretability, and are difficult to adjust parameters online. In load forecasting, traditional methods also suffer from insufficient accuracy and real-time performance, particularly limiting their ability to predict short-term fluctuations.
[0010] Traditional scheduling and control methods: Currently, the control strategies for intelligent building energy systems mainly include rule-based control strategies and optimization-based open-loop control strategies. Rule-based control strategies are simple to implement but cannot adapt to complex and ever-changing operating environments; while optimization-based open-loop control strategies can obtain theoretically optimal solutions, they lack effective feedback adjustment mechanisms when faced with real-time disturbances. In recent years, some studies have attempted to introduce closed-loop control methods such as model predictive control (MPC), but most of these focus on optimization problems at a single time scale, lacking a comprehensive consideration of the system's multi-time-scale characteristics.
[0011] Time-frequency domain analysis methods for energy systems: Traditional time series analysis methods mainly focus on a single perspective in the time or frequency domain, making it difficult to fully grasp the time-frequency characteristics of energy data. Although joint time-frequency analysis methods such as wavelet analysis have been applied in energy system analysis, most studies remain at the offline analysis stage, failing to effectively integrate time-frequency analysis results into prediction and control processes, resulting in insufficient information utilization.
[0012] Although Model Predictive Control (MPC) technology has gained widespread attention in the field of energy system control in recent years, existing research mainly focuses on hourly-level economic dispatch, with limited research on minute-level energy fluctuation responses. Furthermore, existing methods are insufficient in handling the time-frequency characteristics of photovoltaic output and load demand, making it difficult to effectively extract and utilize fluctuation characteristics across multiple time scales, thus limiting prediction accuracy and control performance. In addition, existing methods typically lack adaptive parameter adjustment mechanisms; once system parameters are determined, it is difficult to flexibly adjust them according to environmental changes, affecting the long-term stability of the system.
[0013] Current research both domestically and internationally indicates that while predictive and control technologies for intelligent building energy systems have made some progress, significant shortcomings remain in addressing the highly time-varying photovoltaic output and load demands. These shortcomings are mainly reflected in: a lack of a multi-timescale coordinated optimization framework; prediction methods failing to fully consider time-frequency characteristics; lagging control strategies; and insufficient system adaptability. These problems severely restrict the in-depth application and efficient utilization of renewable energy in the building sector.
[0014] Therefore, there is an urgent need for a real-time optimization method for intelligent building green energy systems that can comprehensively consider the characteristics of energy systems across multiple time scales and rapidly respond to minute-level energy supply and demand fluctuations. This method aims to improve the efficiency of renewable energy utilization, reduce building operating costs, and enhance the reliability and resilience of system operation. This invention is an innovative solution proposed to address these technical needs. Summary of the Invention
[0015] This invention aims to address the technical problems of existing real-time optimization methods for intelligent building green energy systems, such as response lag, insufficient prediction accuracy, and difficulties in multi-timescale coordinated control when dealing with the highly time-varying nature of photovoltaic power output and load demand. It proposes a power management optimization method based on intelligent building green energy systems. By combining Fourier time-frequency analysis with a multi-level MPC control strategy, it achieves minute-level dynamic optimization scheduling of the building energy system, improving the local absorption rate of renewable energy, reducing building energy costs, reducing carbon emissions, and enhancing the energy resilience and autonomous operation capabilities of intelligent buildings.
[0016] To achieve the above objectives, this invention provides a power management optimization method based on a smart building green energy system, comprising the following steps:
[0017] 1. System Modeling and State Estimation: Establish a model of the intelligent building energy system, including photovoltaic system, energy storage system, controllable load and grid interaction model, and update the system state in real time through state estimation algorithm.
[0018] 1.1 Photovoltaic system model construction: Considering factors such as solar radiation intensity, ambient temperature, and component characteristics, a photovoltaic output power calculation model is established;
[0019] 1.2 Energy storage system model construction: Considering factors such as charging and discharging efficiency, capacity decay, and state of charge constraints, a dynamic model of the energy storage system is established.
[0020] 1.3 Construction of controllable load models, including thermoelectric load models (such as air conditioners, water heaters, etc.) and adjustable power load models (such as electric vehicle charging, partial lighting, etc.);
[0021] 1.4 Construction of Uncontrollable Load Model: Based on historical data and typical daily characteristics, a statistical model of uncontrollable load is established;
[0022] 1.5 Power grid interaction model construction: Considering factors such as electricity pricing mechanisms and grid connection constraints, an economic model for interaction with the power grid is established.
[0023] 1.6 System state estimation algorithm design: Kalman filtering and other methods are used to update the system state based on real-time measurement data.
[0024] 2. Fourier Time-Frequency Feature Extraction: Short-Time Fourier Transform (STFT) is used to perform time-frequency domain analysis on photovoltaic power output and load demand, extracting frequency domain features at multiple time scales, and decomposing the time series into trend terms, periodic terms and random fluctuation terms.
[0025] 2.1 Time series data preprocessing, including data normalization, outlier detection and handling, and missing value imputation;
[0026] 2.2 Short-time Fourier transform parameter optimization: Determine the optimal window function type and window length for different characteristics of photovoltaic power output and load demand;
[0027] 2.3 Wavelet packet transform implementation: Select appropriate wavelet basis functions, determine the number of decomposition levels, and realize further decomposition of STFT results;
[0028] 2.4 Multi-timescale frequency domain decomposition, which decomposes the time series into low-frequency trend terms, mid-frequency periodic terms, and high-frequency fluctuation terms;
[0029] 2.5 Frequency domain feature extraction: Calculate the statistical characteristics such as energy distribution, phase features, and spectral entropy of each frequency band as input to the prediction model.
[0030] 3. Multi-timescale prediction model: Based on Fourier time-frequency characteristics, a multi-timescale prediction model for photovoltaic power output and load demand is constructed, and different prediction methods are adopted for different frequency domain characteristics.
[0031] 3.1 Design of a low-frequency trend prediction model: The model uses support vector regression, with historical data, weather forecasts, and frequency domain features as inputs, to predict future trend changes.
[0032] 3.2 Mid-frequency periodic term prediction model design: A seasonal autoregressive integral moving average model is adopted to capture the periodic variation characteristics of the data;
[0033] 3.3 High-frequency fluctuation term prediction model design: Conditional generative adversarial network is used to generate prediction results for multiple scenarios to characterize the uncertainty of random fluctuations;
[0034] 3.4 Generation of multi-scenario prediction results: Based on multi-scenario prediction of high-frequency fluctuation terms, combined with deterministic prediction of low-frequency and mid-frequency terms, multi-scenario prediction results of complete power curves are generated.
[0035] 3.5 The online update mechanism for the prediction model is designed to dynamically adjust the model parameters based on real-time measurement data and prediction errors, thereby improving the long-term prediction accuracy.
[0036] 4. Hierarchical MPC control framework: Establish a hierarchical MPC control framework that includes a day-ahead planning layer, an hour-level economic scheduling layer, and a minute-level real-time control layer to achieve coordinated control across multiple time scales.
[0037] 4.1 The planning layer design is based on the day-ahead forecast information to optimize the energy storage charging and discharging plan and controllable load scheduling plan for the next 24 hours, thereby minimizing daily operating costs;
[0038] 4.2 The hourly economic dispatch layer design optimizes energy storage operation and controllable load dispatch for the next 1-4 hours based on rolling updated forecast information, minimizing deviation costs;
[0039] 4.3-minute real-time control layer design, based on short-term forecasting and real-time measurement, optimizes energy storage power and controllable load power for the next 5-15 minutes to achieve power balance;
[0040] 4.4 The hierarchical coordination mechanism is designed to ensure the consistency of control decisions at all levels through means such as target constraint transmission, forecast information sharing, and result feedback.
[0041] 4.5 Multi-objective optimization architecture design, comprehensively considering multiple objectives such as economy, reliability, and environmental protection, and designing reasonable objective functions and constraints;
[0042] 4.6 Safety constraints are considered, including power ramping constraints, energy storage state of charge constraints, and equipment operation constraints, to ensure the safe and stable operation of the system.
[0043] 5. Minute-level real-time optimization control: At the minute-level real-time control layer, based on the rolling time-domain MPC method, and combining real-time measurement data with short-term forecast results, the energy storage charging and discharging power, controllable load scheduling, and grid interaction power are optimized to achieve real-time balance between energy supply and demand.
[0044] 5.1 Rolling optimization strategy design, determining key parameters such as control period, prediction time domain length, and control time domain length;
[0045] 5.2 Objective function construction, comprehensively considering multiple sub-objectives such as power deviation minimization, state of charge regulation, and control stability;
[0046] 5.3 Constraint settings, including energy storage system constraints, controllable load constraints, grid interaction constraints, and system power balance constraints;
[0047] 5.4 Fast solution algorithm design: To meet the high efficiency requirements of real-time control, a fast solution method suitable for online optimization is developed;
[0048] 5.5 Control Strategy Emergency Handling Mechanism: Design fault detection and safety protection strategies to ensure reliable system operation under extreme conditions.
[0049] 6. Adaptive parameter adjustment: Through online learning algorithms, the model parameters and control parameters are adjusted in real time based on prediction errors and control performance, thereby improving the system's adaptability and robustness.
[0050] 6.1 An adaptive adjustment mechanism for prediction model parameters is implemented, which dynamically updates model parameters based on prediction errors to improve prediction accuracy;
[0051] 6.2 MPC control parameter adaptive adjustment mechanism, dynamically adjusts weight coefficients and prediction time domain length according to control performance indicators;
[0052] 6.3 Design performance evaluation indicators, establish a scientific and reasonable evaluation system, and quantify the prediction and control performance;
[0053] 6.4 Online learning algorithm design: Select an efficient learning algorithm suitable for real-time applications and ensure the stability of parameter adjustments;
[0054] 6.5 Cold start strategy design to solve the problem of insufficient data during the initial system runtime and accelerate system parameter convergence.
[0055] In the multi-time-scale frequency domain decomposition of photovoltaic power output and load demand, this invention utilizes short-time Fourier transform to transform the time-series signal s(t) into the time-frequency domain:
[0056]
[0057] Where S(τ, ω) represents the signal strength at time τ and frequency ω, s(t) represents the original time series signal, w(t-τ) represents the window function centered at τ, and e -jωt Let represent a complex exponential basis function with frequency ω.
[0058] This invention employs different window functions for time-frequency analysis depending on the data type. For photovoltaic power output data, the Hanning window is selected as the window function:
[0059] w Hanning (t)=0.5·[1-cos(2πt / T)], 0≤t≤T;
[0060] Where T represents the window length. For load demand data, a Hamming window is chosen as the window function:
[0061] w Hamming (t)=0.54-0.46·cos(2πt / T), 0≤t≤T;
[0062] By selecting window functions of different widths, frequency domain features at different time scales can be extracted. This invention employs wavelet packet transform to further decompose the STFT results, obtaining multi-scale frequency domain features:
[0063]
[0064] Among them, WT j,k (t) represents the wavelet transform coefficients at scale j and position k, ψ j,k s(t) represents the wavelet basis function, and s(τ) represents the original signal.
[0065] This invention selects the Daubechies wavelet (db4) as the basis function, and its expression is:
[0066] ψ j,k (t)=2 j / 2 ·ψ(2 j tk);
[0067] Where ψ(t) represents the mother wavelet function, j represents the scaling parameter, and k represents the translation parameter.
[0068] Based on the frequency domain decomposition results, photovoltaic output and load demand are decomposed into modules with three time scales:
[0069] P(t)=P trend (t)+P cycle (t)+P fluctuation (t);
[0070] Where P(t) represents the original power time series, P trend (t) represents the low-frequency trend term, indicating hourly-level changes, P cycle (t) represents the mid-frequency periodic term, indicating the variation characteristics on the order of tens of minutes, P fluctuation (t) represents the high-frequency fluctuation term, which represents random fluctuations at the minute level and below.
[0071] For different frequency domain characteristics, this invention adopts different prediction methods: for low-frequency trend terms, support vector regression is used; for mid-frequency periodic terms, seasonal time series models are used; and for high-frequency fluctuation terms, conditional generative adversarial networks are used to generate prediction results for multiple scenarios.
[0072] The expression for the support vector regression method is:
[0073]
[0074] Among them, P ternd (t+k) represents the predicted value of the trend term at time t+k, and x represents the input feature vector. i Let K(x) represent the feature vector of the i-th training sample. i (x) represents the kernel function, α i and Let b denote the Lagrange multiplier, b denote the bias term, and n denote the number of training samples.
[0075] The expression for the seasonal autoregressive integral moving average model is:
[0076] Φ(B s )φ(B)(1-B s ) D (1-B) d P cycle (t)=Θ(B s )θ(B)ε(t);
[0077] Wherein, Φ(B s ) and φ(B) represent seasonal and non-seasonal autoregressive polynomials, respectively, and Θ(B) s ) and θ(B) represent seasonal and non-seasonal moving average polynomials, respectively. B represents the lag operator, s represents the seasonal period, D and d represent the seasonal and non-seasonal difference orders, respectively, and ε(t) represents white noise.
[0078] The training objective of conditional generative adversarial networks is:
[0079]
[0080] Where x represents the real sample, z represents random noise, y represents the condition variable, and p data (x) represents the true data distribution, p z (z) represents the noise distribution, G(z|y) represents the sample generated based on condition y and noise z, and D(x|y) represents the discriminator's judgment result on sample x under condition y.
[0081] The output of the multi-timescale prediction model serves as the input to the hierarchical MPC control framework. At the minute-level real-time control layer, the MPC optimization problem is expressed as:
[0082]
[0083] Constraints:
[0084] x(t+i+1|k)=Ax(t+i|k)+Bu(t+i|k)+Ed(t+i|k);
[0085] y(t+i|k)=Cx(t+i|k);
[0086] u min ≤u(t+i|k)≤u max ;
[0087] x min ≤(t+i|k)≤x max ;
[0088] Δu min ≤u(t+i|k)-u(t+i-1|k)≤Δu max ;
[0089] Where x(t+i|k) represents the state prediction at time k for time t+i, u(t+i|k) represents the control input, d(t+i|k) represents the predicted perturbation, y(t+i|k) represents the system output, N represents the prediction time domain length, Q and R represent the state weighting matrix and the control input weighting matrix, respectively, and A, B, E, and C are the system model matrices, u min u max x min x max , Δu min and Δu max These represent the constraints of the control input, state variables, and their rates of change, respectively.
[0090] The adaptive adjustment of the prediction model parameters is based on an online learning algorithm, and the update formula is as follows:
[0091]
[0092] Where, θ (t) Let η represent the model parameters at time t, and η represent the learning rate. This represents the gradient of the loss function with respect to the parameters.
[0093] One method for adaptively adjusting MPC control parameters is through updating the weighting coefficients Q and R:
[0094] Q (t+1) =Q (t) +α·[(xT x) (t) -(x T x) target ];
[0095] R (t+1) =R (t) +β·[(u T u) (t) -(u T u) target ];
[0096] Among them, Q (t) and R (t) Let α and β represent the state weighting matrix and control input weighting matrix at time t, respectively, and let α and β represent the adjustment coefficients. T x) (t) and(u T u) (t) Let x represent the sum of squares of the state and the sum of squares of the control input at time t, respectively. T x) target and(u T u) target This represents the target value.
[0097] The present invention has the following beneficial effects:
[0098] 1. Improve prediction accuracy: By extracting Fourier time-frequency features, photovoltaic power output and load demand are decomposed into frequency domain features at different time scales, and different prediction methods are adopted in a targeted manner, which significantly improves prediction accuracy.
[0099] 2. Achieve minute-level real-time optimization: Based on the hierarchical MPC control framework, this invention achieves multi-timescale coordinated optimization from day-ahead planning to minute-level real-time control, which can quickly respond to minute-level energy supply and demand fluctuations, enabling the system to better cope with random disturbances such as cloud cover changes, weather changes, and sudden load changes, thereby improving the dynamic performance of the system. Detailed Implementation
[0100] The present invention will now be described in further detail.
[0101] 1. System Architecture:
[0102] The intelligent building green energy system of this invention includes a photovoltaic power generation system, an energy storage system, controllable loads, uncontrollable loads, and a power grid interaction interface. The core control modules of the system include: a data acquisition and preprocessing module, a Fourier time-frequency feature extraction module, a multi-time-scale prediction module, a hierarchical MPC control module, and an adaptive parameter adjustment module.
[0103] 1.1 Hardware Architecture:
[0104] The system's hardware architecture mainly includes the following parts:
[0105] 1. Sensing and measurement equipment: including photovoltaic system power meters, energy storage system power meters and state of charge monitoring equipment, load power meters, indoor and outdoor environmental sensors (temperature, humidity, light intensity, etc.), grid interconnection power meters, etc.
[0106] 2. Communication Network: A multi-layered communication architecture is adopted. The bottom-level devices are connected to the field controllers through industrial buses such as RS-485 and Modbus; the field controllers are connected to the central control system through Ethernet; and the central control system is connected to the cloud platform through the Internet to realize remote monitoring and data analysis.
[0107] 3. Control and execution equipment: including power converters (PCS) of energy storage systems, controllable load controllers (such as variable frequency air conditioner controllers, smart sockets, etc.), relays, switches and other execution equipment.
[0108] 4. Computing and storage devices: including edge computing servers (for real-time data processing and control computing), cloud servers (for big data analysis and remote monitoring), data storage devices, etc.
[0109] 1.2 Software Architecture:
[0110] The system's software architecture adopts a layered design, mainly including the following layers:
[0111] 1. Data Acquisition Layer: Responsible for collecting real-time data from various sensors, measuring devices, and controllers, and achieving data standardization, time synchronization, and preliminary screening.
[0112] 2. Data preprocessing layer: Performs operations such as cleaning, anomaly detection, missing value handling, and data compression on the collected raw data to improve data quality.
[0113] 3. Feature Extraction Layer: Implements Fourier time-frequency feature extraction function, converting the original time series into frequency domain features at multiple time scales.
[0114] 4. Predictive Analysis Layer: Based on the extracted features, run a multi-time-scale prediction model to generate prediction results for photovoltaic power output and load demand.
[0115] 5. Optimize the control layer: Based on the prediction results and system state, run the hierarchical MPC control algorithm to generate an optimized control strategy.
[0116] 6. Execution layer: Converts control strategies into specific control commands, sends them to each execution device, and monitors the execution status.
[0117] 7. Visualization and Interaction Layer: Provides a human-computer interaction interface to realize functions such as system monitoring, parameter setting, and report generation.
[0118] 8. Security Management Layer: Responsible for the management of system data security, equipment security, and operational security, including functions such as access control, data encryption, and fault detection.
[0119] Each layer exchanges data and calls functions through standardized interfaces to ensure the modularity and scalability of the system.
[0120] 2. Intelligent Building Energy System Model:
[0121] 2.1 Photovoltaic System Model:
[0122] The output power of a photovoltaic system can be expressed as:
[0123] P PV (t)=η PV ·S·G(t)·[1-β(T c (t)-T ref )];
[0124] Among them, P PV (t) represents the photovoltaic output power (kW) at time t, η PV S represents the conversion efficiency of the photovoltaic module, and S represents the total area of the photovoltaic module (m²). 2 G(t) represents the solar radiation intensity at time t (kW / m²). 2 ), β represents the temperature coefficient (usually 0.004~0.006 / ℃), T c (t) represents the component temperature (°C) at time t, T ref This indicates the reference temperature under standard test conditions (usually 25°C).
[0125] Component temperature Tc ( t) can be calculated using the following formula:
[0126]
[0127] Among them, T a (t) represents the ambient temperature (°C) at time t, and NOCT represents the nominal operating battery temperature (usually 42–48°C).
[0128] Considering the dynamic characteristics of a photovoltaic system, a first-order hysteresis loop is introduced to describe the dynamic process from change in radiation intensity to change in output power:
[0129]
[0130] Among them, P PV,real (t) represents the actual output power (kW), P PV (t) represents the theoretical output power (kW) calculated based on the static model, τ PVThis represents the time constant (usually 10 to 30 seconds).
[0131] Furthermore, considering the efficiency characteristics of photovoltaic inverters, the actual output power also needs to be multiplied by the inverter efficiency:
[0132] P PV,out (t)=η inv (P PV,real (t))·P PV,real (t);
[0133] Among them, T PV,out (t) represents the inverter output power (kW), η inv (P PV,real (t) represents the inverter efficiency, which is a function of power and is usually represented by a piecewise linear function.
[0134] 2.2 Energy Storage System Model:
[0135] The dynamic model of an energy storage system can be represented as:
[0136]
[0137] Where SOC(t) represents the energy storage state of charge at time t, η ch Indicates charging efficiency, η dis P represents the discharge efficiency. ch (t) represents the charging power (kW) at time t, P dis (t) represents the discharge power (kW) at time t, Δt represents the time step (h), and E cap This indicates the rated capacity (kWh) of the energy storage system.
[0138] The operational constraints of energy storage systems include:
[0139] 0≤P ch (t)≤P ch,max ;
[0140] 0≤P dis (t)≤P dis,max ;
[0141] P ch (t)·P dis (t) = 0;
[0142] SOC min ≤SOC(t)≤SOC max ;
[0143] Among them, P ch,max P represents the maximum charging power (kW). dis,max State of discharge (SOC) indicates maximum discharge power (kW). min and SOCmax These represent the minimum and maximum permissible states of charge, respectively.
[0144] Considering charging and discharging power ramp-up constraints:
[0145] -r down ≤P ch (t)-P ch (t-1)≤r up ;
[0146] -r down ≤P dis (t)-Pdis(t-1)≤r up ;
[0147] Where, r down and r up These represent the maximum rate of descent and the rate of ascent (kW / min), respectively.
[0148] Considering the impact of energy storage system lifetime, a capacity decay model is introduced:
[0149]
[0150] Among them, E cap (t) represents the effective capacity (kWh) at time t, α deg The capacity decay factor is represented by DOD(t), and the depth of discharge is represented by N. cycle (t) represents the equivalent loop count, β temp T represents the temperature coefficient. bat (t) represents the battery temperature (°C), T ref,bat Indicates the reference temperature (°C).
[0151] 2.3 Load Model:
[0152] Building load can be divided into two parts: controllable load and uncontrollable load.
[0153] P load (t)=P ctrl (t)+P non-ctrl (t);
[0154] Among them, P load (t) represents the total load power (kW) at time t, P ctrl (t) represents the controllable load power (kW), P non-ctrl (t) represents the uncontrollable load power (kW).
[0155] Controllable loads mainly include thermoelectric equipment such as air conditioners and water heaters, and their model can be represented as:
[0156]
[0157] Among them, T in (t) represents the indoor temperature (°C) at time t. th Q represents the building's heat capacity (kWh / ℃). env (t) represents the ambient heat exchange power (kW) at time t, and COP represents the energy efficiency coefficient of the equipment.
[0158] Ambient heat exchange power Q env (t) can be represented as:
[0159] Q env (t)=UA·(T out (t)-T in (t))+Q int (t)+Q sol (t);
[0160] Where UA represents the building's overall heat transfer coefficient (kW / ℃), and T... out (t) represents the outdoor temperature (°C), Q int (t) represents the internal thermal gain (kW), Q sol (t) represents the solar radiation heat gain (kW).
[0161] The operating constraints of controllable loads include:
[0162] 0≤P ctrl (t)≤P ctrl,max ;
[0163] T min ≤T in (t)≤T max ;
[0164] Among them, P ctrl,max T represents the maximum controllable load power (kW). min and T max These represent the lower and upper limits (°C) of the indoor temperature, respectively.
[0165] Considering thermal comfort indices, a predicted average thermal feeling index (PMV) is introduced:
[0166] PMV(t) = f(T) in (t), RH(t), v air (t), MET, CLO);
[0167] Where RH(t) represents the indoor relative humidity, v air (t) represents the airflow velocity (m / s), MET represents the metabolic rate, and CLO represents the thermal resistance of the clothing.
[0168] Thermal comfort constraints are:
[0169] -0.5≤PMV(t)≤0.5;
[0170] For uncontrollable loads, a statistical model is used to describe them:
[0171] P non-ctrl (t)=P base (d, h) + P weather (t)+P random (t);
[0172] Among them, P base (d, h) represents the base load based on date d and hour h, P weather (t) represents the weather-related load adjustment, P random (t) represents the random fluctuation term.
[0173] 2.4 Power Grid Interaction Model:
[0174] Assume the power balance relationship between the building and the power grid is as follows:
[0175] P grid (t)=P load (t)-P PV (t)-P dis (t)+P ch (t);
[0176] Among them, P grid (t) represents the electricity purchased from the grid at time t (kW, a positive value indicates electricity purchased, and a negative value indicates electricity sold).
[0177] The constraints for grid interaction are:
[0178] P grid,min ≤P grid (t)≤P grid,max ;
[0179] Among them, P grid,min and P grid,max These represent the maximum power sold and the maximum power purchased (kW), respectively.
[0180] Considering power factor constraints:
[0181] PF min ≤PF(t)≤1;
[0182] Where PF(t) represents the power factor at time t, PF min This indicates the minimum power factor requirement (usually 0.9 or 0.95).
[0183] The electricity grid pricing model consists of two parts: electricity price and demand price.
[0184]
[0185] Among them, C grid (t) represents the grid cost (yuan), C energy (t) represents the electricity price (yuan / kWh), C demand This indicates the demand electricity price (yuan / kW), T bill Indicates the billing cycle.
[0186] The electricity sales revenue model is as follows:
[0187] R sell (t)=C sell (t)·(-P grid (t))·Δt·I(P grid (t)<0);
[0188] Among them, R sell (t) represents the revenue from electricity sales (yuan), C sell (t) represents the electricity price (yuan / kWh), and I(·) represents the indicator function.
[0189] 3. Fourier time-frequency feature extraction:
[0190] 3.1 Data Preprocessing:
[0191] Before performing Fourier time-frequency feature extraction, the original time series data needs to be preprocessed, which mainly includes the following steps:
[0192] 1. Data cleaning: Detect and handle outliers, missing values, etc., to ensure the integrity and validity of the data.
[0193] 2. Data normalization: This involves standardizing data with different dimensions to the same scale for easier subsequent processing. The normalization formula is:
[0194]
[0195] Where, x norm This represents the normalized data, where x represents the original data, μ represents the mean, and σ represents the standard deviation.
[0196] 3. Trend Removal: For time series with a clear trend, trend removal is performed first to better extract periodic fluctuation characteristics. Trend removal can be achieved using difference or polynomial fitting methods.
[0197] 4. Data segmentation: Divide long-term series data into several overlapping short time windows to facilitate short-time Fourier transform.
[0198] 3.2 Short-Time Fourier Transform:
[0199] To capture the time-varying characteristics of photovoltaic power output and load demand, this invention employs short-time Fourier transform (STFT) for time-frequency analysis. The formula for calculating STFT is:
[0200]
[0201] Where S(τ, ω) represents the signal strength at time τ and frequency ω, s(t) represents the original time series signal, w(t-τ) represents the window function centered at τ, and e -jwt Let w represent a complex exponential basis function with frequency w.
[0202] In practical calculations, the Discrete Short-Time Fourier Transform (DSTFT) is used:
[0203]
[0204] Where S(m,k) represents the STFT coefficients at time point m and frequency point k, and N represents the window length.
[0205] In this invention, appropriate window functions and window lengths are selected based on the different characteristics of photovoltaic power output and load demand. For photovoltaic power output, a Hanning window with a window length of 10 minutes is used; for load demand, a Hamming window with a window length of 15 minutes is used.
[0206] The expression for the Hanning window is:
[0207] w Hanning (n)=0.5·[1-cos(2πn / (N-1))], 0≤n≤N-1;
[0208] The expression for the Hamming window is:
[0209] w Hamming (n)=0.54-0.46·cos(2πn / (N-1)), 0≤n≤N-1;
[0210] The amplitude of the time spectrum can be calculated using the following formula:
[0211]
[0212] The phase spectrum can be calculated using the following formula:
[0213]
[0214] 3.3 Wavelet Packet Transform:
[0215] To further extract frequency domain features across multiple time scales, this invention employs wavelet packet transform to decompose the STFT results:
[0216]
[0217] Among them, WT j,k (t) represents the wavelet transform coefficients at scale j and position k, ψ j,k s(t) represents the wavelet basis function, and s(τ) represents the original signal.
[0218] The discrete form of the wavelet packet transform is:
[0219]
[0220] This invention selects the Daubechies wavelet (db4) as the basis function and employs a 3-level wavelet packet decomposition. The scaling function coefficients of the Daubechies wavelet (db4) are:
[0221]
[0222] The wavelet function coefficients are:
[0223] g0=h3, g1=-h2, g2=h1, g3=-h0;
[0224] Wavelet packet decomposition is performed using a filter bank method, applying high-pass and low-pass filtering operations to the signal.
[0225]
[0226] Among them, A j,k D represents the low-frequency subband coefficient. j,k This represents the high-frequency subband coefficient.
[0227] 3.4 Multi-timescale frequency domain decomposition:
[0228] Based on the results of STFT and wavelet packet transform, photovoltaic power output and load demand are decomposed into components at three time scales:
[0229] P(t)=P trend (t)+P cycle (t)+P fluctuation (t);
[0230] Where P(t) represents the original power time series, P trend (t) represents the low-frequency trend term (corresponding to hourly change trend), P cycle (t) represents the mid-frequency periodic term (corresponding to the variation characteristics on the order of tens of minutes), P fluctuation (t) represents the high-frequency fluctuation term (corresponding to random fluctuations at the minute level and below).
[0231] The specific process of frequency domain decomposition is as follows:
[0232] (1) Perform STFT on the original time series to obtain the time spectrum;
[0233] (2) Perform wavelet packet decomposition on the STFT results to obtain coefficients for different frequency bands;
[0234] (3) Based on the frequency band range, the wavelet packet coefficients are divided into three parts: low frequency (0-0.2mHz), mid frequency (0.2-2mHz) and high frequency (>2mHz);
[0235] (4) Perform inverse transform on each frequency band coefficient to obtain the corresponding time-domain signal P. trend (t), P cycle (t) and P fluctuation (t).
[0236] Table 1 lists the feature parameters of the three time-scale components:
[0237] Components Frequency range Time scale Main features Energy percentage <![CDATA[P trend (t)]]> 0~0.2mHz hourly Daily variation trend and weather influence 65%~75% <![CDATA[P cycle (t)]]> 0.2~2mHz Ten-minute level Equipment start-up and shutdown, periodic behavior 20%~30% <![CDATA[P fluctuation (t)]]> >2mHz Minutes and below Random disturbances, measurement noise 5%~10% ;
[0238] 3.5 Frequency Domain Feature Extraction:
[0239] For each frequency domain component obtained from the decomposition, the following feature parameters are calculated as inputs to the prediction model:
[0240] 1. Energy distribution: The energy percentage of each frequency band, calculated using the following formula:
[0241]
[0242] Among them, E i Ω represents the energy percentage of the i-th frequency band. i This represents the frequency range of the i-th frequency band.
[0243] 2. Spectral entropy: Characterizes the uncertainty of the spectral distribution, and is calculated using the following formula:
[0244]
[0245] in, This represents the energy percentage at frequency w.
[0246] 3. Spectral centroid: Characterizes the location of the "center of gravity" of the spectrum, calculated using the following formula:
[0247]
[0248] 4. Spectral bandwidth: Characterizes the degree of dispersion of the spectrum, and is calculated using the following formula:
[0249]
[0250] 5. Spectral flatness: Characterizes the smoothness of the spectrum, and is calculated using the following formula:
[0251]
[0252] Where N represents the number of frequency points.
[0253] 6. Spectral attenuation rate: Characterizes the attenuation rate of high-frequency components, and is calculated using the following formula:
[0254]
[0255] In addition, the cross-features in the time and frequency domains, such as the energy ratio and phase difference between different frequency bands, were calculated to capture the interrelationships between frequency bands.
[0256] 4. Multi-timescale prediction models:
[0257] For different frequency domain characteristics, this invention employs different prediction methods:
[0258] 4.1 Prediction of low-frequency trend items:
[0259] For the low-frequency trend term P trend (t) is predicted using support vector regression. The expression for support vector regression is:
[0260]
[0261] Among them, P trend (t+k) represents the predicted value of the trend term at time t+k, and x represents the input feature vector. i Let K(x) represent the feature vector of the i-th training sample. i (x) represents the kernel function, α i and Let b denote the Lagrange multiplier, b denote the bias term, and n denote the number of training samples.
[0262] This invention selects the radial basis function (RBF) as the kernel function:
[0263] K(x i ,x)=exp(-γ||x i -x|| 2 ;
[0264] Where γ is the kernel parameter.
[0265] The optimization problem of support vector regression is formulated as follows:
[0266]
[0267] Constraints:
[0268] y i -w T φ(xi -b≤ε+ξ i ;
[0269]
[0270] Where w represents the weight vector, φ(x) i ) represents the feature map, ε represents the width of the insensitive region, and ξ represents the feature map. i and Let C represent the slack variable and C represent the penalty parameter.
[0271] Input features include: historical power data, weather forecast information (temperature, radiation intensity, cloud cover, etc.), time features (hours, date types, etc.), and frequency domain features (energy distribution, spectral entropy, etc.). Feature selection employs the Recursive Feature Elimination (RFE) method, retaining the most important subset of features. Hyperparameter optimization uses grid search and cross-validation methods.
[0272] For cases with high nonlinearity, ensemble learning methods, such as Random Forest or Gradient Boosting Tree, can be used to improve prediction accuracy.
[0273] 4.2 Prediction of intermediate frequency periodic terms:
[0274] For the intermediate frequency periodic term P cycle (t), using a seasonal autoregressive integral moving average model:
[0275] Φ(B s )φ(B)(1-B s ) D (1-B) d P cycle (t)=Θ(B s )θ(B)ε(t);
[0276] Wherein, Φ(B s ) and φ(B) represent seasonal and non-seasonal autoregressive polynomials, respectively, and Θ(B) s ) and θ(B) represent seasonal and non-seasonal moving average polynomials, respectively. B represents the lag operator, s represents the seasonal period, D and d represent the seasonal and non-seasonal difference orders, respectively, and ε(t) represents white noise.
[0277] Specifically, φ(B), θ(B), Φ(B) s ) and Θ(B s The expression for ) is:
[0278] φ(B)=1-φ1B-φ2B 2 -…-φ p Bp ;
[0279] θ(B) = 1 + θ1B + θ2B 2 +…+θ q B q ;
[0280] Φ(B s )=1-Φ1B s -Φ2B 2s -…-Φ P B Ps ;
[0281] Θ(B s )=1+Θ1B s +Θ2B 2s +…+Θ Q B Qs ;
[0282] Where p, q, P, and Q represent the order of non-seasonal autoregression, the order of non-seasonal moving average, the order of seasonal autoregression, and the order of seasonal moving average, respectively.
[0283] Based on the different periodic characteristics of photovoltaic power output and load demand, appropriate SARIMA model parameters are determined. For photovoltaic power output, the SARIMA(2,1,1)(1,1,1)48 model is adopted (assuming a data acquisition interval of 30 minutes, then there are 48 points per day); for load demand, the SARIMA(3,1,2)(1,1,1)48 model is adopted.
[0284] The model parameters are estimated using the maximum likelihood estimation (MLE) method, with the optimization objective being:
[0285]
[0286] Where L represents the likelihood function.
[0287] The model selection is based on the Akaike Information Criterion (AIC) and the Bayesian Information Criterion (BIC):
[0288] AIC = -2ln(L) + 2k;
[0289] BIC = -2ln(L) + k ln(n);
[0290] Where k represents the number of model parameters and n represents the number of samples.
[0291] 4.3 High-frequency fluctuation term prediction:
[0292] For the high-frequency fluctuation term P fluctuation(t), using a conditional generative adversarial network (CGAN) to generate multi-scene prediction results. CGAN consists of a generator G and a discriminator D, and its training objective is:
[0293]
[0294] Where x represents the real sample, z represents random noise, y represents the condition variable, and p data (x) represents the true data distribution, p z (z) represents the noise distribution, G(z|y) represents the sample generated based on condition y and noise z, and D(x|y) represents the discriminator's judgment result on sample x under condition y.
[0295] The condition variable y includes historical high-frequency fluctuation data, the current system state, and low-frequency and mid-frequency prediction results. Both the generator and discriminator employ a deep convolutional neural network (DCNN) structure.
[0296] The network structure of generator G is as follows: input layer (noise vector z and condition variable y) → fully connected layer → reshape layer → transposed convolutional layer 1 (64 5×5 convolutional kernels, stride 2) → batch normalization layer → LeakyReLU activation → transposed convolutional layer 2 (32 5×5 convolutional kernels, stride 2) → batch normalization layer → LeakyReLU activation → transposed convolutional layer 3 (1 5×5 convolutional kernel, stride 1) → tanh activation → output layer.
[0297] The network structure of discriminator D is as follows: Input layer (sample x and condition variable y) → Convolutional layer 1 (32 5×5 convolutional kernels, stride 2) → LeakyReLU activation → Convolutional layer 2 (64 5×5 convolutional kernels, stride 2) → Batch normalization layer → LeakyReLU activation → Convolutional layer 3 (128 5×5 convolutional kernels, stride 2) → Batch normalization layer → LeakyReLU activation → Fully connected layer → Sigmoid activation → Output layer.
[0298] The network parameters were optimized using the Adam optimizer with a learning rate of 0.0002, β1 = 0.5, and β2 = 0.999. The training process consisted of two phases: pre-training and fine-tuning. Pre-training used historical data, while fine-tuning used data from a more recent period.
[0299] After training, by randomly sampling the noise vector z, multiple possible scenarios with high-frequency fluctuations can be generated to characterize the uncertainty of the prediction.
[0300] 4.4 Fusion of prediction results from multiple scenarios:
[0301] The prediction results from the three time scales are fused to obtain the final predicted power:
[0302]
[0303] in, This represents the predicted power value at time t+k. and These represent the predicted values for the three time scale components.
[0304] For high-frequency fluctuation terms, since CGAN generates multiple scenarios, scenario probability weighting is required:
[0305]
[0306] Where S represents the number of scenes, π s This represents the probability weight of the s-th scene. This represents the predicted high-frequency fluctuation value for the s-th scenario.
[0307] In addition to the expected value, the predicted probability distribution characteristics, such as quantiles and standard deviations, are also calculated to provide a basis for risk assessment and robust control.
[0308] In the post-processing stage of the prediction results, physical constraints were also applied, such as the photovoltaic output power not being less than zero and not exceeding the rated power, to ensure the physical rationality of the prediction results.
[0309] 5. Hierarchical MPC control framework:
[0310] This invention employs a hierarchical MPC control framework, comprising three layers: a day-ahead planning layer, an hourly economic scheduling layer, and a minute-level real-time control layer. The control objectives, decision variables, constraints, and time scales for these three layers are shown in Table 2.
[0311] Control Level Main objectives Decision variables Time scale Rolling cycle Solution Algorithm Planning level Minimize daily operating costs Energy storage daily charge and discharge plan 24 hours 1 day Mixed-integer linear programming Hourly scheduling layer Minimize deviation cost Energy storage hourly adjustment and controllable load planning 1-4 hours 15 minutes Secondary planning Minute-level control layer Minimize power deviation Energy storage minute-level control, real-time load adjustment 10-15 minutes 1 minute Model predictive control ;
[0312] Planning level before May 1st:
[0313] Based on day-ahead forecasts, the planning layer optimizes the energy storage charging and discharging schedule for the next 24 hours, with the optimization objective being to minimize daily operating costs.
[0314]
[0315] The constraints include:
[0316] P grid,buy (t)-P grid,sell (t)=P load,pred (t)-P PV,pred (t)-P dis (t)+P ch (t);
[0317] 0≤P grid,buy (t)≤Pgrid,max ;
[0318] 0≤P grid,sell (t)≤P rid,max ;
[0319] P grid,buy (t)·P grid,sell (t) = 0;
[0320] 0≤P ch (t)≤P ch,max ;
[0321] 0≤P dis (t)≤P dis,max ;
[0322] P ch (t)·P dis (t) = 0;
[0323]
[0324] SOC min ≤SOC(t)≤SOC max ;
[0325] SOC(T)=SOC target ;
[0326] Among them, C grid,buy (t) and C grid,sell (t) represent the grid purchase and sale prices of electricity (yuan / kWh) at time t, respectively. grid,buy (t) and P grid,sell (t) represents the power purchased and sold (kW) at time t, respectively. bat P represents the depreciation cost of battery charging and discharging (yuan / kWh). load,pred (t) and P PV,pred (T) represent the load and predicted photovoltaic power (kW) at time t, respectively, where T represents the planning time domain length (24 hours), and SOC. targt Indicates the target state of charge.
[0327] For demand-based electricity pricing, an auxiliary variable P is introduced. demand Indicates the maximum power during the billing period:
[0328]
[0329] Modify the objective function as follows:
[0330]
[0331] Considering the impact of energy storage lifespan, the cost of cycle aging is introduced:
[0332]
[0333] Where, α cycle E represents the cost per iteration (yuan / cycle). cap This indicates the rated capacity (kWh).
[0334] The objective function is updated as follows:
[0335]
[0336] 5.2 Hourly-level economic dispatch layer:
[0337] The hourly-level economic dispatch layer optimizes energy storage charging and discharging and controllable load dispatching within the next 1-4 hours based on continuously updated forecast information. Its optimization objective is to minimize deviation costs.
[0338]
[0339] The constraints include:
[0340] P grid (t)=P load (t)-P PV,pred (t)-P dis (t)-P ch (t);
[0341] P lod (t)=P ctrl (t)+P non-ctrl,pred (t);
[0342] 0≤P ch (t)≤P ch,max ;
[0343] 0≤P dis (t)≤P dis,max ;
[0344] P ch (t)·P dis (t) = 0;
[0345]
[0346] SOC min ≤SOC(t)≤SOC max ;
[0347] 0≤P ctrl (t)≤P ctrl,max ;
[0348]
[0349] Tmin ≤T in (t)≤T max ;
[0350] Among them, C dev (t) represents the penalty cost (yuan / kWh) for grid power deviation, P grid,plan (t) represents the planned grid interconnection power (kW), C ctrl (t) represents the penalty cost (yuan / kWh) for controllable load adjustment, P ctrl,ref (t) represents the reference power (kW) of the controllable load, H represents the optimization time domain length (hours), and Δt represents the time step (hours).
[0351] Considering the comfort constraints of controllable loads, the PMV index is introduced:
[0352] PMV(t) = f(T) in (t), RH(t), v air (t), MET, CLO);
[0353] -0.5≤PMV(t)≤0.5;
[0354] Considering the continuous operating time constraint of controllable load:
[0355] T on (t)≥T min,on ·[z(t)-z(t-1)];
[0356] T off (t)≥T min,off ·[z(t-1)-z(t)];
[0357] Among them, T on (t) and T off (t) represents the duration of on and off, respectively, T min,on and T min,off These represent the minimum on and off times, respectively, and z(t) represents the device state (1 for on, 0 for off).
[0358] 5.3-minute real-time control layer:
[0359] The minute-level real-time control layer optimizes energy storage charging and discharging power and controllable load power based on real-time measurement data and short-term forecast results, achieving real-time balance between energy supply and demand. Its MPC optimization problem is expressed as:
[0360]
[0361] The constraints include:
[0362] P grid(t+i|t)=P load (t+i|t)-P PV (t+i|t)-P dis (t+i|t)+P ch (t+i|t);
[0363] P load (t+i|t)=P ctrl (t+i|t)+P non-ctrl (t+i|t);
[0364] 0≤P ch (t+i|t)≤P ch,max ;
[0365] 0≤P dis (t+i|t)≤P dis,max ;
[0366] P ch (t+i|t)·P dis (t+i|t)=0;
[0367]
[0368] SOC min ≤SOC(t+i|t)≤SOC max ;
[0369] 0≤P ctrl (t+i|t)≤P ctrl,max ;
[0370] ΔP ctrl,min ≤ΔP ctrl (t+i|t)≤ΔP ctrl,max ;
[0371]
[0372] T min ≤T in (t+i|t)≤T max ;
[0373] Among them, P grid (t+i|t) represents the predicted power (kW) of the power grid at time t+i from time t. grid,ref (t+i) represents the reference grid power (kW), and SOC(t+i|t) represents the predicted state of charge at time t+i at time t. ref (t+i) represents the reference state of charge, ΔP ctrl(t+i|t) represents the change in controllable load power (kW), w1, w2 and w3 are weighting coefficients, and N represents the prediction time domain length (usually 10 to 15 minutes).
[0374] To improve computational efficiency, the above problem is expressed in state-space form:
[0375] x(t+1)=Ax(t)+Bu(t)+Ed(t);
[0376] y(t) = Cx(t);
[0377] Where x(t)=[SOC(t), T in (t)] T Representing the state vector, u(t) = [P] ch (t), P dis (t), P ctrl (t)] T Let d(t) represent the control input vector, and d(t) = [P] PV (t), P non-ctrl (t), T out (t)] T Let y(t) represent the perturbation vector, y(t) = [P] grid (T),SOC(t),T in (t)] T This represents the output vector, and A, B, E, and C are the system matrices.
[0378] Considering charge-discharge mutual exclusion constraint (P) ch (t)·P dis (t)=0), transforming the original problem into a mixed-integer quadratic programming (MIQP) problem:
[0379] P ch (t)≤P ch,max ·δ(t);
[0380] P dis (t)≤P dis,max ·(1-δ(t));
[0381] Where δ(t)∈{0,1} is a binary variable, δ(t)=1 represents charging, and δ(t)=0 represents discharging.
[0382] 5.4 Hierarchical Coordination Mechanism:
[0383] To ensure consistency and coordination between different control levels, the present invention designs the following coordination mechanism:
[0384] 1. Target constraint transmission: The optimization results of the upper-level control serve as constraints or reference trajectories for the lower-level control. Specifically, the energy storage SOC trajectory of the day-ahead planning layer serves as the reference trajectory of the hourly scheduling layer; the grid power and SOC trajectories of the hourly scheduling layer serve as the reference trajectories of the minute-level control layer.
[0385] 2. Forecast Information Sharing: A unified forecast result is used across different levels, but with varying time scales and levels of detail. The day-ahead planning level uses low-frequency trend forecasts; the hourly scheduling level considers both low-frequency trend and medium-frequency cycle forecasts; and the minute-level control level considers low-frequency trend, medium-frequency cycle, and high-frequency fluctuation forecasts simultaneously. Forecast results are stored in a unified data structure and aggregated or refined according to different time scales.
[0386] 3. Result Feedback Mechanism: The execution results of lower-level control are fed back to upper-level control as a reference for replanning. For example, the actual energy storage SOC status executed by minute-level control is periodically fed back to the hourly-level scheduling layer to revise the hourly scheduling plan; the execution results of hourly scheduling are fed back to the day-ahead planning layer every few hours to adjust the planning for subsequent time periods.
[0387] 4. Rolling Time-Domain Optimization: Each control layer employs a rolling time-domain optimization method. At the end of each control step, the optimization problem is resolved based on the latest system state and prediction information. The expression for rolling optimization is:
[0388]
[0389] U * (t)=[u * (t|t),u * (t+1|t),...,u * [(t+N-1|t)];
[0390] u applied (t)=u * (t|t);
[0391] Among them, J * U(t) represents the optimal objective function value at time t, U(t) represents the control sequence, and L(·) represents the stage cost function. * (t) represents the optimal control sequence, u appliied (t) represents the control input in the actual application.
[0392] 5. Inter-layer relaxation constraints: To avoid infeasible solutions caused by conflicts between inter-layer objectives, relaxation variables and relaxation constraints are introduced. For example, when the SOC trajectory planned in the day-ahead is used as a reference for hourly scheduling, a certain range of deviation is allowed:
[0393] SOC ref(t)-ΔSO Callow ≤SOC(t)≤SOC ref (t)+ΔSOC allow ;
[0394] Among them, SOC ref (t) represents the reference SOC value, ΔSOC allow This indicates the permissible range of deviation.
[0395] 6. Multi-timescale state estimation: To coordinate state information at different time scales, a multi-timescale Kalman filter is used to achieve accurate estimation of state variables. The model is as follows:
[0396] Prediction steps:
[0397]
[0398] Update steps:
[0399]
[0400] P k|k =(IK k H k )P k|K-1 ;
[0401] in, This represents the prior state estimate. P represents the posterior state estimate. k|k-1 Let P represent the prior covariance matrix. k|k Let K denote the posterior covariance matrix. k F represents the Kalman gain. k B represents the state transition matrix. k H represents the control matrix. k Let Q represent the observation matrix. k R represents the process noise covariance. k Let z represent the observation noise covariance. k This represents the observation vector.
[0402] 5.5 Multi-objective optimization architecture:
[0403] Real-time optimization of green energy systems in intelligent buildings involves multiple conflicting objectives, including economy (minimizing operating costs), reliability (power balance stability), environmental friendliness (minimizing carbon emissions), and comfort (maximizing user comfort). This invention uses a weighted sum method to transform the multi-objective problem into a single-objective problem:
[0404]
[0405] Where J represents the comprehensive objective function, J i(x, u) represents the i-th sub-objective function, w i Let represent the weight coefficient of the i-th sub-target, and m represent the number of sub-targets.
[0406] Since the dimensions and orders of magnitude of different sub-objectives may differ significantly, normalization is required:
[0407]
[0408] in, This represents the normalized sub-objective function. and These represent the minimum and maximum values of the sub-objective function, respectively.
[0409] The sub-objective functions are defined as follows:
[0410] 1. Economic objective: Minimize system operating costs, including grid purchase costs, energy storage depreciation costs, and equipment maintenance costs.
[0411]
[0412] 2. Reliability objective: Minimize power deviation and ensure stable system operation.
[0413]
[0414] 3. Environmental goal: Minimize carbon emissions.
[0415]
[0416] Among them, EF grid (t) represents the carbon emission factor of grid electricity (kg CO2 / kWh).
[0417] 4. Comfort goals: Maximize user comfort or minimize discomfort.
[0418]
[0419] Wherein, PMV(t) represents the predicted average thermal index.
[0420] Considering the different focuses of control at each level, the selection of weighting coefficients also differs: the day-ahead planning level places more emphasis on economic and environmental goals; the hour-level scheduling level balances economic efficiency, reliability, and comfort; and the minute-level control level mainly focuses on reliability and comfort.
[0421] Table 3 lists the target weight settings for each level of control:
[0422] Control Level Economic weight Reliability weight Environmental weight Comfort weight Planning level 0.5 0.1 0.3 0.1 Hourly scheduling layer 0.3 0.4 0.1 0.2 Minute-level control layer 0.1 0.6 0.0 0.3 5.6 Safety Constraints Considered:
[0423] To ensure the safe and stable operation of the system, the present invention introduces the following safety constraints:
[0424] 1. Power ramp-up constraint: Limit the rate of power change of each device to avoid large power fluctuations.
[0425] -r down ≤P(t)-P(t-1)≤r up ;
[0426] Where, r down and r up These represent the maximum rate of descent and the rate of ascent (kW / min), respectively.
[0427] 2. Energy storage state of charge constraint: Limit the state of charge of the energy storage system within a safe range to avoid overcharging or over-discharging.
[0428] SOC min ≤SOC(t)≤SOC max ;
[0429] SOC constraints may differ under different operating modes, such as normal mode and emergency mode.
[0430] 3. Equipment start-up and shutdown constraints: Limit the frequency of equipment start-up and shutdown to avoid frequent start-up and shutdown leading to a reduction in equipment lifespan.
[0431] T on (t)≥T min,on ·[z(t)-z(t-1)];
[0432] T off (t)≥T min,of f·[z(t-1)-z(t)];
[0433] Among them, T on (t) and T off (t) represents the duration of on and off, respectively, T min,on and T min,off These represent the minimum on and off times, respectively, and z(t) represents the device state (1 for on, 0 for off).
[0434] 4. Power factor constraint: Ensure that the system power factor meets the grid requirements and reduce reactive power loss.
[0435] PF min ≤PF(t)≤1;
[0436] Where PF(t) represents the power factor at time t, PF min This indicates the minimum power factor requirement (usually 0.9 or 0.95).
[0437] 5. Harmonic constraint: Control the harmonic content of the system to ensure power quality.
[0438] THD(T)≤THD max ;
[0439] Where THD(t) represents the total harmonic distortion rate, THD max This indicates the maximum allowed value (usually 5%).
[0440] 6. Grid interaction constraints: Limit the power interaction with the grid to within permissible limits.
[0441] P grid,min ≤P grid (t)≤P grid,max ;
[0442] Among them, P grid,min and P grid,max These represent the maximum power sold and the maximum power purchased (kW), respectively.
[0443] 7. Temperature comfort constraints: Ensure that the indoor temperature is within a comfortable range.
[0444] T min ≤T in (t)≤T max ;
[0445] Among them, T in (t) represents the indoor temperature (°C), T min and T max These represent the minimum and maximum comfortable temperatures, respectively.
[0446] 5.7 Fast Solution Algorithm:
[0447] To meet the computational efficiency requirements of real-time control, this invention designs corresponding fast solution algorithms for optimization problems at different levels:
[0448] 1. Day-ahead planning level: Due to the inclusion of integer variables (such as equipment start / stop status), mixed-integer linear programming (MILP) is used for solving. To improve solution efficiency, the following strategy is adopted:
[0449] a. Problem simplification: Linearize the nonlinear constraints, such as approximating the power square term as a piecewise linear function;
[0450] b. Decomposition and solution: Decompose the 24-hour optimization problem into several sub-problems, such as four 6-hour problems, and then solve them in a coordinated manner;
[0451] c. Heuristic initial values: Based on historical optimization results, provide a good initial solution for the solver;
[0452] d. Solution accuracy control: Set reasonable termination conditions and stop solving in a timely manner after obtaining a sufficiently good solution.
[0453] 2. Hourly Scheduling Layer: Primarily involves continuous variable optimization problems, solved using quadratic programming (QP) or linear programming (LP). Optimization strategies include:
[0454] a. Preprocessing: Eliminate redundant constraints and reduce problem size;
[0455] b. Warm start: Use the optimization results from the previous time period as the initial solution;
[0456] c. Problem scaling: Appropriately scaling variables and constraints to improve numerical stability;
[0457] d. Parallel computing: Using multi-core processors to solve optimization problems in multiple scenarios in parallel.
[0458] 3. Minute-level control layer: This layer needs to complete the solution within seconds, employing explicit MPC or fast gradient methods. Implementation strategies include:
[0459] a. Explicit MPC: The control law is calculated offline, and only a table lookup operation is required online;
[0460] b. Fast gradient method: Utilizing the structural characteristics of the problem, an efficient iterative algorithm is designed;
[0461] c. Problem simplification: Use a linearized model to reduce computational complexity;
[0462] d. Optimization of computational code: The core algorithm is written in C / C++, and the execution efficiency is improved through compilation optimization.
[0463] The basic idea of explicit MPC is to divide the state space into several polyhedral regions and pre-compute the optimal control law for each region:
[0464] u(t) = K i x(t)+g i If x(t)∈R i ;
[0465] Among them, K i and g i Let R represent the control gain matrix and bias vector of the i-th region, respectively. i This represents the i-th state region.
[0466] The iterative formula for the fast gradient method is:
[0467]
[0468] x k+1 =y k+1 +βk (y k+1 -y k );
[0469] Where, x k and y k Proj represents the value of the variable in the k-th iteration. Ω Let α represent the projection onto the feasible set Ω, and let α represent the step size. Let β represent the gradient of the objective function. k This represents the momentum parameter.
[0470] 6. Adaptive parameter adjustment:
[0471] To improve the system's adaptability and robustness, this invention employs an adaptive parameter adjustment mechanism, which adjusts the model parameters and control parameters in real time based on the prediction error and control performance.
[0472] 6.1 Adaptive adjustment of prediction model parameters:
[0473] The adaptive adjustment of the prediction model parameters is based on an online learning algorithm, and the update formula is as follows:
[0474]
[0475] Where, θ (t) Let η represent the model parameters at time t, and η represent the learning rate. This represents the gradient of the loss function with respect to the parameters.
[0476] The loss function is defined as the weighted sum of squared prediction errors:
[0477]
[0478] Among them, P actual (ti) represents the actual power at time ti, P pred (ti|θ) represents the predicted power at time ti based on parameter θ, α i This represents the time decay weight, and M represents the length of the historical time window considered.
[0479] The formula for calculating the time decay weight is:
[0480] α i =λ i-1 ;
[0481] Where λ∈(0,1) represents the decay factor, with more recent data having a larger weight and earlier data having a gradually decreasing weight.
[0482] To prevent overfitting, a regularization term is introduced:
[0483] L reg(θ)=L(θ)+γ·||θ|| 2 ;
[0484] Where γ represents the regularization coefficient, ||θ|| 2 This represents the L2 norm of the parameter.
[0485] In practical applications, considering computational efficiency, stochastic gradient descent (SGD) or mini-batch gradient descent (Mini-batch GD) methods are used.
[0486]
[0487] Among them, L B This represents the loss function calculated on the mini-batch data B.
[0488] The learning rate η is chosen using an adaptive method, such as the Adam optimizer:
[0489]
[0490]
[0491] Where, m t and v t Let represent the first-order moment estimate and the second-order moment estimate, respectively, and β1 and β2 represent the decay rates of the moment estimates. and This represents the moment estimate after bias correction, where ∈ is a small constant to prevent division by zero errors.
[0492] 6.2 Adaptive adjustment of MPC control parameters:
[0493] The adaptive adjustment of MPC control parameters mainly targets the weighting coefficients w1, w2, and w3, as well as the prediction time domain length N.
[0494] The adaptive adjustment of the weighting coefficients is based on performance metric evaluation, and the update formula is as follows:
[0495]
[0496] in, γ represents the j-th weight coefficient at time t. j Indicates the adjustment factor. This indicates the corresponding performance metrics.
[0497] Performance metrics are defined as follows:
[0498]
[0499] Where K represents the length of the evaluation time window.
[0500] To avoid the weighting coefficients being too large or too small, constraints are introduced:
[0501]
[0502] The weighting coefficients need to be normalized to ensure that their sum is 1.
[0503]
[0504] The adaptive adjustment of the predicted time domain length N is based on control stability assessment, and the update formula is:
[0505] N (t-1) =max{N min ,min{N max N (t) +δ·sign(S (t) -S threshold )}};
[0506] Where, N min and N max These represent the minimum and maximum allowable prediction time domain lengths, respectively, where δ represents the adjustment step size, and S... (t) S represents the control stability index. threshold This represents the stability threshold.
[0507] The control stability index is defined as:
[0508]
[0509] Choosing an appropriate value for N is crucial to the control performance of MPC: too small an N leads to myopic decision-making and poor control performance; too large an N increases computational complexity and may introduce more prediction errors. This invention achieves a balance between control performance and computational efficiency through adaptive adjustment.
[0510] In addition to the weighting coefficients and the prediction time domain length, other MPC parameters, such as the control time domain length and constraint softening coefficients, can be adaptively adjusted to enable the control system to better adapt to environmental changes and uncertainties.
[0511] 6.3 Adaptive Adjustment Case Study:
[0512] Taking a photovoltaic power surge scenario as an example, the mechanism of adaptive parameter adjustment is explained:
[0513] 1. Under normal conditions, the system operates smoothly, with w1 = 0.6 (power deviation weight), w2 = 0.3 (SOC weight), w3 = 0.1 (control stability weight), and N = 10 (prediction time domain length).
[0514] 2. When a large fluctuation in photovoltaic power is detected (judged by the power change rate or spectral characteristics), the system automatically adjusts the parameters: increases w1 to 0.8, decreases w2 to 0.15, decreases w3 to 0.05, and shortens N to 8, thereby improving the system's response speed to disturbances.
[0515] 3. After the photovoltaic power fluctuation ends, the system will gradually adjust the parameters to return to normal values based on the actual control performance to ensure long-term stable operation.
[0516] Table 4 shows the adaptive parameter settings for different scenarios:
[0517] Operating scenarios Power deviation weight w_1 SOC weight w_2 Control stationarity weight w_3 Prediction time domain length N Normal operation 06 0.3 01 10 Photovoltaic power surge 0.8 0.15 0.05 8 Sudden changes in load demand 0.7 0.2 01 9 Electricity price peak 0.5 0.4 0.1 12 Power grid fault 0.3 0.6 0.1 6 ;
[0518] This invention underwent a three-month experimental verification in a smart office building. The building is equipped with a 100kWp rooftop photovoltaic system and a 200kWh lithium battery energy storage system. The main loads include lighting, air conditioning, and office equipment, with a peak load of approximately 120kW.
[0519] The experiment compared three control methods:
[0520] Method A: Traditional rule-based control method;
[0521] Method B: Standard MPC method based on ARIMA prediction;
[0522] Method C: The method of the present invention.
[0523] Experimental Design:
[0524] 1. Data collection phase: Collect historical data such as building photovoltaic output, load demand, and environmental parameters for model training and parameter adjustment.
[0525] 2. Model training phase: Based on the collected historical data, train the prediction model and optimize the control model, and determine the initial parameter settings.
[0526] 3. Controlled Experiment Phase: The building was divided into three functionally similar areas, and three control methods were applied to each area. The control areas were rotated weekly to eliminate the influence of regional differences.
[0527] 4. Special scenario testing: During the experiment, some special scenarios were deliberately set up, such as sudden changes in photovoltaic power (simulated by partial shading) and sudden changes in load (controlled by starting and stopping the equipment), to test the system's ability to resist disturbances.
[0528] Evaluation indicators:
[0529] 1. Prediction accuracy: Prediction accuracy is evaluated using metrics such as mean absolute percentage error (MAPE) and root mean square error (RMSE).
[0530] 2. Economic efficiency: Calculate the average daily operating cost, including the cost of purchasing electricity from the grid and the depreciation cost of energy storage.
[0531] 3. Reliability: The stability of the system is evaluated using indicators such as the standard deviation of power fluctuation and system recovery time.
[0532] 4. Environmental friendliness: Calculate carbon emissions based on the carbon emission factor of grid electricity and actual electricity consumption.
[0533] 5. Comfort: User comfort is assessed using PMV index and temperature deviation.
[0534] 6. Overall performance: Taking into account all the above indicators, a weighted performance score is calculated.
[0535] The experimental results are shown in Table 5:
[0536] Performance indicators Method A Method B Method C (This invention) Average Prediction Error (MAPE) 15.2% 8.7% 6.3% Mean Error of Load Forecasting (MAPE) 12.4% 7.5% 5.8% Local solar power grid integration rate 68.5% 76.3% 83.7% Average daily operating cost (RMB) 426.8 389.5 347.2 Standard deviation of power fluctuation (kW) 12.3 8.6 5.4 System recovery time (minutes) 8.5 5.2 3.1 Carbon emissions (kg CO / day) 278.6 245.3 213.6 Temperature comfort deviation (°C) 1.8 1.2 0.7 PMV absolute value mean 0.75 0.53 0.31 Overall performance score (out of 100) 62.5 78.3 91.7 ;
[0537] The data in Table 5 show that, compared with traditional methods, the present invention has significant improvements in all performance indicators:
[0538] This invention provides theoretical support and technical solutions for the efficient operation of green energy systems in intelligent buildings. It effectively solves the problems of strong time variability, low prediction accuracy, and lagging control response in existing technologies, and is of certain significance for promoting energy conservation and emission reduction in buildings and achieving the "dual carbon" goal.
Claims
1. A power management optimization method based on a smart building green energy system, characterized in that, Includes the following steps: Establish a mathematical model for an intelligent building energy system that includes photovoltaic systems, energy storage systems, controllable loads, and grid interaction; Short-time Fourier transform is used to perform time-frequency domain analysis on photovoltaic power output and load demand, extract frequency domain features at multiple time scales, and decompose the time series into trend, periodic and random fluctuation terms. Based on Fourier time-frequency characteristics, a multi-time-scale prediction model for photovoltaic power output and load demand is constructed: a low-frequency trend term prediction model is designed, which adopts the support vector regression method and uses historical data, weather forecasts and frequency domain characteristics as inputs to predict future trend changes; The mid-frequency periodic term prediction model is designed using a seasonal autoregressive integral moving average model to capture the periodic variation characteristics of the data. The high-frequency fluctuation term prediction model is designed, and a conditional generative adversarial network is used to generate prediction results for multiple scenarios to characterize the uncertainty of random fluctuations. Establish a hierarchical MPC control framework that includes a day-ahead planning layer, an hourly economic scheduling layer, and a minute-level real-time control layer; Achieve real-time balance between energy supply and demand at the minute-level real-time control layer; The model parameters and control parameters are adjusted by learning algorithms online.
2. The method according to claim 1, characterized in that, The formula for calculating the output power of the photovoltaic system is as follows: ; in, express Photovoltaic output power at any given time This indicates the conversion efficiency of the photovoltaic module. Indicates the total area of the photovoltaic module. express The intensity of solar radiation at any given time. Indicates the temperature coefficient. express Component temperature at any given time This indicates the reference temperature under standard test conditions.
3. The method according to claim 1, characterized in that, The dynamic model of the energy storage system is represented as follows: ; in, express The state of charge of the energy storage at any given time. Indicates charging efficiency. Indicates discharge efficiency. express Charging power at any time express Discharge power at any given time Indicates the time step. This indicates the rated capacity of the energy storage system.
4. The method according to claim 1, characterized in that, The controllable load is a thermoelectric device, and its model is as follows: ; in, express Indoor temperature at any given time Indicates the building's heat capacity. express At any given time, the ambient heat exchange power Indicates the energy efficiency coefficient of the equipment. Indicates the controllable load power; ; in, Indicates the overall heat transfer coefficient of a building. Indicates the outdoor temperature. Indicates internal thermal gain. This indicates the solar radiation heat gain.
Citation Information
Patent Citations
Multi-model comprehensive prediction method for photovoltaic powder based on synchronous extrusion wavelet transformation
CN108038580A
Multi-time scale economic dispatching method for electric heating comprehensive system based on improved VMD
CN110707745A