Skip to content

Commit

Permalink
finishing restructuring docs, testing on rtd
Browse files Browse the repository at this point in the history
  • Loading branch information
sneakers-the-rat committed Dec 22, 2021
1 parent 96be662 commit 11a3639
Show file tree
Hide file tree
Showing 9 changed files with 52 additions and 172 deletions.
120 changes: 0 additions & 120 deletions _docs/example_markdown.md

This file was deleted.

12 changes: 6 additions & 6 deletions _docs/hardware/electronics.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Electronics
=============

.. figure:: /images/electronics_diagram.png
.. figure:: /assets/images/electronics_diagram.png
:align: center
:figwidth: 75%
:width: 75%
Expand All @@ -21,7 +21,7 @@ The main power to the systems is supplied by a DIN rail-mounted 150W 24V supply,
This power is transmitted across the PCBs through the stacked headers when required.

.. csv-table:: Power and I/O bill of materials
:file: assets/csv/powerio_bom.csv
:file: /assets/csv/powerio_bom.csv
:widths: 40,60
:header-rows: 1

Expand All @@ -38,15 +38,15 @@ A set of additional header pins allows for digital output sensors (such as the S

* :download:`Sensor PCB - [KiCad project .zip] <../assets/pcbs/pressure-rev2.zip>`

.. figure:: /images/pressure_rev2_schematic_image.png
.. figure:: /assets/images/pressure_rev2_schematic_image.png
:align: center
:figwidth: 100%
:width: 100%

Sensor PCB schematic

.. csv-table:: Sensor PCB bill of materials
:file: assets/csv/sensor_pcb_bom.csv
:file: /assets/csv/sensor_pcb_bom.csv
:widths: 10,30,60
:header-rows: 1

Expand All @@ -59,15 +59,15 @@ The purpose of the actuator board is twofold:

* :download:`Actuator PCB - [KiCad project .zip] <../assets/pcbs/actuators-rev2.zip>`

.. figure:: /images/actuators_rev2_schematic_image.png
.. figure:: /assets/images/actuators_rev2_schematic_image.png
:align: center
:figwidth: 100%
:width: 100%

Actuator PCB schematic

.. csv-table:: Actuator PCB bill of materials
:file: assets/csv/actuator_pcb_bom.csv
:file: /assets/csv/actuator_pcb_bom.csv
:widths: 10,30,60
:header-rows: 1

Expand Down
7 changes: 2 additions & 5 deletions _docs/hardware/hardware_overview.rst
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
Hardware Overview
==================

.. raw:: html
:file: /images/schematic_v2.svg

Schematic diagram of main mechanical components
Schematic diagram of main mechanical components

The PVP components were selected to enable a **minimalistic and relatively low-cost ventilator design**, to avoid supply chain limitations, and to facilitate rapid and easy assembly. Most parts in the PVP are not medical-specific devices, and those that are specialized components are readily available and standardized across ventilator platforms, such as standard respiratory circuits and HEPA filters. We provide complete assembly of the PVP, including 3D-printable components, as well as justifications for selecting all actuators and sensors, as guidance to those who cannot source an exact match to components used in the Bill of Materials.


.. figure:: /images/Schematic_v2.svg
.. figure:: /assets/images/Schematic_v2.svg
:align: center
:figwidth: 100%
:width: 100%
Expand Down
5 changes: 3 additions & 2 deletions _docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ An inexpensive proportional valve controls inspiratory flow, and a relay valve c
A gauge pressure sensor monitors airway pressure, and an inexpensive D-lite spirometer used in conjunction with a differential pressure sensor monitors expiratory flow.

.. raw:: html

<object type="image/svg+xml" data="assets/images/Schematic_v2.svg">
Hardware schematic for People's Ventilator Project
</object>
Expand All @@ -52,7 +53,7 @@ The modularity of this system enables individual boards to be revised or modifie
Software
========

.. image:: /images/gui_overview_v1_1920px.png
.. image:: /assets/images/gui_overview_v1_1920px.png
:width: 100%
:alt: Gui Overview - modular design, alarm cards, multiple modalities of input, alarm limits represented consistently across ui

Expand Down Expand Up @@ -128,7 +129,7 @@ PVP Modules
Index <meta_index>

Medical Disclaimer
========
===================
PVP1 is not a regulated or clinically validated medical device. We have not yet performed testing for safety or efficacy on living organisms. All material described herein should be used at your own risk and do not represent a medical recommendation. PVP1 is currently recommended only for research purposes.

This website is not connected to, endorsed by, or representative of the view of Princeton University. Neither the authors nor Princeton University assume any liability or responsibility for any consequences, damages, or loss caused or alleged to be caused directly or indirectly for any action or inaction taken based on or made in reliance on the information or material discussed herein or linked to from this website.
Expand Down
24 changes: 12 additions & 12 deletions _docs/overview/overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ The **People's Ventilator Project (PVP)** is an open-source, low-cost pressure-c
.. raw:: html

<video width="100%" autoplay loop>
<source src="images/ventilator_rotate.mp4" type="video/mp4">
<source src="/images/ventilator_rotate.mp4" type="video/mp4">
Video of a rotating ventilator
</video>

Hardware
--------

.. raw:: html
:file: /images/schematic_v2.svg
:file: /assets/images/Schematic_v2.svg

The device components were selected to enable a **minimalistic and relatively low-cost ventilator design,
to avoid supply chain limitations, and to facilitate rapid and easy assembly**.
Expand All @@ -30,17 +30,17 @@ _____________
.. raw:: html

<div class="software-summary">
<a href="components.html"><h2>Components</h2></a> <p>Justifcation behind the components actuators and sensors selected for the PVP.</p>
<a href="assembly.html"><h2>Assembly</h2></a> <p>Solidworks model of the system assembly, description of enclosure, and models for 3D printed components.</p>
<a href="electronics.html"><h2>Electronics</h2></a> <p>Modular PCBs that interface the PVP actuators and sensors with the Raspberry Pi.</p>
<a href="bom.html"><h2>Bill of Materials</h2></a> <p>Itemized PVP parts list.</p>
<a href="../hardware/components.html"><h2>Components</h2></a> <p>Justifcation behind the components actuators and sensors selected for the PVP.</p>
<a href="../hardware/assembly.html"><h2>Assembly</h2></a> <p>Solidworks model of the system assembly, description of enclosure, and models for 3D printed components.</p>
<a href="../hardware/electronics.html"><h2>Electronics</h2></a> <p>Modular PCBs that interface the PVP actuators and sensors with the Raspberry Pi.</p>
<a href="../hardware/bom.html"><h2>Bill of Materials</h2></a> <p>Itemized PVP parts list.</p>
</div>


Software
--------

.. image:: /images/gui_overview_v1_1920px.png
.. image:: /assets/images/gui_overview_v1_1920px.png
:width: 100%
:alt: Gui Overview - modular design, alarm cards, multiple modalities of input, alarm limits represented consistently across ui

Expand All @@ -65,9 +65,9 @@ ____________
.. raw:: html

<div class="software-summary">
<a href="gui.html"><h2>GUI</h2></a> <p>A modular GUI with intuitive controls and a clear alarm system that can be configured to control any parameter or display values from any sensor.</p>
<a href="controller.html"><h2>Controller</h2></a> <p>A PID Controller to produce a pressure-controlled waveform, while monitoring for possible alarm states.</p>
<a href="io.html"><h2>IO</h2></a> <p>A hardware abstraction layer powered by <a href="http://abyz.me.uk/rpi/pigpio/">pigpio</a> that can read/write at [x Hz]</p>
<a href="alarm.html"><h2>Alarm</h2></a> <p>Define complex and responsive alarm triggering criteria with human-readable Alarm Rules</p>
<a href="common.html"><h2>Common</h2><a> <p>Modules that provide the API between the GUI and controller, user preferences, and other utilities</p>
<a href="../software/gui/index.html"><h2>GUI</h2></a> <p>A modular GUI with intuitive controls and a clear alarm system that can be configured to control any parameter or display values from any sensor.</p>
<a href="../software/controller.html"><h2>Controller</h2></a> <p>A PID Controller to produce a pressure-controlled waveform, while monitoring for possible alarm states.</p>
<a href="../software/io.html"><h2>IO</h2></a> <p>A hardware abstraction layer powered by <a href="http://abyz.me.uk/rpi/pigpio/">pigpio</a> that can read/write at [x Hz]</p>
<a href="../software/alarm.html"><h2>Alarm</h2></a> <p>Define complex and responsive alarm triggering criteria with human-readable Alarm Rules</p>
<a href="../software/common.html"><h2>Common</h2><a> <p>Modules that provide the API between the GUI and controller, user preferences, and other utilities</p>
</div>
32 changes: 17 additions & 15 deletions _docs/overview/performance.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Performance
=================

.. figure:: /images/single_waveform.png
.. figure:: /assets/images/single_waveform.png
:align: center
:figwidth: 100%
:width: 100%
Expand All @@ -15,14 +15,16 @@ performance for midpoint settings: C=20 mL/cm H2O, R=20 cm H2O/L/s, PIP=30 cm H2
PIP is reached within a 300 ms ramp period, then holds for the PIP plateau with minimal fluctuation
of airway pressure for the remainder of the inspiratory cycle (blue). One the expiratory valve opens,
exhalation begins and expiratory flow is measured (orange) as the airway pressure drops to PEEP and remains
there for the rest of the PEEP period.
there for the rest of the PEEP period.

.. figure:: /images/tune_waveform.png
.. figure:: /assets/images/tune_waveform.png
:align: center
:figwidth: 100%
:width: 100%

Demonstration of waveform tuning via flow adjustment. If desired, the operator can increase the flow setting through the system GUI to decrease the pressure ramp time. Test settings: compliance C=20 mL/cm H2O, airway resistance R=20 cm H2O/L/s, PIP=30 cm H2O, PEEP=5 cm H2O.
Demonstration of waveform tuning via flow adjustment.
If desired, the operator can increase the flow setting through the system GUI to decrease the pressure ramp time.
Test settings: compliance C=20 mL/cm H2O, airway resistance R=20 cm H2O/L/s, PIP=30 cm H2O, PEEP=5 cm H2O.

Some manual adjustment of the pressure waveforms may be warranted depending on the patient, and such adjustment is permitted through a user flow adjustment setting. This flow adjustment setting allows the user to increase the maximum flow rate during the ramp cycle to inflate lungs with higher compliance. The flow setting can be readily changed from the GUI and the control system immediately adapts to the user's input. An example of this flow adjustment is shown in the figure above for four breath cycles. While all cycles reach PIP, the latter two have a higher mean airway pressure, which may be more desirable under certain conditions than the lower mean airway pressure of the former two.

Expand All @@ -37,60 +39,60 @@ For each configuration the following parameters are listed: the test number (fro
the compliance (C, mL/cm H2O), linear resistance (R, cm H2O/L/s), respiratory frequency (f, breaths/min), peak inspiratory pressure (PIP, cm H2O), positive end-expiratory pressure (PEEP, cm H2O), and flow adjustment setting.

.. csv-table:: Standard test battery from Table 201.105 in ISO 80601-2-80-2018 for pressure controlled ventilators
:file: assets/csv/eua_test.csv
:file: /assets/csv/eua_test.csv
:widths: 3,5,5,5,5,5,5,5,5
:header-rows: 1

.. figure:: /images/waveform_battery_500mL.png
.. figure:: /assets/images/waveform_battery_500mL.png
:align: center
:figwidth: 100%
:width: 100%

Performance results of the ISO 80601-2-80-2018 pressure controlled ventilator standard tests with an intended delivered tidal volume of 500 mL. For each configuration the following parameters are listed: the test number (from table 201.105 in the ISO standard), the compliance (C, mL/cm H2O), linear resistance (R, cm H2O/L/s), respiratory frequency (f, breaths/min), peak inspiratory pressure (PIP, cm H2O), positive end-expiratory pressure (PEEP, cm H2O), and flow adjustment setting. PIP is reached in every test condition except for case 2, which is approximately 2.4 cm H2O below the set point.
Performance results of the ISO 80601-2-80-2018 pressure controlled ventilator standard tests with an intended delivered tidal volume of 500 mL. For each configuration the following parameters are listed: the test number (from table 201.105 in the ISO standard), the compliance (C, mL/cm H2O), linear resistance (R, cm H2O/L/s), respiratory frequency (f, breaths/min), peak inspiratory pressure (PIP, cm H2O), positive end-expiratory pressure (PEEP, cm H2O), and flow adjustment setting. PIP is reached in every test condition except for case 2, which is approximately 2.4 cm H2O below the set point.

.. figure:: /images/waveform_battery_300mL.png
.. figure:: /assets/images/waveform_battery_300mL.png
:align: center
:figwidth: 100%
:width: 100%

Performance results of the ISO 80601-2-80-2018 pressure controlled ventilator standard tests with an intended delivered tidal volume of 300 mL. For each configuration the following parameters are listed: the test number (from table 201.105 in the ISO standard), the compliance (C, mL/cm H2O), linear resistance (R, cm H2O/L/s), respiratory frequency (breaths/min), peak inspiratory pressure (PIP, cm H2O), positive end-expiratory pressure (PEEP, cm H2O), and flow adjustment setting. PIP is reached in every test condition.
Performance results of the ISO 80601-2-80-2018 pressure controlled ventilator standard tests with an intended delivered tidal volume of 300 mL. For each configuration the following parameters are listed: the test number (from table 201.105 in the ISO standard), the compliance (C, mL/cm H2O), linear resistance (R, cm H2O/L/s), respiratory frequency (breaths/min), peak inspiratory pressure (PIP, cm H2O), positive end-expiratory pressure (PEEP, cm H2O), and flow adjustment setting. PIP is reached in every test condition.

These tests cover an array of conditions,
and more difficult test cases involve a high airway pressure coupled with a low lung compliance (case nos. 8 and 9).
Under these conditions, if the inspiratory flow rate during the ramp phase is too high,
the high airway resistance will produce a transient spike in airway pressure which can greatly overshoot the PIP value.
For this reason, the system uses a low initial flow setting and allows the clinican to increase the flow rate if necessary.

.. figure:: /images/tidal_volumes.png
.. figure:: /assets/images/tidal_volumes.png
:align: center
:figwidth: 100%
:width: 100%

Tidal volume performance for the ISO 80601-2-80-2018 pressure controlled ventilator standard tests, averaged across 30 breath cycles for each condition.
Tidal volume performance for the ISO 80601-2-80-2018 pressure controlled ventilator standard tests, averaged across 30 breath cycles for each condition.

The PVP integrates expiratory flow to monitor the tidal volume, which is not directly set in pressure controlled ventilation, but is an important parameter. Of the test conditions in the ISO standard, four that we tested intended a nominal delivered tidal volume of 500 mL, three intended 300 mL, and one intended 200 mL. For most cases, the estimated tidal volume has a tight spread clustered within 20% of the intended value.

Breath Detection
------------------

.. figure:: /images/spontaneous_breath.png
.. figure:: /assets/images/spontaneous_breath.png
:align: center
:figwidth: 100%
:width: 100%

Spontaneous breath detection.
Spontaneous breath detection.

A patient-initiated breath after exhalation will result in a momentary drop in PEEP. PVP may optionally detect these transient decreases to trigger a new pressure-controlled breath cycle. We tested this functionality by triggering numerous breaths out of phase with the intended inspiratory cycle, using a QuickTrigger (IngMar Medical, Pittsburgh, PA) to momentarily open the test lung during PEEP and simulate this transient drop of pressure.

High Pressure Detection
--------------------------

.. figure:: /images/hapa_demonstration.png
.. figure:: /assets/images/hapa_demonstration.png
:align: center
:figwidth: 100%
:width: 100%

High pressure alarm demonstration.
High pressure alarm demonstration.

Above is a demonstration of the PVP's high airway pressure alarm (HAPA). An airway blockage results in a high airway pressure (above 60 cm H2O) that the system corrects within ~500 ms.
Test settings: compliance C=20 mL/cm H2O, airway resistance R=20 cm H2O/L/s, PIP=30 cm H2O, PEEP=5 cm H2O.
6 changes: 3 additions & 3 deletions _docs/software/controller.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ Controller


Purpose of the Controller
----------
---------------------------

.. image:: /images/single_waveform.png
.. image:: /assets/images/single_waveform.png
:width: 100%
:alt: Raw data for a single breath; blue is pressure and orange is flow-out.

Expand All @@ -24,7 +24,7 @@ In addition to this core function, the controller module continuously monitors f
The final functionality of the control module is the estimation of VTE (VTE stands for exhaled tidal volume), which is thee volume of air that made it in- and out of the lung. We estimate this number by integrating the expiratory flow during expiration, and subtracting the baseline flow used to sustain PEEP (details in the accompanying manuscript):

Architecture of the Controller
----------
--------------------------------

In terms of software components, the Controller consists of one main :class:`~.pvp.controller` class, that is instantiated in its own thread. This object receives sensor-data from HAL, and computes control parameters, to change the mechanical position of valves. The Controller also receives ventilation control parameters (see :meth:`~.PVP_Gui.set_control`). All exchanged variables are mutex'd.

Expand Down

0 comments on commit 11a3639

Please sign in to comment.