Cyber-Physical Systems (BIL-435), week 10 of 14
Prof. Dr. Utku Kose, Süleyman Demirel University
Two parts of this interactive lab are virtual laboratories in three dimensions (3D) with the hardware in the foreground. Part A forecasts the test fortnight in the metering room of the campus. Part C watches the solar plant for faults. Part B computes the formulas of the lecture step by step, and Part D asks for the values of stage 10 by hand. Part E is a field task with the pyranometer and the data logger of the solar plant. 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 site. Start moves the view closer, and the view returns to the site at the end. The laboratories work best with a mouse or a touchpad on a computer.
The metering room of the energy centre holds the smart meters of the five buildings and the data concentrator, which collects their readings every hour. Next to them stand the edge server, which computes the forecast, and the screen of the weather service with the temperature forecast of each day. A run forecasts the whole test fortnight from 13 to 26 April and replays it hour by hour on the large screen.
Choose the model, the calendar and the weeks of training below the view and press Run the forecast. The calendar and the weeks matter only for the two regressions. Your missions: First, run the forecasts yesterday and last week. Second, run a regression with the official calendar and one with weekdays only, and compare their errors on 23 April. Third, bring the root mean square error (RMSE) of the test fortnight below 17 kW.
| Run | Model | Calendar | Weeks | MAE (kW) | RMSE (kW) | MAPE (percent) | MAE on 23 April (kW) | MAE in the cold spell (kW) |
|---|
Back to the lecture: Regression: Forecasting the load, where the text continues after the box of this part.
Continue in Colab, section 2: Paste your forecasts into MY_FORECASTS and compare them with the model.
The calculator follows the formulas of the lecture. It fits the straight line through five working mornings and forecasts the next morning from the temperature forecast. It then computes the power that the solar plant should deliver at the measured irradiance and the standardised residual of the meter, with the decision of the threshold.
Back to the lecture: Forecasting the generation, where the text continues after the box of this part.
Continue in Colab, section 3: Forecast the solar plant and the wind turbine from the weather service.
The solar plant of the campus has three rows of modules and two inverters. A pyranometer on its pole measures the irradiance, so the model of Week 1 knows what a healthy plant delivers in every hour. The monitoring cabinet compares this expectation with the meter of the plant and shows the standardised residual z, and its beacon lights up at every alarm. The screen shades the three faults of the maintenance log: An inverter trips, the meter freezes, and dust covers the modules.
Choose the detector, a threshold on z or the cumulative sum (CUSUM), and its settings below the view and press Run the fortnight. Your missions: First, run the threshold with k = 2 and with k = 3, and compare their false alarms. Second, find the smallest k, in steps of 0.5, without a false alarm. Third, find the dust on its first day, 20 April, without a false alarm.
| Run | Detector | Settings | False alarms | Alarm hours in faults | Inverter trip found | Frozen meter found | Dust found |
|---|
Back to the lecture: Anomaly detection, where the text continues after the box of this part.
Continue in Colab, section 4: Paste your runs into MY_ALARMS and compare them with the model.
Three hours of the test fortnight have the actual load 512, 548 and 590 kW and the forecast 520, 540 and 572 kW: Compute the RMSE in kW. The load model of the campus has $a_8 = 490.45$ kW for a working day and $b = 5.54$ kW per kelvin: Compute its forecast for 08:00 with a forecast temperature of 2.0 °C. The model of the solar plant expects 280.0 kW, and the meter shows 266.0 kW: Compute $z$ with $\sigma = 1.35$ percent.
Back to the lecture: The campus microgrid, stage 10: Forecasts of load and generation, where the text continues after the box of this part.
Continue in Colab, section 5: Compute the results of stage 10 of the campus microgrid.
The pyranometer of the solar plant in Part C is back from its recalibration and sits on its pole again. Since then, the residual of the plant alarms in every sunny hour, although the plant runs without faults. The data logger in the monitoring cabinet converts the voltage of the pyranometer into the irradiance, and the new calibration certificate lies on the desk.
The keys work as on the real device. The keys ▲ and ▼ choose a line, OK opens it or starts and saves a change, and the escape key (ESC) goes back. A number changes digit by digit: ◀ and ▶ choose the digit, and ▲ and ▼ change it. On a computer, the arrow keys, Enter and Escape work as well, once the front panel has been clicked.
Back to the lecture: In the field: Maintaining the pyranometer, where the text continues after the box of this part.
Answer each question, rate your confidence and check the answer. The self-assessment is for your own practice and does not count towards the grade. Results stay in this browser.
Write a short answer to each question. The text is saved in this browser and is included when you export the learning log, together with the results of the practice parts.