 Next Article in Journal
Air Distribution and Air Handling Unit Configuration Effects on Energy Performance in an Air-Heated Ice Rink Arena
Next Article in Special Issue
Optimization of the Contracted Electric Power by Means of Genetic Algorithms
Previous Article in Journal
An Active Common-Mode Voltage Canceler for PWM Converters in Wind-Turbine Doubly-Fed Induction Generators
Previous Article in Special Issue
A Two-Stage Feature Selection Method for Power System Transient Stability Status Prediction

Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

# Quadrature Current Compensation in Non-Sinusoidal Circuits Using Geometric Algebra and Evolutionary Algorithms

Department of Engineering, University of Almeria, 04120 Almeria, Spain
*
Author to whom correspondence should be addressed.
Energies 2019, 12(4), 692; https://doi.org/10.3390/en12040692
Received: 10 January 2019 / Revised: 12 February 2019 / Accepted: 18 February 2019 / Published: 21 February 2019
(This article belongs to the Special Issue Optimization Methods Applied to Power Systems)

## Abstract

:
Non-linear loads in circuits cause the appearance of harmonic disturbances both in voltage and current. In order to minimize the effects of these disturbances and, therefore, to control the flow of electricity between the source and the load, passive or active filters are often used. Nevertheless, determining the type of filter and the characteristics of their elements is not a trivial task. In fact, the development of algorithms for calculating the parameters of filters is still an open question. This paper analyzes the use of genetic algorithms to maximize the power factor compensation in non-sinusoidal circuits using passive filters, while concepts of geometric algebra theory are used to represent the flow of power in the circuits. According to the results obtained in different case studies, it can be concluded that the genetic algorithm obtains high quality solutions that could be generalized to similar problems of any dimension.

## 1. Introduction

The introduction of distributed generation and microgrids in power networks allow an efficient energy management and integration with renewable energy sources . However, these grids include an increasing number of power electronic devices and non-linear electronic loads, such as power inverters, cycloconverters, speed drives, batteries, household appliances, among others. These non-linear loads increase the harmonic disturbances both in voltage and current, causing detrimental effects to the supply system and user equipment . In consequence, these grids are seriously affected by events that degrade the power quality , and provoke excessive heating, protection faults, and inefficiencies in the transmission of energy , hence it becomes a critical task to determine precisely the electrical energy balances on the microgrid.
Different authors have presented models and theories in the past [5,6,7], but while all of them coincide in the study of the sinusoidal case, there is some controversy in the analysis of non-sinusoidal systems with a high harmonic content, such as modern microgrids. In particular, well-known theories, such as those proposed by Budeanu  and Fryze , have been questioned by different authors after demonstrating inconsistency and errors [10,11,12]. Therefore, it is important to investigate how to improve the compensation of the power factor in non-sinusoidal systems in the presence of harmonics. Some investigations have highlighted that algorithms for calculating the parameters of filters have rarely been discussed , although in recent years some authors have applied computational optimization methods, including meta-heuristic approaches, for optimizing filter parameters in circuits having harmonic distortion [2,14,15,16]. More specifically, genetic algorithms have been successfully applied in [17,18,19].
In this paper, an evolutionary algorithm is used to optimize the type and characteristics of passive filters for power factor compensation. The rest of the paper is organized as follows: Section 2 introduces some basic ideas about geometric algebra and its application to power systems. Section 3 describes the problem at hand and the genetic algorithm used as solution method. Section 4 presents the empirical study, while the main conclusions obtained are detailed in Section 5.

## 2. Geometric Algebra and Power Systems

Traditionally, electrical engineers have been taught to solve sinusoidal electrical circuits using complex number algebra, exactly as Steinmetz theory  introduced in the 19th century. It stated that differential equations in time domain can be transformed into algebra equations in complex domain. Under these assumptions, the apparent power can be expressed as:
$S → = U → I → * = P + j Q$
where P is the active power, Q is the reactive power, and j is unit imaginary number.
The limitations of the algebra of complex numbers and the impossibility to apply the principle of conservation of energy to the apparent power quantity  have caused some researchers to propose alternative circuit analysis techniques, including those based on geometric algebra .

#### 2.1. Basic Definitions of Geometric Algebra

Geometric algebra has its origins in the work of Clifford and Grassman in the 19th century and is considered as a unified language for mathematics and physics. It is based on the notion of an invertible product of vectors that captures the geometric relationship between two vectors, i.e., their relative magnitudes and the angle between them . Some investigations have defined the properties of geometric algebra [24,25] applied to physics and engineering. Traditional concepts such as vector, spinor, complex numbers, or quaternions are naturally explained as members of subspaces in geometric algebra. It can be easily extended in any number of dimensions, this being one of its main strengths. Because these are geometrical objects, they all have direction, sense, and magnitude. The basics of GA properties are based on well established definitions around vectors. For example, a vector $a = α 1 e 1 + α 2 e 2$ (a segment with direction and sense) can be multiplied by a vector $b = β 1 e 1 + β 2 e 2$ in different ways, so the result has different meanings. In (2), the inner product is defined and the result is a scalar.
$a · b = ∥ a ∥ ∥ b ∥ cos φ = ∑ α i β i$
In (3) a new product is defined, the wedge product. The main difference with its cousin the outer product (see Figure 1) is that the result is neither a scalar nor a vector, but a new quantity called bivector.
$a ∧ b = ∥ a ∥ ∥ b ∥ sin φ e 1 e 2$
A bivector is known to have direction, sense and magnitude in the same way a vector has. It defines an area enclosed by the parallelogram formed by both vectors (see Figure 2). This product complies with the anti-commutative property, i.e., $a ∧ b = − b ∧ a$. A bivector is a key concept in geometrical algebra and cannot be found in linear algebra or vector calculus. The outer product of two vectors produces a new entity in a plane that can be operated like vectors, i.e., addition, product, or even inverse. Like vectors, a bivector can be written as the linear combination of a base of bivectors.
Finally, the third product between vectors is defined in (4) as the geometric product and can be described as one of the major contributions in geometric algebra. Not only can vectors be multiplied geometrically, but bivectors and other entities, in general, can be used.
$a b = a · b + a ∧ b$
The result is a linear combination of the inner product and the wedge product. Equation (4) can be expanded to further find out new insights.
$A = a b = 〈 A 〉 0 + 〈 A 〉 2 = ( α 1 β 1 + α 2 β 2 ) + ( α 1 β 2 − α 2 β 1 ) e 1 e 2$
where $〈 A 〉 0$ is the scalar part and $〈 A 〉 2$ is the bivector part.

