## Sunday, October 10, 2010

### Software Design as Internship?

One of my lecturer said that projects can be made as an internship. Is this possible? I was thinking of making the system identification with genetics algorithm as an internship for myself. If I can have my proposal up and going, probably I can consult some lecturer one this matter. By this method, I can save my time in searching for internship company, and I can stay in ROBOCON for another year. But is that good a reason?

## Tuesday, September 14, 2010

### System Identification with Genetic Algorithm

This idea suddenly strikes me. The system identification using a genetic approach. When I searched websites like the IEEE Explore, tones of this method has already been implemented.

Not long ago, I read about a technique called the genetic algorithm. This topic interests me because this is one of the main topic in artificial intelligent. And before that I too have read about fuzzy logic and have implemented in my motor control module (or the differential drive module, which is more a relevant name).

This idea come to me when I was designing my new version of motor control module. I was having a hard time in figuring out the gain of system and I keep saying that I really need a mathematical model for my motors and robots.

The current system identification method uses the curve fitting (which I think is the most fundamental method). Then this idea come out of a sudden. Why not use genetic algorithm to find the robot model?

My proposal was to have offline calculation of the model. I would just have to have some input and some output from my robot and feed it into my model calculator and the model will come out.

The best thing about genetic algorithm is the brute force method with natural selection. And the good thing about this is I can estimate (although this word is not really suitable) my model to a very high order system (maybe up to four or five, although I don't think it is relevant).

I would most probably use C programming in a computer to generate the algorithm. Because we use PIC very much but I don't think it is fast enough to calculate all those mathematics.

Although this is an exciting method to find out, but alas! there is no time. Just need to keep this away first.

## Saturday, July 10, 2010

### Experience is Priceless

After joining the Robocon for a few months, I guess this is a pit stop. We are going for a further route ahead and we need more preparation for that. A road to success was never heard. But we do know that, although if we cannot reach the moon, at least we have the stars. It all started with the tiny robot called the auto car competition. With a cost of MYR 200.00, the tiny robot was built. Using some basic sensors, I were able to make a line following robot. Then the thrill goes on. From digital, I have moved on to analog for the sensors because it is better although the noise is hard to handle at first. From my experience, digital, as in binary value sensors are not really dependable. Not if the sensors are very expensive. So to get out of the trouble, use more analog value items. The algorithm might be hard but it can accomplish so much more. Then it goes on. The journey is not easy but when you know you have your team to support you, everything goes rather smoothly. After entering the team, I was quite lost. It is really hard to merge into their system but Rome was not built in a day. Step by step I walk. Learning what I like best, programming a robot. The code was so long and eye soaring. And they never give the complete code. Makes my head spins a lot. But together with the new members, we manage to get through. Some don't. I learned that to enter Robocon is one thing. To stay is another thing which is harder. But I have struggled and stick with the team. Soon after, I wrote my own module based on control system. Learning from the faculty and campus is fun but it is more fun to apply them. You get to know much more on control system engineering, the transient response and steady-state error. Everything was so much cleare after you have applied that in robotics. The module went well but not much used out of it since this year's game require less navigation. How much I wished to enter the team one year earlier. Then for the first generation robot, I got to use my module. Although the scoring was illegal, but the module went well. Only there after I merge my module with the current module. It was like rewriting the whole thing, but I have rather use the current module. It gives so much more options and it is easier. There after, I was involved more in robot programming. I would not say it is hard but it is not an easy thing either. It takes a lot of cooperation too from other department in the team. Sometimes it is about perseverance too. You never know that your programming will work. Sometimes you need to try a lot to get there. Sometimes silly mistakes really gets in the way and is really an irritating situation to be in. But all and all it was a good experience and it was priceless

## Monday, June 28, 2010

### ROBOCON 2010 Malaysia

The game has ended, congratulations to UTM for winning the competition in Malaysia Level.

## Thursday, June 17, 2010

### Development of Modules

This was in my thinking for a long time. To develop proper modules for the use of robotics. There are two modules in my mind. Actually the modules was half developed and in use now. Just now, would like to rearrange the programming and calling methods.

Fuzzy Logic LDR Line Finder
Using proper light to electric transducer, a module to find a line is developed using the mathematics of fuzzy logic. This algorithm will find line with much higher noise invulnerability. An analog pre-filter is used and a band pass filter algorithm will be used to filter out noise too. Will have to find a way to calibrate the value accordingly.

PID + Fuzzy logic Position and Speed Control Differential Drive Module.
Using the methods of control system, a differential drive module is developed. Controlling the position with PID and speed using Fuzzy Logic, a module can move in speed mode or position mode. This module will also include tuning mode for easy using.

If I could have more time.

## Monday, April 26, 2010

### RoMeLa's Way

1. Creating ideas before going to sleep
2. Never critisize other's idea and it will promote growth of ideas
3. Use the fundamental tools for example differential equation, linear algebra, etc
4. Work smart and work hard
5. Always have fun.

Extracted from Dr Dennis Hong from Virginia Tech via TED video.

## Wednesday, April 14, 2010

### Vast Universe of Knowledge

I was struck by the fact that the world is huge.
The knowledge contains in it was massive.
While surfing the internet,
I done some sight seeing,
then only I realize that the knowledge that I know is far too little.
There are so much more to learn and what am I still doing here?
Felt humiliated.

## Wednesday, April 7, 2010

### Shifting the Paradigm?

For me there concept of fixed sampling time is crucial for the use of control system engineering in controlling some particular plant. This is done is a fixed sampling time for a discrete digital control based in a microprocessor. If the sampling time is varied, it will affect the gain and such.

Probably this is my thinking and this is the paradigm I am stuck in. But there actually exist another type of method called the event based control. This control method does not need a fixed sampling time to control a plant.

I am still studying on this matter because it is seems complex... ><

Credit to Kian Sheng, my senior for introducing me to the concept of event-based control.

## Friday, April 2, 2010

### Good Research, Good Article

There are some elements for a good article. This is what I have learnt joining the S-SPEC 2010 organized by the SPE UTM and SHELL. Of course my article submitted was not tip topped but at least I get to join the poster competition out of 200++ abstracts, which makes me the top 32. There are something about the event that makes me really disappointing. The organization was messy and there are some bias in the selection. Quite a disappointing event. But nevertheless, there are some knowledge gained from the event.

Here are something that I would like to share for a good research and good article.

1) Have a proper problem statement
- You don't just do some research for fun; you will need a problem statement and that is a almost significant one. Make sure the problem need urgent solution or else people won't bother to go for it.

