Matlab Basic and Application To Smart Grid: Dr. Atma Ram Gupta Gunjesh Tahiliani (2014306) Rohit Ray (32014315)
Matlab Basic and Application To Smart Grid: Dr. Atma Ram Gupta Gunjesh Tahiliani (2014306) Rohit Ray (32014315)
Application To Smart
Grid
• Disadvantages of MATLAB
• Can be slow
• Commercial software
Typical uses
• Math and computation
• Algorithm development
Functions, which can accept input arguments and return output arguments.
Internal variables are local to the function.
Commands
• General Commands
• Clock :Provides clock time and data as a vector
• Date :Provides data as a string
• Ver :Gives the version of MATLAB installed
• Workspace Commands
• Who :Lists the variables currently in the worksapce
• Whos :Same as who but ges more information sach as type and size
etc
• What :Lists .m, .mat and .mex files on the disk
• Clear :To clear workspace variables
• Clc :To clear command windows
• Clf :To clear current figure window
Basic Commands
v = v’; % transposes v.
logspace is similar.
• Addition +
• Subtraction -
• Multiplicatio x
n ^
• Power `
• Transpose \
• Left Division /
• Right
division
For loops
x = 0;
for i=1:2:5 % start at 1, increment by 2
x = x+i; % end with 5.
end
x=7;
while (x > = 0)
x = x-2;
end;
if (x == 3)
disp(‘The value of x is 3.’);
elseif (x == 5)
disp(‘The value of x is 5.’);
else
disp(‘The value of x is not 3 or 5.’);
end;
Application of MATLAB in
Smart Grid
Load-Flow Analyzer