Showing posts with label Computer-aided design. Show all posts
Showing posts with label Computer-aided design. Show all posts

Sunday, July 1, 2018

Artificial Intelligence Research: The Octopus Algorithm for Generating Goal-Directed Feedback

During the 2010 FIFA World Cup eight years ago, a common octopus named Paul the Octopus gained worldwide attention because it accurately "predicted" all the results of the most important soccer matches in the world (sadly it died by natural courses shortly after that). Perhaps Paul the Octopus just got extraordinarily lucky. Eight years later, as reported by the MIT Technology Review, artificial intelligence has been used in its stead to predict the World Cup (which I doubt would achieve the 100% success rate as the famous octopus did marvelously).

Fig. 1: An illustration of the Octopus Algorithm
While my research on artificial intelligence (AI) has nothing to do with predicting which team would win the World Cup this year, octopuses have become one of my inspirations in the past few days. My work is about developing AI techniques that support learning and teaching through solving vastly open-ended problems such as scientific inquiry and engineering design. One of the greatest challenges in such problem-solving tasks is about how to automatically generate formative feedback based on automatically assessing student work. Typically, the purpose of this kind of feedback is to gradually direct students to some kind of goals, for example, to achieve the most energy-efficient design of a building that meets all the specs. Formative feedback is critically important to ensuring the success of project-based learning. Based on my own experiences, however, many students have great difficulties making progress towards the goal in the short amount of time typically available in the classroom. Given the time constraints, they need help on an ongoing basis. But it is not realistic to expect the teacher to simultaneously monitor a few dozen students while they are working on their projects and provide timely feedback to each and every one of them. This is where AI can help. This is why we are developing new pedagogical principles and instructional strategies, hoping to harness the power of AI to spur students to think more deeply, explore more widely, and even design more creatively.

Fig. 2: Learning from AI through a competition-based strategy
Although this general idea of using AI in education makes sense, developing reliable algorithms that can automatically guide students to solve massively open-ended problems such as engineering design is by no means a small job. Through three months of intense work in this field, I have developed genetic algorithms that can be used to find optimal solutions in complex design environments such as the Energy3D CAD software, which you can find in earlier articles published through my blog. These algorithms were proven to be effective for optimizing certain engineering problems, but to call them AI, we will need to identify what kind of human intelligence they are able to augment or replace. In my current point of view, an apparent class of AI applications is about mimicking certain instructional capacities of peers and teachers. In order to create an artificial peer or even an artificial instructor, we would have to figure out the algorithms that simulate the constructive interactions between a student and a peer or between a student and an instructor.

Hence, an optimization algorithm that yields the best solution in a long single run is not very useful to developers and educators as it doesn't provide sufficient opportunities for engaging students. You can imagine that type of algorithm as someone who does something very fast but doesn't pause to explain to the learner how he or she does the job. To create a developmentally appropriate tool, we will need to slow down the process a bit -- sort of like the creeping of an octopus -- so that the learner can have a chance to observe, reflect, internalize, and catch up when AI is solving the problem step by step. This kind of algorithm is known as local search, a technique for finding an optimal solution in the vicinity of a starting point that represents the learner's current state (as opposed to global search that casts a wide net across the entire solution space, representing equally all possibilities regardless of the learner's current state). Random optimization is one of the local search methods proposed in 1965, which stochastically generates a set of candidate solutions distributed around the initial solution in accordance with the normal distribution. The graphical representation of a normal distribution is a bell curve that somewhat resembles the shape of an octopus (Figure 1). When using a genetic algorithm to implement the local search, the two red edge areas in Figure 1 can be imagined as the "tentacles" for the "octopus" to sense "food" (optima), while the green bulk area in the middle can be imagined as the "body" for it to "digest the catches" (i.e., to concentrate on local search). Once an optimum is "felt" (i.e., one or more solution points close to the optimum is included in the randomly generated population of the genetic algorithm), the "octopus" will move towards it (i.e., the best solution from the population will converge to the optimum) as driven by the genetic algorithm. The length of the "tentacles," characterized by the standard deviation of the normal distribution, dictates the pace in which the algorithm will find an optimum. The smaller the standard deviation, the slower the algorithm will locate an optimum. I call this particular combination of random optimization and genetic algorithm the Octopus Algorithm as it intuitively mimics how an octopus hunts on the sea floor (and, in part, to honor Paul the Octopus and to celebrate the 2018 World Cup Tournament). With a controlled drift speed, the Octopus Algorithm can be applied to incrementally correct the learner's work in a way that goes back and forth between human and computer, making it possible for us to devise a competition-based learning strategy as illustrated in Figure 2.

Although there are still a lot of technical details that need to be ironed out as we make progress, this competition-based strategy essentially represents an idea to turn a design process into some kind of adversarial gaming (e.g., chess or Go), which challenges students to race against a computer towards an agreed goal but with an unpredictable outcome (either the computer wins or the human wins). It is our hope that AI would ultimately serve as a tool to train students to design effectively just like what it has already done for training chess or Go players.

Fig. 3: Evolution of population in the Octopus Algorithm
How does the Octopus Algorithm work, I hear you are curious? I have tested it with some simple test functions such as certain sinusoidal functions (e.g., |sin(nx)|) and found that it worked for those test cases. But since I have the Energy3D platform, I can readily test my algorithms with real-world problems instead of some toy problems. As the first real-world example, let's check how it finds the optimal tilt angle of a single row of solar panels for a selected day at a given location (we can do it for the entire year, but it takes much longer to run the simulation with not much more to add in terms of testing the algorithm). Let's assume that the initial guess for the tilt angle is zero degree (if you have no idea which way and how much the solar panels should be tilted, you may just lay them flat as a reasonable starting point). Figure 3 shows the results of four consecutive runs. The graphs in the left column show the normal distributions around the initial guess and the best emerged after each round (which was used as the initial guess for the next round). The graphs in the right column show the final distribution of the population at the end of each round. The first and second runs show that the "octopus" gradually drifted left. At the end of the third run, it had converged to the final solution. It just stayed there at the end of the fourth run.

