You are on page 1of 3

Decibels Lab Private Limited CIN: U80904KA2019PTC126675

#2362, 24th main road +91 7411019255


st
1 sector, HSR layout contact@decibelslab.com
Bangalore, Karnataka, 560102

Course name Numerical Modeling & Simulation in Scilab Xcos

Lesson name Numerical Modelling of Battery in Scilab-Xcos

Lesson objective Practice blocks & acquaint to use GUI of Scilab-Xcos

Created by Saffan Ahmed Khan

Problem statement: Model the battery SOC and Voltage to plot the variation of voltage and SOC with respect to
time.

Model Inputs:

Sl No Parameter Value Units


1. Battery Specifications
2. I. Battery Capacity 2.23 Ah
3. II. Initial SOC 1
4. Discharge Current Profile
5. I. Discharge Current 2.23 A
6. II. Simulation time 3600 s

Program:

A. To Import Battery Specifications: B. Post Processing Program:

//Importing csv file into Scilab. //Input current


data = csvRead("Battery_2.csv") scf(0)
//Battery Specifications plot(Value.time,Value.values(1:3600,1))
Battery_Capacity = data(2,1) xlabel("time (s)")
Battery_Initial_SOC = data(2,2) ylabel("Discharge Current (A)")
Battery_SOC = data(2:$,3) title("Discharge Current Plot")
Battery_Voltage = data(2:$,4) //voltage
plot(Battery_SOC,Battery_Voltage) scf(1)
plot(Value.time,Value.values(1:3600,2))
xlabel("time (s)")
ylabel("Battery Voltage (V)")
title("Battery Voltage Plot")
scf(2)
//state of charge
plot(Value.time,Value.values(1:3600,3))
xlabel("time (s)")
ylabel("State of Charge (%)")
title("State of Charge Plot")

www.lms.decibelslab.com 1
Decibels Lab Private Limited CIN: U80904KA2019PTC126675
#2362, 24th main road +91 7411019255
st
1 sector, HSR layout contact@decibelslab.com
Bangalore, Karnataka, 560102

Discharge Current Plot State of Charge Plot

Battery Voltage Plot

www.lms.decibelslab.com 2
Decibels Lab Private Limited CIN: U80904KA2019PTC126675
#2362, 24th main road +91 7411019255
st
1 sector, HSR layout contact@decibelslab.com
Bangalore, Karnataka, 560102

www.lms.decibelslab.com 3

You might also like