GX-TXT – GNU Octave Software for HOLD and LED Dynamic Analysis

These GNU Octave programs were developed during the experimental characterization of the GX-TXT-v3 to process oscilloscope acquisitions related to the dynamics of the HOLD node and the LED response.

The collection includes a script for analyzing a single acquisition, two batch programs developed for different experimental campaigns, and a final script for the global analysis of the results.

The scripts are extensively commented and are also published as directly editable .m files. Although they were developed for the GX-TXT, they can be adapted to other circuits mainly by changing the mapping between the acquired nodes, the variable names, and the CSV file parser.

Input Data

Nodes and Variables Used by the Scripts

To make it easier to adapt the software to a different circuit, it is useful to clarify the meaning of the main names used in the code. The same names do not need to be used in the circuit schematic: it is sufficient to establish a mapping between the nodes of the circuit to be analyzed and the variables expected by the script.

NameMeaning
V_HOLDHOLD-node voltage, i.e. the voltage across the capacitor used by the GX-TXT to keep the indication temporarily active.
N_LED_ARANCIONode located between the RLED series resistor and the orange LED. Its voltage is used to derive the LED current.
VCCSupply voltage of the LED branch. In the scripts it is estimated from the value of N_LED_ARANCIO during the pre-trigger interval, when the LED is off.
P_GAINResistance value of the gain adjustment used as test metadata.
P_SENSResistance value of the sensitivity adjustment. It is also used to group and compare the different experimental conditions.
VGENAmplitude of the stimulus set on the generator. In v8 it is explicitly indicated as vgen_vpp.
V_RSENSEVoltage measured across the sensing resistor of the virtual photodiode. It is used by v8 to directly derive the stimulus current.
I_SENSEStimulus current derived from the voltage across RSENSE.
numeroImpulsiNumber of carrier periods contained in the burst applied to the circuit.

The LED current is derived in the software from:

$$ I_{LED}=frac{V_{CC}-V_{N_LED_ARANCIO}}{R_{LED}} $$

For the GX-TXT measurements, the following value is used:

$$ R_{LED}=680 Omega $$

For v8, the voltage measured across the virtual-photodiode resistor is also used:

$$ I_{SENSE}=frac{V_{RSENSE}}{R_{SENSE}} $$

with:

$$ R_{SENSE}=51 mathrm{k}Omega $$

These relationships depend on the topology of the circuit being used. To apply the scripts to a different circuit, the definitions of the vHold and vLed signals must therefore be checked in particular and, if necessary, the calculation of iLed_mA must be modified.

Channels Used in the Original Acquisitions

The oscilloscope channel assignment is also simply a convention used during the different experimental campaigns.

Software LED Channel HOLD Channel
Single-acquisition analysis v6 CH3 = N_LED_ARANCIO CH2 = V_HOLD
Batch v7 CH3 = N_LED_ARANCIO CH2 = V_HOLD
Batch v8 CH3 = N_LED_ARANCIO CH4 = V_HOLD

It is not necessary to use these same channels. What matters is correctly assigning to the vLed and vHold variables the CSV columns containing the corresponding signals.

Oscilloscope CSV Format

The scripts were developed using CSV files exported from a Rigol oscilloscope. The parser therefore assumes the structure used by this instrument: the Start and Increment timing information is obtained from the header, and the samples are read as a sequence index plus two analog channels.

A different oscilloscope may export a CSV with a different header, number of columns, separators, or time-axis representation. In this case, the analysis algorithm does not need to be modified: normally it is sufficient to adapt the small block of code that imports the file.

This is the v8 block to locate in the analizza_csv_gxtxt_impulsi function:

riga1 = fgetl(fid);
riga2 = fgetl(fid);

campi = strsplit(riga2, ',');

tStart = str2double(campi{4});
dt     = str2double(campi{5});

dati = fscanf( ...
    fid, ...
    '%f,%f,%f,', ...
    [3, Inf])';

seq   = dati(:,1);
vLed  = dati(:,2);   % CH3 = N_LED_ARANCIO
vHold = dati(:,3);   % CH4 = V_HOLD

t = tStart + seq .* dt;

This is the main section to modify in order to use the software with a CSV produced by another oscilloscope. The subsequent part of the algorithm essentially requires three pieces of information: the HOLD sample vector, the LED-node sample vector, and the corresponding time axis.

