Advanced Octave A48 — A repeatable signal pipeline

by Giux GX-TXT, octave-en, scripts-en 2 min read

Advanced GNU Octave with GX-TXT · Module 08

A repeatable analysis connects data, parameters, indicators and representation. We repeat the filtered signal in A44, check the sampling and produce a persistent graph.

Objectives and prerequisites

Run A44 first: this lesson reads the Dataset octave_advanced_filtered produced by that script. The test uses GX-TXT dev112-P011-bis and GNU Octave 9.4.0. Import pipeline.m, register it and run it in the Runner.

From reading to indicators

The canonical reading recovers 200 rows of time and signal. The script checks that the times grow and that all the steps are 0.01 s within a numerical tolerance: this corresponds to 100 Hz. The five coefficient causal moving average and the initial conditions are those defined in A44; this lesson does not recalculate the filter, but analyzes its result.

For the indicators the first four samples are excluded, subject to the initial transitory. The NUMERIC_API_v1 API calculates the average; Octave calculates RMS and maximum absolute value on the same lines.

In the test the average is 0.001812 V, the RMS 0.690986 V and the absolute peak 1.044825 V. These figures depend on the data and the analyzed tract: the small average does not mean absence of oscillations.

Graph and reproducibility

The pipeline validates a PlotSpec and creates a persistent variant. Open the result in Plots and use the Viewer:

The graph shows the entire Dataset, including the first four samples; the indicators instead exclude them. Store the A44 script along with this, the reference of the Dataset, sampling rate, coefficients, initial conditions and interval used for indicators. Otherwise a numerical result can be difficult to reconstruct correctly.

Exercise

  1. What is the frequency corresponding to a step of 0.01 s?
  2. What samples are excluded from the indicators?
  3. Does an average near zero imply a signal without oscillations?

Worked solution

  1. 100 Hz.
  2. The first four, while the chart includes them.
  3. No: Positive and negative values can compensate; RMS describes another aspect of the signal.

Download the Module 08 scripts (ZIP)

#GNU Octave #GX-TXT #GX-TXT public APIs

Other steps of this project

Leave a Reply

Your email address will not be published. Required fields are marked *