0% found this document useful (0 votes)
8 views

Programming for Engineers Syllabus 2023

Uploaded by

Ishant
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Programming for Engineers Syllabus 2023

Uploaded by

Ishant
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Programming for Engineers

( L T P : 1 0 2) : 3 credits

Course Description

This course provides engineers with a foundation in MATLAB, a powerful software platform
for technical computing and visualization. Through interactive lectures, hands-on labs, and
real-world engineering applications, students will gain the skills to:

• Solve engineering problems numerically using matrices, vectors, and functions.


• Create and analyze data visualizations to understand complex phenomena.
• Automate repetitive tasks with scripting and programming techniques.
• Utilize built-in toolboxes for specific engineering disciplines like control
systems, signal processing, and machine learning.

Course Learning Outcomes

• Competently utilize MATLAB's core functionalities:


o Data types, variables, operators, and expressions.
o Matrix and vector operations, including manipulation, indexing, and slicing.
o Scripting and programming with loops, conditional statements, and functions.
o Debugging and error handling.
• Effectively solve engineering problems with MATLAB:
o Formulating problems mathematically and translating them into MATLAB
code.
o Solving systems of linear and non-linear equations.
o Performing numerical differentiation and integration.
o Implementing iterative algorithms for optimization and data analysis.
• Visualize and analyze engineering data:
o Creating 2D and 3D plots, including bar charts, line graphs, and contour plots.
o Data interpolation and curve fitting.
o Statistical analysis and hypothesis testing.
o Importing and exporting data from various formats.
• Leverage MATLAB toolboxes for specific engineering disciplines:
o Introduction to relevant toolboxes like Simulink, Control System
Toolbox, Signal Processing Toolbox, and Optimization Toolbox.
o Applying toolbox functionalities to solve real-world engineering problems.
o Understanding the limitations and strengths of each toolbox.

Course Outcomes
CO1 Recall basics of computer programming
CO2 Understand the usage of functions, loops, conditions, tools in programing
CO3 Understand data structures, visualization, and analysis
CO4 Apply the programming tools and functions to solve engineering and scientific
problems

Course Outline

Module 1: Introduction to Programming Basics [ 2 Theory + 8 Practical hours ]

o Introduction to basics of computer programming and terminologies (variables,


input, output, array, vector, strings, functions, command, syntax, algorithm etc.)
o Getting started with MATLAB interface and workspace.
o Data types, variables, operators, and expressions.
o Scripting and debugging techniques.
o Matrix operations, indexing, and slicing.
o Vector calculus and applications.

Module 2: Functions and Programming Paradigms [2 Theory + 8 Practical hours]

o Defining and using user-defined functions.


o Loops, conditional statements, and control flow.
o Modular programming and code organization.

Module 3: Numerical Methods for Engineers [ 3 Theory + 12 Practical hours]

o Linear algebra fundamentals for solving engineering problems.


o Root finding algorithms (Iterative schemes)
o Numerical differentiation and integration (Simple ones)
o Solving systems of linear and non-linear equations.

Module 4: Data Structures, Visualization and Analysis [ 3 Theory + 12 Practical hours]

o Basics of Data Structures (Arrays and Array lists, recursion, searching and
sorting algorithm)
o Creating 2D and 3D plots for various data types.
o Data analysis and statistics with MATLAB tools.
o Importing and exporting data from various formats (electrical signals, acoustic,
string and numerical data)

Module 5: Introduction to Engineering Toolboxes [ 3 Theory + 12 Practical hours]

o Simulink for modelling and simulation.


o Statistics and Machine Learning Toolbox™ (Statistics and Machine Learning
Toolbox) (Focus on Statistics)
o Curve Fitting Toolbox™ (Curve Fitting Toolbox) (General)
o Signal Processing Toolbox™ (Signal Processing Toolbox) (Electrical,
Mechanical)
o Image Processing Toolbox™ (Image Processing Toolbox) (Mechatronics,
Mechanical, Computers)

Module 7: Project-Based Learning (Cluster-specific teaching) [ 2 Theory + 8 Practical


hours ]

o Applying acquired MATLAB skills to solve a real-world engineering problem.


o Developing a comprehensive project report and presentation.

