0 views

Uploaded by toufani95

design control for bldc using PID

- Competences
- micrologix 1100
- Cascade Control
- Comparative Study of Load Frequency Control for Interconnected Three Area Power System Using PID and FOPID Controller
- PID.txt
- 02_Introduction to the NI LabVIEW Control Design and Simulation Module
- 05_BasicControlTheory
- Feedback Control of Substrate
- IARJSET 29
- Process dynamics and Control seborg 2nd ch15 Solutions
- Mat Lab Path
- Jiang-Jian Wang - Research of Cascade Control With an Application to Central Air-conditioning System
- Argha, Su, Celler - 2016 - Heart Rate Regulation During Cycle ‑ Ergometer Exercise via Event ‑ Driven Biofeedback
- Module5 5.pdf
- 1Stage 5 Shams ICCAS2013
- FREERUN ITCH Final Report2 vGuadalajara
- Bea
- Omniwheel Kiwi Drive Inverse Kinematic
- Philosophy
- 10-1 PUMP CALIBRATION 390MJ ~ 950MJ.PDF

You are on page 1of 14

Brushless DC Motors

using PID Algorithm

Whitepaper

1

Contents

Abstract ........................................................................................................................................... 3

Keywords......................................................................................................................................... 3

Introduction .................................................................................................................................... 4

Three Phase Motor Commutation .................................................................................................. 4

Methods for Speed Control of Motor ............................................................................................. 6

1. Open-loop Method ........................................................................................................................... 6

2. Closed-Loop Method......................................................................................................................... 6

Implementation .............................................................................................................................. 9

1. Hall Sensor Decoder ........................................................................................................................ 10

Conclusion ..................................................................................................................................... 13

References .................................................................................................................................... 13

About Authors ............................................................................................................................... 14

2

Abstract

Field Programmable Gate Arrays (FPGA) has gained attraction in the field of Industrial

automation and is becoming more popular in motor control applications due to its robustness

and customizability. The use of FPGA provides outstanding hardware design flexibility. This

further enables implementation of a fully customizable peripheral set and also helps to meet

the increasing performance requirements. The paper covers the use of Xilinx Kintex 7 FPGA

based implementation of close loop control system. The close loop system controls the speed of

Three-Phase Brushless Direct Current (BLDC) motor, by using feedback from three hall sensors.

Xilinx Kintex 7 FPGA based speed controller of brushless DC motor system is designed and

implemented using PID algorithm. The design is implemented using Verilog Hardware

Description Language (HDL). As FPGA supports reconfigurable computing and provides a facility

of on-chip parallelism, good operational performance was achieved.

Keywords

3

Introduction

Nowadays, brushless DC motors are widely used in various applications, right from motor

vehicle, and industrial application to aircrafts for the control application. The primary reason of

increasing usage of brushless DC motor can be attributed to good weight/size to power ratio,

excellent acceleration performance, little or no maintenance and less acoustic and electrical

noise than Brushed DC motors. This has led to significant researches for the speed control on

the BLDC motors.

In BLDC motor, the commutation of a BLDC motor is controlled electronically. To rotate the BLDC

motor the stator windings should be energized in a sequence. It is important to know the rotor

position in order to understand which winding will be energized following the energizing

sequence. Rotor position is sensed using Hall-effect sensors embedded into the stator. Mostly

BLDC motors have three Hall sensors inside the stator on the non-driving end of the motor.

Whenever the rotor magnetic poles pass near the Hall sensors they give a high or low signal

indicating the N or S pole is passing near the sensors. Based on the combination of these three

Hall sensor signals, the exact sequence of commutation can be determined.

The remainder of the paper is arranged as follows. Section 2 describes the three phase

commutation. Section 3 explains different methods for speed control of BDLC motor and

provides detailed explanation of PID algorithm. The implementation of FPGA based speed

control of motor using three feedback hall sensors is described in section 4. While Section 5

shows the simulation and validation results of the implemented design. Finally, conclusions are

drawn in Section 6 and references are listed in Section 7.

As compared to Brushed motors, the commutator and brushes in Brushless motors are replaced

by six Transistor/MOSFETs/IGBTs to form three-phase Bridge as shown in figure1. Three phase

windings either in Star/Delta fashion is connected in motor with each winding 120 degrees

apart. Windings are energized by providing a constant voltage level at the transistors on one

branch of bridge (as indicated by signals PWM A, PWM B& PWM C); while on the other branch

the PWM pulses are applied (as indicated by signals PWM A, PWM B & PWM C).

4

V+

PWM C A

PWM A PWM B

HA

HC

C B

HB

V-

Figure 1 : Bridge Circuit of Motor Driver

At any time, one winding is connected to positive terminal through upper transistor; one

winding is connected to negative terminal through lower transistor and third winding connected

to ground terminal. The phase sequence at each terminal will be as per figure 2. Only two

phases are active at a time. Hall sensors are used to detect the position of rotor; their outputs

will appear at exactly 120 degree apart from each other as per figure 2.

A Hall A

1 Electrical Cycle

B Hall B

C Hall C

A A B B C C A A A A B B C C A A

B C C A A B B C B C C A A B B C

5

Methods for Speed Control of Motor

For speed control of BLDC motor using sensor based method, it is required for the controller to

know the rotor position for electronic commutation.

1. Open loop

2. Closed loop

1. Open-loop Method

In this method, the actual motor speed is not tracked and hence there is no feed-back

mechanism. Only reference speed is used to control the motor speed by updating PWM duty

cycle. The advantages of this method are simplified control algorithm and lower cost of

implementation. The disadvantage is that accuracy cannot be maintained as there is no way to

track the actual motor speed.

SPEED

REFERENCE PWM

OPEN-LOOP MOTOR THREE PHASE

CONTROLLER DRIVE BLDC MOTOR

2. Closed-Loop Method

In this method, the actual motor speed is tracked and hence the feed-back mechanism is

critical. Here both the reference speed and the actual speed are used to control the motor

speed by updating the PWM duty cycle. The main advantages of this method are the system

stability; minimal disturbances compared to open-loop control and reduced sensitivity for

dynamic load variations.

P controller, PI controller, PD controller and PID controller are the controller types which can be

used in feedback or feedforward systems based on the system requirements. PID controller is

widely implemented in closed-loop type of feedback control system for speed control of BLDC

motors.

P and PD controller is directly proportional to incoming error; hence a little change in error can

cause system instability.

PI controller is an accurate and provides good system stability i.e. less steady state error

response. But the integral factor in controller takes more iteration to reduce error to zero.

6

PID controller is the most reliable, accurate and provides better system stability i.e. less steady

state error response as well as it helps to eliminate incoming error to zero with minimum

iterations.

SPEED

REFERENCE PWM

CLOSED-LOOP MOTOR THREE PHASE

CONTROLLER DRIVE BLDC MOTOR

A. PID Algorithm

PID controller is the most widely used in closed-loop control system. The algorithm works on

the error generated from the difference between the reference speed and the actual speed. PID

parameters Proportional gain Kp, Integral Gain Ki, and Derivative Gain Kd affects systems overall

performance. Hence choosing right parameters for a system is a difficult process and can be

done by using several tuning methods which includes manual tuning, Ziegler-Nicholas tuning

and Cohen-coon tuning. Normally a mathematical model of the system is designed along with

PID controller and the system performance is observed with applied set of values of PID

parameters to finalize the best suited values.

Following are the effects of PID parameters (Kp, Ki, and Kd)

System Rise time will be reduced by Kp, it provides faster response in variable load

condition

Steady state error will be reduced by Ki , hence the motor speed is pushed near to

reference speed

Settling time and overshoot will be reduced by Kd, hence provides faster response.

7

P

Kp * e(t)

I +

t

Ref + e(t) + PLANT/

Ki e(t) dT PROCESS

0

- +

D

Actual d

Kd * e(t)

dt

Figure 5 : Block Diagram of a System with PID Controller and Feedback loop

t

d

u(t) = Kp * e(t) + Ki e(t) dT + Kd * e(t) . (1)

dt

0