#### 2.2. Application of Geometric Algebra to Power Systems

Recently, several researches have proven that geometric algebra or Clifford algebra is a powerful and flexible tool for representing the flow of energy or power in electrical systems [22,26]. Some authors have motivated the use of power theory based on geometric algebra as Physics’ unifying language, such that electrical magnitudes can be interpreted as Clifford multivectors . More specifically, Clifford algebra is a valid mathematical tool to address the multicomponent nature of power in non-sinusoidal contexts [28,29,30] and has been used for analysis of harmonics .
The concept of non-active, reactive, or distorted power acquires a meaning that is more in line with its mathematical significance, making it possible to better understand energy balances and to verify the principle of energy conservation. Nevertheless, some authors have highlighted that the verification of the energy conservation law is only possible in sinusoidal situations . To overcome these drawbacks, these authors proposed a new circuit analysis approach using geometric algebra to develop the most general proof of energy conservation in industrial building loads, with capability of calculating the voltage, current, and net apparent power in electrical systems in non-sinusoidal situations.
Different authors have proposed definitions to represent non-active power for distorted currents and voltages in electrical systems, although no single representation has been universally accepted. For example, in  a non-active power multivector from the most advanced multivectorial power theory based on the geometric algebra with the aim of analyzing the compensation of disturbing loads is presented, including the harmonic load compensation, identification, and metering between other applications. Other researches have shown that geometric algebra can be applied to analyze the apparent power defined in a poly-phase system having transmission lines with frequency-dependency under non-sinusoidal conditions .

#### Geometric Apparent Power

As several authors have shown, the use of apparent power loses its meaning under non-sinusoidal conditions, involving erroneous calculation of energy flows between the load and source. In contrast,  proposes the use of a new term called net apparent power or geometric apparent power $M$. This concept is the result of the geometric product of voltage and current in $G N$ domain (6).
$M = ui = u · i + u ∧ i$
which results in a scalar and a bivector when the voltage and current are sinusoids
$M = 〈 M 〉 0 + 〈 M 〉 2$
It can be easily shown from (1) and (7) that
$P = 〈 M 〉 0 Q = ∥ 〈 M 〉 2 ∥$
so $〈 M 〉 0$ is the active power derived from the scalar part and $∥ 〈 M 〉 2 ∥$ is the reactive power derived from the bivector part of the net apparent power multivector.
For the non-sinusoidal case, i.e., when harmonics are present in the voltage and/or current, the apparent power loses its validity and only $M$ can reflect the exact flow of energy in the circuit. Consider a general voltage waveform $u ( t )$
$u ( t ) = ∑ i = 1 n u i ( t ) = α 1 cos ( ω t ) + β 1 sin ( ω t ) + ∑ h = 2 l α h cos ( h ω t ) + ∑ h = 2 k β h sin ( h ω t )$
that we can transfer to the geometric domain using 
$φ c 1 ( t ) = 2 cos ω t ⟷ e 1 φ s 1 ( t ) = 2 sin ω t ⟷ − e 2 φ c 2 ( t ) = 2 cos 2 ω t ⟷ e 2 e 3 φ s 2 ( t ) = 2 sin 2 ω t ⟷ e 1 e 3 ⋮ φ c n ( t ) = 2 cos n ω t ⟷ ⋀ i = 2 n + 1 e i φ s n ( t ) = 2 sin n ω t ⟷ ⋀ i = 1 i ≠ 2 n + 1 e i$
where $⋀ e i$ represents the product of n vectors and the subscripts c and s denote cosine and sine, respectively. Using (10), any waveform $x ( t )$ can be translated to the geometric domain $G N$, so the final result for the voltage is
$u = α 1 e 1 − β 1 e 2 + ∑ h = 2 l α h ⋀ i = 2 h + 1 e i + ∑ h = 2 k β h ⋀ i = 1 , i ≠ 2 h + 1 e i$
In (11), the transformation given in  has been used and is reproduced here to make this paper more readable.  also demonstrates that the admittance of typical passive load is $Y h = G h + B h e 1 e 2$, so the harmonic current associated to h-th voltage harmonic is
$i h = ( G h + B h e 1 e 2 ) u h$
and the total current
$i = ∑ h = 1 n i h = i g + i b$
where $i g$ is the in-phase current where $i b$ is the quadrature current. The geometric apparent power is then
$M = ui = M g + M b = P + CN d + M b$
where $M g$ is the in-phase geometric apparent power, $CN d$ is the degraded power (summation of cross-frequency products between voltage and current) and $M b$ is the quadrature geometric apparent power.
Based on Equations (8) and (14), the power factor in $G N$ domain can be defined as
$p f = P M = M 0 M † M 0$
in contrast to the clasical approach where $S$ is used. As demonstrated by , $S$ and $M$ are different concepts for non-sinusoidal scenarios, but reduces to the same in the sinudoidal case. Other power theories like Czarnecki’s based their power factor definition on the concept of apparent power $S$, so it leads to different power factor results in non-sinusoidal situations.

