Presentation checklist

This week I started reading Garr Reynolds’ Presentation Zen, the well-known book on presentation design and guidelines. (I’ve borrowed it from our library after waiting for something like 9 months. There were about 10 reservations before mine, so I guess it must be popular.)

On page 61 there’s a nice list of questions one should always ask oneself before preparing a talk. Drilling through that list is definitely a good idea, and I’m writing it down here for further reference.

  • How much time do I have?
  • What’s the venue like?
  • What time of the day?
  • Who is the audience?
  • What’s their background?
  • What do they expect of me?
  • Why was I asked to speak?
  • What do I want them to do?
  • What visual medium is most appropriate for this particular
    situation and audience?
  • What is the fundamental purpose of my talk?
  • What’s the story here?
  • What is my absolutely central point?

Go through these questions the next time you give a talk and you can’t go wrong.

MATLAB, Java, Spring and dynamic classloading

I have sort of a love-hate relationship with MATLAB, and always had since I read its tutorial in January 2003.

On one hand it’s a proprietary closed-source system, which in my book rules it out for any scientific work. My one and only encounter with a Mathworks sales representative did nothing to help my misgivings. It is virtually impossible to reproduce any scientific work done on the MATLAB platform without a licence—rendering it almost by definition unscientific.

Furthermore, MATLAB as a language is very low-level, and lacks constructs found in most modern languages. Object-orientation is a joke. You can’t loop on anything else than vectors. There are no primitives per se apart from the matrix (a single scalar is a 1×1 matrix—come ooooon).

These gripes aside, MATLAB is remarkably useful in its own domain, namely technical computing. And the more I use Simulink, its embedded simulation tool, the more impressed I am.

A side project of mine involves a Simulink-based physical model of an office room, complete with wall and air temperatures, daylight illuminances, heating elements and power consumptions. But what’s really cool on this project is that we’ve extended the Simulink model with Java code running on the JVM that ships with MATLAB. This code exposes through RMI the heating, lighting and blinds control in the office room to any remote process.

I’ve used this model quite extensively on my PhD thesis, and I’m now trying to make it somewhat more useful to the wider community of building control algorithm designers. To that end I have explored the possibility of basing this Java code on the Spring framework, in particular the parts that require database queries.

Well the proof of concept I wrote worked out just fine, with the following caveats. First, forget about dynamically loading Java classes from MATLAB. Second, FORGET ABOUT DYNAMICALLY LOADING JAVA CLASSES FROM MATLAB. It just doesn’t work beyond baby-style HelloWorldish applications. And it certainly will not work for any code relying heavily on the Class.forName() construct, which is vital for Spring.

I think part of the reason is that it’s not the same classloader that does the dynamical loading and the static one. According to this bug report, if your classes are on the dynamic path then you must use the following signature:

java.lang.Class.forName('com.mycompany.MyClass',true,cloader)

where cloader is the classloader that loads classes from the dynamic path. But who’s going to dive in and change the Spring code for that?

So forget about dynamic classloading in MATLAB. Just edit classpath.txt to point to your jarfiles and everything will be fine. Really. I have packages the Java code using Maven’s jar-with-dependencies predefined assembly descriptor, yielding a single jarfile with all my dependencies, including Spring and the MySQL connector. Just splendid.

We even have a webpage for this project, but be warned that there’s not much there yet. The URL is http://smartbuildings.sf.net/coolcontrol/

Trends in Smart Buildings Meeting, November 2008

We met again on November 3 to discuss recent events in the field of building simulation and automation. This time we were joined by Adil Rasheed, a PhD student at LESO-PB working on the so-called “meso scale modelling of urban heat island effect.” David Daum and Antoine Guillemin were the other participants, besides yours truly.

Antoine had brought a prototype aHeart central unit, the “brains” behind Adhoco’s home automation solution. He described it to the other participants, most of which had never seen it before.

He told us also about some of the newer features, such as the possibility for installers to specify their own custom rules through the web interface. Although difficult to implement, this was actually something that the market demanded specifically and that Adhoco had to offer.

20081103_2412

I had previously mentioned on this blog Marc Fleury’s OpenRemote project and asked the attendees if they had heard about it, but nobody had. Antoine knew about a certain Marc Fleury, working for a swiss company called Ergo3, makers of a home gateway device, but I’m pretty sure it’s not the same person.

David gave us his update on his project and explained a bit more how the IDA simulation engine worked. What I found particularly compelling was the way that IDA would adapt its simulation timesteps depending on the needs. We discussed the possibilities to use IDA for simulating the performance of Java-based controllers such as Adhoco’s, but we are not sure whether IDA can call Java code.

20081103_2413

Speaking of processes talking to each others, we briefly reviewed the canonical four ways that two processes can talk:

  1. Through the exchange of files, whether on the same filesystem or through FTP;
  2. Through a shared database;
  3. Through some form of remote procedure call (RPC), such as RMI in Javaland;
  4. Through a messaging solution, such as JMS.

