Skip to content

MeasurementV2

Overview

Performs transfer function measurements

Discussion

This module will periodically output the stimulus signal. On the measurement side, the received signal of length L will be measured and averaged. The number of times that the stimulus signal is output and the received signal measured is numReps. The average of the recorded signal is in the response buffer. The number of times to repeat the stimulus before starting the acquisition is the numPreCycles. The trigger is a parameter which the PC sets to trigger the measurement. This will initially be 0 (waiting), then set to 1 by PC (start measurement). Once the measurement is completed, it will be set to 0.

This module can be controlled and the response analyzed either with the built in inspector GUI, or using MATLAB if the user has the Pro edition of Designer.

To use the inspector, double-click the module on the canvas to launch and manage the measurement process

Follow these steps to plot the measurement in MATLAB. (Note: This requires AWE Designer Pro Edition)

  1. Run the layout in Designer.

  2. Start a measurment using the module's inspector.

  3. Get the running layouts structure in Matlab:

GSYS = get_gsys();
  1. Next read out the stimulus and response in Matlab command window:
 x = GSYS.SYS.MeasurementV21.response; 

 z = GSYS.SYS.MeasurementV21.stimulus; 

5) Next compute the transfer function and plot it. For example, if you have the signal processing toolbox you can do:

[tf, f] = tfestimate(z,x,[],[],[],48000); 

plot(f,abs(tf));shg 

Module Pack

Advanced

ClassID

classID = 1385

Type Definition

typedef struct _ModuleMeasurementV2
{
ModuleInstanceDescriptor instance;            // Common Audio Weaver module instance structure
INT32 L;                                      // Length of the stimulus signal.
INT32 numReps;                                // Number of times to repeat the stimulus and average the result
INT32 numPreCycles;                           // Number of times to repeat the stimulus before starting the acquisition
INT32 trigger;                                // state variable/parameter which the PC sets to trigger the measurement.
INT32 readIndex;                              // Index used for circular reading
INT32 stateIndex;                             // Index used for state
INT32 cnt;                                    // Index used to measure the response
FLOAT32* stimulus;                            // Column vector of length L holding the stimulus signal
FLOAT32* response;                            // Holds the time average measured signal
} ModuleMeasurementV2Class;

Variables

Properties

Name Type Usage isHidden Default Value Range Units
L int const 0 16384 Unrestricted
numReps int parameter 0 16 1:1024
numPreCycles int parameter 0 2 1:4
trigger int parameter 0 0 0:1
readIndex int state 1 0 Unrestricted
stateIndex int state 1 0 Unrestricted
cnt int state 1 0 Unrestricted
stimulus float* parameter 0 [16384 x 1] Unrestricted
response float* derived 0 [1 x 16384] Unrestricted

Pins

Input Pins

Name measure
Description measured audio input
Data type float
Channel range Unrestricted
Block size range Unrestricted
Sample rate range Unrestricted
Complex support Real

Output Pins

Name stimulus
Description stimulus output
Data Type float

Matlab Usage

File Name: measurement_v2_module.m 
 M=measurement_v2_module(NAME, L, enableTriggerPin) 
 Audio Weaver module which performs transfer function measurements  
 using a stimulus and response.  The module outputs the stimulus signal 
 and averages the response over multiple repetitions.  Arguments: 
    NAME - name of the module 
    L - length of the measurement signal, in samples 

Copyright (c) 2026 DSP Concepts, Inc.