For digital implementation of above continuous form equation, discrete time transformation is

required. The discrete form is achieved by first applying Laplace transform on each individual

term and subsequently applying z transform on each term. The transformation for each

individual term is as shown in table 1.

(Discrete time

transformation)

Proportional u(t) = Kp * e(t) u(s) = Kp * e(s) u(z) = Kp * e(z)

(P)

Integral

t

u(s) =

Ki

e(s) Ki * e(z)

u(t) = Ki e(t) dT s * u(z) =

(1-z-1)

(I) 0

Derivative

u(t) = Kd *

d

e(t) u(s) = Kd* s *e(s) -1

u(z) = Kd* (1-z ) * e(z)

(D) dt

8

By replacing values of z transformations from table 1 to equation (1), we get

Ki -1 * e(z)

u(z) = Kp + + Kd * (1-z ) . (2)

(1-z-1)

Further simplifying it,

u(z) =

(1-z-1)

By rearranging equation (3) we have,

u(z) z-1 u(z) = (Kp + Ki + Kd) + (-Kp - 2Kd) * z-1 + Kd * z-2 * e(z) . (4)

By converting equation (4) in to difference equation, we get following equation, which can be

easily implemented in digital systems by using basic digital blocks like adders and multipliers.

Implementation

Closed loop control method using PID algorithm is implemented on Xilinx Kintex 7 Field

Programmable Gate Array (FPGA). The top level block diagram for implementation is as shown

in figure 6.

PWM A

PHASE A

REFERENCE PWM A

3

SPEED PID PWM PWM B PHASE B

Phase

CONTROLLER GENERATOR PWM B

Motor

PWM C

Drive PHASE C

PWM C

COMMUTATION

ACTUAL SPEED

SEQUENCE

THREE

PHASE

BLDC

MOTOR

HALL A

HALL

SPEED HALL B

SENSOR

COMPUTATION

DECODER

HALL C

9

1. Hall Sensor Decoder

Different combination of hall inputs will be available based on rotor position. Hall inputs

combinations will repeat in successive manner for an electrical cycle as shown in figure 2. By

decoding the sequence of hall sensors, we will get information about change in electrical cycle

as well as the commutation sequence.

2. Speed Computation

Actual speed of motor is calculated based on electrical cycles. An electrical cycle has direct

relation with RPM (Revolution Per Minute) of motor, as an example for single pole motor, one

electrical cycle represent one revolution (1 RPM) of motor.

3. PID Controller

As described in section 3.2.1, PID algorithm is simplified to Equation (5) and is digitally

implemented with use of multipliers and adders. PID processes the incoming error per electrical

cycle. For implementation of this motor control application, the tuning of the PID parameter

values (Kp, Ki and Kd) are derived from a mathematical model.

4. PWM Generator

The speed of motor is controlled by varying the motor torque. Motor Torque can be varied by

changing average voltage across the motor windings. For varying average voltage across the

windings the PWM method is used where the duty cycle of wave is varied according to require

speed. The variation of applied PWM wave is based on hall sensor decoder output to recognize

which phase is to be energized. Here, on one branch; level signal is applied (PWM A , PWM B &

PWM C ) and on another branch PWM signal is applied (branch PWM A, PWM B and PWM C)

which is shown in figure 7.

10

Step 1 Step 2 Step 3 Step 4 Step 5 Step 6 Step 1 Step 2 Step 3

Hall 101 100 110 010 011 001 101 100 110

States

HA

HB

HC

PWM A

PWM A

PWM B

PWM B

PWM C

PWM C

5. Implementation Results

A. Simulation Results

Figure 8 represents simulated waveform for FPGA control logic integrated in system. Ha, Hb and

Hc the hall sensor inputs and reference speed are the test inputs provided through test bench.

PID continuously processes the input error at every electrical cycle and based on PID output

PWM waves are generated for the three phase windings.

11

B. Chipscope Pro Analyser Results

Figure 9 represents in chip Xilinx Kintex 7 FPGA debugged waveform using Chip Scope Pro

Analyzer for PID control logic. PID output matches (pid_o) with set reference (ref_speed) after

