The widespread use of power converters has fuelled growing interest in the field of power electronics. At the core of this discipline are semiconductor devices, which play a crucial role in switch design, enabling the high-speed commutation required by power converters. These switching operations produce signals characterised by high rates of voltage and current change (dv/dt and di/dt), leading to broadband perturbations (Mahalik and Kos, 2005). Since power electronic devices are typically interconnected via power supply lines, these wide-band signals propagate along the lines and contribute to electromagnetic pollution, a phenomenon referred to as conducted electromagnetic interference (EMI) (Kazem, 2007; Kuebrich et al., 2005).
Pulse width modulation (PWM) remains the most widely adopted control strategy for voltage source inverters (VSIs) (Haq Syed Abdul et al., 2021), offering precise control of the fundamental output frequency and attenuation of certain harmonic components (Madasamy et al., 2021). Nonetheless, significant harmonics with notable amplitudes persist across much of the output voltage spectrum. Some researchers have resulted to increasing the inverter switching frequency to address this (Kaboli et al., 2007; Madasamy et al., 2021) or employing inverter topologies with additional switches (Makhubele and Ogudo, 2021; Muthukumar and Mary, 2014).
Alternatively, random pulse width modulation (RPWM) techniques aim to distribute harmonic energy over a wider frequency range, thereby reducing concentrated harmonic peaks (Wang et al., 2003). However, due to insufficient randomness in switching frequencies, RPWM methods often struggle to maintain high DC-link voltage levels (Madasamy et al., 2021). This limitation results in residual harmonic content even at elevated switching frequencies and can potentially excite system resonances (Peyghambari et al., 2016).
Recent developments in machine learning have opened new avenues in power electronics, offering notable benefits (Mathews et al., 2022). This has motivated an in-depth investigation into the application of machine learning, specifically artificial neural network (ANN), to enhance RPWM performance by increasing switching randomness and reducing both harmonic content and residual clusters in converter output waveforms. This study explores the use of ANNs to overcome the limitations of conventional RPWM, aiming to further reduce the total harmonic distortion (THD) in the output voltage of a three-phase VSI.
An ANN-generated signal is integrated into a modified RPWM scheme, combined with three sinusoidal reference signals and a dual-random triangular carrier signal to form the switching pulse. A first-order passive LC low-pass filter is also employed to improve waveform quality. This approach minimises the number of inverter switches, thereby reducing switching losses and emphasises technique optimisation rather than hardware addition, resulting in lower costs and improved efficiency. As such, the proposed system does not incur any significant hardware cost increase, with only a negligible computational overhead (≈1%) associated with ANN inference. The method, therefore, offers a cost-effective, software-based enhancement to existing RPWM strategies while improving efficiency and EMI performance. The goal is to achieve a broader dispersion of harmonic clusters and reduce acoustic noise levels in RPWM-controlled VSIs. To validate the effectiveness of the proposed system, it is compared against a dual random pulse width modulated (DRPWM) three-phase VSI and a conventional fixed carrier signal modulated (FCSM) VSI, which is akin to sinusoidal pulse width modulation (SPWM). Power spectral density (PSD) analysis is performed using Welch’s method in MATLAB/Simulink, while fast fourier transform (FFT) analysis is used to evaluate THD levels. Results demonstrate that the proposed method achieves a more uniform harmonic spread over a wider frequency range compared to both DRPWM and SPWM approaches.
To reduce acoustic noise in motor drives, various researchers have explored techniques involving randomisation of the switching frequency. Madasamy et al. (2021) introduced randomness by varying the switching frequency through space vector modulation (SVM) using an asymmetric frequency multicarrier. Kirlin et al. (2011) implemented randomised inverter switching around a nominal frequency, while Bech et al. (2000) randomised the switching frequency by altering the distribution of the zero vector within each switching cycle. These methods introduce non-deterministic elements into the output waveform (Lai et al., 2013; Liaw et al., 2000), which effectively convert narrow-band acoustic noise into broad-band noise by dispersing the harmonic spectrum away from the switching frequency (Binojkumar et al., 2013; Mathe et al., 2012). However, this approach tends to increase waveform distortion due to the randomness, and the average inverter switching losses remain comparable to those of deterministic PWM strategies (Mathe et al., 2012).
Further studies have focussed on applying RPWM techniques using the SVM method. (de Oliveira et al., 2005; Khan et al., 2010; Lee et al., 2000) randomly sampled the reference voltage space vector and achieved averaging by switching among its three nearest vectors. In other studies, including George and Baiju, (2013) and Madasamy et al. (2021), the switching frequency was varied randomly within predefined bounds, producing randomly spaced samples without requiring sector identification. George and Baiju (2013) further noted that the reference phasor is mapped into a vector within a two-level inverter, enabling calculation of switching time vectors. These strategies have demonstrated significant reductions in both acoustic noise and EMI. However, as Makhubele and Ogudo (2020) highlighted, such methods are often complex, computationally demanding and expensive to implement.
Owusu et al. (2023) employed ANNs to optimise a sinusoidal PWM-based controller for a three-phase VSI, achieving promising results. Nonetheless, the deterministic nature of the output results in harmonic clustering around the switching frequency, which contributes to increased noise in motor drives.
The modulation principle underlying the RPWM technique has been extensively examined by several researchers (Jadeja et al., 2015; Kim et al., 2004; Lee et al., 2016). In its implementation, three reference signals Sa, Sb and Sc are individually compared with a single randomised triangular carrier signal C, to generate the switching pulses for each leg of the three-phase VSI. Figure 1 illustrates the modulation principle of the RPWM technique.

Modulating principle of RPWM. RPWM, random pulse width modulation.
In this context, the switching function u, for each phase of the inverter, is determined by the switching period (T), the delay factor (δ), and the duty cycle (d). In practical implementations, the reference signals are deterministic (uniform and phase-shifted by 2π/3), allowing for effective control of the output voltage. Consequently, only the switching period and delay factor are subject to randomisation. This is achieved using a triangular carrier signal defined by its period T and a fall-time delay β.
The randomisation of these parameters is facilitated by a linear congruential generator (LCG), which uses a uniform probability distribution and applies statistical averaging techniques, as described in the studies of Bhattacharya et al. (2015), Boudjerda et al. (2011), and Boudouda et al. (2012).
The random variation of T is implemented between the interval [Tmin, Tmax], by using the statistical mean
The random variation of the parameter β is implemented within the interval
When the parameters T and β are held constant in triangular signal generation, the result is a triangular waveform with fixed characteristics. When this fixed waveform is compared with sinusoidal reference signals, the modulation technique is classified as deterministic or classical SPWM.
Randomising the parameter T results in random carrier frequency M = modulation (RCFM), while randomising β leads to random pulse positioning modulation (RPPM), both in reference to the sinusoidal signals.
When both T and β are randomised simultaneously, the approach is termed dual random pulse width modulation (DRPWM). Compared to RCFM and RPPM individually, DRPWM exhibits superior spectral spreading capabilities, as demonstrated in the studies by Boudjerda et al. (2011) and Boudouda et al. (2012). In this study, a dual-randomised carrier signal c(t) is generated using a MATLAB Function block, with time (t), switching period T and fall-time delay β as inputs. This synthesised signal serves as a core component of the dataset used to train the ANN.
An ANN was developed using a supervised feedforward architecture with backpropagation, trained with known target outputs (Ali and Mashwani, 2023). It comprised 3 layers: an input layer with 4 neurons, a hidden layer with 10 neurons and an output layer with 3 neurons. Inputs combined three sinusoidal reference signals and a random signal from a MATLAB Function block. After training, the network generated three control signals, later combined with reference and triangular carrier signals for modulation.
Figure 2 illustrates the network’s structure, showing connections between layers via weights (‘M’) and biases (‘B’). Weights, initialised randomly between 0 and 1, adjust input signals through the network, while biases shift the activation function’s input. Each hidden layer neuron computes a weighted sum of its inputs, followed by a sigmoid activation function to model non-linear relationships expressed as;

ANN architecture. ANN, artificial neural network.
The network was trained using the ‘trainlm’ function, which implements the Levenberg-Marquardt Optimisation (LMO) algorithm. This method was selected for its robustness, efficiency and high accuracy with smaller datasets. LMO is well-suited for moderate-sized feedforward networks, balancing the speed of Gauss-Newton with the stability of gradient descent. During optimisation, the Hessian matrix H is approximated using the Jacobian J.
The scalar value μ was initially set to 0 to allow the Hessian matrix approximation in Newton’s method. During optimisation, μ was adjusted to control the step size, decreasing μ enabled larger steps and improving the reduction of the performance function. This function was estimated using the Hessian H = JTJ, while the gradient was computed as follows:
With J representing the Jacobian matrices and e as the error.
The mean squared error (MSE) method was employed during the training process to evaluate the performance of the network, mathematically expressed as:
The back propagation (BP) learning algorithm was utilised to update the network’s weights and minimise the MSE. The weight update process in BP is mathematically represented as:
During backpropagation, the chain rule was used to compute the gradient vector. For training, dual random carrier signals combined with three sinusoidal reference signals comprised 70% of the dataset, with the remaining 30% reserved for validation. Both feedforwardnet and cascadeforwardnet were tested, showing similar performance. These functions can approximate any finite input-output mapping with sufficient hidden neurons, using a 1 × N vector of hidden layer sizes and the trainlm backpropagation algorithm. The input and output layer sizes are initially set to zero and adjusted automatically during training. The feedforwardnet was ultimately chosen for its simplicity and fast convergence in solving fitting problems. Table 1 summarises the training data, while Figures 3 and 4 display the training results.

