Study of Interactive Bike Simulator in Application of Virtual Reality

4 downloads 0 Views 817KB Size Report
Ching-Kong Chen*, Fong-Jie Chen**, Jung-Tang Huang ***,. Chi-Jung Huang**. Keywords: ... He and Ma [3] ... Author for Correspondence: Jung-Tang Huang.
中國機械工程學刊第二十八卷第六期第 633~640 頁(民國九十六年) Journal of the Chinese Society of Mechanical Engineers, Vol.28, No.6, pp.633~640 (2007)

Study of Interactive Bike Simulator in Application of Virtual Reality Ching-Kong Chen*, Fong-Jie Chen**, Jung-Tang Huang ***, Chi-Jung Huang** Keywords:

Virtual Reality, Dynamic Platform, Bike.

ABSTRACT This paper proposes an interactive bike simulator of 2-degrees-of-freedom (DOF) mechanisms with dynamic platform driven by changing cable length and its application to virtual reality for the rider in the virtual environments. The bike motion equations and road conditions in virtual bike driving can be calculated and analyzed by using numerical methods and software of the virtual reality. We also expect an interactive bike simulator between rider and virtual reality system could integrate exercise with entertainment.

INTRODUCTION Nowadays a variety of vehicle simulators have been developed for different types of vehicles, such as airplane, tank, motorbike, automobile, and ship simulators are becoming widely used in training for driving, evaluation of environments, etc. In the past few years, virtual reality technique has been extensively applied to movies, AC game, PC game, medicine, military affairs, etc. The platform is the most important part of the vehicle simulator. Today, 6-DOF Stewart platform for motion feeling has mostly been used for

vehicle simulators [3][4][5][7].The bike dynamic model, which has been analyzed for many times from different mathematical levels in previous studies. He and Ma [3] have thoroughly derived the motion equations for a The study of sloshing-force behavior of fluid rear wheel, respectively, provide force feedback of Korea KAIST bicycle simulator proposed by Kwon software system. Handlebar and pedal resistance bike, which are the most important components in the systems which are attached to the handlebar and the [4] [5], and others. Shin [7] et al. proposed the sliding mode controller with perturbation estimator, which is a well-known model-base controller, for reduction of the low frequency tracking error associated with the perturbation dynamics. This paper presents an interactive bike simulator, which contains the development of 2-DOF dynamic platform, virtual environment, bike motion equations, numerical simulation and analysis.

MECHANISIMS ARCHITECTURE OF DYNAMIC PLATFORM The design of the dynamic platform we have developed is based on an idea of using a triangle platform with the point of H1, H2 and H3. As showed in Fig. 1, our purpose is to make the center of gravity be located inside triangle platform, through the change in center of gravity and length of H2 and H3 to work relative motion on the platform.

Paper Received August,2007. Revised November,2007 Accepted December,2007. Author for Correspondence: Jung-Tang Huang. *

Associate Professor, Department of Mechanical Engineering, National Taipei University of Technology, Taipei, Taiwan 106, ROC.

** Graduate Student, Institute of Mechatronic Engineering, National Taipei University of Technology, Taipei, Taiwan 106, ROC. *** Professor, Department of Mechanical Engineering, National Taipei University of Technology, Taipei, Taiwan 106, ROC.

-633-

J. CSME Vol.28, No.6 (2007)

Fig. 1.

Prototype of 3-DOF dynamic platform.

Fig. 2.

The vibration effect of yaw angle from the

In accordance with Grübl e r ’ sf or mu l a ,wel e a r n Eq. (1), is able to calculate the degree-of freedom of a platform in space, where d, n, g and fi represent the dimension of the feasible motion space of all the joints of a given mechanism, the number of constraints of the joint, and the degree of freedom at the ith joint, respectively [8] [9]. g

M

DOF

d  n  g 1   f i

(1)

l1

i 1

R1

According to Eq. (1), the degree-of-freedom of the dynamic platform, which has pitch, roll, and yaw motion, can be calculated as Eq. (2). M

3 DOF

6  4 5 1  3 5 3 DOF

(2)

Vibration Effect of Yaw Angle Because there is no constraint for the yaw angle, only controlling cables at H2 and H3 can not withstand vibration effect of the platform around the H1 as shown in Fig. 2. For this reason we consider adding a toggle mechanism, as shown in Fig. 3, which consists of 2-link (l1, l2) and 3 joints (R1, R2, R3). Consequently, the platform is reduced into 2-DOF (pitch angle, roll angle) as calculated by Eq. (3). 2 DOF

6  6 8 1  1 1 2 1 3 6 2 DOF

l2

R2

