Open Access
This article is

- freely available
- re-usable

*Sensors*
**2015**,
*15*(12),
31781-31793;
https://doi.org/10.3390/s151229879

Article

GSA-Tuning IPD Control of a Field-Sensed Magnetic Suspension System

^{1}

Department of Electrical Engineering, Kun Shan University, 195 Kunda Road, Yongkang District, Tainan City 710, Taiwan

^{2}

Department of Electrical Engineering, Southern Taiwan University of Science and Technology, 1 Nan Ti Street, Yongkang District, Tainan City 710, Taiwan

^{*}

Author to whom correspondence should be addressed.

Academic Editor:
Andreas Hütten

Received: 24 August 2015 / Accepted: 11 December 2015 / Published: 16 December 2015

## Abstract

**:**

The purpose of this paper is to propose a GSA-tuning IPD control technique for magnetic suspension systems. An educational demonstration on a magnetic-field sensed magnetic suspension system is examined for effectiveness. For the magnetic-field sensed magnetic suspension system (FSMSS), the current transducer is employed for measuring the electromagnetic coil current, and a Hall effect device is used for detecting the position of the suspended object. To achieve optimal performance, the gravitational search algorithm (GSA) is adopted for tuning the integral-proportional-derivative (IPD) controller. The IPD control includes the specified PD controller and an integrator. The specified PD control is employed for stabilizing the inherently unstable FSMSS, whereas the integral control is utilized for eliminating the steady-state error. The GSA can tune the IPD control parameters to enable optimal FSMSS performance. We achieved excellent results from the simulations and hands-on experiments for the proposed control strategies and structures.

Keywords:

current transducer; magnetic field sensor; magnetic suspension system; gravitational search algorithm; IPD control## 1. Introduction

Magnetic suspension systems that use forces of attraction are called suspension techniques and those which use forces of repulsion are called levitation techniques [1]. For simplicity, magnetic suspension systems (MSSs) are also called “magnetic levitation systems” or “electromagnetic suspension systems”. An MSS includes electromagnetic coils, suspended objects, power amplifiers, feedback controllers, and sensors. The feedback controller constantly alters the current sent to electromagnets in order to alter the strength of the magnetic force, after which the stable levitation is maintained. Various sensors have been adopted for measuring MSS signals. For example, current transducers are employed for measuring electromagnetic coil currents. An infrared LED pair is used for detecting a suspended object. Hall Effect elements are utilized for sensing the strength of the magnetic field and also for detecting a suspended object. Magnetic suspension technology is critical for engineering applications. For instance, magnetic levitation (Maglev) trains are most commonly known for their application of magnetic levitation. Moreover, an active magnetic bearing for large turbomachinery entails an engineering application.

MSSs have been adopted for applications in engineering and science education. They are interesting devices for students. The MSS was the control engineering subject of an undergraduate project [2] by Wong in 1986. MSS projects have long been used in control system laboratories. Lundberg et al. [3,4] taught analysis and design in undergraduate feedback courses by employing an economical MSS setup. Gibbs and his son [5] created a levitating disco ball that was a miniature MSS for his fifth-grade science fair. In addition to hands-on experiments, they have garnered attention in electromagnetic theory. An MSS is naturally a seed of science.

The present study presents a type of miniature MSS. This MSS is named “field-sensed MSS” (FSMSS) [6] because the magnetic field sensor is adopted for measuring the position of a suspended object. This miniature MSS is used for experimental purposes. The MSS is a nonlinear and unstable system; hence, it is an appropriate device for testing various control techniques. Control techniques that have been adequately developed in this miniature MSS can be extended to related plants. Numerous control methods have been tested for the stability and performance of the MSS, including phase-lead compensation by Wong [2], a mixed linear quadratic regulator/H infinity control by Li and Chiou [6], integral-proportional-derivative (IPD) tracking control by Li [7], and adaptive proportional-integral-derivative (PID) control by Lin et al. [8].

