0% found this document useful (0 votes)
89 views68 pages

Control Systems Lab: State Space Modeling of Systems

This document discusses state space modeling of control systems. It introduces two approaches for analyzing control systems: classical/frequency domain and modern/state-space. The state-space approach can model nonlinear, time-varying, and multi-input multi-output systems using matrices to represent the system. This representation describes the system state and output over time based on the current state, input, and system matrices. An example application is presented.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
89 views68 pages

Control Systems Lab: State Space Modeling of Systems

This document discusses state space modeling of control systems. It introduces two approaches for analyzing control systems: classical/frequency domain and modern/state-space. The state-space approach can model nonlinear, time-varying, and multi-input multi-output systems using matrices to represent the system. This representation describes the system state and output over time based on the current state, input, and system matrices. An example application is presented.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 68

Control Systems Lab

State Space Modeling of Systems

Surrayya Mobeen

Department of Aeronautics and Astronautics


Institute of Space Technology, Islamabad

S.M (IST) CSLab 1 / 20


Outline

1. Introduction

2. General Representation

3. State Space Representation of Physical Systems

4. Example

5. Task

S.M (IST) CSLab 2 / 20


Outline

1. Introduction

2. General Representation

3. State Space Representation of Physical Systems

4. Example

5. Task
Introduction

 For analysis and design of a control system, two approaches are used

S.M (IST) CSLab 3 / 20


Introduction

 For analysis and design of a control system, two approaches are used

1. Classical (or frequency domain) technique

S.M (IST) CSLab 3 / 20


Introduction

 For analysis and design of a control system, two approaches are used

1. Classical (or frequency domain) technique


2. Modern (State space or time domain) approach

S.M (IST) CSLab 3 / 20


Introduction

 For analysis and design of a control system, two approaches are used

1. Classical (or frequency domain) technique


2. Modern (State space or time domain) approach
 The frequency domain approach is based on converting a system's dierential

equation to a transfer function, thus generating a mathematical model of the

system that algebraically relates a representation of the output to the

representation of the input.

S.M (IST) CSLab 3 / 20


Introduction

 For analysis and design of a control system, two approaches are used

1. Classical (or frequency domain) technique


2. Modern (State space or time domain) approach
 The frequency domain approach is based on converting a system's dierential

equation to a transfer function, thus generating a mathematical model of the

system that algebraically relates a representation of the output to the

representation of the input.

 This method not only simplies the representation of individual subsystems

but also simplies their interconnection.

S.M (IST) CSLab 3 / 20


Introduction

 A major advantage of frequency domain technique is that they rapidly

provide stability and transient response information.

S.M (IST) CSLab 4 / 20


Introduction

 A major advantage of frequency domain technique is that they rapidly

provide stability and transient response information.

 Thus we can immediately see the eects of varying system parameters until

an acceptable design is met.

S.M (IST) CSLab 4 / 20


Introduction

 A major advantage of frequency domain technique is that they rapidly

provide stability and transient response information.

 Thus we can immediately see the eects of varying system parameters until

an acceptable design is met.

 The primary disadvantage of the classical approach is its limited applicability.

S.M (IST) CSLab 4 / 20


Introduction

 A major advantage of frequency domain technique is that they rapidly

provide stability and transient response information.

 Thus we can immediately see the eects of varying system parameters until

an acceptable design is met.

 The primary disadvantage of the classical approach is its limited applicability.

 It can be applied only to linear, time invariant systems or systems that can be

approximated as such.

S.M (IST) CSLab 4 / 20


Introduction

 A major advantage of frequency domain technique is that they rapidly

provide stability and transient response information.

 Thus we can immediately see the eects of varying system parameters until

an acceptable design is met.

 The primary disadvantage of the classical approach is its limited applicability.

 It can be applied only to linear, time invariant systems or systems that can be

approximated as such.

 The state space approach is a unied method for modeling, analyzing and
designing a wide range of systems. For example,

S.M (IST) CSLab 4 / 20


Introduction

 A major advantage of frequency domain technique is that they rapidly

provide stability and transient response information.

 Thus we can immediately see the eects of varying system parameters until

an acceptable design is met.

 The primary disadvantage of the classical approach is its limited applicability.

 It can be applied only to linear, time invariant systems or systems that can be

approximated as such.

 The state space approach is a unied method for modeling, analyzing and
designing a wide range of systems. For example,

State space representation can be used to represent non-linear systems that


have backlash, saturation and dead zone.

S.M (IST) CSLab 4 / 20


