• No results found

5.7 Control Design

5.7.2 Real-time Controller

This section introduces the implementation details for our real-time controller. The controllers shown in Figure 5-50 are implemented in LabVIEW, and the real-time controller being used is NI 8108 controller with NI 1031 PXI chassis from National Instruments, and two FPGA modules NI-7845R are included.

Figure 5-51 shows a diagram of the real-time control code structure. The con- troller code is implemented in two hardwares: the real-time processor (RT target) and FPGA. The FPGA in our controller is used for interfacing with signal inputs/outputs, over-sampling for air gap sensor readings, encoder signal interpolation, and encoder handling as shown in Algorithm 2. The rest of the control code, including air gap sensor handing, digital controllers for suspension and motion, multi-phase distribut- ing, trajectory generation, data plotting and recording, and Bode measurements, are implemented in the RT target. Below we briefly introduce the implementation details for these tasks.

Oversampling is applied for all air gap sensor readings to filter the noise due to the interference from the switching power amplifiers. As we discussed in Section 5.6, the power amplifiers we used have a switching frequency of 20 kHz. In our system, we

Figure 5-51: Diagram of real-time controller code structure for magnetically-levitated linear stage.

over-sampled the air gap sensor signals at 100 kHz using the FPGA, averaged every 10 samples to one signal, and passed the averaged signal to the real-time controller for feedback control. Using such over-sampling technique, the noise in the air gap signals are effectively reduced.

The magnetic encoder we selected provides quadrature digital signals, and the interpolation for the encoders is implemented in the FPGA. Figure 5-52 shows the encoder interpolation LabVIEW code for one encoder readhead. Note that there are in total eight encoder readheads in our system, and each requires its own encoder interpolation code. Therefore there are eight encoder interpolation loops running in the FPGA in parallel. The encoder interpolation loops run at a loop rate of 4 MHz, which corresponds to 10 tick counts for a 40 MHz on-board clock.

Figure 5-52: LabVIEW code for encoder interpolation.

Figure 5-53: LabVIEW code for encoder handling algorithm.

FPGA via LabVIEW, as shown in Figure 5-53. Note that there are two rows of encoder readheads in our prototype, each has four encoder readheads, and there are two parallel encoder handling loops in the FPGA to get the left and right encoder readings. Each encoder handling loop runs at a loop rate of 100 kHz.

Figure 5-54: LabVIEW code for air gap sensor handling considering the first six air-gap sensors.

Figure 5-55: LabVIEW code for reference trajectory generation.

The rest of the control code are implemented in LabVIEW in the real-time target. Note that in our system the number of deterministic loops are limited to two, which is the number of cores in the real-time controller NI 8108. The code in the RT target includes two loops. The control loop operates at a loop rate of 5 kHz, in which we

implement the π‘₯- and πœƒπ‘§-directional displacements estimation, the digital controllers

for the suspension and motion control, and the generation for three-phase and five phase current commands for stators. In another real-time loop running at 1 kHz, we implement the trajectory generation for stage motion, data plotting and recording, and dynamic signal analyzer for frequency response measurements.

Figure 5-54 shows the LabVIEW code for air gap sensor switching algorithm as shown in Algorithm 1. Here the MathScript in LabVIEW is used. The inputs include the measured stage position 𝑦, the signals from the air gap sensors, and a constant 𝛽, and the outputs are the estimated stage position in π‘₯- and πœƒπ‘§-directions. These

outputs are then used for feedback control to stabilize the stage’s magnetic suspension. The suspension and motion controllers implements lead-lag form of PID controllers with high-frequency cut-off as

𝐢(𝑠) = 𝐾𝑝(1 + 1 𝑇𝑖𝑠 )π›Όπœ 𝑠 + 1 𝜏 𝑠 + 1 Β· 1 𝑇𝑓𝑠 + 1 , (5.24)

where 𝐾𝑝 is the proportional controller gain, 𝑇𝑖 is the integral time constant, 𝛼 is the

lead pole-zero separation constant, 𝜏 is the lead time constant, and 𝑇𝑓 is the time

constant for the low pass filter. The controllers for each loop are designed in continu- ous time, and are then converted to discrete-time through matched 𝑧-transform using the pole-zero mapping method with a sampling time of 5 kHz. The outputs from the controllers are then fed into the multi-phase distribution fucntions, which implements (5.16) to (5.23). The control performance of the magnetic suspension and motion for the stage are discussed in Chapter 6.

