Updated: Aug 29, 2020
Today, I will introduce you to the model-based design approach. It transforms the way engineers work. Why? Because this methodology focuses on working with models for the entire development process. It moves tasks which before have been conducted in the field or lab to the desktop. Let's dive right into how model-based design for embedded control systems works - enjoy!
Before we start working on our system (let's make it a robotic system driven by an electric motor), we have to ask ourselves questions like:
What requirements do we have and what if they change? How does this affect our robotic system?
How do we want to go about optimizing our design? How can we ensure that our fantastic robotic system is up to par?
How can we test our design exhaustively without putting the system in danger?
Of course, we could decide to build a physical prototype. This however, is a slippery slope, since the tiniest error can have devastating affects on the prototype. Such mistakes could set us back for days and weeks (and nerves, since we'd have to rebuild parts of the system), since cost-to-fix increases exponentially as projects progress. Furthermore, we really want to test our system extensively, make sure we thought about all possible constraints, and survive building the system without having a nervous breakdown. So therefore, we settle on going with the model-based design approach. But how can we go about this? The best way to accomplish our mission of designing and building an awesome robotic system is to architect a high-level simulation/design model from the system requirements we've already decided upon. We can then start to perform initial system and integration tests, check out, if the model responds correctly to our input signals, and cross-check whether the system-level behavior is in sync with the specifications. And from there we keep on building our model, add details with the goal to ultimately create a detailed model of our robotic system and the environment in which it operates. As we build and continuously test our system with the model-based design approach, we can also test an unlimited number of scenarios, look at different compromises, and see how changes to the design (as minimal as they may be) affect the system. This is due to another great benefit of model-based design, its the fact that the test and verification stage occurs throughout the cycle of building an awesome system.
Model-based design has another benefit which I would like to touch on briefly:
Code Generation: traditionally, embedded code was handwritten from scratch (resulting in a back-and-forth between the software engineer and the control system engineer, writing the specifications/requirements, coding algorithms, and then finally debugging the code). With model-based design that is no longer the case, since algorithms are derived directly from the model, which ultimately facilitates communication between the software and control system engineer, thus the model sort of building a bridge between engineers working simultaneously on the design.
Remember, that model-based design means we can visually model our robotic system, test it, optimize it, add details to it, and continuously test and validate it along the way. Interested in finding out what model-based design, a forklift and rapid control prototyping have in common? Wait for my next blog post to find out.
In the meanwhile: stay curious and check out the following links: