Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 10

Lab 08 MEEM 4705/5705 Spring 2023

Simulink Model

Team number:

Student Name Contribution (%)

The contribution values should be percentages and values that both team members agree
on.
Lab 08 MEEM 4705/5705 Spring 2023

Lab Objectives
- Learn how to create a simulation model using the MATLAB Simulink toolbox.

Activities
As mentioned in the class, you need a system model (analytical, empirical, or numerical) to test a
controller before you apply it to the actual system. In this lab, we will learn how to build a
numerical system model using Simulink.
A1.1) [10 points] Consider a simple dynamic system shown in Figure 1. A mass block locates at
the top of a slope and starts to slide down. The equation of motion of the block is
b
ẍ (t)=g sin θ− ẋ ( t )
m
t
ẋ ( t )= ẋ ( 0 ) +∫ ẍ ( t ) dt
0

t
x ( t )=x ( 0 ) +∫ ẋ ( t ) dt
0

where b is the friction, m is the mass of the block, and g represents gravity. Assume zero-initial
condition.

Figure 1. Sliding Block Example


Lab 08 MEEM 4705/5705 Spring 2023

π
For given m=10 kg , θ= rad , b=8 kg /s , and g=9.81 m/ s2, a Simulink model of the dynamics
6
can be designed, as shown in Figure 2. Only eight types of Simulink blocks are used in the
model(Figure 3). Replicate the Simulink model by yourself. After modeling, if the model is
correct and you run the Simulink model by clicking 'run' on the top menu of the Simulink
window, it will pop up three plots; position, velocity, and acceleration. Submit your Simulink
model and the plots, and answer the questions.

Figure 2. Simulink model for the sliding block

Figure 3. Simulink blocks


Lab 08 MEEM 4705/5705 Spring 2023

Simulink Model

Three plots
Lab 08 MEEM 4705/5705 Spring 2023

Questions

Each edge or arrow between blocks in the Simulink model is part of the dynamics equation
8 b
given above. For example, at node 4, the output of the Divide block is the result of = .
10 m
What is the corresponding part of the dynamics equation for nodes 1, 2, and 3?

Node 1)

Node 2)

Node 3)
Lab 08 MEEM 4705/5705 Spring 2023

In the previous activity, the slope angle θ was fixed, and the position of the sliding block would
slide down indefinitely. Now let's control the displacement x by controlling the slope angle θ . In
Figure 4, a person is pulling a rope connected to a rope. The slope angle depends on the pulling
distance d . The other end of the rope is connected to a slider that moves along the link bar
without friction. So, the horizontal distance l remains constant.

Figure 4. Sliding block position control

A1.2) [5 points] Find the kinematic relationship between the pulling distance d and the slope
angle θ . Write the equation for θ . It is a simple geometry problem.
Answer
Lab 08 MEEM 4705/5705 Spring 2023

A1.3) [10 points] As you can see in A1.1, a mathematics equation can be represented using
function blocks in Simulink. Add the equation found in A1.2 to the Simulink model in A1.1.
Assume the zero initial condition and l=5 m . Submit your Simulink model.
Simulink model

A1.4) [20 points] Add a PID controller to your system by creating a feedback loop. Remember
you are controlling the displacement x using the pulling distance d . So the reference input to the
PID controller is the desired location of the sliding block x r. Then, using a Step signal block and
a gain block, generate the reference input, x r=2m , to your feedback control system model.
Submit your Simulink model and scope plots for x , x r, and d . (Use the default simulation time
and auto-tune the PID gains)
Simulink model
Lab 08 MEEM 4705/5705 Spring 2023

Simulink plot – x and x r

Simulink plot - d
Lab 08 MEEM 4705/5705 Spring 2023

A1.5) [15 points] When we create an analytical or mathematical model of a system, we usually
simplify the actual physics of the system by assuming some aspects. First, find out all the
assumptions the model includes. Then discuss them and how to improve the model's accuracy
close to the actual system. Use the output plots from A1.4 or make more plots supporting your
answer.
Answer
Lab 08 MEEM 4705/5705 Spring 2023

You might also like