Ads 468x60px

Subscribe:

Labels

Featured Posts

Thursday 2 February 2012

[TUTORIAL] Simple Implementation of PID

A PID controller based behaviour of line follower. [source]
Many industrial have to make sure that their robots or other mechanism devices is work properly. Usually to manage their devices, they have to make system control. There is many system control design out there,  this time i'll explained briefly and give simple implementation of PID control.

Proportional-integral-derivative control or shortened PID is a generic control loop feedback mechanism controller. It calculates an error values as the difference between a measured process variable and a desired set point. To minimize the error, controller adjusting the process control inputs.

The algorithm is involves three parameters; the proportional, the integral, the derivative values. Proportional is depends on present error. Integral is accumulation of error. Derivative is a prediction of future error. But, in some circumtances may require only one or two: just using P, PI, PD. We can't use only I or D, at least there is P in calculations.


Process diagram

First thing to tuning PID controller, we have to set the "zero point". This is important, because we want set range of error. The error can get  from "zero point" or called SP (Set Point) minus value that always change called PV (Process Value).

After get the error, calculate the proportional (P) gain from multiplying error and constant P(Kp). Tuning the proportional gain give you output that change the error. Bigger value of Kcan make large change in the output for given change to error. If the output of proportional gain is too high, the system can be unstable. In contrast if the output of proportional gain is too low, the system is not responsive or less sensitive.


Third step is determine whether use Integral term or Derivative term or using both of them. Integral term is the sum of instantaneous error over time and gives accumulated offset that should have been corrected previously. Then accumulated error is multiplied by constant I (Ki) and added to the controller output. Tuning the Integral gain is recommended Ki value is under 1 but not 0. The integral term is accelerate the movement of process towards the set point. However, since integral term responds to accumulated errors from the past, it can cause the present value to overshoot the setpoint value.


Derivative term is the derivative of the process error  is calculated by determining the slope of the error over time and multiplying this rate of change by the derivative constant KdThe derivative term slows the rate of change of the controller output. Derivative control is used to reduce the magnitude of the overshoot produced by the integral component and improve the combined controller-process stability. However, the derivative term slows the transient response of the controller. Also, differentiation of a signal amplifies noise and thus this term in the controller is highly sensitive to noise in the error term, and can cause a process to become unstable if the noise and the derivative gain are sufficiently large.




Line following robot is simplest yet fun to implement PID controller. To implement it to line following robot, first we have to make a set point, let's say the line following robot use 4 light dependecy sensors. So the set point is center of the robot, it means the set point is two sensors at center (two sensors more accurate than one). 
Illustration : sensor is red and line is black.
The sensor is 2cm apart each sensor and width of line is 3cm. Then, give value to each possible position of sensors. Full range of position can be like this (1 is represent to sensor is detect a line and 0 is represent to sensor is not detect a line) :


0001 : 3
0011 : 2
0010 : 1
0110 : 0 
0100 : -1
1100 : -2
1000 : -3


Give a "flag" value to right and left sensor for possiblity any sensor not detecting a line. Then give a position value to each flag, like this (flag 1 is for left sensor and flag 0 is for right sensor) :


0000 : 
flag 1 ----> 4
flag 0 ----> -4




After value of position is given, then we use that for PID formula.
First, we use Proportional term in PID formula. Error is value of position that given at each sensor. Then multiply it with constant P(Kp) - give any number for it, it will be adjust for better run of line follower. After that, make a logic statement for the run of robot. Speed of robot is set and it will be reduced by PID output value, this is how robot is navigate through the line. Adjust the Kp until the robot is follow the line correctly. After the run of robot is follow the line correctly, use I or D to stabilize the robot, but usually for more visible  result use D first. Formula of D is current error (present position value) minus previous error and multiply it with Kd. After that, sum the P and D for PID output value. Adjust Kuntil the robot is more be in center the line. After get more stabilize run of the robot from P and D formula, use I for more stabilize run of the robot and more be in center the line. Formula of I is current error plus previous Integral value, after that sum it with P and D. Adjust Kd until run of the robot is stable and follow the line with variation of shape. Try and try run of the robot until its best performance. 


You can download my code made by CodevisionAVR C Compiler here
I will upload video of my robot soon!






