Piecewise linear approximation for identifying wind power ramp events

WPREs (wind power ramp events) are one of the most critical factors affecting the security and protection of the electrical system. Accurate ramp event detection may help power systems better manage extreme events and reduce financial damage. In this study, We present an improved piecewise linear approximation for recognizing wind ramps in Kanyakumari district. In practise, wind power ramps can be decreased by properly managing and dispatching flexible reserve and associated services. This necessitates the use of proper ramp detection techniques as well as precise ramp forecasts. The method’s plan to break down wind power signal into increasing with increasing ramps, making ramp identification easier and ensuring that all conceivable ramps of varying lengths are identified. Using observed wind power data, the ramp detection method is used to assess the performance of an energy wind farm. The results reveal that identifying wind power ramps using the segmentation method is equivalent to optical ramp identification.


Introduction
The technology for wind power has advanced significantly during the last few decades.Along with potential, the increasing integration of wind power into the power grid also poses significant hurdles for the safe functioning of the power system.These difficulties are mostly brought on by the intermittent and variable nature of the wind [1].Wind power ramp events are brand-new occurrences that are hazardous to the stability of the power system because they involve a significant shift in wind power generation over a brief period of time [2].Ramp events will have an impact on the stability, dependability, and safety of the power systems; the key influences are as follows: When wind power penetration increases, WPREs grow as well [3.4].WPREs have a significant negative impact on the power system's stability and pose a risk to public safety as well as potential financial harm.Because the output of other generators must be changed to balance the significant power swings brought on by WPREs [5,6].WPREs will also have an impact on power market transactions and result in costly economic penalties.The stable operation of power grid systems therefore depends on the precise detection and prediction of WPREs [7,8].
There have been more measures to decarbonize the electric power grid by using clean, renewable sources of energy.Because wind and solar electricity are unpredictable, intermittent, and non dispatchable energy sources, they are challenging to employ [9].Solar electricity is the creation of electricity using photovoltaic cells found in solar panels and transparent photovoltaic glass, or by using the sun's energy directly as thermal energy (heat).As wind power penetration rises, quick generators, in particular, will be called upon more frequent to balancing demands [10,11].Wind energy's economic and environmental benefits will be countered by auxiliary service and wind power constraints.Severe ramps should be tackled with caution because they can significantly affect the operation of the power system [12,13].The demand side has historically had sufficient capacity to fulfil demand peaks in the morning and evening.Wind generation variability, on the other hand, results in significantly steeper net load ramps.Because the current generating mix is unable to keep up with the changes, they could, in the worst-case scenario, result in a loss of demand or energy, and hence uneconomic generation dispatched [14,15].
Because system defects are a key problem, the system's ability to satisfy demands has always been crucial in power distribution reliability studies.In a recent reliability research, the authors [16] looked at the ramp rates of production units and concluded that lesser ramp capabilities reduce system reliability.Wind power has an upper limit to its availability that is both unexpected and ambiguous at different times.Wind power's variability and uncertainty is a major source of concern for system operators.Wind power forecasting is becoming increasingly important in power system management as the number of wind power absorbed as in power system grows [17,18].Even if today's energy system can handle moderate amounts of unpredictability and variation, ramp event and massive power outagescould be disastrous.
First, we look at how an optimal ramp detection technique is implemented and approximated.We show how great our strategy is and then put it to the test in a variety of settings.Next, we leverage publically data available to obtain the best possible ramp identification and provide a detailed descriptive statistic of important ramp properties.In future dispatch formulations, such attributes can be employed to characterize ramp events.

