Introduction to BLDC Motor Control Using Freescale MCU. Tom Wang Segment Biz. Dev. Manager Avnet Electronics Marketing Asia

Similar documents
L E C T U R E R, E L E C T R I C A L A N D M I C R O E L E C T R O N I C E N G I N E E R I N G

TABLE OF CONTENTS CHAPTER NO. TITLE PAGE NO. LIST OF TABLES LIST OF FIGURES LIST OF SYMBOLS AND ABBREVIATIONS

CHAPTER 4 FUZZY BASED DYNAMIC PWM CONTROL

MSK4310 Demonstration

Speed control of sensorless BLDC motor with two side chopping PWM

Electric Bike BLDC Hub Motor Control Using the Z8FMC1600 MCU

Sensors and Sensing Motors, Encoders and Motor Control

Design of double loop-locked system for brush-less DC motor based on DSP

Optimizing Performance Using Slotless Motors. Mark Holcomb, Celera Motion

Brushless 5 click. PID: MIKROE 3032 Weight: 25 g

Sensors and Sensing Motors, Encoders and Motor Control

CHAPTER-III MODELING AND IMPLEMENTATION OF PMBLDC MOTOR DRIVE

HPVFP High Performance Full Function Vector Frequency Inverter

Controlling of Permanent Magnet Brushless DC Motor using Instrumentation Technique

Analog Devices: High Efficiency, Low Cost, Sensorless Motor Control.

PROPORTIONAL INTEGRAL &DERIVATIVE CONTROLLER FOR BLDC MOTOR

Efficiency Optimized Brushless DC Motor Drive. based on Input Current Harmonic Elimination

CHAPTER 2 STATE SPACE MODEL OF BLDC MOTOR

User Guide Introduction. IRMCS3043 System Overview/Guide. International Rectifier s imotion Team. Table of Contents

User Guide IRMCS3041 System Overview/Guide. Aengus Murray. Table of Contents. Introduction

SPEED CONTROL OF BRUSHLES DC MOTOR

Page ENSC387 - Introduction to Electro-Mechanical Sensors and Actuators: Simon Fraser University Engineering Science

SPEED CONTROL OF BRUSHLESS DC MOTOR USING FUZZY BASED CONTROLLERS

Robot Actuators. Motors and Control. Stepper Motor Basics. Increased Resolution. Stepper motors. DC motors AC motors. Physics review: Nature is lazy.

Speed Control of BLDC Motor Using FPGA

EE152 Final Project Report

Volume 1, Number 1, 2015 Pages Jordan Journal of Electrical Engineering ISSN (Print): , ISSN (Online):

CURRENT FOLLOWER APPROACH BASED PI AND FUZZY LOGIC CONTROLLERS FOR BLDC MOTOR DRIVE SYSTEM FED FROM CUK CONVERTER

DC Motor Speed Control using PID Controllers

Detect stepper motor stall with back EMF technique (Part 1)

Application Note, V1.0, Oct 2006 AP08019 XC866. Sensorless Brushless DC Motor Control Using Infineon 8-bit XC866 Microcontroller.

Design of A Closed Loop Speed Control For BLDC Motor

UG Student, Department of Electrical Engineering, Gurunanak Institute of Engineering & Technology, Nagpur

Sensorless Control of BLDC Motor Drive Fed by Isolated DC-DC Converter

2.017 DESIGN OF ELECTROMECHANICAL ROBOTIC SYSTEMS Fall 2009 Lab 4: Motor Control. October 5, 2009 Dr. Harrison H. Chin

4 / 24,5 2,6 / steel, black coated. clockwise, viewed from the front face. ø15,9 ø17-0,052 ø6-0,05 8,1 ±0,3 2, T

STM32 PMSM FOC SDK v3.2. 蒋建国 MCU Application Great China

Where: (J LM ) is the load inertia referred to the motor shaft. 8.0 CONSIDERATIONS FOR THE CONTROL OF DC MICROMOTORS. 8.

Analog Servo Drive 30A8

Upgrading from Stepper to Servo

