资源简介
状态估计算法 MATLAB 内附readme 详细说明了使用方法和步骤 有专门的txt文件 可以输入自己的bus阵 line阵等 即可进行状态估计
![](http://www.nz998.com/pic/47677.jpg)
代码片段和文件信息
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
相关资源
- 高灵敏度GPS接收机MATLAB仿真,附捕获
- 基于MATLAB的质点弹道计算与外弹道优
- 阵列天线的matlab仿真
- MATLAB 经典程序源代码大全
- MATLAB小波软阈值去噪代码33473
- 天线阵的波束形成在MATLAB仿真程序及
- 非线性SVM算法-matlab实现
- 《MATLAB 智能算法超级学习手册》-程序
- 组合导航matlab程序
- 读取txt文件内容matlab代码实现
- Matlab实现基于相关的模板匹配程序
- matlab优化工具箱讲解
- 基于MATLAB的快速傅里叶变换
- 光纤传输中的分布傅立叶算法matlab实
- 基于matlab的图像处理源程序
- matlab 椭圆拟合程序
- 算术编码解码matlab源代码
- optical_flow 光流法 matlab 实现程序
- 引导图像滤波器 Matlab实现
- 分形几何中一些经典图形的Matlab画法
- OFDM系统MATLAB仿真代码
- SVM工具箱(matlab中运行)
- 图像小波变换MatLab源代码
- LU分解的MATLAB实现
- 冈萨雷斯数字图像处理matlab版(第三
- 替代数据法的matlab程序
- 用matlab实现的多站定位系统性能仿真
- 通过不同方法进行粗糙集属性约简m
- k近邻算法matlab实现
- matlab识别系统
评论
共有 条评论