Professional Documents
Culture Documents
net/publication/344402248
LabVIEW FPGA Based BLDC Motor Control by Using Field Oriented Control
Algorithm
CITATION READS
1 635
4 authors, including:
Kenan Toker
Marmara University
6 PUBLICATIONS 11 CITATIONS
SEE PROFILE
Some of the authors of this publication are also working on these related projects:
Development of decision support system using Mamdani type fuzzy logic clusters for metabolic syndrome risk assesment View project
All content following this page was uploaded by Guner Tatar on 30 September 2020.
Kenan TOKER
Electrical and Electronic Engineering
Marmara University
İstanbul, Turkey
ktoker@marmara.edu.tr
Abstract—BLDC (Brushless Direct Current) motors are widely the results. For the control of BLDC motors, the rotor position
used today due to its high reliability and high efficiency. Theseand the motor control mechanism must be known. Many meth-
motors are synchronous motors that have a linear relationship ods have been developed in this process. Some of these are
between voltage-speed and current-torque. To control these kinds
of motors, inverters are needed. Inverters create a rotational listed as Trapezoidal Drive Control, Sinusoidal Drive Control,
movement in the motor by switching at the appropriate time Simplified Vector Control, Vector Control (FOC), Sensorless
according to the rotor position information. Rotor position is Trapezoidal Drive Control, Sensorless Vector Control. These
obtained in two ways, with and without sensor. Sensor method methods are generally determined according to the position
uses encoders, resolvers or hall effect sensor. Hall-effect sensors
detection logic in the motor and it is possible to determine
are generally preferred for the control of BLDC motors in
terms of cost. In this study, the rotor position was obtained these positions with suitable software. Here, FOC with FFC
by using hall-effect sensor. Pulse Width Modulation (PWM) as the control method and LabVIEW graphical programming
is used to control the frequency and voltage of the inverters. language were chosen as the software language.
Today, Sinusoidal PWM (SPWM) and Space Vector Pulse Width Similar studies have been taken into account and differences
Modulation (SVPWM) techniques are frequently used in such have emerged. In [6], Speed control for permanent magnet syn-
applications. This study explains the development of a Field
Oriented Control Algorithm (FOC) based on SVPWM technique chronous motors was made using FOC algorithm. However,
by using the LabVIEW FPGA Module for a BLDC Motor. It also the FFC control algorithm was not used. The software part of
shows the effects of using PI and FFC (Feed Forward Control) the study was developed in LabVIEW and Compact-RIO was
algorithm together and separately in the controller for the control
used as the hardware part. Although the motor types used in
of Id and Iq reference currents. In addition, simulation of all this study and [6] are the same, the powers are different. The
project was developed and run in Matlab/Simulink.
Index Terms—BLDC, LabVIEW-FPGA, PI regulators, FFC, feedback sensors are also completely different. In a similar
FOC, hall effect sensors, SVPWM. study [7] Rapid Control Prototyping system has been discussed
which is based on Xilinx System Generator. In this study,
I. I NTRODUCTION FOC algorithm with FFC was discussed to drive the BLDC
motors. Although the study uses the same theoretical structure,
Most of the electrical motors used in industrial applications the software and hardware implementations are completely
are three-phase induction motors or Brushed Direct Current different. In [7], decoder was used as feedback sensor and
Motors. While these two type of motors have low efficiency, single drive inverter board was used as driver. The method-
BLDC and any similar motors have high efficiency and high ology of the study of [8] shows the highest similarity with
power to volume ratio [1]–[5]. Although BLDC motors have our study in terms of development platform. Some LabVIEW
significant advantages, their drive and control operations are code blocks were taken from there, because similar control
more complicated and difficult. Before starting any application method was used. However, the power of the motor used and
on a real system, working on a simulation will provide the user the driver board are different. In addition, the sensors used for
with considerable convenience. For this reason, a platform in the feedback signals are also different. On the other hand, used
LabVIEW FPGA Module was developed to test and monitor power electronic components shows a considerable difference.
the behavior of BLDC motors. In addition, a Matlab /Simulink During the study, NI LabVIEW graphical development
model of the same system was developed in order to compare platform was used to program the test platform, to develop
a user interface for monitoring and logging the results. The
978-1-7281-4701-7/20/$31.00 ©2020 IEEE
model was implemented on sbRIO-9637 development card. Here, np represents pole pairs. Since the rotation speed is the
In the project block diagram; first, software was created in derivative of the rotor position, the relationship between the
LabVIEW FPGA module and then transferred to the FPGA electrical and mechanical rotation speed can be given in (2).
core. This module is a software package that converts graph-
ical code blocks developed in the LabVIEW environment to ωe = ωm np (2)
VHDL and transfers them into the FPGA core. Simulation
in Matlab/Simulink of the test set-up was constructed in Velocity and rotor position are calculated by using feedback
order to evaluate the reliability of the real system. In order data (θ). Current values are calculated with the help of sensors.
to emphasize the positive effect of FFC on PI controller, Since the total amount of symmetric currents are zero ( Ia +
experimental results were given for different motor speeds Ib + Ic = 0), it is sufficient to measure any two of the stator
in no-load condition. The hardware components necessary phase currents.
for driving the electric motors must be selected according
to the torque, speed and the motor type. Each motor has its
own specifications given in the technical documents from the
manufacturers. Therefore, a driver developed for one motor
can not be used for any other motors. In this project, driver
and controller were designed for 1kw light electric vehicles.
The paper organisation is as follows; in Section II system
development and working principle were explained, in Section
III BLDC motor and its equations were given, in Section
IV hardware structure was introduced, in Section V SVPWM
technique was explained, in Section VI software design was
given, in Section VII system simulation was done, in Section
VIII simulation result and the last Section IX conclusion and Fig. 1. Overall Block Diagram of the Project [7]
discussion were announced.
PWM affects the performance of the driver and hence the
II. S YSTEM D EVELOPMENT AND W ORKING P RINCIPLE performance of the motor. The PWM controller is capable
In BLDC motors, control is undertaken by an electronic con- of generating the desired output waveform. While doing this
troller. The controller includes a micro controller that provides some harmonics can occur. These harmonics are produced
semiconductor circuit elements and switching related timing by the iron and copper as it causes the loses to increase
to carry out the high-current switching task. The controller which in turn leads to overheating of the motor. Furthermore,
must follow the rotor position at an appropriate speed so that power loses in the electric motor drive cause electromagnetic
there is no disruption of the motor rotation. For this reason, interference and impact torques.
the rotor position must be precisely determined. That’s why, In the switching circuits driven by the SVPWM method
motor parameters (such as sensitivity, cost, efficiency) and according to the conventional PWM, an output voltage with
speed should also be taken into consideration. In this project, less harmonic content is obtained due to the shape of the input
the closed loop torque control was considered and the Id voltage. Switching circuits are power electronic devices that
flux reference value was taken (assumed) as zero. Among the convert the voltage at the output to the AC voltage at the
existing control methods, FOC algorithm (fig.1) is widely used desired frequency and voltage at the output. Although it is
since it is more efficient than the others [9], [10]. The FOC desirable that the current or voltage curves at the inverter
method is based on the positioning of space vectors. The basic output be sinusoidal, it is inevitable that harmonics which
principal behind this and similar vector control algorithms is often distort the output sinus signal was generated. By using
to enable separate control of the current components forming high-frequency semiconductor circuit elements and switching
the magnetic flux and torque in synchronous or asynchronous techniques, it is ensured that the most of the harmonics gener-
motors. Stator current is required to perform independent ated at the output voltage can be reduced. The development of
control of torque and flux production as specified. The stator the semiconductor elements used in the power converters and
current vectors are projected to the static reference plane as αβ, the digital signal processors having fast processing capabilities
then to the rotational reference as dq [7], [8], [11]. In order to are used for complex conversion and control algorithms. The
understand the concepts mentioned, it is necessary to know the amplitude, phase and frequency of the voltage applied to
difference between the electrical and mechanical position of the motor windings can be changed by applying a suitable
the rotor. The mechanical position is the actual position of the PWM signal to the inverter using the techniques described
rotor shaft, and the electrical position is related to the rotation above. By comparing the control signal generated by the PWM
of the rotor’s magnetic field and it depends on the number of algorithms with the high frequency carrier signal, the inverter
pole pairs. Relationship between two terms is expressed as in sets the "on-off" duration of the semiconductor switching
(1). elements. In this way, a fundamental voltage is produced with
θe = θm np (1) a desired voltage value [11], [12].
III. DYNAMIC BLDC M OTOR E QUATIONS
For vector control of BLDC motors, the stator variables in
the fixed plane must be transformed into the rotating rotor
plane. In this way, it is possible to reduce the degree of the
equations to get a faster solutions [6], [13]–[15]. However,
the speed of the system to be discussed must be known in
the reference plane. The examination of the reference plane is
possible with Park and Clark transformations. In the equivalent
circuit, the current and voltage equations are converted from
three phases to two phases using Park transformations. In this
case, the stator voltage equations in the reference plane of the
BLDC motors are determined by Kirchhoff’s law [14], [16],
[18], [19]. Equivalent equations for d and q values of BLDC Fig. 2. Hardware Structure of the System
motors were given (3) and (4).
IV. H ARDWARE S TRUCTURE
d(Iqs+φ )
Vds = Rs Ids − ωr Lqs Iqs + Lds (3) Figure 2 shows the hardware structure of the system. 1 kW
dt
BLDC motor is fixed on the bicycle wheel. The system was
d(Iqs ) tested by using a 1 kW motor and the results were examined.
Vqs = Rs Iqs + ωr Lds Ids + Lqs + ωr φ (4) The motor parameters used was given in table I.
dt
dφ TABLE I
=0 (5) M OTOR PARAMETERS
dt
Parameters Value Unit
Then; Applied Voltage 24-48 V
d(Iqs ) Rs (Stator Resistance) 0.16 ohm
Vds = Rs Ids − ωr Lqs Iqs + Lds (6) Ls (Stator Inductance) 2.716 mH
dt
T m (Load Torque) 12.12 Nm
Average Power 1 kW
dIqs Average input current 8.1009 A
Vqs = Rs Iqs + ωr Lds Ids + Lqs + ωr φ (7) Number of pole pairs 12
dt
Rated speed 300 rpm
The electromotive force is obtained by (8) Stator Flux Density 1.788 Tesla
J (Inertia) 0.0458604 kgm2
Te = 0.75np(Iqs φ + (Lds − Lqs )Iqs Ids ) (8) Ke (Ideal Back-EMF Constant) 1.36524 Vs/rad
KT (Rated Torque Constant) 1.4967 Nm/A
Since the magnetic flux in the rotor of BLDC motors is
generated by the permanent magnet and the rotor resistance
is very high, the magnetization component of the current V. SVPWM
becomes zero (Ids = 0). In addition, the motors where the In order to apply the correct phase voltage to the stator,
magnets are placed on the rotor surface have no oscillation. the inverter needs an appropriate pulse width modulation
Therefore, the d and q − axis inductance match each other. signal. These PWM signals are obtained by Space Vector
In this case, if the electromagnetic moment is re-arranged. Modulation. The SVPWM converts the two reference vectors
(Vαref , Vβref ) to the appropriate binary key patterns for driv-
Te = 0.75npIqs φ (9) ing the inverter using pulse width modulation. These switching
patterns lead to the induction of voltage in the stator phases
Electrical angular speed and position of the motor are obtained to obtain the stator currents that will produce the desired flux
by (10) and (11). vector [20]. For a better understanding of space vector pulse
width modulation, it is necessary to know the 3-phase inverter
dωr Te − Bωr − TL
= (10) structure.
dt J As fig.3 shows, each phase of the inverter consists of two
lower and upper switch groups. When the upper switch group
dθ (Q1, Q2, Q5) is connected to the positive DC line; the sub-
= ωr (11)
dt key group (Q2, Q4, Q6) is connected to the negative DC line.
Here; In the inverter circuits, there are 2 switches for each cable
Rs : Stator line resistance, Lsq and Lsd : Stator inductance, Isq and 6 switches in total, and those switches drive the motor
and Isd : Stator currents, ωr : Mechanical speed, φ: Magnetic according to the 23 = 8 possible combinations. 000 and 111
flux, Te : Electromagnetic moment, np: Number of pole pairs. of these combinations are not used.
A. PI Controller
Totally, two PI controllers were used. These PI controllers
were taken from the internal PID block running on the FPGA.
It is used by adjusting the PI from the PID block. They
were used to regulate and stabilize the Id and Iq currents
obtained from the Park transformation. Ideal continuous-time
and discrete-time PI controller equations were given in 12, 13.
The LabVIEW code part of the PI blocks was given in fig. 5.
Z
Fig. 3. Inverter Structure [1]
u(t) = Kp e(t) + Ki e(t)dt (12)
n
Kp T X
u[n] = Kp e[n] + e[k] (13)
VI. S OFTWARE D ESIGN Ti
k=0