Autonomous Vehicle and Modelling Assignment 2023

Problem 1. In Fig. 1 there is a weighted graph, circles represent vertices, links represent edges, and numbers represent edge weights.

Figure 1: The graph.

1. Find a shortest path from vertex S to vertex T , i.e., a path of minimum weight between S and T .

2. Find a minimum subgraph (set of edges) that connects all vertices in the graph and has the smallest total weight (sum of edge weights).

Justify your answers.

Problem 2.

1. Let E be a binary relation symbol representing adjacency in graphs. (That is, E(x, y) means in a graph that “the vertices x and y are adjacent”.) Write a formula ?(x, y) in the first-order logic over the language L = ?E? with equality expressing that

“x and y have exactly two common neighbors.”

Note that except logical symbols you may use only E and =. (The phrases “x and y are adjacent” and “x and y are neighbors” have the same meaning.)

2. Find a model and a non-model of a theory

T = {(?x)¬E(x, x), (?x)(?y)(E(x, y) ? E(y, x)), (?x)(?y)?(x, y)}

over the language L. By a non-model of T we mean a structure of the same language that is not a model of T .

3. Is the formula (?x)( ?y)?(x, y) provable or refutable from T (in a sound and complete proof system using the axioms of T )? Give an explanation for your answer.

Problem 3. Consider finite strings over the alphabet S = a{, b, c, d }. The power operation represents string repetition, for example a3b4c denotes the string aaabbbbc. Define a contextfree grammar G generating the language L(G) = { w|(?i, j, k)w = aib(i+j+k)cjdk}, the set of words where the number of b’s is the same as the number of all other letters together and the letters are ordered alphabetically. For example, the words ab, aaabbbbd, abbbcd belong to the language, words abba, aabbbbbc, abc do not belong to the language. Justify your answers.

Problem 4. Consider the following C++ program, and one of the C# or Java programs:

C++: 1

# include iostream

2

3 tem plate typenam e T void m ( T t) { std :: cout - m ( T=-

4 typeid (T). nam e () -)- std :: endl; }

5 void m ( int i) { std :: cout - m ( int) n-; } tem plate typenam e T void f( T t) { m ( t); }

6

7

int m ain () {

8 f(- H ello -);

9 f(123);

10 f( 4000000000 );

11 }

12

C#:

1 using System ;

2

3 class Program {

4 static void m T ( T t) { Console . W rite Line ($- m T ( T={ typeof (T)})-); }

5 static void m ( int i) { Console . W rite Line (- m ( int)-); }

6 static void f T ( T t) { m ( t); }

7

8 static void M ain ( string [] args) {

9 f(- H ello -);

10 f(123);

11 f( 4000000000 );

12 }

13 }

Java: 1

public class Main {

2 static T void m ( T t) { System . out. println (- m ( 3 T)-); } static void m ( int i) { System . out. println (- m 4 ( int)-); } static T void f( T t) { m ( t); }

5 public static void m ain ( String [] args)

6

{ f(- H ello -);

7

f( 123);

8 f( 4000000000 L);

9 }

10 }

11

For the chosen pair of the C++ and C# programs, or the C++ and Java programs, answer the following:

1. What output will be printed by the C++ program, and what output by the second language in the pair?

2. Explain why the C++ program behavior is different (in terms of methods called) from that of the C# or Java one. Why do different methods get called?

3. In C++, C#, or Java, write a generic function that takes 3 arguments of any suitable type T and returns their maximum value.

Problem 5. Consider a transaction schedule S = R1(A), W2(B), R3(C), R3(B), W1(C), W3(B), COMMIT3, ABORT2, COMMIT1.

The notation uses Ri(X) and Wi(X), respectively, for reading from and writing to the variable X in the i-th transaction. COMMITi and ABORTi denote successful and unsuccessful end of i-th transaction, respectively.

If operations from individual transactions are written separately while maintaining their ordering, the schedule can be presented as follows:

Time

(running top to bottom) T1 T2 T3

1 R1(A)

2 W2(B)

3 R3(C)

4 R3(B)

5 W1(C)

6 W3(B)

7 COMMIT3

8 ABORT2

9 COMMIT1

1. Find all conflicting pairs of operations in the schedule S.

2. Is the schedule S conflict-serializable? Justify your answer.

