Hi @Liyang,
I've looked into your questions thoroughly and want to give you a complete picture of what's possible after doing extensive research. Unfortunately, GPU acceleration isn't feasible for Simscape-based simulations because GPU support in Simulink only works with MATLAB Function blocks through GPU Coder, not with the physical modeling blocks in Simscape that solve the differential-algebraic equations for your power system components. The Simscape solvers use specialized algorithms that don't map well to GPU architectures, and MathWorks documentation explicitly states that Parallel Computing Toolbox isn't designed to speed up a single Simulink simulation.
Regarding your question about achieving 10x speedup, this level of performance gain isn't realistic for single simulation runs using desktop tools with Simscape models. The speedup examples you might have seen showing 40x or more improvements are for completely different workloads like signal processing or image analysis that involve parallel data operations, not the sequential solving of coupled physical network equations. What you can realistically expect with available optimization methods are more modest improvements: Accelerator mode typically provides 1.4-4x speedup, Rapid Accelerator mode can give 2-5x speedup but requires model recompilation, and parallel simulation using parsim for running multiple scenarios simultaneously might give you 2-4x speedup across your parameter sweeps. If you can use phasor mode simulation instead of full electromagnetic transient analysis for steady-state portions of your study, you could see 10-100xspeedup for those specific analyses, though this won't help with detailed transient simulations. For established workflows, MathWorks maintains a FastElectricalSimulations repository on GitHub ( https://github.com/simscape/FastElectricalSimulations ) that documents best practices specifically for power systems and includes strategies like solver optimization, using averaged converter models instead of detailed switching models, model partitioning to separate subsystems with different time scales, and applying local versus global solvers appropriately. You'll also find guidance in the Simscape Electrical documentation on speeding up your simulation ( https://www.mathworks.com/help/sps/ug/speeding-up-your-simulation.html ) and using the Fast Restart feature.
Beyond these desktop optimizations, there are several other approaches worth considering for your large-scale microgrid work. You can reduce model fidelity by using averaged models for power converters rather than detailed switching models, which significantly reduces computation while maintaining good accuracy for many analyses. Model partitioning allows you to separate independent subsystems and apply different solvers with appropriate time steps to each. For parameter studies or Monte Carlo simulations, MATLAB Parallel Server can distribute work across a cluster, though this helps with running multiple scenarios rather than speeding up a single large simulation.
I know you mentioned that hardware-in-the-loop is less aligned with your use case since you're not interfacing with real-world controllers, but I'd encourage you to reconsider this technology because modern HIL systems are actually extremely well-suited for exactly what you're describing: running many emulated controllers and components efficiently. OPAL-RT's eMEGASIM and ARTEMiS platforms use CPU and FPGA co-processing to simulate networks with tens of thousands of nodes in real-time, achieving sub-microsecond time steps for power electronics that desktop systems simply cannot match. Similarly, dSPACE SCALEXIO systems with their FPGA-based power electronics simulation package can handle switching frequencies up to 100 kHz and integrate directly with Simscape models. These platforms provide true parallel execution through FPGA technology where desktop GPUs fundamentally cannot, because FPGAs can execute the specialized solver algorithms required for physical network simulation in a way that's naturally parallel at the hardware level. The real-time constraint actually forces computational efficiency in a good way, and these systems are specifically designed for the exact problem you're solving: large-scale power system simulation with numerous distributed controllers and components. Companies like Typhoon HIL and Speedgoat also offer solutions in this space with varying capabilities and price points.
If you want to pursue desktop optimization further before considering HIL systems, I'd recommend starting with the FastElectricalSimulations examples, experimenting with phasor simulation where applicable in your workflow, reducing model fidelity for non-critical subsystems, and using parsim if you're running parameter sweeps or scenario analyses. There's also a Simscape to HDL workflow that can convert power electronics models to FPGA-compatible representations for extreme performance, though this requires significant restructuring of your models. The bottom line is that while GPU acceleration would be ideal and intuitive to pursue, it's not supported for the type of physical modeling you're doing, and the path to major performance improvements for large-scale microgrid simulation really does lead toward FPGA-based platforms rather than GPU-based ones.
I hope this clarifies the landscape for you.