4. Examples#

These examples are taken from the zzzz241a test case.

4.1. Calculation of an interspectral matrix from a table_function#

Temporal responses can be stored as lists in a separate file, or built based on a calculation. We assume here that we have four answers, whose names are REP_1, REP_2, REP_3 and REP_4, respectively. It is assumed that all these measurements were carried out simultaneously. Otherwise, one measurement number should be defined per batch of simultaneous acquisitions.

# These four answers are first stored in a table_function:

tab_rep= CREA_TABLE (LISTE =( _F (PARA =” NOM_CHAM “, LISTE_K =”Rep_Temp”,),

# We define the different numbers of the measures,

# associated with specific sensors, or DDL

_F (PARA =” NUME_ORDRE_I “, LISTE_I =( 1,2,3,4),),

# Measure numbers are defined. Here, the 4 measurements are simultaneous,

# so they have the same number:

_F (PARA =” NUME_MES “, LISTE_I =( 1,1,1,1),),

# Functions are defined based on time samples.

_F (PARA =” FONCTION “,

LISTE_K =( “REP_1”, “REP_2”, “”, “”, “REP_3”, “REP_4”),),

),

TITRE = »,

TYPE_TABLE =”function_table”,

)

# We then choose to calculate the interspectral matrix by

# dividing each sample into sub-samples of 1201 points

# of long, with an overlap of 6 seconds, and each weighted by

# a Hanning window

SPEC = CALC_SPEC (TAB_ECHANT =_F (NOM_TAB =tab_rep,

LONGUEUR_NB_PTS =1201,

RECOUVREMENT_DUREE =6,),

INTERSPE =( _F (FENETRE =” HANN “,),),

)

4.2. Calculating transfer functions from functions#

Temporal responses can be stored as lists in a separate file, or built based on a calculation. It is assumed here that there are two measurements carried out at different times. On the one hand, an excitation signal EXC_1, and a response REP_1 are acquired simultaneously. It can be the response to a shock, or to an arousal by a vibrating pot. On the other hand, an excitation signal EXC_2, and the associated response REP_2, are also acquired simultaneously. In both cases, the excitation signal was applied to the same point. Responses are measured at two different locations. The excitation point has the order number 1, the point associated with the first measures the number 2, and the point associated with the second measures the number 3. The transfer functions 2/1 and 3/1 are calculated as follows:

# Calculation of the transfer from the impulse response:

FRF1_IMP = CALC_SPEC (ECHANT =(

# Definition of the different time samples

_F (NUME_ORDRE_I = 1,

NUME_MES =1,

FONCTION = REP_1,),

_F (NUME_ORDRE_I = 2,

NUME_MES =1,

FONCTION = REP_1,),

_F (NUME_ORDRE_I = 1,

NUME_MES =2,

FONCTION = EXC_2,),

_F (NUME_ORDRE_I = 3,

NUME_MES =2,

FONCTION = REP_2,),

),

# Definition of parameters for calculating transfers:

# Estimator choice:

TRANSFERT =( _F (ESTIM =”H1”,

# Choose which window to apply:

FENETRE =” EXPO “,

# Additional window definition:

DEFI_FENE =( 10, -0.02),

# Definition of order numbers associated with reference points:

REFER =1,),

),

)

By using the functions directly, rather than putting data into a table_function, the user does not access the possibilities of averaging over the length of the signal. To do this, he either defines the sub-functions himself, maintaining the same input formalism, or he fills in a table_function, and uses the formalism presented in section 4.1.