2) Proper methodology
- Make sure the methods are clear and not just gibberish. How to obtain the data? How significant is the findings? It is better to have many samples and calculate the means and confidence interval (you know, statistics).

3) Comparison of methodology
Compare with current methods and try to convince that your method is better. It is the best to have a novel method to solve a problem and make sure the method is better than the current method in the market or commercial.

4) Cost effectiveness
The method or the solution suggested must be cost effective than the current one. It may cost less or need less time or less energy to produce or for the system to run.

5) Entrepreneurship
Make sure the research can be market and it is highly wanted in the community. Try not to research something that is not needed or people would say "Finding answers to a question no one asks".

6) Proper citation
No information comes from the thin air. Those information must have a source either by yourself or others. If the information is from others, credit them by citing their work. There are tonnes of method to cite.

Khin Hooi.

## Monday, March 8, 2010

### Some Campus Scenery

It was long since I did any of photography, so here are some. he views are from my campus.

My Campus 01 by ~temporary40 on deviantART

My Campus 02 by ~temporary40 on deviantART

My Campus 03 by ~temporary40 on deviantART

My Campus 05 by ~temporary40 on deviantART

## Saturday, March 6, 2010

### Dream

At night I dream of... I hope not to dream, because I wish not to desire. Also, when you are dreaming you can't control things and I like to be in control.

This is really special.

## Wednesday, March 3, 2010

### Pembudayaan Ilmu

