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

Step Response of First Order System

This document describes modeling an electrical and mechanical system using Simulink. It discusses modeling a first-order RC circuit system and determining its step response by examining the differential equation and building a Simulink model. It also discusses modeling the motion of a car as a first-order system by deriving the system equation and building a Simulink model to investigate the response to step and pulse inputs.

Uploaded by

moiz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views

Step Response of First Order System

This document describes modeling an electrical and mechanical system using Simulink. It discusses modeling a first-order RC circuit system and determining its step response by examining the differential equation and building a Simulink model. It also discusses modeling the motion of a car as a first-order system by deriving the system equation and building a Simulink model to investigate the response to step and pulse inputs.

Uploaded by

moiz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 18

Department of Electrical Engineering

Faculty of Engineering & Applied Sciences


Riphah International University, Islamabad, Pakistan

Program: B.Sc. Electrical Engineering Semester: VI


Subject.EE-345 Linear Control System Date: …………

Experiment No.3: Modeling of Electrical and Mechanical system using Simulink

OBJECTIVES: Inquiry Level = 1


The objective of this lab to model various Electrical and mechanical system using Simulink and
MATLAB.
Name: ABDUL MOIZ BASHIR SAP ID:22961

Performance Work Ethics

Description Total Marks Description Total Marks


Marks Obtained Marks Obtained
Taking
Ability to Conduct Responsibility/Sharing
Experiment
5 5
knowledge

Total Marks

Remarks (if any): ………………………………….

Name & Signature of faculty: ………………………………


MODELING FIRST-ORDER SYSTEMS IN SIMULINK

First and second-order differential equations are commonly studied in Dynamic Systems courses,
as they occur frequently in practice. Because of this, we will discuss the basics of modeling these
equations in Simulink. The first example is a low-pass RC Circuit that is often used as a filter.
This is modeled using a first-order differential equation.

Modeling a First Order Equation (RC Circuit)


The RC Circuit is schematically shown in Fig. 1 below.

The differential equation for this is as show in (1) below.

Where (xdot) is the time rate of change of the output voltage, R and C are constants, f(t) is the
forcing function (Input voltage), and x is the output voltage. We are now going to take this piece
by piece. First, we examine what is in the brackets and we notice that we are subtracting the term
x from the term f(t). If we imagine that each of these terms’ outputs a signal, we can model this
relationship as shown in Fig. 2 below.
Now we notice that the bracketed term [f(t) – x] is multiplied by a constant 1/RC. We do this in
Simulink by passing the signal through a Gain block as in Fig. 3 below. Because all the terms on
the right-side of xdot are accounted for, we know that the output signal must be equal to the left
side of the equation, which is xdot.

However, we are interested in x, not xdot. How can we take the xdot output signal and get an x
output? The answer is to use an integrator block as in Fig. 4 below.

Now, we have the desired x output, but we notice that x is also an input of the system. In our
model above, the input x branch is a “dead” branch. In other words, there is no real signal going
in there. How can we make x both an output and input of the system? The answer is to use a
feedback loop by tapping the output x signal and feeding it back into the system at the input
point. After some manipulation of the lines, your model should look like Fig. 5 below.
Double-click on the Integrator block and set the initial conditions to zero as shown in Fig. 11
Leave the remaining fields as they are.
Now, double click on the Gain block and set the gain to the values shown in Fig. 12 below.
Open the Step block to familiarize yourself with the parameters. Now, run the simulation and
open
the Scope block.

Notice how the response of the system lags the step input. This response is governed by the time
constant of the system (τ = RC). Other tutorials in this series will address the significance of this
issue.
Write your finding by changing the values of RC time constant.
Values of RC Scope Output Comments (any changes)

1/0.50 We notice that an


increase in RC values
there is slight change
in graph.

1/0.70 More increase in


values of RC more
smooth graph is.
1/0.85 As there is slight a
change in graph
shape of graph is
little bit changed

Task
Write the transfer function of the above RC circuit. Use the transfer function block to determine the step
response.

Write the Transfer function:1 / (1 + RCs)

Write your finding by changing the values of RC time constant.

Comments (any
Values of RC Scope Output
changes)
1/0.50 We notice that
an increase in
RC values there
is slight change
in graph.

1/0.70 More increase in


values of RC
more smooth
graph is.
1/0.85 As there is slight
a change in
graph shape of
graph is little bit
changed

Free Body Diagram and System Equation:

To demonstrate how Simulink can be used to investigate a real-world system, we will look at a
simplified, first-order model of the motion of a car.  If we assume the car to be travelling on a flat road,
then the horizontal forces on the car can be represented by:

In this diagram:
 v is the horizontal velocity of the car (units of m/s).
 F is the force created by the car's engine to propel it forward (units of N).
 b is the damping coefficient for the car, which is dependent on wind resistance, wheel friction,
etc. (units of N*s/m)  We have assumed the damping force to be proportional to the car's
velocity.
 M is the mass of the car (units of kg).

