2009年10月5日星期一

New Life in Bielefeld

From 1,Oct,2001, I began my new postdoc research at CoR-Lab in Bielefeld. My new research will be focused on Manual Intelligence!

A introduction of Robot learning
http://cn.sevenload.com/item/yt/bzRuIOC57ig

2009年4月15日星期三

communication test are finished

the communication includes : ethnet and serial port(RS232-RS485 < - > RS485-RS232)

2009年4月10日星期五

Successful in applying the postdoc

Thanks, Dr. Robert. You give me the chance I can continue the research on roobtics.

2009年4月5日星期日

I am designing the joint controller of manipulator




the manipulator motion test is complete. The joint angle controllers are developed.The output can track the input on the whole.But I meet some difficulty while I am disigning the controller of manipulator.When i want the setpoint controll, the output will be oscillating at the new stable point.

reason:
1. the inherent drawback of the Maxon motor drive when the rotation rate is less than 1000rpm/sec.It is uncontrolled by the control signal.This is the main reason of oscillating of motor at the stable point.

Furthermore I met a difficulty that the output of joint angle is jumpped and polluted by noise. The noise error comes from two aspects.
(1)power noise.
(2)A/D transfer noise.
Currently I think the main noise source is the power noise. I planned to filter the sensor output by a low pass filter, but it is proved to be a silly idea because the filter component here can induce a phase lag. It is disadvantageous to the stablity of the control system.

2009年4月2日星期四

motor driver test are finished in land

motor driver test
TCM2.5 test
MTi test
depth meter test

are finished in land.
 
Posted by Picasa

2009年3月29日星期日

Didson imaging sonar

http://www.soundmetrics.com/index.html

2009年3月27日星期五

telephone interview is over

the interviewing is processing at 5 o'clock pm(Beijing time). Although the interviewer and I have different research background, the interviewing goes smoothly. Dr. Robert is very kind and repreat many times of his question when I can not understand him clearly. There are 7 questions and 42 minutes in this interview.
Dr will notice me the interview result after two week.

I am pleased my oral English, I can express my meaning with E. my drawback is poor listening comprehension. It makes me difficult to understand interviewer. I wish I can increase my listen capability in english in future half year.

The biggest obtaining this afternoon is "confidience". I can communicate my research with other researchers, perhaps my future boss. That is I have made a full preparation for me to work in others countries.

Thank you Dr. Robert, and I am appreciate your time and patience.

The material need for the interviewing:
1)CV
2)prepare the simple question to answer according to interviewer's email
3)preparing to ask question to interviewer about their research if you have same research background and you can propose an expressive problems.
4)their advertisement
5)your research experience.

2009年3月21日星期六

two things in the next week

1.pool test of my IAUV.

2.looking forward to the first telephone interview next week.

2009年3月14日星期六

Scientific function lib

GNU Scientific Library (GSL): http://www.gnu.org/software/gsl/

Netlib的clapack (C Library): http://www.netlib.org/clapack/

NIST的lapack++ (C++ Library): http://math.nist.gov/lapack++/

http://www.netlib.org/lapack/

2009年3月10日星期二

update my linkedin

http://www.linkedin.com/in/qiangli

It's possible to improve program efficiency with RBPF algorithm

Today, I got the demo code about RBPF(rao-blackwellized particle filter)from Dr.Nando de Freitas's website(Matlab version). The simulation shows that the less particle used in RBPF can obtain equal or better estimation result over Generic PF.It suggests that the efficiency can be improved by this algorithm.

2009年2月27日星期五

summary and plan

Summary in recent two weeks
1.model for the DVL
2.tranfer PF algorithm from Matlab program to C code.
3.Integrate the computer sampling program[subsea program] (sensor data and AI/DA/DI/DO) in QNX OS.

plan in future two weeks
1.combination test(surface program and subsea program)
2.analyze and optimize the PF algorithm and make it can be applied in real time program
3.analyze the character of system according to the middle report of my phd stage.