Thank to the MPP Head for dropping by my blog. I saw a post from his blog about the culture of knowledge and this interest me. Here are my comment on the post. For his post, view here.

"
Memang penting isu yang dibicarakan, pembudayaan ilmu. Malah ia juga dijadikan salah satu elemen tunggak dalam syarahan perdana NC kita dalam perancangan tahunan (Strategi, struktur dan budaya). Mungkin dilihat dalam syarahan tersebut, beliau membicarakan lebih kepada pembudayaan ilmu di kalangan penyarah dan kakitangan UTM.

Akan tetapi, mahasiswa juga perlu dan harus memainkan peranan dalam pembudayaan ilmu. Saban hari, apabila dilihat secara sepintas lalu, ramai yang hanya belajar untuk lulus dalam ujian atau peperiksaan. Dan yang teruknya, ilmu yang diperoleh terus dilupakan pada semesta yang berikutnya.

Perkara ini adalah sangat memalukan untuk seorang mahasiswa yang bertauliah. Sepatutnya ilmu itu disimpan dan diaplikasikan di latihan atau kerja praktikal yang harus diinisiatifkan sendiri.

Salah seorang pensyarah saya pernah berkata 'Jika anda ingin menilai sesebuah universiti, lihatlah apakah yang dibicarakan oleh pelajar di kafeterianya' Jika perbicaraan adalah berkaitan dengan 'anime', 'dota', 'games', 'shopping', maka gagallah tempat itu digelar sebuah universiti yang terbilang.

Sebaliknya, perkara yang dibicarakan oleh kalangan pelajar adalah berbentuk ilmiah, maka ia mencerminkan sebuah universiti yang berkualiti. Perkara inilah yang sepatutnya terjadi di UTM.

Sesungguhnya, pembudayaan ilmu inilah patut dijadikan keutamaan semua pelajar di UTM.

"

## Tuesday, February 9, 2010

### You are Not a Child Anymore

University students suppose to be mature and grown up. They should think professionally and does things in a systematic and proper way. The matter here is a paper. Simple piece of article need to be submitted to the lecturer to gain marks. And yet you did it like a children does things. You never want to think how is the impact of sending a piece of junk to the lecturer. And the worse thing is, you plagiarize word to word. Even small kids know not to copy during an examination and you did the worst of worst rule for a student. Too bad you have to stick with me because my expectation from a student's paper is very high.

## Wednesday, January 27, 2010

### I Do Not Understand

While standing waiting for the elevator, there were Cameron, Leo, Zu and I with another two old guy. We were talking to each other and the two guy was playing with some switch and hose pipe. Then suddenly one of them sprinkled water to my pants and the worse thing is they act like they did nothing.

This is so embarrassing. Can a two grown up man say 'sorry' when they wet another's pants?

Shit.

## Monday, January 18, 2010

### Fuzzy Line Follower Robot

As a continuation article to Auto Car 04 - Input Infra Red 02 and Fuzzy Controller is Artificial Human Controller I would like to explain about the application of fuzzy logic to line following robot.

Before going further, I would like to say something about fuzzy logic. According to Zadeh, the creator of fuzzy logic, we no need some value that is too exact. In the line following term, the definition of exact is at the voltage level of the infra red sensors.

From the previous article one Input Infra Red, the digital value is gotten from the comparator. What is the analog value oscillates around the compared voltage value? The digital signal comes out will oscillates around 0's and 1's. This is highly unacceptable and will yield wrong movement to the robots.

One of the solution is to have fuzzy logic embedded into the system of data input. Analog value from the infra red sensor will be our universe of discourse (means the analog input to the fuzzy system).

Analog value will be fuzzified into degree of truth. For example the analog value will have 0 to 5 volts, if the value is 3, it will be 40% low and 60% high.

Fuzzified inputs will go through truth table like everyone did in normal line follower. Which takes the example below:

0001 - Turn hard right
0011 - Turn right
0010 - Turn little right
0110 - Go straight
0100 - Turn little left
1100 - Turn left
1000 - Turn hard left.
Etc.

