Smart Robot Decision Logic
Complex decision-making circuit using multiple gate types. Robot logic with sensors, NOT gates, AND gates, and OR gates for intelligent behavior.
学べること
- Translate a sensor-based decision policy into a Boolean expression.
- Combine AND, OR, NOT to encode "all of these" and "none of these" conditions.
- Read the truth table of the resulting decision logic.
- Apply the same pattern to safety interlocks and machine policy.
- Recognise when to use Karnaugh maps to simplify large policy expressions.
仕組み
A simple decision logic circuit takes several sensor inputs and produces an action signal based on a Boolean policy. This template models a small robot that decides whether to move forward based on rules like: - Move forward = path-clear AND battery-OK AND NOT obstacle-detected
With 3+ binary sensors, the policy expression is a Sum-of-Products: each AND term covers one valid scenario; the OR aggregates them. Inverting any sensor introduces a NOT.
Designing the policy means writing the truth table for desired behaviour, then synthesising a Boolean expression. For more complex rules, Karnaugh maps simplify the expression to fewer gates. Here, the expression is intentionally readable: AND-of-conditions with negations where appropriate.
This is the same pattern used in safety interlocks, machine state checks, and automotive driver-assist logic — sensor inputs drive a Boolean policy that decides whether an action is permitted.
真理値表
Action = PathClear AND BatteryOK AND NOT Obstacle. Showing 4 representative cases.
| 入力 | 出力 | ||||
|---|---|---|---|---|---|
| PathClear | BatteryOK | Obstacle | Override | Move | |
| 1 | 1 | 0 | 0 | 1 | All clear — robot moves |
| 0 | 1 | 0 | 0 | 0 | Path blocked — stop |
| 1 | 1 | 1 | 0 | 0 | Obstacle ahead — stop |
| 1 | 0 | 0 | 0 | 0 | Battery low — stop |
| 0 | 0 | 1 | 1 | 1 | Override forces move (use with caution) |
ブール式
Sum-of-Products: normal motion conditions OR an override switch.
Stop signal — inverse of Move. Used to drive brake circuits.
順を追って試す
上の埋め込み回路で入力を設定し、期待される結果と一致するか確認しましょう。
- 1PathClear = 1 BatteryOK = 1 Obstacle = 0 Override = 0期待値:
Move = 1観察ポイント: Normal driving conditions — all permissions met, no obstacle. Robot moves forward. - 2PathClear = 1 BatteryOK = 1 Obstacle = 1 Override = 0期待値:
Move = 0観察ポイント: Obstacle detected — even with path clear and battery OK, the NOT(Obstacle) condition fails. - 3PathClear = 0 BatteryOK = 0 Obstacle = 1 Override = 1期待値:
Move = 1観察ポイント: Override switch forces motion regardless of sensors. Useful for manual recovery from sensor failures — but bypasses safety! - 4PathClear = 1 BatteryOK = 0 Obstacle = 0 Override = 0期待値:
Move = 0観察ポイント: Battery low — robot won't move. Safety policy prevents stranding the robot in low-power state.
使用コンポーネント
実世界での応用
Industrial safety interlocks. "Allow press to fire if all guards closed AND e-stop released AND two-hand-button pressed." Pure AND-of-conditions.
Automotive cruise-control engagement. Engages only if speed > threshold AND brake not pressed AND clutch not pressed AND no fault detected.
Robotics motion authorization. Move-forward signal gated by clear-path, battery-OK, no-emergency-stop, mission-active. AND-of-conditions with negations.
HVAC control. Heat compressor on if thermostat-call AND not-defrost AND not-overheat-fault AND power-OK.
Embedded firmware policy logic. Many embedded systems implement decision trees as Boolean expressions evaluated each control cycle.