Truth tables implement combinatorial logic design in a concise, tabular format. Truth tables are supported only in Stateflow® blocks in a Simulink® model. For more information, see Reuse Combinatorial Logic by Defining Truth Tables.
You can use truth tables to map fault conditions of a system directly to their
consequent actions. For example, the model
maps the fault conditions and actions using a truth table. For details on this model,
see Fault Detection Control Logic in an Aircraft Elevator Control System.
The fault detection system for the aircraft elevator control system has these requirements.
Hydraulic pressure 1 failure
While there are no other failures, turn off the left outer actuator.
Hydraulic pressure 2 failure
While there are no other failures, turn off the left inner actuator and the right inner actuator.
Hydraulic pressure 3 failure
While there are no other failures, turn off the right outer actuator.
Actuator position failure
While there are no other failures, isolate that specific actuator.
Hydraulic pressure 1 and left outer actuator failures
While there are no other failures, turn off the left outer actuator
Hydraulic pressure 2 and left inner actuator failures
While there are no other failures, turn off the left inner actuator.
Hydraulic pressure 3 and right outer actuator failures
While there are no other failures, turn off the right outer actuator
Multiple failures on left hydraulics and actuators
Isolate the left outer actuator and the left inner actuator.
Multiple failures on right hydraulics and actuators
Isolate the right outer actuator and the right inner actuator.
Intermittent actuator failures
If an actuator has been switched on and off five times during operation, isolate that specific actuator.
Logic to satisfy these requirements is constructed using two truth tables in the chart
Mode Logic; one for the right elevator
R_switch), and one for the left elevator
L_switch). This truth table is for the left elevator.
The first requirement indicates that if a failure is only detected in the hydraulic
pressure 1 system, turn off the left outer actuator. This requirement is represented in
D1 in the truth table. If there is low pressure in the
hydraulic system 1, then
D1 specifies that action
2 is performed. Action
2 sends an event
go_off to the left actuator,
Similarly, the other requirements are mapped to the appropriate actions in the truth
table. For example, if the left outer actuator fails,
3 sends the event
Actuators.LO to isolate the
The truth tables are called at entry(
du) actions for the chart so that fault checks execute at
each time step.