If the characteristics of the controlled system are unknown, then a PID controller is generally considered the most popular of its type. The PID control was invented on the basis of the development of Sperry’s ship autopilot in 1911 [9]. This control attempts to minimize performance indices by adjusting the controller parameters. The PID controller involves three separate parameters and is accordingly occasionally referred to as the three-term control. The proportional control can reduce the rise time and increase the overshoot. However, the integral control can reduce or eliminate the steady-state error but degrades the stability. By contrast, the derivative control can reduce the overshoot but increases the rise time. However, properly tuning these parameters can yield effective transient and steady-state responses.

This study proposes the gravitational search algorithm (GSA) for IPD controller tuning. The GSA is a newly developed derivative-free global optimum search algorithm. The application of the IPD control of the MSS is an invention for use in engineering applications. The GSA is categorized as a type of swarm intelligence (SI) [10]. In fact, SI refers to the general set of algorithms. Examples of SI include particle swarm optimization (PSO) [11], ant colony optimization, the bee algorithm, bacterial colony optimization, and the GSA [12]. PSO is widely employed for PID controller optimization [8,13]. The GSA is a recent SI algorithm and was developed by Rashedi et al. [12]. This algorithm is based on Newton's laws of gravity and motion. The GSA is heuristic and is not based on any assumptions regarding optimal problems. The GSA iteratively attempts to improve a candidate solution regarding fitness. Therefore, the GSA can iteratively tune the IPD controller to achieve optimal performance (fitness). However, constraints exist in the IPD stability control of the FSMSS. This study investigated this issue in detail.

The remainder of this paper is organized as follows: Section 2 introduces a review of the IPD control of the FSMSS. Section 3 presents the GSA for tuning the IPD controller. Section 4 details the simulations of the proposed scheme. Section 5 provides the experiments and results. Finally, Section 6 offers a conclusion.

## 2. IPD Control of the FSMSS

Figure 1 shows a one dimensional MSS. The magnet is suspended in the air by the electromagnetic force generated by the electromagnet. Because the influences of other axes (y- and z- axes) are slight enough, it is ignored for dynamics. For simplicity, only vertical axis (x-axis) is considered for discussion. The general analog model of an MSS is given as follows [2,6,7]:
where m represents the mass of the suspended object, x is the distance between the electromagnet and the suspended object, g depicts gravitational acceleration, C is the force constant, and $i$ is the electromagnetic coil current. The SI unit of the force constant C is $N\cdot {m}^{2}/{A}^{2}$. By electromagnetic theory, the force generated by the electromagnet is $C{i}^{2}/{x}^{2}$ upwards. The gravitational force on the object is mg downwards. The friction is neglected in this study. By Newtonian mechanics, Equation (1) is derived and obtained.

$$m\frac{{d}^{2}x}{d{t}^{2}}=mg-C\frac{{i}^{2}}{{x}^{2}}$$

The digital model of an MSS is expressed as follows [6,7]:
where $\Delta X(z)$ is the z transform of $\Delta x$, and $\Delta I(z)$ represents that of $\Delta i$. The parameters are expressed as follows:
where T is the sampling period. Thus, Equation (2) can be modified as follows:
where $\rho $ is the linear factor of the position sensor (Hall Effect device), $\Delta \tilde{X}(z)$ is the z transform of the measured output $\Delta \tilde{x}$ of the position sensor, the parameter $\tilde{\sigma}$ represents $\sigma \rho \left({\beta}^{2}-1\right)/\beta $, and $\tilde{\beta}$ depicts $\beta +{\beta}^{-1}$. The summarized symbols of the FSMSS are listed in Table 1 for a simplified reading of the formulas.

$$G(z)=\frac{\Delta X(z)}{\Delta I(z)}=\frac{-z\sigma \left({\beta}^{2}-1\right)/\beta}{(z-\beta )\left(z-\frac{1}{\beta}\right)}$$

$${i}_{0}={x}_{0}\sqrt{\frac{mg}{C}},\beta ={e}^{T\sqrt{\frac{2C{i}_{0}^{2}}{m{x}_{o}^{3}}}}>1\mathrm{and}\sigma =\sqrt{\frac{C}{2m{x}_{o}}}$$

