Supraharmonic Generation Mechanisms in Solar Inverters and Compressed Sensing Detection Methods

As modern power systems rapidly evolve, the large-scale integration of renewable energy sources, electric vehicles, and power electronic devices has made power quality issues increasingly complex and severe. Among these emerging disturbances, supraharmonics in the frequency range of 2–150 kHz have drawn significant attention over the past decade. This paper focuses on the generation mechanisms of supraharmonics in solar inverters and proposes a high-efficiency detection framework based on block compressed sensing (BCS) and an improved adaptive step-size compressive sampling matching pursuit (ASCoSaMP) algorithm. In the first part, the topology of an L-type three-phase solar inverter is established, and the mathematical model is derived. A detailed theoretical analysis combined with MATLAB/Simulink simulations reveals that the switching frequency and the DC-link voltage are the dominant factors determining the frequency distribution and amplitude of supraharmonics emitted by solar inverters. The spectral peaks appear symmetrically around integer multiples of the switching frequency, with the amplitude decreasing as the switching frequency increases. In the second part, the compressed sensing theory is introduced into the supraharmonic measurement domain. The sparse representation of supraharmonic signals under the DFT basis is analyzed, and a BCS-based strategy is designed to reduce the measurement matrix storage and computational complexity. A first-and-last two-cycle sampling window is adopted to lower the data volume while preserving spectral information. A binary sparse random matrix is selected as the measurement matrix, and an overlapping block strategy is proposed to suppress block-edge effects. In the third part, the conventional CoSaMP algorithm is improved by introducing a variable step-size iterative sparsity estimation and a support-set variation criterion for early termination. This ASCoSaMP algorithm can reconstruct supraharmonic parameters without prior knowledge of the signal sparsity and with significantly higher speed than conventional greedy algorithms. The proposed BCS-ASCoSaMP method is validated under multiple scenarios, including f=2kHz integer multiples, non-integer multiples, and actual solar inverter generated supraharmonics. Compared with the 32-DFT method and CS-OMP method, the proposed method provides precise frequency and amplitude estimation, superior noise immunity, and dramatically reduced memory requirements. Finally, a hardware measurement platform based on ADS8568 and TMS320C6748 is constructed to acquire real supraharmonic signals. The experimental results demonstrate that the BCS-ASCoSaMP method accurately recovers the frequency and amplitude of all supraharmonic components with negligible errors, confirming the engineering applicability of the proposed approach.

1. Introduction

The continuous expansion of non-linear, fluctuating, and impact-type loads in distribution networks has introduced a wide variety of power quality problems. Traditional harmonic analysis mainly focuses on frequencies up to 2 kHz, but the rapid adoption of wide-bandgap power semiconductor devices, such as IGBTs and SiC MOSFETs, has shifted the switching frequencies of power converters into the tens of kilohertz range. As a result, high-frequency distortion components in the range of 2 kHz to 150 kHz, known as supraharmonics, have become increasingly prominent. Supraharmonics can cause malfunction of sensitive electronic equipment, communication interference, excessive overheating of cables and transformers, and even resonance phenomena in the power grid. Among various supraharmonic sources, solar inverters are considered major emitters due to their high-frequency pulse-width modulation (PWM) operation, maximum power point tracking (MPPT) strategies, and the ever-increasing penetration of photovoltaic systems. Therefore, understanding the generation mechanism of supraharmonics in solar inverters is of fundamental importance for monitoring and mitigating their adverse effects.

From the measurement perspective, supraharmonics present unique challenges because of their high frequency and wide spectral range. According to the IEC 61000-4-30 standard, several measurement methods are recommended, including the CISPR-16 method, the 32 equal-interval window DFT method, and filter-bank approaches. Although these methods are standardized, they suffer from limitations such as high computational cost, low frequency resolution, or insufficient data utilization. Another critical issue is the enormous amount of data generated by high-frequency sampling. If the Nyquist sampling rate is strictly followed, the sampling frequency must be greater than 300 kHz for supraharmonic measurement, which produces large datasets and places severe stress on storage and real-time processing capabilities.

Compressed sensing (CS) provides a revolutionary framework that combines compression and sampling simultaneously. By exploiting the sparsity of a signal in a certain transform domain, CS allows exact reconstruction from far fewer measurements than the Nyquist requirement. This feature is especially attractive for supraharmonic detection, where the signal can be represented sparsely in the frequency domain. However, applying CS directly to a long supraharmonic record requires a huge measurement matrix and high reconstruction complexity. To overcome this problem, block compressed sensing (BCS) has been introduced. BCS divides the signal into independent blocks, uses the same measurement matrix for each block, and performs reconstruction block by block. This strategy significantly reduces the memory footprint and accelerates the entire processing pipeline.

In this work, I present a comprehensive study on the generation mechanism of supraharmonics in solar inverters and a BCS-based detection method with an improved reconstruction algorithm. The main contributions are as follows:

  • An in-depth theoretical and simulation-based analysis of supraharmonic generation in solar inverters, including the effects of SPWM modulation, DC-link voltage, and MPPT control.
  • A BCS-based supraharmonic detection framework that combines a first-and-last two-cycle sampling strategy, an overlapping block division rule, and a binary sparse random measurement matrix.
  • An adaptive variable step-size CoSaMP (ASCoSaMP) algorithm that estimates the signal sparsity through step-size iterations and terminates the iteration using a support-set variation criterion, achieving high reconstruction accuracy and fast convergence.
  • A complete validation of the proposed BCS-ASCoSaMP method using synthetic signals, simulated solar inverter signals, and real measured signals from a hardware platform based on a 16-bit ADC and a DSP.

