Contents     Functions         Previous Next     PDF Index

4.3  Sensors

Sensors are used for test/analysis correlation and in analysis for models where one wants to post-process partial information. This general objective is supported by the use of SensDof entries. Supported sensor types are (follow the links to documentation)


transtranslation sensor. See also triax and laser simplified calls to generate the associated translation sensors.
relrelative displacement sensor.
generalgeneral sensor (low level).
resultantresultant force sensor.
strainstrain or stress sensor.

Once sensors of previous types are defined, the match step (consisting in matching sensors to elements of the mesh) can be performed (see sensor SensMatch)
model = fe_case(model,'sensmatch',SensDofEntryName);
Then one can get the observation matrix using (see sensor Sens)
Sens = fe_case(model,'sens',SensDofEntryName);

4.3.1  Sensor GUI, a simple example

Using the feplot properties GUI, one can edit and visualize sensors.
Following example loads ubeam model, defines some sensors and opens the sensor GUI.


model=demosdt('demo ubeam-pro');
cf=feplot; model=cf.mdl; 
 
model=fe_case(model,'SensDof append trans','output',...
    [1,0.0,0.5,2.5,0.0,0.0,1.0]); %  add a translation sensor
model=fe_case(model,'SensDof append triax','output',8); % add triax sensor
model=fe_case(model,'SensDof append strain','output',...
    [4,0.0,0.5,2.5,0.0,0.0,1.0]); %  add strain sensor
 
model=fe_case(model,'sensmatch radius1','output'); % match sensor set 'output'
 
fecom(cf,'promodelviewon');
fecom(cf,'curtab Cases','output'); % open sensor GUI

Clicking on Edit Label one can edit the full list of sensor labels.
The whole sensor set can be visualized as arrows in the feplot figure clicking on the eye button on the top of the figure. Once visualization is activated one can activate the cursor on sensors by clicking on CursorSel. Then one can edit sensor properties by clicking on corresponding arrow in the feplot figure.


Figure 4.9: GUI for sensor edition

4.3.2  Sensor definition from a cell array

It is also possible to define the experimental setup with a cell array containing all the information relative to the sensors (only displacement/velocity/acceleration sensors are currently supported). This array is often filled outside MATLAB. Using EXCEL you can read it with data=sdtacx('excel read filename',sheetnumber). The first row gives column labels (the order in which they are given is free). Each of the following rows defines a sensor. Known column headers are

triax sensors are dealt with by defining three sensors with the same 'lab' but different 'SensId' and 'DirSpec'. In this case, a straightforward way to define the measurement directions is to make the first axis be the normal to the matching surface. The second axis is then forced to be parallel to the surface and oriented along a preferred reference axis, allowed by the possibility to define 'T*'. The third axis is therefore automatically built so that the three axes form a direct orthonormal basis with a specification such as N^T*. Note that there is no need to always consider the orthonormal basis as a whole and a single trans sensor with either 'T*' or N^T* as its direction of measure can be specified.

In the example below, one considers a pentahedron element and aims to observe the displacement just above the slanted face. The first vector is the normal to that face whose coordinates are [-√2/2,√2/2,0]. The second one is chosen (i.) parallel to the observed face, (ii.) in the (x,y) plane and (iii.) along x axis, so that its coordinates are [√2/2,√2/2,0]. Finally, the coordinates of the last vector can only be [0,0,-1] to comply with the orthonormality conditions. The resulting sensor placement is depicted in figure 4.10

cf=feplot;cf.model=femesh('testpenta6');fecom('triax');

% sensor definition
tdof={'lab','SensType','SensId','X','Y','Z','DirSpec';...
      'sensor 1','',1,.4,.6,.5,'N';
      'sensor 2','',2,.4,.6,.5,'TX';
      'sensor 3','',2,.4,.6,1.,'dir 1 1 1';
      'sensor 4','',3,.4,.6,.5,'N^TX'};disp(tdof)
