Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

Draft Forbes Group Website (Build by Nikola). The official site is hosted at:

https://labs.wsu.edu/forbes

5913 views
License: GPL3
ubuntu2004
Kernel: Python [default]

The process of driving and parking can be described using the mathematics of non-commutative algebra which gives some interesting insight into the difficulty of parallel parking. This discussion is motivated and follows a similar discussion from William Burke's book Applied Differential Geometry.

Mathematical Formulation

Unique and Complete

Consider the motion of a car on a flat plane. To mathematically formulate the problem, we must provide a unique and unambigious characterization of the state of the car. This can be done in a four-dimensional configuration space with the following four quantities:

  • (x,y)(x, y): The position of the car can be described by two numbers to locate where the car is in the plane. Note: to be precise we must specify which point on the car lies at this position, and the algebra might be simplified if we are careful about the placement. As a guess, we start by taking this to be the midpoint of the front axle of the car. In this way, the point (x,y)(x, y) will move in the direction of the front wheels when driving.

  • ϕ\phi: The orientation of the car. This angle will denote the direction in which the car points.

  • θ\theta: The orientation of the steering wheels. This will be relative to the car so that θ=0\theta=0 means the wheels point straight ahead.

Stop and think for a moment: is this complete? Can we describe every possible position of a car with a set of these four quantities? The answer is definitely no as the following diagram indicates:

[removed]

but with an appropriate restriction placed on the possible condition of the car, you should be able to convince yourself that such a choice of four coordinates is indeed sufficient for our purposes. (If we wish to consider the dynamics of the car, we will need additionally the velocity, and angular velocity, but here we shall just consider the geometric motion of the car.)

The second question you should ask is: "Is such a characterization unique?" Here again the answer is no: θ=0°\theta = 0° and θ=360°\theta = 360° correspond to the same configuration. Thus, we need to restrict our angular variables to lie between 180°θ,ϕ<180°-180° \leq \theta,\phi < 180° for example. With such a restriction, our characterization is both unique and complete, and thus a suitable mathematical formulation of the problem.

Units

To simplify the mathematics, we further restrict our notation so that xx and yy are specified in meters, while θ\theta and ϕ\phi are specified in radians. In this way, the configuration of the car can be specified by four pure numbers (x,y,θ,ϕ)(x, y, \theta, \phi).

Driving

Driving consists of applying two operations to the car which we shall call drive and steer. Mathematically we represent these as operators ParseError: KaTeX parse error: Undefined control sequence: \op at position 1: \̲o̲p̲{D}_s and ParseError: KaTeX parse error: Undefined control sequence: \op at position 1: \̲o̲p̲{S}_\theta respectively as following:

  • ParseError: KaTeX parse error: Undefined control sequence: \op at position 1: \̲o̲p̲{D}_s means drive forward (keeping the steering wheel fixed) for distance ss.

  • ParseError: KaTeX parse error: Undefined control sequence: \op at position 1: \̲o̲p̲{S}_\theta means rotate the steering wheel through angle θ\theta.

Steering