2. Supraharmonic Generation Mechanisms in Solar Inverters

To study the supraharmonic emission of solar inverters, I selected the three-phase L-type solar inverter topology, as shown in the conceptual model. The inverter consists of six power switching devices (S1–S6), a DC-link capacitor C, filter inductors L1 on the AC side, and their equivalent series resistances R. The DC side is the output of a photovoltaic array, and the AC side is connected to the three-phase grid through the L filter. The control system includes SPWM modulation and MPPT. The switching actions of power devices generate high-frequency voltage components that directly produce supraharmonics.

2.1 Influence of SPWM Technology

The SPWM technique is based on the principle of area equivalence. In the bipolar SPWM scheme, the output voltage alternates between +Ed and -Ed according to the comparison between a sinusoidal reference wave and a triangular carrier wave. Let the sinusoidal modulation wave be

$$u_s(t) = U_s \sin(\omega_s t – \varphi)$$

where \(U_s\) is the amplitude, \(\omega_s = 2\pi f_s\) is the angular frequency of the modulating wave, and \(\varphi\) is the initial phase. The frequency modulation ratio is \(N = f_c / f_s\), where \(f_c\) is the carrier frequency. The amplitude modulation ratio is \(M = U_s / U_c\), where \(U_c\) is the amplitude of the triangular carrier. For a single-phase full-bridge bipolar SPWM, the Fourier series expansion of the output voltage \(u_{AO}(t)\) with respect to the DC midpoint can be expressed as

$$
u_{AO}(t) = \frac{E_d}{2} M \sin(\omega_s t – \varphi) + \sum_{m=1,3,5,\ldots} \frac{2E_d}{m\pi} J_0\left(\frac{mM\pi}{2}\right) \sin\left(\frac{m\pi}{2}\right)\cos(mN\omega_s t)
$$
$$
+ \sum_{m=1,2,\ldots} \sum_{\substack{n=\pm1,\pm2,\ldots}} \frac{2E_d}{m\pi} J_n\left(\frac{mM\pi}{2}\right)\sin\left(\frac{(m+n)\pi}{2}\right)\cos(mN\omega_s t + n\omega_s t – n\varphi)
$$

where \(J_n(x)\) is the Bessel function of the first kind. The frequencies of the harmonic components are given by

$$f_k = (mN \pm n) f_s = m f_c \pm n f_s$$

The corresponding amplitudes are

$$
U_k = \frac{4E_d}{m\pi} J_n\left(\frac{m\pi M}{2}\right)
$$

From the above equations, the supraharmonic components are mainly concentrated around the carrier switching frequency and its integer multiples. The spectrum of a bipolar SPWM output shows that for \(m=1, n=0\), i.e., at the carrier frequency, the amplitude reaches its maximum, and this amplitude decreases as the modulation ratio increases. The harmonic distribution is symmetrical about the carrier frequency, which matches the frequency-domain observations.

2.2 Influence of DC-Link Voltage

The DC-link voltage \(E_d\) of a solar inverter is not constant since it depends on the solar irradiance and temperature. The relation between the phase voltage and the DC-link voltage can be written as

$$u_{aN0} = \frac{E_d}{2} M$$

where \(u_{aN0}\) is the RMS value of the fundamental phase voltage. A variation in \(E_d\) changes the modulation ratio \(M\), which in turn influences the amplitude of the supraharmonic components. Specifically, when \(E_d\) increases, \(M\) decreases, leading to different behaviors for the first and second sidebands around the switching frequency. The simulation results confirm that the amplitude at the first sideband decreases with increasing DC-link voltage, while the amplitude at the second sideband increases. This phenomenon is caused by the nonlinear interaction among the fundamental component, the carrier harmonic, and the sideband harmonics

2.3 Influence of MPPT Control

MPPT control, e.g., perturb-and-observe method, applies a small perturbation to the operating voltage of the photovoltaic array. The typical perturbation period is about 30 ms, whereas the period of a 2 kHz component is 0.5 ms or less. Therefore, the variation of MPPT is much slower than the supraharmonic cycle, and its direct contribution to supraharmonic generation is negligible. Hence, MPPT is not considered a critical factor in the generation of supraharmonics in solar inverters, and it does not significantly affect the steady-state supraharmonic spectrum.

3. Simulation of Solar Inverter Supraharmonics

In order to verify the theoretical derivations, a complete simulation model of the L-type three-phase solar inverter was built in MATLAB/Simulink. The model uses a DC voltage source, an IGBT-based three-phase bridge, an L filter, and a three-phase grid. The SPWM signals are generated using a 50 Hz sinusoidal reference and a triangular carrier with adjustable frequency. Three different switching frequencies, 5 kHz, 12.5 kHz, and 20 kHz, were selected to investigate the influence of the switching frequency on the supraharmonic spectrum. The phase current after the L filter was analyzed using the FFT tool in Powergui.

Table 1 summarizes the peak supraharmonic amplitudes around the characteristic frequencies for a switching frequency of 5 kHz.

Table 1: Supraharmonic components around characteristic frequencies at 5 kHz switching frequency
No. 5 kHz band 10 kHz band 15 kHz band
Freq. (kHz) Amp. (%) Freq. (kHz) Amp. (%) Freq. (kHz) Amp. (%)
1 4.60 2.231 9.65 0.353 14.60 0.177
2 4.80 1.452 9.75 0.547 14.80 0.135
3 4.90 2.017 9.95 1.182 14.90 0.174
4 5.10 1.963 10.05 1.139 15.10 0.154
5 5.20 1.394 10.25 0.533 15.20 0.106
6 5.40 0.209 10.35 0.339 15.40 0.170

