0% found this document useful (0 votes)
27 views14 pages

MATLAB Basics for Power Systems Lab

The document outlines an experiment for the Power Systems Analysis Lab at AIUB, focusing on introducing MATLAB and its applications in engineering. It details the objectives, methodology, and expected outcomes of using MATLAB for tasks such as coding, mathematical computations, and data plotting. The experiment aims to equip students with essential skills for analyzing and solving complex problems in power systems.

Uploaded by

Mira
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views14 pages

MATLAB Basics for Power Systems Lab

The document outlines an experiment for the Power Systems Analysis Lab at AIUB, focusing on introducing MATLAB and its applications in engineering. It details the objectives, methodology, and expected outcomes of using MATLAB for tasks such as coding, mathematical computations, and data plotting. The experiment aims to equip students with essential skills for analyzing and solving complex problems in power systems.

Uploaded by

Mira
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

American International University- Bangladesh (AIUB)

Faculty of Engineering (EEE)

Course Name: Power Systems Analysis Lab Course Code: EEE 3211 Section: C
Semester: 2023-24, Summer Faculty: Dr. Shameem Ahmad

Task: Experiment 1
Experiment title: Introduction to MATLAB and basic application in Power System.
Group Members ID Name
1. 22-45998-1 Fatiha Ali
2. 22-46021-1 Mst. Sadia Afrin Esha
Group No: 3
3. 22-46203-1 MD. Kaiyum
4. 22-46284-1 MD. Asikur Rahman Taj

Marking Rubrics for Laboratory Experiment Report (to be filled by Faculty) Report: 5
Marks
Objectives Unacceptable (0.5) Needs improvement (1) Good (1.5) Excellent (2) Secured
Marks
Use of Students Fail to identify Students identified some Students identified and utilized Students identified and
Appropriate and utilize appropriate software and hardware tools the closely related software and utilized the most effective
Tools software and hardware for prediction and modeling hardware tools for prediction appropriate software and
tools for prediction and but failed to use them and modeling but failed to use hardware tools for
modeling of the proposed appropriately. them effectively. prediction and modeling of
solution the proposed solution
Analysis of The software and/or The software and/or The software and/or hardware The software and/or
Implemented hardware implementation hardware implementation implementation has been hardware implementation
Model has not been addressed has been partially addressed successfully addressed but has been successfully
and provided only and provided only provided only incomplete addressed and provided an
incomplete analysis. incomplete analysis. analysis. in-depth analysis
Depth of The student has provided The student has provided a The student has provided a The student has provided a
Knowledge some processes for using partial process for using detailed process for using detailed process for using
about the appropriate tools but appropriate tools and does appropriate tools but fails to appropriate tools, which
Tools [P1] demonstrated no not demonstrate in-depth demonstrate the in-depth demonstrated the in-depth
knowledge of the utilized knowledge of the utilized knowledge of the utilized tools knowledge of the utilized
tools tools tools.
Infrequent Students have failed to Students have partially Students have addressed how Students have effectively
encounter address how the addressed how the the Infrequent encounter Issues addressed how the
Issues [P4] Infrequent encounter Infrequent encounter Issues were resolved but not related to Infrequent encounter Issues
Issues were resolved . were resolved but not used tools. were resolved using the
related to used tools. appropriate tools.
The models Failed to address any Addressed some outside Addressed some outside Effectively addressed that
developed outside problems. problems but not problems encompassed by the external issues
by tools encompassed by standards standards and codes of practice surrounded by standards and
meet the and codes of practice for for professional engineering regulations of practice for
applicable professional engineering professional engineering
codes [P5]
Comments: Total Marks:
Abstract:
This experiment introduces MATLAB, a versatile tool extensively utilized in engineering,
specifically in Power System Analysis. The experiment aims to familiarize users with basic
MATLAB operations such as coding, mathematical computations, array manipulations, data
plotting, and function creation. By mastering these fundamental skills, users will be well-equipped
to apply MATLAB to various engineering tasks, particularly in the realm of power systems.