In v7 the structure is similar, but the two columns are assigned in the opposite order:

seq   = dati(:,1);
vHold = dati(:,2);
vLed  = dati(:,3);

t = tStart + seq .* dt;

This separation makes it relatively straightforward to adapt the scripts to different CSV export formats without modifying the subsequent analysis procedures.

It is important to clarify the relationship between GXTXT_batch_v7 and GXTXT_batch_impulsi_v8. Despite what the numbering might suggest, v8 must not simply be regarded as an evolution of, or a new version of, v7.

The two programs share a substantial part of the HOLD/LED analysis procedure, but they were developed for different experimental campaigns and use conventions, metadata, and input formats that do not fully coincide.

The v7 software was used for the original campaign on HOLD dynamics and is also the reference for the current GXTXT_analisi_globale_v1. The v8 batch program was instead used for the subsequent campaign in which the number of pulses is varied; it also introduces V_RSENSE, I_SENSE, and other checks specific to that measurement series.

For this reason, both versions are maintained and published. The numbering documents the historical order in which the scripts were developed, but does not imply that v8 replaces v7.

The Programs

GXTXT_singola — Single-Acquisition Analysis

The single-acquisition script is useful during development and verification of the analysis method. It allows direct work on one measurement, with the test metadata set manually, and produces the numerical results, the HOLD-discharge table, and the plots related to the HOLD → LED dynamics.

Version Description Download TODO
v6 Complete analysis of a single HOLD/LED acquisition. GXTXT_singola_v6.m

GXTXT_batch — Automated Campaign Analysis

The batch software automates the same procedure over a series of acquisitions described by an index file. Each test is processed separately, and the results are then collected in the risultati_batch.csv file.

Two implementations of the batch software are available. v7 was used for the original campaign on HOLD dynamics and produces the format expected by the current global-analysis software. v8 was developed for the different campaign with a variable number of pulses and uses partly different metadata and conventions. The two programs share the core HOLD/LED analysis, but v8 does not replace v7.

Version Description Download TODO / notes
v7 Version used for the original HOLD/LED campaign. GXTXT_batch_v7.m
v8 Batch program for the campaign with a variable number of pulses. GXTXT_batch_impulsi_v8_CH3_CH4.m v8 / v7 differences

GXTXT_analisi_globale — Global Campaign Analysis

The third program uses the results produced by the batch analysis to build the global characteristics of the experimental campaign. These include the relationship between LED current and HOLD voltage, the LED on-time as a function of the maximum HOLD level reached, and families of curves obtained by varying the sensitivity and the applied stimulus.

The current version of the script was developed for the risultati_batch.csv file produced by v7 of the batch software. In particular, it uses the vgen_V field and the experimental correspondence between VGEN and I_SENSE adopted in the original campaign. It is therefore not presented as being directly compatible with the v8 output.

VersionDescriptionDownloadTODO
v1Global analysis of the results produced by batch v7.GXTXT_analisi_globale_v1.m

User Manual

A dedicated operating manual is available for using the software without having to reconstruct the workflow directly from the source code.

The guide describes acquisition preparation, the CSV file format, the mapping between circuit nodes and the variables used by the scripts, the use of the single-acquisition and batch versions, the structure of the index files, and the interpretation of the main output files.

It also provides practical guidance for adapting the parser to different oscilloscopes, using the scripts with circuits other than the GX-TXT, and recognizing the most common processing problems.

The manual is deliberately focused on software use; the detailed description of the analysis algorithms is covered separately.

HOLD and LED Dynamic Analysis Algorithms

The software is organized into three levels. The first extracts the characteristic quantities of the HOLD → LED dynamics from a single acquisition. The second automatically applies the same procedure to an entire experimental campaign, associating each acquisition with its test conditions. The third works on the results already extracted and builds the global characteristics of the system.

The separation is intentional: waveform analysis is performed only once for each acquisition, while comparisons, grouping, and global fitting are carried out later on the numerical results. In this way, processing a single trace and interpreting the entire campaign remain two distinct problems.

GXTXT_singola_v6 — Analysis Algorithm for a Single HOLD/LED Acquisition

Reconstruction of the Time Axis

The starting point is the CSV exported from the oscilloscope. The Rigol file used during development does not necessarily store the complete time value for each sample: the header contains the acquisition start time and the time interval between two consecutive samples.