sens=fe_sens('tdoftable',tdof);
cf.mdl=fe_case(cf.mdl,'SensDof','Test',sens);
cf.mdl=fe_case(cf.mdl,'SensMatch radius1','Test','selface');
fecom(cf,'curtab Cases','Test'); fecom(cf,'ProViewOn')% open sensor GUI

Figure 4.10: Typical axis definition of a triax sensor attached to a penta6

It is now possible to generate the experimental setup of the ubeam example described in the previous section by the means of a single cell array containing the data relative to both the trans and triax sensors.

model=demosdt('demo ubeam-pro');
cf=feplot; model=cf.mdl;
n8=feutil('getnode NodeId 8',model); % triax pos.
tdof={'lab','SensType','SensId','X','Y','Z','DirSpec';...
      'sensor1 - trans','',1,0.0,0.5,2.5,'Z';
      'sensor2 - triax','',2,n8(:,5),n8(:,6),n8(:,7),'X';
      'sensor2 - triax','',3,n8(:,5),n8(:,6),n8(:,7),'Y';
      'sensor2 - triax','',4,n8(:,5),n8(:,6),n8(:,7),'Z'};
sens=fe_sens('tdoftable',tdof);
cf.mdl=fe_case(cf.mdl,'SensDof','output',sens);
cf.mdl=fe_case(cf.mdl,'SensMatch radius1');
fecom(cf,'curtab Cases','output'); % open sensor GUI

4.3.3  Sensor data structure and init commands

SensDof case entries can contain the following fields


sens.Node(optional) node matrix for sensor nodes that are not in the model.
sens.Eltelement description matrix for a wire-frame display of the sensors (typically for test wire-frames).
sens.basCoordinate system definitions for sens.Node, see fe_sens basis
sens.tdofnominally 5 column matrix with rows containing [SensID NodeID nx ny nz] giving a sensor identifier (integer or real), a node identifier (positive integer, if relevant), a direction. More details are given below.
sens.DOFDOF definition vector for the analysis (finite element model).
sens.ctais an observation matrix associated with the observation equation {y}=[c]{q} (where q is defined on sens.DOF ). This is built using the fe_case sens command illustrated below.
sens.Stackcell array with one row per sensor giving 'sens','SensorTag',data with data is a structure. SensorTag is obtained from SensId (first column of tdof) using feutil('stringdof',SensId). It is used to define the tag uniquely and may differ from the label that the user may want to associated with a sensor which is stored in data.lab.

All sensors are generated with the command
fe_case(model,'SensDof <append, combine> Sensor_type',Sensor,data,SensLab)
Sensor is the case entry name to which sensors will be added. data is a structure, a vector, or a matrix, which describes the sensor to be added. The nature of data depends on Sensor_type as detailed below. SensLab is an optional cell array used to define sensor labels. There should be as much elements in SensLab as sensors added. If there is only one string in the cell array SensLab, it is used to generate labels substituting for each sensor $id by its SensId, $type by its type (trans, strain ...), $j1 by its number in the set currently added. If SensLab is not given, default label generation is $type_$id.
In the default mode ('SensDof' command), new sensors replace any existing ones. In the append mode ('SensDof append'), if a sensor is added with an existing SensID, the SensID of new sensor will changed to a free SensID value. In the combine mode ('SensDof combine'), existing sensor with the same SensID will be replaced by the new one.

rel

Relative displacement sensor or relative force sensor (spring load). Data passed to the command is [NodeID1 NodeID2].

This sensor measures the relative displacement between NodeID1 and NodeID2, along the direction defined from NodeID1 to NodeID2. One can use the command option -dof in order to measure along the defined DOF directions (needed of the two nodes are coincident). As many sensors as DOF are then added. For a relative force sensor, on can use the command option -coeff to define the associated spring stiffness (sensor value is the product of the relative displacement and the stiffness of the spring).

The following example defines 3 relative displacement sensors (one in the direction of the two nodes, and two others along x and y):

model=demosdt('demo ubeam-pro')
data=[30 372];
model=fe_case(model,'SensDof append rel','output',data);
model=fe_case(model,'SensDof append rel -dof 1 2','output',data);

general

