1. Introduction
Electromagnets are commonly used within the field of industrial robotics. They are often mounted on robotic tools used to lift ferromagnetic materials, such as steel sheets or scrap metal. Another commonly-used industrial component is the inductive proximity sensor, used to detect if any metallic object is in close proximity to the sensor. These two components are sometimes used together and sometimes as parts of robotic tools, where the sensor is used to detect the object which the electromagnet then will lift. This setup gives the combined tool a distinct advantage over a similar, but sensor-less tool in that it can compensate for changes in its environment. It can for example be used to compensate for individual tolerances when working with a large number of objects [
1].
This article will demonstrate a setup that combines the lifting functionality of the electromagnet with the proximity sensing functionality of the inductive proximity sensor. The setup may be referred to as a “self-sensing” electromagnet, able to not only create a lifting force, but also to detect the proximity of any ferromagnetic object. This is of interest for applications where space is limited, where the electromagnet blocks the whole surface of interest or when having a comparably sensitive inductive sensor paired with an electromagnet is unsuitable, such as in heavy duty equipment. Another advantage is that a separate sensor does not need to be installed, potentially reducing system cost, but the trade-off is that the control electronics become more complex.
An additional benefit of this setup is the ability to control the currents in the electromagnets, giving the option of force control. This can be of interest for applications where controlling the force during the lift could be beneficial, such as lifting a stack of thin steel sheets [
2]. Similar concepts regarding self-sensing electromagnets have been explored in the field of magnetic levitation, see, e.g., [
3,
4,
5,
6]. Another proposed application is active vibration dampening of mechanical parts [
7], such as steel sheets in a metalworking rolling-press [
8]. Self-sensing systems have also been used to estimate the rotor position and rotational speed of electric motors [
9,
10].
The system presented here is a part of the ongoing wave-power research project at Uppsala University [
11]. The aim of this specific project is to further develop the production technology needed to mass-produce wave-power generator units while keeping implementation costs down. The robotic tool presented here is used to locate and mount steel plates used in the translator of the generator, an application requiring around 1
of force and 0.1 mm positional accuracy.
To highlight the difference between a “normal” inductive sensor and the setup presented in this paper, one must first know the principle behind the first one. In a normal “commercial grade” inductive proximity sensor, a magnetic field is generated by the use of an LC-resonance circuit with frequencies in the kHz or MHz band, where the core of the inductance is exposed to the outer world. If any object disturbs this magnetic field, this will affect the inductance and in turn the frequency and amplitude of the resonance signal [
12]. This change is often picked up directly by an electronic circuit monitoring the voltage in the LC-circuit, but designs using a secondary pickup-coil that reacts on changes in the magnetic field also exists.
The setup presented here uses none of the above approaches due to the following reasons. Firstly, a normal LC-resonance circuit oscillates around a zero voltage and current level, with an average value of zero. This would not work in this system as the current needs to have a DC-bias in order to generate an approximately constant magnetic field, used to generate the lifting force. This leaves us with the alternative of using a separate pickup-coil. A setup would work even with a DC-bias on the current, but it would require modifying the standard electromagnets in order to insert this extra coil. A modification of the electromagnets was not desirable, since a goal of the project was the ability to use a standard off-the-shelf component, in order to keep costs down.
The presented measurement system is instead based on the idea of current ripple measurements [
13]. The principal idea is here that when an inductive load, such as an electromagnet, is controlled using a switching circuit, the frequency and amplitude of the current ripple contain information about the state of the system as a whole. Accessing this information then only requires the current ripple to be correctly analyzed. The most interesting property to extract in this case is the inductance of the electromagnet, as it is directly coupled to the length of the air-gap between the electromagnet and its target.
However, while this idea is theoretically sound, its practical implementation has proven to be challenging [
14]. Switched current control systems are in general designed to have as low a current ripple as possible, making the actual current ripple measurements more challenging, often requiring expensive high-accuracy measurement equipment.
Here, a different approach is proposed, not requiring high accuracy components, thus reducing cost. The main idea of this new approach is to perform the current ripple measurement on a single, much larger, temporary current pulse instead of the normal, comparably small, current ripple. This larger pulse can be introduced as either a step in the current reference or as a temporary lock-up of the driving switches.
If done correctly, this will result in a single larger pulse in the current. The relevant measurements are then performed on this pulse. However, if the pulse is made too big, it will disrupt the normal operation of the system, and if it is too small, nothing will be gained with regards to measurement accuracy. Therefore, a balance has to be found between the two.
To illustrate the principle of this approach, consider the following case: The rise-time of the current in a switched ideal electromagnet is to be sampled at 500 Hz. The nominal switching frequency of the electromagnet can be set to either 20 kHz or 2 kHz, giving a corresponding current ripple of either 10 mA or 100 mA, respectively. A third “hybrid” mode of operation is also available, where the nominal switching frequency is set to 20 kHz, but with the added option to temporarily lock the switches every 2 ms. The current measurement system is assumed to have a randomly distributed noise with a maximum amplitude of 2.5 mA. See
Figure 1 and
Table 1, where Mode 3 is the case of interest.
In summary, it can be said that the motivation for implementing this new system is that Mode 3 offers a Signal to Noise Ratio (SNR) around 4.8-times better than that of Mode 1. The main drawback for this increase in SNR is that the acquisition time increases with 115 μs and that the RMS current ripple rises with 15.26 mA, compared to Mode 1, but it remains lower than the RMS current for Mode 2. Another, more subjective advantage, is the ability to tailor the audible noise to a, for humans, more pleasant tone. This, as the constant kilohertz noise from Mode 2, can be perceived as annoying in an industrial environment. Using this method, the induced 500 Hz noise can be lowered to, for example 50 Hz or even sub-audible frequencies, if the application allows for such a relatively slow sampling rate.
The system was realized using an electromagnetic tool mounted on an industrial robot. The electromagnet was then controlled using an MCU-controlled MOSFET H bridge. The MCU was also used to collect and process relevant measurement data. Using these data and electromagnetic theory, a relation between the air-gap and the measured current rise-times could be constructed.
2. Method
2.1. Experimental Setup
The setup consisted of a floor-mounted industrial robot, ABB IRB-6650S, with a prototype electromagnetic tool mounted on the end of the robotic arm. The usage of a robotic arm allowed for precise movements of the mounted tool and also high repeatability of said movements; see
Figure 2.
The robotic tool consisted of three electromagnets, a plastic support structure and the Current Control Board (CCB). The CCB regulated and measured the current flowing through the three electromagnets, which were connected in parallel. The system was powered by the built-in 24 supply of the robot. Communication with the CCB was achieved using a wired serial-data interface.
A flat and uniform plate of DOMEX 355 MC steel, 15 mm thick, was used as the target for the electromagnets during the experiments, unless otherwise stated.
2.1.1. Current Control Board
The CCB consisted of four MOSFETs (CSD88537ND) in an H bridge configuration. The MOSFETs were controlled by a micro-controller (MCU-ATMEGA328P) through a gate driver IC (Integrated Circuit) (HIP4080A). Current measurements were performed using a shunt resistor and a shunt current monitor (AD8210). The output from the monitor was in turn connected to two devices. The first was an ADC (MCP3201), which allowed the MCU to read the current measurement as a binary code; the second was the inverting pin of a comparator (TLV3201). The non-inverting pin of the comparator was connected to a DAC (MCP4921) controlled by the MCU. The comparator output was in turn connected to an interrupt capable I/O pin on the MCU. See
Figure 3 for a schematic representation of the CCB.
This setup allowed the comparator to trigger each time the difference between the ADC-input and the DAC-output changed polarity, something that was used to control the timing of the measurements. A picture of the CCB is shown in
Figure 3, and general specifications can be seen in
Table 2. For simplicity, the current control was implemented as a bang bang control using the comparator and current sense amplifier on the CCB with a 5
hysteresis band around the current DAC value.
2.1.2. Electromagnets
The electromagnets (see
Figure 2) were designed to operate at 24
and had an internal resistance of approximately 24.2 Ω, effectively limiting the current to around 990
. In total, three electromagnets were connected to the CCB in parallel with a maximal DC current drain of just under 3
, well within the specifications of the CCB. Note that each of the three electromagnets was originally designed to be used as automatic door locks. While the iron core was laminated using 0.6
thick laminates, the original control circuitry probably did not use a switched control method and instead relied on linear voltage regulation. Using these electromagnets in a switched environment therefore meant taking them outside their normal operating range. Each electromagnet had a specified static holding force of 650
at rated current.
2.1.3. Communication
The CCB used an ASCII-based serial data communication protocol. The serial data stream, containing system measurements, was sent from the CCB to an external PC acting as the system master. A MATLAB script running on the master PC was used to log and process the data. This script also allowed for sending new settings and reference values to the CCB.
In order to save transmission time, the measurement data from the CCB was sent as a 12-byte binary package as opposed to individual ASCII symbols; see
Figure 4. This as a 16-bit binary number can be as long as five characters long, with each ASCII character taking up 1 byte, for a total of five bytes per measurement point. The first two bytes in each package were used as an identifier, containing two ASCII characters. The next eight bytes were used for storing binary data. These eight bytes were in turn divided into four 16-bit unsigned integers (uint16) for a total of four possible data-points in each package. The last two bytes were used for new-line and carriage-return characters. This approach reduced the size of each measurement from 24 bytes (2 bytes start + four times 5 bytes of ASCII characters + 2 bytes end) to 12 bytes (2 bytes start + four times 2 bytes of unsigned integers + 2 bytes end).
Data sent to the MCU were sent as either 1-byte single ASCII character commands or as 4-byte binary code containing two identifier ASCII characters followed by one 16-bit integer.
2.2. CCB Measurement Implementation
The measurement system measured three parameters of the current ripple: initial current, final-current and the time to change between them, here called rise-time. The routine was programmed onto the MCU and utilized the available DAC, ADC and comparator. The measurement process itself was divided into four separate steps; see
Figure 5. Each step is individually described below (values are taken from
Figure 5 as an example).
Step I:
When a measurement is requested, either by a serial command or system time-out, Step I of the measurement cycle is triggered. This prepares the system for taking a measurement. This is done by putting an internal measurement flag of the MCU high and then detecting in what direction the current step is supposed to happen, determined by whether the current reference is positive or negative. The MOSFETs are then locked in such a configuration that the current rises in the desired direction. Additionally, the DAC reference value is offset from the nominal current reference in order to shift the comparator trigger level to a point above or below the current value, depending on the current step direction. In this case, 15 above nominal, corresponding to approximately 32 .
Step II:
When the current measurement has risen to the new offset value of the DAC, detected by a change of the comparator output, Step II is triggered as an Interrupt Service Routine (ISR) on the MCU. This causes the measurement to begin with a reset of the system clock register to zero and then taking a measurement of the current. This measurement is saved as the initial current, . Additionally, the system is flagged as busy, so that the measurement timing is not disturbed by any other process. Finally, the DAC value is once again offset in the same direction as in Step I, but this time by a larger amount. Here, 40 above the normal level, corresponding to approximately 87 .
Step III:
Triggered when the current has once again reached the DAC offset and the comparator again changes state, another ISR is started. First, the value of the system clock register is saved as the rise-time, , followed by a measurement of the final current, . Additionally, the DAC value and busy flag are reset, and the MOSFET states are unlocked so that the control system can control them once more. This marks the end of the data collection part of the measurement.
Step IV:
Detecting the change of state of the busy flag, the control system takes back the control of the MOSFETs and starts to force down the current towards its default level. While the current is decreasing, the system is once more flagged as busy as the measurement data are processed and filtered. If the CCB is connected to a host that is accepting serial data, this would also be the time for the data transmission. Once the filter is updated, the busy flag is reset, and after both the busy flag and serial transmission are done, the measurement flag is reset, as well. After this, the system goes back to normal operation. The system will remain in Step IV until the next measurement is requested and the cycle repeats.
Filtering of the step time was done by implementing a 6th order, 64-bit integer digital Butterworth-filter directly into the MCU on the CCB using a “direct-form II transposed” implementation with pre-calculated coefficients. It takes around 412 μs for the MCU to update the filter after each measurement, as can be seen from the busy flag in
Figure 5.
2.3. Calculating Inductance from Rise-Time
Using the previously-obtained rise-time and current measurement, the inductance of the system can be calculated. Knowing the inductance is of interest for two reasons:
Firstly, due to the relatively low permeability of air, the inductance of the electromagnets becomes strongly coupled to the length of the air-gap between the electromagnet and its target, where a larger air-gap leads to lower inductance. Knowing this relation allows for the use of the electromagnet as a distance sensor, as each value of the inductance corresponds to a certain air-gap.
Secondly, the grade of magnetic contact in the air-gap can be evaluated by observing the change in inductance for different currents. This can, in turn, be used to evaluate if the electromagnet has successfully connected to its intended target or not, something that can be used to optimize industrial processes.
Finding an accurate inductance model for these electromagnets proved challenging. As demonstrated in [
15], even for a well-specified geometry, the inductance model for the switched (AC) case for a laminated core depends on numerous variables, e.g., the electrical resistivity of the laminates and wire, the number of turns and layers in the coil, parasitic capacitances and winding pitch. In this setup, this becomes even worse, as there is a mix of both laminated and non-laminated steel in the magnetic circuit. This led to the conclusion that the electromagnets were to be considered as “black-boxes” and as such desired parameters and system responses had to be measured, rather than modeled as basically everything besides lamination thickness and coil resistance was unknown.
An RL (Resistor-Inductor) model of the electromagnet could, however, be used to derive a simplified analytical model of the electromagnet, despite the many unknown parameters; see
Figure 6. Note that as this system will sometimes evaluate the inductance between two non-zero bias currents, so are the formulas adapted to calculate the dynamic inductance and not the “normal” static inductance, as explained by [
16] among others.
Using basic circuit theory, this model can be described by the following relations:
where
is the dynamic inductance in one of the electromagnets,
the resistance,
the applied voltage and
the instantaneous current in one electromagnet at time
t. The total system current,
, is the sum of the current in all three electromagnets.
Note that is here not assumed to be a system constant, but instead a function of the rise-time, , and the current step, , where the current step is assumed small enough so that no significant change in saturation occurs during each measurement and the physical air-gap is assumed to be constant during each sampled rise-time measurement. Any changes to the air-gap are here assumed to only consist of the linear closing of the air-gap between the target and electromagnet. The target and all electromagnets are assumed to be perfectly parallel towards each other and exhibit no magnetic coupling between the coils. The resistances are also assumed to be constant in time, ignoring the effects of, for example, temperature drift.
Solving Equation (1a,b), under these assumptions generates a linear ODE with the following solution:
To simplify the above equation, it is assumed that all three inductances and resistances are equal, and , this so that an assumption of equal current in all three legs can be made. Equal current also leads to .
Imposing the boundary conditions
and
over the time domain
and assuming that
is constant (as the switches are locked during the acquisition of
) and then solving for the inductance yields:
where
and
are the combined system inductance and resistance. Under stated assumptions, Equation (
3a) can be evaluated using the three measurements (
) taken each measurement cycle.
In reality, the three electromagnets are not identical, and the total current will not be identically split between the three; see the measurements presented in
Table 3. Therefore, by using an assumption of identical electromagnets, some measurement error will be introduced. However, for the distance sensing functionality, this effect is assumed to be small, as the three electromagnets are relatively similar.
2.4. Evaluating Magnetic Contact
For a real electromagnetic lifting tool, finding the target is only the first step, where the next step would be to try and lift the target. In such a situation, it would be beneficial to be able to figure out if the lift will be successful or not. Simply, does the tool have a good enough magnetic contact with the target to lift it? However, finding an accurate analytical model for the absolute contact force between the electromagnet and target using only the current ripple measurements as input was found to be a challenging task, especially due to the mix of laminated and non-laminated materials.
Therefore, the question of the contact force will here be reduced to the question if the electromagnets have a “good”, “average” or “bad” magnetic connection to the target. This as, for any given current, a “good” connection would imply a larger available lifting force than that of a “bad” magnetic connection.
Generally, the relation between inductance and reluctance can be written as:
where
L is the inductance of a coil,
N denotes the number of turns in the coil and
is the reluctance of the magnetic circuit.
A good magnetic connection is here defined as a position of the electromagnet against the target that results in an initially high dynamic inductance, implying that the system reluctance is low (see Equation (
4)), corresponding to a small
h in
Figure 7. Here, “initial” refers to a situation with zero or very low average current in the electromagnet, far from the saturation current. If the average DC current is then increased and the reluctance in the magnetic circuit is low enough, the electromagnet and target will begin to saturate. This increase in saturation will increase the system’s reluctance and can therefore be detected as a decrease of the dynamic inductance, if compared to the initial value.
Using the statements above, the following four-step procedure was adopted to detect not only if a good magnetic contact is present, but also if it is maintained:
Step I:
Obtain and save the open circuit dynamic inductance for the whole current range. This is done by simply making sure the tool is far away from any ferromagnetic object and then increasing the current step-wise, while taking measurements. In this experiment, this was done in 250 steps. This only has to be done once, as the obtained values will not change, unless something drastically happens to the electromagnets.
Step II:
Continuously measure the dynamic inductance while moving the tool closer to the target, and if the inductance suddenly increases, a target has been found. Obtain and save the closed circuit dynamic inductance for the zero or low current, non-saturated case. In this setup, a lower limit of what was considered to be a “found target” was defined as a three-times increase of the inductance, compared to the open circuit inductance.
Step III:
Increase the current step-wise and take a measurement of the dynamic inductance at every current level. If a reduction larger than 25% of the maximal measured inductance is measured at any current step, mark the current level as the saturation point. If saturation is detected before the current reaches its maximum, the system will signal a success. Else, the system will flag a failure and issue a warning.
Step IV:
If Step III is successful, the robot is clear to begin moving. However, continue to measure the inductance and if the inductance unexpectedly drops to within 10% of the open loop inductance, the target has most likely been dropped, and a warning will be flagged.
3. Results
3.1. CCB Measurement Performance
Evaluation of the CCB measurements was performed at 75 different air-gaps. In order to precisely control the length of each air-gap, sheets of standard A4 plain paper, each around 960 μm thick, were put between the electromagnets and target one at a time; see
Figure 8. This was done as the specified robot accuracy of ±0.1 mm was deemed inadequate for calibration purposes. A measurement current ripple amplitude of 100
was found to be large enough to give a good signal, yet low enough so that the target would not be lifted.
Measurements were performed in the air-gap range of 0–7.2 . Each measurement series was performed as a system start-up step response containing the first 2000 measurement points sampled at 300 . The raw rise-time measurements were then filtered using the filter implemented on the MCU. Both the filtered and unfiltered data were then sent to a host computer running a MATLAB script to record the data.
For calibration purposes, the filter cut-off frequency was set as low as possible, without causing numerical instability, and this frequency was found to be 5
. In normal operation, the filter was instead set to cut-off at 25
, giving a faster system response at the cost of lower accuracy.
Figure 9 shows a comparison between the raw and filtered system start-up response.
The highest rise-time, around 820 μs, was measured with 0 between the target and electromagnet. The second-to-last level, around 250 μs, was measured with an 5.2 air-gap. Of the original 75 air-gap measurements, so was the difference (for the used excitation pulse of 100 ) between each level, going from 5.2 –7.2 (21 measurements in total), too small to be reliably separated from each other. To do so would require either a larger air-gap step, than 960 μm, or a less noisy measurement system. The final level, around 200 μs, was measured without a target at all, comparable to an infinite air-gap.
For the current measurements, no filtering was performed. The reason for this, as can be seen in
Figure 10, was that the noise was only around 2.4
, translating to one LSB in the 12-bit ADC. The amplitude and difference of the two currents was also consistent for all tested air-gaps.
3.2. Rise-Time to Inductance
Shown in
Figure 11 is a comparison between the calculated inductance, using Equation (
3a) and the filtered CCB measurements, compared to the measured inductance using an inductance meter, Agilent-U1732A, using a 100 Hz, 1 kHz and 10 kHz excitation frequency. The calculated inductance using the hybrid Case 3 method shows best correspondence with the 100 Hz measurements, although the match is not perfect. Also note that the inductance is approximately constant for the 1 kHz and 10 kHz compared to the 100 Hz case; this is the main reason that a lower frequency measurement method was chosen. The materials present in this setup do not cope well with higher frequencies. The filtered data presented in
Figure 9 have a standard mean deviation,
σ, of 1.2 μs if the first 500 samples from each measurement series are ignored.
Next to get an estimate of the amplitude of the non-linear effects in the electromagnets and target, a series of measurements were performed at six different air-gaps and eight different currents; see
Figure 12. To produce these waveforms, the control system was programmed to produce a constant 225
current ripple, measured peak to peak, as opposed to the normal case where a big pulse would only be procured once every measurement period; see
Figure 13. For each measurement, the current waveform was recorded using a Agilent-1146A current probe connected to a digital oscilloscope. It can be noted that the smaller the air-gap, the more distorted the waveforms becomes, in comparison to the decaying triangular current ripple predicted by an ideal RL-circuit. For the open-circuit case and low currents, the waveform shows almost ideal triangular behavior. For small air-gaps, most notable in the closed and 1×A4 case, the current rapidly rises after each switching. However, then, this effect dies out after around 1
, and the current derivative stabilizes to a more constant value, an effect assumed to be the result of decaying eddy currents. Most of these behaviors are attributed to the fact that the system contains a mixture of laminated and non-laminated iron in the same magnetic circuit, something that is not often covered in the basic theory.
For the closed case, increasing current also leads to an increased current-ripple frequency. This is partly due to saturation, as the inductance drops when the material begins to saturate, leading to an increased switching frequency in the hysteresis current control. However, a similar, but smaller effect can be seen in the open case. Here, the frequency difference is not due to saturation, but instead due to the increased resistive voltage drop in the coil, following the increase in current, effectively reducing the driving voltage. All cases are in reality a combination of the saturation and voltage drop effect, but an open or fully-saturated core will be dominated by the voltage drop effect.
3.3. Evaluation of Magnetic Contact
To verify the four-step saturation detection procedure, numerous measurements and calculations of the inductance were made at different currents and air-gaps. The results from this measurement series are shown in
Figure 14. In the figure, it can be seen that in the open circuit, case the inductance starts at a relatively low value, 26
, and does not change much with increasing current. For the closed and 1×A4, case the inductance starts high, but then drops by approximately 280
and 135
, respectively, at maximal current. The remaining intermediate air-gaps begin at medium values and show comparatively small changes, around 25
, over the whole current range. The marked points, A and B, are the points for the closed and 1×A4 case at which the saturation detection triggered (as the inductance shows a 25% decrease or more), making them the only two cases in this test that the robot would accept as successful.
Table 4 shows the normalized relation between the inductance, current and magnetic connection (air-gap). All inductances are normalized against the open loop inductance for the lowest current. This table indicates that a good magnetic connection, in this setup, can be characterized by an initially high normalized inductance that then rapidly drops as the current is increased. This is a behavior that easily can be detected using a microcontroller and few simple calculations.
The fact that the four A4 cases show an initial increase in inductance with increasing current might seem a bit strange. However, this has its explanation in that the increased current in turn generates an increased air-gap force. This force then, ever so slightly, compresses the paper and squeeze out any air that was left in the gap, leading to a smaller air-gap and, hence, larger inductance.