## 3. Problem Description and Solution Strategy

This section describes the proposed problem in this research and details the characteristics of the genetic algorithm used to solve it.

#### 3.1. Problem Description

Power systems operating under harmonic distortion must be optimized to reduce power losses and improve power quality [36,37]. Whether the system is linear or non-linear, it is necessary to provide reactances in parallel with the load in order to reduce these harmonics. The typical design of compensators is based on the knowledge of the susceptances of the system to different frequencies , something that is not easy to achieve when you have highly distorted systems. The main objective of non active power compensation is to minimize the source root mean square (RMS) current . However, it is not a trivial task since it involves to determine which type of filter and characteristics of their components is more suitable for compensation purposes in a given circuit. For example, a capacitor with an optimal value connected in parallel to the load is an easy solution but this does not produce the absolute minimum of the distortion power , while other alternatives could improve it.
Some studies have highlighted that algorithms for calculating the parameters of filters has not been studied in detail , although some authors have implemented optimization algorithms for optimizing the configuration of the filters in circuits having harmonic distortion. For example, in  it was proposed a genetic algorithm to minimize current total harmonic distortion using LC passive harmonic filters. Other recent studies have applied swarm intelligence methods to comparatively evaluate single-tuned, double-tuned, triple-tuned, damped-double tuned, and C-type filters in order to improve the loading capability of a set of transformers under non-sinusoidal conditions . In addition to the use of passive filters, some studies proposed algorithms for estimating the optimal parameters of active and hybrid filters. For example, in  it was proposed the use of direct neural intelligent techniques to improve performance of a shunt active filters. In other recent studies, it has been proposed the use of differential evolution (DE) algorithms to optimize the parameters of hybrid filters (combining active and passive filters) in order to minimize harmonic pollution . The problem to be solved involves the determination of the most suitable type of passive filter and its parameters to minimize the source RMS current $I s$ in order to get the optimal value $I s c p$.

#### 3.2. Solution Approach

Genetic algorithms are optimization methods based on principles of natural selection and genetics . Figure 3 shows the flowchart describing the operation of the genetic algorithm. It consists of a set (population) of solutions, each of which is called individual or phenotype, that evolve to reach solutions of high quality in terms of a fitness function. As an initialization step, a genetic algorithm randomly generates a set of solutions to a problem (a population of genomes). As Figure 4 shows, each individual is represented by a string of real numbers. Specifically, the data structure of each individual consists of three possible values for inductors L (Henry) and three possible values for capacitors C (Farad). All or some of these values will be considered in the optimization process depending on the filter choosed, which will be specified in the FT field (filter type), as described below. The actual values that can be assigned to inductors and capacitors are preset between two limits (upper and lower), so that the search space of the evolutionary algorithm is limited within reasonable margins. After calculating the fitness values for all solutions in a current population, the individuals for mating pool are selected using the operator of reproduction according to a given fitness function defined for the problem to be solved. In our problem the fitness function is
$m i n f ( L , C ) = I s ( L , C )$
where $I s$ is the source current calculated according to geometric algebra operations. These selection strategies aim to introduce a certain degree of elitism in the population. These solutions evolve by applying mutation and crossover operators that modify the genotype of the individuals. Offspring solutions substitute some old solutions of the population, and the new generation of individuals repeats the evolution process until a termination criterion is fulfilled (e.g., a maximum number of generations has been reached).
In this paper we have adapted a genetic algorithm solver for mixed-integer or continuous-variable optimization, constrained or unconstrained, included in the MATLAB Global Optimization Toolbox . This toolbox allows to solve smooth or non-smooth optimization problems with constraints using different mutation and crossover operators. The original source code has been adapted to deal with the problem at hand. It also has been adapted to take into account the particularities of the proposed problem through GA. More specifically, an opensource implementation of GA “Clifford multivector toolbox” has been used, available at https://sourceforge.net/projects/clifford-multivector-toolbox/. A preliminary sensitivity analysis has been performed to determine the parameters of the algorithm, such that the values used in our study are: Population size: 100 individuals; crossover rate: 0.8; mutation rate: 0.2; selection criteria: roulette wheel selection; termination criteria: 50 iterations.

## 4. Empirical Study

This section presents the results obtained by the genetic algorithm in three different case studies.

#### 4.1. Case Studies

