math in ADS system

when dealing with plan and control models in ADS system, there are plenty of basic math, and the understanding of these math are definitely helpful to build a better and stronger algorithm.

to design a ADS software system, there are two parts, the engineering background and software development. enginneering side is the core logic, while software is about how to organize the software and present, especially with new ideas, e.g. cloud based architecture, web user interface.

vector analysis

coordinate system

asssumed a Cartesian system [O: e1, e2, e3], a vector r can be represented as (x, y, z).

vector operator

  • vector add

    a + b = (a_x + b_x) i + (a_y + b_y) j + (a_z + b_z) k

the triangle inequality is:

|a + b| <= |a| + |b|

  • multiply scalar

    a . b = a . b_x i + a . b_y j + a . b_z k

namely, by multiplying each direction component of the vector by a.

  • dot product

    a . b = |a|.|b|. \cos = a_x . b_x + a_y . b_y + a_z . b_z

a simple physical explaination: assume a is displacement, b is force, then the power of force in the displacement is by dot product.

the geometric meaning of dot product is projection. namely, |a|cos means project of vector a on vector b, which also gives the decomposion of a, which has a unique projection component vector and vertical component vector.

a = a_p + a_v

a_p = ( a . e_p ) . e_p

  • cross product

assume three vectors non-co-plane, (a, b, c), rotating start from a to b, the thumb point to c, which is a right-hand-coordinate system.

a simple physical meaning: assume a is the force, b is the force arm, then a x b gives the torque, which perpendicular to plane.

a x b = |a||b| \sin

the geometric meaning of cross product is the area of parallelogram by .

base vectors in right-hand Cartesian coordiante system satisfy:

ei x ej = ek (i != j)
  • mixed product

    $$ a x b \cdot c  $$
    

which gives the volume of parallel hexagonal propped by

curve(volume) integration

  • Gauss integration

  • Stokes integration

scalar field

  • directional derivative

assuming vector l in space, its unitfied vector can be present as directional cosine [cos\alpha, cos\beta, cos\gamma]^T. for any function u=u(x, y, z), who is derivable at M0(x0, y0, z0), then:

\frac{\partial u}{\partial l} = dot_product(\Delta u, <\cos \alpha, \cos \beta, \cos \gamme> )
  • gradient

    \Delta u =  \frac{\partial u}{\parial x} \b{i} + \frac{\partial u}{\parial y} \b{j} +  \frac{\partial u}{\parial z} \b{k}
    

the directional derivative which gives the maximum of \Delta u at a point, it’s the gradient direction. the gradient direction in space, stands for the direction from lowest co-value layer to highest co-value layer, which in physical, means the most high rate of change in general.

  • Halmilton operator

    \Delta  =  \frac{\partial}{\parial x} \b{i} + \frac{\partial}{\parial y} \b{j} +  \frac{\partial}{\parial z} \b{k}
    

vector field

  • directional derivative

the gradient field of a vector field gives a tensor field, which raise the dimension one more. the dot product(inner product) of a vector field, decrease to scalar field, the cross product of a vector field keeps a vector field. for a vector field, usually talk about its flux and divergence.

analytical geometry

plane equation

assume plane \pi in Cartesian coordinate system [O: X, Y, Z], O‘s projection in plane is N, the directional cosine of ON is (l, m, n),

for any point P in plane, NP is always perpendicular to the directional cosine, namely:

dot_product( NP, (l, m, n) ) = 0

as l**2 + m**2 + n**2 == 1, which gives:

lx + my + nz - p = 0            (1)

equation 1) is the normalized plane equation. and (l, m, n) is the normal vector of lane \pi, and p should be no lesss than 0.

linear equation

assumed a line go across point P_0 $(x_0, y_0, z_0)$ and in direction \lamba, then any point P $(x,y,z)$ on this line, satisfy:

x - x_0 = |PP_0| . l 
y - y_0 = |PP_0| . m 
z - z_0 = |PP_0| . n 

taking |PP_0| as t, the equation above is the parmeterized line equation, namely:

\frac{x-x0}{l} =  \frac{y-y0}{m} =  \frac{z-z0}{n} 

in general, a linear is the cross interface of two linear plane, so its genearl equation is to satisfy both plane equation:

A1.x + B1.y + C1.z + P1 = 0
A2.x + B2.y + C2.z + P2 = 0

coordiante transfer

in general, coordiante transfer means base vector linear transfer. assuming original coordinate system [O: e1, e2, e3], and new coordinate system [O’, e1’, e2’, e3’]

both the original base vector and new base vector <e1’, e2’, e3’> prop up the same 3D linear space.

and there should be transfer matrix between them:

e = matrix[3x3] \cdot e’

for any point P transfer from original to new coordinate system,

{x} = {a} + {x’} . matrix[3x3]

matrix[3x3] is:

a11 a21 a31
a12 a22 a32
a13 a23 a33

each raw in the matix above, stands for a base vector tranfer from original one to the new one, namely:

$$ e1' = a11.e1 + a21.e2 + a31.e3 $$ 

the component value of each coordinate, can be simply by:

x1’ = e1’ . OP’

refer

write mathematic fomulars in Markdown