• No results found

1 function ds = PrepareDS ( f i l e n a m e , z_mask , u_mask , t_span , fm , h ) 2 % Load c o m p l e t e d a t a s e t from f i l e .

3 load( f i l e n a m e ) ; 4

5 % C o n s t r u c t t i m e s e r i e s from r e l e v a n t d a t a .

6 z_nav = t i m e s e r i e s ( [ n a v d a t a . x _ v e l o c i t y , n a v d a t a . h e i g h t , n a v d a t a . p i t c h ] ’ , n a v d a t a . t i m e ) ;

7 z_vs = t i m e s e r i e s ( [ 2∗pi/60∗v e h i c l e S t a t u s . engine_rpm , v e h i c l e S t a t u s . a x l e R a d P r S e c ] ’ , v e h i c l e S t a t u s . t i m e ) ;

8 u = t i m e s e r i e s ( [ v e h i c l e S t a t u s . c u r r e n t _ t h r o t t l e _ c o m m a n d / 1 0 0 ,

v e h i c l e S t a t u s . current_break_command / 1 0 0 , v e h i c l e S t a t u s . u r r e n t _ g e a r ] ’ , v e h i c l e S t a t u s . t i m e ) ;

9 t = n a v d a t a . t i m e ( n a v d a t a . t i m e <= v e h i c l e S t a t u s . t i m e (end) ) ; 10

11 % Cut t i m e t o p r o v i d e d t i m e span . 12 i f( n o t (isempty( t_span ) ) )

13 i f( t_span ( 2 ) < t_span ( 1 ) )

14 error( ’ S t a r t ␣ t i m e ␣ l a r g e r ␣ than ␣ end ␣ t i m e . ’ ) ; 15 e l s e i f ( t ( 1 ) >= t_span ( 1 ) )

16 error( ’ S t a r t ␣ t i m e ␣ o u t s i d e ␣ d a t a s e t ’ ) ; 17 e l s e i f ( t (end) <= t_span ( 2 ) )

18 error( ’ End␣ t i m e ␣ o u t s i d e ␣ d a t a s e t ’ ) ;

19 end

20 t = t ( ( t_span ( 1 ) <= t ) & ( t <= t_span ( 2 ) ) ) ;

21 end

22

23 i f isempty( fm )

24 % Use n a v d a t a ’ s t i m e v e c t o r a s common t i m e v e c t o r .

25 ds . t = t ;

26 e l s e

27 % Use p r o v i d e d f r e q u e n c y t o c o n s t r u c t t i m e v e c t o r . 28 M = f l o o r( ( t (end)−t ( 1 ) )fm ) ;

29 ds . t = t ( 1 ) : 1 / fm : t ( 1 ) + M/fm ;

30 end

31

32 % Re−s a m p l e ans c o n c a t e n a t e measurements

33 ds . z = [ z_vs . r e s a m p l e ( ds . t ) . d a t a ( : , : ) ; z_nav . r e s a m p l e ( ds . t ) . d a t a ( : , : ) ] ; 34 ds . u = u . r e s a m p l e ( d s . t ) . d a t a ( : , : ) ;

35 36

37 % S t o r e d a t a names

38 ds . measurement_names = { ’ $ \omega_e$ ’ , ’ $ \omega_{rw} $ ’ , ’ $v_x$ ’ , ’ $r_z$ ’ , ’ $ \ theta_v$ ’ } ;

39 ds . input_names = { ’ $ \ a l p h a $ ’ , ’ $ \ b e t a $ ’ , ’G ’ } ; 40

41 % S e t b r a k e t o z e r o when v e h i c l e i s i n n e u t r a l a s t h i s can o n l y b e done i n 42 % manual mode w h i c h d o e s n o t r e p o r t b r a k e a c t u a t o r p o s i t i o n a c c u r a t e l y . 43 % A l s o chop o f any p a r t s where t h e v e h i c l e was n o t i n n e u t r a l .

44 i f ds . u ( 3 , 1 ) == 3

45 mask = d s . u ( 3 , : ) == 3 ;

46 ds . t = ds . t ( mask ) ;

47 ds . z = ds . z ( : , mask ) ; 48 ds . u = ds . u ( : , mask ) ;

49 ds . u ( 2 , : ) = zeros( 1 , numel ( ds . u ( 2 , : ) ) ) ;

50 end

51

52 % Remove unwanted measurements

53 i f n o t (isempty( z_mask ) ) 54 ds . z = ds . z ( z_mask , : ) ;

