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
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
85<br />
A.5 Forecasting a signal using Model 2, case 2 (Power conditioning)<br />
This model is used <strong>for</strong> <strong>power</strong> conditioning application. The<br />
historical data set, in this code, is updated each time a new current<br />
value is predicted. Predicted current is conditioned by injecting<br />
appropriate current as described in Figure (4.4).<br />
***********************************************************<br />
clear<br />
% Reading the data from the file.<br />
Points=600;<br />
fid=fopen('h:\Ia2.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 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);