Fig. 4: Using four "octopuses" to locate four optimal orientations for the energy efficiency of a house.

Fig. 5: Locating the nearest optimum
When there are multiple optima in the solution space (a problem known as multimodal optimization), it may be appropriate to expect that AI would guide students to the nearest optimum. This may also be a recommendation by learning theories such as the Zone of Proximal Development introduced by Russian psychologist Lev Vygotsky. If a student is working in a certain area of the design space, guiding him or her to find the best option within that niche seems to be the most sensible instructional strategy. With a conventional genetic algorithm that performs global search with uniform initial selection across the solution space, there is simply no guarantee that the suggested solution would take the student's current solution into consideration, even though his/her current solution can be included as part of the first generation (which, by the way, may be quickly discarded if the solution turns out to be a bad one). The Octopus Algorithm, on the other hand, respects the student's current state and tries to walk him/her through the process stepwisely. In theory, it is a better technique to support advanced personalized learning, which is the number one in the 14 grand challenges for engineering in the 21st century posed by the National Academy of Engineering of the United States.

Let's see how the Octopus Algorithm finds multiple optima. Again, I have tested the algorithm with simple sinusoidal functions and found that it worked in those test cases. But I want to use a real-world example from Energy3D to illustrate my points. This example is concerned with determining the optimal orientation of a house, given that everything else has been fixed. By manual search, I found that there are basically four different orientations that could result in comparable energy efficiency, as shown in Figure 4.

Fig. 6: "A fat octopus" vs. "a slim octopus."
Now let's pick four different initial guesses and see which optimum each "octopus" finds. Figure 5 shows the results. The graphs in the left column show the normal distributions around the four initial guesses. The graphs in the right column show the final solutions to which the Octopus Algorithm converged. In this test case, the algorithm succeeded in ensuring nearest guidance within the zone of proximal development. Why is this important? Imagine if the student is experimenting with a southwest orientation but hasn't quite figured out the optimal angle. An algorithm that suggests that he or she should abandon the current line of thinking and consider another orientation (say, southeast) could misguide the student and is unacceptable. Once the student arrives at an optimal solution nearby, it may be desirable to prompt him/her to explore alternative solutions by choosing a different area to focus and repeat this process as needed. The ability for the algorithm to detect the three other optimal solutions simultaneously, known as multi-niche optimization, may not be essential.

Fig. 7. A "fatter octopus" may be problematic.
There is a practical problem, though. When we generate the normal distribution of solution points around the initial guess, we have to specify the standard deviation that represents the reach of the "tentacles" (Figure 6). As illustrated by Figure 7, the larger the standard deviation ("a fatter octopus"), the more likely the algorithm will find more than one optima and may lose the nearest one as a result. In most cases, finding a solution that is close enough may be good enough in terms of guidance. But if this weakness becomes an issue, we can always reduce the standard deviation to search the neighborhood more carefully. The downside is that it will slow down the optimization process, though.

In summary, the Octopus Algorithm that I have invented seems to be able to accurately guide a designer to the nearest optimal solution in an engineering design process. Unlike Paul the Octopus that relied on supernatural forces (or did it?), the Octopus Algorithm is an AI technique that we create, control, and leverage. On a separate note, since some genetic algorithms also employ tournament selection like the World Cup, perhaps Paul the Octopus was thinking like a genetic algorithm (joke)? For the computer scientists who happen to be reading this article, it may also add a new method for multi-niche optimization besides fitness sharing and probabilistic crowding.

Thursday, June 28, 2018

Computer Applications in Engineering Education Published Our Paper on CAD Research

Fig. 1: Integrated design and simulation in Energy3D
In workplaces, engineering design is supported by contemporary computer-aided design (CAD) tools capable of virtual prototyping — a full-cycle process to explore the structure, function, and cost of a complete product on the computer using modeling and simulation techniques before it is actually built. In classrooms, such software tools allow students to take on a design task without regard to the expense, hazard, and scale of the challenge. Whether it is a test that takes too long to run, a process that happens too fast to follow, a structure that no classroom can fit, or a field that no naked eye can see, students can always design a computer model to simulate, explore, and imagine how it may work in the real world. Modeling and simulation can thereby push the envelope of engineering education to cover much broader fields and engage many more students, especially for underserved communities that are not privileged to have access to expensive hardware in advanced engineering laboratories. CAD tools that are equipped with such modeling and simulation capabilities provide viable platforms for teaching and learning engineering design, because a significant part of design thinking is abstract and generic, can be learned through designing computer models that work in cyberspace, and is transferable to real-world situations.

Some researchers, however, cautioned that using CAD tools in engineering practices and education could result in negative side effects, such as circumscribed thinking, premature fixation, and bounded ideation, which undermine design creativity and erode existing culture. To put the issues in a perspective, these downsides probably exist in any type of tools — computer-based or not — to various extents, as all tools inevitably have their own strengths and weaknesses. As a matter of fact, the development history of CAD tools can be viewed as a progress of breaking through their own limitations and engendering new possibilities that could not have been achieved before. To do justice to the innovative community of CAD developers and researchers at large, we believe it is time to revisit these issues and investigate how modern CAD tools can address previously identified weaknesses. This was the reason that motivated us to publish a paper in Computer Applications in Engineering Education to expound our points of view and supporting them with research findings.

