Addition of dispatchable loads in MATPOWER

29 visualizzazioni (ultimi 30 giorni)
Raymond
Raymond il 21 Nov 2024 alle 2:00
Modificato: Ayush il 21 Nov 2024 alle 8:01
How do you add dispatchable loads such as battery stoarge and wind into MATPOWER?

Risposte (1)

Ayush
Ayush il 21 Nov 2024 alle 7:07
Modificato: Ayush il 21 Nov 2024 alle 8:01
Hi Raymond,
I understand you need to add dispatchable loads such as battery storage and wind, into MATPOWER. It usually involves representing these resources as a combination of generators, loads, and possibly storage devices.
You can model these systems by integrating appropriate data into MATPOWER’s format.
  1. Battery Storage
It is typically modeled as a generator with a certain energy limit, where the energy input/output can be controlled based on the charging or discharging cycle.
Steps to add battery storage (Modeling as a Generator):
  1. Active Power Generation (P): The battery's power output can be treated as a negative load when discharging, and as a positive generator when charging.
  2. Reactive Power Generation (Q): You can either set the reactive power to zero or model it according to the battery’s capability.
  3. Energy Limits: To account for the battery's state of charge (SOC), you need to ensure the generator has energy limits, typically specified in terms of energy stored in kWh, which is a constraint during optimization.
  4. Charge/Discharge Power Limits: These are the maximum and minimum power values for charging and discharging.
Here’s a pseudo code for your reference:
% Adding battery storage as a generator in the generator matrix (gencost, gen)
mpc.gen = [
%bus Pg Qg Qmax Qmin Vg mBase status Pmax Pmin
3, 0, 0, 30, -30, 1.0, 100, 1, 50, -50; % Battery Storage
];
% Defining battery-specific generator cost (gencost matrix)
mpc.gencost = [
2, 0, 0, 3, 0.1, 0, 0; % For the battery cost function (simple)
];
% Add energy limits (for example, 100 kWh of energy)
battery_energy_limit = 100; % kWh
mpc.storage = [
3, battery_energy_limit, 0, 50, -50; % Energy stored, max charge/discharge
];
2. Wind Generation
Wind generation is typically modeled as a stochastic or probabilistic generator since its output is variable and depends on wind speeds, which are not controllable.
Steps to add wind generation:
  1. Wind turbines can be modeled as generators with a variable output based on a time-varying or probabilistic distribution. You may either use a fixed power generation model or integrate wind speed as an input.
  2. Power Limits: Wind generation usually has a maximum (Pmax) based on the installed capacity, and the output varies with wind speed, which may be represented as a probabilistic curve or modeled with some uncertainty.
  3. Stochastic Models: If you want a more advanced representation, you could integrate external data or stochastic methods to model the variability of wind generation.Here’s the pseudo code for your reference:
% Adding wind generation as a generator in the generator matrix (gencost, gen)
mpc.gen = [
% bus Pg Qg Qmax Qmin Vg mBase status Pmax Pmin
5, 0, 0, 100, 0, 1.0, 100, 1, 50, 0; % Wind Generation
];
% Wind turbine cost function (simplified, flat rate)
mpc.gencost = [
2, 0, 0, 3, 0.05, 0, 0; % For wind turbine cost
];
Note: In MATPOWER, there is no built-in mechanism for time-varying data or probabilistic generation directly. However, you can modify the power output of the wind and battery storage resources as part of a time-series simulation or perform dynamic simulations.
For example:
  • Battery Storage: The power output can be set as a time-varying input, depending on the state of charge (SOC) and the load demand.
  • Wind Power: The wind power output could be defined based on hourly or seasonally varying inputs, which you can modify manually or fetch from an external time-series dataset.
Example for your reference:
% Define the battery system (as a generator)
mpc.gen = [
3, 0, 0, 50, -50, 1.0, 100, 1, 50, -50; % Battery on bus 3
5, 0, 0, 100, 0, 1.0, 100, 1, 50, 0; % Wind on bus 5
];
mpc.gencost = [
2, 0, 0, 3, 0.1, 0, 0; % Cost function for battery
2, 0, 0, 3, 0.05, 0, 0; % Cost function for wind
];
Hope it helps!

Categorie

Scopri di più su Problem-Based Optimization Setup in Help Center e File Exchange

Prodotti


Release

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by