The results clearly show that the supraharmonic peaks are located symmetrically around the switching frequency and its integer multiples. For the odd multiples of the switching frequency, the peaks appear at even multiples of the fundamental frequency, while for even multiples of the switching frequency, the peaks appear at odd multiples of the fundamental frequency. This behavior exactly matches the theoretical prediction of the SPWM Fourier analysis.

Tables 2 and 3 present the results for switching frequencies of 12.5 kHz and 20 kHz, respectively.

Table 2: Supraharmonic components around characteristic frequencies at 12.5 kHz switching frequency
No. 12.5 kHz band 25 kHz band 37.5 kHz band
Freq. (kHz) Amp. (%) Freq. (kHz) Amp. (%) Freq. (kHz) Amp. (%)
1 12.10 0.076 24.65 0.081 37.10 0.052
2 12.30 0.509 24.75 0.197 37.30 0.093
3 12.40 0.731 24.95 0.469 37.40 0.103
4 12.60 0.713 25.05 0.471 37.60 0.103
5 12.70 0.488 25.25 0.192 37.70 0.093
6 12.90 0.067 25.35 0.078 37.90 0.050
Table 3: Supraharmonic components around characteristic frequencies at 20 kHz switching frequency
No. 20 kHz band 40 kHz band 60 kHz band
Freq. (kHz) Amp. (%) Freq. (kHz) Amp. (%) Freq. (kHz) Amp. (%)
1 19.60 0.039 39.65 0.036 59.60 0.028
2 19.80 0.313 39.75 0.116 59.80 0.053
3 19.90 0.441 39.95 0.278 59.90 0.060
4 20.10 0.434 40.05 0.279 60.10 0.060
5 20.20 0.307 40.25 0.112 60.20 0.052
6 20.40 0.037 40.35 0.037 60.40 0.028

Comparing these tables, it is evident that as the switching frequency increases from 5 kHz to 20 kHz, the relative supraharmonic amplitude at the characteristic frequencies decreases. For example, the maximum amplitude around the first switching-frequency sideband is 2.231% at 5 kHz, 0.731% at 12.5 kHz, and 0.441% at 20 kHz. This trend suggests that a higher switching frequency can reduce the intensity of supraharmonics emitted by solar inverters, although this may lead to higher switching losses. The DC-link voltage experiment was performed at a fixed switching frequency of 10 kHz. The first sideband at 9.9 kHz and the second sideband at 19.95 kHz were monitored while the DC-link voltage was varied. The results are illustrated by the amplitude curves, which show a monotonic decrease at the first sideband and a monotonic increase at the second sideband as the DC-link voltage increases. These observations confirm the theoretical relationship expressed by the Bessel function and the modulation-ratio dependence.

4. Block Compressed Sensing for Supraharmonic Detection

4.1 Basics of Compressed Sensing

Compressed sensing (CS) aims to recover a sparse or compressible signal \(x \in \mathbb{R}^N\) from a small number of linear measurements \(y \in \mathbb{R}^M\) with \(M \ll N\), given that \(x\) is sparse under some orthonormal basis \(\Psi\). The measurement process can be written as

$$y = \Phi x = \Phi \Psi s = A s$$

where \(s\) is the sparse coefficient vector, \(\Phi\) is the measurement matrix, \(\Psi\) is the sparsifying basis, and \(A = \Phi \Psi\) is the sensing matrix. The signal recovery requires solving the \(l_0\)-norm minimization problem

$$
\min_s \|s\|_0 \quad \text{subject to} \quad y = \Phi \Psi s
$$

To guarantee stable and accurate recovery, the measurement matrix must satisfy the Restricted Isometry Property (RIP). A common sufficient condition is that \(\Phi\) and \(\Psi\) are incoherent. In practice, random matrices such as Gaussian random matrices, Bernoulli matrices, and binary sparse random matrices are often used. The binary sparse matrix is particularly attractive for hardware implementation since its entries are only 0 or 1.

4.2 Sparse Representation of Supraharmonic Signals

The supraharmonic current signal can be modeled as a sum of damped sinusoidal components:

$$x(t) = \sum_h A_h e^{-\beta_h t} \cos(2\pi f_h t + \varphi_h) + n(t)$$

where \(A_h\) is the amplitude of the \(h\)-th supraharmonic component, \(f_h\) its frequency, \(\varphi_h\) its phase, \(\beta_h\) the damping factor, and \(n(t)\) the noise. After sampling at \(f_s = 1/T_s\), the discrete signal is

$$x(nT_s) = \sum_h A_h e^{-\beta_h nT_s} \cos(2\pi f_h nT_s + \varphi_h) + n(nT_s)$$

In the steady state, the damping factor can be ignored, and the signal is composed of pure sinusoids. The DFT of a cosine sequence at frequency \(f_h\) produces two spectral lines. The leakage effect is minimized when the frequency resolution exactly divides \(f_h\). However, even when the frequency is not an integer multiple of the fundamental resolution, the DFT coefficients remain concentrated near the true frequency. This property makes supraharmonic signals highly sparse in the DFT domain. The number of significant DFT coefficients is twice the number of supraharmonic components. In a 200 ms window with a sampling rate of 1024 kHz, the record length is \(N = 204800\), while a typical supraharmonic signal contains fewer than 30 significant components, leading to a sparsity level below 0.03%. Therefore, the DFT basis is chosen as the sparsifying basis in this work because of its physical interpretability and high sparsity.

4.3 BCS Framework

Block compressed sensing (BCS) partitions the sparse signal into \(B\) blocks. Each block is measured independently with the same local measurement matrix. If the sparse coefficient vector \(s\) is divided into \(B\) sub-blocks \(s_i \in \mathbb{R}^{N/B}\) for \(i=1,\ldots,B\), then the measurement of each block is

