State Of Charge control of Lithium-ion battery in MATLAB/Simulink!

The Urban Scholar
15 Jul 202010:29

Summary

TLDRThis video demonstrates how to control the charging and discharging of a lithium-ion battery based on its state of charge (SOC). The simulation uses a 7.2V, 5.4Ah battery and a 1000W purely resistive load. The video explains how to set up a simulation in a power GUI block, connect a DC voltage source, and implement an SOC-based control system with an ideal switch and state flow chart. The battery charges and discharges between specified time intervals, and the video provides step-by-step instructions for replicating this simulation. Viewers are encouraged to engage and explore more content.

Takeaways

  • 🔋 The video explains how the state of charge (SOC) of a lithium-ion battery can be used to control charging and discharging.
  • ⚡ The battery has a nominal voltage of 7.2 volts and a nominal capacity of 5.4 ampere hours.
  • 📉 It's advised not to fully charge or discharge the lithium-ion battery to extend its lifespan.
  • 🔌 The battery is connected to a resistive load with a power of 1000 watts.
  • ⏳ The discharge time is set between 50 seconds to 150 seconds of the simulation.
  • 🖥️ A power GUI block is required for the simulation, and the battery must be connected to a DC voltage source with a higher voltage than the battery’s rated 7.2 volts.
  • 📊 A state flow chart is used to manage the battery's charging and discharging states based on the SOC parameter.
  • 🔄 When the SOC exceeds 80%, the battery stops charging, and if it falls below 40%, it stops discharging and begins charging.
  • 🔌 The load is purely resistive with 1000 watts of power, and ideal switches are used to control the charge and discharge timing.
  • ⏲️ A clock, compare block, and logic components are used to ensure that the discharge happens only between 50 and 150 seconds of simulation.

Q & A

  • What is the nominal voltage and capacity of the lithium-ion battery mentioned in the video?

    -The nominal voltage of the battery is 7.2 volts, and its nominal capacity is 5.4 ampere-hours.

  • Why is it advised not to fully charge or discharge a lithium-ion battery?

    -It is recommended not to fully charge or discharge a lithium-ion battery to prevent degradation of the battery's lifespan and to maintain its efficiency.

  • What is the load on the battery, and what type of load is it?

    -The load on the battery is 1000 watts, and it is a purely resistive load.

  • During which time interval does the battery discharge in the simulation?

    -The battery discharges between 50 seconds and 150 seconds of the simulation.

  • What is the purpose of the 'power GUI block' in the simulation?

    -The 'power GUI block' is used to set up the simulation environment for simulating power systems, such as the charging and discharging of the battery.

  • How is the state of charge (SOC) monitored in the simulation?

    -The SOC is monitored by using a bus that selects only the SOC parameter from the lithium-ion battery and displays it using a scope.

  • What does the state flow chart represent in this simulation?

    -The state flow chart represents the different charging states of the battery, allowing transitions between charging and discharging based on the SOC level.

  • What conditions trigger the battery to switch between charging and discharging?

    -The battery switches to charging if the SOC is less than 40% and switches to discharging if the SOC is greater than 80%.

  • How is the load represented in the simulation, and what are its characteristics?

    -The load is represented by an RLC load block, and in this case, it is modeled as a purely resistive load with 1000 watts of active power, zero inductance, and zero capacitance.

  • How does the simulation ensure that the discharge occurs only between 50 and 150 seconds?

    -The simulation uses a clock block and compare blocks to define the time interval, ensuring the discharge happens between 50 and 150 seconds, controlled by logic gates and switches.

Outlines

00:00

🔋 Overview of Battery Charge and Discharge Control

In this introduction, the video outlines how to use the state of charge (SOC) to control the charging and discharging of a lithium-ion battery. The battery has a nominal voltage of 7.2V and a capacity of 5.4 Ah. The load is 1000W, purely resistive, and the discharge occurs between 50-150 seconds during the simulation. The video starts by explaining the necessary components, such as a power GUI block, a battery, and a DC voltage source, highlighting that the voltage source should exceed the battery voltage for proper charging.

