4. MatLab implementation of the proposed model

MatLab Simulink simulation software is frequently used in a large area of engineering fields like communications, electrical engineering, mechanical engineering, digital image processing, and others, both for research and education [17, 18].

Figure 3. The electrical distribution network implemented in MatLab Simulink before the reactive power compensation.

In this chapter, the proposed mathematical model was validated using Matlab Simulink. The electrical network presented in Figure 2 was modeled in Simulink, Figure 3, as follows:

The electrical system was modeled using a 110-kV three-phase balanced source having Y grounded connection.

The electrical overhead lines (OHL) and cables are modeled using three-phase PI section lines. The line parameters resistor (R), inductor (L), and capacitor (C) are specified as positive- and zero-sequence parameters that take into account the inductive and capacitive couplings between the three-phase conductors, as well as the ground parameters. This method of specifying line parameters assumes that the three phases are balanced.

A three-phase two windings transformer model is used for all the transformers of the network. The connection of the windings is Y grounded for high voltage (110 kV) and D for medium voltage (20 and 6 kV). The parameters can be written in pu units or SI units. Changing the Units parameter from pu to SI, or from SI to pu, automatically converts the parameters displayed in the mask of the block.

The loads are modeled using parallel R L C circuits defined by active and reactive powers. Only the elements corresponding to non-zero powers are displayed. In this example, the reactive power of the loads is inductive reactive power.

This model is used for the steady-state operation condition before the capacitor bank switching.

Figure 4 presents the MATLAB Simulink model of the electrical distribution network with the capacitor bank for power factor correction connected in bus No.3. The capacitor bank is modeled as a capacitive load defined by the capacitive reactive power.

A detail of the compensation bus is presented in Figure 5. Here, the harmonic current sources for the 5th, 7th, and 13th harmonics are presented. These are ideal current sources having the following parameters: peak amplitude, phase, and frequency. A three-phase measurement

Figure 4. The electrical distribution network implemented in MatLab Simulink after the reactive power compensation.

MatLab Simulink Modeling for Network-Harmonic Impedance Assessment: Useful Tool to Estimate Harmonics… 15 http://dx.doi.org/10.5772/intechopen.76461

Figure 5. Details of the compensation bus.

Figure 6. Harmonic impedance before the compensation.

block for both voltages and currents are also inserted in the model. The user can choose phaseto-phase or phase-to-ground measuring. Knowing the harmonic currents and harmonic voltages, the total harmonic distortion (THD) factor both for voltage and current can be calculated.

The harmonic impedance of the network is measured using a dedicated block named "Impedance Measurement" which measures the impedance in a bus of the network as a function of the frequency (harmonic impedance). The harmonic impedance (magnitude and phase) is displayed by using the appropriate tool from the Powergui block. The results obtained in the two cases are presented in Figures 6 and 7.

In order to highlight the influence of the capacitor reactive power amounts on the values of the harmonic impedance, the following compensation steps are considered: 0.2, 0.3, and 0.4 MVAr. Corresponding to these steps of the capacitor reactive power, the resonance frequency is much lower, while the reactive power increases: 404 Hz for 0.4 MVAr, 460 Hz for 0.3 MVAr, and 550 Hz for 0.2 MVAr. The results are presented in Figure 8.

The influence of the load active power is also interesting to study. For a constant reactive power of compensation (0.3 MVar), the resonance frequency does not change, but the

Figure 7. Harmonic impedance after the compensation.

Figure 8. The influence of the amount of reactive power compensation.

MatLab Simulink Modeling for Network-Harmonic Impedance Assessment: Useful Tool to Estimate Harmonics… 17 http://dx.doi.org/10.5772/intechopen.76461

Figure 9. The influence of the amount of load active power.

Figure 10. Voltages waveforms in bus 3 after the capacitor bank switching.

Figure 11. Currents waveforms in bus 3 after the capacitor bank switching.

amplification factor is changing. For different values of the load active power (1, 1.5, and 2.5 MW), the harmonic impedance has different values (22.8, 17.32, and 11.7 Ω) and the resonance frequency has a constant value: 460 Hz. The results are presented in Figure 9. Changes of the load reactive power do not influence the results of the harmonic impedance.

Scopes are installed for both voltage and current. The results for time-domain simulation for one cycle (0.02 s), after switching the capacitor bank, are presented in Figure 10 for voltages and in Figure 11 for currents.
