Position estimation of linear synchronous motor using ...

7 downloads 0 Views 377KB Size Report
Abstract— This paper presents different methods to estimate the position in order to control a permanent magnet linear synchronous motor (MSlin). This MSlin ...
Position estimation of linear synchronous motor using Hall-effect sensors and a MEMS accelerometer L. BAGHLI Senior Member IEEE, B. KHOUANE * Abstract— This paper presents different methods to estimate the position in order to control a permanent magnet linear synchronous motor (MSlin). This MSlin has Hall-effect sensors that give the position by stepwise and a MEMS accelerometer that tracks the absolute acceleration. In order to improve the resolution of the sensors taken individually, we propose to combine their data to obtain an accurate position of the moving part. Simulation and preliminary experimental results are presented and commented. Keywords: Linear synchronous motor, control, dsPIC, MEMS accelerometer, Hall-effect sensors, FEMM. I. INTRODUCTION

We are building small experimental benches to teach students how linear synchronous motors are controlled. are widely used in industry especially for tool machines and launchers [1]. Maglev trains are not so used, even if many studies and their control are now fully done [2], the economical aspect does not allow their spreading. The linear synchronous motors, named MSlin that we consider in this study, is an actuator which is controlled by a dsPIC microcontroller and powered via a three-phase inverter. The MSlin consists of a mobile part, of fifteen centimeters, made in 1018 steel (stainless steel) with a threephase winding and a support rail (inductor) in plexiglas with flat magnets in NeFeB bonded to its surface. In order to verify the effectiveness of the sizing [3], we conduct a finite element analysis of the MSlin to calculate the flux density and the forces for different configurations [4]. The retaining configuration allows powering the MSlin from a small common supply 15V/2.5A, like the ones being used in university laboratories for practical work. The software development tools and debugging interface are free or of low cost, so students can replicate into further Master projects. We therefore chose a microcontroller type DSC (Digital Signal Controller) dsPIC 33FJ128MC804 [5] from Microchip, programmed using the MPLAB Integrated Development Environment (IDE) [6] and interfaced through USB connection from the PC with the programming tool (for flashing) Pickit2 or Pickit3 [7]. The programming language * L. BAGHLI is with Université de Tlemcen, LAT, Laboratoire d'Automatique de Tlemcen, Algeria, on leave from Université de Lorraine, GREEN, EA 4366, Vandoeuvre-lès-Nancy, F-54500, France (corresponding author, email: [email protected]). B. KHOUANE is with Université de Tlemcen, LAT, Laboratoire d'Automatique de Tlemcen, Algeria

is C, although there is the possibility of programming in assembly language. The flexibility of the C language allows rapid porting of control algorithms studied in course. The Microchip C30 compiler is used as it is free and optimized for such DSC. The MSlin has two types of sensors: three Hall-effect sensors and 3-axis MEMS accelerometer. It has also an onboard Bluetooth module (LMX9838) to communicate with the host PC. A homemade graphical interface allows the remote control and data acquisition of the embedded program variables. We can send control commands from the host PC (current reference, position reference, controller parameters...). In order to control the device, we implement an ISR (Interrupt Service Routine) that is executed synchronously to sample data from sensors, communicate with the host PC, evaluate the position control loop and apply the PWM duty cycles to the inverter L6234 [8]. Since we do not measure the linear position of the MSlin, we investigate position estimators based on Hall-effect sensors [9] and MEMS (Micro-Electro-Mechanical Systems) accelerometers [10]. The aim of this paper is to show how we can use such sensors for speed and position estimation and how to combine both sensors. We also use the finite element software FEMM [11], connected to Matlab ® in order to simulate the functioning of the motor in controlled loop, using the Hall-effect sensors method (Figure 1). This method consists in computing a sector variable from the binary combination of the three Hall sensors outputs (1). Then, the coils that are fired are determined according to this variable. This leads to a theoretical Laplace force given by (2). Where is the maximum flux density that the conductors are exposed to, I is the active is the current, N the number of turns and distance of the conductors. Four contributions are summed to deliver the overall horizontal force. =4

=

2 +

2 +

2

(1) (2)

This formula only is used to have the rough force value but it is not the precise one. We need to carry on a finiteelements analysis to have more precision. Matlab ® FEMM extension is used to drive FEMM. It starts the study, moves the different parts, launches analysis which solves Maxwell equations and computes the tangential and normal forces given the injected currents and the actual position relative to the permanent magnet.

