Document toolboxDocument toolbox

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();

     

  4. Next read out the stimulus and response in Matlab command window:

    >> x = GSYS.SYS.MeasurementV2_1.response; >> z = GSYS.SYS.MeasurementV2_1.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

Type Definition

Variables

Properties

Name

Type

Usage

isHidden

Default value

Range

Units

L

int

const

0

16380

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

Â