Literature review
A cutting-edge method was suggested by Tinghui Ouyang et al. ( 2019) [1] with the main goal of enhancing the effectiveness of wind power ramp prediction.In order to create a primary model that can represent the trend of wind power variation, this method makes use of the wind power curve.Then, an MSAR (Markov-Switching-Auto-Regression) model that combines the benefits of AR models with Markov chains corrects the primary model's prediction residual.To advance the state-of-the-art in WPREs identification, Yang Cui et al. (2021) [2] suggested a brand-new, enhanced dynamic swinging door method (ImDSDA).In the beginning, ramp segments are extracted using the swinging door algorithm (SDA).Second, segment combination and ramp trend identification are done using the dynamic programming approach.Finally, to evaluate the effectiveness of the suggested ImDSDA, raw data from three actual wind farms in Hubei, China, were utilized.
Dorado-Moreno et al. (2017) [3], By analysing the outcomes of multiple Reservoir Computing (RC) architectures targeted to different classifiers, they can anticipate Wind Power Ramp Events (WPREs) in wind turbines.The suggested RC designs beat typical WPRE predictive mode ls based on persistent, auto-regressive regression models, as well as classic RC variants, when tested using actual information from three wind turbines in Spanish.Ouyang, Tinghui et al. (2019) [4], A mixed prediction model was utilized at first.The wind power curves, which depicts the physics of wind generators, is shown below might be utilized to offer lengthy trend prediction using information from a weather forecasting system.After that, the multivariate model is built using an information method to rectify system deficiencies in the basic predictions, which are resolved in attempt to optimize long-term predictive accuracy.To detect ramps in the second step, a reduced swinging door method is utilized.
Liu et al. (2018) [5], The performance of the model is validated using WT fault diagnosis tests.We determined that, in terms of both features and statistics, the produced fault data are similar to actual fault data derived from data analysis result.We found that the recommended technique may still detect WT problems when true fault data samples are restricted, based on fault identification findings.Lyners et al. (2020) [6], To help ramp recognition, a multi-parameter method is implemented to divide a continuous wind power signal into uphill and downward components.The system may be used to detect solar power ramp occurrences, national levels, and residual load (national load minus renewable component).Mehta et al. (2018) [7], For managing system frequency changes following load disruptions, a hybrid energy system with synchronous machine and average speed generator is described.A state space model for this coordinated system is built by integrating the engine's rapid acting voltage control loop with the slower frequencies control loop.The suggested coordinate system performance has been confirmed for a variety of exciting and reactive load fluctuations, both step and random.
Zhang, Dongying et al. ( 2019) [8], Turbine monitor, wind energy potential estimates, and wind turbine choosing are all part of the wind energy prediction.This research covers raw wind data uncertainty, raw wind data preprocessing approaches, energy curve modelling methods, and parameters approaches for the building of an accurate energy curve model.Furthermore, the performance of a number of well-known energy curve models is investigated in various season and winds farm.Zhang et al. (2020) [9], AGC parameter fitting provides the foundation for assessing AGC system stability.This method could be used to evaluate the influence of wind power ramping on tie line control, which can help prevent tie line restrictions and develop new control strategies.
Zhou et al. (2021) [10], Wind energy and energy storage systems are being examined as part of the multistage power system operation process.Actual multistage procedures are doable thanks to the layered all-scenario-viable technique.Furthermore, the suggested IPHS technique improves the computing performance of long-term hourly robust TCUC problems, ensuring that this capacity planning problem may be solved.Ebadi, Ramin et al. (2021) [11], On IGDT-based robust NCUC problems in wind turbines, the influence of TBES technologies and the DR programme was assessed.The hourly course of the TBES train, the rechargeable patterns of the TBES system, the generator schedule, the optimal robust value of parameter, and the updated profile were all incorporated in the suggested solution approach.According to a sensitivity study, when the complete system pressure increases, the advantage of TBES technology in terms of total cost reduction increased.
Lyners et al. ( 2021) [12], The auxiliary ramp rule is utilized to construct a diverse supply ramp detection technique that is ground breaking.The programme divides the energy signal into two parts: upward and downwards ramp segment using a rule-based segmentation technique, then analyses horizontal sub segments with minor power changes using a postprocessing algorithm.The Wind Forecast Improved Project (WFIP) will be utilized in place of the existing Electric Reliability Council of Texas (ERCOT) shortterm wind power prediction (STWPF).The WFIP's overall gain in quick wind power prediction performance was assessed using a set of statistical metrics spanning multiple forecasting timeframes.The experimental WFIP outperformed the present STWPF for all forecasting horizons in most seasons/months, according to statistical analysis.A hybrid predictor comprising a multi-step self-tuning technique and a somewhat GAN utilizing generating and discriminatory model is constructed for the WPF and REF challenges.Using wind power time -series data from actual wind farm as a starting point, the suggested technique was thoroughly studied and compared to statistical techniques, traditional artificial neural, and deep learning algorithms.
The remainder of the paper is organized in the following manner.Section 3 proposes a piecewise linear approximation.The performance and utility of the suggested method are demonstrated and assessed in Section 4 using wind power generation.Section 5 brings the paper to a close.