General sensors are defined by a linear observation equation. This is a low level definition that should be used for sensors that can't be described otherwise. Data passed to the command is a structure with field .cta (observation matrix), .DOF DOF associated to the observation matrix, and possibly .lab giving a label for each row of the observation matrix.

The following example defines a general sensor

model=demosdt('demo ubeam-pro');
Sensor=struct('cta',[1 -1;0 1],'DOF',[8.03; 9.03]);
model=fe_case(model,'SensDof append general','output',Sensor);

trans

Translation sensors can be specified by giving

When defining the sensor with only a DOF, or with [DOF, BasID] (BasID is the ID of the basis defined in the .bas field of the model), SensID should not be given. Translation is then the value of this DOF displacement. Otherwise, translation is measured at x y z or at the node NodeID, and along direction nx ny nz (this vector need not be normalized, sensor value is the scalar product of the direction vector and the displacement vector).
Sensor can also be a matrix if all rows are of the same type. Then, one can add a set of sensors with a single call to the fe_case(model,'SensDof <append> trans', Name, Sensor) command.

Following example defines a translation sensor with each possible way:

model=demosdt('demo ubeam-pro')
model=fe_case(model,'SensDof append trans','output',...
  [1,0.0,0.5,2.5,0.0,0.0,1.0]); 
model=fe_case(model,'SensDof append trans','output',...
  [2,8,-1.0,0.0,0.0]);          
model=fe_case(model,'SensDof append trans','output',...
  [10.03]);
cf=feplot;cf.sel(2)='-output';cf.o(1)={'sel2 ty 7','linewidth',2};

Examples on the definition of test sensors are given in section 3.1.1.

Sens.Stack entries for translation can use the following fields


.vert0physical position in global coordinates.
.IDNodeId for physical position. Positive if a model node, negative if SensDof entry node.
.matchcell array describing how the corresponding sensor is matched to the reference model. Columns are ElemF,elt,rstj,StickNode.


dof

One can simply define a set of sensors along model DOFs with a direct SensDof call model=fe_case(model,'SensDof','SensDofName',DofList). There is no need in that case to pass through SensMatch step in order to get observation matrix.

model=demosdt('demo ubeam-pro')
model=fe_case(model,'SensDof','output',[1.01;2.03;10.01]);
Sens=fe_case(model,'sens','output')

triax,laser

3 translation sensors set can be specified by giving [NodeID].

In fact defining a triax sensor is the same as defining 3 translation sensors, in each of the 3 translation DOF (0.01, 0.02 and 0.03) of a node. Sensor can also be a vector of NodeID. Then, one can add a set of sensors with a single call to the fe_case(model,'SensDof <append> triax', Name, Sensor) command.
For scanning laser vibrometer tests
fe_sens('laser px py pz',model,SightNodes,'SensDofName')
appends translation sensors based on line of sight direction from the laser scanner position px py pz to the measurement nodes SightNodes. Sighted nodes can be specified as a standard node matrix or using a node selection command such as 'NodeId>1000 & NodeId<1100' or also giving a vector of NodeId. If a test wire frame exists in the SensDofName entry, node selection command or NodeId list are defined in this model. If you want to flip the measurement direction, use a call of the form

cf.CStack{'output'}.tdof(:,3:5)=-cf.CStack{'output'}.tdof(:,3:5)

Following example defines some laser sensors on gart model, using a test wire frame:

cf=demosdt('demo gartfeplot'); % load FEM
TEST=demosdt('demo garttewire');  % see sdtweb('pre#presen')
cf.CStack{'SensDof','outputs'}=...
  feutil('rmfield',TEST,'tdof'); % define test wire frame
fe_sens('laser 0 0 6',cf.mdl,TEST.Node(:,1),'outputs');
fecom('curtab Cases','output'); fecom('proviewon');

strain,stress

Strain sensors can be specified by giving