But this review still didn’t help us understand how C code could call foreign code, such as Java or Python. The reverse is relatively straightforward, see eg this answer on StackOverflow.

20081103_2414

Thanks to everyone who participated, and see you around next time.

Article watch: Journal of Building Physics vol 32 nr 2

The following articles from the last issue of Journal of Building Physics will probably be of interest to building simulationists and automationists.

Accuracy of Energy Analysis of Buildings: A Comparison of a Monthly Energy Balance Method and Simulation Methods in Calculating the Energy Consumption and the Effect of Thermal Mass, by Timo Kalema, Gudni Jóhannesson, Petri Pylsy, and Per Hagengran.

The purpose of this article is to analyze the effects of thermal mass on heating and cooling energy in Nordic climate and for modern, well-insulated Nordic buildings. The effect of thermal mass is analyzed by calculations made by seven researchers and by seven different calculation programs. Six of these programs are simulation programs (Consolis Energy, IDA-ICE, SciaQPro, TASE, VIP, VTT House model) and one monthly energy balance method (maxit energy) based on the standard EN 832, which is the predecessor of ISO DIS 13790. It is purpose to evaluate the reliability of the monthly energy calculation method and especially its gain utilization factor compared with the simulation programs. In addition some sensitivity analysis concerning e.g., the effects of the size and the orientation of windows and the weather data on the energy consumption are made.The results show that the simplified standard methods of EN 832 and of ISO DIS 13790 generally give accurate results in calculating the annual heating energy, e.g., in the context of energy design and energy certification. However, the gain utilization factor of these standards is too low for very light buildings having no massive surfaces resulting in a too high energy consumption. The study shows, that the differences in input data cause often greater differences in calculation results than the differences between various calculation and simulation methods.

Article watch: Energy and Buildings vol 40 nr 12

The following articles from the last issue of Energy and Buildings are probably of interest to building simulationists and automationists.

Comparison between detailed model simulation and artificial neural network for forecasting building energy consumption, by Alberto Hernandez Neto and Flávio Augusto Sanzovo Fiorelli.

There are several ways to attempt to model a building and its heat gains from external sources as well as internal ones in order to evaluate a proper operation, audit retrofit actions, and forecast energy consumption. Different techniques, varying from simple regression to models that are based on physical principles, can be used for simulation. A frequent hypothesis for all these models is that the input variables should be based on realistic data when they are available, otherwise the evaluation of energy consumption might be highly under or over estimated.

In this paper, a comparison is made between a simple model based on artificial neural network (ANN) and a model that is based on physical principles (EnergyPlus) as an auditing and predicting tool in order to forecast building energy consumption. The Administration Building of the University of São Paulo is used as a case study. The building energy consumption profiles are collected as well as the campus meteorological data.

Results show that both models are suitable for energy consumption forecast. Additionally, a parametric analysis is carried out for the considered building on EnergyPlus in order to evaluate the influence of several parameters such as the building profile occupation and weather data on such forecasting.

Comparison of thermal comfort algorithms in naturally ventilated office buildings, by Bassam Moujalled, Richard Cantina, and Gérard Guarracino.

With the actual environmental issues of energy savings in buildings, there are more efforts to prevent any increase in energy use associated with installing air-conditioning systems. The actual standard of thermal comfort in buildings ISO 7730 is based on static model that is acceptable in air-conditioned buildings, but unreliable for the case of naturally ventilated buildings. The different field studies have shown that occupants of naturally ventilated buildings accept and prefer a significantly wider range of temperatures compared to occupants of air-conditioned buildings. The results of these field studies have contributed to develop the adaptive approach. Adaptive comfort algorithms have been integrated in EN15251 and ASHRAE standards to take into account the adaptive approach in naturally ventilated buildings. These adaptive algorithms seem to be more efficient for naturally ventilated buildings, but need to be assessed in field studies. This paper evaluates different algorithms from both static and adaptive approach in naturally ventilated buildings across a field survey that has been conducted in France in five naturally ventilated office buildings. The paper presents the methodology guidelines, and the thermal comfort algorithms considered. The results of application of different algorithms are provided with a comparative analysis to assess the applied algorithms.

Dynamical building simulation: A low order model for thermal bridges losses, by Y. Gaoa, J.J. Rouxb, L.H. Zhaoc and Y. Jiang.

Thermal bridges losses represent an increasing part of heat losses owing to significant three-dimensional heat transfer characteristics in modern buildings, but one-dimensional models are used in most simulation software for thermal analyses to simplify the calculations.

State model reduction techniques were used to develop low-order three-dimensional heat transfer model for additional losses of thermal bridges, which is efficient and accuracy. Coupling this technique with traditional one-dimensional model for walls losses, it is possible to reduce a large amount of time simulations.

Low-order model was validated from frequency response and time-domain output. And the effect of this model was shown with its implementation in software “TRNSYS”.