Edge Bandwidth Calculator
Try Change Aggregation window (sec), then press Calculate.
Observe After Calculate, compare Raw Data Rate, Aggregated Data Rate, and Bandwidth Reduction.
Explain Describe how aggregation window affects Aggregated Data Rate after Calculate.
Calculate
Reset
Technical boundaries. LoRa capacity is fixed at 4.2 B/s. Summary bytes per window equal summary values per window multiplied by bytes per sample.
Edge Bandwidth Calculator
Use the sliders below to explore how sampling rate, number of axes, and aggregation window affect raw versus aggregated data rates. Observe how quickly raw data exceeds LPWAN capacity.
viewof edgeAcqSampleRate = Inputs. range ([10 , 1000 ], {value : 100 , step : 10 , label : "Sampling rate (Hz)" })
viewof edgeAcqAxes = Inputs. range ([1 , 12 ], {value : 6 , step : 1 , label : "Number of axes" })
viewof edgeAcqBytesPerSample = Inputs. select ([2 , 4 , 8 ], {value : 2 , label : "Bytes per sample" })
viewof edgeAcqSummaryValues = Inputs. range ([1 , 30 ], {value : 9 , step : 1 , label : "Summary values per window" })
viewof edgeAcqWindowSec = Inputs. range ([1 , 120 ], {value : 1 , step : 1 , label : "Aggregation window (sec)" })
edgeAcqCalc = {
const rawBytesPerSec = edgeAcqSampleRate * edgeAcqAxes * edgeAcqBytesPerSample;
const summaryBytesPerWindow = edgeAcqSummaryValues * edgeAcqBytesPerSample;
const summaryBytesPerSec = summaryBytesPerWindow / edgeAcqWindowSec;
const reductionRatio = rawBytesPerSec / summaryBytesPerSec;
const rawDailyMB = (rawBytesPerSec * 86400 ) / 1e6 ;
const summaryDailyMB = (summaryBytesPerSec * 86400 ) / 1e6 ;
const loraCapacity = 4.2 ;
const loraExceedFactor = rawBytesPerSec / loraCapacity;
const loraAggExceed = summaryBytesPerSec / loraCapacity;
return html `<div style="background: var(--bs-light, #f8f9fa); border: 1px solid var(--bs-border-color, #dee2e6); border-radius: 8px; padding: 1.2rem; color: var(--bs-body-color); font-family: Arial, sans-serif;">
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem;">
<div style="background: var(--bs-body-bg); border-radius: 6px; padding: 1rem; border-left: 4px solid #E74C3C;">
<div style="font-size: 0.85rem; color: #7F8C8D; text-transform: uppercase;">Raw Data Rate</div>
<div style="font-size: 1.6rem; font-weight: bold; color: #E74C3C;"> ${ rawBytesPerSec. toLocaleString ()} B/s</div>
<div style="font-size: 0.85rem; color: var(--bs-body-color);"> ${ rawDailyMB. toFixed (1 )} MB/day</div>
<div style="font-size: 0.8rem; color: #E74C3C; margin-top: 0.3rem;">LoRa: exceeds capacity by ${ loraExceedFactor. toFixed (0 )} x</div>
</div>
<div style="background: var(--bs-body-bg); border-radius: 6px; padding: 1rem; border-left: 4px solid #16A085;">
<div style="font-size: 0.85rem; color: #7F8C8D; text-transform: uppercase;">Aggregated Data Rate</div>
<div style="font-size: 1.6rem; font-weight: bold; color: #16A085;"> ${ summaryBytesPerSec. toFixed (1 )} B/s</div>
<div style="font-size: 0.85rem; color: var(--bs-body-color);"> ${ summaryDailyMB. toFixed (2 )} MB/day</div>
<div style="font-size: 0.8rem; color: ${ loraAggExceed <= 1 ? '#16A085' : '#E67E22' } ; margin-top: 0.3rem;">LoRa: ${ loraAggExceed <= 1 ? 'fits within capacity' : `still exceeds by ${ loraAggExceed. toFixed (1 )} x` } </div>
</div>
</div>
<div style="text-align: center; padding: 0.8rem; background: var(--bs-body-bg); border-radius: 6px;">
<span style="font-size: 1.1rem; font-weight: bold; color: #2C3E50;">Bandwidth Reduction: </span>
<span style="font-size: 1.4rem; font-weight: bold; color: #3498DB;"> ${ reductionRatio. toFixed (0 )} x</span>
<span style="font-size: 0.85rem; color: #7F8C8D; margin-left: 0.5rem;">( ${ ((1 - 1 / reductionRatio) * 100 ). toFixed (1 )} % less data)</span>
</div>
</div>` ;
}
Back to the chapter