The objective of this project is to investigate the use of


Objective -

The objective of this project is to investigate the use of various signal processing techniques in extracting Electric Network Frequency (ENF) information from audio signals as a means of media authentication.

The Assignment: What is to be done?

For this project you need to write a Matlab function and a Matlab script.

Matlab function enf.m

The Matlab function enf.m will extract the ENF signal from a sound ?le. The call to enf.m should be in the form:

[y1, y2] = enf(x, Fs, BlockSize, ZeroPad, Overlap, Window, Frequency);

Input Variables and Parameters:

x: Lx-sample long one-dimensional input sequence x[n] containing samples of the sound file to be analyzed. In particular, x is a real-valued column vector of dimension Lx x 1.

Fs: Sampling rate of the input sequence x.

BlockSize: Parameter that determines the length of each subblock extracted from the input sequence x. For example, if {x1[n]} is the first subblock extracted from x, then {x1[n]} = { x[1]; : : : ; x[BlockSize] } -note that index starts at 1 to conform with Mat-lab programming standards. BlockSize also determines the size of the FFT algorithms to be used to transform blocks of data from time-domain to frequency-domain.

ZeroPad: Amount of zero padding to be used for Fourier analysis. For ZeroPad = Nz each windowed data segment extracted from the input sequence will be appended with Nz zero-valued sampled before transforming into the frequency domain.

Overlap: Input parameter that specifies overlap between successive subblocks extracted from the input sequence x. Overlap is specified as fraction of BlockSize with 0 ≤ Overlap < 1 such that Overlap = 0 corresponds to no overlap and Overlap = 1 corresponds to full overlap conditions.

Window: Window function fw[n]g to be applied to each input block fxm[n]g before transformed to frequency domain by DFT. The data array fw[n]g is a column vector of dimension BlockSize x 1. For example, Window = hanning(BlockSize).

Frequency: The ENF value to be analyzed. For example if you want to analyze ENF at line frequency then Frequency = 60, or if you want to analyze the first harmonic of the line frequency then Frequency = 120.

Output Variables:

y1: M x 1 dimensional maximum energy array as described in Equation (2).

y2: M x 1 dimensional weighted energy array as described in Equation (4).

Number of blocksM and therefore lengths of the y1 and y2 output data arrays is a function of the length of the input x[n], and the BlockSize, ZeroPad and BlockSize parameters.

Matlab script ENFproject.m

The Matlab script ENFproject.m is to demonstrate how the enf.m function developed earlier is to be used to operate on the maximum energy and the weighted energy arrays extracted from the reference sound file and the test sound file using the normalized cross-correlation analysis given in Equation (5).

The ENFproject.m scripts should compare the maximum energy and the weighted energy arrays extracted from the reference sound file and the test sound file using with and without pre-processing the sound files.

Comparison of reference and test sound files without pre-processing

Use the parameters:

  • Fs = 44100;
  • BlockSize = Fs * 16;
  • ZeroPad = 0;
  • Overlap = 0:5;
  • Window = hanning( BlockSize, 'periodic' );
  • Frequency = 120;

with sound files:

  • Reference file: ground truth.wav;
  • Test file: recording.wav.

Alternatively, you can use ground truth 2.wav and recording 2.wav.

The Matlab script file should use the above listed parameters to extract the maximum energy and weighted energy arrays from the specified reference and test sound files using the Matlab function enf.m. Perform normalized cross-correlation analysis first on the maximum energy arrays extracted from the reference and the test sound files to determine (if possible) the time-delay between the reference and test signals. Repeat the same analysis using the weighted energy arrays to estimate the time-delay between the reference and test signals.

Comparison of reference and test sound files with pre-processing

In this scenario you should first pre-process signals by decimating the sound files by a factor of 100. To achieve this objective design an appropriate lowpass filter, filter the audio signal and then down-sample by 100 before processing it further as before. In particular, use the following analysis parameters on the decimated audio signals:

  • Fs = 441; % sampling frequency after decimation
  • BlockSize = Fs * 16;
  • ZeroPad = 2ˆ14 Fs * 16;
  • Overlap = 0:5;
  • Window = hanning(???,'periodic'); ... % calculate the new block size after zero padding
  • Frequency = 120;

Repeat the same analysis as in the case of "without pre-processing" using the maximum energy and the weighted energy arrays to estimate the time-delay between the reference and test signals.

Attachment:- Assignment Files.rar

Request for Solution File

Ask an Expert for Answer!!
MATLAB Programming: The objective of this project is to investigate the use of
Reference No:- TGS02532347

Expected delivery within 24 Hours