underwater experiment(stage 6)<-assemble the control system of IAUV on electric cabin(stage 5)<-combination program test on land(stage 4)<-PF realtime demonstration(stage 3)->offline demonstration based on experiment data(stage 2)<-simulation patch demontration(stage 1).


currently, I am in the position of stage 1.
for my phd dissertation I need work to stage 3 as a base.If I can reach the stage 6,it means a excellent phd work.

Embed C program has been upload my website







OS: QNX 4.25
mainboard:SCM7026,
extend card ADT300,ADT680,Device Driver Card(self-research)
sensor: MTi, TCM2.5

function:
Read MTi,TCM2.5
AI/DA DO operation on ADT680

DA DO operation on ADT300

website:http://sites.google.com/site/qiangliresearch/qiang-li-s-homepage/uvmsprj

2009年2月25日星期三



Simulation scheme in Matlab/Simulink



Background: A vehicle(IMU and camera are mounted) is moving along a circle trajectory. the purpose is estimating the target position and vehicle's position simultaneouly.the red star is the feature point, the black line is the vehicle's trajectory. The experiment can demonstrate the PF(Particle Filter) can provide accurate target position and vehicle's position although the sensor only provide the unlimited bias data and UKF(Unscented Kalman Filter) is invalid.


In the figure, the 40seconds PF simulation is finished in 563 second,which shows the C program can not be utilized in real time estimation. It is the next step task.
And the other tasks include analyzing the problem in simulation and its stochastic character.

2009年2月22日星期日

C Mex files development and debug

development enviornment

/*
the matlab program are transfered to C files successfully. " that is *.m->*.c "
c mex are implemented with efficiency more 50 times more than matlab program

the development enviornment:
VC 6.0
Matlab 7.1

As a matter of fact, this is not a good development envoirnment assemble. Because the many function and toolbox can not be run under the enviornment. But they are on my hand.

the popular version are VC2005+matlab 2007b
*/

debug enviornment

/*
furthermore some techniques are need in debugging the C-mex function.
The following is the description of debug method. Although it is written
according to VC7.1, the test result of mine shows that it is usable under
VC6.0 enviornment


1.Start Microsoft Visual Studio Version 7.1 by typing at the DOS prompt
msdev filename.mexw32


2.In the Microsoft environment, from the Project menu, select Settings. In the window that opens, select the Debug tab. This options window contains edit boxes. In the edit box labeled Executable for debug session, enter the full path to where MATLAB resides. All other edit boxes should be empty.

3.Open the source files and set a break point on the desired line of code by right-clicking with your mouse on the line of code.

4.From the Build menu, select Debug, and click Go.

5.You will now be able to run your MEX-file in MATLAB and use the Microsoft debugging environment. For more information on how to debug in the Microsoft environment, see the Microsoft Development Studio or Microsoft Visual Studio documentation.

*/

2009年2月18日星期三

Progress in algorithm optimization

In particle fiter,the most time-cost program is large loop if the particle is large enough. In my program, I met the same problem.15000 particles are selected to describe the 24 state variable.

In order to test whether the C programe can improve the running efficiency I used a similar and simple C program to instead large loop part in Particle Filter. The result is pleased with me.

The first step I run 20s vehicle kinematic simulation and measure its output(noise are added). With these data I expected to estimate the optimal state during the 20s simulation. The result is estimation time spent on the cost large loop is 140s and 6 times longer than the realtime simulation. This is a large progress in the direction of forward to the real time state estimation. If the complete matlab code is used, the state estimation will cost 100minutes with the same measurement data in the previous state estimation.

The efficiency is improved 50 times.

2009年2月17日星期二

Matlab program optimazation

The research work today is analyzing why the PF algorithm run slowly in matlab environment? Can the efficiency be improved by optimalize the code of Matlab?
The simple and same test program are run in matlab and VC6.0.I expect to get the conclusion that whether it is feasible to modify and optimize the current matlab code to improve the efficiency in order to make it can be run realtime in PC.




