App-5
IM DL850E-01EN
Appendix
Differentiation and Integration (DIF, DDIF, INTG, and IINTG)
Differentiation (DIF, DDIF)
The computation of the first-order and second-order differentiated values uses the 5th order Lagrange
interpolation formula to derive a point of data from the five points of data before and after the target.
The figure below shows data f0 to fn with respect to sampling times x0 to xn. The derivative and integrated
values corresponding to these data points are computed as shown below.
x
0
x
k
f
f
0
f
1
f
2
f
3
f
4
f
k
f
n-4
f
n-2
f
n-1
f
n
f
n-3
x
3
x
4
x
2
x
1
x
n-2
x
n
x
n-1
x
n-3
x
n-4
• Equations for First Order Derivatives
Point
x
0
f
0’
= [–25f
0
+ 48f
1
– 36f
2
+ 16f
3
– 3f
4
]
Point
x
1
f
1
’ =
[–3f
0
– 10f
1
+ 18f
2
– 6f
3
+ f
4
]
Point
x
2
f
2
’ = [f
0
– 8f
1
+ 8f
3
– f
4
]
Point
x
k
f
k
’ = [f
k-2
– 8f
k-1
+ 8f
k+1
– f
k+2
]
Point
x
n
-
2
f
n
-
2
’ =
[f
n-4
– 8f
n-3
+ 8f
n-1
– f
n
]
Point
x
n-1
f
n-1
’ =
[–f
n-4
+ 6f
n-3
– 18f
n-2
+ 10f
n-1
+ 3f
n
]
Point
x
n
f
n
’ = [3f
n-4
– 16f
n-3
+ 36f
n-2
– 48f
n-1
+ 25f
n
]
h = Δx is the sampling interval (s) (example: h = 200 × 10
–6
at 5 kHz)
1
12h
1
12h
1
12h
1
12h
1
12h
1
12h
1
12h
• Equations for Second Order Derivatives (DDIF)
Point
x
0
f
0
”
= [35f
0
– 104f
1
+ 114f
2
– 56f
3
+ 11f
4
]
Point
x
1
f
1
” =
[11f
0
– 20f
1
+ 6f
2
+ 4f
3
– f
4
]
Point
x
2
f
2
” = [–f
0
+16f
1
– 30f
2
+ 16f
3
– f
4
]
Point
x
k
f
k
” = [–f
k-2
+ 16f
k-1
– 30f
k
+ 16f
k+1
– f
k+2
]
Point
x
n
-
2
f
n
-
2
” =
[–f
n-4
+ 16f
n-3
– 30f
n-2
+ 16f
n-1
– f
n
]
Point
x
n-1
f
n-1
” =
[–f
n-4
+ 4f
n-3
+ 6f
n-2
– 20f
n-1
+ 11f
n
]
Point
x
n
f
n
” = [11f
n-4
– 56f
n-3
+ 114
n-2
– 104f
n-1
+ 35f
n
]
1
12h
2
1
12h
2
1
12h
2
1
12h
2
1
12h
2
1
12h
2
1
12h
2