parent
059c5c2074
commit
7d4f318b58
|
|
@ -0,0 +1,6 @@
|
||||||
|
function [ output_args ] = plotAndComparison( rVolt,rVAngel,SEVolt,SEVAngel )
|
||||||
|
x=1:length(rVolt);
|
||||||
|
plot(x,rVolt)
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
function plotAndComparison( rVolt,rVAngel,SEVolt,SEVAngel )
|
||||||
|
x=1:length(rVolt);
|
||||||
|
subplot(2,1,1);
|
||||||
|
plot(x,rVolt,'r-');
|
||||||
|
hold on
|
||||||
|
plot(x,SEVolt);
|
||||||
|
subplot(2,1,2);
|
||||||
|
plot(x,rVAngel,'r-');
|
||||||
|
hold on
|
||||||
|
plot(x,SEVAngel);
|
||||||
|
end
|
||||||
|
|
||||||
3
run.m
3
run.m
|
|
@ -10,7 +10,7 @@ addpath('.\Powerflow')
|
||||||
% 电压 相角
|
% 电压 相角
|
||||||
%%
|
%%
|
||||||
%% 开始生成量测量
|
%% 开始生成量测量
|
||||||
sigma=0.05;% ±ê×¼²î
|
sigma=0.01;% ±ê×¼²î
|
||||||
%% 电压
|
%% 电压
|
||||||
%电压幅值
|
%电压幅值
|
||||||
rVolt=Volt; %幅值
|
rVolt=Volt; %幅值
|
||||||
|
|
@ -117,3 +117,4 @@ fprintf('Ŀ
|
||||||
fprintf('相对误差\n');
|
fprintf('相对误差\n');
|
||||||
(abs(rVolt-double(SEVolt)))./(rVolt)
|
(abs(rVolt-double(SEVolt)))./(rVolt)
|
||||||
MaxDeviation(rVolt,SEVolt,rVAngel,SEVAngel)
|
MaxDeviation(rVolt,SEVolt,rVAngel,SEVAngel)
|
||||||
|
plotAndComparison( rVolt,rVAngel,SEVolt,SEVAngel )
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue