Derivative
ContinuousComputes the continuous-time rate of change (time derivative ) of an incoming signal with integrated first-order high-frequency low-pass filtering. Pure mathematical differentiation () is physically non-realizable and exhibits unbounded high-frequency gain, which severely magnifies measurement noise and numerical quantization errors. The Derivative block implements a proper transfer function with a high-frequency filtering pole parameterized by the filter coefficient , delivering clean rate estimation and phase-lead stabilization in control systems.
Mathematical Model
In the Laplace domain (), the filtered derivative transfer function is defined as:
where denotes filterCoefficient (filter bandwidth in ).
At operational frequencies below the filter pole (), the block closely approximates ideal continuous differentiation:
At high frequencies beyond the pole (), the gain rolls off and plateaus at a finite upper bound:
In discrete numerical simulation over timestep , the recurrence equation is computed as:
Setting disables the block and forces the output to zero.
Inputs & Outputs
| Direction | ID | Label | Type | Status |
|---|---|---|---|---|
| → In | in |
Input | number | Required |
| ← Out | out |
Output | number | Output |
Parameters
| Parameters | Label | Type | Default | Description |
|---|---|---|---|---|
filterCoefficient |
Filter Coefficient (N) | number | 100 |
Implements H(s) = N·s/(s+N). N=0 disables the block (output = 0). N sets the filter bandwidth in rad/s — higher N gives a faster, more accurate derivative but amplifies noise. Practical range: 5–100. Rule of thumb: N ≈ 5–10× the highest signal frequency of interest. |
Usage Examples
Example 1: Velocity Feedback Damping from Position Transducers
In precision galvanometric mirror scanning, an analog sensor monitors angular deflection . Routing position into a Derivative block with filterCoefficient = 250 rad/s computes angular velocity , feeding an inner velocity loop that damps structural resonance while filtering out megahertz photodiode sensor noise.
Example 2: Early Detection of Chemical Exothermic Runaway
In chemical batch reactor monitoring, the instantaneous rate of temperature rise () serves as a primary precursor for exothermic runaway. Passing a thermocouple temperature signal into a Derivative block with filterCoefficient = 20 rad/s calculates the heating rate in real time, triggering emergency cooling jacket valves long before absolute temperature alarm limits are breached.
Remarks & Best Practices
- High-Frequency Noise Attenuation: Pure mathematical differentiation magnifies high-frequency noise infinitely (). The integrated pole at bounds maximum gain to , protecting actuators from chatter.
- First-Step Startup Guard: On the initial simulation step (), the block outputs zero () to eliminate transient derivative spikes caused by abrupt initial condition assignments.
- Phase Lead Stabilization: Imparts positive phase lead (up to ) across low-to-medium frequencies, a property widely exploited in PD controllers to improve phase margin and damp overshoot.
- Choice of Filter Bandwidth: Choosing too low introduces excessive phase lag that erodes stability; choosing too high passes raw high-frequency noise directly into actuators.
Frequently Asked Questions (FAQ)
Q: Why does differentiating an unconditioned signal cause simulation instability?
In continuous math, the derivative of a step function is an infinite Dirac delta . In discrete numerical simulation, a step change produces a spike of magnitude . As step size , this spike approaches infinity, breaking downstream saturation blocks and ODE solvers. Always pass discontinuous signals through a low-pass filter before differentiation.
Related Components
- Integrator: Inverse mathematical operation ().
- DiscreteDerivative: Explicit backward-difference discrete-time differentiator.
- PIDController: Integrated proportional-integral-derivative controller with built-in filtered D-action.
- LeadLag: Dynamic phase lead and lag compensator for frequency-domain shaping.