All You Want To Know About Battery Blocks in Simulink
In the current decade, battery technology has gained huge traction in the automotive as well as other industries. Several innovative solutions are discovered to hasten the battery modeling process and thereby increase its efficiency.
All You Want To Know About Battery Blocks in Simulink
In the current decade, battery technology has gained huge traction in the automotive as well as other industries. Several innovative solutions are discovered to hasten the battery modeling process and thereby increase its efficiency. Simulink helps in addressing many challenges by enabling engineers to build battery blocks which in turn allows them to simulate the behavior of the battery in a real-time environment.
This article will help you to understand the different functions of the battery blocks available in Simulink Library. Depending on the circuit/model, we can make use of these blocks for experimenting with different battery parameters

- Generic battery model
Library: Simscape / Electrical / Specialized Power Systems / Electric Drives / Extra Sources
The Battery block implements a generic dynamic model that represents the most popular types of rechargeable batteries. This block can be made use to analyze charge/discharge characteristics, SOC, temperature effects, and age equivalent of the battery system. You can extract parameters from a datasheet and give it to this battery block to check the OCV characteristics and Discharge rates.
- Behavioral battery model
Library: Simscape / Electrical / Sources
The Battery block represents a simple battery model. This block can be used to simulate thermal effects, measure the internal charge level of the battery, and output the battery charge level
If you select Infinite for the Battery charge capacity parameter, the block models the battery as a series resistor and a constant voltage source. If you select Finite for the Battery charge capacity parameter, the block models the battery as a series resistor and a charge-dependent voltage source
- Battery
Measures voltage of the battery in EV3 brick
Library: Simulink® Support Package for LEGO® MINDSTORMS® EV3 Hardware.
The Battery block measures the voltage of the battery in the LEGO MINDSTORMS EV3 brick in millivolts. For example, when the six 1.5-volt batteries are fully charged, the output value is approximately 9000 millivolts. During simulations without hardware, this block emits zeros
- Battery
Library: Embedded Coder Support Package for PX4 Autopilots / PX4 Sensor Blocks
The Battery block reads the battery_status uORB topic and outputs the details about the state of the battery connected to PX4 flight controller. The block also outputs the timestamp.
On each simulation step, the block checks if a new message is available on the battery_status topic. If a new message is available, the block retrieves the message and converts it to the output values. If a new message is not available, the outputs are based on the last received uORB message. If a message has not been received since the start of the simulation, the outputs are zeroes.
- Battery Table Based
- Library: Simscape / Electrical / Sources
The Battery (Table-Based) block represents a high-fidelity battery model. The block calculates no-load voltage as a function of charge level and optional temperature using lookup tables and includes several modeling options:
- Self-discharge
- Battery fade
- Charge dynamics

- Datasheet Battery
- Library: Powertrain Blockset / Energy Storage and Auxiliary Drive / Datasheet Battery
The Datasheet Battery block implements a lithium-ion, lithium-polymer, or lead-acid battery that you can parameterize using manufacturer data. To create the open-circuit voltage and internal resistance parameters that you need for the block, use the manufacturer discharge characteristics by temperature data.
- CCCV Battery charger
Constant-current constant-voltage battery charger
- Library: Simscape / Electrical / Specialized Power Systems / Electric Drives / Extra Sources
The CCCV Battery Charger block implements a generic dynamic model battery charger. This model supports three-phase wye or delta AC, one-phase AC, or DC voltage input. The model also provides an optional ambient temperature input for charging voltage temperature compensation.
- Battery Indicator
Display the battery voltage level with LEDs on the TFC shield
Library: Simulink Coder Support Package for NXP FRDM-KL25Z Board/ FRDM-TFC Shield
This block controls the four LEDs on the TFC Shield to indicate the present level of the battery voltage. Each LED represents 25% of the battery voltage. When the input is between 0.75 and 1.0, all four LEDs are on, and when the input reduces to a value between 0.0 and 0.25, only one of the LEDs is on. During simulations without the hardware, this block does nothing.
- Battery Read
Read the voltage of the battery
- Library: Simulink Support Package for Arduino Hardware / MKR Motor Carrier
The Battery Read block reads the voltage of the battery connected to an MKR Motor Carrier. The block outputs the voltage as a 12-bit digital value ranging between 0 and 4095. An output of 0 corresponds to minimum volts, and an output of 4095 corresponds to maximum volts on an analog pin connected to the battery.
If you simulate a model that contains the Battery Read block without connecting the hardware, the block outputs zeroes.
You can use the Battery Read block only with MKR and Nano 33 IoT boards.
To know more about battery technology, enroll in Skill-Lync’s Battery Technology course. Our experts have clearly explained the process involved in developing a battery model. Talk to our experts to get your free demo.