Output regression line after training.

MSE output curve after training. MSE, mean squared error.
ANN training parameters.
| Parameters | Values |
|---|---|
| Network type | Feedforward/backpropagation |
| Learning algorithm | Trainlm |
| Epochs | 1,000 |
| Convergence limit (Goal) | 1e−12 |
| Hidden layers | 10 |
| Input layers | 4 |
| Output layers | 3 |
ANN, artificial neural network.
The proposed ANN modifies the random carrier index to minimise both harmonic distortion and conducted EMI. The ANN receives three normalised inputs: modulation index ma, reference voltage amplitude Vref and instantaneous current io. The output neuron produces an adaptive carrier frequency shift factor Δfc, governing the instantaneous carrier frequency fc(t) = fbase + Δfc. The network is trained using the Levenberg–Marquardt (LM) algorithm to minimise
J = αTHD + βPEMI; where α and β weigh the trade-off between waveform quality and spectral spread. The LM algorithm iteratively updates weight matrices W and biases b as
The proposed method improves the RPWM strategy, which is preferred over conventional PWM for controlling three-phase VSIs due to its ability to spread harmonic clusters across a wider frequency range (Addo-Yeboah and Owusu, 2022; Sohaib Sajid et al., 2020). RPWM typically combines a sinusoidal reference with a randomly varied carrier to generate switching pulses (Raju et al., 2013). In this approach, an ANN-generated signal is added to the reference and carrier signals to enhance pulse generation. A low-pass LC filter further smooths the output, reducing THD and improving waveform quality, efficiency and overall performance.
A randomly varied triangular signal C(t) is generated by setting two parameters: the period T and the fall-delay time β. The waveform’s first and second halves are defined by Eqs (9)–(16).
For the fixed triangular carrier in FCSM, Eqs (9)–(12) are applied:
Whereas for the random triangular carrier in the DRPWM, Eqs (13)–(16) are applied
Eventually, C(t) was generated with t as the time input factor for the MATLAB function block and was used as the principal part of the input data of the ANN.
Three sinusoidal signals with a phase shift of 120° were generated for training purposes using the following Eqs (21)–(23)
Subsequently, four signals served as the input signals in the ANN training.
Three target outputs, Y1, Y2 and Y3, were obtained from the ANN supervised training using the four input signals for the proposed method, by applying the mathematical Eqs (25)–(27) for the proposed method.
Passive filters, composed of inductors and capacitors, are used to attenuate high-frequency signals (Muhlethaler et al., 2013). To improve output waveform symmetry and reduce THD in the proposed method, a first-order low-pass filter was implemented. The DRPWM’s initial spread-spectrum effect caused a steady roll-off, necessitating a lower frequency response. To balance performance and cost, several EMI filter topologies R(Resistor) C (Capacitor) (RC), R(Resistor) L(Inductor) (RL) and LC were evaluated. Among them, the LC low-pass filter offered effective attenuation with minimal trade-offs, such as side inductance, at a reasonable cost. As illustrated in Figure 5, the LC filter was designed and implemented based on Eqs (28) and (29) and compared against other passive and active filter configurations.

Single line diagram of LC low pass filter.
The values of L and C were calculated as below:
Vdc = input voltage of inverter
%Ia = 20% of the load current
Figure 6 shows the combination of sinusoidal and random carrier signals used to generate ANN-based switching pulses for the three-phase inverter. An LC filter smooths the output before it is applied to a series R(Resistor) L(Inductor) C(Capacitor) (RLC) load. THD and PSD analysis were conducted, and the results are discussed in Section 6.

Block diagram of the proposed method. ANN, artificial neural network.
This section presents simulations of three methods including FCSM (SPWM), DRPWM and the proposed approach under two conditions: before and after LC filtering in a three-phase VSI. As shown in Figure 7, a MATLAB function block was used to generate fixed and dual random carrier signals based on Eqs (9)–(12) and (13)–(16). These were compared with three sinusoidal reference signals (Sa, Sb and Sc) to produce switching pulses for the inverter. The combined signals controlled switches 1 and 4, 3 and 6, as well as 5 and 2 for the inverter’s first, second and third legs, respectively. Figures 8 and 10 show the switching pulses for the first leg using FCSM and DRPWM.

