2.1. KS Transformation Principle
The time–frequency characteristic information of PQDs is crucial for accurate identification of PQDs. Therefore, high-frequency resolution and energy concentration are needed to reduce information loss. In reference [
19], KST for time–frequency analysis is proposed, which is defined as
where
represents the PQD signal,
represents time,
represents the time shift factor,
represents signal frequency,
represents the imaginary unit, and
represents the Kaiser window function, i.e.,
where
is the first type of zero-order Bessel function, and its power series expansion is defined as
In Equation (2),
is a frequency-dependent control function used to adjust the shape of the Kaiser window and
is the time-scale parameter. The control function
is the most critical parameter of the Kaiser window, as it determines the trade-off between the main-lobe width and the side-lobe level. According to the Kaiser window theory, the relationship between
and the side-lobe attenuation
(in dB) is governed by the following piecewise logic:
By adjusting
, the window can adaptively transition between different characteristics. For instance, when
, the Kaiser window degrades into a rectangular window; when
, it approximates a Hamming window; and when
, it approximates a Blackman window. To provide good time–frequency resolution, the design in reference [
19] is as follows:
where
is used to control the change in window shape.
2.2. AKST Method Based on Dynamic Parameter Optimization
KST has better a time–frequency performance than ST based on Gaussian windows [
5]. However, the fixed
limits its adaptation to PQDs, thereby reducing resolution. To this end, this article further proposes AKST, which optimizes the control function
by introducing an adjustment factor
, thereby adjusting the rate of change in window shape and improving its adaptability to PQDs. The new control function is defined as
where
; specifically, when
and
,
is equal to the original control function
.
According to the control function
, the adaptive KS transformation can be defined as
In the experiment, the sampling frequency and sampling points are set to
and
, respectively, and the sampling time interval can be calculated as
. The PQD signal
is converted into a discrete signal
after sampling and processing. In this paper, the range of
values is set from 0 to
to adjust the time shift. Among them,
and
. When
, the discrete AKST of
can be described as
where
and
are the discrete Fourier transform results of
and Kaiser window
, respectively. The value of r ranges from 0 to
and is used to control the translation length of
.
Among them,
is a two-dimensional complex matrix. Therefore, Equation (6) can be further expressed as
where
and
respectively represent the amplitude and phase angle of
.
In order to dynamically adjust the parameters of the control function driven by (6), this paper adopts the discrete AKST energy concentration measurement as the optimization index, and its expression is
where the size of matrix
is
.
Energy concentration quantifies the time–frequency aggregation of energy. To reduce energy leakage and enhance feature saliency, we maximize energy concentration and adaptively optimize the
parameter as follows:
To solve the above optimization problem, this paper introduces the Red-billed Blue Magpie Optimizer (RBMO) algorithm [
29]. This algorithm simulates the collaborative predation behavior of red-billed blue magpies in natural environments, utilizing information sharing and collaboration among individuals to achieve a balance between global and local search. It has advantages such as fast convergence speed and strong robustness.
However, the standard RBMO has a fixed Concentration Factor (CF) and balance factor
, which tend to converge to local optima earlier in multi-parameter optimization, making it difficult to achieve optimal results. In response to the above shortcomings, this paper proposes the Adaptive Red-billed Blue Magpie Optimizer (ARBMO) algorithm, which is based on the RBMO and uses the energy-aggregation function of discrete AKST as the fitness function. By introducing adaptive adjustment coefficients, the efficiency of parameter optimization is improved. Referring to the optimization function in Equation (11), the fitness function of AKST is set as follows:
According to Equation (12), the problem of maximum energy concentration is transformed into solving the problem of minimum fitness by taking the reciprocal. The parameter search performance of AKST is improved through the following two aspects:
In the initial stage of the group search, in order to enhance the exploration ability of the group, the sum of squared distances between each individual and the food location is considered. The Concentration Factor is adjusted slowly through an exponential function to ensure that individuals with lower fitness still retain a higher degree of focus, avoiding achieving premature convergence and falling into local optima in parameter optimization.
In the later stage of group predation, a linear decreasing strategy is adopted to adjust the balance factor ε. The initial value of ε is 0.5, which gradually decreases to 0 as the number of iterations increases, to achieve a smooth transition from global exploration to local development and improve optimization accuracy.
Based on the above optimization strategy, the adaptive adjustment formula for Concentration Factor
is
where
represents the size of the group;
represents the dimension;
represents the position of the
-th individual in the
-th dimension; and
represents the position of food in the
-th dimension.
Consistent with the aggregation factor strategy, the balance factor
is adaptively adjusted to
where
represents the current iteration count and
represents the maximum number of iterations.
The
and
shown in
Table 1 represent the population size and iteration times respectively,
and
represent the lower and upper limits of the problem, and
represents the equilibrium factor.
According to
Table 1 and Equations (11) and (12), the implementation steps of parameter optimization based on the ARBMO are as follows:
- (1)
Initialization parameters: Set the range of values a,p,b and the adjustment factors Lb and Ub initialize the population size P, iteration time T1, and balance factor ε.
- (2)
Fitness calculation: Calculate the fitness values of each solution within the population based on the fitness function in Equation (10).
- (3)
Iterative optimization: Enter the loop process and update the solution space by expanding and shrinking the search mechanism. Synchronize and adaptively adjust the Concentration Factor CF and balance factor ε to balance global detection and local development.
- (4)
Candidate solution update: Calculate the fitness of the updated candidate solution. If it meets the AKST parameter optimal solution criterion or reaches the maximum number of iterations, stop the search.
- (5)
Output result: Extract and output the optimal adjustment factor combination for subsequent signal processing.
To verify the optimization performance of the proposed ARBMO, a comparative experiment was conducted. The convergence characteristics of the ARBMO were compared with the standard RBMO, Particle Swarm Optimization (PSO), and a Genetic Algorithm (GA) under the same fitness function (Equation (12)). The results are shown in
Figure 1.
As illustrated in
Figure 1, the ARBMO achieves a lower fitness value (higher energy concentration) with a faster convergence rate compared to the RBMO, PSO, and the GA. The adaptive Concentration Factor and balance factor allow the algorithm to escape local optima effectively, which is a common limitation for PSO and GAs in high-dimensional parameter spaces. This demonstrates that the ARBMO provides a more robust and efficient solution for optimizing AKST window parameters.
To further verify the effectiveness of the ARBMO in practical signal processing, this paper conducted experimental analysis using typical PQD signals. In the experiment, the fundamental frequency
of the PQD signal was 50 Hz, and the sampling frequency
was set to 3200 Hz. To analyze multiple PQDs more reliably, reference [
21] was used to sample the PQD signal over 10 periods, with a sampling point
N of 640 and a sampling time of 0.2 s. In addition, other sampling periods were also applicable.
2.3. Time–Frequency Analysis of PQD Based on AKST
To verify the time–frequency performance of the proposed AKST using the parameters optimized by the ARBMO, PQDs with time-domain and frequency-domain interference were superimposed. This composite disturbance consists of voltage dips, harmonics, and oscillatory transients, randomly generated within 0.2 s. The disturbance signal and time–frequency analysis results are shown in
Figure 2a and
Figure 2b, respectively.
In addition, in order to reduce the computational complexity of AKST, only the key frequency point and its two nearby frequency points were considered [
6]. The key frequencies included fundamental frequency and harmonic frequency. From
Figure 2, it can be seen that AKST can accurately detect multiple pieces of interference information. To verify the time–frequency resolution of AKST in this article, the latest ST [
20] and KST [
21] were selected for comparison from both time-domain and frequency-domain perspectives, as shown in
Figure 3.
From
Figure 3, it can be seen that these three algorithms can detect voltage dips, harmonics, and oscillatory transients, demonstrating their effectiveness for PQD analysis. Compared with ST and KST, AKST in
Figure 3a has a shorter time interval and higher time resolution for detecting voltage dips. In addition, from the frequency envelope curve in
Figure 3b, it can be seen that AKST has a higher energy concentration and frequency resolution at the fundamental frequency. The value of AKST is 90.36, and the corresponding values of ST and KST are 80.31 and 88.45, respectively. The energy of KST is more concentrated than that of ST, which proves that Kaiser windows have a higher energy concentration than Gaussian windows. AKST is superior to KST, indicating that the control function can improve the energy concentration performance of KST. The optimal values for AKST, ST, and KST are 1.1, 0.6, and 0.2, respectively.