Magnetic Bearing Control System based on PI and PID Controllers

This paper describes the implementation of magnetic bearings and their active control system. The working principle of the special combined axial and radial magnetic bearings and their implementation is explained. The overall laboratory system consists of two magnetic bearings with their housings, the suspended shaft and control system with sensors and power electronics. Sensor electronics are used to measure the position of the shaft within a bearing and to determine the appropriate bearing current with outer position control loops and nested current control loops. The motor control board featuring the TMS320F28335 DSP and LDC1000 proximity sensors is used for control and power electronics. In order to implement the control system the X2C tool is used. This is an open source model based development and code generation tool embedded in the Scilab/Xcos environment. The sensor data acquisition time is optimized to increase the speed of the control system.


INTRODUCTION
Magnetic bearings are becoming widely used due to their numerous advantages, including low friction and absence of lubricating agents.One of the drawbacks of the conventional plain and rolling element bearings can be seen during high rotation speed.Friction gets increased as well as material wear and temperature.Therefore, a different type of bearing is needed for such operations.Detailed researches in the field of high-speed bearingless drives can be found in [1] and [2].Development of magnetic bearings is closely connected with the progress in electronic components.Novel approaches in proximity measurement are a key to precise and effective levitating operation.Moreover, as electronic components are getting smaller in size, the integration into the bearing housing is easier to achieve.
The motivation for developing a laboratory system lies in the idea that theory of operation and control electronics of the magnetic bearings can be used for educational as well as research purposes.It covers the area of power electronics, programming, instrumentation and automatic control.It is also a good opportunity for students to apply their academic knowledge.
This paper documents the development of laboratory system and its challenges in commissioning.In spite of all challenges that occurred during development, the project yielded success.A brief explanation of the used electronic components and results are given.

MAGNETIC BEARINGS
A magnetic bearing supports a shaft without physical contact using electromagnetic actuators.Hence, there are fewer limitations in the rotational speed and mechanical friction wear is abandoned.Magnetic bearings can be divided into three categories: active magnetic, passive magnetic and electrodynamic magnetic bearings.
Passive magnetic bearings have a simple construction, comprising only permanent magnets responsible for attractive or repulsive forces [3].Therefore, input power is not needed and magnetic forces depend only on the material characteristics.Passive magnetic bearings are difficult to design due to the Earnshaw's theorem.It states that static levitation in all degrees of freedom (radial, axial and tilted direction) cannot be achieved by using only static magnetic forces so at least one degree of freedom has to be mechanically or actively stabilised.
The working principle of the electrodynamic bearings is based on the repulsive forces, caused by the induction of eddy currents in a rotating conductor [4].According to Lenz's law, when a conducting material is moving in a magnetic field generated by the magnet, an eddy current will appear in the conducting material.This results in a magnetic field that is oriented opposite to the magnet.Such bearings usually have magnets in the stator and conductors in the rotor.

Active Magnetic Bearings
The suspension force in radial active bearings is generated by electromagnetic actuators which are evenly distributed around the stator.They can be mutually arranged in a three phase star or delta connection.Generation of the variable current needed to produce the bearing force is often accomplished by pulse width modulation (PWM) of the supply voltage.By changing the duty cycle of the PWM signal, the current through the electromagnet can be adjusted.Its necessary level depends on the proximity sensors feedback data.The sensor data is then sent to the control unit where they are analysed for further regulation.As mentioned earlier, the control unit generates a duty cycle which is the input of the power amplifier.Its main task is to generate the PWM signal for the electromagnetic actuators according to the duty cycle and to assure that the maximum current is not exceeded.As a result, a variable magnetic field can be generated for centring the shaft.More information about the topology, control and principle of operation can be found in [5].Fig. 1 applies only one proximity sensor.To ensure position measuring in both directions, at least three sensors are required.
However, the implemented magnetic bearing has three proximity sensor coils that are equally distributed with a mutual angle of 120°.In that way, their outputs create a three-phase system, which is able to measure the position in x and y radial direction in order to precisely determine the position of the shaft.For example, if it translates from centre of the bearing, all three sensors would detect changes and according to their data, new position would be detected.

