Dear Han, True, as I already mentioned that its has been some time that I haven't looked into this code, and am not sure whether this is the most up-to-date copy of the code I have actually used, so looking at what I have sent to you, it just profile the receiving mode of the radio.
So what you need to do is to look into CC2420Power Component. The first thing you will notice is the three different commands that relates to the different states of the radio and these are: CC2420Power.startVReg(), CC2420Power.startOscillator(), CC2420Power.rxOn(), and there stop versions accordingly, these events gives us the information about the different states the radio is at present, I am not sure, you need to check out the datasheet, coz I dont have time to get into such details, which of these events corresponds to which state of the radio, like rxOn() is pretty much self explanatory i.e. turning radio in receive mode, similarly I guess, startVReg() turns the radio in Idle mode and startOscillator() switches it into transmit mode, but again not sure, check out the implementation for more detail. Now, from the current version of the code, you get the idea that how to calculate the time spent in a specific state of the radio, do the same thing for each of the other states, atleast for transmit and Idle. And beware, it doesn't really matter whether the radio is receiving anything or not, as long as the radio is in receive mode it consumes the energy as mentioned in the datasheet of CC2420. Please don't hesitate to contact me for any further details, I think it would be a good contribution to tinyos repository if we would able to get this online energy estimation done. Regarding Avrora simulator, I am sure they must have been doing the same stuff! cheeers, Wasif! On Wed, Sep 19, 2012 at 8:18 PM, Hamid Rafiei Karkvandi < [email protected]> wrote: > Hi, > > Regarding the last email, I believe the radio in the so called "hearing > mode" consumes as much as "receiving mode" as the radio reception circuitry > is ON. The idle mode is when the radio is turned off. That is exactly what > Low Power Listening (LPL) BoX-MAC does. > > I suggest for a detailed energy profile calculation, you may look at the > Avrora simulator and its energy calculator components. It contains a > similar method to what is mentioned in the previous email, > > > -Hamid > > > > > > On Wed, Sep 19, 2012 at 10:27 AM, Han Bin <[email protected]> wrote: > >> >> >> wasif masood wrote: >> > >> > no don't go in that direction, just calculate the time radio itself >> spent >> > in either of these states, look into my code, in the CSMACA component, >> you >> > will see how I am using the Anlyzer component to calculate these times. >> > >> >> Dear Wasif, >> Thank you for your help. I've read your code and concerned about the way >> to >> calculate energy consumption as below: >> rOnTime = the time when radio is ON [call SplitControl.start()] until the >> time radio is OFF [call SplitControl.stop()] >> And then consumed energy is calculated by: >> E = P_on * rOnTime + P_off*rOffTime ; // >> where P_on=57,P_off=8;//7.6~8;//I_on=19,I_off=2.55, V=3; >> >> However, as we known, Radio consumes much energy when it transmits or >> receives packets (~23mA) and consumes less energy in idle mode (~21 uA). >> Actually, even though the radio is ON, but if mote doesn't transmit or >> receive any packet, it consumes very little energy. Therefore, it doesn't >> make sense when we use I_on = 19mA to calculate Energy (for the total time >> when radio is ON). For more accuracy, I think we should calculate the >> duration time when radio transmits or receives packets. But I don't know >> how >> to get this duration time correctly? How about your idea? >> Thank you very much! >> Han Bin >> >> -- >> View this message in context: >> http://old.nabble.com/Energy-consumption-on-Telosb-tp34443559p34453369.html >> Sent from the TinyOS - Help mailing list archive at Nabble.com. >> >> _______________________________________________ >> Tinyos-help mailing list >> [email protected] >> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help >> > > > _______________________________________________ > Tinyos-help mailing list > [email protected] > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help > -- Wasif Masood
_______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