Case I research
In VC6.0, the program code is like this
// timetest.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include
#include

int main(int argc, char* argv[])
{
DWORD Begin;
DWORD Gap;
long i,j,sum;
sum = 0;
Begin = GetTickCount();
for(i=0;i<1000001;i++)
{
for(j=0;j<21;j++)
{
sum = sum + 1;
}
}

Gap1 = GetTickCount() - Begin;
cout<< Gap1 < return 0;
}
Run the program and the elapsed time is 63ms
But if it is run in matlab, the code is like
tic;
sum = 0;
for i = 1:1000000
for j = 1:20
sum = sum * 1;
end
end
t = toc
fprintf('cost time is %d\n',t);

the running result is cost time is 26 s

so we can see
(1) the efficiency can be improved greatly, if the code is rewritten in C program.
(2) When we write Matlab program and have to use the nested loop, the time of outside loop use a small value can improve the running efficiency.


Case II
mcc method case I:
1. Using mcc –m myfun.m to produce the executive file myfun.
Case and efficiency analysis
//C function manually
#include "stdafx.h"
#include
#include

int main(int argc, char* argv[])
{
DWORD Begin;
DWORD Gap;
long i,j,sum;
sum = 0;
Begin = GetTickCount();
for(j=0;j<6;j++)
{
for(i=0;i<100000001;i++)
{
sum = sum + 1;
}
}
Gap = GetTickCount() - Begin;
cout< return 0;
}

Time spent in the C program manually is 1.5s
//mcc –m messay.m
function sum=messay()
tic;
sum = 0;
for j = 1:5
for i =1:1:100000000
sum = sum + 1;
end
end
tt = toc;
%messayfun(sum,tt);
fprintf('sum is %f,%d\n',sum,tt);

Time spent in the program is 5.01s

mcc method case II:

test3.m
function test3()
tic;
sum = 0;
for i = 1:10
for j = 1:1000000
sum = 2+1;
end
end
tt = toc;
fprintf('time cost test3 is %d\n',tt);


run time is 60.9ms

test3.m
(script file)
tic;
sum = 0;
for i = 1:10
for j = 1:1000000
sum = 2+1;
end
end
tt = toc;
fprintf('time cost test3 is %d\n',tt);


run time is 11s
From the the above result, we can make a conclusion that function can run faster than the script file.


test2.m
tic;
for i = 1:10
d = feval('messayfun',2,3);
end
tt = toc;
fprintf('time cost is %d\n',tt);

messayfun.m
function c = messayfun(a,b)
for j=1:1000000
c = a+b;
end
time cost is 61.4ms


#include "stdafx.h"
#include
#include

int main(int argc, char* argv[])
{
DWORD Begin;
DWORD Gap;
long i,j,sum;
sum = 0;
Begin = GetTickCount();
for(j=0;j<11;j++)
{
for(i=0;i<1000001;i++)
{
sum = sum + 1;
}
}
Gap = GetTickCount() - Begin;
cout< return 0;
}

time cost 31ms

It can be seen that the time cost with C program can be decreased 50%.

Conclusion:
1. “feval” function’s efficiency is high.
2. The most efficient method is C program and it need to be written to replace the loop part in matlab program. The efficiency can be increased to twice.


Currenly, Matlab program optimality method is very good.The efficiency can be increased to twice if the C code program is used. It’s impossible to expect the program efficiency increase more 300 times(in order to run the algorithm realtime) only depended on transferring matlab program to C program. The feasible method is decreasing the particle number, decrease the state variable, or modify the PF method.

2009年2月16日星期一

work in a future weeks

for three days, I have made some initial result in low level data sampling based on QNX.
(1) find the extended 4 serial port
(2) ADT300 DA , DI/O, ADT680 DA,AD,DI/O

next step I need optimalize PF (pariticle filter)algorithm, it has been a big obtacle if I want to estimate the static error mean of IMU, demonstrate estimation algorithm robustness. Futhermore the optimaliztion work also is important for the ultimate realtime estimation.

