Im trying to Optimize battery - supercapactior HEES, without using binary variables to separate charge and discharge because I want to avoid MINLP.
But the system is giving me unfeasible solutions. Is my model right or am I missing something?
Thank you
-
Battery Parameters
bat_eff “Battery Charge-discharge efficiency” / 0.85 / -
Battery Constrain
SOC_bat_min “Minimum state of charge (%)” / 0.2 /
SOC_bat_max “Maximum state of charge (%)” / 0.8 / -
SC Parameters
sc_eff “SC-discharge efficiency” / 0.9 /
V_SC_unit “Nominal voltage of a single SC cell (V)” / 2.7 / -
Self discharge is 5% per day, so it is assumed to be per hour by dividing it by 24h 5/24
sd_sc “Self-discharge per hour?(%)” / 0.0021/
*SC constrains
V_SC_min “Minimum Voltage of SC (V)” / 16 /
V_SC_max “Maximum Voltage of SC (V)” / 48 /
SOC_sc_max “Maximum SOC for SC (%)” / 0.95/ -
PV and Wind Generation Parameters
pv_capacity “PV Nominal Capacity (kW)” / 0.550 /
wt_capacity “WT Nominal Capacity (kW)” / 0.300 / -
Low pass filter parameter
Ts “Low-pass filter sampling time (h)” / 1 / -
Price parameters (need to confirm)
*PV and wind
cost_pv "Cost per kW of solar panel (USD/kW)" / 2690 /
op_pv "PV operation cost (USD/kWh)" / 30 /
cost_wt "Cost per kW of wind turbine (USD/kW)" / 8665 /
op_wt "Wind operation cost (USD/kWh)" / 41 /
cost_acdc "AC-DC converter cost (USD/kW)" / 127 /
*Battery
cost_bat “Cost per kWh of battery (USD/kWh)” / 436 /
op_bat “Operation cost per (USD/kWh)” / 19.77 /
*SC
cost_sc “Cost per kWh of sc (USD/kWh)” / 19200 /
op_sc “Operation cost per (USD/kWh)” / 10 /;
Variables
-
Hybrid Energy Storage
P_HESS(t) “Total HESS power at time t (kW)” -
Battery Energy Storage
P_bat_charge(t) “Battery charging power at time t (kW)”
P_bat_discharge(t) “Battery discharging power at time t (kW)”
E_bat(t) “Energy stored in the battery at time t (kWh)” -
Supercapacitor time dependant varaibles
V_SC(t) “Supercapacitor voltage at time t (V)”
P_SC(t) “Supercapacitor power at time t (kW)”
E_SC(t) “Energy stored in the supercapacitor at time t (kWh)” -
Supercapacitor non-time dependant variables
n_sc_parallel “Number of supercapacitor cells in parallel”
n_sc_series “Number of supercapacitor cells in series”
Vn_sc_bank “Nominal voltage of the supercapacitor bank (V)”
Capacitance_SCbank “Capacitance of SC bank (F)”
SCbank_capacity “Nominal maximum energy of the SC bank (kWh)” -
Low pass filter
fc “Low-pass filter frequency cut (hz)”
P_bat_filter(t) “Power demanded from the battery (Low-frequency component filtered)(kW)”
P_SC_filter(t) “Power demanded from the SC (High-frequency component filtered)(kW)” -
Generation Sources
Pv_total(t) “Total PV generation (kW)”
Wind_total(t) “Total wind generation (kW)”
npv “Number of solar panels”
nwt “Number of wind turbines”
acdc_capacity “Capacity of the AC/DC needed for wind” -
HEES size capacity
bat_capacity “Capacity of battery (kWh)”
SC_cap_unit “Capacitance of one SC unit (F)” -
Price Variables $
investment_cost “Investment cost (USD)”
op_cost “Operation cost (USD)”
totalcost “Total cost (USD)”;
Positive Variables
P_SC_abs(t) “Magnitud |P_SC(t)| only for OPEX”
npv, nwt, bat_capacity, SC_cap_unit, n_sc_parallel, n_sc_series, P_bat_charge(t), P_bat_discharge(t)
- Low pass filter
Tf “Low-pass filter time sample (h)”;
Tf.lo = 1e-3 ; Tf.l = 1e-3 ;
n_sc_series.lo = 1 ; n_sc_series.l = 1 ;
n_sc_parallel.lo = 1 ; n_sc_parallel.l = 1 ;
Equations
*Total Generation calculation
pv_generation(t) “Total solar energy generation”
wind_generation(t) “Total wind energy generation”
- Instant Power balance of system
power_balance(t) “Instant power balance”
*Filter equation (Energy)
filter_battery_init “Initial Filter Condition”
filter_battery(t) “Filtered power for Battery”
filter_sc(t) “Filtered power for SC”
*2. Hybrid Energy storage power in any time t
HEES(t) “P_bat_filter(t)+P_SC_filter(t)”
- SC Bank Parameter related equations
Cap_total_eq "Total SC bank capacitance "
V_SC_bank_eq “Nominal voltage of SC bank”
E_SC_max_eq “Maximum energy stored in SC bank”
sc_power(t) “Supercapacitor instant power in t time”
sc_dynamics(t) “Supercapacitor energy dynamics”
sc_V_dynamic(t) “Supercapacitor voltage dynamics”
sc_parallel_min “n_sc_parallel =g= 1”
sc_voltage_upper(t) “V_SC(t) ≤ V_SC_max”
sc_voltage_lower(t) “V_SC(t) ≥ V_SC_min”
initial_SC
*Battery
- Battery charge and discharge condition identification
initial_battery_condition “Ensure initial SOC is full”
charge_condition(t) “Charging condition”
filter_equation(t) “divide in charge and discharge”
battery_dynamics(t) “Battery Energy dynamics each time”
*Energy limits equations
bat_upper_limit(t) “Battery upper energy limit”
bat_lower_limit(t) “Battery Lower energy limit”
*Low pass filter equations and constrains
cutfrequency “LPF frequency cut calcualtion”
cutfreq_limit “LPF cut frequency lower limit (Nyquist criterion )”
*Size limitation
SC_cap_unit_lower “SC_cap_unit =g= 5 , Min 5F”
SC_cap_unit_upper “SC_cap_unit =l= 350, Max 600F”
- npv_limit “Limit solar panels to 18 - 10kW”
- nwt_limit “Limit wind turbines to 4”
acdc_capacity_cal “Total AC/DC converter capacity needed”
*Cost
total_invest “Total Initial investment cost”
OPEX “Total OP cost”
objective_function “Objective function: Minimize total system cost”
*OPEX SC
SC_abs_pos(t) “P_SC_abs(t) =g= P_SC(t)”
SC_abs_neg(t) “P_SC_abs(t) =g= -P_SC(t)”;
*Total Generation calculation
-
Total solar energy generation (multiplying the solar profile by the number of panels)
pv_generation(t) ..
Pv_total(t) =e= PV_profile(t) * npv; -
Total wind energy generation (multiplying the wind profile by the number of turbines)
wind_generation(t) ..
Wind_total(t) =e= Wind_profile(t) * nwt;
*Instant Power balance / always
power_balance(t) ..
Pv_total(t) + Wind_total(t) + P_HESS(t) =e= LoadDemand(t);
- Hybrid Energy storage power in any time t, power requirement division is defined by the filter/always
HEES(t) ..
P_HESS(t)=e= P_bat_filter(t)+P_SC_filter(t);
- Filtered Power equations
filter_battery_init ..
P_bat_filter(‘t1’) =e= Pv_total(‘t1’) + Wind_total(‘t1’) - LoadDemand(‘t1’) ;
filter_battery(t)$(ord(t)>1)..
P_bat_filter(t) =e= (Tf/(Tf+Ts)) * P_bat_filter(t-1) + (Ts/(Tf+Ts)) * P_HESS(t) ;
filter_sc(t)..
P_SC_filter(t) =e= P_HESS(t)- P_bat_filter(t);
*Supercapacitor
*Initial SC Condition
initial_SC ..
E_SC(‘t1’) =e= 0.9 * SCbank_capacity;
-
Total SC capacitance - 10.1109/ICPEDC.2017.8081065
Cap_total_eq..
Capacitance_SCbank =e= (n_sc_parallel / n_sc_series) * SC_cap_unit; -
Nominal voltage of SC bank
V_SC_bank_eq..
Vn_sc_bank =e= n_sc_series * V_SC_unit; -
Maximum Nominal energy stored in SC bank ( kWh)
-
(Energy in joules is converted to kWh by dividing by 3.6e6, since 1 kWh = 3.6 × 10^6 J)
E_SC_max_eq..
SCbank_capacity =e= 0.5 * Capacitance_SCbank * (sqr(Vn_sc_bank)) / (3.6*1000000);
*power is equal to filtered power
- P_SC(t) > 0 → supercondensador en descarga
- P_SC(t) < 0 → supercondensador en carga
sc_power(t)..
P_SC(t) =e= P_SC_filter(t);
SC Energy Dynamic in time t
sc_dynamics(t)$(ord(t) > 1) ..
E_SC(t)=e= E_SC(t-1)- sc_effP_SC(t)- sd_sc* E_SC(t-1);
Equation to know the voltage of the SC related to energy in a time t
sc_V_dynamic(t)..
E_SC(t) =e= 0.5 * Capacitance_SCbank * sqr(V_SC(t)) / (3.61000000);
*At least 1 sc in parallel
sc_parallel_min..
n_sc_parallel =g= 1;
*Upper and Lower limits for Voltage around time
sc_voltage_upper(t) ..
V_SC(t) =l= V_SC_max;
sc_voltage_lower(t) ..
V_SC(t) =g= V_SC_min;
*Battery
initial_battery_condition ..
E_bat(‘t1’) =e= 0.8 * bat_capacity;
- Charging condition
filter_equation(t)..
P_bat_filter(t) =e= P_bat_discharge(t) - P_bat_charge(t);
charge_condition(t) ..
P_bat_charge(t)* P_bat_discharge(t)=e= 0;
-
Battery Energy dynamic
battery_dynamics(t)$(ord(t) > 1) ..
E_bat(t) =e= E_bat(t-1) + bat_eff * P_bat_charge(t) - P_bat_discharge(t) / bat_eff; -
Upper and lower energy limits for the battery
bat_upper_limit(t) ..
E_bat(t) =l= SOC_bat_max * bat_capacity;
bat_lower_limit(t) ..
E_bat(t) =g= SOC_bat_min * bat_capacity;
LPF
cutfrequency..
fc =e= 1/(23.1416*Tf);
cutfreq_limit..
fc=l=1/(2*Ts);