Author Archives: admin

Statistical Method for Prediction of Human Walking Pattern with Gaussian Process Regression

Statistical Method for Prediction of Human Walking Pattern with Gaussian Process Regression

We propose a novel methodology for predicting human gait pattern kinematics based on a statistical and stochastic approach using a method called Gaussian process regression (GPR). We selected 14 body parameters that significantly affect the gait pattern and 14 joint motions that represent gait kinematics. The body parameter and gait kinematics data were recorded from 113 subjects by anthropometric measurements and a motion capture system. We generated a regression model with GPR for gait pattern prediction and built a stochastic function mapping from body parameters to gait kinematics based on the database and GPR, and validated the model with a cross validation method. The function can not only produce trajectories for the joint motions associated with gait kinematics, but can also estimate the associated uncertainties. Our approach results in a novel, low-cost and subject-specific method for predicting gait kinematics with only the subject’s body parameters as the necessary input, and also enables a comprehensive understanding of the correlation and uncertainty between body parameters and gait kinematics.

20130604_DW2013

 

Sorry, no publications matched your criteria.

 

Sliding Mode Control (SMC), Robust control algorithm for nonlinear system

In this article, I am going to write about the Sliding Mode Control (SMC) algorithm.

Sliding Mode Control algorithm is a robust controller for nonlinear systems.

Robust control means that even though the system model has a certain error, if the controller can control the system, we say that the controller is robust.

SMC has two fundamental ideas.

1. To attract the system states to the surface.

2. To make the state slide on the surface toward the origin.

To explain the above two ideas more easily, let’s assume a typical control problem.

\dot x = f_1 (x,\dot x)   — (1)

\ddot x = f_2 (x, \dot x) + u

y=Cx — (2) if it is nonlinear, you need to know Lie Derivatives.

To achieve the first idea, we need to define a surface like the below. (Let’s assume that y is a scalar and differentiable.) 

s(x)=a_0 e + a_1 \dot{e}  where  e=y-y_d — (3)

Here we need to select a_0 and a_1 to make y->0 as t-> inf,s=0. You will see the reason after more several lines.

Let’s take the derivative of s(x) w.r.t. x. Then we can get the below equation.

\dot{s}(x)=a_0 \dot e + a_1 \ddot e  — (4)

In addition, if we add the additional term –\eta \text{sign}(s) we can obtain the below equation,

\dot{s}(x)=a_0 \dot e + a_1 \ddot e=-\eta \text{sign}(s) — (5)

Through a simple Lyapunov theorem, we can easily prove s-> 0 at t->inf .

if s=0, e-> 0 and \dot(e)-> 0, because we selected a_0 and a_1 to be like this.

Let’s look at (5),

a_0 \frac{d}{dt}(y-y_d)+a_1 \frac{d^2}{dt^2}(y-y_d)=-\eta \text{sign}(s)

=> C(a_0 \dot x +a_1 \ddot x)=-\eta \text{sign}(s)

=>C(a_0 f_1 +a_1 (f_2+u)))=-\eta \text{sign}(s)

=>u=((-\eta \text{sign} (s))/C - a_0 f_1)/a_1 -f_2

With this control input, we can control a nonlinear system with SMC.

it is difficult to explain quickly within short explanations…., if you need more explanation or questions, please leave me a reply.

 

chomod, permission change in linux

This is from “http://www.computerhope.com/unix/uchmod.htm

chmod [OPTION]… MODE[,MODE]… FILE…
chmod [OPTION]… OCTAL-MODE FILE…
chmod [OPTION]… –reference=RFILE FILE…

-c, –changes like verbose but report only when a change is made
–no-preserve-root do not treat `/’ specially (the default)
–preserve-root fail to operate recursively on `/’
-f, –silent, –quiet suppress most error messages
-v, verbose output a diagnostic for every file processed
–reference=RFILE use RFILE’s mode instead of MODE values
-R, –recursive change files and directories recursively
–help display this help and exit
–version output version information and exit

Permissions
u – User who owns the file.
g – Group that owns the file.
o – Other.
a – All.
r – Read the file.
w – Write or edit the file.
x – Execute or run the file as a program.

Numeric Permissions:
CHMOD can also to attributed by using Numeric Permissions:

400 read by owner
040 read by group
004 read by anybody (other)
200 write by owner
020 write by group
002 write by anybody
100 execute by owner
010 execute by group
001 execute by anybody

Examples

The above numeric permissions can be added to set a certain permission, for example, a common HTML file on a Unix or Linux server accessible over the Internet would be given the below permissions.

chmod 644 file.htm

This gives the file read/write by the owner and only read by everyone else (-rw-r–r–).

Files such as scripts that need to be executed need more permissions. Below is another example of a common permission given to scripts.

chmod 755 file.cgi

This would be the following 400+040+004+200+100+010+001 = 755 where you are giving all the rights except the capability for anyone to write to the file.cgi file(-rwxr-xr-x).

chmod 666 file.txt

Finally, another common CHMOD permission is 666, as shown below, which is read and write by everyone.

Tip: The above commands are all done through the command line. However, if you upload a file using FTP these permissions can also be adjusted through many FTP clients by right-clicking the file and choosing permissions.

Additional information

Below is an example of how a file may be listed when typing ( ls -l ) at the prompt as well as information on how to interpret it.