Introduction

 A major advantage of frequency domain technique is that they rapidly

provide stability and transient response information.

 Thus we can immediately see the eects of varying system parameters until

an acceptable design is met.

 The primary disadvantage of the classical approach is its limited applicability.

 It can be applied only to linear, time invariant systems or systems that can be

approximated as such.

 The state space approach is a unied method for modeling, analyzing and
designing a wide range of systems. For example,

State space representation can be used to represent non-linear systems that


have backlash, saturation and dead zone.
It can also handle conveniently systems with non-zero initial conditions.

S.M (IST) CSLab 4 / 20


Introduction

 A major advantage of frequency domain technique is that they rapidly

provide stability and transient response information.

 Thus we can immediately see the eects of varying system parameters until

an acceptable design is met.

 The primary disadvantage of the classical approach is its limited applicability.

 It can be applied only to linear, time invariant systems or systems that can be

approximated as such.

 The state space approach is a unied method for modeling, analyzing and
designing a wide range of systems. For example,

State space representation can be used to represent non-linear systems that


have backlash, saturation and dead zone.
It can also handle conveniently systems with non-zero initial conditions.
State space approach can also model time varying systems.

S.M (IST) CSLab 4 / 20


Introduction

 A major advantage of frequency domain technique is that they rapidly

provide stability and transient response information.

 Thus we can immediately see the eects of varying system parameters until

an acceptable design is met.

 The primary disadvantage of the classical approach is its limited applicability.

 It can be applied only to linear, time invariant systems or systems that can be

approximated as such.

 The state space approach is a unied method for modeling, analyzing and
designing a wide range of systems. For example,

State space representation can be used to represent non-linear systems that


have backlash, saturation and dead zone.
It can also handle conveniently systems with non-zero initial conditions.
State space approach can also model time varying systems.
Multiple input, multiple output systems can be compactly represented in state
space with a model similar in form and complexity to that used for single input
single output systems.

S.M (IST) CSLab 4 / 20


Introduction

 While the state-space approach can be applied to a wide range of systems, it

is not as intuitive as the classical approach.

S.M (IST) CSLab 5 / 20


Introduction

 While the state-space approach can be applied to a wide range of systems, it

is not as intuitive as the classical approach.

 The designer has to engage in several calculations before the physical

interpretation of the model is apparent.

S.M (IST) CSLab 5 / 20


Outline

1. Introduction

2. General Representation

3. State Space Representation of Physical Systems

4. Example

5. Task
State-Space Representation

 A system is represented in state space by the following equations

ẋ = Ax + Bu
y = Cx + Du

S.M (IST) CSLab 6 / 20


State-Space Representation

 A system is represented in state space by the following equations

ẋ = Ax + Bu
y = Cx + Du

 For t and initial conditions, x(to ) , where

S.M (IST) CSLab 6 / 20


State-Space Representation

 A system is represented in state space by the following equations

ẋ = Ax + Bu
y = Cx + Du

 For t and initial conditions, x(to ) , where

 x=state vector

S.M (IST) CSLab 6 / 20


State-Space Representation

 A system is represented in state space by the following equations

ẋ = Ax + Bu
y = Cx + Du

 For t and initial conditions, x(to ) , where

 x=state vector

 ẋ=derivative of state vector with respect to time

S.M (IST) CSLab 6 / 20


State-Space Representation

 A system is represented in state space by the following equations

ẋ = Ax + Bu
y = Cx + Du

 For t and initial conditions, x(to ) , where

 x=state vector

 ẋ=derivative of state vector with respect to time

 y= output vector

S.M (IST) CSLab 6 / 20


State-Space Representation

 A system is represented in state space by the following equations

ẋ = Ax + Bu
y = Cx + Du

 For t and initial conditions, x(to ) , where

 x=state vector

 ẋ=derivative of state vector with respect to time

 y= output vector

 u = input vector

S.M (IST) CSLab 6 / 20


State-Space Representation

 A system is represented in state space by the following equations

ẋ = Ax + Bu
y = Cx + Du

 For t and initial conditions, x(to ) , where

 x=state vector

 ẋ=derivative of state vector with respect to time

 y= output vector

 u = input vector

 A = system matrix

S.M (IST) CSLab 6 / 20


State-Space Representation

 A system is represented in state space by the following equations

ẋ = Ax + Bu
y = Cx + Du

 For t and initial conditions, x(to ) , where

 x=state vector

 ẋ=derivative of state vector with respect to time

 y= output vector

 u = input vector

 A = system matrix

 B = input matrix

