A Perceptive Mannequin Flag Operator

In road construction, in particular on a bustling highway, an operator is needed to alert the drivers to decelerate the speeding vehicles. In doing so, an operator is asked to stand at a safe place, some distance from the construction site and to wave a small flag. Although the flag is light, prolonged waving flag cause tiredness to the operator. If the operator stops shaking, the safety of his co-workers is at risk. It is a straightforward thinking that replacing a human operator with a robot operator is a good choice while keeping the human-like figure. The presence of a human figure effectively alerts the drivers as compared to object signs or signal lights. This paper presents a robotic, human-like figure that performs a simple one axis controlled flag waving task. It comes with a monocular vision that video streams the oncoming vehicles. A program is written in Python language with SimpleCV module that processes the video data. A signal is sent to the controller upon detecting the approaching vehicles. As a result, the robot operator would move its arm, thus waving a flag as a warning signal. A pneumatically powered actuator drives the arm. The robot operator was tested in a controlled environment where the results showed that it has a potential for field implementation.


Introduction
In road construction, in particular, on a bustling highway, an operator is needed to alert the drivers to decelerate the speeding vehicles. In doing so, an operator is asked to stand at a safe place, some distance from the construction site and to wave a small flag. Although the flag is light, prolonged waving can cause tiredness to the operator. If the operator stops shaking, the safety of his co-workers is at risk. It is a straightforward thinking that replacing a human operator with a robot operator is a good choice while keeping the human-like figure. The presence of a human figure effectively alerts the drivers as compared to object signs or signal lights.
In humanoid robot (HR) design practice, certain values need prioritize. Such method includes the notion of safety and security, expressivity, believability, and organic [1]. It is suggested that extrovert, sympathetic, and enthusiastic are the traits that HRs should possess so that they are more efficient in human decision-making [2].
Moreover, HRs with soft tissues are well suited for tasks that heavily involve with the environment, especially in the medical environment where contacts with patients are imminent [3], and are more accepted by humans if they are human-like [4]. Studies suggest that facially expressive robots are effective as therapeutic tools for children with Autism Spectrum Disorder and tend to be more accepted by children if the robots are smaller [5]. It seems that HRs have gained social acceptance. So, it is fair to predict that robots will replace some jobs by 2025 [6].

Background
Application of a robot operator is not new. The kind of operator is used in numerous road, and highway construction and repair works. It is known as BOB in Malaysia, Flagman in New York, Anzen Taro in Japan. The BOB (Boneka Operator Bendera-"Mannequin Flag Operator (MFO)"), for example, is developed by UEM Group a corporation that involves in major construction works in Malaysia. BOB's design is meant to operate regardless of the traffic conditions. Upon energized, BOB waves the flag continuously, if not intervene, until the power supply depletes.
Suppose an instrument is installed to the MFO system that induces signals only when incoming vehicles are detected. Using the signals as input, the MFO would act only when moving objects are approaching. What kind of instruments that suit this idea?
Most transducers work within short ranges. Transducers like radars and ultrasonic work well for long ranges. Video cameras, on the other hand, provide frames of images that contain data worthy of interpretation. The device can be made to function as range finder if its frames of images are analyzed and manipulated correctly using distinct computational approaches, provided that, the camera is installed according to the prescribed techniques.
An obvious advantage of a video camera is the ability to deliver data that may be used to identify distinct characteristics of an object. For example, a vision system may be used to seek for signs of body discomfort when monitoring a human operator while working [7]. Based on the recorded video, a human operator may exhibit symptoms of body discomfort deduced from the curves' patterns of image histograms. [8].
For that reason, a vast majority of HRs in the market have some vision techniques applied for effective perception, in addition to, social acceptance. ZENO R25 is one such robot designed to be used as a social robot. It is a 22-inch high with a 10-pound dynamo robot that is capable of grasping an object, walking, and talking [9]. Another example is the Robovie, a robot stationed in a shopping mall, gains acceptance by visitors as a mascot instead of a utility [10].
Some major cities in the world are embracing the concept of the smart city. A smart city is made of powering, securing, lighting, greening, and transport. There is a rise of autonomous vehicles development and is expected to be found on the roads in the future. The autonomous vehicles, however, should only be used on dedicated roads to avoid accidental collisions [11].
Implementing an MFO in this environment would require a robust HR that should be made to function within the cloud robotics protocols [12]. Indeed, the MFO should possess a level of awareness to the surrounding [13]. Such knowledge, on the contrary, is absent for the robot that guides the traffic in the city of Kinshasa.

