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

ENGG3410 Lab 2 Prelab Assignment

Mike Stachowsky, Julie Vale, Simon Yang, M. Biglarbegian

This lab lets you explore some of the transfer function operations you've learned about in your
lectures. We will primarily be using Matlab. The final submission for this lab will be one properly
commented Matlab m- file for Question 1, and two Simulink .slx files for Question 2 and Question
3, and a maximum 5 page write-up explaining all of your results and showing any figures. Note
that properly commented code is code that is explained succinctly but specifically in your
comments. For example, “making the system" is not a clear comment, while “Performing
feedback connection of system A and system B" is excellent.

Question 1: System Analysis


Make a new m-file, and name it with the last name of one of the members of your lab group
with PART1. This m-file will be part of your submission.

Let 𝐺(𝑠) be a transfer function defined as

And let 𝐻(𝑠) be defined as

Generate the following transfer function in Matlab:

Ensure that there are no common factors between the numerator and the denominator.
Answer the following questions:

a) Plot its step response on figure 25.


b) What is the order of the system?
c) What are its poles and zeros?
d) By hand, prove that the transfer function is correct.
e) The overshoot of a system is a measure of how far over steady state the step response goes.
When the input is a unit step, overshoot can be calculated as follows:

𝑦𝑚𝑎𝑥 − 𝑦𝑠𝑠
%𝑂𝑆 = × 100
𝑦𝑠𝑠

Graphically determine the overshoot of your system. Produce a single figure that demonstrates
the result, and plot it on figure 53.
Question 2:

Make a new .slx-file, and name it with the last name of one of the members of your lab group
with PART2 at the end.

a) Create your own Simulink simulation. Name it with the Single Sign On ID of one of your group
members followed by ` sim'.

b) Create a simulation that can solve the following differential equation (assume zero initial
conditions):

Your simulation can only use summers, gains, integrators, output blocks, and input blocks (hint:
refer to the Simulink tutorials for 2nd order differential equations)

c) Set the run time to 30. Run this simulation when 𝑢 is a step and plot the result. (hint: the
command `sim' may be helpful here)

d) Compare the plot from b) to plot from Question 2 (b) from the prelab. Does this make sense?

Question 3:
Consider a mass-spring-damper system.

a) Write the differential equation for the system and model the system in Simulink. Use 𝑚 =
1, 𝐾 = 0.5, 𝐶 = 0.1.

b) Run the simulations for for 15 sec and plot the response of the system for 𝐹 = 𝑢(𝑡) [unit step]
and 𝐹 = cos⁡(𝑡).

You might also like