(8.D.2.2 ) 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)
Run the layout in Designer.
Start a measurment using the module's inspector.
Get the running layouts structure in Matlab:
>> GSYS = get_gsys();
Â
Next read out the stimulus and response in Matlab command window:
>> x = GSYS.SYS.MeasurementV2_1.response; >> z = GSYS.SYS.MeasurementV2_1.stimulus;
Â
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
Â