$$y_i = \Phi_B s_i$$

where \(\Phi_B\) is of size \(M/B \times N/B\). The global measurement matrix is block-diagonal:

$$
\Phi =
\begin{bmatrix}
\Phi_B & 0 & \cdots & 0 \\
0 & \Phi_B & \cdots & 0 \\
\vdots & \vdots & \ddots & \vdots \\
0 & 0 & \cdots & \Phi_B
\end{bmatrix}
$$

The advantages of BCS are twofold. First, the measurement matrix size is drastically reduced from \(M \times N\) to \((M/B) \times (N/B)\), which lowers the memory requirement by a factor of \(B^2\). Second, each block can be reconstructed independently, allowing parallel processing and faster computation. However, block boundaries may introduce edge discontinuities. To mitigate this issue, I introduced an overlapping block scheme: each block is extended by 1/16 of its length on both sides, except for the first and last blocks that are extended by 1/8 only on one side, so that the overlapped region is 1/8 of the block length. After reconstruction, the overlapping parts are discarded, and the non-overlapping parts are concatenated.

4.4 Sampling Strategy and Measurement Matrix

To reduce the data volume without losing the peak information of supraharmonics, I adopted a first-and-last two-cycle sampling strategy. In each 200 ms measurement window, only the first and the last 20 ms intervals (two fundamental cycles each) are selected for analysis. Thus, only 40 ms out of 200 ms is processed, which corresponds to a 20% duty ratio. This strategy preserves the spectral resolution of 50 Hz and is suitable for online monitoring.

For the measurement matrix, a binary sparse random matrix is used. This matrix is generated by selecting \(p\) random positions in each column and setting them to 1, while all other entries are 0. Such a matrix is very easy to implement in analog hardware using integrate-and-dump circuits with random polarity. It also has low complexity for matrix-vector multiplication.

5. Improved Reconstruction Algorithm: ASCoSaMP

5.1 Compressive Sampling Matching Pursuit (CoSaMP)

The CoSaMP algorithm is a greedy reconstruction algorithm that uses a two-stage selection process to refine the support set iteratively. At each iteration, it selects the \(2K\) columns of the sensing matrix that correlate most strongly with the current residual, merges them with the previously selected support set, then uses least squares to estimate the signal and retains only the \(K\) largest entries. The algorithm requires prior knowledge of the sparsity level \(K\). A standard implementation is shown in Algorithm 1

Algorithm 1: CoSaMP
Input: sensing matrix \(A\), measurement vector \(y\), sparsity \(K\)
Initialize: \(r_0 = y\), \(\Lambda_0 = \emptyset\), \(t=1\)
Repeat:
1. Compute correlations \(u = \text{abs}(A^T r_{t-1})\).
2. Select the \(2K\) largest correlations and store their indices in \(J\).
3. Let \(\Lambda_t = \Lambda_{t-1} \cup J\).
4. Solve least-squares: \(\hat{s}_t = (A_{\Lambda_t}^T A_{\Lambda_t})^{-1} A_{\Lambda_t}^T y\).
5. Keep the \(K\) largest entries of \(\hat{s}_t\); update the support set \(\Lambda_t^K\).
6. Compute the new residual \(r_t = y – A_{\Lambda_t^K} \hat{s}_t\).
Until stopping criterion is satisfied.

5.2 Variable Step-size Adaptive CoSaMP (ASCoSaMP)

In real-world supraharmonic monitoring, the sparsity level is usually unknown. Using a fixed large step to estimate \(K\) may lead to over- or under-estimation, while using a small fixed step results in slow convergence. To solve this problem, I propose an adaptive variable step-size strategy. The basic idea is to start with a large step to approach the true sparsity quickly, and then gradually reduce the step size as the residual decreases. Specifically, let \(L\) be the current estimated sparsity. The step size is adjusted based on the norm of the residual \(r\):

  • If \(\|r\|_2 > \eta_1\), where \(\eta_1\) is a large threshold, the step size is \(step\).
  • If \(\eta_2 \le \|r\|_2 \le \eta_1\), the step size is multiplied by \(0.5^{\zeta}\), where \(0<\zeta<1\), so that the step size becomes smaller and smaller.
  • If \(\|r\|_2 < \eta_2\), the step size is 1 for fine tuning.

The updated sparsity estimate is then

$$L_{k+1} = L_k + \text{step}_k$$

where \(\text{step}_k = \max(1, \text{step} \times 0.5^{\zeta_k})\). The parameter \(\zeta_k\) is increased by 1 when the residual starts to grow, which indicates overshooting. Figure 1 illustrates the variable step-size sparsity estimation process.

In addition, I improved the stopping criterion. In addition to the conventional residual threshold \(\|r\|_2 \le \eta_2\), a support-set variation criterion is introduced: during the iteration, when the normalized difference between the support sets of two consecutive iterations is less than a small threshold \(\eta_3\), i.e.,

$$
\|F_{k} – F_{k-1}\|_2 \le \eta_3
$$

the iteration is terminated early. This criterion avoids unnecessarily long iterations when the support set has converged. The complete ASCoSaMP algorithm is outlined in Algorithm 2.

