IR Waveforms and MARK/SPACE Timing

GX-TXT DEV112 P011-bis

Analyze an IR waveform and derive MARK and SPACE sequences from the signal transitions.

GX-TXT P011-bis · module 3.6.2. IR waveform / MARK-SPACE analysis analyzes the time behavior of an IR receiver, measures the carrier, reconstructs the active bursts MARK and the pauses SPACE and groups the durations. It can compare up to seven other traces of the same signal along the acquisition chain.

Generate and bind the measurement

From Session → New Session → Generate Session choose the Generator Infrared Remote NEC Waveform (ir_remote_nec) and create a Standalone Session. Open ir.remote.source in Datasets and check Preview and Metadata. The example contains 175,960 samples at 2 MSa/s. In Configuration → Modules → Analysis & Services select the module, check Health and press Enable module. In Analysis select Run / recalculate now.

Dataset sources
Choose ir.remote.source in the row primary. + Add source creates aliases for Datasets with other traces. Remove releases the source or removes the added alias.
IR waveform signal (primary Dataset)
Choose primary.VIR. The main trace determines carrier, events and polarity. auto lets the module resolve the binding.
Time variable (primary Dataset; Auto uses time_s)
Choose primary.time_s in s. The option auto search for time_s.
Comparison trace 1…7 (optional)
Each row can link a channel measured in the main source or in another Dataset. Use the row prefix, for example source2, to trace its origin. Leave auto on the rows you want to leave empty. Compare traces of the same event, with consistent time and units.
Infrared Remote NEC Waveform Generator for repeating the teaching measurement.
Infrared Remote NEC Waveform Generator for repeating the teaching measurement.

Set carrier, threshold and grouping

Nominal carrier frequency [Hz]
Initial expected frequency, 38000 Hz. The measured carrier then drives the reconstruction.
Carrier search mode
nominal_recovery tries near the nominal value and, if needed, searches the automatic interval. strict_nominal stays around the nominal value. automatic searches directly in the specified band.
Carrier lock tolerance around nominal period [fraction]
Relative half-width tolerated around the nominal period. 0.2 corresponds to ±20% of the period. It applies to the nominal search.
Automatic carrier search minimum / maximum [Hz]
Limits of the automatic or fallback search. The initial values are 33000 and 60000 Hz. Use increasing limits compatible with the sampling.
Pretest window
auto applies the window chosen by the module. manual uses Manual pre-trigger window [ms] and Manual post-trigger window [ms], initially 5 and 40 ms. The report shows the effective interval used for the initial estimate.
Minimum plausible signal excursion [V]
Minimum plausible level of the swing, initially 0.050 V. Check it against the scale and noise of the trace.
Carrier threshold / signal amplitude
Relative contribution of the amplitude to the detection threshold. It starts from 0.3.
Carrier threshold / pretrigger noise sigma
Multiplier of the noise before the trigger. It starts from 8. The report shows final threshold, polarity and noise.
MARK separation gap [carrier periods]
Interval for separating bursts, in carrier periods. The default is 3.
Duration clustering relative tolerance
Relative tolerance of 0.2 used to group similar durations. Increasing it can merge nearby classes.
Use guarded span-limited duration clustering
The default tick limits the internal spread of the groups. Clear it to use grouping based on the running median. Maximum max/min ratio inside guarded cluster is the limit on the ratio between maximum and minimum duration in the protected group, initially 1.6.
Maximum overview min/max bins
Limit on the overview bins, initially 6000. It acts on the min/max representation. The numerical reconstruction uses the full source.
Carrier periods shown in detail graph
Number of carrier periods in the detail view, initially 12.
Reset and field messages
The button Reset restores the initial value in the fields that offer it. Read the validation message next to a field filled in with a value that is not allowed.
strict_nominal mode and selection of the module views.
strict_nominal mode and selection of the module views.

Choose views and comparisons

In Graphs offered by module the tick enables each plot. Enable all and Disable all select or deselect them all at once. Configure… acts on the corresponding proposal. Module graphics… opens the module preferences.

IR command overview
Voltage overview of the whole command with min/max reduction for display.
Carrier detail
Zoom on the measured carrier periods.
MARK / SPACE reconstruction
Reconstructed trace of bursts and pauses over time.
MARK / SPACE durations
Durations of the events, to compare with the groups in the report.
Absolute voltage comparison / Baseline-removed signal comparison
The first compares actual levels and offsets. The second subtracts the baseline to make the swing comparable.
Carrier envelope comparison / Relative carrier amplitude / gain
Compare the envelope and the amplitude ratio against the main trace.
Threshold margin comparison
Compares the margin from the threshold along the traces.
Normalized signal comparison (optional)
Rescales the traces to compare the shape. In Optional normalized comparison method choose peak for the peak, vpp for the peak-to-peak amplitude or rms for the RMS value.
Comparison graph mode
stacked stacks the traces one above the other. overlay overlays them. The comparison views require at least one additional bound channel and its tick.

From Plots select a variant Plot p…. Use Presentation → Title and labels…, save, apply Render → Rerender and open Graph → Open PNG 1:1 to inspect the rendering.

MARK and SPACE reconstruction opened at native resolution with a custom title.
MARK and SPACE reconstruction opened at native resolution with a custom title.

Run and check events and tables

Open Run, update the plan and start the selective computation. The three search modes completed the Run on the Generator. In Results read riepilogo_VIR.txt, then open burst.csv, eventi_mark_space.csv and duration_clusters_comparison.csv. In the nominal case the measured carrier is 37.735849 kHz, there are 34 MARK bursts and the reconstructed interval lasts about 67.98 ms.

Look at the Datasets ir.plot.full, ir.plot.carrier, ir.plot.markspace and ir.plot.durations in Preview, Metadata and Canonical table. For the comparisons read analog_chain_comparison.csv for baseline, amplitudes, polarity, thresholds and gain and analog_chain_timeseries.csv for the trends interpolated on the main grid. To repeat the teaching comparison, create a CSV on the same axis time_s with a second column comparison_V computed as 0.1 + 0.5 * VIR. Import it with Acquisition → Generic CSV as ir.remote.compare, contract timeseries.table. Add it with + Add source, bind source2.comparison_V to the first comparison trace and enable the six comparison views. With overlay and vpp the test measured an additional baseline of 0.1 V and a relative gain of 0.5. The next step can use the events to identify the protocol. IR protocol identification procedure.

Results after computing carrier and MARK and SPACE segments.
Results after computing carrier and MARK and SPACE segments.