PROXIMITY MEASUREMENT
For proximity measurement, inductive proximity sensors are used.Each sensor measures the inductivity and eddy current losses of one sensing coil.The working principle is based on an alternating current which flows through a coil and generates an alternating magnetic field.If a conductive material is close to the coil, the magnetic field will generate eddy currents in the surface of that material.The eddy current will depend on the distance, size and type of the material.All of this affects the inductance of the sensor coil which is a function of distance.Generating a magnetic field only by using the inductor consumes a large amount of power.By adding a parallel capacitor, a resonator is created and power consumption can be reduced.Fig. 2 shows the parallel inductance and capacitance (LC) circuit and the related parallel resonance impedance of a proximity sensor.The laboratory system implements the LDC1000 inductance to digital converter.As explained in [6], it can provide linear or angular displacement measurement on conductive materials.The sensor can operate in two ways, either by measuring the parallel resonance impedance Rp(d) or by measuring the oscillation frequency of the LC circuit.Accuracy depends on the inductance and capacity of the circuit components and frequency of the external oscillator.
This system is based on oscillation frequency measurement that can range from 5 kHz to 5 MHz.The main reason for this type of measurement is the high signal quality without the noise caused by the magnetic bearing electric field interference.Output signal from the sensor is so called frequency count, which is used for obtaining the frequency of oscillation.
Fig. 3 shows the setup with six sensors (three per bearing) which are connected to the board.The inputs are coming from the sensor coils on the bearing.Attention was paid to minimization of signal noise.It is an inductive type of noise and twisted pair wiring can reduce it.Contact between wire and sensor chip should be firm enough to prevent losses from higher resistance.There were also changes in the signal in case of a slight move of the wires.The serial parallel interface (SPI) is used for communication with the processor.SPI provides a twoway communication with the sensors and consists of one master device and a number of slave devices.There are four logic signals on the SPI bus: SCLK (serial clock), MOSI (master output and slave input), MISO (master input and slave output) and CSB (chip select bit).A number of CSB signals depend on the number of sensors.

CONTROL UNIT
The control unit comprises all the electronics needed for successful operation.Sensor and bearing coils are placed on the bearing and the rest of the components are located on the main board.The power unit consists of two DRV8402 dual full-bridge PWM motor controllers which allow a maximum current of 5 A per channel [7].An additional printed circuit board is manufactured for placing the six LDC1000 sensor PCBs and the TI control card which can be seen in Fig. 4. The control is implemented on the 32-bit digital signal processor (DSP) TMS320F28335 [8] due to the compatibility with X2C software.

