From abd4fb3e3b3e6f91f855d2b3b6abddfd1bdb827b Mon Sep 17 00:00:00 2001 From: r4yamnghs Date: Sat, 30 May 2026 10:51:31 -0700 Subject: [PATCH] Rough draft of Adding DSP Concepts with ADALM-MMSC --- docs/learning/index.rst | 5 + .../sp_concepts_with_mmsc/ad4080_sink1.png | 3 + .../sp_concepts_with_mmsc/ad4080_sink2.png | 3 + .../sp_concepts_with_mmsc/filtersweep1.png | 3 + .../sp_concepts_with_mmsc/filtersweep2.png | 3 + .../sp_concepts_with_mmsc/frequency_det.png | 3 + docs/learning/sp_concepts_with_mmsc/index.rst | 237 ++++++++++++++++++ .../sp_concepts_with_mmsc/newfilterfreq.png | 3 + .../sp_concepts_with_mmsc/newnoisesweep.png | 3 + .../sp_concepts_with_mmsc/noisesweep.png | 3 + .../sp_concepts_with_mmsc/scopy_detect.png | 3 + .../sp_concepts_with_mmsc/sinc_inter.png | 3 + 12 files changed, 272 insertions(+) create mode 100644 docs/learning/sp_concepts_with_mmsc/ad4080_sink1.png create mode 100644 docs/learning/sp_concepts_with_mmsc/ad4080_sink2.png create mode 100644 docs/learning/sp_concepts_with_mmsc/filtersweep1.png create mode 100644 docs/learning/sp_concepts_with_mmsc/filtersweep2.png create mode 100644 docs/learning/sp_concepts_with_mmsc/frequency_det.png create mode 100644 docs/learning/sp_concepts_with_mmsc/index.rst create mode 100644 docs/learning/sp_concepts_with_mmsc/newfilterfreq.png create mode 100644 docs/learning/sp_concepts_with_mmsc/newnoisesweep.png create mode 100644 docs/learning/sp_concepts_with_mmsc/noisesweep.png create mode 100644 docs/learning/sp_concepts_with_mmsc/scopy_detect.png create mode 100644 docs/learning/sp_concepts_with_mmsc/sinc_inter.png diff --git a/docs/learning/index.rst b/docs/learning/index.rst index 30b8d18bec5..c670e6e6e3d 100644 --- a/docs/learning/index.rst +++ b/docs/learning/index.rst @@ -64,6 +64,11 @@ Workshops workshop_kuiper/index +.. toctree:: + :maxdepth: 1 + + sp_concepts_with_mmsc/index + Academic Workshops ------------------------------------------------------------------------------- diff --git a/docs/learning/sp_concepts_with_mmsc/ad4080_sink1.png b/docs/learning/sp_concepts_with_mmsc/ad4080_sink1.png new file mode 100644 index 00000000000..7df4b8d3f9c --- /dev/null +++ b/docs/learning/sp_concepts_with_mmsc/ad4080_sink1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d4f2e87ac8304cf5f2f1cd6f8fcb9bfcfbbbe757ba10efb9ef8272e39b9f0fd3 +size 36009 diff --git a/docs/learning/sp_concepts_with_mmsc/ad4080_sink2.png b/docs/learning/sp_concepts_with_mmsc/ad4080_sink2.png new file mode 100644 index 00000000000..c6b6f3ce850 --- /dev/null +++ b/docs/learning/sp_concepts_with_mmsc/ad4080_sink2.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b354f273f55e6427543fc6b15fb95187801a071f5e1c08af550720584460b57d +size 259679 diff --git a/docs/learning/sp_concepts_with_mmsc/filtersweep1.png b/docs/learning/sp_concepts_with_mmsc/filtersweep1.png new file mode 100644 index 00000000000..b2f54160122 --- /dev/null +++ b/docs/learning/sp_concepts_with_mmsc/filtersweep1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ac0696c99ad4fc18521ebdbfc6c3eb6e35204b0b9cfdb44aaed877689d2d456c +size 248775 diff --git a/docs/learning/sp_concepts_with_mmsc/filtersweep2.png b/docs/learning/sp_concepts_with_mmsc/filtersweep2.png new file mode 100644 index 00000000000..0938bc0ad0a --- /dev/null +++ b/docs/learning/sp_concepts_with_mmsc/filtersweep2.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0558a48fb582360cac27c10867df78cd1341eca5910ef854d4e9e794d551f510 +size 73402 diff --git a/docs/learning/sp_concepts_with_mmsc/frequency_det.png b/docs/learning/sp_concepts_with_mmsc/frequency_det.png new file mode 100644 index 00000000000..1ba2223a79e --- /dev/null +++ b/docs/learning/sp_concepts_with_mmsc/frequency_det.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d0571345eb280199bac431e936c02bde22abc607252c4a74739bb7a43cbbfa1e +size 224929 diff --git a/docs/learning/sp_concepts_with_mmsc/index.rst b/docs/learning/sp_concepts_with_mmsc/index.rst new file mode 100644 index 00000000000..91107e04d6f --- /dev/null +++ b/docs/learning/sp_concepts_with_mmsc/index.rst @@ -0,0 +1,237 @@ +.. _dsp_concepts_with_adalm-mmsc: + +Signal Processing Concepts with ADALM-MMSC +=============================================================================== + +.. attention:: + + This is a work in progress + +Overview +------------------------------------------------------------------------------- + +This document provides a practical introduction to signal‑processing concepts +using the **AD4080**, the **ADALM2000**, and the **MMSC +board**. It combines theoretical explanations with interactive Python scripts +to demonstrate frequency‑domain analysis, oversampling, digital filtering, and +noise behavior in a real mixed‑signal measurement setup. + +The focus is on FFT‑based analysis, sinc filter behavior, and integrated noise +effects, allowing users to validate theoretical expectations through direct +measurement. All scripts referenced in this tutorial are available in the +associated repository. + +User Guides +------------------------------------------------------------------------------- + +Using the Detect Sample Frequency Script +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +To run the **sampling frequency detection (Fs Detect) script**, begin by +powering up both the **ADALM2000** and the **MMSC board** equipped with the +**MAX32666FTHR microcontroller**. + +Connect the **W1** output from the ADALM2000 to the **negative input (IN–)** on +connector **P17** of the MMSC board. Ensure that all ground connections are +correctly made. Configure the appropriate COM port on the host computer +to establish communication. + +Next, run the Fs Detect script using Python. Open **Scopy**, navigate to the +*Signal Generator*, and configure a sine-wave output. The default input +frequency is typically **100 kHz**, but this value may be adjusted as needed. +Start the signal generator to apply the sine-wave input to the ADC. + +**Scopy Sample Setup** + +.. figure:: scopy_detect.png + :align: center + :width: 900 + +In the script’s graphical interface, enter the input frequency into the provided +text box. Data acquisition is controlled using the following buttons: + +- **Run** → Begins continuous accumulation of ADC samples +- **Stop** → Halts acquisition +- **Single Shot** → Captures one buffer of data and stops + +The script identifies the FFT bin containing the dominant spectral peak and +calculates the ADC sampling frequency from its location. The calculated value is +compared to the expected sampling frequency reported by the hardware, and the +error percentage is displayed. + +**Expected Output** + +.. figure:: frequency_det.png + :align: center + :width: 900 + +Adjusting the physical clock on the AD4080 board causes the ADC sampling +frequency to change. This shift is reflected in the FFT output and calculated +sampling frequency in real time. + + +Using the Frequency Sweep Script +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +To run the **frequency sweep script**, begin by connecting the **ADALM2000** and +the **AD4080 evaluation board** to your computer. Ensure that the correct USB +interfaces and serial communication ports are specified in the script arguments. +The front‑end sampling frequency must match the rotary switch setting on the +AD4080 board—this is typically **40 MHz**. + +Once the hardware is powered and connected, run the script using Python. The +graphical interface will launch automatically, providing user‑configurable input +fields for sweep parameters including: + +- **Start frequency** +- **Stop frequency** +- **Step size** +- **OSR (Oversampling Ratio)** + +Additionally, the interface offers radio buttons to select the desired **digital +filter type**. + +Pressing the **Run sweep** button initiates the automated frequency sweep. +During operation, the interface displays the **Filter frequency response**. + +**Expected Output** + +.. figure:: newfilterfreq.png + :align: center + :width: 900 + +Using the AD4080 Sink Script +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +To run the **AD4080 sink script**, begin by connecting the **ADALM2000** and the +**AD4080 evaluation board**. Ensure the correct USB and serial communication +ports are selected. + +Once the script is launched, configure: + +- **Fundamental frequency** +- **Signal amplitude (dBFS)** + +**Tab to change parameters** + +.. figure:: ad4080_sink1.png + :align: center + :width: 450 + +After configuration, the ADALM2000 generates a waveform containing a fundamental +tone, harmonics, and noise. The AD4080 captures ADC samples, which are converted +to voltage units, normalized to full scale, and analyzed using FFTs. + +**Expected Outputs** + +.. figure:: ad4080_sink2.png + :align: center + :width: 900 + + +Using the Interactive Sinc Folding Script +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +To run the **Interactive Sinc Folding** script, connect the ADALM2000 and AD4080 +evaluation board. Select the appropriate serial port and LibIIO URI. + +The interface allows real‑time adjustment of: + +- **Decimation ratio (OSR)** +- **Digital filter type** +- **Noise bandwidth** +- **Noise spectral density** + +.. figure:: sinc_inter.png + :align: center + :width: 900 + +The frequency‑domain display updates in real time, showing how noise folds into +the baseband and how digital filtering shapes the spectrum. + + +Using the Noise Sweep Script +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +To run the **noise bandwidth sweep script**, connect the ADALM2000 and AD4080 and +verify the front-end sampling frequency. + +The script increments noise bandwidth from DC, captures ADC samples, removes DC offset, and +computes RMS noise using the standard deviation.Thegraphical interface will launch automatically, +providing user‑configurable input fields for sweep parameters including: + +- **Start frequency** +- **Stop frequency** +- **Step size** +- **OSR (Oversampling Ratio)** + + +.. figure:: newnoisesweep.png + :align: center + :width: 900 + +Measured results are overlaid with analytical reference curves derived from ideal +sinc‑filter responses. + +Developer Overview +------------------------------------------------------------------------------- + +FFT Fundamentals +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +The **Fast Fourier Transform (FFT)** converts time‑domain samples into a +frequency‑domain representation, revealing sinusoidal components, harmonics, +and noise. + +The frequency resolution is: + +:math:`\Delta f = \frac{f_s}{N}` + +The frequency represented by bin :math:`k` is: + +:math:`f_k = \frac{k}{N} \cdot f_s` + +If the input frequency is known, the sampling frequency can be estimated as: + +:math:`f_s = \frac{f_{in} \cdot N}{k}` + + +Sinc Folding Concepts +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Oversampling ADCs use sinc‑based digital decimation filters with repeating lobes +and nulls. As the output rate is reduced, energy outside the baseband folds back +according to the sinc filter response, producing predictable spectral shaping. + +Higher‑order sinc filters provide stronger attenuation but introduce more +pronounced shaping. Increasing OSR reduces bandwidth and increases noise +suppression while moving folding points closer together. + + +Integrated Noise in Oversampled ADCs +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Wideband noise is spectrally shaped by sinc filters before integration. +The observed RMS noise depends on the magnitude‑squared filter response and the +effective noise bandwidth. + +Examining integrated noise behavior reveals how oversampling, filter selection, +and decimation affect noise performance. + +Developer Guide +------------------------------------------------------------------------------- + +The scripts implement FFT‑based spectral analysis, frequency sweeping, and noise +integration using consistent assumptions about sampling frequency, decimation, +and normalization. + +- DC offsets are removed before noise calculation +- RMS noise is computed using standard deviation +- Analytical reference curves assume ideal rectangular noise shaped by sinc + filter responses + +This approach allows direct comparison between theoretical expectations and +measured ADC behavior. + +Help and Support +------------------------------------------------------------------------------- + +For support related to hardware setup, script execution, or data interpretation: + +- Review the script repository documentation +- Consult the AD4080, ADALM2000, and MMSC user manuals +- Contact your Analog Devices applications support representative + +Documentation authored by Raya Norelle Mangahas, Spring Intern 2026 \ No newline at end of file diff --git a/docs/learning/sp_concepts_with_mmsc/newfilterfreq.png b/docs/learning/sp_concepts_with_mmsc/newfilterfreq.png new file mode 100644 index 00000000000..6bd55d66c88 --- /dev/null +++ b/docs/learning/sp_concepts_with_mmsc/newfilterfreq.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1d4e7866f85336610facb30c98d09d6cf0f996dc3b634e4aa7e6a8c42e2910cf +size 57987 diff --git a/docs/learning/sp_concepts_with_mmsc/newnoisesweep.png b/docs/learning/sp_concepts_with_mmsc/newnoisesweep.png new file mode 100644 index 00000000000..e2039dfa418 --- /dev/null +++ b/docs/learning/sp_concepts_with_mmsc/newnoisesweep.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:15fca71c9a669d711aea85014b5efd68afe938051b9e31e0df8ec2f6154e3989 +size 93570 diff --git a/docs/learning/sp_concepts_with_mmsc/noisesweep.png b/docs/learning/sp_concepts_with_mmsc/noisesweep.png new file mode 100644 index 00000000000..2ffc83a7919 --- /dev/null +++ b/docs/learning/sp_concepts_with_mmsc/noisesweep.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9782eea87174847cb263d7c489b026652fa5f51d38c0c780a8bd700e66181310 +size 178620 diff --git a/docs/learning/sp_concepts_with_mmsc/scopy_detect.png b/docs/learning/sp_concepts_with_mmsc/scopy_detect.png new file mode 100644 index 00000000000..b1123d82e44 --- /dev/null +++ b/docs/learning/sp_concepts_with_mmsc/scopy_detect.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4ceed76e251a05ff48989704ab244fce60961a6cd4f1f306ec3d483a46eea2c2 +size 299427 diff --git a/docs/learning/sp_concepts_with_mmsc/sinc_inter.png b/docs/learning/sp_concepts_with_mmsc/sinc_inter.png new file mode 100644 index 00000000000..b84935c06eb --- /dev/null +++ b/docs/learning/sp_concepts_with_mmsc/sinc_inter.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ad109d74d389aa5cf3aca480c10bb7ee1ec642690eec6d27048620db350306f8 +size 300537