Blog : STEM

The top 3 math-didactical fails. Ever.

It was back towards the end of last century, and most of us didn’t really grasp what we were supposed to make of it. It didn’t seem to be of any concern whether the teaching was motivating or not, nor whether the time the children invested in the learning eventually was worth it. In the math lessons we were told that…

1. the cosine is used to calculate the length of the edges in a triangle…

… which no-one really has done for ages.

What you actually do use the cosine and sine for is to describe circular movements: cos(t) and sin(t) are respectively the x and the y coordinate of a point having moved t length units along the unit circle. From a practical perspective that can be used for instance to write a program that displays a clock.

Playing around with the code in line 7 and 8 gives a good hands-on understanding of the parameters in the expression

C + A·cos(ωt + φ),

i.e. the meaning of:

  • the amplitude A: the length of the hands of the watch
  • the frequency ω: the speed at which they rotate (one of them is 12 times faster than the other) ¹
  • the phase φ: at what time they start (in this case 12 o’clock, at -90°)
  • the offset C: where the center of the clock is.

Pushing it a little further, the concept can be used to convey an understanding of signals, frequencies and spectra, be it sound signals, light waves, simple alternating currents, rotating wheels and much more.

Interestingly, the kids are quite receptive to the notion of a (Fourier) spectrum. For instance, the spectrum of an F major chord on our piano looks like this:

 

You can also explain the children what a low-pass filter is by playing a high-pitched tone (~13kHz) on a computer: the kids will hold their ears in pain while most adults won’t be able to hear it at all. Very funny!

2. a function is something involving a graph…

…something with “ax+b”, which is not completely wrong per se, but nonetheless a serious under-statement of the importance of the concept of a function.

Indeed, considering functions as the fundamental building blocks of modeling – the Swiss army knife of abstract thinking so to speak – completely changes the perspective. A function associates an output with an input, no more, no less. When you have formulated your function – your model – you have identified what is relevant, and discarded what was irrelevant. That can be unfathomably important:

From then on you will begin to see relations of causality, predict events and progress, compare the predicted with the observed, chain functions together, understand what is happening, act intelligently, adapt and improve, share your understanding with others.

Within the natural sciences the concept is omnipresent. Physicist tend to refer to it as operators.

Large organizations are barely manageable without it nowadays. In business language functions are often referred to as processes.

A great tool for introducing the concept of a function to children (4+) is the function builder, a tool allowing to visually build and play with functions that transforms an input (on the left) to an output (on the right):

 

At the school we sometimes organize a function-Pictionary:

“If the input is… [drawing] a bread, and the output is… [drawing] slices, then the function is probably… a knife!”

3. differential equations are solved using obscure rules learned by heart…

… and aren’t of much use after all, as most people who learned about them in high-school will recall (hint: “coefficients in a complex-valued function”). What should have been the great epiphany concluding 13 painful years on the school bench ended up as a complete anti-climax for the vast majority.

But in reality it’s quite simple: once you have formulated your model using functions, you generally want to know how it behaves under different circumstances (inputs). The interesting models are often so complex that simply entering the input into a formula won’t work – one has to work out the final result in small pieces at the time. These small different pieces (differences) are added up (integrated) into a solution, nowadays in practice always using a computer.

From a pedagogical perspective the classical Euler method is quite suitable and can be used from age ~6 and up, see the first order example (x’ = ±1) below²:

 

In the example, the velocity v=1 of the cloud is constant until the cloud reaches sufficiently far out on the right (x>250), after which the velocity changes sign until it reaches sufficiently far left (x<150), after which it changes sign and so forth. In each iteration of the draw loop, v is added to the position x, giving the new position ³.

The slightly older children can use differential equations to answer truly relevant questions, such as calculating the time it takes a space ship to travel to Mars:

 

In most of the examples above, one skill has turned out to significantly leverage the fun and relevance of math: programming. And so it turns out that math can be easy after all!

 

So stop whining.

Start coding :)

 

 

Footnotes:

¹ Strictly speaking, ω is the angular frequency, i.e. ω=2πf where f is the frequency expressed in Hz.