Experiment Of Speed Control for an Electric Trishaw Based on PID Control Algorithm

ME375 Lab Project. Bradley Boane & Jeremy Bourque April 25, 2018

Modeling & Simulation of PMSM Drives with Fuzzy Logic Controller

TRACK VOLTAGE APPROACH USING CONVENTIONAL PI AND FUZZY LOGIC CONTROLLER FOR PERFORMANCE COMPARISON OF BLDC MOTOR DRIVE SYSTEM FED BY CUK CONVERTER

Teaching Mechanical Students to Build and Analyze Motor Controllers

Performance Optimization Using Slotless Motors and PWM Drives

Simulation of Solar Powered PMBLDC Motor Drive

Actuators. EECS461, Lecture 5, updated September 16,

CHAPTER 6 THREE-LEVEL INVERTER WITH LC FILTER

AxCent Servo Drive A25A100

Administrative Notes. DC Motors; Torque and Gearing; Encoders; Motor Control. Today. Early DC Motors. Friday 1pm: Communications lecture

2014 Texas Instruments Motor Control Training Series. -V th. Dave Wilson

AVR443: Sensor-based control of three phase Brushless DC motor. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

Brushed DC Motor Microcontroller PWM Speed Control with Optical Encoder and H-Bridge

Speed Control of Brushless DC Motor Using Fuzzy Based Controllers

Designing With Motion Handbook

Step vs. Servo Selecting the Best

Using the HCS08 TPM Module In Motor Control Applications

Speed Control of Brushless DC Motors-Block Commutation With Hall Sensors. User s Guide

CIS009-2, Mechatronics Signals & Motors

International Journal of Advance Engineering and Research Development. PI Controller for Switched Reluctance Motor

TMC603EVAL MANUAL Evaluation board for the TMC603 three phase motor driver with BLDC back EMF commutation hallfx

Swinburne Research Bank

Analog Servo Drive 20A20

Chuck Raskin P.E. Principle R&D Engineer. Blaine, MN USA

3-Phase Switched Reluctance Motor Control with Encoder Using DSP56F80x. 1. Introduction. Contents. Freescale Semiconductor, I

Peak Current. Continuous Current. See Part Numbering Information on last page of datasheet for additional ordering options.

A COMPARISON STUDY OF THE COMMUTATION METHODS FOR THE THREE-PHASE PERMANENT MAGNET BRUSHLESS DC MOTOR

As before, the speed resolution is given by the change in speed corresponding to a unity change in the count. Hence, for the pulse-counting method

Temperature Monitoring and Fan Control with Platform Manager 2

Feedback Devices. By John Mazurkiewicz. Baldor Electric

Application Note. Brushless DC Motor Control AN-1114

ECE 5670/ Lab 5. Closed-Loop Control of a Stepper Motor. Objectives

Ametek, Inc. Rotron Technical Products Division. 100 East Erie St., Suite 200 Kent, Ohio User's Guide. Number Revision F

Improving feedback current accuracy when using H-Bridges for closed loop motor control

Sinusoidal Control of a Single Phase Special Topology SRM, Without Rotor Position Sensor

Figure 1: Motor model

The Fan Company Microcontroller Fan. Prepared by. JMC Engineering

Motion Control Glossary

Analog Servo Drive 30A20AC

Phys Lecture 5. Motors

AN2170. AN2170 PSoC 1 - Sensored BLDC Motor Control using Hall Effect Sensors. Application Note Abstract. Introduction

Type of loads Active load torque: - Passive load torque :-

Lab 11. Speed Control of a D.C. motor. Motor Characterization

DC SERVO MOTOR CONTROL SYSTEM

Cost Effective Control of Permanent Magnet Brushless Dc Motor Drive

MMP SA-715A SERVO AMPLIFIER

A Comparative Study of Sinusoidal PWM and Space Vector PWM of a Vector Controlled BLDC Motor

Placement Paper For Electrical

Mitigation of Cross-Saturation Effects in Resonance-Based Sensorless Switched Reluctance Drives