Switching pulse generation for FCSM. FCSM, fixed carrier signal modulated.

Pulse generation for the FCSM strategy on one leg of three phase inverter. FCSM, fixed carrier signal modulated.

Switching pulse generation for DRPWM. DRPWM, dual random pulse width modulated.

Pulse generation for the DRPWM strategy on one leg of three phase inverter. DRPWM, dual random pulse width modulated.
The design of the three-phase VSI with the LC filter connected is shown in Figure 11.

Diagram of the three-phase VSI. VSI, voltage source inverter.
The controller in Figure 12 was used to generate switching pulses for the proposed ANN-optimised method. The ANN was trained using the dual random carrier signal and three fundamental sinusoidal signals, as defined by Eqs (13)–(20). The resulting ANN signal was then combined with the sinusoidal and carrier signals to produce switching pulses for each leg of the three-phase VSI.

Pulse generation for ANN incorporated. ANN, artificial neural network.
The control pulses generated for the switches in the first leg of the three-phase VSI are illustrated in Figure 13.

Pulse generation for the proposed strategy on one leg of three-phase inverter. ANN, artificial neural network; DRPWM, dual random pulse width modulated.
Figures 14–16 show the output voltage waveforms before and after LC filtering for the FCSM, DRPWM and proposed methods, respectively.

Output voltage waveform with and without an LC filter for FCSM. FCSM, fixed carrier signal modulated.

Output voltage waveform with and without LC filter for DRPWM. DRPWM, dual random pulse width modulated.

Output voltage waveforms before and after the LC filter for the proposed method.
The output voltage waveforms, along with their THD and PSD analysis, are presented and discussed in the Section 6.
PSD analysis was performed using Welch’s method in MATLAB. Figures 17–19 show the PSD results for FCSM, DRPWM and the proposed ANN-optimised method, respectively.

Output voltage PSD of FCSM. FCSM, fixed carrier signal modulated; PSD, power spectral density.

Output voltage PSD of DRPWM. DRPWM, dual random pulse width modulated; PSD, power spectral density.

Output voltage PSD of the proposed method. PSD, power spectral density.
The output voltage waveforms were analysed before and after the LC filter for all three methods. Controllers in Figures 7 and 8 implemented the FCSM and DRPWM methods on the three-phase VSI shown in Figure 11. The apparent amplitude rise is due to the filter’s gain characteristics near its corner frequency, combined with the spectral redistribution introduced by random switching. The LC filter amplifies components near the cut-off frequency before full attenuation takes effect. Figures 20a, b show the FCSM method’s THD levels before and after the LC filter, while Figures 21a, b show the same for the DRPWM method.

THD content of the FCSM. (a) Before and (b) after the LC filter. FCSM, fixed carrier signal modulated; THD, total harmonic distortion.

THD content of the DRPWM (a). Before and (b). After the LC filter. DRPWM, dual random pulse width modulated; THD, total harmonic distortion.
The controller in Figure 12 was used to regulate the three-phase VSI (Figure 11), and the output voltage THD of the proposed method was evaluated before and after the LC filter, as shown in Figure 22.