² The example isn’t actually a true first order differential equation (DE), since there doesn’t exist a function f such that x’=f(x), since for a given value of x ∈ [150, 250], x’ can take on two values, 1 and -1. As it would often be the case when solving actual real-world problems, we are cheating a little: here we are using an extra variable (v) to store more information than what a first order system can hold. In order to solve the problem within a strict DE framework, one would need a second order equation involving Dirac delta functions, as in the flying pig example (code here).

³ Formally, rather than adding v we would need to add Δx, the distance traveled during a short time Δt, i.e. Δx=v·Δt. Here it works because we assume Δt=1.

Journée francophone du 25 février 2018 – Programmation et équations différentielles

Programmation et équations différentielles

Journée francophone, dimanche 25 février 2018

1) Pour commencer:

Dans le navigateur internet, aller sur

https://www.khanacademy.org/computer-programming/new/pjs

2) Dans la documentation, trouver comment dessiner un rectangle

En dessiner trois. Ou autre chose, comme on veut :)

3) Animer un des objets dessinés

Créer une variable, par exemple

var x = 0;

Créer une fonction

draw = function() {

background(255, 255, 255);

rect(x, 100, 100, 100);

x = x + 1;

}

4) Faire rebondir l’objet sur les rebords:

En début de programme, faire une variable v (pour vitesse):

var v = 1;

Dans la fonction draw, ajouter:

if (x < 0) {

v = 1;

}

if (x > 400) {

v = -1;

}

changer x = x + 1 en x = x + v

5) Au choix

  • ajouter une variable y (position verticale) et une vitesse verticale

  • ajouter une accélération

 

Exemple de résultat final.

 

The Loop

In my previous article I described how one can use a differential equation to calculate the trajectory of the Earth around the Sun. But at the end it was quite tedious so I decided to use a computer instead. Because they are good at repeating things. One way to make a computer do the same things again and again is to use a loop. In the program below we will show how a for loop works:

What the program does is to draw a planet 18 times using a for loop.

In each iteration of the loop first of all you calculate the distance from the sun to the planet, after you need to calculate the acceleration then you should find the speed of the planet at the end you can find the position of the planet.

 

This video explains about the code above:

The Structure

In a not too distant future, humankind has started constructing a gigantic platform orbiting {the Moon, Earth, the Sun…}.

Building blocks are mined on the Moon and sent into space using an electromagnetic railgun.

On Earth, gravity effectively limits the size of anything we want to build.

In space however, there are no such limitations.

Over the years the construction has grown into the largest thing ever built by mankind: The Structure.

Project

Describe:

  • What does The Structure look like?
  • What materials is it built of?
  • What is it used for?

You can use either text (novel, report, …), pictures/drawings, build a model…

Imagine limitlessly!

Blender project (License: CC0)

Differentialligninger

Det handler om at udregne svære problemer ved at tage det i små bidder ad gangen. Lad mig illustrere det med et eksempel. Forestil dig, at du gerne vil udregne jordens bane rundt om solen. Den her tegning den viser hvordan jorden roterer rundt om solen. Nu vil jeg gerne forklare hvordan det virker. Afstanden fra solen til jorden kalder man “d”, så når man har ganget “d” med sig selv bliver det til “d2“, så skal man dividere 100000 med “d2” hvilket giver accelerationen “a”.

Så først skal man tegne solen midt i papiret. I dette eksempel tegner vi jorden d= 100 mm væk fra solen. Og derudover tegner du jordens hastighed, for eksempel med en blå pil. I dette eksempel er den 30 mm lang og er vinkelret på retningen ind mod solen. Så nu skal  du udregne “a” som beskrevet ovenfor. Her giver det for eksempel a = 100000 ÷ 10000 = 10 mm. Accelerationen tegnes med for eksempel en rød pil ind mod solen. Hvis man tegner den røde pil ude for enden af den blå pil får man jordens nye position og dens nye hastighed.

Jordens bane rundt om solen

Og dette skal man gentage nogle gange og til sidst får man jordens bane :D