Assessment (Continuous)

• Regular homework assignments: Applying learned concepts to solve engineering


problems.
• Final project: Demonstrating comprehensive knowledge through a real-world
engineering application.

Prerequisites

• Basic understanding of engineering mathematics (algebra, calculus).


• Familiarity with a programming language (C++, Python, etc.) is helpful but not
mandatory.

Design and build projects

1. Energy
a. Process modelling and simulation.
i. Subsurface Geosciences | Subsurface Engineering | Dynamic Simulation
| Multi-Physics Modelling | Dynamic Workflows
ii. Modelling cyber-physical systems
b. Process Optimization and Automation
i. Digital Twins | Electrification | Predictive Maintenance
ii. Design a four hydraulic cylinder simulation for automation industry.
c. Data Science
i. Machine Learning | Deep Learning | Reinforcement Learning | Code
Generation
ii. Switch, evaluate, and compare popular deep reinforcement learning
algorithms.
d. Image Science
i. Computer Vision | Image Processing | Signal Processing |
Communications
ii. Train policies interactively with the Reinforcement Learning Designer
app.
iii. Model the training environment in MATLAB and Simulink to reduce
risk of damaging your hardware
e. High-Power Computing
i. Parallel and GPU Computing | Cloud Computing | Quantum Computing

2. Aerospace and Defence


a. Design of autonomous unmanned aerial systems.
b. Model a fault-tolerant fuel control system.
c. Human machine collaboration in aircraft systems.
d. Radar sensor development.
e. Run 3-phase AC motors in open-loop control and calibrate ADC offset.
f. Model-based design for airworthiness security compliance

3. Automotive
a. Automated Driving
i. Code generation for object detection by using single shot multibox
detector.
ii. 3D simulation for automated driving
iii. Visualize 3D simulation sensor coverages and detections.
b. Virtual Vehicle
i. Simulink for virtual vehicle development
c. Electric Vehicle
i. Model and simulate batteries and develop BMS.
ii. Model batteries with equivalent circuits and add fidelity with elaborate
circuit topologies.
iii. Simulate non-linearities, thermal effects, SOC/SOH, and degradation of
batteries.
d. Software defined vehicle.

4. Electronics and Communications


a. Analyze signals and explore algorithms.
b. Real-time simulation and testing of power electronics on a more electric aircraft.
c. Evaluate design implementation trade-offs to build real-time signal processing
systems.
d. Develop digital control systems for motors, power converters, and battery
systems.
e. Accelerate the design of embedded systems that have interacting components.
f. Design, simulate, and prototype complex wireless systems such as 5G and
WLAN.
g. Develop algorithms on a unified platform for wireless base station/devices and
semiconductor chips combining signal processing, analog/mixed-signal, RF,
and antennas.

5. Industrial Automation and Machinery


a. Development of controller for energy-saving digital hydraulic system for
papermaking equipment using model-based design.
b. Development of innovative robotic arm using model-based design.
c. Create dashboard panel for climate control system.
d. Analyse data using XY plot.
e. Deploy deep reinforcement learning policies to embedded devices or the cloud.

Additional questions
1. Write a program to form multiple batches of students (5 per batch; randomly picked) from
a class of 22 students. DO NOT use more than ‘one’ Matlab function to form these batches.

2. Write a program to generate set of 10 students’ monthly salary offered in a campus


placement drive at a private university. Compute the average salary and median salary of
the students. Most importantly, comment on which out of the two computed measure best
represent the actual average salary of the 10 students.

3. Write a Matlab function to illustrate the importance of “Covariance” measure. For


illustration, please use two parameters (a) marks obtained by 22 students in a course and
(b) number of preparation hours for each student. Explain how covariance could be used to
express any relationship between the 2 variables.

4. For a given position coordinates of honeybee # 24


https://figshare.com/s/cb7edd04e5818607ea9a ], find the total speed, acceleration, and
curvature magnitude by taking gradient of the position coordinates of the given bee.

5. For the same bee # 24, plot instantaneous velocity, tangential and centripetal acceleration
of the same bee using Quivers command of Matlab. Also, perform a regression analysis
between velocity2 and radius of curvature to compute the mean centripetal acceleration of
the bee during its flight.

