Active magnetic levitation and 3-D position measurement for a ball viscometer

We present a new technique for 3-D position sensing and active magnetic levitation of a steel ball for use in a levitating ball viscometer. In order to achieve a stable levitation, a very sensitive positioning measurement system is mandatory. For this task the differential transformer principle was chosen to realize a 3-D position measurement. This leads to a purely magnetic sensor and actuator system without the need for other transducer types such as optical readout. The actuation utilizes power efficient switch-mode electronic circuitry which opens the possibility of upscaling the device, if demanded, for future applications. It is shown that this switch-mode actuation can be combined directly with the position measurement when special switching patterns are applied. A position resolution of ∼ 100 μm in all three axial directions at a sample rate of 476.19 Hz is achieved. For viscosity sensing, the steel ball is magnetically driven to orbital movements of variable revolution frequency of up to 2.5 Hz within a fluid chamber. The frequency response is analyzed and related to the shear viscosity of the fluid under test. As a proof of concept, measurements in various viscous liquids were performed with the prototype, showing promising results in the range of 1–10 mPa s. The principle may also be of interest for applications beyond viscosity sensing, such as fluid mixers, or as actuators in microfluidic devices.


Introduction
Precise position measurement is a key part of magnetic levitation where optical position sensing is a common method for demonstrator setups (Hajjaji and Ouladsine, 2001;Cho et al., 1993).However, in the case of levitation in a fluidic environment, the optical method requires a translucent fluid and measurement chamber (Royer et al., 2002) and the measurement results may depend on the fluid's refractive index.
A magnetic levitation system using magnetic position measurement can overcome these drawbacks as it does not impose any additional constraints onto the physical properties on the environment of the levitated object as long as this environment is not magnetizable.In this paper, we illustrate this approach using the example of a viscometer based on a levitated ball (Clara et al., 2014a), which is immersed in the fluid to be characterized.
There are some approaches to building a "self-sensing" active magnetic bearing based on the measurement of the actu-ator's self-inductance (Vischer and Bleuler, 1993;Li et al., 2004;Gruber and Stöckler, 2015).This approach works fine for systems with small air gaps (like magnetic bearings), but unfortunately the variation of the actuator's self-inductance usually is very small if the system does not feature a closed magnetic core like a levitating ball viscometer.
Using a differential transformer is a more sophisticated approach.The possibility of using a linear variable differential transformer (LVDT) in combination with magnetic actuation has been demonstrated in Wu et al. (2008), where highfrequency sinusoidal signals (10)(11)(12)(13)(14)(15)(16)(17)(18)(19)(20) are superimposed onto a DC actuation current.In contrast to Wu et al. (2008), we use a pulse-width modulated (PWM) voltage that is applied to the actuator coils.The AC part of the PWM voltage is used to read out the differential transformers, whereas the DC part is used for force generation.In addition, we extended the LVDT principle to a 3-D position measurement.The remaining content of the paper is structured as follows.In Sect. 2 the setup and operation principle are described in detail, and in Sect. 3 the application as a viscometer and first measurement results are presented.Section 4 closes the paper with a discussion of the observed orbits, frequency responses and the suitability of the setup for viscosity measurement.

Prototype setup
Figure 2 shows only the functional parts of the setup.(All the supporting and encapsulating parts of the housing which are not essential to understanding the basic mode of operation are not shown.)For this setup, a 3 mm ball made of Martensitic stainless steel (EN 1.4034, X46Cr13, µ r ≈ 700) is used.A static magnetic field is generated by one large NdFeB magnet (axial magnetization; material: N42, B r ≈ 1.3 T) above the ball to coarsely compensate for the gravitational force.There are six identical actuator solenoids surrounding the ball which can be used to control the levitation and actuate the ball in an arbitrary way.In addition there are six sensor coils placed right in front of the actuator coils.
Figure 3 shows the setup in a cross-sectional view.All the housing parts and the chamber are made of nonmagnetic material: polymethyl methacrylate (PMMA).
Figure 4 shows a block diagram of the used measurement electronics.
Figure 1 shows a photograph of the demonstrator setup.For a more detailed description of the setup, we refer the reader to Feichtinger (2015).The setup is related to our previous work (Clara et al., 2014a) where a wire is used to support the ball instead of magnetic levitation.

