S1454 of 55
0 XP
  1. Hook
  2. Problems

S14 · Problem set 12

Problem set 12: design problems for keyword spotters on batteries, spectral features, ADC resolution, layer timing on a roofline, steady-state sensor fusion, anomaly thresholds, fixed-point inference, serving energy, data logging, federated updates, detection with diversity, PCA compression of sensor arrays, control horizons and on-chip memory

The last set before the final puts learning into electrical systems: models that must run on a battery or a microcontroller, features computed from sampled signals, detectors whose false alarms are counted per day, and servers whose cost is energy per token. The numbers come from the course; the constraints come from the hardware.

Check

A keyword spotter's main layer is a 3 × 3 convolution from 32 to 64 channels with a 16 × 16 output. Each multiply-add costs 2 pJ, and the device runs 1 inferences a second from a 3 V battery of 200 mAh.

(a)

How many million multiply-adds does the layer take?

(b)

How much energy does one inference of it take?

Write units the way you normally would: 1.5 µJ, 1500 nJ and 0.0015 mJ are the same answer.

(c)

How long would the battery last if this layer were the only load?

Check

A sound classifier computes spectra at 16000 samples a second with 10 Hz resolution, hopping by 1/4 of a frame.

(a)

How long is each frame?

(b)

At about 5N log₂ N operations per FFT, how many million operations a second do the spectra take?

Check

A sensor's noise is 0.5 mV RMS over a 2 V input range, and the ADC's quantization noise should be 4 times smaller.

(a)

How large can the quantization step be?

Write units the way you normally would: 1.5 mV, 1500 µV and 0.0015 V are the same answer.

(b)

How many bits does the ADC need?

Check

An int8 dense layer maps 1024 inputs to 1024 outputs at batch 256, on a chip with 400 TFLOP/s and 1 TB/s.

(a)

How long does its arithmetic take?

Write units the way you normally would: 1.5 µs, 1500 ns and 0.0015 ms are the same answer.

(b)

How long does the layer take, reading its weights once?

Check

A slowly drifting quantity changes by a random walk with variance 0.01 per step and is measured each step with noise variance 0.5.

(a)

What steady-state posterior variance does a Kalman filter reach?

(b)

What gain does it apply to each measurement?

Check

A two-feature Gaussian model of normal operation flags samples whose squared Mahalanobis distance exceeds a threshold, at 1 samples a second, raising an alarm after 3 flags in a row.

(a)

What threshold flags a fraction 0.01 of normal samples?

(b)

About how many false alarms per day result, with independent samples (a number of alarms)?

Check

A microcontroller runs fixed-point logistic regression on 16 features, at 1 cycles per multiply-add plus 200 cycles for the sigmoid, clocked at 80 MHz and drawing 3 mW.

(a)

How long does an inference take?

Write units the way you normally would: 1.5 µs, 1500 ns and 0.0015 ms are the same answer.

(b)

How much energy does it use?

Check

A server gives each of 64 users 20 tokens a second, drawing 10000 W.

(a)

What is its total throughput?

(b)

How much energy does each token take?

Write units the way you normally would: 1.5 J, 1500 mJ and 0.0015 kJ are the same answer.

Check

A logger records 8 channels at 100 samples a second, 24 bits each, onto a 512 GB card.

(a)

How much data does it collect per day?

(b)

How many days fill the card?

Check

Each device in a federated system uploads a model update of 10 million parameters at 8 bits each over a 2 Mb/s uplink.

(a)

How long does one upload take?

Write units the way you normally would: 1.5 s and 1500 ms are the same answer.

Check

A binary detector's two classes produce antipodal features in Gaussian noise at an energy-to-noise ratio of 7 dB per decision.

(a)

What is its error rate?

(b)

And when it combines two independent observations of each decision coherently?

Check

A sensor array's 64 channels have covariance eigenvalues proportional to rk (k = 1, 2, …) with r = 0.5, and PCA keeps 16 components.

(a)

By what factor does it compress each sample?

(b)

What signal-to-reconstruction-error ratio does it achieve (treating the spectrum as infinitely long)?

Have paper and a calculator ready. Work each problem out by hand, then enter the answer. Your first try on each one counts toward your score.

Practice

Keep practicing

15 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.