3-DOF dynamic platform.

Fig. 3.

The joints of H2 and H3 are connected by cables; and H1 is a fixed universal joint; therefore the dynamic platform can generate relative motions by changing cable length.

M

R3

The toggle mechanism and dynamic platform.

Kinematics Analyses of Dynamic Platform On the basis of Fig. 4 and Fig. 5, dimension, coordinate and relative position etc. in each part of the platform can be obtained, and following by the geometry of relative position above, Eqs. (4), (5) and (6) are calculated out. Using Matlab to analyze Eqs. (4), (5) and (6), we comprehend how to make the platform working on 2-DOF (pitch angle, roll angle) motions through the controlling of rope length by using a motor-driven reel.

(3)

-634-

H.K. Sun et al.: Dynamic Analysis of Rigid-Body Mechanisms Mounted on Support Structures

constructing a dynamic model is necessary. Owing to physical characteristics of bike are difficult to obtain, we use Inventor of AutoDesk to draw the model of bike and rider to gain moment of inertia, center of gravity, area etc. by physical characteristics supplied from Inventor. As to Forces acting on the rider-bicycle system is shown in Fig. 6, the following formula (7), (8) and (9) can be calculated out in accordance with Ne wt on’ s second law [10].

Fig. 4. The pitch angle view of 2-DOF dynamic platform.

Fig. 6. Fig. 5.

L1

2

The roll angle view of 2-DOF dynamic platform S 2 D 2 2 SD cos   1  2 2 2  (4) S  D  L1  1  

 1    cos

 

1

mg sin  m Z r

L  L  1  2   W   

M

(5)

M drive FrDrag F fDrag Fwind mg sin  r Jf  J r   Z r m  r 2  r 2    

y 1  D sin 1 L1 sin  1 2 

 x1  y 1 D 2 L1 2 DL 1 cos 2 2

 2  cos

2

1

x 1 2  y 1 2  D   2 DL 1 

2

2  L1    

  F rZ r  J r  r

(7)

(8) (9)

According to Eq. (7), (8) and (9), we can derive the second order differential equation, Eq. (10).

x1 D cos 1 L1 cos  1 2  2

drive

  F fZ r  J f  f

  L1  1 2  L1 2 n1r1  sin      L 2  1 2  L 2 2 n 2 r2  sin      sin

F rZ F fZ F rDrag F fDrag F wind

 

2 SD

Forces acting on the rider-bike system.

(6)

BIKE DYNAMIC MODEL In order to examine the influence caused by extra forces to the system while riding on road surface,

(10)

The main resistances with riding outside are normally from wind and the road condition of rise and fall as expressed in Eq. (10). In order to run the simulation of bike dynamic system more accurately, it will need to consider the effect from coefficients of drag to the bike dynamic system. The resistance forces caused by coefficients of drag are shown in Eq. (A1), (A2) and (A3). Eq. (A1) and (A2) represent the forces acting on Front & Rear wheel, respectively, while Eq. (A3) the force acting onto the rider, etc (Appendix A).

-635-

J. CSME Vol.28, No.6 (2007)

SIMULATION Numerical Methods of Bike Motion Equations The motion equation of system, Eq. (10) is a nonlinear second-order differential equation of initial conditions. In order to solve this differential equation, we adopt Fourth-Order Runge-Kutta method [6].

DEVELOPMENT OF THE VIRTUAL ENVIRONMENT AND VIRTUAL MODEL Animation of virtual bike driving is developed from 3D virtual models of 3D Studio Max and virtual environment of Virtools Dev. For creating exclusiveuse virtual bike driving such as 3D model, road condition, bike motion equations, and an option of SDK (Software Development Kit) provided by Virtools Dev is indispensable.

SYSTEM ARCHITECTURE OF VIRTUAL BIKE DRIVING Fig. 7 shows the control flow chart of the bike simulator. The system uses estimation to measure pedal torque and handlebar angle, and then feedback these information into bike motion equation, follows by computing via numerical method, and then output the result to Virtools to determine the forward velocity of virtual environment. Meanwhile, on the way of forwarding in progress, the function of road condition feedback will keep its activities to forward control signal into the resistance system and the controller of dynamic platform as well. Furthermore, the system can achieve the result of resistance force feedback and track the control of pitch angle and roll angle.