Magnetic actuation
In order to create a force on a ferromagnetic ball, a nonuniform magnetic field, such as that created by a magnetic dipole, is necessary.The resulting force on the magnetized ball then is oriented in the direction of the gradient of |B| (Smolkin and Smolkin, 2006), where |B| denotes the magnitude of the magnetic background field.The latter is given by a superposition of B PM which is generated by a permanent magnet and the fields created by the actuator coils B E .The force on the sphere at a given location scales quadratically with the magnetic flux density (Smolkin and Smolkin, 2006) and therefore the actuator coils gain more influence on the magnetic force due to the permanent magnet (see Fig. 5).Furthermore, the influence of B e on the magnetic force becomes more linear.
The position of the permanent magnet is adjusted such that the force (without using the solenoids) would be just enough to hold the ball.The upper actuator coil is then used to stabilize the ball at this equilibrium position, which otherwise would not be stable according to the Earnshaw theorem (Earnshaw, 1842).
Each of the six actuator coils is controlled using a bipolar PWM signal generated by H bridge MOSFET switches (Allegro A4950).The PWM duty cycle controls the mean voltage and therefore the mean actuator current.The frequency of the PWM signal is chosen to be sufficiently high such that the movement of the ball is not disturbed by high-frequency vibrations; see also below.

3-D position measurement
The magnetic field components that arise from PWM control of the actuator coils are used directly for the excitation of the differential transformer (see Fig. 6).
The position can be measured for each coordinate separately.For example, to measure the ball position in the x direction, the two sensor coils on the x axis are used.The four actuator coils in the plane perpendicular to x are used for excitation.If all four actuator coils are subjected to a positive voltage step, an increasing magnetic flux is generated.This flux is partly deviated by the ferromagnetic ball and induces a voltage in both sensor coils.As they are connected in an anti-serial manner, and have the same geometry and number of turns, only the difference of both fluxes produces an output voltage.For a perfect symmetrical setup the output voltage would thus be zero.But, as the ball is shifted along the x axis, a positive or negative output voltage is generated.This voltage is evaluated by electronic circuitry and finally converted to a digital signal.
The actuator coils can be modeled by a serial connection of the coils' self-inductance L s and the equivalent resistance R s .The latter includes winding resistance, the switches' onstate resistance and wiring resistance.When a bipolar PWM voltage with the amplitude ±U is applied, the differential equation for the current in the actuator coil i(t) is When the switching frequency is selected high enough, the variation of the current i(t) around its mean value I is small and the expression R s i(t) can be approximated by R s I .The current slew rate di(t) dt and therefore the voltage induced in the sensor coils is different for the rising (+) and falling (−) slopes (see Fig. 7).In order to overcome this issue, both slopes are used for measurement.Subsequently the difference of both signals is calculated and the spurious R s I part cancels out.
The current in the two actuator coils on the x axis would induce a much larger voltage in the sensor coils than the other four actuator coils, as they are right behind the sensor coils, and could disturb the measurement.Therefore they are switched to open circuit during the measurement of the x position.
The position in all three coordinates is measured consecutively using the method described above.The summary is as follows.
1.The two actuator coils behind the sensor coils are switched to open circuit (via freewheeling diodes).
2. After the current in these coils has decayed completely, the measurement can start.
3. Two subsequent PWM slopes (rising and falling) are used for measurement of u sens , which represents the ball's position in this coordinate.
4. After measurement, the current in the switched off actuator coils is built up again.
5. After a pause the whole process is repeated for the next coordinate.
The resulting switching pattern is shown in Fig. 8.The sample rate that can be achieved with this method depends on the PWM frequency and the properties of the actuator coils, as the current in the actuator coils has to decay completely before measurement can begin.For the demonstrator setup, the sample rate is 476.19Hz at a PWM frequency of 10 kHz.The achieved resolution of the position is approximately 100 µm.