05:02

⚙️ Selecting SOC Parameters and Implementing Circuit Components

This section focuses on the SOC (state of charge) and how to select it as a parameter to monitor in the simulation. It covers the use of a bus to select only the SOC parameter of the battery and provides a step-by-step guide to connect the components. The video demonstrates how to add a scope and switching components for monitoring the battery's charge and discharge behavior. An ideal switch is introduced to control the battery states based on SOC values, connecting these states to a state flow chart and defining parameters such as 'pulse' for charging and discharging.

10:05

🔄 Logic Design for Battery Discharge Timing

Here, the video details the logic for discharging the battery between 50 and 150 seconds. It explains how to set up a clock, compare blocks, and product blocks to control the timing. The design ensures the battery discharges only within the specified time frame. Additionally, a NOT gate is used for logic inversion. This part also addresses some troubleshooting aspects, such as correcting case-sensitive naming errors for parameters and ensuring proper pulse assignment for switching between charging and discharging states.

🔍 Final Simulation and Conclusion

The video concludes by running the simulation and showing that the battery charges and discharges as expected between 50-150 seconds. The presenter also corrects some minor mistakes in the model and parameter names, ensuring the simulation runs smoothly. The video closes by encouraging viewers to watch more simulation-related content, inviting them to like, subscribe, and engage with the channel.

Mindmap

Keywords

💡State of Charge (SOC)

The State of Charge (SOC) refers to the current charge level of a battery as a percentage of its total capacity. In the video, the SOC is a critical parameter used to control when the lithium-ion battery is charged or discharged, based on predefined thresholds. For example, charging stops if the SOC exceeds 80%, and discharging stops if it falls below 40%.

💡Lithium-Ion Battery

A lithium-ion battery is a type of rechargeable battery commonly used in electronic devices. In the video, the simulation centers on how to manage charging and discharging cycles for a lithium-ion battery with a nominal voltage of 7.2V and a capacity of 5.4 ampere hours. The video advises against fully charging or fully discharging the battery to prolong its life.

💡Nominal Voltage

Nominal voltage is the standard voltage at which a battery is designed to operate. The video mentions a nominal voltage of 7.2 volts for the lithium-ion battery being simulated. The DC voltage source used in the simulation must have a voltage higher than the battery's nominal voltage to ensure proper charging.

💡Purely Resistive Load

A purely resistive load is an electrical load where the current is proportional to the voltage, without any phase shift caused by inductance or capacitance. The video specifies a 1000-watt resistive load, meaning the battery powers this load without considering any inductive or capacitive components, which simplifies the simulation.

💡Power GUI Block

The Power GUI block is a graphical interface tool used in simulation software to manage the settings of electrical models. In the video, the Power GUI block is introduced as the first step in setting up the simulation, allowing users to manage the power-related configurations of the battery model.

💡DC Voltage Source

A DC voltage source provides a constant direct current voltage. In the simulation, it is connected to the lithium-ion battery to simulate the charging process. The voltage of the DC source must be higher than the battery's nominal voltage to charge the battery correctly.

💡SOC Parameter

The SOC parameter specifically refers to the battery’s State of Charge in the simulation model. It is the key variable monitored to trigger charging and discharging actions based on thresholds set by the user. In the video, the SOC parameter is selected using a bus block to be used in the control logic.

💡Switching Component

A switching component is used in the circuit to control when the battery charges or discharges. In the video, an ideal switch is used to manage the flow of current between the battery and the load, depending on the SOC level and the timing set for the discharge cycle.

💡Stateflow Chart

A Stateflow chart is a graphical representation used to model the state-based logic in simulations. In the video, the Stateflow chart is used to define the 'Charge' and 'Discharge' states of the battery, where transitions are controlled by the SOC levels. The chart helps automate when the battery switches between charging and discharging.

💡RLC Load

An RLC load is a load that combines resistance (R), inductance (L), and capacitance (C). In the video, a purely resistive RLC load is used, where the inductance and capacitance are set to zero. The load is modeled as 1000 watts to represent the power drawn from the battery during the discharge phase.

