Challenge

Week 5 Battery characteristics using drive cycle

DRIVING CYCLE:

A driving cycle is a series of data points representing the speed of a vehicle versus time. Driving cycles are produced by different countries and organizations to assess the performance of vehicles in various ways, as for example fuel consumption and polluting emissions.

components used in simulink model :

1.) generic battery model with default parameters

2.) signal builder to create a current signal for battery to simulate. the speed vs time graph of drive cycle is converted into current profile.

3.) controlled current source: it converts simulink signal to equivalent current source.

making drive cycle in MATLAB:

y=[0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    3
    5.9
    8.6
    11.5
    14.3
    16.9
    17.3
    18.1
    20.7
    21.7
    22.4
    22.5
    22.1
    21.5
    20.9
    20.4
    19.8
    17
    14.9
    14.9
    15.2
    15.5
    16
    17.1
    19.1
    21.1
    22.7
    22.9
    22.7
    22.6
    21.3
    19
    17.1
    15.8
    15.8
    17.7
    19.8
    21.6
    23.2
    24.2
    24.6
    24.9
    25
    24.6
    24.5
    24.7
    24.8
    24.7
    24.6
    24.6
    25.1
    25.6
    25.7
    25.4
    24.9
    25
    25.4
    26
    26
    25.7
    26.1
    26.7
    27.5
    28.6
    29.3
    29.8
    30.1
    30.4
    30.7
    30.7
    30.5
    30.4
    30.3
    30.4
    30.8
    30.4
    29.9
    29.5
    29.8
    30.3
    30.7
    30.9
    31
    30.9
    30.4
    29.8
    29.9
    30.2
    30.7
    31.2
    31.8
    32.2
    32.4
    32.2
    31.7
    28.6
    25.3
    22
    18.7
    15.4
    12.1
    8.8
    5.5
    2.2
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    3.3
    6.6
    9.9
    13.2
    16.5
    19.8
    22.2
    24.3
    25.8
    26.4
    25.7
    25.1
    24.7
    25
    25.2
    25.4
    25.8
    27.2
    26.5
    24
    22.7
    19.4
    17.7
    17.2
    18.1
    18.6
    20
    22.2
    24.5
    27.3
    30.5
    33.5
    36.2
    37.3
    39.3
    40.5
    42.1
    43.5
    45.1
    46
    46.8
    47.5
    47.5
    47.3
    47.2
    47
    47
    47
    47
    47
    47.2
    47.4
    47.9
    48.5
    49.1
    49.5
    50
    50.6
    51
    51.5
    52.2
    53.2
    54.1
    54.6
    54.9
    55
    54.9
    54.6
    54.6
    54.8
    55.1
    55.5
    55.7
    56.1
    56.3
    56.6
    56.7
    56.7
    56.5
    56.5
    56.5
    56.5
    56.5
    56.5
    56.4
    56.1
    55.8
    55.1
    54.6
    54.2
    54
    53.7
    53.6
    53.9
    54
    54.1
    54.1
    53.8
    53.4
    53
    52.6
    52.1
    52.4
    52
    51.9
    51.7
    51.5
    51.6
    51.8
    52.1
    52.5
    53
    53.5
    54
    54.9
    55.4
    55.6
    56
    56
    55.8
    55.2
    54.5
    53.6
    52.5
    51.5
    51.5
    51.5
    51.1
    50.1
    50
    50.1
    50
    49.6
    49.5
    49.5
    49.5
    49.1
    48.6
    48.1
    47.2
    46.1
    45
    43.8
    42.6
    41.5
    40.3
    38.5
    37
    35.2
    33.8
    32.5
    31.5
    30.6
    30.5
    30
    29
    27.5
    24.8
    21.5
    20.1
    19.1
    18.5
    17
    15.5
    12.5
    10.8
    8
    4.7
    1.4
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    1
    4.3
    7.6
    10.9
    14.2
    17.3
    20
    22.5
    23.7
    25.2
    26.6
    28.1
    30
    30.8
    31.6
    32.1
    32.8
    33.6
    34.5
    34.6
    34.9
    34.8
    34.5
    34.7
    35.5
    36
    36
    36
    36
    36
    36
    36.1
    36.4
    36.5
    36.4
    36
    35.1
    34.1
    33.5
    31.4
    29
    25.7
    23
    20.3
    17.5
    14.5
    12
    8.7
    5.4
    2.1
    0
    0
    0
    0
    0
    0
    2.6
    5.9
    9.2
    12.5
    15.8
    19.1
    22.4
    25
    25.6
    27.5
    29
    30
    30.1
    30
    29.7
    29.3
    28.8
    28
    25
    21.7
    18.4
    15.1
    11.8
    8.5
    5.2
    1.9
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    3.3
    6.6
    9.9
    13.2
    16.5
    19.8
    23.1
    26.4
    27.8
    29.1
    31.5
    33
    33.6
    34.8
    35.1
    35.6
    36.1
    36
    36.1
    36.2
    36
    35.7
    36
    36
    35.6
    35.5
    35.4
    35.2
    35.2
    35.2
    35.2
    35.2
    35.2
    35
    35.1
    35.2
    35.5
    35.2
    35
    35
    35
    34.8
    34.6
    34.5
    33.5
    32
    30.1
    28
    25.5
    22.5
    19.8
    16.5
    13.2
    10.3
    7.2
    4
    1
    0
    0
    0
    0
    0
    0
    1.2
    3.5
    5.5
    6.5
    8.5
    9.6
    10.5
    11.9
    14
    16
    17.7
    19
    20.1
    21
    22
    23
    23.8
    24.5
    24.9
    25
    25
    25
    25
    25
    25
    25.6
    25.8
    26
    25.6
    25.2
    25
    25
    25
    24.4
    23.1
    19.8
    16.5
    13.2
    9.9
    6.6
    3.3
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    3.3
    6.6
    9.9
    13
    14.6
    16
    17
    17
    17
    17.5
    17.7
    17.7
    17.5
    17
    16.9
    16.6
    17
    17.1
    17
    16.6
    16.5
    16.5
    16.6
    17
    17.6
    18.5
    19.2
    20.2
    21
    21.1
    21.2
    21.6
    22
    22.4
    22.5
    22.5
    22.5
    22.7
    23.7
    25.1
    26
    26.5
    27
    26.1
    22.8
    19.5
    16.2
    12.9
    9.6
    6.3
    3
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    2
    4.5
    7.8
    10.2
    12.5
    14
    15.3
    17.5
    19.6
    21
    22.2
    23.3
    24.5
    25.3
    25.6
    26
    26.1
    26.2
    26.2
    26.4
    26.5
    26.5
    26
    25.5
    23.6
    21.4
    18.5
    16.4
    14.5
    11.6
    8.7
    5.8
    3.5
    2
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    1.4
    3.3
    4.4
    6.5
    9.2
    11.3
    13.5
    14.6
    16.4
    16.7
    16.5
    16.5
    18.2
    19.2
    20.1
    21.5
    22.5
    22.5
    22.1
    22.7
    23.3
    23.5
    22.5
    21.6
    20.5
    18
    15
    12
    9
    6.2
    4.5
    3
    2.1
    0.5
    0.5
    3.2
    6.5
    9.6
    12.5
    14
    16
    18
    19.6
    21.5
    23.1
    24.5
    25.5
    26.5
    27.1
    27.6
    27.9
    28.3
    28.6
    28.6
    28.3
    28.2
    28
    27.5
    26.8
    25.5
    23.5
    21.5
    19
    16.5
    14.9
    12.5
    9.4
    6.2
    3
    1.5
    1.5
    0.5
    0
    3
    6.3
    9.6
    12.9
    15.8
    17.5
    18.4
    19.5
    20.7
    22
    23.2
    25
    26.5
    27.5
    28
    28.3
    28.9
    28.9
    28.9
    28.8
    28.5
    28.3
    28.3
    28.3
    28.2
    27.6
    27.5
    27.5
    27.5
    27.5
    27.5
    27.5
    27.6
    28
    28.5
    30
    31
    32
    33
    33
    33.6
    34
    34.3
    34.2
    34
    34
    33.9
    33.6
    33.1
    33
    32.5
    32
    31.9
    31.6
    31.5
    30.6
    30
    29.9
    29.9
    29.9
    29.9
    29.6
    29.5
    29.5
    29.3
    28.9
    28.2
    27.7
    27
    25.5
    23.7
    22
    20.5
    19.2
    19.2
    20.1
    20.9
    21.4
    22
    22.6
    23.2
    24
    25
    26
    26.6
    26.6
    26.8
    27
    27.2
    27.8
    28.1
    28.8
    28.9
    29
    29.1
    29
    28.1
    27.5
    27
    25.8
    25
    24.5
    24.8
    25.1
    25.5
    25.7
    26.2
    26.9
    27.5
    27.8
    28.4
    29
    29.2
    29.1
    29
    28.9
    28.5
    28.1
    28
    28
    27.6
    27.2
    26.6
    27
    27.5
    27.8
    28
    27.8
    28
    28
    28
    27.7
    27.4
    26.9
    26.6
    26.5
    26.5
    26.5
    26.3
    26.2
    26.2
    25.9
    25.6
    25.6
    25.9
    25.8
    25.5
    24.6
    23.5
    22.2
    21.6
    21.6
    21.7
    22.6
    23.4
    24
    24.2
    24.4
    24.9
    25.1
    25.2
    25.3
    25.5
    25.2
    25
    25
    25
    24.7
    24.5
    24.3
    24.3
    24.5
    25
    25
    24.6
    24.6
    24.1
    24.5
    25.1
    25.6
    25.1
    24
    22
    20.1
    16.9
    13.6
    10.3
    7
    3.7
    0.4
    0
    0
    0
    2
    5.3
    8.6
    11.9
    15.2
    17.5
    18.6
    20
    21.1
    22
    23
    24.5
    26.3
    27.5
    28.1
    28.4
    28.5
    28.5
    28.5
    27.7
    27.5
    27.2
    26.8
    26.5
    26
    25.7
    25.2
    24
    22
    21.5
    21.5
    21.8
    22.5
    23
    22.8
    22.8
    23
    22.7
    22.7
    22.7
    23.5
    24
    24.6
    24.8
    25.1
    25.5
    25.6
    25.5
    25
    24.1
    23.7
    23.2
    22.9
    22.5
    22
    21.6
    20.5
    17.5
    14.2
    10.9
    7.6
    4.3
    1
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    1.2
    4
    7.3
    10.6
    13.9
    17
    18.5
    20
    21.8
    23
    24
    24.8
    25.6
    26.5
    26.8
    27.4
    27.9
    28.3
    28
    27.5
    27
    27
    26.3
    24.5
    22.5
    21.5
    20.6
    18
    15
    12.3
    11.1
    10.6
    10
    9.5
    9.1
    8.7
    8.6
    8.8
    9
    8.7
    8.6
    8
    7
    5
    4.2
    2.6
    1
    0
    0.1
    0.6
    1.6
    3.6
    6.9
    10
    12.8
    14
    14.5
    16
    18.1
    20
    21
    21.2
    21.3
    21.4
    21.7
    22.5
    23
    23.8
    24.5
    25
    24.9
    24.8
    25
    25.4
    25.8
    26
    26.4
    26.6
    26.9
    27
    27
    27
    26.9
    26.8
    26.8
    26.5
    26.4
    26
    25.5
    24.6
    23.5
    21.5
    20
    17.5
    16
    14
    10.7
    7.4
    4.1
    0.8
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    2.1
    5.4
    8.7
    12
    15.3
    18.6
    21.1
    23
    23.5
    23
    22.5
    20
    16.7
    13.4
    10.1
    6.8
    3.5
    0.2
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0.2
    1.5
    3.5
    6.5
    9.8
    12
    12.9
    13
    12.6
    12.8
    13.1
    13.1
    14
    15.5
    17
    18.6
    19.7
    21
    21.5
    21.8
    21.8
    21.5
    21.2
    21.5
    21.8
    22
    21.9
    21.7
    21.5
    21.5
    21.4
    20.1
    19.5
    19.2
    19.6
    19.8
    20
    19.5
    17.5
    15.5
    13
    10
    8
    6
    4
    2.5
    0.7
    0
    0
    0
    0
    0
    0
    0
    0
    1
    1
    1
    1
    1
    1.6
    3
    4
    5
    6.3
    8
    10
    10.5
    9.5
    8.5
    7.6
    8.8
    11
    14
    17
    19.5
    21
    21.8
    22.2
    23
    23.6
    24.1
    24.5
    24.5
    24
    23.5
    23.5
    23.5
    23.5
    23.5
    23.5
    24
    24.1
    24.5
    24.7
    25
    25.4
    25.6
    25.7
    26
    26.2
    27
    27.8
    28.3
    29
    29.1
    29
    28
    24.7
    21.4
    18.1
    14.8
    11.5
    8.2
    4.9
    1.6
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    1.5
    4.8
    8.1
    11.4
    13.2
    15.1
    16.8
    18.3
    19.5
    20.3
    21.3
    21.9
    22.1
    22.4
    22
    21.6
    21.1
    20.5
    20
    19.6
    18.5
    17.5
    16.5
    15.5
    14
    11
    8
    5.2
    2.5
    0
    0
    0];


for i=1:length(y)
    time(i)=i;
  
end


plot(time,y);

output:

SIMULINK MODEL:

with signal builder parameters as the drive cycle:

and default battery model.

running simulation for 800 sec.

OUTPUT:

the yellow line indicates the SOC dropping from 100 to pretty much near 0.

the blue line is the drive cycle (current value) met by the battery as required.

and red is the voltage of the battery limited to 7.2V.

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.