Examination of Electromagnetic Noises and Practical Operations of a PMSM Motor Driven by a DSP and Controlled by Means of Field Oriented Control

This paper presents main problems of practical implementation of filed oriented control (FOC) dedicated for a permanent magnet synchronous motor (PMSM). By means of this work, elements of FOC’s mathematical model and practical implementation of the electronic commutator are presented. It is based on the DSP processing unit IGBT power module. The measurement system consists of control unit equipped with inverter and encoder. The main element of driving system is PMSM drive. There are two main problems addressed in this paper: electromagnetic distortions and proper calculations in real systems. This work is intended to resolve these problems. Described solutions have been implemented and examined practically. DOI: http://dx.doi.org/10.5755/j01.eee.20.5.7099


I. INTRODUCTION
The recent years have brought rapid growth of automotive technologies in the field of hybrid propulsion systems.Vehicles with electric motors seem to be the perfect solution for city applications, due to obvious advantages like reduction of the power consumption, higher torque [1], low noise or no of hazardous pollutants emission.Combination of an economical and simultaneously environmental-friendly electric motor with a conventional internal combustion engine makes up the hybrid propulsion system that is an encouraging solution in terms of operation expenses.
Nowadays, the most interesting are propulsion system based on the NdFeB permanent magnet machines [2].Three most important advantages make permanent magnet machines ideal for vehicle designing: high efficiency, high torque and low weight.
Two constructions are the most frequent: Permanent Magnet Synchronous Motor (PMSM) and the Brushless DC electric motor (BLDC).Magnets and windings of the armature are arranged in such a way that the electromotive force (EMF) produced as a result of rotation would produce Manuscript received October 26, 2013; accepted January 12, 2014.
sine waveforms for PMSM motors and square ones for BLDC motors.
Electric motors with permanent magnets make it possible to simplify the motor design.The motor stator is usually similar to the stator of inductive motors whilst the rotor incorporates permanent magnets fitted to the rotor surface or arranged radially (inside the rotor grooving) [2].Since motors with permanent magnets have no commutator, the control operations (and designs efforts) are considerably shifted towards electronic control of the electric motor.The control system must enable to supply the motors with appropriate sine characteristic electric current.
This paper presents main problems in designing vehicle propulsion system with PMSM motor.The most popular simulation researches do not include motor noise (electromagnetic distortions) into account.However, it is very big problem in the real propulsion system.Control system must perform calculations based on real signals, which shape could be far from the expected.Another problem is to organize program (calculations) properly.In the study, both problems have been struggled to resolve by using digital filter base on the probes averaging and using interrupt system with proper priorities and sequence in time.

II. CONTROL SYSTEM
Three main blocks can be extracted in the control system developed in the study for the used PMSM motor as control unit, power module and measurement unit.
A generalized structure of control system for field oriented control with PMSM motor is presented in Fig. 1.The control unit is built based upon a DSP processorlabeled as TMS320F2812 by Texas Instruments [3].This DSP is dedicated to motor controls because of its resources.It consists of an ADC converter, PWM channels and floating point central processing unit.The TMS320F2812 PWM blocks are equipped with complementary channels with programmable dead time that make them ideal for H-bridge control.
The stator windings of the PMSM motor are supplied from a conventional 3-phase power module made up of 6 IGBT transistors, operated as keys, and transistor for break control.Control unit was equipped with intelligent power module PM50RLA060 by Mitsubishi [4].The power module has detection, protection & status indication circuits for stages such as short circuit, over-temperature & undervoltage operations.The application of PM50RLA060 is presented in Fig. 2. Encoder is one of two elements of measurement unit.Since it is necessary to measure winding currents, the voltages of the resistors used here are simply measured.This method is used for small power motors because of power dissipated in the resistor.The other method is to implement extra windings in the motor slots.There is a serious disadvantage of this method.Measuring the voltage induced in the secondary winding is difficult to perform due to its small value in the case of low speeds of the rotor.Moreover, field oriented control is based on the rotor angle.It is impossible to get actual rotor angle from extra windings while motor is stopped.
The third method of voltage measurements is to use sensors.Current and voltage sensors are made as noncontact or with integrated conductor.Different technologies are used as for example: Hall Effect, Rogowski coils, toroidal cores with measurement windings, etc.So called clip-on probes are widely used with measurement equipment as oscilloscopes; however, for continuous measurement system technologies with integrated conductor are used.In order to measure PMSM winding currents, closed loop current transducers was used, which was called as CASR 25-NP by LEM [5].The structure of the CASR 25-NP is presented in Fig. 3.It is equipped with galvanic isolation between the primary and the secondary circuit.The CASR sensor is dedicated for wide frequency ranges -including DC: in higher frequency ranges the transducer function exactly the same way as current transformers, while for DC and in low-frequency ranges the flux is measured by a sensing element that makes a closed control loop.

