
Humanoid robot development has long served as a focal point for researchers who seek to understand human motion, perception, and interaction. Among the many subsystems that define a humanoid robot, the head occupies a special position because it carries visual, auditory, and expressive functions. A research effort focused on the humanoid robot head has examined several possible mechanical configurations, developed a four-degree-of-freedom structure, implemented a sound localization method using two microphones and computer sound cards, and built a servo control system using a multi-axis motion controller. The work illustrates how a humanoid robot head can be designed with relatively simple mechanical principles while still supporting essential sensing and control functions.
The humanoid robot is not merely a machine that resembles a person. It is a platform for integrating mechanics, electronics, control theory, sensing, artificial intelligence, and biomimetics. The research described here concentrates on three parts of the humanoid robot head: structure and drive, sound localization, and control. These parts form a foundation for future integration with image acquisition, olfactory processing, and central processing. The resulting humanoid robot head is intended to move in ways that resemble human neck and jaw motion, to determine the direction of a sound source, and to execute precise angular commands through servo motors.
1. The Humanoid Robot Research Landscape
Humanoid robot research has evolved through decades of work in Japan, the United States, Europe, and China. Early biped robot research at Waseda University under Professor Ichiro Kato began in 1968 and produced the WL-5 biped walking robot in 1971. That machine used hydraulic drive, had multiple degrees of freedom, and moved in three dimensions. It weighed 130 kg, stood 0.9 m tall, could carry a 30 kg load, and achieved a 15 cm stride with a 45-second static walking cycle. Later Waseda machines, including WL-9DR, WL-10RD, and WL-12R, advanced the study of quasi-dynamic and dynamic biped walking. The WL-9DR used pre-designed walking patterns and achieved a 45 cm stride with a 9-second quasi-dynamic cycle. The WL-10RD used ankle joint torque control and achieved a 43.18 cm stride with a 1.35-second stable dynamic cycle. The WL-12R had eight degrees of freedom and used torso motion to compensate for lower-limb movement, achieving a 1.35-second walking cycle and a 30 cm stride on flat ground.
Japanese researchers also developed the Kenkyaku-1, Kenkyaku-2, BLR-G1, and BLR-G2 biped systems. Kenkyaku-1 was a five-link planar walking machine with four forward joints. Kenkyaku-2 added two ankle joints and used gravity without ankle torque input to achieve dynamic walking with a 0.7 to 1.0 second cycle and a 35 to 45 cm stride. BLR-G1 and BLR-G2 were three-dimensional biped mechanisms. These projects contributed important knowledge about balance, gait generation, and dynamic stability, all of which remain relevant to humanoid robot design.
Honda began its humanoid robot program in 1986. The company’s early walking robots, P1, P2, and P3, moved the field toward more human-like form and behavior. P2 was introduced in December 1995 and used battery power and wireless control. It could walk dynamically at 3 km/h, climb stairs, and push objects. P3 was introduced in December 1997 and reduced weight from 210 kg to 130 kg and height from 1800 mm to 1600 mm. P3 used magnesium materials and relied on gravity sensors and foot tactile sensors to judge ground conditions and maintain balance. In November 2000, Honda introduced ASIMO, which stood 120 cm tall and weighed 43 kg. ASIMO was designed for smaller, lighter, and more compact movement, with improved biped walking technology that included predictive motion control and real-time flexible walking. These humanoid robot milestones demonstrated that a humanoid robot could move in human living spaces, although full practical autonomy remained a long-term goal.
Sony introduced the Sony Dream Robot-3X, or SDR-3X, in January 2000. It stood 50 cm tall, weighed 5 kg, and could walk at 15 m/min. It was designed for entertainment and could dance to music, stand up from a prone or supine position, stand on one leg, walk on uneven surfaces, and recognize up to 20 voices and colors. It also had sound synthesis and image recognition functions. The HOAP-1 humanoid robot from Fujitsu was used in research at Tokyo University of Science, where a system for walking, voice recognition, and presentation was installed. That humanoid robot acted as a guide and lecturer, moving on stage and answering audience questions.
In the United States, MIT Artificial Intelligence Laboratory began anthropomorphic robot research in 1993 with the goal of enabling a humanoid robot to work in unknown environments and understand natural human cues such as nodding and eye contact. The Kismet robot head, developed by Cynthia Breazeal, had three degrees of freedom in the eyes, three in the neck, and fifteen in facial expression, including eyebrows, ears, eyelids, lips, and mouth. Kismet used narrow-field cameras for recognition and visual servoing and wide-field cameras for searching and tracking. Its processing system included commercial computers running QNX and four Motorola 68332 microcontrollers. Kismet could display nine expressions, including happiness, sadness, surprise, tiredness, anger, calm, unhappiness, fear, and interest. MIT’s Cog robot represented a later cognitive robotics platform. Cog had a head, torso, arms, and hands, but no legs. Its head had seven degrees of freedom, each arm had six degrees of freedom, and the torso had three joints. Cog used cameras, microphones, strain gauges, potentiometers, limit switches, pressure sensors, and temperature sensors. Its control system was a heterogeneous network of processors rather than a single central brain, with digital signal processor networks for audio and vision and a core control network running QNX. Cog’s auditory system used a pair of hearing-aid-like microphones with stereo sampling at 22.5 kHz and 8-bit data. Sound localization had been completed, and research continued on separating multiple sound channels.
Japan’s Waseda University developed the WE-3 humanoid robot head and later improved versions such as WE-3RV and WE-4. WE-3 could recognize target positions, track targets, adapt to brightness changes, determine the three-dimensional location of sound, and distinguish touching, hitting, and collision through tactile sensors. WE-3RV added olfactory sensing and color facial expressions. It had four degrees of freedom in the neck, four in the eyes, six in the eyelids, eight in the eyebrows, four in the lips, one in the jaw, one in the lung mechanism, and twenty-eight degrees of freedom overall. It used CCD cameras, microphones, force-sensitive resistors, temperature sensors, and semiconductor gas sensors. WE-4 increased the total degrees of freedom to twenty-nine by adding one waist degree of freedom. Its head could turn 160 degrees, pitch 70 degrees, and swing 90 degrees, with axis speeds similar to a human head at 160 degrees per second. WE-4 could express seven basic emotions and additional modes such as shyness and drunkenness, with fifty intensity levels for each expression.
The University of California, San Diego, developed an anthropomorphic robot head with a stereo vision system around 2002. That head had nine degrees of freedom: two in the neck for turning and pitching, four in the eyes for horizontal and vertical movement, one for mouth opening, one for mouth corner movement, and one for eyebrow movement. The CCD cameras used IEEE 1394 interfaces, and the motors were ordinary servo motors used in remote-controlled cars and aircraft. Some joints were driven through four-bar linkages, which introduced nonlinearity between motor angle and joint angle and created control challenges. Sound and speech research was also planned.
In China, humanoid robot research began later but produced important results. Harbin Institute of Technology developed the HIT-H biped robot in 1989, which could walk forward, walk sideways, turn, climb stairs, and go up slopes. The National University of Defense Technology developed the KDW-I planar six-degree-of-freedom biped robot in 1988, which could move forward, backward, and climb stairs. In 2000, the same institution introduced the Forerunner humanoid robot, described as China’s first true humanoid robot. Forerunner had a human-like body, head, eyes, arms, and legs, with limited speech function and dynamic walking capability. It stood 1.4 m tall and weighed 20 kg. Beijing University of Aeronautics and Astronautics developed the BH-1 dexterous hand under Academician Zhang Qixian. The hand had three fingers, each with three joints, for a total of nine degrees of freedom. Beijing Institute of Technology developed a humanoid robot capable of performing Tai Chi movements. The Hui Tong humanoid robot stood 1.60 m tall, weighed 63 kg, and had a total of twenty-eight degrees of freedom. It carried force sensors, vision sensors, accelerometers, inclinometers, and encoders, and could walk forward, backward, sideways, turn, and climb stairs. It was reported to be the first humanoid robot to imitate complex human movements such as Tai Chi and broadsword routines.
Humanoid robot head research has been less extensive in China. Beijing Institute of Technology developed a robot head with visual function and three degrees of freedom for turning, swinging, and pitching. It used an SVS stereo vision system as the eyes. The system combined a Windows platform for image processing and an RT Linux platform for motion control, using two computers and Memolink communication. Tsinghua University developed the THBIP-I humanoid robot and completed lower-limb structure and sensor control, while upper limbs and head were still under development. Its head used two degrees of freedom for pitch and rotation, and its vision system used two Panasonic digital cameras connected through USB. The humanoid robot had a speech recognition system for human-machine communication.
Sound localization for humanoid robot systems has also advanced. Many robot perception papers focus on vision, ultrasound, infrared, or laser ranging, while auditory processing is less common. Visual, auditory, and motor integration is important for social interaction. Robots such as Kismet and ROBITA have used microphones for localization and speech recognition, but motor noise and reverberation remain difficult problems. Microphone arrays and particle filters have been used. Some systems use multiple microphones mounted on the robot body, while others use active audition, in which the humanoid robot moves its head to improve localization. Waseda’s SIG humanoid robot, for example, used two pairs of microphones: one pair outside the head cover for external sound and one pair inside for motor noise. It used HRTF and interaural level or time differences to localize a single sound source. MIT’s Cog used a pair of omnidirectional microphones and trained auditory localization with visual information. These examples show that sound localization in a humanoid robot is closely tied to head motion, visual attention, and noise control.
The research described in this report builds on that background. It addresses a humanoid robot head with four degrees of freedom, a sound localization subsystem based on two microphones and computer sound cards, and a servo control system built around a multi-axis motion controller. The humanoid robot head is treated as an integrated platform in which mechanical structure, acoustic sensing, and motor control must be coordinated.
2. System Architecture of the Humanoid Robot Head
The humanoid robot head system was divided into six major parts: structure and drive, sound localization, control, image acquisition and processing, olfactory processing, and central processing. The work covered in this research focused on the first three parts. This division reflects the complexity of a humanoid robot head and the need to develop each subsystem while keeping the overall architecture open for future integration.
| Subsystem | Primary function | Included in the reported work |
|---|---|---|
| Structure and drive | Support the head, provide motion, and execute commanded positions | Yes |
| Sound localization | Capture acoustic signals and estimate the direction of a sound source | Yes |
| Control | Coordinate motors, feedback, and command paths | Yes |
| Image acquisition and processing | Capture visual information for recognition and tracking | Future integration |
| Olfactory processing | Detect and classify selected gases or odors | Future integration |
| Central processing | Fuse information and make decisions | Future integration |
The structure and drive subsystem acts as the platform for the humanoid robot head. Other subsystems complete their tasks on this platform, and the drive subsystem executes the resulting motion. The mechanical structure was built mainly from aluminum alloy to reduce weight and maintain sufficient strength. A universal-joint-like arrangement was used to achieve the required motion. The drive subsystem uses servo motors and amplifiers. Servo motors were selected for high control precision, high load capacity, small size, closed-loop control, fast algorithm execution, and favorable mechanical characteristics. In a conventional servo system, a gearbox is often placed between the motor and the mechanism, but gearboxes introduce friction, inertia, backlash, elasticity, and nonlinear transmission. These effects reduce operability and control bandwidth. For this reason, the humanoid robot head design removed gears and other transmission elements between the structure and the drive elements where possible, allowing the motor shaft to drive rotation directly. This simplified the structure, made it more compact, and improved control precision.
The sound localization subsystem uses two microphones to capture acoustic signals. A computer sound card converts analog signals into digital data that the central processing unit can handle. The system compares the two signals and estimates the direction of the sound source from the intensity difference and time difference. This information can be provided to the central processing unit, which may combine it with image processing results and then drive the execution elements through a unified software platform. In the reported work, the software platform was developed in a visual environment, and the sound localization result was displayed together with the captured waveforms.
The control subsystem uses a programmable multi-axis controller, the PMAC ZA-PC/104 from Delta Tau. This controller can implement four-axis to eight-axis high-precision synchronous motion control. It uses advanced PID and feedforward servo algorithms, supports linear and circular interpolation, and provides S-curve acceleration and deceleration. It can work based on a PC or independently, which makes it a widely used multi-axis controller. The choice of drive elements considered stepper motors and servo motors. Both can be controlled by the PMAC card, but they differ in performance and application. Stepper motors move in discrete steps, while digital servo systems increasingly use servo motors for high-precision position control. Because the humanoid robot head is ultimately intended for a mobile robot, DC servo motors were selected to support mobility and convenient power supply. The selected motors were Maxon DC servo motors, and the selected amplifiers were Copley Accelnet Micro Panel series amplifiers.
3. Mechanical Design of the Humanoid Robot Head
The humanoid robot head was designed to imitate the motion of a human head. A human head has many degrees of freedom, and reproducing all of them would make the structure extremely complex and difficult to implement with current technology. The reported design therefore chose four degrees of freedom: three in the neck and one at the jaw. The neck can turn left and right, pitch up and down, and swing left and right. The jaw adds a separate degree of freedom that contributes to head nodding and a more natural motion pattern.
| Parameter | Value |
|---|---|
| Neck degrees of freedom | 3 |
| Jaw degrees of freedom | 1 |
| Total degrees of freedom | 4 |
| Primary nodding range | -45° to +45° |
| Secondary nodding range | -45° to +45° |
| Width | 140 mm |
| Depth | 180 mm |
| Height | 380 mm |
Several possible structures were considered for achieving the required degrees of freedom. Some schemes placed the pitch axis and swing axis in different planes, while others made them intersect. Some schemes used a single extended shaft to support the head, which would require larger motors and would be less reasonable. Other schemes could not guarantee the relative positions of the motors, creating long cable runs and a risk of tangling. Still other schemes placed three degrees of freedom in the same line or plane, causing the overall structure to extend too far and creating excessive torque. In those cases, the motor at one end would have to bear the weight of the entire structure, requiring a larger motor and increasing size. A scheme with three axes not on the same line was also considered, but it was too complex and left too much reserved wiring. Remote drive was considered, but the added transmission mechanism would increase complexity, manufacturing difficulty, and cost. Direct drive was therefore selected.
The final humanoid robot head uses a universal-joint-like structure with two degrees of freedom plus one rotational degree of freedom. The nodding motion is divided into two levels: one at the neck and one at the jaw. This division makes the nodding action more natural and closer to the way a human head moves. It also reduces the range required from a single joint, making motor selection and control easier. The neck’s three degrees of freedom are achieved by modifying a universal-joint-like device. The structure provides left-right and up-down secondary swing motions, and the third degree of freedom, vertical rotation, is produced by a vertical motor in the neck. The jaw provides the additional degree of freedom. The arrangement keeps most motors relatively fixed, so power and signal wires are less likely to become tangled. Only the jaw motor and the vertical rotation motor move with the head.
The humanoid robot head structure was designed with light weight, simple construction, low moment of inertia, and symmetry in mind. These principles make motor selection easier. The head must carry two cameras, each weighing about 0.43 kg, for a total of about 1 kg including connectors and screws. Adding the olfactory system, head support structure, and shell brings the total weight to about 2 kg. The head dimensions are similar to a human head, so the moment arm is not large, and the required torque is about 2 N·m. Such torque is difficult for ordinary small motors, but high-performance motors can meet the requirement. The final assembly was made of aluminum alloy, which keeps weight low while providing sufficient strength. Compared with many international humanoid robot heads, the design has fewer degrees of freedom and a simpler structure. This simplicity is appropriate because the goal was to mimic neck and jaw motion rather than reproduce the full range of human facial expressions. The design therefore balances function, manufacturing feasibility, and cost.
4. Sound Localization Subsystem for the Humanoid Robot
Human hearing can determine the direction of a sound source by using differences between the two ears. These differences include time difference, intensity difference, and timbre difference. They are processed by the central nervous system and produce auditory localization. Psychological factors, precedence effect, and the shape of the ear also contribute to sound source localization.
The time difference is the difference in arrival time of the same sound at the two ears. If the sound source is far away, the sound waves reaching the two ears can be treated as plane waves. If the head is approximated as a sphere of radius a, and the angle between the sound wave and the plane perpendicular to the line connecting the ears is θ, the time difference can be calculated. For small angles, the relationship can be simplified as:
Δ t ≈ 2 a sin θ / c
and therefore:
θ ≈ arcsin(c Δ t / 2 a)
where c is the speed of sound in air, approximately 340 m/s, and the human head diameter is about 17 cm to 22 cm. The phase difference between the two ears is related to the time difference and the angular frequency of the sound. The intensity difference arises because the head blocks and attenuates sound waves that must travel to the far ear. The sound pressure or intensity is related to density, wave speed, amplitude, and angular frequency. Higher-frequency sound is attenuated more than lower-frequency sound, so the intensity difference is larger at high frequencies.
In human hearing, time difference is more important for low and middle frequencies, while intensity difference becomes more important at high frequencies. For a robot, sound localization requires accurate filtering and signal processing. Reverberation, reflections, and manufacturing errors can degrade performance. The interaural time difference is especially sensitive to interference, while the interaural level difference is somewhat more robust. Reflective surfaces absorb energy, and high frequencies are absorbed more than low frequencies, so direct sound usually has more energy than reflected sound.
The sound localization subsystem in the humanoid robot head used two electret condenser microphones, two sound cards, and computer-based processing. One sound card was an integrated card, and the other was an add-on card. The microphones convert acoustic pressure into electrical signals. Because electret condenser microphone output is weak, a preamplifier is needed. The sound cards amplify and preprocess the signals before they are captured by software.
| Element | Description |
|---|---|
| Microphones | Electret condenser microphones |
| Sound cards | One integrated card and one add-on card |
| Software component | DirectSound from DirectX |
| Development environment | Visual C++ 6.0 |
| Sampling frequency | 22050 Hz |
| Sample format | 8-bit mono |
| Frame length | 16384 bytes |
| Capture buffer length | 32768 bytes |
| Processing method | Cross-correlation of two channels |
The software uses DirectSound to capture audio data. DirectSound is part of DirectX and provides hardware abstraction rather than direct hardware manipulation. It allows applications to access audio hardware efficiently while remaining hardware-independent. The capture process includes enumerating capture devices, creating capture buffer objects, and handling buffer position notifications. Because two sound cards are installed, the system must detect each sound card’s corresponding capture device. The DirectSoundCaptureEnumerate function generates a list of available sound devices and passes device information to a callback function. The callback function’s IPG uid pointer uniquely identifies each device. The first enumerated device is always the primary sound driver, and subsequent devices correspond to actual sound cards. By using the callback information, the application creates a DirectSoundCapture object for each device so that two audio channels can be captured.
For each capture object, a capture buffer object is created. The buffer description includes the WAVEFORMATEX structure, which defines channels, sample rate, sample size, and format tag. In this work, the default format was 22050 Hz, 8-bit, mono. The buffer length must match the processing capability of the computer. A streaming buffer was created as a circular buffer. In continuous capture, once DirectSoundCapture reaches the end of the buffer, it wraps to the beginning and overwrites data. The application must read data in the same circular manner. DirectSoundCapture provides two pointers: the current capture position and the current read position. The capture position indicates where data is being written, and the read position indicates where data is available to be read. The interval between them is about 15 ms. The buffer object is started with the DS C B START LOOPING flag to enable circular capture. When capture must stop, the Stop method is used.
To read audio data, the application locks a portion of the buffer. The Lock method returns two addresses and two byte counts because the buffer is circular. For example, if the buffer length is 16 KB and the application requests 5 KB starting at a 12 KB offset, only 4 KB will be written at the end of the buffer, and the remaining 1 KB will be written at the beginning. The application reads the two segments into a linear buffer for processing. After reading, the Unlock method releases the locked region. In this project, the standard 22050 Hz mono 8-bit sampling was used. Considering computation and hardware speed, the frame length was set to 16384 bytes, corresponding to a capture time of about 0.743 seconds. The capture buffer was set to two frames, or 32768 bytes, so that one half could be read while the other half was being filled. This arrangement supports real-time acquisition and processing.
The two signals are compared after capture. A cross-correlation function is used to estimate the time difference between the two channels. The correlation function is computed as the sum over n of x(n + m) y(n), where x and y are the time-voltage functions of the two signals, n is the number of samples in a window, and m is the offset period. In this project, each displayed window contained 50 points, so n ranged from 0 to 50, and m took integer values starting from 0. The correlation coefficients were compared to find the maximum correlation. The value of m at the maximum correlation corresponds to the distance between the zero crossings of the two signals. Dividing m by the sampling frequency gives the time difference used in the localization equation. The sampling frequency is a property of the sound card, and 22050 Hz was selected after testing. Higher sampling frequencies would improve resolution but would also increase computation and cause program lag. The visualization environment displayed the signal waveforms and the estimated sound source direction.
The use of correlation analysis to estimate time difference is theoretically feasible, and the experimental results showed that a sound card can capture and preprocess microphone signals and that the cross-correlation function can be used to estimate the direction of a sound source. The humanoid robot head therefore gained a basic acoustic localization capability that can later be integrated with vision and motion control.
5. Control System and Servo Integration for the Humanoid Robot
The control system hardware for the humanoid robot head includes a multi-axis motion controller, servo motors, amplifiers, and supporting wiring. The selection process compared stepper motors and servo motors across several characteristics: control precision, low-frequency performance, torque-frequency behavior, overload capacity, running performance, and speed response. Servo motors were chosen because they offer higher precision, smoother low-speed operation, constant torque within the rated speed range, stronger overload capacity, closed-loop control with encoder feedback, and faster acceleration. The control precision of a servo motor is ensured by the encoder at the rear of the motor. For a motor with a 500-line encoder and fourfold frequency multiplication inside the driver, the pulse equivalent can be much finer than that of a typical stepper motor with a 1.8-degree step angle. The servo system also includes resonance suppression, which helps compensate for insufficient mechanical stiffness.
The selected motor was a Maxon DC motor, model RE 25 055 035 EBAZ01A. It has a 25 mm diameter, graphite brushes, ball bearings, a rated power of 20 W, and a speed of 9550 rpm. The selected gearhead is a planetary gearhead with a 26 mm diameter, three-stage reduction, a reduction ratio of 128:1, a torque rating of 1.3 N·m, and ball bearings at the output. The selected encoder is a HEDS-5540 A02 with 500 counts per turn and two plus one index channels. The total length of the motor assembly is 118.2 mm. The motor’s maximum torque requirement for the humanoid robot head is about 2 N·m, and the operating speed is about 60 rpm. For a motor with a stable operating speed of 800 rpm, a reduction ratio of about 13.3 would be sufficient, but the selected gearhead provides a much higher reduction ratio of 128:1, which supports precise positioning.
| Component | Model or specification | Key parameters |
|---|---|---|
| Servo motor | Maxon RE 25 055 035 EBAZ01A | 25 mm diameter, graphite brushes, ball bearings, 20 W, 9550 rpm |
| Gearhead | Planetary gearhead | 26 mm diameter, 3-stage, 128:1 reduction, 1.3 N·m torque |
| Encoder | HEDS-5540 A02 | 500 counts per turn, two plus one index channels |
| Amplifier | Copley Accelnet Micro Panel ACJ-055-09 | Maximum current 9 A |
| Motion controller | PMAC ZA-PC/104 | Motorola 56300 DSP, 40 MHz, 128k SRAM, 512k flash, 4 to 8 axes |
The selected amplifier was a Copley Controls Accelnet Micro Panel series amplifier, model ACJ-055-09, with a maximum current of 9 A. The amplifier was tuned using CMEZ software. The amplifier only accepts differential signals, while the motor encoder does not provide differential signals by itself. A signal adapter was therefore placed between the encoder and the amplifier. The adapter used an MC3487N quad differential line driver. The MC3487N has three-state outputs, TTL-level output, high input impedance, fast switching, single 5 V supply, and over-voltage and under-voltage protection. It provides four independent line drivers. The adapter had DB-9 connectors, one male and one female, to connect the encoder and amplifier.
The motor and amplifier were connected according to the drive and feedback requirements. Before the motor was used, the amplifier parameters had to be set so that the motor operated in a stable and reliable state. This matching process mainly involved proportional gain and integral gain adjustment. The CMEZ software allowed both automatic and manual tuning. Automatic tuning was convenient but not always perfectly accurate. Manual tuning was more accurate but more complex. The CMEZ software provided data curves so that the user could compare the actual response with the command response. This graphical method was much easier than relying only on sound and observation, which requires extensive experience. The recommended approach was to use automatic tuning for the current loop and then manual tuning for the velocity loop.
The CMEZ software communicates with the amplifier through a standard RS-232 serial connection. The amplifier’s J5 port includes RXD, TXD, and SGND pins, which were connected to a DB-9 serial plug. The computer and amplifier had to be powered before opening the CMEZ software. The amplifier indicator changed from red to green and remained steady when the state was normal. The serial port settings in CMEZ had to specify the physical serial port number and the data transmission rate. A USB-to-serial adapter could not be recognized correctly by the software, so a physical serial port was required. The highest available transmission rate was selected to increase data transmission speed and improve amplifier response time. If the serial port number was not specified, the software could detect all serial ports and assign the same rate to each, which is convenient for computers with multiple serial ports.
The basic CMEZ settings include motor characteristics, control mode, and encoder settings. The motor and feedback settings require motor inertia, peak torque, continuous torque, no-load speed, peak current, back EMF, resistance, and inductance. The back EMF is not always given directly in the motor manual and must be calculated from the speed constant. Unit conversions may be necessary because the manual and the software may use different unit systems. In this project, the motors did not have brakes, so the brake and stop options were not set. After the motor and feedback settings were entered, the Calculate button stored the calculated values in the amplifier flash memory.
After the basic setup, the current loop and velocity loop were tuned. In a servo system, the amplifier closes the current loop and velocity loop, while the motion controller closes the position loop. The current loop adjusts motor current according to the current command. The velocity loop adjusts motor speed. The position loop is closed by the motion controller using a PID algorithm with velocity feedforward. The current loop was tuned first. In CMEZ, automatic tuning was used after confirming that the limit signals did not exceed the maximum capability of the amplifier and motor. The software displayed the tuned parameters as high, medium, and low stiffness. The medium stiffness setting was selected. The proportional gain and integral gain values from automatic tuning were stored in the amplifier, and then fine-tuned using the oscilloscope interface. In the oscilloscope view, the command current curve and the actual motor current curve were compared. Manual adjustment of proportional and integral gain brought the two curves into the closest match. The same method was used for the velocity loop.
After tuning, the JOG function in the control channel was used for simple motor testing. By commanding forward and reverse motion and observing real-time parameter displays, the motor and amplifier settings could be evaluated. The Copley amplifier also has a CAN bus interface, which allows multiple amplifiers to be connected and provides a degree of network control. The CMEZ software also includes a CVM function for PLC programming, and the amplifier can run such a program automatically. Because of limited amplifier storage, a PLC control program can have at most 127 steps. These functions were not used in the reported humanoid robot head work, but they may be useful in future applications.
The PMAC motion controller was connected to the amplifier through the JMACH1 port. A transition board can connect up to four amplifiers to the JMACH1 port. The ACC-1P motor interface expansion board can extend the system to eight axes. The PMAC card communicates with the computer through the J8 port, which is essentially a serial port and connects to the computer motherboard with a dedicated cable. When multiple axes are connected, the same method is used, but different analog channels and encoder channels are used. When digital control is used, the connection method differs, mainly in the control signal wiring.
The PMAC card is configured and tested using PEWIN32 software. In the setup menu, the general setup and options dialog allows the user to specify the connected device number and test the connection. The terminal debug window allows control commands to be sent to the PMAC card, and parameters can be viewed and set before motor operation. For analog control, several PMAC variables must be set correctly. For example, I900 and I906 define the PWM output frequency for channels. The frequency should not be too high, because conversion losses can overheat the driver; it should not be too low, because response may be poor, noise may increase, physical vibration may occur, and current ripple may overheat the motor. In the PMAC ZA-PC/104 card, the value is typically set to 1001. I901 determines the phase clock frequency control, and a value of 2 was selected, giving a phase clock frequency of 12 kHz. I902 determines the servo clock frequency, and a value of 3 was selected, giving a servo clock frequency of 4 kHz. I10 determines the time required for the PMAC interpolation trajectory between servo clock cycles. Its value is determined by I900, I901, and I902. Ix69 determines the maximum output range, or the absolute value of the DAC maximum. The maximum range is 32767.
After the DAC output parameters were set, the servo feedback and output polarity were checked. If polarity does not match, a dangerous loss of control can occur during closed-loop operation. The test is to give the motor an open-loop output command and observe the direction of position change. For example, typing O40, or 40 percent open-loop output, should increase the position count. Typing O-40 should decrease the position count. If the count does not change in either direction, the driver or encoder may have a problem. If polarity is reversed, the axis direction can be changed by altering I900 from 7 to 3 or from 3 to 7, or by changing the motor input polarity. If the motor does not turn, the output pin voltage should be checked. Relative to AGND, it should be near 1 V, and it should change when an open-loop command is typed. If it does not change, I102, the analog power supply, and limit input configuration should be checked. If the voltage changes but the motor does not turn, the driver and motor connections should be checked.
Once the motor is working, the proportional gain variable I130 is set. For a high-resolution system, a value of 200 is recommended; for a low-resolution system, a value of 500 is recommended. The PMAC ZA-PC/104 card has relatively high resolution, so I130 was set to 200. If the motor oscillates or tends to oscillate at low to medium frequencies, the derivative gain I131 should be increased until the oscillation disappears. If the motor oscillates at high frequency, the proportional gain or integral gain may be too large, and I130 or I131 should be reduced until the high-frequency oscillation stops. After I130 and I131 are set within a reasonable range, the motor should rotate steadily and satisfactorily. For jogging, the jog speed I122, acceleration time I120, and S-curve acceleration time I121 must be set. For safety, a low speed and a high acceleration time were initially selected. In this project, I122 was set to 10, I120 to 5, and I121 to 50. The J+ command was used to jog forward, and J/ was used to stop. If the motor did not stop immediately, the lag was reduced by increasing I130. The J- command was used to jog reverse. The process was repeated to ensure that lag reduction worked in both directions.
The encoder and gear reduction determine the number of pulses required for one revolution of the motor shaft. The encoder had 500 lines, and with fourfold differential decoding, one motor revolution produced 2000 pulses. The gearhead reduction was 128:1, so one revolution of the output shaft required 256000 pulses. This value was verified using the J= command. Precise pulse counts allowed the controller to command exact angular positions.
6. Software, Testing, and Integration
The control software for the humanoid robot head was developed in Visual C++ 6.0. The main communication component was the PTalkDT control, which is designed for Delta Tau PMAC controllers. PTalkDT provides a stable and high-speed connection between a 32-bit Windows application and the PMAC card. It can be used in Visual Basic and Visual C++ programs and acts as a mature human-machine interface for PMAC communication. A dynamic link library, Pcomm32, can also be used, but both methods ultimately transmit PMAC command language strings to the controller.
To use PTalkDT in a Visual C++ MFC dialog-based program, the control was inserted into the project. A class and member variable were defined. In the OnInitDialog function, the PTalkDT control was enabled with the appropriate call, and the required header files were included. The GetResponse method was used to send a command string to the PMAC and wait for its response. The method returns a nonzero value if successful and zero if a failure occurs. Commands sent to PMAC should not exceed 250 characters when using bus or serial port communication, and should not exceed 150 characters when using the dual-port RAM. For example, to send an open-loop command, the code calls GetResponse with the desired command string. For the humanoid robot head, the software needed to control motor direction and rotation angle. The system used pulse counts to determine precise angles. A dialog box allowed the user to enter the desired angle, a scale factor was applied, and the result was formatted into a string with the J command prefix. The PTalkDT GetResponse method then sent the command to the PMAC.
Testing proceeded in stages. First, the motor and amplifier were connected and tuned. The current loop was automatically tuned, then fine-tuned by comparing command and actual current curves. The velocity loop was adjusted in the same way. The JOG function was used to verify forward and reverse motion. Next, the motor, amplifier, and PMAC card were connected. The PMAC card was configured through PEWIN32. The DAC output parameters, phase clock, servo clock, interpolation time, and output range were set. Polarity was checked with open-loop commands. Proportional and derivative gains were adjusted. Jog speed and acceleration were set. The encoder pulse count per output revolution was verified. Finally, the Visual C++ control program was used to send commands through PTalkDT.
The single-axis control program interface allowed the user to command motor angles and observe operation. The four-axis control program extended the same approach to multiple motors. The program flow included initialization, command generation, command transmission, and feedback monitoring. The control software provided a visual interface for precise motor angle control. The tests coordinated the feedback path and the command path to improve precision and accuracy. The humanoid robot head could be commanded through the visual interface, and the servo system executed the requested angular positions.
In sound localization testing, the two microphone channels were captured through the sound cards and processed by cross-correlation. The display showed the waveform of the signals and the estimated sound source direction. The experimental results confirmed that the sound card could capture and preprocess the microphone signals, and the cross-correlation function could estimate the direction of the sound source. The time difference method was theoretically feasible, and the tests produced useful results. The humanoid robot head therefore had a working acoustic localization function, although further improvement was needed for better accuracy.
7. Findings, Limitations, and Future Work
The reported humanoid robot head research produced several findings. A four-degree-of-freedom head with three neck degrees of freedom and one jaw degree of freedom can be built with a relatively simple universal-joint-like mechanism. Direct drive simplifies the structure and avoids the friction, backlash, and nonlinearity of gear transmission between the motor and the mechanism. Servo motors and a multi-axis motion controller provide precise angular control and closed-loop feedback. A PMAC ZA-PC/104 controller, Copley Accelnet Micro Panel amplifiers, and Maxon DC servo motors form a workable control platform for the humanoid robot head. Tuning the current loop and velocity loop with CMEZ software, then closing the position loop with the PMAC controller, allows stable and accurate motion.
Sound localization using two microphones, two sound cards, DirectSound, and cross-correlation is feasible for a humanoid robot head. The system can capture two audio channels, store them in a streaming buffer, and estimate the time difference between the channels. The direction of the sound source can then be calculated. The visualization environment allows the waveforms and direction result to be displayed. However, the localization accuracy was not ideal. Future work should improve the algorithm and the decision criteria. More robust methods may be needed to handle reverberation, motor noise, and multiple sound sources. The humanoid robot head also needs reliable methods to verify the accuracy of feedback signals and the precision of motor shaft rotation.
The structure and control work also suggests several future directions. The head can be integrated with image acquisition and processing so that visual tracking and auditory localization can support each other. The olfactory subsystem can be added for gas or odor detection. Central processing can fuse information from vision, hearing, and other sensors. The control system can be expanded to more axes and more complex motion patterns. The humanoid robot head can become part of a mobile humanoid robot, where its ability to turn toward a speaker, nod, and orient sensors will support natural interaction.
8. Conclusion
The humanoid robot head remains a challenging and important research subject. It combines mechanical design, acoustic sensing, motor control, and software integration. The work reviewed here developed a four-degree-of-freedom humanoid robot head with a compact universal-joint-like structure. It used direct-drive servo motors, a PMAC multi-axis controller, and Copley amplifiers. It implemented sound localization with electret condenser microphones, computer sound cards, DirectSound, and cross-correlation. It developed control software in Visual C++ 6.0 and tested the system through tuning, jogging, and angle commands. The results show that a humanoid robot head can be built with relatively simple mechanical principles while still supporting essential functions. Further work is needed to improve sound localization accuracy, verify feedback precision, and integrate vision, olfaction, and central processing. Such integration will move the humanoid robot closer to the goal of natural interaction with people and the environment.