THD content of the proposed method. (a) Before and (b) After the LC filter. THD, total harmonic distortion.
Table 2 gives a summary of the THD content levels of the three simulations under the two conditions of before and after the LC filter connection.
Summary of THD content levels (%).
| System | THD before filter (%) | THD after LC filter (%) |
|---|---|---|
| FCSM | 43.71 | 7.60 |
| DRPWM | 42.83 | 7.40 |
| Proposed method | 35.59 | 2.17 |
DRPWM, dual random pulse width modulated; FCSM, fixed carrier signal modulated; THD, total harmonic distortion.
FFT-based harmonic analysis was conducted for the three modulation techniques. Table 3 lists the first six significant harmonics and their relative magnitudes, highlighting that the 5th and 7th harmonics are reduced by approximately 43% and 37%, respectively.
Summary of harmonics and their relative magnitudes.
| Harmonic order | FCSM (dB) | DRPWM (dB) | ANN-RPWM (dB) | Reduction vs. DRPWM (%) |
|---|---|---|---|---|
| 5 | −36 | −40 | −46 | 43 |
| 7 | −38 | −42 | −47 | 37 |
| 11 | −40 | −43 | −48 | 35 |
| 13 | −42 | −44 | −49 | 35 |
ANN-RPWM, artificial neural network-random pulse width modulation; DRPWM, dual random pulse width modulated; FCSM, fixed carrier signal modulated.
The results confirm that the ANN-RPWM achieves broader harmonic energy dispersion, yielding a flatter PSD and improved EMI attenuation.
The line-to-line output voltage PSD of the three modulation strategies shows a clear reduction in noise from FCSM to DRPWM. FCSM exhibits prominent peaks at the fundamental frequency and its harmonics, while DRPWM produces a more uniform PSD. ANN optimisation further improves noise attenuation, yielding lower peak levels and a flatter, more evenly distributed PSD.
The output voltage from the optimised controller in Figure 11 effectively spreads the harmonic spectrum and reduces THD compared to both DRPWM (RPWM-based) and conventional FCSM (SPWM). THD was reduced from 42.83% to 35.59%, significantly lowering conducted emissions. With the LC filter, THD further decreased to 2.17%, meeting electro-magnetic compatibility (EMC) standards. Table 2 summarises the THD levels achieved by the proposed method.
In addition to the projected component-based cost shown in Table 3, a concise techno-economic assessment was performed to evaluate the economic implications of the proposed ANN-optimised RPWM controller relative to a conventional RPWM inverter. The analysis considers hardware, software and computational overhead. The results are summarised in Table 4.
Techno-economic comparison between conventional RPWM and proposed ANN-RPWM controller.
| Cost component | Conventional RPWM system | Proposed ANN–RPWM system | Remarks/assumptions |
|---|---|---|---|
| DSP/microcontroller | Included | Same | No additional processor required |
| Power semiconductors (IGBTs/drivers) | 6 IGBTs + 3 drivers | Same | Unchanged hardware configuration |
| Sensors/feedback circuits | 3 V, 3 current sensors | Same | No modification needed |
| Software/algorithmic overhead | Baseline PWM control | +3% additional CPU load | ANN inference executed on the same DSP |
| Development/training effort | N/A | One-time offline training | Conducted using MATLAB on PC |
| Filter components (L, C) | LC filter | Same | Identical filter design used |
| Implementation/maintenance | Standard | Standard | No extra calibration required |
| Estimated total cost impact | 100% | ≈101% | <1% incremental difference |
ANN-RPWM, artificial neural network-random pulse width modulation; DSP, digital signal processor; IGBT, Insulated Gate Bipolar Transistor; PC, Personal Computer; PWM, pulse width modulation; RPWM, random pulse width modulation.
The data in Table 4 confirm that the ANN-RPWM strategy can be integrated into the same hardware platform as the conventional RPWM system without additional circuitry. The neural-network inference runs as a lightweight feed-forward operation on the existing controller, resulting in an estimated computational increase of only ≈ 3% and a total cost impact below 1%. This validates the claim in the abstract that the proposed method does not introduce a meaningful cost increase while improving harmonic suppression and EMI performance.
Although the study is simulation-based, the ANN-RPWM algorithm is readily deployable in real-time hardware. The feed-forward structure enables deterministic computation with an estimated execution time of ≈ 3 μs per switching cycle on a 200 MHz digital signal processor (DSP).
The controller requires no additional sensors or switching devices. Implementation can be realised using existing PWM modules with minor firmware modification. Future work will focus on hardware-in-loop testing using Software tool (dSPACE) and experimental validation on a 5 kVA three-phase VSI prototype driven by a Texas Instruments TMS320F28379D DSP will be used to reproduce the MATLAB/Simulink conditions equipped with a passive LC output filter and standard voltage and current sensing circuits. Conducted EMI and THD measurements will be performed using a line impedance stabilisation network (LISN) and a spectrum analyser in accordance with CISPR 16-1 standards. This hardware arrangement will enable direct comparison between simulated and experimental results, providing practical verification of the ANN-RPWM controller’s effectiveness in reducing EMI and harmonic distortion.
This study presents a novel three-phase VSI controller that enhances harmonic spreading in RPWM by integrating an ANN trained via feedforward/backpropagation. The ANN generates an additional modulation signal combined with dual random triangular carriers to produce switching pulses for an LC-filtered VSI, all while using a minimal six-switch configuration.
PSD analysis confirms the method’s effectiveness in evenly reducing acoustic noise and lowering THD to meet EMC standards. This leads to reduced motor vibrations, decreased heating in power converters and improved harmonic suppression, supporting smoother grid integration with renewable energy. Future research will focus on real-time experimental validation, adaptive recurrent neural implementations for dynamic load variation and exploration of multi-objective optimisation to balance EMI suppression with switching losses.