• Czarnecki’s case study : this example consists of simple circuit with a harmonic polluted ideal voltage source of normalized frequency $ω = 1$ rad/s
$u ( t ) = 100 2 cos t + 50 2 cos 2 t + 30 2 cos 3 t$
with an active power $P = 344.23$ W. Figure 5a shows the circuit load, while Figure 5b shows the solution found by Czarnecki with $L 1 = 5.906$H, $L 2 = 19$H, $C 1 = 0.034$F, and $C 2 = 0.012$F, who compensates the reactive power of the harmonic components by the 1-port X of a precalculated admitance. The method proposed by Czarnecki was able to compensate the source RMS current to 3.10 A from the initial 12.24 A .
Using (10), the voltage in $G N$ domain can be expressed as
$u = 100 e 1 + 50 e 23 + 30 e 234$
• Castro-Nuñez and Castro-Puche’s case study : this example (already studied by Czarnecki) consists of a circuit with a highly distorted voltage source with fundamental plus 2 harmonics and a linear load, being the voltage
$u ( t ) = 100 2 sin t + 100 11 2 sin 11 t + 100 13 2 sin 13 t$
which translates to
$u = − 100 e 2 + 100 11 ⋀ i = 1 , i ≠ 2 12 e i + 100 13 ⋀ i = 1 , i ≠ 2 14 e i$
where the uncompensated current is 44.72 A. Figure 6a shows the circuit with the distorted voltage source and the linear load, while Figure 6b displays the compensator for this linear load. The compensator design by Castro-Nuñez reduced the source RMS current to 20.10 A .
• Castilla’s case study : this example consists of a circuit with a distorted voltage source with three harmonics given by:
$u ( t ) = 200 2 cos ω t + 200 2 cos ( 3 ω t − 30 ) + 100 2 cos ( 5 ω t + 30 ) .$
which translates to
$u = 200 e 2 + 100 3 e 234 + 100 e 134 + 50 3 e 23456 − 50 e 13456$
with an uncompensated RMS current of I = 4.21 A. Although the structure of this compensator was not described in the paper published by Castilla , this author indicated that it reduced the source RMS current to 3.21 A.

#### 4.2. Filter Optimization

The genetic algorithm has been adapted to manage different types of filters widely used in the literature for compensating purposes and mitigation of current harmonics. Based on Equation (12), the admittance for a general load $Y l$ and harmonic h, is equal to
$Y l h = G l h + B l h e 1 e 2 = G l h + B l h e 12$
If we connect a pure reactive impedance in parallel with the load for current compensation, its admittance $Y c p h$ will be
$Y c p h = B c p h e 12$
For example, if we choose a simple LC series compensator, we have
$Z h = X L h + X C h = − h L ω e 12 + 1 h ω C e 12 Y h = 1 Z h = 1 − h L ω + 1 h ω C e 12 = h w C h 2 ω 2 L C − 1 e 12$
So we need to make equal $B c p = − B l$ for every harmonic h to fully compensate the quadrature term. For the opmital case, the total current $i$ is reduced to $i g$ since $i b + i cp$ is equal to 0 after applying Kirchhoff laws.
Figure 7, Figure 8, Figure 9, Figure 10, Figure 11 and Figure 12 show the configurations used based on very well-known type of filters:
• C-type filter: it is is mainly used for suppressing the low order of harmonics .
• Series LC-type filter: this filter is also considered to reduce line current harmonics .
• Parallel LC-type filter: it provides low impedance shunt branches to the load’s harmonic current, which allows to reduce the harmonic current flowing into the line .
• Triple tuned filter: this type of filter is electrically equivalent to three parallel tuned filters connected in series .
• Foster’s filter: this filter combines in parallel single L-type and C-type filters and also parallel LC-type filters.
• Czarnecki’s 4-elements filter: it is a filter that combines two L and two C elements using a series/parallel configuration .

#### 4.3. Simulation Results

Table 1, Table 2 and Table 3 show the results obtained by the genetic algorithm in the three case studies described above, being the RMS current through the supply source the objective to be minimized. The best, mean, and standard deviation of 10 independent runs are provided.
As it can be seen in Table 1, in the case study proposed by Czarnecki , the filters “Triple tune”, “Foster”, and “Czarnecki 4” obtain high quality results, while “C-type”, “Series LC”, and “Parallel LC” filters are far from the optimal solution. Some similar conclusions are obtained when analyzing the date from Table 2, corresponding to the circuit proposed by Castro-Nuñez and Castro-Puche . It is important to point out that better results are obtained in the case of Castro-Nuñez with the same choice of compensator (20.02 A vs. 20.10 A), although Castro-Nuñez does not specify the criterion for choosing the values of the L and C components, apart from discretionary choosing an LC series type compensator. Finally, the analysis of the results provided in Table 3 regarding to the filter proposed by Castilla , indicate that “Triple tune”, “Foster”, “Czarnecki”, and the series LC-type filter obtain high quality solutions. In summary, the genetic algorithm is able not only to equal but also to slightly improve the results obtained in these three case studies, which demonstrates that evolutionary approaches can be used to compensate the source current in different circuits using a variety of filters.
Table 4 shows the optimal values achieved for the 3 cases of study and the 6 proposed filters. The optimal current is also included for readability purposes.
Table 5 shows a summary comparison for each of the problems solved showing current values without compensation $I s$, the optimum current that a passive filtering can achieve $I o p t$, provided by each author $I a u t h$, and the optimum current obtained by applying the technique used in this work $I G A c p$. The value of the power factor for each of the above situations is also indicated plus the power factor without compensation using GA, $P F G A$. It should be noted that the power factor may differ between what is calculated by complex numbers and what is calculated by geometric algebra due to the different nature of the apparent power $S$ and the geometric apparent power $M$. For the first case, the power factor is calculated as $P / S$ while for the second case it is $P / M$. For example, for the Czarnecki case study, the apparent power $S$ without compensating is worth 1417 VA while compensated is worth 358.8 VA. However, using geometric algebra the power $M$ is worth 1842 VA and compensated is worth 359.25 VA. It should be noted that the final result of the compensation is quite similar since the proposed example is of low complexity as it only has 3 harmonics and low order. If we take into account the case of Castro-Nuñez or Castilla, the power of the proposed method is verified since with only 2 elements (LC filter series) or 3 elements, an almost optimal compensated current is obtained, unlike the original proposal of the author where the filter involved has many more elements and, therefore, much less economic. It should also be noted that the methodology proposed by Castro-Núñez indicates the path to follow when it comes to compensate for the correct power terms, $M b$, which is not possible to cancel with the traditional power theory because it does not account for those terms arising from crossed products between voltage and currents.