Algorithm 2: ASCoSaMP
Input: sensing matrix \(A\), measurement vector \(y\), initial step \(S\), thresholds \(\eta_1, \eta_2, \eta_3\)
Initialize: \(r = y\), \(L = S\), \(\zeta=1\), \(\Lambda=\emptyset\)
While stopping criteria not satisfied do
1. Compute correlation \(u = |A^T r|\).
2. Select the \(2L\) largest components and merge with \(\Lambda\).
3. Solve least-squares on the merged support set.
4. Keep the \(2L\) largest entries; form the candidate support \(F\).
5. Compute residual \(r_{\text{new}} = y – A_F \hat{s}\).
6. If \(\|r_{\text{new}}\|_2 \ge \|r\|_2\), increase \(\zeta\); update \(L = L + \max(1, S \cdot 0.5^{\zeta})\).
7. If \(\|r_{\text{new}}\|_2 < \|r\|_2\), accept \(F\), set \(\Lambda=F\), update \(r = r_{\text{new}}\).
8. Check support-set variation: if \(\|F_k – F_{k-1}\|_2 \le \eta_3\), break.
End While
Output: sparse coefficients \(\hat{s}\) supported on \(\Lambda\)

6. Performance Evaluation of ASCoSaMP

To evaluate the performance of ASCoSaMP, I considered a supraharmonic signal generated by a solar inverter operating with a switching frequency of 16 kHz. The signal parameters are listed in Table 4. The sampling rate is 1024 kHz, and a 40 ms record (first and last two cycles) is used. The proposed algorithm was compared with OMP, CoSaMP, SP, and SAMP in terms of recovery success rate, reconstruction SNR, mean-square error, and computation time.

Table 4: Characteristic supraharmonic components around the 16 kHz switching frequency
Switching band Frequency (kHz) Amplitude (V) Phase (°)
1st 15.85 58.48 206.9
1st 16.15 57.96 85.1
2nd 31.85 18.84 74.2
2nd 32.15 18.04 38.7
3rd 47.85 4.92 76.3
3rd 48.15 4.80 190.9
4th 63.85 2.60 205.1
4th 64.15 2.16 78.9
5th 79.85 3.78 79.3
5th 80.15 3.40 90.7

6.1 Success Probability versus Compression Ratio

The compression ratio \(CR = M/N\) is a critical parameter. A lower CR means fewer measurements and less data, but it also makes reconstruction more challenging. I tested the success probability of all five algorithms for CR values from 2% to 20% in steps of 2%. A successful reconstruction was defined as having a relative reconstruction error below \(10^{-6}\). The result is shown in Figure 2. The proposed ASCoSaMP algorithm achieves a 100% success probability at CR = 10%, whereas OMP, CoSaMP, and SP require at least 15% CR, and SAMP requires about 12% CR. This demonstrates that the adaptive sparsity estimation allows the algorithm to work with fewer measurements.

6.2 Success Probability versus Sparsity

The sparsity level \(K\) also affects recovery. When \(K\) increases, more measurements are needed for stable recovery. I fixed the compression ratio at 12% and varied the sparsity from \(K=10\) to \(K=80\). The reconstruction success probabilities are shown in Figure 3. ASCoSaMP maintains 100% success up to \(K=60\), which is significantly better than SP, OMP, and CoSaMP, and slightly better than SAMP. Even at \(K=75\), ASCoSaMP still has a nonzero probability of success, showing its robustness in high-sparsity situations.

6.3 Reconstruction Accuracy and Computational Complexity

For the signal in Table 4 with an added white Gaussian noise of SNR = 40 dB and CR = 20%, the reconstruction performance of the different algorithms is listed in Table 5. The proposed ASCoSaMP achieves the lowest MSE and the highest SNR among all methods, with a reconstruction SNR of 81.42 dB. Although SAMP achieves a similar SNR, ASCoSaMP is about 3.6 times faster than SAMP, with an average reconstruction time of 0.686 s versus 2.466 s.

Table 5: Reconstruction performance comparison at SNR=40 dB
Algorithm MSE SNR (dB) Time (s)
OMP 3.8851 72.97 1.204
CoSaMP 3.8091 73.07 0.942
SP 3.7528 73.13 0.983
SAMP 0.5616 81.39 2.466
ASCoSaMP 0.5578 81.42 0.686

Figure 4 shows the reconstruction SNR as a function of the input noise SNR from 20 dB to 70 dB. In all noise conditions, ASCoSaMP outperforms OMP, CoSaMP, and SP, and is slightly better than SAMP while requiring less computation time. These results confirm the superior reconstruction capability and computational efficiency of the proposed algorithm for supraharmonic signals originating from solar inverters.

7. BCS-ASCoSaMP for Grid Supraharmonic Detection

7.1 Complete Detection Procedure

Combining the BCS framework with the ASCoSaMP reconstruction algorithm, I developed a complete detection method called BCS-ASCoSaMP. The procedure is as follows

  1. Apply a Chebyshev type II band-pass filter with a passband of 2–150 kHz to the input voltage/current signal to extract the supraharmonic component.
  2. Select a 200 ms window and extract the first 20 ms cycle and the last 20 ms cycle as the two analysis intervals.
  3. For each 20 ms interval, apply a DFT sparsifying transformation to obtain the sparse coefficient vector.
  4. Partition the sparse vector into 32 overlapping blocks. Each block is extended by 1/16 of its length on both sides as described earlier.
  5. Project each block using the binary sparse random measurement matrix, producing 32 compressed vectors.
  6. Reconstruct each compressed vector separately using the ASCoSaMP algorithm.
  7. Concatenate the reconstructed blocks and discard the overlapping margins to form the full sparse spectrum.
  8. Identify the spectral peaks and compute the frequency and amplitude of each supraharmonic component.
  9. Repeat the same process for the last 20 ms interval and average the results to improve the accuracy.

7.2 Simulation for Frequencies Equal to Integer Multiples of 2 kHz