certain electrical cycles.

Digital FPGA based implementation with integer arithmetic produces response very close to

mathematical model response as shown in figure 10.

12

Conclusion

Through this paper, Hall sensors based closed loop implementation to control the speed of the

motor is discussed. Simulation results and chipscope validation results of implemented PID

based BLDC motor controller shows accurate results. Use of PID in the closed loop

implementation adds efficiency and stability to systems. The FPGA based implemented motor

controller can be used for system critical applications where the system stability and motor

speed accuracy are the determining factors.

References

I. slaa503: Texas Instruments Application Report on Sensored 3-Phase BLDC Motor Control Using

MSP430.

II. Ishnatek Application Note: Implementing a Brushless DC Motor Controller on an IGLOO FPGA.

13

About Authors

1. Mr. Sandeep Masade, Technical Lead ASIC has 11 years of experience in eInfochips. His

expertise is in to Design and verification of FPGA and ASIC. He has worked on more than

12 System on Chips (SOC)/FPGA products in semiconductor industry from Micro

Architecture definition to system level verification and validation of complex devices in

various computing and data transfer applications. He is well versed with different

technologies, protocols, algorithm and their implementations and having good exposer

on the standards like European Aviation Safety Agency (EASA) and DO-254 which he has

accumulated through his years of experience.

2. Mr. Shubham Parmar works at eInfochips as Senior Engineer. Shubham has experience

in ASIC /FPGA design and verification cycle. He has worked on complete FPGA system

implementation flow covering micro-architecture design, RTL coding, gate level

simulation, synthesis, PAR, timing closure and board validation. He has designed and

implemented various Algorithms for Communication systems and has good exposure on

the standards like DO-254. He is well versed with different technologies, protocols,

algorithm and their implementations. He has worked on variety of projects covering

applications in domains like Satellite communication, Automation, and DSP.

3. Mr. Atul Jaisen Bhanushali, ASIC/FPGA Engineer has 4 years of experience in eInfochips.

He has worked on complete FPGA system implementation flow covering micro-

architecture design, RTL coding, gate level simulation, synthesis, PAR. He is well versed

with different protocols, algorithm and their implementations and having good exposer

on the standards like DO-254 which he has accumulated through his years of experience.

14

- CompetencesUploaded byLew Chee Cheong
- micrologix 1100Uploaded byRicardo Jhonatan Bueno Portilla
- Cascade ControlUploaded byAgbim Martins
- Comparative Study of Load Frequency Control for Interconnected Three Area Power System Using PID and FOPID ControllerUploaded byAnonymous izrFWiQ
- PID.txtUploaded byIgnacioMartí
- 02_Introduction to the NI LabVIEW Control Design and Simulation ModuleUploaded bykiara_072
- 05_BasicControlTheoryUploaded byJuan Antonio Rivera Zetina
- Feedback Control of SubstrateUploaded byAkash Deep
- IARJSET 29Uploaded byshubham kumar
- Process dynamics and Control seborg 2nd ch15 SolutionsUploaded byUtkarsh Jain
- Mat Lab PathUploaded byVivekNath
- Jiang-Jian Wang - Research of Cascade Control With an Application to Central Air-conditioning SystemUploaded byCarlos Bellatin
- Argha, Su, Celler - 2016 - Heart Rate Regulation During Cycle ‑ Ergometer Exercise via Event ‑ Driven BiofeedbackUploaded bymostafa
- Module5 5.pdfUploaded byAshish Mishra
- 1Stage 5 Shams ICCAS2013Uploaded byShamsMohd
- FREERUN ITCH Final Report2 vGuadalajaraUploaded byAbel Felix
- BeaUploaded byVictorPabloMenendezFox
- Omniwheel Kiwi Drive Inverse KinematicUploaded byHandriToarPangkerego
- PhilosophyUploaded byDipti Bhanja
- 10-1 PUMP CALIBRATION 390MJ ~ 950MJ.PDFUploaded byGREGWEILER
- Module 7 MCRUploaded byMichael Cabrera Rabino
- BalancingUploaded byPaul Cueva
- Fixed Angle Control SchemeUploaded byapi-26587237
- Manual de Instalación Integrador MilltronicsUploaded byDan Hidalgo Quinto
- temperature_tg_e_6_3_temperature_sensor_tg_e_5_3.pdfUploaded byZeljko Petrovic
- PID-ANN in Medical DiagnosisUploaded byJournal of Medical Sciences and Public Health
- SattCon 05-OP Programmers ManualUploaded byGillSport007
- 0_lec16.pdfUploaded byAndrea Susak
- Ch12Uploaded byRENGANATHAN P
- ReportUploaded byFrank Laritz