I næste artikel vil vi se hvordan dette kan gøres meget lettere ved hjælp af for loops.

 

Alix, 11 år

 

Differential Equations – A Child’s Play

“Differential equations”… To most people who went to high-school, these words will bring back blurred memories of something complicated and tedious. Some will recall that they involved “functions” and “derivatives” and that they were solved using opaque techniques that one had to learn by heart. Most people have since then personally experienced that they never turned out to be useful anyways and happily forgotten all about them.

But:

  1. Differential equations are useful, and
  2. understanding them is, literally, a child’s play.

Here’s why.

Ever wondered how to make weather forecasts? Or how to design sky-scrapers that will last a century, or resist earthquakes? How to model the complex electronic circuits inside cell phones and computers? If you are considering buying a house, it might be relevant for you to know how the estate market will react to an increase in the interest rate… and so on.

As it happens, differential equations turn out to be key here. Let’s elaborate on the first example above, the weather forecast, to illustrate how they work in real life. Imagine that we start out with two satellite images, one taken a few seconds ago and one taken now. From the difference between the images, we can tell which way the winds are blowing. We can also see where the ground is being heated by the sun, where the clouds are being formed etc. Since meteorologists have a good understanding of how all these factors play together, they can now calculate how the weather system will change over the next few seconds. Adding this change to the current state tells what the weather will be like a few seconds from now, in turn allowing to calculate the next change and so on. Doing this over and over again will eventually give us a good estimate of the weather several minutes, hours and even days from now.

In the essence, we are solving a complex problem by engaging it from one end and working our way through it, integrating one small piece (difference) at the time into the eventually complete solution. And this reasoning, this practical necessity, is probably what led Newton, Leibniz and the like to invent differential calculus over 300 years ago.

The Equation Group on the July 2nd ’17 hackathon. Prototypical hacking and playing with differential equations.

But something they didn’t have back in the 17th century was… computers. The equations had to be solved using pen and paper, perseverance, skill and imagination – dark wizardry reserved for the select few.

That has changed. During the last decades, computers have grown in speed and power and what used to be a super-computer is now available to literally anyone. In the meantime, the level of entry into the world of programming has reduced drastically, and it is not uncommon to meet children proficient in half a dozen programming languages. What computers are good at is doing the same thing over and over again – exactly what is needed for solving the differential equations. So, with the advent of computers, it became much easier.

As an example, let’s consider a particularly captivating problem, that of gravity.

In less than 20 lines of simple code (see below), the programmer will get a hands-on experience of

  • what planetary trajectories look like (they’re elliptic)
  • what is meant by “sling shooting” satellites in the solar system
  • what the “escape velocity” is all about
  • and so on…

The result looks like this (the code can be copy+pasted into Khan Academy’s Javascript/ProcessingJS framework )

 

What the code expresses is:

  • line 2-5: set the initial position and velocity of the planet
  • line 6: set the time step for each iteration. The smaller the step, the more precise the calculation will be, and the longer it will take
  • line 7: the draw() function. In the framework we are using – called ProcessingJS – this function will be called over and over again.
  • lines 8-10: these lines are central to the program as they fully govern the behavior of the planetary motion. The variables xpp and ypp are the accelerations in the x- and y-directions respectively. According to Newton’s law of universal gravitation, the gravity-induced acceleration is directed towards the attracting body (in this example the origin), is proportional to the mass of the body and drops with the square of the distance to the body.
  • lines 11-14: given the newly updated acceleration, update the velocity and then the position.
  • lines 16-19: redraw the planet given its new position.

As we will see in a more detailed sequel to this article, a number of collateral learnings typically arise from this type of exercise, such as

  • learning about arrays, lists and objects,
  • refactoring code into functions,
  • experiencing the limitations of models and numerical instability,
  • Pythagoras’s theorem,
  • scientific notation…

From a didactical and pedagogical perspective this is quite interesting, as what we have here is a constructivist entry point to the full math curricula from primary to high school, and beyond. In other words, within inquiry-based approaches to teaching, the combination of differential equations and programming offers an engaging math environment to immerse the learners in, something that otherwise tends to be a challenge for these pedagogies.