## 5. Conclusions

In recent years, different authors have shown that geometric algebra, also known as Clifford algebra, can be applied to analyze electric circuits. Having in mind that different studies have shown that geometric algebra is more appropriate than the algebra of complex numbers for the analysis of circuits with non-sinusoidal sources and linear loads, this investigation is an important contribution in estimating the type of filter and its parameters to optimize the quadrature current in electrical circuits. This leads to the compensation of new power terms like quadrature apparent power $M b$ not included in the commonly accepted definition of electrical power standards. The traditional compensation of reactive power is exceeded by the compensation of cross products between current and voltage that have not been previously taken into account. The proposed approach is based on the use of a genetic algorithm, which is able to optimize the parameters of different types of passive filters. In particular, six widely used filters (single-tuned, double-tuned, triple-tuned, damped-double tuned, and C-type) were compared by regarding their contribution on the loading capability improvement of the transformers under non-sinusoidal conditions.
The results obtained in three test circuits found in the literature show that the application of genetic algorithms based on geometric algebra representations are powerful methods that are able to equal or even improve the results previously obtained by other authors using analytical methods. These results open the door to investigate the use of computational optimization methods for compensating the reactive power in complex circuits. As future work, it is planned to extend the analysis to larger circuits using these and other type of filters. Furthermore, multi-objective optimization methods will be considered to simultaneously optimize the reactive power compensation and to minimize the economic cost of the filters.

## Author Contributions

Conceptualization, F.G.M. and R.B.; Methodology, R.B.; Software, A.A. and F.M.A.-C.; Validation, A.A., R.B. and F.M.A.-C.; Formal Analysis, F.G.M.; Investigation, F.G.M. and A.A.; Resources, F.M.A.-C.; Data Curation, R.B.; Writing—Original Draft Preparation, R.B., F.G.M. and F.M.A.-C.; Writing—Review & Editing, F.G.M., A.A., F.M.A.-C. and R.B.; Visualization, F.G.M.; Supervision, F.G.M.; Project Administration, F.G.M. and A.A.

## Funding

This research received no external funding.

## Acknowledgments

The authors want to acknowledge the CEIA3 campus for the support on this work.

## Conflicts of Interest

The authors declare no conflict of interest.

## Appendix A. General Concepts

Given an ortho-normal base ${ σ k }$ with $k = 1 , ... , N$ for a vector space $R N$, it is possible to define a new space called geometrical algebra $G N$. This new space is characterized by bases not only composed of ${ σ k }$, but also of external products between these vectors. For example, in the case of a 3D Euclidean space, there is an ortho-normal base ${ σ 1 , σ 2 , σ 3 }$ where $σ n 2 = 1$. Applying the concept of Grassmann product or exterior product, you get
$σ l ∧ σ m = σ l σ m = σ l m$
which is a new entity, different from a scalar or a vector because
$( σ l ∧ σ m ) 2 = ( σ l σ m ) ( σ l σ m ) = σ l ( σ m σ l ) σ m = σ l ( − σ l σ m ) σ m = = − ( σ l σ l ) 2 ( σ m σ m ) 2 = − ( 1 ) ( 1 ) = − 1$
$σ l σ m$ squares to $− 1$ so we can conclude that we are facing a new element, which is called a bivector. In the same way, the external product of more than 3 vectors is called trivector, and in general, the product of k vectors is called k-vector. In this way, algebra $G 3$ can be developed with the base
${ 1 , σ 1 , σ 2 , σ 3 , σ 12 , σ 13 , σ 23 , σ 123 }$
Generally speaking, the elements of a geometric algebra are called multivectors ($M$) and can be expressed as a linear combination of the different bases
$M = 〈 M 〉 0 + 〈 M 〉 1 + 〈 M 〉 2 + ... + 〈 M 〉 n = ∑ k = 0 n 〈 M 〉 k$
where each $〈 M 〉 k$ is an element of grade k, representing scalars (grade 0), vectors (grade 1), bivectors (grade 2), or in general k-vectors (grade k).

## Appendix B. Geometric Operations

The geometric product is the cornerstone of geometric algebra and is indebted to the contributions of Grassman and Clifford. It is defined as the sum of the scalar product and the external product, and for the case of 2 vectors $v i$ and $v j$
$v i v j = v i · v j + v i ∧ v j$
for the base vectors $σ i$ and $σ j$ with $i ≠ j$, we get bivectors
$σ i σ j = σ i · σ j + σ i ∧ σ j = σ i ∧ σ j = σ ij$
base vectors anticommute for $i ≠ j$ because
$σ i σ j = σ i ∧ σ j = − σ j ∧ σ i = − σ ji$
On the other hand, unlike vectors which square to 1, bivectors square to −1
$σ ij σ ij = σ i σ j σ i σ j = − σ j σ i σ i σ j = − σ j σ j = − 1$
Finally, we detail some important operations that are used extensively in multivector operations. One of these properties is the reversion or $M d a g g e r$ which consists of
$M † = ∑ k = 0 n 〈 M † 〉 k = ( − 1 ) k ( k − 1 ) / 2 〈 M 〉 k$
The norm of a multivector $M$ ($∥ M ∥$) is always a scalar and can be obtained
$M = M † M 0 = M M † 0 = ∑ k 〈 〈 M 〉 k 〈 M † 〉 k 〉 0$

## References

