President UniversityErwin SitompulSMI 7/1 Dr.-Ing. Erwin Sitompul President University Lecture 7...

26
President University Erwin Sitompul SMI 7/1 Dr.-Ing. Erwin Sitompul President University Lecture 7 System Modeling and Identification http://zitompul.wordpress.com

Transcript of President UniversityErwin SitompulSMI 7/1 Dr.-Ing. Erwin Sitompul President University Lecture 7...

President University Erwin Sitompul SMI 7/1

Dr.-Ing. Erwin SitompulPresident University

Lecture 7

System Modeling and Identification

http://zitompul.wordpress.com

President University Erwin Sitompul SMI 7/2

Chapter 4 Dynamical Behavior of Processes

Construct an s-Function model of the interacting tank-in-series system and compare its simulation result with the simulation result of the component model from Homework 2.

For the tanks, use the same parameters as in Homework 2. The required initial conditions are:

h1,0 = 20 cm, h2,0 = 40 cm.

v1

qi

h1 h2

v2

q1

a1 a2

qo

Homework 6

President University Erwin Sitompul SMI 7/3

The interacting tank-in-series system can be described by these differential equation:

s-Function of Interacting Tank-in-Series Chapter 4 Dynamical Behavior of Processes

1 i 11 2

1 1

2 ( )dh q a

g h hdt A A

2 1 21 2 2

2 2

2 ( ) 2dh a a

g h h ghdt A A

v1

qi

h1 h2

v2

q1

a1 a2

qo

President University Erwin Sitompul SMI 7/4

Chapter 4 Dynamical Behavior of Processes

s-Function of Interacting Tank-in-Series

President University Erwin Sitompul SMI 7/5

Chapter 4 Dynamical Behavior of Processes

s-Function of Interacting Tank-in-Series

• Direct comparison between component model and s-function model

President University Erwin Sitompul SMI 7/6

Computer-Controlled SystemsChapter 5 Discrete-Time Process Models

Computer-controlled system indicates that the control law is calculated by computer.

The feedback scheme of such system is shown below:

D/A : Digital-to-analogA/D : Analog-to-digitalS/H : Sample-and-holdTs : Sampling time, sampling periodk : Integer, ≥ 0

A/D

President University Erwin Sitompul SMI 7/7

Chapter 5 Discrete-Time Process Models

The control error e(kTs) is given as the difference between the set point signal w(kTs) and the controlled process output y(kTs), in digital form, in times specified by the sampling period Ts.

The computer interprets the signal e(kTs) as a sequence of numbers and given the control law, it generates a new sequence of control signals u(kTs)

The discretized process represents a system with the input being the sequence of u(kTs) and the output being the sequence of y(kTs).

Sampled Data System

President University Erwin Sitompul SMI 7/8

Classification of SignalsChapter 5 Discrete-Time Process Models

Continuous-time signals or analog signals: defined for every value of time they take on in a continuous interval (t0,t1). In other words, at any given instant an analog signal can take any value.For example, the signal x(t) = sin(t), − ∞ < t < ∞.

Discrete-time signals: defined only at specific values of time. These time instants need not be equidistant, but in practice they are usually taken at equally spaced intervals. In other words, the time variable of the signal can take only certain values. The amplitude of the signal can be continuous i.e., can take any value. For example, x(t) = sin(nt), n = 0,1,2,... n.

The process of converting an analog signal to discrete-time signal is called sampling. A discrete-time signal is sometimes called a sampled signal.

Discrete-valued signals or digital signal: arise when the discrete signals are quantized. A quantized signal assumes only discrete amplitude values. In other words, in these signals both the amplitude and time variable can take only certain values.

President University Erwin Sitompul SMI 7/9

Classification of SignalsChapter 5 Discrete-Time Process Models

: continuous-time signal (analog signal): discrete-time signal (sampled signal): discrete-valued signal (digital signal)

President University Erwin Sitompul SMI 7/10

A/D ConverterChapter 5 Discrete-Time Process Models

The transformation of a continuous-time signal to a discrete-time signal is done by the A/D converter.

A/D

President University Erwin Sitompul SMI 7/11

Chapter 5 Discrete-Time Process Models

D/A Converter D/A converter with a sample-and-hold implements the

transformation of a discrete-time signal to a continuous-time signal that is constant within one sampling period.

President University Erwin Sitompul SMI 7/12

Chapter 5 Discrete-Time Process Models

S/H Element A possible realization of sample-and-hold is the zero-order hold

with the transfer function of the form:

s1( )

T seG s

s

s( ) 1( ) 1( )g t t t T 1

0sT

The sampling time Ts should be chosen in a way so that the process dynamics can be captured correctly.

High frequency continuous-time signals require high sampling frequency (fs), or equivalently, low sampling period Ts.

ss

1f

T

President University Erwin Sitompul SMI 7/13

Chapter 5 Discrete-Time Process Models

Sampling Period With small sampling period we may captures the dynamics of a

system better, but the computational load will be heavier. On the other hand, system with large sampling period may require

low computational demand, but useful information might be lost. In order to avoid loss of information but still capture the process

dynamics correctly, the following inequality must hold:

sins 2

TT

where Tsin is the lowest oscillation period of sinusoidal component of the sampled signal.

Nyquist-Shannon Sampling TheoremIf a function x(t) contains no frequencies higher than β cycle-per-second, then it is completely determined by giving its ordinates at a series of points spaced 1/2β seconds apart.

President University Erwin Sitompul SMI 7/14

Chapter 5 Discrete-Time Process Models

Loss of Information Due To Sampling

sins1 2

TT sin

s2 2

TT sin

s3 2

TT sin

s4 2

TT

President University Erwin Sitompul SMI 7/15

Chapter 5 Discrete-Time Process Models