S.M (IST) CSLab 6 / 20


State-Space Representation

 A system is represented in state space by the following equations

ẋ = Ax + Bu
y = Cx + Du

 For t and initial conditions, x(to ) , where

 x=state vector

 ẋ=derivative of state vector with respect to time

 y= output vector

 u = input vector

 A = system matrix

 B = input matrix

 C = output matrix

S.M (IST) CSLab 6 / 20


State-Space Representation

 A system is represented in state space by the following equations

ẋ = Ax + Bu
y = Cx + Du

 For t and initial conditions, x(to ) , where

 x=state vector

 ẋ=derivative of state vector with respect to time

 y= output vector

 u = input vector

 A = system matrix

 B = input matrix

 C = output matrix

 D = feedforward matrix

S.M (IST) CSLab 6 / 20


State-Space Representation

   
1 0 1
A= B=
−2 1 0
 
C = 3 −2 D = [0]

S.M (IST) CSLab 7 / 20


State-Space Representation

 Once a model has been introduced in Matlab, we can use a series of

functions to analyze the system.

S.M (IST) CSLab 8 / 20


State-Space Representation

 Once a model has been introduced in Matlab, we can use a series of

functions to analyze the system.

 Key analyses at our disposal:

S.M (IST) CSLab 8 / 20


State-Space Representation

 Once a model has been introduced in Matlab, we can use a series of

functions to analyze the system.

 Key analyses at our disposal:

1. Stability analysis e.g. pole placement

S.M (IST) CSLab 8 / 20


State-Space Representation

 Once a model has been introduced in Matlab, we can use a series of

functions to analyze the system.

 Key analyses at our disposal:

1. Stability analysis e.g. pole placement


2. Time domain analysis e.g. response to dierent inputs

S.M (IST) CSLab 8 / 20


State-Space Representation

 Once a model has been introduced in Matlab, we can use a series of

functions to analyze the system.

 Key analyses at our disposal:

1. Stability analysis e.g. pole placement


2. Time domain analysis e.g. response to dierent inputs
3. Frequency domain analysis e.g. bode plot

S.M (IST) CSLab 8 / 20


State-Space Representation

 Is the system stable?

S.M (IST) CSLab 9 / 20


State-Space Representation

 Is the system stable?

All poles of the system must be on the left hand side of the S plain for continuous

LTI systems to be stable.

S.M (IST) CSLab 9 / 20


State-Space Representation

 Is the system stable?

All poles of the system must be on the left hand side of the S plain for continuous

LTI systems to be stable.

 Manually: Poles are the roots for the denominator of transfer functions or

eigen values of matrix A for state space representations

S.M (IST) CSLab 9 / 20


State-Space Representation

 Is the system stable?

All poles of the system must be on the left hand side of the S plain for continuous

LTI systems to be stable.

 Manually: Poles are the roots for the denominator of transfer functions or

eigen values of matrix A for state space representations

 pole(sys)

S.M (IST) CSLab 9 / 20


State-Space Representation
 Once a model has been inserted in Matlab, the step response can be obtained

directly from: step(sys)

S.M (IST) CSLab 10 / 20


State-Space Representation

 Matlab also caries other useful functions for time domain analysis:

S.M (IST) CSLab 11 / 20


State-Space Representation

 Matlab also caries other useful functions for time domain analysis:

 Impulse response

S.M (IST) CSLab 11 / 20


State-Space Representation

 Matlab also caries other useful functions for time domain analysis:

 Impulse response

impulse(sys)

S.M (IST) CSLab 11 / 20


State-Space Representation

 Matlab also caries other useful functions for time domain analysis:

 Impulse response

impulse(sys)

 Response to an arbitrary input e.g.

S.M (IST) CSLab 11 / 20


State-Space Representation

 Matlab also caries other useful functions for time domain analysis:

 Impulse response

impulse(sys)

 Response to an arbitrary input e.g.

t=[0:0.01:10]

u=cos(t)

lsim(sys,u,t)

S.M (IST) CSLab 11 / 20


State-Space Representation

y=impulse(sys)

S.M (IST) CSLab 12 / 20


State-Space Representation

 Bode plots can be created directly by using: bode(sys)

S.M (IST) CSLab 13 / 20


State-Space Representation

 For a pole and zero plot: pzmap(sys)

S.M (IST) CSLab 14 / 20


State-Space Representation

 Matlab also caries other useful functions for time domain analysis:

S.M (IST) CSLab 15 / 20


State-Space Representation

 Matlab also caries other useful functions for time domain analysis:

 Impulse response impulse(sys)

S.M (IST) CSLab 15 / 20


State-Space Representation

 Matlab also caries other useful functions for time domain analysis:

 Impulse response impulse(sys)

 Response to an arbitrary input e.g.

S.M (IST) CSLab 15 / 20


State-Space Representation

 Matlab also caries other useful functions for time domain analysis:

 Impulse response impulse(sys)

 Response to an arbitrary input e.g.

t=[0:0.01:10]

S.M (IST) CSLab 15 / 20


State-Space Representation

 Matlab also caries other useful functions for time domain analysis:

 Impulse response impulse(sys)

 Response to an arbitrary input e.g.

t=[0:0.01:10]
u=cos(t)

S.M (IST) CSLab 15 / 20


State-Space Representation

 Matlab also caries other useful functions for time domain analysis:

 Impulse response impulse(sys)

 Response to an arbitrary input e.g.

t=[0:0.01:10]
u=cos(t)
lsim(sys,u,t)

S.M (IST) CSLab 15 / 20


Outline

1. Introduction

2. General Representation

3. State Space Representation of Physical Systems

4. Example

5. Task
State Space Representation of Physical Systems

 The rst step in representing a system in state space is to select the state
vector, which must be chosen according to the following conditions

S.M (IST) CSLab 16 / 20


State Space Representation of Physical Systems

 The rst step in representing a system in state space is to select the state
vector, which must be chosen according to the following conditions

1. A minimum number of state variables (sucient to describe the system


completely) must be selected as components of state vector.

S.M (IST) CSLab 16 / 20


State Space Representation of Physical Systems

 The rst step in representing a system in state space is to select the state
vector, which must be chosen according to the following conditions

1. A minimum number of state variables (sucient to describe the system


completely) must be selected as components of state vector.
2. The components of state vector must be linearly independent.

S.M (IST) CSLab 16 / 20


State Space Representation of Physical Systems

 The rst step in representing a system in state space is to select the state
vector, which must be chosen according to the following conditions

1. A minimum number of state variables (sucient to describe the system


completely) must be selected as components of state vector.
2. The components of state vector must be linearly independent.
 In most cases, another way to determine the number of state variables is to

count the number of independent energy storage elements in the system.

S.M (IST) CSLab 16 / 20


State Space Representation of Physical Systems

 The rst step in representing a system in state space is to select the state
vector, which must be chosen according to the following conditions

1. A minimum number of state variables (sucient to describe the system


completely) must be selected as components of state vector.
2. The components of state vector must be linearly independent.
 In most cases, another way to determine the number of state variables is to

count the number of independent energy storage elements in the system.

 The number of these storage elements equals the order of the dierential

equation and the number of state variables

S.M (IST) CSLab 16 / 20


Outline

1. Introduction

2. General Representation

3. State Space Representation of Physical Systems

4. Example

5. Task
Mechanical System

S.M (IST) CSLab 17 / 20


Mechanical System

Writing the dierential equations for the network in gure, we get

2
M1 ddtx21 + D dx
dt + Kx1 − Kx2 = 0
1

d 2 x2 dx2
M2 dt2 + D dt + Kx2 − Kx1 = f (t)

 The state space representation of the above system is given by


      
x˙1 0 1 0 0 x1 0
 v˙1   −K/M1 −D/M1 K/M1 0   v1   0 
 x˙2  = 
+
  0  f (t)
    
0 0 0 1   x2
v˙2 K/M2 0 −K/M2 0 v2 1/M2

S.M (IST) CSLab 18 / 20


Matlab Code

S.M (IST) CSLab 19 / 20


Outline

1. Introduction

2. General Representation

3. State Space Representation of Physical Systems

4. Example

5. Task
Task

Where m1=m2=1 kg k1=7.5 n/m k2=35 n/m b=0.6 ns/m

1. Represent the translational mechanical system shown in gure in state space,

where and is the output. Take the initial conditions equal to zero. Simulate

for time t=50sec. (Impulse and Step input)

S.M (IST) CSLab 20 / 20


Task

Where m1=m2=1 kg k1=7.5 n/m k2=35 n/m b=0.6 ns/m

1. Represent the translational mechanical system shown in gure in state space,

where and is the output. Take the initial conditions equal to zero. Simulate

for time t=50sec. (Impulse and Step input)

2. Model the quarter car suspension system covered in theory in state space

using MATLAB.

S.M (IST) CSLab 20 / 20

You might also like