02.06.2014 Views

symbolic dynamic models for highly varying power system loads

symbolic dynamic models for highly varying power system loads

symbolic dynamic models for highly varying power system loads

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

79<br />

% A program to <strong>for</strong>ecast a signal <strong>for</strong> load modeling application<br />

***********************************************************<br />

clear<br />

% Reading data from the file.<br />

Points=5000;<br />

fid=fopen('h:\Ib.dat','rt');<br />

if(fid==(-1))<br />

disp('Error in opening the given input data file');<br />

end<br />

n=1;<br />

while n~=(Points+1)<br />

a(n)=fscanf(fid,'%f',1);<br />

n=n+1;<br />

end<br />

% Calculation of the scaling function<br />

N=10;<br />

minx=min(a);<br />

maxx=max(a);<br />

mat1=[minx 1;maxx 1];<br />

mat2=[1.01;N+0.99];<br />

mat3=inv(mat1)*mat2;<br />

A=mat3(1);<br />

B=mat3(2);<br />

aa1=fix(A*a+B);<br />

x=aa1(:,1:3000); % Historical data set<br />

I_hist=x'-B; % Historical data set, without any shift, <strong>for</strong> % the<br />

purpose of RMS value comparison.<br />

I=aa1';

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!