Skip to main content

Python program for digital control-loops.

Project description

NQontrol Servo Controller

pipeline status coverage report Code style: black

NQontrol is a Python project aiming the replacement of analog PID controllers in the lab.

The project is a solution based on the ADwin real-time platform that is able to deliver in excess of 8 simultaneous locking loops running with 200 kHz sampling frequency, and offers five second-order filtering sections per channel for optimal control performance. It can be used up to a control bandwidth of about 12 kHz. This Python package, together with a web-based GUI, makes the system easy to use and adapt for a wide range of control tasks in quantum-optical experiments.

The source code can be found on GitLab.

Read the latest changes in our changelog.

Paper Version

A fixed state of this project is version 1.1. The publicated paper about this project is available here. The preprint version of the paper describing can be found on arXiv.

Usage Example

Here is a short example for the Python API (see the full example in the docs):

# Importing a ServoDevice is enough
from nqontrol import ServoDevice

# Create a new servo device object, connecting to ADwin with the device number 0.
# Number 0 is reserved for a virtual mock device for testing.
sd = ServoDevice(0)

# Print the timestamp
print(f'Uptime {sd.timestamp}s')

# Get a servo object to control it.
s = sd.servo(1)

# Enable in and output
s.inputSw = True
s.outputSw = True

# Run a threshold analysis for locking
# Enable the autolock

Graphical User Interface

NQontrol can also be used with a responsive graphical user interface that runs in a browser (more details in the docs):

NQontrol GUI

Autolock Feature

An autolock feature makes it simple to lock all the control loops. It scans the output until a threshold value of the aux signal is reached, then it activates the lock.


For more information please read the online documentation:

NQontrol Installation

It's as simple as

pip install nqontrol

But additionally you need to install the ADwin library. For complete installation instructions please refer to the documentation page.


If you want to make changes for yourself or contribute to the project, take a look on this page to see how to setup the environment.

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

nqontrol-1.2.1.tar.gz (178.2 kB view hashes)

Uploaded source

Built Distribution

nqontrol-1.2.1-py3-none-any.whl (195.9 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page