Ideal Sampler Let us now investigate properties of an ideal sampler.

*s( ) ( )

k

t t kT

Its output variable y* can be represented as a periodic sequence of δ functions as follows:

Let us define ωs = 2π/Ts, and therefore

s

2

s

1t

j nT

n

eT

• Representation in

Fourier Series

s* s( )2

jn t

n

t e

President University Erwin Sitompul SMI 7/16

Chapter 5 Discrete-Time Process Models

Ideal Sampler The output variable of the ideal sampler can then be written

as:

s* s( ) ( )2

jn t

n

y t y t e

* *( ) ( ) ( ) ( ) 0, 0y t y t t y t t

The Fourier transform of this function if y(0) = 0 is given as:

s*

s0 0

1( ) ( ) jn tj t j t

n

y t e dt y t e e dtT

s

s

1( ) jn t

n

y t eT

s( )*

s 0

1( ) ( )j n t

n

Y j e y t dtT

*s

s

1( ) ( )

n

Y j Y j nT

President University Erwin Sitompul SMI 7/17

Chapter 5 Discrete-Time Process Models

Ideal Sampler

The spectral density function of the variable y(t) is |Y(jω)|, while the spectral density of the sampled signal y*(t) is given as:

*s

s

1( ) ( )

n

Y s Y s jnT

Substituting s for jω,

Sampling result = Sum of series of original signal, shifted nωs away from the original frequency

*s

s

1( )( )

n

Y j nY jT

President University Erwin Sitompul SMI 7/18

Chapter 5 Discrete-Time Process Models

Ideal Sampler

Spectral density of original signal y(t)

Spectral density of sampled signal y*(t)

ωc : critical frequency ωs : sampling frequency

President University Erwin Sitompul SMI 7/19

Chapter 5 Discrete-Time Process Models

If ωc is smaller than or equal to half of the sampling frequency, the spectral density of |Y*(jω)| is composed of spectra of |Y(jω)| shifted to the right and left, nωs away. There are no overlapping.

If ωc is larger than half of the sampling frequency, then the spectral density of |Y*(jω)| consists of spectra |Y(jω)| shifted to the right and left, nωs away also. But now, there is overlapping. Hence the spectral density of the signal |Y*(jω)| is distorted.

ωωs–ωs 0

• If ωs < 2ωc, then overlapping occurs.• Original signal cannot be reconstructed

from the sampled signal.

Ideal Sampler

President University Erwin Sitompul SMI 7/20

Chapter 5 Discrete-Time Process Models

Choosing The Sampling Period The sampling period choice is rather a problem of

experience than some exact procedure. Basically, sampling period has a strong influence on

dynamic properties of the controlled system, as well as the whole closed-loop system.

The following rule of thumbs can be used to determine the sampling period of first- and second-order system: 1st order τ/4 < Ts < τ/2 2nd order Tn/20 < Ts < Tn/4, Tn = 2π/ωn

President University Erwin Sitompul SMI 7/21

Let us again consider an ideal sampler, as shown below. This sampler implements the transformation of a continuous-

time signal f(t) to an impulse modulated signal f*(t).

Chapter 5 Discrete-Time Process Models

Z-Transform

Individual impulses appear on the sampler output in the sampling times kTs, k = 0, 1, 2, ... and are equal to functions f(kTs), k = 0, 1, 2, ...

This impulse modulated signal containing a sequence of impulses is denoted by f*(t), which can be expressed as:

*s s

0

( ) ( ) ( )k

f t f kT t kT

The Laplace transform of this function is:

** ( )( ) F sf t L ss

0

( ) kT s

k

f kT e

President University Erwin Sitompul SMI 7/22

Chapter 5 Discrete-Time Process Models

Z-Transform Let us introduce a new variable

sT sz e Then we can write

*s

0

( )( ) k

k

f kT zf t

L

s0

( ) ( )( ) k

k

F z f kT zf t

Z

The Z-transform can now be defined as:

s

*( ) ( ) T sz ef t F s

Z

Z-transform is mathematically equivalent to Laplace transform and differs only in the argument.

Z-transform exists only if some z exists such that the series converges for k→∞.

President University Erwin Sitompul SMI 7/23

Chapter 5 Discrete-Time Process Models

Properties of Z-Transform Shifting Theorem

s( ) ( )kf t kT z F z Z

Initial Value Theorem1

s0lim ( ) lim ( )z

zk zf kT F z

Final Value Theorem1

s 1lim ( ) lim ( )z

zk zf kT F z

Given the Z-transform of a function, we can find the value of the function in time domain using the inverse Z-transform, but only for each value of sampled time, t = kTs.

1s s(0), ( ), (2 ),( ) f f T f TF z Z

1 *s( ) ( )( ) f kT f tF z Z

President University Erwin Sitompul SMI 7/24

Chapter 5 Discrete-Time Process Models

Table of Z-Transform

President University Erwin Sitompul SMI 7/25

Chapter 5 Discrete-Time Process Models

ExampleProve the table for the Z-transform of

( ) , 0atf t e t

s0

( ) ( )( ) k

k

F z f kT zf t

Z s

0

akT k

k

e z

s

0

( )aT k

k

ze

2

0 1n

n

aar a ar ar

r

Recalling the formula to calculate the sum of infinite geometric series

s

s 10

1( )

1 ( )akT k

aTk

zeze

Then

s( ) aT

zF z

z e

President University Erwin Sitompul SMI 7/26

Homework 7Chapter 4 Dynamical Behavior of Processes

1. Find the values y(kT) for k = 0 to 4, when

2. We have a function

Using a partial fraction expansion of Y(s) and the table given on previous slide, find Y(z) when Ts = 0.1 s.

NEW

2( )

3 2

zY z

z z

5( )

( 2)( 10)Y s

s s s