User Guide
Table Of Contents
- 1.1 SETTING SOFTWARE PARAMETERS
- Corporate Office
- Atlanta
- Boston
- Chicago
- Cleveland
- Fax: 216-447-0643
- Dallas
- Detroit
- Kokomo
- Toronto
- Fax: 852-2401-3431
- Australia - Sydney
- China - Beijing
- China - Shanghai
- India - Bangalore
- Korea - Daegu
- Korea - Seoul
- Singapore
- Taiwan - Taipei
- Fax: 43-7242-2244-393
- Denmark - Copenhagen
- France - Paris
- Germany - Munich
- Italy - Milan
- Spain - Madrid
- UK - Wokingham
- Worldwide Sales and Service
DS70640A-page 8 2010 Microchip Technology Inc.
STEP 4 – Tuning the Closed Loop Operation
a) Enable Close Loop Transition
Step forward to close loop tuning once the open loop is running fine, by removing
the define of the OPEN_LOOP_FUNCTIONING macro definition.
userparms.h
b) Set Up Close Loop Parameters
• Initial Angle Offset Tuning
The transition between open loop to close loop implies an initial estimation error,
for which pre-selection of an initial offset angle is required:
userparms.h
The initial value of 0x2000 corresponds to an offset of 45 degrees. The formula
for getting the value which corresponds to a particular offset angle is:
Depending on the resistant torque of the load, the moment of inertia, or
depending on the motor’s electrical constants, modify the angle to eliminate the
eventual open loop/close loop transition glitches.
• Estimator Filter Coefficients
The default constants set up for the filters’ coefficients should give good results
for most motors. Nevertheless, decreasing the coefficients would decrease the
phase delay, which could be particularly helpful at high speeds, where armature
current variation is faster. A compromise between the filtering role and its counter
back effect, the introduction of phase shift, should be achieved.
userparms.h
• PI Speed Controller
For the speed controller tuning, P and I gain can be adjusted using multiple
methods. For more information, search for “PID Controller” on the Wikipedia
website and go to the “Loop Tuning” section.
userparms.h
For cases where no speed controller is needed, the torque mode can be
activated by defining TORQUE_MODE.
userparms.h
value 0xFFFF
angle
360
-----------------=