Skip to main content
. 2021 Jun 23;21(13):4296. doi: 10.3390/s21134296
Algorithm 1: Trajectory planning
  • 1:

    initialize:

  • 2:

    vdes desired longitudinal velocity from user

  • 3:

    procedure GENERATE TRAJECTORY

  • 4:

    top:

  • 5:

          Use Equation (3) to create matrix Q

  • 6:

          K¯ Ackerman pole placement formula as (4) and calculate K¯

  • 7:

          P Obtained K¯ in (28)–(37) and generate P

  • 8:

          Q Obtained P and substitute (19) in (25)-(27) to calculate Q

  • 9:

    loop:

  • 10:

        x¯refgenerate target states as

  • 11:

        x¯current state vector

  • 12:

        getRoadBoundaryConstraints as (38) (39)–(45)

  • 13:

        getCollisionAvoidanceConstraints as (46)–(50)

  • 14:

        u* solve MPC with generated Q from top with fixed R

  • 15:

        x* Apply optimal input u(k) as (12)–(15)

  • 16:

        if user request to change vdes then

  • 17:

               goto initialize.

  • 18:

               else

  • 19:

         goto loop.