Department of Electric Power Engineering CHALMERS UNIVERSITY OF TECHNOLOGY Gothenburg, Sweden 2016 Cell characterization and modeling of lithium ion batteries Bachelor Thesis, Electric Power Engineering Victor Strängberg Cell characterization and modeling of lithium ion batteries VICTOR STRÄNGBERG Department of Energy and Environment Division of Electric Power Engineering CHALMERS UNIVERSITYOF TECHNOLOGY Gothenburg, Sweden 2016 Cell characterization and modeling of lithium ion batteries VICTOR STRÄNGBERG ©VICTOR STRÄNGBERG, 2016. Department of Energy and Environment Division of Electric Power Engineering Chalmers University of Technology SE-412 96 Göteborg Sweden Telephone +46 (0)31-772 1000 Cover: A car from NEVS Chalmers Bibliotek, Reproservice Gothenburg, Sweden 2016 Sammanfattning Syftet med det här examensarbetet har varit att bestämma de olika parametrarna från en elektrisk ekvivalent krets som används till batterier. Två olika batterier med olika kemiska sammansättningar har testas. Det första som har gjorts är att göra mätningar med olika frekvenser för att se vad impedansen är vid en specifik frekvens. När detta är gjort har ett Nyqvist diagram använts och från detta så kan två av de olika parametrarna uppskattas. Resten av parametrarna har blivit beräknade med hjälp av överföringsfunktioner. Två olika metoder använts för att få fram parametrarna. Det här arbetet har testat två batterier med olika laddningsnivå och temperaturer. Laddningsnivån har testats från antingen 0 - 100 % eller 100 - 0 % och för temperaturen kommer batterierna att testas mellan 0° C och 40° C. Nyckelord: Elektriskekvivalent krets, Parametrar, Nyqvist diagram, Laddningsnivå Cell characterization and modeling of lithium ion batteries VICTOR STRÄNGBERG Department of Energy and Environment Division of Electric Power Engineering Chalmers University of Technology Abstract The purpose with this thesis was to estimate the parameters from one of the electrical equivalent circuits that are used for batteries. Two different batteries with different chemistries have been tested. First measurements at different frequencies have been performed to obtain the impedance at a specific frequency. When the impedance is known, the information can be used in a Nyquist diagram, where two parameters can be estimated, then the rest of the parameters are calculated from transfer functions. Two methods have been tested to achieve the parameter values. This thesis has tested two batteries at different State of charge and temperatures. The State of charge have been tested from either 0 - 100 % or 100 - 0 % State of charge and the temperatures have been tested between 0° C and 40° C. Keywords: “Electrical Equivalent circuit”, "Parameter values", “State of charge”, "Nyquist diagram" Acknowledgement The thesis has been performed at Chalmers and at NEVS. The first persons I wanted to thank is my supervisor in Chalmers, professor Torbjörn Thiringer, and my supervisor at NEVS, Christian Fleischer, for help, support and guidance during the thesis. I would also like to thank the PhD students and master student, Evelina Wikner, Stefan Skoog, Sandeep David, and the employees at NEVS for advice and support during the whole thesis. Lastly, I give my thanks to my family and friends who supported me during the thesis and also rest of the studies. Victor Strängberg, Trollhättan 2016 vii Table of Contents Abstract ..................................................................................................................................... iv Table of Contents ..................................................................................................................... vii 1. Introduction ........................................................................................................................ 1 1.1. Background .................................................................................................................. 1 1.2. Challenge description .................................................................................................. 1 1.3. Scope ........................................................................................................................... 2 2. Theory................................................................................................................................. 3 2.1. State of charge ............................................................................................................. 3 2.2. Electrical Equivalent circuit of the battery .................................................................. 3 2.3. Identification of the circuit elements .......................................................................... 6 2.3.1. Resistance ............................................................................................................. 6 2.3.2. Capacitance .......................................................................................................... 7 2.3.3. Inductance ............................................................................................................ 7 2.3.4. Alpha (α) ............................................................................................................... 8 2.4. Identification methods ................................................................................................ 8 2.4.1. Step ....................................................................................................................... 8 2.4.2. Electrochemical impedance spectroscopy ........................................................... 8 3. Method and experiment set up ....................................................................................... 11 3.1. Battery cells ............................................................................................................... 11 3.2. Test set up ................................................................................................................. 13 3.3. Tests ........................................................................................................................... 17 4. Result ................................................................................................................................ 19 4.1. Difference between different State of Charge and temperature on the Type A -cell 19 4.1.1. Zero degree Celsius ............................................................................................ 19 4.1.2. Eight degree Celsius ........................................................................................... 21 4.1.3. 16 degree Celsius ............................................................................................... 22 4.1.4. 24 degree Celsius ............................................................................................... 24 4.1.5. 32 degree Celsius ............................................................................................... 25 4.1.6. 40 degree Celsius ............................................................................................... 27 4.2. Difference between different State of Charge and temperature Type B- cell .......... 28 viii 4.2.1. Zero degree Celsius ............................................................................................ 28 4.2.2. 24 degree Celsius ............................................................................................... 30 4.3. Parameter values ....................................................................................................... 32 4.3.1. Type A with Alpha .............................................................................................. 32 4.3.2. Type A without Alpha ......................................................................................... 38 4.3.3. Type B with Alpha ............................................................................................... 45 4.3.4. Type B without Alpha ......................................................................................... 48 5. Conclusion ........................................................................................................................ 51 5.1. Conclusion ................................................................................................................. 51 5.2. Future work ............................................................................................................... 52 6. Bibliography...................................................................................................................... 53 ix Symbols and abbreviations ECM–Electrical Equivalent Circuit EV- Electric vehicle SOC – State Of Charge EIS- Electrochemical Impedance Spectroscopy OCV - Open Circuit Voltage LFP – Lithium iron phosphate Ah – Ampere hours Li-ion – Lithium– ion Ebatt_Wh – Watt hour Qbatt_Ah – Capacity in the battery Vn – The nominal voltage EGE – Gravimetric energy density AGamry – Gamrys total discharge/charge ampere Tmin – Total minutes it takes to discharge the cell Tm/p – How many minutes it takes before the next measuring point Pp – How many points that were chosen SEI - Solid electrolyte interphase x 1 1. Introduction 1.1. Background The need for better batteries for electric vehicles is obvious and very much money and time is spent on research on battery technology to create better batteries that can contain more energy, have a longer lifetime and cost less. If there were more electric vehicles in traffic it would be very good for the environment since global temperature is increasing due to the emission of greenhouse gases from, for example transportation. One reason why people buy cars with a combustion engine is that electric vehicles can’t drive as far as the combustion vehicles can. To change this, the electric vehicles must have a larger range before their need to be recharged. Here the batteries come in to the picture since most electric vehicles are using batteries to store energy. The electric vehicles do not pollute the environment and that is the reason why electric vehicles are good for the environment. Another good thing with electric vehicles is that these vehicles make less noise when they are driving at low speed compared with vehicles that are driving on fossil fuel i.e. gasoline. This is most important in cities [1]. 1.2. Challenge description Technology innovation with battery storage has been taking place for a very long time, approximately 140-150 years [1], [2] but for the latest 20-25 years, the research has increased. Companies see that batteries today can manage to provide the electric vehicle with enough energy, meaning it has previously not been possible to do so since there was not enough knowledge / technique about how to build those kind of batteries [2]. After years of research most of the companies have concluded that the Lithium-battery is the best battery to match the tough requirements of batteries for electric vehicles. Some of the requirements are to store enough energy, to be relatively inexpensive, to be relatively lightweight and to take up less space. The reason why Lithium-batteries are one of the best batteries depends on high energy and power density. A high open cell voltage is also an advantage since a high open cell voltage and low weight of the battery will affect the energy density in the way that it becomes higher [1]. 2 1.3. Scope The purpose of this thesis is to measure the parameters of two Lithium-ion batteries, the batteries are to be tested with different frequencies. Moreover, a target is to consider and analyse how the temperature affects the parameters. Furthermore an objective is to measure the batteries with different SOC - levels and of course to evaluate the result. Finally an aim is to use a combination of previously mentioned tests at different temperatures and SOC-levels. The reason why the batteries are to be tested under different temperatures is because there will be a variation in vehicle temperature. During the summer it could be warm and in the winter it could be cold and the batteries must be able to handle both extremes. The voltage of the batteries that will be tested in this thesis have a minimum voltage level around 2.7 V and a maximum voltage level around 4.2 V for the lithium-ion battery, and for the lithium iron phosphate the minimum voltage is approximately 2.4 V and has a maximum voltage of approximately 3.65 V. 3 2. Theory This chapter will give the necessary introduction of how a battery can be represented electrically i.e. what it means with an equivalent circuit and what state of charge is. 2.1. State of charge State of charge is normally given in percentage which means it is a ratio between the present capacity that the battery has exactly when the measurement is done and the maximum capacity which means that when the battery is fully charged, 𝑆𝑂𝐶 = 𝑄𝑝 𝑄𝑚 100% (1) where Qp is present capacity and Qm is the maximum capacity. If the battery is fully discharged, it has 0 % SOC and if the battery is fully charged then it has 100 % SOC. SOC is an expression that is used to tell how much capacity there is in the battery [1]. C-rate is a conception that is used when charging or discharging a battery. An example can be if a battery has 10 Ah and discharges at 1 C-rate, this means 10 A. The battery will be fully discharged after around 1 hour. Another example could be if the battery has 10 Ah and is charged with 2 C-rate meaning 20 A, then it will take 0.5 hours to charge the battery to maximum capacity [3]. There are a couple of methods to determine the SOC. One alternative is to use current counting where one starts with a fully charged battery and counting the amount of charge transferred. However, in real application it is not to use this method since even a small measurement error would result in a large error of the SOC after an extended time. SOC can also be estimated by measuring the Open circuit voltage (OCV). OCV measurement is made by measuring the difference in electric potential between the two terminals and can only be measured after that the battery has relaxed which typically takes one hour [1], [4], [5]. More advance methods also exist. 2.2. Electrical Equivalent circuit of the battery There is a multitude of models that are being used to describe the battery behavior but the equivalent circuit representation is widely used for simulation and modeling of the electric characteristics of the battery [6]. The reason why equivalent circuits with 1 or 2 RC - links are often used, is that when it comes to modeling of the battery these are computationally simple and a electrical equivalent circuit (ECM) could smoothly be combined with more 4 advanced methods. The reason for choosing 3 RC - links for this thesis was because the author did not think it was sufficient to have just 1 or 2 RC - links but it was not necessary to have a more complex model than 3 RC - links and one with 3 RC - links with an Alpha [7]. The model with three parallel resistances and capacitors with a constant phase element called Alpha, series resistance and series inductance is showed in Figure 2. The series resistance is a pure resistance which means that no capacitance or inductance is included and is called R0. It can be referred to by other names as well, such as Ohmic resistance. The inductor that is shown in Figure 1 are in series with the rest of the components. The result of the test can be presented in a Nyquist diagram to where the imaginary- and real part of the impedance is visualized. The Nyquist diagram is used since at a specific frequency the diagram will show what the imaginary and real impedance respectively are. Figure 3 shows for example what the impedance is at 0.01 Hz. The Nyquist diagram is turned around compared with a normal graph, meaning that the minus imaginary part is where the plus part should be, which is due to the capacitance in the ECM. The capacitance is typically much greater than the inductance and that means that the capacity is of more interest than the inductance and therefore it is easier to use when the curve is on the positive side of the y - axis. Another reason why the capacitance side is of more interest, is due to that the current in electric vehicles will not contain so much high frequency components, due to the fact that frequency components maximum will be around 1 - 3 Hz. It is more important to have greater detail at the lower part of the frequency than on the higher part. The inductance is handling the high frequency part. Figure 1: Electrical equivalent circuit without Alpha 5 Figure 2: Electrical equivalent circuit with Alpha 𝑍𝑤𝑖𝑡 ℎ𝑜𝑢𝑡 𝐴𝑙𝑝 ℎ𝑎 = 𝑅0 + 𝑠𝐿 + 𝑅1 𝑠𝑅1𝐶1 + 1 + 𝑅2 𝑠𝑅2𝐶2 + 1 + 𝑅3 𝑠𝑅3𝐶3 + 1 (2) 𝑍𝑤𝑖𝑡 ℎ 𝐴𝑙𝑝 ℎ𝑎 = 𝑅0 + 𝑠𝐿 + 𝑅1 𝑠𝛼𝑅1𝐶1 + 1 + 𝑅2 𝑠𝑅2𝐶2 + 1 + 𝑅3 𝑠𝑅3𝐶3 + 1 (3) These equations are transfer functions from the equivalent circuit and they are used to extract the parameters. The transfer function equations are used in the curve fitting model and the purpose of this model is to get as close as possible to the measured value. If the measured and curve fitting graphs are the same, then the calculated values of the parameters are correct. 6 2.3. Identification of the circuit elements 2.3.1. Resistance This thesis will handle four resistances and they will be named R0, R1, R2 and R3. R0 is the resistors that are in series with the other components as shown in Figure 1. The resistance R0 is approximated from the measurement data, the value of R0 is where the measurement data crosses the x-axis. The impedance from R0 is the sum of the active part that is non- electrochemical and the resistance in the electrolyte; i.e. terminal, current collectors and electrical resistance in the electrodes [8]. R1 is in parallel with C1 and the purpose of R1 is to handle the charge transfer area that will be shown in Figure 3 [3]. The resistance R1 determines the diameter of the semicircle and the charge transfer area which is the fastest in the Nyquist diagram [9]. R1 can be estimated by taking the value where the charge transfer area ends and then subtracting the estimated value of R0 from this. Figure 3: Nyquist diagram with Ohmic resistance area, Charge transfer area and Mass transport marked. 7 R2 is in parallel with C2. R2 is handling the slower part of the time constant. R3 is in parallel with C3, and R3 is also handling the slower part of the time constant. The reason why there are two resistances/capacitors that handle the slower part is because it is very difficult to do a good fit towards experimental results otherwise. It is important to have a good estimation of the curve fitting otherwise parameter estimates will not be sufficient. If the initial values are not good enough this will lead to inaccurate parameters. The slower part is also called mass transport. It is called mass transport since the mass transport depends on the double layer effect which shape it when there are two layers with different/opposite polarity between the electrode and electrolyte [10]. Something that is worth mentioning is that the resistances that are handling the mass transport become significantly bigger when the SOC value is close to 100 %. The Solid electrolyte interphase (SEI) layer builds up when the battery is discharged or charged fully. The older the battery becomes, the greater the size of the SEI layer becomes. 2.3.2. Capacitance There will be three capacitors that this thesis will be described and they will be named C1, C2 and C3. C1 is in parallel with R1. R1 & C1 will handle the charge transfer area. In Section 2.3.1 R1 was described as the parameter that determines the diameter of the semicircle and C1 will determine the height and also the shape of the semicircle. C2 and C3 are in the low frequency area which is called the mass transport area shown in Figure 3 [11]. C2 and C3 subsequently are normally greater than C1, which belongs to the low frequency region. That leads to the time constant 𝜏 being much larger. Normally is the time constant for C2 approximately 5 seconds and for C3 the time constant is around 50 seconds. This can be compared with the time constant in the charge transfer area and it is normally in milliseconds. 2.3.3. Inductance An inductor stores magnetic energy and it will be charged with magnetic energy independently of which direction the current has. For higher frequencies this amount of energy will be charged faster. A series inductance like the one from Figure 1 does not necessarily needs to be a real inductor since every conductor has a magnetic field around them if so all conductors have some amount of inductance. The inductance should be as low as possible since the lower it gets, the more energy can be stored [8]. 8 2.3.4. Alpha (α) The constant phase element is named Alpha and it is a mathematic tool. It is called Alpha since it can be between zero and one. If it is closer to one then it is more of a capacitance and if it is closer to zero then it is more like a resistance. Alpha is a mathematic tool which means it does not exist in the battery so it is not possible to measure any value. What Alpha does is to adjust the height and the form on the charge transfer area presentation in the Nyquist diagram. It was discussed in Section 2.3.2 that C1 determines the height and the shape of the semicircle but sometimes the capacitance need help. That is the reason why Alpha is used to get a better curve fit and from that more precise parameter values from the ECM [8], [3]. Alpha will normally look like it does in Figure 2 and a line over the capacitor mean it is variable. 2.4. Identification methods 2.4.1. Step In this thesis there have just been a few measurements with this technique and therefore this technique will be briefly described. The parameters are determined from a measured step response by using expression 𝜏 = 𝑅𝐶 (4) where the time constant is𝜏 and the resistance R and the capacitance C are one of the RC- links in Figure 1.If the battery cell is tested with current pulses it is possible to determine the parameters. The instrument that is available during the experiments is called Digatron BTS - 600, the Digatron uses 2 RC-links and no inductance. There are two channels that the user is able to program and these channels are not connected to each other [3]. The Digatron is able to either charge or discharge and then change to the opposite current direction in less than 50 ms. It has a voltage range from 0 - 60 V and a current range either from µA or mA up to 2000 A. Is possible to log the current pulses, the voltage and the temperature [12]. This technique is not used because with 2 RC-links the alpha parameter can not be used and the model will not be accurate enough. 2.4.2. Electrochemical impedance spectroscopy Electrochemical impedance spectroscopy (EIS) is another way to identify the parameters, it uses sinusoidal signals at different frequencies to determine the impedance at a specific SOC - level. In this thesis an instrument called Gamry Instruments Reference 3000 is used to provide the frequency test. The Gamry can charge/discharge with 3 A which make the possible user area different compared with the Digatron equipment that was also used. It is a commonly used method which many companies/universities/organizations use [1]. This 9 method measure the impedance in the battery over a certain frequency range which the user can change in a program called Framework. An advantage with EIS is the high precision of the measurements and the method is also relatively simple to understand [10]. When this method is used it will be possible to distinguish from the Nyquist diagram two parameters from the experiment which has been mentioned before in Section 2.3.1 and the rest of the parameters must be calculated either by hand or by a computer program. In this thesis, Matlab has been used to calculate the other parameter values. 10 11 3. Method and experiment set up 3.1. Battery cells A lithium-ion (Li-ion) battery cell has been tested here, referred to as Type A. The numbers stand for how many ampere hours (Ah) the battery has. In this case the battery has 25 Ah. The length of the battery is 26.5 cm long with tabs, the tabs is a metal plate and in a usual battery these plates would be plus and minus, Figure 4 shows in more detail how everything looks. Figure 4: Type A battery cell with dimensions The height is 0.6 cm, the width is 15 cm and the weight is 0.560 kg. The nominal voltage is when the SOC - level in the battery is 50 % and for the Type A - cell the resulting voltage is 3.46 V. The energy density can be calculated in different ways depending on which parameter is known. Typically, the following expressions can be used Ebatt_Wh, Qbatt_Ah is the total capacity in the battery and Vn is the nominal voltage. After that, the Energy density was calculated since the weight of the battery is known. In this thesis, the batteries weights were known. 𝐸𝑏𝑎𝑡𝑡 _𝑊ℎ = 𝑄𝑏𝑎𝑡𝑡 _𝐴ℎ ∗ 𝑉𝑛 = 25 ∗ 3.46 ≈ 86.5 𝑊ℎ (5) 𝐸𝐺𝐸 = 𝐸𝑏𝑎𝑡𝑡 _𝑤ℎ 𝑘𝑔 = 86.5 𝑊ℎ 0.560 ≈ 154.5 𝑊ℎ 𝑘𝑔 (6) Where EGE is the Gravimetric energy density, Ebatt_Wh is the how many watt hours there is and kg stands for how many kilos the battery weight. 12 Type B is a lithium iron phosphate (LiFePO4) battery, referred to as LFP. It is a battery that as a chemical mixture of lithium, iron and phosphate and it has 95 Ah capability. The length of the battery with tabs is 31 cm, height is 2.4 cm, the width is 17.8 cm and the weight is 2.32 kg. Figure 5 shows in more detail how the lengths are. Figure 5: Type B battery cell with dimensions The Gravimetric energy density EGE and Energy hours Ebatt_Ah for the Type B - cell is calculated typically as the expression is used. 𝐸𝑏𝑎𝑡𝑡 _𝑊ℎ = 𝑄𝑏𝑎𝑡𝑡 _𝐴ℎ ∗ 𝑉𝑛 = 95 ∗ 3 = 285 𝑊ℎ (7) 𝐸𝐺𝐸 = 𝐸𝑏𝑎𝑡𝑡 _𝑤ℎ 𝑘𝑔 = 285 𝑊ℎ 2.320 𝑘𝑔 ≈ 122.8 𝑊ℎ 𝑘𝑔 (8) There the nominal voltage (Vn) is 50 % SOC which is around 3 V and Qbatt_Ahis95 Ah. Table 1: Values for Type A and Type B Battery type Length (cm) Width (cm) Height (cm) Vn(V) Weigh (kg) Capacity (Ah) Energy density ( 𝑊ℎ 𝑘𝑔 ) Type A Li-ion 26.5 15 0.6 3.46 0.560 25 154.5 Type B LiFePO4 31 17.8 2.4 3.21 2.32 95 122.8 The result confirms the commonly known fact, i.e. that LFP has slightly lower energy density which is a price to pay for the chemistry involved. The capacity weight ratio is important because if the battery is lighter, it would be possible to have either more batteries in the vehicle which means the vehicle has the opportunity to drive longer on one charge or reduce 13 the weight of the vehicle since fewer battery cells are needed. Both of these options have their benefits, the obvious choice is to have more batteries but for a vehicle that already weighs over for example 1500 kg then a good alternative could be to reduce some weigh so it could weight under 1500 kg. The reason why it is good to have a vehicle that weigh as little as possible is so that then the vehicle needs less energy to move forwards or backwards. In this way the vehicle can drive a longer distance without recharging. The Ah for the 2 batteries are very different. The Type A-cell has 25 Ah and the Type B-cell has 95 Ah but the energy density is rather different which was shown above, there the Type A have approximately 1.3 times higher energy density than the Type B - cell. It can be approximately 3.8 pieces Type A - cell on one Type B - cell seen from the capacity. The height is 4 times greater on the Type B - cell compared with the Type A - cell and the Type B - cell is 5.4 cm longer than Type A - cell. The width is 2.4 cm greater on the Type B - cell. 3.2. Test set up The main part of the measurements in this thesis take place with an instrument called Gamry Instruments Reference 3000 and in Figure 6 a photo of the instrument is shown. Figure 6: Gamry reference 3000 14 In the lab, the batteries will be tested with different frequencies, SOC - levels and temperatures. The tests will start in room temperature (24°C) and then the tests will continue with 0°, 8°, 16°, 32° and 40° C. The type A - cell will be laying on a wood plate and be connected with clamps from the Gamry that performs the frequency tests which Figure 7 shows. It is important that the plate in this case is made from wood or another non- conducting materiel. Otherwise, it could lead to safety hazards for the person performing the test or someone in the vicinity. Another issue is that an instrument or battery cell could be damaged during the test. Figure 8 shows the Type B - cell the in measurement set - up. Figure 7: Connection between the Gamry and Type A battery cell 15 Figure 8: Type B - cell inside the temperature chambers Figure 7 shows how the battery is connected to the Gamry and this set-up work perfectly when the measurements are done at room temperature (24° Celsius). The other temperature measurements have been done in a temperature chamber. The brand of the chamber is POL – EKO Aparatura and Figure 9 shows how it looks like. This chamber has an accuracy of ± 1° Celsius. 16 Figure 9: Temperature chamber What the Gamry will provide is measurement readings for the impedance for various frequencies. From this measurement it will be possible to create an impedance graph. Then using Matlab the parameters of the ECM can be determined and presented in a diagram. The way this is implemented in Matlab is to use the transfer functions that were shown in Section 2.2. Using the Matlab built - in curve fitting function fminsearch the ECM parameters could be identified. The initial values that the user starts with for the fminsearch algorithm are also important. If their initial values are to far away then it will be impossible to get a good curve fit which leads to not inaccurate/incorrect parameter values [13]. 17 3.3. Tests The tests are done between 0° Celsius and up to 40° C in 8° C increments. It will either go from approximately 0 % State of Charge up to approximately 100 % SOC or the opposite meaning from 100 % down to 0 % SOC. This thesis will focus on having 12 or 15 measuring points depending on which battery is tested. For the Type A - cell there will be 15 measuring points as it does not have such a high capacity which means it will not take too long to either charge or discharge the battery with 3 A which is what the Gamry can provide. For the Type B - cell there will just be 12 measuring points used since it has very high capacity, and lower than 12 measuring points would be insufficient. Directly when the SOC - level is reached, then the frequency test EIS start, ranged from 10 000 Hz to 0. 01 Hz. How long it takes for the Gamry to discharge has been calculated. The equation below shows how many hours the battery needs to be fully discharged or charged by the LFP battery cell, 𝑇𝐻𝑜𝑢𝑟 = 𝑄𝑏𝑎𝑡𝑡 _𝐴ℎ 𝐴𝐺𝑎𝑚𝑟𝑦 = 95 𝐴ℎ 3 𝐴 ≈ 31.67 ℎ (9) where the THour is how many hours that are needed to either discharge or charge the battery. The total capacity is the variable Qbatt_Ah and the AGamry is how many ampere the Gamry can discharge with. In Gamrys program Framework, it is possible to have either hours, minutes or seconds and in this thesis minutes were chosen. Therefore the hours must be transformed to minutes according to 𝑇𝑚𝑖𝑛 = 31.67 ∗ 60 ≈ 1900 𝑚𝑖𝑛 (10) where TMin is how many minutes it takes to discharge the Type B-cell. The next step is to adjust the number of measuring points that are to be used. For the Type B-cell12 measuring points were decided. 𝑇𝑀𝑖𝑛/𝑃 = 𝑇𝑀𝑖𝑛 𝑃𝑝 ≈ 158 𝑚𝑖𝑛/𝑝𝑜𝑖𝑛𝑡𝑠 (11) 18 19 4. Result 4.1. Difference between different State of Charge and temperature on the Type A -cell This chapter will show comments about the curve and then how the curves look like. The comparison will be between 3 RC-links with Alpha and 3 RC-links without Alpha which was explained in Section 2.2. In every Figure in chapter 0, a blue and a red curve will be present. The blue one is the measurement data and the red curve is the curve fitting. On both the x - and y - axes in the figures, the unit mΩ will be used. Where it says that it is for example 100 % SOC it means that it very close to 100 % SOC. It cannot be said that it is exactly 100 % SOC since the measurements are not completely accuracy and it is very difficult to either discharge or charge a battery, in order to make it end exactly where it should be. Another thing that is important as discussed in Section 2.2 is that the inductance represents the behavior at the high frequency. These figures are not present as they are not relevant. In fact 60 different frequencies were measured but the 11 most high frequencies were not chosen, in other words, the reader will see the measuring point from 12 to 60. 4.1.1. Zero degree Celsius It was written in Section 3.3, every measurement would have 15 measuring points from the Type A-cell but this test done with 17 measuring points. Retrospectively only 15 measurements were required. Figure 10 and Figure 11 illustrate how the measurements data looks like when they are in the Nyquist diagram and the measurements will have the symbol *. The curve fitting will have the legend --, the curve fitting is the values that the user implements and in Figure 10 almost every curve fitting is in line with the measurements except for two SOC-levels (4 and 24 % SOC). In Figure 11 the curve fitting is not as precise as it was in Figure 10, and this depends on the Alpha factor, which was is explained in Section 2.3.4. 20 Figure 10: All the measurements data at different SOC-levels with curve fitting at every SOC-levels, with Alpha Figure 11: All the measurements data at different SOC-levels with curve fitting at every SOC-levels, without Alpha 21 4.1.2. Eight degree Celsius In Figure 12 the measurements data and the curve fitting is very close to each other, which indicate that the initial values are very near the real values. In Figure 13 the measurements data and the curve fitting are quite close to each other in the mass transport area but the form is not correct. In the charge transfer area many of the curves are fitted to high. Figure 12: All the measurements data at different SOC-levels with curve fitting at every SOC-levels, with Alpha 22 Figure 13: All the measurements data at different SOC-levels with curve fitting at every SOC-levels, without Alpha 4.1.3. 16 degree Celsius In Figure 15 the curve fitting in the charge transfer area is too big and the forms when this area ends between 1.4 mΩ to 1.8 mΩ in the x-axis are inaccurate. For the 6.25 % SOC the curve fitting is imprecise, it is not close to the measurements more so in the beginning and in Figure 14 all the curves fit are very close to the measurements. 23 Figure 14: All the measurements data at different SOC-levels with curve fitting at every SOC-levels, with Alpha Figure 15: All the measurements data at different SOC-levels with curve fitting at every SOC-levels, without Alpha 24 4.1.4. 24 degree Celsius The form of the curve has started to change, it is still very clear where the charge transfer area starts and ends but the curves tend to become more and more prolonged and this make it harder to get a good curve fit. Figure 17 is similar compared with earlier graphs without Alpha and Figure 16 is also very similar to the other graphs with Alpha. Figure 16: All the measurements data at different SOC-levels with curve fitting at every SOC-levels, with Alpha 25 Figure 17: All the measurements data at different SOC-levels with curve fitting at every SOC-levels, without Alpha 4.1.5. 32 degree Celsius At this temperature all the 15 measurements were done. The graphs show the SOC - levels from 5 to 99 % but the capacity has changed, it is depending on the temperature. The pattern that started to appeal in Figure 16 and Figure 17 has now become very clear in Figure 18 and Figure 19, the curves are very prolonged. As a result is it difficult to see where the charge transfer area is. The mass transport has also changed. The curve fitting in Figure 19 is quite accurate even if the Alpha is not used. 26 Figure 18: All the measurements data at different SOC-levels with curve fitting at every SOC-levels, with Alpha Figure 19: All the measurements data at different SOC-levels with curve fitting at every SOC-levels, without Alpha 27 4.1.6. 40 degree Celsius At this temperature only 11 measurements were done and as the graphs shows the SOC was measured from 0 to 67 % and at 67 % SOC level with only 40 frequencies measured. In Figure 20 and Figure 21 the form from the Figure 10 is now completely erased. The curve fitting in Figure 21 is inaccurate when it comes to the higher frequencies but at the lower frequencies the curve is still precise but more time was needed in order to get proper initial values. Figure 20: All the measurements data at different SOC-levels with curve fitting at every SOC-levels, with Alpha 28 Figure 21: All the measurements data at different SOC-levels with curve fitting at every SOC-levels, without Alpha 4.2. Difference between different State of Charge and temperature Type B- cell 4.2.1. Zero degree Celsius With Type B there were12 measuring points as explained in 3.3. In Figure 22 and Figure 23 the 8.33 % SOC are directly after the Ohmic resistance area and in both methods the curve fitting is not especially accurate compared with other curve fittings. 29 Figure 22: All the measurements data at different SOC-levels with curve fitting at every SOC-levels, with Alpha Figure 23: All the measurements data at different SOC-levels with curve fitting at every SOC-levels, without Alpha 30 4.2.2. 24 degree Celsius In Figure 24 and Figure 25 the curves are very different compared with Figure 22 and Figure 23. The curves are more prolonged in Figure 24 and Figure 25, which makes it more difficult to adjust the curve fitting as seen in Figure 25 there a couple of curve fittings that are not imprecise. Figure 24: All the measurements data at different SOC-levels with curve fitting at every SOC-levels, with Alpha 31 Figure 25: All the measurements data at different SOC-levels with curve fitting at every SOC-levels, without Alpha 32 4.3. Parameter values This section will illustrate the parameter values and how they are changing with different temperatures. There will be more measurements of Type A from 0° C to 40° C with 8° C intervals. For Type B is it from 0° C to 24° C. The Type B cell was only available for a limited time and it was not possible to do more measurements with the cell. The measurements for Type B were performed at 0° C and 24° C since 0° C is an extreme point and 24° C is room temperature. The resistances and the capacitances are evaluated because they are the parts of most interest which were described in Section 2.2. For all the measurements with Type A at 94 - 95 % SOC - level there was no measurement made at 40° C because of an error when the measurements were done. 4.3.1. Type A with Alpha Figure 26 is illustrating how the R0 changes depending on the temperature. The resistance is much higher at low temperatures compared with other temperatures. R0 is independent of the SOC - level. Figure 26: The resistance R0 at different temperatures 33 The resistance R1 is dependent on both temperature and SOC - level. At low SOC - level the resistance is higher and it goes down at higher temperatures. It is like that for all the SOC - levels. All the SOC - levels are very close to each other in mΩ at 40° C. Figure 27: The resistance R1 at different SOC-levels and temperatures The capacitance C1 is changing very much between the results at 1 - 7 % SOC - level and the 42 - 49 % SOC - level. The results at 72 - 75 % SOC - level at 40° C stands out from the rest of the values, which could be a measurement error. When the temperature increases, the capacitances increase. 34 Figure 28: The capacitance C1 at different SOC-levels and temperatures The resistance R2 is changing strongly between the different SOC - level and temperatures. The results at 72 – 75 % SOC - level has very high start values compared with the SOC - levels but after 8° C is it very close to the other SOC - levels. It could be a measurement error at that specific point and it could also be a measurement error at 40° C with the results at 83 - 86 % SOC - level. The results of 1 – 7 % SOC - level is again higher than the rest of the SOC - levels. 35 Figure 29: The resistance R2 at different SOC-levels and temperatures The Capacitance C2 has a large spread at 0° C, there the results at 1 - 7 % and 42 - 49 % SOC - levels is close to zero. The results of 60 - 65 % SOC - level is much greater than the rest of the SOC - levels at 8° C, but the closer they come to 40° C the more similar they become. 36 Figure 30: the capacitance C2 at different SOC-levels and temperatures The resistance R3 has a very big spread at 0° C. The results at 1 - 7 % and 60 - 65 % SOC - levels are very different compared with the rest of the SOC - levels, it could be a measurement error for these specific points and also the measurement point for the results at 1 – 7 % SOC - level at 40° C is much greater than the other SOC-levels. Except the results at 1 - 7 % SOC - level and after 0° C the rest of the SOC - levels are fairly equal to each other. 37 Figure 31: The resistance R3 at different SOC-levels and temperatures The capacitance C3 has a big spread at 0° C, there the results at 1 - 7 % SOC is much closer to zero and the results at 72 - 75 % SOC - level is approximately 2.25*104. The results at 83 - 86 % SOC - level is behaving very unpredictably. It goes up from 0° C to 24° C then it decrease a little but at 40° C it falls down to a very low value compared with the value at 32° C. This could be a measurement error. 38 Figure 32: The capacitance C3 at different SOC-levels and temperatures 4.3.2. Type A without Alpha The resistance R0 has a more linear behaviour compared with R0 with Alpha, the biggest difference is at 16° C. R0 has a value of approximately 0.73 mΩ and Figure 33 shows around 0.9 mΩ. The other values in Figure 33 have higher resistance compared with the Figure 26 values on R0. This due to of Alpha and in Section 2.3.4it was explained how Alpha affects these values. 39 Figure 33: The resistance R0 at different SOC-level and temperatures The resistance R1 SOC - level looks similar compared with the SOC - levels Figure 27 but a big difference is the values, which are lower in Figure 34. The results from 42 - 49 % to 94 - 95 % SOC - levels have almost the same values but for the 1 - 7 % SOC - level there is a big difference, in Figure 27 the value is approximately 10 mΩ but in Figure 34 the value is approximately 6 mΩ. 40 Figure 34: The resistance R1 at different SOC-levels and temperatures In Figure 28 the SOC - levels are very close to each other from 0° C to 32° C but after that, the results at 60 - 65 % and 72 - 75 % SOC-levels increase rapidly, that could depend on a measurement error. Compared with the capacitance C1 with Alpha 1 - 7 %, the SOC - level is significantly lower and is not that different compared with the other SOC - levels. Also in C1 with Alpha the results at 72 - 75 % SOC - level did increase rapidly after 32° C. 41 Figure 35: The capacitance C1 at different SOC-levels and temperatures The resistance R2 in Figure 36 has greater values than the R2 with Alpha in Figure 29, but in both cases the results from the 1 - 7 % SOC - level are very different compared with the rest of the SOC - levels. From 24° C to 32° C in Figure 36 the results at 42 - 49 % SOC - level is increasing a lot and that does not happen in Figure 29 and in Figure 29 it is the 83 - 86 % SOC - level that is increasing at 32° C. 42 Figure 36: The resistance R2 at different SOC-levels and temperatures The capacitance C2 values at 0° C are almost the same but after that 94 - 95 % SOC - level increases a large amount after 0° C. The other SOC - levels do not increase as significantly. At 16° C 1 - 7 % SOC - level increased a large amount and other SOC - levels had not moved significantly. At 24° C the results at the 1 - 7 % to 60 - 65 % SOC - levels increase a large amount. The conclusion that can be drawn is that the capacitance is changing a large amount depending on the SOC - level and the temperature. Compared with the C2 with Alpha in Figure 30 the shape of the graphs is very different but the values from 24° C to 40° C is within the same range. 43 Figure 37: The capacitance C2 at different SOC-levels and temperatures The resistance R3 has very different values at 8° C, the results at 72 - 75 % and 83 - 86 % SOC - levels are much bigger compared with the other SOC - levels. At 24° C and at 40° C the SOC - levels are very close to each other. There is a big difference from R3 with Alpha in Figure 31, there the results at 1 - 7 % SOC - level is much higher than the rest of the SOC - levels and it is also much higher compared R3 without Alpha in Figure 38. Expect for the 1 - 7 % SOC - level in Figure 31 and after 16° C the graphs are very similar to each other. 44 Figure 38: The resistance R3 at different SOC-levels and temperatures The estimation of C3 for the SOC - levels from 0° C to 8° C are very close to each other but then the result of the results at 60 - 65 % SOC - level increases rapidly to a high value while the rest of the SOC - levels are in the same levels they were before. At 24° C the results at 60 - 65 % SOC - levels comparable to the rest of the SOC - levels and at 40° C so there is not such difference between the graphs. Compared with C3 with Alpha see Figure 32, there are almost the same values present. 45 Figure 39: The capacitance C3 at different SOC-levels and temperatures 4.3.3. Type B with Alpha In Table 2 the impedance is considerably lower in Type B than it was for the Type A and this has to do with the different chemistry in the batteries and the size. The pattern is however the same, the warmer the batteries are the lower the resistance R0. It is the same in both methods. The resistance R0 is not dependent on SOC - levels but it is dependent on the temperature. Table 2: The resistance R0 (in mΩ) at different SOC - level and temperatures Temperature/ SOC - level 0-100% 0° C 0.61 24° C 0.6059 In Table 3 the resistances R1 are very close, with a max difference of approximately 1mΩ, but the 8.33 % SOC - level is a little higher than the rest. 46 Table 3: The resistance R1 (in mΩ) at different SOC - levels and temperatures Temperature/ SOC - level 8.33% 33.32% 75% 91.63% 0° C 7.94 7.45 6.93 6.83 24° C 1.67 0.67 0.64 0.63 In Table 4 it is illustrated how the capacitance C1 is changing with different SOC - levels. There is a big difference for the start values, the 8.33 % SOC - level is approximately double in value compared with the rest of the results from the other SOC - levels and that only increases when the measurements are done at 24° C. Table 4: The capacitance C1 (in F) at different SOC - levels and temperatures Temperature/ SOC - level 8.33% 33.32% 75% 91.63% 0° C 48.65 17.45 18.46 19.03 24° C 80.78 38.61 36.89 36.48 The resistances R2 in Table 5 show that all the SOC - levels are close to each other at 0° C but then 91.63 % SOC - level at 0° C is increasing and other SOC -levels are decreasing. For the 8.33 % SOC - level there could be a measurement error at 0° C and 24° C since these values are much higher than the rest of the SOC - levels. Table 5: The resistance R2 (in mΩ) at different SOC - levels and temperatures Temperature/ SOC - level 8.33% 33.32% 75% 91.63% 0° C 12.68 0.43 0.36 0.42 24° C 0.95 0.20 0.12 0.11 The capacitance C2 values at 0° C and 24° C are much greater than the capacitance C1 and this was also seen for the Type A capacitances. In Table 6 the 75 % SOC - level is the highest and it is approximately more than double the 33.32 % SOC - level which is approximately for 0° C 8 times higher and three times higher at 24° C compared with 8.33 % SOC - level values. 47 Table 6: The capacitance C2 (in F) at different SOC - levels and temperatures Temperature/ SOC - level 8.33% 33.32% 75% 91.63% 0° C 932.26 7636.45 10 235.57 6484.34 24° C 2160.78 6583.08 13 700.42 14 137.90 In Table 7 all the resistances are at different SOC - levels, fairly close to each other at 0° C but at 24 ° C there are very big differences between them. Table 7: The resistance R3 (in mΩ) at different SOC - levels and temperatures Temperature/ SOC - level 8.33% 33.32% 75% 91.63% 0° C 0.14 2.70 2.27 2.37 24° C 55.00 1.61 1.56 1.33 In Table 8 the capacitance C3 shows that the values at 0° C are very different between the different SOC - levels. The results at 33.32 % and 75 % SOC - levels are very close to each other at 0° C and the other two SOC - levels have a big differences at 24 ° C. Table 8: The capacitance C3 (in F) at different SOC - levels and temperatures Temperature/ SOC - level 8.33% 33.32% 75% 91.63% 0° C 250.00 9983.33 11 649.28 7575.05 24° C 3041.87 16 403.92 22 799.33 24 529.31 48 4.3.4. Type B without Alpha In Table 9 the resistance R0 is shown. The same phenomena of the resistance becoming lower at higher temperatures are observed as seen in the other resistances R0. Comparing the different methods with the battery cell Type B it can be noted that the resistance is lower with the method that uses Alpha. Table 9: The resistance R0 (in mΩ) at different SOC - level and temperatures Temperature/ SOC - level 0-100% 0° C 0.70 24° C 0.63 In Table 10 the resistance R1 looks quite similar to Table 3 at 0° C when all the SOC - levels are very close to each other. However in Table 10 the impedances are lower than in Table 3. At 24° C all the SOC - levels did follow the pattern as in Table 3 but at 0° C did not do that. The results from 33.32 %, 75 % and 91.63 % SOC - levels did not decrease as much as the others, in contrast to Table 3. The reason for this is unknown. Table 10: The resistance R1 (in mΩ) at different SOC - levels and temperatures Temperature/ SOC - level 8.33% 33.32% 75% 91.63% 0° C 4.68 5.43 4.98 4.88 24° C 1.02 0.56 0.49 0.48 At 0° C the results at 8.33 % SOC - level is greater than the rest of the SOC - levels but all the SOC - levels are showing the same pattern, they are all decreasing at 24° C compared with 0° C. This did also happen with the method using Alpha but then the 8.33 % SOC - level were much greater compared with the same SOC - level in Table 11. Table 11: The capacitance C1 (in F) at different SOC - levels and temperatures Temperature/ SOC - level 8.33% 33.32% 75% 91.63% 0° C 13.46 9.84 10.08 10.01 24° C 17.01 12.57 11.56 11.55 49 In Table 12 the resistance R2 is 91.63 % SOC - level is showing what was discussed in Section 2.3.1 about the SEI layer and this layer. R2 and R3 which deal with the mass transport area, are affected by this increase in SEI layer when there is very high SOC - levels. This is obvious from Table 12. Table 12: The resistance R2 (in mΩ) at different SOC - levels and temperatures Temperature/ SOC - level 8.33% 33.32% 75% 91.63% 0° C 13.19 1.86 1.74 3.55 24° C 1.13 1.30 0.15 0.15 The capacitances C2 in Table 13 with different SOC - levels show that the impedance at 0° C are quite close to each other but at 24° C the results at 33.32 % SOC - level have increased rapidly which be a result of a measurement error. Table 13: The capacitance C2 (in F) at different SOC - levels and temperatures Temperature/ SOC - level 8.33% 33.32% 75% 91.63% 0° C 980.17 200.00 200.00 271.83 24° C 545.95 13 764.10 539.04 578.29 The resistance R3 in Table 14 is not showing the same SEI layer behavior at a fully charged battery as the resistance R2 is. The 8.33 % SOC - level is increasing a large amount from 0° C to 24° C. This happens in the other method, with Alpha but in that case so did the 91.63 % SOC - level. In the case where the Alpha set-up was not used, the 91.63 % SOC - level decreased. Table 14: The resistance R3 (in mΩ) at different SOC - levels and temperatures Temperature/ SOC - level 8.33% 33.32% 75% 91.63% 0° C 3.18 2.10 1.79 2.20 24° C 18.51 0.21 0.95 0.84 50 In Table 15 the capacitances are quite close to each other but at 24° C the 75 % SOC - level is very different from the other SOC -levels. This also happens in the method with Alpha but in that case the result from the 33.32 % SOC-level also increased like for the 75 % SOC - level. The capacitance values are quite close to each other when the methods are compared with each other. Table 15: The capacitance C3 (in F) at different SOC - levels and temperatures Temperature/ SOC - level 8.33% 33.32% 75% 91.63% 0° C 380.00 5843.46 6420.97 4668.99 24° C 2766.08 2063.63 17 525.11 18863.18 51 5. Conclusion 5.1. Conclusion One of the conclusions that can be drawn from this thesis is that the resistances R0, R1, R2 and R3 are very different in many ways. The resistance R0 just changes with different temperatures and not with different SOC - levels in the methods. It did not matter which of the methods that was used or which type of battery that was tested. An interesting point is that R0 was much lower for Type B compared with Type A, and this has to do with the chemistry and size the batteries. For R1, R2 and R3 the resistances change very much between different SOC-levels and temperatures. When comparing the two methods, with and without Alpha, the resistances in Type A were quite close to each other except for specific points where the values were very different. The same behavior could be seen with Type B when comparing the methods. Another conclusion that could be drawn is that the 1 - 7 % SOC - level for all the resistances are often very different compared with the rest of the SOC - levels. The conclusion that could be made for the capacitances C1, C2 and C3 is that 1 - 7 % SOC - level are often higher than the rest of the SOC - levels for both the methods and for both the battery types. There are very big differences in the size of the capacitances, depending on which capacitance that is examined. The capacitance C1 is much lower with both methods and type of battery compared with the other capacitances.C1 is between 0 - 100 F for both Type A and Type B, while C2 and C3 are approximately between 1 000 - 12 000 F for Type A and for Type B, C2 and C3 are in the area of 0 - 10 000 F. A conclusion from the Nyquist diagrams of the measured data, for example Figure 10 and Figure 11, is the big difference of the impedance from the frequency tests between the data with Alpha and the data without Alpha. The curve fitting is much more precise when the method with Alpha is used compared with the method without Alpha. Another interesting point is the big difference of the impedance between different temperature levels in the Nyquist diagram. When comparing the measured data at 0° C and the data from 40° C, for example Figure 10 and Figure 20, it can be seen that the impedance is more linear at 40° C. For 0° C it is clear where the charge transfer area is but at 40° C it is almost impossible to see where the charge transfer area is. 52 5.2. Future work It would be interesting to test these different methods in a real application and evaluate how different they are to each other. Would there be a big difference between them or would it not even be noticed which method is used or not? Much is still unknown about the behavior of the parameters and why they change so much. It would have been interesting to test how the model would behave on an ageing battery cell and if the parameters were changing, which parameter would change first and most. There is a possibility that an adaptive model might be needed, which updates the parameter values during the lifetime of the battery cell. Another thing that would have been interesting to test is other battery types with different chemistries. 53 6. Bibliography [1] Helena Berg, Batteries for Electric Vehicles- Materials and Electrochemistry.: Cambridge University Press, 2015. [2] John Warner, Handbook of lithium ion battery pack.: Elsevier inc, 2015. [3] Avnish Narula, "Modeling of Ageing of Lithium Ion Battery at Low Temperatures," Gothenburg, 2014. [4] Jiuchun Jiang and Caiping Zhang, Fundamentals and Application of Lithium-ion Batteries in Electric Drive Vehicles.: John Wiley & Sons Singapore, 2015. [5] Freddy Trinh, "A method for Evaluating Battery Sate of Charge Estimation Accuracy," 2012. [6] He Hongwen, Xiong Rui, and Fan Jinxin, "Evalution of Lithium-Ion Battery Eqivalent Circuit Models for State of Charge Estimation by an Experimental Approach," vol. 4, pp. 582-598, March 2011. [7] Tarun Huria, Massimo Ceraolo, Javier Gazzarri, and Robyn Jackey, "High Fidelity Electrical Model with Thermal Dependence for Characterization and Simulation of High Power Lithium Battery Cells," in Electric Vehicle Conference (IEVC), 2012 IEEE International, February 2012. [8] Jens Groot, "State-of-Health Estimation of Li-ion Batteries: Ageing Models," Gothenburg, 2014. [9] Stephan Buller, "Impedance-Based simulation Models for Energy Storage Devices in Advanced Automotive Power Systems," Aachen, 2003. [10] Zeyang Geng and Charalampos Savvidis, "On- Board impedance diagnostics method of Li-ion traction batteries using pseudo-random binary sequences," Gothenburg, 2015. [11] Robyn Jackey et al., "Battery Model Parameter Estimation Using a Layered Technique: An Example Using a Lithium Iron Phosphate Cell," 2013. [12] (2016, April) Digatron power electroniccs. [Online]. http://www.digatron.com/en/energy-storage-charging-testing/ultra-cap-tester/ [13] John D'Errico. (2016, March) Mathworks. [Online]. http://www.mathworks.com/matlabcentral/fileexchange/8277-fminsearchbnd-- fminsearchcon http://www.digatron.com/en/energy-storage-charging-testing/ultra-cap-tester/ http://www.mathworks.com/matlabcentral/fileexchange/8277-fminsearchbnd--fminsearchcon http://www.mathworks.com/matlabcentral/fileexchange/8277-fminsearchbnd--fminsearchcon 54