Check out this header-only C++11 library of control and filter tools. Currently it features PID control, bi-quads (or second-order-sections), state-space systems and a PRBS (pseudo-random-binary-signal) system identification function.
The code-documentation and tests provide reference and example to use the library. Creating a second order floating-point state-space is easy:
Previously I used Atmel Studio 7 to do AVR development. This integrated development environment is unsurpassed in terms of ease of use and features for AVR development. However, it is Windows only. I grew tired of the hassle with virtual machines and dual boot setups as my working device is a Mac running Mac OS 10.12. I already used some JetBrains products for C/C++ and PHP development so I wanted to try to get the whole AVR toolchain working on Mac OS in combination with JetBrains CLion.
To serve as a suitable alternative to Atmel Studio I need both compilation, uploading and debugging to integrate nicely with CLion. Furthermore, I wanted to be able to use the Atmel Software Framework to have access to an enormous resource of services, drivers and examples.
Controllers and filters are often a good way to stabilise a system, condition a signal or make a system follow a reference. The usual approach is to model the system or signal in an application like MATLAB and then design a filter or controller. Either by applying design rules, some sort of optimisation algorithm or tuning parameters experimentally. When the design is finished the controller or filter is not ready for use yet. It is still necessary to realise it in practice. This is often done digitally on a micro controller or real-time computer. This article will describe a effective, open and fast approach to realising a filter or controller in C++.
I like to share with you my C implementation for estimating the DecaWave transmission time because it has been created with help from the community and thus should be shared with it.
The DecaWave DW1000 is a versatile ultra-wideband transceiver that enables long range and fast communication. Due to its wide spectral width it is able to occupy a very narrow temporal with. Precise time-stamping then allows for estimating the time-of-flight which in turn can be used for determining the distance between two nodes.