R01AN5644EJ0100 Rev.1.00
Page 43 of 62
Jan 22, 2021
Reference Guide for a 2-Axis Robot Arm with 2-Phase Stepping
Motors Incorporating Resolvers
RX24T, RX72M,
RAA3064002GFP/RAA3064003GFP
2.4.2 Acceleration or Deceleration Calculation
Calculate the speed of an arm using a moving average filter.
•
Calculation with moving average filter
When converting to a discrete value system, the following equation is obtained due to integral characteristic
=
dT ÷ (1
− 𝑍𝑍
−1
)
.
𝐺𝐺
𝑓𝑓
(
𝑧𝑧
) = {(1
− 𝑍𝑍
−𝑀𝑀
) × (
𝑑𝑑𝑑𝑑
÷
𝜏𝜏
)} ÷ (1
− 𝑍𝑍
−1
)
τ
= M × dT
dT = Sampling time, M = Sampling count
𝐺𝐺
𝑓𝑓
(
𝑧𝑧
) = {(1
− 𝑍𝑍
−𝑀𝑀
) ÷
𝑀𝑀
} ÷ (1
− 𝑍𝑍
−1
)
On the assumption of the input is X and the output is Y, the following is obtained.
Y =
𝐺𝐺
𝑓𝑓
(
𝑧𝑧
) ×
𝑋𝑋
(1
− 𝑍𝑍
−1
)
𝑌𝑌
= (1
− 𝑍𝑍
−𝑀𝑀
) ÷
𝑀𝑀
×
𝑋𝑋
Y(
𝐸𝐸
) =
𝑌𝑌
(
𝐸𝐸 −
1) +
1
𝑀𝑀
× {
𝑋𝑋
(
𝐸𝐸
)
− 𝑋𝑋
(
𝐸𝐸 − 𝑀𝑀
)}
Initial value
Y(0) =
1
𝑀𝑀
× {
𝑋𝑋
(0) +
𝑋𝑋
(
−
1) +
𝑋𝑋
(
−
2)
⋯ 𝑋𝑋
(
−𝑀𝑀
+ 1)}
The initial values are the XY coordinate values of the position for returning to the motor origin or the position
after PTP control.
General examples of the operation of the moving average filter are shown below and on the next page.
Note that the moving average is assumed to be taken from the most recent four values in the filter in the
examples of operation.
t = 0: Initial value
t = 1: Sampling has been handled once
Newly acquire X (1) data and shift the data in the filter.
X(0)
New
X(-1) X(-2) X(-3)
Old
M = 4
Input
Deletion
X(1)
New
X(0) X(-1) X(-2)
Old
M = 4