II. SIZING AN ND DESCRIPTION

The project, as it has to deeal with experiments, gives a lot oof challenging opportunities. At first, the sizing of the mootor leads to differeent consideratio ons as the matterial used for the m mobile part annd the fixed rail r part, highhly influence, the trraction force, the cogging fo orce and the normal n collapsing f force. We also had issues witth the Hall-effeect sensors outtput a they may giive multiple co as ommutations per p period duee to m multiple zero-ccrossing of flu ux density seeen by the senssors [4]. In this case, c the Halll-sensors bassed algorithm is d disturbed and leads to locall oscillations of o the mobile in s some repeated areas. a Finally, the retained confiiguration is to use u 1018 steel for thhe mobile andd Plexiglas fo or the rail witth the permannent m magnets. It givves a stable co onfiguration, inn terms of sinngle z zero-crossing f flux density seeen by the Halll sensors (Figure 3 and a positive tangential force with loow cogging foorce 3) (Figure 4). These resuults are extraccted from thee finite-elemeents a analysis conduucted when mo oving the mobbile at a consttant s speed over twoo polar steps (96 mm). Thee cogging in the taangential forcee (Figure 3) is due to the interaction i of the m mobile teeth inn respect to th he permanent magnets m fixed on thhe rail. This disturbing d forcee is lowered by b a big airgapp (3 m and a maggnetic permeab mm) bility under 600 [4]. One can c a also incline thee mobile teeth h or use V-shaape to reduce the c cogging but it complicates c thee manufacturinng.

the mobbile. It gives high-noise h meaasure and shouuld be used with a low-pass fillter (3) impllemented thannks to its recurrennce relation. 1− (3) ( )= 1− The accelerometeer introduces in addition thhe gravity measuree on the z-axiss. Therefore, a proper alignm ment of the table annd the rail is reequired, along with w an offset measure at the initiialization of thhe algorithms, in i order to gett rid of any gravity projection com mponent on thee motion x-axiss. The mobile boardd has a currennt sensor to be b used to control more preciselyy the current fllowing into thee coils. In a first appproach, we useed a voltage-baased control asssuming the dc-voltaage is not varrying thanks to the controlled voltage source. 7 Halla Hallb Hallc Sector

6 5

Sector

The simulaation studies leead to the connstruction of the a actual linear motor. m The pro ototype is used to validate the a assumptions we made and to o prove the efffectiveness of the s sizing and thee control. It allows the im mplementation of v various algorithhms for positio on estimation.

4 3 2 1 0 0

8

16

24

32

40

48 X(mm)

56 6

64

72

80

88

96

Figure 2. 2 Hall-effect senssors output and Sector S variable in function of the position Air Air Air Steel1018 Steel1018 Air

0.4 4 0.3 3 0.2 2

B(T)

0.1 0 -0.1 -0.2 2 -0.3 3 -0.4 4

0

8

16

24

32

40

48 X(mm)

56 6

64

72

80

88

96

Figu ure 3. Flux densityy seen by the Halll-effect sensors a,, b, c, for differeent configurations of MSlin 16 6

Figure 1. Theeoretical modelin ng of the magneticc flux density to determine the Hall-effect sensors s output an nd the sector

12 2 10 0 Fx(N)

As the conttrol method off the MSlin for low speeds and a s standstill requirres Hall-effectt sensors, we thhus have a rouugh p position measuure based on n Sector value changes. This T v variable will taake values (1, 5, 5 4, 6, 2, 3) suuccessively whhen thhe mobile movves (Figure 1) in one directioon (Figure 2). The T s sequence reverse (3, 2, 6, 4, 5, 5 1) if the moobile is movingg in thhe opposite diirection. A sim mple position estimator can be b built as we willl see. T other sensor is a 3-axis MEMS acceleerometer [10] that The t c sense the absolute can a acceleration in the inertial framee of

Air Air Air Steell1018 Steel101 18 Air

14 4

8 6 4 2 0

0

8

16

24

32

40

48 X(mm)

56 6

64

72

80

88

96

Figurre 4. Tangential foorces in respect too the position for different materrial configuration n of MSlin

III. POSITION ESTIMATION

20

We will show in this section how we can use the sensor to estimate the position and perform a position control of the mobile on the rail.

