RESULT%
Student number: 2 2 3 0 7 7 4 2 8
Surname and initials: MOSEBO MJ
Programme: BEngTech (Mechanical Engineering)
Subject name: Control Systems III
Subject code: M C S 3 2 A
Simulink model of a vehicle for cruise
Title of the Practical work
Control with a linear friction
Practical work number: 1
Due date: 2 0 2 5 0 8 1 3
Lecturer: DR JOSEPH NSENGIMANA
DECLARATION OF OWN WORK:
I, Mothetsi Mosebo
______________________________________________________________, student
223077428
number______________________________________, hereby declare that the content of this
assignment/project is my own work, as defined and constituted in the Rules and Regulations
of the Central University of Technology, Free State (Please consult the Programme Guide of
the Department).
Signed: ________________________________
Date: 01/08/2025
________________________________
Page | 1
Contents
List of Figures ............................................................................................................. 3
List of Equations ......................................................................................................... 4
1. Aim ......................................................................................................................... 5
2. Problem Statement................................................................................................. 5
3. Tasks...................................................................................................................... 6
3.1 Differential Equation of Motion of the Vehicle ....................................................... 6
3.2 Analytical Expression for the Velocity of The Vehicle ........................................... 6
3.3 Transfer Function for the System ......................................................................... 7
3.4 Analytical Expression for The Time Constant and Actual Value ........................... 7
3.5 The Block Diagram of the System ........................................................................ 8
3.6 Simulink Models to Control the Velocity of The Vehicle ..................................... 10
3.7 Single Equivalent Block Diagram and Construct the Simulink Model to Control
the Velocity of the Vehicle ........................................................................................ 11
3.8 Obtain the Graphs for the Time Response of the Velocity 𝑣(𝑡) ........................... 12
3.9 The Values for the Time Constant and Final (Terminal) Velocity 𝑣𝑓 Of the Vehicle
................................................................................................................................. 13
3.10 Final Velocity 𝑣𝑓 Of the Vehicle by Differentiation/Integration Method ............. 14
3.11 Compare the Theoretically Calculated Time Constant and Final Velocity with
The Corresponding Readings from The Obtained Graphs from Simulink Model Of the
System ..................................................................................................................... 14
Page | 2
List of Figures
Figure 1: Vehicle with cruise control system .............................................................. 5
Page | 3
List of Equations
Page | 4
1. Aim
i) To familiarize with mathematical modelling of mechanical control systems
ii) To familiarize with the representation of a control system by a Block Diagram
iii) To familiarize with Matlab software, especially, with Simulink toolbox and it library
browser
iv) To use the library of Simulink toolbox for simulation of a mechanical control
system
v) To compare the results obtained through Simulink with the results obtained
through mathematical analytical methods
vi) To assess the effectiveness of Matlab for solving engineering problems.
2. Problem Statement
A Simulink model of a vehicle (Figure 1) must be constructed to obtain a simulation
for the variation of the velocity as the time varies from zero to 100 seconds. It is
desirable to calculate the final velocity that can be attained. A time dependent force
f(t), generated by the engine, activates the motion of the vehicle and it is assumed
that the vehicle experiences also the linear frictional force proportional to the velocity
of the vehicle. The initial velocity of the vehicle is to be equal to 0 m/s.
f (t ) = f engine (t )
m
Velocity v(t) of the vehicle
Figure 1: Vehicle with cruise control system
The friction force corresponds to the rolling resistance against the motion and is,
amongst other factors involved, due to the deformation of the rubber wheels of the
vehicle. It is assumed that the mass of the vehicle is 1000 kg and that the frictional
constant is estimated to be 50 N/(m/s)
Page | 5
3. Tasks
3.1 Differential Equation of Motion of the Vehicle
Input = output
m
f (t ) = f engine (t )
v(t )
c v(t )
The motion of the vehicle is governed by Newton's second law:
m a(t ) = Fexternal forces = f (t ) − c v(t )
dv(t )
m = −c v(t ) + f (t )
dt
dv(t )
m + cv(t ) = f (t )
dt
Where: m = mass of the vehicle (kg)
f = force by the engine (N)
c = friction force (N)
v = velocity of the vehicle (m/s)
The net force acting on the vehicle is the difference between the engine force and
the frictional force.
3.2 Analytical Expression for the Velocity of The Vehicle
To obtain the analytical expression for the velocity of the vehicle, the differential
equation of motion has to be rewritten in terms of the acceleration. Subsequently, we
must solve for the differential equation by integrating so that we get velocity. The
𝑓(𝑡) in the equation should be replaced with 𝐹𝑒𝑛𝑔 .
dv(t )
m = −c v(t ) + f (t )
dt
m dv(t ) = [−c v(t ) + f (t )]dt
1
dv = −c v + Feng dt
m
Page | 6
v t
1
dv =
0
m 0
−c v + Feng dt
t
1
v = −c v + Feng dt
m0
3.3 Transfer Function for the System
To calculate the transfer function, we have to apply the Laplace transform to the
differential equation on both sides.
dv(t )
m = −cv + Feng
dt
dv(t )
L m = L −c v (t ) + L Feng
dt
Feng
m s V ( s ) = −cV ( s ) +
s
Feng
msV ( s ) + cV ( s ) =
s
Feng
V ( s ) ms + c =
s
Feng
V (s) =
ms + c s
Feng
V (s) =
ms 2 + cs
V (s)
T ( s) =
Feng ( s )
1
=
ms + cs
2
3.4 Analytical Expression for The Time Constant and Actual Value
In order to get the expression of the time constant, we must introduce the transient
term e − at , which dictates how the velocity changes from its initial value to the final
value. This analytical solution allows for precise prediction of the velocity at any
given time and directly reveals the system's inherent response characteristics, such
as how quickly it settles, which is governed by the term 𝑐/𝑚.
Page | 7
The time constant, denoted by 𝜏 quantifies the speed of the system's response to a
1
step input. Using Laplace transforms, we must identify = in order to calculate the
a
time.
1
L(e− at ) =
s+a
From our transfer function
1
T (s) =
ms + c
1
T (s) =
m
(dividing numerator and deno min ator by m )
ms +c
m
1
=
m
c
s+
m
1 1
=
m s+ c
m
c 1 m
where : a = ; =
m a c
m
=
c
1000
=
50
= 20sec
3.5 The Block Diagram of the System
Page | 8
t
1
−c v(t ) dt
m 0
v(t ) =
1 −c V ( s ) + F ( s )
V (s) =
m s
1
V (s) = −c V ( s ) + F ( s )
ms
ms V ( s ) = −c V ( s ) + F ( s )
ms V ( s ) + c V ( s ) = F ( s )
V ( s ) ms + c = F ( s )
V ( s) 1
T ( s) = =
F ( s ) ms + c
t
1
V (t ) = −c v(t ) + Feng (t ) dt
m0
Input Output
F(t) 1 ∫ 𝑣(𝑡)
+
- 𝑚
The block diagram visually represents the mathematical operations:
1. An input signal, 𝑓(𝑡) (engine force), enters a "Sum" block.
2. A feedback signal representing the frictional force, 𝑐 ⋅ 𝑣(𝑡), is subtracted from
the engine force at the "Sum" block. This represents the net force acting on
the vehicle.
3. The output of the "Sum" block (net force) is fed into a "Gain" block with a
1
value of (𝑚). This block converts the net force into acceleration
(𝑎(𝑡) = (𝑓(𝑡) − 𝑐 ⋅ 𝑣(𝑡))/𝑚).
4. The output of the "Gain" block (acceleration) is then fed into an "Integrator"
block. The integrator converts acceleration into velocity (𝑣(𝑡) = ∫ 𝑎(𝑡)𝑑𝑡). The
initial condition for this integrator is set to 0, reflecting the vehicle starting from
rest.
Page | 9
5. The output of the "Integrator" (velocity, v(t)) is then fed back through another
"Gain" block with a value of 𝑐. This block calculates the frictional force
(𝑐 ⋅ 𝑣(𝑡)).
6. This calculated frictional force is then fed back to the negative input of the
initial "Sum" block, completing the negative feedback loop.
7. A "Scope" block is connected to the output of the "Integrator" to visualise the
velocity 𝑣(𝑡) over time.
Each block in the diagram directly corresponds to a mathematical operation or
system component, reinforcing the understanding of how the differential equation
translates into a functional system. The diagram also clearly emphasises the
negative feedback loop of the friction force, which is inherent to the system's self-
regulating behaviour.
3.6 Simulink Model to Control the Velocity of The Vehicle
Figure 2: Simulink model
Steps followed to make the model:
1. We created a new blank model from the Simulink tab
2. From “Sources”, we added a step block and input the values as follows:
• Step time = 0
• Initial value = 0
• Final value = 1000 (force in N)
3. Sum block was added under “Math Operations” and configured it to “+–” to
represent 𝑓(𝑡) − 𝑐 ⋅ 𝑣(𝑡), where the positive input receives the engine force and the
negative input receives the frictional force.
Page | 10
4. We then added a Gain block from “Math Operations” (K). This block represents
1
the 𝑚 term and set its Gain parameter to 1/1000 (since m=1000 kg). After that, we
connected the output of the "Sum" block to the input of this "Gain" block.
5. Then we added an Integrator block from the "Continuous" library.This block
converts acceleration into velocity. Its Initial condition was set to 0, reflecting the
vehicle's initial state of rest. We then connected the output of the "Mass Gain" block
to the input of this Integrator block.
6. Another Gain Block was added to represent the frictional constant c. We set its
Gain parameter to 50 (since 𝑐 = 50 𝑁/(𝑚/𝑠)). We then connected the output of the
"Integrator" (which is velocity) to the input of this friction Gain block.
7. To complete the feedback Loop, we connected the output of the friction Gain block
back to the negative input of the Sum block. This completes the negative feedback
loop for the frictional force.
8. We finally added the Scope on the integrator output and set the simulation stop
time = 100.
9. We then “Run” the simulation.
3.7 Single Equivalent Block Diagram and Construct the Simulink Model
to Control the Velocity of the Vehicle
The single equivalent Block diagram
Input Transfer Function Output
F(t) 1 𝑣(𝑡)
𝑚𝑠 + 𝑐
Figure 3: Simulink reduced model
Page | 11
The construction of the corresponding Simulink model using this reduced
representation:
1. We first created a new blank Simulink model.
2. Then we added a Step block from the "Sources" library and configured it
identically to the previous model (Step time = 0, Initial value = 0, Final value =
1000).
3. Thirdly, we added a Transfer Function Block from the "Continuous" library.
This block directly implements the system's transfer function. We configured
the Transfer Fcn based on T(s)=1000s+50, and set the block's parameters:
o Denominator coefficients: [1000 50]
Then we connected the output of the "Step" block to the input of the "Transfer Fcn"
block.
4. After that, we added an output Scope from the "Sinks" library and connected
the output of the "Transfer Fcn" block to its input.
5. We finally set Simulation Time to 100 seconds and “Run” the simulation.
3.8 Obtain the Graphs for the Time Response of the Velocity 𝑣(𝑡)
Figure 4: Graph for the time response of the velocity v(t)
Page | 12
Figure 5: Graph for the time response of the velocity v(t) for reduced function
The graph shows the velocity on the y-axis (m/s) and time on the x-axis (seconds),
ranging from 0 to 100 seconds. The response exhibits a characteristic exponential
rise, typical of a first-order system, as it approaches a steady-state value. The visual
congruence of these graphs provides immediate empirical validation. The fact that
the graphs perfectly overlap strongly confirms the correctness of the transfer function
derivation, the detailed block diagram, and the proper implementation of both
Simulink models
3.9 The Values for the Time Constant and Final (Terminal) Velocity 𝑣𝑓 of
the Vehicle
From the time response graph presented in Figure 5, the values for the final
(terminal) velocity (vf) and the time constant (τ) of the vehicle can be visually
determined.
• Final Velocity (vf): Observing the graph, the velocity curve flattens out and
reaches a steady-state value as time approaches 100 seconds. From the
Simulink scope, the final velocity is observed to be approximately 20 m/s.
This value represents the maximum velocity the vehicle can attain under the
given constant engine force and linear friction.
• Time Constant (τ): The time constant is the time it takes for the system's
response to reach approximately 63.2% of its final value. With a final velocity
of 20 m/s, 63.2% of this value is 0.632×20 m/s=12.64 m/s. By tracing this
velocity value on the graph to the time axis, the time constant is visually
estimated to be approximately 20 seconds
Page | 13
3.10 Final Velocity 𝑣𝑓 of the Vehicle by Differentiation/Integration
Method
dv
m = −c v(t ) + Feng
dt
dv
1000 = −50 v(t ) + Feng
dt
1
dv = −50v + Feng dt
1000
v t
dv dt
0 −50v + Feng 0 1000
=
3.11 Compare the Theoretically Calculated Time Constant and Final
Velocity with The Corresponding Readings from The Obtained Graphs
from the Simulink Model Of the System
The comparison reveals a strong agreement between the theoretically calculated
values and the values obtained from the Simulink simulation graphs. The time
constant, analytically determined as 20 seconds, closely matches the visually
estimated value from the graph. Similarly, the analytically calculated final velocity of
20 m/s is consistent with the steady-state velocity observed in the simulation.
This close agreement confirms several critical points: the initial mathematical model
accurately represents the physical system under the given assumptions; the
analytical derivations performed are correct; and the Simulink model has been
correctly constructed and configured. This validation builds confidence in using
simulation tools like Simulink as powerful predictive instruments, especially for more
complex systems where analytical solutions may be intractable. It demonstrates that
simulations can reliably predict system behavior, which is essential for design and
optimization. The congruence between theoretical prediction and simulated reality
underscores the reliability of both methods when applied correctly.
Page | 14