$$\tilde{G}(z)=\frac{\Delta \tilde{X}(z)}{\Delta I(z)}=\frac{\Delta \tilde{X}(z)}{\Delta X(z)}\cdot \frac{\Delta X(z)}{\Delta I(z)}=-\rho \cdot G(z)=\frac{z\sigma \rho \left({\beta}^{2}-1\right)/\beta}{(z-\beta )\left(z-\frac{1}{\beta}\right)}=\frac{z\tilde{\sigma}}{{z}^{2}-\tilde{\beta}z+1}$$

A block diagram of the tracking IPD control is displayed in Figure 2, and the PD control [6,7] is formulated as follows:

$${G}_{pd}(z)={K}_{d}{z}^{-1}(z+\varphi )$$

The stable conditions of ${K}_{d}$ and $\varphi $ were proposed in a previous study [6]. If the initial zero $z=-\varphi $ of the PD control is designed, then the stable range of ${K}_{d}$ can be obtained using the following formulas:
and:

$$\frac{\left(\beta -1\right)}{\sigma \rho \left(\beta +1\right)\left(1+\varphi \right)}<{K}_{d}<\frac{\left(\beta +1\right)}{\sigma \rho \left(\beta -1\right)\left(1-\varphi \right)}$$

$$\frac{-2}{{K}_{d}\tilde{\sigma}}<\varphi <0$$

Although the system parameters are unknown a priori, the initially stable settings of K

_{d}and $\varphi $ can be derived easily from a previous study [6]. To eliminate the steady-state error of $\Delta \tilde{x}(k)$, the I control is added. In this case, reference input R(z) is set to null. If the function of position tracking is enabled, then reference input R(z) is set properly. The I control can achieve a zero steady-state error. The proper tuning of parameters (K_{d}, ϕ, K_{i}) can yield effective transient and steady-state responses. The authors of previous studies [6,7] have conducted stability analysis on the IPD control of the MSS. The stability of the overall system is guaranteed when integrator parameter K_{i}is suitably selected.Symbol | Explanation |
---|---|

$m$ | the mass of the controlled object |

$g$ | the gravitational acceleration |

$C$ | the force constant |

$x$ | the distance between the electromagnet and suspended object |

${x}_{0}$ | the equilibrium position of the suspended object |

$\Delta x$ | $=x-{x}_{0}$ the deviation of the distance |

$\Delta \tilde{x}$ | the measured output of the position sensor device |

$\Delta X(s)$,$\Delta X(z)$ | the Laplace transform and z transform of $\Delta x$ |

$\Delta \tilde{X}(z)$ | the z transform of the measured output $\Delta \tilde{x}(k)$ |

$i$ | the coil current |

${i}_{0}$ | the bias current of the equilibrium position |

$\Delta i$ | $=i-{i}_{0}$ the deviation of the coil current |

$\Delta I(s)$,$\Delta I(z)$ | the Laplace transform and z transform of $\Delta i$ |

$T$ | the sampling period |

$\rho $ | the linear factor of the position sensor |

$\beta $ | = ${e}^{T\sqrt{2C{i}_{o}^{2}/m{x}_{o}^{3}}}$ the derived parameter |

$\tilde{\beta}$ | = $\beta +{\beta}^{-1}$ the derived parameter |

$\mathsf{\sigma}$ | = $\sqrt{C/2m{x}_{o}}$ the derived parameter |

$\tilde{\mathsf{\sigma}}$ | = $\sigma \rho \left({\beta}^{2}-1\right)/\beta $ the derived parameter |

$G(z)$ | the z transform of $\Delta X(z)/\Delta I(z)$ |

$\tilde{G}(z)$ | the z transform of $\Delta \tilde{X}(z)/\Delta I(z)$ |

$R(z)$ | the reference input of Figure 2 |

## 3. GSA-Tuning IPD Control

The GSA is a derivative-free global optimum search algorithm. It is a type of SI [10] and was originally attributed to Rashedi et al. [12]. The GSA is also a nature-inspired algorithm based on Newton's law of gravity and the concept of mass interactions. The searcher agents are a collection of masses. “Agent” is derived from the Latin agere. The agent is a computer program that acts as a user or other program in an agency relationship in computer science. Hence, the agent is an autonomous computer program that conducts tasks on behalf of its users.

Each agent has the following four specifications: position, inertial mass, active gravitational mass, and passive gravitational mass. The position of the agent corresponds to a solution of a problem. Gravitational and inertial masses are calculated using a fitting function.

