Electronics-Related.com
Forums

SPICE model for lead acid cell

Started by Daku November 7, 2011
Could some electronics guru please direct me to a SPICE model for a
lead acid cell. I understand that PSpice comes with a model, but I do
not use PSpice, and I hear that the
library is encrypted.
On Nov 7, 7:34=A0am, Daku <dakup...@gmail.com> wrote:
> Could some electronics guru please direct me to a SPICE model for a > lead acid cell. I understand that PSpice comes with a model, but I do > not use PSpice, and I hear that the > library is encrypted.
LTspice group had a very active session on this. the following is from "sgtwookieusmc" <the...@aol.com> Date: Mon, November 8, 2010 8:10 am * V2.0 Helmut Sennewald 02/22/04 * * Modified from NiMH.lib to simulate sealed lead-acid batteries; SgtWookie 11/3/2010 * * Lead-Acid Battery *------------------------ * * Possible Parameters * ------------------- *1 CELLS Number of cells in the battery; 2 =3D 4.2v, 3=3D6.35v, 6=3D12.8v= , etc. * VCELL nominal cell voltage in volts, e.g. 2.133 * CAPAH cell capacity in Ah(ampere*hours), e.g. 7.2 * R_SER series resistance in Ohms, e.g 0.2 * SOC state of charge (0..1, .9=3Ddischarged, .95=3D50%, 1=3Dfull) * CHEFF charging effeciency, e.g 0.7 means you need 1/0.7 times the * ampere*hours to charge fully * SELFDC self discharge per hour, e.g. 0.000042 if 3%/per month * TEMPC Battery internal temperature in =B0C; e.g. 25 =3D 25=B0C * * I started with an old article from S.C.Hageman about a SPICE model for * NIMH batteries. It's the model "NIMH" - PSpice Nickel-Metal-Hydride * battery discharge simulator. Optimized for 4/5A and AA Standard Cells * and discharge rates from 0C to 5C. It's for discharge only. * First I did some little changes on this discharge model. * Later, I started with further development to include a charging model * for he battery too. The result is the new model NIMH_AA. * Ext+ Ext- * ^ ^ * | | * | | * | | * +-------+----------- +/- Cell connections (Floating) * * * .SUBCKT Batt_SLA Ext+ Ext- * Soc Rate_d Cells * .PARAM CELLS=3D6 .PARAM VCELL=3D2.133 .PARAM CAPAH=3D7.2 .PARAM R_SER=3D20m .PARAM SOC=3D1 .PARAM CHEFF=3D0.75 .PARAM SELFDC=3D0.000042 .PARAM TEMPC=3D25 .IC V(Charge)=3D{SOC} .NODESET V(Charge)=3D{SOC*CELLS*VCELL} .PARAM R_DIS=3D{VCELL*CELLS/(SELFDC*CAPAH)} R_Cell Ext+ Cell+ {R_SER} V_Sense Ext- Cell- 0 R_dis Cell+ Cell- {R_DIS} * Charge to voltage translation with E-TABLE * The last table entry (1.1 -10) together with the clamped reverse voltage(D2) * defines the battery voltage in reverse mode. If this entry is omitted, * then the battery will clamp to zero volts. * * Following table is a rough approximation of a lead-acid battery E_Cell Cell+ Cell- TABLE { V(SODC) } =3D + (0.0000 {{1.0000*CELLS*VCELL}-{{TEMP-25}*0.003*CELLS}}) + (0.0750 {{0.9899*CELLS*VCELL}-{{TEMP-25}*0.003*CELLS}}) + (0.1500 {{0.9797*CELLS*VCELL}-{{TEMP-25}*0.003*CELLS}}) + (0.2250 {{0.9695*CELLS*VCELL}-{{TEMP-25}*0.003*CELLS}}) + (0.3000 {{0.9594*CELLS*VCELL}-{{TEMP-25}*0.003*CELLS}}) + (0.3750 {{0.9492*CELLS*VCELL}-{{TEMP-25}*0.003*CELLS}}) + (0.4500 {{0.9391*CELLS*VCELL}-{{TEMP-25}*0.003*CELLS}}) + (0.5250 {{0.9289*CELLS*VCELL}-{{TEMP-25}*0.003*CELLS}}) + (0.6000 {{0.9188*CELLS*VCELL}-{{TEMP-25}*0.003*CELLS}}) + (0.6750 {{0.9086*CELLS*VCELL}-{{TEMP-25}*0.003*CELLS}}) + (0.7500 {{0.8985*CELLS*VCELL}-{{TEMP-25}*0.003*CELLS}}) + (0.8250 {{0.8203*CELLS*VCELL}-{{TEMP-25}*0.003*CELLS}}) + (0.8310 {{0.8000*CELLS*VCELL}-{{TEMP-25}*0.003*CELLS}}) + (0.8510 {{0.7417*CELLS*VCELL}-{{TEMP-25}*0.003*CELLS}}) + (0.9080 {{0.6133*CELLS*VCELL}-{{TEMP-25}*0.003*CELLS}}) + (0.9480 {{0.5047*CELLS*VCELL}-{{TEMP-25}*0.003*CELLS}}) + (0.9800 {{0.3180*CELLS*VCELL}-{{TEMP-25}*0.003*CELLS}}) + (0.9900 {{0.1109*CELLS*VCELL}-{{TEMP-25}*0.003*CELLS}}) + (0.9950 {{0.0000*CELLS*VCELL}-{{TEMP-25}*0.003*CELLS}}) + (0.9960 {{0.0000*CELLS*VCELL}-{{TEMP-25}*0.003*CELLS}}) + (0.9970 {{0.0000*CELLS*VCELL}-{{TEMP-25}*0.003*CELLS}}) + (0.9980 {{0.0000*CELLS*VCELL}-{{TEMP-25}*0.003*CELLS}}) + (0.9990 {{0.0000*CELLS*VCELL}-{{TEMP-25}*0.003*CELLS}}) + (1.0000 {{0.0000*CELLS*VCELL}-{{TEMP-25}*0.003*CELLS}}) + (1.1000 {{-10.0000*CELLS*VCELL}-{{TEMP-25}*0.003*CELLS}}) * Original NiMH table below *+(0.0 1.3346) (0.0293 1.3042)(0.0426 1.2942) (0.0689 1.2841) *+(0.13 1.2733) (0.436 1.2633) (0.512 1.2532) (0.580 1.2432) *+(0.646 1.2331) (0.702 1.2231) (0.7583 1.2130)(8.0324E-01 1.2030) *+(0.831 1.1929) (0.851 1.1828) (0.908 1.1425) (0.948 1.0919) *+(0.980 0.987) (0.99 0.9352) (0.995 0.8272) (0.996 0.741) *+(0.997 0.647)(0.998 0.514) (0.999 0.33) (1.0000 0.0) (1.1 -10) * Actual rate of discharge by external load. * E.g. 0.2 means a full battery would last 5hours(=3D1/0.2). E_Rate N001 0 VALUE =3D { IF( (I(V_sense)>0 & V(Cell+,Cell-)>0), + I(V_Sense)/CAPAH, CHEFF*I(V_Sense)/CAPAH ) } R2 N001 Rate_d 1 C1 Rate_d 0 1 * State of charge is actually just a 1 to 1 transform of "Charge" E_Rate1 Soc 0 TABLE { V(Charge) } =3D (-1,-1) (1,1) * Higher capacity for discharge current below 0.2*C E_LowRate LowRate 0 TABLE { V(Rate_d) } =3D (0,0) (0.001,0.15) (0.1,0.1) (0.2,0) R3 LowRate 0 1G G_LowRate 0 Charge VALUE =3D { IF( (I(V_sense)>0 & V(Cell+,Cell-))>0, + V(LowRate)*I(V_Sense), 0) } * Lower capacity for discharge current above 0.2*C E_LostRate LostRate 0 TABLE { V(Rate_d) } =3D (0.2,0.0) (1.0,0.1) (5,0.2) R5 LostRate 0 1G G_HighRate Charge 0 VALUE =3D { IF( I(V_sense)>0 & V(Cell+,Cell-)>0, + V(LostRate)*I(V_Sense), 0) } * The charge model * Overcharge and discharge clamped with diodes C_CellCapacity Charge 0 { 3600 * CAPAH * {TABLE (TEMP, +-99, 0.2, +-20, 0.46, +-15, 0.56, +-10, 0.66, +-5 , 0.71, +0 , 0.76, +5 , 0.83, +10 , 0.90, +15 , 0.95, +20 , 0.98, +25 , 1.00, +30 , 1.03, +35 , 1.05, +40 , 1.07, +45 , 1.09, +99 , 1.10)}} R1 Charge 0 1MEG V2 N003 0 0.993 D1 Charge N003 DFULL D2 0 Charge DREV G_DisCharge Charge 0 VALUE =3D { IF( I(V_Sense)>0 ^ (V(Cell+,Cell-)<0), + I(V_Sense), I(V_Sense)*CHEFF) } * State of Discharge =3D 1-SOC E_Invert SODC 0 TABLE { V(Soc) } =3D (-1,2) (0,1) (1,0) R4 SODC 0 1G .model DFULL D(Is=3D1e-6 N=3D{0.02*CELLS} Vj=3D{.15*CELLS}) .model DREV D(Is=3D1e-8 N=3D{0.02*CELLS} Vj=3D{.15*CELLS}) .ends