{3,6,2,5,1,4}, {5,3,1,6,4,2} }; const int dx60=16; //16mm=1/6 of 360° or 96mm ... // Compute new position within the control ISR if (OldSector != Sector) { if (TabSector[0][OldSector-1]==Sector) Pos+=dx60; else if (TabSector[1][OldSector-1]==Sector) Pos-=dx60; else ErreurPos++; OldSector = Sector; }

+ _

(5)

Unfortunately, if the mobile is at standstill or is moving very slowly, then, the open-loop integration of the estimated speed will diverge. 2032

Absolute position Estimated position

2007

1967 Position(mm)

12 10 8 6 4 0.5529

One can notice that the position estimated by this means can only vary by 16 mm steps. It corresponds to 1/6th of the double polar step of the actuator. The red curve on Figure 5, shows the results of an experiment test while the mobile is moving at a relatively constant speed. In order to improve the resolution of this estimator, we develop an intermediate position ( _ ) estimator based on the average speed computed on the previous 16 mm step and on its open-loop integration (4). By adding both positions (5), we then obtained a smooth position variation (Figure 5) which is the estimated position. The intermediate position is reset at each sector change. (4) _ = =

14

2

const int TabSecteur[2][6]={



16 Position(mm)

A. Position estimation using the Hall-effect sensors As already mentioned, the Sector variable varies in a predefined sequence as the mobile is moving in one direction. The following algorithm is implemented in the ISR and is used to track the sector changes in order to increment or decrement the absolute position (Pos).

18

1887 1847

1807 0.85

0.855

0.86

0.865

0.87 0.875 Time(s)

0.88

0.885

0.89

Figure 5. Absolute position and estimated position (zoom), experimental results

0.895

0.6029 0.6279 Time(s) Figure 6. Intermediate position _ (zoom), experimental results

0.6522

B. Position estimation using MEMS accelerometer We explore the use of the MEMS accelerometer to enhance the estimation. The aim of an accelerometer is to give the acceleration of the mobile to which it is fixed. Proper calibration, filtering and integration are necessary to obtain the speed and the position. The rated sampling period for these computations is tested at 1 ms and 10 ms. The data fusion between the Hall-effect sensors and the MEMS accelerometer consist in computing the absolute position, known only by 16 mm steps, using the Hall sensors and compute the speed using the accelerometer, then integrating this speed to obtain the incremental position. The estimated position is the sum of the two contributions. C. Position control To show the effectiveness of the estimator in actual operating mode, we use it as feedback for the position control loop of the linear synchronous motor. The model of the MSlin can be simplified and described by (6) and (7). We will compare in simulation both estimation methods with the position computed by integrating Newton's second law (6). For the simulation, we use Matlab ® and FEMM extension, to control the position and simulate the MSlin motion. (6) − = =4 ( ) = ( )

1927

0.5779

=

(7) (8)

+

Two simulation models are used, the first one is based on Laplace force (7) and the second one uses the finite-elements (F-E) analysis to compute the force at each sampling step while the MSlin is moving. Matlab ® is used to numerically

Using the first model that is based on Laplace force (7) we will simulate small (100 mm) and high (500 mm) position-reference steps. Figure 7 presents the results of a position step response of 500 mm. We superimposed four simulations, each one with a different feedback signal to the position controller. The ideal curve (black) is when we use the position value directly from the integration of Newton's second law; the response is perfect. Then, if we use the absolute position (red curve Figure 5) of Hall-effect sensors which gives discrete values, the simulation diverges (red curve). Adding the intermediate position estimator gives better results (green curve). Lastly, integrating the MEMS accelerometer and using data fusion gives high overshoot due to the lag introduced by the filtering. One can notice that the overall rise time is acceptable whereas the steady state error remains important with oscillations. 700

600

Position(mm)

500

400

300 Reference Ideal Hall sensors discrete Hall sensors inter Data fusion

200

100

0

0

0.5

1

1.5 t(s)

2

2.5

3

Figure 7. Position control tested under different feedback signals, step reference of 500 mm

Figure 8 represents the same simulations but for a smaller position reference step; 100 mm. In this case also, the estimator based on the absolute position of Hall-effect sensors oscillate around the final value. For the enhanced

Hall sensor estimator and the data fusion estimator, the error is within the resolution of the sensor ±16 mm. 120

100

Position(mm)

integrate the Newton's second law (6) and compute the speed and the position of the mobile. It is clear that the first model will run much faster than the one using F-E force evaluation. Concerning the controller, we used a discrete Proportional-Derivative (PD) controller. The computation of the controller parameters is detailed in reference [12]. In the literature, a lot of complex controllers are used [13][14][15], mainly to compensate the force ripple due to the cogging, others use sensorless control or DTC type controller to simplify the sensing. The output of the controller is the current reference. We neglect the current dynamics, in respect to the mechanical ones, assuming that the actual current is equal to the current reference at each sampling. We fix a maximum value for the current to ±2 A.

80

60

Reference Ideal Hall sensors discrete Hall sensors inter Data fusion

40

20

0

0

0.5

1

1.5 t(s)

2

2.5

3

Figure 8. Position control tested under different feedback signals, step reference of 100 mm

In order to verify the effectiveness of the modeling and to get more accuracy, we conduct the same position control simulation but using the F-E analysis modeling of the MSlin. At each sampling rate, when the mobile moves or the currents changes, the FEMM solver is called again in order to compute flux density and the tangential force applied to the mobile. This allows taking into account the non linearities of the force (Figure 4 and Figure 3). Therefore, we obtain a force and a movement that are closer to the actual case. However, the computation time required for a simulation is much more important than in the case of linear Laplace force. So, to lessen the computing time, we perform once the computation of the tangential force, with FEMM along 96 mm, when the dc current is of 2A (blue curve, Figure 9) and the cogging force, which is obtained with zero current (black curve, Figure 9), we subtract to get the net force (red curve, Figure 9). Any new force can be computed by multiplying the net force by 0.5 multiply the actual current, then we add the cogging torque. This is verified with the estimated curve at -1A (green curve, Figure 9) and the actual one using FEMM (blue points, Figure 9). Thus, we must interpolate if the position given while evaluating the force is not strictly equal to the one of the 96 points of the table. The function is of course modulo 96 mm.

10

2

2A cogging 2A no cogging -1A estimated -1A

1 Iref(A)

Fx Fx Fx Fx Fx

15

5 Fx(N)

0 -1 -2 0

0.5

1

1.5

2

2.5

3

0

0.5

1

1.5 t(s)

2

2.5

3

0 20 -5 Fx(N)

10 -10

-10

-15 0

10

20

30

40 50 xpos(mm)

60

70

80

-20

90

Figure 9. Estimation of the tangential force from precomputed curves under F-E analysis

We present on Figure 10 and Figure 11 the simulation of a position step of 500 mm done with F-E analysis and the force interpolation. We had to modify the controller parameters to get rid of the cogging force (Figure 4 and Figure 9). One can notice that there is still a small steady state error for the Hall sensor estimator case (Figure 10). During this simulation which uses the data fusion as the feedback input of the position control loop, we notice a decrease in the amplitude of the position oscillations and no steady state error (Figure 10). We did not display the Hall sensor discrete results as they gives oscillation as in the previous Laplace force study. The data fusion using MEMS accelerometers gives overshoot because of the lag introduced by the filtering. Work in this part is still in progress. Reference Ideal Hall sensors inter Data fusion

600

IV. EXPERIMENTAL RESULTS

The implementation of the position controller and the BLDC control requires the translation in C code, then compilation and flashing the program into the dspic, through MPLAB IDE. The test on a step reference gives the result presented in Figure 12. 700 600 500 Reference Hall sensors Estimator

400

200 100

500 Position(mm)

Figure 11. Reference current and force computed using FEMM, in position control with intermediate position estimator feedback signal, step reference of 500 mm

300

700

0

400

0

5

10

15

20

Figure 12. Experimental measurements of a position control based on Hall sensors estimator, step reference of 500 mm

300

200

100

0

0

0

0.5

1

1.5 t(s)

2

2.5

3

Figure 10. Position control tested under different feedback signals, using FEMM, step reference of 500 mm

Compared to the simulations, there are differences with the overshoot, the number of oscillations and the response time. These are due to the difference in the identification of the model parameters. The mechanical parameters should be increased to give a more sluggish response and high inertia, compatible with the experimental response. Indeed, we do not impose directly a current, but a voltage using power electronics and PWM. As there is no current control, we do not have a reference current on the output of the position controller and thus a force of the type 4 or like Figure 9, as in simulation but rather a voltage that will give birth to the current. This part is under investigation, though the current sensor and its AOP are present on the circuit board (Figure

13). Sampling frequencies, data exchange with the host PC and how to visualize the current when applying reference steps to tune the current controller are issues we have to address, in order to implement an accurate current control loop. One can notice the different parts of the board (Figure 13) : the flat quad is the dspic 33FJ128MC804 [5], the big IC is the L6234 power inverter [8], the left rectangle LGA is the LMX9838 Bluetooth controller. At its right, there is a small rectangle LGA which is the MEMS accelerometer LIS3LV02DL [10]. Figure 14 shows the entire MSlin with the mobile and its coils, Hall sensors and circuit board. Permanent magnets are glued to the Plexiglas rail. The mobile runs on a free path. Thanks to its bearings, the friction is reduced.

Figure 13. MSlin V4: Details about the embedded controller and the power electronics

Figure 14. MSlin V4 prototype on its rail V. CONCLUSION

We presented methods position estimation of the mobile by reading the Hall-effect sensors and the integration of signals from the MEMS accelerometer embedded on the mobile. Finite-Elements analysis is conducted in order to solve conception and sizing issues. The other benefit of this project is to lead to a low cost design that can be used for teaching students BLDC control.

VI. REFERENCES [1] A. Veltman, P. van der Hulst, M.C.P. Jonker, J.P. van Gurp, “Control of a 2.4MW Linear Synchronous Motor for launching roller-coasters, ” in Proceedings of the 17th International Conference on Magnetically Levitated Systems and Linear Drives, Lausanne, Switzerland, Sept. 2002. [2] D. W. Doll, “Liner synchronous motor control for an Urban Maglev, ” The 18th Int. Conf. Maglev Systems and Linear Drivers, pp.275 -285 2004. [3] L. Baghli, A. Rezzoug, “Actionneurs linéaires : MRVlin et MSlin, un projet pédagogique, ” J3eA, Vol. 7 No. HORS SÉRIE 1 (Feb. 2008), Special Edition: CETSIS 2007. DOI: 10.1051/j3ea:2008008 [4] L. Baghli, B. Khouane, “Etude et dimensionnement d'un moteur synchrone linéaire pédagogique, ” Conférence sur le Génie Electrique, CGE'08, 16-17 avril 2013, Alger, Algeria. pp. 1-5 [5] Microchip, “dsPIC33FJ128MC804,” product page, available online: http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=e n532303 [Déc. 2012] [6] Microchip, “MPLAB,” product page, available online: http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAG E&nodeId=1406&dDocName=en019469 [Dec. 2012] [7] Microchip, “Pickit2,” product page, available online: http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAG E&nodeId=1406&dDocName=en023805 [Dec. 2012] [8] STMicroelectronics, “L6234 : Three phase motor driver,” datasheet, available online: http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECH NICAL_LITERATURE/DATASHEET/CD00000046.pdf [Dec. 2012] [9] SS40A/SS50AT, “Magnetic Position Sensors, Data Sheet available online: http://sensing.honeywell.com/product%20page?pr_id=36554 [10] “LIS3LV02DL, MEMS inertial sensor, 3-axis ±2g/±6g digital output low voltage linear accelerometer, ” available online: http://www.st.com/web/catalog/sense_power/FM89/FM89/SC444/PF1 27514 [11] D. C. Meeker, “Finite Element Method Magnetics,” Version 4.0.1 (03 Dec 2006): http://femm.foster-miller.net [12] B. Khouane, “Etude et Commande d’un Moteur Synchrone Linéaire à Aimants,” Magistere thesis, Feb. 2013, pp.106, Université de Tlemcen, Algeria. [13] W-J. Xu, “Permanent Magnet Synchronous Motor with Linear Quadratic Speed Controller,” Energy Procedia, 2011 2nd International Conference on Advances in Energy Engineering (ICAEE), Volume 14, 2012, Pages 364–369, DOI: 10.1016/j.egypro.2011.12.943 [14] P-H. Chou, F-J. Lin, C-S., Chen, F-C. Lee, “DSP-based cross-coupled synchronous control for dual linear motors via intelligent complementary sliding mode control,” Colloquium on Humanities, Science and Engineering (CHUSER), 2012 IEEE, pp. 266 - 271, DOI: 10.1109/CHUSER.2012.6504322 [15] Y. Wu, H. Jiang, M. Zou, “The Research on Fuzzy PID Control of the Permanent Magnet Linear Synchronous Motor,” Physics Procedia, 2012, vol. 24, p. 1311-1318, DOI: 10.1016/j.phpro.2012.02.196

Suggest Documents