Considering a system with $Nm$ agents, the position of the ith agent (agent i) can be expressed as follows:
where ${x}_{i}^{d}$ is the position of agent i in the dth dimension, N
where ${v}_{i}^{d}$ is the velocity of agent i in the dth dimension. A gravitational force where agent j acts on agent i is provided in Equation (10), the concept of which is employed in work that is based on Newtonian gravity and the law of motion. The gravitational force between two particles is directly proportional to the product of their masses and inversely proportional to the square of the distance between them:
where $\epsilon $ is a small positive constant, and $\epsilon $ is introduced to prevent the denominator from being zero. In addition, M
where $G({t}_{0})$ is the initial value, $\alpha $ is a positive constant, $t$ is the current iteration, and ${t}_{\mathrm{max}}$ represents the maximum iteration. ${R}_{ij}(t)$ is the Euclidian distance between the two agents i and j and is rewritten as follows:

$${X}_{i}=\left({x}_{i}^{1},\cdots ,{x}_{i}^{d},\cdots ,{x}_{i}^{Nd}\right)\mathrm{for}i=1,2,\cdots ,Nm$$

_{d}is the dimension of an agent, and N_{m}is the number of agents. The velocity of agent i can be written as follows:
$${V}_{i}=\left({v}_{i}^{1},\cdots ,{v}_{i}^{d},\cdots ,{v}_{i}^{Nd}\right)\mathrm{for}i=1,2,\cdots ,Nm$$

$${F}_{ij}^{d}(t)=G(t)\frac{{M}_{pi}(t)\cdot {M}_{aj}(t)}{{R}_{ij}(t)+\epsilon}\left({x}_{j}^{d}(t)-{x}_{i}^{d}(t)\right)$$

_{aj}represents the active gravitational mass related to agent j, and M_{pi}is the passive gravitational mass related to agent i. G(t) is the gravitational coefficient at time t and decreases over time for controlling the search accuracy. G(t) can be determined as follows:
$$G(t)=G({t}_{0}){e}^{\left(-\alpha \cdot \frac{t}{{t}_{\mathrm{max}}}\right)}$$

$${R}_{ij}(t)={\Vert {X}_{i}(t),{X}_{j}(t)\Vert}_{2}$$

The total force acting on agent i in the dth dimension is expressed as follows:
where rand
where M
where rand

$${F}_{i}^{d}(t)={\displaystyle \sum _{j\in Kbest,j\ne i}ran{d}_{j}\cdot {F}_{ij}^{d}(t)}$$

_{j}is a random number in the interval [0,1]. Kbest represents the set of first agents with greater mass and the optimal fitness value. Thus, on the basis of the law of motion, the acceleration of agent i at time t in the dth dimension is written as follows:
$${a}_{i}^{d}(t)=\frac{{F}_{i}^{d}(t)}{{M}_{ii}(t)}$$

_{ii}(t) is the inertial mass of agent i. The next search step involves identifying the values of the subsequent velocity and position of the agent. Therefore, its position and velocity can be calculated as follows:
$${v}_{i}^{d}(t+1)=ran{d}_{i}\times {v}_{i}^{d}(t)+{a}_{i}^{d}(t)$$

$${x}_{i}^{d}(t+1)={x}_{i}^{d}(t)+{v}_{i}^{d}(t+1)$$

_{i}is a random number in the interval [0, 1], and ${v}_{i}^{d}$ is the velocity of agent i in the dth dimension. This random number is employed to equip the search with a randomized feature. Gravitational and inertial masses are calculated using the fitness evaluation. A heavier mass equates to a more efficient agent. This indicates that superior agents have higher attraction and move more slowly. The gravitational and inertial masses are assumed to be equal, as displayed in the following:
$${M}_{ai}={M}_{pi}={M}_{ii}={M}_{i},i=1,2,\cdots ,Nm$$

The values of agents are calculated using the fitting function. We can calculate the gravitational and inertial masses with the following equations:
where $fi{t}_{i}(t)$ is the fitness value of agent i at time t. For a minimization problem, $worst(t)$ and $best(t)$ are defined as Equations (20) and (21), respectively: The summarized symbols of the GSA are listed in Table 2 for a simplified reading of the formulas

