Een-291 Engineering Analysis and Design Electrical Engineering Department Indian Institute of Technology, Roorkee
Een-291 Engineering Analysis and Design Electrical Engineering Department Indian Institute of Technology, Roorkee
Note: Before solving the exercises, go through the recorded tutorials. We expect you to have
the MATLAB2019 version and above installed in your systems. A tutorial is also available in
the recorded demo. Attached the screen shot of the MATLAB screen for the exercise.
(b) Suppose 𝑥 = 𝑦 + 2. Then write a script file that uses your function to plot 𝑓1 (𝑥, 𝑦),
𝑓2 (𝑥, 𝑦) versus y for 0.5 ≤ 𝑥 ≤ 6. [2.5]
Q.2 The sampled voltage and current sensor reading at different timestamps inside the
microcontroller (using analog to digital converter) is shown below
(c) Compute the power corresponding to each sample and export the power data in the
file “Power.dat”. [0.5]
Q.3 The transfer function of the linear time invariant system is shown as
𝑠 + 5𝑝
𝐺(𝑠) =
(𝑠 + 𝑝)(𝑠 + 2𝑝)(𝑠 + 3𝑝)
Where, p is the summation of your enrolment number (for example, if your enrolment number
is 20211234 then p = 15 (2+0+2+1+1+2+3+4)
Create a "mfile” in which G(s) is defined and then find the step response (it will be a plot) of
G(s) using the MATLAB commands. [3.5]
Q.4 Write a MATLAB programme in the “mfile” for the following algorithm flow chart and
report the results along with the program. [3.5]
Start
Set i, j, k= 0
Yes
i > 30
No
k =k+1
i =i+1
k > 15 Yes
Y[j] = %
No j = j+1
Z[k] = *
End
Write a MATLAB code to fit a polynomial to the data and use the data to estimate the number
of students who will join in 2019. [3.5]