## 2 Materials and Methods
### Development of a Simulation Model of the Traction Drive Without a Control System
The comprehensive model (Figure 6) employs the Controlled Voltage Source component from the MATLABB18b/Simscape/Specialized Power Systems library to implement the power section of the reactive power compensator. The traction drive is powered by a DC link. In the integrated model (Figure 6), the DC link is represented by the DC Voltage Source element from the MATLABB18b/Simscape/Specialized Power Systems library. The value of the DC Voltage Source corresponds to the nominal instantaneous line voltage of the asynchronous motor 2642 B. The Id signal is used to calculate the active power consumed by the traction drive. It is measured using an ammeter connected to the inverter's power supply circuit. To prevent the penetration of alternating current components into the DC link, a large-capacitance capacitor is typically connected in parallel with the inverter terminals. However, in the MATLABB18b/Simscape/Specialized Power Systems environment, it is not feasible to connect a capacitor directly in parallel with the DC Voltage Source element. As an alternative, a low-pass RC filter can be employed, with a cut-off frequency lower than that of the first harmonic. In such a filter, resistor R is connected in series with the _DC Voltage Source_, while capacitor C is connected in parallel. Nevertheless, placing R in series introduces additional power losses, which in turn leads to errors in determining the actual power drawn by the traction drive from the DC link. In the simulation model (Figure 6), the operation of the low-pass filter is emulated by a first-order aperiodic circuit placed downstream of the ammeter. The time constant of this aperiodic circuit is set to 0.05 s, which corresponds to a low-pass filter cut-off frequency of 20 Hz. To obtain the values of the stator phase voltages, we used voltmeters with a parallel connection of resistors r_ad with resistances of 10 k\(\Omega\). To display the simulation results, we used the elements of MATLABB18b/Simulink \"Scope\" library. The values of the stator phase currents are displayed in \"Scope Isa_Isb_Isc\", the values of the torque are displayed in \"Scope Tem\", and the values of the shaft rotation frequency of the induction motor are displayed in \"Scope nr\". Since the focus of this study is the damping of higher-order harmonics in the stator phase voltages, it is proposed to implement the compensator's power circuit using a controlled voltage source. The control voltage applied to the input of the controlled voltage source, exemplified for phase \(a\), is determined as follows:  
\[\mathrm{U_{Ca}}=\mathrm{u_{ha}}-\mathrm{U_{a}}, \tag{9}\]  
where \(\mathrm{u_{ha}}\) is the voltage coming from the reactive power compensator control system. In the general form, the transfer function of a fifth-order filter can be described by Equation (8). As demonstrated in Appendix A, both the numerator and denominator coefficients of the transfer function change when converting a low-pass prototype filter to a high-frequency filter, since these coefficients are functions of the cut-off angular frequency. When the supply voltage frequency changes, the filter's cut-off frequency also varies, resulting in corresponding changes to the numerator and denominator coefficients. Figure 7 presents the simulation model of the high-frequency filter, in which the transfer function coefficients are expressed as functions of the prototype filter parameters and the instantaneous supply frequency [41]. The simulation model of the high-frequency filter was developed in the MATLAB18b/Simulink environment. To switch from one filter type to another, it is necessary to replace the prototype filter coefficients within the \"Unit for calculating the denominator of the transfer function of the filter\" and the \"Unit for calculating the numerator of the transfer function of the filter.\"  
The DS-3 series electric locomotive, the traction drive of which is used in this study as a prototype, is operated with the use of field-oriented control.