Denoting the sequential sample number by n_i, the start time by t_Start, and the time increment by Δt, the script reconstructs:

$$ t_i=t_{Start}+n_iDelta t $$

and therefore:

$$ F_s=frac{1}{Delta t} $$

From this point onward, the algorithm works on the three vectors time, V_HOLD, and N_LED_ARANCIO and no longer depends on the internal structure of the CSV.

Automatic Determination of Quiescent Conditions

Before analyzing the response to the burst, the initial condition of the circuit must be known. The script preferably uses the portion of the acquisition earlier than -0,1 s relative to the trigger. If this interval is not available, it uses an initial portion of the acquisition.

For each signal, the median is used instead of the mean:

$$ V_{HOLD,base}=operatorname{median}(V_{HOLD}) $$

$$ V_{CC}simeqoperatorname{median}(V_{N_LED}) $$

The median is only weakly affected by isolated anomalous samples and therefore provides a stable estimate of the quiescent level. In the GX-TXT circuit, during the pre-trigger interval the LED is off and the N_LED_ARANCIO node is practically at the branch supply voltage; for this reason, this level is also used as an estimate of VCC.

Reconstruction of the LED Current

Knowing VCC and the LED series resistance, the current is derived from the voltage measured at the N_LED_ARANCIO node:

$$ I_{LED}(t)=frac{V_{CC}-V_{N_LED}(t)}{R_{LED}} $$

with:

$$ R_{LED}=680 Omega $$

Any small negative values produced by noise or by uncertainty in the VCC estimate are clamped to zero. In this way, the script converts a voltage that can be easily acquired with the oscilloscope into a quantity directly related to the LED state.

Detection of the HOLD Maximum

The maximum HOLD voltage and its corresponding time are then determined:

$$ V_{HOLD,max}=max V_{HOLD}(t) $$

The corresponding time, tHoldMax, represents the transition between the charging phase produced by the burst and the subsequent discharge evolution. It is therefore used as a reference for the subsequent processing steps.

Conversion of the Discharge into a Voltage-Level Table

The HOLD discharge is not analyzed simply by using all the raw samples. Instead, the script constructs a series of voltage levels spaced by:

$$ Delta V_{HOLD}=0,10 mathrm{V} $$

starting from the measured maximum and decreasing to a voltage slightly above the baseline. For each level, the first crossing during the discharge is located.

Because the desired level normally falls between two consecutive samples, the crossing time is refined by linear interpolation:

$$ t_{cross}=t_1+ frac{V_{target}-V_1}{V_2-V_1} left(t_2-t_1right) $$

At the same time, the LED-node voltage is also interpolated and I_LED is then calculated.

The result is a table in the form:

V_HOLD → time → N_LED → I_LED

This representation is particularly useful because it makes acquisitions with different durations and sampling rates comparable: the discharge is described through common physical voltage levels rather than through millions of raw samples.

Exponential Fit of the HOLD Discharge

To characterize the slow part of the discharge, the script assumes the following working model:

$$ V_{HOLD}(t)=V_{HOLD,base} +A,e^{-frac{t-t_0}{tau}} $$

where t0 coincides with the time of the HOLD maximum.

Subtracting the baseline:

$$ V_{HOLD}(t)-V_{HOLD,base} =A,e^{-frac{t-t_0}{tau}} $$

and applying the logarithm:

$$ ln!left(V_{HOLD}-V_{HOLD,base}right) = ln A-frac{t-t_0}{tau} $$

the problem is transformed into a linear fit. If the resulting line has slope m:

$$ tau=-frac{1}{m} $$

while:

$$ A=e^q $$

with q as the regression intercept.

The script also calculates R² by comparing the reconstructed exponential model with the HOLD levels used in the fit. The R² value does not demonstrate that the circuit is an ideal RC network: it only indicates how well that model describes that portion of the discharge.

Apparent Capacitance

An equivalent capacitance is also calculated from the time constant, assuming a reference resistance of 100 kΩ:

$$ C_{app}=frac{tau}{100 mathrm{k}Omega} $$

In the code, this quantity is explicitly called apparent capacitance. It does not represent a direct measurement of the capacitor installed in the circuit: it is the value that would produce the observed time constant if the discharge were determined solely by the resistance assumed in the calculation.