Introduction:
This experiment serves as an introduction to MATLAB, a versatile and widely utilized tool in
numerous engineering disciplines, with particular emphasis on its applications in Power System
Analysis MATLAB, short for MATRIX LABORATORY, is renowned for its high-performance
capabilities in technical computing and is extensively employed both in academic settings and
industry for instructional and practical purposes. The primary objective of this experiment is to
familiarize users with the fundamental operations of MATLAB, encompassing a variety of
essential skills. These include coding, which involves writing and debugging scripts and functions
to perform specific tasks; mathematical computations, which cover a wide range of numerical
methods and algorithms; array manipulations, which involve creating, modifying, and operating
on matrices and vectors; data plotting, which includes generating various types of graphs and
visualizations to represent data; and function creation, which entails defining reusable blocks of
code for complex operations. Mastery of these foundational skills will enable users to efficiently
utilize MATLAB for diverse engineering tasks, with a special focus on its application in power
systems. This knowledge is crucial for analyzing, simulating, and solving complex problems
encountered in the field, thereby enhancing both the learning experience and practical competency
of users in technical computing and engineering problem-solving.
MATLAB, short for MATRIX LABORATORY, is renowned for its high-performance capabilities
in technical computing and is extensively employed both in academic settings and industry for
instructional and practical purposes [1], [2]. The primary objective of this experiment is to
familiarize users with the fundamental operations of MATLAB, encompassing a variety of
essential skills [3], [4]. These include coding, which involves writing and debugging scripts and
functions to perform specific tasks; mathematical computations, which cover a wide range of
numerical methods and algorithms; array manipulations, which involve creating, modifying, and
operating on matrices and vectors; data plotting, which includes generating various types of graphs
and visualizations to represent data; and function creation, which entails defining reusable blocks
of code for complex operations [5], [6]. Mastery of these foundational skills will enable users to
efficiently utilize MATLAB for diverse engineering tasks, with a special focus on its application
in power systems [7]. This knowledge is crucial for analyzing, simulating, and solving complex
problems encountered in the field, thereby enhancing both the learning experience and practical
competency of users in technical computing and engineering problem-solving [8], [9], [10].
The objective of this experiment is to familiarize users with MATLAB, focusing on its basic
operations such as coding, mathematical computations, array manipulations, data plotting, and
function creation. By mastering these skills, users will be equipped to apply MATLAB to various
engineering tasks, particularly in power systems, enhancing their ability to analyze, simulate, and
solve complex engineering problems.
In this laboratory report, we will commence by examining the abstract. Following that, we will
proceed with the introduction of the experiment. Subsequently, we will elucidate the methodology
of this experiment briefly, incorporating block diagrams and circuit implementation details.
Following this, the outcomes of the experiment will be presented within the report. Lastly, we will
delve into a comprehensive summary of the entire experiment.

Methodology:

Figure.1. Block Diagram of the Experiment

The experimental procedure begins with the initialization of scalar variables M = 5 and N = 6,
followed by defining a complex number P = a + bi and calculating its conjugate Q, real part R, and
imaginary part S. Matrix operations include creating a transpose of a vector X and generating
matrices: a 5x6 zero matrix (A), a 6x4 matrix filled with ones (B), and a 5x5 identity matrix (C).
Signal generation involves creating a sinusoidal wave and a cosine wave, each plotted individually
and then together using sub plotting in MATLAB. This comprehensive approach aims to build
foundational skills in MATLAB programming, essential for engineering tasks, particularly in
analyzing and simulating systems like power networks.

MATLAB Code:
Experiment 1:
M=5
Experiment 2:
N=6
Experiment 3:
a=5
b=6
P=a+b*i
Experiment 4:
a=5
b=6
P=5+6i
Q=conj(P)
Experiment 5:
a=5
b=6
P=5+6i
R=real(P)
Experiment 6:
a=5
b=6
P=5+6i
S=imag(P)
Experiment 7:
X=[10 12 15;20 51 25;52 75 5]
Experiment 8:
X = [10 12 15; 20 51 25; 52 75 5]
Transposed = X.'
Experiment 9:
A = zeros(5, 6)
Experiment 10:
B = ones(6, 4)
Experiment 11:
C = eye(5)
Experiment 12:
clear all
clc
X = linspace(0, 2*pi, 30);
Y = 6 * sin(X);
plot(X, Y);
title('Sinusoidal Wave Having Magnitude of 6');
Experiment 13:
x = linspace(0, 2*pi, 100);
y = 10 * cos(x);
plot(x, y);
title('Cosine Wave with Magnitude 10')
Experiment 14:
x = linspace(0, 2*pi, 30);
y = 6 * sin(x);
z = 10 * cos(x);
subplot(2, 1, 1);
plot(x, y);
title('Sinusoidal Wave');
xlabel('x');
ylabel('y');
grid on;
subplot(2, 1, 2);
plot(x, z);
title('Cosine Wave');
xlabel('x');
ylabel('z');

Software Requirements:
• MATLAB (2016a or onwards)
Simulation:

Experiment 1:

Figure.2. Experiment 1 Simulation Result

Experiment 2:

Figure.3. Experiment 2 Simulation Result


Experiment 3:

Figure.4. Experiment 3 Simulation Result

