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

Lab 05

This document describes a lab experiment on modeling and simulating a mass-spring-damper system using Simulink. It includes deriving the differential equation and transfer function of the system, implementing the model in Simulink, and obtaining the step and impulse responses. The document also discusses using transfer function blocks and the 'To Workspace' block to export simulation data to MATLAB for analysis and plotting.

Uploaded by

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

Lab 05

This document describes a lab experiment on modeling and simulating a mass-spring-damper system using Simulink. It includes deriving the differential equation and transfer function of the system, implementing the model in Simulink, and obtaining the step and impulse responses. The document also discusses using transfer function blocks and the 'To Workspace' block to export simulation data to MATLAB for analysis and plotting.

Uploaded by

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

Linear Control System Lab Lab 5

Utilizing Simulink to Implement the Mathematical Model of


Translational Mechanical System

Section-I

For the mechanical system shown in figure 6.1.

f(t) k

x(t)

m=5, k=1, b=0.5

Figure 6.1: A mass spring damper system


 Write differential equation of the system.
 Write the transfer function.

G(s) =

Write MATLAB commands to declare the transfer function of the system. Sketch the step
response.

Page | 1
Linear Control System Lab Lab 5

Answer the following questions.

 What is the settling time of the system?


___________________________________________________________________________

 What are the roots of the characteristics equation?


___________________________________________________________________________

 Show the position of poles in s-plane.

s-plane

 What is relationship between the real part of the roots and settling time?
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________

 What is relationship between the imaginary part of the roots and the frequency of oscillations
of the step response?
___________________________________________________________________________
___________________________________________________________________________

Section-II (SIMULINK)

Again, consider the spring-mass-damper system of figure 6.1. The differential equation of the
above model is:
𝑑2 𝑥 𝑑𝑥 (1)
𝑀 2
+𝐵 + 𝐾𝑥 = 𝑓(𝑡)
𝑑𝑡 𝑑𝑡
𝑑𝑥 (2)
𝑑2 𝑥 𝑓(𝑡) − 𝐵 𝑑𝑡 − 𝐾𝑥
=
𝑑𝑡 2 𝑀

Page | 2
Linear Control System Lab Lab 5

Differential equation for above circuit could be implemented in Simulink as below:

Figure 6.2: A mass-spring-damper system via Simulink.

Implement above model and select appropriate scale and simulation parameters to get the step and
impulse responses. Sketch them in the space below.

Figure 6.3: Step response of mass-spring-damper system via Simulink.

Page | 3
Linear Control System Lab Lab 5

Figure 6.4: Impulse response of mass-spring-damper system via Simulink

An easier way to implement step response is to use transfer function blocks.

Figure 6.5: Step response of mass-spring-damper system using transfer function block.

Make sure you enter 0 in Step time of F(s) block. Does the step response match the one given in
figure 6.3? Calculate impulse response from model of figure 6.4. Suppose we need to dispatch data
from Simulink model to MATLAB workspace. ‘To workspace’ block of sink library will help.

Figure 6.6: Model to get data in MATLAB Workspace

Change the save format of ‘To Workspace’ block to array format. Run the model and enter
following commands in MATLAB workspace.

>> l = length (S)

>> plot (S)

Page | 4
Linear Control System Lab Lab 5

It will produce the same step response, previously obtained through step command in MATLAB.

Exercise 01

Write differential equation(s) for the following system and find transfer function Y(s)/U(s). Sketch
the step response. (Show all working)

>> K1=5, K2=2, B=1, m1=0.5, m2=0.5

Figure 6.7: Mass Spring Damper System

Page | 5

You might also like