Approach for Neural network

17 vues (au cours des 30 derniers jours)
Jatin
Jatin le 12 Déc 2025
Réponse apportée : Ritam le 22 Déc 2025
I wanted to create a Neural network that can be replica of runpf() in MATPOWER but only active and reactive power using the Neural Network fitting toolbox. is this the right approach. Later I want to use Neural network for different projects
mpc2=loadcase('case39');
load_min = 0;
load_max = mpc2.bus(:,3);
LP=zeros(39,5000);
LQ=zeros(39,5000);
V=zeros(39,5000);
%c=1;
j=1;
for i=1:5000
load= rand .* (load_max - load_min) + load_min; % Generating Random value for load
mpc2.bus(:,3)=load;
PF = runpf(mpc2);
if (PF.success)
LP(:,j)=PF.bus(:,3);
LQ(:,j)=PF.bus(:,4);
L = [LP; LQ];
V(:,j)=PF.bus(:,8);
j =j+1;
end
end

Réponses (1)

Ritam
Ritam le 22 Déc 2025
You might consider framing this as a surrogate that learns the mapping from load inputs (P,Q) to state outputs (bus voltage magnitudes and angles) rather than predicting P/Q themselves. Your data-generation loop seems fine for building a dataset from successful runpf cases; you could treat inputs as X = [LP; LQ] and targets as Y = [V; θ], with per-bus normalization and a train/validation/test split. A multi‑output regression network (e.g., NN Fitting Toolbox/fitnet with a few hidden layers and MSE loss) might be a practical starting point, evaluated against runpf with RMSE/MAE. For broader applicability, you may want to include operating conditions (generator setpoints, taps, topology) in the inputs or use the NN primarily as a fast initializer with runpf performing the final solve.

Catégories

En savoir plus sur Image Data Workflows dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by