Technical data

A
model.rtw
A-20
Block Type: Derivative
The Derivative block computes its derivative by using the approximation
(input–prevInput)/deltaT
Two “banks” of history are needed to keep track of the previous input. This is because the input
history is updated prior to integrating states. To guarantee correctness when the output of the
Derivative block is integrated directly or indirectly, two banks of the previous inputs are needed.
This history is saved in the real-work vector. The following is an example of what will appear in the
model.rtw file for an input of width 5.
NumRWorkDefines 4
RWorkDefine {
Name TimeStampA
Width 1
}
RworkDefine {
Name LastUAtTimeA
Width 5
}
RworkDefine {
Name TimeStampB
Width 1
}
RworkDefine {
Name LastUAtTimeB
Width 5
Table A-3: Model.rtw File Contents — Block Specific Records (Continued)