-rw-rw-r– 1   hope 123   Feb 03 15:36   file.txt

rw rw- r– 1 hope 123 Feb 03 15:36 file.txt
File owner group everyone else links owner size mod date file name

Numerical Jacobian matrix calculation method with matlab code

In this post, I share a numerical Jacobian matrix calculation method with matlab code.

Actually there is a function in Matlab inherently, but it is very complex. ( look at the function, NumJac ), So I made a very simple version. I wish this can help you.

You can download from here.

The attachment file includes 

1. NumJacob.m : main file it generates jacobian matrix. 

2. Demo.m : demo file

3. test_func.m : test function to show its demo

 

The below is a simple example.

>> NumJacob(@cos,1)

ans =

-0.8415

 

>> x0=[0;1]; other_param=[1;2];
>> df=NumJacob(@test_func,x0,other_param)

df =

1.0000 0
0 2.0000

 

 

Because the code is very easy, probably you can easily understand the codes.

Then, good luck ^^

if you have any question, please leave me a comment below.

 

Added on Feb 07. 2014

I am uploading another demo file to give a solution of Mahmudul’s request (for detail, see the comment).

This demo file is to get a numerical Jacobian for the below function

y1′ = y2*y3; y1(0) = 0
y2′ = -y1*y3; y2(0) = 1
y3′ = -0.51*y1*y3; y3(0) =1

Download this demo file. 

 

Added on Mar/21 2015

If you are interested in calculating numerical Jocobian matrix for a complex number, please read this post.

http://youngmok.com/matlab-code-for-numerical-calculation-of-jacobian-matrix-for-a-complex-number/

 

—————————————————————————————————

I am Youngmok Yun, and writing about robotics theories and my research.

My main site is http://youngmok.com, and Korean ver. is  http://yunyoungmok.tistory.com.

—————————————————————————————————

 

 

 

Parallel computation with Matlab, SPMD. Explanation with simple example code

Today I’d like to introduce a parallel computation skill in Matlab.

I also heard that the use of parallel computation in Matlab is very easy. But it was better than my expectation. Wonderful!! Smile

You need to know the usage of SPMD. It is pretty easy.

First let’s the code, you can also download this file in the attachment, click <here>.
parallel_computation_spmd

 

The result is the below

Starting matlabpool using the ‘local’ configuration … connected to 4 labs.
Elapsed time is 120.482356 seconds.
Sending a stop signal to all the labs … stopped.
Elapsed time is 167.796932 seconds.

Because, I did many other works in the calculation time, Its result is not very fast, The slowest CPU core determined the final computation time. But its performance is really good if you have more than 4 multi cpu cores.

I wish this post can help your understanding about the use of SPMD in Matlab.

if you have any question, please leave me a comment below.

—————————————————————————————————

I am Youngmok Yun, and writing about robotics theories and my research.

My main site is http://youngmok.com, and Korean ver. is  http://yunyoungmok.tistory.com.

—————————————————————————————————

 

 

 

Phase plane analysis and Matlab code toolbox

Phase plain analysis is a useful visualization tool to understand the characteristics of systems including not only linear system but also nonlinear system. For example, we can determine stability of the system from this phase plane analysis.

The attachment file <here> is Matlab toolbox to draw phase plain. The attached file includes a simple demo and the below is the result. You can draw phase plane, magnify where you are interest recursively. You can see how to use the Matlab code in the following Youtube video.

demo_phase_plane

    

How to draw?

Given,

\dot{x}_1=f_1(x_1,x_2)

\dot{x}_2=f_2(x_1,x_2)

we can find the below equation

\frac{dx_2}{dx_1}=\frac{f_2(x_1,x_2)}{f_1(x_1,x_2)}

From \frac{dx_2}{dx_1}, we can find the direction of the phase change at the point of (x_1, x_2).

 

Advantage:

  1. It is an exact method. We can see the change of system’s state including transient response.
  2. Simple graphical method. It is very intuitive and easy to understand its characteristics.

Limit:

  1. Limited to the 2nd order system. It is expandable, but hard to visualize. 

Reference

1. Lecture of Prof. Fernadez in Mech. Eng, The Univ. of Texas at Austin.

Extended Luenberger Observer for nonlinear system control

——————————————————————————————————————————–

Herman (who commented for this posting) told me that there are two different versions of ELO. One is just to linearize a nonlinear function (this posting will handle it), and the other is using Lie-algebraic approach (refer to M. Zeitz 1987 “The extended Luenberger Observer”).

Thank you Herman.

——————————————————————————————————————————–

This article is to explain the use of Luenberger observer for nonlinear system control. In other words, it is Extended Luenberger Observer, (ELO, just like Kalman Filter (KF), and Extended KF).

The basic idea is to linearize nonlinear system around the interesting point. The below is the description of ELO and how to select gain values for Extended Luenberger Observer. The below description assumes that you already know about Luenberger Observer for linear system. If you don’t know visit here.

ELO_1

ELO_2

I wish this can help your understanding about Luenberger observer, if you have any question, please leave me a comment below.

—————————————————————————————————————————–

I am Youngmok Yun, and writing about robotics theories and my research.

My main site is http://youngmok.com, and Korean ver. is  http://yunyoungmok.tistory.com.

—————————