System Models
Our MFO is shown in Figure 1. It is a human skeleton model, six feet tall, decorated with construction outfits to achieve human-like figure. A wheeled stand made of steel and aluminum profiles is where the MFO is secured. It also holds pneumatic system and a portable air compressor. A separate rack is where the computer and electrical control modules are placed. A webcam is attached to the hard hat.
The MFO system has four subsystems distinguished by their unique functions and devices used. Subsystem 1 (SS1) represents the electrical controls where all the hard-wiring are realized. Devices used are relays and switches. The system operates on electrical energy.
The overall weight of the system is somewhat heavy. In the occasion of lifting it, four healthy young men would handle the job efficiently. As of the existing MFO design found elsewhere, we do not have access to the weight of the system. We suspect that they are lighter as compared to ours because they only apply a battery with a motor and some linkages and no vision system. Subsystem 2 (SS2) represents the electro pneumatics where the output torque to swing the MFO's arm is realized. Devices used are solenoid actuated directional control valves, manually actuated directional control valves, rotary actuator, flow control valves, service unit, air compressor. The system operates on electrical, potential, kinetic energies.   System 4 (SS4) represents the arm mechanics where the constraints in the arm are modeled. A device used is the left arm of a human skeleton model. It operates on potential and kinetic energies. Table 1 lists the devices and tools with the respective notations.

Subsystem 1-Electrical Controls
The electrical control circuit realizes the discrete events of pre-actuators through switches, see Figure 4. These devices accept and provide TRUE or FALSE signal, listed in Table 1 as {KA1, KA2, KA3, STR, STP, EMR}.
The system's outcome is to energize SOL-1 or SOL-2 but not both at the same instance. The solenoid-actuated DCV would shift position accordingly. The solenoids are energized subject to the system's logic conditions. The system is in a ready state when the 24-VDC supply is initialized.
Upon depressing the STR, the system would first have the relay KA-1 energized thus conforming to Equation (1). It involves the state of the EMR, STR, STP, and a contact of KA-1.
The state of KA-2, however, depends on the state of KA-1 and KA-3. It is defined in Equation (2).
The status of KA-3 depends on the signal from the USB-RS232 port. It is energized as long as the product of the interface circuit gain and the output voltage for the COM port is far greater than zero. It is defined in Equation (3). The solenoids' state would depend on the state a priori, hence Equation (4).
(3) (4) Figure 3. The computer interface was developed using Python language with the vision module, SimpleCV. On the right-hand side is the graphic user interface for system execution. The console on the top left-hand side is the text-based status monitoring window, while below it is SimpleCV graphic window that displays gray scale video data frames

Subsystem 2-Electro pneumatics
The aim of the electro-pneumatic circuit is to produce rotary motion using a rotary actuator (RA). This movement offers a certain amount of torques allowing the waving motion. The hardware installation is shown in Figure 3. Since the MFO has an active joint, only a rotary actuator is used.
An MFO is designed to work on sites such as the construction and the road traffic areas. It is stationed alone and away from the pedestrian. The decibel level in busy road traffic is somewhat within around 70 dB [14]. The noise level produces by the pneumatic devices is as much as the road traffic's noise level. The issues of noise and vibration levels produced by the MFO are negligible because the surrounding is already noisy.
Devices applied in this system accept and deliver clean, compressed, and regulated air pressure and flow. With proper and careful tuning, the result is the RA oscillates back and forth. From Table 1, the devices are represented as {RA, DCV, FCV1, FCV2, EMV, and SOV}. They can be found in Figure 4, naturally stated in the electro-pneumatic circuit.
The RA's direction of rotation subjects to the logic state of the upstream devices. Upon initializing the air compressor, the compressed air is stored in a tank until enough pressure has built up. As the pressure is released to channels, the downstream flow (q) and pressure (p) develop. With p and q existing, the system is in a ready state.
When RA has enough pressure builds up with sufficient flow, by definition of Equation (5), it would either rotate clockwise (CW) or counter-clockwise (CCW). It produces CW and CCW oscillation. For the RA to work well, some logic expressions must be attained. These are expressed in equations (6), (7), (8), and (9).

Subsystem 3-Computer Interface
The computer interface subsystem handles the process for decision making which task is to determine the presence of incoming objects. The captured video frame data shall be treated by special algorithms written in Python scripts with SimpleCV module. Figure 4 describes the user interface, monitoring, and video streaming windows upon executing the program.   The user interface has one menu bar "Fail" (File) that contains three sub-commands used to initialize, end, and quit the application. If the COM port and the Webcam are identified and are working properly, then the application initiates two pop-ups: console, and SimpleCV graphic windows. It is expressed in Equation (10). (10) Let individual frame of a video frame data denoted as f i . Suppose a threshold is set to determine if there exists the difference of the streaming frame data. At an instance, if there is a difference between two data sets such that the average difference is larger than the threshold (h) then the camera records video data frames of the approaching vehicles. The conditions are expressed in Equation (11) and Equation (12).

