Projects Test Bench - System Identification
Post
Cancel
MULTI-ROBOT

Test Bench - System Identification

System identification [COELHO, 2004] is a general term used to describe mathematical tools and algorithms that allow building dynamic models from measured data. A system can be identified through physical equations (called white-box modeling), without prior knowledge of the model (black-box modeling), or using a method that is a middle ground between the two, called gray-box modeling. For identifying the actuator model to be used in the Bbot project, we will use black-box modeling.

3D Model

The Bbot model uses torque as the actuation signal for the wheels, but the Bbot actuator (Dynamixel xm430 w210) uses a PWM signal as input. To convert between these, a test bench was created, where a PWM signal is sent to the motor and a load cell measures the resulting torque.

With this setup, the bench was modeled to allow for these measurements. Below are detailed images of the final bench model.

testbench-parts Test bench in exploded view.

The final bench includes a HUB that supports Dynamixel actuators. Attached to the bench is a 7’’ touchscreen display for the Raspberry Pi 4, allowing the bench to operate autonomously without an external computer. The rendered final model can be seen below.

testbench-final Test bench rendering.

The bench can be easily modified to fit other actuator models; simply copy the model made in Onshape from this LINK and make the desired changes. Below is the Dynamixel MX-106 motor also mounted on the bench.

testbench-parts Test bench.

With the 3D model of the bench completed, we move on to modeling the system identification program.

System Identification

System identification is divided into several steps, described below:

Data Collection

With the test bench assembled, a step signal is sent to the actuator. The actuator, with the HUB attached, applies force to the load cell. The program then saves a file (dataset) with the input signal, output signal, and the elapsed time for each test signal.

testbench-parts Data collection.

Data Processing and Refinement

With the collected data, we use a Python program (LINK) for the next steps. To start refining, we calculate the system signal by subtracting the mean from the torque values.

signal = torque - np.mean(torque)

Next, we compute the discrete Fourier transform using the numpy library (LINK). The function np.fft.fft computes the one-dimensional discrete Fourier transform (DFT) using the Fast Fourier Transform (FFT) algorithm.

testbench-parts Output Signal FFT.

We then use the FIR filter, a type of digital filter characterized by an impulse response that becomes zero after a finite time [OLIVEIRA, 2007]. Using lfilter, we filter a data sequence x with a digital filter. For more on the filter, see LINK.

Finally, we cut off signals with values below 0, resulting in the following signal:

testbench-parts Output Torque Filtered.

Model

After these steps, we use the SIPPY library to identify the system. The main goal of this code is to provide different identification methods to build linear models of dynamic systems. For this, we use its internal ARX model (Autoregressive with Extra Input) [RIBEIRO]. The resulting first-order model is:

$$ \frac{0.0006618}{z - 0.8444}, dt = 0.0125 $$

Results

The 3D project was successfully assembled, resulting in a test bench with its own autonomy for collecting black-box models. The final assembled test bench can be seen below.

testbench-parts Model Assembled.

The final model allowed us to control the Bbot correctly, as shown in the control post (LINK). The figure below shows the input torque signal in orange and the identified model from the test bench in blue.

testbench-parts Output Model.

To download the test bench code, go to the github link and follow the steps in the Readme.

Author


References

  1. COELHO, Antonio Augusto Rodrigues; DOS SANTOS COELHO, Leandro. Identificação de sistemas dinâmicos lineares. 2004.
  2. OLIVEIRA, EEC; CORREIA, SEN; MENDONÇA, L. M. Implementação do filtro de resposta finita (FIR) não recursivo através do método das janelas. In: II CONGRESSO DE PESQUISA E INOVAÇÃO DA REDE NORTE NORDESTE DE EDUCAÇÃO TECNOLÓGICA. 2007.
  3. RIBEIRO, David A. et al. Validação de modelo linear ARX com base em métodos clássicos de identificação.
  • The original post was published on braziliansinrobotics, which is a project of the Brazilian Institute of Robotics (BIR). The website is no longer available, so I am reposting it here.

This is an automatically translated version of the original post from the site ‘brazilians in robotics’ (no longer available).

This post is licensed under CC BY 4.0 by the author.