$${m}_{i}(t)=\frac{fi{t}_{i}(t)-worst(t)}{best(t)-worst(t)}$$

$${M}_{i}(t)=\frac{{m}_{i}(t)}{{\displaystyle \sum _{j=1}^{Nm}{m}_{j}(t)}}$$

$$best(t)=\underset{j\in \left\{1,\cdots ,Nm\right\}}{\mathrm{min}}fi{t}_{j}(t)$$

$$worst(t)=\underset{j\in \left\{1,\cdots ,Nm\right\}}{\mathrm{max}}fi{t}_{j}(t)$$

The summarized symbols of the GSA are listed in Table 2 for a simplified reading of the formulas.

Symbol | Explanation |
---|---|

${X}_{i}=\left({x}_{i}^{1},\cdots ,{x}_{i}^{d},\cdots ,{x}_{i}^{Nd}\right)$ | position of agent i |

${x}_{i}^{d}$ | dth dimension of ${X}_{i}$ |

$Nd$ | dimension of an agent |

$Nm$ | number of agents |

$t$ | index of iteration |

${t}_{\mathrm{max}}$ | total number of iterations |

${V}_{i}=\left({v}_{i}^{1},\cdots ,{v}_{i}^{d},\cdots ,{v}_{i}^{Nd}\right)$ | velocity of agent i |

${v}_{i}^{d}$ | dth dimension of ${V}_{i}$ |

${F}_{ij}^{d}(t)$ | dth dimension of gravitational force where agent j acts on agent i |

${F}_{i}^{d}(t)$ | total force that acted on agent i in dth dimension |

$G(t)$ | gravitational coefficient at time t |

$G({t}_{0})$ | initial value of $G(t)$ |

$\alpha $ | a positive constant for $G(t)$ |

$\epsilon $ | a small positive constant for Equation (10) |

${M}_{aj}$ | active gravitational mass related to agent j |

${M}_{pi}$ | passive gravitational mass related to agent i |

${R}_{ij}(t)$ | Euclidian distance between two agents i and j |

Kbest | the set of first agents with larger mass |

$rand$ | random number in the interval [0,1] |

${a}_{i}^{d}(t)$ | acceleration of agent i at time t and in dth dimension |

${M}_{ii}(t)$ | inertial mass of agent i |

${M}_{i}(t)$ | equality mass assumption for the gravitational and inertia mass for Equation (17) |

${m}_{i}(t)$ | calculated variable for ${M}_{i}(t)$ |

$fi{t}_{i}(t)$ | fitting function (or fitness) |

$best(t)$ | strongest agent in the population |

$worst(t)$ | weakest agent in the population |

Procedure | Operation Details |
---|---|

Step 1: | Randomized initial controller parameters (K_{d}, ϕ, K_{i}) in the stable range Equations (6)–(7) of all agents. Set following parameters: $Nd$, $Nm$, ${t}_{\mathrm{max}}$, $G({t}_{0})$, $\alpha $, $\epsilon $, and $Kbest$. |

Step 2: | Execute the control system simulation (or experiment) for all agents of t-iteration. |

Step 3: | Calculate fitness $fi{t}_{i}(t)$. |

Step 4: | Calculate formulae sequentially for Equations (20), (21), (18), (19), (17), (11), (12), (10), (13), (14), (15), and (16). |

Step 5: | Update controller parameter position ${X}_{i}(t+1)$. Specify the stable range for Equations (6)–(7) of three controller parameters (K_{d}, ϕ, K_{i}). |

Step 6: | Check the stopping criteria. If they are satisfied, then stop. Otherwise, proceed to Step 2. |

The strategy of the GSA in tuning the IPD controller is provided in Figure 3. The parameter tuning of an IPD controller using the GSA can be accomplished by assigning the three parameters K

