资源简介
状态估计算法 MATLAB 内附readme 详细说明了使用方法和步骤 有专门的txt文件 可以输入自己的bus阵 line阵等 即可进行状态估计
代码片段和文件信息
function x=dataentry(choicenbusnlinesnshuntstolerance);
%nbus=input(‘enter the number of buses.‘);
%nlines=input(‘enter the number of lines.‘);
%nshunts=input(‘enter the number of shunts.‘);
%tolerance=input(‘enter the tolerance.‘);
nbus=nbus;
nlines=nlines;
nshunts=nshunts;
tolerance=tolerance;
%Entering bus data
disp(‘The following code is employed for the status of the buses.‘);
disp(‘0-Slack Bus‘);
disp(‘1-Buses of PV or PQ type‘);
disp(‘You will now be asked data pertaining to initial conditions of each bus.‘);
bus_status=[];
v_bus=[];
ang_bus=[];
%weight variable for voltage magnitudes and power injections
%funda of wts: if the value is somewhat near desired then wts are low else
%if values drop very low then wts have to be very high. no measure implies
%very high weights
v_wts=[];
p_wts=[];
q_wts=[];
bus_number=[];
for i=1:nbus
bus_number=[bus_number i];
disp(‘This is the data for bus‘);
disp(i);
bus_status(i)=input(‘Bus status:‘);
disp(‘Please enter the starting conditions.‘);
v_bus(i)=input(‘Initial voltage:‘);
ang_bus(i)=input(‘Initial angle:‘);
disp(‘Please enter the measured values.‘);
v_meas(i)=input(‘Please enter the measured value of voltage.‘);
v_wts(i)=input(‘Enter the weight for this voltage measure.‘);
p_meas(i)=input(‘Please enter the measured value of real power injection.‘);
p_wts(i)=input(‘Enter the weight for this real power injection measure.‘);
q_meas(i)=input(‘Please enter the measured value of reactive power injection.‘);
q_wts(i)=input(‘Enter the weight for this reactive power injection measure.‘);
end
a=[bus_status‘ v_bus‘ ang_bus‘ v_meas‘ p_meas‘ q_meas‘];
a=a‘;
fid=fopen(‘busdata.txt‘‘w‘);
fprintf(fid‘%6.2f %6.2f %6.2f %6.2f %6.2f %6.2f\n‘a);
fclose(fid);
%Entering line data
disp(‘You will now be asked to enter line data.‘);
start_bus=[];
end_bus=[];
resistance=[];
reactance=[];
shunt_admit=[];
tap=[]; %This refers only to the tap magnitude
%line flows
pij_flow=[];
qij_flow=[];
pji_flow=[];
qji_flow=[];
%weights for line flows..same fundas apply
pij_wts=[];
qij_wts=[];
pji_wts=[];
qji_wts=[];
for i=1:nlines
fprintf(‘This is data for line %d‘i);
start_bus(i)=input(‘Enter the starting bus:‘);
end_bus(i)=input(‘Enter the ending bus:‘);
resistance(i)=input(‘Enter the resistance of the line:‘);
reactance(i)=input(‘Enter the reactance of the line:‘);
shunt_admit(i)=input(‘Enter the shunt admittance of the line:‘);
tap(i)=input(‘Enter the tap of the line (only magnitude)‘);
fprintf(‘Line flow from bus %d to bus %d‘start_bus(i)end_bus(i));
pij_flow(i)=input(‘Enter the real power flow on the line.‘);
pij_wts(i)=input(‘Enter the weights for this measure.‘);
qij_flow(i)=input(‘Enter the reactive power flow on the line.‘);
qij_wts(i)=input(‘Enter the weights for this measure.‘);
%fprintf(‘Line flow from bus %d to bus %d‘end_bus
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 588 2004-10-15 22:10 state estimation module\busdata.txt
文件 285 2004-10-19 23:52 state estimation module\busweightsdata.txt
文件 4201 2004-10-20 21:03 state estimation module\dataentry.m
文件 1120 2004-10-15 22:25 state estimation module\linedata.txt
文件 270 2004-10-15 22:25 state estimation module\lineweightsdata.txt
文件 890 2004-10-06 22:53 state estimation module\mainprog.m
文件 16817 2004-10-15 22:30 state estimation module\programengine.m
文件 1755 2004-10-20 21:14 state estimation module\readme first.txt
文件 0 2004-10-15 22:25 state estimation module\shuntdata.txt
相关资源
- 关于肤色分割的matlab源代码
- 基于卡尔曼滤波理论设计的航母甲板
- matlab tsp问题代码
- 快速Fourier变换算法及Matlab程序实现
- 基于matlab的数字图像的频域滤波器设
- TDOA时差定位算法仿真
- matlab2015b破解文件
- lasso经典matlab源码
- 经典卡尔曼滤波 目标跟踪 matlab 程序
- Gabor变换实现(CmatlabOpenCV)
- 图像像素级融合 matlab
- 应用MATLAB实现探地雷达数据小波变换
- 两幅图像的互信息的matlab代码
- MATLAB处理心电图的噪声
- Matlab-EMD工具箱 + 详细安装方法
- Random Walk (随机游走) matlab
- Delta机器人正逆解
- MATLAB与机器学习详细.txt
- matlab2011b找不到编译器vs2012的问题
- ook系统matlab仿真
- 图形面积测量
- matlab绘制有效前沿和资本市场线
- 指纹识别matlab实现
- matlab关于蒙特卡洛和算定积分的代码
- EMD经验模态分解MATLAB源代码,非常好
- LDPC编码构造的matlab实现
- 三维点云的配准和融合
- 基于MATLAB的GPS网平差
- MATLAB目标跟踪仿真小程序 (1)
- 广义预测控制matlab仿真程序
评论
共有 条评论