Position control
The equilibrium position of the ball is unstable in the vertical direction (the magnetic force increases when the ball approaches the permanent magnet) and has to be stabilized by an active controller.For this task a PD controller that acts on the upper actuator coil is used.The lower actuator coil is not used for actuation in this setup, but it is necessary for the position measurement.Note that the mechanical system is much slower than the PWM switching frequency of 10 kHz.Therefore the current ripple caused by PWM control can be ignored from the perspective of mechanical actuation and position control.Figure 9 shows the behavior after the controller is switched on.The ball lifts off from the bottom of the chamber and stabilizes at a certain vertical position.Depending on the targeted vertical position z(t), the necessary DC current in the actuator coil can be relatively high.This can lead to high power dissipation heating up the actuator coil and also the fluid.Subsequently, the resistance of the actuator coil as well as the fluid's viscosity can change over time.In order to minimize the power dissipation, an additional I controller is used (see Fig. 10).This additional controller integrates the output of the PD controller u(t) which represents the actuator current, and slowly adjusts the targeted position z t (t) of the PD controller.Note that the I controller must be slow compared to the PD controller to preserve stability.
This means the I controller "searches" for the vertical equilibrium position of the ball.Note that this position also depends on the buoyancy force when the ball is embedded in a fluid.This effect can therefore be utilized to measure the fluid's density.As soon as the vertical position is stabilized, the ball levitates freely in the chamber.The horizontal position is stable in this setup and does not have to be controlled actively (although this setup would facilitate this).The magnetic flux density has its maximum directly on the axis of the permanent magnet and decreases radially.Therefore the field gradient points in a negative radial direction and thus a restoring force results, which can be interpreted as a nonlinear spring that pulls the ball towards the center.

Application as viscometer
Once the ball is in stable levitation, there are various methods to set it into motion and obtain information about the fluid surrounding the ball.The method described in the following will serve as an illustrative example.

Excitation of orbital movement
To excite the ball to an orbital movement, sine and cosine shaped signals with the frequency f o and the amplitude k o are PWM modulated and applied to the four horizontal actuator coils (cosine for the x direction, sine for the y direction).Opposite coils receive inverted signals.The fields created by these actuator coils superimpose with the field of the permanent magnet such that a radial force is acting on the ball.The force vector rotates according to the frequency f o of the excitation signal.After a settling time the ball describes an approximately circular orbit in the horizontal x/y plane (see Fig. 11).The orbit's radius and shape depend on, among other parameters, the fluid's viscosity and the excitation frequency.Generally speaking, a higher viscosity leads to a smaller radius of the orbit.The detailed calculation of the viscosity from the properties of the achieved stationary orbit (radius and period) requires some modeling and is discussed in Clara et al. (2014b), which is why we do not reproduce it here for the sake of brevity.
This system can be described as a 2-D spring-mass system which is damped by the viscous drag.Note that the spring force as well as the viscous drag are nonlinear in general, which leads to a nonlinear dynamic system.Also, the excitation force component is not perfectly sinusoidally varying with time due to the geometry of the actuator coils.

Transfer function
In the following section we assume a circularly shaped orbit and neglect all nonlinear effects.The horizontal x and y axes can be interpreted as real and imaginary parts on a complex plane.The excitation force F (t) (input) as well as the ball position p(t) (output) are then space vectors in the complex plane.Doing so, the 2-D system can be reduced to a 1-D but complex-valued system.One can model the system behavior as a linear spring-mass system with the ball mass m, the magnetic spring constant k and the viscous damping d.Applying a Fourier transform with respect to time, we obtain the transfer function in frequency domain with the complex input F (f ) and output p(f ) in the frequency domain.The parameters of the transfer function G(f ) are the resonance frequency the quality factor The function's magnitude represents the orbit's radius with respect to the excitation amplitude k o .The phase angle represents the mean angle between ball position and the force vector (drag angle).
To measure this transfer function we sequentially excite the ball at various frequencies f and record the input F f [i] and output p f [i] in a time discrete manner for each frequency.The excitation force and the ball position can not be recorded directly.So we use the generated excitation signal (the PWM duty cycle) as input F f [i] and the measured differential transformer voltage as output p f [i] instead.They are assumed to be proportional to the real input and output and thus only add a scaling factor to the measured transfer function.
The measurement sequences F f [i] and p f [i] are cropped to multiples of the periodic time (data length N) to avoid unwanted leakage effects.Also, the x and y components of the recorded signals are mapped to real and imaginary parts.We calculate the estimated transfer function for every frequency f by averaging over the complex ratio of output to input signals.Using this method only signal components at the excitation frequency are taken into account.This means that the calculation considers the size and phase shift of the orbit but not the actual shape of the orbit.
Table 1 shows a collection of liquids that were used for measurements.
The measurement results are shown in Figs. 12 and 13.

Parameter estimation
By the application of a fitting algorithm like Niedermayer et al. (2012), it is possible to estimate parameters of the second-order resonant system like the resonance frequency f r and the quality factor Q based on the measured complex transfer function.The dissipation factor d = 1 Q shows a strong correlation with the fluid's shear viscosity.Since this paper aims at providing a proof of concept regarding the control of the orbit of the levitated sphere, we restrict ourselves  here to providing an empirical model relating the viscosity to the damping.For a more detailed physical sensor model, we refer the reader to Clara et al. (2014b).Figure 14 shows a collection of several measurements with different liquids (using repeated measurements).

