Deadband Filtering
This tutorial shows you how to use deadband filtering to reduce the number of notifications from monitored variables. Deadband filtering only sends notifications when the value changes by a significant amount, reducing network traffic and processing overhead.
Deadband filtering is essential for:
- Analog values with minor fluctuations (temperature, pressure, flow)
- High-frequency sampling where small changes aren't significant
- Reducing network bandwidth usage
- Preventing notification storms
Prerequisites
- An active connection to an OPC UA server (see Create a connection)
- A subscription configured in the connection endpoint
- Basic understanding of monitoring (see Monitoring a Single Variable)
What is Deadband?
A deadband defines a threshold below which value changes are not reported. Only when the value changes by more than the deadband threshold will a notification be sent.
Without Deadband:
Time: 0s 1s 2s 3s 4s 5s
Value: 23.5 23.6 23.4 23.7 23.5 23.6
↓ ↓ ↓ ↓ ↓ ↓
All changes reported (6 notifications)
With Absolute Deadband (0.5):
Time: 0s 1s 2s 3s 4s 5s
Value: 23.5 23.6 23.4 23.7 23.5 23.6
↓ -- -- -- -- --
Only first reported (1 notification)
Deadband Types
None (No Filtering)
Default behavior - all value changes are reported.
{
"deadbandType": "None"
}
Absolute Deadband
Reports changes only when the absolute difference exceeds the threshold.
Formula: |NewValue - LastReportedValue| > DeadbandValue
Example: Absolute deadband of 0.5
- Last reported:
23.5 - New value:
23.8→ Difference:0.3→ Not reported - New value:
24.1→ Difference:0.6→ Reported
{
"deadbandType": "Absolute",
"deadbandValue": 0.5
}
Percent Deadband
Reports changes only when the percentage change exceeds the threshold, based on the variable's EURange (Engineering Units Range).
Formula: |NewValue - LastReportedValue| / EURange * 100 > DeadbandValue
Requirements:
- The monitored variable must have an
EURangeproperty - EURange defines the instrument's measurement range
Example: Percent deadband of 1% with EURange [0, 100]
- EURange span:
100 - Deadband threshold:
1(1% of 100) - Last reported:
50 - New value:
50.5→ Difference:0.5→ Not reported - New value:
51.2→ Difference:1.2→ Reported
{
"deadbandType": "Percent",
"deadbandValue": 1.0
}
Configuration Methods
Method 1: Node Configuration
Set deadband in the Monitor node configuration panel:
- Open Monitor node settings
- Locate Deadband section
- Select deadband type:
Not Use,Absolute, orPercent - Enter Deadband Value
Method 2: Message Injection
Override deadband settings dynamically via message properties:
{
"topic": "ns=1;s=Temperature",
"deadbandType": "Absolute",
"deadbandValue": 0.5
}
Overridable Properties:
msg.deadbandType:"None","Absolute", or"Percent"msg.deadbandValue: Numeric threshold value
Example: Temperature Monitoring with Absolute Deadband
Monitor a temperature sensor that fluctuates slightly:
[
{
"id": "inject1",
"type": "inject",
"name": "Monitor Temperature",
"topic": "ns=1;s=Temperature",
"payload": {
"deadbandType": "Absolute",
"deadbandValue": 0.5
},
"payloadType": "json"
},
{
"id": "monitor1",
"type": "OpcUa-Monitor",
"name": "Filtered Temperature",
"endpoint": "opcua_endpoint1",
"subscription": "subscription1",
"startImmediately": false,
"samplingInterval": 100
},
{
"id": "debug1",
"type": "debug",
"name": "Significant Changes Only"
}
]
Behavior:
- Server samples every 100ms
- Only reports when temperature changes by ≥ 0.5°C
- Reduces notifications significantly
Example: Pressure Monitoring with Percent Deadband
Monitor a pressure transmitter with EURange [0, 10] bar:
[
{
"id": "inject1",
"type": "inject",
"name": "Monitor Pressure",
"topic": "ns=1;s=Pressure",
"payload": {
"deadbandType": "Percent",
"deadbandValue": 2.0
},
"payloadType": "json"
},
{
"id": "monitor1",
"type": "OpcUa-Monitor",
"name": "Filtered Pressure",
"endpoint": "opcua_endpoint1",
"subscription": "subscription1",
"startImmediately": false,
"samplingInterval": 500
},
{
"id": "debug1",
"type": "debug",
"name": "Significant Changes Only"
}
]
Calculation:
- EURange:
[0, 10]→ Span:10 - Deadband:
2%→ Threshold:0.2bar - Reports only when pressure changes by ≥ 0.2 bar
Dynamic Deadband Adjustment
Adjust deadband based on operating conditions:
// Function node: Adaptive deadband
const operatingMode = flow.get("mode");
let deadbandValue;
if (operatingMode === "startup") {
// More sensitive during startup
deadbandValue = 0.1;
} else if (operatingMode === "normal") {
// Less sensitive during normal operation
deadbandValue = 0.5;
} else if (operatingMode === "shutdown") {
// Very sensitive during shutdown
deadbandValue = 0.05;
}
msg.deadbandType = "Absolute";
msg.deadbandValue = deadbandValue;
return msg;
Choosing Deadband Values
Absolute Deadband Guidelines
Temperature (°C):
- High precision:
0.1 - 0.5 - Normal:
0.5 - 2.0 - Low precision:
2.0 - 5.0
Pressure (bar):
- High precision:
0.01 - 0.1 - Normal:
0.1 - 0.5 - Low precision:
0.5 - 1.0
Flow Rate (L/min):
- High precision:
0.5 - 2.0 - Normal:
2.0 - 10.0 - Low precision:
10.0 - 50.0
Percent Deadband Guidelines
General Purpose:
- High sensitivity:
0.1 - 1.0% - Normal:
1.0 - 5.0% - Low sensitivity:
5.0 - 10.0%
By Application:
- Critical control loops:
0.1 - 0.5% - Monitoring:
1.0 - 2.0% - Historical logging:
2.0 - 5.0%
Combining Deadband with Sampling Interval
Use both features together for optimal efficiency:
{
"samplingInterval": 1000,
"deadbandType": "Absolute",
"deadbandValue": 0.5
}
Process:
- Server samples every 1000ms
- Server compares to last reported value
- Server reports only if difference > 0.5
This reduces both server-side processing and network traffic.
Example: Multi-Variable with Different Deadbands
Apply different deadbands to different variables:
// Function node: Configure monitoring with variable-specific deadbands
const variables = {
temperature: {
nodeId: "ns=1;s=Temperature",
deadbandType: "Absolute",
deadbandValue: 0.5,
samplingInterval: 1000
},
pressure: {
nodeId: "ns=1;s=Pressure",
deadbandType: "Percent",
deadbandValue: 2.0,
samplingInterval: 500
},
flowRate: {
nodeId: "ns=1;s=FlowRate",
deadbandType: "Absolute",
deadbandValue: 5.0,
samplingInterval: 2000
}
};
// Create separate messages for each variable
const messages = [];
for (const [name, config] of Object.entries(variables)) {
messages.push({
topic: config.nodeId,
samplingInterval: config.samplingInterval,
deadbandType: config.deadbandType,
deadbandValue: config.deadbandValue
});
}
// Send to multiple Monitor nodes
return [messages];
Monitoring Deadband Effectiveness
Track how much deadband filtering reduces notifications:
// Function node: Count filtered vs reported
const context = flow.get('deadbandStats') || {
sampled: 0,
reported: 0,
lastValue: null
};
context.sampled++;
// This message represents a reported value (passed deadband)
context.reported++;
context.lastValue = msg.payload;
flow.set('deadbandStats', context);
// Calculate efficiency
const filterRate = ((context.sampled - context.reported) / context.sampled * 100).toFixed(1);
msg.stats = {
sampled: context.sampled,
reported: context.reported,
filtered: context.sampled - context.reported,
filterRate: filterRate + '%'
};
return msg;
Deadband vs. Rate of Change
Deadband is different from rate-of-change filtering:
Deadband:
- Filters based on magnitude of change
- Independent of time
- Reduces notifications during stable periods
Rate Limiting:
- Filters based on frequency of notifications
- Independent of magnitude
- Ensures maximum notification rate
Consider combining both for comprehensive filtering.
Tips & Best Practices
Start Conservative
Begin with smaller deadband values and increase gradually:
// Start with 1% and adjust based on results
msg.deadbandType = "Percent";
msg.deadbandValue = 1.0;
Use Absolute for Direct Measurements
Use absolute deadband when you know the acceptable tolerance:
// Temperature must be within ±0.5°C
msg.deadbandType = "Absolute";
msg.deadbandValue = 0.5;
Use Percent for Scaled Measurements
Use percent deadband for variables with EURange:
// 2% of instrument range
msg.deadbandType = "Percent";
msg.deadbandValue = 2.0;
Verify EURange for Percent Deadband
Check if the variable has EURange before using percent deadband:
// Read EURange first
const readMsg = {
topic: "ns=1;s=Pressure.EURange",
attributeId: "Value"
};
// If EURange exists, use Percent; otherwise, use Absolute
Consider Instrument Accuracy
Set deadband larger than instrument noise:
// If sensor accuracy is ±0.1, use deadband ≥ 0.2
msg.deadbandValue = 0.3;
Monitor Performance
Regularly check notification reduction:
// Log statistics periodically
setInterval(() => {
const stats = flow.get('deadbandStats');
node.log(`Filter effectiveness: ${stats.filterRate}`);
}, 60000); // Every minute
Common Pitfalls
Deadband Too Large
Symptom: Missing important changes
Solution: Reduce deadband value
// Was: 5.0 (too large)
// Now: 1.0 (better)
msg.deadbandValue = 1.0;
Deadband Too Small
Symptom: Still getting too many notifications
Solution: Increase deadband value
// Was: 0.01 (too small)
// Now: 0.5 (better)
msg.deadbandValue = 0.5;
Percent Deadband Without EURange
Symptom: Deadband doesn't work
Solution: Use absolute deadband or add EURange to variable
// If EURange not available, use Absolute
msg.deadbandType = "Absolute";
Conflicting with Alarm Thresholds
Symptom: Alarms not triggered
Solution: Ensure deadband is smaller than alarm thresholds
// If alarm at 80°C, use deadband < 1°C
msg.deadbandValue = 0.5;
Troubleshooting
No Notifications Received
Cause: Deadband too large or value not changing enough
Solution:
- Reduce deadband value
- Check if value is actually changing
- Verify monitored variable is correct
Too Many Notifications
Cause: Deadband too small or not configured
Solution:
- Increase deadband value
- Verify deadband is being applied
- Check sampling interval
Percent Deadband Not Working
Cause: Variable doesn't have EURange property
Solution:
- Verify EURange exists using Read node
- Switch to absolute deadband
- Contact server administrator to add EURange
Unexpected Notification Timing
Cause: Misunderstanding deadband behavior
Clarification:
- Deadband compares to last reported value, not last sampled value
- Initial value is always reported regardless of deadband
Performance Impact
Notification Reduction
Typical reductions with proper deadband configuration:
- No deadband: 100% of samples reported
- Small deadband (0.5%): 60-80% reduction
- Medium deadband (2%): 80-95% reduction
- Large deadband (5%): 95-99% reduction
Server-Side Filtering
Deadband is processed by the OPC UA server, reducing:
- Network bandwidth usage
- Client-side processing
- Message queue size
Best Practice
Deadband + Sampling Interval = Maximum efficiency
{
"samplingInterval": 1000,
"deadbandType": "Absolute",
"deadbandValue": 0.5
}
Next Steps
- Monitor Array - Apply deadband to multiple variables
- Monitor JSON Structure - Deadband with structured data
- Monitor Events - Event-based monitoring