55 ds . measurement_names = ds . measurement_names ( z_mask ) ;

56 end

57

58 % Remove unwanted i n p u t s

59 i f n o t (isempty( u_mask ) ) 60 ds . u = ds . u ( u_mask , : ) ;

61 ds . input_names = d s . input_names ( u_mask ) ;

62 end

63

64 % S t o r e number

65 ds . Nz = numel ( ds . measurement_names ) ; 66 ds .M = numel ( ds . t ) ;

67 ds . Nu = s i z e( d s . u , 2 ) ; 68

69 % P l o t t o p r o v i d e d a x i s 70 i f n o t (isempty( h ) ) 71 f i g u r e( h ) ;

72 PlotDS ( ds )

73 end

74 end

Appendix B

Derivation of the drive line equations

This appendix presents the derivation of the equation of motion for the drive line from the bond graph model of the drive line presented in section 4.3.4. The bond graph is shown in fig. 4.10 on page 33. Figure B.1 shows the same bond graph model, but simpler notation and numbered bonds, making the derivation of the equations of motion easier to follow. All elements are assumed to not be modulated, as modulation does not change to structure of the equations. The sources of effort representing the tire and brake torques are represented as a single source.

The bond graph model has four state variables: the momentums p1,p2, and p4, caused by the inertia elements connected to bond1,2, and4, and the displacementq3 caused by the capacitive element connected to bond3. Starting withp1 its derivative is the sum of the efforts going to the common flow node it is connected to:

˙

p1=e0−e8−e9 (B.1)

Following the causality of the efforts gives the following:

e0=Se0 (B.2)

e8=e6 (B.3)

e9=r9f9=r9f2=r9p2

i2 (B.4)

Se 1

I i1 GY

r9

1

C ΦC,3

I i2

R b5

TF m12

0

R ΦR,6

TF m14

0 TF

m16

1

R b7

I i4

0 Se

1

8

9

10

5 2

3 12

13

6

14 15 16 17

4

7

00

Figure B.1: Numbered version with simplified notation of the drive line bond graph orig-inally presented in fig. 4.10 on page 33.

99

Resulting in the following expression forp˙1:

˙

p1=Se0−e6−r9

p2

i2

(B.5) Althoughe6 is still not completely determined. This is because it will be reused later and it is therefore easier to consider it separately. e6is caused by the non linear resistanceΦb,6, with f6 as input. Because of the structure of the non linear in the drive line model, the resistance is defined1:

e6= ΦR,6(f6) := ΦR,6(f8, f14) (B.6) The two flowsf8 andf14 are:

f8=f1= p1 i1

(B.7) f14=m14f15=m14(f13−f16) =m14

m12

p2

i2

−m16

p4

i4

(B.8) The same procedure is performed forp2 andp4 resulting in:

˙

p2=e10−e5−e3−e12=r9p1 i2

−b2p2 i2

−ΦC,3(q3)−m12m14e6 (B.9)

˙

p4=e00−e7+e17=Se00−b7p4 i4

+m16m14e6 (B.10)

˙

q3 is found similarly, but by summing the flows instead of efforts. As it is connected to a common flow node this is simply:

˙

q3=f3=f2=p2 i2

(B.11) Rewriting the equations in therms of the flows instead of the momentums gives:

i11=Se0−e6−r9f2 (B.12)

i22=r9f1−b2f2−Φ−1C,3(q3)−m12m14e6 (B.13)

˙

q3=f2 (B.14)

i44=m16m14e6−b7f4−Se00 (B.15) e6= ΦR,6(f1, m14(m12f2−m16f4)) (B.16) To arrive at the equations presented in section 4.3.4 the appropriate values for the different elements, as presented in the original bond graph model shown in fig. 4.10 on page 33, are simply substituted into the equations derived here.

1This breaks the rules of the bond graph as it should have been a function of the sum:f8f14, and in hindsight it may have been more correct to represent the belt pulley contact with a more specialized two port element than a common effort junction and a resistive element.

Glossary

AUV autonomous underwater vehicle. 1

CVT continuously variable transmission. ix, 1, 2, 17, 19–21, 23, 29, 30, 32, 34, 35, 42, 43, 54–57, 66, 74, 75, 77

EKF extended Kalman filter. 7, 52

FFI the Norwegian Defence Research Establishment. v, 1, 23, 25 GNSS global navigation satellite system. 1, 25

IMU inertial measurement unit. 25