Brushed DC Motor System

Temperature Monitoring and Fan Control with Platform Manager 2

SINGLE PHASE HALL EFFECT LATCH SMART FAN MOTOR CONTROLLER

South Asian Journal of Engineering and Technology Vol.3, No.3 (2017)

3. What is the difference between Switched Reluctance motor and variable reluctance stepper motor?(may12)

A Brushless DC Motor Speed Control By Fuzzy PID Controller

Design of a Simulink-Based Control Workstation for Mobile Wheeled Vehicles with Variable-Velocity Differential Motor Drives

MEM01: DC-Motor Servomechanism

Brushed DC Motor PWM Speed Control with the NI myrio, Optical Encoder, and H-Bridge

BLOCK DIAGRAM OF THE UC3625

Transcription:

Introduction to BLDC Motor Control Using Freescale MCU Tom Wang Segment Biz. Dev. Manager Avnet Electronics Marketing Asia

Agenda Introduction to Brushless DC Motors Motor Electrical and Mechanical Model Motor Speed Control Hardware Design Motor Speed Control Software Tasks Motor Speed Control Challenges

Agenda Introduction to Brushless DC Motors Motor Electrical and Mechanical Model Motor Speed Control Hardware Design Motor Speed Control Software Tasks Motor Speed Control Challenges

Theory of Operation current current Structure of a single-phase 2 pole-pair BLDC motor Based on attraction and repulsion of magnetic poles. Rotating magnetic field of stator rotates rotor Rotation of magnetic field must be in phase with rotation of rotor. Rotation of magnetic field is achieved by changing direction of current through the stator coil. Speed Control achieved by controlling the average current flowing into stator coil. Hall Sensor used to detect rotor position.

Theory of Operation N Rotor Current N S Stator S Operation of a single-phase 1 pole-pair BLDC motor

Agenda Introduction to Brushless DC Motors Motor Electrical and Mechanical Model Motor Speed Control Hardware Design Motor Speed Control Software Tasks Motor Speed Control Challenges

Motor Mechanical Model Mechanical model: Mechanical Drive Torque generated T is expressed as follows: - T = K T.i.sin(N.θ+C) = J.dω/dt + L.ω + T ext where: - K T = torque constant - i = current through coil - N = Number of pole pairs - θ = phase angle of rotor - C = phase offset due to motor phases - J = moment of inertia of rotor - ω = angular speed of rotor = dθ/dt - L = constant associated with speed-related losses (damping, eddy current, friction) - T ext = other external mechanical load

Motor Electrical Model Lm Rm Vs Vemf Electrical model: V s = L m.di/dt + i.r m + K T.ω where: V s = supply voltage L m = motor coil inductance R m = motor coil resistance ω = rotor speed K T.ω = back-emf induced voltage

Agenda Introduction to Brushless DC Motors Motor Electrical and Mechanical Model Motor Speed Control Hardware Design Motor Speed Control Software Tasks Motor Speed Control Challenges

Motor Speed Control Hardware Block Diagram 5V Hall Sensor Analog/Digital Tach Output Input PWM MCU Power supply Fan H-Bridge circuit Current Limit & Sense

Agenda Introduction to Brushless DC Motors Motor Electrical and Mechanical Model Motor Speed Control Hardware Design Motor Speed Control Software Tasks Motor Speed Control Challenges

MC9S08SH4 Task and Resource Scheduling Input PWM Duty cycle measurement Input speed setpoint measurement Motor Speed Control TPM Motor Drive Output Current sense ADC Overcurrent detection Motor Drive Output Hall input Comparator Motor Speed Measurement Commutation detection Locked Rotor detection Timer Tach Output

Agenda Introduction to Brushless DC Motors Motor Electrical and Mechanical Model Motor Speed Control Hardware Design Motor Speed Control Software Tasks Motor Speed Control Challenges

Motor Speed Control Challenges Phase commutation efficiency Reduce in-rush current Over-current limit Speed Control Accuracy Tuning motor speed curve

