[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-detail-128775-en":3,"doc-seo-128775-105":31,"detail-sidebar-cat-0-en-105":93},{"code":4,"msg":5,"data":6},0,"success",{"doc_id":7,"user_id":8,"nickname":9,"user_avatar":10,"doc_module":4,"category_id":11,"category_name":12,"doc_title":13,"doc_description":14,"doc_content":15,"file_id":16,"file_url":17,"file_type":18,"file_size":19,"view_count":20,"is_deleted":4,"is_public":21,"is_downloadable":21,"audit_status":21,"page_count":22,"language":23,"language_code":24,"site_id":25,"html_lang":24,"table_of_contents":26,"faqs":27,"seo_title":28,"seo_description":14,"update_tm":29,"read_time":30},128775,1099523882367,"Hazel","https://ap-avatar.wpscdn.com/davatar_9964176cb1d06d4a9deccf72a44ae3dc",8,"Research & Report","Accelerating the simulation of equation-based models by replacing non-linear algebraic loops with error-controlled machine learning surrogates","Simulating Modelica models can involve non-linear algebraic loops requiring the simultaneous solution of multiple equations, where Newton-Raphson solvers may become computationally expensive. The work proposes a prototype that automatically extracts time-consuming algebraic loops from OpenModelica, generates training data from reference simulations, trains artificial neural network surrogates, and replaces the loops in simulation code. A hybrid strategy combines the surrogate with a nonlinear Newton solver to achieve user-defined accuracy.","Accelerating the simulation of equation-based models by replacing non-linear algebraic loops with error-controlled machine learning  \nsurrogates  \nAndreas Heuermann 1 Philip Hannebohm 1 Matthias Schäfer2 Bernhard Bachmann 1  \n1Institute for Data Science Solutions, Bielefeld University of Applied Sciences and Arts, Germany,  \n{ [first.last}@hsbi.de](first.last}@hsbi.de)  \n2 LTX Simulation GmbH, Germany, [Matthias.Schaefer@ltx.de](Matthias.Schaefer@ltx.de)  \nAbstract  \nWhen simulating a Modelica model, non-linear algebraic loops may be present, which involves solving multiple equations simultaneously. The classical Newton-Raphson method is commonly employed for solving a non-linear equation system (NLS) . However, the computational burden of using this method during simulation can be significant. To tackle this issue, utilizing artificial neural networks (ANNs) to approximate the solution of algebraic loops is a promising approach. While ANN surrogates offer fast performance, ensuring the correctness of the computed solution or quantifying reliability can be challenging.  \nThis publication presents a prototype, based on the OpenModelica compiler (OMC) (Fritzson et al. 2020), that automates the extraction of time-consuming algebraic loops. It generates training data, trains ANNs using machine learning (ML) methods, and replaces the algebraic loops with ANN surrogates in the simulation code. A hybrid approach, combining the trained surrogate with the nonlinear Newton solver, is then used to compute the solution with a desired level of accuracy.  \nKeywords: Machine Learning, Dynamic Systems, Surrogate Model, Non-Linear System, Error Control  \n1 Introduction  \nModelling and simulation play a major role in many fields of science, technology, engineering and mathematics. Modelica (Mattsson and Elmqvist 1997) is an established object-oriented language for multi-domain modeling. It is easy to develop model-based components using simple textbook equations and combine them into detailed and complex cyber-physical systems. With increasing complexity even on modern Modelica compilers simulation performance can slow down.  \nOne way to computational accelerate Modelica components is using ML surrogates. Such a surrogate approximates the equation-based Modelica model with a datadriven approach. When sufficiently trained, a surrogate can replace the corresponding Modelica equations and the resulting speedup can be utilized e.g., in parameter opti-  \nmization.  \nDifferent data-driven ML methods are used in the context of modelling and simulation. ANNs as methods of artificial intelligence (AI) are often used, in particular physics informed neural networks (PINNs) (Lawalet al. 2022), long short-term memory (LSTM) networks (Hochreiter and Schmidhuber 1997), continuoustime echo state networks (CTESNs) (Anantharaman et al. 2020) could demonstrate impressive speedups of simulation time for complex models. While these methods are fast and precise no guarantees for correctness can be made that the surrogate solutions stays within the desired error tolerances.  \nSo called hybrid physical-AI based models are a compromise between classical and ML models. A hybrid model can consist of equations derived from first principle physics as well as data-driven ML models. They offer better simulation performance with acceptable accuracy. While (Hübel et al. 2022) could show improved performance with a reduced order model the resulting hybrid model cannot be used outside of the trained area or ensure a given error tolerance.  \nIn this publication the authors present a partially automated method to replace non-linear algebraic loops of Modelica models with error-controlled ML surrogates to generate hybrid physical-AI based models. The relation between inputs and outputs of the loop are learned from synthesized data and reference simulations. It could be shown, that with the use of ANN the simulation time could be sped up by a factor of 1.5 while keeping the surrogat","cbCaihED6YHslblS","https://ap.wps.com/l/cbCaihED6YHslblS","pdf",1023711,5,1,10,"English","en",105,"# Introduction\n## Problem Statement\n## Paper Organization\n# Method Overview\n## Profiling to Identify Non-linear Systems\n## Training Data Generation\n## Training Neural Surrogates\n## Reducing Training Data Demand\n## Integration and Error Control\n# Results and Discussion\n## Results\n## Encountered Problems\n# Conclusion","[{\"question\":\"Why are non-linear algebraic loops a performance challenge in Modelica simulations?\",\"answer\":\"They require solving multiple equations simultaneously, and the classical Newton-Raphson approach can impose significant computational burden during simulation.\"},{\"question\":\"How does the proposed approach create and use ANN surrogates?\",\"answer\":\"It automatically extracts the costly algebraic loops, synthesizes training data from reference simulations, trains feedforward neural networks, and replaces the loop computations in the simulation code with the trained surrogate.\"},{\"question\":\"What does error-controlled simulation mean in this hybrid method?\",\"answer\":\"The trained surrogate is combined with the nonlinear Newton solver so the solution is computed to a desired level of accuracy while still benefiting from faster surrogate evaluation.\"}]","Accelerating the simulation of equation-based models by replacing non-linear algebraic loops with error-controlled machine learning surrogates | PDF",1786003323,25,{"code":4,"msg":32,"data":33},"ok",{"site_id":25,"language":24,"slug":34,"title":13,"keywords":35,"description":14,"schema_data":36,"social_meta":88,"head_meta":90,"extra_data":92,"updated_unix":29},"accelerating-the-simulation-of-equation-based-models-by-replacing-non-linear-algebraic-loops-with-error-controlled-machine-learning-surrogates","",{"@graph":37,"@context":87},[38,55,70],{"@type":39,"itemListElement":40},"BreadcrumbList",[41,45,49,52],{"item":42,"name":43,"@type":44,"position":21},"https://docshare.wps.com","Home","ListItem",{"item":46,"name":47,"@type":44,"position":48},"https://docshare.wps.com/document/","Document",2,{"item":50,"name":12,"@type":44,"position":51},"https://docshare.wps.com/document/research-report/",3,{"item":53,"name":13,"@type":44,"position":54},"https://docshare.wps.com/document/accelerating-the-simulation-of-equation-based-models-by-replacing-non-linear-algebraic-loops-with-error-controlled-machine-learning-surrogates/128775/",4,{"url":53,"name":13,"@type":56,"author":57,"headline":13,"publisher":59,"fileFormat":62,"inLanguage":24,"description":14,"dateModified":63,"datePublished":64,"encodingFormat":62,"isAccessibleForFree":65,"interactionStatistic":66},"DigitalDocument",{"name":9,"@type":58},"Person",{"url":42,"name":60,"@type":61},"DocShare","Organization","application/pdf","2026-08-25","2026-08-06",true,{"@type":67,"interactionType":68,"userInteractionCount":20},"InteractionCounter",{"@type":69},"ViewAction",{"@type":71,"mainEntity":72},"FAQPage",[73,79,83],{"name":74,"@type":75,"acceptedAnswer":76},"Why are non-linear algebraic loops a performance challenge in Modelica simulations?","Question",{"text":77,"@type":78},"They require solving multiple equations simultaneously, and the classical Newton-Raphson approach can impose significant computational burden during simulation.","Answer",{"name":80,"@type":75,"acceptedAnswer":81},"How does the proposed approach create and use ANN surrogates?",{"text":82,"@type":78},"It automatically extracts the costly algebraic loops, synthesizes training data from reference simulations, trains feedforward neural networks, and replaces the loop computations in the simulation code with the trained surrogate.",{"name":84,"@type":75,"acceptedAnswer":85},"What does error-controlled simulation mean in this hybrid method?",{"text":86,"@type":78},"The trained surrogate is combined with the nonlinear Newton solver so the solution is computed to a desired level of accuracy while still benefiting from faster surrogate evaluation.","https://schema.org",{"og:url":53,"og:type":89,"og:title":13,"og:site_name":60,"og:description":14},"article",{"robots":91,"canonical":53},"index,follow",{"doc_id":7,"site_id":25},{"code":4,"msg":5,"data":94},[95,99,103,107,111,116,121,124,129,132,135],{"id":21,"doc_module":4,"doc_module_name":47,"category_name":96,"show_sort_weight":97,"slug":98},"Story & Novel",90,"story-novel",{"id":48,"doc_module":4,"doc_module_name":47,"category_name":100,"show_sort_weight":101,"slug":102},"Literature",80,"literature",{"id":54,"doc_module":4,"doc_module_name":47,"category_name":104,"show_sort_weight":105,"slug":106},"Exam",70,"exam",{"id":20,"doc_module":4,"doc_module_name":47,"category_name":108,"show_sort_weight":109,"slug":110},"Comic",60,"comic",{"id":112,"doc_module":4,"doc_module_name":47,"category_name":113,"show_sort_weight":114,"slug":115},6,"Technology",50,"technology",{"id":117,"doc_module":4,"doc_module_name":47,"category_name":118,"show_sort_weight":119,"slug":120},7,"Healthcare",40,"healthcare",{"id":11,"doc_module":4,"doc_module_name":47,"category_name":12,"show_sort_weight":122,"slug":123},30,"research-report",{"id":125,"doc_module":4,"doc_module_name":47,"category_name":126,"show_sort_weight":127,"slug":128},9,"Religion & Spirituality",20,"religion-spirituality",{"id":127,"doc_module":4,"doc_module_name":47,"category_name":130,"show_sort_weight":127,"slug":131},"World Cup","world-cup",{"id":22,"doc_module":4,"doc_module_name":47,"category_name":133,"show_sort_weight":22,"slug":134},"Lifestyle","lifestyle",{"id":136,"doc_module":4,"doc_module_name":47,"category_name":137,"show_sort_weight":20,"slug":138},19,"General","general"]