Using a derivative function can be fraught with danger because of its tendency to amplify noise - this applies to real systems as well as to digital models. Nevertheless, a straight derivative function known as DERIV1 is available in EMTDC. As a block diagram, DERIV1 is shown below:
![]()
Block Diagram of the DERIV1 Function
It is a very simple expression which is built up as follows:
![]()
Where,
|
|
Output derivative function |
|
|
Input function |
|
|
Input function (previous time step) |
|
|
Time constant [s] |
|
|
Time step interval |
To minimize noise interference, particularly when the derivative time constant is large and the calculation step is very small, it may be necessary to add a noise filter. A first order noise filter applied for this purpose is shown in block diagram form below:

First Order Filters for Derivatives Using REALP2 or DIFPL2 Functions
|
Author(s): |
|
|
REAL FUNCTION DERIV1(T,X)
|
Argument |
Type |
Dimension |
Description |
|
|
|
|
|
|
T |
REAL |
1 |
Time constant [s] |
|
X |
REAL |
1 |
Input function |
This function requires the following storage allocations per call (see #STORAGE Script Directive and STORx Arrays for more details):
#STORAGE STOR:1
|
Address |
Description |
|
|
|
|
NEXC + 1 |
|