1. Fang, X.; Misra, S.; Xue, G.; Yang, D. Smart grid—The new and improved power grid: A survey. IEEE Commun. Surv. Tutor. 2012, 14, 944–980. [Google Scholar] [CrossRef]
2. Merabet, L.; Saad, S.; Abdeslam, D.O.; Merckle, J. Direct neural method for harmonic currents estimation using adaptive linear element. Electr. Power Syst. Res. 2017, 152, 61–70. [Google Scholar] [CrossRef]
3. Bollen, M.H.; Das, R.; Djokic, S.; Ciufo, P.; Meyer, J.; Rönnberg, S.K.; Zavodam, F. Power quality concerns in implementing smart distribution-grid applications. IEEE Trans. Smart Grid 2017, 8, 391–399. [Google Scholar] [CrossRef]
4. Bouzid, A.M.; Guerrero, J.M.; Cheriti, A.; Bouhamida, M.; Sicard, P.; Benghanem, M. A survey on control of electric power distributed generation systems for microgrid applications. Renew. Sustain. Energy Rev. 2015, 44, 751–766. [Google Scholar] [CrossRef][Green Version]
5. Czarnecki, L.S.; Pearce, S.E. Compensation objectives and currents’ physical components-based generation of reference signals for shunt switching compensator control. IET Power Electron. 2009, 2, 33–41. [Google Scholar] [CrossRef]
6. Willems, J.L. Budeanu’s reactive power and related concepts revisited. IEEE Trans. Instrum. Meas. 2011, 60, 1182–1186. [Google Scholar] [CrossRef]
7. De Léon, F.; Cohen, J. AC power theory from Poynting theorem: Accurate identification of instantaneous power components in nonlinear-switched circuits. IEEE Trans. Power Deliv. 2010, 25, 2104–2112. [Google Scholar] [CrossRef]
8. Budeanu, C. Puissances Reactives Et Fictives; Number 2; Impr. Cultura Nationala: Bouchares, Romania, 1927. [Google Scholar]
9. Staudt, V. Fryze-Buchholz-Depenbrock: A time-domain power theory. In Proceedings of the 2008 International School on Nonsinusoidal Currents and Compensation (ISNCC 2008), Lagow, Poland, 10–13 June 2008; pp. 1–12. [Google Scholar]
10. Czarnecki, L.S. What is wrong with the Budeanu concept of reactive and distortion power and why it should be abandoned. IEEE Trans. Instrum. Meas. 1987, 1001, 834–837. [Google Scholar] [CrossRef]
11. Czarnecki, L. Budeanu and Fryze: Two frameworks for interpreting power properties of circuits with nonsinusoidal voltages and currents. Electr. Eng. 1997, 80, 359–367. [Google Scholar] [CrossRef]
12. Czarnecki, L.S. Currents’ physical components (CPC) concept: A fundamental of power theory. In Proceedings of the 2008 International School on Nonsinusoidal Currents and Compensation (ISNCC 2008), Lagow, Poland, 10–13 June 2008; pp. 1–11. [Google Scholar]
13. Xiao, Y.; Zhao, J.; Mao, S. Theory for the design of C-type filter. In Proceedings of the 2004 11th International Conference on Harmonics and Quality of Power, Lake Placid, NY, USA, 12–15 September 2004; pp. 11–15. [Google Scholar]
14. Biswas, P.P.; Suganthan, P.N.; Amaratunga, G.A. Minimizing harmonic distortion in power system with optimal design of hybrid active power filter using differential evolution. Appl. Soft Comput. 2017, 61, 486–496. [Google Scholar] [CrossRef]
15. Li, W.; Man, Y.; Li, G. Optimal parameter design of input filters for general purpose inverter based on genetic algorithm. Appl. Math. Comput. 2008, 205, 697–705. [Google Scholar] [CrossRef]
16. Karadeniz, A.; Balci, M.E. Comparative evaluation of common passive filter types regarding maximization of transformer’s loading capability under non-sinusoidal conditions. Electr. Power Syst. Res. 2018, 158, 324–334. [Google Scholar] [CrossRef]
17. Chen, Y.M. Passive filter design using genetic algorithms. IEEE Trans. Ind. Electr. 2003, 50, 202–207. [Google Scholar] [CrossRef]
18. Klempka, R. Passive power filter design using genetic algorithm. Praz. Elektrotech. 2013, 5, 294–301. [Google Scholar]
19. Lachichi, A.; Junyent-Ferre, A.; Green, T. filter design optimization for LV modular multilevel converters in hybrid ac/dc microgrids application. In Proceedings of the 2018 International Conference on Electrical Sciences and Technologies in Maghreb (CISTEM), Algiers, Algeria, 28–31 October 2018; pp. 1–5. [Google Scholar]
20. Steinmetz, C.P. Theory and Calculation of Alternating Current Phenomena; McGraw-Hill Book Company, Inc.: New York, NY, USA, 1916; Volume 4. [Google Scholar]
21. Castro-Núñez, M.; Londoño-Monsalve, D.; Castro-Puche, R. M, the conservative power quantity based on the flow of energy. J. Eng. 2016, 2016, 269–276. [Google Scholar] [CrossRef]
22. Castro-Nunez, M.; Castro-Puche, R. The IEEE Standard 1459, the CPC power theory, and geometric algebra in circuits with nonsinusoidal sources and linear loads. IEEE Trans. Circuits Syst. I Regul. Pap. 2012, 59, 2980–2990. [Google Scholar] [CrossRef]
23. Sangston, K.J. Geometry of complex data. IEEE Aerosp. Electr. Syst. Mag. 2016, 31, 32–69. [Google Scholar] [CrossRef]
24. Hestenes, D.; Sobcyk, G. Clifford Algebra to Geometric Calculus: A Unified Language for Mathematics and Physics (Fundamental Theories of Physics); Kluwer Academic Publishers: Aarhus, Denmark, 1987. [Google Scholar]
25. Chappell, J.M.; Drake, S.P.; Seidel, C.L.; Gunn, L.J.; Iqbal, A.; Allison, A.; Abbott, D. Geometric algebra for electrical and electronic engineers. Proc. IEEE 2014, 102, 1340–1363. [Google Scholar] [CrossRef]
26. Castro-Nunez, M.; Castro-Puche, R. Advantages of geometric algebra over complex numbers in the analysis of networks with nonsinusoidal sources and linear loads. IEEE Trans. Circuits Syst. I Regul. Pap. 2012, 59, 2056–2064. [Google Scholar] [CrossRef]
27. Petroianu, A.I. A geometric algebra reformulation and interpretation of Steinmetz’s symbolic method and his power expression in alternating current electrical circuits. Electr. Eng. 2015, 97, 175–180. [Google Scholar] [CrossRef]
28. Menti, A.; Zacharias, T.; Milias-Argitis, J. Geometric algebra: A powerful tool for representing power under nonsinusoidal conditions. IEEE Trans. Circuits Syst. I Regul. Pap. 2007, 54, 601–609. [Google Scholar] [CrossRef]
29. Castilla, M.; Bravo, J.C.; Ordonez, M. Geometric algebra: A multivectorial proof of Tellegen’s theorem in multiterminal networks. IET Circuits Devices Syst. 2008, 2, 383–390. [Google Scholar] [CrossRef]
30. Castilla, M.; Bravo, J.C.; Ordonez, M.; Montaño, J.C. Clifford theory: A geometrical interpretation of multivectorial apparent power. IEEE Trans. Circuits Syst. I Regul. Pap. 2008, 55, 3358–3367. [Google Scholar] [CrossRef]
31. Gilbert, J.E.; Gilbert, J.; Murray, M. Clifford Algebras and Dirac Operators in Harmonic Analysis; Cambridge University Press: Cmabridge, UK, 1991; Volume 26. [Google Scholar]
32. Bravo, J.C.; Castilla, M.V. Energy conservation law in industrial architecture: An approach through geometric algebra. Symmetry 2016, 8, 92. [Google Scholar] [CrossRef]
33. Castilla, M.V. Control of disturbing loads in residential and commercial buildings via geometric algebra. Sci. World J. 2013, 2013. [Google Scholar] [CrossRef]
34. Jeon, S.J. Representation of apparent power of non-sinusoidal multi-line power system using geometric algebra. Trans. Korean Inst. Electr. Eng. 2009, 58, 2064–2070. [Google Scholar]
35. Castro-Núñez, M.; Castro-Puche, R.; Nowicki, E. The use of geometric algebra in circuit analysis and its impact on the definition of power. In Proceedings of the 2010 International School on Nonsinusoidal Currents and Compensation (ISNCC), Lagow, Poland, 15–18 June 2010; pp. 89–95. [Google Scholar]
36. Henderson, R.D.; Rose, P.J. Harmonics: The effects on power quality and transformers. IEEE Trans. Ind. Appl. 1994, 30, 528–532. [Google Scholar] [CrossRef]
37. De La Rosa, F. Harmonics and Power Systems; CRC Press: Boca Raton, FL, USA, 2006. [Google Scholar]
38. El-Saadany, E.; Zeineldin, H. An optimum reactance one-port compensator for harmonic mitigation. Electr. Power Qual. Util. J. 2005, 11, 77–82. [Google Scholar]
39. Czarnecki, L.S. Minimisation of distortion power of nonsinusoidal sources applied to linear loads. In IEE Proceedings C-Generation, Transmission and Distribution; IET Digital Library: Hertfordshire, UK, 1981; Volume 128, pp. 208–210. [Google Scholar]
40. Holland, J.H. Adaptation in Natural and Artificial Systems: An Introductory Analysis with Applications to Biology, Control, and Artificial Intelligence; The MIT Press: Cambridge, MA, USA; London, UK, 1975. [Google Scholar]
41. Mathworks. Genetic algorithm solver. In MATLAB Global Optimization Toolbox; The MathWorks, Inc.: Natick, MA, USA, 2018. [Google Scholar]
42. Peng, F.Z.; Su, G.J.; Farquharson, G. A series LC filter for harmonic compensation of AC drives. In Proceedings of the 30th Annual IEEE Power Electronics Specialists Conference (PESC 99), Charleston, SC, USA, 1 July 1999; IEEE: Piscataway, NJ, USA, 1999; Volume 1, pp. 213–218. [Google Scholar]
43. Bartzsch, C.; Huang, H.; Roessel, R.; Sadek, K. Triple tuned harmonic filters-design principle and operating experience. In Proceedings of the International Conference on Power System Technology (PowerCon 2002), Kunming, China, 13–17 October 2002; IEEE: Piscataway, NJ, USA, 2002; Volume 1, pp. 542–546. [Google Scholar]
Figure 1. Outer product of vectors $a$ and $b$. The result is a vector $n$, perpendicular to the plane formed by $a$ and $b$.
Figure 1. Outer product of vectors $a$ and $b$. The result is a vector $n$, perpendicular to the plane formed by $a$ and $b$.
Figure 2. Representation of a bivector $a ∧ b$.
Figure 2. Representation of a bivector $a ∧ b$.
Figure 3. Flowchart of the genetic algorithm.
Figure 3. Flowchart of the genetic algorithm.
Figure 4. Chromosome representation for the population. Note that the genes are real values for L, C, and integer for FT (Filter Type).
Figure 4. Chromosome representation for the population. Note that the genes are real values for L, C, and integer for FT (Filter Type).
Figure 5. Load and compensator used by Czarnecki in .
Figure 5. Load and compensator used by Czarnecki in .
Figure 6. Circuit with distorted voltage source and a linear load used by Castro-Nuñez and Castro-Puche .
Figure 6. Circuit with distorted voltage source and a linear load used by Castro-Nuñez and Castro-Puche .
Figure 7. C-type filter.
Figure 7. C-type filter.
Figure 8. Series LC-type filter.
Figure 8. Series LC-type filter.
Figure 9. Parallel LC-type filter.
Figure 9. Parallel LC-type filter.
Figure 10. Triple tune filter.
Figure 10. Triple tune filter.
Figure 11. Foster’s filter.
Figure 11. Foster’s filter.
Figure 12. Czarnecki’s 4-elements filter.
Figure 12. Czarnecki’s 4-elements filter.
Table 1. Compensated root mean square (RMS) current ($I s c p$) obtained by the genetic algorithm in Czarnecki’s case study .
Table 1. Compensated root mean square (RMS) current ($I s c p$) obtained by the genetic algorithm in Czarnecki’s case study .
Type of Filter
CSeries LCParallel LCTriple TuneFosterCzarnecki 4
Best (A)12.24097.501512.72353.09543.09483.0987
Mean (A)12.24157.501712.72493.10403.10793.1454
Std. dev.0.00080.00020.00110.01240.01550.0468
Table 2. Compensated RMS current ($I s c p$) obtained by the genetic algorithm in Castro-Nuñez and Castro-Puche’s case study .
Table 2. Compensated RMS current ($I s c p$) obtained by the genetic algorithm in Castro-Nuñez and Castro-Puche’s case study .
Type of Filter
CSeries LCParallel LCTriple TuneFosterCzarnecki 4
Best (A)38.051120.027575.599920.028820.009420.0271
Mean (A)38.051320.031375.747620.566820.080720.0415
Std. dev.0.00030.00300.14110.70390.06170.0150
Table 3. Compensated RMS current ($I s c p$) obtained by the genetic algorithm in Castilla’s case study .
Table 3. Compensated RMS current ($I s c p$) obtained by the genetic algorithm in Castilla’s case study .
Type of Filter
CSeries LCParallel LCTriple TuneFosterCzarnecki 4
Best (A)3.79383.52363.82423.20243.21313.5268
Mean (A)3.79383.54373.82423.26133.27223.5313
Std. dev.0.00000.02100.00000.03690.03040.0067
Table 4. Optimal values for L, C achieved by the genetic algorithm for the 3 cases of study and the 6 proposed filters.
Table 4. Optimal values for L, C achieved by the genetic algorithm for the 3 cases of study and the 6 proposed filters.
CzarneckiCastro-NuñezCastilla
CSeries LCParallel LCTriple TuneFosterCzarnecki 4CSeries LCParallel LCTriple TuneFosterCzarnecki 4CSeries LCParallel LCTriple TuneFosterCzarnecki 4
$L 1$ (H)-10.211699.9950.79417.4575.906-1.9532.0000.2561.5111.977-15.653710.0000.08210.0009.998
$L 2$ (H)---0.7246.55519.000---0.0631.641----0.0726.6519.903
$L 3$ (H)---1.9205.945----0.0201.1980.320---0.0210.660-
$C 1$ ($μ$F)0.01043,373.49213.0128264,930.3862991.68934,530.000135,667.470224,040.6422304,711.7123650,723.11621,800.000172,388.2197.1570.6367.29120.0985.7972.079
$C 2$ ($μ$F)---106,280.56459,192.62712,880.000---985,889.243366,000.00050,406.350---165.4691.45116.065
$C 3$ ($μ$F)---586,142.76726,682.668----89,338.809107,600.000----21.4640.844-
$I opt$ (A)12.2407.50112.7233.0953.0943.09838.05120.02775.59920.02820.00920.0273.7933.5233.8243.2023.2133.526
Table 5. Comparison table for currents and power factor.
Table 5. Comparison table for currents and power factor.
CurrentPower Factor
$I s$$I opt$$I auth$$I GA cp$$PF s$$PF opt$$PF auth$$PF GA$$PF GA cp$
Czarnecki12.243.093.103.090.2430.9590.9590.1860.959
Castro-Nuñez44.7220.0020.1020.000.4450.9930.9880.4450.992
Castilla4.213.203.213.200.6300.8290.8290.6300.829

## Share and Cite

MDPI and ACS Style

Montoya, F.G.; Alcayde, A.; Arrabal-Campos, F.M.; Baños, R. Quadrature Current Compensation in Non-Sinusoidal Circuits Using Geometric Algebra and Evolutionary Algorithms. Energies 2019, 12, 692. https://doi.org/10.3390/en12040692

AMA Style

Montoya FG, Alcayde A, Arrabal-Campos FM, Baños R. Quadrature Current Compensation in Non-Sinusoidal Circuits Using Geometric Algebra and Evolutionary Algorithms. Energies. 2019; 12(4):692. https://doi.org/10.3390/en12040692

Chicago/Turabian Style

Montoya, Francisco G., Alfredo Alcayde, Francisco M. Arrabal-Campos, and Raul Baños. 2019. "Quadrature Current Compensation in Non-Sinusoidal Circuits Using Geometric Algebra and Evolutionary Algorithms" Energies 12, no. 4: 692. https://doi.org/10.3390/en12040692

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.