Kinematics Simulation and Analyses of Each Angle of Dynamic Platform from MATLAB Fig. 8 and Fig.9 show the relationship between the pitch angle of platform and the motor is linear. In addition, the analysis also shows the pitch angle will be in about 12 degrees while dynamic platform reach in horizontal position with maximum degree of operation area up to about 24 degrees. Meanwhile, the motor rotation angle and operation area of roll angle is also linear according to Fig. 10. Figures 10 and 11 describe the correlated rotation rate the motor requests when roll angle is located in horizontal position and also shows the relative rotation of two motors following by the change of roll angle to pitch angle. We can derive the related parameter from those mentioned above. The related parameter is an important pointer to platform feedback control. Numerical Simulation and Analyses of Time Responses of the Velocity and Acceleration of the Pedal Torque In the light of the various necessary parameters of the system in table 1, it is used in applying Fourth-Order Runge-Kutta method. It results in a steady-state solution. We observe the velocity response

Fig. 8.

Fig. 7.

Block diagram of system architecture.

-636-

Rotation response of pitch angle.

H.K. Sun et al.: Dynamic Analysis of Rigid-Body Mechanisms Mounted on Support Structures

Fig. 9.

Rotation response of pitch angle operation on the horizontal position. Fig. 11. Rotation response of roll angle couple with pitch angle.

Fig. 10.

Rotation response of roll angle.

of torque 5 N-m, as shown in Fig. 12, and realize the system will converge at 250 second. The velocity response shown in Fig. 13 will reveal the convergence of exponential. Fig. 13 can prove the motion equation will reveal convergence state ultimately via velocity and acceleration response. Table 1. Specific data for bike motion equations. M drive (N-m) Cd

5

9

0.0491

0.0491

C xo

0.6

0.6

RS r (m) J f ( kg  m

)

0.25 0.337 0.0885

0.25 0.337 0.0885

J r ( kg  m )

0.1085

0.1085

0 100

0 100

2 2



(rad)

m Bike

Rider

(kg)

Air ( kg / m 3 )

1.226

1.226

)

r

r 2

A Rider ( m 2 )

0.6

A wheel