Why LED Turn-Off Is Detected Using the Derivative

To determine when the LED actually completes its transition, an arbitrary voltage on the N_LED_ARANCIO node could be chosen. However, this would make the result dependent on the selected threshold.

Instead, the script uses the shape of the transition. When the LED turns off, its current decreases and N_LED_ARANCIO rises back toward VCC. The transition therefore produces a clearly recognizable positive lobe in the derivative:

$$ frac{dV_{N_LED}}{dt} $$

The purpose of the algorithm is therefore not to identify a particular LED voltage, but to locate in time the main dynamic event associated with its turn-off.

Noise Reduction Before Differentiation

Directly calculating the derivative of the oscilloscope samples would strongly amplify the noise. For this reason, two successive operations are performed.

First, the samples are grouped into 1 ms time blocks and replaced by their mean value:

$$ bar{V}_k= frac{1}{N} sum_{i=1}^{N}V_i $$

The slope is then estimated over a local 50 ms window using linear regression.

In a centered window, denoting by x_j the times relative to the center of the window, the slope used by the script is equivalent to:

$$ m= frac{sum_j x_jV_j} {sum_j x_j^2} $$

This method produces a much more stable estimate of the derivative than the simple difference between two consecutive samples.

Detection of the Main Lobe

The search is performed only after the HOLD maximum. In this region, the positive maximum of the derivative is identified:

$$ D_{max}= maxleft(frac{dV_{N_LED}}{dt}right) $$

The corresponding time is called tLedPeak and represents the point of maximum speed of the LED transition.

It does not necessarily coincide with the beginning or end of turn-off: it represents the most dynamically evident center of the event and is used as the starting point for locating its two boundaries.

Robust Estimate of Derivative Noise

To distinguish the actual lobe from small background variations, a region preceding the derivative maximum is analyzed. The central background level is estimated using the median:

$$ mu_D=operatorname{median}(D) $$

The dispersion is evaluated using the Median Absolute Deviation:

$$ MAD= operatorname{median}left(|D-mu_D|right) $$

and converted into an equivalent estimate of the standard deviation:

$$ sigma_Dsimeq1,4826cdot MAD $$

Compared with a directly calculated standard deviation, the advantage is lower sensitivity to isolated peaks or anomalous samples in the region used as background.

Adaptive Transition Threshold

The threshold used to delimit the lobe is not based on a single criterion. The script calculates:

$$ D_{noise}=mu_D+5sigma_D $$

and at the same time:

$$ D_{rel}=0,10D_{max} $$

The final threshold is:

$$ D_{th}= maxleft(0, D_{noise}, D_{rel}right) $$

This choice combines two requirements. The noise-based term prevents simple background fluctuations from being identified as a transition; the term equal to 10% of the maximum prevents an extremely low threshold from artificially widening the lobe in a very clean measurement.

Beginning and End of the Transition

A single threshold crossing could be caused by noise. For this reason, the script requires the derivative to remain below the threshold for a continuous interval of 30 ms.

Starting from the lobe maximum, the search proceeds backward to determine the beginning of the transition and forward to determine its end.

Three characteristic times are therefore obtained:

tLedStart — beginning of the main lobe;
tLedPeak — maximum transition speed;
tLedEnd — end of the main lobe.

The transition duration is:

$$ T_{trans}=t_{LedEnd}-t_{LedStart} $$

Because in the acquisitions used the trigger coincides with the beginning of the burst, the LED on-time is defined as:

$$ T_{LED}=t_{LedEnd} $$

Relationship Between LED Dynamics and HOLD Voltage

Once the three transition times have been determined, the script interpolates the HOLD trace at the same points. It is therefore possible to directly associate the beginning, maximum speed, and end of turn-off with:

V_HOLD, N_LED and I_LED.

This step is important because it makes it possible to move from a simple timing measurement to the physical relationship between the state of the HOLD network and the LED response.

Two Time Scales for the HOLD Derivative

The HOLD voltage contains phenomena occurring on very different time scales: the initial charging is fast, while the discharge can last for seconds. A single differentiation window would not be suitable for both.

The script therefore calculates two separate representations:

Analysis Block Averaging Slope Window Purpose
Fast HOLD 0,10 ms 0,50 ms Observe the charging phase produced by the burst
Slow HOLD 5 ms 100 ms Observe the discharge without amplifying noise

