- The paper proposes a machine learning model that constructs rich feature sets and selects optimal predictors for varying weather conditions.
- It employs Chebyshev polynomial expansion and trigonometric encoding to capture non-linear and cyclical patterns in PV output.
- The constrained linear regression, compared against SVR, RF, and GBDT, significantly improves 1-hour ahead solar power forecasts.
This paper presents a machine learning framework for predicting 1-hour ahead photovoltaic (PV) solar power generation using historical weather data and past power output. The core idea is to improve prediction accuracy by constructing a rich set of features derived from basic inputs and then selecting the most relevant ones for different weather conditions using a constrained linear regression model.
Problem: Accurate short-term solar power prediction is crucial for grid stability and energy management due to the intermittent nature of solar energy. Existing methods often struggle with varying weather conditions.
Proposed Method:
- Data Preparation:
- Inputs: Temperature, dew point, humidity, wind speed, time of day, and the solar power output from the previous 15-minute interval (y(k)).
- Data Source: Weather data from Long Beach, CA (Jan-Jun 2014) and 15-minute solar power data from the California Solar Initiative (CSI) for a PV system at Long Beach airport.
- Preprocessing: The data is aligned by timestamp. The mean daily power profile (yˉ(k)) from the training set is calculated and subtracted from the actual power output to predict the deviation (y′(k)=y(k)−yˉ(k)). This detrending helps focus the model on predicting variations from the average pattern.
- Weather Types: Data is categorized into three weather types: cloudy (includes mostly/partly cloudy), fair, and haze. Separate models are trained for each type.
- Feature Construction:
- Basic Regressor (ϕ): Initial features include the detrended past power output (y′(k)), weather variables (u1 to u4), and time (u5).
- Extended Regressor (ϕ∗): Time is further encoded using trigonometric functions (u6=cos(πu5/24), u7=sin(πu5/24)) to capture cyclical daily patterns.
- Normalization (ϕ~): The extended features are normalized to the range [−1,1].
- Chebyshev Polynomials: Features are expanded into a higher-dimensional space using the first 11 Chebyshev polynomials (C0 to C10) applied to each normalized feature in ϕ~. This creates non-linear transformations of the original inputs.
- Interaction Features (C11 to C13): To account for the varying impact of clouds at different times of day, interaction terms are created by multiplying one-hot encoded cloud types (u8,u9,u10 for cloudy, mostly cloudy, partly cloudy) with the normalized time feature (u5/24).
- Feature Selection and Model Training:
- Wrapper Method: A sequential forward selection and backward elimination approach (Algorithm 1) is used to select the best subset of constructed features (Ψ[i]) for each weather type (i). The selection criterion is the Mean Squared Error (MSE) on a dedicated validation dataset.
Constrained Linear Regression: For a chosen feature subset Ψ[i], the model coefficients (a[i]) are determined by solving a constrained least squares problem:
a[i]mink∈Γ[i]∑(y′(k+1)−Cw,j∈Ψ[i]∑a[i],w,jCw,j)2
subject to the physical constraint that the predicted power must be non-negative:
Cw,j∈Ψ[i]∑a[i],w,jCw,j+yˉ(k+1)≥0
* Multi-step Refinement (Algorithm 2): The feature selection process is iteratively refined by evaluating the combined multi-step (1 to 4 steps ahead) prediction error on the validation set across all weather types.
* Boundedness: A constraint ∑∣a[i],w,j∣≤1 can be added to the least squares problem to ensure the predicted deviation y^′ remains bounded, especially for multi-step predictions, provided the inputs are appropriately scaled.
Implementation Details:
- The model predicts the deviation y′(k+1) for 1-hour ahead (which corresponds to 4 steps of 15-minute intervals).
- The final prediction is y^(k+1)=y^′(k+1)+yˉ(k+1).
- The constrained least squares is a convex optimization problem, solvable efficiently.
- Comparison models (SVR, RF, LightGBM) were implemented using scikit-learn and LightGBM libraries. Hyperparameters for these models were tuned using GridSearchCV (for SVR) and FLAML (for LightGBM) on the validation set.
- Evaluation uses the combined MSE over 1-to-4 step ahead predictions on unseen test datasets.
Results:
- The proposed method, combining Chebyshev feature expansion and constrained regression with feature selection, generally outperformed standard SVR, RF, and GBDT models on the test datasets evaluated (Table III).
- Feature selection identified different subsets of features as optimal for different weather types and time periods (datasets). High-order polynomials and interaction terms were particularly useful for cloudy conditions.
- Predictions were more accurate for fair and haze conditions compared to cloudy days, where solar power exhibits higher variability.
- The results suggest that domain-specific feature engineering and selection can lead to better performance than relying solely on complex model architectures with raw features.
Practical Applications:
This approach provides a concrete method for improving short-term solar power forecasts. Implementing it involves:
- Gathering relevant weather data (temperature, dew point, humidity, wind speed, cloud type/description) and historical PV power output at a suitable frequency (e.g., 15 minutes).
- Implementing the data preprocessing steps: time alignment, calculating and subtracting the mean daily profile.
- Coding the feature construction pipeline: adding time-based trigonometric features, normalizing, applying Chebyshev polynomials, and creating cloud-time interaction terms.
- Setting up a training/validation/testing split strategy appropriate for time-series data (e.g., rolling windows as used in the paper).
- Implementing the feature selection algorithm (Algorithm 1 & 2) coupled with a constrained least squares solver. Many optimization libraries (like
scipy.optimize
in Python) can handle constrained quadratic programming.
- Deploying the selected models (one for each weather type), switching between them based on the current weather forecast or observation.
The method offers a balance between model simplicity (linear regression at its core) and representational power (through high-dimensional feature engineering), achieving strong predictive performance.