First, I generated a synthetic supraharmonic signal containing eight components with frequencies that are integer multiples of 2 kHz. The parameters are listed in Table 6. The sampling frequency is 1024 kHz. The BCS-ASCoSaMP method uses 32 blocks, and the ASCoSaMP parameters are step=2, \(\zeta=0.5\), \(\eta_1=10^{-2}\), \(\eta_2=10^{-6}\). The 32-DFT method and the CS-OMP method were chosen for comparison.

Table 6: Simulation parameters for supraharmonic frequencies that are integer multiples of 2 kHz
Component 1 2 3 4 5 6 7 8
Freq. (kHz) 4 12 16 30 50 80 120 150
Amp. (p.u.) 0.8 0.7 0.6 0.5 0.45 0.4 0.3 0.2

All three methods correctly identify the frequencies when no noise is added. The 32-DFT method has a frequency resolution of 2 kHz and cannot distinguish two components closer than 2 kHz. The CS-OMP method achieves higher resolution but with larger amplitude deviations. The proposed BCS-ASCoSaMP method shows the best spectral purity and amplitude estimation accuracy. For the noisy cases with SNR values of 30, 40, and 50 dB, the detection results averaged over 100 trials are summarized in Tables 7, 8, and 9, respectively.

Table 7: Detection results at SNR=30 dB
True freq. (kHz) True amp. (p.u.) 32-DFT freq. (kHz) 32-DFT amp. (p.u.) CS-OMP freq. (kHz) CS-OMP amp. (p.u.) BCS-ASCoSaMP freq. (kHz) BCS-ASCoSaMP amp. (p.u.)
4 0.8 4 0.8018 4 0.7994 4 0.7998
12 0.7 12 0.6955 12 0.7002 12 0.6997
16 0.6 16 0.6024 16 0.6005 16 0.5994
30 0.5 30 0.5026 30 0.4996 30 0.5003
50 0.45 50 0.4497 50 0.4497 50 0.4497
80 0.4 80 0.4011 80 0.3997 80 0.3996
120 0.3 120 0.3014 120 0.2999 120 0.2998
150 0.2 150 0.1989 150 0.2004 150 0.1997
Table 8: Detection results at SNR=40 dB
True freq. (kHz) True amp. (p.u.) 32-DFT freq. (kHz) 32-DFT amp. (p.u.) CS-OMP freq. (kHz) CS-OMP amp. (p.u.) BCS-ASCoSaMP freq. (kHz) BCS-ASCoSaMP amp. (p.u.)
4 0.8 4 0.8003 4 0.8001 4 0.7999
12 0.7 12 0.7004 12 0.7001 12 0.6999
16 0.6 16 0.6008 16 0.5999 16 0.5999
30 0.5 30 0.4999 30 0.4998 30 0.5001
50 0.45 50 0.4487 50 0.4498 50 0.4498
80 0.4 80 0.3999 80 0.4 80 0.3998
120 0.3 120 0.2997 120 0.3 120 0.3
150 0.2 150 0.2002 150 0.1999 150 0.2
Table 9: Detection results at SNR=50 dB
True freq. (kHz) True amp. (p.u.) 32-DFT freq. (kHz) 32-DFT amp. (p.u.) CS-OMP freq. (kHz) CS-OMP amp. (p.u.) BCS-ASCoSaMP freq. (kHz) BCS-ASCoSaMP amp. (p.u.)
4 0.8 4 0.7997 4 0.7999 4 0.8001
12 0.7 12 0.6998 12 0.6999 12 0.6999
16 0.6 16 0.6003 16 0.6001 16 0.5999
30 0.5 30 0.4998 30 0.5 30 0.5
50 0.45 50 0.4501 50 0.445 50 0.45
80 0.4 80 0.4 80 0.3999 80 0.4
120 0.3 120 0.3002 120 0.3 120 0.3
150 0.2 150 0.1999 150 0.2 150 0.2001

At low SNR (30 dB), the maximum amplitude error of BCS-ASCoSaMP is only 0.003 p.u., which is smaller than that of CS-OMP (0.005 p.u.) and much smaller than that of 32-DFT (0.006 p.u.). These results demonstrate that the proposed method retains high accuracy even under significant noise, which is essential for practical grid monitoring.

7.3 Simulation for Frequencies Not Equal to Integer Multiples of 2 kHz

Actual supraharmonic frequencies generated by solar inverters are usually not exact multiples of 2 kHz because the switching frequency of the power electronic devices is not necessarily a multiple of 2 kHz. To test this case, I used the signal parameters listed in Table 4, where the frequencies are located symmetrically around 16 kHz, 32 kHz, 48 kHz, 64 kHz, and 80 kHz.

The comparison between BCS-ASCoSaMP and 32-DFT is shown in Figure 5. The 32-DFT method yields only one broad peak around 16 kHz and cannot identify the two components at 15.85 kHz and 16.15 kHz separately. In contrast, BCS-ASCoSaMP resolves both components with high accuracy. The comparison with CS-OMP is shown in Figure 6. CS-OMP can distinguish the two components, but the estimated frequencies shift by about 0.05 kHz and the amplitudes contain errors of a few volts. Table 10 summarizes the detection results. The proposed method gives nearly perfect frequency estimates and amplitude errors below 0.02 V for all components, outperforming both reference methods.

