1. Introduction
Harmonic distortion has become a persistent concern in low-voltage distribution systems due to the widespread use of power-electronic loads, such as switched-mode power supplies, LED drivers, inverter-based air-conditioning units, UPS systems, and variable-speed drives [
1,
2,
3]. These devices introduce current waveforms that are rich in harmonics, which can propagate through the grid and negatively impact the performance, efficiency, and lifespan of electrical components. To address these challenges, IEEE Std 519-2022 provides the main reference framework for limiting harmonic injection at the point of common coupling and for assessing acceptable distortion levels in practical power systems [
4,
5].
IEEE Std 519-2022 establishes recommended limits for both current and voltage harmonics at the point of common coupling (PCC) [
1,
2,
3], considering the system’s short-circuit capacity and load characteristics. It provides a structured framework for evaluating harmonic compliance and is widely adopted in the design and validation of mitigation strategies such as active power filters (APFs) and other power-quality enhancement techniques. Adherence to this standard is essential not only for reducing technical losses and equipment failures but also for supporting the integration of renewable energy sources and electronic loads in a stable and efficient manner. Recent studies have emphasized the importance of IEEE Std 519-2022 in assessing the harmonic behavior of real household and commercial loads, validating filter performance, and modeling nonlinear-load dynamics [
2,
3]. These works demonstrate that compliance with IEEE Std 519-2022 remains a key requirement in ensuring acceptable power quality, particularly in low-voltage distribution networks.
In recent years, the electrical demand profile of university buildings has changed substantially due to the growing presence of power-electronic and digitally controlled loads [
6,
7]. In addition to conventional lighting and motor-driven equipment, modern university buildings host a heterogeneous combination of computer laboratories, server rooms, inverter-driven HVAC units, UPS-backed systems, LED lighting, and elevator drives, many of which operate simultaneously within the same low-voltage network. These devices draw currents that do not mirror the sinusoidal voltage waveform, instead injecting harmonic components into the network. As a result, total harmonic distortion (THD) often exceeds acceptable limits, voltage unbalance appears, and problems such as transformer overheating, protective-relay nuisance trips, and degraded performance of sensitive instruments can become more frequent. For example, scanning electron microscopes (SEMs), transmission electron microscopes (TEMs), and mass spectrometers may experience degraded performance under distorted and unbalanced supply conditions.
Several investigations have quantified individual sources of distortion. For example, [
8,
9] demonstrated how analytical instruments produce high-order transient pulses, while [
6,
10,
11] showed that VVVF elevator drives introduce 5th–13th harmonic currents that can push THD above 30%. Likewise, inverter-driven air conditioners and heat pumps inject prominent 5th–11th current harmonics that increase total harmonic distortion; in low-voltage feeders, these single-phase loads contribute to voltage unbalance, while the resulting harmonic currents raise transformer losses and operating temperature, leading to thermal stress [
11,
12,
13,
14]. However, most of these studies focus either on individual load types or on isolated installations, leaving insufficient understanding of how heterogeneous nonlinear devices interact under real unbalanced operating conditions within the same three-phase building network.
Reliable evaluation of active power-filter performance in three-phase systems depends on load models that preserve not only harmonic content but also the phase-dependent waveform characteristics associated with real unbalanced operation. If these features are neglected, the resulting mitigation assessment may become overly optimistic, particularly when filter sizing and compensating current requirements are derived from balanced or synthetic load representations.
Measurements on switched-mode power supplies (SMPSs) show that magnitudes and phases of dominant harmonics drift with temperature, duty cycle, and operating mode; consequently, fixed-spectrum current-source surrogates tend to underestimate residual distortion once controllers are exercised across representative transients [
9]. For lighting, frequency-domain LED driver models identified from laboratory tests reproduce low-order odd harmonics and their phase displacement across driver topologies; including these models enables per-phase tuning of compensators and improves feeder-level predictions in corridors supplied by mixed single-phase circuits [
15]. Controller-hardware-in-the-loop (CHIL) studies that inject measured load signatures rather than idealized spectra consistently report lower robustness margins for shunt APFs, underscoring the need to validate under measured phase asymmetry and frequency-dependent source impedance [
16]. On the control side, the synchronous-reference-frame (SRF) formulation remains a reliable benchmark for compensation in distorted and unbalanced three-phase systems [
17]. However, strategies that appear equivalent under balanced sinusoidal mains diverge once asymmetries among phases are present [
18].
To address this gap, this paper proposes a measurement-driven phase-resolved workflow for representing unbalanced nonlinear loads in a real university building and for evaluating harmonic mitigation using representative load-specific operating conditions derived from field measurements. Representative nonlinear loads are measured in situ and embedded in MATLAB/Simulink (R2024b) [
19] as time-domain waveforms, allowing the resulting models to preserve harmonic content, waveform shape, and phase asymmetry without relying on balanced assumptions. Using these measured signatures, three voltage-source-inverter shunt active power filters (SAPFs) were dimensioned and evaluated in simulation to quantify achievable reductions in per-phase THD
I under representative operating conditions. The resulting workflow links field measurements, high-fidelity load representation, and mitigation assessment in a practical form that can be transferred to other low-voltage three-phase networks with heterogeneous nonlinear loads.
Unlike conventional APF/SAPF studies that rely on balanced assumptions or purely synthetic harmonic injections, the proposed approach embeds phase-resolved field waveforms directly into time-domain load models. This effectively creates a reusable load-signature test bench that supports benchmarking of filter sizing and controller design under realistic unbalance and harmonic spectra. Moreover, the same measured signatures can be reused to compare alternative inner-loop strategies (e.g., proportional–resonant (PR) control, model predictive control (MPC), and repetitive control) under identical conditions, enabling fair and reproducible controller evaluation.
A substantial body of literature has addressed harmonic mitigation in low-voltage systems through shunt active power filters (SAPFs), hybrid active power filters (HAPFs), and advanced control strategies. Several harmonic-mitigation techniques have been reported for nonlinear-load compensation in low-voltage distribution systems. Passive filters are commonly used because of their simple structure and relatively low implementation cost; however, their performance may be affected by detuning, resonance conditions, and changes in the operating point [
20,
21]. Hybrid filters combine passive and active compensation stages to extend filtering capability while reducing the converter rating required from the active stage [
21]. Shunt active power filters (SAPFs), in contrast, provide adaptive current compensation under varying load conditions and are widely used for harmonic-current mitigation in distorted and unbalanced three-phase systems [
20,
22,
23,
24,
25,
26]. In the present work, SAPF-based mitigation is used as an application case to evaluate the usefulness of the proposed phase-resolved load models under representative load-specific operating conditions. Several studies have investigated optimization-based controller tuning, predictive current control, and enhanced reference-current extraction methods, showing improved dynamic response and harmonic compensation under varying operating conditions [
22,
23,
24,
25,
26,
27]. These works have contributed significantly to the development of active filtering techniques, particularly from the perspective of controller design and compensation performance.
In parallel, intelligent methods based on artificial neural networks, recurrent neural networks, adaptive neuro-fuzzy inference systems, and other data-driven approaches have also been explored for harmonic detection, current prediction, and adaptive compensation [
28,
29,
30,
31,
32,
33]. In general, these studies report greater flexibility under nonlinear and time-varying conditions, especially when compared with conventional fixed-parameter control methods. This line of research has reinforced the potential of artificial intelligence tools for improving harmonic-mitigation performance in complex electrical environments.
Harmonic mitigation has also been examined in practical application domains where nonlinear loads are especially relevant, including hospitals, office buildings, lighting systems, electric-vehicle charging stations, and university facilities [
7,
34,
35,
36,
37,
38,
39,
40]. These studies confirm that active and hybrid filtering approaches can effectively reduce current distortion and improve power quality in real installations. They also highlight that modern buildings increasingly operate with a heterogeneous mixture of nonlinear loads, such as HVAC systems, UPS units, lighting circuits, electronic equipment, and variable-speed drives.
Despite these advances, much of the existing literature focuses primarily on controller performance, filter topology, or harmonic compensation in specific devices or installations. Fewer studies address the combined problem of representing real nonlinear loads from field measurements, preserving phase asymmetry in simulation, and using those load signatures for mitigation assessment in three-phase building networks. This limitation is relevant because simplified balanced models or synthetic harmonic injections may not fully capture the actual compensating requirements of the filter under real operating conditions. Against this background, the present study adopts a measurement-driven methodology that integrates in situ harmonic characterization, phase-resolved nonlinear-load modeling, and simulation-based mitigation assessment in a real university building.
To clarify the position of the proposed framework with respect to previous studies,
Table 1 compares representative harmonic load modeling approaches reported in the literature. The comparison emphasizes whether each approach uses measurement-based data, explicitly represents unbalanced three-phase nonlinear loads, preserves phase-dependent waveform behavior, considers heterogeneous building loads, and supports the use of the resulting models for harmonic-mitigation assessment.
As shown in
Table 1, previous studies have made important contributions to harmonic load modeling, signal-estimation-based identification, measurement-based harmonic current computation, data-driven appliance modeling, and probabilistic harmonic power flow. The novelty of the proposed framework does not lie solely in embedding measured waveforms into simulation since waveform replay and measurement-based modeling have been previously explored in CHIL and data-driven harmonic studies. Rather, the present work complements these approaches by integrating phase-resolved field measurements, time-domain reconstruction, and model-fidelity assessment for heterogeneous unbalanced three-phase nonlinear loads measured in a real academic building. This allows the measured phase-dependent current signatures to be preserved and used as a practical basis for harmonic assessment and SAPF-based mitigation studies.
This paper presents a measurement-driven phase-resolved workflow for representing unbalanced three-phase nonlinear loads in a real university building and for assessing harmonic mitigation under representative load-specific operating conditions. The main contributions are summarized as follows:
Development of a measurement-driven phase-resolved modeling framework for heterogeneous unbalanced three-phase nonlinear loads based on in situ current and voltage waveforms acquired in an academic building.
Preservation of measured phase-dependent waveform characteristics in MATLAB/Simulink through time-domain waveform reconstruction, allowing phase-resolved representation of nonlinear-load asymmetry and harmonic behavior.
Quantitative assessment of model fidelity through RMSE, range-normalized RMSE, and THDI comparison between field-measured and MATLAB/Simulink-reconstructed waveforms.
Use of the reconstructed load signatures as an application case for SAPF-based harmonic-mitigation assessment, showing how phase-resolved measured models can support compensation studies in low-voltage building distribution systems.
This paper is organized as follows.
Section 1 introduces the problem, situates the study within related work, and states the main contributions.
Section 2 reviews the theoretical background on nonlinear loads.
Section 3 presents the case study.
Section 4 details the methodology, including in situ power-quality measurements, phase-resolved modeling of real nonlinear loads in MATLAB/Simulink, and the design of several shunt active power filters (SAPFs) for harmonic mitigation.
Section 5 reports the simulation results, evaluates filter performance under representative operating conditions, and discusses the implications of the findings. Finally,
Section 6 concludes with closing remarks.
3. Case Study
The case study is conducted in the Faculty of Sciences and Engineering building at the Santo Domingo campus of the Pontificia Universidad Católica Madre y Maestra (PUCMM), Dominican Republic. The building is supplied through a three-phase low-voltage distribution system fed by two transformers, which serve different sections of the facility through floor-level distribution panels.
The electrical installation includes a heterogeneous mix of nonlinear loads commonly found in modern academic buildings, such as inverter-driven air-conditioning systems, elevators, LED lighting circuits, computer laboratories, UPS-backed equipment, and a continuously operating data center. These loads rely extensively on power-electronic conversion and therefore constitute relevant sources of current harmonic distortion and phase unbalance within the internal network.
The building was selected as the case study because it provides a realistic environment in which multiple nonlinear loads coexist under normal operating conditions without pre-existing harmonic-mitigation equipment at the time of the measurement campaign. This allows the recorded waveforms to represent the unmitigated distortion behavior of the installation and provides a suitable basis for measurement-based modeling and mitigation assessment.
The evaluated building sections do not include dedicated capacitor banks or passive harmonic filters at the measurement points considered in this study. Therefore, the recorded waveforms represent the unmitigated harmonic behavior of the selected nonlinear loads under their local operating conditions. This condition makes the case study suitable for measurement-driven load characterization and for evaluating SAPF-based harmonic mitigation as an application case of the proposed modeling framework.
Figure 1 presents the single-line diagram of the electrical distribution system considered in this study. The system is supplied from the utility grid through a 480Y/277 V main distribution bus, from which two main transformer branches supply critical and general building loads. The first branch feeds a 500 kVA UPS and an automatic transfer switch, which supply a step-down transformer connected to the critical 120/208 V load panel serving the data center, LED lighting, and computer laboratory. The second branch supplies the general services through dedicated step-down transformers for the HVAC units and elevator loads. This diagram provides the electrical context for the modeled operating conditions and defines the main load groups used to evaluate the harmonic behavior and the performance of the proposed shunt active power filter.
Figure 2 shows the building and its rooftop configuration. In addition to the internal nonlinear loads, the rooftop hosts multiple inverter-based air-conditioning units and a grid-connected photovoltaic installation. Together, these elements create a representative and practically relevant scenario for evaluating harmonic behavior and SAPF-based mitigation in a real university building.
4. Materials and Methods
This study adopts an integrated methodology that combines on-site harmonic measurements, nonlinear-load characterization, and validation in MATLAB/Simulink. The approach is intended to capture and reproduce the electrical behavior of real loads under operating conditions, enabling the assessment of their contribution to power-quality degradation. Representative nonlinear loads are monitored and evaluated during the measurement campaign. The methodology quantifies both their individual and aggregated harmonic contributions and provides the basis for simulating their interaction within the building distribution network and for evaluating mitigation strategies.
Current harmonic distortion is quantified using a METREL MI 2883 Energy Master power-quality analyzer (Ljubljanska c. 77, SI-1354, Horjul, Slovenia) connected at selected points of the building’s three-phase distribution network. The recorded data are processed in METREL PowerView software (v3.0.0.5696), which is used for waveform visualization, harmonic-spectrum inspection, and data export for simulation. The measured current waveforms are incorporated into MATLAB/Simulink R2024b [
19] through lookup tables and repeating-sequence blocks that reproduce the recorded load behavior. These waveforms are used to drive a controlled current source, allowing the measured harmonic profiles to be reproduced within the simulated system. Model fidelity is assessed by comparing measured and simulated waveforms through THD
I estimation based on the fast Fourier transform (FFT), together with RMSE and range-normalized RMSE (RN_RMSE) [
3].
Based on the modeled distortion levels, harmonic mitigation is evaluated through a shunt active power filter (SAPF) based on a voltage-source inverter. The main filter components, including inductance, capacitance, and reference voltage, are dimensioned using standard energy-balance equations following [
16]. The filter and its control strategy are then evaluated in MATLAB/Simulink through waveform analysis and FFT-based harmonic assessment. Performance is assessed against the current-distortion limits recommended by IEEE Std 519-2022 for low-voltage systems [
6,
61,
62].
Figure 3 illustrates the methodological framework adopted in this study, encompassing measurement, data processing, nonlinear-load modeling, active filter design, and simulation. The process begins with the acquisition of harmonic distortion and electrical parameters from the building’s three-phase distribution network. Measurements are performed using a power-quality analyzer, ensuring high-resolution capture of current and voltage waveforms under typical operating conditions.
The recorded data are transferred via SD card and processed using METREL PowerView software [
66], enabling harmonic spectrum extraction and waveform visualization. These measured current profiles are then exported to MATLAB/Simulink, where they are integrated into the simulation environment through lookup tables and repeating-sequence blocks connected to a controlled current source. This approach allows the accurate reproduction of observed harmonic profiles, preserving their spectral characteristics for further analysis.
Based on these validated models, three-phase shunt active power filters (SAPFs) are designed using a voltage-source inverter and a control scheme, comprising a hysteresis current control loop. The filter’s inductance, capacitance, and reference voltages are determined according to standard energy balance equations, ensuring effective harmonic mitigation. The final stage involves validation through a MATLAB/Simulink model. In addition, the resulting THD
I values are compared with the IEEE Std 519-2022 [
4].
4.1. Measurement Process of Nonlinear Loads in the Case Study Building
The case study building includes a representative set of nonlinear loads commonly found in academic facilities, such as LED lighting systems, computer laboratories, UPS-backed equipment, inverter-driven air-conditioning units, and elevator systems. These loads are distributed across multiple floors and supplied by a three-phase low-voltage network operating at 208 V and 60 Hz. A dedicated 500 kVA UPS is connected to a separate 480 V, 60 Hz supply.
Harmonic distortion under field operating conditions is characterized using a METREL MI 2883 Energy Master Class S power-quality analyzer connected at selected points within the building’s three-phase distribution panels. Voltage probes and current clamps are configured and synchronized to measure line-to-neutral voltages and phase currents on each branch. According to the manufacturer’s technical documentation, the instrument complies with IEC 61000-4-30 Class S requirements [
67] and supports three-voltage-channel and four-current-channel measurements, automatic current-clamp recognition and range selection, EN 50160 power-quality analysis [
68], harmonic and interharmonic analysis, and THD measurement up to the 50th harmonic order [
67,
68]. The manufacturer also specifies that calibration and adjustment of METREL power-quality analyzers should be performed using appropriate calibration equipment and procedures [
67]; therefore, the instrument was operated according to the manufacturer’s recommended measurement configuration.
In this work, measurement accuracy is interpreted within the scope of IEC 61000-4-30 Class S monitoring and the manufacturer’s specifications rather than as a full metrological uncertainty evaluation. This distinction is relevant because the complete uncertainty chain depends not only on the analyzer class but also on current-clamp accuracy, selected measurement range, installation conditions, synchronization, measurement window, and post-processing procedure. Therefore, the reported THDI values are used as field-based reference quantities for comparative waveform reconstruction and phase-resolved harmonic assessment. A complete uncertainty budget for the full measurement chain is outside the scope of this work and is identified as a future extension of the experimental campaign.
The analyzer records high-resolution time-domain voltage and current waveforms together with the corresponding harmonic spectra. For each load or load group, current distortion is quantified using the total harmonic distortion of current (THDI), defined as the ratio between the RMS value of the harmonic current content and the RMS value of the fundamental component. To capture unbalanced behavior, THDI is evaluated separately for phases A, B, and C at each measurement point. Measurements are performed at 60 Hz over a multi-cycle time window, and the corresponding waveform and harmonic data are processed in PowerView. The reported THDI values correspond to the analyzer’s window-based computation for each operating condition.
Figure 4 illustrates the nonlinear loads considered in this study together with the measurement setup. Seven representative load categories are selected due to their widespread presence in academic environments.
Table 2 reports rated (nameplate) values provided by the manufacturers, which are used to contextualize the magnitude and connection level of each load within the building distribution system. These specifications complement the measurement campaign and support the interpretation of the harmonic distortion levels discussed in this study.
Figure 5 presents the measured current waveforms and corresponding THD
I values for each nonlinear load. The results show significant harmonic content, particularly in UPS systems, data-center equipment, and IT-intensive loads. The harmonic spectra highlight the contribution of dominant low-order components and their variability across different load types.
Table 3 summarizes the phase-resolved THD
I values for the main nonlinear loads. High distortion levels are observed in the data center and computer laboratory, with pronounced phase asymmetry. UPS systems also exhibit consistently high distortion, while HVAC systems and elevator drives present moderate to high levels depending on operating conditions.
Beyond distortion magnitude,
Table 3 also reports snapshot-based fundamental displacement metrics obtained from the phase-diagram phasors. For each phase, the acute displacement angle
between the fundamental voltage and current phasors and its associated displacement power factor (DPF =
) provide an interpretable indicator of the fundamental reactive behavior that coexists with harmonic distortion. This information means that a near-unity DPF does not imply clean current waveforms: for example, the computer laboratory and LED circuits exhibit small displacement angles (DPF = 0.97–0.99) while still producing substantial THD
I, consistent with distortion-dominated power factor degradation. In contrast, the UPS and selected phases of the data center and elevator transformer show larger displacement components, indicating that part of their burden is not only harmonic current injection but also a stronger fundamental reactive contribution.
The 500 kVA UPS exhibits persistently high distortion, with values near 56% in phase C, confirming the well-documented role of double-conversion UPS systems as dominant contributors to current harmonics. Elevator transformers and inverter-based air-conditioning units present moderate to high levels (30–54%) but still significant enough to degrade transformer efficiency, provoke mechanical vibration, and increase system losses. In contrast, LED lighting circuits show the lowest impact (12%), although still above compatibility thresholds defined in IEEE Std 519-2022, and capable of contributing to cumulative distortion when deployed at scale.
These results confirm that nonlinear loads in academic facilities produce high levels of harmonic distortion together with significant phase imbalance. The combined effect includes increased thermal stress on transformers and conductors, degradation of power factor (PF), and potential malfunction of protection systems. This behavior reinforces the need for measurement-based modeling and mitigation strategies capable of operating under measured unbalanced conditions.
The measured loads exhibit distinct harmonic signatures depending on their operating principles. Inverter-driven HVAC units show a dominant 5th harmonic, while VFD-based systems such as elevators present a broader spectrum including 5th, 7th, and 11th components. Distributed IT loads introduce extended low-order harmonic content, whereas data center loads combine high distortion levels with strong phase-dependent asymmetry. High-power conversion systems such as UPS units exhibit rich low-order harmonic spectra, including 5th, 7th, 11th, and 13th components.
4.2. Modeling of Nonlinear Loads
Accurate representation of nonlinear loads is essential for evaluating power quality and for assessing harmonic-mitigation strategies in low-voltage systems. In real installations, load behavior is strongly influenced by operating conditions, device diversity, and uneven phase allocation, so simplified balanced representations or predefined harmonic spectra may not adequately reproduce the actual interaction among loads.
To address this limitation, this study adopts a measurement-driven phase-resolved modeling approach based on current waveforms acquired during the on-site measurement campaign. Unlike conventional implementations that rely on synthetic harmonic injections or balanced current-source approximations, the proposed approach directly incorporates measured time-domain signals into the simulation environment, preserving both harmonic content and phase asymmetry.
The measured current datasets are organized and imported into MATLAB/Simulink R2024b using lookup tables connected to controlled current sources. A periodic indexing signal ensures continuous waveform reproduction, allowing the simulated currents to follow the measured signals under steady operating conditions. The modeled load set includes both single-phase and three-phase nonlinear devices. Single-phase loads, such as LED lighting systems, inverter-driven air-conditioning units, and IT equipment, are unevenly distributed across phases and therefore contribute to current unbalance. Three-phase loads, including elevators, centralized HVAC systems, and laboratory equipment, are incorporated to represent the diversity and complexity of demand within the building distribution network.
This modeling strategy provides a practical way to bridge field measurements and simulation-based assessment. By preserving the measured waveform characteristics of the loads, the model offers a measurement-based basis for evaluating harmonic behavior and for estimating the compensating requirements of the shunt active power filter under unbalanced operating conditions.
The harmonic content of the simulated currents is evaluated using the fast Fourier transform (FFT) implemented in MATLAB/Simulink. The total harmonic distortion of current (THD
I) is calculated as (17)
where
represents the RMS value of the individual harmonic component of order h for the current and
denotes the RMS value of the fundamental harmonic (order 1) for the current.
Figure 6 shows the MATLAB/Simulink implementation used to reproduce the measured nonlinear-load current signatures. The figure is intended to illustrate the load-signature reconstruction block, not a complete building-wide electrical network model. In this implementation, each phase current is generated by a controlled current source driven by lookup-table data populated with measured waveforms acquired on site and imported into MATLAB/Simulink as time-indexed signals (see
Figure 7). This configuration allows the measured distortion and phase asymmetry to be reproduced for harmonic assessment and mitigation studies under representative load-specific operating conditions.
4.3. Filter Design
This section presents the criteria used to select the SAPF component values for the operating ranges identified in the modeled loads.
Based on the design equations presented in
Section 2, three operating states are considered: 80 A, 50 A, and a low-current range (5–20 A).
Table 4 presents the selected filter component values as a function of the operating conditions considered for the SAPF. For the 80 A case, a three-phase RMS voltage of 480 V is considered to calculate
. The 50 A and 5–20 A cases are evaluated at a three-phase RMS voltage of 208 V.
The same DC bus working voltage is considered for the three operational states selected for the proposed filter topology. For the low-current operating range, the most demanding ripple conditions are evaluated within the interval up to 20 A. Under these conditions, the largest voltage ripple is associated with operation at 20 A, whereas the largest current ripple is associated with operation at 5 A.
Additionally, for the simulation process, commercial values for the calculated filter components are considered. This adjustment has only a minor effect on the current slope and the resulting hysteresis switching behavior. For the 80 A and 50 A cases, the same capacitor value is adopted for design simplicity, provided that it remains above the minimum value required by (10). Here, commercial values refer to rounding the analytically obtained and to nearest standard component values and ratings available from manufacturers.
The compensating current required from the SAPF increases when phase displacement (φ
1) and load asymmetry become more pronounced since the filter must compensate not only for harmonic components but also part of the reactive current. For this reason, the operating states and component values in
Table 4 are selected to remain consistent with the peak currents observed during the measurement campaign.
To complement the SAPF component-selection criteria presented in
Table 4 and to improve the reproducibility of the proposed implementation,
Table 5 summarizes the main electrical parameters of the inverter used in the MATLAB/Simulink model. The SAPF was implemented as a three-phase voltage-source inverter with a common DC-link voltage of 800 V for all operating states. This value was maintained for the 80 A, 50 A, and 5–20 A cases to ensure adequate voltage margin for compensating-current tracking under the evaluated grid voltage levels. The 80 A case was assessed at 480 V line-to-line RMS, while the 50 A and low-current cases were assessed at 208 V line-to-line RMS. The inverter-side inductance and DC-link capacitance were selected according to the current-ripple and voltage-ripple design criteria described in
Section 2, and the analytically obtained values were rounded to nearby commercial ratings. The inverter was controlled using a hysteresis current controller, without an additional PWM stage, and the simulation was performed with a maximum time step of 1 μs over 20 AC cycles.
4.4. MATLAB/Simulink Implementation
This section describes the MATLAB/Simulink implementation used to evaluate the proposed harmonic compensation strategy in the three-phase system. The simulation is implemented in MATLAB/Simulink R2024b and includes the filter structure, power stage, grid model, and signal-processing blocks. The complete model integrates the component-selection criteria, control structure, and measurement-based load modeling described in the previous subsections.
Figure 8 presents the complete MATLAB/Simulink block model. A discrete-time simulation is used, with a maximum time step of 1 μs. A total of 20 cycles of the AC voltage and current waveforms are simulated to ensure adequate data length for THD calculation. The Simscape Electrical Specialized Power Systems library is used to implement the switching stage of the SAPF. The resulting waveforms are analyzed using the FFT tool in Simscape Powergui, within the MATLAB/Simulink R2024b environment, considering harmonic components up to the 25th order.
Nonlinear loads are represented through the lookup-table implementation described in
Section 4.2. The controller is implemented as a dedicated subsystem, and the reference current is computed according to the formulation presented in
Section 2.3. A moving-average block is used to obtain the average power required for reference-current generation.
The inverter switching signals are generated by a hysteresis current controller, as shown in
Figure 9 and
Figure 10. The reference current is continuously compared with the compensating current, and switching pulses are generated whenever the instantaneous error reaches the hysteresis limits. This approach provides fast dynamic tracking without requiring a separate PWM stage. The selected hysteresis band is defined according to the allowable current ripple at the inverter output, ensuring effective current compensation.
5. Results and Discussion
This section evaluates the proposed framework from two complementary perspectives. First, the accuracy of the measurement-driven nonlinear-load models is assessed through waveform comparison and error metrics. Second, the usefulness of these models for harmonic mitigation is examined through SAPF-based compensation under representative load-specific operating conditions. Validation is supported by phase-resolved field measurements obtained with a METREL MI 2883 Class S power-quality analyzer. The results are presented in the order defined in
Table 3, and, for clarity, each case includes the corresponding current waveform and harmonic spectrum.
5.1. Validation of Load-Signature Reconstruction and Error Analysis
5.1.1. Data-Driven Modeling of Unbalanced Three-Phase Nonlinear Loads and Error Analysis
For the case study, the first validation compares in situ measurements from a METREL MI 2883 (Class S) power-quality analyzer with the currents produced by the MATLAB/Simulink model of unbalanced three-phase nonlinear loads, using phase A as the common reference in all scenarios. Specifically, the harmonically distorted phase A current waveform recorded on site is contrasted with the corresponding simulated waveform generated by the identified load models under matched operating conditions. To assess this discrepancy, two error indices were used: the root mean square error (RMSE), given in (18), and the range-normalized root mean square error (RN_RMSE), defined in (19) [
69]. The RMSE is defined as
where
and
are the instantaneous current values in MATLAB/Simulink and METREL analyzer, respectively, and
is the total number of data points.
The RN_RMSE scales the RMSE to a percentage-based normalized error metric, which facilitates a clearer comparison of variations among the different devices:
Across the evaluated cases, both metrics remain within narrow bounds, indicating that the discrepancies between measured and simulated waveforms are relatively small compared with the overall waveform amplitude and distortion level. These differences are mainly associated with methodological differences between the analyzer-based measurement process and the MATLAB/Simulink reconstruction procedure. In particular, the METREL analyzer computes THDI over multi-cycle acquisition windows using internal aggregation and spectral-processing routines, whereas the MATLAB/Simulink implementation reconstructs the measured load signatures using repeated time-domain waveform segments and FFT-based post-processing under discrete-time simulation. Additional differences may arise from synchronization tolerance, current-clamp sensitivity, waveform window selection, numerical discretization, and FFT spectral resolution. Under these conditions, the observed deviations of approximately 1–3 percentage points in THDI are considered consistent with the expected variation associated with comparative waveform reconstruction and harmonic assessment under representative load-specific operating conditions.
These results support the use of the proposed data-driven models for controller tuning and filter sizing in three-phase systems with phase asymmetry.
Figure 11 overlays the harmonically distorted phase A current waveform from the field measurement with its simulated counterpart and includes a bar chart of the error, illustrating that the observed differences remain within the expected bounds for the scenarios considered.
Table 6 summarizes the error between the waveforms generated in MATLAB/Simulink by the proposed identification and their counterparts from the METREL MI 2883 analyzer, using phase A as the common reference across cases. The mean RN_RMSE is 1.36%, with switching-converter devices exhibiting the largest percentage deviations. The results indicate that the identification strategy is accurate and does not introduce material discrepancies. The consistently low RN_RMSE confirms that MATLAB/Simulink reproduces the modeled behavior closely, supporting the robustness of the workflow and the credibility of the methodology for harmonic-load representation in three-phase unbalanced settings.
These results indicate that the proposed measurement-driven models reproduce the measured current waveforms with sufficient fidelity for subsequent mitigation studies. The remaining discrepancies are small relative to the distortion levels involved and do not alter either the phase ordering or the relative severity among loads. This is particularly relevant for filter evaluation since compensator sizing and tracking requirements depend more on the preservation of waveform structure and phase asymmetry than on exact point-by-point coincidence. The waveform-reconstruction procedure is applied independently to each phase using the corresponding measured current signature. The same lookup-table generation, waveform reconstruction, and error-assessment procedure is used for phases A, B, and C without phase-specific tuning parameters or model adaptations. Therefore, the phase A results reported in
Table 6 are presented as a representative example of the reconstruction accuracy obtained by the proposed methodology. The preservation of phase-dependent asymmetry is further supported by the phase-resolved THD
I results presented in
Section 5.2 and
Section 5.3, where distinct harmonic characteristics are maintained across the three phases before and after compensation.
5.1.2. Validation of Using the First Cycle as the Basis for the Strategy
A single fundamental cycle was used as the basis for waveform reconstruction because the objective of the proposed model is to preserve the representative steady-state harmonic signature of each measured load while maintaining a computationally efficient implementation. The selected cycle was extracted from a stable portion of the measurement window and periodically repeated in MATLAB/Simulink. This strategy is appropriate for the analyzed steady operating regimes, where the dominant harmonic content and phase-dependent waveform shape are the main quantities required for harmonic assessment and compensation studies. Differences between single-cycle reconstruction and multi-cycle analyzer-based THDI estimation are therefore expected and are explicitly evaluated through phase-resolved THDI comparison.
The second validation assessed whether a phase-resolved single-cycle record per phase is sufficient to build lookup tables and reproduce the measured current behavior. One fundamental period from each phase, acquired in situ with a METREL MI 2883 (Class S), was imported into MATLAB/Simulink (R2024b) and periodically repeated to excite the load models; this contrasts with the analyzer’s THDI calculation, which averages over all cycles in the measurement window. Consequently, Simulink reports THDI from the replicated single period, whereas the instrument yields a multi-cycle metric.
Table 7 compares phase-by-phase current THD
I measured on site with the METREL analyzer against the values obtained from the nonlinear-load models in MATLAB/Simulink. Overall, the models reproduce both the magnitude of distortion and the phase asymmetry observed in the field. The highest THD
I levels occur in the data center and the 500 kVA UPS, followed by the computer laboratory, the elevator and AC-inverter transformers; the LED lighting circuit shows the lowest distortion. Across devices, Simulink tends to slightly underestimate the measured THD
I (typically by 1–3 percentage points), while a few cases show small overestimation in one phase (e.g., the UPS on phase B and the elevator transformer on phase C). Importantly, these deviations do not change the relative ranking among loads or the phase ordering within each load. For instance, the pronounced unbalance of the data center (phase B markedly lower than phases A and C) is preserved. The close agreement between measurements and simulations indicates that the identification procedure captures the essential harmonic behavior of each load with sufficient fidelity for subsequent analysis and for the design of mitigation strategies. Minor discrepancies are consistent with differences in measuring windows and operating conditions, as well as the modeling choice to work from representative cycles for computational efficiency.
These results show that a phase-resolved single-cycle representation is sufficient to preserve the dominant harmonic behavior of the measured loads under steady operating conditions. Although small differences remain between instrument-based and simulation-based THDI estimates, the proposed identification procedure retains the relative distortion level of each load and the phase-dependent asymmetry observed in the field. This makes the approach computationally efficient while remaining adequate for harmonic-mitigation studies.
5.2. Validation via Active-Filter-Based Current Harmonic Mitigation
Several simulations are carried out in MATLAB/Simulink (R2024b) to validate the harmonic-mitigation capability of the previously designed three-phase shunt active power filter (SAPF). The SAPF parameters are listed in
Table 4, and the seven nonlinear unbalanced load models described earlier are used to assess performance.
Figure 12,
Figure 13,
Figure 14,
Figure 15,
Figure 16,
Figure 17 and
Figure 18 present the three-phase current waveforms after compensation together with the corresponding harmonic spectra and THD
I values for phases A, B, and C.
Table 8 summarizes the phase-resolved THD
I values before and after SAPF compensation. Across all the devices, the mean THD
I decreases from 39.25% before compensation to 2.28% after compensation, corresponding to an average relative reduction of 94.18%. All the post-filter values remain at or below 5%, indicating effective compensation under the phase-asymmetric operating conditions observed in the building.
The largest reductions are obtained in the loads with the highest baseline distortion. The data center decreases from a mean THDI of 56.47% to 2.34% and the 500 kVA UPS from 51.30% to 1.73%. A similar trend is observed in the computer laboratory, where mean THDI is reduced from 49.28% to 1.77%. These cases correspond to the most distortion-intensive operating conditions in the building and confirm that the SAPF remains effective even for loads dominated by power-electronic equipment.
Loads with moderate initial distortion also show substantial improvement. The inverter air-conditioning units decreased from 31.07% to 3.18% and the AC inverter transformer from 34.91% to 2.23%. The elevator transformer is reduced from 39.56% to 2.91%, while the LED lighting circuit, despite its lower baseline distortion of 12.17%, reaches a post-filter mean of 1.84%, corresponding to an 84.90% reduction. These results indicate that the compensation stage performs consistently across loads with markedly different harmonic signatures.
Phase dispersion also narrows after compensation, consistent with an improvement in the harmonic balance among phases. For example, the data center shows a pre-filter spread of 63.03 percentage points (67.81%, 19.28%, and 82.31%), which is reduced to 2.86 percentage points after filtering (3.65%, 0.79%, and 2.58%). The elevator transformer shows a similar reduction, from 27.65 to 2.59 percentage points. Although a few post-filter values remain comparatively higher than the others, all of them stay below the 5% THDI threshold.
This result should be interpreted as a compliance-oriented indicator within the scope of the present measurement-driven assessment. IEEE Std 519-2022 also considers individual harmonic-order limits as a function of the short-circuit ratio at the point of common coupling. Accordingly, additional network-level analyses would be required for complete field-level compliance verification under practical installation conditions.
Overall, these results confirm that the proposed framework is effective not only in reducing THDI but also in preserving compensation performance across heterogeneous load types and phase-asymmetric operating conditions. In this sense, the results validate not only the mitigation capability of the SAPF but also the usefulness of the measurement-driven phase-resolved load models as a practical measurement-based basis for harmonic-compensation studies in building distribution systems.
Table 8 confirms that the proposed compensation strategy is effective across all the representative loads. The largest mean reductions are observed in the UPS, data center, and computer laboratory, which are also among the most distorted cases before compensation. This result is relevant because it indicates that the proposed workflow remains effective not only for moderate distortion loads but also for the most challenging nonlinear sources identified in the building.
A relevant implication of the proposed approach is that conventional balanced or spectrum-based load representations may significantly underestimate harmonic distortion under real operating conditions. In the case study, strong phase asymmetries and load diversity resulted in markedly different per-phase THDI levels, which directly influenced the required compensating current of the SAPF.
If simplified load models had been used, the filter design would likely have been under-dimensioned or improperly tuned, particularly under high-distortion scenarios such as data center and UPS operation. These findings highlight that measurement-based phase-resolved modeling is not only a refinement but a necessary step for reliable harmonic mitigation in modern low-voltage networks.
Beyond the reduction in THDI, an important outcome is that compensation is achieved across loads with markedly different harmonic signatures and phase asymmetric levels. The strongest improvements are obtained in the data center and UPS cases, which also represent the most demanding conditions in terms of distortion severity. At the same time, loads with lower baseline distortion, such as the LED lighting circuit, remain within low post-filter margins. This behavior suggests that the SAPF design remains effective across a broad operating envelope when it is driven by measurement-based phase-resolved load models rather than idealized or balanced approximations.
In this sense, the results do not only confirm the mitigation capability of the SAPF itself but also validate the usefulness of the proposed load-modeling strategy as a realistic basis for compensation studies in heterogeneous three-phase building networks.
5.3. Robustness Evaluation of the Proposed Compensation Strategy
This section evaluates the robustness of the active harmonic filter under representative non-ideal grid conditions. A low-frequency sinusoidal perturbation at 6 Hz was superimposed on the mains voltage magnitude, with an amplitude of ±5% of the nominal mains voltage, while the fundamental grid frequency was kept constant at 60 Hz. Thus, the applied disturbance represents a modulation of voltage magnitude only, not a variation in grid frequency. In addition, the feeder was modeled with the equivalent impedance of a 200 m AWG 2 three-phase cable, including its series resistance of 0.1 Ω and a per-phase inductance of 70 μH. This configuration allows the filter performance to be assessed under representative non-ideal operating conditions, where voltage modulation, cable voltage drops, and feeder inductance may affect the current compensation dynamics and harmonic-mitigation capability.
For the robustness assessment, only the UPS and data center loads were considered because they represent the most demanding cases among the evaluated nonlinear loads. The UPS provides a severe but relatively balanced distortion condition, with simulated THDI values around 47–53% across the three phases. In contrast, the data center presents the most critical and unbalanced profile, with THDI values near 67% in phase A, 80% in phase C, and 19% in phase B. Thus, these two cases provide a conservative basis for evaluating the filter response under both balanced high-distortion and strongly unbalanced harmonic conditions.
As shown in
Figure 19, the data center load achieved compensated THD
I values of 4.92%, 2.81%, and 4.47% for phases A, B, and C, respectively. In all the cases, the harmonic distortion remained below the 5% reference limit established by the applicable harmonic distortion standards. This result is relevant because the load initially presented an unbalanced distortion profile, requiring the filter to compensate different harmonic contents in each phase. The obtained values indicate that the proposed active harmonic filter preserved its compensation capability under asymmetric harmonic loading and under the evaluated operating disturbances, confirming the robustness of the control strategy.
For the UPS load, as shown in
Figure 20, the compensated source currents presented THD
I values of 3.43%, 5.02%, and 4.38% for phases A, B, and C, respectively. The results show that the active harmonic filter maintained adequate compensation under a high-distortion operating condition, reducing the harmonic content of the three phases to values close to or below the 5% reference limit established by harmonic distortion standards. Although phase B slightly exceeded this threshold by 0.02 percentage points, the deviation is marginal and indicates a near-compliant condition. Therefore, the UPS case confirms that the filter preserves its compensation capability under severe nonlinear loading, with only a negligible deviation from the admissible harmonic distortion range under the evaluated disturbances.
Overall, the results indicate that the feeder inductance mainly behaves as a grid-side impedance, producing only minor voltage drops and phase displacement at the point of common coupling. Since the shunt active filter compensation is based on voltage-error tracking, the controller adjusts the injected current according to the measured deviations. As a result, the ±5% voltage fluctuation and the inclusion of cable inductance do not significantly degrade the harmonic-mitigation performance, confirming the robustness of the proposed compensation strategy.
6. Conclusions
This study presented a measurement-driven phase-resolved framework for modeling unbalanced three-phase nonlinear loads in a university building and for assessing harmonic mitigation using shunt active power filters (SAPFs) as an application case. Field measurements acquired with a Class S power-quality analyzer were embedded into MATLAB/Simulink as time-domain waveforms, allowing the measured harmonic content, waveform shape, and phase asymmetry of representative building loads to be reproduced in simulation. The fidelity of the reconstructed load models was quantitatively assessed using RMSE and range-normalized RMSE, yielding a mean RN_RMSE of 1.36% across the evaluated loads. In addition, the simulated THDI values remained in close agreement with the measured values, with typical deviations of approximately 1–3 percentage points.
Using these measured signatures, three SAPF operating states were evaluated under representative load-specific operating conditions. The results showed that the mean THDI decreased from 39.25% before compensation to 2.28% after compensation, corresponding to an average reduction of 94.18%. All the post-filter phase values remained below the 5% THDI reference threshold. These results indicate that the reconstructed phase-resolved load signatures provide a useful basis for assessing harmonic compensation in heterogeneous low-voltage building networks.
The robustness analysis further examined the compensation response under representative non-ideal operating conditions by introducing supply-voltage variation and feeder impedance. The data center and UPS cases were selected because they represent severe operating scenarios, including strongly phase-asymmetric distortion and high-power nonlinear conversion. Under the evaluated disturbances, the compensated THDI values remained close to or below the 5% reference threshold, indicating that the proposed compensation strategy preserves its mitigation capability under the tested voltage and feeder-impedance conditions. This additional analysis strengthens the practical relevance of the proposed workflow without extending its scope to a complete network-level harmonic power-flow assessment.
The main contribution of this work is not the proposal of a new SAPF topology or control strategy but the integration of field measurements, phase-resolved time-domain load reconstruction, model-fidelity assessment, and SAPF-based mitigation evaluation within a single workflow. This workflow is particularly relevant for building distribution systems where nonlinear loads are heterogeneous, unevenly distributed among phases, and supplied through different local connection points.
The results are obtained under representative load-specific operating conditions and selected measurement windows. Therefore, the proposed models are intended to reproduce the dominant harmonic behavior of the analyzed loads under those operating regimes. Since the evaluated building sections do not include dedicated capacitor banks or passive harmonic filters at the analyzed measurement points, explicit series or parallel resonance conditions associated with passive compensation equipment were not identified during the measurement campaign. Future work will extend the framework toward broader network-level analyses, including feeder-impedance identification, resonance assessment, complete harmonic power-flow modeling, sensitivity to measurement-window selection, and application to office, hospital, and residential building distribution systems.