Fig. 2: Sample student work presented in the paper
The view that CAD is “great for execution, not for learning” might be true for the kind of CAD tools that were developed primarily for creating 2D/3D computer drawings for manufacturing or construction. That view, however, largely overlooks three advancements of CAD technologies:

1) System integration that facilitates formative feedback: Based on fundamental principles in science, the modeling and simulation capabilities seamlessly integrated within CAD tools can be used to analyze the function of a structure being designed and evaluate the quality of a design choice within a single piece of software (Figure 1). This differs dramatically from the conventional workflow through complicated tool chaining of solid modeling tools, pre-processors, solvers, and post-processors that requires users to master quite a variety of tools for performing different tasks or tackling different problems in order to design a virtual prototype successfully. Although the needs for many tools and even collaborators with different specialties can be addressed in the workplace using sophisticated methodologies such as 4D CAD that incorporate time or schedule-related information into a design process, it is hardly possible to orchestrate such complex operations in schools. In education, cumbersome tool switching ought to be eliminated — whenever and wherever possible and appropriate — to simplify the design process, reduce cognitive load, and shorten the time for getting formative feedback about a design idea. Being able to get rapid feedback about an idea enables students to learn about the meaning of a design parameter and its connections to others quickly by making frequent inquiries about it within the software. The accelerated feedback loop can spur iterative cycles at all levels of engineering design, which are fundamental to design ideation, exploration, and optimization. We have reported strong classroom evidence that this kind of integrated design environment can narrow the so-called “design-science gap,” empowering students to learn science through design and, in turn, apply science to design. 
2) Machine learning that generates designer information: For engineering education research, a major advantage of moving a design project to a CAD platform is that fine-grained process data (e.g., actions and artifacts), can be logged continuously and sorted automatically behind the scenes while students are trying to solve design challenges. This data mining technique can be used to monitor, characterize, or predict an individual student’s behavior and performance and even collaborative behavior in a team. The mined results can then be used to compile adaptive feedback to students, create infographic dashboards for teachers, or develop intelligent agents to assist design. The development of this kind of intelligence for a piece of CAD software to “get to know the user” is not only increasingly feasible, but also increasingly necessary if the software is to become future-proof. It is clear that deep learning from big data is largely responsible for many exciting recent advancements in science and technology and has continued to draw extensive research interest. Science ran a special issue on artificial intelligence (AI) in July 2015 and, only two years later, the magazine found itself in the position of having to catch up with another special issue. For the engineering discipline, CAD tools represent a possible means to gather user data of comparable magnitudes for developing AI of similar significance. In an earlier paper, we have explained why the process data logged by CAD software possess all the 4V characteristic features — volume, velocity, variety, and veracity — of big data as defined by IBM. 
3) Computational design that mitigates design fixation: In trying to solve a new problem, people tend to resort to their existing knowledge and experiences. While prior knowledge and experiences are important to learning according to theories such as constructivism and knowledge integration, they could also blind designers to new possibilities, a phenomenon known as design fixation. In the context of engineering education, design fixation can be caused by the perception or preconception of design subjects, the examples given to illustrate design principles, and students’ own previous designs. As it may adversely affect engineering learning to a similar degree as “cookbook labs” underrepresent science learning, design fixation may pose a central challenge to engineering education (though it has not been thoroughly evaluated among young learners in secondary schools). Emerging computational design capabilities of innovative CAD tools based on algorithmic generation and parametric modeling can suggest design permutations and variations interactively and evolutionarily, equivalent to teaming students up with virtual teammates capable of helping them explore new territories in the solution space.

To read more about this paper, click here to go to the publisher's website.

Monday, February 19, 2018

Virtual Solar Grid adds Crescent Dunes Solar Tower

The Crescent Dues Solar Tower as modeled in Energy3D
A light field visualization in Energy3D
A top view
The Crescent Dunes Solar Power Tower is a 110 MW utility-scale concentrated solar power (CSP) plant with 1.1 GWh of molten salt energy storage, located about 190 miles northwest of Las Vegas in the United States (watch a video about it). The plant includes a whopping number of 10,347 large heliostats that collect and focus sunlight onto a central receiver at the top of a 195-meter tall tower to heat 32,000 tons of molten salt. The molten salt circulates from the tower to some storage tanks, where it is then used to produce steam and generate electricity. Excess thermal energy is stored in the molten salt and can be used to generate power for up to ten hours, providing electricity in the evening or during cloudy hours. Unlike other CSP plants, Crescent Dunes' advanced storage technology eliminates the need for any backup fossil fuels to melt the salt and jumpstart the plant in the morning. Each heliostat is made up of 35 6×6 feet (1.8 m) mirror facets, adding up to a total aperture of 115.7 square meters. The total solar field aperture sums to an area of 1,196,778 square meters, or more than one square kilometer, in a land area of 1,670 acres (6.8 square kilometers). That is, the plant is capable of potentially collecting one seventh of all the solar energy that shines onto the field. Costing about $1 billion to construct, it was commissioned in September 2015.

A close-up view of accurate modeling of heliostat tracking
Since its inception in January 2018, our Virtual Solar Grid has included the Energy3D models of nearly all the existing large CSP power plants in the world. That covers more than 80 large CSP plants capable of generating more than 11 TWh per year. The ultimate goal of the Virtual Solar Grid is to mirror every solar energy system in the world in the computing cloud through crowdsourcing involving a large number of students interested in engineering, creating an unprecedentedly detailed computational model for learning how to design a reliable and resilient power grid based completely on renewable energy (solar energy in this phase). The modeling of the Crescent Dunes plant has put our Energy3D software to a stress test. Can it handle such a complex project with so many heliostats in such a large field?
A side view

