Cyber-Physical Systems (BIL-435), week 4 of 14

Sensors and Actuators: Sampling, Quantisation, Noise and Smart Meters

Prof. Dr. Utku Kose, Süleyman Demirel University

Sensors and actuators lab

Two parts of this interactive lab are virtual laboratories in three dimensions (3D) with the hardware in the foreground. Part A samples the voltage of the grid on a bench with a signal generator, a converter board and an oscilloscope. Part C opens the meter cabinet of the library. Part B computes the formulas of the lecture step by step, and Part D asks for the values of stage 4 by hand. Part E is a field task at the meter cabinet with a reversed current transformer. In the calculator every intermediate value is rounded, and the next step continues with the rounded value. The results of Parts A and C can be copied into the Colab notebook. Each laboratory first shows its room. Start moves the view to the bench or the cabinet, and the view returns to the room at the end. The laboratories work best with a mouse or a touchpad on a computer.

Part A: The sampling bench

The sampling bench measures the voltage of the grid as a controller does. A signal generator stands for the grid and delivers 50 Hz, scaled down to 3.25 V by a divider. A converter board with an input range from -5 to +5 V samples it. An oscilloscope shows the signal, the samples and the line that a computer draws through them. A frequency counter on the board counts the zero crossings of the samples, and the board measures its own error of quantisation with a slow ramp over its whole range.

Choose the sampling rate and the bits below the view and press Measure. Your missions: First, measure at four sampling rates, two of them at 100 samples a second or below, and compare the counted frequency with the formula of the lecture. Second, measure three different resolutions and compare the error with q divided by the square root of 12.

TestRate (1/s)BitsCounted (Hz)Formula (Hz)Error (mV)q/√12 (mV)

Back to the lecture: Sampling: How often to look, where the text continues after the box of this part.
Continue in Colab, section 2: Paste your measurements into MY_SAMPLES and compare them with the formulas.

Part B: The converter and the filter, step by step

The calculator follows the voltage of the grid and the frequency reading through a converter and a moving average, one step at a time. Its sliders set the sampling rate, the bits of the converter over 10 V and the window of the moving average. The frequency readings carry a noise of 25 mHz and arrive 100 times a second.

Back to the lecture: Quantisation and noise: How finely to look, where the text continues after the box of this part.
Continue in Colab, section 3: Measure the errors of five converters and five windows.

Part C: The meter cabinet of the library

The meter cabinet of the library is open. The three phase cables of the feeder pass through current transformers of 200/5 A. The two secondary wires of each transformer, from its terminals S1 and S2, run through a test terminal block to the current inputs of the smart meter. Thin wires through the fuse holder F1 bring the meter the three phase voltages and the neutral. Its light flashes once for every 1/1000 kWh on the secondary side, so each flash stands for 40 Wh of the library. A contactor switches the heater of 60 kW, and a data concentrator collects the intervals of the meter.

Switch the heater with the button below, then press Flash each time that you see the light of the meter flash. After a few flashes, press Compute: The interactive lab divides the time from your first to your last press by the number of periods between them. Your missions: Measure once with the heater on, with at least five flashes, and once with the heater off, with at least three. The difference of the two powers is the power of the heater.

RunHeaterFlashesTime (s)Power (kW)

Back to the lecture: Smart meters: Energy in intervals, where the text continues after the box of this part.
Continue in Colab, section 4: Paste your pulses into MY_PULSES and compare them with the true power.

Part D: By hand: Stage 4 of the microgrid

The voltage of 50 Hz is sampled 80 times a second: Compute the apparent frequency in Hz. A converter of 8 bits covers 10 V: Compute its root-mean-square (RMS) error of quantisation in mV to two decimals. Finally, the light of the meter of the library flashes every 3.6 s: Compute the power in kW with 1000 pulses per kWh and a current transformer of ratio 40.

Back to the lecture: The campus microgrid, stage 4: Measuring the microgrid, where the text continues after the box of this part.
Continue in Colab, section 5: Compute the results of stage 4 of the campus microgrid.

Part E: Field task: A reversed current transformer

Since a visit of the installer, the meter in the cabinet of Part C registers far too little energy, although the heater runs every evening. The installer had rewired the current transformers (CT). The test terminal block between the transformers and the meter has a section for each phase, with a shorting bridge and links that separate the meter.

Back to the lecture: In the field: A reversed current transformer, where the text continues after the box of this part.