Exercises with synthetic signals

Import the exercise Dataset

  1. Download the Portable exercise Dataset. The Reference CSV shows the rows and headers.
  2. In a GX-TXT Session, open the Dataset page and choose Actions → Import Dataset ZIP…. Open the file and confirm Import Dataset. Keep the signal_practice ID or use another free ID if it already exists.
  3. Select that Dataset in the viewer. Unless an exercise specifies otherwise, use time_ms as the time coordinate and 0 as the declared rate. The table has 1,024 rows, a sample rate of 256 Hz, and a time origin of 125 ms. The signal variables are in volts.

Check a 32 Hz sine wave

Use tone as the primary signal and leave the second channel blank. Choose quality.basic and select Analyze. Check for RMS ≈ 0.7071, peak 1, peak-to-peak 2, crest factor ≈ 1.4142, and a mean close to zero.

Switch to spectral.periodogram and then run spectral.welch with a window length of 256 and an overlap of 0.5. Both peak at 32 Hz. To see the table and plot, publish each run under a different unused ID. Repeat with spectral.asd and compare √PSD at the same bin. With correlation.auto, positive peaks recur every 8 samples. Use analytic.phase to check that phase increases almost linearly and analytic.instantaneous_frequency to verify a result near 32 Hz.

Measure delay, coherence, and transfer

Use drive as primary and delayed as coupled. Choose correlation.cross with coefficient. The second signal is delayed by 7 samples and the result reports delay_samples = −7 and a maximum about 0.997. At 256 Hz the signed delay is −27.34375 ms. If you clear the time coordinate and keep the rate at zero, the lag is reported in samples.

Change the paired channel to response and calculate spectral.coherence, spectral.frf_h1, and spectral.frf_h2, all with a window length of 256 and an overlap of 0.5. The response is exactly twice the primary signal. Expect coherence near 1 and a transfer of approximately 2 + 0i. Check both FRF columns in the Dataset.

Compare envelope, filtering, and sample-rate changes

Use modulated and analytic.envelope. The 32 Hz carrier is amplitude-modulated at 4 Hz and the envelope is about 0.6 – 1.4 V. With the same series, an instant frequency makes sense where the amplitude remains sufficient.

Set the primary channel to mixed, the sum of an 8 Hz and an 80 Hz component. Run filter.causal and filter.zero_phase with a 10 Hz cutoff and order 3. Compare peaks at the same time. The causal filter differs in its startup behavior and phase. In the middle of the record, the forward–backward filter preserves the phase of the slower component. Both outputs retain 1,024 rows. Try multirate.decimate with a factor of 2 to get 512 samples at 128 Hz. The original 80 Hz component was above the new Nyquist frequency of 64 Hz.

Reproduce input validation errors

  • With time_ms selected, states 128 Hz instead of 256. A rate mismatch causes an otherwise valid method to fail. Bring the rate back to zero to try again.
  • Empty both time and Paired, leave zero rate and choose spectral.periodogram. It needs a rate. Declare 256 Hz and try again. The summary goes to declared.
  • For Welch, try a window length of 1,025, then restore 256. The Job rejects a window longer than the 1,024 rows. With an overlap of 1, the GUI rejects the request before submission. Restore 0.5.
  • Run the quality analysis and choose Publish result. The quality summary contains scalar values. After a Welch analysis, publish with an unused ID and repeat using the same ID to see how a collision is rejected.