EXPERIMENTAL SETUP
After all requirements were taken into consideration, an experimental system was assessed.The housings for the bearings were manufactured using CNC milling technique.The biggest issue with the system was commissioning of the proximity sensors, especially wiring with the coils and programming.Code Composer Studio is an integrated development environment used for the control code development.Attention was given to SPI optimisation.The software code has to perform quickly enough so the proximity can be analysed with minimum delay.Fig. 5 shows the setup of the system.The wires coming from the bearing are the sensor wires which connects the sensor coils with the sensors.On the breadboard (left side) is the oscillator used for the oscillation frequency measurement in the LDC1000 sensors.
The regulation system was designed using the X2C software.It runs in the Scilab/Xcos environment and it allows the model-based development and code generation of real-time control algorithms [9].Inputs of the regulation system represent sensor data and are marked as: Data_CS0, Data_CS1, Data_CS2, Data_CS3, Data_CS4 and Data_CS5.Outputs of the regulation system are PWM_Enable for manual enabling PWM and three phases and a neutral per bearing.Appropriate regulators should be picked for position and current regulation.As mentioned before, there are three sensors per bearing.If data from each sensor is presented as one base, then sensor data from one bearing can be viewed as a three-phase system.In order to simplify and therefore increase response time of the regulation system, three phase system (A, B and C) is substituted with two phase system D and Q using the Clarke transformation given by: and Necessary condition for Clarke transformation is that sum of all three sensor data or phases is zero: Fig. 6 shows the "Clarke" block with its inputs for calculation of Clarke transformations.Outputs D and Q are compared with their ideal values and by using blocks "D_Sub" and "Q_Sub" differences are calculated.They proceed to the inputs of PID controllers "PIDLimit_D" and "PIDLimit_Q" as shown in Fig. 7. PID controller can be tuned by using the K P , K I and K D parameters which are proportional, integral and derivative gains respectively.D_ideal and Q_ideal blocks have the value obtained when shaft is precisely centred inside the bearing.Outputs from both controllers proceed further to the input of "InvClarke" block (Fig. 8) responsible for inverse Clarke transformation by using: Fig. 9 shows part of the system used for current regulation with PI controller blocks "PILimit_A" and "PILimit_C".Since the sum of all three phases should be zero, output B from "InvClarke" block is left unused and a sum of inverted outputs from PI Controllers is implemented instead.Blocks "Phase 1", "Phase 2" and "Phase 3" are outputs toward power amplifier and therefore magnetic bearing.10 presents blocks for manual enabling of pulse width modulation (PWM).It is used for enabling the magnetic bearings.Blocks "PwmOn", "EnPWM" and "PWMOff" are PWM enabling threshold, enabling and PWM disabling threshold respectively.Output block "PWM_Enable" leads to the power amplifier.

RESULTS
Magnetic bearings in operation provided a platform for testing the inputs and outputs of the regulation system.The signal noise was discovered in the sensors when current flows through electromagnets.The reason for that noise lies in the sensor cables which are too close to electromagnets so there is not enough space for better insulation.Comparison of two signals given by two sensors from one bearing is given in Figs.11 and 12. Signal quality becomes improved when bearings are grounded.Maximum current of DRV8402 motor controller is limited to 4,5 A per channel as a security precaution despite already advanced embedded overcurrent protection.With the complete regulation system, shaft achieved levitation state without exceeding the maximum current.However, signal quality should be better and the shaft should be lighter since one part is built out of permanent magnets.

CONCLUSION
Further improvements in the sensor signal stability should be done.This project was made when LDC1000 was the only available inductive proximity sensor of this kind.Its major drawback is that it only has one channel.They can now be replaced with the LDC1614, a four channel sensor.Because of its small size, this would allow an implementation directly on the bearing instead on the main board and would eliminate the need for external wires and their shielding since sensors and the coils would be connected directly on the PCB board.In the case of LDC1000 sensors, the TMS320F2808 digital signal processor could be a better solution because it supports four SPI modules compared to one module from TMS320F28335.This would result in quicker code iteration.

Figure 1
Figure 1 Function principle of an active magnetic bearing

Fig. 1
Fig. 1 shows the general model of the active magnetic bearing.Proximity sensor determines the position of the

Figure 2
Figure 2 Equivalent parallel LC circuit of a proximity sensor

Figure 3
Figure 3 The LDC 1000 sensors

Figure 4
Figure 4 Closer overview of DSP, sensors and PWM controllers' common heat sink

Figure 5
Figure 5 Experimental setup

Figure 6
Figure 6 Clarke transformation block

Figure 7
Figure 7 PID controller for position regulation Proportional term ensures output value according to the current error value.Integral term eliminates steadystate error value while derivative term achieves steady

Figure 9
Figure 9 PI controllers for current regulation

Fig.
Fig.10presents blocks for manual enabling of pulse width modulation (PWM).It is used for enabling the magnetic bearings.Blocks "PwmOn", "EnPWM" and "PWMOff" are PWM enabling threshold, enabling and PWM disabling threshold respectively.Output block "PWM_Enable" leads to the power amplifier.

Figure 10
Figure 10 Manual enbling of PWM Described regulation system is related to one magnetic bearing.The whole model with identical parameters is repeated for another bearing.

Figure 11 Figure 12
Figure 11 Sensor signal with noise