Proposed method
Following that, significant wind power ramp occurrences are recognized from the generated segment using a user-defined concept of a major ramp.In this paper, we use a piecewise linear approximation to present an improved optimal ramp detection algorithm for identifying wind ramp to segregate wind power data.When wind power abruptly increases or falls over a short period of time, this is known as a ramp event.As a result, the proposed method will divide a temporally wind power sequence into increasing or decreasing ramp.There are three parts to this section.To begin, the severe ramp events are defined, as well as their detection.The actual simulation algorithm is shown in the second section, while the performance measurements of importance are presented in the third part.

Optimal ramp detection algorithm
The following elements can now be used to formulate the detection issue.Every interval E = (i, j) the indices were presented (i, j) : 1 ≤ i < j ≤ N and a possible ramp in the time series beginning with i and ending with j.R : E × X → {0, 1} is a ramp rule that converts X intervals into a choice as to whether or not interval is a ramp.In accordance with the Ramp Function (R), the signal will begin at time zero and quickly assume a slant shape.Depending on the supplied time characteristics (i.e.positive or negative, here positive), the signal will then continue a straight slant route either towards the right or left.The ramp function (R) is a form of elementary function as a result.The best solution to the ramp detection algorithm is really to devise a method that recover the interval sequences E 1 , ...E k , every belonging to a ramp.

Wind ramp rules
In order to put an optimal ramp detection approach into practise, the rule sets R must be specified.We'll refer to R(E) or R (i, j) as a rule given to X in the signal interval E = (i, j) in the rest of the document (i, j).The unit ramp function is defined as follows: A ramp event is an interval in the wind power time series: R 0 (i, j) = 1 {p j −p i >P val } power swing threshold (2) where, p i and p j denotes the power power at the corresponding instants in time, i and j, respectively.
The power swing thresholds testing (Eq.2) determines if wind power had increased over time by just a specific amount.The p val parameter specifies the time range and threshold for detecting similar swings.Equation ( 4) is utilized if the min and max detected power for a given interval exceed a threshold value.This rule differs from the one in Equation by two major factors (1).For starters, Equation ( 4) is much more sensitive to wind power signal changes and detects ramps with a higher false positive rate.Secondly, a signal that fulfils Equation ( 2) is certain to fulfil Equations ( 3) and (4).Equation ( 4) is valid if the rate of rise for a given interval reaches a specific value.The power ramp rate threshold that was employed was this.The preceding requirements do not apply to intervals with significant variations or fast power drops.Such oscillations may cause a ramp to halt or start too soon.We employ an extra rule to solve this problem, which can be easily determined by keeping track of the current interval maximum: It is possible to create additional rules.Any definition can be considered using the generalized rule in Equation (6).
R c (i, j) is defined by Equation ( 5), while R r (i, j) is defined by any wind ramp specification.Assume that some scoring function is used to score periods of the data series W : E × X → R + .The score function evaluates the precision of probabilistic forecasts.Using the nonlinear programming formulation below, the objective function J is maximized, and the optimum ramp start and finish times are reconstructed.