_{d}, ϕ and K_{i}to enable the output response $\Delta \tilde{X}(z)$ to track reference input $R(z)$. The search procedure of the proposed IPD–GSA control (IPD control by GSA tuning) is listed in Table 3. For explaining the proposed IPD–GSA control, three flowcharts were plotted, as displayed in Figure 4, Figure 5 and Figure 6. Figure 4 displays the system operation process. This process includes three main subprocesses: initialization, a control system simulation, and the GSA. A flowchart of the control system simulation is provided in detail in Figure 5. The program of the control system simulation is executed N_{m}times for every iteration. The GSA flowchart is displayed in detail in Figure 6. First, the fitting functions are calculated for N_{m}agents. Thereafter, the formulas of the GSA are calculated sequentially. Finally, the positions of agents are updated. The stable range of Equations (6)–(7) of the three controller parameters (K_{d}, ϕ, and K_{i}) is specified for every updated position.## 4. Simulation

This section details the simulation of the proposed IPD–GSA control of the MSS. The difference equation of Equation (4) can be obtained as follows:

$$\Delta \tilde{x}(k)=\tilde{\beta}\Delta \tilde{x}(k-1)-\Delta \tilde{x}(k-2)+\tilde{\sigma}\Delta i(k-1)$$

According to the material displayed in Figure 2, the difference equations of the variables ${E}_{1}(z)$, ${E}_{2}(z)$, ${E}_{3}(z)$, and $\Delta I(z)$ are expressed as follows:
where Equation (24) is an integrator, and Equation (26) is the PD controller. After solving Equations (22)–(26), we can simulate the IPD control of the MSS by using MATLAB software. The initial state conditions can be assumed to be zero.

$${e}_{1}(k)=r(k)-\Delta \tilde{x}(k)$$

$${e}_{2}(k)={e}_{2}(k-1)+{K}_{i}{e}_{1}(k)$$

$${e}_{3}(k)={e}_{2}(k)-\Delta \tilde{x}(k)$$

$$\Delta i(k)={K}_{d}{e}_{3}(k)+{K}_{d}\varphi {e}_{3}(k-1)$$

The system parameters of the MSS are as follows: β = 2.002 and $\tilde{\sigma}=0.072$ [6]. The servo system requires an integrator for eliminating the steady-state error to step inputs. The IPD control (Figure 2) is this type of system. Because the state of the system is completely controllable, the desired closed-loop poles can be specified using the PD control loop. Next, the I control gain ${K}_{i}$ can be assigned to achieve optimal steady-state performance. The PD control is used to stabilize the MSS, as demonstrated in Figure 2. If the initial zero of the PD control is $z=-\varphi =0.85$, then the stable gain ${K}_{d}$ with respect to Equations (6) and (7) is approximated to:

$$\text{0.1852}<{K}_{d}<\text{30.045}\mathrm{for}\varphi =-0.85$$

Assuming that the initial zero $z=-\varphi $ of the PD control is designed for $\tilde{\beta}=2.002$ and $\tilde{\sigma}=0.072$, the stable range of K

_{d}is obtained as follows:
$$\frac{0.0278}{\left(1+\varphi \right)}<{K}_{d}<\frac{55.58}{\left(1-\varphi \right)},\mathrm{and}0{K}_{d}\frac{-27.77}{\varphi}$$

Conservatively, $\varphi $ and ${K}_{i}$ are assigned as follows:

$$-0.98\le \varphi \le -0.1,\mathrm{and}\text{0.1}\le {K}_{i}\le \text{3.0}$$

Therefore, Equations (28) and (29) are the design constraints of this simulation.

The simulation of the IPD–GSA control is as follows. Let population size N
where M

_{m}= 4. Additionally, let the dimension of each agent $Nd$ = 3, with the position of ith agent as ${X}_{i}=\left({x}_{i}^{1},{x}_{i}^{2},{x}_{i}^{3}\right)$. Each agent contains three controller parameters (i.e., K_{d}, ϕ, and K_{i}); in other words, ${K}_{d}={x}_{i}^{1}$, $\varphi ={x}_{i}^{2}$, and ${K}_{i}={x}_{i}^{3}$. The design constraints of each agent are defined in Equations (28)–(29). The total number of iterations ${t}_{\mathrm{max}}$ is 100. The initial value of the gravitational coefficient $G({t}_{0})$ is set as 100, and $\alpha $ is set to 20. A small positive constant $\epsilon $ is set to 10. The set of first agents with greater mass $Kbest$ is set to the total number of agents ($Nm$). The fitness $fi{t}_{i}(t)$ for the i’s iteration is assigned as defined in the following function:
$$fi{t}_{i}(t)={\gamma}_{1}\cdot Mp+{\gamma}_{2}\cdot {\displaystyle \sum _{k=1}^{100}{e}_{1}^{2}(k)}$$