[SensID, NodeID]
[SensID, x, y, z]
[SensID, NodeID, n1x, n1y, n1z]
[SensID, x, y, z, n1x, n1y, n1z]
[SensID, NodeID, n1x, n1y, n1z, n2x, n2y, n2z]
[SensID, x, y, z, n1x, n1y, n1z, n2x, n2y, n2z]
when no direction is specified 6 sensors are added for stress/strains in the x, y, z, yz, zx, and xy directions (SensId is incremented by steps of 1). With n1x n1y n1z (this vector need not be normalized) on measures the axial strain in this direction. For shear, one specifies a second direction n2x n2y n2z (this vector need not be normalized) (if not given n2 is taken equal to n1). The sensor value is given by {n2}T[є]{n1}.
Sensor can also be a matrix if all rows are of the same type. Then, one can add a set of sensors with a single call to the fe_case(model,'SensDof <append> strain', Name, Sensor) command.

Following example defines a strain sensor with each possible way:

model=demosdt('demo ubeam-pro')
model=fe_case(model,'SensDof append strain','output',...
  [4,0.0,0.5,2.5,0.0,0.0,1.0]);
model=fe_case(model,'SensDof append strain','output',...
  [6,134,0.5,0.5,0.5]); 
model=fe_case(model,'SensDof append strain','output',...
  [5,0.0,0.4,1.25,1.0,0.0,0.0,0.0,0.0,1.0]);
model=fe_case(model,'SensDof append strain','output',...
  [7,370,0.0,0.0,1.0,0.0,1.0,0.0]);

Stress sensor.
It is the same as the strain sensor. The sensor value is given by {n2}T[σ]{n1}.
Following example defines a stress sensor with each possible way:

model=demosdt('demo ubeam-pro')
model=fe_case(model,'SensDof append stress','output',...
  [4,0.0,0.5,2.5,0.0,0.0,1.0]);
model=fe_case(model,'SensDof append stress','output',...
  [6,134,0.5,0.5,0.5]);
model=fe_case(model,'SensDof append stress','output',...
  [5,0.0,0.4,1.25,1.0,0.0,0.0,0.0,0.0,1.0]);
model=fe_case(model,'SensDof append stress','output',...
  [7,370,0.0,0.0,1.0,0.0,1.0,0.0]);

Since stress and strains are discontinuous across element boundaries, placing the sensor arbitrarily can generate some inaccuracy. A -stick can be added to the match command to force placement of the sensor and the center of the matching element. This will typically be a more appropriate location to evaluate stresses or strains.

resultant

Resultant sensors measure the resultant force on a given surface. They can be specified by giving a structure with fields


.IDsensor ID.
.EltSelFindElt type string that gives the elements concerning by the resultant.
.SurfSelFindNode type string that gives the surface where the resultant is computed.
.dirdirection of resultant measurement. This vector need not be normalized (scalar product).
.typecontains the string 'resultant'.

Following example defines a resultant sensor:

model=demosdt('demo ubeam-pro')
Sensor.ID=1;
Sensor.EltSel='WithNode{z==1.25} & WithNode{z>1.25}'; 
Sensor.SurfSel='z==1.25';
Sensor.dir=[0.0 0.0 1.0];
Sensor.type='resultant';
model=fe_case(model,'SensDof append resultant','output',Sensor);

Resultant sensors are not yet available for superelements model.

4.3.4  Topology correlation and observation matrix

Sens

The response at sensors is related to the response a DOFs by an observation equation

  {y(t)}NS× 1 = [c]NS× N  {q(t)}N× 1     (4.1)

The fe_case SensDof calls detailed above initialize the sensors but not the topology correlation (element matching) needed to build the observation matrix. This is done using any of the commands detailed below.

After the matching phase, one can build the observation matrix with
SensFull=fe_case(model,'sens',SensDofEntryName)
When using a reduced superelement model, you should use
SensRed=fe_case(model,'sensSE',SensDofEntryName).

SensMatch

The command model=fe_case(model,'sensmatch',Name) builds the observation matrix associated to each sensor of the entry Name, and stores it as a .cta field, and associated .DOF, in the sensor stack. You may omit to provide the name if there is only one sensor set.

This operation requires finding the elements that contain each sensor and the position within the reference element shape so that shape functions can be used to interpolate the response.