Near the base of the tower
Over the shoulder of the tower
The solar field
This became my President's Day project. To make this happen, I had to first increase the resolution of Google Maps images supported in Energy3D. A free developer account of Google Maps can only get images of 640 × 640 pixels. When you are looking at an area that is as big as a few square kilometers, that resolution gets you very blurry images. To fetch high-resolution images from Google without paying them, I had to basically make Energy3D download many more images and then knit them together to create a large image that forms an Earth canvas in Energy3D (hence you see a lot of Google logos and copyrights in the ground image that I could not get rid of from each patch). Once I had the Earth canvas, I then drew heliostats on top of it (that is, one by one for more than 10,000 times!) and compared their orientations and shadows rendered by Energy3D with those shown in the Google Maps images. Now, the problem is that Google doesn't tell you when the satellite image was taken. But based on the shadows of the tower and other structures, I could easily figure out an approximate time and date. I then set that time and date in Energy3D and confirmed that the shadow of the tower in the Energy3D model overlaps with that in the satellite image. After this calibration, every single virtual heliostat that I copied and pasted then automatically aligned with those in the satellite image (as long as the original copy specifies the tower that it points to), visually testifying that the tracking algorithm for the virtual heliostats in Energy3D is just as good as the one used by the computers that control the motions of the real-world heliostats. Matching the computer model with the satellite image is essential as the procedure ensures the accuracy of our numerical simulation.

The solar field
After making numerous other improvements for Energy3D, the latest version (V7.8.4) was finally capable of modeling this colossal power plant. This includes the capability of being able to divide the whole project into nine smaller projects and then allow Energy3D to stitch the smaller 3D models together to create the full model using the Import Tool. This divide-and-conquer method makes the user interface a lot faster as neither you nor Energy3D need to deal with 9,000 existing heliostats while you are adding the last 1,000. The predicted annual output of the plant by Energy3D is 462 GWh, as opposed to the official projection of 500 GWh, assuming 90% of mirror reflectance and 25% of thermal-to-electric conversion.