These are not two different models of the circuit, but the same slope-estimation technique applied with time resolutions appropriate to the two phenomena.

GXTXT_batch_v7 and GXTXT_batch_impulsi_v8 — Batch Analysis Algorithms

From a Single Experiment to the Campaign

The batch software does not introduce a second, completely independent measurement method. The core of the HOLD → LED analysis derives directly from the algorithm developed for the single acquisition.

The fundamental difference is the architecture:

index file → test metadata → CSV analysis → test results → campaign master

In this way, the experimental conditions no longer need to be manually modified in the source code for each acquisition. Each row of the index describes one test and becomes one row of the final dataset.

Separation Between Metadata and Waveform

The oscilloscope CSV file contains the waveform, but normally does not contain information such as P_GAIN, P_SENS, stimulus amplitude, or number of pulses. The index file therefore links the acquired data to the experimental condition that produced it.

v7 uses:

P_GAIN, P_SENS, VGEN, CSV file

while v8 extends the description to:

P_GAIN, P_SENS, VGEN, V_RSENSE, number of pulses, CSV file.

This approach keeps the original oscilloscope file unchanged while building a structured metadata layer on top of it.

Why the Analysis Parameters Remain Common Across the Campaign

In the batch analysis, the fundamental algorithm parameters are defined once and used for all acquisitions: bin width, derivative window, relative threshold, number of sigma, and minimum stability duration.

This choice is essential for an experimental comparison. If the LED-detection criterion were changed from one test to another, part of the observed differences could be introduced by the processing itself rather than by the circuit.

The current versions use, among others:

Parameter Value
LED averaging1 ms
LED derivative window50 ms
Relative threshold10% of the maximum
Noise threshold5 σ
Required stability30 ms
Minimum N_LED excursion0,20 V

Preliminary Check for the Presence of a Real LED Transition

Before applying derivative-based detection, the batch versions verify that the N_LED trace has a sufficiently large excursion:

$$ Delta V_{LED}= V_{LED,max}-V_{LED,min} $$

The search is attempted only if:

$$ Delta V_{LED}geq0,20 mathrm{V} $$

This value is not the electrical turn-off threshold of the LED. It is simply a preliminary check intended to prevent noise or small baseline variations from being processed by the lobe-detection algorithm as if they were a real transition.

A Test Without LED Turn-On Is Still a Result

The batch software distinguishes between absence of an LED transition and a processing error. If the circuit does not reach the condition required to keep the LED on, ledTransitionValid remains false and the quantities that require a transition are set to unavailable.

This behavior is important in a characterization: a below-threshold test must not be discarded as an invalid acquisition, because it still represents experimental information about the system.

The Role of v7

v7 turns the single-acquisition algorithm into an automatic and repeatable procedure. Each CSV is analyzed in its own folder, while risultati_batch.csv contains one row for each experimental condition.

The loop is protected on a test-by-test basis: if an acquisition generates an error, the problem is recorded in the batch status and the program continues with the next test. In this way, a single problematic measurement does not invalidate the entire campaign.

v8 Evolution: Stimulus Current Derived from V_RSENSE

v8 adds to the index file the voltage measured across the sensing resistor of the virtual photodiode. The current associated with the stimulus is therefore determined directly:

$$ I_{SENSE}= frac{V_{RSENSE}}{R_{SENSE}} $$

with:

$$ R_{SENSE}=51 mathrm{k}Omega $$

The result is converted to microamperes and stored together with the test. Compared with the nominal value set on the generator alone, this quantity provides information more directly related to the stimulus actually applied to the test circuit.

Number of Pulses and Burst Duration in v8

In v7, the number of pulses is a parameter common to the entire campaign. In v8, it instead becomes an attribute of each individual acquisition.

The theoretical burst duration is calculated as:

$$ T_{burst}= frac{N_{impulsi}}{f_{carrier}} $$

This makes it possible to use the same batch software for a series in which the total energy transferred to the HOLD node is varied by directly changing the number of carrier periods.

Search for the HOLD Maximum Only After the Trigger in v8

In v7, the HOLD maximum is searched over the entire acquisition. v8 instead restricts the search to samples with:

$$ tgeq0 $$