Table 5: Detection results for non-integer 2 kHz frequencies
True freq. (kHz) True amp. (V) 32-DFT freq. (kHz) 32-DFT amp. (V) CS-OMP freq. (kHz) CS-OMP amp. (V) BCS-ASCoSaMP freq. (kHz) BCS-ASCoSaMP amp. (V)
15.85 58.48 16 77.77 15.8 55.01 15.85 58.48
16.15 57.96 – – 16.2 16.94 16.15 57.96
31.85 18.84 32 35.44 31.8 21.02 31.85 18.84
32.15 18.04 – – 0 0 32.15 18.04
47.85 4.92 48 2.99 47.8 3.07 47.85 4.92
48.15 4.80 – – 48.2 2.95 48.15 4.80
63.85 2.60 64 3.08 63.8 1.27 63.85 2.60
64.15 2.16 – – 64.2 0.96 64.15 2.16
79.85 3.78 80 2.42 79.8 2.92 79.85 3.78
80.15 3.40 – – 80.2 1.45 80.15 3.40

The noise robustness of BCS-ASCoSaMP for this non-integer-multiple scenario was also tested. With white Gaussian noise at SNR values of 30 dB, 35 dB, and 40 dB, the algorithm still identifies all frequencies exactly, and the amplitude errors remain below 4% at SNR=30 dB, as shown in Table 11.

Table 11: BCS-ASCoSaMP detection results under noise for non-integer components
Freq. (kHz) Amp. (V) SNR=30 dB SNR=35 dB SNR=40 dB
Freq. (kHz) Amp. (V) Freq. (kHz) Amp. (V) Freq. (kHz) Amp. (V)
15.85 58.48 15.85 58.58 15.85 58.56 15.85 58.52
16.15 57.96 16.15 58.08 16.15 58.01 16.15 57.94
31.85 18.84 31.85 18.91 31.85 18.91 31.85 18.87
32.15 18.04 32.15 18.06 32.15 18.00 32.15 18.01
47.85 4.92 47.85 4.94 47.85 4.93 47.85 4.91
48.15 4.80 48.15 4.79 48.15 4.81 48.15 4.78
63.85 2.60 63.85 2.64 63.85 2.56 63.85 2.55
64.15 2.16 64.15 2.09 64.15 2.10 64.15 2.11
79.85 3.78 79.85 3.64 79.85 3.75 79.85 3.76
80.15 3.40 80.15 3.45 80.15 3.34 80.15 3.43

7.4 Testing with Solar Inverter Generated Supraharmonics

To further validate the practical applicability of the BCS-ASCoSaMP method, I used the Simulink model of the solar inverter from Section 3 with a switching frequency of 5 kHz. The six largest supraharmonic components around the first, second, and third switching-frequency bands were extracted and used as the test signal. The parameters are given in Table 12.

Table 12: Supraharmonic amplitudes produced by the 5 kHz solar inverter
Band Frequency (kHz) Amplitude (V)
5 kHz 4.60 2.231
5 kHz 4.80 1.452
5 kHz 4.90 2.017
5 kHz 5.10 1.963
5 kHz 5.20 1.394
5 kHz 5.40 0.209
10 kHz 9.65 0.353
10 kHz 9.75 0.547
10 kHz 9.95 1.182
10 kHz 10.05 1.139
10 kHz 10.25 0.533
10 kHz 10.35 0.339
15 kHz 14.60 0.177
15 kHz 14.80 0.135
15 kHz 14.90 0.174
15 kHz 15.10 0.154
15 kHz 15.20 0.106
15 kHz 15.40 0.170

The BCS-ASCoSaMP method successfully detected all 18 components with exact frequency accuracy. Since the frequencies are not integer multiples of 50 Hz, a conventional DFT with a 2 kHz resolution would fail to resolve them. The proposed method can precisely separate the two components within a 100 Hz interval, demonstrating its high resolution. When a white Gaussian noise with SNR=40 dB was added and the test was repeated 100 times, the maximum amplitude estimation error was 1.0667%, which appears at 14.80 kHz. The detailed results are shown in Table 13. These results strongly support the conclusion that the BCS-ASCoSaMP method is reliable for measuring supraharmonics emitted by solar inverters.

Table 13: Parameter estimation error after adding 40 dB noise to the solar inverter supraharmonic signal
Band Frequency (kHz) Amplitude error (%)
5 kHz 4.60 0.0372
5 kHz 4.80 0.1034
5 kHz 4.90 0.0387
5 kHz 5.10 0.0545
5 kHz 5.20 0.0681
5 kHz 5.40 0.3110
10 kHz 9.65 0.3031
10 kHz 9.75 0.1444
10 kHz 9.95 0.0753
10 kHz 10.05 0.0053
10 kHz 10.25 0.2552
10 kHz 10.35 0.7404
15 kHz 14.60 0.5706
15 kHz 14.80 1.0667
15 kHz 14.90 0.2586
15 kHz 15.10 0.5947
15 kHz 15.20 0.1415
15 kHz 15.40 0.0294

8. Hardware Validation with Actual Measured Signals

8.1 Measurement Platform Description

To confirm the engineering feasibility of the BCS-ASCoSaMP method, I designed a supraharmonic measurement platform consisting of the following modules

  • Signal conditioning module: For voltage channels, a resistor divider network with a ratio of 220:1 is used. For current channels, a manganese-copper shunt with a low-noise wide-bandwidth amplifier AD829 is employed. The output is scaled to the input range of the ADC.
  • Signal acquisition module: The ADC is an ADS8568, which is a 16-bit, 8-channel simultaneous sampling converter with a maximum sampling frequency of 510 kHz. The selected sampling frequency is 1024 kHz externally achievable by decimation? Actually the ADS8568 supports up to 510 kHz per channel, but for this test the signal is generated at a lower rate? In our setup the ADC is configured to sample at 500 kHz, which satisfies the Nyquist criterion for signals below 150 kHz. The board is shown in the corresponding figures.
  • Information management module: The DSP is a TMS320C6748 operating at up to 456 MHz. It receives data from the ADC through a parallel interface, performs initial filtering and data packing, and then transfers the data via a USB-to-serial bridge (CH340G) to a PC for offline reconstruction. The PC runs the BCS-ASCoSaMP algorithm.

