icub-tech-iit / ventilator-FI5

FI5: Rapidly Manufactured Ventilator System
BSD 3-Clause "New" or "Revised" License
31 stars 4 forks source link

Tidal Volume Correction #70

Closed pattacini closed 4 years ago

pattacini commented 4 years ago

This PR adds up the possibility to correct the maximum reached tidal volume (TV) when operating in VCV mode in order to compensate for possible impairments due to flow losses.

Before

The TV setpoint is specified by the user but there wasn't any high-level closed-loop control guaranteeing that the estimated TV max was eventually attaining the setpoint.

What the PI controller ensures is that the flow-rate setpoint stemmed from the TV setpoint is actually achieved via feedback control. However, impairments in the circuit – essentially due to flow losses – can easily prevent from reaching the TV target.

Here's below an example:

g_0 00

The TV setpoint is 0.65 L, but we reached 0.63 L (due to flow losses).

Now

A simple integral action is further applied at the high-level closing the loop over the difference between the TV setpoint and the max TV estimate.

td-correction

The new parameter TV_correction_gain regulates how fast the integral action shall react.

Gain = 0.1 (undercorrection)
g_0 10
Gain = 0.25 (default)
g_0 25
Gain = 0.5 (overcorrection)
g_0 50

Closing remarks

cc @maggia80 @simeonedussoni @marcoaccame