Highlights

Introduction to controlling the charge and discharge of a lithium-ion battery using the state of charge (SOC) parameter.

The battery used in the simulation has a nominal voltage of 7.2 volts and a capacity of 5.4 ampere hours.

Warning about not fully charging or discharging lithium-ion batteries to preserve battery life.

The load for the battery is set at 1000 watts, and it is purely resistive.

The discharge operation region for the battery is set between 50 and 150 seconds in the simulation.

The setup of the simulation requires a power GUI block, a battery block, and a DC voltage source.

The DC voltage source must have a voltage higher than the battery's 7.2V to charge it effectively.

A bus is connected to select only the SOC parameter, which will control the charge and discharge states.

An ideal switch is added to the circuit to manage charging and discharging based on SOC.

A state flow chart is used to create two states for the battery: charging and discharging, based on SOC levels.

If the SOC is greater than 80%, the battery stops charging and can discharge if needed.

If the SOC falls below 40%, the battery stops discharging and begins charging.

A purely resistive RLC load is configured with 1000 watts of active power, zero inductance, and zero capacitance.

Simulation logic is created to manage discharge between 50 and 150 seconds using a clock, comparison block, and logic gates.

After corrections and proper configuration, the simulation successfully demonstrates battery charging and discharging.

Transcripts

play00:00

welcome to this video in this video we

play00:02

shall see how the state of charge of a

play00:04

battery

play00:05

can be used to control the charge and

play00:07

discharging

play00:08

of a lithium ion battery

play00:13

nominal voltage of the battery provided

play00:15

is 7.2 volts the nominal

play00:17

capacity is 5.4 ampere hours

play00:21

since it's lithium-ion battery it's

play00:22

advised not to completely charge your

play00:24

battery

play00:24

at the same time not to discharge it

play00:26

fully now

play00:28

the load of the battery is 1000 watts

play00:31

and it's purely resistive and the

play00:33

operation region that is that the

play00:35

discharge

play00:35

time is between 50 seconds to 150

play00:38

seconds of the simulation

play00:40

so to begin assimilation we need a power

play00:43

gui block

play00:47

and after gui block we'll be taking a

play00:49

battery

play00:56

now we need a dc voltage source

play01:07

so this volt dc voltage source the

play01:10

positive terminal of the battery should

play01:11

be connected to the positive terminal of

play01:13

the dc voltage source

play01:15

and since the rated voltage the battery

play01:18

is going to be 7.2 volts

play01:20

the bat the dc voltage sources by

play01:22

voltage should be greater than the

play01:24

voltage of the battery

play01:27

[Music]

play01:29

and now we need a bus

play01:32

which can select only the soc

play01:35

parameter of the lithium ion battery

play01:39

so let's connect the bus and select

play01:43

only the soc parameter so soc as you

play01:46

know stands for state of charge

play01:48

now we need to go to tag

play01:55

[Music]

play01:59

so let's name this as sock

play02:08

and let's get a scope to see if this

play02:10

much works

play02:13

[Music]

play02:20

[Music]

play02:21

yes so as you can see that the battery

play02:24

charges

play02:26

[Music]

play02:27

let's add a switching

play02:31

component to the circuit such that

play02:34

it discharges and charges

play02:38

or stops charging after a certain point

play02:43

so we'll consider an ideal switch

play02:46

for this purpose

play02:52

and we need a state of a state flow

play02:55

chart

play02:56

to indicate when what state the battery

play02:59

is in

play03:00

based on the soc so we'll connect the

play03:01

soc as the input parameter to the

play03:05

state flow chart

play03:13

and the output parameter let's be let us

play03:15

call it a pulse

play03:17

[Music]

play03:25

now we'll have to go to the model

play03:30

explorer

play03:33

and in the model explorer we'll have to

play03:35

rename these

play03:37

parameters data is known as the input

play03:41

so as you can see it's input so we'll

play03:44