(m

2

2

Fig. 12.

Time response of the velocity while pedal torque is 5 N-m.

Fig. 13.

Time response of the acceleration while pedal

0.6

-637-

J. CSME Vol.28, No.6 (2007)

torque is 5 N-m.

torque is 9 N-m.

Fig. 14 shows the time response of the velocity for pedal torque of 9 N-m. In addition, we can find the acceleration response converges at 150 second in system convergence, as shown in Fig. 15. By comparing the difference between 5 N-m and 9 N-m, it is found that the higher torque is faster in response than that of lower torque.

Fig. 16.

Fig. 14.

Time response of the velocity while pedal torque is 9 N-m.

Performance of Virtual Bike Driving from Virtools Road condition design is shaped up via the idea from adopting differential equation. As shown in Fig. 16, after sampling from a fixed sample time, vectors of X Y Z will be obtained via Get Position (Virtools Building Blocks ), through calculating the difference equation, three increased values are obtained, which could help us to understand the road condition (uphill or downhill) by values in positive or negative.

Fig. 15.

2-axes coordinate of road condition.

Fig.17.

Virtual bike driving Performance of the bike motion equation and road condition.

We can also use the same equation to calculate out angles. On the other hand, design of bike motion equation is using the same method adopted on the Runge-Kutta method to program a Virtools SDK projects form the Visual C++. It is important that all the parameters in virtual environment are changing continuously, the solution of steady-sate from the Runge-Kutta method will not be easy to obtain. Therefore, in order to change velocity with input-torque, the system should be designed to overlap the obtained parameters repeatedly. The virtual reality system of the Virtools consists of a personal computer (PC) with CPU of AMD 1.8 GHz, DDR RAM of 1 Giga Bytes and graphic chip of ATI Random 9200 Series. Performances of road condition and bike motion equations in the Virtools is approximately 70 frames per second (FPS), therefore the software system of virtual reality we developed has a high performance, as shown in Fig. 17.

Time response of the acceleration as pedal

-638-

H.K. Sun et al.: Dynamic Analysis of Rigid-Body Mechanisms Mounted on Support Structures

DISCUSSION This study adopts a 2-DOF dynamic platform developed by the authors (as shown in Fig. 18) to study the interactive bike simulator in application of virtual reality for the rider in the virtual environments. Except for cooperating to the bike in this study, other vehicles can collocate as well, owing to the original aim of design developed for dynamic platform of multi-function, not dynamic platform of single-function. In order to operate the subject of bike simulator, virtual bike riding for background is necessary for making virtual environment. Even though to develop virtual environment by oneself takes time, it seems inevitable. In general, most current game software do not open correlative interface, therefore, getting correlative parameter is very difficult. However, self-design and transforming is also impossible. For that reason, to develop an adaptable virtual environment for applying to interactive leisure equipment is very important. Lastly, introducing numerical simulation and analyses with adopting Virtools SDK design by Visual C++ will be the way to solve many design problems and make the system being well-processed.

Fig. 18.

Bike simulator prototype.

CONCLUSION This paper has successfully established an interactive bike simulator of 2-degrees-of-freedom (DOF) mechanisms with dynamic platform and its application to virtual reality from the rider in the virtual environments. Because the platform is driven by changing cable length, the cost could be reduced comparing the traditional hydraulic or ball-screw driven platform based on similar motion range. The bike motion equations and road conditions in virtual bike driving have been calculated and analyzed by using numerical methods and software of the virtual reality. In addition to an interactive bike simulator between rider and virtual reality system could be expected to

integrate exercise with entertainment, other kinds of exercise machine such as boat-rowing, surfing, horse-riding could be easily substitute the bike. The extra DOF of yaw angle motion can also be added on this 2-DOF dynamic platform.

REFERENCES [1] Analytic Cycling, www.analyticcycling.com [2] Ǻström,K. j . ,Kl e i n ,R. E. ,Le nn a r t s s on ,A. ,“ Bi c y c l e Dy n a mi c sa n d Con t r ol , ” IEEE Control Systems Magazine 25 (4), pp. 26– 47, 2005. [3] He ,Q. ,Fa n ,X. ,Ma ,D. ,200 5,“ Full bicycle dynamic model for interactive bicycle simulator,”Journal of Computing and Information Science in Engineering 5 (4), pp. 373– 380, 2005. [4] Kwon, D.-S., Yang, G.-H., Lee, C.-W., Shin, J.-C., Park, Y., Jung, B., Lee, D.-Y., Lee, K., Han, S.-H., Yoo, B.-H., Wohn, K.-Y., Ahn, J.-H. ,“ KAIST interactive bicycle simulator,”Robotics and Automation, Proceedings 2001 ICRA. IEEE International Conference, Vol. 3, 2001, pp.2313– 2318, 2001. [5] Kwon, D.-S., Yang; G.-H., Park, Y., Kim, S., Lee, C.-W., Shin, J.-C., Han, S., Lee, J., Wohn, K.Y., Kim, S., Lee, D. Y., Lee, K., Yang, J.-H., Choi, Y.-M. ,“ KAIST interactive bicycle racing simulator: the 2nd version with advanced features,”Intelligent Robots and System, IEEE/RSJ International Conference, Vol. 3, 30 Sept.-5 Oct. 2002, pp.2961– 2966, 2002. [6] Kiusalaas, J., Numerical Methods in Engineering with MATLAB, Cambridge University Press, 2005. [7] Shin, J.-C., Lee, C.-W. ,“ Rider's net moment estimation using control force of motion system for bicycle simulator,”Journal of Robotic Systems 21 (11), pp. 597– 607, 2004. [8] Wolf, A., Ottaviano, E., Shoham, M., Ceccarelli, M., “ Application of line geometry and linear complex approximation to singularity analysis of the 3-DOF CaPaMan parallel manipulator,” Mechanism and Machine Theory 39 (1), pp. 75– 95, 2004. [9] Yoon ,J . ,Ry u ,J . ,“ A new family of hybrid 4-DOF parallel mechanisms with two platforms and its application to a footpad device,”Journal of Robotic Systems 22 (5), pp. 287– 298, 2005. [10] Ying, S.J., Advanced Dynamics, AIAA Education Series, 1997.

-639-

APPENDIX

J. CSME Vol.28, No.6 (2007)

I.

互動式自行車模擬器應用於

When the bike was running, the wind resistance force acted on the rider-bike system. FfDrag, FrDrag and Fwind are the wind resistance and drag forces on the rear wheel, front wheel and rider. RS is the rear shelter [1]. V is the velocity of bike. is the air density. A is the area. Cd and Cxo are the coefficients of drag. V2 2 V 2  A wheel C d  1 RS 2 V2 A Rider C xo 2

F fDrag  A wheel C d F rDrag

F wind

虛擬實境之研究

陳正光

(A1)

陳峰傑

黃榮堂

黃啟榮

國立台北科技大學機械工程學系/機電所



(A2)

摘 要

(A3)

本文提出一個以繩索驅動並具兩自由度動態平 台機構的互動式自行車模擬器,及讓騎者於虛擬環 境中的虛擬實境應用。虛擬騎乘之自行車運動方程 式及路況可以使用數值方法或虛擬實境軟體進行計 算與分析。此新研發之介於騎乘者與虛擬實境系統 間之互動式自行車模擬器,相信可將娛樂整合於健 身運動中。

-640-