The rest of the code are configured in a slower loop with lower priority, which include the trajectory generation, data plotting and recording, and frequency response measurement. Figure 5-55 shows the reference trajectory generation code, which generates a S-shaped second-order polynomial trajectory in real-time with a maximum acceleration π‘Žπ‘šπ‘Žπ‘₯ and a maximum velocity π‘£π‘šπ‘Žπ‘₯. The generated value is being used

as the reference for stages’ motion control. The frequency response measurement uses the LabVIEW Dynamic Signal Analyzer code written by Tyler Hamer in Precision

Motion Control Lab at MIT [70], which can be downloaded from GitHub.

5.8

Summary

This chapter presented the hardware design and fabrication for our magnetically- levitated linear stage prototype. The magnetic design process for the bias flux paths, motor stators, and yaw control stators are discussed. The mechanical design and manufacturing for moving stage and stator are presented. We also discussed the design and configuration for the sensing system, power electronics, grounding and shielding, and controllers.

With the magnetically-levitated linear stage prototype designed and built, in the next chapter we discuss the experimental tests.

Chapter 6

Experimental Tests

This chapter presents the experimental tests for our magnetically-levitated linear stage prototype. We first present the magnetic suspension tests in Section 6.1. Then the tests for the linear motors are presented in Section 6.2.

6.1

Suspension Tests

This section discusses the magnetic suspension of our linear stage prototype, including both the passive magnetic suspension in 𝑧-, πœƒπ‘₯-, and πœƒπ‘¦-directions and the actively-

controlled suspension in π‘₯- and πœƒπ‘§-directions.

6.1.1

Passive Magnetic Suspension

Table 6.1 shows the measured resonance frequency, damping ratio, and the es- timated passive stiffness of the stage in the passively-levitated degrees of freedom. These measurements are taken when the motor stator bias current πΌπ‘π‘–π‘Žπ‘  is set to 2 A.

The bias flux air gap is 2 mm, and the air gap of the motor flux is 1.5 mm. The stage is sagging below its equilibrium position by 0.75 mm due to its weight in steady state. Below we introduce the measurement setup for the passive magnetic suspension performance. To measure the stage’s displacements in 𝑧- and πœƒπ‘¦-degrees of freedom,

Table 6.1: Measured magnetic levitation performance of the stage in the passively- levitated degrees of freedom under πΌπ‘π‘–π‘Žπ‘  = 2 A.

DOF Resonance Frequency Passive Stiffness Damping Ratio 𝑧 (Vertical) 12.9 Hz 3.1 Γ— 104 N/m 0.1

πœƒπ‘₯ (Pitch) 10.6 Hz 76 Nm/rad 0.018

πœƒπ‘¦ (Roll) 9.0 Hz 118 Nm/rad 0.03

three eddy current displacement sensors from Contrinex, Inc. are configured above the moving stage and interfacing with the aluminum stage base, as shown in Fig- ure 6-1. Note that these sensors are not included as a part of the setup when the stage is operating. The stage’s displacement in the πœƒπ‘₯-direction is measured by the

encoders arranged at the bottom of the stage, which is described in Section 5.4. Since the encoders are not aligned with the stage’s center of gravity, the stage’s pitch mode motion is detectable by the encoders. During the measurement, we hit the stage in a certain direction while it is magnetically levitated, and measure the stage’s displace- ments in the passively levitated degrees of freedom. Figure 6-2 shows the measured stage’s impulse responses in 𝑧-, πœƒπ‘¦-, and πœƒπ‘₯-directions. The natural frequency and

damping ratio can be calculated from the measured impulse responses. The pas- sive stiffnesses are estimated by the natural frequency measurements and the stage’s inertia in different degrees of freedom.

The data in Table 6.1 shows that the stage’s magnetic suspension in the passive directions have relatively low stiffness. This is mainly because the linear stage is oper- ating at a relatively large air gap length, which is required for configuring separation walls between the stator and the moving stage. It can also be seen from Table 6.1 and Figure 6-2 that the passive damping ratio of the stage are also relatively low, especially in the pitch mode. This is an inherent limitation for the passive magnetic suspension in bearingless slice motors. Potential methods to improve the passive damping are discussed in Chapter 7 .

Figure 6-1: Eddy current probes for in the 𝑧- and πœƒπ‘¦-directional displacement mea-

surement.