Motor Speed Control Challenges Phase commutation efficiency Reduce in-rush current Over-current limit Speed Control Accuracy Tuning motor speed curve

H-Bridge (Driving Sequence) Power supply H1 H2 motor L1 (B) (A) L2 Ground 1 Electrical Cycle Phase (A) (B) Hall sensor (digitized) H1 H2 Commutation L1 L2

H-Bridge (Efficient Driving Sequence) Power supply H1 H2 motor L1 (B) (A) L2 Ground 1 Electrical Cycle Phase (A) (B) Hall sensor (digitized) H1 H2 Commutation L1 L2

Motor Speed Control Challenges Phase commutation efficiency Reduce in-rush current Over-current limit Speed Control Accuracy Tuning motor speed curve

Reduce in-rush current In-rush current due to change in fan speed setpoint can cause sudden current surge External power supplies may trip due to current surge Solutions: Setpoint current RPM differential limit Setpoint ramping Fan speed setpoint Setpoint ramping time

Motor Speed Control Challenges Phase commutation efficiency Reduce in-rush current Over-current limit Speed Control Accuracy Tuning motor speed curve

Over-current limit Required for large current fans to prevent damage to electronics Over-current is caused by physical obstruction of rotor movement Can be implemented using current measurement resistor and fast ADC peripheral available in MC9S08SH4

Motor Speed Control Challenges Phase commutation efficiency Reduce in-rush current Over-current limit Speed Control Accuracy Tuning motor speed curve

Speed Control Accuracy PID speed control steady state error Output speed measurement accuracy Input PWM duty cycle measurement accuracy

Speed Control Accuracy PID speed control steady state error Output speed measurement accuracy Input PWM duty cycle measurement accuracy

PI Closed-Loop Speed Control Model Input speed + + e G(s)=K p +K i /s - Motor driving System H(s) Output speed PI Motor Speed Control

PI Closed-Loop Speed Control Velocity form of PI, also called incremental or differential PI is used to control motor speed. Derived by differentiation of the standard form. The velocity form of PI: G (s) = K p *s + K i

PI Closed-Loop Speed Control Model (Velocity form) Input speed + Integrator Motor driving e u c + G (s)=k p *s+k i 1/s System - H(s) y Output speed PI Motor Speed Control (Velocity form)

PI Speed Control Steady State Error Steady state error occurs when non-zero e results in zero u output Caused by implementation of PI Control loop in integer arithmetic: Ki*e < 1 = 0 => e < 1/Ki Maximum steady state error = 1/Ki

Speed Control Accuracy PID speed control steady state error Output speed measurement accuracy Input PWM duty cycle measurement accuracy

Output speed measurement accuracy Output speed measurement accuracy depends on MCU clock accuracy Crystal can be used to provide accurate clock but this is expensive solution MC9S08SH4 can run on internal oscillator. Factory-trimmed with typical accuracy of 1% over voltage and temperature range

Speed Control Accuracy PID speed control steady state error Output speed measurement accuracy Input PWM duty cycle measurement accuracy

Measuring Input PWM duty cycle Standard Method of measuring PWM duty cycle PWM Signal Low-pass filter Analog voltage MCU with ADC Step 1: Low pass filter to convert PWM to analog voltage where analog voltage level is proportional to the PWM duty cycle Step 2: MCU measures analog voltage level using internal ADC Step 3: MCU derives duty cycle by dividing measured ADC value by maximum ADC value.

Measuring Input PWM duty cycle Problems with ADC method: Accuracy is affected by ground noise when motor is running especially bad for high-current motor Low pass filter circuit subject to component value variation (e.g. 1% resistors) and temperature variations. ADC performance limitations (output resistance limits of low pass filter circuit, non-linearity errors, zero-scale errors, fullscale errors, quantization errors) Conclusion: It is odd to measure a digital signal by conversion to analog signal to derive its digital value!

Measuring Input PWM duty cycle Random Sampling Method of measuring PWM duty cycle 3V PWM Signal Level translation to match PWM signal voltage level to MCU logic voltage levels 5V PWM signal 5V MCU Step 1: Level translation circuit to convert PWM signal voltage level to MCU logic voltage level Step 2: MCU samples PWM signal at its GPIO pin at random intervals to derive PWM duty cycle Duty cycle = (Total number of 1 samples) (Total number of samples)

Measuring Input PWM duty cycle Mathematics behind random sampling: One reading of GPIO will yield either logic 1 or 0 Therefore, one sample of PWM signal is a Bernoulli trial; where the probability of reading logic 1 is: P(reading a logic 1 ) = duty cycle of PWM signal For multiple independent samples, this becomes a binomial distribution

Measuring Input PWM duty cycle According to Binomial Distribution: The proportion of samples with logic 1 = np/n = p The standard deviation is (p(1-p)/n) ½

Measuring Input PWM duty cycle When n is large, Central Limit Theorem states that the binomial distribution can be approximated by a Normal distribution Based on approximation to Normal distribution, the relationship between actual mean (p), observed mean (X), standard deviation (σ )and Z, the standard normal distributed variable is: p = X ± Zσ X ± Z.(X.(1-X)/n) ½ Hence, the probability that p is outside of above range is defined by the Z, the standard normal distributed variable: 1 P((X Zσ) < p < (X + Zσ)) = 1 P(-Z < z < Z)

Speed Control Accuracy - Conclusion Error contributions between Input PWM and Output Speed (RPM): Input PWM duty cycle measurement error Output speed measurement error E.g MCU datasheet indicates MCU clock error less than 1% - this will result in up to 1% error in output speed measurement error PID Control Loop steady state error E.g. if the Integral Gain is 0.0722, the maximum steady state error is 1/0.0722 = 13 (rounded down)

Speed Control Accuracy - Conclusion Therefore, to achieve a certain output RPM error limit: Duty cycle measurement error + Output speed measurement error + PID steady state error <= Output RPM error limit Duty cycle measurement error <= Output RPM error limit - Output speed measurement error - PID steady state error

Speed Control Accuracy - Conclusion We can put all these into a spreadsheet: Parameters Values Description Time to obtain single duty-cycle measurement (s) 0.5 Implementation specific - dependent on MCU Minimum operating speed (RPM) 900 Maximum operating (RPM) 4000 These parameters determine the fan operating curve (RPM vs. Minimum duty cycle (%) 0% duty cycle) Maximum duty cycle (%) 100% PID Loop maximum steady state error (RPM) 17 This error is the reciprocal of the PID Integral Gain Maximum MCU clock error (%) Obtained from MCU datasheet. 1.00% MCU Clock Error will affect operating speed measurement. Maximum allowed RPM error (RPM) 100 Specified by user/customer Duty cycle (%) [p] Operating Duty Cycle. Worst case error occurs at 50% duty 50% cycle This must be less than "Maximum allowed duty cycle error (%)", Max Error @ specified duty cycle (%) 1.8000% otherwise, background color will change to red Number of random samples required to perform one duty cycle measurement 50000 Computed Parameters Fan operating curve slope [A] 3100 Desired operating RPM = A*p + B Fan operating curve offset [B] 900 Maximum allowed error due to duty cycle error @ specified Duty Cycle (RPM) 58.5 Maximum allowed duty cycle error (%) 1.89% This limit determines the confidence interval that the actual duty Standard normal variable limit 8.049844719 cycle lies within the specified limits of the observed duty cycle. Probability of one duty cycle measurement exceeding Max Error [Pe] 8.8817842E-16 "Failure" is the case when measured duty cycle deviates from MTBF (hours) 1.5637499E+11 actual duty cycle by more than Max Error

Motor Speed Control Challenges Phase commutation efficiency Reduce in-rush current Over-current limit Speed Control Accuracy Tuning motor speed curve

Tuning Motor Speed Curve Must tune quickly to meet customer changing requirements Complex motor speed curve requirements Avnet s solution: Configuration by Excel spreadsheet! Easy to use Generates firmware automatically

Tuning Motor Speed Curve

Tuning Motor Speed Curve