Lab 05 CONTROL SYSTEMS

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

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 5.1.

f(t) k

x(t)

m=5, k=1, b=0.5

Figure 5.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.

Matlab Code

Page | 1
Linear Control System Lab Lab 5
Plot

Figure 5.2: step response for the given mechanical system

Answer the following questions.

• What is the settling time of the system?

Answer: The settling time for the system is 91.7 seconds.


• What are the roots of the characteristics equation?

Answer:

Page | 2
Linear Control System Lab Lab 5

• Show the position of poles in s-plane.

Answer:

Figure 5.3: plotting in s-plane

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

Answer: The real component of the pole affects the settling time as well as the transient behavior
of a system. A larger real part in the pole leads to faster decay in the transient response as a result
there is a short settling time of the system.
Similarly, the damping ratio ‘⸹’ of the system is related to the real part of its poles, the crucial
role of the real components of the pole is in determining the transient behavior and settling time
of the system.

• What is relationship between the imaginary part of the roots and the frequency of
oscillationsof the step response?
Answer: In a system, the frequency of oscillations is directly related to the imaginary part of
the roots of its transfer function.
A greater imaginary part of the roots corresponds that the oscillations are occurring at higher
frequencies and vice versa. Basically, the imaginary component of the roots plays an important
role in determining the frequency of oscillation of the system in step response.

Page | 3
Linear Control System Lab Lab 5

Section-II (SIMULINK)

Again, consider the spring-mass-damper system of figure 5.1. The differential equation of the
above model is:

𝑑2𝑥 𝑑𝑥 (1)

𝑀 +𝐵 + 𝐾𝑥 = 𝑓(𝑡)
𝑑𝑡2 𝑑𝑡 𝑑𝑥
𝑑2𝑥 𝑓(𝑡) − 𝐵 𝑑𝑡 − 𝐾𝑥 (2)
=
𝑑𝑡2 𝑀

Page | 4
Linear Control System Lab Lab 5

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

Figure 5.4: 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 5.5: Step response of mass-spring-damper system via Simulink.

Page | 5
Linear Control System Lab Lab 5

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

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

Figure 5.7: 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.
Page | 6
Linear Control System Lab Lab 5

Figure 5.8: 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)

As shown:

Code

Plot

Figure 5.9: the step response of the mass-spring-damper system with transfer function block

Page | 7
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 5.10: Mass Spring Damper System

Code

Output

Page | 8
Linear Control System Lab Lab 5

Plot

Figure 5.11: the step response for the transfer function of the given mechanical system

Page | 9

You might also like