**2.3 Optimization of the design**

In order to evaluate the proper length of link 1 and link 2, a preliminary analysis was set. As basic assumption we required that the device should cover the whole workspace of the LCD while maintaining a good factor in the manipulability ellipsoid. The variation of the condition number of the manipulability ellipsoid (while the system moves over the workspace) was considered in this design phase. A script procedure was initially set up to estimate the conditioning number all over the workspace when links' sizes and interface position were changed.

In Figure 5, the best-case solution is graphically represented. The workspace areas have been coloured by the value of the condition number (c). The colour type changes at each tenth of unit. Central area has values between 0.9 and 1, second area values range between 0.8 and 0.9 and the third area values range between 0.7 and 0.8. More than 90% of the overall workspace has c>0.9.

Fig. 5. Workspace evaluation

In Figure 6, the haptic desktop workspace in case of link 1 length equal to 300mm and link 2 length equal to 270mm is shown. Two capstans are used for reducing the inertia of moving masses and for introducing a reduction ratio. These reduction ratios have been dimensioned to obtain a condition number in the middle of the workspace equal to 1.

Figure 4 shows an assonometric view of the design prototype: in this system, on the desk plane only the required mobile parts of the interface are present; a new design of the prototype allows moving event the capstans and motor pulleys below desk plane. Three buttons have been left near the haptic base in order to control the computing-unit power, to

In order to evaluate the proper length of link 1 and link 2, a preliminary analysis was set. As basic assumption we required that the device should cover the whole workspace of the LCD while maintaining a good factor in the manipulability ellipsoid. The variation of the condition number of the manipulability ellipsoid (while the system moves over the workspace) was considered in this design phase. A script procedure was initially set up to estimate the conditioning number all over the workspace when links' sizes and interface

In Figure 5, the best-case solution is graphically represented. The workspace areas have been coloured by the value of the condition number (c). The colour type changes at each tenth of unit. Central area has values between 0.9 and 1, second area values range between 0.8 and 0.9 and the third area values range between 0.7 and 0.8. More than 90% of the overall

In Figure 6, the haptic desktop workspace in case of link 1 length equal to 300mm and link 2 length equal to 270mm is shown. Two capstans are used for reducing the inertia of moving masses and for introducing a reduction ratio. These reduction ratios have been dimensioned

to obtain a condition number in the middle of the workspace equal to 1.

enable force feedback, and to switch on/off the desk light.

**2.3 Optimization of the design** 

position were changed.

workspace has c>0.9.

Fig. 5. Workspace evaluation

Fig. 6. Workspace of the haptic interface.

#### **2.4 Components choice**

The kinematics of the haptic interface has been determined according to the chosen link lengths and describe end-effector's coordinates referred to the central pivoting joint (Figure 7).

$$X\_{\text{ee}} = -L\_2 \cdot \cos(q\_2) + L\_1 \cdot \cos(q\_1) \tag{1}$$

$$Y\_{ee} = -L\_2 \cdot \sin(q\_2) + L\_1 \cdot \sin(q\_1) \tag{2}$$

From (1) and (2) *L*1 and *L*2 are the lengths of link 1 and link 2 while 1 *q* and 2 *q* are the angles referred to the joints. On the other hand, the end-effector's coordinates referred to the motors, 1 *q* and 2 *q* can be computed as follows:

$$q\_1 = \frac{r\_1}{R\_1} \cdot \theta\_1 \tag{3}$$

$$q\_2 = -\frac{r\_2}{R\_2} \cdot \theta\_2 \tag{4}$$

From (3) and (4) are the rotations of the two actuators, 1*r* and 2*r* are the radii of motor pulleys and *R*1 and *R*2 are the radii of the capstans. Using the above relationships it was possible to identify the commercial components to be used within the haptic device (motor type and size, sensors, etc). The homogeneity of the conditioning number has allowed us to size out the design by using the workspace centre as reference point. Maxon motor 3557024CR was used for actuation. With this solution the Haptic Interface can generate on user's hand up to 3 N of continuous forces and 5 N of peak forces. To detect device motion 1024 counter per cycle optical encoders where adopted with a 4X decoding. Such a choice leads to a spatial sensitivity of about 30m at workspace centre (pixel size is about 300m).

Training Motor Skills Using Haptic Interfaces 205

The encoder signal is read using an ISA Bus Quadrature Encoder Card attached to the SBC. The current to motors is generated by using a PC/104 module with two channel analog outputs (AX10415) and a custom-made current driver which is fed by the power supply of

The base control system of the HD has been designed and implemented with MatlabTM Version 6.5 and Simulink Version 5.0. Due to the restrictions of Windows operating system to execute "hard" real-time applications; the Matlab´s Real-time Workshop provides two solutions to implement the real-time controller without adding additional hardware to the

The Real-Time Windows Target uses a small real-time kernel to ensure the real-time application runs in real time. The real-time kernel runs at CPU ring zero (privileged or kernel mode) and uses the built-in PC clock as its primary source of time. In order to share the data from the Real-Time Windows Target kernel to the outside world (i.e. graphical system), an Sfunction was written as a SimViewing device which lets the creation of a shared memory by means of a static library. Such S-function does not compile into real-time code but acts as a Simulink External mode interface instead. This is due under the real-time kernel, the Win32 API cannot be executed as a component of the real-time application. One drawback of this implementation is that the updating time of the data send to the external application is too

system: Real-Time Windows Target (RTWIN) and Generic Real-Time Target (GRT).

low, although the real-time control loop can achieve frequencies up to 2k Hz.

the computer (Figure 9). The Figure 10 shows the system's architecture.

**2.5 Control system** 

Fig. 10. Architecture of the system.

The design of the hardware system is characterized by its compactness and low cost. The HD is composed by a Single Board Computer (SBC) with Windows XP, a LCD screen and a Haptic Interface actuated by two DC motors (Figure 8).

Fig. 7. Kinematics of the system

Fig. 8. Hardware unit has been designed to fit into a small acrylic box.

Fig. 9. The DC Motors and Optical Encoders are mounted on the rear of the desk.

The encoder signal is read using an ISA Bus Quadrature Encoder Card attached to the SBC. The current to motors is generated by using a PC/104 module with two channel analog outputs (AX10415) and a custom-made current driver which is fed by the power supply of the computer (Figure 9). The Figure 10 shows the system's architecture.
