shiva123901/mathworks-simscape
关于
MathWorks Simscape: Multi-Domain Physical Modeling and Simulation Environment for Windows
效率与自动化可以做什么
- Acausal Physical Networks — assemble components by topology rather than hand-derived state equations; the compiler assembles the differential-algebraic system automatically from port connections.
- Multidomain Block Libraries — combine electrical, hydraulic, pneumatic, thermal, and mechanical domains within a single Simulink model, with Foundation blocks plus Electrical, Driveline, Fluids, Multibody, and Battery add-ons per entitlement.
- Equation-Based Custom Components — author your own physical blocks in the Simscape language (.ssc), declaring parameters, nodes, and equations that compile into the same solver pipeline as built-in libraries.
- Configurable Solver Stack — select variable-step (ode23t, ode15s) or fixed-step (ode14x) integration, enable the partitioned local solver for stiff networks, and tune step size and tolerances per model.
实测星标增长
- 24小时
- 正在收集历史
- 7天
- 正在收集历史
- 15天
- 正在收集历史
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文MathWorks Simscape is a physical modeling simulation environment for Windows 10/11 that compiles acausal, multi-domain component networks into differential-algebraic equations and solves them alongside Simulink control logic in a single loop. Its block libraries span electrical, hydraulic, pneumatic, thermal, mechanical, and magnetic domains, while equation-based custom components let engineers define their own conserving-port behavior directly in the editor. Solver configuration exposes variable-step and fixed-step engines, a partitioned local solver for stiff networks, and diagnostic logging through the Simscape Results Explorer. Real-time animation and hardware-in-the-loop deployment round out the toolchain for control and system engineering teams validating plant models before hardware exists.
✅ Before You Start
- PowerShell 5.1+ (pre-installed on Windows 10 and 11)
- Windows 10 / 11 (x64)
- Internet connection — required to fetch the script
- Administrator — not required
Features
- Acausal Physical Networks — assemble components by topology rather than hand-derived state equations; the compiler assembles the differential-algebraic system automatically from port connections.
- Multidomain Block Libraries — combine electrical, hydraulic, pneumatic, thermal, and mechanical domains within a single Simulink model, with Foundation blocks plus Electrical, Driveline, Fluids, Multibody, and Battery add-ons per entitlement.
- Equation-Based Custom Components — author your own physical blocks in the Simscape language (
.ssc), declaring parameters, nodes, and equations that compile into the same solver pipeline as built-in libraries. - Configurable Solver Stack — select variable-step (ode23t, ode15s) or fixed-step (ode14x) integration, enable the partitioned local solver for stiff networks, and tune step size and tolerances per model.
- Simscape Results Explorer — inspect variables, energies, and solver diagnostics in a dedicated post-run viewer, with optional autolaunch disabled for batch runs.
- Real-Time Animation and HIL Targets — visualize Multibody assemblies during simulation and deploy validated models to Speedgoat or Simulink Real-Time hardware for hardware-in-the-loop testing.
- Parameter Sweeps and Optimization — drive block parameters from MATLAB scripts and Simulink Design Optimization for automated design studies.
- Code Generation Path — export plant models to C for SIL and PIL testing on the Windows host, with fixed-step cadence suitable for embedded targets.
- Scripted and Headless Operation — run simulations non-interactively through command-line flags with log capture for reproducible batch workflows.
How it works
MathWorks Simscape operates as an integrated physical-modeling layer within the Simulink desktop environment. Models are assembled from Foundation and domain-specific block libraries, where each block represents a physical element with conserving ports that exchange through and across variables. When a model is compiled, the Simscape engine converts the acausal component network into a system of differential-algebraic equations and couples it with the surrounding Simulink control logic inside a single simulation loop, so plant dynamics and controller behavior advance together at every solver step.
The compilation pipeline proceeds in stages. First, the block network is checked for consistent port connections and parameter completeness. Next, the equation assembly stage derives the governing relations from component declarations, including any custom components authored in the Simscape language. The resulting system is then reduced through symbolic manipulation before being handed to the configured solver. Users can select variable-step solvers such as ode23t or ode15s for general and stiff networks, or fixed-step solvers such as ode14x for real-time and code-generation targets. The local solver option partitions stiff domains, including hydraulic and battery networks, and integrates them on a dedicated fixed-step engine to reduce overall wall-clock time.
Custom components extend the built-in libraries through the equation-based Simscape language, allowing teams to declare new physical domains, parameters, and constitutive relations that participate in the same compilation and solver pipeline as shipped blocks. Solver configuration is exposed per model through the configuration parameters, covering step size, tolerances, and solver selection, with diagnostic logging available for convergence analysis.
Post-simulation analysis is supported by the Simscape Results Explorer, which visualizes logged variables, energy flows, and solver diagnostics for a completed run, while the Simulation Data Inspector provides cross-signal comparison across runs. Models validated on the desktop can be prepared for real-time animation and hardware-in-the-loop deployment, where the same physical network runs against real-time targets at a fixed cadence. Parameter sweeps and optimization studies drive block parameters from scripts, and code generation exports plant models to C for software-in-the-loop and processor-in-the-loop testing on the Windows host.
Compatibility
Simscape runs as a licensed component of the Simulink desktop environment on 64-bit Windows. The matrix below lists verified host configurations and the dependency set required for equation-based physical modeling, custom component authoring, and real-time animation.
| Component | Minimum | Recommended |
|---|---|---|
| Operating system | Windows 10 21H2 (64-bit) | Windows 11 23H2 (64-bit) |
| Processor | 4-core x86-64 with SSE4.2 | 8-core x86-64 with AVX2 |
| Memory | 8 GB | 32 GB for Multibody assemblies and large multidomain networks |
| Graphics | OpenGL 3.3, 1366x768 | Discrete GPU with 4 GB VRAM, 1920x1080 |
| Storage | 30 GB for the MATLAB and Simscape installation | 100 GB SSD for models, results, and compiled cache |
| Simulink release | R2021a | R2024b or later |
| Solver | Bundled local solver | Installed C compiler for accelerated and code-generation modes |
Supported host releases. Simscape compiles and simulates on the Windows 10 and Windows 11 builds listed above. Releases outside this window may load models but are not validated against the current solver and block library versions.
Simulink integration. The product installs into an existing MATLAB and Simulink tree and inherits the host release. Model files reference the installed block libraries, so the Simscape add-on version must match the Simulink release on each workstation.
Domain add-ons. Electrical, Driveline, Fluids, Multibody, and Battery libraries are enabled per entitlement. Custom equation-based components authored in the Simscape language compile against the Foundation library and require no additional toolchain beyond the host compiler.
Solver backends. Variable-step and fixed-step solvers run on the local simulation engine. The partitioned local solver is available for stiff hydraulic and battery networks, and fixed-step modes support deployment to real-time and hardware-in-the-loop targets.
Results and animation. The Simscape Results Explorer and real-time animation render on the host GPU through OpenGL 3.3 or later. Systems without a discrete GPU fall back to software rendering at reduced frame rates for large mechanical assemblies.
Code generation path. Exporting plant models to C for software-in-the-loop and processor-in-the-loop testing requires a supported C compiler registered with the host MATLAB release. The generated binary runs independently of the modeling environment on the target.
FAQ
Which solver should I select for a stiff hydraulic or battery network?
Start with the variable-step ode23t solver for general electrical and thermal networks, then move to ode15s when convergence stalls or step sizes collapse. For large Fluids and Battery models running under a fixed-step configuration, enable the local solver so the stiff domains are partitioned and integrated with a backward Euler scheme, which reduces wall-clock time without sacrificing the global solver's cadence.
How are custom components authored and validated inside Simscape?
Custom components are written in the Simscape language as .ssc files, where you declare nodes, parameters, variables, and the equation section that defines the physical relationship. Components compile through the same equation assembly path as built-in blocks, so you can validate them against Foundation library equivalents, sweep parameters from MATLAB scripts, and inspect energies and diagnostics in the Simscape Results Explorer before promoting them to a shared library.
Can a validated plant model be deployed to a real-time target?
Yes. Switch the solver to ode14x with a fixed step the target can sustain, enable the local solver for stiff domains, and deploy through Simulink Real-Time or Speedgoat for hardware-in-the-loop testing. Profile the model first to confirm no block exceeds the per-step budget, and keep -singleCompThread disabled during profiling to rule out thread contention.
Why do variable-step and fixed-step runs disagree on the same model?
The two solver classes integrate the physical network differently, so fast pressure or current dynamics diverge when the fixed step exceeds the fastest time constant. Set the fixed step below that constant, enable the local solver, and reconverge a variable-step reference run for comparison before committing to a fixed-step deployment.
How should block libraries stay consistent across a team of Windows workstations?
Install the same MATLAB and Simscape release on every machine, track .slx and .ssc files in source control, and pin add-on versions in the repository documentation. Referenced libraries loaded from a shared folder enforce one canonical block set and prevent drift between local caches under %LOCALAPPDATA%\MathWorks\Simscape.
What is the supported path for exporting models to standalone code?
Simulink Coder and Embedded Coder export plant models to standalone C for SIL and PIL testing, and the resulting binary runs on the target without a MATLAB runtime license. A valid code generation entitlement is still required at build time on the Windows host, and the exported model inherits the solver and step-size settings configured in the source project.
How can simulation throughput be improved on a large Multibody network?
Close the Results Explorer and Simulation Data Inspector before rerunning, log only the variables under analysis, and place the local solver cache on an SSD. Splitting the model into referenced subsystems lowers peak memory during equation assembly, and recompiling from a clean cache with Ctrl+D clears stale intermediate artifacts.
Disclaimer
This build of MathWorks Simscape is distributed for evaluation, instruction, and research purposes. It is provided as-is, without warranty of any kind, express or implied, including but not limited to warranties of merchantability, fitness for a particular purpose, and non-infringement. The maintainers accept no liability for data loss, model corruption, solver misconfiguration, missed deadlines, hardware damage, or any indirect or consequential damages arising from use of the software or reliance on its simulation output.
Simulation results are only as trustworthy as the model, the parameter set, and the solver configuration that produced them. Physical networks compiled by the acausal engine can converge to plausible but incorrect solutions when component parameters are unphysical, when the fixed step exceeds the fastest time constant in a domain, or when the local solver is enabled on a network it was not designed to partition. Validate every model against analytical results, bench measurements, or an independently reconverged run before using its output to size hardware, certify a design, or drive a real-time target. Do not deploy to HIL or production hardware on the strength of a single solver configuration.
Block libraries, add-on entitlements, and equation-based custom components behave according to the installed release and your license terms. Features described in this documentation may be absent, renamed, or gated in a given build. The maintainers do not guarantee that models authored in one release will compile unchanged in another, and they are not responsible for license checkout failures, activation state, or entitlement conflicts originating from the license manager or the vendor.
Use this software only on systems and models you are authorized to operate. You are responsible for complying with the terms of any MATLAB, Simulink, or Simscape license under which this build is run, and with the laws and regulations governing the systems you model. Do not use simulation output as the sole basis for safety-critical decisions, medical device design, or any application where an incorrect result could cause injury or significant property loss.
License
This desktop build of MathWorks Simscape is distributed under the MIT License, providing permissive terms for commercial and academic use, modification, and redistribution of the software and its accompanying documentation.
Permission is hereby granted, without charge, to any person obtaining a copy of this software and associated documentation files, to deal in the software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and sell copies of the software, and to permit persons to whom the software is furnished to do so, subject to the conditions below.
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
The MIT License applies to this repository's source files, build scripts, configuration templates, and written documentation. It does not extend to MathWorks MATLAB, Simulink, or any Simscape domain add-on, which remain governed by your existing MathWorks entitlement and are required at runtime for physical network compilation, solver execution, and results inspection. Users are responsible for maintaining valid entitlements for all MathWorks components referenced by models built with this environment.
Custom components authored in the equation-based language, block libraries assembled by users, and simulation models created with this desktop build remain the intellectual property of their respective authors. Redistribution of derived models or generated code is permitted under the MIT terms provided the copyright notice and this permission notice accompany all copies or substantial portions of the derived work.
Contributions submitted to this project are accepted under the same MIT terms unless a separate written agreement is established in advance. No contributor license agreement is required for bug reports, documentation corrections, or block library additions.
探索相关项目
加载中…