"boost" + "Baysian++" is the best realtime realization schedule, but it needs me
(1)to transfer the matlab program into C++
(2)to be familiar with MSVC 8.0, Baysian ++ and boost
It is a large deal of work.


For the first step I need analyze the advantage of PF in my special problem, so the first step I want to analyze why the PF algorithm is slow implemented in Matlab environment and propose some improvement to improve its run efficiency.

the second, the boost and baysian ++ schedule will be applied in my system.

I expect to finish this works in two weeks.

God save me!

2009年2月14日星期六

Test ADT300 & ADT680

experiment system
Today I am sucessful in test ADT300 to output analog voltage and Digital bit, but fail to test ADT680. It's my job tomorrow.
the three card are used in our system(SCM7026,ADT300 and ADT680)




1.when using function inp(),outp(), we have to use -T1 optition when the program is compiled and linked based on QNX.
2.Although PC104 is compact and convinent in embeded system, it is difficult to mount and dismount.
3.It's my first time to read adc value and write dac value by address operation.

Saint Valentine's Day

Today is Valentine's Day. No rose and chocolate.
But we have happiness and harmonious loveness between my sweet heart and me.

I love you. Ping.!

Kiss!

2009年2月13日星期五

who can help me on QNX

hi,
I am using Qnx4.25 on SCM 7026(a motherboard produced by shengbo in China). The motherboard can provide 6 serial port. Port 1,2 are original and the port 3-6 are extended port.

I have found the extended port(3-6) use the shared interrupt number 11 So I write the following sentenses to start the extended port in file--/etc/config/sysinit.1
/bin/Dev.ser -N/dev/ser3 D000,11 &
/bin/Dev.ser -N/dev/ser4 D008,11 &
/bin/Dev.ser -N/dev/ser5 D010,11 &
/bin/Dev.ser -N/dev/ser6 D018,11 &
but the system is crashed. when I load one port, such as only one sentence
/bin/Dev.ser -N/dev/ser3 D000,11 &
the serial port 3 can work well. who can tell me why?

thanks...

2009年2月11日星期三

DVL test at pool in S.I.A

Last afternoon, I tested the DVL at pool in SIA. The test time was from 16:37 to 21:21. Thanks for help from Dr.Qifeng Zhang and Mr Xinke Zhu.
Today the data will be processed and the error model of DVL will be obtained.





2009年2月10日星期二

Test DVL produced by RDI Co.


Workhorse Navigator Doppler Velocity Log
According to the suggest in the operation manual, I sink the DVL into water in a bucket, and the DVL touched with the bottom of bucket.
I spent the whole afternoon on sampling the data from DVL. But I failed. I guess the reason is the distance between DVL and bottom is too little. Tomorrow I will put the DVL in the pool(depth is 9 meters) and test the DVL again.
Good luck for me.
BTW: today I found the Octans in the storehouse of laboratory. I have opptunity to make the error model for the two important underwater sensor.

2009年2月4日星期三

New challenge in new year

the Spring Festival will be end,I will be back to shenyang soon. Whether I can realize my dream, it depends on. Can offer comes to me, I expected ......

It's the important factors.

God bless me and my sweet heart.

2009年2月1日星期日

Zhangyu wine museum

sweet heart



trapdoor in 1865




2009年1月28日星期三

2009年1月21日星期三

Spring Festival in China

From 22, Jan to 9, Feb. I am in Yantai for my new year.





supermarket in China at spring festival

A timely snow promises a good harvest

2009年1月11日星期日

some useful knowldge from "Autonomous Underwater Navigation and Control" written by Steden B. Williams


1.idea of utilizing Image sonar in SLAM algorithm;
2.approches for feature extraction, feature identification, feature matching;
3.algortihm evaluation when the ground truth is unavailable
4.introduction of principal returns
5knowledege of image sonar(Imagenex and Tritch)

Sonar linkage

SLAM principle figure




From David Ribas thesis chapter 2

