stateestimateionyalmip-lu9-.../GetMeasure.asv

15 lines
444 B
Plaintext
Raw Normal View History

function [ mVolt,PD0,QD0 ] = GetMeasure( sigma,rVolt,PD0,QD0 )
%GETMEASURE Summary of this function goes here
% Detailed explanation goes here
mVolt=(1+normrnd(0,sigma,length(rVolt),1)).*rVolt;
t1=find(mVolt>(1+3*sigma)*rVolt);
t2=find(mVolt<(1-3*sigma)*rVolt);
if any(t1) || any(t2)
mVolt(t1)=(1+normrnd(0,sigma,length(rVolt),1)).*rVolt
end
PD0=(1+normrnd(0,sigma,length(PD0),1)).*rPD;
QD0=(1+normrnd(0,sigma,length(QD0),1)).*rQD;
end