当前位置:网站首页>Matlab| short term load forecasting of power system based on BP neural network
Matlab| short term load forecasting of power system based on BP neural network
2022-06-26 03:04:00 【Power system code】

Catalog
Two 、 Input and output data normalization
3、 ... and 、 Establishment and training BP neural network
Four 、 Load forecasting using test data
5、 ... and 、Matlab Code display

Abstract
Use BP The neural network realizes the simple task of power load regression prediction . The main steps are : Import data 、 Data normalization 、 establish BP neural network 、 Training BP neural network 、 Use test data to predict load conditions 、 Error analysis and drawing .
One 、 Power load data import
Use Matlab Medium xlsread Function from the specified excel Extract power load data from the file , You can set the number of days to import , Set import here 5 Days of data , As shown in the figure below :

All other data :

Two 、 Input and output data normalization
Although the nerves ⽹ The transmission of each layer of the network ⼊ The signal distribution is different , But in the end “ Point to “ The sample mark of is unchanged , That is, the marginal probability is different ⽽ Conditional probability ⼀ Cause . In order to reduce the impact of distribution changes , Can make ⽤ return ⼀ Strategy Normalization, Map the data distribution to ⼀ A definite interval . nerve ⽹ Collateral , often ⽤ The return of ⼀ There are some strategies BN(Batch Normalization), WN(Weight Normalization), LN(Layer Normalization),IN(Instance Normalization).
Use here max-min Normalization method normalizes all data to 0-1 Between , The normalized data are as follows :

3、 ... and 、 Establishment and training BP neural network
BP Neural network is a kind of multilayer feedforward neural network , The error back propagation signal is added to the multilayer perceptron , To deal with nonlinear continuous functions , The network consists of an input layer 、 Hidden layer 、 Output layer structure , Its main feature is the forward transmission of signals , Error back propagation , It can be used in system model identification 、 Under prediction or control . In forward transmission , The input signal is processed layer by layer from the input layer through the hidden layer , Up to the output layer . The state of neurons in each layer only affects the state of neurons in the next layer . If the output layer doesn't get the desired output ﹐ Then turn to back propagation , Adjust the network weight and threshold according to the prediction error ﹐ So that BP The predicted output of neural network keeps approaching the expected output ﹐ Its topological structure is shown in Figure 1 Shown :

This article specifies the number of input features as 1, The number of output features is 1, Set the number of neurons to 100, Set the learning rate to 0.001, Use Matlab Medium newff Function construction BP neural network , Use train Function training BP neural network :

Four 、 Load forecasting using test data
test result :

5、 ... and 、Matlab Code display
This article shows only part of the code , The complete code is here : We are shipping your work details
clc;
clear;
close all;
%% Import data
month = 12; % Training month
day_start = 5; % Start date
day_len = 5; % Training days
file_path = '2018 Load forecasting data ';
map_maxmin = [];
output = [];
%% Data grouping and normalization
for day = day_start:1:(day_start + day_len - 1)
[raw_data, raw_max ,raw_min] = read_load_data_from_excel(file_path, month ,day); % Reading data from a folder
% Input and output normalization
data_temp = my_map(1, raw_data, raw_max, raw_min, 1, 0);
map_maxmin = cat(1, map_maxmin, [0 1]);
output = cat(1, output, data_temp);
target_day = day + 1;
end
[target_data, target_max, target_min] = read_load_data_from_excel(file_path, month ,target_day);
t_d = my_map(1, target_data, target_max, target_min, 1, 0);
%% Creating networks 边栏推荐
- Overview of orb-slam3 paper
- Simple use example of Aidl
- Camtasia 2022 nouvelle vidéo d'ordinateur d'enregistrement ultra - clair
- Thirty ninth step
- Arthas(阿尔萨斯) 能为你做什么?
- ArrayList # sublist these four holes, you get caught accidentally
- Classic quotations from "human nature you must not know"
- 【系统架构】-如何评估软件架构
- Camtasia 2022全新版超清录制电脑视频
- 限制输入字符长度length英文1个字符中文2个字符
猜你喜欢
![[machine learning] case study of college entrance examination prediction based on multiple time series](/img/13/7368a169d07e01d86a2d2c0207ccca.png)
[machine learning] case study of college entrance examination prediction based on multiple time series

学习太极创客 — MQTT(五)发布、订阅和取消订阅

Fresh graduates talk about their graduation stories

【解决】CMake was unable to find a build program corresponding to “Unix Makefiles“.

Install development cross process communication

Learn Tai Chi Maker - mqtt (IV) server connection operation

Une citation classique de la nature humaine que vous ne pouvez pas ignorer

【机器学习】基于多元时间序列对高考预测分析案例

附加:HikariCP连接池简述;(并没有深究,只是对HikariCP连接池有个基本认识)

Authorization of database
随机推荐
UE5全局光照系統Lumen解析與優化
Scratch returns 400
【论文笔记】Manufacturing Control in Job Shop Environments with Reinforcement Learning
【系统架构】-如何评估软件架构
Business process diagram design
Golang--channel and select
Oracle练习
我在中山,到哪里开户比较好?网上开户是否安全么?
Notes on the 3rd harmonyos training in the studio
Use annotationdbi to convert gene names in R
Add console programs in UE
Limit the input character length to 1 character in English and 2 characters in Chinese
gstreamer分配器与pool的那些事
Dreamcamera2 record key prompt sound into video during video recording
GD32 ADC采集电压
解读Oracle
Literature reading --- optimize RNA SEQ research to study herbicide resistance (review)
Audio video and CPU architecture
ArrayList # sublist these four holes, you get caught accidentally
Deep understanding of distributed cache design