One thing I had to do, though, was to double the memory requirement for the software from the default 256 MB to 512 MB for the Windows version (the Mac version is fine), which would make the software fail on really old computers that have only 256 MB of total memory (but I don't think such old computers would still work properly today anyways). The implication of this change is that, if you are a Windows user and have installed Energy3D before, you will need to re-install it using the latest installer from our website in order to take advantage of this update. If you are not sure, there is a way to know how much memory your Energy3D is allocated by checking the System Information and Preferences under the File Menu. If that number is about 250 MB, then you have to re-install the software -- if you really want to see the spectacular Crescent Dunes model in Energy3D without crashing it.

With basically only the three Ivanpah Solar Towers left to be modeled and uploaded, the Virtual Solar Grid has nearly incorporated all the operational solar thermal power plants in the world. We will continue to add new CSP plants as they come online and show up in Google Maps. In our next phase, we will move to add more photovoltaic (PV) solar power plants to the Virtual Solar Grid. At this point, the proportion of the modeled capacity from PV stands at only 8% in the Virtual Solar Grid, compared with 92% from CSP. Adding PV power plants will really require crowdsourcing as there are many more PV projects in the world -- there are potentially millions of small rooftop systems in existence. On a separate avenue, the National Renewable Energy Laboratory (NREL) has estimated that, if we add solar panels to every square feet of usable roof area in the U.S., we could meet 40% of our total electricity need. Is their statement realistic? Perhaps only time can tell, but by adding more and more virtual solar power systems to the Virtual Solar Grid, we might be able to tell sooner.

Monday, January 29, 2018

Virtual Solar Grid comes online

Fig. 1: Modeled output of the Virtual Solar Grid
Fig. 2: A residential rooftop PV system.
If you care about finding renewable energy solutions to environmental problems, you probably would like to join an international community of Energy3D users to model existing or design new solar power systems in the real world and contribute them to the Virtual Solar Grid — a hypothetical power grid that I am developing from scratch to model and simulate interconnected solar energy systems and storage. My ultimate goal is to crowdsource an unprecedented fine-grained, time-dependent, and multi-scale computational model for anyone, believer or skeptic of renewables, to study how much of humanity's energy need can be met by solar power generation on the global scale — independent of any authority and in the spirit of citizen science. I have blogged about this ambitious plan before and I am finally pleased to announce that an alpha version of the Virtual Solar Grid has come online, of course, with a very humble beginning.

Fig. 3: The Micky Mouse solar farm in Orlando, FL.
Fig. 4: NOOR-1 parabolic troughs in Morocco.
As of the end of January, 2018, the Virtual Solar Grid has included 3D models of only a bit more than 100 solar energy systems, ranging from small rooftop photovoltaic solar panel arrays (10 kW) to large utility-scale concentrated solar power plants (100 MW) in multiple continents. At present, the Virtual Solar Grid has a lot of small systems in Massachusetts because we are working with many schools in the state.

With this initial capacity, the Virtual Solar Grid is capable of generating roughly 4 TWh per year, approximately 0.02% of all the electricity consumed by the entire world population in 2016 (a little more than 2 PWh). Although 0.02% is too minuscule to count, it nonetheless marks the starting point of our journey towards an important goal of engaging and supporting anyone to explore the solar energy potential of our planet with serious engineering design. In a sense, you can think of this work as inventing a "Power Minecraft" that would entice people to participate in a virtual quest for switching humanity's power supply to 100% renewable energy.

Fig. 5: Khi Solar One solar power tower in South Africa.
Fig. 6: PS 10 and PS 20 in Spain.
The critical infrastructure underlying the Virtual Solar Grid is our free, versatile Energy3D software that allows anyone from a middle school student to a graduate school student to model or design any photovoltaic or concentrated solar power systems, down to the exact location and specs of individual solar panels or heliostats. Performance analysis of solar power systems in Energy3D is based on a growing database of solar panel brand models and weather data sets for nearly 700 regions in every habitable continent. To construct a grid, micro or global, an Energy3D model can be geotagged — the geolocation is automatically set when you import a Google Maps image into an Energy3D model. Such a virtual model, when uploaded to the Virtual Solar Grid, will be deployed to a Google Maps application that shows exactly where it is in the world and how much electricity it produces at a given hour on a given day under average weather conditions. This information will be used to investigate how solar power and other renewables, with thermal and electric storage, can be used to provide base loads and meet peak demands for a power grid of an arbitrary size, so to speak.

Finally, it is important to note that the Virtual Solar Grid project is generously funded by the U.S. National Science Foundation through grant number #1721054. Their continuous support of my work is deeply appreciated.

Friday, November 24, 2017

Energy3D uses intelligent agents to create adaptive feedback based on analyzing the "DNA of design"

Fig. 1: A simple case of teaching thermal insulation.
Energy3D is a "smart" CAD tool because it can monitor the designer's behavior in real time, based on which it can generate feedback to the designer to regulate the design behavior. This capacity has tremendous implications to learning and teaching scientific inquiry and engineering design with open-ended nature that requires, ideally, one-to-one tutoring so intense that no teacher can easily provide in real classrooms.

The computational mechanism for generating feedback in Energy3D is based on intelligent agents, which consist of sensors and actuators (in very generic terms). In Energy3D, all the events are logged behind the scenes. The events provide the raw data stream from which various sensors produce signals based on subsets of the raw data. For instance, a sensor can be created to monitor any event related to solar panels of a house. An agent then uses a decision tree model to determine which actuators should be called to provide feedback to the user or direct Energy3D to change its state. For instance, if a solar panel is detected to be placed on the north-facing roof, the agent can remind the designer to rethink about the decision. Just like what a teacher may do, the agent can even suggest a comparative analysis between a solar panel on the north-facing roof and a solar panel on the south-facing or west-facing roof. Although this type of inquiry and design can be also taught using directly scaffolded instruction that guides students to explore step by step, in practice we have found the effect of this approach often diminishes because many students do not read instruction carefully enough and remember them long enough. It is also challenging for teachers to guide the whole class through this kind of long learning process as students often pace differently. Adaptive feedback provides a way to help students only when they need or just when a need is detected, thus providing a better chance to deliver effective instruction.

Let's look at a very simple example. Figure 1 shows a learning activity, the goal of which is to teach how the thermal property of a wall, called the U-value, affects the energy use of a house. Many students may walk away with a shallow understanding that the higher the U-value is, the more energy a house uses. The challenge is to help them deepen their understanding. For example, how can we make sure that students will collect enough data points to discover that the energy a house uses is proportional to the U-value? How can we support them to find out that the relationship is independent of seasonal change, wall orientation, and solar radiation (e.g., a lower U-value is good in both summer and winter, irrespective of whether or not the wall faces the sun). Helping students accomplish this level of understanding through inquiry-based activities is by no means a trivial task, even in this seemingly simple example. Let's explore what we may do in Energy3D now that we have a way to monitor students' interactions with it.

Fig. 2: An event sequence coded like a DNA sequence.
In nearly all software that support learning and teaching, the events during a process can be coded as a string with characters representing the events and ordered by their timestamps, such as Figure 2. In this case, A represents an analysis event in the Energy3D CAD tool, U represents an event of changing the U-value of a wall, C represents an event of changing the date for the energy simulation, a questionmark (?) represents an event of requesting help from the software, an underscore (_) represents an inactive time period longer than a certain threshold, and * is a wildcard that represents any other event "silenced" in this expression in order to reduce the dimensionality of the problem. For those who know a bit about bioinformatics, this resembles a DNA sequence. In the context of Energy3D, we may also call it as the DNA of a design, if that helps your imagination.

Now that we have converted the sequence of events into a string, we can use all sorts of techniques that have been developed to analyze strings to analyze these events, including those developed in bioinformatics such as sequence alignment or those developed in natural language processing. In this article, I am going to show how the widely-supported regular expressions (regex) can be used as a technique to detect whether a certain type of event or a certain combination of events occurred or how many times it occurred. I feel that regex, in our case, may be more accurate than edit distances such as the Levenshtein distance in matching the pattern. For example, a single substitution of event may represent a very different process despite the short edit distance.

Fig. 3: A sequence that shows high usage of feedback
We know that, a fundamental skill of inquiry is to keep everything else fixed but change only one variable at a time and then test how the system's output depends on that variable. Through this process of inquiry, we learn the meaning of that variable, as explained by Bruce Alberts, former president of the National Academy of Sciences and former Editor-in-Chief of the Science Magazine. In the example discussed here, that variable is the U-value of a selected wall of the house and the test is the simulation-based analysis. A pattern that has alternating U and A characters in the event string suggests a high probability of inquiry, which can be captured using a simple regex such as (U[_\\*\\?]*A)+. Between U and A, however, there may be other types of events that may or may not exist to weaken the probability or compromise the rigor. For example, changing the color of the wall between U and A may also result in an additional difference in energy use of the house that originates from the absorption of solar radiation by the external surface of the wall and has nothing to do with its U-value. In this case, changing multiple variables at a time appears to be a violation of the aforementioned inquiry principle that should be called out by the agent using another regex to analyze the substring between U and A.

An interesting feature in Energy3D is that feedback itself is also logged. Figure 3 shows a sequence that has an alternation pattern similar to that of Figure 2, but it records a type of behavior showing that the user may rely overly on feedback from the system to learn (the questionmarks in the string stand for feedback requests made by the user) and avoid deep thinking on their own. This may be a common problem in many intelligent tutors (sometimes this behavior is called "gaming the system").

The development of data mining and intelligent agents in Energy3D is opening interesting opportunities of research that will only grow more important in the era of artificial intelligence (AI). We are excited to be part of this wave of AI innovation.

Tuesday, November 21, 2017

General Motors funds engineering education based on Energy3D

Designing a parking lot solar canopy at Detroit Airport
General Motors (GM), along with other RE100 companies, has committed to powering its worldwide factories and offices with 100% renewable energy by 2050. Last month, the company furthered its commitment by giving the Engineering Computation Team at the Concord Consortium a $200,000 grant to promote engineering education using renewable energy as a learning context and artificial intelligence as a teaching assistant.

Modeling GM's rooftop solar arrays in Baltimore, MD
Modeling GM's solar arrays in Warren, MI
The project will use our signature Energy3D software, which is a one-stop-shop CAD tool for designing and simulating all kinds of solar power systems including photovoltaic (PV) and concentrated solar power (CSP), both of which have reached a very competitive cost of merely 5¢ per kWh or below in the world market. A unique feature of Energy3D is its ability to collect and analyze "atomically" fine-grained process data while users are designing with it. This capability makes it possible for us to develop machine learning algorithms to understand users' design behaviors, based on which we can develop intelligent agents to help users design better products and even unleash their creativity.

The generous grant from GM will allow us to bring this incredible engineering learning tool and the curriculum materials it supports to more science teachers across New England. It will also help extend our fruitful collaboration with the Virtual High School (VHS) to convert our Solarize Your World curriculum into an online course for sustainable engineering. VHS currently offers more than 200 titles to over 600 member schools. Through their large network, we hope to inspire and support more students and teachers to join the crucial mission that GM and other RE100 companies are already undertaking.

By supporting today's students to learn critical engineering design skills needed to meet the energy and environmental challenges, GM is setting an example of preparing tomorrow's workforce to realize its renewable energy vision.

Monday, November 20, 2017

High Frequency Electronics and Thermtest feature Energy2D

Credit: High Frequency Electronics
High Frequency Electronics is a magazine for engineers. In the cover article titled "Substrate Selection Can Simplify Thermal Management" in its November 2017 issue, author John Ranieri included our Energy2D software as one of the modeling tools recommended to the reader, alongside with mainstream commercial products from industry leaders such as Mentor Graphics and ANSYS. The software is also featured by Thermtest, a UK-based company that focuses on thermophysical instruments. Thermtest supplements the software with a database of standard materials, making it easier for engineers to use.

An Energy2D model of a heat source and a heat sink
According to the article, "heat haunts many RF/microwave and power electronics circuits and can limit performance and reliability. The heat generated by a circuit is a function of many factors, including input power, active device efficiencies, and losses through passive devices and transmission lines. It is often not practical to disperse heat from a circuit by convection fan-driven cooling, and heat must be removed from sensitive components and devices, by creating a thermal path to a metal enclosure or heat sink with good thermal conductivity." As a thermal simulation tool, Energy2D can certainly be very useful in helping engineers conceptualize and design such thermal paths.

More importantly, Energy2D can make your engineering experience as fun as playing a sandbox game! As one of our users recently wrote, "I am working as consulting engineer and we often have to make quick estimations where a steady-state node model is too simplified and setting up a complex FEM model is overkill. Energy2D is a very handy tool for something [like] that and I like the click'n'play sandbox feeling in combination with the physical correctness. I never thought FEM could be that fun."

Saturday, November 4, 2017

Energy3D allows users to select brand name solar panels

Fig. 1: 20 brand name solar panels in Energy3D
Fig. 2: The daily outputs of 20 types of solar panels
Previous versions of Energy3D were based on a generic model of solar panel, which users can set its properties such as solar cell type, peak efficiency, panel dimension, color, nominal operating cell temperature, temperature coefficient of power, and so on. While it is essential for users to be able to adjust these parameters and learn what they represent and how they affect the output, it is sometimes inconvenient for a designer to manually set the properties of a solar panel to those of a brand name.

Fig. 3: The Micky Mouse solar farm
From Version 7.4.4, I started to add support of brand name solar panels to Energy3D. Twenty brand names were initially added to this version (Figure 1). These models are: ASP-400M (Advanced Solar Photonics), CS6X-330M-FG (Canadian Solar), CS6X-330P-FG (Canadian Solar), FS-4122-3 (First Solar), HiS-M280MI (Hyundai), HiS-S360RI (Hyundai), JAM6(K)-60-300/PR (JA Solar), JKM300M-60 (Jinko), LG300N1C-B3 (LG), LG350Q1K-A5 (LG), PV-UJ235GA6 (Mitsubishi), Q.PRO-G4 265 (Q-cells), SPR-E20-435-COM (SunPower), SPR-P17-350-COM (SunPower), SPR-X21-335-BLK (SunPower), SPR-X21-345 (SunPower), TSM-325PEG14(II) (Trina Solar), TSM-365DD14A(II) (Trina Solar), VBHN330SA16 (Panasonic), and YL305P-35b (Yingli). Figure 2 shows a comparison of their daily outputs in Boston on June 22 when they are laid flat (i.e., with zero tilt angle). Not surprisingly, a smaller solar panel with a lower cell efficiency produces less electricity.

Note that these models are relatively new. There are hundreds of older and other types of solar panels that will take a long time to add. If your type is not currently supported, you can always fall back to defining it using the "Custom" option, which is the default model for a solar panel.

Adding these brand names helped me figure out that the solar panels deployed in the Micky Mouse Solar Farm in Orlando (Figure 3) are probably from First Solar -- only they make solar panels of such a relatively small size (1200 mm × 600 mm).

Tuesday, September 26, 2017

The challenge to solarize the world

More and more nations and regions in the world are planning to switch their power supplies to 100% renewable resources by midcentury. There has been, however, a well-publicized debate among scientists about the feasibility of powering the entire United States with only wind, water, and solar energy, triggered mostly by a recent paper by Stanford professor Mark Jacobson and colleagues. Both proponents and opponents are leading energy researchers who support their claims with sophisticated computational models. Given the magnitude and complexity of the problem, there will likely be no clear winner in the near future. But the debate will continue to influence our energy and environmental policies in the years to come.

Since the world also belongs to the young, we are obliged to find a way to engage them in this high-stakes debate. Regardless of the sides people take, few would dispute the strategic importance of educating and preparing energy consumers and workforce of tomorrow. Motivating youth is so vital in Bill Gates’ call for an “energy miracle” that he urged high school students to “get involved” in the energy quest in his 2016 annual letter. But, apart from becoming a conscientious user of energy, how can students make meaningful contributions?

Fig. 1: Energy3D covers nearly 600 regions in 185 countries.
We envision a cyberinfrastructure that works like an “Energy Minecraft” to inspire and support millions of students to take on the energy challenge at the grassroots level on a global scale. On this platform, students will learn basic science concepts and engineering principles. Equipped with the knowledge and skills, they will then crowd-design an unprecedentedly fine-grained computational model that consists of millions of virtual solar panels, reflecting mirrors, and wind turbines accurately positioned around the world and connected to virtual storages and grids. A multiscale model with all these low-level details does not exist yet, but it may be a holy grail in energy research that can potentially settle the case and even provide a blueprint going forward to a 100% renewable energy future if possible at all.

This article introduces the Solarize Your World program, the first step towards realizing the above vision. Although the program currently focuses on solar energy, it has the essential elements of a computational model capable of supporting both STEM education and energy research. And it can be extended to include other renewables such as wind, hydroelectric, and geothermal energy.

The complexity of modeling solar power in the real world

Fig. 2: Learn, apply, and explore
The sun is a gigantic nuclear fusion reactor in the sky that emits a massive amount of energy. Elon Musk has famously asserted that covering “a fairly small corner” of a state like Nevada with solar panels can generate enough energy for the whole country. This makes you wonder what scientists are really debating about.

It turns out that building a reliable solar infrastructure is not as simple as laying down billions of solar panels in a square of 100×100 miles. There are countless technical, economic, and social constraints for solar deployment in reality. For example, people do not have unlimited space and budgets. Some are concerned about the aesthetics of buildings and landscapes with solar panels in sight. Governmental policies drive the cost of solar energy, hence people’s interest, up and down. Energy storage is needed to overcome solar intermittency to provide electricity after sun-set and grid stability at all time. A significant amount of energy is lost during the transmission from utility-scale solar power plants to population centers. All things considered, we have a problem far more complicated than Musk’s ballpark statement. This is why the National Renewable Energy Laboratory has been conducting research on estimating the solar energy potential of the country (e.g., see "Rooftop Solar Photovoltaic Technical Potential in the United States: A Detailed Assessment" by Pieter Gagnon, Robert Margolis, Jennifer Melius, Caleb Phillips, and Ryan Elmore in 2016).

A crowdsourcing model that integrates education and research

Fig. 3: Photovoltaic solar farms in Energy3D
A more accurate assessment of the planet’s true solar potential is to identify all possible locations where suitable types of solar power can be realistically deployed and compute their minute-by-minute outputs to global grids and storages for a cycle of 24 hours under typical meteorological conditions. To evaluate the cost effectiveness of this giant distributed network, a mix of financing models driven by local economics and policies can be used to estimate the scale of investment that needs to be made over a certain period of time. Creating such a multiscale, time-dependent model with details down to instantaneous outputs and levelized costs of individual solar modules is a daunting task that no single researcher can do. But we can call for help from millions of students who know and care about their corners of the world more than any outsider. The challenge is to teach them the science and empower them with appropriate engineering tools so that they can join the energy quest.

Solarize Your World is based on our Energy3D software, a revolutionary CAD tool for anyone to design any type of solar power system in cyberspace and calculate its hourly, daily, or yearly out-puts based on numerical simulation from first principles. With weather data of nearly 600 regions in 185 countries (Figure 1), Energy3D can produce satisfactory results for most parts of the inhabited world, enabling millions to work on local projects. The ultimate goal of Energy3D is to turn the tedious job of engineering design into a fun game like Minecraft, making learning, discovery, and invention playful experiences for all.

A curriculum for learning and practicing science and engineering

Fig. 4: Concentrated solar power plants in Energy3D
For students to succeed in creating authentic models of solar energy systems valuable to research, Solarize Your World provides comprehensive curriculum materials and classroom-to-afterschool pathways (Figure 2) that lead students to: 1) design solar energy systems for their homes, schools, villages, and cities; 2) design any type of photovoltaic and concentrated solar power plants wherever applicable; and 3) communicate their designs to potential stakeholders whenever appropriate. Figures 3 and 4 show solar power systems of different types and sizes on top of satellite images of the chosen sites from Google Maps (some of these systems were modeled or designed by students in our 2017 pilot tests).