Subsystem 4-Arm Mechanics
The arm mechanics dictates the constraints to the mechanic of swinging. Suppose that the prior subsystems function well, the MFO's arm is now ready to do the work. The required load torque (ML) must overcome the opposing moments where RA is closely mounted, which defined in Equation (13). It defines the generalized load moment delivered by the RA; where ∆v is the volume difference, J is the reduced moment of inertia, bω is the viscous friction coefficient, MF is the resistance torque, Φ is the angle of rotation. With sufficient pressure differentials, the load torque can overcome the resistances. As a result, the arm swings. (13) There are two possibilities in regards to vector direction. It is expressed in Equation (14) where the load moment may have a CW or CCW direction of rotation. Equation (15)

Discussion
The mathematical models in the previous session may be simulated using an appropriate computer algebra system (CAS). In this study, wxMaxima was used to evaluate the logic status of the outputs given inputs state. The evaluation was done by realizing equations (1) through (9) with proper scripts. Equations (10) through (18), nonetheless, were meant to explain the whole system by abstraction is given the results from equations (1) through (9).
With the power supply was in readiness, depressing the STR would initiate the system where KA-1 would be the first pre-actuator to energize. The relay would maintain its status even if STR would be released. The rest of the pre-actuators would excite thus allowing a forward flow of the pressurized air.
There is a format of the state that defines the forward and the reverse flows. This was written as, for SS2, STATE_SS2_INPUT {SOV, EMV, false, true, true, false}. On the contrary, depressing either EMR or STP would de-energize KA-1.
The state KA-1= {true} and how this was realized in the wxMaxima environment is shown in Table 3. It simulates Equation (1) that also depicts the status for contact ka11 and ka12 that belong to KA-1. Sections %o15, %o16, and %o17 present the outputs for KA1, ka11, and ka12, respectively. The results agree with Equation (1). Table 3. Equation (1) was written in wxMaxima standard scripts. The results are shown under %o15, %o16, and %o17 were the outcomes from %i17 of KA1, ka11, and ka12. This subroutine is a continuation from the scripts in Table 2 Equation (1) (2) and Equation (3). So, SS1 in Figure  4 should function well.
The state of the solenoids is dependent upon the state of the relay contacts belong to KA-2, defined in Equation (4). So the output of %o28 shown in Table 5 was {true} for SOL1 but {false} for SOL2 of %o29. The solenoids belong to a bistable DCV that either one of them should energize, but not both at the same instance, for the DCV to shift position.
In this case, the dcv+ position should shift, as defined in Equation (8) and as resulted in %o30. When this occur, there exist a rapid air pressure change between the valve's inlet and outlet ports that should produce inrush air velocity toward the port of the rotary actuator. It was the forward flow.  (9), where FCV_A is forward-flow, while FCV_B is reverse-flow. For the given inputs FCV_A should become {true} and FCV_B {false}. Table 6 exhibits the outcomes proving Equation (9). With the %i33's scripts, the results were %o32 {true), %o33 {false}, hence forward flow. At this stage, it is imperative that the outcome of the systems downstream be determined. How the rotary actuator would react to the incoming air flow is expressed in equations (5), (6), and (7). We assumed that the RA would rotate CW with the assigned inputs. With forward flow was confirmed, ra+ should yield {true}, whereas ra-{false}. This is verified from %i35 in Table 7 where the state for ra+ {true} and ra-{false} in %o34 and %o35, respectively. Table 7. In determining the pairwise condition for the direction of rotation. Equation (6) and Equation (7)   The status of RA is dependent on ra+ and ra-. The pairwise result from Equation (6) and Equation (7) dictates the status of RA. When the pairwise result is {ra+, ra-} = {true, false}, it signifies that RA proceeds with a CW rotation. Similarly, if it is {false, true}, it continues with a CCW rotation. Otherwise, RA stalls. The CW rotation was verified from %o36 where the pairwise outcome was {true, false}.
It can be deduced that with a certain combination of inputs, a different outcome is expected at the system's downstream. It is expressed in (19) assuming the necessary conditions are fulfilled.
Now that the mechanical device, RA produces work, it is straightforward that the mechanics involve in the action is expressed for SS4. In SS3, however, before a signal is received from the COM port, the program needs to run a decision-making routine that computes every image frame data. Once incoming vehicles are detected, G INT V comout should produce enough potential, hence {true}.
The RA would do work as long as there is sufficient pressure in its chamber. The amount of torque required to swing the MFO's arm must overcome the constraints defined in Equation (13). The swing pace depends on the FCVs' tuned orifice.

Conclusions
The system discussed in this paper was designed to the simplest architecture. It is the idea that it will be easy to operate and maintain. As for the logic expressions, they are meant to serve as the guides, mathematically expressed to describe how the subsystems function. Using the expressions, the system can be restructured with: an IoT architecture, a different type of actuation method, a higher speed machine vision, and more efficient computational routines. The MFO was tested in a controlled environment where the results showed that it has a potential for field implementation.