EPOS EPOS2 50/5 Application Note

maxon motor control
EPOS Application Note: Interpolation Position Mode
Edition December 2008
maxon motor ag Brünigstrasse 220 P.O. Box 263 CH-6072 Sachseln Tel.: 041/666 15 00 Fax: 041/666 16 50 www.maxonmotor.com
Positioning Controller
Application Note
"Interpolation Position Mode"
Edition December 2008
EPOS2 50/5, EPOS Module 36/2
Firmware version 2101h or higher
Introduction
The EPOS2 positioning controller is a digital positioning system suitable for DC and EC (brushless) motors with incremental encoders in a modular package. The performance range of these compact positioning controllers ranges from a few watts up to 250 watts.
A variety of operating modes allows all kinds of drive and automation systems to be flexibly assembled using positioning, speed and current regulation. The built-in CANopen interface allows networking to multiple axis drives and online commanding by CAN bus master units.
For fast communication with several EPOS devices, use the CANopen protocol. The individual devices of a network are commanded by a CANopen master.
Objectives
This application note explains the functionality of interpolation position mode. Interpolated position mode is used to control multiple coordinated axes or a single axis with the need for time-interpolation of setpoint data. In interpolated position mode, the trajectory is calculated by the CANopen master and passed to the controller's interpolated position buffer as a set of points. The controller reads the points from the buffer and performs linear or cubic interpolation between them.
References and Required Tool
The latest editions of maxon motor documents and tools are freely available at http://www.maxonmotor.com category «Service & Downloads».
Document Suitable order number for EPOS Positioning Controller
EPOS2 Communication Guide EPOS2 Firmware Specification
347717, 360665
CANopen documentation Specifications ‘DS-301 Version 4.02’ and ‘DSP-402 Version 2.0’
CiA (CAN in Automation e. V.) http://www.can-cia.org
Tool
EPOS Studio Version 1.30 or higher 347717, 360665
maxon motor control
EPOS Positioning Controller
EPOS Application Note: Interpolation Position Mode
2 maxon motor control Edition December 2008 / Subject to change
1 Indexes
1.1 Table of contents
Introduction.................................................................................................................................................1
Objectives...................................................................................................................................................1
References and Required Tool...................................................................................................................1
1 Indexes................................................................................................................................................2
1.1
Table of contents ........................................................................................................................2
1.2
Table of figures...........................................................................................................................2
1.3
Table of tables ............................................................................................................................3
2 Interpolated Position Mode..................................................................................................................4
2.1
Explanations to the Interpolated Position Mode..........................................................................4
2.2
General Description....................................................................................................................5
2.3
Spline Interpolation.....................................................................................................................5
2.4
SYNC-Time stamp mechanism...................................................................................................6
3 IPM Implementation by Maxon............................................................................................................7
3.1
Interpolated position data buffer .................................................................................................7
3.1.1 Definition of complex data structure 0x0040...........................................................................7
3.1.2 Structure of the FIFO..............................................................................................................8
3.2
Interpolated position mode FSA..................................................................................................8
3.3
Configuration parameters ...........................................................................................................9
3.4
Commanding parameters ...........................................................................................................9
3.4.1 Controlword (Interpolated Position Mode specific bits).........................................................10
3.5
Output parameters....................................................................................................................10
3.5.1 Statusword (Interpolated Position Mode specific bits)..........................................................10
3.6
Detailed Object description.......................................................................................................11
3.6.1 COB-ID Time Stamp Object..................................................................................................11
3.6.2 High Resolution Time Stamp................................................................................................11
3.6.3 Interpolation data record.......................................................................................................11
3.6.4 Interpolation status................................................................................................................12
3.6.5 Interpolation sub mode selection..........................................................................................14
3.6.6 Interpolation time period .......................................................................................................14
3.6.7 Interpolation data configuration.............................................................................................15
3.7
Typical IPM commanding sequence.........................................................................................18
3.8
Interruption of interpolation mode in case of an error...............................................................21
1.2 Table of figures
Figure 1: Interpolated Position PVT Principle ........................................................................................5
Figure 2: Clock synchronization.............................................................................................................6
Figure 3: Interpolation Controller............................................................................................................7
Figure 4: Interpolation buffer FIFO organization....................................................................................8
Figure 5: Interpolated position mode FSA..............................................................................................8
maxon motor control
EPOS Application Note: Interpolation Position Mode
EPOS Positioning Controller
Edition December 2008 / Subject to change maxon motor control 3
1.3 Table of tables
Table 1: IPM data buffer entry structure ...............................................................................................7
Table 2: ‘Interpolated Position Mode’ FSA states and supported functions..........................................8
Table 3: ‘Interpolated Position Mode’ Transition events and actions....................................................9
Table 4: ‘Interpolated Position Mode’ Configuration parameters..........................................................9
Table 5: ‘Interpolated Position Mode’ Commanding parameters..........................................................9
Table 6: ‘Interpolated Position Mode’ specific Controlword................................................................10
Table 7: ‘Interpolated Position Mode’ bits of the Controlword.............................................................10
Table 8: ‘Interpolated Position Mode’ Output parameters...................................................................10
Table 9: ‘Interpolated Position Mode’ specific Statusword..................................................................10
Table 10: ‘Interpolated Position Mode’ bits of the Statusword..............................................................10
Table 11: IPM data buffer record structure...........................................................................................12
Table 12: Interpolation buffer status word.............................................................................................12
Table 13: Interpolation buffer status bits...............................................................................................13
Table 14: Interpolation Sub Mode Definition.........................................................................................14
Table 15: Buffer Organisation Definition...............................................................................................16
Table 16: Clear Buffer Value Definition.................................................................................................17
Table 17: Typical Commanding sequence............................................................................................18
maxon motor control
EPOS Positioning Controller
EPOS Application Note: Interpolation Position Mode
4 maxon motor control Edition December 2008 / Subject to change
2 Interpolated Position Mode
2.1 Explanations to the Interpolated Position Mode
Introductory analogy: In a company a department manager must convert the department goals into clear tasks for his coworkers. It is to be considered that often the individual tasks stand to each other in close interdependency. Thus each department manager is glad, if he has capable coworkers, who are able to solve their tasks already on basis on substantial data. For the quality of such a solution it is in particular important that it:
1. is factually correct, i.e. it does not have to be controlled again,
2.
is finished in time and
3. was reached efficiently.
The functionality
Interpolated Position Mode
values up the positioning controller
EPOS2
to such a “capable
coworker” in a superordinated drive system. This thesis is described in the following text.
In a drive system normally several axes must be moved after the guidelines of a central controller. This can take place in the way that each local axis controller receives the next target position in real time – i.e. in time and at the same time to each sampling instance –. This strategy has the advantage that the local controller need only little intelligence. However, the central controller must compute target positions for every sampling interval and has to communicate the data to every local controller in real time.
In the sense of the introductory analogy it would be favorable, if only few, but substantial points of the driving profiles have to be regarded. Besides it would be desirable, if the corresponding data have to be communicated to the local controller not necessarily at the same time but only in time. Both goals can be reached by
interpolation
and
data buffering
.
The central controller decides first which points of the local trajectories are substantial for a synchronized total movement. Then each relevant point of the local trajectories is supplemented with the corresponding velocity and time, i.e. triples of the kind (position, velocity, time = PVT) are formed. These triples are then transferred to the associated axis controllers in time. Each local controller possesses a buffer in order to take up these data. The buffer of the
EPOS2
covers 64 locations for triples. The transfer of data to the
EPOS2
is in time, if always the buffer
contains at least 1 and at the most 64 new triples.
The local position regulation works at the
EPOS2
with a sampling rate of 1 kHz. I.e., there are 1000 target positions
per second necessary in real time. These target positions are computed in the
EPOS2
by means of interpolation.
Each triple forms a base point with the abscissa
time
and the two ordinates
position
and
velocity
. Two triples therefore deliver two abscissas and four corresponding ordinates, so that an interpolation polynomial of third order can be computed unambiguously between the two base points. This computation as well as the evaluation of the polynomial in the local sampling clock takes place on basis of simple arithmetic and is efficiently carried out by the
EPOS2
.
The endpoint of the polynomial [n] forms the starting point of the polynomial [n+1] Therefore it is sufficient to indicate only the relative time in a data triple, i.e. the length of the time interval. Concretely with the
EPOS2
the time distance of two base points can be selected between 1ms and 255ms. This interval length can be adapted by the central controller to realize the desired total movement.
With the goal that all controllers in the drive system refer to the same time base, the central controller initiates periodically a time check. This time synchronization takes place with the
EPOS2
via the
SYNC
time stamp
mechanism.
maxon motor control
EPOS Application Note: Interpolation Position Mode
EPOS Positioning Controller
Edition December 2008 / Subject to change maxon motor control 5
Finally, the interpolated position mode can be qualified as follows: The resulting smooth driving profiles as well as the close temporal synchronization allow it in a drive system, to superpose several high-dynamic single movements to a precise total movement.
2.2 General Description
The Interpolated Position Mode descript in the CiA specification DSP402 V3.0 is a general case. The objects are well specified for a linear interpolation (PT). The interpolation type can also be extended by manufacturer specific algorithms (selectable by „Interpolation submode selection“, object 0x60C0).
2.3 Spline Interpolation
For the Interpolated Position Mode the interpolation type is a cubic spline interpolation. The higher-level trajectory planer sends a set of interpolation points by PVT reference point. Each PVT reference point contains the position, velocity, and time information of a profile segment end point. The trajectory generator of the drive performs a third order interpolation between the actual and the next reference point.
Figure 1: Interpolated Position PVT Principle
The interpolation parameters a, b, c, and d can be calculated for each segment from the two successive PVT reference points:
d = P[t
0
] = P[n]
c = V[t
0
] = V[n]
b = T
-2
[n] * (3 * (P[n] – P[n-1]) + T[n] * (V[n] + 2 * V[n-1]))
a = T
-3
[n] * (2 * (P[n] – P[n-1]) + T[n] * (V[n] + V[n-1]))
The interpolated values for the position, the velocity, and the acceleration will be calculated as follows:
P(t) = a * (t – t
0
)3 + b * (t – t0)2 + c * (t – t0) + d
V(t) = 3a * (t – t
0
)2 + 2b * (t – t0) + c
A(t) = 6a * (t – t
0
) + 2b
t
0
: time of interpolation segment end (Æ in this calculation t0 is greater then t!)
It is not mandatory that the time intervals are identical.
maxon motor control
EPOS Positioning Controller
EPOS Application Note: Interpolation Position Mode
6 maxon motor control Edition December 2008 / Subject to change
2.4 SYNC-Time stamp mechanism
The SYNC-Time stamp mechanism can be used to synchronize the motion clock of the drive with a master clock in the network.
Device
Master Device
T
i
m
e
(
T
i
m
e
O
f
D
a
y
)
S
YN
C
H
R
_
T
i
m
e
St
a
m
p
(
Tm
1
)
S
YN
C
H
R
_
T
i
m
e
St
a
m
p
(
T
m
2
)
Tm = 0
Td1
Tm1
Tm2
Td2
Td = 0
Td = Td + Tm1 – Td1
Td = Td + Tm2 – Td2
Figure 2: Clock synchronization
The synchronization method is similar to IEEE 1588 and uses the CANopen DSP301 SYNC Service (COB-Id 0x80) and the
High Resolution Time Stamp
Object (0x1013).
The SYNC Frame will be transmitted periodically by the SYNC master and the exact transmitting time (Tm1) should be stored in the master by latching an internal 1us timer. The reception time (Td1) of the SYNC message will be stored by latching the device internal motion clock timer. As following up the measured transmitting time (Tm1) will be send to the drive with the High Resolution Time Stamp. The device adjusts then its internal motion clock time in relation to the time latched in the last SYNC.
By sending a CANopen DSP301 TIME Service (default COB-Id 0x100 or defined by Object 0x1012) the device internal motion clock timer can be reset to zero.
maxon motor control
EPOS Application Note: Interpolation Position Mode
EPOS Positioning Controller
Edition December 2008 / Subject to change maxon motor control 7
3 IPM Implementation by Maxon
The Interpolated Position Mode is implemented in the EPOS2 as an additional operational mode (operation mode 7 as specified in DSP 402 V3.0).
Interpolation_data_record (0x20C1)
[position units]
Input
Buffer
software_position_limit (0x607D)
[velocity units]
maximal_profile_velocity (0x607F)
Interpolated Position Trajectory Generator
position_demand_value*
[inc]
statusword
(0x6041)
velocity_demand_value*
[inc/ms]
acceleration_demand_value*
[inc/ms ]
2
Multiplier
max_acceleration (0x60C5)
position*
[inc]
[inc/ms ]
2
controlword (0x6040)
position* [inc]
[inc/ms]
Limit
Function
Interpolationstatus
(0x20C4)
[acceleration units]
velocity* [inc/ms]
velocity*
Multiplier
[inc/ms]
Interpolation_submode_selection (0x60C0)
Interpolation_data_configuration (0x60C4)
Figure 3: Interpolation Controller
3.1 Interpolated position data buffer
The PVT reference points will be sent in a manufacturer specific 64bit data record of a complex data structure to a FIFO object.
3.1.1 Definition of complex data structure 0x0040
MSB LSB
Time (unsigned8) Velocity (signed24) Position (signed32)
Table 1: IPM data buffer entry structure
Loading...
+ 14 hidden pages