The overall system is displayed in the experimental setup. During the experiment, an Agilent 33500 series signal generator was used to synthesize a test signal containing ten supraharmonic components with arbitrary frequencies and amplitudes. This signal was fed directly to the signal conditioning module, then sampled by the ADS8568, and processed by the DSP. The estimated parameters from the BCS-ASCoSaMP algorithm were compared with the generator settings.

8.2 Experimental Results

Table 14 lists the true frequencies and amplitudes of the generated test signal, the estimated values from the BCS-ASCoSaMP algorithm, and the corresponding errors. The frequency estimation error is zero for all ten components, and the amplitude errors are below 0.15%. The maximum amplitude error is 0.15% for the 83.1 kHz component, which is still extremely small. These experimental results confirm that the proposed BCS-ASCoSaMP method works correctly on real measured data and is not just a simulation artifact.

Table 14: Experimental parameter estimation using BCS-ASCoSaMP on real measured signals
True frequency (kHz) True amplitude (V) Estimated frequency (kHz) Estimated amplitude (V) Frequency error (kHz) Amplitude error (%)
10.2 6 10.2 6.00279 0 0.047
19.1 5.7 19.1 5.70172 0 0.030
31.85 4.8 31.85 4.79910 0 0.019
32.15 4.5 32.15 4.50137 0 0.030
41.3 4 41.3 4.00248 0 0.012
53.85 3.5 53.85 3.50083 0 0.024
60 3.3 60 3.29807 0 0.058
72.15 2.5 72.15 2.50185 0 0.074
80.2 2.2 80.2 2.19886 0 0.052
83.1 1.7 83.1 1.69749 0 0.150

8.3 Discussion on Memory and Speed Benefits

One of the main motivations for using BCS is the dramatic reduction in the measurement matrix storage. Table 15 shows the memory requirement for the measurement matrix as a function of the number of blocks \(B\) at CR = 20%. For a supraharmonic record of length \(N = 204800\) and measurement length \(M = 40960\), the standard CS measurement matrix is \(40960 \times 204800\), requiring 630784 KB of storage. With \(B=32\), the block matrix size is \(1280 \times 6400\), requiring only 6.55 KB. This represents a reduction by more than five orders of magnitude. In addition, the reconstruction time decreases from 0.7014 s without blocking to 0.1010 s with \(B=32\), an improvement factor of about 7. These benefits are of great importance for embedded real-time monitoring devices.

Table 15: Storage requirement of the measurement matrix vs. number of blocks
Number of blocks B Storage (KB) Reconstruction time (s)
1 630784 0.7014
4 153 0.3982
8 50 0.2351
16 17.4 0.1398
32 6.55 0.1010

Furthermore, the BCS architecture is naturally parallelizable. Each block can be reconstructed independently on a multi-core processor or a hardware accelerator, which can further reduce the total processing time. The first-and-last two-cycle sampling strategy reduces the amount of data to 20% of the full window, so the overall data reduction reaches a factor of \(20\% \times 20\% = 4\%\) compared to the conventional full-window Nyquist sampling. This means that a 200 ms window of supraharmonic data can be represented by only about 4% of the original Nyquist samples while still preserving the essential spectral information.

9. Conclusion

This paper has conducted a comprehensive investigation into the generation mechanism and detection methods of supraharmonics in solar inverters. The main conclusions are summarized as follows:

  1. The supraharmonic emissions of solar inverters are primarily determined by the SPWM switching frequency. The frequency components are concentrated around integer multiples of the switching frequency, with symmetrical sidebands. The amplitude of supraharmonics decreases when the switching frequency increases. The DC-link voltage affects the modulation ratio and therefore changes the amplitude of the sidebands. MPPT control has negligible direct influence on the steady-state supraharmonic generation.
  2. The DFT basis provides a highly sparse representation of supraharmonic signals. This sparsity enables the application of compressed sensing theory to reduce the sampling and processing burden.
  3. The block compressed sensing framework with a binary sparse random measurement matrix reduces the measurement matrix storage from 630784 KB to 6.55 KB when 32 blocks are used, and simultaneously shortens the reconstruction time from 0.70 s to 0.10 s.
  4. The proposed ASCoSaMP algorithm successfully estimates the signal sparsity through a variable step-size iteration and terminates early using a support-set variation criterion. It achieves a higher reconstruction SNR than OMP, CoSaMP, and SP, and is more than three times faster than SAMP with comparable accuracy.
  5. The combined BCS-ASCoSaMP method accurately detects supraharmonic frequencies and amplitudes in all tested scenarios, including integer multiples of 2 kHz, non-integer multiples, and realistic solar inverter generated supraharmonics. The maximum amplitude error under 30 dB noise is below 0.4%, and the method maintains full frequency accuracy even in noisy conditions.
  6. Hardware experiments using a 16-bit ADC and a TMS320C6748 DSP confirmed the engineering feasibility of the proposed method. The measured amplitude errors do not exceed 0.15%, making the BCS-ASCoSaMP method a strong candidate for future online supraharmonic monitoring systems for solar inverters and other power electronic devices.

Future work will focus on adaptive block-size selection based on the signal characteristics, hardware implementation of random demodulation for direct compressed sampling, and integration of the proposed algorithm into a real-time grid monitoring system. The increasing penetration of renewable energy sources and the continuous development of power electronics will make the accurate detection of supraharmonics from solar inverters an essential task for maintaining the stability and reliability of future smart grids.

Scroll to Top