Solved Problems: Modelling and System Identification | ECE 5320, Quizzes of Mechatronics

Material Type: Quiz; Professor: Chen; Class: LABORATORY; Subject: Electrical & Computer Engr; University: Utah State University; Term: Unknown 2001;

Typology: Quizzes

Pre 2010

Uploaded on 07/30/2009

koofers-user-ch0
koofers-user-ch0 🇺🇸

4.5

(2)

10 documents

1 / 23

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Solved Problems: Modelling and System Identification
Part-1: Non-Parametric Methods
Transient Response
Example 1:
A first order discrete linear system is defined by the following difference equation-
)()1()( nunayny
=
Find the impulse response of the system. Assume initial rest condition.
Solution:
The impulse response is the output, g(n), of a system when the input is a unit impulse.
=
== 00
0,1
)()( n
n
nnu
δ
)()1()( nnagng
δ
+
=
Assuming initial rest condition,
0,0)(
<
=
nng
Output for samples n>=0,
110)0()1()0(
=
+
=
+
=
δ
agg
aaagg
=
+
=
+
=
0)1()0()1(
δ
22 0)2()1()2( aaagg =+=+=
δ
:
:
nn aannagng =+=+= 0)()1()(
δ
Example 2:
Consider the same dynamic system given in example 1 with a= 0.8, find the output (upto 5
samples) of the system when the input is unit step using,
(i) the method shown in example 1.
(ii) convolution with impulse response.
=
=
0
)()()(
k
knukgny
Assume initial rest condition.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17

Partial preview of the text

Download Solved Problems: Modelling and System Identification | ECE 5320 and more Quizzes Mechatronics in PDF only on Docsity!

Solved Problems: Modelling and System Identification

Part-1: Non-Parametric Methods

Transient Response

Example 1:

A first order discrete linear system is defined by the following difference equation-

y ( n )− ay ( n − 1 )= u ( n )

Find the impulse response of the system. Assume initial rest condition.

Solution:

The impulse response is the output, g(n) , of a system when the input is a unit impulse.

n

n un δ n

g ( n )= ag ( n − 1 )+ δ( n )

Assuming initial rest condition,

g ( n )= 0 , n < 0

Output for samples n>=0,

g ( 0 )= ag (− 1 )+ δ( 0 )= 0 + 1 = 1

g ( 1 )= ag ( 0 )+ δ( 1 )= a + 0 = a

2 2

g ( 2 )= ag ( 1 )+δ( 2 )= a + 0 = a

n n

g ( n )= ag ( n − 1 )+ δ( n )= a + 0 = a

Example 2:

Consider the same dynamic system given in example 1 with a= 0.8 , find the output (upto 5

samples) of the system when the input is unit step using,

(i) the method shown in example 1.

(ii) convolution with impulse response.

=

0

k

yn gkun k

Assume initial rest condition.

Solution:

(i)

n

n un

y ( n )= 0. 8 y ( n − 1 )+ u ( n )

Assuming initial rest condition,

y ( n )= 0 , n < 0

The output samples for n= 0, 1, 2, 3, 4,

y ( 0 )= 0. 1 y (− 1 )+ u ( 0 )= 0 + 1 = 1

y ( 1 )= 0. 1 y ( 0 )+ u ( 1 )= 0. 1 + 1 = 1. 1

y ( 2 )= 0. 1 y ( 1 )+ u ( 2 )= 0. 1 × 1. 1 + 1 = 1. 11

y ( 3 )= 0. 1 y ( 2 )+ u ( 3 )= 0. 1 × 1. 11 + 1 = 1. 111

y ( 4 )= 0. 1 y ( 3 )+ u ( 4 )= 0. 1 × 1. 111 + 1 = 1. 1111

(ii)

Impulse response of the system is,

n n g ( n )= a =( 0. 1 )

For n=0,1,2,3,

g ( 0 )= 1 , g ( 1 )= 0. 1 , g ( 2 )= 0. 01 , g ( 3 )= 0. 001 , g ( 4 )= 0. 0001

Output of the system is,

∑ ∑

=

4

0 0

k k

yn gkun k gkun k

y ( 0 )= g ( 0 ) u ( 0 )+ g ( 1 ) u (− 1 )+ g ( 2 ) u (− 2 )+ g ( 3 ) u (− 3 )+ g ( 4 ) u (− 4 )= 1 + 0 + 0 + 0 + 0 = 1

y ( 1 )= g ( 0 ) u ( 1 )+ g ( 1 ) u ( 0 )+ g ( 2 ) u (− 1 )+ g ( 3 ) u (− 2 )+ g ( 4 ) u (− 3 )= 1 + 0. 1 + 0 + 0 + 0 = 1. 1

y ( 2 )= g ( 0 ) u ( 2 )+ g ( 1 ) u ( 1 )+ g ( 2 ) u ( 0 )+ g ( 3 ) u (− 1 )+ g ( 4 ) u (− 2 )= 1 + 0. 1 + 0. 01 + 0 + 0 = 1. 11

y ( 3 )= g ( 0 ) u ( 3 )+ g ( 1 ) u ( 2 )+ g ( 2 ) u ( 1 )+ g ( 3 ) u ( 0 )+ g ( 4 ) u (− 1 )= 1 + 0. 1 + 0. 01 + 0. 001 + 0 = 1. 111

y ( 4 )= g ( 0 ) u ( 4 )+ g ( 1 ) u ( 3 )+ g ( 2 ) u ( 2 )+ g ( 3 ) u ( 1 )+ g ( 4 ) u ( 0 )= 1 + 0. 1 + 0. 01 + 0. 001 + 0. 0001 = 1. 1111

The response of the same system was sampled at an interval of 10 msec (shown above).

Steady state output is 1.2. The data for first 14 samples are summarized in the table below.

Identify the system's transfer function and compare the result with the one obtained in the

previous problem.

Time

(msec)

0 10 20 30 40 50 60 70 80 90 100 110 120 130

y 0 .195 .615 1.045 1.351 1.491 1.488 1.400 1.287 1.192 1.137 1.123 1.373 1.

Frequency Response

Question 4

The difference equation describing a system is given by:

y ( n )= 1. 8 y ( n − 1 )− 0. 85 y ( n − 2 )+ u ( n − 2 )

Find the transfer function of this system. How can the frequency response be obtained?

Question 5

Explain the effects of sinusoidal disturbance of a single frequency on the measured frequency

response of a system. How can we ascertain that the effect is caused by a sinusoidal

disturbance, and not due to the structural properties of the system under test?

Correlation Analysis

Question 6

Explain the important statistical characteristics of white noise exploited in the open loop

system identification through correlation analysis.

Question 7

White noise is unrealisable in practice. Explain how the correlation method can still be used

for open loop system identification.

Question 8

Find the auto-correlation of the following Pseudo Random Binary Sequence (PRBS)

generated using a 3-bit shift register.

Sketch the auto-correlation as a function of clock interval. Explain the conditions at which

this auto-correlation function tends to represent white noise.

(b)

The output of the discrete time system is given by,

=

0

k

yn gkun k

Considering only 5 samples of impulse response,

4

0

k

yn gkun k

For unit step input,

k

k uk

Therefore,

4

0

= (^) ∑ − = =

y gku k g u k

4

0

= (^) ∑ − = + =

=

y gku k g u g u

k

4

0

= (^) ∑ − = + + = + =

=

y gku k g u g u g u

k

4

0

= (^) ∑ − = + + + = + =

=

y gku k g u g u g u g u

k

4

0

= (^) ∑ − = + + + + = + =

=

y gku k g u g u g u g u g u

k

Question 2

The response of a 2

nd order system to unit step input is shown above. The observation from

the oscilloscope is summarized below. Identify the transfer function model of the system

Steady state value: 1.

First overshoot occurred at 0.055 sec, with peak amplitude 1.

First undershoot at 0.109 sec, with magnitude 1.

Solution:

Steady state value, K=1.

First overshoot,

y ( t 1 )= K ( 1 + M ) ⇒ 1. 504 = 1. 2 ( 1 + M )

M = − ≈

Damping coefficient,

2 2 (ln( ))

ln( )

M

M

ln( M )=ln( 0. 25 )=− 1. 3863

2 2

Natural frequency,

2

t

n

  1. 32 / sec

  2. 055 1 ( 0. 4 )

2

n = rad

Result obtained from sampled measurement differs slightly from that obtained from

continuous time observation.

Frequency Response

Question 4

The difference equation describing a system is given by:

y ( n )= 1. 8 y ( n − 1 )− 0. 85 y ( n − 2 )+ u ( n − 2 )

Find the transfer function of this system. How can the frequency response be obtained?

Solution:

If the z-transform of a sequence 'x(n)' is X(z),

x ( n ) X ( z )

Z  →

then,

x ( n p ) z X ( z )

Zp − →

Therefore,

1 y n z Y z

Z − − →

2 y n z Y z

Z − − →

2 u n z U z

Z − − →

Then taking z-transform of the given difference equation,

1 2 2 Y z z Y z z Y z z U z

− − − = − +

1 2 2 Y z z Y z z Y z z U z

− − − − + =

( )[ 1 1 .. 8 0. 85 ] ( )

1 2 2 Y z z z z U z

− − − − + =

1 2 2

2

− −

z z z z

z

U z

Y z

Question 5

Explain the effects of sinusoidal disturbance of a single frequency on the measured frequency

response of a system. How can we ascertain that the effect is caused by a sinusoidal

disturbance, and not due to the structural properties of the system under test?

Answer:

If the disturbance in the frequency response measurement by correlation analysis is a sinusoid

with frequency equal to one of the test frequencies, the magnitude and phase becomes

distorted at that frequency showing a large gain and phase change. The disturbance also

affects the magnitude and phase at the frequencies in the neighbourhood of the disturbance

frequency. [See the figure in lecture notes] Similar response may be obtained if the system

under test has a lightly damped structural mode at that frequency.

If we increase the number of cycles taken for averaging in the correlation method, the effect

of the sinusoidal disturbance on the neighbouring frequencies becomes smaller, leaving only a

large change at the frequency of disturbance sinusoid. However, if the large gain in the

response is due to structural properties of the system under test, increasing number of cycles

has no effect on the shape of magnitude curve. If after increasing the number of cycles used

for averaging has an effect on the magnitude response, we can conclude that the large gain is

from a disturbance sinusoid and not due to a structural property.

Correlation Analysis

Question 6

Explain the important statistical characteristics of white noise exploited in the open loop

system identification through correlation analysis.

Answer:

Properties of white noise exploited in the correlation method of system identification are -

(1) White noise is a zero-mean random sequence

(2) Covariance function of white noise is an impulse at τ=

→∞

N

k

N

uk uk N

R

1

(τ) lim τ

Question 7

White noise is unrealisable in practice. Explain how the correlation method can still be used

for open loop system identification.

Answer:

Instead of using white noise, which is unrealisable, we can use some signal close to white

noise. However, these signals do not have an impulse-shaped covariance function. We can

still use the correlation method to identify the impulse response of a system by adapting one

of the two methods:

(1) Obtain a truncated impulse response from finite number of covariance

measurement

Taking interpolation between sampling instants, we get the auto-correlation sketch:

τ

0 1 2 3 4 5 6 7

This auto-correlation will tend to the auto-correlation of a white-noise sequence as the

sampling interval (Ts) becomes smaller, and sequence length becomes larger. However, this

sequence will have a non-zero mean. In order to get, zero-mean white noise type sequence,

the sequence should be transformed in to a {+1, -1} sequence.

Solved Problems: Modelling and System Identification

Part-2: Parametric Methods

  1. What are the different structural parameters in the Box-Jenkins Model?
  2. Suppose that a square-law circuit has the input output relationship

2 y = kx

where x is the input voltage and y is the output voltage.

(a) Derive a least-square procedure for calculating k.

Experimentation with the circuit yields the following data pairs:

k 'x(k)' 'y(k)'

0 0.0 0.

1 1.0 1.

2 2.0 3.

(b) Find the least-square estimate for ' k ' for these data.

  1. A first order discrete system yields the following input output measurements:

k 'u(k)' 'y(k) '

0 1.0 0

1 0.75 0.

2 0.50 0.

Find the transfer function using least square estimate of the parameters from the above

data.

  1. A first order discrete system yields the following input output measurements:

k 'u(k)' 'y(k)'

0 10 0

1 10 12.

2 10 20.

Find the transfer function using least square estimate of the parameters from the above

data.

  1. An experiment was performed to identify a model for a system assumed to be first order.

It is desired fit the following model to the experimental data, assuming 'e(k)' as a random

sequence representing white noise.

y ( k )=− ay ( k − 1 )+ bu ( k − 1 )+ e ( k )

Data [ u(k), y(k) ] were collected for 1000 samples, and the following summations were

calculated for k=1:999.

  • Question 1
  • What are the different structural parameters in the Box-Jenkins Model?
  • Answer:
  • There are five structural parameters in the BJ model. They are,
    1. Delay parameter indicating amount of delay between application of the input signal

and the corresponding output

    1. Two parameters to specify the plant model: Order of numerator polynomial and

order of denominator polynomial

    1. Two parameters to specify the disturbance or noise model: Order of numerator

polynomial and order of denominator polynomial

  • Question 2(a)
  • For a set of input voltage, we can measure the corresponding output. The set of data

can be described by the following set of equations:

  • In vector notation,
  • Where,
    • Measurement of output:
    • Regressor Vecotr consisting of input data:
    • Error vector:
  • Sum of the squared error is given by:

yN kxN e N

y kx e

y kx e

= +

= +

= +

2

2

2 2 2

1

2 1 1

:

[ ]

T Y = y 1 y 2 .... yN

[ ]

T x x xN 2 2 2

2 Φ= 1 ....

[ ]

T E = e 1 e 2 .... eN

∑ = =(^ −Φθ^ ) (^ −Φθ)

=

e EE Y Y T T

N

n

n 1

2

Y =Φ θ+ E

  • Or,
  • Since
  • If we choose θ to minimize the sum of squared error,

ET^ E = YTY −Φ TY θ − YT Φθ+Φ T Φ θ^2

Φ T^ Y = YT Φ

2 = − 2 Φ θ +ΦΦ θ

T T T T EE YY Y

0

( )

∂ θ

E E

T

2 2 0

( ) =−Φ + ΦΦ = ∂

∂ θ θ

T T

T Y

EE

( ) Y

T T = ΦΦ Φ

− 1 θ

  • Question 2(b)
  • Output vector,
  • Regressor vector,
  • Least square estimate of ‘k’,

[ ]

T Y = 0. 011. 01 3. 98

[ ] [ ]

T T ( 0. 0 ) ( 1. 0 ) ( 2. 0 ) 0. 0 1. 0 4. 0

2 2 2 Φ= =

k = (Φ^ T^ Φ)^ Φ TY

ˆ −^1

( 0. 0 ) ( 1. 0 ) ( 4. 0 ) 17. 0

2 2 2 ΦΦ= + + =

T

Φ Y =( 0. 0 × 0. 01 )+( 1. 0 × 1. 01 )+( 4. 0 × 3. 98 )= 16. 93

T

  1. 00

ˆ 1 16.^93 = ΦΦ Φ = =

k T T Y

  • Question 5(c)
  • If the noise ‘ e(k) ’ is not white, the least square method gives a biased estimate of the

true parameters.

  • Question 5(a)
  • Writing the plant model in linear in the parameter structure,
  • For the measured data points, we can write

[ ] (^)  

  

 = − − − b

a y ( k ) y ( k 1 ) u ( k 1 )

 

  

=

b

a

y u

y u

y u

y

y

y

( 999 ) ( 999 )

: :

( 2 ) ( 2 )

( 1 ) ( 1 )

( 1000 )

:

( 3 )

( 2 )

 

  

Φ=

= b

a

y u

y u

y u

y

y

y

Y ; θ

( 999 ) ( 999 )

: :

( 2 ) ( 2 )

( 1 ) ( 1 )

;

( 1000 )

:

( 3 )

( 2 )

  • Question 5(a) cont.
  • For the given data,
  • Least square estimate of the parameters,

 

  

 − − − ΦΦ=

∑ ∑

= =

= = 999

1

2

999

1

999

1

999

1

2

()() ()

() ()()

( 999 ) ( 999 )

: :

( 2 ) ( 2 )

( 1 ) ( 1 )

( 1 ) ( 2 ) .... ( 999 )

( 1 ) ( 2 ) .... ( 999 )

k k

T k k

ykuk u k

y k ykuk

y u

y u

y u

u u u

y y y

− +

 

  

 − − − Φ =

=

= 999

1

999

1

()( 1 )

()( 1 )

( 1000 )

:

( 3 )

( 2 )

( 1 ) ( 2 ) .... ( 999 )

( 1 ) ( 2 ) .... ( 999 )

k

T k

ukyk

ykyk

y

y

y

u u u

y y y Y

 

  

−  Φ = 

  

− Φ Φ= 40

1 ; 22 52

35 22 Y

T T

  

 = 

  

−  

  

− =ΦΦ Φ = 

  

− −

  1. 03

  2. 62

40

1

22 52

35 22 ˆ

ˆ ˆ

1 1 Y b

a (^) T T θ

Solved Problems: Modelling and System Identification

Part-3: Design of Experiment

Input Signal

Q.1. We have the task to identify a model of an electromechanical actuator as a first step

in designing a feedback controller for the actuator. Design objective of the closed

loop system demands a fairly good model up to 1 kHz. A quick transient response

experiment is performed to find the dominant time constant. It is decided to use

PRBS as the test signal to identify the model.

(a) Choose a suitable sampling frequency for this experiment.

(b) Determine a suitable sequence length for the PRBS, and find the number of flip-

flops required to generate the PRBS. Assume dominant time constant to be 0.

sec.

Answer:

(a) Since we want good identification result up to 1 kHz, the minimum sampling

frequency is 2 kHz. Higher the sampling frequency better the result would be.

However, too high sampling frequency will result in a very long sequence of PRBS.

Let's select 10 kHz. So the sampling interval is 10

  • sec.

(b) Dominant time constant is 0.1 sec. Duration of the input signal should be 5 to 10

times the dominant time constant. Let's select the duration to be 0.5 sec (5 times the

time constant). Then the length of PRBS is,

4

T S

T

M

However, length of the PRBS is given as power of 2, =^2 −^1

N M (^). If we select N=

(13-bit shift register), the sequence length is 8191.

Then the duration of the designed PRBS is 8191x

  • sec = 0.8191 sec or about 8

times longer than the dominant time constant.