This modification prevents a pre-trigger sample from being incorrectly selected as the maximum in an almost flat trace or one with very small variations, thereby becoming the time reference for the entire analysis.

Validated HOLD Fit in v8

v8 retains the same exponential model as v7, but explicitly separates the concept of a valid test from that of an available fit.

Before accepting the fit, the following requirements, among others, are checked:

– at least three usable points;
– finite times occurring after the HOLD maximum;
– finite voltage values;
– negative slope in the logarithmic domain;
– positive and finite τ;
– finite amplitude A.

Only if these conditions are satisfied is the following set:

holdFitValid = true.

If the acquired window is too short, HOLD is practically flat, or the discharge cannot be described with sufficient information, the test remains usable and the fit parameters are simply left unavailable.

Robustness of Block Averaging and the Derivative in v8

v8 also adds checks to the auxiliary numerical functions. Before constructing the blocks or the regression window, the number of samples, the validity of Δt, and the actual possibility of constructing a window of at least three points are verified.

If the data are insufficient, the function returns an empty result rather than forcing a numerically meaningless calculation.

This modification does not change the mathematical method used for the derivative: it simply makes explicit the conditions under which that method can be applied.

Separation Between Numerical Results and Plotting in v8

In v8, the numerical master file is updated before the plots are generated. Plot generation is then performed in a separate block.

This choice distinguishes two categories of problem:

ERROR_ANALYSIS — the numerical result could not be obtained;
OK_PLOT_ERROR — the numerical result is valid and saved, but one or more plots were not generated;
OK — analysis and plots completed.

From the measurement standpoint, this is an important distinction: a problem in the plotting system must not cause the loss of an experimental result that has already been calculated correctly.

The Master File as an Interface to Subsequent Processing

The main result of the batch analysis is not only the set of plots, but the master file. Each row represents an experimental condition and contains both the test parameters and the quantities extracted from the waveform.

The batch software therefore also performs a data-reduction function: millions of samples are transformed into a limited set of comparable parameters, while the tables and intermediate data required for any subsequent checks are still retained in the folders of the individual tests.

GXTXT_analisi_globale_v1 — Global Campaign Analysis Algorithm

A Different Level of Analysis

The third program does not return to the original waveforms to repeat the timing analysis. It works mainly on the master file produced by the batch software and on the tabella_hold.csv files already generated for the individual tests.

Its task is therefore different:

individual test results → common dataset → global relationships → fits and families of curves.

The current version was explicitly designed for the format produced by batch v7.

Reading the Master File by Column Name

The program reads the header of risultati_batch.csv and locates the required columns by name, for example:

p_gain_ohm, p_sens_ohm, vgen_V, VholdMax_V, ledTransitionValid, and tempoLedAcceso_s.

This avoids rigid dependence on the numerical position of the columns, but naturally requires the column names expected by v7 to be present.

Normalization of Experimental Conditions

Before comparisons are made, small residual P_SENS resistances below 10 Ω are mapped back to the nominal position:

$$ P_{SENS}=0 $$

The normalization groups under the same nominal condition measurements that, in practice, may differ by a few ohms because of the residual resistance of the adjustment.

Conversion of VGEN Levels to I_SENSE

The original campaign includes four experimentally determined current levels. The script therefore associates the nominal VGEN levels with the measured currents:

VGEN LevelI_SENSE
115,29 µA
226,27 µA
336,08 µA
445,49 µA

The algorithm does not perform continuous interpolation: it selects the nearest calibration level and accepts it only if the difference from the nominal value does not exceed 0,25 V. Otherwise, it returns an unavailable value.

This approach treats VGEN mainly as an identifier of an already measured calibration point, not as a direct current measurement.

Representation of Cases in Which the LED Does Not Turn On

To construct the global characteristics, a test in which no LED transition was detected is represented by:

$$ T_{LED}=0 $$

when ledTransitionValid is false or the on-time is unavailable.

This transformation is performed in the global analysis rather than in the batch processing: the batch software preserves the distinction between a measured value and an unavailable value, while the global analysis interprets the absence of turn-on as a physical zero-time point for constructing the campaign curves.

Construction of the Global I_LED = f(V_HOLD) Characteristic

For this analysis, the master file alone is not sufficient, because each test contains many points describing the relationship between HOLD and LED current. The program therefore reads all the tabella_hold.csv files in the batch folders and concatenates the pairs:

$$ (V_{HOLD},I_{LED}) $$

obtained from the different acquisitions.

The following physical point is also added:

$$ (0 mathrm{V},0 mathrm{mA}) $$

Binning of the HOLD Voltage

The values from the different acquisitions do not necessarily coincide perfectly. The HOLD voltage is therefore quantized into 0,10 V intervals:

$$ V_{bin}= operatorname{round} left( frac{V_{HOLD}}{0,10} right) cdot0,10 $$

For each interval, the following are calculated:

– median of I_LED;
– minimum value;
– maximum value;
– number of available points.

The median provides a central curve that is only weakly affected by individual anomalous points, while the minimum, maximum, and number of samples preserve information about the dispersion present across the different acquisitions.

Why T_LED Is Compared with V_HOLD,max

The maximum reached by HOLD represents the initial state from which the subsequent discharge begins. If the discharge were approximately exponential and turn-off occurred around a given characteristic level, the time required to reach it should depend on the logarithm of the initial voltage.

Starting ideally from:

$$ V(t)=V_{max}e^{-t/tau} $$

and imposing a final level V0:

$$ V_0=V_{max}e^{-T/tau} $$

we obtain:

$$ T=taulnleft(frac{V_{max}}{V_0}right) $$

This provides the rationale for the model used by the software.

Logarithmic Fit T_LED = f(V_HOLD,max)

The program uses only cases in which the LED is actually on:

$$ T_{LED}>0 $$

and:

$$ V_{HOLD,max}>0 $$

The fit is performed in the form:

$$ T_{LED} = aln(V_{HOLD,max})+b $$

which can be rewritten as:

$$ T_{LED} = alnleft( frac{V_{HOLD,max}}{V_0} right) $$

with:

$$ V_0=e^{-b/a} $$

Dimensionally, the coefficient a plays the role of an effective time constant, while V0 is a characteristic parameter of the fit. It should not automatically be interpreted as a fixed electrical threshold of the circuit.

Here too, R² is calculated to quantify how well the model describes the experimental points used.

Why the Fit Does Not Include Points with T_LED = 0

Zero-time points are important for showing the conditions under which the LED does not turn on, but they do not necessarily belong to the same logarithmic relationship as cases in which a real hold phase occurred.

For this reason, they are shown in the global dataset but excluded from the fit. The model is constructed only over the region in which a measurable on-time actually exists.

Families of T_LED = f(I_SENSE) as P_SENS Varies

The final analysis changes perspective. Instead of using HOLD as the independent variable, it groups the tests according to the P_SENS value and studies:

$$ T_{LED}=f(I_{SENSE}) $$

For each P_SENS value, the points are sorted by increasing current, producing a family of characteristics that shows how the sensitivity adjustment changes the instrument response to the stimulus.

PCHIP Interpolation

If a series contains at least three points and is not completely flat, the program uses PCHIP interpolation to draw a continuous curve through the measurements.

It is important to distinguish this operation from the previous fit: here PCHIP does not introduce a physical model of the GX-TXT and does not estimate circuit parameters. It is used only to construct a continuous and smooth representation between ordered experimental points.

The choice of shape-preserving interpolation also limits the artificial oscillations that could appear when using high-order global polynomials.

Three Levels of Information

Overall, the three programs therefore work on three progressively more compact representations of the same experiment:

1. Waveform
millions of samples acquired by the oscilloscope.

2. Parameters of the Individual Test
V_HOLD,max, τ, I_LED, transition times, T_LED, and related quantities.

3. Campaign Characteristics
I_LED(V_HOLD), T_LED(V_HOLD,max), and families of T_LED(I_SENSE).

This structure avoids using the raw waveforms directly for every global comparison while at the same time preserving, for each measurement, the intermediate data needed to verify how each parameter was obtained.

License

The GNU Octave software published on this page is distributed under the GNU General Public License version 3 or later (GPL-3.0-or-later).

The license permits the source code to be used, studied, modified, and redistributed, including in derivative versions, in accordance with the terms of the GNU GPL. In particular, any distributed versions that incorporate or modify these programs must retain a compatible license and make the corresponding source code available.

The scripts are published primarily as experimental and educational tools, with the aim of enabling verification of the results, reuse of the analysis procedures, and adaptation to different acquisitions or circuits.

Leave a Reply

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