On a side note and regarding the programming aspects, implementing simple “puzzles” such as the one described above is a low-barrier-of-entry way to get introduced to programming, or to explore new programming languages. They provide an advanced “hello world” program, allowing to rapidly assess the basic features of a new language.

Differential equations as well as the techniques used for solving them are interesting per se, in the sense that they form the foundations of most scientific research.

What is of even more general interest, is the reasoning behind differential equations, the idea of decomposing a problem into manageable parts and working your way through.  They allow to reason about functions, these constructs that essentially associate an output with an input, the “Swiss army knife of abstract thinking”, providing a general scheme to improve one’s ability to understand.

And that is relevant for everyone.

Want to dig in further? – see our evolving collection of puzzles.

Hacking a ton

Within the hacker communities, a so-called hackathon (the contraction of hacking and marathon) is a well-known concept which consists of meeting up and getting some intensive programming done, typically during a day or so.

The hackaton or hackatonne (/hæk.ə.tʌn/) however is a less known concept (to be fair, actually a completely unknown concept at the time of writing). It consists of hacking an actual metric ton of devices.

While the hackathon is supposed to be a relatively short and intense event during which you are supposed to get something useful done, there are no such constraints on the hackaton. Reaching the full metric ton of hacks can take weeks, months or even years. Also, the definition of a hack is quite broad and diffuse, but can essentially be summarized to “any modification or use of an object that was not originally intended”, leaving a lot of freedom in the choice of activities.

So for our first hackaton session on May 22nd, we went to Guldminen to disassemble toys. Guldminen is physically a hangar situated in a recycling station, a sort of laboratory in which the Guldminers collect discarded materials in order to develop new ways to reuse, upcycle, repair, redesign and redistribute them.

 

Aha-experience as Supergirl sees through the appearances.

As a part of our STEM-for-girls experiment the location was perfect to train the children in disassembling devices, the objective being to strengthen the habit of investigating what lies behind the surface. Also, practicing simple motor skills such as screwing (clock-wise) and unscrewing (counter-clock-wise) is quite relevant for children of that age.

Guldminers Monica and Henrique took us for a walk around the recycling station and presented Guldminen’s facilities – a lot of machines including a lathe, a CNC milling machine / laser cutter a planer and more.

In preparation of the session, Guldminen had collected items for us during the week-end. These included a vinyl disk player, a large amount of plastic cars / cranes / tractors / bulldozers / trucks, an electrical trike, a cash register, kitchen toys, just to name some.

Frenetic unboxing of the week-end’s harvest of trashed toys.

The hacking took place around two tables that Monica had prepared for us, with groups forming dynamically depending on which objects the children found interesting. We had brought additional screwdrivers and pliers, batteries, a couple of microcontrollers and a glue gun. Eight volunteers, mainly parents, assisted the groups when necessary. The session turned out to be well suited for a multi-aged group, as the smaller children (3y) followed along and entertained themselves with all the “new” toys.

 

 

 

The purpose of the session was mainly disassembly, but on the reassembly side we did manage to activate a piezoelectric speaker from a walkie-talkie using the Arduino controller.

During the final evaluation, the children expressed that they had had a lot of fun and that we should definitely do similar sessions again.

Some of the learnings of the day are:

  • remember to bring a lot of screwdrivers, in particular with PH and PZ heads
  • in case you want to also do reassembly, have some projects ready beforehand
  • all disassemblable toys  have an interest, but electronic toys are easier to use in a STEM-teaching context

Some ideas for next steps:

  • organize a more repair- and reassembly-oriented workshop
  • set up a gaming arcade – would require monitors and game controllers, and preferably also some computers
  • give old computers new life by installing Linux on them
  • build a giant cinema-like screen by juxtaposing discarded monitors

 

Catch of the day: this fast little devil earned us 4.2 kg for the hackaton. Total session score: 8.1 kg.

 

 

On the subtle connection between girls and STEM