have to name

play03:44

it rename it as soc yeah apply

play03:49

and the output we'll have to name it as

play03:51

pulse

play03:53

because that's what we'll be using

play04:01

now let's call the first state to be

play04:04

charged

play04:08

and the second state to be discharged

play04:14

[Music]

play04:19

and this provided condition saying that

play04:21

if the soc is greater than

play04:23

80 then the battery need not

play04:28

charge anymore and it can go to the

play04:30

discharge state if required

play04:32

and if the soc is greater than 40 less

play04:35

than 40

play04:36

the battery must stop discharging and it

play04:39

must charge

play04:40

and upon entry of this state the pulse

play04:44

should be high so we'll call it we'll

play04:47

assign the value one let me just copy

play04:50

paste this

play04:58

yeah on discharge we call it

play05:02

to be zero the value of pulse should be

play05:04

low so we

play05:06

assign the value zero

play05:19

[Music]

play05:20

so we'll get an rlc load

play05:25

so load can be represented in two ways

play05:27

in terms of

play05:29

the impedance or in terms of watts

play05:32

so in this case we'll take the load and

play05:34

we'll give the active power to be

play05:36

1000 watts and inductance to be zero

play05:40

capacitance to be zero so we'll make it

play05:41

a purely resistive load

play05:46

let's just move it there for a

play05:50

convenience

play05:53

and let's give two more ideal switches

play06:11

so we needed the discharge to happen

play06:14

between

play06:15

50 seconds to 150 seconds of simulation

play06:17

right so

play06:18

we will design a logic for the same

play06:24

so we need a clock

play06:28

we need a compare block we need a

play06:32

product plot

play06:38

and we'll need a constant block as well

play06:43

[Music]

play06:44

and we'll need a not gate

play07:09

[Music]

play07:19

so the clock block basically

play07:22

stores the value of time

play07:32

so the constant 15

play07:37

so the if the value of time is greater

play07:39

than 15 that

play07:40

output of the compare block will be high

play07:42

and let's do the same

play07:44

for lesser than 150

play08:00

just move the other side to make it look

play08:05

[Music]

play08:10

neater

play08:13

[Music]

play08:21

okay so we'll connect it to another

play08:24

product block so this

play08:26

output of this block is basically an

play08:28

indication

play08:29

of the region between 50 seconds to 150

play08:31

seconds it'll be high during this time

play08:33

and it will be low

play08:35

otherwise so

play08:38

you know let's not do this let's give it

play08:40

the go-to tag

play08:43

[Music]

play08:46

let's call this discharge so this charge

play08:48

is high

play08:49

only during these periods of time

play08:52

and obviously the pulse has to be zero

play08:57

for it to be high

play09:09

so let's run this simulation

play09:12

so as you can see i've made a mistake in

play09:15

naming the parameter we must make sure

play09:18

it's case sensitive so it has to be

play09:19

capital p let's try it again

play09:22

[Music]

play09:24

uh there's another mistake i forgot to

play09:27

change the other one

play09:28

so yeah this is case sensitive so you'll

play09:31

have to make it

play09:32

capital t we have to provide the pulses

play09:34

to the battery

play09:36

connection to the pc source

play09:42

now let's run the simulation

play09:51

so as you can see the battery charges

play09:54

and then

play09:55

between 50 and it waits till 50 seconds

play09:57

for the discharge and discharges to 150

play09:59

seconds and that's constant

play10:01

after that hopefully this video was

play10:05

informative

play10:05

and provided you guidance regarding the

play10:07

simulation kindly check our other videos

play10:10

and do let us know if you have any

play10:11

queries

play10:12

and kindly like and subscribe and click

play10:14

on the bell icon

play10:16

near the channel's name thank you

play10:19

[Music]

Rate This

5.0 / 5 (0 votes)

相关标签
Battery ControlSOC ParametersLithium-IonCharge SimulationPower SystemsEnergy ManagementSimulation TutorialElectrical EngineeringResistive LoadBattery Safety
您是否需要英文摘要?