3. Is the schedule S recoverable? Justify your answer.

If the schedule S lacks a particular property, correct it so that it satisfies the property without changing the order of the read and write operations.

If the schedule cannot be fixed, describe why not.

TM_simple: A Simple to Use Tyre Model

MATLAB Version 4.0

Mar 16, 2007, W. Hirschberg

General Procedure

TM_simple is a very simple tyre model to compute the longitudinal and lateral tyre forces Fx, Fy for a given nominal load Fz and the rolling resistance torque TyR under steady state conditions. The road is defined to be even, camber influence is neglected. However, the nominal road-tyre friction ? is able to be scaled in a realistic manner.

The horizontal forces Y which are acting on the tyre at the wheel bottom point W are calculated by

?|X|

Y ? K sin[B (1? e A ) sign X ] ,

where X is the relating slip quantity. The coefficients K, B and A are given by

K ? Ymax , B ?? ? Y? , A ? 1 K B (Y? ?Ymax ) , arcsin

(1)

(2)

Ymax dY0

where Ymax is the peak value, Y? the saturation value and dY0 the initial stiffness for a constant tyre load Fz , cf. fig. 1.

Fig. 1: Force/slip relation for fixed load Fz nom

In order to consider the degressive influence of the load Fz, the polynomials

2 Ymax ( Fz ) ? a1 Fz ? a2 ????Fz? ,?

Fz nom ? Fz nom ?

? ?

dY0 (Fz ) ? b1 Fz? ? b2 ????Fz ?2 (3)

Fz nom ? Fz nom ?

? ?

Fz ? c2 ????Fz ?? 2

Y? (Fz ) ? c1

Fz nom ?? Fz nom ??

are used. For given values of Y1 for Fz nom and Y2 for 2*Fz nom , the coefficients a1 and a2 can be easily determined by

a1 ? 2 Y1 ?1 Y2 and a2 ? 1 ? . (4)

2 2Y 2 Y1

In the same manner, the coefficients b1 and b2, are calculated from given initial stiffness values dY1 for Fz nom and dY2 for 2*Fz nom and c1 and c2 from given saturation values Y?1 for Fz nom and Y?2 for 2*Fz nom respectively. Hence, the degressive influence of the tyre load Fz is taken into account, cf. fig. 2.

Fig. 2: Force/slip relations for 3 values of load Fz

The TM_simple Parameters

The following set of 18 parameters has to be provided for TM_simple:

% Tyre type: Radial 205/60 R15

t_par.fz_nom = 3000; % Nominal tyre load [N]

t_par.rs_nom = 0.290; % Static tyre radius at fz_nom [m]

t_par.reff = 0.300; % Effective tyre radius at fz_nom [m]

t_par.fxmx_fzn = 3000; % Fx_max at Fz_nom [N]

t_par.fxin_fzn = 2700; % Fx_inf at Fz_nom [N]

t_par.dfx0_fzn = 650; % dFx/dsl at Fz_nom [N/deg]

t_par.fxmx_2fzn = 5600; % Fx_max at 2*Fz_nom [N]

t_par.fxin_2fzn = 5000; % Fx_inf at 2*Fz_nom [N]

t_par.dfx0_2fzn = 1300; % dFx/dal at 2*Fz_nom [N/deg]

t_par.fymx_fzn = 2800; % Fy_max at Fz_nom [N]

t_par.fyin_fzn = 2700; % Fy_inf at Fz_nom [N]

t_par.dfy0_fzn = 600; % dFy/dal at Fz_nom [N/deg]

t_par.fymx_2fzn = 5200; % Fy_max at 2*Fz_nom [N]

t_par.fyin_2fzn = 5000; % Fy_inf at 2*Fz_nom [N]

t_par.dfy0_2fzn = 1200; % dFy/dal at 2*Fz_nom [N/deg]

t_par.rr = 0.012; t_par.mu = 1; % Rolling resistance coefficient [-]

% Nominal road/tyre friction coeff [-]

Combined Tyre Forces

For the computation of the combined tyre forces, the following combination method is applied, which is based on the similarity of longitudinal and lateral slip. In order to perform physical similar slip quantities, here the slip angle ? is transformed to a lateral slip sly such that an equivalent initial stiffness is reached.

Fig. 3: Transformation of the lateral slip

