is there any matlab dispatch code for off-grid renewable energy solution to powering the mobile BTS which consists of Solar PV , load and battery in DC bus and DG in AC bus.
Show older comments
function [simulation_state, matlab_simualtion_variables] = MatlabDispatch(simulation_parameters, simulation_state, matlab_simualtion_variables)
%checking the Diesel generator
if simulation_parameters.has_generator == true && simulation_parameters.generators.is_AC == true
%this command sets the generator number(i) to its maximum power output
simulation_state.generators(1).power_setpoint = simulation_state.generators(1).power_available;
%adding to the operating capacity
%Depending on which bus the component uses, it contributes its maximum possible power available to the bus' operating capacity
simulation_state.ac_bus.operating_capacity_served = simulation_state.ac_bus.operating_capacity_served + simulation_state.generators(1).power_available;
else
simulation_state.generators(1).power_setpoint = 0;
end
%checking the Solar PV
if simulation_parameter.has_pv==true && simulation_parameters.pvs(1).is_AC == false
simulation_state.pvs(1).power_setpoint = simulation_state.pvs(1).power_available;
else
simulation_state.pvs(1).power_setpoint=0;
end
I have defined the whether the system contains the PV or DG. I have used controller part MatlabPro link in Homer Pro software to simulate the design. However, the dispatch algorithms. However, in the alogirthm i need seperate the DC bus and AC bus load served, unmet load excess electricity ,operating capapcity served ,capacity.

Hence, I want a proper dispatch algorithms, thanks in advance.
Answers (0)
Communities
More Answers in the Power Electronics Control
Categories
Find more on Sources in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!