_{p}is the peak overshoot, ${\gamma}_{1}=10$ is the weighting factor of M_{p}, and ${\gamma}_{2}=10$ is the weighting factor of the integral squared error.Both M

_{p}and $\sum _{k=1}^{100}{e}_{1}^{2}\left(k\right)$ of Equation (30) are calculated from system responses of Equations (22)–(26) for the i’s iteration. The IPD controller (K_{d}, ϕ, K_{i}) of i’s iteration is ${X}_{i}=\left({x}_{i}^{1},{x}_{i}^{2},{x}_{i}^{3}\right)$. The simulations were performed using MATLAB software. The (K_{d}, ϕ, K_{i}) iterative curve is provided in Figure 7. After 100 iterations, the position of four agents approximated $X=[16.2138,-0.8646,0.4972]$. Optimal fitness (best(t)) approximated 0.1230. Therefore, the optimal IPD controller could be obtained as follows: ${K}_{d}=16.2138$, $\varphi =-0.8646$, and ${K}_{i}=0.4972$. The output response is displayed in Figure 8; the horizontal axis represents the sampling time, the unit is 1 mini-s, and the vertical axis is the measured output ($\Delta \tilde{x}$) of the MSS. The red line represents the step input ($r$), the amplitude of which is 0.1 units. The blue curve indicates the measured output ($\Delta \tilde{x}$) of the MSS. As displayed in Figure 8, the steady-state error and overshoot to a step input were absent. For the MSS, this indicated strong performance.## 5. Experiments and Results

This section details the hands-on experiments. The FSMSS apparatus is provided in Figure 9 [6]. A sketch of the magnets, a field sensor, and an electromagnet is displayed in Figure 10. The suspended object (magnet) was composed of three 1 cm cubes as shown in Figure 9, and weight of a cube is 7 grams. The material of the magnet is NdFeB. The magnetic core of the electromagnet is a bolt with nut, and the material is steel. The shape of the magnetic core is cylindrical. The inner diameter of the magnetic core is 15 mm and outer diameter is 50 mm. The height is 55 mm. The Hall Effect device can sense the strength of the magnetic field of the three-cubed magnet. Therefore, this device serves as the position sensor. This MSS apparatus is the FSMSS. Hall Effect devices are superior in position sensing to optical [2,7] and electromechanical sensing devices in the MSS. If the position measurement is acquired through optical position sensors, then it is disturbed easily by surrounding light sources. The magnet position sensor is installed on the bottom of the frame. Because the magnet is placed relatively near the position sensor, which is situated far from the solenoid, the electromagnet does not affect the output measurement. The main focus of this study was the application of a magnetic sensor. Thus, a magnetic field sensor was utilized to measure the position of the suspended object. In this apparatus, the position sensor is SS495A [6].

A power amplifier provides a current that passes through the electromagnetic coil. When a current passes through the electromagnet, a magnetic force is generated. The strength of the generated magnetic force is proportional to the square value of the current through the coil [2,6,7]. The FSMSS uses magnetic attraction to pull a magnet upward, against gravity. To control the current of the electromagnet, a current transducer is employed to measure the coil current. A current transducer is a Hall Effect current sensor with internal integrated circuits. In this apparatus, the current transducer is LA55-P [6]. The performance of the power amplifier (serving as a current driver) is provided in Figure 11. The step response of the coil current was from one to two units. A steady-state error was absent in the power amplifier. The settling time was approximately 25 ms. Therefore, the electromagnetic coil current was controlled effectively.

The measured output response of the FSMSS is provided in Figure 12. The voltage of equilibrium was 1.5 V. The input voltage was from 1.5 to 1.8 V. The optimally tuned IPD controller in the previous section was employed in this hands-on experiment. The orange curve in Figure 12 depicts the output measurement and represents the output of the SS495A circuit, which ranged from 1.5 to 1.8 V. The steady-state error and system overshoot did not occur in this experiment. The setting time was approximately 0.5 s. For the FSMSS, this result indicates strong performance.

