Cyber-Physical Systems (BIL-435), week 5 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 tests the frequency controller of the battery on a hardware-in-the-loop bench. Part C opens the inverter cabinet of the battery. Part B computes the formulas of the lecture step by step, and Part D asks for the values of stage 5 by hand. Part E is a field task with the menu of the battery inverter, operated as on site. 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.
The hardware-in-the-loop bench tests the frequency controller of the battery before it meets the island. A real-time simulator computes the island of the campus every 2 ms. Its model holds the inertia of 80 kW·s/Hz, the damping of 12 kW/Hz of the loads and the inverter that follows within 0.2 s. It sends the frequency to the real controller as an analog voltage, and the controller sends its power command back. An oscilloscope shows the frequency and the power of the battery for 30 s after a load step.
Set the three gains below the view, choose the load step and press Run. Your missions: First, run proportional control alone at two values of Kp and compare the final deviation with -ΔP/(D + Kp). Second, find an integral gain that returns within 20 mHz in less than 7 s without an overshoot above 10 mHz. Third, raise Ki until the oscillation no longer dies away. Keep Kp and Kd fixed, make one run on each side of the limit and compare with the Routh-Hurwitz limit of the lecture. The decay compares the second dip with the first: Below 1 the oscillation dies away.
| Run | Kp | Ki | Kd | Step (kW) | Nadir (Hz) | Overshoot (Hz) | Settled (s) | Final (Hz) | Decay |
|---|
Back to the lecture: Integral action: Back to 50 Hz, where the text continues after the box of this part.
Continue in Colab, section 2: Paste your runs into MY_RUNS and compare them with the model.
The calculator follows the formulas of the lecture for the chosen gains, after a step of 66 kW. It computes the remaining error of P control and the natural angular frequency and damping ratio of PI control without the lag. It then computes the stability limit of the integral gain with the lag of 0.2 s and the noise of a raw derivative. The figure draws the deviation for the chosen gains, with the lag.
Back to the lecture: Stability: How far the integral may go, where the text continues after the box of this part.
Continue in Colab, section 3: Find the poles and the limit for several integral gains.
The inverter cabinet of the battery has two sections. The open power section holds three power modules with insulated-gate bipolar transistors (IGBT), their heat sinks and fans, the capacitors of the direct-current link and the filter chokes. The closed control section carries a touch panel with the command of the controller, the power of the battery and the limit of 250 kW. The controller runs with Kp = 125 kW/Hz and Ki = 60 kW/(Hz·s). Its proportional and integral terms use the true frequency of the model. The derivative term, when it is switched on, uses the readings of the frequency meter of Week 4, 100 a second with a noise of 25 mHz.
Choose the event, the anti-windup and the derivative below the view and press Run. Your missions: First, trip the wind turbine with the anti-windup off and on, without the derivative, and compare the overshoot and the settling time with the lecture. Second, start the three cars with a derivative of Kd = 40 kW·s/Hz, once with raw and once with filtered readings. Compare the noise of the derivative term with the formula. The noise is measured over the last 10 s of a run. It differs a little from the formula, because each run draws other random readings and the noisy command also moves the frequency itself.
| Run | Event (kW) | Anti-windup | Derivative | Nadir (Hz) | Overshoot (Hz) | Settled (s) | Beyond the limit (s) | Noise of D (kW) |
|---|
Back to the lecture: Saturation and windup, where the text continues after the box of this part.
Continue in Colab, section 4: Paste your runs into MY_TRIPS and compare them with the model.
After the step of 66 kW, a P controller with $K_p = 200$ kW/Hz leaves a deviation: Compute it in Hz to three decimals. A PI controller has $K_p = 125$ kW/Hz and $K_i = 240$ kW/(Hz·s): Compute its damping ratio without the lag to two decimals. Finally, a derivative term of $K_d = 20$ kW·s/Hz is added to $K_p = 125$: Compute the limit of the integral gain with the lag of 0.2 s.
Back to the lecture: The campus microgrid, stage 5: Frequency control by the battery, where the text continues after the box of this part.
Continue in Colab, section 5: Compute the results of stage 5 of the campus microgrid.
The battery inverter of Part C runs with the factory settings of its frequency control. Its menu takes the controller of stage 5 in the units of power engineers: A droop in percent, an integral time and an inertia constant in seconds. The design sheet beside the inverter gives the values in the units of the lecture.
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: The controller as settings of the inverter, 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.