2009年1月9日星期五

A Brief History of Sonar Development

www.oicinc.com/history_sonars.html
A Brief History of Sonar Development

Seafloor mapping is largely a matter of measuring depth. Prior to the First World War, the depth of the oceans was usually measured by lead lining. This involved lowering a chunk of lead (usually a cannonball) on a very long piano wire to the bottom of the sea. In 1826, Daniel Colladon measured the speed of sound in the waters of Lake Geneva, Switzerland. This experiment was one of many steps toward the creation of sonar. However, using sonar remained in the experimental stage for another 90 years, and sailors continued to make their measurements the old fashioned way.
The First World War changed all this when Germany put submarines into action against Allied ships. The ships had no way of seeing the submarines coming. The U.S. War Department asked scientists what could be done about this problem. The resulting war effort produced (a) government funding of research and (b) anti-submarine warfare, which resulted in the accelerated development of underwater technology. Submarines also benefited from echo technology when sound sources were installed on the submarines for both echolocation and Morse code.
After using underwater sound technology for measuring the proximity to the shore and other ships, researchers soon realized that if the sound device was pointed down at the seafloor, the depth could be accurately determined. Early "echo sounders", as they were called, had very poor directivity, and relied on the assumption that the echoes were coming from directly beneath you. The included angle (cone of the beam pattern out to the 3 dB down point) was about 60 degrees. This was a poor assumption if there was any shape to the seafloor below (see figure below) but was easier than the old lead line method, and could be carried out while under way.










Figure 1 shows a typical echo sounder’s dynamics Marine Geology, which was a relatively new science at the time, also helped with the development of sonar.



Figure 2 shows a comparison of bottom tracking and subbottom profile, from SIS-1000 data
Marine Geologists found that if you put enough energy into the "ping" you could get echoes from the layers of sediments and rocks beneath the bottom profile, and called this the "sub-bottom profile" (Figure 2). By recording the amplitude of the backscatter energy as a function of time and making some assumptions about sound velocity in the water (1500 m/sec) and the rocks (faster than 1500 m/sec), marine geologists could convert this data into water depth and rock layer thickness. By pinging continuously, driving the boat in straight lines, and laying all the ping records next to each other, they got an image, which looked like a vertical profile through the water column and sub-bottom. Dark reflectors correspond to scattered energy from point scatterers or layer transitions, termed changes in acoustic impedance (density * compressional wave sound velocity in the upper layer divided by the same for the lower layer).
Figure 3 shows the geometry of a typical sidescan sonar.
Commercial aspects of sonar were quickly applied to the research (and drove it in many cases). Today, oil companies and geological surveyors record the echo profiles from towed hydrophone arrays in search of petroleum in the Gulf of Mexico and elsewhere with seismic sources (air guns, water guns, sparkers, explosives or other means); a method called seismic profiling. On the less costly and dangerous end, most research boats these days are equipped with 3.5Khz sub-bottom profilers which have a fairly wide beam (12-30 degrees) but good penetration (usually measured in fractions of a second, since we don't know the velocity of what we're penetrating). Alternatively, if better bathymetric profiles are required a higher frequency depth precision depth recorder, also known as a narrow beam sounder is required (at the expense of less penetration). These often operate at 12 KHz or above and have a single beam 2-4 degrees wide. With a narrower beam, you may have greater confidence that the value you pick as the bottom (from the first echo return) is actually right beneath you, and not off to the side (side-swipe).
While being able to continuously gather bathymetric profiles was a great improvement from the archaic lead lining method, it still meant you only knew what was right beneath you. Anything off to the side was still an unknown. Naturally, the next approach was to point the beams of the sonar out to the side, creating fan shaped beams to port (left) and starboard (right) which mapped a broad bow-tie shaped piece of the seafloor with every ping.

Figure 4 shows the geometry of a typical multibeam sonar for mapping ocean bottom contours.


