Download as pdf or txt
Download as pdf or txt
You are on page 1of 15

Power Engineering Department

Jadavpur University

Computational Laboratory
Code: PE/PC/B/S/223

UG PE 2nd Year 2nd Semester


List of Experiments

Exp
Name of Experiment
No.
1 Formulate and solve the basic problems relating Matrices, Matrix Algebra,
Fourier Transform and acclimatize in use of Basic Graphics, Basic Data Analysis,
M-Files, Data Files, Log Scales, Curve Fitting in MATLAB.
2 Admittance Matrix Formulation using MATLAB
3 Power Flow Analysis using MATLAB
4 Economic Load Dispatch problem formulation and analysis using MATLAB
5 Heat Transfer problem formulation and analysis using ANSYS Fluent software
6 Computational Fluid Dynamics problem formulation and analysis using ANSYS
Fluent software
Course
Computational Lab Course Code PE/PC/B/S/223 Course Credit 1.5
Name
Semester II Year 2nd Stream PE

At the end of the course, a student will be able to:


Course Outcomes  CO1: Examine the principles of modeling of physical systems (A2, K1)
 CO2: Identify the features available in standard commercial software to translate the physical
systems to software compatible forms (K2)
 CO3: Apply software simulation techniques to solve power engineering problems (K3)
 CO4: Interpret the simulation results and validate them (A5, K4)

Correlation between Course Outcomes (CO) and Program Outcomes (PO)

PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12
Computational Lab

CO1 2 3 2 1 1 1

CO2 1 2 1 2 3 1 2 1

CO3 1 2 2 2 3 1 1 1 1 2 1

CO4 2 2 3 2 1 1 1 1 2 2 1 1

Correlation between Course Outcomes (CO) and Program Specific Outcomes (PSO)
PSO1 PSO2 PSO3
Computational

CO1 2 2
Lab

CO2 1 1 1
CO3 2 1 2
CO4 2 1
Basics of
MATLAB
Content
1. First Steps in MATLAB
2. Typing into MATLAB
3. Matrices
4. Basic Graphics
5. More Matrix Algebra
6. Basic Data Analysis
7. Graphics of Functions of Two Variables
8. M-Files
9. Data Files
10.Directories
11.Startup
12.Using MATLAB on Different Platforms
13.Log Scales
14.Curve Fitting—Matrix Division
• MATLAB (MATrix LABoratory)(Developed by MATHWORKS) a software package
• MATLAB® - a high-level language and interactive environment for numerical computation, visualization,
and programming (language of technical computing).
• One can analyze data, develop algorithms, and create models and applications
• The language, tools, and built-in math functions enable you to explore multiple approaches and reach a
solution faster than with spreadsheets or traditional programming languages, such as C/C++ or Java®.
• One can use MATLAB for a range of applications, including signal processing and communications, image
and video processing, control systems, test and measurement, computational finance, and
computational biology.

Key Features
•High-level language for numerical computation, visualization, and application development
•Interactive environment for iterative exploration, design, and problem solving
•Mathematical functions for linear algebra, statistics, Fourier analysis, filtering, optimization,
numerical integration, and solving ordinary differential equations
•Built-in graphics for visualizing data and tools for creating custom plots
•Development tools for improving code quality and maintainability and maximizing performance
•Tools for building applications with custom graphical interfaces
•Functions for integrating MATLAB based algorithms with external applications and languages such
as C, Java, .NET, and Microsoft® Excel®
1 First Steps in MATLAB

1.1 Starting MATLAB


• Double-click on the MATLAB icon for PC.
• Type ‘matlab’ at the prompt UNIX system
• type quit or exit at the matlab prompt to end session.

Ready to Accept your command

Enter commands at the


command line, Explore
Access
indicated by the prompt data that
your files.
(>>). you
create or
import
Also lookfor
command to
from files
know which
function to
use for
certain
analysis
1.2 First Steps (Creating a variable)

Spacing of operators in
formulas doesn’t affect
answer
1.3 Matrices
• The basic object that matlab deals with is a matrix.
• A matrix is an array of numbers.
column-vector

row-vector,

1 × 1 matrix, a scala

3 × 3 matrix
(2,3)
1.4 Variables
• Variables in matlab are named objects that are assigned using the equals sign = .
• Name length – maxi 63 characters
• A and a are different variables

Invalid MATLAB variable assignments

Valid MATLAB variable assignments


1.5 The Colon Operator
To generate a vector of equally-spaced elements matlab provides the colon
operator.

The syntax x:y means roughly “generate the ordered set of numbers from x
to y with increment 1 between them.”
The syntax x:d:y means roughly “generate the ordered set of numbers from
x to y with increment d between them.
1.6 Linspace

To generate a vector of evenly spaced points between two end points, you can
use the function linspace(start, stop, npoints )

??
1.7 Plotting Vectors
3 Matrices
3.1 Typing Matrices

To type a matrix into matlab you must


•begin with a square bracket [
•separate elements in a row with commas or spaces
•use a semicolon ; to separate rows
• end the matrix with another square bracket ]. For example type:

3.2 Matrices
Matrices can be made up of submatrices

The repmat function can be used


to replicate a matrix:
Concatenation

C = vertcat(A1,...,AN)
C = cat(dim, A, B)
C = cat(dim, A1, A2, A3, A4, ...)

Deleting Rows or Columns

You might also like