Chapter 2 Mathematical Modeling of Dynamic System

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

Regulation and Control System

EEng5194
BAHIR DAR UNIVERSITY

BAHIR DAR INSTITUTE OF TECHNOLOGY

Faculty of Electrical and Computer Engineering

Stream of Control and Instrumentation


Target Group: 5th year Mechanical Engineering
Chapter 2
Mathematical Modeling of Dynamic Systems
Contents
Introduction

Linear and non-linear systems

Transfer functions and block diagrams

 Modeling in state space

Mathematical modeling of mechanical and electrical systems


Modeling of Dynamic System - Objectives

Deriving input-output relations of linear time invariant systems


(mechanical ,electrical ) using elemental and structural equations.

Obtaining transfer function representation of LTI systems.

Representing control systems with block diagrams.


Introduction

• A mathematical model of a dynamic system is defined as a set of equations that


represents the dynamics of the system accurately or, at least fairly.
• Obtaining the mathematical model is the first step in analyzing a given system.
• In the mathematical model, the various operations in the system are represented by
mathematical equations.
• We will use quantitative mathematical models of physical systems to design and
analyze control systems.
• The dynamic behavior is generally described by ordinary differential equations.
Continued

• We will consider a wide range of systems, including mechanical, electrical and


electromechanical systems.
• Even if most physical systems are nonlinear, we will consider as they are linear or
we will take linearization approximations, which allow us to use Laplace
transform methods.
• We will then proceed to obtain the input–output relationship for components and
subsystems in the form of transfer functions.
• The transfer function blocks can be organized into block diagrams or signal-flow
graphs to graphically depict the interconnections.
Linear and Non-linear System

• A control system is said to be linear, if it satisfies the principles of superposition.


This means the response to several inputs can be obtained by considering one
input at a time and then algebraically adding the individual results.
• Principles of superposition is expressed by two properties.
I. Additive property which says that for x and y belonging to the domain of the
function f then we have; f(x+y)=f(x)+f(y)
II. Homogenous property which says for any x belonging to the domain of the
function f and for any scalar constant β we have; f(βx)= βf(x).
• Additionally a control system is said to be linear, if the output i.e. (the response)
varies linearly with the input.
Continued

• Example: a resistive network is a linear system:

a) resistive circuit b) response of the system


• A control system is said to be non-linear, if it does not satisfy the principles of
superposition.
• Example: f(x)= is non-linear systems because f(x+y)= ( + ) and
f(x)+f(y)= + Thus f(x+y) ≠ f(x)+f(y)
Approaches for solving dynamic system problem

1. Define the system and its components


 Draw the schematic diagram of the system
 Define variables
2. Formulate the mathematical model and list the necessary assumptions
3. Write the differential equations describing the model i.e. Using physical laws
4. Solve the equations for the desired output variables
5. Examine the solutions and the assumptions .
6. If necessary, reanalyze or redesign the system
Linear ordinary differential equation

• In general, the differential equation of an nth-order system is written:

which is also known as a linear ordinary differential equation if the coefficients


ao,a1,…,an-1 are not functions of y(t).
• A first-order linear ordinary differential equation is therefore in the general form:

and the second-order general form of a linear ordinary differential equation is


Transfer Function
The transfer function of a linear, time-invariant system is defined as the ratio of
the Laplace transform of the output (response function) to the Laplace transform of
the input (driving function) under the assumption that all initial conditions are zero.
Transfer function = G(s) = L[output]
L[input] zero initial conditions
• Let us begin by writing a general nth-order, linear, time-invariant differential
equation,

• where c(t) is the output, r(t) is the input, and the ai’s, bi’s, and the form of the
differential equation represent the system. Taking the Laplace transform of both
sides,
…(1)
Continued

• If we assume that all initial conditions are zero, Eq. (1) reduces to

• Now form the ratio of the output transform, C(s), divided by the input transform,
R(s):

• The transfer function can be represented as a block diagram, as shown in Figure


