APPLICATION OF DIGITAL CELLULAR RADIO FOR MOBILE LOCATION ESTIMATION IIUM Engineering Journal, Vol. 22, No. 2, 2021 Shahdad et al. https://doi.org/10.31436/iiumej.v22i2.1706 MODELLING A 1-DOF FINGER EXTENSOR MACHINE FOR HAND REHABILITATION IFRAH SHAHDAD, NORSINNIRA ZAINUL ABIDIN* AND AHMAD JAZLAN Department of Mechatronics Engineering, International Islamic University Malaysia, Jalan Gombak, 53100 Kuala Lumpur, Malaysia * Corresponding author: sinnira@iium.edu.my (Received: 24th November 2020; Accepted: 22nd December 2020; Published on-line: 4th July 2021) ABSTRACT: It is essential to have an accurate representation of a robotic rehabilitation device in the form of a system model in order to design a robust controller for it. This paper presents mathematical modelling and validation through simulation and experimentation of the 1-DOF Finger Extensor rehabilitation machine. The machine’s design is based on an iris mechanism, built specifically for training open and close movements of the hand. The goal of this research is to provide an accurate model for the Finger Extensor by taking into consideration various factors affecting its dynamics and to present an experimental validation of the devised model. Dynamic system modelling of the machine is performed using Lagrangian formulation and the involved physical parameters are obtained experimentally. To validate the developed model and demonstrate its effectiveness, hardware-in-the-loop experiments are conducted in the Simulink-MATLAB environment. Mean absolute error between the simulated and experimental response is 1.38° and the relative error is 1.13%. The results obtained are found to be within the human motion resolution limits of 5 mm or 5º and exhibit suitability of the model for application in robotic rehabilitation systems. The model accurately replicates the actual behavior of the machine and is suitable for use in controller design. ABSTRAK: Gambaran tepat mengenai model sistem peranti rehabilitasi robotik adalah sangat penting bagi pembangunan sesebuah reka bentuk alat kawalan tahan lasak. Kajian mengenai model matematik dan pengesahan melalui simulasi dan eksperimentasi mesin pemulihan 1-DOF ‘Finger Extensor’. Mesin ini direka bentuk berdasarkan mekanisme iris, dibangunkan khusus bagi melatih gerakan buka dan tutup tangan. Tujuan kajian ini adalah bagi menyediakan model Finger Extensor yang tepat dengan mengambil kira faktor mempengaruhi dinamik dan pengesahan model eksperimen yang dirancang. Model sistem dinamik mesin ini diuji menggunakan formula Lagrangian dan parameter fizikal yang terlibat diperoleh melalui eksperimen. Model ini disahkan dan diuji keberkesanannya menggunakan eksperimen Perkakasan-dalam-gelung melalui MATLAB-Simulink. Purata ralat mutlak antara dapatan simulasi dan respon eksperimen adalah 1.38° dan ralat relatif 1.13%. Dapatan kajian adalah dalam had resolusi gerakan tangan manusia iaitu 5 mm atau 5º dan didapati model ini sesuai bagi aplikasi sistem rehabilitasi robotik. Model ini tepat dalam mereplikasi kelakuan sebenar mesin dan sesuai digunakan bagi reka bentuk kawalan. KEYWORDS: modelling; simulation; experimental validation; hand rehabilitation; hardware-in-the-loop 384 IIUM Engineering Journal, Vol. 22, No. 2, 2021 Shahdad et al. https://doi.org/10.31436/iiumej.v22i2.1706 1. INTRODUCTION Every year, up to 15 million people suffer from stroke, making it one of the leading causes of severe disability in the world [1]. After a neurological injury such as stroke, patients suffer from several impairments, of which the most common and impeding is the impairment to the hand sensorimotor function. The finger extensor muscles develop weakness during voluntary movements as a result of activity deficit. This leads to spasticity which is a velocity-dependent increase in muscle tone. Spasticity causes intense muscle contractions and stiffness that manifest in the form of a clenched fist, tensed fingers, a curled wrist and other deformities. These impairments lead to a decreased ability to open and close the hand, control individual finger movements and perform force coordination, thereby severely affecting the quality of life of stroke patients [2]. Patients undergo intense physical therapy under the guidance of an occupational therapist to regain functionality in the affected limb. Activity-based exercises are known to be effective in helping overcome the motor deficits induced by post-stroke spasticity [3]. However, occupational therapy is expensive and as a result, a vast majority of the patients do not have continuous access to it. Besides, conventional therapy is monotonous, repetitive and difficult to be sustained for prolonged periods of time, leading to high drop- out rates. Furthermore, with conventional therapy, it is not possible to measure the exact progress of patients over time and provide them with well-regulated and a wide range of rehabilitative forces. Due to these factors, robot-assisted rehabilitation has seen a growing interest in the last few decades. Robotic devices, due to their features of high repeatability, interactivity, ability to provide a wide range of accurate forces and automatic measurement of patient progress, are becoming increasingly popular. The interactive nature of robot- aided therapy not only increases physical engagement but also encourages cognitive engagement of the patient through immersive and challenging exercises. Patient engagement in rehabilitation is vital because encouraging human users to perform self- initiated movements is an essential requirement to achieve motor learning and neuroplasticity [4]. Furthermore, robot-aided rehabilitation is capable of producing assistive as well as resistive forces that can be tailored to the specific impairment of the patient. When patients gain some amount of motor function in the impaired part, they are subjected to active- resistive therapy whereby, forces are applied on the patient in a direction opposite to the one they are tracing. Resistive strategies enhance patient performance as they require additional effort from the patient to resist opposite forces. Such efforts induce neuroplasticity and help in development of neural pathways from the impaired muscles to the brain which aids in regaining of motor function [5]. However, all these features of robotic rehabilitation devices are possible only when efficient controllers are developed [6]. A variety of control strategies have been proposed for rehabilitation robots over the past few decades. These control schemes are designed around the central idea of modulating assistance/resistance provided to the patient based on various factors such as force exerted by the patient, limb velocity, tracking error, interaction force/torque, EEG/EMG activity [7]. In recent literature, approaches such as force/stiffness control [8] Assist-as-Needed control (AAN) [9-11] and performance-based impedance control [7,12,13] have been implemented on rehabilitation robots. AAN control aims at providing minimal intervention in patient recovery. Performance-based impedance control modulates the assistance provided, based on real-time measurements of the patient's biomechanical characteristics. 385 IIUM Engineering Journal, Vol. 22, No. 2, 2021 Shahdad et al. https://doi.org/10.31436/iiumej.v22i2.1706 Before the implementation of these control strategies, dynamic and kinematic modelling of the rehabilitation machine is necessary. Modelling is the mathematical representation of a physical system [14]. A system model is developed from mathematical equations and then represented graphically in software such as MATLAB, Simulink and StateFlow, etc. The developed model is then validated through simulations, reducing the cost associated with experimental validation. During the process of model development, trade-offs have to be made between the fidelity and simplicity of the model. Fidelity implies the extent to which the system model mimics the behavior of the real system and simplicity ensures that the model remains simple enough for smooth controller development in later stages. Thus, there are some deviations between the behavior of the actual system and its model. After balancing simplicity and fidelity, the model is validated using a Hardware-in-the-Loop (HiL) approach. In this approach, one or more real subsystems interact in a closed loop with the virtual subsystems of the model. A comparison between the response of such a closed-loop interaction with the simulation output reveals performance of the developed model [15]. In [16], dynamic and kinematic modelling of the multipurpose rehabilitation robot, the Universal Haptic Pantograph, was performed. Validation of the model was carried out through experiments with healthy subjects reflecting its performance. Dynamic modelling and experimental validation of a parallel robot for upper limb rehabilitation was presented in [17]. Approximately zero steady-state errors points to a high degree of accuracy and suitability of the developed model. Dynamic modelling of a haptic finger actuated by a McKibben artificial muscle built for tele-operated rehabilitation was performed in [18]. Upon experimental validation, the model demonstrated a satisfactory performance. In this work, mathematical modelling and system simulation of a 1 degree-of-freedom (DOF) Finger Extensor rehabilitation machine was performed. A Model-Based Development (MBD) [15] approach to controller design was taken. Such an approach to design enabled verification and validation at each stage. Based on simulation results, modifications to the system could be made easily without incurring high costs. As a first step, mathematical modelling was done, followed by simulation of the system behavior. Simulation results were then compared to hardware measurements which demonstrated the accuracy of the realized model. Hardware-in-the-Loop testing of the model carried out in this study ensures minimization of risks and costs associated with experimental validation. The developed model aids in the design and implementation of a control algorithm for the Finger Extensor machine. 2. THE FINGER EXTENSOR MACHINE The Finger Extensor rehabilitation machine is a 1-DOF device with an iris mechanism lying at the heart of its dynamics. The design of the iris or diaphragm is inspired by the constriction and dilation of the iris of the human eye, which varies size of the pupil, adjusting the aperture of the eye. The iris mechanism built into the Finger Extensor constricts and dilates the poles at the top of its surface, to allow openings of variable sizes. These poles, as shown in Fig. 1 and Fig. 2 are grasped by the patient during therapy and enable him/her to practice finger flexion and extension [19]. There are six poles in the current Finger Extensor design and each pole has a blade associated with it. On the upper end, each blade is connected to a slider and at the bottom, each blade goes into a slot in a disc using a bearing, as illustrated in Fig. 2. The disc with slots is in turn connected to the motor actuation system through a chain and sprocket mechanism. As the motor turns, the sprocket induces motion into the slotted disc. This 386 IIUM Engineering Journal, Vol. 22, No. 2, 2021 Shahdad et al. https://doi.org/10.31436/iiumej.v22i2.1706 causes the blades to slide and move the poles in their own respective slots at the top of the machine. Fig. 1: 1-DOF Finger Extensor machine. Fig. 2: CAD drawing of the side view of the iris mechanism. Fig. 3: Inner view of the machine. Figure 3 shows the actuation system of the machine comprising of a brushed planetary geared DC motor (Gear Ratio- 32.5:1). Rotation of the motor is recorded by a rotary encoder by ESB electronics, Japan (Counts per Revolution- 500) connected to the sprocket using a flexible shaft coupling. A torque sensor, connected close to the chain-sprocket mechanism provides the torque applied by the machine on to the patient. Actuation system and sensors are controlled by Arduino microcontroller board which is programmed in the Simulink environment. 387 IIUM Engineering Journal, Vol. 22, No. 2, 2021 Shahdad et al. https://doi.org/10.31436/iiumej.v22i2.1706 3. SYSTEM MODELLING 3.1 Mechanical Model Newton-Euler and the Lagrange-Euler methods are the most commonly used approaches for deriving dynamic equations of mechanical parts of robots [20]. The former is ideal for on-line control applications due to reduced computational time. However, it falls short in providing an adequate insight into control design due to recursive computation. The Lagrange-Euler method is simple and systematic, providing dynamic equations in a matrix form and was chosen for deriving the mechanical model for the Finger Extensor. Dynamic equation describing motion of the Finger Extensor was written as 𝑀(𝜃(𝑡), 𝜉)�̈�(𝑡) + 𝐷(𝜃(𝑡), �̇�(𝑡), 𝜉) + 𝐺(𝜃(𝑡), 𝜉) = 𝑇(𝑡) (1) where, 𝑀(θ(𝑡), ξ) is the N x N inertia matrix. 𝐷(𝜃(𝑡), �̇�(𝑡), 𝜉) is the N x 1 vector of coriolis and centrifugal forces. 𝐺(𝜃(𝑡), 𝜉) is the N x 1 vector of gravitational forces. 𝑇(𝑡) is the N x 1 vector of torques applied by the actuators. 𝜃(𝑡), �̇�(𝑡), �̈�(𝑡) are the N x 1 vectors of joint displacements, velocities and accelerations respectively. 𝜉 is a vector (with appropriate dimension) of parameters of the mechanism such as payload. For the Finger Extensor, 𝑀(𝜃(𝑡), 𝜉) is a 1x1 matrix, with one element equal to the moment of inertia of a solid cylinder with iris radius of 0.055m. 𝐷(𝜃(𝑡), �̇�(𝑡), 𝜉) and 𝐺(θ(𝑡), ξ) for a 1-DOF machine were null matrices. 𝑇(𝑡) for the Finger Extensor is calculated in the subsequent sections. For developing the mechanical model of the Finger Extensor, the next step was to derive equations of motion of the moving parts of the mechanism. These were represented by flywheel and spring mechanical elements as shown in Fig. 4. 𝐽1, 𝐽2 represent inertia elements of the motor and iris mechanisms respectively, 𝑘1, 𝑏1 represent the spring stiffness effect and viscous and coulomb friction. Fig. 4: Block diagram representation. Forces acting on the motor and iris sprockets are shown in Fig. 5, where 𝜃1 is the angle of rotation of the motor sprocket, 𝜃2 is the angle of rotation of the iris mechanism, 𝑇𝑔 is the torque on the driver sprocket, 𝑇𝑒 is the torque exerted by the user, 𝑓𝑐 𝑟1 and 𝑓𝑐 𝑟2 388 IIUM Engineering Journal, Vol. 22, No. 2, 2021 Shahdad et al. https://doi.org/10.31436/iiumej.v22i2.1706 are the contact force torques. Figures 4 and 5, hence represent Eq. (1) in terms of sum of forces (inertial, gravitational, frictional) acting on the machine. As per D’Alembert’s law, sum of torques on both flywheels was given by the equations 𝑇𝑔 = 𝐽1𝜃1̈ + 𝑘1𝜃1 + 𝑏1(𝜃1̇ − 𝜃2̇) − 𝑓𝑐 𝑟1 (2) −𝑓𝑐 𝑟2 − 𝐽2𝜃2̈ − 𝑏1(𝜃2̇ − 𝜃1̇) − 𝑇𝑒 = 0 (3) From Eq. (3), value of 𝑓𝑐 is calculated as 𝑓𝑐 = 1 𝑟2 [−𝐽2𝜃2̈ − 𝑏1(𝜃2̇ − 𝜃1̇) − 𝑇𝑒 ] (4) Fig. 5: Forces acting on mechanism. Substituting value of 𝑓𝑐 in Eq. (2) 𝑇𝑔 = 𝑘1𝜃1 + 𝑏1(𝜃1̇ − 𝜃2̇) − 𝑟1 𝑟2 [−𝐽2𝜃2̈ − 𝑏1(𝜃2̇ − 𝜃1̇) − 𝑇𝑒 ] (5) Using the inverse gear ratio, 𝑟2 𝑟1 = N and the equality of arc lengths, 𝑟1𝜃1 = 𝑟2𝜃2, it follows that 𝜃1 = 𝑟2 𝑟1 𝜃2 = 𝑁𝜃2. Substituting in Eq. (5), 𝑇𝑔 = 1 𝑁 𝐽2𝜃2̈ + 1 𝑁 𝑇𝑒 + 𝑁𝑘1𝜃2 + 𝑉𝑐 (𝜃2̇) + 𝐹𝑐 𝑆𝑔𝑛(𝜃2̇) (6) where, 𝑉𝑐 (𝜃2̇) and 𝐹𝑐 𝑆𝑔𝑛(𝜃2̇) are the viscous and coulomb friction terms. Therefore, dynamic equation of the 1-DOF Finger Extensor was represented as 𝑇𝑔(𝑡) = 1 𝑁 𝐽2(𝜃2)𝜃2̈(𝑡) + 1 𝑁 𝑇𝑒 (𝑡) + 𝑁𝑘1𝜃2(𝑡) + 𝑉𝑐 (𝜃2̇)(𝑡) + 𝐹𝑐 𝑆𝑔𝑛(𝜃2̇) (7) 3.2 Actuator Model The Finger Extensor is powered by a planetary-geared, 24 V brushed DC motor. A schematic of the motor is shown in Fig. 6. Using Kirchhoff's voltage law and Newton's law of motion, dynamic equations of the actuator were written as 𝐽𝑚𝜃�̈�(𝑡) = −𝐵𝑣 𝜃�̇�(𝑡) + 𝑘𝑡 𝑖𝑎(𝑡) − 𝑇𝐿 (𝑡) (8) 𝐿𝑖𝑎(𝑡) = −𝑘𝑣 𝜃�̇� (𝑡) − 𝑅𝑖𝑎(𝑡) + 𝑉(𝑡) (9) where, 𝐽𝑚 is the moment of inertia of the motor (kg. m 2) 389 IIUM Engineering Journal, Vol. 22, No. 2, 2021 Shahdad et al. https://doi.org/10.31436/iiumej.v22i2.1706 𝜃𝑚(𝑡) is the angular displacement of the motor (rad) 𝐵𝑣 is the viscous friction coefficient (Nm/rad/s) 𝑘𝑡, 𝑘𝑣 are the torque and back emf constants (Nm/A, V/rad/s) L, R are the armature inductance and resistance (H, Ω) 𝑖𝑎(𝑡) is the armature current for the motor (A) 𝑇𝐿 (𝑡) is the load torque for the motor (Nm) 𝑉(𝑡) is the voltage input (V) Fig. 6: Motor schematic. Utilizing the relationship between loading torque 𝑇(𝑡) (from the motor) and load torque 𝑇𝐿 (𝑡) (on the motor shaft) and the relationship between the motor's angular position and the machine's angular position, we formulated 𝑇𝐿 (𝑡) = 𝑇(𝑡) 𝑁 , 𝑁 ≥ 1 (10) 𝜃𝑚(𝑡) = 𝑁𝜃(𝑡) (11) where N is the inverse gear ratio. Substituting Eq. (10) and Eq. (11) in Eq. (8) and Eq. (9), the otherwise linear, time- invariant actuator dynamic was converted into a non-linear time-variant one. The actuator model in the form of a third-order differential equation was represented as: 𝜃2⃛(𝑡) + { 𝐵𝑣𝐿+𝐽𝑚𝑅 𝐽𝑚𝐿 } 𝜃2̈(𝑡) + { 𝑘𝑣𝑘𝑡+𝐵𝑣𝑅 𝐽𝑚𝐿 } 𝜃2̇(𝑡) + { 𝑅 𝑁2𝐽𝑚𝐿 } 𝑇𝑔(𝑡) + { 1 𝑁2𝐽𝑚 } �̇�𝑔 = { 𝑘𝑡 𝑁𝐽𝑚𝐿 } 𝑉(𝑡) (12) To represent the actuator dynamic model in the state variable form, 𝜃, �̇�, �̈� were chosen as state variables and the state vector for the actuator was given by 𝑋𝐵 (𝑡) = [𝜃(𝑡) �̇�(𝑡) �̈�(𝑡)] 𝑇 (13) The state equation was formulated as 𝑋�̇� (𝑡) = 𝐴𝐵 𝑋𝐵 (𝑡) + 𝐵𝐵 𝑈(𝑡) + 𝐹𝐵 𝑇𝑔(𝑡) + 𝑄𝐵 �̇�𝑒 (𝑡) (14) where 𝐴𝐵 (𝑋𝐵 , 𝑡) = [ 0 0 1 0 1 0 0 𝑎32 𝑎33 ] , 𝐵𝐵 (𝑋𝐵 , 𝑡) = [ 0 0 𝑏31 ] , 𝐹𝐵 (𝑋𝐵 , 𝑡) = [ 0 0 𝑓31 ] , 𝑄𝐵 (𝑋𝐵 , 𝑡) = [ 0 0 𝑞31 ] 390 IIUM Engineering Journal, Vol. 22, No. 2, 2021 Shahdad et al. https://doi.org/10.31436/iiumej.v22i2.1706 Here, 𝐴𝐵, 𝐵𝐵, 𝐹𝐵, 𝑄𝐵 are the system, input, load distribution and rate of load distribution respectively. 𝑈(𝑡), 𝑇𝑔(𝑡), 𝑇𝑒 (𝑡) are the input vector, mechanical link torque and toque exerted by the patient. The values of elements 𝑎32 , 𝑎33 , 𝑏31 , 𝑓31 , and 𝑞31 are 𝑎32 = { −𝑘𝑣 𝑘𝑡 + 𝐵𝑣 𝑅 𝐽𝑚𝐿 } ; 𝑎33 = { −𝐵𝑣𝐿 + 𝐽𝑚𝑅 𝐽𝑚𝐿 } ; 𝑏31 = { 𝑘𝑡 𝑁𝐽𝑚 𝐿 } ; 𝑓31 = − { 𝑅 𝑁2𝐽𝑚𝐿 } ; 𝑞 31 = − { 1 𝑁2𝐽𝑚 } 3.3 Integrated Model For developing the integrated model of the machine, a time derivative of the dynamic equation of the machine was found. Differentiating Eq. (7) gave �̇�𝑔(𝑡) = { 𝐽2(𝜃2) 𝑁 } 𝜃2⃛(𝑡) + { �̇�𝑒(𝑡) 𝑁 } + 𝑁𝑘𝜃2̇(𝑡) + 𝐹𝑐 {2𝛿(𝜃2̇)𝜃2̈} + 𝑉𝑐 𝜃2̈(𝑡) (15) Substituting Eq. (15) in Eq. (12), 𝜃2⃛(𝑡) { 𝐽𝑚 𝑁 3 + 𝐽2(𝜃2) 𝐽𝑚 𝑁 3 } + 𝜃2̈(𝑡) { 𝑁2(𝐵𝑣 𝐿 + 𝐽𝑚 𝑅) + 2𝐹𝑐 𝐿𝛿(𝜃2̇) + 𝑉𝑐 𝐿 𝐽𝑚 𝑁 2𝐿 } + 𝜃2̇(𝑡) { 𝑁(𝑘𝑣 𝑘𝑡 + 𝐵𝑣 𝑅) + 𝐿𝑘1 𝐽𝑚 𝑁𝐿 } + 𝑇𝑔(𝑡) { 𝑅 𝑁2𝐽𝑚 𝐿 } + �̇�𝑒 (𝑡) { 1 𝑁3𝐽𝑚 } = { 𝑘𝑡 𝑁𝐽𝑚 𝐿 } 𝑉(𝑡) (16) Equation (16) was solved for 𝜃 and put in state-space form, the integrated model of the Finger Extensor was obtained as �̇�𝐵 (𝑡) = 𝐴𝐵 (𝑋𝐵 , 𝑡)𝑋𝐵 (𝑡) + 𝐵𝐵 (𝑋𝐵 , 𝑡)𝑈(𝑡) + 𝐹𝐵 𝑇𝑔(𝑡) + 𝑄𝐵 �̇�𝑒 (𝑡) (17) where 𝑋𝐵 = [𝜃2 𝜃2̇ 𝜃2̈] 𝑇 𝐴𝐵, 𝐵𝐵, 𝐹𝐵, 𝑄𝐵 are the system, input, load distribution and rate of load distribution respectively. 𝑈(𝑡), 𝑇𝑔(𝑡), 𝑇𝑒 (𝑡) are the input vector, mechanical link torque and toque exerted by the patient. 𝐴𝐵 (𝑋𝐵 , 𝑡) = [ 0 0 1 0 1 0 0 𝑎32 𝑎33 ] , 𝐵𝐵 (𝑋𝐵 , 𝑡) = [ 0 0 𝑏31 ] , 𝐹𝐵 (𝑋𝐵 , 𝑡) = [ 0 0 𝑓31 ] , 𝑄𝐵 (𝑋𝐵 , 𝑡) = [ 0 0 𝑞31 ] Equation (17) was put in the state-space form and solved for �̇�𝐵. 𝑎32 = − { 𝑁2(𝑁𝑘𝑣 𝑘𝑡 + 𝑁𝐵𝑣 𝑅 + 𝐿𝑘1) 𝐿(𝐽𝑚 𝑁 3 + 𝐽2(𝜃2)) } , 𝑎33 = − { 𝑁(𝑁2𝐵𝑣 𝐿 + 𝑁 2𝐽𝑚 𝑅 + 2𝐹𝑐 𝐿𝛿(𝜃2 ˙ ) + 𝑉𝑐 𝐿 𝐿(𝐽𝑚 𝑁 3 + 𝐽2(𝜃2)) } 𝑏31 = { 𝑘𝑡 𝑁 2 𝐿(𝐽𝑚 𝑁 3 + 𝐽2(𝜃2)) } , 𝑓31 = − { 𝑅𝑁 𝐿(𝐽𝑚 𝑁 3 + 𝐽2(𝜃2)) } , 𝑞31 = − { 1 (𝐽𝑚 𝑁 3 + 𝐽2(𝜃2)) } The state-space model derived in Eq. (17) represents the integrated dynamics of the Finger Extensor and was utilized in the simulation of the developed system. 3.4 Mechanical and Electrical Parameter Determination The development of the integrated model for the Finger Extensor was followed by determination of mechanical and electrical parameters involved. This step aids in enhancing the fidelity of the developed model. Mechanical parameters such as radius of 391 IIUM Engineering Journal, Vol. 22, No. 2, 2021 Shahdad et al. https://doi.org/10.31436/iiumej.v22i2.1706 the iris and moment of inertia of the inner mechanism were adapted from [20]. Electrical parameters associated with the actuator model were experimentally found from the motor characteristic curve as shown in Fig. 7. Torque and back EMF constants 𝑘𝑡, 𝑘𝑣 were found from the torque-current and torque-speed curves with similar values of 0.791 and 0.886, respectively. Other parameters such as the viscous friction constant 𝐵𝑣, armature resistance R and inductance L were adapted from [20]. Fig. 7: Motor characteristic curves. 4. MODEL VALIDATION Using the MBD approach for designing a controller for the Finger Extensor, dynamic system modelling was followed by graphical representation of the mathematical formulation in the MATLAB-Simulink environment. Simulation results were validated through hardware-in-the-loop experimentation. The same input was provided to both the developed model as well as the machine and comparisons were drawn between resultant outputs. 4.1 Simulation For carrying out simulation of the mathematical model of the Finger Extensor, the voltage and torques from the motor and user acted as inputs to the Finger Extensor plant while the angle of rotation of the iris was the output. A PID controller was used for optimal position control. Rotational position output and its derivatives were used to calculate velocity and acceleration. These values helped in calculating the force acting on the patient. A desired angle of 𝜃 = 121° (2.11 radians) was fed into the plant and the simulated position of the iris was plotted as shown in Fig. 8. Fig. 8: Comparison between target and simulated angular position of the iris. 392 IIUM Engineering Journal, Vol. 22, No. 2, 2021 Shahdad et al. https://doi.org/10.31436/iiumej.v22i2.1706 4.2 Hardware-in-the-Loop Experiments To validate the developed dynamic model and demonstrate its effectiveness, experiments were conducted making the Finger Extensor a part of the simulation loop. These experiments were conducted with a healthy subject, a female of 29 years of age. A simple open-close movement of the machine was performed. Results from the simulations run in MATLAB were compared with the experimental tests with the Finger Extensor. The experimental set-up as shown in Fig. 9 consisted of the Finger Extensor connected to an Intel Core i5 PC by means of an Arduino Uno microprocessor board. This board received sensory data from the encoder as well as the torque sensor. Communication between the Arduino and MATLAB 2018b software, running on the PC was established using a MATLAB s-function. This function read data from the encoder i.e. the position sensor of the machine and converted the encoder counts to angular displacement of the iris. Fig. 9: Experimental setup for hardware-in-the-loop simulation. The movement commands to the motor and consequently to the encoder were provided using Simulink's support package for Arduino which allowed Simulink blocks to control hardware connected to the Arduino using PWM signals. In this case, hardware controlled was the motor driver connected to the motor. The desired input angle was fed into the hardware and the Finger Extensor was run for about 30 seconds, performing open- close movements. The comparison between the simulated and the experimental angular displacement of the machine is shown in Fig. 10. Fig. 10: Simulated and experimental responses during open-close movements. 393 IIUM Engineering Journal, Vol. 22, No. 2, 2021 Shahdad et al. https://doi.org/10.31436/iiumej.v22i2.1706 The figure shows a complete open and close cycle of the Finger Extensor for 30 seconds. The poles of the Extensor open to their maximum rotation angle of 121° followed by closing motion to 7.89°. From the figure, it is clear that the hardware had a slower response than the simulation and took about 11.20 seconds to sync with the simulation results. However, beyond that time, error was negligible and actual behavior of the Finger Extensor overlapped with the simulated, modeled behavior. From experimental data, it was observed that the mean absolute error was 1.38° and the relative error was 1.13%. However, for rehabilitation applications, movement accuracy is less critical as compared to surgical applications. Also, position resolution of human arm movement is 5 mm or 5º [21], which indicates that a mean absolute error of 1.38° is likely to be acceptable for rehabilitation purposes. Figure 11 shows the comparison between the simulated result and the hardware-in- the-loop response, when the Finger Extensor was programmed to open to an angle of 59.58° (1.04 radians). Simulation and experimental curves took 0.3 seconds to reach the desired angle. The Root Mean Squared Error (RMSE) was calculated as 0.9875. There was a slight overshoot of 2.86º (0.05 radians) which caused the poles of the Finger Extensor to open to an angle 2.86º greater than the target. However, this negligible overshoot did not inflict any discomfort on the subject. Also, the response settled down to its desired value within 0.08 seconds. Fig. 11: Simulated and experimental responses for target angle experiment. 5. CONCLUSION This paper presented a mathematical model for the 1-DOF Finger Extensor rehabilitation machine, taking into consideration the dynamics of the mechanism as well as that of the actuation system. Simulation results show that the developed model tracks the desired position efficiently with minimal error. Hardware-in-the-Loop experiments carried out with the machine demonstrate the validity of the model. System response using the developed model was compared with that obtained through hardware experimentation. The results illustrate the accuracy of the model to the actual behavior of the rehabilitation system and make it suitable for use in the design of a control scheme for it. Obtained results with mean absolute error of only 1.38° are within the human motion resolution limits and exhibit suitability of the model for application in robotic rehabilitation systems. Future research with the Finger Extensor and the developed model will be directed towards development of a control scheme for the machine. This will be aimed at modulating assistance/resistance provided to the patient based on his/her performance using various metrics such as limb velocity, applied force, position error etc. Considering patient's strength and residual ability, primary goal of the controller would be to increase 394 IIUM Engineering Journal, Vol. 22, No. 2, 2021 Shahdad et al. https://doi.org/10.31436/iiumej.v22i2.1706 self-initiated movements and patient engagement in training exercises which would lead to an increase in neuroplasticity. As part of future study, clinical testing of the Finger Extensor will also be carried out with stroke patients. This will include a detailed study of the level of comfort of the device for use with such patients. ACKNOWLEDGEMENTS The authors would like to acknowledge International Islamic University Malaysia (IIUM) for supporting this research under the grant number: P-RIGS18-019-0019. REFERENCES [1] Khor KX, Chin PJH, Rahman HA, Yeong CF, Su ELM, Narayanan ALT. (2014) A novel haptic interface and control algorithm for robotic rehabilitation of stoke patients. In 2014 IEEE Haptics Symposium (HAPTICS), Houston, Texas-USA; pp. 421-426. [2] Plantin J, Pennati GV, Roca P, Baron JC, Laurencikas E, Weber K, Godbolt AK, Borg J, Lindberg PG. (2019) Quantitative assessment of hand spasticity after stroke: imaging correlates and impact on motor recovery. Frontiers in neurology, 10:1-11. [3] Cramer SC. (2019) Intense rehabilitation therapy produces very large gains in chronic stroke. Journal of Neurology, Neurosurgery & Psychiatry, 90: 497. [4] Lambercy O, Ranzani R, Gassert R. (2018) Robot-assisted rehabilitation of hand function. In Rehabilitation Robotics. Volume 1. 1st edition. Academic Press; pp 205–225. [5] Popovic MB. (2019) Biomechatronics. Academic Press. [6] Miao Q, Zhang M, Cao J, Xie SQ. (2018) Reviewing high-level control techniques on robot- assisted upper-limb rehabilitation. Advanced Robotics, 32(24): 1253-1268. [7] Marini F, Hughes CM, Squeri V, Doglio L, Moretti P, Morasso P, Masia L. (2017) Robotic wrist training after stroke: Adaptive modulation of assistance in pediatric rehabilitation. Robotics and Autonomous Systems, 91: 169-178. [8] Su YY, Yu YL, Lin CH, Lan CC. (2019) A compact wrist rehabilitation robot with accurate force/stiffness control and misalignment adaptation. International Journal of Intelligent Robotics and Applications, 3(1): 45-58. [9] Luo L, Peng L, Wang C, Hou ZG. (2019) A greedy assist-as-needed controller for upper limb rehabilitation. IEEE Transactions on Neural Networks and Learning Systems, 30(11): 3433-3443 [10] Pehlivan AU, Losey DP, O’Malley MK. (2015) Minimal assist-as needed controller for upper limb robotic rehabilitation. IEEE Transactions on Robotics; 32(1): 113-124. [11] Pehlivan AU, Losey DP, Rose CG, O'Malley MK. (2017) Maintaining subject engagement during robotic rehabilitation with a minimal assist-as-needed (mAAN) controller. In 2017 International Conference on Rehabilitation Robotics (ICORR): 2017; London; pp. 62–67. [12] Fricke SS, Bayon C, Rocon E, van der Kooij H, van Asseldonk EH. (2018) Pilot study of a performance based adaptive assistance controller for stroke survivors. In International Conference on Neuro Rehabilitation. Springer, pp. 302–306. [13] Stroppa F, Loconsole C, Marcheschi S, Mastronicola N, Frisoli A. (2018) An improved adaptive robotic assistance methodology for upper-limb rehabilitation. In International Conference on Human Haptic Sensing and Touch Enabled Computer Applications. Springer; pp. 513–525. [14] Bringmann E, Krämer A. (2008). Model-based testing of automotive systems. in 1st international conference on software testing, verification, and validation. IEEE; pp. 485-493. [15] Soltani A, Assadian F. (2016) A hardware-in-the-loop facility for integrated vehicle dynamics control system design and validation. IFAC-Papers Online, 49(21): 32-38. [16] Mancisidor A, Zubizarreta A, Cabanes I, Bengoa P, Brull A, Jung JH. (2019) Inclusive and seamless control framework for safe robot-mediated therapy for upper limbs rehabilitation. Mechatronics, 58: 70-79. [17] Guang H, Ji L, Shi Y, Misgeld BJ. (2018) Dynamic modeling and interactive performance 395 IIUM Engineering Journal, Vol. 22, No. 2, 2021 Shahdad et al. https://doi.org/10.31436/iiumej.v22i2.1706 of PARM: A parallel upper-limb rehabilitation robot using impedance control for patients after stroke. Journal of Healthcare Engineering, 2018: 1-11. [18] Franco W, Maffiodo D, De Benedictis C, Ferraresi C. (2018) Dynamic modeling and experimental validation of a haptic finger based on a mckibben muscle. in IFToMM Symposium on Mechanism Design for Robotics. Springer; pp. 251–259. [19] Ali MAA, Azlan NZ. (2006) Design of iris mechanism for flexion and extension training in hand rehabilitation. ARPN Journal of Engineering and Applied Sciences; 11: 4115-4122. [20] Osman JHS. (1992) Integrated Model of Industrial Robot for Control Applications. Jurnal Teknologi, 19(1): 27-41. [21] Germanotta M, Vasco G, Petrarca M, Rossi S, Carniel S, Bertini E, Cappa P, Castelli E. (2015) Robotic and clinical evaluation of upper limb motor performance in patients with Friedreich’s ataxia: an observational study. Journal of Neuroengineering and Rehabilitation, 12(1): 1-3. . 396