Skip to main content

Data Acquisition and Experimental Analysis with Python

Project description

PYDAQ

PyPI version License python status contributors downloads openissues issuesclosed forks stars

PYDAQ - Data Acquisition and Experimental Analysis with Python

www.pydaq.org


Using Python for applications with experimental data (Arduino and NIDAQ boards)

This package was initially designed to use an experimental device for data acquisition and signal generation when performing different experiments, such as a step-response test. However, from version v0.0.5 onwards, PYDAQ introduced real-time system identification using experimental data. Subsequently, version v0.0.6 expanded the framework with real-time digital filtering and classical control strategies, including PID control with Ziegler–Nichols tuning.

One can use PYDAQ using different boards (check jupyter notebook examples folder), through a Graphical User Interface or via command line.

It is noteworthy that this application makes data acquisition, system identification and empirical experiments simpler, faster and easier. This is relevant when the user needs empirical data to construct black box linear and nonlinear models, commonly used in research projects in forecasting and model-based control schemes.

The code provided here allows the user to save acquired data in .dat files in a path specified by the user (or at Desktop, if no path is provided), as well as send a user-defined data, which can be any nonlinear input signal (you are strongly advised to check the docs)

Core functionalities of PYDAQ include:

  • Data acquisition from Arduino and National Instruments NIDAQ boards
  • Real-time system identification from experimental data
  • Real-time digital filtering (FIR and IIR)
  • Classical control (PID) with Ziegler–Nichols tuning
  • Graphical User Interface (GUI) and command-line workflows

In what follows you will find:

  • Installation and Requirements
  • Quick view and Main features
  • Using Graphical User Interface
  • Screenshots

Installation and Requirements

The fastest way to install PYDAQ is using pip:

pip install pydaq

PYDAQ requires:

  • Driver of the board used (Arduino or National Instruments NIDAQ)
  • nidaqmx (>=0.6.5) for data acquisition from National Instruments Boards
  • matplotlib (>=3.5.3) as a visualization tool
  • numpy (>=1.22.3) to process data
  • PySide6 (>=6.7.1), PySide6_Addons, PySide6_Essentials and shiboken6 as a Graphical User Interface framework
  • pyserial (>=3.5) to manage data to/from Arduino
  • sysidentpy (>=0.4.1) and bitarray (>=3.0.0) for model acquisition/signal generation
  • packaging (>=24.1)
  • scipy (>=1.16.1) for digital filters and PID Control.

NOTE 1: In this version of pydaq (0.0.6.1), (NI-DAQmx drivers) must be installed, even if the user is only using Arduino Boards. This issue will be addressed in future versions, allowing Arduino users to use PYDAQ without having to install NI-DAQmx drivers.

NOTE 2: PYDAQ is fully tested up to Python 3.14. It may run on versions above this, but without guarantees.


Quick view and Main features

Feature Description
Send Data (Arduino/NIDAQ) This feature allows the user to send data through any Arduino/NIDAQ board using a graphical user interface
Get Data (Arduino/NIDAQ) Here the user is able to get data from a(n) Arduino/NIDAQ board (using any terminal configuration - Diff, RSE, NRSE - in NIDAQ case), sample time and other parameters. Acquired data can also be saved and plotted for further applications
Step Response (Arduino/NIDAQ) In this feature one can perform an automatic step response experiment using a(n) Arduino/NIDAQ board. Data generated by the experiment can also be saved to be used in further applications, such as obtaining linear and nonlinear models from acquired data
Get Model (Arduino/NIDAQ) The user can obtain mathematical models experimentally using Arduino/NIDAQ boards, with various customization options available. The input signal is a PRBS, which can be customized to meet specific needs, and both the input and output signals obtained can be saved for future applications. PYDAQ uses SysIdentPy as a backend for obtaining the models.
PID Control (Arduino/NIDAQ) This feature allows the user to perform real-time or simulated PID control using Arduino or NIDAQ boards. The control loop can be configured through a graphical user interface, with support for selecting controller type (P, PI, PD, PID). Simulated system control is also supported for testing purposes.
Digital Filters (Arduino/NIDAQ) This feature enables real-time implementation of IIR and FIR filters using Arduino or NIDAQ boards. Users can define the filter parameters, and the filter will be applied directly to the acquired data.

Additionally, PYDAQ provides a benchmarking tool to estimate the maximum reliable sampling frequency supported by the user’s system. This is particularly useful for real-time and high-speed data acquisition experiments. Further details are available in the documentation at https://pydaq.org/benchmarking/.


Using GUI (more details in documentation and jupyter notebook examples):

All functionalities for all boards are incorporated in one single window.

Launching the GUI:

from pydaq.pydaq_global import PydaqGui

PydaqGui()

Further details can be found in documentation.


Screenshots (v0.0.6)


Contributing

You are more than welcome to make your contribution and submit a pull request. To contribute, read this guide.


CITATION

DOI

This is the seminal publication of the PYDAQ project and must be cited in any work that uses PYDAQ.

@article{Martins_PYDAQ_Data_Acquisition_2023,
  author  = {Martins, Samir Angelo Milani},
  doi     = {10.21105/joss.05662},
  journal = {Journal of Open Source Software},
  month   = dec,
  number  = {92},
  pages   = {5662},
  title   = {{PYDAQ: Data Acquisition and Experimental Analysis with Python}},
  url     = {https://joss.theoj.org/papers/10.21105/joss.05662},
  volume  = {8},
  year    = {2023}
}

Additional related publications that contributed to the development of PYDAQ are available in the papers directory.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pydaq-0.0.6.1.tar.gz (79.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pydaq-0.0.6.1-py3-none-any.whl (543.4 kB view details)

Uploaded Python 3

File details

Details for the file pydaq-0.0.6.1.tar.gz.

File metadata

  • Download URL: pydaq-0.0.6.1.tar.gz
  • Upload date:
  • Size: 79.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for pydaq-0.0.6.1.tar.gz
Algorithm Hash digest
SHA256 3abf17fd6e87a3dd5a48f273f9ab48f8f75e9d73657a9195cb78e5e0a4bcacbc
MD5 d41ebccbe2d9c2cb7b580092aebbf331
BLAKE2b-256 9fa06381b4e1dc27bff53258511303f61f1927d6441abaaef6ced3fe0dd94165

See more details on using hashes here.

File details

Details for the file pydaq-0.0.6.1-py3-none-any.whl.

File metadata

  • Download URL: pydaq-0.0.6.1-py3-none-any.whl
  • Upload date:
  • Size: 543.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for pydaq-0.0.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2498c4691386bc04bcd13cdaa6dc3964b21961bcf2523cfbe9a2b0348538855f
MD5 bad8a5771d162a1f9cc71347bb819f25
BLAKE2b-256 8acae68140061c6ffa156b8d12ccec301396bb45b4e6425f66cb59d974cab2d8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page