The Solarize Your World curriculum consists of three connected parts. Part I teaches students the needed disciplinary core ideas, crosscutting concepts, and science and engineering practices as defined in the Next Generation Science Standards. The disciplinary core ideas cover earth science, heat transfer, geometric optics, and electric circuits that are fundamental to solar power. The crosscutting concepts include energy and systems that are necessary to understanding how the energy from the sun can be converted into electricity to power the world. This part also strives to familiarize students with the practices of scientific inquiry and engineering design. Part II provides scores of open-ended, real-world projects for students to choose. For instance, students can design solar energy systems for their own homes or schools. If students cannot finish a project within the given timeframe in the classroom or wish to undertake more projects out of school, Part III supports them to continue in an online community, possibly in collaboration with many other participants similar to the case of Minecraft.

The road ahead

The U.S. Department of Energy announced on September 12, 2017 that the 2020 utility-scale solar cost goal set by its SunShot Initiative had been met three years earlier. The price of utility-scale solar energy has now fallen to six cents per kilowatt hour. Despite this phenomenal plummet, the road to a 100% renewable energy future is still unclear and debatable. We invite students and teachers worldwide to join our Solarize Your World initiative to pave the way. Rarely have students been given a chance to help answer a question so crucial to humanity.

Thursday, September 14, 2017