Source :
Definition of PID controller in wikipedia


Read More

Saturday 28 January 2012

Facebook, Twitter, and Myspace Envies Google Plus

Focus on the user, site made by three company's engineerings; Twitter, Facebook, and Myscpace.
-Google recently add Google Plus content as their search result, but other social content is not displayed on its search result.


After Google prioritize its social network - Google Plus -  Facebook,Twitter,and Myspace join together make "weapon" to counter it. The weapon called "Don't be evil". This name adopted from google's motto itself. "Don't be evil" is add-on for more objective world social network related search result.

In early January, Google updated it search system, called "Search , plus Your World" (SPYW). In updated system there is feature Personal Results, which can more personalized user's search result. If you search with Google, then on the right side will show several related links from Google Plus. However, Google does not show links from other social network.

Thats why some engineers from Facebook, Twitter, and Myspace makes add-on "Don't be Evil". Those companies warned Google for more focus to serve what users search, not promoting its product.

This tool works when Google that it's relevant to surface Google+ page as a result in any of the areas where Google+ content is hardcoded, the tool searches Google for the name of the Google+ page. Then, the tool identifies the social profiles within the first ten pages of Google results (top 100 results). Replacing previous results that could only be from Google Plus.


You can obtain the tool from here

Read More

Twitter Censorship : Tweets Withhold

-Twitter has been known as supporter of free speeching and now the company acknowledge there are countries that restricted to certain subject.

Twitter recently announced a new ability : tweets withhold. If it used, governmental authorities can withhold a tweet that restrictly prohibited in some countries while keeping it available in the rest of the world. Until now, to take account of those countries limits was to remove content globally. 

"We haven’t yet used this ability, but if and when we are required to withhold a Tweet in a specific country, we will attempt to let the user know, and we will clearly mark when the content has been withheld." wrote the company in a blog postTwitter take example France and Germany that ban specifics type of content - both countries ban pro-Nazi content.


Twitter take this as the company grow internationally, there will be country that has different ideology of freedom of speech. Some differ so much from Twitter ideas that Twitter will not able exist there.

"One of our core values as a company is to defend and respect each user’s voice." wrote Twitter on its blog. "We try to keep content up wherever and whenever we can, and we will be transparent with users when we can't. The Tweets must continue to flow." Twitter added. 

To share the new page Twitter take partnership with Chilling Effects, http://chillingeffects.org/twitter.

Read More

Friday 27 January 2012

Next Level Invisibility : Cloaked 3D Objects

Invisible Man
-A fantastic science-fiction film "Invisible Man" is looks like can be implementated in real life.


Researchers from University of Texas at Austin now have figured out how to "cloak three dimensional object standing in free space", means the object is invisible. This is not like cloaking research before thats more like mimicry , using Meta-materials that bent ray of light around an object to conceal it, but only worked in two dimensions. Or device that played trick by harnessing the mirage effect to make objects behind it “disappear.”


In daily life we can see objects because the lights bound off it and eyes process the info from lights that hitting eyes. This research published this week in the New Journal of Physics, uses "plasmonic meta-materials" to make an 18-inch cylindrical tube invisibly. To put it simple this object channeling lights around the object, with designed structures that bounce ligth like a pinball machine. This why it can be invisible from every angle.
Tested variate wavelengths to objects


Sounds incridible with those explanations, but researchers only make it with high-frequency wavelengths, such as microwave. Researchers still troubled with optical wavelengths - what human eyes could capture it.


You can obtain the paper in here.


Sources : 
Wired
BBC News
Wikipedia - Plasmonic Metamaterials  

Read More

NASA New Satellite Capture Earth With High-res Image


-NASA recently released this great image from its new sattelite : Suomi NPP

Suomi NPP's mission is bring closer the scientists for weather forecasts and increase understanding of long-term climate change. This sattelite is critical first step in building the next-generation Earth-observing sattelite system. "Suomi NPP will extend and improve upon the Earth system data records established by NASA's Earth Observing System (EOS) fleet of satellites that have provided critical insights into the dynamics of the entire Earth system: clouds, oceans, vegetation, ice, solid Earth and atmosphere." wrote Brian Dunbar on NASA official site.
100% crop from original image.
Suomi NPP was originaly called National Polar-orbiting Operational Environmental Satellite System Preparatory Project, the probe renamed in honor of the late Verner E. Suomi, known as the "father of sattelite meteorology".