It was back in the late ’90s, we were attending DTU’s course on digital electronics. Given the “historical” context – the upcoming dot.com bubble and digital revolution – it would turn out to be an important course. It gave us insights into the inner workings of computers, the foundations of the Internet-based society. In the subsequent decades, this type of heavy-weight development skills would give access to the highest yielding jobs, be determining in whether tech start-ups would make or break it  and provide a ticket to the gold rush of IT entrepreneurship. We were around a hundred guys in the auditorium. And a girl. One. On the advanced course the following semester, it was guys-only.

Fast-forward to 2017. IT is everywhere. IT has changed almost everything. Everyone is exposed to it, almost everyone depends on it. In even the least developed corners of the planet people are connected by mobile devices. The largest and fastest growing corporations are very young, only a few decades old, and were built on the IT-revolution by entrepreneurs in their twenties.

More than nine out of ten of the new-age entrepreneurs are men. The digital divide is (also) an extreme gender gap.

In order to understand what was going on on the gender parameter, we in January started a STEM course at the Danish-French School targeted primarily at girls. The objective was to build an interest for electronics, programming, physics and science in general through a playful, constructivist curriculum centered around drones and robotics. The age range of the initial 12 participants was 5-13, split equally between genders (6-6). After a few sessions, three of the boys and one of the girls had left the course and five new girls had joined, giving a final gender split of 10-3. Having boys on the course would turn out to be essential in explaining the subtle relationship between girls and STEM.

Fun at the 3D printer

“You might spur scientific interest for subjects such as chemistry and biology. But the hard core subjects like physics and electronics… forget it.”, one female researcher warned. And so we began.

The course was comprised of 15 two-hour sessions, each consisting of an introduction (~15 min), free activities / free flight (~45 min), intermezzo (~15 min), free activities / free flight (~30 min), conclusion (~15 min). The sessions were framed by 2-5 volunteers depending on the days.

The free activities largely consisted of piloting the drones, but also disassembling/reassembling them, painting them with an air-brush, building obstacle courses, building a radio-controlled Arduino-based rover, programming the rover…

Training Mission: Save the baby-bear on the top of the mountain.

During the intermezzi we showed short videos (for instance FPV recordings), explained scientific principles (for instance how the GPS works, distances in the solar system, time dilation), tasted “astronaut” food…

From the start, all the children reacted very positively to the course. The training missions we had planned for the first day turned out to be too difficult, so from the second session we adjusted the missions to be “one-dimensional”, that is fly up/down, slide forward/back on the ground, left/right. One of the girls started building her own obstacle course and most of the others joined the trend.

 

The training area, the school’s gym, was split into four sections – three flight zones and a workshop table. The workshop table consisted of four stations: soldering, airbrush, Arduino programming, glue pistol.

 

The workshop table with four stations: Arduino programming, airbrush, soldering station and glue gun.

 

First FPV flight.

Each of the three flight zones had a drone that had to be shared between a number of children (~3) and an instructor. The roles of the instructor  (typically an older child) was to demonstrate the exercises, coach the children and, perhaps most importantly, to ensure that the children respected the turns. On several occasions we observed (and prevented) that the boys physically pulled the remote control out of the girls’ hands, with an enthusiastic “Let me show you!”. On one occasion an older brother almost tore off his sister’s FPV goggles.

Generally speaking, the enthusiasm of the boys had a tendency to shadow the participation of the girls. But more importantly, when the instructor explicitly shielded the girls, for instance by requiring the children to raise their hand before speaking, they seemed to bloom and started participating very actively.

Airbrush workshop.

One workshop that the girls found particularly interesting was the airbrush painting of the drones. When asked, the girls unanimously found it important that things look beautiful and the boys unanimously did not.

The participating children were slightly too young to do actual Arduino programming (the older ones were acting as flight instructors). However, one of the adult volunteers had built a radio-controlled rover, which could be programmed from the computer. A sequence of letters (w,s,a or d) were sent wirelessly to the robot which would then execute the corresponding commands (move forward, backwards, left, right). That type of programming spurred a lot of interest, for both boys and girls.