Deciphering a solar array surprise with Energy3D

Fig. 1: An Energy3D model of the SAS solar farm
Fig. 2: Daily production data (Credit: Xan Gregg)
SAS, a software company based in Cary, NC, is powered by a solar farm consisting of solar panel arrays driven by horizontal single-axis trackers (HSAT) with the axis fixed in the north-south direction and the panels rotating from east to west to follow the sun during the day. Figure 1 shows an Energy3D model of the solar farm. Xan Gregg, JMP Director of Research and Development at SAS, posted some production data from the solar farm that seem so counter-intuitive that he called it a "solar array surprise" (which happens to also acronym to SAS, by the way).

The data are surprising because they show that the outputs of solar panels driven by HSAT actually dip a bit at noon when the intensity of solar radiation reaches the highest of the day, as shown in Figure 2. The dip is much more pronounced in the winter than in the summer, according to Mr. Gregg (he only posted the data for April, though, which shows a mostly flat top with a small dip in the production curve).

Fig. 3: Energy3D results for four seasons.
Anyone can easily confirm this effect with an Energy3D simulation. Figure 3 shows the results predicted by Energy3D for 1/22, 4/22, 7/22, and 10/22, which reveal a small dip in April, significant dips in January and October, and no dip at all in July. How do we make sense of these results?