6. An M-by-M matrix X is given. Using loops, extract values from matrix X to create the
following:
i) matrix A – composed of all values in odd columns AND odd rows of X, e.g.:

ii) matrix B – composed of all entries of X, except for the outside rows and columns, e.g.:
iii) matrix C – composed of diagonals surrounding the middle diagonal of matrix X, e.g.:

The 1st row of C should contain values from the upper diagonal. The 2nd row should contain
values from the lower diagonal.

7. You are given a structure called StudentGrades that is organized as follows:

The fields are:


- name – a string specifying the student’s name.
- number – a scalar specifying the student’s number.
- grades – a 1-by-3 cell array where:
o the 1st cell is a 9-by-7 char matrix specifying the course names.
o the 2nd cell is a 9-by-1 vector with the corresponding credits for each course of
the 1st cell.
o the 3rd cell is a 9-by-1 vector with the corresponding grade that the student
earned for each course of the 1st cell. These are in the form of a 4.333 grade
scale (e.g., 4.333 is an A+, 4.000 is an A, 3.666 is an A-, 3.333 is a B+, etc.).
Your task is to calculate each student’s cumulative GPA (CGPA). For a set of 𝑁 courses, let the
grades for the 𝑖 !" course be denoted by 𝑔# and the number of credits of the 𝑖 !" course be denoted
by 𝑐# , then CGPA can be calculated as:
∑$
#%& 𝑐# 𝑔#
CGPA =
∑$
#%& 𝑐#

In other words, this is simply a weighted average of the grades and the credits corresponding
to each course. Calculate each student’s CGPA and store it in a new field called cgpa. For
example, calling StudentGrades(1).cgpa would give the 1st student’s CGPA, calling
StudentGrades(2).cgpa would give the 2nd student’s CGPA, etc.
8. You are given an M-by-N-by-P matrix Y. Using loops and without using loops, scale Y such
that every element in the ith page is scaled by 10i for i =1,2,…,P. For example, given an M-
by-N-by-3 matrix, you would apply the following scaling

You will find the MATLAB functions reshape and repmat useful. Store your result in a matrix
Yscaled.
Hint: To accomplish this task without loops, you need to generate a matrix such that an
element-wise multiplication between this matrix and Y results in the desired scaling.
9. The voltage across a capacitor is measured from t = 0 to 11ms. The voltage measurements
are given in vector V and the corresponding times at which they are taken are given in
vector t. Write code to create a line plot of voltage vs. time with the following requirements:
i) The x-axis must be labeled “time (ms)”.
ii) The y-axis must be labeled “voltage (V)”.
iii) The title must be “Capacitor Voltage”.
iv) The x-axis must only span the time of the measurements, i.e., from 0 to 11ms.
v) The numbers on the axes must have font size 14 and the labels/title must have font
size 18.
10. Plot a histogram depicting the marks obtained in a course by 200 students. And, also
comment the purpose of the plotted histogram and compare it with a normalised histogram.

11. How to perform correlation analysis for more than 2 parameters? For instance, you have
been asked to correlate the cost of a property/flat with 15 different parameters that decides
the cost of that property. Which technique should you use to extract the one parameter that
decides the price of a property?
Hint: You cannot use linear regression as you need to correlate price with 15 different
parameters.
12. A sample text is given below:

Mr. Sherlock Holmes, who was usually


very late in the mornings, save
upon those not infrequent occasions
when he was up all night, was seated
at the breakfast table.
a) Replace all newline characters (special character \n) with a single space: ' '.
b) Find the numbers of words in the text excluding special characters?
c) Calculate the frequency of 5 letter words in the given text?
d) Finally, plot a histogram showing the words of different length in the given sample
text.
e) Pick and print the words in the paragraph which starts with a particular word, say for
example, pick words starting with “M” from the provided text.

13. Without using any Matlab functions, check if the given number is a palindrome or not?
14. Write a program to swap two numbers without using a third variable?
15. Write to program to form an inverted pyramid in Matlab without using any in-built
functions? Also, invert the formed pyramid every 0.5 seconds by 180 deg and display the
pattern.

You might also like