Name

np_mc_nss_analysis — Multi channel non stationnary signal analysis using short term fft

Calling Sequence

[signals_energy,signals_dispersion,inout_gains,inout_coherences]
    = np_mc_nss_analysis(signals,frequency_bands [,options])

Parameters

signals

a N by Nt array with as many rows as signals. The first row must be the output signal and the next ones the inputs.

frequency_bands

a M by 2 array, each row [fmin fmax] specifies the frequency range to be studied.

options

a struct with fields:

  • <term>sectionlength</term>: an integer, the signal section length to be used for power and cross spectrum computation.
  • <term>sectionstep</term>: an integer, the step to be applied for one signal section to the next one. sectionstep must be less or equal to sectionlength. Overlap is sectionlength-sectionstep.
  • <term>smoothwindowlength</term>: an integer, the length of the smoothing window (hanning)
  • <term>minimalcoherence</term>: a positive number in ]0 1].

signals_energy

a N by P by M 3D array. signals_energy(k,:,i) gives the energy of the signal signals(k,:) in the frequency band [frequency_bands(i,1) frequency_bands(i,2)].

signals_dispersion

a tlist with fields:

  • <term>fmin</term>: a N by P by M 3D array. signals_dispersion.fmin(k,:,i) gives the frequency around which the dispersion is minimal for the signal signals(k,:) in the frequency band [frequency_bands(i,1) frequency_bands(i,2)].
  • <term>pmin</term>: a N by P by M 3D array. signals_dispersion.pmin(k,:,i) gives the value of the SPSD at the frequency of minimal dispersion for the signal signals(k,:) in the frequency band [frequency_bands(i,1) frequency_bands(i,2)].
  • <term>dmin</term>: a N by P by M 3D array which values are in [0;1]. signals_dispersion.dmin(k,:,i) gives the value of the minimal dispersion for the signal signals(k,:) in the frequency band [frequency_bands(i,1) frequency_bands(i,2)]. Dispersion value is zero when the signal is merely a sinusoide, only one components, whereas is 1 if the spectra is completely spread, so there isn't a principal component.

inout_gains
a N-1 by P by M 3D array. inout_gains(k,:,i) gives the signals(k+1,:) to signals(1,:) transfer function gain in the frequency band [frequency_bands(i,1) frequency_bands(i,2)].
inout_coherences
a N-1 by P by M 3D array. inout_gains(k,:,i) gives the signals(k+1,:) to signals(1,:) coherence in the frequency band [frequency_bands(i,1) frequency_bands(i,2)].

Description

This function performs non parametric multi channel non stationnary signal analysis using short-time Fourier transform (STFT) by which the time record is multiplied by a sliding window and the FT of the consecutive windowed segments are computed resulting in a series of local spectra.

This analysis can be done simultaneously on several frequency ranges.

Examples

Create signals

    Tmax=90;//final time
    fs=20;//sampling frequency Hz
    f0=0.5;//base frequency Hz
    // Time instants
    t=0:1/fs:Tmax;N=size(t,'*');
    n=round(N/2)
    //output signal
    f1=1.2*f0;
    out=[2*sin(2*%pi*f0*t(1:n)) sin(2*%pi*f1*t(n+1:$))]+2d-2*rand(t); 
    // Input signal
    f2=1.4*f0;
    in=[sin(2*%pi*f0*t(1:n)) sin(2*%pi*f2*t(n+1:$))];
    

Perform analysis

    sl=300; //section length
    clear options
    options.sectionlength=sl;
    options.sectionstep=sl/2; //50% overlaping
    options.smoothwindowlength=5;
    options.minimalcoherence=0.5;
    fbands=[0.5*f0 2.5*f0]/fs;
    [energy,dispersion,inout_gain,inout_coherence]=np_mc_nss_analysis([out;in],fbands,options);
    nr=size(energy,2);
    tr=(1:nr)*sl/(2*fs);

    

Drawings

    o=0.05; //reserve space for title
    h=1/3;
    clf;
    a=newaxes();a.axes_bounds=[0,0,1,h];a.margins(3)=0.25;
    plot(t,[in;out]');legend(['in','out']);title("signals")
    a=newaxes();a.axes_bounds=[0,h,1,h];;a.margins(3)=0.25;
    plot(tr,inout_gain); title("in -> out gain")
    a=newaxes();a.axes_bounds=[0,2*h,1,h];a.margins(3)=0.25;
    plot(tr,inout_coherence); xlabel('time');title("in/out coherence")

    

Authors

Alexandro Monti, INRIA
Serge Steer, INRIA

Bibliography

Rapport de recherche INRIA RR-4427:"Short term control of the cardivascular system: modelling and signal analysis" Alessandro Monti, Claire Médigue, Michel Sorine,2002 pp 50-

Used Functions

Mainly based on windowed fft