viewof vpip_sensorCount = Inputs.range([1, 200], {value: 50, step: 1, label: "Number of Sensors"})
viewof vpip_sampleRate = Inputs.range([100, 5000], {value: 500, step: 100, label: "Sample Rate (Hz)"})
viewof vpip_windowSec = Inputs.range([1, 60], {value: 10, step: 1, label: "FFT Window (seconds)"})
viewof vpip_topN = Inputs.range([3, 50], {value: 10, step: 1, label: "Top-N FFT Bins Transmitted"})
viewof vpip_bytesPerSample = Inputs.select([2, 4], {value: 2, label: "Bytes per Sample"})
viewof vpip_metadataBytes = Inputs.range([0, 128], {value: 20, step: 4, label: "Metadata bytes per window"})Try It: Edge FFT Pipeline Data Reduction
Try It: Edge FFT Pipeline Data Reduction
animation
analytics-ml
edge
compression
Try Change FFT Window (seconds), then press Calculate.
Observe After Calculate, compare Raw Streaming, FFT Compressed, Frequency Resolution, and Monthly Savings.
Explain Describe how FFT Window (seconds) changes Frequency Resolution after Calculate.
Technical boundaries. Each selected FFT bin uses 2 bytes for calibrated uint16 magnitude, plus entered metadata per window. Monthly calculations use 30 days, a 10 GB cap, and 0.10 overage cost.
NoteTry It: Edge FFT Pipeline Data Reduction
Adjust the vibration sensor parameters and FFT settings to see how edge FFT compression reduces bandwidth for factory monitoring.
vpip_samplesPerWindow = vpip_sampleRate * vpip_windowSec
vpip_rawBytesPerWindow = vpip_samplesPerWindow * vpip_bytesPerSample
vpip_payloadBytesPerWindow = vpip_topN * 2 // calibrated uint16 magnitude per selected bin
vpip_compBytesPerWindow = vpip_payloadBytesPerWindow + vpip_metadataBytes
vpip_ratio = vpip_rawBytesPerWindow / vpip_compBytesPerWindow
vpip_freqResolution = vpip_sampleRate / vpip_samplesPerWindow
vpip_rawBpsAll = (vpip_rawBytesPerWindow / vpip_windowSec) * vpip_sensorCount
vpip_compBpsAll = (vpip_compBytesPerWindow / vpip_windowSec) * vpip_sensorCount
vpip_rawMonthGB = (vpip_rawBpsAll * 86400 * 30) / 1e9 // decimal GB for the stated data cap
vpip_compMonthGB = (vpip_compBpsAll * 86400 * 30) / 1e9
vpip_dataCap = 10
vpip_overageCost = 0.10
vpip_rawOverage = Math.max(0, vpip_rawMonthGB - vpip_dataCap) * vpip_overageCost
vpip_compOverage = Math.max(0, vpip_compMonthGB - vpip_dataCap) * vpip_overageCosthtml`<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);">
<h4 style="margin-top:0; color: #2C3E50;">Edge FFT Pipeline Results</h4>
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem;">
<div style="padding: 0.8rem; background: rgba(231,76,60,0.08); border-radius: 6px; text-align: center;">
<div style="font-size: 0.8rem; color: #374151;">Raw Streaming</div>
<div style="font-size: 1.6rem; font-weight: bold; color: #9f1d1d;">${vpip_rawMonthGB.toFixed(1)} GB/mo</div>
<div style="font-size: 0.85rem; color: ${vpip_rawOverage > 0 ? '#9f1d1d' : '#0f6b5c'};">${vpip_rawOverage > 0 ? "Overage: $" + vpip_rawOverage.toFixed(2) : "Within data cap"}</div>
</div>
<div style="padding: 0.8rem; background: rgba(22,160,133,0.08); border-radius: 6px; text-align: center;">
<div style="font-size: 0.8rem; color: #374151;">FFT Compressed</div>
<div style="font-size: 1.6rem; font-weight: bold; color: #0f6b5c;">${vpip_compMonthGB < 1 ? (vpip_compMonthGB * 1000).toFixed(1) + " MB/mo" : vpip_compMonthGB.toFixed(2) + " GB/mo"}</div>
<div style="font-size: 0.85rem; color: ${vpip_compOverage > 0 ? '#9f1d1d' : '#0f6b5c'};">${vpip_compOverage > 0 ? "Overage: $" + vpip_compOverage.toFixed(2) : "Within data cap"}</div>
</div>
</div>
<table style="width:100%; border-collapse: collapse; font-size: 0.9rem;">
<tr style="border-bottom: 1px solid var(--bs-border-color, #dee2e6);">
<th scope="row" style="padding: 5px 8px; font-weight: normal; text-align: left;"><strong>Samples per FFT Window</strong></th>
<td style="padding: 5px 8px; text-align: right;">${vpip_samplesPerWindow.toLocaleString()}</td>
</tr>
<tr style="border-bottom: 1px solid var(--bs-border-color, #dee2e6);">
<th scope="row" style="padding: 5px 8px; font-weight: normal; text-align: left;"><strong>Frequency Resolution</strong></th>
<td style="padding: 5px 8px; text-align: right;">${vpip_freqResolution.toFixed(2)} Hz/bin</td>
</tr>
<tr style="border-bottom: 1px solid var(--bs-border-color, #dee2e6);">
<th scope="row" style="padding: 5px 8px; font-weight: normal; text-align: left;"><strong>Per-Window Payload + Metadata</strong></th>
<td style="padding: 5px 8px; text-align: right;">${vpip_rawBytesPerWindow.toLocaleString()} B → ${vpip_payloadBytesPerWindow} B payload + ${vpip_metadataBytes} B metadata = ${vpip_compBytesPerWindow} B total (<strong style="color: #8a4a00;">${vpip_ratio.toFixed(0)}x</strong>)</td>
</tr>
<tr>
<th scope="row" style="padding: 5px 8px; font-weight: normal; text-align: left;"><strong>Monthly Savings</strong> (${vpip_sensorCount} sensors, 10 GB cap)</th>
<td style="padding: 5px 8px; text-align: right; color: #0d47a1; font-weight: bold;">${(vpip_rawMonthGB - vpip_compMonthGB).toFixed(1)} GB saved</td>
</tr>
</table>
</div>`