Discussion and conclusion
It was demonstrated that magnetic actuation using switch mode circuitry can be combined with 3-D position measurement leading to a stable levitation of a ferromagnetic ball.The ball can then be excited to perform an orbital movement.
The experimentally realized orbits do not have a perfect circular shape.Instead there is a large variety of shapes, depending on the viscosity, excitation frequency and amplitude (see Fig. 11).Orbits near the resonance frequency tend to be  more circular than the other orbits.If the system is excited far below the resonance frequency and with a large amplitude, the orbits can become heavily distorted (see Fig. 15).
To investigate this phenomenon we calculated the discrete Fourier transform (DFT) of one period from a typical orbit in Fig. 16.
A spurious oscillation at the second harmonic appears to be present, which is supposedly excited due to nonlinearities of the excitation forces.The background spectrum is evenly distributed, which indicates white noise.We can filter the orbit if we clear out all spectral components with a harmonic order greater than 2 (see Fig. 17).
Looking at the orbit figures, one can see that the noise in the x and y directions is clearly correlated.This noise does www.j-sens-sens-syst.net/5/447/2016/not represent a real movement of the ball.Supposedly it is generated by the vertical position controller and is coupled to the position measurement system by the upper actuation coil.In order to overcome this issue, a more sophisticated position controller could be used.But as the noise is not correlated with the excitation signal, the effect on the measurement result is small.
Spurious effects are supposedly associated with imperfections of the setup but mainly with the nonlinear character of the excitation mechanism.The latter could be optimized by varying the shape and the number of actuator coils or an appropriate predistortion of the driving signals, which, however, would depend on the current position of the ball.Although some orbits appear heavily distorted (e.g., Fig. 15), the orbits are always closed and do not vary over time.Therefore we are not dealing with a chaotic behavior.
It turned out that for this setup, viscosities in the range of 1 up to 10 mPa s correspond to quality factors (see Eq. 7) in the range of 2.4 to 12 -this correlation can be utilized for viscosity measurements.For liquids with a higher vis-cosity such as G10 (see Table 1), the damping is too high, leading to a very small radius of the orbit and a low quality factor which impedes the application of the fitting algorithm (Niedermayer et al., 2012).Note that this issue is related to this particular demonstrator setup and not to the principle itself.For a higher viscosity range a larger ball and therefore a larger setup would be appropriate.
The presented principle of a magnetically levitated ball viscometer opens the possibility of enclosing the ball in a hermetically sealed measurement chamber which is immune to leakage or contamination even under high pressure or extreme temperatures.The interaction of a moving ball with the fluid closely resembles that of the established falling ball viscometer such that the obtained viscosity values are potentially comparable to those obtained by this classical method.However, the magnetic actuation brings some drawbacks such as the power dissipation of the actuator coils which heats up the fluid under test.Therefore a precise temperature control of the fluid is mandatory for viscosity measurement.Also, the magnetic position measurement is sensitive to fluctuating external magnetic fields and ferromagnetic objects in the vicinity of the system.

Figure 3 .Figure 4 .
Figure 3. CAD model showing all functional parts, including the housing.

Figure 5 .
Figure 5. Quadratic dependency of the magnetic force on the flux density.

Figure 7 .
Figure 7. Actuator current and sensor coil voltage due to PWM control.

Figure 8 .
Figure 8. switching pattern for position measurement, showing voltage and current in the six actuator coils.

Figure 9 .PlantFigure 10 .
Figure 9. Settling of the vertical controller; top: duty cycle for the upper actuator coil (0.5 = neutral); bottom: vertical position of the ball.

Figure 11 .
Figure 11.Measured orbit of the ball in water at different excitation frequencies, k o = 0.02.The axes are scaled in arbitrary units.

F
. Feichtinger et al.:  Active magnetic levitation and 3-D position measurement

Figure 15 .
Figure 15.The ball's orbit in water; k o = 0.1; f o = 0.2 Hz; note that this is still a closed orbit.

Table 1 .
List of all liquids used for measurements with shear viscosity and density at 25 • C.
Bode plot of the transfer function for the liquids listed in Table1.
Figure 14.Estimated dissipation factor versus shear viscosity for the liquids listed in Table 1, excluding G10.