Steering is the easiest operation to analyze. Given a state (x1,y1,θ1,ϕ1)(x_1, y_1, \theta_1, \phi_1), steering takes this to the state ParseError: KaTeX parse error: Undefined control sequence: \op at position 1: \̲o̲p̲{S}_{\theta}(x_…. In words: steering changes the direction of the steering wheel, but does not change the position of orientation of the car. Mathematically this operation is a translation, but as we shall see later, it is convenient to represent these operations as matrices. Thus, we add one extra component to our vectors which is fixed:

p1=(x1y1θ1ϕ11)\vect{p}_1 = \begin{pmatrix} x_1\\ y_1\\ \theta_1\\ \phi_1\\ 1 \end{pmatrix}

This same trick is often used in computer graphics to allow both rotations and translations to be represented by matrices. With this concrete representation of configurations as a five-dimensional vector who's last component is always 11, we can thus represent ParseError: KaTeX parse error: Undefined control sequence: \op at position 1: \̲o̲p̲{S}_{\theta} as a matrix:

ParseError: KaTeX parse error: Undefined control sequence: \mat at position 14: \vect{p}_2 = \̲m̲a̲t̲{S}_{\theta}\cd…

Motion

Motion of the car is obtained by applying the drive operator, but this is somewhat more difficult to describe. To specify this, we must work out the geometry of the car. In particular, the motion of the car when θ0\theta \neq 0 will depend on the length of the car LL, or more specifically, the distance between the back and front axles. Without loss of generality (w.l.o.g.), we can assume L=1L=1m. (To discuss the motion of longer or shorter cars, we can simply change our units so that the numbers xx and yy specify the position in units of the length LL).

To deduce the behaviour, use two vectors f\vect{f} and b\vect{b} which point to the center of front and back axles respectively. Cars generally have fixed length, so that ParseError: KaTeX parse error: Undefined control sequence: \norm at position 1: \̲n̲o̲r̲m̲{\vect{f} - \ve… remains fixed. Now, if the car moves forward, then b\vect{b} moves in the direction of fb\vect{f} - \vect{b} while f\vect{f} moves in the direction of the steering wheel.

A Better Representation

Polar coordinates are extremely useful for representing vectors in the xx-yy plane. In particular, the representation as a complex number z=x+iy=reiϕz = x + \I y = re^{\I\phi}. Here we suggest a more practical (though less intuitive) representation of the problem in terms of the complex number zz describing the position of the car, and the phases eiθe^{\I\theta} for the orientation of the car, and eiφe^{\I\varphi} for the orientation of the steering wheel:

p=(reiϕeiθeiφ)\vect{p} = \begin{pmatrix} re^{\I\phi}\\ e^{\I\theta}\\ e^{\I\varphi} \end{pmatrix}

We can now work out how the car moves while driving from the following argument. Let f=zf=z be the center of the front axle and bb be the center of the back axle. These satisfy the following relationship where LL is the length of the axle and θ\theta is the orientation of the car:

fb=Leiθ.f - b = L e^{\I\theta}.

While driving, the length of the car must not change, the front axle ff must move in the direction of the wheels ei(θ+φ)e^{\I(\theta + \varphi)} while the back axle bb must move towards the front axle eiθe^{\I\theta}. The infinitesimal motion of the car thus satisfies:

df=ei(θ+φ)ds,db=aeiθds,dfdb=eiθ(eiφa)ds=Leiθidθ.\d{f} = e^{\I(\theta + \varphi)}\d{s}, \qquad \d{b} = ae^{\I\theta}\d{s}, \qquad \d{f}-\d{b} = e^{\I\theta}(e^{\I\varphi}-a)\d{s} = Le^{\I\theta}\I\d{\theta}.

We must adjust the coefficient aa so that the car does not change length, which is equivalent to the condition that (eiφa)ds=(cosφa+isinφ)ds=iLdθ(e^{\I\varphi}-a)\d{s} = (\cos\varphi-a + \I\sin\varphi)\d{s} = \I L\d{\theta}. Hence, after equating real and imaginary portions:

a=cosφ,dθ=dssinφ/L.a = \cos\varphi, \qquad \d{\theta} = \d{s}\sin\varphi/L.

The second condition tells us how fast the car rotates. We now have the complete infinitesimal forms for steering and driving:

ParseError: KaTeX parse error: Undefined control sequence: \op at position 4: \d{\̲o̲p̲{S}_{\alpha}(\v…

In terms of the complex numbers where z=reiϕz=re^{\I\phi} we can write these as derivatives:

ParseError: KaTeX parse error: Undefined control sequence: \op at position 1: \̲o̲p̲{s} = \pdiff{}{…

Now we can compute the commutator of these operators:

ParseError: KaTeX parse error: Undefined control sequence: \op at position 2: [\̲o̲p̲{s}, \op{d}]p =…

This is a combination of a rotation and a translation which one can decompose into a pure rotation about some point (Exercise: find the point.)

We now complete the same procedure using the point bb as a reference point.

ParseError: KaTeX parse error: Undefined control sequence: \op at position 4: \d{\̲o̲p̲{S}_{\alpha}(\v…ParseError: KaTeX parse error: Undefined control sequence: \op at position 1: \̲o̲p̲{s} = \pdiff{}{…ParseError: KaTeX parse error: Undefined control sequence: \op at position 2: [\̲o̲p̲{s}, \op{d}]p =…

In this case, we see that if we execute this commutator about φ=0\varphi = 0, then we indeed rotate the car about the center of the back axle without any translation.