Skip to content

Memo: the definition of the Euler angles

16/01/2012

We often encounter rotating one vector. What if we rotate a reference frame to coincide with another reference frame? What will we get?

memo rotate one frame to the other

Observability: staircase

12/01/2012
% compute the staircase form for observability analysis
clc;clear;
e1=[1; 0; 0];
e2=[0; 1; 0];
e3=[0; 0; 1];

vn=[0;0;0];
vn_sk=fcn_getSkew(vn);

a=-10*e3;
a_sk=fcn_getSkew(a);

A=[zeros(3)   eye(3)     zeros(3)   zeros(3)    zeros(3);
     zeros(3)   zeros(3)   -a_sk      eye(3)       zeros(3);
     zeros(3)   zeros(3)   zeros(3)   zeros(3)   eye(3);
     zeros(3)   zeros(3)   zeros(3)   zeros(3)   zeros(3);
     zeros(3)   zeros(3)   zeros(3)   zeros(3)   zeros(3)];
 
C=[zeros(3)   zeros(3)   -vn*e2'     zeros(3)   zeros(3);
     zeros(3)   zeros(3)   vn*e1'      zeros(3)   zeros(3);
     zeros(3)   eye(3)     -vn_sk      zeros(3)   zeros(3)];
 
 B=zeros(15,1);
 
 [Abar,Bbar,Cbar,T,k] = obsvf(A,B,C) ;
 
 % use symbolic computation
 syms px py pz vx vy vz phi tht psi bax bay baz bp bq br X
 % X is the oringinal state vector
 X=[px; py; pz; vx; vy; vz; phi; tht; psi; bax; bay; baz; bp; bq; br];
 % TX is the transformed state vector, it is clear to find what states are
 % observable
 T*X

Linearizing first or discretizing first?

09/01/2012

Given a nonlinear model: \dot{x}=f(x)

In practice, we need to both discretize and linearize the nonlinear model. The question is which procedure should be first?

(1) Method 1: Linearizing first, then discretizing

first linearizing: \dot{x}=\frac{\partial f}{\partial x}x

then discretizing: x(t+1)=(I+\Delta t \frac{\partial f}{\partial x})x

(2) Method 2: Discretizing first, then  linearizing

first discretizing: x(t+1)=x(t)+\Delta t f[x(t)]

then linearizing: x(t+1)=(I+\Delta t \frac{\partial f}{\partial x})x

Conclusions: the two methods are equivalent.

Non-holonomic

20/11/2011

In robotics, holonomicity refers to the relationship between the controllable degrees of freedom and total degrees of freedom of a given robot (or part thereof).

  1. Holonomic system:
    If the controllable degrees of freedom is equal to the total degrees of freedom then the robot is said to be holonomic.
  2. Non-holonomic system:
    If the controllable degrees of freedom are less than the total degrees of freedom it is non-holonomic.
  3. Redundant system:
    A robot is considered to be redundant if it has more controllable degrees of freedom than degrees of freedom in its task space.

A redundant system is also called holonomic. But a holonomic system may not be redundant.

Non-holonomic example:

An automobile (a car) is an example of a non-holonomic vehicle. The vehicle has three degrees of freedom—its position in two axes, and its orientation relative to a fixed heading. Yet it has only two controllable degrees of freedom—acceleration/braking and the angle of the steering wheel—with which to control its position and orientation.

The resulting phenomenon is: the velocity of the car is always the same or inverse as the orientation of the car, if there is no skidding or sliding. Thus, not every path in phase space is achievable. The non-holonomicity of a car makes parallel parking and turning in the road difficult.

Remark: we just compare the number of DOF. A controllable state may not be one of the total state. For example, the state of a care is position and orientation angle. The controllable state is acceleration and orientation (input). The holonomic property is only determined by the number.

Holonomic & Redundant example:

A human arm, by contrast, is a holonomic, redundant system because it has seven (controllable) degrees of freedom (three in the shoulder – rotations about each axis, two in the elbow – bending and rotation about the lower arm axis, and two in the wrist, bending up and down (i.e. pitch), and left and right (i.e. yaw)) and there are only six physical degrees of freedom in the task of placing the hand (x, y, z, roll, pitch and yaw), while fixing the seven degrees of freedom fixes the hand. See also sub-Riemannian geometry for a discussion of holonomic constraints in robotics.

Reference:  http://en.wikipedia.org/wiki/Holonomic

Edit: The holonomic, non-holonomic and redundant  look the same as fully-actuated, under-actuated and over-actuated.

Memo on ellipse and ellipsoid

13/11/2011

x^T A x=1 represents an ellipsoid.

  1. The axis of the ellipsoid is along the eigenvectors of A.
  2. The length of the semi-axis is 1/\sqrt{\lambda_i}.
  3. The volume of the ellipsoid is \frac{4}{3}\pi \frac{1}{\sqrt{\lambda_1 \lambda_2 \lambda_3}}.

Here is a detailed memo. memo – ellipsoid

Relationship between the covariance of continuous and discrete noise processes.

08/11/2011

Relationship between the covariance of continuous and discrete noise processes.

Covariance of continuous and discrete systems

But you should know what you have now is for the continuous or the discrete system.

Discretize a continuous LTI system: zero-order holding

08/11/2011

The continuous LTI system is

\dot{x}=Ax+Bu

The corresponding discrete system is

x_k=Fx_{k-1}+Gu_{k}

What are F and G? Usually we have two methods: use zero-order hold method to discretize it; or use approximation to a rigorous discrete system. Today I will show they are the same to the first order !!! So in the future, we are confident to directly use zero-order holding method to discretize a system as long as you want the first order accuracy!!!

1) Zero-order holding method:

x_k=x_{k-1}+(Ax_{k-1}+Bu_k)\Delta t

where \Delta t=t_{k}-t_{k-1}. Then

x_k=(I+\Delta t A)x_{k-1}+\Delta t Bu_k

So

>>>F=I+\Delta t A

>>>G=\Delta t B

2) Rigorous discrete system

From

x(t)=e^{A(t-t_0)}x_0+\int_{t_0}^te^{A(t-\tau)} Bu(\tau) \mbox{d}\tau

it is easy to see

>>>F=e^{A\Delta t}=I+\Delta t A + \frac{1}{2}A^2\Delta t^2\cdots

>>>G=\left(\int_0^{\Delta t}e^{A\alpha}d\alpha\right)B=\left(\Delta t+\frac{1}{2}A\Delta t^2+\cdots\right)B

Conclusion: Obviously, method 1 and 2 are equivalent to the first order!!!