Experiment 4:

Figure.5. Experiment 4 Simulation Result


Experiment 5:

Figure.6. Experiment 5 Simulation Result

Experiment 6:

Figure.7. Experiment 6 Simulation Result


Experiment 7:

Figure.8. Experiment 7 Simulation Result

Experiment 8:

Figure.9. Experiment 8 Simulation Result


Experiment 9:

Figure.10. Experiment 9 Simulation Result

Experiment 10:

Figure.11. Experiment 10 Simulation Result


Experiment 11:

Figure.12. Experiment 11 Simulation Result

Experiment 12:

Figure.13. Experiment 12 Simulation Result


Figure.14. Sinusoidal Wave

Experiment 13:

Figure.15. Experiment 13 Simulation Result


Figure.16. Cosine Wave

Experiment 14:

Figure.17. Experiment 14 Simulation Result


Figure.18. Sub-plotting Sinusoidal Wave and Cosine Wave

Discussion:
In this experiment, a detailed introduction to MATLAB was provided. The interface of MATLAB
and the basic building blocks were discussed. Scalar variables such as M and N were initialized,
and complex numbers were defined and manipulated. Various matrix operations were performed,
including generating zero matrices, one’s matrices, and identity matrices, as well as transposing
vectors. Sinusoidal and cosine waves were generated and plotted, both individually and using sub-
plotting. Upon completion of this lab, the structure of the software was understood by the students,
and they were able to write codes, plot graphs, create functions, and compute both simple and
complex mathematical computations.

Conclusion:
This experiment effectively familiarizes users with MATLAB, highlighting its essential role in
power systems analysis. By guiding users through fundamental operations such as scalar variable
initialization, complex number manipulation, matrix operations, and signal plotting, the
experiment provides a comprehensive introduction to MATLAB's capabilities. These skills are
crucial for technical computing tasks, particularly in the analysis and simulation of power systems.
Users learned to initialize and manipulate scalar variables and complex numbers, which are vital
for mathematical modeling in power systems. Matrix operations, including creating zero matrices,
ones matrices, and identity matrices, offered insights into handling large datasets and performing
linear algebra computations. Additionally, signal generation and plotting of sinusoidal and cosine
waves demonstrated MATLAB's effectiveness in visualizing data and performing complex signal
analysis. This hands-on experience enhances users' practical competency, preparing them for more
advanced technical challenges in academic and professional settings. Mastery of these
foundational skills enables users to efficiently utilize MATLAB for diverse engineering tasks,
thereby leveraging its full potential in technical computing and engineering problem-solving.
References:
[1] MathWorks, "MATLAB Documentation," MathWorks, [Online]. Available:
[Link] [Accessed: Jun. 14, 2024].
[2] S. J. Chapman, MATLAB Programming for Engineers, 5th ed. Stamford, CT: Cengage
Learning, 2015.
[3] A. Gilat, MATLAB: An Introduction with Applications, 6th ed. Hoboken, NJ: Wiley, 2017.
[4] E. A. Lee and T. M. Seshia, Introduction to Embedded Systems: A Cyber-Physical Systems
Approach, 2nd ed. Cambridge, MA: MIT Press, 2016.
[5] C. F. Van Loan and K.-Y. D. Fan, Insight Through Computing: A MATLAB Introduction
to Computational Science and Engineering. Philadelphia, PA: SIAM, 2009.
[6] S. L. Campbell, J.-P. Chancelier, and R. Nikoukhah, Modeling and Simulation in
Scilab/Scicos with ScicosLab 4.4. New York, NY: Springer, 2010.
[7] B. Moore, "MATLAB for Engineers Explained: A Practical Introduction to MATLAB and
Its Applications," in IEEE Potentials, vol. 35, no. 4, pp. 10-15, July-Aug. 2016. doi:
10.1109/MPOT.2015.2499564.
[8] R. Pratap, Getting Started with MATLAB: A Quick Introduction for Scientists and
Engineers, 7th ed. New York, NY: Oxford University Press, 2016.
[9] J. H. McClellan, R. W. Schafer, and M. A. Yoder, Signal Processing First. Upper Saddle
River, NJ: Pearson Prentice Hall, 2003.
[10] E. B. Magrab, An Engineer's Guide to MATLAB: With Applications from
Mechanical, Aerospace, Electrical, Civil, and Biological Systems Engineering, 3rd ed.
Upper Saddle River, NJ: Prentice Hall, 2011.
[11] Kothari, D P, and I J Nagrath. Modern Power System Analysis. 3rd ed. New Delhi:
Tata McGraw-Hill, 2009. Print.
[12] AIUB Lab manual.

You might also like