This sattelite launched from Space Launch Complex2 at Vandenberg Air Force Base in California on Oct. 28, 2011 at 5:48 a.m EDT by using United Launch Alliance Delta II rocket.


Image can be download on here.


Sources :
NASA Official Site
Wired

Read More

Thursday 26 January 2012

Android Vulnerability : Make Calls, Read Your Messages, and See your datas


-The most popular smartphones system Google's Android, make serious vulnerability?

Recently there is vulnerability on Android that researchers from North Carolina State University says that third apps or we can say attacker can make phone call, read your messages, and see your private datas - without asking user permission.

 Researchers test this vulnerability with HTC, Samsung, Motorola, and Google turns out with outstanding result. Handsets sold by those manufactures contains code that makes its handsets exposes to untrusted third-party apps. These codes is bypass key security defenses built into Android that require users clearly grant permission before an apps gets access to personal information and functions such as phone call.

"We believe these results demonstrate that capability leaks constitute a tangible security weakness for many Android smartphones in the market today" wrote the researchers on their paper - Network and Distributed System. "Particularly, smart-phones with more pre-loaded apps tend to be more likely to have explicit capability leaks."

With apps the researchers make, called Woodpecker, they test it on eight smarphones from the four vendors. In these tests the researchers figured that the most vulnerable was HTC's EVO 4G devices and the less vulnerable was Googles devices, Nexus One and Nexus S, contain one leak test with : deleting packages. 

Finally the researchers wrote on their paper with a worrisome results."Among the 13 privileged
permissions examined so far, 11 were leaked, with individ-ual phones leaking up to eight permissions. These leaked capabilities can be exploited to wipe out the user data, send out SMS messages (e.g., to premium numbers), record user conversation, or obtain the user’s geo-location data on the affected phones – all without asking for any permission.

You can read information abaout these on their papers available in here. With the upgrades of firmware, these threat maybe will be fixed.

Sources :

Read More

Wednesday 25 January 2012

SONY® Adds Glonass To Its Latest Smartphones



-After Sony bought Ericsson stake in joint venture , and now Sony announced its first smartphones : Xperia S and Xperia Ion.


             Sony now supports Russian's GLONASS positioning system to its latest smartphones : Xperia S and Xperia Ion. and its isn't exactly new territory for the company, as a post on  its Developper World blog reveals that GLONASS is already in its latest smartphones - any Xperia™ device with a Qualcomm Snapdragon S2 or S3. This makes Sony on par with competitors such as Motorolla and Apple, which already integrated in its device like a Motorola RAZR and iPhone 4S.


 Why use GLONASS?


              When you feel laggin with your devices in navigation application it mostly likely caused by surrounding buildings that blocking the view towards GPS sattelites. To calculate a good position, a clear line of access to four or more sattelites is needed. If the signal bounces off a wall before reaching the receiver, it will reduce the accuracy of the position. This is where GLONASS, other version global positioning system, can help.


What are GPS and GLONASS?


               GPS (Global Positioning System) : Space-based satellite navigation system that provides location and time information in all weather, anywhere on or near the Earth, where there is an unobstructed line of sight to four or more GPS satellites. It is maintained by the United States government and is freely accessible by anyone with a GPS receiver. The system imposes some technical limitations which are only removed for authorized users.(wikipedia)


               GLONASS(Globalnaya navigatsionnaya sputnikovaya sistema) : radio-based satellite navigation system operated for the Russian government by the Russian Aerospace Defence Forces. It both complements and provides an alternative to the United StatesGlobal Positioning System (GPS) and is currently the only alternative navigational system in operation with global coverage and of the same precision. (wikipedia)


               With GLONASS make improves positioning by add its sattelites system and GPS sattelites system. This means your devices positioning support 51 sattelites, which in turn more successful position calculations and also better accuracy of the calculated positions in challenging environments. More information you can visit Developer World Sony Ericsson.



Sources :
Developer World Sony Ericsson
The Verge
GSM Arena
Wikipedia : GPS | GLONASS

Read More