Deployment and Hardware-in-the-Loop Simulation
Simscape™ Battery™ includes Simscape blocks to connect to real-time hardware inputs and outputs. When you use these blocks with real-time hardware, you can easily connect your battery simulations to a real-world battery balancing hardware. Use this capability to help design and verify your battery balancing algorithms and to ensure that they work correctly during regular operations and adequately detect degraded operation or ride through faults.
You can develop and test battery balancing strategies by simulating your custom battery blocks with the blocks in the Battery Management System library of Simscape Battery. Options on the physical blocks enable you to assume ideal thermal measurements, thermal estimation or state-of-charge estimation algorithms until you have designed and implemented actual thermal measurements or state-of-charge algorithms.
For more information on how to use a Simscape model as the plant model for hardware-in-the-loop (HIL) testing, see Simscape Real-Time Simulation.
Simscape Blocks
| Active Interface | Active interface between battery and cell supervisory circuit (Since R2022b) |
| Passive Interface | Passive interface between battery and cell supervisory circuit (Since R2022b) |
| Passive Balancing Interface | Interface for cell balancing between battery and cell supervisory circuit (Since R2024a) |
Topics
- Solvers for Real-Time Simulation
The fixed-step solver, step size, and number of iterations that you specify affect how your Simscape model simulates in real time.
- Software and Hardware Configuration
Before you simulate your Simscape model on your target hardware using Simulink® Real-Time™, follow the recommendations to configure your development and target computers for code generation and real-time simulation.
- Simulink Real-Time Code Generation
Follow the recommendations for minimum hardware and software specifications to deploy your Simscape model for hardware-in-the-loop (HIL) simulation using Simulink Real-Time.
- Generate HDL Code for FPGA Platforms from Simscape Models
Learn how to convert Simscape models to HDL Code for FPGA Deployment.