SOMANET Motor Configuration and Tuning how-to Guide Document Number: XM005942A Publication Date: 2014/7/3

SOMANET Motor Configuration and Tuning how-to
Guide
Document Number: XM005942A
Publication Date: 2014/7/3
XMOS © 2014, All Rights Reserved.
SOMANET Motor Configuration and Tuning how-to Guide
2/5
Table of Contents
1 How to configure your motors
1.1
Tuning the commutation offset angles . . . . . . . . . . . . . . . . . . . . . . . . . .
3
4
2 BLDC Motor Tuning Guide
2.1
Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5
5
XM005942A
1 How to configure your motors
IN THIS CHAPTER
· Tuning the commutation offset angles
Any application that uses this software component must contain a motor configuration file. This file, called bldc_motor_config.h, must be located at the folder
config/motor/ on your application. Since It defines the features of your BLDC motor, it is important to set it properly before running any motor control application.
You can find many examples of this file at the different application examples
provided.
The main parameters to define in our configuration file will be:
· Number of pole pairs:
# define POLE_PAIRS n // e . g . 8
· Maximum nominal speed (in rpms):
# define M A X _ N O M I N A L _ S P E E D n // e . g . 4000
· Maximum nominal current (A):
# define M A X _ N O M I N A L _ C U R R E N T n // e . g . 2
· Motor torque constant (required for torque control):
# define M O T O R _ T O R Q U E _ C O N S T A N T 34 // mNm / A
· Your motor winding type (star or delta):
# define WINDING_TYPE DELTA_WINDING // or STAR_WINDING
· Your DC board (DC100 or DC300):
# define IFM _RESOL UTION D C 1 0 0 _ R E S O L U T I O N // or D C 3 0 0 _ R E S O L U T I O N
· Sensor used for control (Hall or Quadrature Encoder):
# define SENSOR_USED HALL // or QEI
· If QEI sensor is used then set the type (w/ or w/o index), resolution, or polarity
(to match the hall sensor polarity):
XM005942A
SOMANET Motor Configuration and Tuning how-to Guide
# define Q E I _ S E N S O R _ P O L A R I T Y NORMAL // or NORMAL
# define E N C O D E R _ R E S O L U T I O N 4000 // 4 x Max count of Quadrature Encoder
# define Q E I _ S E N S O R _ P O L A R I T Y NORMAL // NORMAL
· If you are using a gear, specify the ratio, otherwise set to 1:
# define GEAR_RATIO n // e . g . 26 , or 1 if no gear is attached
1.1
Tuning the commutation offset angles
Please refer to the §2
XM005942A
4/5
SOMANET Motor Configuration and Tuning how-to Guide
5/5
2 BLDC Motor Tuning Guide
IN THIS CHAPTER
· Steps
After you have set up most of your motor parameters according to § 1 you
can further fine tune your motors efficiency and performance. Inside the
bldc_motor_config file you will find following lines:
# define C O M M U T A T I O N _ O F F S E T _ C L K
# define C O M M U T A T I O N _ O F F S E T _ C C L K
2.1
683
2731
Steps
1. Run your motor in velocity control mode at half of it’s maximum nominal speed
(MAX_NOMINAL_SPEED / 2) in the clock-wise direction
2. Monitor the current consumption on you power supply
3. Modify the parameter COMMUTATION_OFFSET_CLK by gradually increasing its
original vale (683 + X). You should not add more than 342 to it (X <= 342)
4. Repeat the previous step as long as the current drained is decreasing, and
thereby find the optimum COMMUTATION_OFFSET_CLK angle.
5. Set the COMMUTATION_OFFSET_CCLK to its original value 2731 minus the
identified value X (2731 - X)
Copyright © 2014, All Rights Reserved.
Xmos Ltd. is the owner or licensee of this design, code, or Information (collectively, the “Information”) and
is providing it to you “AS IS” with no warranty of any kind, express or implied and shall have no liability in
relation to its use. Xmos Ltd. makes no representation that the Information, or any particular implementation
thereof, is or will be free from any claims of infringement and again, shall have no liability in relation to any
such claims.
XMOS and the XMOS logo are registered trademarks of Xmos Ltd. in the United Kingdom and other countries,
and may not be used without written permission. All other trademarks are property of their respective owners.
Where those designations appear in this book, and XMOS was aware of a trademark claim, the designations
have been printed with initial capital letters or in all capitals.
XM005942A