Symbolic computation delivers advances for model creation
Faster computers and modeling/simulation software have revolutionized the design process for control system engineers. By using model based development (MBD) methods and crafting a virtual simulation prototype before committing to metal, plastic, or silicon., innovative engineers are exploring more design options, more successfully predicting performance, and optimizing systems more quickly tha...
Faster computers and modeling/simulation software have revolutionized the design process for control system engineers. By using model based development (MBD) methods and crafting a virtual simulation prototype before committing to metal, plastic, or silicon., innovative engineers are exploring more design options, more successfully predicting performance, and optimizing systems more quickly than ever before.
Although the current MBD software toolchain is effective, engineers in many fields also are experiencing one of those fundamental sea changes typical in computing circles: New software techniques are delivering models that are much faster, have higher fidelity, and are simply smarter than traditional engineering modeling software. Software that traditionally has been used for mathematics research and education is being used in engineering modeling to rapidly produce concise, numerically efficient models of complex systems for high-performance execution. The control-design field is one of the areas feeling this most.
Over the past 20 years, techniques for simulating and implementing embedded control systems have developed into a high art. However, one element of the design process still remains something of a black art: the process of developing the necessary equations required for a simulation. Plant modeling remains a cumbersome, often daunting and error-prone task. Many feel that for the emerging era of everything-by-wire, more automated techniques are required.
Analog computers in history
Digital computer evolution is the stuff of legends. Lesser known is that of the analog computer. With similar beginnings in the mid-20th century, these cousins of the digital computer were even more intimately tied to modeling equations.
Unlike digital computers that need to be programmed with a suitable numerical method to solve a math problem, analog computers actually have the integration hardwired in—that is, they had integrator circuits. The inputs were real voltage signals that varied continuously, and these signals were appropriately integrated directly by the circuits.
With the right software layers, much of the left arm in a V diagram has software support. The part of the process that used to take 80% of project time now has solid computation support.
The outputs were also voltage signals, which were usually viewed on an oscilloscope. The benefits of the analog computer included solutions found instantaneously via the circuitry, and no round-off errors issues. By the mid-’70s, though, the flexibility and ease of use of the digital computer relegated the analog computer to the history books.
Why is this important? Because the news of analog computers’ demise is somewhat exaggerated. Though the machines are no longer useful, some of the basic concepts are, in fact, thriving in the engineering world in some very well-known products such as The Mathworks’ Simulink and National Instruments’ LabVIEW, which are often called “signal-flow” simulation systems. These signal-flow paradigms are the software foundations of the modern controller design process; however, many engineers feel these paradigms are woefully inefficient for plant modeling phases.
Plant modeling in a signal-flow world
In many ways, signal-flow models can be considered “virtual analog computer” models. They use the same conceptual and mathematical framework as the analog computer, but you enter your schematics in a robust, flexible, digital software environment. Unfortunately, this similarity is now part of an analytical bottleneck that is plaguing many organizations.
The bottleneck results from a fundamental issue with the signal-flow systems: They require the full mathematical (differential) equations of the plant model before they can be implemented in software as block diagrams. As with the analog computer, significant amounts of effort must go into the manual derivation of these equations. Of course, actual implementation on the computer is much easier today, but the reality is that the plant model derivation can be very time-consuming.
Some experts estimate that upwards of 80% of a modeling and simulation project time is spent on the derivation, and that time is typically spent on error-prone manual methods such as paper and pencil, calculators, and reference books. Even with immensely powerful signal-flow tools, a large part of the engineering project remains poorly supported by good software.
Another bit of history is important here. Since the 1950s, two parallel worlds of mathematical computing have existed: numeric computation and symbolic computation. Most engineers are familiar with numeric computation—iterative approximation techniques for calculating a numerical solution to a math problem. Runge-Kutta and Newton-Raphson are familiar names to anyone who has graduated from an engineering college in the past 30 years. Symbolic computation, on the other hand, seeks exact mathematical results that maintain the algebraic (symbolic) structure of the equations. In some loose sense, it applies the formal rules of algebra and calculus to derive a full mathematical answer, rather than a series of numbers. Well-known symbolic computation technologies include Maple, MACSYMA, and Mathematica.
Historically, numeric computation ruled the engineering world because it was so good at crunching out the answers. Symbolic computation had its biggest fans in the academic world where the importance of rigorous mathematical and theoretical methods was much more pronounced. Fast-forward to today and you’ll see the convergence of these distinct technologies in the context of plant modeling.
Benefits of symbolic methods
As it turns out, symbolic technology is quite good at doing the kind of math that engineers must complete to develop system model equations manually. In fact, with the right software layers, a considerably larger portion of the left arm of the familiar “V” diagram for control system development has software support (see figure). The part of the process that used to take 80% of project time now has solid computation support.
Another significant benefit of symbolic methods is the natural adaptation to multi-domain modeling. In the auto industry, innovation in modern cars is often enabled by electronics. Of course, these circuits are connected to and directly operate with the mechanical, hydraulic, thermal, chemical, and other components. For the performance and efficiency that control systems engineers need, the new generation of models must accommodate multi-domain modeling.
MapleSim represents the convergence of model generation tools with the full capabilities of a symbolic engine (Maple) to drive model equation generation and solution.
The symbolic approach naturally adapts to multi-domain modeling because any known modeling framework will, inevitably, boil the components down to their mathematical definitions and “connect” the equations in a suitable way.
Perhaps the most surprising benefit from symbolic computation is the potential to speed up simulation times. Historically, the numerical computation world enjoyed the spotlight as the technique that was fast enough for engineering prime time. However, with recent developments in the symbolic computing world, engineers have developed hybrid computing techniques that combine the respective strengths of both technologies to produce models that have execution speed increases of 10 times or more.
This is critical for key simulation techniques such as hardware-in-the-loop (HIL) and other real-time applications. The concept is surprisingly simple: Use the symbolic algorithms to simplify and optimize model equations before the iterative numerical solution step. Such rebalancing of the computing load has been one of the key factors in the rapid adoption of symbolic techniques in engineering circles. Some have even called simulation speedup the “killer application” for symbolic computation.
So how will the average engineer use these new techniques? Vendors of the traditional signal-flow systems have already begun delivering plant or physical modeling front-ends to their software. The benefit of this approach, of course, is that it builds on the existing infrastructure. The disadvantage is that desired modern functionality, such as model simplification and optimization, is impeded by the conventional signal-flow infrastructure, and the jury is still out on whether this is the best way to proceed.
The other interesting stream of activity comes from systems that begin with a new framework altogether. One of the most promising among this group is the system MapleSim from Maplesoft. The company is well known for Maple and Maple’s depth in symbolic computation. More recently, Maplesoft began offering a range of model generation tools that offer modeling assistance from within Maple. MapleSim represents the convergence of these new technologies with the full capabilities of the symbolic engine to drive the necessary model equation generation and solution.
Furthermore, unlike traditional signal-flow diagrams, MapleSim’s object-oriented modeling graphical user interface (GUI) maintains the models in a form that closely resembles the actual physical form of the system. This means complex models are easier to configure.
Computers have done math ever since they were invented. However, for the longest time, the various tools of the day seemed to force engineers into counterintuitive ways of thinking.
Driven by market forces and noticeable symptoms of an aging software toolchain, the control community is witnessing a major transformation in the way the models are created and solved. In many ways, the new generation of software is better suited to replicating what humans naturally do—sketch physical system diagrams, for example, or look for opportunities to simplify equations—except on a computer this will be instantaneous and error-free. By focusing on the tasks that have historically demanded the most brainpower, the new tools help engineers do their jobs not only faster, but a lot smarter.
Tom Lee is chief evangelist at Maplesoft. Contact him by email at firstname.lastname@example.org
|Search the online Automation Integrator Guide|
Case Study Database
Get more exposure for your case study by uploading it to the Control Engineering case study database, where end-users can identify relevant solutions and explore what the experts are doing to effectively implement a variety of technology and productivity related projects.
These case studies provide examples of how knowledgeable solution providers have used technology, processes and people to create effective and successful implementations in real-world situations. Case studies can be completed by filling out a simple online form where you can outline the project title, abstract, and full story in 1500 words or less; upload photos, videos and a logo.
Click here to visit the Case Study Database and upload your case study.