Ramp score function
A sampling measure of the gradient of the expected return of a parametric strategy with regard to its parameters is calculated using the score function.A real unary function is the ramp function.Because the resolution of a digital readout is inversely related to the frequency of a local oscillator, it has a superior resolution and is adjustable.The scoring function must satisfy the following super additivity property in order to ensure optimal ramp detection.
∀i < k j : R(i, j) = 1, W(i, j) w(i, k) + W(K + 1, j) (8) We adopt Equation ( 9) as an information cost function interval since this constraint generates a complete family of weighted systems.

Trend fitting
A piecewise linear fitting pre-processing step is used.
The following convex software can be used to generate piecewise linear fits to data in a straightforward and tractable manner.
If x = {p 1 , . . ..., p N } and t i = i are assumed, and second derivative operation is the transformations D. The Dx 1 imposes piecewise linearity in the approximation x, as well as sparsity in the second derivative.Changing the parameter λ allows you to sift through multiple time scales.The choice of λ can have an impact on the observed ramp events.The collection of piecewise lines is retrieved from x after the optimization by setting a threshold for the second derivative.Because this is an approximation approach, picking a threshold value should be done with caution.The piecewise signal is then threshold as follows: where (t 1 , Pt 1 ), . . . . . ., (t T , Pt T ) are positions that meet ||Dx|| 1 > γ .Both trend filtration (Equation 9) and identifying wind power decreases (Equation 5) are concerned with power fluctuation on different time scales.Short-term oscillations are eliminated by trend filtering, while power losses over longer periods are penalized by Equation ( 5).
End for End for End for

Wind production scenarios generation
To examine the ramps, a realistic approach for creating power generating scenario is required.The readers must be aware that method employed is only one option, but it is an excellent thing to use Monte Carlo simulation to construct aggregate wind power time series that meet the requirements (Figure 1).
The approach combines a valid modified autoregressive (AR) models using Cholesky decomposition (ARC) and a turbines idea to convert wind speed timeseries data into wind power data set data to create wind speed time series.This method could be used to imitate data from many wind farm located close together.Using the Cholesky decomposing of the correlation analysis, the series were turned into multivariable crosscorrelated time -series data.As shown in Figure 2, the  simulations of a wind-generating situation are divided into six parts.[21,22] describe a method that is comparable to this one.The entire estimate and simulation method that was utilized to construct the power generating timeseries is detailed in [22].The wind farms are all in close proximity to one another.Annual availability, nominal power, and cut-out speeds are some of the turbine's particular properties.In all the wind farms, Gamesa 5 MW turbines are utilized.Table 1 shows the Parameter values for wind power generation.

Results and discussion
The wind power ramp event are studied using the BPA data collecting.Using the identified ramp, a simple statistical survey of many metrics characterizing the ramp event process is conducted.The ramp rate and length, and also the power swing, are the first features.Second, we look at the joint distribution of ramp length, slope, ramp length, and swing and provide them.The arrival data is presented in the third part, while the ramp parameter conditional on the wind power quintile is discussed in the fourth.This paper proposed the Ramp detection in the wind farm of Kanyakumari District (Table 2).

Data description
A year's worth of data from the Bonneville Electric Company is used to test the best ramp detection system and following statistical modelling.The first set of data includes 15,768,000 samples of wind turbines output collected every two minites.During January 1, 2005, until December 31, 2006, the Klondike I reactor produced electricity.The plant has a capacity of 24 megawatts.The data is first normalized to the system's capacity factor.A wind turbine's capacity factor is calculated by dividing its average power production by its maximum power potential.In the United States, the capacity factor of land-based wind varies from 24% to 56% and averages 36%.
To reduce oscillations in time -consuming and requires from outside acceptable range of the wind power ramp and reduce the number of points required in the condition, The power time series is fitted with The average ramp swing was approximately 12:2 MW, with a minimum of 6 MW.The smallest observable swing is calculated by multiplying the greatest power output by the minimal swing threshold P val .This is the projected output of the ramp detection method.

Joint experiments on ramp start time, ramp duration, and ramp swing distribution
Predicted information can be used to calculate the degree of correlation between ramp event characteristics.Down-ramps characteristics have a lower joint distribution than these traits.It's because the up-ramps' joint distribution are dispersed, but the down-ramps' joint distributions are concentrated.The maximum ramp duration per day is 600 min, notwithstanding the fact that ramp event can occur at any time (10 h).Furthermore, whenever a ramp event occur, the chances of a subsequent ramp event increasing.This is something that PSOs should pay more attention to.Up and down ramp event begin at various times, with ramp swing in between.This information could be used by grid operators to develop efficient ramping mitigations, like dynamic reserve levels (Table 3).
Up and down ramp event begin at various times, with ramp swings in between.The system operator might utilize this data to develop more effective ramp mitigation strategies, including such dynamic reserve levels.Second order moment features are even more crucial because every character of ramp occurrences is tightly related to the timing of real wind power data.[19,20] recently developed the "L1-Ramp Detect with Sliding Window" (L1-SW) detection method for WPREs to specify ramp start times, duration, rate, and other critical objectives were to identify in the functioning of a power system.The L1-SW method employs a punishment parameter in the L1 trend fit and a threshold in the gradient in its segmentation process, unlike the optimal RDA and the ideal SDA.The L1-SW approach can smooth wind power noise before segmenting it into piecewise data.In this section, a large ramp is associated with changes in wind power which is greater than 10% of the total capacity additions.It should be mentioned that this threshold (10%) was established in order to obtain sufficient ramp for comparing the OpRDA to the optimized SDA.Compared the segment estimated by the OpRDA to the upgraded SDA techniques using various parameter values.The parameter in the OpRDA is set to 0.009 while the variable in the Optimal SDA is set to 0.5.

A comparison to the best method for detecting wind power ramp events
Figure 3 In the comparison of L1-SW to the optimized SDA and segments of OpRDA, the outcomes of segments and significant ramps are shown.
Categorical statistics are useful for recognizing observable ramp occurrences because they are precise and skilled.The performance of ramp detection can be evaluated using a set of metrics.The following are the  definitions of the four evaluation metrics: The percentage of accurately recognized WPREs is indicated by DA.
The fraction of detected WPREs that actually happened is indicated by RC.

CSI =
TP TP + FN + FP (14) The CSI statistic is used to assess the proportion of successfully recognized ramp events.Its value falls between 0 and 1, with 0 indicating faulty detection and 1 indicating correct detection.

ACC =
TP + TN TP + FN + FP + TN (15) The percentage of points accurately identified as ramp or non-ramp occurrences is indicated by Acc.
We were able to forecast the min and max ramp amplitude of the dataset based on the scale of the wind turbine and the ramp duration that were established in before (Table 4).
As indicated in Table 5, In the confusion matrix, TP stands for true positive event, FN for false negativity, FP for false positive story, and TN for true negative event.These denotations have been used to define a set of metrics.
Overall, both L1-SW and OPSDA are capable of identifying essential ramp properties occurrences based on WPRE detection and analysis.Furthermore, the OpRDA performs better.

Conclusion
This research created an enhanced ramp detection technique for detecting wind power.The optimized SDA and L1-SW approaches were compared to the developed OpRDA.According to the data, the OPRDA was successful in identifying wind power ramps and outperformed the optimized SDA significantly.The OpRDA method outperformed the L1-SW technique while taking much less time to process.The resulting OpRDA was also used to identify the best adjustable parameter value in the offline optimized SDA.After that, you can use the best value you choose to detect ramps.
Algorithm 1 Optimal Ramp Detection Algorithm L← length(p) { Initialize scores of zero length segment.}for

Table 1 .
Parameter values for wind power generation.

Table 2 .
Wind speed data of Kanyakumari district.

Table 5 .
Detection results of different methods.