below with the input on the left, the output on the right, and the system transfer
function inside the block.
Transfer function of a simple feedback loop

• Where R(s) is Laplace of reference input r(t)


• C(s) is Laplace of controlled output c(t)
• E(s) is Laplace of error signal e(t)
• B(s) is Laplace of feedback signal b(t)
• G(s) is equivalent of forward path transfer function
• H(s) is equivalent of feedback path transfer function
Derivation of transfer function of simple feedback loop
• E(s)= R(S) ∓ B(s) …(1)
• B(s)=C(s)H(s) …(2)
• C(s)= E(s)G(s) …(3)
• Substituting equation 1 into equation 2
• E(s)= R(S) ∓ C(s)H(s) …(4)
• From equation 3 we have E(s)=C(s)/G(s) ,substituting this into equation 4, we get ,
( )
=R(S) ∓ C(s)H(s)
( )
• Rearranging it C(s)/G(s) ± C(s)H(s) =R(s)
• C(s)[1 ± G(s)H(s)]=R(s)G(s)
( )
• Thus transfer function is , = G(s)/ 1 ± G(s)H(s)
( )
Procedures to determine the
transfer function of a control system
a) Write down the time domain equation for the system by introducing different
variables in the system.
b) Take the Laplace transform of the system equations assuming all initial
conditions to be zero.
c) Identify system input and output variables.
d) Eliminating introduced variables , get the resultant equation in terms of input
and output variables.
e) Take the ratio of Laplace transform of output variable to Laplace transform of
input variable to get the transfer function model of the system
Block diagram

• Block diagram is a shorthand pictorial representation of cause and effect


relationship between input and output of a physical system.

input Block Output R(s) G(s) C(s)

a) A simple block b) block diagram with gain


Definition of Basic Terminologies
Output: is the value of input multiplied by the block gain.
C(s)=G(s)R(s)
Summing point: is the point in which two or more signals are added or
subtracted.

Summing point
Take-off point: is a point in which the output signal of any block can be applied
to two or more points.

Take-off point
Continued

Forward path : is the direction of flow of signal from input to output .


Feedback path : is the direction of flow of signal from output to input.

forward path and feedback path


Block diagram from system equation
• The block diagram can be constructed from the set of equations representing the
system . Addition and subtraction of the various terms are represented by
summing points , while multiplication factor are represented by the blocks of the
respective transfer function.
• Example: obtain the block diagram for the given electrical network.