The transformation of the slip angle to lateral slip is done by

???

sl :? (5) y G ( Fz )

under usage of the weighting function bx

G (F ) ? . (6)

z by

Thus, the components of the slip vector s are defined, which is orientated in the direction to ?

s : ? sl x ?

? ?? sl ?y ? . (7)

Fig. 4: Interpolation of the combined tyre forces

Under the condition that the resulting horizontal force is acting in opposite direction of the slip vector, the following superposition can be applied. In particular, the magnitude of the resulting force vector F = |F| can be received from the interpolation, c.f. fig. 4, where Fx’ and Fy’ denote the related base values for the longitudinal and lateral force:

1

F ?

2 ?Fx? ? Fy? ? ? ? Fy ? ?cos 2 ? ? . (8)

?Fx

Finally, the resulting 2x1-vector of the horizontal tyre forces reads

y ?sin ? ?

?? ? ?

?? FFx ?? ?cos ? ? .

Use Cases

For testing a set of TM_simple input parameters, the MATLAB utility program TM_simple_test.m can be used. For predefined ranges of slip, slip angle and tyre load, the graphics output of the resulting force characteristics is available. The function Veloc.m belongs to that program.

For the application of TM_simple_x for pure longitudinal motion, the simplified version TM_simple_x_test.m can be used.

Application of TM_simple (2D):

Call of the MATLAB interface X_tyre to TM_simple

[frc, trq] = X_tyre (idtyre, vx, vy, om, t_par, fz)

In this way, the variables vx, vy, om, fz can be passed over directly to TM_simple. X_tyre is then calling TM_simple.

On input: idtyre . . . Tyre instance counter (not yet active) vx . . . Longitudinal tyre velocity [m/s] vy . . . Lateral tyre velocity [m/s] om . . . Rotational wheel speed [rad/s] fz . . . Tyre load [N]

On output:

frc . . . 3-1 vector of tyre forces Fx , Fy , Fz trq . . . 3-1 vector of tyre moments Mx , My , Mz , where the moment My contains the rolling resistance torque.

Application of TM_simple_x (1D):

For the computation of the pure longitudinal tyre force Fx und moment My , the more efficient model version TM_simple_x can be used.

Call of the MATLAB interface X_tyre_x to TM_simple_x

[fx, my] = X_tyre_x (idtyre, vx, om, t_par, fz)

The arguments of that function are listed above.

On output: fx . . . Longitudinal tyre force my . . . Tyre moment around spin axis

Homework

Parametrization of truck tire model.

Fz,nom=35.000N (nominal vertical force)

?LKW=0,8 (tire road friction coefficient )

Fy,max at 12% tire slip angle (maximum lateral force)

Fx,max at 15% longitudinal slip (maximum longitudinal force)

Fx,8 at 80% of Fx,max (maximum sliding lateral force)

Fy,8 bei 100% von Fx,max (maximum sliding longitudinal force)

Please program a simple tire model using the TM_Simple modelling approach. You can program it in Excel or Matlab. Please print the longitudinal and lateral force characteristic as a function of longitudinal and lateral tire slip (tire slip angle).

Part 1: Derive the equations for a two-mass oscillator.

Derive the equations analogue to part 1.

Vehicle parameter (ficticous)

mK=1.000kg cK=20.000N/m dK=2.000 Ns/m

mA=20.000kg cA=50.000N/m dA=3.000 Ns/m

mR=100kg cR=500.000N/m dR=0 Ns/m

Wanted:

1.) State space equation

2.) Systemmatrix A

Additional point: 3.) Eigenfrequency of cabin, vehicle chassis and wheel

Problem 1. In Fig. 1 there is a weighted graph, circles represent vertices, links represent edges, and numbers represent edge weights.

Figure 1: The graph.

1. Find a shortest path from vertex S to vertex T , i.e., a path of minimum weight between S and T .

2. Find a minimum subgraph (set of edges) that connects all vertices in the graph and has the smallest total weight (sum of edge weights).

Justify your answers.

Problem 2.

1. Let E be a binary relation symbol representing adjacency in graphs. (That is, E(x, y) means in a graph that “the vertices x and y are adjacent”.) Write a formula ?(x, y) in the first-order logic over the language L = ?E? with equality expressing that