## 6. Conclusions

The main contribution of this study is the GSA-tuning IPD control for MSSs. This IPD control can stabilize the MSS with the provided constraints. If the conditions are stabilized, then the integrator can eliminate the steady-state error to a step input. An IPD controller has three parameters and can be tuned to achieve optimal performance under the stable condition. The tuning method in this study was the GSA. The advantages of IPD–GSA are as follows: the GSA is based on heuristics, simplicity, and an absence of assumptions. This paper details all of the simulations and hand-on experiments that were conducted. According to the results, the proposed control scheme is appropriate for the FSMSS.

## Acknowledgments

The authors would like to express their sincere gratitude to the reviewers for their invaluable comments and recommendations. This work is supported by the Ministry of Science and Technology, Taiwan, ROC, under grant number MOST 104-2221-E-218-039.

## Author Contributions

Jen-Hsing Li and Juing-Shian Chiou developed the methodology and drafted the manuscript. Juing-Shian Chiou programmed the simulations, and Jen-Hsing Li conducted the hands-on experiments. All of the authors approved the final version of the manuscript.

## Conflicts of Interest

The authors declare no conflict of interest.

## References

- Jayawant, B.V. Electromagnetic suspension and levitation. Rep. Prog. Phys.
**1981**, 44, 411–477. [Google Scholar] [CrossRef] - Wong, T.H. Design of a magnetic levitation control system-an undergraduate project. IEEE Trans. Educ.
**1986**, 29, 196–200. [Google Scholar] [CrossRef] - Marsden, G. Levitation! Nuts Volts Mag.
**2003**, 24, 58–61. [Google Scholar] - Lundberg, K.H.; Lilienkamp, K.A.; Marsden, G. Low-cost magnetic levitation project kits. IEEE Control Syst. Mag.
**2004**, 24, 65–69. [Google Scholar] [CrossRef] - Gibbs, W. Build a Levitating Disco Ball. IEEE Spectrum August 2014. Available online: http://spectrum.ieee.org/geek-life/hands-on/build-a-levitating-disco-ball (accessed on 30 July 2015).
- Li, J.H.; Chiou, J.S. Digital control analysis and design of a field-sensed magnetic suspension system. Sensors
**2015**, 15, 6174–6195. [Google Scholar] [CrossRef] [PubMed] - Li, J.H. An undergraduate digital control project: A digital signal processor (DSP)-based magnetic levitation system. World Trans. Eng. Technol. Educ.
**2006**, 5, 207–210. [Google Scholar] - Lin, C.-M.; Lin, M.-H.; Chen, C.-W. SoPC-Based Adaptive PID Control System Design for Magnetic Levitation System. IEEE Syst. J.
**2011**, 5, 278–287. [Google Scholar] [CrossRef] - Bennett, S. Nicholas Minorsky and the automatic steering of ships. IEEE Control Syst. Mag.
**1984**, 4, 10–15. [Google Scholar] [CrossRef] - Bonabeau, E.; Dorigo, M.; Theraulaz, G. Swarm Intelligence: From Natural to Artificial Systems; OUP USA: New York, NY, USA, 1999. [Google Scholar]
- Kennedy, J.; Eberhart, R. Particle Swarm Optimization. In Proceedings of the IEEE International Conference on Neural Networks IV, Perth, WA, USA, 27 November–1 December 1995; pp. 1942–1948.
- Rashedi, E.; Nezamabadi-Pour, H.; Saryazdi, S. GSA: A Gravitational Search Algorithm. Inf. Sci.
**2009**, 179, 2232–2248. [Google Scholar] [CrossRef] - Aziz, M.S.I.; Nawawi, S.W.; Sudin, S.; Wahab, N.A.; Faramarzi, M.; Yusof, M.A.M. Gravitational Search Algorithm Optimization for PID Controller Tuning in Waste-Water Treatment Process. J. Teknol.
**2015**, 73, 103–109. [Google Scholar] [CrossRef]

© 2015 by the authors; licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons by Attribution (CC-BY) license (http://creativecommons.org/licenses/by/4.0/).