The match is performed in an area defined by a length which can be given as a command argument with identifier radius, for example

model=fe_case(model,'sensmatch radius1.0',Name)

In certain applications the sensor may not be contained by the element (for example sensor slightly on the exterior of a volume element). You can then define an element selection to help in the matching. For example fe_case(model,'sensmatch radius1.0',Name,'selface') selects the external surface of volumes. The matching on surfaces allows for a normal projection towards the surface, sensors outside the model volume can thus be matched properly. Note that this selection does not yet let you selected implicit elements within a superelement.

Matching on elements is not always acceptable (for example when using superelements). One can thus use matches to the closest node. SensMatch-Near uses the motion at the matched node. SensMatch-Rigid uses a rigid body constraints to account for the distance between the matched node and the sensor (but is thus only applicable to cases with rotations defined at the nearby node).

In an automated match, the sensor is not always matched to the correct elements on which the sensor is glued, you may want to ensure that the observation matrices created by these commands only use nodes associated to a subset of elements. You can use a selection to define element subset on which perform the match. If you want to match one or more specific sensors to specific element subset, you can give cell array with SensId of sensor to match in a first column and with element string selector in a second column.
model=fe_case(model,'SensMatch',Name,{SensIdVector,'FindEltString'});

This is illustrated below in forcing the interpolation of test node 1206 to use FEM nodes in the plane where it is glued.

 cf=demosdt('demo gartte cor plot');
 fe_case(cf,'sensmatch -near')
 fecom('curtabCases','sensors');fecom('promodelviewon');
 % use fecom CursorSelOn to see how each sensor is matched.
 cf.CStack{'sensors'}.Stack{18,3}
 % modify link to 1206 to be on proper surface
 cf.mdl=fe_case(cf.mdl,'SensMatch-near',...
     'sensors',{1206.02,'withnode {z>.16}'}); 
 cf.CStack{'sensors'}.Stack{18,3}
 % force link to given node (may need to adjust distance)
 cf.mdl=fe_case(cf.mdl,'SensMatch-rigid radius .5','sensors',{1205.07,21}); 
 cf.CStack{'sensors'}.Stack{19,3}

 fecom('showlinks sensors');fecom('textnode',[1206 1205])

DofLoadSensDof

The generation of loads is less general than that of sensors. As a result it may be convenient to use reciprocity to define a load by generating the collocated sensor. When a sensor is defined, and the topology correlation performed with SensMatch, one can define an actuator from this sensor using
model=fe_case(model,'DofLoad SensDof',Input_Name,'Sens_Name:Sens_Nb') or for model using superelements
model=fe_case(model,'DofLoad SensDofSE',Input_Name,'Sens_Name:Sens_Nb').
Sens_Name is the name of the sensor set entry in the model stack of the translation sensor that defines the actuator, and Sens_Nb is its number in this stack entry. Input_Name is the name of the actuator entry that will be created in the model stack. It will be a DofLoad entry.

Animation of sensor wire-frame models

This is discussed in section 2.2.4.

Obsolete

SDT 5.3 match strategies are still available. Only the arigid match has not been ported to SDT 6.1. This section thus documents SDT 5.3 match calls.

For topology correlation, the sensor configuration must be stored in the sens.tdof field and active FEM DOFs must be declared in sens.DOF. If you do not have your analysis modeshapes yet, you can use sens.DOF=feutil('getdof',sens.DOF). With these fields and a combined test/FEM model you can estimate test node motion from FEM results. Available interpolations are

At each point, you can see which interpolations you are using with
fe_sens('info',sens). Note that when defining test nodes in a local basis, the node selection commands are applied in the global coordinate system.

The interpolations are stored in the sens.cta field. With that information you can predict the response of the FEM model at test nodes. For example

 [model,def]=demosdt('demo gartte cor');
 model=fe_sens('rigid sensors',model); % link sensors to model
 % display sensor wire-frame and animate FEM modes
 cf=feplot; cf.model=model; cf.sel='-sensors';
 cf.def=def;fecom(';undefline;scd.5;ch7')

©1991-2009 by SDTools
Previous Up Next