Difference between revisions of "Team:UGent Belgium/Software"

(big bang commit)
m (Removed spaces after anchors)
Line 14: Line 14:
 
<h2 id="humidistat">Humidistat</h2>
 
<h2 id="humidistat">Humidistat</h2>
  
<p>For the humidistat, several software modules were and are being developed in Python by our team. The modules are licensed under the <a href="https://opensource.org/licenses/MIT">MIT license</a> and are published on <a href="https://github.com/Dewpal">Github</a>. We strongly encourage the redistribution and reuse of our software.</p>
+
<p>For the humidistat, several software modules were and are being developed in Python by our team. The modules are licensed under the <a href="https://opensource.org/licenses/MIT" style="margin-right: 0px; padding-right: 0px">MIT license</a> and are published on <a href="https://github.com/Dewpal" style="margin-right: 0px; padding-right: 0px">Github</a>. We strongly encourage the redistribution and reuse of our software.</p>
  
 
<h3 id="sensor-logging-and-data-streaming">Sensor logging and data streaming</h3>
 
<h3 id="sensor-logging-and-data-streaming">Sensor logging and data streaming</h3>
  
<p>To communicate with the DHT humidity/temperature sensor our team makes use of the <a href="https://github.com/adafruit">Adafruit libraries</a>. For both the <a href="https://github.com/Dewpal/Humidistat/blob/master/DHT11.py">DHT11</a> and <a href="https://github.com/Dewpal/Humidistat/blob/master/DHT22.py">DHT22</a> sensor, a Python script was developed to measure and broadcast the humidity during a predefined timeframe. The measurements are stored in a <a href="http://pandas.pydata.org/">Pandas</a> dataframe and are streamed to the web using <a href="https://plot.ly/">plotly</a>.</p>
+
<p>To communicate with the DHT humidity/temperature sensor our team makes use of the <a href="https://github.com/adafruit" style="margin-right: 0px; padding-right: 0px">Adafruit libraries</a>. For both the <a href="https://github.com/Dewpal/Humidistat/blob/master/DHT11.py" style="margin-right: 0px; padding-right: 0px">DHT11</a> and <a href="https://github.com/Dewpal/Humidistat/blob/master/DHT22.py" style="margin-right: 0px; padding-right: 0px">DHT22</a> sensor, a Python script was developed to measure and broadcast the humidity during a predefined timeframe. The measurements are stored in a <a href="http://pandas.pydata.org/" style="margin-right: 0px; padding-right: 0px">Pandas</a> dataframe and are streamed to the web using <a href="https://plot.ly/" style="margin-right: 0px; padding-right: 0px">plotly</a>.</p>
  
 
<h3 id="closed-loop-control">Closed-loop control</h3>
 
<h3 id="closed-loop-control">Closed-loop control</h3>
  
<p>The actions of a humidifier are controlled by means of a closed-loop control system implemented on a <a href="https://2016.igem.org/Team:UGent_Belgium/Hardware">Raspberry Pi</a> microprocessor. Our team developed a <a href="https://github.com/Dewpal/Humidistat/blob/master/bangBangController.py">multithreading Python framework</a> for the simultaneous control and monitoring of the Dewpal <a href="https://2016.igem.org/Team:UGent_Belgium/Demonstrate">experiments</a>. The generic nature of these scripts facilitates the application to other single-input single-output systems and opens the door for the development of other low-cost control systems.</p>
+
<p>The actions of a humidifier are controlled by means of a closed-loop control system implemented on a <a href="https://2016.igem.org/Team:UGent_Belgium/Hardware" style="margin-right: 0px; padding-right: 0px">Raspberry Pi</a> microprocessor. Our team developed a <a href="https://github.com/Dewpal/Humidistat/blob/master/bangBangController.py" style="margin-right: 0px; padding-right: 0px">multithreading Python framework</a> for the simultaneous control and monitoring of the Dewpal <a href="https://2016.igem.org/Team:UGent_Belgium/Demonstrate" style="margin-right: 0px; padding-right: 0px">experiments</a>. The generic nature of these scripts facilitates the application to other single-input single-output systems and opens the door for the development of other low-cost control systems.</p>
  
<p>This framework uses the above-mentioned sensor logging and streaming module to gather the environmental data. These actions are incorporated in a sensor class which works well with Adafruit sensor software interfaces but the inclusion of other sensors is straightforward. This class measures the humidity and temperature with a predetermined frequency and writes these measurements to a .csv file, this information is also passed to the controller class. The controller class implements the actual on-off controller, regulating the humidifier; the humidifier is activated when the humidity drops below the setpoint. Due to short dead time and fast dynamics of the <a href="https://2016.igem.org/Team:UGent_Belgium/Hardware">system</a>, such a simple controller gives rise to good results.</p>
+
<p>This framework uses the above-mentioned sensor logging and streaming module to gather the environmental data. These actions are incorporated in a sensor class which works well with Adafruit sensor software interfaces but the inclusion of other sensors is straightforward. This class measures the humidity and temperature with a predetermined frequency and writes these measurements to a .csv file, this information is also passed to the controller class. The controller class implements the actual on-off controller, regulating the humidifier; the humidifier is activated when the humidity drops below the setpoint. Due to short dead time and fast dynamics of the <a href="https://2016.igem.org/Team:UGent_Belgium/Hardware" style="margin-right: 0px; padding-right: 0px">system</a>, such a simple controller gives rise to good results.</p>
  
 
<p>To facilitate the simultaneous control and data-acquisition on a single-core microprocessor such as the Raspberry Pi, a multithreading layout is used so that the sensor and controller class can run concurrently. Although the sampling rate is different for the sensor and controller, this multithreading framework allows for an elegant implementation of this controller.</p>
 
<p>To facilitate the simultaneous control and data-acquisition on a single-core microprocessor such as the Raspberry Pi, a multithreading layout is used so that the sensor and controller class can run concurrently. Although the sampling rate is different for the sensor and controller, this multithreading framework allows for an elegant implementation of this controller.</p>
Line 30: Line 30:
 
<h3 id="system-identification-building-a-virtual-humidistat">System identification: building a virtual humidistat</h3>
 
<h3 id="system-identification-building-a-virtual-humidistat">System identification: building a virtual humidistat</h3>
  
<p>Lastly, in order to test the controller software or to perform the tuning of the controller in-silico without the need to constantly perform physical experiments with the humidistat, a Python script was developed for system identification. This script reads a sequence of humidifier values ('on'/'off') and imposes them on the system. Hence, various excitation signals such as pseudo-random binary signals can be used to develop a mathematical model of the humidistat. This &quot;virtual humidistat&quot; can be used to speed up the development of the hardware and software of this system. Due to time constraints, an elaborate system identification of our humidistat has not yet been achieved Nevertheless, the Python scripts are developed, tested and available on the <a href="https://github.com/Dewpal/Humidistat">Github repository</a>.</p>
+
<p>Lastly, in order to test the controller software or to perform the tuning of the controller in-silico without the need to constantly perform physical experiments with the humidistat, a Python script was developed for system identification. This script reads a sequence of humidifier values ('on'/'off') and imposes them on the system. Hence, various excitation signals such as pseudo-random binary signals can be used to develop a mathematical model of the humidistat. This &quot;virtual humidistat&quot; can be used to speed up the development of the hardware and software of this system. Due to time constraints, an elaborate system identification of our humidistat has not yet been achieved Nevertheless, the Python scripts are developed, tested and available on the <a href="https://github.com/Dewpal/Humidistat" style="margin-right: 0px; padding-right: 0px">Github repository</a>.</p>
  
 
<h2 id="computer-aided-design-wip">Computer-aided design (WIP)</h2>
 
<h2 id="computer-aided-design-wip">Computer-aided design (WIP)</h2>
  
<p>Autodesk fusion 360 is used for the 3D design of the Dewpal water collectors. The CAD files of the various Dewpal designs are available on the wiki. These files are parametrised and facilitate the creation of new Dewpal's in all sizes and shapes. The most important landmark CAD files can be downloaded from the respective <a href="https://github.com/Dewpal/CAD">Github repository</a>.</p>
+
<p>Autodesk fusion 360 is used for the 3D design of the Dewpal water collectors. The CAD files of the various Dewpal designs are available on the wiki. These files are parametrised and facilitate the creation of new Dewpal's in all sizes and shapes. The most important landmark CAD files can be downloaded from the respective <a href="https://github.com/Dewpal/CAD" style="margin-right: 0px; padding-right: 0px">Github repository</a>.</p>
  
  

Revision as of 20:36, 17 October 2016

Bootstrap 101 Template



Software

The software part of the Dewpal is subdivided into two parts, the development of the controlled environment (humidistat) to evaluate the water collection capabilities of the water collectors and the computer-aided design (CAD) of the shape.

Humidistat

For the humidistat, several software modules were and are being developed in Python by our team. The modules are licensed under the MIT license and are published on Github. We strongly encourage the redistribution and reuse of our software.

Sensor logging and data streaming

To communicate with the DHT humidity/temperature sensor our team makes use of the Adafruit libraries. For both the DHT11 and DHT22 sensor, a Python script was developed to measure and broadcast the humidity during a predefined timeframe. The measurements are stored in a Pandas dataframe and are streamed to the web using plotly.

Closed-loop control

The actions of a humidifier are controlled by means of a closed-loop control system implemented on a Raspberry Pi microprocessor. Our team developed a multithreading Python framework for the simultaneous control and monitoring of the Dewpal experiments. The generic nature of these scripts facilitates the application to other single-input single-output systems and opens the door for the development of other low-cost control systems.

This framework uses the above-mentioned sensor logging and streaming module to gather the environmental data. These actions are incorporated in a sensor class which works well with Adafruit sensor software interfaces but the inclusion of other sensors is straightforward. This class measures the humidity and temperature with a predetermined frequency and writes these measurements to a .csv file, this information is also passed to the controller class. The controller class implements the actual on-off controller, regulating the humidifier; the humidifier is activated when the humidity drops below the setpoint. Due to short dead time and fast dynamics of the system, such a simple controller gives rise to good results.

To facilitate the simultaneous control and data-acquisition on a single-core microprocessor such as the Raspberry Pi, a multithreading layout is used so that the sensor and controller class can run concurrently. Although the sampling rate is different for the sensor and controller, this multithreading framework allows for an elegant implementation of this controller.

System identification: building a virtual humidistat

Lastly, in order to test the controller software or to perform the tuning of the controller in-silico without the need to constantly perform physical experiments with the humidistat, a Python script was developed for system identification. This script reads a sequence of humidifier values ('on'/'off') and imposes them on the system. Hence, various excitation signals such as pseudo-random binary signals can be used to develop a mathematical model of the humidistat. This "virtual humidistat" can be used to speed up the development of the hardware and software of this system. Due to time constraints, an elaborate system identification of our humidistat has not yet been achieved Nevertheless, the Python scripts are developed, tested and available on the Github repository.

Computer-aided design (WIP)

Autodesk fusion 360 is used for the 3D design of the Dewpal water collectors. The CAD files of the various Dewpal designs are available on the wiki. These files are parametrised and facilitate the creation of new Dewpal's in all sizes and shapes. The most important landmark CAD files can be downloaded from the respective Github repository.