Algorithm 1: Pseudo code for Hardware-Based human localization |
Initialize sensory fusion distance data
always @ (posedge clk) begin
{PIR, Human available, Position values, Two Positions, Sleep posture, sitting posture, one hot} = 0.
state = INIT.
Case (state)
State_1: (PIR = 1)? Human available: state.
Case (Human available)
State_11: (Position values > Two Positions) Sleep posture: Sitting posture.
Case (Sleep posture)
State_1a: (Posture = 6′b111111)? Supine: State_1b.
State_1b: (Posture = 6′bxx0101)? Right side posture: Left side posture.
Case (Sitting posture)
State_1as: (((Position && Time) = Static)? State static: Adaptive.
Case (State static)
State_a1: (Position = one hot)? State_a2: Aliasing_pose.
State_a2: (Position = 6′dx)? Position Binary Classifier: state.
Case (Aliasing_pose)
State_b1: (Position = 6′dy)? Position Binary Classifier: state.
Case (Adaptive)
State_b11: if (count && CP == end position) begin
count && CP <= start position.
else {count <= count + 1, CP <= CP + 1}, {PP_n = CP}.
State_b12: (count = 0)? State static: State_b14.
State_b13: (CP = PP)? State static: State_b14.
State_b14: (CP = PP_n)? Position Binary Classifier: State b15.
default: state = INIT.
end case, End.
|