End-of-session evaluation. Fun: 5/5

Time will tell if these girls will eventually break the STEM gender stereotypes. What can be concluded as of now is that:

  • the interest in robotics is gender neutral in the sense that both boys and girls demonstrated a genuine fascination for the field
  • if not channeled, the boys tend to impede the girls from engaging and learning
  • during the 3½ months of exposure to the subject, the interest and engagement has increased for both genders

Our a priori expectation is that the continued exposure to the STEM subjects will nurture the interest as suggested in this experiment and will make the girls more receptive once we start addressing deeper technical aspects.

Bricolage & robotique, projets et liens

Voici quelques idées de projets et liens utiles suite à la session d’aujourd’hui. Tranche d’âge visée: 6-99 ans.

Les drones que nous utilisons sont les X5C-1 (Syma ou Bayang) et des Syma X11. Il sont légers (=inoffensifs), robustes, assez grands pour être stables et précis, utilisables en intérieur et surtout, nous pourrons nous reservir de leurs composantes pour en faire d’autres jouets, par exemple pour les reprogrammer et faire d’autres robots téléguidés.

Ils sont disponibles par exemple sur amazon.co.uk, banggood.com, alibaba.com, dx.com, ebay.com et coûtent généralement 250-500 dkk.

Suite à l’évaluation de notre session précédente, nous avons décidé de simplifier les missions et avons aujourd’hui travaillé sur des vols en une dimension à la fois (haut-bas, vol au ras du sol avant-arrière, gauche-droite).

Une nouveauté introduite à la journée francophone hier (dimanche 26/02/17) était la table de bricolage. Elle est constituée de quatre ateliers (aérographe, soudure, pistolets à colle, électronique).

Le rover sur lequel nous avons travaillé est le Mini Tank Robot de Keyestudio et le code se trouve sur https://github.com/raisoman/arduino-efd. Le code de véhicule autonome souffre aujourd’hui de l’inexactitude du senseur ultrasonique et il faudra donc rendre le processus de mesure plus robuste. Aussi, les enfants aimeraient pouvoir téléguider le rover, soit par ordinateur, soit par la télécommande (nRF24).

 

Le rover de chez http://www.olimex.com est basé sur le chassis ROBOT-2WD-KIT2, un driver de moteur BB-L298 et un nRF24L01+. Le rover est téléguidable avec une télécommande Syma, mais les moteurs des roues (ou le driver) a un problème d’assymétrie dans la puissance.

Le matériel FPV utilisé aujourd’hui est le Eachine VR007 avec une caméra tout-en-un, également Eachine (le tout à ~70 $), très bon rapport qualité-prix.

Nous attendons actuellement un module pour enregistrer le signal envoyé au casque de VR – petit projet de soudage/bricolage à l’horizon.

Également à l’horizon (les chiffres difficulté/durée indiquent la difficulté et la durée estimée de chaque projet) :

  • configurer Devo/Taranis pour pouvoir lancer l’enregistrement de films (Syma et Bayang) 2/3
  • mesurer degré d’humidité du sol des plantes de l’école (Arduino) 4/2
    • envoyer email à Stefan quand le sol est trop sec 4/2
  • finir rover Octanis 4/4
    • concevoir et imprimer roues avec axe intégré 4/2
    • concevoir/imprimer boitier principal 4/2
  • bras robotique (à imprimer + servos + arduino) 5/5
  • réparer voiture téléguidée cassée (imprimer nouvel axe hexagonal pour roues arrières)
  • configurer drone APM pour vol GPS 4/4
  • configurer encore un Devo 7E avec deviationtx (soudage, firmware flashing) 2/3
  • souder un fantôme OSHW 1/1
  • trouver pourquoi le fantôme OSHW de Stefan ne marche pas (besoin de reprogrammer?) 3/1
  • peindre les hélices (aérographe) 1/1
  • peindre les fuselages (aérographe) 1/3
  • construire un 250 en kit 3/3
  • construire un 250 à partir de pièces détachées 4/3
  • transformer un X5C en moteurs brushless (+ESC et flight controller) 4/4