.FaultTriggering.UsersGuide.Tutorial.FaultModelSetup

Information

To show how the FaultTriggering toolbox works, a complete rotational actuator model with faults including a load is prepared.

General Model


The actuator model is built of 2 main parts, the motor and the driveline. In the motor the following faults are implemented:

  1. Winding Fault (Integer Fault): the motor torque constant is reduced with the fault level
  2. Sensor Fault (Boolean Fault): Disconnects the sensor output.

The driveline has following faults:

  1. Driveline disconnect (Boolean parameter fault): disconnects the driveline
  2. Drive friction (Real fault)
  3. Sensor Fault (Boolean parameter fault): Disconnects the sensor output.
  4. Bearing Fault (Boolean fault); using the advanced model reconfiguration functions.

Model for use with Dymola

The faults in the model Actuator can be found and triggered using the function FaultTriggering.createFaultPackage. This function can be called (right click on function --> call function) and needs 4 inputs:

  1. modelName (name of the model that should be analyzed)
  2. scriptName (name of the script that stores all model information)
  3. packageName (Name of the Fault package created by the function)
  4. maxSearchSize (the maximum number of elements in the model for pre-allocation of the vectors)


Note that "maxSearchSize" must be set so that all model components can be allocated. If this is not big enough, the error "getAllModelComponents: the pre located size of the vectors is not big enough. Please increase maxSearchSize" will be issued.

Calling FailureProcessing with the default inputs leads to an overview of all faults in the model. To get the default values, the model is translated. Therefore only complete models that can be translated can be used.


The faults are sorted between Parameter Faults and Variable Faults. In each "Fault Names" subset the name and some of the properties of the fault are given.

In the "Fault values" subsets the properties of the fault can be set. In the example shown above the boolean variable faults are shown. It can be seen that both boolean faults are in the driveline: A disconnect and an speedsensor fault. Below the setup for the mode selection of the variable faults is shown. The setup of these modes is only necessary for faults where mode selection is triggered.

In the variableFaults part, the mode selection parts can be set and are treated as parameters.

All the settings made in the GUI are also saved into a plain text file "scriptName". A plain text modelica script is generated, which summarizes all settings:

driveline.friction.externalRealFault.faultIndex=1;//RealIndex%
driveline.friction.externalRealFault.faultMode=1;//RealMode%
driveline.friction.externalRealFault.externalFaultOn=1;//Boolean%
motor.ktFault.externalIntegerFault.faultIndex=1;//IntegerIndex%
motor.ktFault.externalIntegerFault.faultMode=1;//IntegerMode%
motor.ktFault.externalIntegerFault.externalFaultOn=1;//Boolean%
motor.speedSensor.externalBooleanFault.faultIndex=1;//BooleanIndex%
motor.speedSensor.externalBooleanFault.faultMode=1;//BooleanMode%
motor.speedSensor.externalBooleanFault.externalFaultOn=1;//Boolean%
driveline.bearing.fault.externalBooleanFault.faultIndex=2;//BooleanIndex%
driveline.bearing.fault.externalBooleanFault.faultMode=1;//BooleanMode%
driveline.bearing.fault.externalBooleanFault.externalFaultOn=1;//Boolean%
driveline.disconnect.constBooleanFault=0;//Boolean%
driveline.speedSensor.constBooleanFault=0;//Boolean%

This script can be directly run in Dymola (and probably also other Modelica simulators) to set the values of the faults. It is also possible to modify this script for other purposes.

Moreover a library is generated and saved. In this library, the topmost model, which is named "<ModelName>+Package" is included. This model extends the original model and includes an inner model to control all variable faults as well as an paramter "FaultRecord" that controls all paramter faults. All values given in the GUI will be set. Manually editting can be by editting the faultTrigger block in the "<ModelName>+Wrapper" model. The the moment Dymola 2013FD01 has problems wenn single entires are changed in subrecords. If problems exist, the FaultRecord- Record has to be directly editted by hand.

An example of such a generated library is given in FaultTriggering.Examples.ActuatorExample.ActuatorFaults.

Using the Fault toolbox in Simulink

To use the fault toolbox with Simulink the model has to be set up like before, however, the faultbus should be defined as an input. FaultsInput in the FaultBus package is a predefined input connector.

After the model is prepared in Dymola, it can be set up as usual in simulink. Please refer to the dymola documentation on how to set up dymola models in Simulink using a "DymolaBlock".

Revisions

Copyright
© 2012-2015, DLR Institute of System Dynamics and Control

Generated at 2024-04-28T18:16:21Z by OpenModelicaOpenModelica 1.22.3 using GenerateDoc.mos