- Sensor Ketinggian Air Sebagai Pendeteksi Banjir-iUzvqyw4CPUploaded bytoufani95
- 7109040514_mUploaded byNura Zulfia
- Cara Menjadi Manusia Yang Produktif Sepanjang HariUploaded bytoufani95
- MENJADI MAHASISWA SUKSESUploaded bytoufani95
- Sistem Kontrol Inverted Pendulum Pada Balancing Mobile Robot - PDFUploaded bytoufani95
- Desain Dan Implementasi Peringatan Dini Banjir Dengan Menggunakan Data Mining Dengan Wireless Sensor NetworkUploaded bytoufani95
- DIY-MAKING A PORTABLE DIGITAL TACHOMETER.pdfUploaded bytoufani95
- JURNAL MEDAN MAGNET BUMI _ Satu Hati,Berjuta Rasa.pdfUploaded bytoufani95
- How to Make Digital Tachometer Using ArduinoUploaded bytoufani95
- DIY-MAKING A PORTABLE DIGITAL TACHOMETER.pdfUploaded bytoufani95
- Dc Control Speed With PidUploaded bytoufani95

- Data Acquisition System(1)Uploaded byKaran Patel
- 9600 LH_LSY_MPT-HL Swap Creation Description 140430 Ed01Uploaded byAtanda Babatunde Mutiu
- MKF 56Uploaded byPhuong Le
- PROJECT REPORT ON DESIGN OF BELT CONVEYORUploaded byadnankhan89
- User Manual - FELIX Pro SeriesUploaded byMariusMan
- SC-1800633-ME1a Manual 102780Uploaded byeddie2166
- Operator's Manual-TT55-TT65-TT75-English.pdfUploaded byvalgorunescu@hotmail.com
- Toxicity Assessment of Municipal Solid Waste: A Case StudyUploaded byIRJET Journal
- PC Spun PilesUploaded byIdanRizaldi
- c5: Components of Control and Automation EquipmentsUploaded byOladokun Sulaiman Olanrewaju
- inphase.docxUploaded bysajeesh e s
- 12-II.2. Tower SpottingUploaded byashok10577
- Bender Main CatUploaded byrian0201
- IRJET-Olive Spy (Smart Doorbell)Uploaded byIRJET Journal
- 16_chapter 8.pdfUploaded byVan Phu Nguyen
- Brochure Vessel.pdfUploaded bybaik120863
- Cement All PDFUploaded byheraasku7194
- Satellite m50Uploaded byDave Fontejon
- Model Predictive Control History and DevelopmentUploaded bycreadorcito
- Liebert Spm 1.0 BrochureUploaded byHarry Cul
- nanofluids paperUploaded byamarparimi
- Computer Systems Servicing NC II CGUploaded byKèlǐsītǎnKǎPáng
- Detalle Soldadura 71 V H8.pdfUploaded byJosé Miguel Otárola Sandoval
- 6000722B CH10 Electrosurgical PrintUploaded byAland Bravo
- 1. Form Insc APADIYA.xlsxUploaded bySantiago Fortunatoc Cercado Ramos
- Uic 60 Max Speed 350 Km hUploaded byv4lkr3y
- GyroData_Surveyor X 4 09 v7Uploaded byZakhar__6769
- Voltera v-One PCB PrinterUploaded byJohn Dareyrle G. Mapatac
- 159-0000-R29-AWUploaded byjuli_navia3482
- C1116C1116M.24405Uploaded bymehdi