Writing Newton's Second Law for the horizontal direction thus gives:

For our system, we will assume that:

M = 1000 kg  (a Dodge Neon has a mass of about 1100 kg)


b = 40 N*sec/m

Building System Model:

This system will be modeled in Simulink by using the system equation derived above.   This
equation indicates that the car's acceleration (dv/dt) is equal to the sum of the forces acting on the
car (F-bv) divided by the car's mass:

To model this equation, we begin by inserting a Sum block and a Gain block (both found in the
Math subfolder of the Simulink folder in the Library Browser) into a new model window. The
Sum block represents adding together the forces and the Gain block symbolizes dividing by the
mass. Connecting the blocks with a line gives the following in the model window:
Next, we modify these blocks to properly represent our system.  The Sum block needs to add the
motor force (F) and subtract the damping force (bv).  Thus, we double-click on this block and
change the second "+" in the "List of signs" box into a "-".  The Sum Block Parameters window
should now look like:

We also modify the Gain block so that it divides by the car's mass.  Double-click on the block
and change the Gain to 1/1000 (dividing by 1000 is the same as multiplying by 1/1000).

To keep our block diagram organized and easy to understand, we next add labels to the signals
and blocks we have included so far.  A signal is labeled by double-clicking on its line and
entering the desired description into the text box that appears.  These labels can be moved by
dragging the text boxes to their desired location on the lines.  A block is labeled by clicking on
the text underneath it and editing the description. 
Draw lines to the open input terminals of the Sum block and open output terminal of the Gain
block and label the signals and blocks in the model so that they look like:

To relate the car's acceleration (v_dot in the Simulink model) to its velocity-dependent damping
force, we will integrate the v_dot signal.  Place an Integrator block (from the Continuous
subfolder) in the model (you do not need to change its parameters), and draw and label the
velocity signal so that the model looks like:

To obtain the damping force from the velocity, we need to branch the velocity signal and
multiply it by the damping coefficient (b).  Branching the velocity signal is done by clicking the
right mouse button anywhere on its line (or hold down CTRL and use the left mouse button) and
dragging away a new signal.  A Gain block is then used to multiply the velocity by the damping
coefficient.  Finally, edit the Gain block's parameters so that its gain equals the damping
coefficient of the system (40 N*sec/m).  These additions to the model should cause it to look
like:

Note that the block diagram is now set up with input F (engine force) and output v (car
velocity). 

System Response to Step/Pulse Inputs:

Step Input:

To be able to successfully simulate the system, we need to specify an applied input, F.  Let us
assume the car is initially at rest, and that the engine applies a step input of F = 400 N at t = 0. 
Insert a Step block from the Sources subfolder into the model, and also add a Scope block from
the Sinks subfolder to monitor the system's velocity, v.  The Simulink model window should
now look like:
The Step block must be modified to correctly represent our system.  Double-click on it, and
change the Step Time to 0 and the Final Value to 400.  The Initial Value can be left as 0, since
the F step input starts from 0 at t = 0.  The Sample Time should remain 0 so that the Step block's
input is monitored continuously during simulation.

Next, run a simulation of the system (by clicking the "Start/Pause Simulation" button or selecting
Simulation, Start).   Once the simulation has finished, double-click on the Scope block to view
the velocity response to the step input.  Clicking on the "Autoscale" button (looks like a pair of
binoculars) in the Scope window will produce the following graph:

Note that this graph does not appear to show the velocity approaching a steady-state value, as we
would expect for the first-order response to a step input.  This result is due to the settling time of
the system being greater than the 10 seconds the simulation was run.  To observe the system
reaching steady-state, click Simulation, Parameters in the model window, and change the Stop
Time to 150 seconds.  Now, re-run the simulation and note the difference in the velocity graph:

Values of Gain(M) Scope Output Discussion


M=2000 As we change the value of
M and others remain
remain we see a slight
change in readings

M=2500 Increase in values of 1/M


a there is slight change in
the graph

M=3500 Futher an increase in M


more change we see in
graph now its rise is
below 0.5
Task
Write the transfer function of the above mechanical systemt. Use the transfer function block to determine
the step response.

Write the Transfer function: 1/ MS^2+BS+K

Write your finding by changing the values Gain.

Values of Gain(M) Scope Output Discussion

M=2000 As we change the value of


M and others remain
remain we see a slight
change in readings

M=2500 Increase in values of 1/M


a there is slight change in
the graph
M=3500 Futher an increase in M
more change we see in
graph now its rise is
below 0.5

Conclusion:
Simulink is a powerful tool for modeling electrical and mechanical systems. It provides a user-
friendly interface for engineers and researchers to design, simulate, and analyze complex systems
in a graphical environment. One of the main advantages of using Simulink for modeling
electrical and mechanical systems is its extensive library of built-in blocks and models. These
blocks and models represent different components of a system such as motors, sensors,
controllers, and power electronics, and enable engineers to quickly design and simulate complex
systems without writing extensive code.

You might also like