“x and y have exactly two common neighbors.”

Note that except logical symbols you may use only E and =. (The phrases “x and y are adjacent” and “x and y are neighbors” have the same meaning.)

2. Find a model and a non-model of a theory

T = {(?x)¬E(x, x), (?x)(?y)(E(x, y) ? E(y, x)), (?x)(?y)?(x, y)}

over the language L. By a non-model of T we mean a structure of the same language that is not a model of T .

3. Is the formula (?x)( ?y)?(x, y) provable or refutable from T (in a sound and complete proof system using the axioms of T )? Give an explanation for your answer.

Problem 3. Consider finite strings over the alphabet S = a{, b, c, d }. The power operation represents string repetition, for example a3b4c denotes the string aaabbbbc. Define a contextfree grammar G generating the language L(G) = { w|(?i, j, k)w = aib(i+j+k)cjdk}, the set of words where the number of b’s is the same as the number of all other letters together and the letters are ordered alphabetically. For example, the words ab, aaabbbbd, abbbcd belong to the language, words abba, aabbbbbc, abc do not belong to the language. Justify your answers.

Problem 4. Consider the following C++ program, and one of the C# or Java programs:

C++: 1

# include iostream

2

3 tem plate typenam e T void m ( T t) { std :: cout - m ( T=-

4 typeid (T). nam e () -)- std :: endl; }

5 void m ( int i) { std :: cout - m ( int) n-; } tem plate typenam e T void f( T t) { m ( t); }

6

7

int m ain () {

8 f(- H ello -);

9 f(123);

10 f( 4000000000 );

11 }

12

C#:

1 using System ;

2

3 class Program {

4 static void m T ( T t) { Console . W rite Line ($- m T ( T={ typeof (T)})-); }

5 static void m ( int i) { Console . W rite Line (- m ( int)-); }

6 static void f T ( T t) { m ( t); }

7

8 static void M ain ( string [] args) {

9 f(- H ello -);

10 f(123);

11 f( 4000000000 );

12 }

13 }

Java: 1

public class Main {

2 static T void m ( T t) { System . out. println (- m ( 3 T)-); } static void m ( int i) { System . out. println (- m 4 ( int)-); } static T void f( T t) { m ( t); }

5 public static void m ain ( String [] args)

6

{ f(- H ello -);

7

f( 123);

8 f( 4000000000 L);

9 }

10 }

11

For the chosen pair of the C++ and C# programs, or the C++ and Java programs, answer the following:

1. What output will be printed by the C++ program, and what output by the second language in the pair?

2. Explain why the C++ program behavior is different (in terms of methods called) from that of the C# or Java one. Why do different methods get called?

3. In C++, C#, or Java, write a generic function that takes 3 arguments of any suitable type T and returns their maximum value.

Problem 5. Consider a transaction schedule S = R1(A), W2(B), R3(C), R3(B), W1(C), W3(B), COMMIT3, ABORT2, COMMIT1.

The notation uses Ri(X) and Wi(X), respectively, for reading from and writing to the variable X in the i-th transaction. COMMITi and ABORTi denote successful and unsuccessful end of i-th transaction, respectively.

If operations from individual transactions are written separately while maintaining their ordering, the schedule can be presented as follows:

Time

(running top to bottom) T1 T2 T3

1 R1(A)

2 W2(B)

3 R3(C)

4 R3(B)

5 W1(C)

6 W3(B)

7 COMMIT3

8 ABORT2

9 COMMIT1

1. Find all conflicting pairs of operations in the schedule S.

2. Is the schedule S conflict-serializable? Justify your answer.

3. Is the schedule S recoverable? Justify your answer.

If the schedule S lacks a particular property, correct it so that it satisfies the property without changing the order of the read and write operations.

If the schedule cannot be fixed, describe why not.

TM_simple: A Simple to Use Tyre Model

MATLAB Version 4.0

Mar 16, 2007, W. Hirschberg

General Procedure

TM_simple is a very simple tyre model to compute the longitudinal and lateral tyre forces Fx, Fy for a given nominal load Fz and the rolling resistance torque TyR under steady state conditions. The road is defined to be even, camber influence is neglected. However, the nominal road-tyre friction ? is able to be scaled in a realistic manner.