A. Field Oriented Control
In order to simplify calculations and analysis, two transformations are done.As the effect, three-phase stationary reference frame is transformed into two-phase rotating reference frame -three AC quantities are reduced to two DC quantities.Simplified calculations can then be carried out those two DC quantities.First, three-phase stationary system (a, b, c) is transformed onto stationary two-axis αβ-reference frame [6].Secondly, transformation that rotates a two-axis reference is performed [7] -dq-axes mode.Calculations are done and then the inverse transform is performed to recover the actual threephase AC results.The simplified block diagram of the signal flow is presented in Fig. 4 [8]- [10].It is signal flow for, socalled, field oriented control (FOC).It is necessary to measure stator winding currents and the rotor angle position.These quantities are the base for FOC calculations.

B. PMSM Motor
Another crucial element of the laboratory set was PMSM motor.PMSM motors have serious advantages like high efficiency -up to 90 %, or higher torque than other engines of similar size [1], [2], [9].Rotor of the PMSM motor includes only permanent magnets.There is no winding, so the overall weight can be reduced.
A laboratory set PMSM was built over ordering it to a producer.However, NdFeB permanent magnets were fitted to the rotor surface and not inside the rotor grooving.This is the reason that the back-EMF is not sinusoidal and rather trapezoidal.Another problem was electromagnetic interference generated by this PMSM motor.The shape of back-EMF of the tested PMSM motor is presented in Fig. 5.The parameters of the motor are given in Table I.Back-EMF of the PMSM motor was measured in generator mode for different rotor speeds.The PMSM motor was driven by means of induction motor.The shape of back-EMF of tested PMSM motor was examined for different rotation speeds: from small values up to overspeed.Two example back-EMF shapes for 200 rpm and 1000 rpm are presented in Fig. 5.It turns out that the phase waveforms are disrupted.With the increase of speed, the noise level steadily declined.

C. Problems with Encoder
One of the most important problems in field oriented control is to measure a rotor angle.Optical encoder AMT203 by CUI was used [11] first.It was part of the laboratory set for over one year.However, electromagnetic disturbances generated by PMSM motor effectively disrupted work of this encoder and in the effect the control system as well.Electromagnetic disturbances make the encoder "lost his position" and return the value of rotor position different than the real angle.Sometimes, encoder was completely suspended.To show the effects of encoder malfunction experiments with sinusoidal signal generating were performed.The signal generated based on the AMT203 encoder has many discontinuities like the one presented in Fig. 6.Due to problems with AMT203 another encoder was used.It was MAB28 by Megatron [12].This is Hall-effectbased encoder and it is completely different made -it is enclosed in metal casing with included shielded cable connected to the enclosure.Experiments performed for AMT203 encoder have been reproduced for MAB28.The encoder MAB28 turned out to be resistant to interference generated by PMSM motor.

D. Problems with Calculations
Two sets of variables are necessary to perform transformations and calculations within field oriented control: rotor angle and stator-winding currents.Rotor position is measured by means of encoder, while statorwinding currents are measured by means of CASR-25 current transducers.The signal measured by transducers corresponds to real winding currents, i.e. presented in Fig. 5. Signal from current transducer is converted to digital values by means of ADC (16 bit) built into the DSP.Example of measured and converted signal is presented in Fig. 7. First, experiments with simple RC filter low-pass filters were conducted.Different number of RC sections was used.
The delay introduced by RC filters, moreover, different delay for different frequencies, is unacceptable.However, shapes of windings currents were nicely filtered.
Another idea is applying a simple digital filter to "fix" stator-winding current and restore the sinusoidal character of the signal by averaging the set of probes.Set of 32 (or 16) probes is added.This sum is divided by 32 (16) after every ADC conversion.The idea of determining averages in the process of PMSM control is presented in Fig. 8, where: PWM Control signal correspond to PWM interrupts, ADC Conversions correspond to ADC interrupts.
ADC can operate at a maximum frequency of 50 MHz, while the pulse width modulation PWM operates at a frequency of 8 kHz.It follows that the converter is able to make 6250 measurements within one PWM control.Averaging is done on a queue base on the FIFO buffer -the first sample is eliminated, the current is written in its place.Averaging introduce constant delay.Measured winding currents after digital averaging are presented in Fig. 9. Calculations for two different length of averaging buffer are presented: 16 and 32 probes.

