Skip to Content

Model-based everything
or how to bake cake that turns out right every time

Jonathas Baker
6 Dec 2023

Are you tired of cake recipes that you follow to the letter, but just never turn out quite right? Do you marvel at the perfect cakes grandma used to make, using recipes in her head and an apparent mish-mash of ingredients?

Mr. Baker’s Brownies

  • 3 cups sugar
  • 1 cup butter
  • 1 tablespoon vanilla extract
  • 4 eggs
  • 1½ cups flour
  • 1 cup powdered cocoa
  • 1 teaspoon salt
  • 1 cup nuts

If yes, then grab your coffee, because we are going to find out how to make the perfect cake: one that looks great, tastes delicious, and is made with readily available sugar and flour from your local store.

That’s right. We are going to turn grandma’s secret recipe into a formal model that gets it right first time, every time. And all thanks to model-based systems engineering (MBSE).

According to the Merriam-Webster dictionary, a ‘recipe’ is “a formula or procedure for doing or attaining something”. A recipe can therefore apply to everything from aerospace manufacturing checklists to instructions for human-machine interfaces in industrial settings. Similarly, algorithms can be thought of as recipes – procedures for attaining desired computations.

At first glance, the brownie recipe seems easy enough, right? Just mix everything together, in the order given, put the batter in a greased tray and bake for half an hour. Indeed, it should be a ‘piece of cake’!

Except when it isn’t.

A little too much butter and we get a fudgy sludge. A little too much heat and we get a hard, burnt crust that is uncooked on the inside. There was too much or too little of something, and the recipe fell short of expectations, and often we don’t know why.

Expectations are a complicated thing to manage. Fortunately, however, system requirements are not! Enter MBSE.

Figure 1 – Model-Based Systems Engineering applied to cake

Models: another way to think about recipes

Instead of using sequential procedures as a recipe to create the cake, we’re going to explore the use of something more magical. An understanding possessed by only the most experienced grandmas – an intuitive understanding of how the ingredients work together. Let’s call this a model of the cake.

The model is an objective assessment of the perfect cake – how it looks, tastes and smells – and how to get there. But because it understands the causal links between the steps in the recipe and the end result, it can be used to tweak the optimal conditions for the perfect cake – for example, perhaps your particular oven needs to be turned up a bit.

But this model can do more than just define and refine the original recipe.

For example, maybe we want to try a flour substitute for a gluten-free version of the cake. Most wheat flour substitutes are mixes of flours from different grains, like corn or rice. In this case, the proportion of each kind of flour in the substitute will impact the end result, which is the baked gluten-free cake. The model can help you understand how – if you substitute one ingredient – you should make adjustments to others to get a similar end result.

And it doesn’t end there. The model isn’t limited to proposing substitutes to deliver the same requirement – it can also change the requirements to create similar recipes. It can be derived (in formal MBSE parlance) to bake other delicious things, like muffins and breads. Furthermore – and this is perhaps more relevant once we move from home baking to industrial scale R&D – the model can be altered dynamically, in a collaborative way.

This model-based approach saves a lot of time and investment. Without it, we may need a whole floor filled with ovens and maîtres pâtissiers – pursuing the traditional scientific approach of double-blind studies and controlled variables – to produce novel pastries. That was basically the approach of R&D departments in the 1960s. As a way to innovate, it was better than nothing, but it was expensive, time consuming and not a sustainable research approach for many companies. MBSE cuts out a lot of this experimentation.

Introducing: virtualized pastry

A better way would be to employ our model to power a digital twin of the cake: a virtualized pastry that exists as a set of parameters that can be changed at will.

The nature of the digital twin means that the outcome of a change to the recipe can be known beforehand. Want to go for a white-chocolate brownie? Or use a different kind of nut? Perhaps you want to try a vegan substitute for butter, or a gluten-free alternative to flour? The digital twin cake can be baked in a virtual oven and results obtained before you head to the supermarket.

Figure 2 – Generalized cake production process.

And don’t take this for science fiction. Digital twins are already in use today across a wide range of industries. An actual bakery business could train new hires with such a tool and study the outcome of new recipes, all before firing the oven. The commercial potential of virtual models is enormous – we are talking about an $80 billion market in the US alone for preserved pastry and cakes, let alone bread.

What do we mean by a model?

So, we move on to the question of what exactly constitutes this model.

Model-based systems engineering is a large field that deals with the science of defining such models and the way that they should be implemented. The models posed by MBSE are abstracts, rather than physical models. The system – eg. the cake – is described using software as a set of relationships between the entities (or ingredients) involved. This virtual abstraction allows the model to be easily shared and configured.

The abstractions that comprise this model must be computable in some way – ie we must be able to put a number on it.

They say you can’t compare apples to oranges. But you can weigh them or measure their size. And you can even measure more abstract organoleptic criteria – ie taste, sight, smell, and touch. There is even an ISO standard on it: ISO 11036, “Sensory analysis – Methodology – Texture profile”, which describes techniques that can measure the sensory texture parameters. Using these and other techniques, it is possible to put numbers on subjective qualities. If done thoroughly, every organoleptic property of the cake may be parameterized and fed into the model. The same model can even be used to simulate the baking process of both apple and orange cakes, negating the need to do this physically – bringing down R&D costs and time to market.

These characteristics enable more advanced uses of the model, like the aforementioned digital twin, that could be used to simulate the optimum quantity of apples or oranges (or any other ingredient) by simply computing the model inputs, based on the desired output.

Verification and validation of this computed output then becomes a routine activity – instead of a laborious process – because the inputs and outputs of the cake system, described by the cake model, are all explicitly given by the digital twin. Finally, as a virtual object, the model can be transferred, copied and edited by different people at the same time. For example, if one oven specialist updates the convection heat transfer model, everyone else in the shop benefits from the improved model.

MBSE: not just for cake

Model based systems engineering is not just an abstract concept. It has the power to make tricky things much easier. In our baking example, modeling can bring the deliciousness out of simple flour and sugar, more quickly, and more cheaply without the need for physical trial and error – and the resulting expensive mistakes. And it is not just about cake, MBSE can be used to speed the innovation process for any new ‘recipe’, whether for a vaccine or a plane engine.


Jonathas Baker

Semiconductor Firmware Engineer
Jonathas graduated with a degree in Mechanical Engineering from Unicamp (Brazil) in 2018. He wrote firmware for intelligent photolithography machines whilst at ASML, and worked on firmware for smart agricultural implements in prior roles. Joining Capgemini Engineering in August 2022, Jonathas brings a wealth of experience in both mobile and stationary industrial automation. Recently defending his Master’s dissertation at UFOP (Brazil), Jonathas explored the automated estimation of biofouling-induced drag in ship hulls.