Fig. 4: Change of incident sunbeam angle on 1/22 (HSAT).
One of the most important factors that affect the output of solar panels, regardless of whether or not they turn to follow the sun, is the angle of incidence of sunlight (the angle between the direction of the incident solar rays and the normal vector of the solar panel surface). The smaller this angle is, the more energy the solar panel receives (if everything else is the same). If we track the change of the angle of incidence over time for a solar panel rotated by HSAT on January 22, we can see that the angle is actually the smallest in early morning and gradually increases to the maximum at noon (Figure 4). This is opposite to the behavior of the change of the angle of incidence on a horizontally-fixed solar panel, which shows that the angle is the largest in early morning and gradually decreases to the minimum at noon (Figure 5). The behavior shown in Figure 5 is exactly the reason why we feel the solar radiation is the most intense at noon.

Fig. 5: Change of incident sunbeam angle on 1/22 (fixed)
If the incident angle of sunlight is the smallest at 7 am in the morning of January 22, as shown in Figure 4, why is the output of the solar panels at 7 am less than that at 9 am, as shown in Figure 3? This has to do with something called air mass, a convenient term used in solar engineering to represent the distance that sunlight has to travel through the Earth's atmosphere before it reaches a solar panel as a ratio relative to the distance when the sun is exactly vertically upwards (i.e. at the zenith). The larger the air mass is, the longer the distance sunlight has to travel and the more it is absorbed or scattered by air molecules. The air mass coefficient is approximately inversely proportional to the cosine of the zenith angle, meaning that it is largest when the sun just rises from the horizon and the smallest when the sun is at the zenith. Because of the effect of air mass, the energy received by a solar panel will not be the highest at dawn. The exact time of the output peak depends on how the contributions from the incidental angle and the air mass -- among other factors -- are, relatively to one another.

So we can conclude that it is largely the motion of the solar panels driven by HSAT that is responsible for this "surprise." The constraint of the north-south alignment of the solar panel arrays makes it more difficult for them to face the sun, which appears to be shining more from the south at noon in the winter.

If you want to experiment further, you can try to track the changes of the incident angle in different seasons. You should find that the change of angle from morning to noon will not change as much as the day moves to the summer.

This dip effect becomes less and less significant if we move closer and closer to the equator. You can confirm that the effect vanishes in Singapore, which has a latitude of one degree. The lesson learned from this study is that the return of investment in HSAT is better at lower latitudes than at higher latitudes. This is probably why we see solar panel arrays in the north are typically fixed and tilted to face the south.

The analysis in this article should be applicable to parabolic troughs, which follow the sun in a similar way to HSAT.