IV. DSP PROGRAM
A digital signal processor program is based on three interrupts.The main interrupt is from the PWM module (timer-based interrupt) and performs at 125 us.The calculations are performed within the interrupt services as Park transformation, Clarke transformation, three PI controllers (speed controller, d-axis controller, q-axis controller), the reverse transformation Park and vectors for power module.
Calculations performed in the PWM interrupt service are based on previous measurements of winding currents and the rotor angle.The measurements are realized within two others interrupts: One is from the encoder and the other is from ADC.
The interrupts from encoder are actually the timer-based interrupts.It is performed every 40 us and has the highest priority due to necessity of determining exact rotor angle and rotor speed.Interrupt service from encoder is relatively short.The question is: is it necessary to read encoder position more frequently than PWM control.There are two reasons.First, it enables increasing resolution of rotor speed calculation.Second, the reliability of the encoder is increased by means of checking correctness of the encoder value.Encoder values that are suspected as with errors (the difference between current and next value is too big) are discarded.
The interrupt service from ADC is performed the most frequently.The current value is read from ADC every 20 ns.Then average values of sets of stator-winding currents probes are calculated.To be precise, 32 values before PWM interrupt are necessary for FOC calculations.Nevertheless, experiments were performed with ADC working continuously.
Time diagram for program operations in DSP processor for field oriented control is presented in Fig. 10.
The rotor speed calculations are performed in order to use it for field oriented control.However, the rotor speed has long-term impact for filed FOC control.
It is based on the angle increment in constant time.This time depends on the rotor speed.According to Table I, the maximal rotor speed is 3000 rpm (max = 3000 rpm).It takes 20 ms for full reverse.So the encoder must be read more often than 20 ms according to (1) (max) 60 .
The rotor speed is calculated from (2) 1 60 , 4096 where en and en+1 are two encoder positions read every trpm time.It was assumed that the rotor speed is calculated for algorithm with constant time between probes.In that case, it is necessary to calculate the minimum time between probes for the difference in encoder probes equal to one (3).For the minimum speed of 2 rpm the time is equal 7.3 ms.
  The time for rotor speed calculations is set to 10 ms.In fact, the rotor speed is calculated within timer interrupt service that initiates transmission with encoder.Speed calculations are performed periodically -not in every interrupt service.

V. CONCLUSIONS
The paper presents main problems of implementation of vehicle propulsion system.The system is based on the synchronous PMSM motor controlled by means of filed oriented control algorithm.This closed-loop method base on the input signals: rotor angle position and stator winding currents.Electromagnetic distortions have pernicious influence on the calculations performed in control unit as well as for the operation of the encoder.The most popular simulation researches do not include electromagnetic distortions into account.However, it is very big problem in the real propulsion system.Elements of digital filtering were proposed.
Control unit was built based upon field oriented control that operates on the dq-axis operations.Presented in the paper method of averaging the sets of stator winding currents was implemented.Different experiments were performed.Characteristics of the torque and efficiency in function of the rotating speed were measured.The efficiency of the PMSM motor is nearly 90 % and the torque correspond to its nominal 4 Nm for 300 rpm up to 900 rpm (rated speed).Experiments in second region of regulation with the flux weakening were also performed.The speed can be increased above the rated speed by 30 %.
In future, works on developing better digital filtering method are indicated.Some conclusions about program ordering appeared, for example interrupt from encoder should appear more frequently.This probably would improve elimination of wrong encoder positions by means of digital filtering.

Fig. 1 .
Fig.1.A Generalized structure of control system for field oriented control with PMSM motor.

Fig. 2 .
Fig. 2. PM50RLA060 application circuit.unit is one of the most important part in the closed loop control, as presented in Fig 1 and Fig. 2.Encoder is one of two elements of measurement unit.Since it is necessary to measure winding currents, the voltages of the resistors used here are simply measured.This method is used for small power motors because of power dissipated in the resistor.The other method is to implement extra windings in the motor slots.There is a serious disadvantage of this method.Measuring the voltage induced in the secondary winding is difficult to perform due to its small value in the case of low speeds of the rotor.Moreover, field oriented control is based on the rotor angle.It is impossible to get actual rotor angle from extra windings while motor is stopped.The third method of voltage measurements is to use sensors.Current and voltage sensors are made as noncontact or with integrated conductor.Different technologies are used as for example: Hall Effect, Rogowski coils, toroidal cores with measurement windings, etc.So called clip-on probes are widely used with measurement equipment as oscilloscopes; however, for continuous measurement system technologies with integrated conductor are used.In

5 .
Back-EMF of the PMSM motor in generator mode for two different rotor speeds: a) 200 rpm, b) 1000 rpm.

Fig. 7 .
Fig. 7. Measured winding currents by means of current transducer and converted by means of ADC.

Fig. 8 .Fig. 9 .
Fig. 8.The idea of digital averaging in the process of PMSM control.

Fig. 10 .
Fig. 10.Time diagram for program operations in DSP processor for FOC control.