OLAV off-road light autonomous vehicle. ix, xiii, 1, 2, 23, 25, 27, 38, 42, 53, 55, 81, 94, 96 PLC programmable logic controller. 25

PVT Polaris Variable Transmission. 19, 23

ROS the Robotic Operating System is a framework for writing software for robots and robot like systems. It provides facilities for creating software that spans multiple executables and computers by providing a flexible message, configuration, initialization and monitoring services. It also includes an extensive repository of easy to interface programs that completes common tasks, like interfacing senors, actuators, simulation, indoor navigation etc. The standard distribution of ROS includes C++ libraries and Python modules for integrating software with ROS.[1] . 1, 26

UGV unmanned ground vehicle. v, 1

UKF unscented Kalman filter. x, xiii, 3, 5, 7, 8, 10, 52, 57, 58, 61, 66–70, 74, 77, 81, 88, 89, 92–94, 96

101

Bibliography

[1] About ROS.url:http://www.ros.org/about-ros/(visited on 01/19/2016).

[2] Robert Grover Brown and Patrick Y.C. Hwang.Introduction to Random Signals and Applied Kalman filtering. 4th edition. John Wiley & Sons, Inc., 2011.

[3] MARCO Cammalleri. “A new approach to the design of a speed-torque-controlled rubber V-belt variator.” In: Proceedings of the Institution of Mechanical Engineers, Part D: Journal of Automobile Engineering 219.12 (2005), pp. 1413–1427.

[4] Marco Cammalleri and Francesco Sorge. “Approximate Closed-Form Solutions for the Shift Mechanics of Rubber Belt Variators.” In:ASME 2009 International Design En-gineering Technical Conferences and Computers and Information in EnEn-gineering Con-ference. American Society of Mechanical Engineers. 2009, pp. 187–196.

[5] Joakim Carlsson and Carl Nordheim. “A Parameter Estimation method for Continu-ous Time dynamical Systems based on the Unscented Kalman Filter and Maximum Likelihood.” MA thesis. Chalmers University of Technology, 2011.

[6] Massimo Guiggiani.The Science of Vehicle dynamics. Springer Netherlands, 2014.

[7] Polaris Sales Inc.2013 RANGER XP 900 Service Manual.2012.

[8] The Mathworks Inc. Particle Swarm Optimization Algorithm. url: http : / / se . mathworks . com / help / gads / particle - swarm - optimization - algorithm . html (visited on 05/15/2016).

[9] The Mathworks Inc. What Is Particle Swarm Optimization? url: http : / / se . mathworks.com/help/gads/what- is- particle- swarm- optimization.html (vis-ited on 05/15/2016).

[10] Reza N. Jazar.Vehicle Dynamics: Theory and Application. 2nd. Springer, 2014.

[11] S. J. Julier, J. K. Uhlmann, and H. F. Durrant-Whyte. “A new approach for filtering nonlinear systems.” In:American Control Conference, Proceedings of the 1995. Vol. 3.

June 1995, 1628–1632 vol.3.doi:10.1109/ACC.1995.529783.

[12] G. Julió and J.-S. Plante. “An experimentally-validated model of rubber-belt {CVT}

mechanics.” In: Mechanism and Machine Theory 46.8 (2011), pp. 1037–1053. issn: 0094-114X.doi:http://dx.doi.org/10.1016/j.mechmachtheory.2011.04.001.

url:http://www.sciencedirect.com/science/article/pii/S0094114X11000619.

[13] Dean C. Karnop, Donald L. Margolis, and Ronald C. Rosenberg.System Dynamics:

Modeling, Simulation, and Control of Mechatronic Systems. 5th ed. Wiley, 2012.

[14] Karel J. Keesman.System Identification: An Introduction. Springer, 2011.

[15] J. Kennedy and R. Eberhart. “Particle swarm optimization.” In: Neural Networks, 1995. Proceedings., IEEE International Conference on. Vol. 4. Nov. 1995, 1942–1948 vol.4.doi:10.1109/ICNN.1995.488968.

[16] Maaike van der Laan and Joachim Luh. “Model-based variator control applied to a belt type CVT.” In:International Congress on Continuously Variable Power Transmission CVT99. 1999, pp. 16–17.

[17] J. H. Lee and W. S. Yoo. “Non-singular slip (NSS) method for longitudinal tire force calculations in a sudden braking simulation.” In:International Journal of Automotive Technology 13.2 (2012), pp. 215–222.

103