<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>gonium.net &#187; smartgrid</title>
	<atom:link href="http://gonium.net/md/tag/smartgrid/feed/" rel="self" type="application/rss+xml" />
	<link>http://gonium.net/md</link>
	<description>so much time, so little to do.</description>
	<lastBuildDate>Fri, 30 Jul 2010 13:47:27 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Contiki and Mac OS</title>
		<link>http://gonium.net/md/2010/07/30/contiki-and-mac-os/</link>
		<comments>http://gonium.net/md/2010/07/30/contiki-and-mac-os/#comments</comments>
		<pubDate>Fri, 30 Jul 2010 09:52:42 +0000</pubDate>
		<dc:creator>md</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[smartgrid]]></category>
		<category><![CDATA[6LoWPAN]]></category>
		<category><![CDATA[avr]]></category>
		<category><![CDATA[microcontroller]]></category>
		<category><![CDATA[mysmartgrid]]></category>

		<guid isPermaLink="false">http://gonium.net/md/?p=271</guid>
		<description><![CDATA[At the moment I am building a small demo based on the AVR Raven and Contiki. I was running into some trouble with building the Firmwares on my Mac &#8211; this is the documentation of the workarounds.
The Contiki build system depends on some GNU utilities that are not installed. Using the following steps I was [...]]]></description>
			<content:encoded><![CDATA[<p>At the moment I am building a small demo based on the AVR Raven and Contiki. I was running into some trouble with building the Firmwares on my Mac &#8211; this is the documentation of the workarounds.</p>
<p>The Contiki build system depends on some GNU utilities that are not installed. Using the following steps I was able to compile for the &#8220;native&#8221; (i.a. Mac OS) target:</p>
<ol>
<li>Install GNU binutils using MacPorts.</li>
<li>Edit &#8220;cpu/native/Makefile.native&#8221; and adjust the &#8220;Compiler Definitions&#8221; section like this:<br />
<code><br />
### Compiler definitions<br />
CC       = gcc<br />
LD       = gcc<br />
AS       = as<br />
NM       = nm<br />
# Use GNU ar instead of /usr/bin/ar<br />
AR       = gar<br />
OBJCOPY  = objcopy<br />
STRIP    = strip<br />
ifdef WERROR<br />
CFLAGSWERROR=-Werror -pedantic -std=c99 -Werror<br />
endif<br />
CFLAGSNO = -Wall -g -I/usr/local/include $(CFLAGSWERROR)<br />
CFLAGS  += $(CFLAGSNO) -D_XOPEN_SOURCE=500 -O<br />
# Simplify ld arguments<br />
#LDFLAGS  = -Wl,-Map=contiki-$(TARGET).map,-export-dynamic<br />
LDFLAGS  = -Wl<br />
</code></li>
</ol>
<p>Another issue is the ELF binaries for the AVR Raven boards. These files contain all components of the programs: flash and eeprom<br />
images as well as fuse settings. Unfortunately, avrdude cannot read the ELF format. So you have to extract the flash manually:</p>
<p><code><br />
$ avr-objcopy -R .eeprom -R .fuse -R .signature -O ihex $NAME.elf $NAME.hex<br />
</code></p>
<p>It works similar for the EEPROM section (where the IP data is stored):<br />
<code><br />
$ avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" --change-section-lma .eeprom=0 -O ihex webserver6.elf webserver6.eep<br />
</code></p>
<p>You can also check which fuse settings are used:<br />
<code><br />
$ avr-objdump -d -S -j .fuse webserver6.elf<br />
webserver6.elf:     file format elf32-avr<br />
Disassembly of section .fuse:<br />
00820000 <__fuse>:<br />
  820000:	e2 99 ff<br />
</__fuse></code></p>
<p>The directory structure of Contiki is somewhat overwhelming. I am currently working in these directories:</p>
<ol>
<li>contiki-2.4/platform/avr-ravenlcd: This is where the code for the ATMega3290p lives. Run make here and upload.</li>
<li>contiki-2.4/platform/avr-raven: The ATMega1284p code lives here, this is where most patches are. Don&#8217;t run make here!</li>
<li>contiki-2.4/examples/webserver-ipv6-raven: Run make here for the ATMega1284p code. This builds the webserver code and includes the platform/avr-raven dir.</li>
</ol>
<p>In addition, I have a serial terminal for debugging output:<br />
<code>screen -U /dev/cu.SLAB_USBtoUART 57600</code></p>
]]></content:encoded>
			<wfw:commentRss>http://gonium.net/md/2010/07/30/contiki-and-mac-os/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby for Chumby: HowTo</title>
		<link>http://gonium.net/md/2010/06/02/ruby-for-chumby-howto/</link>
		<comments>http://gonium.net/md/2010/06/02/ruby-for-chumby-howto/#comments</comments>
		<pubDate>Wed, 02 Jun 2010 15:06:09 +0000</pubDate>
		<dc:creator>md</dc:creator>
				<category><![CDATA[digital]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[smartgrid]]></category>
		<category><![CDATA[chumby]]></category>
		<category><![CDATA[embedded]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://gonium.net/md/?p=261</guid>
		<description><![CDATA[
It took me a while to figure this out, so here are my notes:


Install Scratchbox as described here. This greatly simplifies cross-compiling things. It also provides you a way to run the compiled ruby interpreter on a bigger host machine using QEMU. This is essential because I rely on rubygems, and the Chumby is too [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://gonium.net/md/2010/06/02/ruby-for-chumby-howto/chumby/" rel="attachment wp-att-265"><img src="http://gonium.net/md/wp-content/uploads/2010/06/chumby.jpg" alt="" title="chumby" width="500" height="387" class="alignnone size-full wp-image-265" /></a></p>
<p>It took me a while to figure this out, so here are my notes:<br />
<span id="more-261"></span></p>
<ol>
<li>Install Scratchbox as described <a href="http://wiki.chumby.com/mediawiki/index.php/Scratchbox">here</a>. This greatly simplifies cross-compiling things. It also provides you a way to run the compiled ruby interpreter on a bigger host machine using QEMU. This is essential because I rely on rubygems, and the Chumby is too small to execute the gem install commands. Besides, at least for the sqlite3-ruby and mongrel gems, I need to compile native code.</li>
<li>Install dependencies. I found the following libraries necessary:
<ul>
<li>OpenSSL 0.9.8n &#8211; avoid the 1.0.0 version, it causes problems with the Ruby interpreter.</li>
<li>Zlib 1.5.3 &#8211; same as installed on the Chumby.</li>
<li>Readline 6.1</li>
<li>A recent version of sqlite, since I need it for my gems later on.</li>
</ul>
<p>Compile the libraries and install them into /mnt/storage (use &#8211;prefix where necessary).</li>
<li>Adjust the environment to use the new libraries:<br />
<code>BASEDIR=/mnt/storage/usr<br />
export PATH=$PATH:$BASEDIR/bin<br />
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$BASEDIR/lib</code></li>
<li>Install Ruby and rubygems. I was not able to compile Ruby 1.8.7, but Ruby 1.8.6-p399 works nice. To configure everything, I use the following commands:<br />
<code>export ac_cv_func_getpgrp_void=yes<br />
export ac_cv_func_setpgrp_void=yes<br />
./configure --target=arm-linux --host=arm-linux --disable-pthread --enable-wide-getaddrinfo --enable-zlib --with-zlib-dir=/mnt/storage/usr --enable-readline --with-readline-dir=/mnt/storage/usr --prefix=/mnt/storage/usr --with-openssl-dir=/mnt/storage/usr &#038;&#038; make &#038;&#038; make install<br />
</code></li>
<li>Install rubygems:<br />
<code><br />
/mnt/storage/usr/bin/ruby setup.rb --prefix=/mnt/storage/usr<br />
mkdir -p /mnt/storage/usr/lib/ruby/gems/1.8<br />
</code></li>
<li>Afterwards, the necessary gems can be installed using the gem command. It might be necessary to provide additonal path information to the gems that compile native extensions, for example<br />
<code>gem install sqlite3-ruby -- --with-sqlite3-dir=/mnt/storage/usr</code>
</li>
</ol>
<p>The result is an image with Ruby installed, and all necessary gems for my project. The <a href="http://gonium.net/media/chumby-ruby-1.8.6-p399.tar.gz">tarball can be downloaded here</a>. To install, scp it to the Chumby and log in:<br />
<code><br />
scp *tarball* root@*chumby-ip*:/mnt/storage<br />
ssh -l root *chumby-ip*<br />
cd /mnt/storage<br />
tar xvzf *tarball*<br />
</code></p>
<p>Now you have a directory /mnt/storage/usr with all tools permanently installed on your Chumby. In order to use it, please adjust your PATH and LD_LIBRARY_PATH appropriately:<br />
<code><br />
export BASEDIR=/mnt/storage/usr<br />
export PATH=$PATH:$BASEDIR/bin<br />
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$BASEDIR/lib<br />
</code></p>
<p>/me mumbles more automation needed. But not today.</p>
]]></content:encoded>
			<wfw:commentRss>http://gonium.net/md/2010/06/02/ruby-for-chumby-howto/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mom, I&#8217;m on Radio&#8230;</title>
		<link>http://gonium.net/md/2010/03/29/mom-im-on-radio/</link>
		<comments>http://gonium.net/md/2010/03/29/mom-im-on-radio/#comments</comments>
		<pubDate>Mon, 29 Mar 2010 10:02:27 +0000</pubDate>
		<dc:creator>md</dc:creator>
				<category><![CDATA[deutsch]]></category>
		<category><![CDATA[presentation]]></category>
		<category><![CDATA[mysmartgrid]]></category>
		<category><![CDATA[radio]]></category>
		<category><![CDATA[smartgrid]]></category>

		<guid isPermaLink="false">http://gonium.net/md/?p=229</guid>
		<description><![CDATA[
I have been presenting the mySmartGrid project at C-RaDar, the monthly chaos show in Darmstadt. Someone recorded the show (don&#8217;t know who, but thank you!). You can download the MP3 here (german language):
C-RaDar March 2010: mySmartGrid and other stuff
This was a fun experience, kudos go to the C-RaDar people! The picture above: CC-BY-SA-NC by georgia.g, [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://gonium.net/md/wp-content/uploads/2010/03/2326120240_d1815e3966.jpg" alt="" title="2326120240_d1815e3966" width="500" height="375" class="alignnone size-full wp-image-231" /></p>
<p>I have been presenting the mySmartGrid project at C-RaDar, the monthly chaos show in Darmstadt. Someone recorded the show (don&#8217;t know who, but thank you!). You can download the MP3 here (german language):</p>
<p><a href="http://gonium.net/media/c-radar_100311-mySmartGrid.mp3">C-RaDar March 2010: mySmartGrid and other stuff</a></p>
<p>This was a fun experience, kudos go to the C-RaDar people! The picture above: CC-BY-SA-NC by <a href="http://www.flickr.com/photos/22372302@N04/2326120240/">georgia.g</a>, thanks!</p>
]]></content:encoded>
			<wfw:commentRss>http://gonium.net/md/2010/03/29/mom-im-on-radio/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://gonium.net/media/c-radar_100311-mySmartGrid.mp3" length="171214410" type="audio/mpeg" />
		</item>
		<item>
		<title>Power Metering with Flukso</title>
		<link>http://gonium.net/md/2009/11/10/power-metering-with-flukso/</link>
		<comments>http://gonium.net/md/2009/11/10/power-metering-with-flukso/#comments</comments>
		<pubDate>Tue, 10 Nov 2009 16:01:36 +0000</pubDate>
		<dc:creator>md</dc:creator>
				<category><![CDATA[digital]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[grid]]></category>
		<category><![CDATA[flukso]]></category>
		<category><![CDATA[mysmartgrid]]></category>
		<category><![CDATA[smartgrid]]></category>
		<category><![CDATA[smartmeter]]></category>

		<guid isPermaLink="false">http://gonium.net/md/?p=180</guid>
		<description><![CDATA[
All the electric power generated from renewable energy is good &#8211; no additional CO2 is produced. Saving energy in general is also a good idea &#8211; what you don&#8217;t consume, you don&#8217;t need to produce. But energy savings require you to understand your own energy consumption &#8211; you can&#8217;t improve what you can&#8217;t measure. A [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://gonium.net/md/wp-content/uploads/2009/11/3554570745_0e9fd9a7ac.jpg" alt="3554570745_0e9fd9a7ac" title="3554570745_0e9fd9a7ac" width="500" height="331" class="alignnone size-full wp-image-198" /></p>
<p>All the electric power generated from renewable energy is good &#8211; no additional CO2 is produced. Saving energy in general is also a good idea &#8211; what you don&#8217;t consume, you don&#8217;t need to produce. But energy savings require you to understand your own energy consumption &#8211; you can&#8217;t improve what you can&#8217;t measure. A simple energy cost monitor is available for 10 Euro, but it requires you to plug it into different appliances in order to figure out what a specific device consumes. And only the more expensive ones log the power consumption over time, which is pretty interesting.</p>
<p><span id="more-180"></span></p>
<p>An alternative to the simple energy meters are smart meters. In Germany, utility providers need to offer their customers the replacement of old (typically black) meters with shiny new digital &#8220;smart&#8221; meters. Actually, there is nothing smart about them &#8211; they just transmit the energy consumption of the household via powerline or other technologies to the utility provider. The utility provider does not need to visit the household in order to get the reading. And, in some cases, customers can have a look at the realtime energy consumption of their household.</p>
<p>The benefit of the realtime data is that you can assess the impact of your actual energy use very quickly. Google.org is offering the <a href="http://www.google.org/powermeter/">PowerMeter</a>, which works for example with the smart meters offered by <a href="http://www.yellostrom.de/privatkunden/sparzaehler/index.html">Yello Strom</a>. An interesting open-source alternative is the <a href="http://flukso.net">Flukso</a>. </p>
<p>The Flukso is a little WLAN router with some additional circuits to measure your power consumption. You install it in your breaker box. Depending on the configuration of your breaker box you need one or three current clamps. These clamps just go around the cables that supply your household &#8211; it is not necessary to re-cable the breaker box. I have a three-phase supply, so my installation consists of three current clamps and the Flukso itself. <a href="http://www.rowetel.com/blog/?p=135">David Rowe</a> has a nice writeup on the installation.</p>
<p>The Flukso then measures the power and transmits the data over the WLAN to the Flukso website. Once you&#8217;re logged in you can see your own energy consumption as a realtime graph. It is quite fascinating to find out how your energy consumption is composed. Here is one of my charts:</p>
<p><img src="http://gonium.net/md/wp-content/uploads/2009/11/Power-Annotated.png" alt="My power consumption - jetlag clearly visible." title="Power-Annotated" width="600" height="430" class="alignnone size-full wp-image-196" /></p>
<p>The graph shows time on the X-axis and my energy consumption in Watts on the Y-axis. The peak (1) shows that I was getting up in the middle of the night, preparing some tea and switchin on my computer. I had a pretty decent jet lag that night. In the morning I got up again around 8:00 (2). Apparently I used my coffee machine and switched on some lights, but I left shortly afterwards. The regular power consumption (3) originates from my fridge which draws power in regular intervals. Around 18:00, I got home again, switched on lights, prepared tea etc (4).</p>
<p>The graph is very interesting and really helps to improve your energy usage. But it also scares me &#8211; as I demonstrated above, a lot of information is stored in such a graph. Honestly, I don&#8217;t want my utility provider to know this. And I definitely do not want Google to know that much about my life. Or would you like to see advertisements for sleeping pills after a night of jet lag?</p>
<p>The picture at the top is <a href="http://www.flickr.com/photos/22746515@N02/3554570745/">CC-BY BK59 on flickr</a>, thanks!</p>
]]></content:encoded>
			<wfw:commentRss>http://gonium.net/md/2009/11/10/power-metering-with-flukso/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Demand-Side Management: mySmartGrid</title>
		<link>http://gonium.net/md/2009/11/02/demand-side-management-mysmartgrid/</link>
		<comments>http://gonium.net/md/2009/11/02/demand-side-management-mysmartgrid/#comments</comments>
		<pubDate>Mon, 02 Nov 2009 12:57:45 +0000</pubDate>
		<dc:creator>md</dc:creator>
				<category><![CDATA[digital]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[demand-side management]]></category>
		<category><![CDATA[mysmartgrid]]></category>
		<category><![CDATA[powergrid]]></category>
		<category><![CDATA[smartgrid]]></category>

		<guid isPermaLink="false">http://gonium.net/md/?p=177</guid>
		<description><![CDATA[
Green energy is good. Finally, people around the world begin to realize that the climate change is a serious problem for mankind. Driving with a car harms the environment &#8211; more efficient cars (or electric vehicles) are the new SUVs. On the other hand, a lot of energy is consumed in private households. In Germany, [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://gonium.net/md/wp-content/uploads/2009/11/renewable.jpg" alt="Renewable Energy" title="Renewable Energy" width="600" class="alignnone size-full wp-image-182" /></p>
<p>Green energy is good. Finally, people around the world begin to realize that the climate change is a serious problem for mankind. Driving with a car harms the environment &#8211; more efficient cars (or electric vehicles) are the new SUVs. On the other hand, a lot of energy is consumed in private households. In Germany, energy-efficient remodeling is rewarded with cheap credits. Often, solar power is used to heat water and generate electricity. More and more wind parks are built which also draw their energy from the sun, indirectly.</p>
<p>Unfortunately, renewable energy source create problems for the conventional power grids. In a power grid, demand and supply of electricity must match at all times. If a consumer draws power from it, the exact amount of power needs to be fed back into the power grid as fast as possible. There is almost no reservoir for electrical power (except for pump storage hydro power plants, but the capacity is limited). Since renewable energy sources such as solar and wind power cannot be planned additional power capacities need to be in place in order to compensate for the lack of power.</p>
<p><span id="more-177"></span></p>
<p>In the German research project <a href="http://mysmartgrid.de/">&#8220;mySmartGrid&#8221;</a> I am working on another technique to alleviate the erratic nature of these power sources. Instead of adding more production capacity or storage capacity we want to control the demand for power. In addition to the not-enough-power-available problem we currently have another problem: the too-much-power problem. When wind blows over Germany, significant power is generated &#8211; whether it is needed or not. Often, wind parks need to be shut down when too much power is generated. This is clearly not desirable from an ecological point of view. </p>
<p>To put it simply: We have either too much energy available, or not enough. It is rare that we have exactly the right amount of energy at our hands. This situation is shown here:</p>
<p><img src="http://gonium.net/md/wp-content/uploads/2009/11/demandsupply.png" alt="demandsupply" title="demandsupply" width="600" class="alignnone size-full wp-image-185" /></p>
<p>We can influence this only to a certain degree. BUT: We can change the way we consume the energy. For example, think of your fridge: It doesn&#8217;t matter whether it draws power now or five minutes later. The temperature change is inert. Thus, it is easy to move the demand &#8211; not save any power, but shift the demand for electricity by some time. In other words: switch the fridge of when the supply is short. Then, when the supply exceeds the demand, switch the fridge on again &#8211; it will draw more power since the internal temperature was raised. This is what we do:</p>
<p><img src="http://gonium.net/md/wp-content/uploads/2009/11/delaydemand.png" alt="delaydemand" title="delaydemand" width="600" class="alignnone size-full wp-image-186" /></p>
<p>Of course, this is only the simplified version of what we are doing. In reality, we must ensure that food doesn&#8217;t go bad. In addition, controlling a single fridge has almost no impact. But if you aggregate lots of households, the impact can be significant. Heat pumps consume a lot more energy and can be controlled in a similar way. If you can combine lots of households with heat pumps, fridges and freezers, the impact on the demand side is serious.</p>
<p>In the mySmartGrid project we combine up to 1000 households. We intend to control the energy consumption of household appliances as described above. The following picture shows a high-level overview of the architecture: </p>
<p><img src="http://gonium.net/md/wp-content/uploads/2009/11/Arch-Overview.png" alt="Arch-Overview" title="Arch-Overview" width="600" class="alignnone size-full wp-image-187" /></p>
<p>We combine the predicted power supply information for a period with statistical models of the power consumption of our households. This gives us an understanding when too much energy is available. We create schedules that contain information when a household should maximize its energy consumption. The schedules are then distributed to the households. The so-called &#8220;Kundenhub&#8221; is currently an iPod which offers a user interface. Household members can always override the schedule we propose.</p>
<p>The iPod uses various mathematical models to determine how to switch appliances on or off. It executes the strategies locally: there is no direct remote control over household appliances. The commands are sent to connectors close to the appliance which then can control the appliance.</p>
<p>This research project contains a lot of challenges &#8211; but I save this for another post.</p>
]]></content:encoded>
			<wfw:commentRss>http://gonium.net/md/2009/11/02/demand-side-management-mysmartgrid/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