MULTIBEAM
There are two main types of sonars; multibeam sonars for mapping bathymetry, and sidescan sonars for mapping seafloor imagery. Multibeam bathymetric mapping systems are straightforward in that they consist of a source transducer designed to ensonify a broad region out to either side (say 60 degrees out to either side, but only one or two degrees along the ship's track). They also involve a receiver array (hydrophones) that, through the magic of phase delay techniques, manages to pre-form multiple adjacent beams focused at known angles. As each 'beam' listens for returns from only one angle, but every beam records the time of the returning echoes independently, each ping results in "n" pairs of range (travel time * speed of sound / 2) and angle, where n is the number of beams. Range and angle for each beam can be converted to cross-track distance and depth. String all the points together, and you have a bathymetric surface you can contour or play with in many other fashions. More recently, people have begun to realize that you could not only log the time of the echo in each beam, but the amplitude as well, in order to determine how reflective the bottom was, as well as its depth/shape.
Some of the better-known multi-beam systems out there today are Odom, Reson 8101, & 9001, Sea Beam, Hydro sweep, Simrad-EM1000 and the Japanese MBES (multi-beam echo sounder). For reasons of convenience, multibeam systems are traditionally mounted on the hull of the vessel, and hence do better on calm days. While they are stabilized for ship motion, when the boat bangs around a lot, it tends to put both bubbles and noise in the water, which doesn't help the multibeam system. OIC works with data from all of these systems, and we have developed our own set of routines for processing both bathymetry and backscatter to minimize noise and other spurious data.


SIDESCAN

The second main type of marine survey device is a sidescan sonar, which, as the name implies, scan out to the side (this stuff isn't that hard is it?), illuminating a bowtie shaped area of the seafloor with each ping. Within this group, there are two sub-groups: sidescan-only systems, which only produce acoustic images of the seafloor; and bathymetric sidescan sonars, which create both bathymetry and sidescan. At OIC, we work with both sidescan and Multibeam sonars.
Sidescan sonars produce images of the seafloor and the objects on it. They do this by continuously pinging and recording backscattered echoes as a function of time, and stacking the echo traces to make images. Strong reflectors are traditionally plotted as dark, and shadows as light. If the raw echo time series is plotted with time increasing on the x-axis and ping number increasing on the y-axis, we have what we call raw, uncorrected or "slant-range" imagery.
Figure 5 shows a sidescan image with the center track and data from the port and starboard channels.



Since the x-axis is travel-time, and the y-axis is distance along track (or ping number), you really can't use these slant-range images for accurate location or measurement of objects. However, if the height off the bottom (towfish altitude) is less than one quarter of the maximum slant range, they present reasonably undistorted images with minimal computational effort. Furthermore, they provide a clear indication of the bottom profile beneath the fish, which is quite useful in keeping the fish out of the mud (if the two sides were to close in and merge together, your water column would be zero, and you'd then be dredging, not surveying). While the echoes from objects in sidescan sonar images are sometimes fuzzy, the shadows are often quite crisp, as shown below.


This sidescan image shows two submerged craft taken by the SIS1000
Another factor influencing images is the sonar frequency. As the speed of sound in water is relatively constant, at higher frequencies, the sound wavelengths are shorter. As sonar echo strength is proportional to target roughness at the wavelength of the sonar source, higher frequencies pick out finer roughness better, as seen in the images above.
Man-made objects show up well in sidescan sonar images, as they usually have high acoustic impedance, and nice crisp sharp edges and corners as reflectors. However, as the image below shows, it's shape, not the intensity, that separates this plane from the surrounding rocks.

2009年1月5日星期一

toolkit update

in my website I upload the development toolkit based on matlab real time acquisition.
It's a useful toolkit example if you are using PCL818L to sample data.(AI and DI)

Development Environment: Windows 2K and Matalb 2007b

Thanks Mr Jiazhong Liu's(University of Southampton) advice during the course of development

http://sites.google.com/site/qiangliresearch/qiang-li-s-homepage/uvmsprj/matlab-toolkit

Enjoy it.

2009年1月4日星期日