In today’s world, it is very difficult to find a smart device without an embedded computer system inside. Embedded systems are the key, which differentiates products in terms of their features and functionalities. However, this benefit comes with a price. An embedded product undergoes a wide range of processes — designing the architecture, developing the platform with programming language and tools, integrating processors, peripherals, and software and lastly, testing compliance and functioning.
As the demand for compact devices increases, the sizes of processors and microchips keep shrinking, which requires the development of complex control systems. It is necessary to monitor the entire embedded control system and application design processes to optimize the overall system design. Here, the model-based design approach proves to be an effective and efficient means of understanding the product parts such as commercial microcontrollers and processors as well as algorithms and code for the working of both microelectronic and embedded devices. It helps address various difficulties and complexities, which arises during the lifecycle of embedded application software through visual prototyping and simulation of models.
Model-based design (MBD) performs verification and validation through testing in the simulation environment. It covers various disciplines, functional behavior, and cost/performance optimization to deploy a product from early concept of design to final validation and verification testing. Although many organizations use some form of modeling, some apply simulation in an ad hoc manner that does not take advantage of the potential verification benefits.
Why adopt Model-based Design?
In traditional design processes, the design information is usually transferred and handled in the form of text-based documents, which are difficult to understand and subject to interpretation bias. Engineers create embedded code and data manually from text-based documents, leading to a time consuming and error-prone process. There is also little scope to ensure that changes are implemented correctly or not.
The market demands embedded products that are highly customizable, life-long maintainable, recyclable and that can be disassembled, as well as which no longer follow any traditional design process models.
For embedded control and algorithm designers, the focus is on modeling, which has always been an essential part of the design process. The model-based design is a prominent change in embedded system development. In this context, when MBD is used effectively, it provides a single design platform to optimize overall system design. It helps embedded software developers to understand the difference between simulator and software development tool in order to create simulation models and check whether algorithms will work before the embedded code is written. Through virtual prototyping, system engineers can easily see whether the whole system (mechanical, electrical, and embedded software) will work as intended, even before the hardware is manufactured and available for testing.
Model-based design is a recommended approach for embedded hardware design companies due to the following advantages it offers:
- Enable the teams to verify the specification of overall system design in a shared simulation environment
- Ease in the positioning of controller design on PLC hardware
- Provides new opportunities for engineering low-power controller products
Want to learn more about how eInfochips helps client in model based design framework
Through simulation, engineers can also use the model-based design to solve a different design problem or in the next product development project in embedded systems. However, very few players implement MBD’s end-to-end capability in the embedded industry. Apparently, there are some common challenges faced by the industry in order to address MBD implementation in the stage of design analysis or rapid prototyping of control algorithms of an embedded system.
- Changes in organization workflow
- Requirement of strategical approach for migrating to Model based design
- Costs of implementation and knowledge acquisition
- Requirement of new tools, resources, and processes
However, with appropriate planning, analysis, and resource allocation, the above challenges can be addressed to kick off an effective model-based design implementation.
How does a Model-based Design work?
Establish MBD workflow within V-Cycle:
Leveraging the advanced processor functionality that facilitates ease of design in the market of embedded application systems, embedded software can be developed using MBD for systems in aircraft avionics, digital motor controllers, medical devices, and much more.
The model-based design framework typically includes the following steps: (see figure 1)
MBD Workflow V Cycle
- Modeling: System modeling activities involve creating a mathematical and behavioral representation of the embedded system under consideration. It refers to a visual method for designing complex control systems, communication systems, and signal processing systems within an MBD framework.
- Simulation: With MBD continuous testing as algorithms and real-time computational models are created and refined. Simulation is an alternative to building hardware prototype for testing purpose. During simulation, continuous-time systems are solved using numerical integration. Ideally, two types of solvers are used within MBD environments. These are:
- Fixed-step solvers: Fixed-step solvers use explicit methods to compute the next continuous state at fixed periodic intervals of time without any risk to infrastructure.
- Variable-step solvers: Variable-step solvers and continuous-time systems do not lend themselves well to deterministic real-time executables. So, this combination should be used carefully on those portions of the model that are targeted while the designing of embedded system software and subsequent code generation.
- Rapid prototyping: MBD provides a rapid prototyping method of a product. It is a fast and cost-effective way for engineers to control signal processing, verify design at the early stage, and evaluate design trade-offs.
- Embedded deployment: After rapid prototyping, a detailed software design activity is performed to convert the controller model to a detailed, executable software specification. Embedded code (often highly optimized) is then generated from the model for the detailed controller model and downloaded to the actual embedded microprocessor or ECU as part of the production software build.
- In-the-loop testing: To combine hardware and production code into model-based testing, one can compare dynamic outputs of models with data collected through software-in-the-loop and processor-in-the-loop test or with data measured in the test lab, using the data inspector or logging tools.
WHITE PAPER: Model-Based Design for Embedded Software Download Now
Development flow of the Model-based Design:
- Functional Modeling: In this, a model describes various functionalities of subsystems of embedded devices. It describes functions with few iterations and less effort in product development and ensures compatibility with other tools and processes. It follows an algorithm that defines electronic design rules of various process flows and components proposed for the embedded software.
- Implementation Modeling: This process describes the control algorithm, components, sub-systems, and the environment in which the embedded device will be operated, using analysis techniques like simulation and design verification. It helps in the reduction of implementation complexity with better quality at the concept level and optimized code. It maintains the device component interactions about timing delays, continuous parameters and checks their compatibility across the entire embedded systems.
In brief, MBD provides graphical modeling environments consisting of block diagrams and state machines and is used to analyze, simulate, prototype, specify, and deploy software algorithms within a variety of embedded systems and applications, which is closer to real-world implementation.
How does a Model-based Design work in 1D and 3D simulations?
In the early stage of analysis of MBD simulations, design teams have little more than basic equations, diagrams, and constants for embedded software design lifecycle, which is known as 1D analysis. In the 1D analysis, design teams get a brief of direction, flexibility and rapid prototyping in order to access the design space. “1D simulation models usually possess a higher degree of abstraction and require a small amount of input data (compared to 3d models),” said Michael Hoffman, senior vice president for math and systems at Altair.
Image courtesy of Altair
The above image showcases the upgrading of 1D simulation over 3D simulation. It shows that all the sub-systems combined with Design-of-Experiment techniques can be used upfront to generate parametric 1D-subsystem models. They can be even employed in the detailed design phase for subsystem optimization. If you are interested in combining both the worlds, read this blog, to know in detail.
In 1D, the design team learns more about its product, which becomes easier for design engineers to start the 3D simulations to access the embedded software design control systems. 3D is considered as a detailed simulation, which looks into the subsystem optimization of product design. Due to the high degree of abstraction, design team lacks accuracy in 1D. To overcome this, a 3D simulation model is being used for quantitative and detailed design phase in an embedded application.
Model-Based Design Tools: For Modeling & Simulation
Nowadays, to improve product quality and time to market or even greater design flexibility, engineers follow standard model-base1d designs like with MATLAB and Simulink.
These tools optimize and improve embedded design and development efficiency, system functionality and minimize overall design time in a simulation environment.
With the help of these MBD tools, engineers can:
- Streamline testing and verification workflows
- Resolve design problems early with fewer prototypes
- Accelerate product development
- Reduce development time
Tool for modeling
Simulink® developed by MathWorks is a graphical programming environment for modeling, simulation, and analysis. Its primary interface is to provide graphical block diagrams that allow engineers to draw models and customizable set of libraries that include a sink, source, linear and nonlinear component, and connector blocks.
Tool for simulation
Commands are necessary for running a group of simulation. Matlab® is a mathematical integration method for efficient technical computing, where problems and solutions are expressed in mathematical notations. It integrates computation, visualization, and programming in an easy-to-use environment.
Model-Based Design Benefits
The main benefit of using MBD is the auto-generation of code, which can eliminate human errors and allow reusability of code. In addition, by adopting model-based design incrementally, companies have consistently achieved immediate and tangible results like:
- Faster time to the first demonstration
- Faster time to market with a qualitative product
- Quick turnaround of iterations without the need for hardware
- Expanded capacity for handling complex embedded systems
- Disciplined analysis, design and continuous testing in order to improve development effectiveness
- Reusable models which can improve development time and cost.
With an incremental approach, engineers can smoothly adopt model-based design and perform at even higher levels of speed, competence, and design quality in embedded systems.
Top Trends in Model-Based Design
Model-Based Design (MBD) is an innovative approach that employs graphical models to design and simulate intricate systems across various industries. As we anticipate the forthcoming year, several noteworthy trends in MBD are set to reshape the landscape:
AI and Machine Learning Integration: The convergence of MBD with Artificial Intelligence (AI) and Machine Learning (ML) is a pivotal trend. This synergy enhances modeling, system optimization, and predictive analytics, streamlining the design process.
Cyber-Physical Systems (CPS): MBD is progressively permeating the design of Cyber-Physical Systems, which fuse physical elements with computational facets. Expect specialized MBD tools tailored for CPS modeling and simulation.
Real-Time Simulation: Industries like automotive and robotics are fueling the demand for real-time simulation. MBD tools that offer robust real-time simulation and Hardware-in-the-Loop (HIL) testing will gain prominence.
IoT and Edge Computing: The MBD sphere is adapting to model and simulate IoT and edge computing systems effectively.
Open-Source MBD Tools: Open-source MBD tools are gaining ground, providing cost-effective alternatives and fostering collaborative development. The expansion of open-source MBD platforms is on the horizon.
Model-Based Testing: Beyond design and simulation, MBD is extending into Model-Based Testing (MBT). This trend will persist, with MBD tools evolving to offer advanced MBT capabilities for enhanced verification and validation.
Integration with Digital Twins: The integration of MBD with digital twin technology is strengthening. MBD tools will facilitate smoother integration with digital twin platforms, enhancing system monitoring and optimization.
Cross-Disciplinary Collaboration: MBD promotes collaboration among engineers, system architects, and domain experts. In 2024, expect tools that seamlessly facilitate cross-disciplinary collaboration, elevating overall system design.
Energy Efficiency and Sustainability: Sustainable design practices are gaining prominence. MBD tools will continue to adapt to model and optimize energy-efficient and environmentally responsible systems.
Regulatory Compliance: MBD tools will prioritize features that streamline compliance documentation and verification procedures.
Cloud-Based MBD: The cloud offers scalability and accessibility advantages. Cloud-based MBD solutions will become more prevalent, enabling remote collaboration and project work from anywhere.
User-Friendly Interfaces: Enhancing user experience is paramount. MBD tools will invest in intuitive and user-friendly interfaces to widen accessibility and usability.
Conclusion
In summary, Model-Based Design is evolving rapidly to meet the intricate and diverse requirements of various industries. Staying attuned to these trends in the approaching year will empower engineers and designers to navigate the dynamic landscape of MBD effectively, fostering the creation of efficient, reliable, and innovative systems.
eInfochips can help you optimize your model-based design process. We have accomplished a complete model-based application development for onboard fault diagnostics, electronic flight instrument system and display systems with deep expertise in model-based design framework that includes MathWorks components like Stateflow, Simulink verification and validation tools, Polyspace Static Analysis, and Model advisor.
To know how Model-based design framework can help in Embedded Software Verification & Validation, download the below whitepaper
Processor-In-Loop Simulation: Embedded Software Verification & Validation In Model-Based Development