*(This project is Transformer Core Optimization using Genetic Algorithm. Reader can take a quick introduction of Genetic Algorithm)*

**Magnetic Core Optimization using Genetic Algorithm (GA)**

## Problem Statement:

For the magnetic circuit shown, a coil with 487 turns is wound on the left leg of the c-core with 3 Amperes current supplied to it. Assuming the core is made from iron that is behaving linearly with a relative permeability of 5600. The main objective is to have exactly 1.1 Tesla of magnetic flux density in the air gap center lines as shown. We can assume coordinates at the defined points and is also assumed that the magnetic circuit has one unit depth. Using Genetic Algorithm, optimize the size of the magnetic circuit to achieve the smallest possibly volume while maintaining the overall shape.

**Problem Description:**

The problem is to design the core of a transformer shown in the figure 1 below utilizing a Genetic Algorithm. The main objective is to find the smallest size that would produce a desired ** Flux Density = 1.1 Tesla** in the gap between the two core halves. A sectional view of half of the core transformer is shown in Fig. 1. Design parameters for optimization are given below:

- D: external width
- C: external height
- W: internal width
- H: internal height
- r: width of the core leg where the air gap is
- x: width of the core leg where the air gap is not
- y: width of the core leg top and bottom.
- g: gap distance

The MMF is given

MMF = N*I = 487*3 = 1461 AT---------------- (1)

The relative permeability (μr) is 5600 for the core iron.

The core cross sectional area and air gap area are both set equal. Moreover, the width of the core legs are going to be assumed equal r=x=y. Also, the deep of the core is constant, then will be consider 10cm. The only way to vary the cross-sectional Area of the core is changing “r”.

**Objective Function:**

In order to make optimization, a multi-objective function is chosen to:

**Minimize the magnetic path length through the core and the air gap, to minimize the volume****Minimize the Error of the flux density**

Fitness Function =B_{error}^{2}+ VolumeBB_{error}=_{desired}- B_{calculated }

## Solution:

The magnetic circuit has two different reluctances; the core reluctance (R_{c}) and air gap reluctance (R_{a}) which can be calculated by equations (2) and (3):

Where,

The flux density B can be calculated by:

So,

substituting into above equation:

However, the relative permittivity 5600 compare to 1 is very big, so:

Then, the fitness function for the minimization of the error of the flux density is:

Then:

For the minimization of the volume we need to consider the volume in the fitness function. Then:

Let the depth constant, and equal to unity:

The depth is 0.1 meters constant. Then:

Now, Here are the specifications for the Genetic Algorithm optimization,

To perform the optimization with real dimension, certain criteria need to be considered. For example, the core needs to be reflected in the equations:

Then, the new fitness functions will be:

Where k1 and k2 are the weights if it is desired to make particular objective more prominent. In such cases, it is necessary to make an IF clause, in which if H or W are less than 10cm then, the fitness function is penalized. If not, then the optimization continues.

**Matlab Code:**

The following formulation is used to optimize the transformer core size in this particular problem.

function f = objfun(x) C = x(1); D = x(2); r = x(3); A = x(4); miu_o = 4*pi*10e-7; miu_r = 5600; N =487 ; I = 3; k1 = 1; k2 = 1; Bdesired = 1.1; Ltotal = 2*(C+D)-4*r; gap=A; H=C-2*r; W=D-2*r; % just to evaluate the real cases if H < 0.1 || W < 0.1 f = 100; else Volume= Ltotal*r*0.2 % the depth is one unit in centimeters B = N*I*miu_o*miu_r /(Ltotal + gap*miu_r) f1 = k1*(Bdesired - B)^2; %the goal of magnetic density f2 = k2*Volume; f = f1+f2; %f=f1; end

**Results:**

**1. Optimization considering **__B = 1.1 T__ and __Volume:__

__B = 1.1 T__and

__Volume:__

**2. Optimization considering B = 1.1 T only**

**Conclusion:**

As it can be seen from the values, the optimization considers to get the value of 1.1Tesla in the center of the air gap and also to minimize the volume of the core. Two different tests were performed:

- For the first optimization, considering the volume and the flux density, we got a value of B very similar to the desired (1.0979T), but the volume is less (0.0180 m
^{3}). - For the second optimization, considering the flux density only, we got the exact value of B (1.1 T), but the volume is higher (0.0691 m
^{3}).

Feel free to comment below or contact us for any assistance. Stay tuned with us and like our Facebook page for more.