The horizontal forces Y which are acting on the tyre at the wheel bottom point W are calculated by

?|X|

Y ? K sin[B (1? e A ) sign X ] ,

where X is the relating slip quantity. The coefficients K, B and A are given by

K ? Ymax , B ?? ? Y? , A ? 1 K B (Y? ?Ymax ) , arcsin

(1)

(2)

Ymax dY0

where Ymax is the peak value, Y? the saturation value and dY0 the initial stiffness for a constant tyre load Fz , cf. fig. 1.

Fig. 1: Force/slip relation for fixed load Fz nom

In order to consider the degressive influence of the load Fz, the polynomials

2 Ymax ( Fz ) ? a1 Fz ? a2 ????Fz? ,?

Fz nom ? Fz nom ?

? ?

dY0 (Fz ) ? b1 Fz? ? b2 ????Fz ?2 (3)

Fz nom ? Fz nom ?

? ?

Fz ? c2 ????Fz ?? 2

Y? (Fz ) ? c1

Fz nom ?? Fz nom ??

are used. For given values of Y1 for Fz nom and Y2 for 2*Fz nom , the coefficients a1 and a2 can be easily determined by

a1 ? 2 Y1 ?1 Y2 and a2 ? 1 ? . (4)

2 2Y 2 Y1

In the same manner, the coefficients b1 and b2, are calculated from given initial stiffness values dY1 for Fz nom and dY2 for 2*Fz nom and c1 and c2 from given saturation values Y?1 for Fz nom and Y?2 for 2*Fz nom respectively. Hence, the degressive influence of the tyre load Fz is taken into account, cf. fig. 2.

Fig. 2: Force/slip relations for 3 values of load Fz

The TM_simple Parameters

The following set of 18 parameters has to be provided for TM_simple:

% Tyre type: Radial 205/60 R15

t_par.fz_nom = 3000; % Nominal tyre load [N]

t_par.rs_nom = 0.290; % Static tyre radius at fz_nom [m]

t_par.reff = 0.300; % Effective tyre radius at fz_nom [m]

t_par.fxmx_fzn = 3000; % Fx_max at Fz_nom [N]

t_par.fxin_fzn = 2700; % Fx_inf at Fz_nom [N]

t_par.dfx0_fzn = 650; % dFx/dsl at Fz_nom [N/deg]

t_par.fxmx_2fzn = 5600; % Fx_max at 2*Fz_nom [N]

t_par.fxin_2fzn = 5000; % Fx_inf at 2*Fz_nom [N]

t_par.dfx0_2fzn = 1300; % dFx/dal at 2*Fz_nom [N/deg]

t_par.fymx_fzn = 2800; % Fy_max at Fz_nom [N]

t_par.fyin_fzn = 2700; % Fy_inf at Fz_nom [N]

t_par.dfy0_fzn = 600; % dFy/dal at Fz_nom [N/deg]

t_par.fymx_2fzn = 5200; % Fy_max at 2*Fz_nom [N]

t_par.fyin_2fzn = 5000; % Fy_inf at 2*Fz_nom [N]

t_par.dfy0_2fzn = 1200; % dFy/dal at 2*Fz_nom [N/deg]

t_par.rr = 0.012; t_par.mu = 1; % Rolling resistance coefficient [-]

% Nominal road/tyre friction coeff [-]

Combined Tyre Forces

For the computation of the combined tyre forces, the following combination method is applied, which is based on the similarity of longitudinal and lateral slip. In order to perform physical similar slip quantities, here the slip angle ? is transformed to a lateral slip sly such that an equivalent initial stiffness is reached.

Fig. 3: Transformation of the lateral slip

The transformation of the slip angle to lateral slip is done by

???

sl :? (5) y G ( Fz )

under usage of the weighting function bx

G (F ) ? . (6)

z by

Thus, the components of the slip vector s are defined, which is orientated in the direction to ?

s : ? sl x ?

? ?? sl ?y ? . (7)

Fig. 4: Interpolation of the combined tyre forces

Under the condition that the resulting horizontal force is acting in opposite direction of the slip vector, the following superposition can be applied. In particular, the magnitude of the resulting force vector F = |F| can be received from the interpolation, c.f. fig. 4, where Fx’ and Fy’ denote the related base values for the longitudinal and lateral force:

1

F ?

