Interactive Sensor Network Designer
Try Change Terrain Complexity, then press Calculate cost.
Observe Watch Total Sensors and Total Cost after you press Calculate cost.
Explain Explain why terrain changes required sensors when you press Calculate cost.
Calculate cost
Reset
Technical boundaries. Coverage uses terrain-based correlation distances. The tiered strategy uses 5% reference, 30% mid-grade and 65% low-cost sensors, with at least 3 reference sensors even after budget adjustment.
Interactive Sensor Network Designer
Design an optimal sensor network by balancing coverage, accuracy, and cost using the tiered approach from the worked examples.
viewof area = Inputs. range ([10 , 5000 ], {
label : "Coverage Area (km²)" ,
step : 10 ,
value : 150
})
viewof terrain = Inputs. select (
["Flat (urban/coastal)" , "Moderate (valley)" , "Complex (mountainous)" ],
{label : "Terrain Complexity" , value : "Moderate (valley)" }
)
viewof refSensorCost = Inputs. range ([5000 , 20000 ], {
label : "Reference Sensor Cost ($)" ,
step : 1000 ,
value : 15000
})
viewof midSensorCost = Inputs. range ([1000 , 8000 ], {
label : "Mid-Grade Sensor Cost ($)" ,
step : 500 ,
value : 3000
})
viewof lowSensorCost = Inputs. range ([200 , 2000 ], {
label : "Low-Cost Sensor Cost ($)" ,
step : 50 ,
value : 800
})
viewof budget = Inputs. range ([50000 , 1000000 ], {
label : "Total Budget ($)" ,
step : 10000 ,
value : 300000
})
correlationDistance = terrain === "Flat (urban/coastal)" ? 20 :
terrain === "Moderate (valley)" ? 12 : 6
// Calculate required sensors for uniform coverage
uniformSensors = Math . ceil (area / (correlationDistance * correlationDistance))
// Tiered strategy: 5% reference, 30% mid-grade, 65% low-cost
tier1Count = Math . max (3 , Math . ceil (uniformSensors * 0.05 ))
tier2Count = Math . ceil (uniformSensors * 0.30 )
tier3Count = Math . ceil (uniformSensors * 0.65 )
totalTiered = tier1Count + tier2Count + tier3Count
// Cost calculations
tier1Total = tier1Count * refSensorCost
tier2Total = tier2Count * midSensorCost
tier3Total = tier3Count * lowSensorCost
tieredCost = tier1Total + tier2Total + tier3Total
uniformCost = uniformSensors * refSensorCost
// Budget fit
withinBudget = tieredCost <= budget
excessBudget = budget - tieredCost
budgetUtilization = (tieredCost / budget) * 100
// Adjusted counts if over budget
adjustmentFactor = withinBudget ? 1 : budget / tieredCost
adjTier1 = Math . max (3 , Math . floor (tier1Count * adjustmentFactor))
adjTier2 = Math . floor (tier2Count * adjustmentFactor)
adjTier3 = Math . floor (tier3Count * adjustmentFactor)
adjTotal = adjTier1 + adjTier2 + adjTier3
adjCost = (adjTier1 * refSensorCost) + (adjTier2 * midSensorCost) + (adjTier3 * lowSensorCost)
// Color palette
sensorDesignColors = ({
navy : "#2C3E50" ,
teal : "#16A085" ,
orange : "#E67E22" ,
blue : "#3498DB" ,
gray : "#7F8C8D" ,
purple : "#9B59B6" ,
red : "#E74C3C"
})
html `
<div style="font-family: inherit; max-width: 900px; margin: 20px 0;">
<h3 style="color: ${ sensorDesignColors. navy } ; border-bottom: 3px solid ${ sensorDesignColors. orange } ; padding-bottom: 10px;">
Sensor Network Design Results
</h3>
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 15px; margin: 20px 0;">
<div style="background: ${ sensorDesignColors. navy } ; padding: 20px; border-radius: 8px; color: white;">
<div style="font-size: 0.85em; opacity: 0.9;">Tier 1: Reference</div>
<div style="font-size: 2.2em; font-weight: bold; margin: 10px 0;">
${ withinBudget ? tier1Count : adjTier1}
</div>
<div style="font-size: 0.8em; opacity: 0.8;">
@ $ ${ (refSensorCost/ 1000 ). toFixed (0 )} K each
</div>
<div style="font-size: 0.75em; opacity: 0.7; margin-top: 5px;">
Regulatory compliance
</div>
</div>
<div style="background: ${ sensorDesignColors. teal } ; padding: 20px; border-radius: 8px; color: white;">
<div style="font-size: 0.85em; opacity: 0.9;">Tier 2: Mid-Grade</div>
<div style="font-size: 2.2em; font-weight: bold; margin: 10px 0;">
${ withinBudget ? tier2Count : adjTier2}
</div>
<div style="font-size: 0.8em; opacity: 0.8;">
@ $ ${ (midSensorCost/ 1000 ). toFixed (1 )} K each
</div>
<div style="font-size: 0.75em; opacity: 0.7; margin-top: 5px;">
Critical locations
</div>
</div>
<div style="background: ${ sensorDesignColors. orange } ; padding: 20px; border-radius: 8px; color: white;">
<div style="font-size: 0.85em; opacity: 0.9;">Tier 3: Low-Cost</div>
<div style="font-size: 2.2em; font-weight: bold; margin: 10px 0;">
${ withinBudget ? tier3Count : adjTier3}
</div>
<div style="font-size: 0.8em; opacity: 0.8;">
@ $ ${ lowSensorCost} each
</div>
<div style="font-size: 0.75em; opacity: 0.7; margin-top: 5px;">
Spatial coverage
</div>
</div>
</div>
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 20px; margin: 20px 0;">
<div style="background: linear-gradient(135deg, ${ sensorDesignColors. blue } 0%, ${ sensorDesignColors. purple } 100%);
padding: 20px; border-radius: 8px; color: white;">
<div style="font-size: 0.9em; opacity: 0.9;">Total Sensors</div>
<div style="font-size: 2em; font-weight: bold; margin: 10px 0;">
${ withinBudget ? totalTiered : adjTotal}
</div>
<div style="font-size: 0.85em; opacity: 0.8;">
Coverage: ${ area} km² @ ${ correlationDistance} km spacing
</div>
</div>
<div style="background: ${ withinBudget ? sensorDesignColors. teal : sensorDesignColors. red } ;
padding: 20px; border-radius: 8px; color: white;">
<div style="font-size: 0.9em; opacity: 0.9;">Total Cost</div>
<div style="font-size: 2em; font-weight: bold; margin: 10px 0;">
$ ${ ((withinBudget ? tieredCost : adjCost)/ 1000 ). toFixed (0 )} K
</div>
<div style="font-size: 0.85em; opacity: 0.8;">
${ withinBudget ?
` ${ budgetUtilization. toFixed (0 )} % of budget` :
`Budget-adjusted design` }
</div>
</div>
</div>
<div style="background: #f8f9fa; padding: 15px; border-left: 4px solid ${ sensorDesignColors. orange } ;
border-radius: 4px; margin: 20px 0;">
<strong style="color: ${ sensorDesignColors. navy } ;">Cost Comparison:</strong>
<div style="margin: 10px 0; padding: 10px; background: white; border-radius: 4px;">
<div style="display: flex; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 8px;">
<span style="color: ${ sensorDesignColors. gray } ;">All Reference-Grade ( ${ uniformSensors} sensors):</span>
<strong style="color: ${ sensorDesignColors. red } ;">$ ${ (uniformCost/ 1000 ). toFixed (0 )} K</strong>
</div>
<div style="display: flex; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap;">
<span style="color: ${ sensorDesignColors. gray } ;">Tiered Strategy ( ${ withinBudget ? totalTiered : adjTotal} sensors):</span>
<strong style="color: ${ sensorDesignColors. teal } ;">$ ${ ((withinBudget ? tieredCost : adjCost)/ 1000 ). toFixed (0 )} K</strong>
</div>
<div style="margin-top: 10px; padding-top: 10px; border-top: 2px solid #e0e0e0;">
<span style="color: ${ sensorDesignColors. navy } ; font-weight: bold;">
Savings: $ ${ ((uniformCost - (withinBudget ? tieredCost : adjCost))/ 1000 ). toFixed (0 )} K
( ${ ((1 - (withinBudget ? tieredCost : adjCost)/ uniformCost)* 100 ). toFixed (0 )} % reduction)
</span>
</div>
</div>
</div>
${ ! withinBudget ?
`<div style="background: ${ sensorDesignColors. orange } ; color: white; padding: 15px; border-radius: 4px; margin: 20px 0;">
<strong>Budget Constraint Active:</strong> Original design required $ ${ (tieredCost/ 1000 ). toFixed (0 )} K,
but budget is $ ${ (budget/ 1000 ). toFixed (0 )} K. Sensor counts reduced proportionally.
Consider: (1) Increasing budget, (2) Reducing coverage area, or (3) Accepting lower spatial density.
</div>` :
excessBudget > 50000 ?
`<div style="background: ${ sensorDesignColors. teal } ; color: white; padding: 15px; border-radius: 4px; margin: 20px 0;">
<strong>Under Budget:</strong> $ ${ (excessBudget/ 1000 ). toFixed (0 )} K remaining.
Consider adding ${ Math . floor (excessBudget/ lowSensorCost)} Tier 3 sensors for denser coverage,
or reserve funds for 5-year OpEx (connectivity, maintenance, calibration).
</div>` : '' }
<div style="background: #fff3cd; padding: 15px; border-left: 4px solid ${ sensorDesignColors. orange } ;
border-radius: 4px; margin: 20px 0; color: #856404;">
<strong>Design Insights:</strong>
<ul style="margin: 10px 0; padding-left: 20px;">
<li><strong> ${ correlationDistance} km correlation distance</strong> for ${ terrain} terrain</li>
<li>Tier 1 sensors ( ${ ((withinBudget ? tier1Count : adjTier1) / (withinBudget ? totalTiered : adjTotal) * 100 ). toFixed (0 )} %)
provide calibration anchors for Tier 3 sensors</li>
<li>Uniform reference-grade deployment would cost
<strong> ${ (uniformCost/ tieredCost). toFixed (1 )} x more</strong></li>
<li> ${ terrain === "Complex (mountainous)" ?
'Complex terrain requires denser networks due to short correlation distance (6km)' :
terrain === "Moderate (valley)" ?
'Moderate terrain allows 12km spacing between measurement points' :
'Flat terrain permits 20km spacing with good spatial interpolation' } </li>
</ul>
</div>
</div>
`
Using This Calculator
This tool implements the tiered sensor strategy from the air quality and weather station examples:
Set your coverage area - Total km² you need to monitor
Choose terrain complexity - Determines correlation distance (flat: 20km, moderate: 12km, complex: 6km)
Configure sensor costs - Adjust to match your vendor quotes
Set your budget - See if the tiered strategy fits
Key Principles:
Present 5/30/65 as a selectable starting mix in the calculator, with accuracy validated for local conditions. - Minimum 3 reference sensors : Always deploy at least 3 for calibration redundancy Under the calculator’s 20 km versus 6 km correlation-distance assumptions, a simple area-density model yields about 11× as many sites; validate spatial correlation for the terrain. - Cost savings : Tiered approach typically achieves 75-90% cost reduction vs. all-reference deployment
What to Observe:
How terrain complexity dramatically affects sensor count
Why the tiered strategy saves money while maintaining data quality
The importance of maintaining reference sensors even when over budget
Back to the chapter