• Solution: apply KVL(Kirchhoff's voltage law) on two loops,


• Vi=R1I1+R2(I1-I2) i.e. I1=Vi ( ) + I2 ( ) …(1)
• 0= R2(I2-I1) +R3I2+R4I2 i.e. I2 = I1 ( ) …(2)
• And V0= I2R4 …(3)
• The block diagrams for the three equations are;

equation 1 equation 2 equation 3


• Thus the overall block diagram is;
Rules for Reduction of Block Diagram Model
Continued
Procedure for Reduction of Block Diagram Model:

• Step 1: Reduce the cascade blocks.


• Step 2: Reduce the parallel blocks.
• Step 3: Reduce the internal feedback loops.
• Step 4: Shift take-off points towards right and summing points towards left.
• Step 5: Repeat step 1 to step 4 until the simple form is obtained.
• Step 6: Find transfer function of whole system as
• Example: determine the transfer function of the system shown in fig below.

• Solution: the block G2 and G3 are in parallel so combining them as (G2+G3) we


get;
• The block G1 and G4 are in parallel so combining them as (G1G4) we get;

• The block (G1G4) and H1 are feedback loop so combining them as we


get;
• Manipulate blocks in series we get;

• Manipulate the feedback loop we get;

• Transfer function is
• Example2:determine the transfer function of the system shown in fig below.

• Solution: the block G4 and H1 form minor feedback loop;


• Shifting take off point after the block G2 we get;

• Block G1 and G2 are in series so combine them as (G1G2) we get;


• Manipulate minor feedback loop and block in parallel we get;

• Manipulate three series blocks and we get;

• Manipulate minor feedback loop and we get;

• Finally transfer function is


Block Diagram Reduction with Multiple Inputs
A dynamic system is linear if the principle of superposition can be applied. this
states that ‘the response y(t) of a linear system due to several inputs
x1(t),x2(t)…xn(t) acting simultaneously is equal to the sum of the responses of each
input acting alone’.
Example: find the complete output for the system shown in figure below when both
inputs act simultaneously.
• Solution: Putting R2(s)=0 and the block G2 and H1 are feedback loop and
cascaded with G1 and replace the summing point by +1 thus the block diagram
will looks;

• Simplify the block finally the transfer function will be;

• Or
• Putting R1(s)=0 and the block G2 and H1 are feedback loop and cascaded with
G1H1 and replace the summing point by -1 thus the block diagram will looks;

• Simplify the block finally the transfer function will be;

• Or

• Using the principle of superposition, the complete response is given by;


• or
Modeling in State Space

Basic Terminologies
• State. The state of a dynamic system is the smallest set of variables (called state
variables) such that the knowledge of these variables at t = to, together with the
knowledge of the input for t ≥ to, completely determines the behavior of the
system for any time t ≥ to.
• State Variables. The state variables of a dynamic system are the variables making
up the smallest set of variables that determine the state of the dynamic system.
• If at least n variables x1, x2…xn are needed to completely describe the behavior
of a dynamic system (so that once the input is given for t≥ to and the initial state at
t = to is specified, the future state of the system is completely determined), then
such n variables are a set of state variable.
• State Vector. If n state variables are needed to completely describe the behavior of
a given system, then these n state variables can be considered the n components of
a vector x. Such a vector is called a state vector.
• A state vector is thus a vector that determines uniquely the system state x(t) for
any time t ≥ to, once the state at t = to is given and the input u(t) for t ≥to is
specified.
• State Space. The n-dimensional space whose coordinate axes consist of the xl
axis, x2 axis,…xn axis, where xl , x2,…xn are state variables; is called a state
space. Any state can be represented by a point in the state space.
• State-Space Equations. In state-space analysis we are concerned with three types
of variables that are involved in the modeling of dynamic systems: input variables,
output variables, and state variables.
• We consider physical systems described by nth-order ordinary differential
equation. Utilizing a set of variables, known as state variables, we can obtain a set
of first-order differential equations. We group these first-order equations using a
compact matrix notation in a model known as the state variable/space model.
• The dynamic system must involve elements that memorize the values of the input
for t ˃ t0 .
• Since integrators in a continuous time control system serve as memory devices,
the outputs of such integrators can be considered as the variables that define the
internal state of the dynamic system.
• Thus the outputs of integrators serve as state variables.
• The number of state variables to completely define the dynamics of the system is
equal to the number of integrators involved in the system.
• Assume that a multiple-input, multiple-output system involves n integrators.
Assume also that there are r inputs u1(t), u2(t), … , ur(t) and m outputs y1(t),
y2(t), … , ym(t). Defining n outputs of the integrators as state variables: x1(t),
x2(t), … , xn(t). Then the system may be described by:

• The outputs y1(t), y2(t), … , ym(t) of the system may be given by:
• In vector-matrix form
• Generally the state space model for;
• Nonlinear time variant system

• Nonlinear time invariant system

• Linear time variant system

• Linear time invariant system


Example:
• For the mechanical system shown below (assume that the system is linear), The
external force u(t) is the input to the system, and the displacement y(t) of the mass
is the output. The displacement y(t) is measured from the equilibrium position in
the absence of the external force.
• Solution : The system is single input single output .
• The system equation from the diagram:
• This system is of second order. which means that the system involves two
integrators. Let us define state variables x1(t) and x2(t) as:

• Let

• The output equation is:


• The state equation in vector-matrix form:

• and, the output equation can be written as:


• The above equation is in standard form:

where:

• Figure below is the block diagram of the mechanical system


Modeling of Mechanical System

• Mechanical systems are classified in to two;


a. Translational mechanical system
b. Rotational mechanical system
• The motion of the body during translational motion is along a straight lines or a
curved path ; whereas during rotational system , the motion of the body is about its
own axis
• The fundamental law governing mechanical systems is Newton's second law.
• According to newton’s law of motion, the sum of force applied on rigid body or
system must be equal to sum of force consumed to produced displacement ,
velocity or acceleration in various elements of the system.
Translational mechanical system Rotational mechanical system

• There are three elements which are • There are three elements which are
dominantly involved in the analyzing dominantly involved in the analyzing
of translational motion. These are; of rotational motion. These are;
Mass Inertia
Spring Spring
Damper damper
Translational Mechanical System
• Example : Determine the transfer function for the mechanical system taking the force on
the mass as an input and the displacement as output shown in figure below.

• Solution: Free body diagram in time and frequency domain will ;

• In deferential equation form:

• Taking Laplace transform:

• The transfer function becomes:


Rotational Mechanical System
Modeling of Electrical System

• Example: Find the differential equation and transfer function relating the
capacitor voltage , Vc(s) to the input voltage, V(s) in Figure below

Fig RLC network


Solution: Apply KVL (Summing the voltages around the loop, assuming zero initial
conditions).
a) vl(t)+vr(t)+vc(t)= v(t) …(1)
…(2)

• Changing variables from current to charge using i(t) =dq(t)/dt yields;


…(3)

• From the voltage-charge relationship for a capacitor: q(t) = Cvc(t).Substituting


Eq. (4) into Eq. (3) yields
…(4)
Continued
b)Taking the Laplace transform assuming zero initial conditions, rearranging terms, and
simplifying yields
…(5)

• Solving for the transfer function, Vc(s)/V(s) we obtain;

…(6)
Or

Block diagram of series RLC electrical network


Modeling Mechanical Systems with Gears:

• Most of the systems which are driven by motors are associated with gear trains for
driving the load . Which provides mechanical advantage for rotational systems.
• An input gear with radius r1 and N1teeth is rotated through angle ϴ1(t) due to a
torque, T1(t). An output gear with radius r2 and N2 teeth responds by rotating
through angle ϴ2(t) and delivering a torque, T2(t)
• Let us now find the relation-ship between the rotation of Gear1,ϴ1(t) and
Gear2,ϴ2(t)
Continued

• The distance traveled along each gear circumstance is equal:

• The number of teeth along the circumstance is proportional with the radius:

• Torque relation for input and output gear:

• From the above equations we get:


• Mechanical impedances (spring, damper, inertia) which are driven by gears:

a) Rotational system driven by gears b) Equivalent system at the output after reflection of input torque

c) Equivalent system at the input after reflection of impedances


• Hence the equation of motion for the first case:

• Substituting ϴ2 with ϴ1;

• After simplification:
• Example: Find the transfer function for the following system taking the angular
displacement of the second inertia as an output when we apply an input torque on
the first inertia:

• Solution: First reflect impedances(D1 and J1) and the torque T1 from the input
side to the output side.

• Then the equation of motion can be written as:


Where;
• Hence, the transfer function and the block diagram becomes:
• A) System transfer function:

• B) Block diagram representation:


Exercises
1. Find the differential equation describing the dynamics of a mechanical system
shown in figure below ? and also find the transfer function hint (take force , f(t)
as input and displacements,X2(t) as output).Where B1 and B2 are damping
coefficients ,K is spring constant.
2. Obtain the transfer function of the block diagram shown in figure below.

3. Why we use block diagram reduction rules?


4. Write the difference between modeling using transfer function and modeling
using state space?
End of chapter 2
If you have any question’s???
Post it on your class telegram group

You might also like