2 ?Fx? ? Fy? ? ? ? Fy ? ?cos 2 ? ? . (8)

?Fx

Finally, the resulting 2x1-vector of the horizontal tyre forces reads

y ?sin ? ?

?? ? ?

?? FFx ?? ?cos ? ? .

Use Cases

For testing a set of TM_simple input parameters, the MATLAB utility program TM_simple_test.m can be used. For predefined ranges of slip, slip angle and tyre load, the graphics output of the resulting force characteristics is available. The function Veloc.m belongs to that program.

For the application of TM_simple_x for pure longitudinal motion, the simplified version TM_simple_x_test.m can be used.

Application of TM_simple (2D):

Call of the MATLAB interface X_tyre to TM_simple

[frc, trq] = X_tyre (idtyre, vx, vy, om, t_par, fz)

In this way, the variables vx, vy, om, fz can be passed over directly to TM_simple. X_tyre is then calling TM_simple.

On input: idtyre . . . Tyre instance counter (not yet active) vx . . . Longitudinal tyre velocity [m/s] vy . . . Lateral tyre velocity [m/s] om . . . Rotational wheel speed [rad/s] fz . . . Tyre load [N]

On output:

frc . . . 3-1 vector of tyre forces Fx , Fy , Fz trq . . . 3-1 vector of tyre moments Mx , My , Mz , where the moment My contains the rolling resistance torque.

Application of TM_simple_x (1D):

For the computation of the pure longitudinal tyre force Fx und moment My , the more efficient model version TM_simple_x can be used.

Call of the MATLAB interface X_tyre_x to TM_simple_x

[fx, my] = X_tyre_x (idtyre, vx, om, t_par, fz)

The arguments of that function are listed above.

On output: fx . . . Longitudinal tyre force my . . . Tyre moment around spin axis

Homework

Parametrization of truck tire model.

Fz,nom=35.000N (nominal vertical force)

?LKW=0,8 (tire road friction coefficient )

Fy,max at 12% tire slip angle (maximum lateral force)

Fx,max at 15% longitudinal slip (maximum longitudinal force)

Fx,8 at 80% of Fx,max (maximum sliding lateral force)

Fy,8 bei 100% von Fx,max (maximum sliding longitudinal force)

Please program a simple tire model using the TM_Simple modelling approach. You can program it in Excel or Matlab. Please print the longitudinal and lateral force characteristic as a function of longitudinal and lateral tire slip (tire slip angle).

Part 1: Derive the equations for a two-mass oscillator.

Derive the equations analogue to part 1.

Vehicle parameter (ficticous)

mK=1.000kg cK=20.000N/m dK=2.000 Ns/m

mA=20.000kg cA=50.000N/m dA=3.000 Ns/m

mR=100kg cR=500.000N/m dR=0 Ns/m

Wanted:

1.) State space equation

2.) Systemmatrix A

Additional point: 3.) Eigenfrequency of cabin, vehicle chassis and wheel

DescriptionIn this assessment, you are required to demonstrate that you understand how an Older Adult can develop mental health problems associated with cognitive decline leading to cognitive impairment...School of Engineering, Design and Built EnvironmentENGR7008 Fire Engineering Design and AssessmentAssignment 4: Peer Review of Fire Engineering ReportASSIGNMENT 4PEER REVIEW OF A FIRE ENGINEERING REPORTSee...Structural Analysis Etask 5The aim of this assessment task is to evaluate the appropriate use of the Force Method and Moment Distribution Method for structural analysis• Please download the eTask4 from...Purpose:The purpose of this task is for the student to demonstrate how to create a holistic plan of care that is person-centred, trauma-informed, and recovery-oriented in focus.Description:In this written...Assessment Plan The following outlines the assessment requirements for this cluster. You are required to complete all assessment requirements outlined below to achieve competency for this all units in...Structural Analysis Etask 4The aim of this assessment task is to evaluate the appropriate use of the Moment Distribution Method for structural analysis• Please download the eTask4 from Canvas. The students...ASSESSMENT OVERVIEWAssessment Number: Report 4: SystemsAssignment Type: ReportWeighting: 15%Word Count: 2,5000 WORDS (+/- 10%)ASSESSMENT OBJECTIVESThis assessment is designed to help you achieve the following...**Show All Questions**