Category

Thursday, October 11, 2012

Centralized vs decentralized and distributed vs non-distributed

  • Thanks to the PhD thesis of Keith Yu Kit Leung: "Cooperative Localization and Mapping in Sparsely-Communicating Robot Networks" I understood the differences.

  • Definition 1: A centralized multi-robot system is a group of robots in which the computation for a task is performed only by a specifc robot in the team or by an external computer.
  • Definition 2: A decentralized multi-robot system is a group of robots in which the computation for a task can be performed by any one or more robots in the team.
    • which means, if the one who was doing the task fails, someone else can take over
  • Definition 3: A distributed multi-robot system is a group of robots in which the computation for a task is divided amongst the robots in the team.
so we can have systems like these:
  1. centralized+distributed: all the nodes perform some part of the task and finally one guy put everything together
  2. centralized+non-distributed: one node performs the task
  3. decentralized+distributed: part of the tasks are divided and anyone can put everything together; no need of a special guy
  4. decentralized+non-distributed: one guy performs the entire task(non-distributed) but this one guy can be any guy. that means if the guy who was doing the task fails, another one can take over

Monday, May 28, 2012

Hi guys,

Well, global variables are not encouraged in MATLAB. But, sometimes you may want to initialize an object with some parameters and you would like to access some global parameters as well.

Here is what you can do.
  • Create a file (say Params.m) for storing such global variables.
          insert your global parameters like this:
          global MY_GLOBAL; MY_GLOBAL = 1;
  • Next, include this file in your main .m file.
          Params;
  • Afterthat, in your class file, inside the constructor function (or any other function)
          global MY_GLOBAL;
          obj.xyz = MY_GLOBAL;

done!


Tuesday, May 1, 2012

Sensor model and Likelihood Function

  • The probabiloty density function (pdf) p(z|x) serves as the sensor model.
  • This can be thought of in two ways:
    • to build the sensor model: we can fix x = x and ask what pdf in z results. Then, p(z|x) is a function of z. An exmaple would be, say we know the true location of a target then p(z|x) is the distribution of the observation.
    • when the sensor model is established observatione are made and z = z will be fixed. From this then we want to infer the state x. Thus, p(z|x) will then be a distribution of x. This distribution is called the likelihood function. L(x) = p(z|x)
  • In the case of likelihood function we know the observation z = z. But, that does not mean we are going to calculate p(x|z); we are still dealing with p(z|x).

Friday, January 13, 2012

Pull up and pull down Resistors

  • The task of a pull up or pull down resistor is to give a default value to a pin of a circuit component when there is no other connection is present. So, we are making the particular pin not to float!.
  • Have a look at this circuit:

    • Now, when S1 switch OFF, the input '1' is floating and it can take any value because of noise. So, we cannot really predict what will be there at the output '2'.
  • To avoid this kind of behavior we attach a pull up resistor as follows:
  • Now, when the S1 switch is OFF the pin '1' takes the Vcc voltage because normally the component does not absorb any current (high impedance inputs). 
  • Pull down resistor does essentially the same job.
I2C
  • I²C requires pull-up resistors on its clock (SCL) and data line (SDA).
  • The reason is because the pins on the chips are of open-collector design, which means that a chip can only pull the lines low, otherwise they float up to VDD. 
  • In I²C, pulling the line to ground indicates a logical zero while letting it float to VDD is a logical one. 

  •  Pull up resistors help nodes to determine whether the other nodes are transmitting or not by monitoring the state of the line.
    • When a node is transmitting it will the pull the line down to zero. Then the first node can detect that the other is transmitting.
[images credit: http://www.seattlerobotics.org/encoder/mar97/basics.html
http://en.wikipedia.org/wiki/Pull-up_resistor]