Each of the conclusion (meanings turn hard right, turn right, etc) will go through the minimum function of all the truth of the input. For example, for straight conclusion will go through Minimum (Truth of first infra red being low, Truth of second infra red being high, Truth of third infra red being high, Truth of fourth infra red being low).

If the line is really at the middle, then all the truth will be quite high, therefore, the truth of Straight will be high. An example:

The line is at the middle:
(Infra red numbering from left to right)

Infra red input 1 voltage: 1.1
Infra red input 2 voltage: 4.5
Infra red input 3 voltage: 4.2
Infra red input 4 voltage: 0.8

Truth of infra red 1 being low: 1Low = 1 - ( 1.1/5 ) = 0.78
Truth of infra red 1 being high: 1High = 1.1/5 = 0.22
Truth of infra red 2 being low: 2Low = 1 - (4.5/5) = 0.1
Truth of infra red 2 being high: 2High = 4.5/5 = 0.9
Truth of infra red 3 being low: 3Low = 1 - (4.2/5) = 0.16
Truth of infra red 3 being high: 3High = 4.2/5 = 0.84
Truth of infra red 4 being low: 4Low= 1 - (0.8/5) = 0.84
Truth of infra red 4 being high: 4High = 0.8/5 = 0.16

Truth of Turn Hard Right (0001) = Minimum (1Low, 2Low, 3Low, 4High) = 0.1
Truth of Turn Right (0011) = Minimum (1Low, 2Low, 3High, 4High) = 0.1
Truth of Turn Little Right (0010) = Minimum (1Low, 2Low, 3High, 4Low) = 0.1
Truth of Straight (0110) = Minimum (1Low, 2High, 3High, 4Low) = 0.78
Truth of Turn Little Left (0100) = Minimum (1Low, 2High, 3Low, 4Low) = 0.16
Truth of Turn Left (1100) = Minimum (1High, 2High, 3Low, 4Low) = 0.16
Truth of Turn Hard Left (1000) = Minimum (1High, 2Low, 3Low, 4Low) = 0.1

After getting the conclusion from each output, we will use defuzification to determine the current position. Usually we will use centroid defuzzification. We will assign each truth to have a weight:

Turn Hard Right = 3
Turn Right = 2
Turn Little Right = 1
Go Straight = 0
Turn Little Left = -1
Turn Left = -2
Turn Hard Left = -3

Current Line Position
= (0.1 * 3 + 0.1 * 2 + 0.1 * 1 + 0.78 * 0 + 0.16 * -1 + 0.16 * -2 + 0.1 * -3) /
(0.1 + 0.1 + 0.1 + 0.78 + 0.16 + 0.16 + 0.1)

= -0.12 (Negative means left)
(Which sounds logical because the value of infra red voltage is biased to the left.)

The best part is, if there is a voltage surge in other non-line-positioned infra red, your can define it as noise. For example if the line is at the left, the logic should be 1100, but there is noise at the right most infra red, making the truth of 1101 very high. This can be defined as noise.

Of course this is not the exact way to define a fuzzy logic mathematics and sets but this is only an example of fuzzy logic and the implementation in line following.

Now comes the disadvantage part. The number of infra red inputs makes the calculation time increases exponentially. Let N be the number of infra red, then the calculation time might be 2^N. The more logic there is, the more time is needed.

All in all, this is just another method for line following. Of course you might have PID and Digital Logic and those fancy stuff, it is the effect that counts.

## Wednesday, January 13, 2010

### Sudden Halt

The new semester in UTM has started and everyone is busy with their lives. Some joins activities, some just study and some doing research for the great competition. While for me, still perfecting my motor control module. Sometimes the this is really getting on the nerves and some small matter that can't be seen will get in the way like casting in Cpp. Sometimes there is a lot of problem that you don't know where is the problem. Second demostration is coming soon and the second generation robot is going to be tested. Who knows how is the performance will be. The competition website is out and everyone can have a look at it. It is going to an exciting week.