application of pseudo random binary sequence (prbs
TRANSCRIPT
APPLICATION OF PSEUDO RANDOM BINARY SEQUENCE (PRBS) SIGNAL
IN SYSTEM IDENTIFICATION
MAIMUN BINTI HUJA HUSIN
A project report submitted in partial fulfilment of the
requirements for the award of the degree of
Master of Engineering (Electrical – Mechatronics and Automatic Control)
Faculty of Electrical Engineering
Universiti Teknologi Malaysia
MAY 2008
iii
To my family who loves me, especially to my beloved mother and father for
education they give me and also for their supports and
understandings
iv
ACKNOWLEDGEMENT
First of all, thanks to Allah SWT for giving me strength and chances incompleting this project.
Secondly, I wish to express my sincere appreciation to my supervisor,Associate Professor Dr Mohd Fua’ad bin Rahmat, for encouragement and guidance. Igreatly appreciate his dedication in constructively criticizing my work, including mythesis. I have truly enjoyed working with him.
I wish to thank Universiti Malaysia Sarawak (UNIMAS) and Malaysiangovernment, for a study leave and financial support, through SLAB-JPA scholarship.
Finally, I would like to thank my parents and family for their constantsupport, encouragement and understanding during my struggle away from home,friends in Universiti Teknologi Malaysia (UTM for coloring my life in UTM.
v
ABSTRACT
This project emphasized on both software and hardware analysis. Pseudo
random binary sequence (PRBS) signal of 15 different maximum length sequences
were developed using MATLAB software and were used as forcing function in
simulated second order. There are four second order system responses that were
examined; overdamped, underdamped, undamped and critically damped. For each
response, traces of the output response of system forced by PRBS or without PRBS
in the absence or presence of noise were analyzed. The autocorrelation function of
the input signal and cross correlation function between input and output signal were
performed using MATLAB software. From the correlograms of autocorrelation and
cross correlation, the transfer function of the system was estimated. For verification
of the simulation work, PRBS generator circuit was build using Transistor-transistor
logic. The PRBS signal generated was analyzed using Dynamic Signal Analyzer.
An experiment using PRBS as the forcing function to an unknown system was
performed. The autocorrelation function of the input signal and cross correlation
function between input and output signal were performed using Dynamic Signal
Analyzer and the transfer function model of the unknown system was estimated.
Results from this experiment were used to validate the simulation work previously.
vi
ABSTRAK
Projek ini tertumpu kepada penganalisaan aturcara dan juga perkakasan.
Isyarat Perduaan Jujukan Rawak (PRBS) sebanyak 15 panjang jujukan maksima
dihasilkan menggunakan aturcara MATLAB dan ianya digunakan sebagai fungsi
pemaksa di dalam pengujian sistem tertib kedua. Empat jenis sambutan sistem tertib
kedua telah dianalisa; redaman lampau, teredam, sambutan tanpa redaman dan
redaman genting. Untuk setiap jenis sambutan tertib kedua, analisis terhadap
sambutan sistem yang dipaksa oleh PRBS atau yang tidak dipaksa oleh PRBS, dalam
kehadiran gangguan atau tidak telah dilaksanakan. Fungsi sekaitan auto untuk
isyarat masukan dan fungsi sekaitan silang antara isyarat masukan dan keluaran akan
dilaksanakan menggunakan aturcara MATLAB. Dari graf sekaitan auto melawan
masa lengah dan sekaitan silang melawan masa lengah, rangkap pindah untuk model
sistem tersebut dikenalpasti. Untuk pembuktian keputusan analisa menggunakan
aturcara MATLAB, penjana isyarat PRBS dibina menggunakan IC TTL. Isyarat
PRBS yang dihasilkan dianalisis menggunakan Penganalisis Isyarat Dinamik. Satu
ujikaji menggunakan isyarat PRBS sebagai fungsi pemaksa kepada satu sistem yang
tidak diketahui telah dijalankan. Fungsi sekaitan auto bagi isyarat masukan dan
fungsi sekaitan silang di antara isyarat masukan dan isyarat keluaran dilaksanakan
menggunakan Penganalisis Isyarat Dinamik dan seterusnya rangkap pindah untuk
model sistem yang tidak diketahui dikenalpasti. Keputusan ujikaji tersebut
digunakan untuk membuktikan keputusan analisa menggunakan aturcara MATLAB
yang sebelum ini.
vii
TABLE OF CONTENTS
CHAPTER TITLE PAGE
DECLARATION ii
DEDICATION iii
ACKNOWLEDGEMENT iv
ABSTRACT v
ABSTRAK vi
TABLE OF CONTENT vii
LIST OF TABLES x
LIST OF FIGURES xi
LIST OF ABBREVIATIONS xiv
LIST OF APPENDICES xv
1 INTRODUCTION 1
1.1 Introduction 1
1.2 Rational, Significance and Need for the Study 1
1.3 Research Objectives 2
1.4 Scope of project 2
1.5 Project Outline 3
2 LITERATURE REVIEW 4
2.1 Previous research 4
2.2 System Identification 5
2.3 Input signal 7
2.4 Types of PRBS 8
viii
2.4.1 MLS signals 8
2.4.2 QRB signals 9
2.4.3 HAB signals 9
2.4.4 TPB signals 10
2.4.5 QRT signals 10
2.5 Linear feedback shift register (LFSR) 10
2.6 Feedback configuration 11
2.7 Properties of PRBS 12
2.7.1 Modulo-2 13
2.7.2 Correlation 13
2.7.2.1 Autocorrelation Function 14
2.7.2.2 Cross Correlation Function 16
2.7.3 Power Spectral Density 17
2.8 Summary 18
3 METHODOLOGY 19
3.1 Introduction 19
3.2 Software analysis 19
3.2.1 PRBS generator 19
3.2.2 PRBS signal as test signal to second 20
order system
3.3 Hardware analysis 27
3.3.1 PRBS generator 27
3.3.1.1 Clock circuit 27
3.3.1.2 Feedback circuit 29
3.3.1.3 Shift register circuit 29
3.3.2 PRBS signal as test signal to second 31
order system
4 RESULT 33
4.1 Introduction 33
4.2 PRBS signal (Simulation result) 33
ix
4.3 PRBS signal as forcing function in a second 36
order system (Simulation result)
4.31 Critically damped response 37
4.3.2 Underdamped response 40
4.3.3 Overdamped response 44
4.3.4 Undamped response 48
4.4 PRBS signal (Hardware result) 51
4.5 PRBS signal as test input to a second order system 53
(Hardware result)
4.5.1 Critically damped response 53
4.5.2 Underdamped response 56
5 CONCLUSIONS AND FUTURE WORKS 60
5.1 Conclusion 60
5.2 Future Works 61
REFERENCES 62
Appendices A – C 64 - 111
x
LIST OF TABLES
TABLE NO. TITLE PAGE
2.1 Feedback configuration of LFSR 12
2.2 “Exclusive or” operation 13
3.1 Second order system being identified 21
3.2 List of components for clock circuit 27
3.3 List of components for shift register circuit 29
3.4 List of components for RC low pass filter circuit 31
3.5 RC low pass filter second order system transfer function 32
4.1 Successive states of shift register 34
4.2 Transfer function for several different PRBS maximum 40
length
4.3 Transfer function for several different PRBS maximum 43
length
4.4 Transfer function for several different PRBS maximum 47
length
4.5 Transfer function obtained for hardware analysis 59
5.1 Transfer function obtained for each system (simulation) 60
5.2 Transfer function obtained for each system (hardware) 61
xi
LIST OF FIGURES
FIGURE NO. TITLE PAGE
2.1 Dynamic system 5
2.2 Schematic flowchart of system identification 7
2.3 LFSR 11
2.4 Autocorrelation function of PRBS signal 16
2.5 Autocorrelation function of periodic white noise 16
2.6 Power spectral density of PRBS signal 18
3.1 SIMULINK block diagram of PRBS generator circuit 20
for MLS of N = 15
3.2 Block diagram of system (critically damped) being 23
identified
3.3 Block diagram of system (overdamped) being identified 24
3.4 Block diagram of system (underdamped) being identified 25
3.5 Block diagram of system (undamped) being identified 26
3.6 Block diagram of PRBS generator circuit 27
3.7 Clock circuitry 28
3.8 Block diagram of PRBS generator for MLS of N = 255 30
3.9 Second order system RC circuit 31
4.1 (a) Clock signal, (b) PRBS signal, 34
(c) Autocorrelation function, and
(d) Power spectral density for MLS of N = 15
4.2 (a) Clock signal, (b) PRBS signal, 35
(c) Autocorrelation function, and
(d) Power spectral density for MLS of N = 63
4.3 (a) Clock signal, (b) PRBS signal, 36
(c) Autocorrelation function, and
xii
(d) Power spectral density for MLS of N = 255
4.4 (a) PRBS signal and traces of output response of system 37
(b) forced by PRBS in the absence of noise
(c) without PRBS in the presence of noise
(d) forced by PRBS in the presence of noise
4.5 Autocorrelation functions of input and output signals 38
4.6 Cross correlation functions of output signals 38
4.7 Power spectral density of input and output signals 40
4.8 (a) PRBS signal and traces of output response of system 41
(b) forced by PRBS in the absence of noise
(c) without PRBS in the presence of noise
(d) forced by PRBS in the presence of noise
4.9 Autocorrelation functions of input and output signals 41
4.10 Cross correlation functions of output signals 42
4.11 Power spectral density of input and output signals 44
4.12 (a) PRBS signal and traces of output response of system 45
(b) forced by PRBS in the absence of noise
(c) without PRBS in the presence of noise
(d) forced by PRBS in the presence of noise
4.13 Autocorrelation functions of input and output signals 45
4.14 Cross correlation functions of output signals 46
4.15 Power spectral density of input and output signals 48
4.16 (a) PRBS signal and traces of output response of system 49
(b) forced by PRBS in the absence of noise
(c) without PRBS in the presence of noise
(d) forced by PRBS in the presence of noise
4.17 Autocorrelation functions of input and output signals 49
4.18 Cross correlation functions of output signals 50
4.19 Power spectral density of input and output signals 50
4.20 Dynamic Signal Analyzer (HP35670A DSA) 51
4.21 PRBS signal for MLS of N = 63 51
4.22 Autocorrelation function of PRBS signal for MLS of 52
N = 63
4.23 Power spectral density of PRBS signal for MLS of N = 63 52
xiii
4.24 Block diagram of PRBS testing 53
4.25 Schematic circuits for critically damped response 54
4.26 Output signal using PRBS signal 54
4.27 Autocorrelation function of output signal using PRBS 55
signal
4.28 Cross correlation function of output signal using PRBS 55
signal
4.29 Schematic circuits for underdamped response 56
4.30 Output signal using PRBS signal 57
4.31 Autocorrelation function of output signal using PRBS 58
signal
4.32 Cross correlation function of output signal using PRBS 58
signal
xiv
LIST OF ABBREVIATIONS
HAB – Hall Binary
LFSR – Linear feedback shift register
MLS – Maximum length sequence
PRBS – Pseudo random binary sequence
QRB – Quadratic residue binary
QRT – Quadratic residue ternary
TPB – Twin Prime Binary
xv
LIST OF APPENDICES
APPENDIX TITLE PAGE
A Computer Programs 65
B Datasheets 68
C Presentation Slide 89
CHAPTER 1
INTRODUCTION
1.1 Introduction
Pseudo random signal has been widely used for system identification (A.H.
Tan and K.R. Godfrey, 2002). Maximum length sequence (MLS) signals are the
known class of pseudo random signals (N. Zierler, 1959); because it can be easily
generated using feedback shift registers (A.H. Tan and K.R. Godfrey, 2002). There
are several other classes of binary and near-binary signal but are less well known
such as quadratic residue binary (QRB), Hall binary (HAB), Twin Prime binary
(TPB) and quadratic residue ternary (QRT).
1.2 Rational, Significance and Need for the Study
In the 1960’s and early 1970’s, there was a fairly large amount of research
into the design and application of pseudo random signals. Pseudo random binary
signals based on maximum length sequences are easy to generate using simple shift
register circuitry with appropriate feedback, and this has resulted in their
incorporation as a routine facility in a number of signal generators and their use in a
wide range of system dynamic testing (K.R. Godfrey, 1991).
It is important to study and generate PRBS because of the difficulty faced in
generating a truly random sequence. A PRBS is not a truly random sequence but
with long sequence lengths, it can show close resemblance to truly random signal
2
and furthermore it is sufficient for the test purposes. PRBS have well known
properties and the most important point is its generation is rather simple. Moreover,
knowing how a PRBS signal is generated make it is possible to predict the sequence.
Outermost it makes error that might occur in the sequence is possible to register and
count.
1.3 Research Objectives
There are four main objectives of this research, as stated below:
(i) To design and generate PRBS generator with different MLS using
MATLAB,
(ii) To design PRBS generator using hardware (Transistor-transistor
logic-TTL),
(iii) To analyze the characteristic of PRBS signal such as auto correlation
function, cross correlation function, and power spectral density using
MATLAB and dynamic signal analyzer,
(iv) To perform an experiment using real system where PRBS is the test
input.
1.4 Scope of project
This project emphasized on both software and hardware analysis. PRBS
generator with 15 different MLS (n=2, 3…, 16) were designed using MATLAB
(SIMULINK) software. The signals obtained were used as forcing function in
second order system. Four second order system responses were examined;
overdamped, critically damped, undamped and critically damped. For each category,
the response curves, autocorrelation function, cross correlation function and power
spectral density are observed for three different conditions; system forced by PRBS
signal in absence of noise, noisy system forced by PRBS signal and noisy system
without PRBS signal as forcing function. The autocorrelation function of the input
3
signal and cross correlation function between input and output signal were used to
estimate the transfer function model of the system.
Hardware analysis is done for the purpose of validation. PRBS generator was
constructed using TTL. PRBS signal generated was tested using dynamic signal
analyzer. An experiment using real second order system using PRBS as the test
input was performed. The autocorrelation function of the input signal and cross
correlation function between input and output signal were performed using Dynamic
Signal Analyzer. The correlograms of these two functions were used to determine the
transfer function model of the real second order system.
1.5 Project Outline
The preceding sections briefly summarized the contributions of the thesis.
This section outlines the structure of the thesis and summarizes each of the chapters.
Chapter 2 describes the relevant literature and previous work regarding PRBS
and its application in system identification. Overview of several classes of binary
and near binary signals such as MLS, QRB, HAB, TPB and QRT will be explore,
and characteristic of PRBS signal such as autocorrelation function, cross correlation
function and power spectral density will be explained.
Chapter 3 introduces method or approach taken in order to achieve the four
objectives set earlier in Chapter 1. This chapter describes the design for PRBS
generator for both approaches, software simulation using MATLAB SIMULINK and
hardware implementation using TTL.
Chapter 4 presents the results obtained from the simulation and experimental
work done. Analyses were done on the results. Experimental results obtained
validated the simulation result. Chapter 5 consists of conclusion and suggestions for
future improvement.
CHAPTER 2
LITERATURE REVIEW
2.1 Previous research
In the 1960’s and early 1970’s, there was a substantial amount of research
into the design and application of pseudo random signals (Godfrey, 1990). Periodic
signals have been widely used in the field of system identification. These signals can
be split into two main categories, computer – optimized signals and pseudo random
signals.
Periodic, multiharmonic test signals are extremely suitable for linear system
identification (Van Den Bos, 1993). There are many research are done on periodic,
multisine, multilevel multi harmonic signals.
Pseudo random binary signals based on MLS are widely used in system
dynamic testing and also incorporating as a routine facility in number of signal
generator because they are easy to generate using simple shift register (Godfrey,
1991). One research is done on generating pseudo random sequence longer than
maximum length sequence by subdividing the 1-stage shift register into two parts
and clocking each part at different speeds (Mouine and Boutin, 1998). There is
research done on other classes of binary and near – binary pseudo random signals
(Tan and Godfrey, 2002). Appropriately chosen pseudo random signals provide
highly acceptable alternatives to multisine signals in applications requiring uniform
power in the frequency spectrum (Godfrey, Barker and Tucker, 1999).
5
2.2 System Identification
System identification is a field of modeling dynamic systems form
experimental data (Sodestrom and Stoica, 1989). A dynamic system can be
described as in Figure 2.1, with u (t) is the input variable, v (t) is the disturbance and
y (t) is the output signal. The output signal is a variable provides useful information
about the system.
Figure 2.1 Dynamic system
There are two ways of constructing mathematical models:
(i) Mathematical modeling
Mathematical modeling is an analytic approach. In order to describe the
dynamic behavior of the process, basic laws from physics are used. For
example, balance equations are used in stirred tank modeling.
(ii) System identification
System identification is an experimental approach. This approach requires
some experiments to be performed on the system. Then, a model is fitted to
the recorded data by assigning suitable numerical values to its parameters.
In many cases where a complex processes involved, mathematical model
cannot be used. In such cases, only identification technique can be applied. System
identification usually applied when a model based on physical insight contains a
number of unknown parameters (even though the structure is derived from some
physical laws). Identification methods can be applied to estimate unknown
parameters.
Disturbancev (t)
Outputy (t)
Inputu (t)
System
6
The models obtained by system identification have the following properties
(Sodestrom and Stoica, 1989):
(i) Limited validity (valid for certain working point, certain type of input, certain
process, etc.)
(ii) Little physical insight
(iii) Easy to construct and use
Without interaction from the user, identification cannot be used. The reasons
for this include:
(i) Appropriate model must be found
(ii) No perfect data in real life
(iii) Process may vary with time, which can cause problems if an attempt is made
to describe it with a time-invariant model
(iv) May be difficult to measure some variables or signal which are important for
the model
An identification experiment is performed by exciting the system using some
input signal (such as step, sinusoid or random signal) and its input and output is
observed over a time interval. These signals are recorded. Then a parametric model
is choosing in order to fit the recorded signals. In order to do this, the first step to be
taken is to determine an appropriate form of the model. Then, the second step is to
estimate the unknown parameters of the model. Finally, the model is tested to check
whether it is an appropriate representation of the system. The summary of
identification experiment is shown in Figure 2.2.
7
Modelaccepted?
Modelvalidation
ChoosemethodEstimate
parameters
Determine/choose model
structure
PerformexperimentCollect data
Design ofexperiment
Start
End
A prioriknowledgePlanned useof the model
New data set
YES
NO
Figure 2.2 Schematic flowchart of system identification
2.3 Input signal
The input signal used in an identification experiment can have a significant
influence on the resulting parameter estimates (Sodestrom and Stoica, 1989).
Traditional experiment procedures involve subjecting the system to input signals
8
such as step, ramp, impulse or sinusoidal input. These types of inputs have simple
analysis of the output response curves.
The advantages of these input signals are:
(i) Ease of signal generation
(ii) Ease of analysis
(iii) The physical understanding of system response which result
The only disadvantage of these input signals is it is not practical because of
limitations imposed by the existence of system noise.
A PRBS signal is a popular input signal for system identification because it is
persistently exciting to the order of the period of the signal. A maximum length
PRBS signal has a correlation function that resembles a white noise correlation
function. This property does not hold for non-maximum length sequences. Thus the
PRBS signal used in identification processes should be a maximum length PRBS
signal. The maximum possible period for a maximum length sequence is N = 2n - 1
where n is the order of the PRBS.
2.4 Types of PRBS
There are several types of PRBS such as MLS, QRB, HAB, TPB and QRT.
In this research, MLS will be used in designing the PRBS generator due to its
simplicity in construction.
2.4.1 MLS signals
MLS signals exist for N = 2n – 1 (Zapernick and Finger, 2005), where n is an
integer > 1, that is N = 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047, etc. They can be
generated in hardware using shift registers consisting of n stages (Tan and Godfrey,
2002).
9
MLS is one of the most important classes of pseudo random binary sequence.
It has excellent pseudo randomness properties and fulfills all randomness criteria
[Section 2.7].
2.4.2 QRB signals
QRB signals exist for N = 4k – 1, where k is an integer and N is prime
(Zapernick and Finger, 2005), that is N = 3, 7, 11, 19, 23, 31, 43, 47, 59, 67, 71, 79,
etc. The sequence rx , Nr ,,2,1 is formed from the rule (Tan and Godfrey,
2002)
otherwise1
modulosquare,aisif1
r
r
x
Nrx
1or1 Nx
2.4.3 HAB signals
HAB signals exists for periods N = 4k2 + 27, where k is an integer and N is
prime (Zapernick and Finger, 2005), that is N = 31, 43, 127, 223, 283, 811, 1051,
1471, 1627, etc. A primitive root u of N is first chosen. These sequence is formed
from the rule that (Tan and Godfrey, 2002)
6)(modulo3or1,0where
modulo,if1
t
Nurx tr
otherwise1rx
10
2.4.4 TPB signals
TPB signals exist for N = k (k + 2), where k and k + 2 are both prime
(Zapernick and Finger, 2005), that is N = 15, 35, 143, 323, 899, 1763, 3599, 5283,
etc. First, QRB sequences are generated for lengths k and k + 2; these sequences are
denoted by ra and rb respectively [1]. Then the TPB sequence rx is defined
by (Tan and Godfrey, 2002)
2)(kmodulo0but
k,modulo0if1
2)k(modulo0if1
2)k(moduloorkmodulo,0for
r
rx
rx
rbax
r
r
rrr
2.4.5 QRT signals
QRT signals exist for N = 4k ± 1 (Zapernick and Finger, 2005), where k is an
integer and N is prime, that is N = 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, etc.
This class of pseudorandom signals has a large number of possible values of N.
They are generated using the same formula as for QRB signal except that Nx is set to
0, resulting in a ternary signal with (N – 1) / 2 elements + 1, (N – 1) / 2 elements – 1,
and one element zero (Tan and Godfrey, 2002).
The autocorrelation function of a QRT signal is nearly identical to that of
MLS signal, and for a QRT signal with signal levels – 1, 0, and + 1, the on – peak
value of the autocorrelation is (N – 1) / N and the off – peak value is – 1 / N.
2.5 Linear feedback shift register (LFSR)
Length of MLS is given by 12 nN where n is an integer (i.e. N +15, 31,
63, 127, 255…). MLS can be generated by an n stage shift register with the first
11
stage determined by feedback of the appropriate modulo two sum of the last stage
and one or two earlier stage. This structure is usually called LFSR and its general
structure is shown in Figure 2.3.
+
Flip flops
Modulo 2 addition
second)teverycontentsshift(topulseClock
Figure 2.3 LFSR
2.6 Feedback configuration
The logic contents of the shift register are moved one stage to the right every
∆t seconds by simultaneous triggering by a clock pulse. All possible states of the
shift register are passed through except that of all zeros. The output can be taken
from any stage and is a serial sequence of logic states having cyclic period N ∆t. If
feedback is taken from the modulo 2 sum of the wrong register stages, then the
resulting cyclic sequence has length less than the maximum length, and will not be
suitable.
The correct stages the most commonly used lengths are shown in Table 2.1.
12
Table 2.1 Feedback configuration of LFSR
No. n N = 2n – 1 Feedback
1 2 3 2, 1
2 3 7 3, 1
3 4 15 1, 4 / 3, 4
4 5 31 2, 5 / 3, 5
5 6 63 1, 6 / 5, 6
6 7 127 1, 7 / 4, 7
7 8 255 2, 3, 4, 8
8 9 511 4, 9 / 5, 9
9 10 1023 3, 10
10 11 2047 2, 11
11 12 4095 1, 2, 10, 12
12 13 8191 1, 2, 12, 13
13 14 16383 1, 2, 12, 14
14 15 32767 1, 15
15 16 65535 2, 3, 5, 16
2.7 Properties of PRBS
MLS is one of the most important classes of pseudo random binary sequence.
It has excellent pseudo randomness properties and fulfills all randomness criteria
below (Zapernick and Finger, 2005):
(i) Balance property,
In each period of random sequence the number of logic zeros should not
differ from the number of logic ones by at most one.
(ii) Run property,
Let a run refer to a string of consecutive ones. The 0-runs and 1-runs
alternate with equally many 0-runs and 1-runs of the same length. The
lengths of runs in each period are distributed such that one-half the runs are
13
of length 1, one-quarter the runs are of length 2, one-eight the runs are of
length 3, etc.
(iii) Correlation property
If a period of the random sequence is compared term by term with any cyclic
shift of itself, then the number of agreements and disagreements should not
differ by more than one.
2.7.1 Modulo-2
Modulo 2 addition is the logic function “exclusive or”. In “exclusive or”
operation, if the inputs are the same, the output is logic 0; if the inputs are different,
the output is logic 1. Table 2.2 illustrates the “exclusive or” operation.
Table 2.2 “Exclusive or” operation
Inputs Output
A B Q
0 0 0
0 1 1
1 0 1
1 1 0
2.7.2 Correlation
A non – deterministic signal cannot be defined by means of an explicit
function of time but must instead be described in some probabilistic manner. Term
correlation functions are used to describe the appropriate statistical descriptions for
the signals when undertaking system identification with non – deterministic forcing
functions and carrying out the analysis in the time domain.
14
The correlation of two random variables is the expected value of their
product; showing the dependency of one variable with another. A high correlation
might be expected when the two time instants are very close together, but much less
correlation when the time instants are widely separated.
If the random variables come from the same signal the function is called an
autocorrelation function. If the random variables come from the different signal the
function is called a cross correlation function.
2.7.2.1 Autocorrelation Function
The autocorrelation function of a signal x(t) is given the symbol )(xx and is
defined as,
)(signalofntdisplacemeis)(and)(
where
)()(2
1lim)(
)()(2
1lim)(
xx
xx
txtxtx
dttxtxT
or
dttxtxT
T
TT
T
TT
)(xx is the time average of the product of the value of the function
seconds apart as is allowed to vary from zero to some large value, the averaging
being carried out over a long period 2T.
Some of the properties of autocorrelation function )(xx of a signal x(t) are
outlined below:
(i) The autocorrelation function is an even function of , i.e. )()( xxxx ,
because the same set of product values is averaged regardless of the direction
of translation in time.
(ii) )0(xx is the mean square value, or average power of x(t).
15
(iii) )0(xx is the largest value of autocorrelation function, but if x(t) is periodic,
then )(xx will have the same maximum value when is an integer
multiple of the period.
(iv) If x(t) has a d.c. component or mean value, then )(xx also has a d.c.
component, the square of the mean value.
(v) If x(t) has a periodic component, then )(xx also has a component with the
same period, but with a distorted shape resulting from the lack of
discrimination between differing phase relationship of the constituent
sinusoidal components.
(vi) If x(t) has only random components, 0)(xx as .
(vii) A given autocorrelation function may correspond to many time functions, but
any one time function has only one autocorrelation function.
For PRBS, first value is considered at tk where k is an integer. Let value
of the sequence for successive intervals ∆t to be N)x(3),...x(x(2),x(1), . The
autocorrelation function of PRBS is
N
j
kjxjxN
k1
xx )()(1
)(
)digitsdifferingofnumber-digitsmatchingofnumber()(2
xx N
ak
0if
0if)(
2
2
xx
ka
kN
ak
It can be shown by considering area changes that autocorrelation function is
linear between these points. Hence the form of the autocorrelation function is as
shown in Figure 2.4.
16
N
a2
tNtt
2a
)(xx k
Figure 2.4 Autocorrelation function of PRBS signal
As 0t and N becomes large the autocorrelation function tends closer to that of
true periodic white noise as shown in Figure 2.5.
shifttime
)(xx
Figure 2.5 Autocorrelation function of periodic white noise
2.7.2.2 Cross Correlation Function
Process of comparing one signal with another by multiplication of
corresponding instantaneous values and taking the average is called cross correlation
function. Cross correlation function is a graph of the value of the coefficient against
parametric time shift. Cross correlation function is a measure of the similarity
between two different signals.
17
Frequently, there exist two signals x(t) and y(t) which are not completely
independent. Cross correlation function is a measure of dependence of one signal on
the other. Cross correlation function is defined as,
lyrespective)(and)(signalofntsdisplacemeare)(and)(
where
)()(2
1lim)(
)()(2
1lim)(
xy
xy
txtytxty
dttxtyT
or
dttytxT
T
TT
T
TT
2.7.3 Power Spectral Density
It is convenient to describe the signals in terms of frequency domain
characteristics. The function used is the power density spectrum or Power spectral
density )(xx which is the Fourier transform of the autocorrelation function:
functionationautocorrelis)(
where
)()(xx
xx
jxx de
The power spectrum of a PRBS is shown in Figure 2.6. The difference
between a true random signal and that of maximal length PRBS, is that the spectrum
of the true random signal is continuous, while that of a PRBS is discrete. But by
choosing a PRBS with a long period, close resemblance to a true random signal can
be obtained. This property makes PRBS ideal as test signals.
18
tN
2
t3
2 t
2
t
4
)1
(2
N
Nta
)(xx
3dB
Figure 2.6 Power spectral density of PRBS signal
2.8 Summary
A PRBS is a random bit sequence that repeats itself. The properties of PRBS
hold, together with the simple generation and acquisition scheme makes them ideal
for test purposes. If the sequence length of a PRBS is chosen long enough, the
power spectrum of the sequence will show very close resemblance to that of a truly
random sequence.
CHAPTER 3
METHODOLOGY
3.1 Introduction
This chapter illustrates the approaches taken to fulfill the objectives set for
this project. The approaches are divided into two main parts. The first part is the
design procedure for software analysis, and the second part is the design procedure
for hardware analysis. There is an additional part on the procedures to obtain a
transfer function from correlograms of autocorrelation and cross correlation for both
software and hardware analysis.
3.2 Software analysis
Software used in this project is MATLAB SIMULINK. There are two sub
topics describe in this part; PRBS generator circuit and PRBS signal as test signal to
a second order system.
3.2.1 PRBS generator
PRBS generator circuit consists of few stages of flip-flops depends on the
maximum length sequence chosen, a feedback circuit, and a clocking circuitry. By
using MATLAB SIMULINK block sets, the block diagram of PRBS generator is
shown in Figure 3.1.
20
Figure 3.1 SIMULINK block diagram of PRBS generator circuit for MLS of N = 15
From Figure 3.1, for maximum length sequence of N = 15, the first stage of
shift register is determined by feedback of the appropriate modulo two sum of the
last stage and one earlier stage. Modulo two sum is represents by the logic function
‘exclusive or’. The logic contents of the shift register are moved one stage to the
right every t seconds by simultaneous triggering by a clock pulse. The output can
be taken from any stage and is a serial sequence of logic states having cyclic period
tN .
3.2.2 PRBS signal as test signal to second order system
PRBS signal is used as test signal or forcing function in a second order
system. There are four systems being examined; critically damped, overdamped,
underdamped and undamped. The transfer function and the corresponding damping
ratios for these systems are shown in Table 3.1.
21
Table 3.1 Second order system being identified
No. Type of second order system Damping ratio, ξ Transfer function
1 Critically damped ξ = 1
96
92 ss
2 Underdamped 0 < ξ < 1
92
92 ss
3 Overdamped ξ > 1
99
92 ss
4 Undamped ξ = 0
9
92 s
For overdamped response,
)146.1)(854.7(
9
)99(
9)(
2
sssssssC
This response has a pole at the origin that comes from the unit step input and
two real poles that come from the system. The input pole at the origin generates the
constant forced response; each of the two system poles on the real axis generates an
exponential natural response whose exponential frequency is equal to the pole
location. This response is called overdamped.
For underdamped response,
)81)(81(
9
)92(
9)(
2jsjsssss
sC
This function has a pole at the origin that comes from the unit step input and
two complex poles that come from the system. The real part of the system pole
generates exponentially decaying amplitude while the imaginary part of the system
pole generates sinusoidal waveform. The time constant of the exponential decay is
equal to the reciprocal of the real part of the system pole. The value of the imaginary
part is the actual frequency of the sinusoid. This sinusoidal frequency is given by the
name damped frequency of oscillation, d . Finally, the steady-state response (unit
step) was generated by the input pole located at the origin. This type of response is
22
called an underdamped response, one which approaches a steady-state value via a
transient response that is a damped oscillation.
For undamped response,
)3)(3(
9
)9(
9)(
2 jsjsssssC
This function has a pole at the origin that comes from the unit step input and
two imaginary poles that come from the system. The input pole at the origin
generates the constant forced response, and the two system poles on the imaginary
axis at 3j generate a sinusoidal natural response whose frequency is equal to the
location of the imaginary poles. This type of response is called undamped. The
absence of a real part in the pole pair corresponds to an exponential that does not
decay.
For critically damped response,
)3)(3(
9
)96(
9)(
2
sssssssC
This function has a pole at the origin that comes from the unit step input and
two multiple real poles that come from the system. The input pole at the origin
generates the constant forced response, and the two poles on the real axis at -3
generate a natural response consisting of an exponential and an exponential
multiplied by time, where the exponential frequency is equal to the location of the
real poles. This type of response is called critically damped. Critically damped
responses are the fastest possible without the overshoot that is characteristic of the
undamped response.
The SIMULINK block diagrams for each type of second order systems are
shown in Figure 3.2 to Figure 3.5.
23
Fig
ure
3.2
Blo
ckdia
gra
mof
syst
em(c
riti
call
ydam
ped
)bei
ng
iden
tifi
ed
24
Fig
ure
3.3
Blo
ckdia
gra
mof
syst
em(o
ver
dam
ped
)bei
ng
iden
tifi
ed
25
Fig
ure
3.4
Blo
ckdia
gra
mof
syst
em(u
nder
dam
ped
)bei
ng
iden
tifi
ed
26
Fig
ure
3.5
Blo
ckdia
gra
mof
syst
em(u
ndam
ped
)bei
ng
iden
tifi
ed
27
3.3 Hardware analysis
Hardware analysis is divided into two; PRBS generator circuit using
transistor – transistor logic and PRBS signal as the test input for a second order
system. A simple second order RC low pass filter is designed for test purposes.
3.3.1 PRBS generator
PRBS generator circuit consists of four main circuits; supply voltage, clock
circuit, feedback circuit, and PRBS generator circuit. Supply voltage of 5V is
required to supply the clock circuit, feedback circuit and shift register circuit. The
overall block diagram for PRBS generator is shown in Figure 3.6.
Figure 3.6 Block diagram of PRBS generator circuit
3.3.1.1 Clock circuit
Clock circuit consists of a basic oscillator circuit using LM555 timer chip.
The circuit diagram for clock circuit is as shown in Figure 3.7. List of components
used to construct the clock circuit is as shown in Table 3.2.
Supply voltage
Shift RegisterClock circuit
Feedback circuit
PRBS Signal
28
Table 3.2 List of components for clock circuit
No. Description Quantity
1 IC LM555 Timer 1
2 Resistor 2 k 1
3 Resistor 10 k 1
4 Resistor 47 k 1
5 Resistor 47 k 1
6 Capacitor 10 ηF 1
7 Capacitor 100 ηF 1
8 IC 7805 regulator 1
R12.0kR2
47k
R3470k
C1100nF C2
10nF
R410k
555
NET_8
2
3
4 5
1
7
8
65
2
7
6
9
3
4
Figure 3.7 Clock circuitry
The output for this clock circuitry is clock pulses of frequency 15Hz. To
calculate the frequency:
Hzf
Fkkf
CRRf
15
1.0)470247(693.0
1
)221(693.0
1
29
3.3.1.2 Feedback circuit
Feedback circuit is used to determine different maximum length sequence of
the PRBS signal. Different maximum length sequence has different feedback
configuration. Feedback circuit consist of IC 74LS86 (EX-OR).
3.3.1.3 Shift register circuit
The first stage of shift register is determined by the feedback circuit. The
output can be taken from any stage of the shift register. List of components used to
construct the shift register circuit is as shown in Table 3.3.
Table 3.3 List of components for shift register circuit
No. Description Quantity
1 IC 74LS112 (J – K flip flop) 8
2 IC 74LS04 (Inverter flip – flop) 1
3 Light Emitting Diode (Red) 16
4 IC 7805 regulator 1
Block diagram of PRBS generator circuit is shown in Figure 3.8.
30
U1A
74LS
112D
1Q
5
~1Q
6
~1PR4
1K
2
~1CLR
15
1J
3
1CLK
1
U1B
74LS
112D
1Q
5
~1Q
6
~1PR4
1K
2
~1CLR
15
1J
3
1CLK
1
U2A
74LS
112D
1Q
5
~1Q
6
~1PR4
1K
2
~1CLR
15
1J
3
1CLK
1
U2B
74LS
112D
1Q
5
~1Q
6
~1PR4
1K
2
~1CLR
15
1J
3
1CLK
1
U3A
74LS
112D
1Q
5
~1Q
6
~1PR4
1K
2
~1CLR
15
1J
3
1CLK
1
U3B
74LS
112D
1Q
5
~1Q
6
~1PR4
1K
2
~1CLR
15
1J
3
1CLK
1
U4A
74LS
112D
1Q
5
~1Q
6
~1PR4
1K
2
~1CLR
15
1J
3
1CLK
1
U4B
74LS
112D
1Q
5
~1Q
6
~1PR4
1K
2
~1CLR
15
1J
3
1CLK
1
24
6
7
12
13
14
U5A
74LS
04D
15
U6A
74LS
86D
U6B
74LS
86D
U6C
74LS
86D
21
3
5
17
20
18
1
19
11
10
9
VC
C
5V
VCC
V1
10
Hz
2V
22
Fig
ure
3.8
Blo
ckdia
gra
mof
PR
BS
gen
erat
or
for
ML
Sof
N=
255
31
3.3.2 PRBS signal as test signal to second order system
The second order system used as unknown system in the hardware
implementation of PRBS signal as test signal is shown in Figure 3.9. It is actually an
RC low pass filter circuit.
Figure 3.9 Second order RC circuit
List of components used to construct the second order RC low pass filter
circuit is as shown in Table 3.4. The values for each components in the second order
RC circuit are R1 = R2 = 470 k, R3 = 4.7 k, C1 = C2 = 0.1 μF and R4 is a
potentiometer of 10 k. Value of R4 is varies according to type of second order
system being tested.
Table 3.4 List of components for RC low pass filter circuit
No. Description Quantity
1 IC LM741 (Op – amp) 1
2 Resistor 470 k 2
3 Resistor 4.7 k 1
4 Potentiometer 10 k 1
5 Capacitor 0.1 μF 2
R2R1
C1
C2
R3
R4
VOUT
VIN
32
The transfer function for the above second order system is:
21
21
1
311
4
11
22
21
21
1
)(
CRs
RCR
R
CRs
CRsT
Potentiometer values determined type of second order system of the RC
second order system. The transfer function obtained for different set of
potentiometer values are shown in Table 3.5. According to these values, testing on
different types of second order systems was performed.
Table 3.5 RC low pass filter second order system transfer function
No. Type of second order system Potentiometer (R4) value Transfer function
1 Critically damped R4 = 0
7.4526.42
7.4522 ss
2 Underdamped 0 < R4 < 9.4 k
R4 = 5 k 7.4529.19
7.4522 ss
3 Overdamped R4 < 0 -
4 Undamped R4 = 9.4 k
7.452
7.4522 s
It is shown from Table 3.5; the calculated value for R4 to obtain the
overdamped response is less than 0. So, this type of response is rule out since it is
impossible to be implemented using the proposed RC low pass filter circuit.
CHAPTER 4
RESULT
4.1 Introduction
This chapter discuss on the results obtained in both software and hardware
analysis. In the software analysis, the PRBS generator and its application as test
input to a second order system were examined. For the hardware analysis, PRBS
signal obtained and it is used as test input to a second order system were elaborated.
4.2 PRBS signal (Simulation result)
PRBS signal obtained from the simulation analysis is studied. The
autocorrelation and power spectral density of the PRBS signal are observed. These
results were confirmed with the theory.
PRBS signal is successfully generated. The sequence / pattern will be
repeated after a complete cycle of N value. The PRBS signal, autocorrelation
function and power spectral density of three different maximum length sequences are
shown in Figure 4.1 to Figure 4.3.
34
Figure 4.1 (a) Clock signal, (b) PRBS signal, (c) Autocorrelation function, and (d)
Power spectral density for MLS of N = 15
Figure 4.1 shows the PRBS signal, autocorrelation function and power
spectral density for a four stage shift register with feedback from stages 1 and 4. The
successive states of the shift register, starting all ones, are:
Table 4.1 Successive states of shift register
Stage
1 1 0 1 0 1 1 0 0 1 0 0 0 1 1 1 1
2 1 1 0 1 0 1 1 0 0 1 0 0 0 1 1 1
3 1 1 1 0 1 0 1 1 0 0 1 0 0 0 1 1
4 1 1 1 1 0 1 0 1 1 0 0 1 0 0 0 1
and
the
pattern
repeats
Hence, the sequence length is 15, which is 2n – 1 with n = 4. The three
properties of randomness when applied to the full 15 bit sequence are:
(a) Balance property:
Number of ones = 8
Number of zeros = 7
Difference = 1
35
(b) Run property:
Length of run 1 2 3 4
Number of runs 4 2 1 1
Actual ratio 84
82
81
81
Ideal ratio 21
41
81
161
(c) Correlation property:
Compare stages 1 and 4, say
Number of agreements = 7
Number of disagreements = 8
Difference = 1
From the analysis above, the PRBS signal generated satisfy all three
conditions of randomness.
Figure 4.2 (a) Clock signal, (b) PRBS signal, (c) Autocorrelation function, and (d)
Power spectral density for MLS of N = 63
36
Figure 4.3 (a) Clock signal, (b) PRBS signal, (c) Autocorrelation function, and (d)
Power spectral density for MLS of N = 255
From Figure 4.1 to Figure 4.3, it can be shown that the average power or
mean square value of PRBS signal is at t = 0 second. During this time also the
autocorrelation function value is at the largest value, and because it is periodic, the
same maximum value of autocorrelation function will be obtained at τ, where τ is an
integer multiple of the period.
Power spectral density of PRBS signal is a line spectrum and not a
continuous spectrum (shown in Figure 4.1 to Figure 4.3). The lowest frequency
component in the PRBS signal is that corresponding to the period, 2 π / (N Δ t)
radians / second, and all other frequencies present are integer multiples of this value.
4.3 PRBS signal as forcing function in a second order system (Simulation
result)
There are four responses of second order system examined in this project;
they are underdamped, critically damped, undamped and overdamped response. All
the responses are analyzed in terms of the autocorrelation function, cross correlation
function and finally power spectral density.
37
4.3.1 Critically damped response
Figure 4.4a shows the form of PRBS input and Figure 4.4b shows the
resulting system output in the absence of noise. Figure 4.4c shows a typical sample
trace of the output response of the system in the presence of noise. The response of
the system to the PRBS signal in the presence of noise is shown in Figure 4.4d. A
clear difference can be seen between this and the normal noise output shown in
Figure 4.4c and this response curve show close resemblance of output response of
system forced by PRBS in the absence of noise.
Figure 4.4 (a) PRBS signal and traces of output response of system (b) forced by
PRBS in the absence of noise (c) without PRBS in the presence of noise (d) forced
by PRBS in the presence of noise
Auto correlation functions of input and output signals are shown in Figure
4.5.
38
Figure 4.5 Autocorrelation functions of input and output signals
The autocorrelation function of PRBS signal has the form theoretically
expected, whilst that of the system output in the absence of noise shows a reduction
in signal power to somewhat less than a quarter of the input power. The
autocorrelation function of the noise signal forced by PRBS input shows that there is
a significant component of the signal which approximates to white noise, show an
increased in signal power compared to system in the absence of noise. The
autocorrelation function of noisy system in absence of PRBS input shows a reduction
in signal power to almost a quarter of the input power.
Cross correlation functions of output signals are shown in Figure 4.6.
Figure 4.6 Cross correlation functions of output signals
From the cross correlation function and autocorrelation function graphs,
model parameter can be calculated using the following steps:
39
(a) The height of autocorrelation triangle shown in Figure 4.5 is V2 = 1V and
the bit interval is 0.1s. The impulse strength is V2 times the bit interval
which evaluates to 1 × 0.1s = 0.1 Vs.
(b) The response appears to be a combination of rise and decay wave. The
general form is )( tt eeA . This response curve is difficult to analyze
using correlation technique. It is easier by using frequency response
method.
(c) The time constant to be 0.7040s (decay) and 0.1908s (rise). So, 42.1
and 24.5 .
(d) A is obtained from value of peak height, 276.0A .
(e) Divide by the unit impulse response, )(76.2)( 24.542.1 tt eetf .
(f)44.766.6
54.10
24.5
76.2
42.1
76.2)(
2
sssssF
The chosen time interval, st 1.0 used in the simulation gives adequate
approximation to white noise for this system. The period of 6.3s correctly exceeds
the system settling time. This shows that the sequence of N = 31 could have been
used instead. Table 4.2 shows the transfer function obtained using several different
PRBS maximum length.
It is shown from Table 4.2 that the transfer function obtained is not very close
to the actual transfer function used in the simulation. This is due to the difficulty in
obtaining the correct transfer function using correlation technique for a cross
correlation function graph which does not yield a good approximation to an impulse
response (decaying sine wave).
Power spectral density curves of input and output signals are shown in Figure
4.7. It can be shown in this figure that the systems with PRBS input, almost the
entire power of the output signals are contained in the frequency range of 1 to 10Hz.
The power spectral density curve for PRBS input shows that over this frequency
range, the PRBS input has a substantially constant power spectral density values.
This has confirms that st 1.0 used in this simulation gives an excitation signal
which is good approximation to true white noise for the system tested.
40
Table 4.2 Transfer function for several different PRBS maximum length
Length, N Transfer function
63
44.766.6
54.102 ss
255
00.694.5
21.92 ss
1023
17.941.7
10.112 ss
Average transfer function model using 3 different length of PRBS
54.767.6
18.102 ss
Figure 4.7 Power spectral density of input and output signals
4.3.2 Underdamped response
Figure 4.8a shows the form of PRBS input and Figure 4.8b shows the
resulting system output in the absence of noise. Figure 4.8c shows a typical sample
trace of the output response of the system in the presence of noise. The response of
the system to the PRBS signal in the presence of noise is shown in Figure 4.8d. A
clear difference can be seen between this and the normal noise output shown in
Figure 4.8c and this response curve show close resemblance of output response of
system forced by PRBS in the absence of noise.
41
Figure 4.8 (a) PRBS signal and traces of output response of system (b) forced by
PRBS in the absence of noise (c) without PRBS in the presence of noise (d) forced
by PRBS in the presence of noise
Auto correlation functions of input and output signals are shown in Figure
4.9.
Figure 4.9 Autocorrelation functions of input and output signals
The autocorrelation function of PRBS signal has the form theoretically
expected, whilst that of the system output in the absence of noise shows a reduction
in signal power to somewhat equal to a quarter of the input power. The
autocorrelation function of the noise signal forced by PRBS input shows an increase
in signal power to somewhat half of the input power. The autocorrelation function of
42
noisy system in absence of PRBS input shows a reduction in signal power to less
than a quarter of input power.
Cross correlation functions of output signals are shown in Figure 4.10.
Figure 4.10 Cross correlation functions of output signals
From the cross correlation function and autocorrelation function graphs,
model parameter can be calculated using the following steps:
(a) The height of autocorrelation triangle shown in Figure 4.9 is V2 = 1V and
the bit interval is 0.1s. The impulse strength is V2 times the bit interval
which evaluates to 1 × 0.1s = 0.1 Vs.
(b) The response appears to be a decaying sine wave. The general form is
tAe t sin . This response yields a good approximation to impulse
response.
(c) ω is obtained from cycle time, rad/s73.23.2
2
(d) α is obtained from peak decay ratio, 9787.02009.0
06518.0ln
3.2
2
.
(e) A is obtained from the first peak height, 312.0A
(f) Divide by the unit impulse response, tetf t 73.2sin12.3)( 9787.0 .
(g)41.896.1
52.8
73.2)9787.0(
)73.2(12.3)(
222
ssssF
43
The chosen time interval, st 1.0 used in the simulation gives adequate
approximation to white noise for this system. The period of 6.3s correctly exceeds
the system settling time. This shows that the sequence of N = 31 could have been
used instead. Table 4.3 shows the transfer function obtained using several different
PRBS maximum length. It is shown from this table that the transfer function
obtained is closed to the actual transfer function used in the simulation. This is due
to the cross correlation function graph yield a good approximation to impulse
response and thus easier to analyze using correlation technique.
Power spectral density curves of input and output signals are shown in Figure
4.11. It can be shown in this figure that the systems with PRBS input, almost the
entire power of the output signals are contained in the frequency range of 1 to 5Hz.
The power spectral density curve for PRBS input shows that over this frequency
range, the PRBS input has a substantially constant power spectral density values.
This has confirms that st 1.0 used in this simulation gives an excitation signal
which is good approximation to true white noise for the system tested.
Table 4.3 Transfer function for several different PRBS maximum length
Length, N Transfer function
63
41.896.1
52.82 ss
255
68.887.1
04.92 ss
1023
39.894.1
60.82 ss
Average transfer function model using 3 different length of PRBS
49.892.1
72.82 ss
44
Figure 4.11 Power spectral density of input and output signals
4.3.3 Overdamped response
Figure 4.12a shows the form of PRBS input and Figure 4.12b shows the
resulting system output in the absence of noise. Figure 4.12c shows a typical sample
trace of the output response of the system in the presence of noise. The response of
the system to the PRBS signal in the presence of noise is shown in Figure 4.12d. A
clear difference can be seen between this and the normal noise output shown in
Figure 4.12c and this response curve show close resemblance of output response of
system forced by PRBS in the absence of noise.
The autocorrelation function of PRBS signal shown in Figure 4.13 has the
form theoretically expected, whilst that all of the system outputs show a reduction in
signal power to somewhat less than a quarter of the input power.
45
Figure 4.12 (a) PRBS signal and traces of output response of system (b) forced by
PRBS in the absence of noise (c) without PRBS in the presence of noise (d) forced
by PRBS in the presence of noise
Figure 4.13 Autocorrelation functions of input and output signals
Cross correlation functions of output signals are shown in Figure 4.14.
46
Figure 4.14 Cross correlation functions of output signals
From the cross correlation function and autocorrelation function graphs,
model parameter can be calculated using the following steps:
(a) The height of autocorrelation triangle shown in Figure 4.13 is V2 = 1V
and the bit interval is 0.1s. The impulse strength is V2 times the bit
interval which evaluates to 1 × 0.1s = 0.1 Vs.
(b) The response appears to be a combination of rise and decay wave. The
general form is )( tt eeA . This response curve is difficult to analyze
using correlation technique. It is easier by using frequency response
method.
(c) The time constant to be 0.8200s (decay) and 0.1640s (rise). So,
2195.1 and 0976.6 .
(d) A is obtained from value of peak height, 1680.0A .
(e) Divide by the unit impulse response, )(68.1)( 0976.62195.1 tt eetf .
(f)44.732.7
20.8
0976.6
68.1
2195.1
68.1)(
2
sssssF
The chosen time interval, st 1.0 used in the simulation gives adequate
approximation to white noise for this system. The period of 6.3s correctly exceeds
the system settling time. This shows that the sequence of N = 31 could have been
used instead. Table 4.4 shows the transfer function obtained using several different
PRBS maximum length.
47
Table 4.4 Transfer function for several different PRBS maximum length
Length, N Transfer function
63
44.732.7
20.82 ss
255
79.582.6
13.72 ss
1023
25.615.7
16.72 ss
Average transfer function model using 3 different length of PRBS
49.610.7
50.72 ss
It is shown from Table 4.4 that the transfer function obtained is not very close
to the actual transfer function used in the simulation. This is due to the difficulty in
obtaining the correct transfer function using correlation technique for a cross
correlation function graph which does not yield a good approximation to an impulse
response (decaying sine wave).
Power spectral density curves of input and output signals are shown in Figure
4.15. It can be shown in this figure that the systems with PRBS input, almost the
entire power of the output signals are contained in the frequency range of 1 to 5Hz.
The power spectral density curve for PRBS input shows that over this frequency
range, the PRBS input has a substantially constant power spectral density values.
This has confirms that st 1.0 used in this simulation gives an excitation signal
which is good approximation to true white noise for the system tested.
48
Figure 4.15 Power spectral density of input and output signals
4.3.4 Undamped response
Figure 4.16a shows the form of PRBS input and Figure 4.16b shows the
resulting system output in the absence of noise. Figure 4.16c shows a typical sample
trace of the output response of the system in the presence of noise. The response of
the system to the PRBS signal in the presence of noise is shown in Figure 4.16d. A
clear difference can be seen between this and the normal noise output shown in
Figure 4.16c and this response curve show close resemblance of output response of
system forced by PRBS in the absence of noise.
Figure 4.17 shows there is a fluctuation of large signal power in the system
outputs forced by PRBS input in the presence and absence of noise. The
autocorrelation function of PRBS input and noisy system in absence of PRBS input
shows a very small signal power compared to the system output forced by PRBS
input in the presence and absence of noise.
49
Figure 4.16 (a) PRBS signal and traces of output response of system (b) forced by
PRBS in the absence of noise (c) without PRBS in the presence of noise (d) forced
by PRBS in the presence of noise
Figure 4.17 Autocorrelation functions of input and output signals
Cross correlation functions of output signals are shown in Figure 4.18. The
analysis of the cross correlation function graph is difficult to perform since the
response does not yield a good approximation to an impulse response (decaying sine
wave).
50
Figure 4.18 Cross correlation functions of output signals
Power spectral density curves of input and output signals are shown in Figure
4.19.
Figure 4.19 Power spectral density of input and output signals
It can be observed that that the systems with PRBS input, almost the entire
power of the output signals are contained in the frequency range of 2 to 4Hz. The
power spectral density curve for PRBS input shows that over this frequency range,
the PRBS input has a low power spectral density values. This is not good since most
of the entire power of the output signal does not contain within power spectral
density curve for PRBS input.
51
4.4 PRBS signal (Hardware result)
PRBS signal, autocorrelation function and power spectral density is analyze
using Dynamic Signal Analyzer (HP35670A DSA). HP35670A DSA is shown in
Figure 4.20. About 512 data of the PRBS signal, autocorrelation function and power
spectral density are captured using Dynamic Signal Analyzer for every maximum
length sequence of PRBS signal. MATLAB software is used to plot the PRBS
signal, autocorrelation function and power spectral density.
Figure 4.20 Dynamic Signal Analyzer (HP35670A DSA)
Figure 4.21 shows the PRBS signal for maximum length sequence of N = 63.
It is shown that the measurement values are closed to the prediction values.
Figure 4.21 PRBS signal for MLS of N = 63
52
Figure 4.22 shows the autocorrelation function graph for PRBS signal for
maximum length sequence of N = 63. It can be shown from the graph that the height
of the autocorrelation function triangle, V2 = 0.95V and the bit interval is 0.1281s.
Figure 4.22 Autocorrelation function of PRBS signal for MLS of N = 63
Figure 4.23 shows power spectral density curve for PRBS signal of maximum
length sequence equal to 63. It can be observed from the graph that the lowest
frequency component is 70Hz, which is a bit higher than the calculated value, 57Hz.
Figure 4.23 Power spectral density of PRBS signal for MLS of N = 63
53
4.5 PRBS signal as test input to a second order system (Hardware result)
A PRBS signal is used as an input to determine the model of second order
system. The autocorrelation of the input signal (PRBS signal) and cross correlation
between the input and output signal is performed using the Dynamic Signal Analyzer
(HP35670A DSA). There are two responses observed in this part; critically damped
and underdamped responses. The underdamped response is precluded in this
analysis because the analyzing process for this response is difficult. For the
overdamped response, it does not include in the analysis since the implementation
wise of this response is impossible using the proposed RC second order circuit.
Second ordersystem
g(t)
PRBS signal
x(t)
Output response
y(t)
Figure 4.24 Block diagram of PRBS testing
4.5.1 Critically damped response
Figure 4.25 shows the schematic circuit for RC low pass filter second order
system critically damped. Transfer function of the second order critically damped
response is obtained using this equation:
7.4526.42
7.452)(
)1.0()470(1
)1.0)(470(22
)1.0()470(1
)(
2
22
22
sssT
Fks
Fks
FksT
54
Figure 4.25 Schematic circuits for critically damped response
Figure 4.26 shows the output signal obtained using PRBS signal as the input
to the RC second order system (critically damped response). It is clearly shown that
the measurement result is close to the prediction. Figure 4.27 shows the
autocorrelation function of the output signal obtained using PRBS signal as the input
to the RC second order system while Figure 4.28 shows the cross correlation
function of the output signal obtained using PRBS signal as the input to the RC
second order system. The measurement result of autocorrelation function of the
output signal has the value close to the prediction value.
Figure 4.26 Output signal using PRBS signal
470k470k
0.1u
0.1u
4.7k
VOUT
VIN
55
Figure 4.27 Autocorrelation function of output signal using PRBS signal
Figure 4.28 Cross correlation function of output signal using PRBS signal
From the cross correlation function and autocorrelation function graphs,
model parameter can be calculated using the following steps:
(a) The height of autocorrelation triangle shown in Figure 4.22 is V2 = 0.95V
and the bit interval is 0.1281s. The impulse strength is V2 times the bit
interval which evaluates to 0.95V × 0.1281s = 0.12 Vs.
(b) The response appears to be a combination of rise and decay wave. The
general form is )( tt eeA . This response curve is difficult to analyze
using correlation technique. It is easier by using frequency response
method.
(c) The time constant to be 0.10056s (decay) and 0.02086s (rise). So,
94.9 and 94.47 .
(d) A is obtained from value of peak height, 103.1A .
56
(e) Divide by the unit impulse response, )(19.9)( 94.4794.9 tt eetf
(f)52.47688.57
22.349
94.47
19.9
94.9
19.9)(
2
sssssF
The transfer function obtained is not very close to the actual transfer function
used in the hardware analysis. This is due to two reasons; first reason is the
difficulty in obtaining the correct transfer function using correlation technique for a
cross correlation function graph which does not yield a good approximation to an
impulse response and the second reason is the correlation is carried out for short
time. Longer the period of correlation could help smoother the curves, provided
dynamic characteristic of the system being tested remained unchanged over long
period of time span involved.
4.5.2 Underdamped response
Figure 4.29 shows the schematic circuit for RC low pass filter second order system
underdamped.
Figure 4.29 Schematic circuits for underdamped response
Transfer function of the second order underdamped response is obtained
using this equation:
470k470k
0.1u
0.1u
4.7k
5k
VOUT
VIN
57
7.4529.19
7.452)(
)1.0()470(1
)7.4)(1.0)(470(5
)1.0)(470(22
)1.0()470(1
)(
2
22
22
sssT
Fks
kFkk
Fks
FksT
Figure 4.30 shows the output signal obtained using PRBS signal as the input
to the RC second order system (underdamped response). It is clearly shown that the
measurement result is close to the prediction.
Figure 4.30 Output signal using PRBS signal for MLS
Figure 4.31 shows the autocorrelation function of the output signal obtained
using PRBS signal as the input to the RC second order system while Figure 4.32
shows the cross correlation function of the output signal obtained using PRBS signal
as the input to the RC second order system. The measurement result of
autocorrelation function of the output signal has the value close to the prediction
value.
58
Figure 4.31 Autocorrelation function of output signal using PRBS signal
Figure 4.32 Cross correlation function of output signal using PRBS signal
From the cross correlation function and autocorrelation function graphs,
model parameter can be calculated using the following steps:
(a) The height of autocorrelation triangle shown in Figure 4.22 is V2 = 0.95V
and the bit interval is 0.1281s. The impulse strength is V2 times the bit
interval which evaluates to 0.95V × 0.1281s = 0.12 Vs.
(b) The response appears to be a decaying sine wave. The general form is
tAe t sin . This response yields a good approximation to impulse
response.
(c) ω is obtained from cycle time, rad/s39.173612.0
2
(d) α is obtained from peak decay ratio, 96.47592.0
3098.0ln
3612.0
2
.
59
(e) A is obtained from the first peak height, 073.1A
(f) Divide by the unit impulse response, tetf t 39.17sin94.8)( 96.4 .
(g)01.32792.9
47.155
39.17)96.4(
)39.17(94.8)(
222
ssssF
The transfer function obtained is not very close to the actual transfer function
used in the hardware analysis. This is due to the shorter time duration for
correlation. Longer the period of correlation could help smoother the curves,
provided dynamic characteristic of the system being tested remained unchanged over
long period of time span involved.
It can be summarized in Table 4.5 the transfer function obtained using
correlation technique for both responses; critically damped and underdamped.
Table 4.5 Transfer function obtained for hardware analysis
Type of second order
system
Transfer function used in
hardware implementation
Transfer function obtained
using correlation technique
Critically damped
7.4526.42
7.4522 ss 52.47688.57
22.3492 ss
Underdamped
7.4529.19
7.4522 ss 01.32792.9
47.1552 ss
CHAPTER 5
CONCLUSION AND FUTURE WORKS
5.1 Conclusion
Pseudo random binary sequence (PRBS) signal of 15 different maximum
length sequences has successfully developed using MATLAB software. The
generated signal was used as forcing function in simulated overdamped,
underdamped, undamped and critically damped second order. The transfer functions
of the each system obtained from the correlograms of autocorrelation and cross
correlation are shown in Table 5.1.
Table 5.1 Transfer function obtained for each system (simulation)
No. Type of second
order system
Transfer function used in
simulation
Transfer function obtained
from correlograms
1 Critically damped
96
92 ss 54.767.6
18.102 ss
2 Underdamped
92
92 ss 49.892.1
72.82 ss
3 Overdamped
99
92 ss 49.610.7
50.72 ss
4 Undamped
9
92 s
Difficult to obtained using
correlation technique
61
PRBS generator circuit has successfully built using TTL. The PRBS signal,
autocorrelation function and power spectral density observed using Dynamic Signal
Analyzer are as theoretically expected. The experiment using PRBS as the forcing
function to an unknown system has successfully performed. The transfer function of
the unknown system has successfully estimated using correlograms of
autocorrelation and cross correlation. The transfer functions obtained are shown in
Table 5.2. The results from this experiment have validated the simulation work
previously.
Table 5.2 Transfer function obtained for each system (hardware)
No. Type of second
order system
Transfer function used in
hardware implementation
Transfer function obtained
from correlograms
1 Critically damped
6.4526.42
7.4522 ss 52.47688.57
22.3492 ss
2 Underdamped
7.4529.19
7.4522 ss 01.32792.9
47.1552 ss
For overdamped system, the hardware implementation is difficult since the
calculated value for the potentiometer is negative. For undamped system, the
analyzing process for this response is difficult.
5.2 Future Works
As for future works, an improvement on the hardware part of PRBS signal as
test input to undamped and overdamped second order system can be done. Graphic
User Interface (GUI) for PRBS signal and its application can be designed for more
organize and convenience while testing the PRBS signal. Lastly, another type of
PRBS signal such as QRB, HAB, TPB and QRT can be used instead to generate the
PRBS signal.
62
REFERENCES
1. Tan, A.H. and Godfrey, K.R. (2002). The generation of binary and near-
binary pseudorandom signals: an overview. IEEE Trans. Instrum. Meas. 51
(4), 583-588.
2. Van Den Bos, A. (1993). Periodic test signals – Properties and use.
Godfrey, K. Perturbation Signals for System Identification. (ch.4). Ed.
London, U.K.: Prentice Hall.
3. Darnell, M. (1993). Periodic and nonperiodic, binary and multi-level
pseudorandom signals. Godfrey, K. Perturbation Signals for System
Identification. (ch.5). Ed. London, U.K.: Prentice-Hall.
4. Godfrey, K. (1993). Introduction to perturbation signals for frequency-
domain system identification. Godfrey, K. Perturbation Signals for System
Identification. (ch.2). Ed. London, U.K.: Prentice-Hall.
5. Godfrey, K. R., Barker, H. A. and Tucker, A. J. (1999). Comparison of
perturbation signals for linear system identification in the frequency domain.
Proc. Inst. Elect. Eng. – Control Theory Applicat. 146(6), 535–548.
6. Kollár, I. (1994). Frequency Domain System Identification Toolbox for use
With MATLAB. Natick, MA: The MathWorks Inc.
7. McCormack, A. S., Godfrey, K. R. and Flower, J. O. (1995). Design of
multilevel multiharmonic signals for system identification. Proc. Inst. Elect.
Eng. – Control Theory Applicat. 142(3), 247–252.
8. Zierler, N. (1959). Linear recurring sequences. J. Soc. Ind. Appl. Math. 7,
31–48.
9. Godfrey, K. (1993). Introduction to perturbation signals for time-domain
system identification. Godfrey, K. Perturbation Signals for System
Identification. (ch.1). Ed. Englewood Cliffs, NJ: Prentice Hall.
63
10. Godfrey, K.R. (1991). Introduction to binary signals used in system
identification. Control 1991. Control '91, International Conference on, vol.,
no., pp.161-166 vol.1, 25-28.
11. Zapernick, H.-J. and Finger, A. (2005). Pseudo Random Signal Processing –
Theory and Application. Chichester: John Wiley & Sons, Ltd.
12. Sodestrom, T. and Stoica, P. (1989). System Identification. Hertfordshire:
Prentice Hall International (UK) Ltd.
13. Godfrey, K. R. and Briggs, P. A. N. (1972). Identification of processes with
direction-dependent dynamics responses. Proc. Inst. Elect. Eng. – Control
Sci. 119(12), 1733–1739.
14. Godfrey, K. R. and D. J. Moore (1974). Identification of processes having
direction-dependent responses, with gas – turbine engine applications.
Automatica, 10(5), 469–481.
15. Tan, A. H. and Godfrey, K. R. (2001). Identification of processes with
direction-dependent dynamics. Proc. Inst. Elect. Eng. – Control Theory
Applicat. 148(5), 362–369.
16. Barker, H. A., Godfrey, K. R. and Tan, A. H. (2000). Identification of
systems with direction-dependent dynamics. Proc. 39th IEEE Conf. Decision
Control (CDC 2000), 2843–2848.
17. Mouine, J. and Boutin, N (1998). A novel way to generate pseudo – random
sequences longer than maximal length sequences. Proc. Inst. Elect. & Comp.
Eng. 2, 529-532.
18. Rahmat, M. F. (2007). Pseudo random binary sequence. System
Identification & Parameter Estimation Lecture Note, UTM Skudai.
APPENDIX
APPENDIX A
COMPUTER PROGRAMS
66
%Plot autocorrelation function (ACF)vector = (ifft(abs(fft(prbs)).^2))/length(prbs);Rxx = real(vector); %real=Real part of complex number
vector1 =(ifft(abs(fft(forced_by_prbs_absence_noise)).^2))/length(forced_by_prbs_absence_noise);Rxx1 = real(vector1); %real=Real part of complex number
vector2 =(ifft(abs(fft(without_prbs_presence_noise)).^2))/length(without_prbs_presence_noise);Rxx2 = real(vector2); %real=Real part of complex number
vector3 =(ifft(abs(fft(forced_by_prbs_presence_noise)).^2))/length(forced_by_prbs_presence_noise);Rxx3 = real(vector3); %real=Real part of complex number
figure (1)plot(tout, Rxx, 'magenta'); grid;hold onplot(tout, Rxx1, 'k'); grid;hold onplot(tout, Rxx2, 'b'); grid;hold onplot(tout, Rxx3, 'r'); grid;
%Plot crosscorrelation function (CCF)
Rxy1 = xcorr(prbs, forced_by_prbs_absence_noise);
Rxy2 = xcorr(prbs, without_prbs_presence_noise);
Rxy3 = xcorr(prbs, forced_by_prbs_presence_noise);t=-length(prbs)+1:1:length(prbs)-1;figure (2)plot(t, Rxy1, 'k'); grid;hold onplot(t, Rxy2, 'b'); grid;hold onplot(t, Rxy3, 'r'); grid;hold on
%Power Spectral Density function (PSD)harmonic = [1:3*length(prbs)];harmonic1 = [1:3*length(forced_by_prbs_absence_noise)];harmonic2 = [1:3*length(without_prbs_presence_noise)];harmonic3 = [1:3*length(forced_by_prbs_presence_noise)];
DFT = abs(fft(prbs));three_periods = [DFT; DFT; DFT];%calculate power prbsamp(1) = DFT(1)/length(prbs);power(1) = amp(1)^2;for k = 2: length(three_periods)
angle(k) = pi*(k-1)/length(prbs);amp(k) = sqrt(2)/length(prbs)*abs(sin(angle(k))*three_periods(k)/angle(k));power(k) = amp(k)^2;
end
DFT1 = abs(fft(forced_by_prbs_absence_noise));three_periods1 = [DFT1; DFT1; DFT1];
%calculate power forced_by_prbs_absence_noiseamp1(1) = DFT1(1)/length(forced_by_prbs_absence_noise);power1(1) = amp1(1)^2;for k = 2: length(three_periods1)
angle1(k) = pi*(k-1)/length(forced_by_prbs_absence_noise);amp1(k) =
sqrt(2)/length(forced_by_prbs_absence_noise)*abs(sin(angle1(k))*three_periods1(k)/angle1(k));
power1(k) = amp1(k)^2;end
DFT2 = abs(fft(without_prbs_presence_noise));three_periods2 = [DFT2; DFT2; DFT2];
67
%calculate power without_prbs_presence_noiseamp2(1) = DFT2(1)/length(without_prbs_presence_noise);power2(1) = amp2(1)^2;for k = 2: length(three_periods2)
angle2(k) = pi*(k-1)/length(without_prbs_presence_noise);amp2(k) =
sqrt(2)/length(without_prbs_presence_noise)*abs(sin(angle2(k))*three_periods2(k)/angle2(k));
power2(k) = amp2(k)^2;end
DFT3 = abs(fft(forced_by_prbs_presence_noise));three_periods3 = [DFT3; DFT3; DFT3];
%calculate power forced_by_prbs_presence_noiseamp3(1) = DFT3(1)/length(forced_by_prbs_presence_noise);power3(1) = amp3(1)^2;for k = 2: length(three_periods3)
angle3(k) = pi*(k-1)/length(forced_by_prbs_presence_noise);amp3(k) =
sqrt(2)/length(forced_by_prbs_presence_noise)*abs(sin(angle3(k))*three_periods3(k)/angle3(k));
power3(k) = amp3(k)^2;end
%plot power againts harmonic number
figure (1)plot(harmonic -1, power, 'magenta')hold onplot(harmonic1 -1, power1, 'k')hold onplot(harmonic2 -1, power2, 'b')hold onplot(harmonic3 -1, power3, 'r')hold on
APPENDIX B
DATASHEETS
© 2000 Fairchild Semiconductor Corporation DS006382 www.fairchildsemi.com
August 1986
Revised March 2000
DM
74LS
112A D
ual N
egative-E
dg
e-Trigg
ered M
aster-Slave J-K
Flip
-Flo
p w
ith P
reset, Clear, an
d C
om
plem
entary
Ou
tpu
ts
DM74LS112ADual Negative-Edge-Triggered Master-Slave J-K Flip-Flopwith Preset, Clear, and Complementary Outputs
General DescriptionThis device contains two independent negative-edge-trig-gered J-K flip-flops with complementary outputs. The J andK data is processed by the flip-flop on the falling edge ofthe clock pulse. The clock triggering occurs at a voltagelevel and is not directly related to the transition time of thefalling edge of the clock pulse. Data on the J and K inputsmay be changed while the clock is HIGH or LOW withoutaffecting the outputs as long as the setup and hold timesare not violated. A low logic level on the preset or clearinputs will set or reset the outputs regardless of the logiclevels of the other inputs.
Ordering Code:
Devices also available in Tape and Reel. Specify by appending the suffix letter “X” to the ordering code.
Connection Diagram Function Table
H = HIGH Logic LevelL = LOW Logic LevelX = Either LOW or HIGH Logic Level↓ = Negative Going Edge of PulseQ0 = The output logic level before the indicated input conditions were
established.Toggle = Each output changes to the complement of its previous level on
each falling edge of the clock pulse.
Note 1: This configuration is nonstable; that is, it will not persist whenpreset and/or clear inputs return to their inactive (HIGH) level.
Order Number Package Number Package Description
DM74KS112AM M16A 16-Lead Small Outline Integrated Circuit (SOIC), JEDEC MS-012, 0.150 Narrow
DM74LS112AN N16E 16-Lead Plastic Dual-In-Line Package (PDIP), JEDEC MS-001, 0.300 Wide
Inputs Outputs
PR CLR CLK J K Q Q
L H X X X H L
H L X X X L H
L L X X X H (Note 1) H (Note 1)
H H ↓ L L Q0 Q0
H H ↓ H L H L
H H ↓ L H L H
H H ↓ H H Toggle
H H H X X Q0 Q0
www.fairchildsemi.com 2
DM
74L
S11
2A Absolute Maximum Ratings(Note 2)Note 2: The “Absolute Maximum Ratings” are those values beyond whichthe safety of the device cannot be guaranteed. The device should not beoperated at these limits. The parametric values defined in the ElectricalCharacteristics tables are not guaranteed at the absolute maximum ratings.The “Recommended Operating Conditions” table will define the conditionsfor actual device operation.
Recommended Operating Conditions
Note 3: CL = 15 pF, RL = 2 kΩ, TA = 25°C and VCC = 5V.
Note 4: The symbol (↓) indicates the falling edge of the clock pulse is used for reference.
Note 5: CL = 50 pF, RL = 2 kΩ, TA = 25°C and VCC = 5V.
Supply Voltage 7V
Input Voltage 7V
Operating Free Air Temperature Range 0°C to +70°C
Storage Temperature Range −65°C to +150°C
Symbol Parameter Min Nom Max Units
VCC Supply Voltage 4.75 5 5.25 V
VIH HIGH Level Input Voltage 2 V
VIL LOW Level Input Voltage 0.8 V
IOH HIGH Level Output Current −0.4 mA
IOL LOW Level Output Current 8 mA
fCLK Clock Frequency (Note 3) 0 30 MHz
fCLK Clock Frequency (Note 5) 0 25 MHz
tW Pulse Width Clock HIGH 20
(Note 3) Preset LOW 25 ns
Clear LOW 25
tW Pulse Width Clock HIGH 25
(Note 5) Preset LOW 30 ns
Clear LOW 30
tSU Setup Time (Note 3)(Note 4) 20↓ ns
tSU Setup Time (Note 4)(Note 5) 25↓ ns
tH Hold Time (Note 3)(Note 4) 0↓ ns
tH Hold Time (Note 4)(Note 5) 5↓ ns
TA Free Air Operating Temperature 0 70 °C
3 www.fairchildsemi.com
DM
74LS
112AElectrical Characteristics over recommended operating free air temperature range (unless otherwise noted)
Note 6: All typicals are at VCC = 5V, TA = 25°C.
Note 7: Not more than one output should be shorted at a time, and the duration should not exceed one second. For devices, with feedback from the outputs,where shorting the outputs to ground may cause the outputs to change logic state an equivalent test may be performed where VO = 2.125V with the minimum
and maximum limits reduced by one half from their stated values. This is very useful when using automatic test equipment.
Note 8: With all outputs OPEN, ICC is measured with the Q and Q outputs HIGH in turn. At the time of measurement the clock is grounded.
Switching Characteristics at VCC = 5V and TA = 25°C
Symbol Parameter Conditions MinTyp
Max Units(Note 6)
VI Input Clamp Voltage VCC = Min, II = −18 mA −1.5 V
VOH HIGH Level VCC = Min, IOH = Max2.7 3.4 V
Output Voltage VIL = Max, VIH = Min
VOL LOW Level VCC = Min, IOL = Max0.35 0.5
Output Voltage VIL = Max, VIH = Min V
IOL = 4 mA, VCC = Min 0.25 0.4
II Input Current @ Max VCC = Max, VI = 7V J, K 0.1
Input Voltage Clear 0.3mA
Preset 0.3
Clock 0.4
IIH HIGH Level Input Current VCC = Max, VI = 2.7V J, K 20
Clear 60µA
Preset 60
Clock 80
IIL LOW Level Input Current VCC = Max, VI = 0.4V J, K −0.4
Clear −0.8mA
Preset −0.8
Clock −0.8
IOS Short Circuit Output Current VCC = Max (Note 7) −20 −100 mA
ICC Supply Current VCC = Max (Note 8) 4 6 mA
From (Input) RL = 2 kΩ
Symbol Parameter To (Output) CL = 15 pF CL = 50 pF Units
Min Max Min Max
fMAX Maximum Clock Frequency 30 25 MHz
tPLH Propagation Delay TimePreset to Q 20 24 ns
LOW-to-HIGH Level Output
tPHL Propagation Delay TimePreset to Q 20 28 ns
HIGH-to-LOW Level Output
tPLH Propagation Delay TimeClear to Q 20 24 ns
LOW-to-HIGH Level Output
tPHL Propagation Delay TimeClear to Q 20 28 ns
HIGH-to-LOW Level Output
tPLH Propagation Delay TimeClock to Q or Q 20 24 ns
LOW-to-HIGH Level Output
tPHL Propagation Delay TimeClock to Q or Q 20 28 ns
HIGH-to-LOW Level Output
www.fairchildsemi.com 4
DM
74L
S11
2A Physical Dimensions inches (millimeters) unless otherwise noted
16-Lead Small Outline Integrated Circuit (SOIC), JEDEC MS-012, 0.150 NarrowPackage Number M16A
5 www.fairchildsemi.com
DM
74LS
112A D
ual N
egative-E
dg
e-Trigg
ered M
aster-Slave J-K
Flip
-Flo
p w
ith P
reset, Clear, an
d C
om
plem
entary
Ou
tpu
tsPhysical Dimensions inches (millimeters) unless otherwise noted (Continued)
16-Lead Plastic Dual-In-Line Package (PDIP), JEDEC MS-001, 0.300 WidePackage Number N16E
Fairchild does not assume any responsibility for use of any circuitry described, no circuit patent licenses are implied andFairchild reserves the right at any time without notice to change said circuitry and specifications.
LIFE SUPPORT POLICY
FAIRCHILD’S PRODUCTS ARE NOT AUTHORIZED FOR USE AS CRITICAL COMPONENTS IN LIFE SUPPORTDEVICES OR SYSTEMS WITHOUT THE EXPRESS WRITTEN APPROVAL OF THE PRESIDENT OF FAIRCHILDSEMICONDUCTOR CORPORATION. As used herein:
1. Life support devices or systems are devices or systemswhich, (a) are intended for surgical implant into thebody, or (b) support or sustain life, and (c) whose failureto perform when properly used in accordance withinstructions for use provided in the labeling, can be rea-sonably expected to result in a significant injury to theuser.
2. A critical component in any component of a life supportdevice or system whose failure to perform can be rea-sonably expected to cause the failure of the life supportdevice or system, or to affect its safety or effectiveness.
www.fairchildsemi.com
5-1
FAST AND LS TTL DATA
QUAD 2-INPUTEXCLUSIVE OR GATE
14 13 12 11 10 9
1 2 3 4 5 6
VCC
8
7
GND
TRUTH TABLE
IN OUT
A B Z
L L LL H HH L HH H L
GUARANTEED OPERATING RANGES
Symbol Parameter Min Typ Max Unit
VCC Supply Voltage 5474
4.54.75
5.05.0
5.55.25
V
TA Operating Ambient Temperature Range 5474
–550
2525
12570
°C
IOH Output Current — High 54, 74 –0.4 mA
IOL Output Current — Low 5474
4.08.0
mA
SN54/74LS86
QUAD 2-INPUTEXCLUSIVE OR GATE
LOW POWER SCHOTTKY
J SUFFIXCERAMIC
CASE 632-08
N SUFFIXPLASTIC
CASE 646-06
141
14
1
ORDERING INFORMATION
SN54LSXXJ CeramicSN74LSXXN PlasticSN74LSXXD SOIC
141
D SUFFIXSOIC
CASE 751A-02
5-2
FAST AND LS TTL DATA
SN54/74LS86
DC CHARACTERISTICS OVER OPERATING TEMPERATURE RANGE (unless otherwise specified)
S b l P
Limits
U i T C di iSymbol Parameter Min Typ Max Unit Test Conditions
VIH Input HIGH Voltage 2.0 VGuaranteed Input HIGH Voltage forAll Inputs
VIL Input LOW Voltage54 0.7
VGuaranteed Input LOW Voltage for
VIL Input LOW Voltage74 0.8
Vp g
All Inputs
VIK Input Clamp Diode Voltage –0.65 –1.5 V VCC = MIN, IIN = –18 mA
VOH Output HIGH Voltage54 2.5 3.5 V VCC = MIN, IOH = MAX, VIN = VIHVOH Output HIGH Voltage74 2.7 3.5 V
CC , OH , IN IHor VIL per Truth Table
VOL Output LOW Voltage54, 74 0.25 0.4 V IOL = 4.0 mA VCC = VCC MIN,
VIN = VIL or VIHVOL Output LOW Voltage74 0.35 0.5 V IOL = 8.0 mA
VIN = VIL or VIHper Truth Table
IIH Input HIGH Current40 µA VCC = MAX, VIN = 2.7 V
IIH Input HIGH Current0.2 mA VCC = MAX, VIN = 7.0 V
IIL Input LOW Current –0.8 mA VCC = MAX, VIN = 0.4 V
IOS Short Circuit Current (Note 1) –20 –100 mA VCC = MAX
ICC Power Supply Current 10 mA VCC = MAX
Note 1: Not more than one output should be shorted at a time, nor for more than 1 second.
AC CHARACTERISTICS (TA = 25°C)
S b l P
Limits
U i T C di iSymbol Parameter Min Typ Max Unit Test Conditions
tPLHtPHL
Propagation Delay,Other Input LOW
1210
2317 ns
VCC = 5.0 V
tPLHtPHL
Propagation Delay,Other Input HIGH
2013
3022 ns
CCCL = 15 pF
© 2000 Fairchild Semiconductor Corporation DS006345 www.fairchildsemi.com
August 1986
Revised March 2000
DM
74LS
04 Hex In
verting
Gates
DM74LS04Hex Inverting Gates
General DescriptionThis device contains six independent gates each of whichperforms the logic INVERT function.
Ordering Code:
Devices also available in Tape and Reel. Specify by appending the suffix letter “X” to the ordering code.
Connection Diagram Function TableY = A
H = HIGH Logic LevelL = LOW Logic Level
Order Number Package Number Package Description
DM74LS04M M14A 14-Lead Small Outline Integrated Circuit (SOIC), JEDEC MS-120, 0.150 Narrow
DM74LS04SJ M14D 14-Lead Small Outline Package (SOP), EIAJ TYPE II, 5.3mm Wide
DM74LS04N N14A 14-Lead Plastic Dual-In-Line Package (PDIP), JEDEC MS-001, 0.300 Wide
Input Output
A Y
L H
H L
www.fairchildsemi.com 2
DM
74L
S04 Absolute Maximum Ratings(Note 1)
Note 1: The “Absolute Maximum Ratings” are those values beyond whichthe safety of the device cannot be guaranteed. The device should not beoperated at these limits. The parametric values defined in the ElectricalCharacteristics tables are not guaranteed at the absolute maximum ratings.The “Recommended Operating Conditions” table will define the conditionsfor actual device operation.
Recommended Operating Conditions
Electrical Characteristics over recommended operating free air temperature range (unless otherwise noted)
Note 2: All typicals are at VCC = 5V, TA = 25°C.
Note 3: Not more than one output should be shorted at a time, and the duration should not exceed one second.
Switching Characteristics at VCC = 5V and TA = 25°C
Supply Voltage 7V
Input Voltage 7V
Operating Free Air Temperature Range 0°C to +70°C
Storage Temperature Range −65°C to +150°C
Symbol Parameter Min Nom Max Units
VCC Supply Voltage 4.75 5 5.25 V
VIH HIGH Level Input Voltage 2 V
VIL LOW Level Input Voltage 0.8 V
IOH HIGH Level Output Current −0.4 mA
IOL LOW Level Output Current 8 mA
TA Free Air Operating Temperature 0 70 °C
Symbol Parameter Conditions MinTyp
Max Units(Note 2)
VI Input Clamp Voltage VCC = Min, II = −18 mA −1.5 V
VOH HIGH Level VCC = Min, IOH = Max,2.7 3.4 V
Output Voltage VIL = Max
VOL LOW Level VCC = Min, IOL = Max,0.35 0.5
Output Voltage VIH = Min V
IOL = 4 mA, VCC = Min 0.25 0.4
II Input Current @ Max VCC = Max, VI = 7V 0.1 mA
Input Voltage
IIH HIGH Level Input Current VCC = Max, VI = 2.7V 20 µA
IIL LOW Level Input Current VCC = Max, VI = 0.4V −0.36 mA
IOS Short Circuit Output Current VCC = Max (Note 3) −20 −100 mA
ICCH Supply Current with Outputs HIGH VCC = Max 1.2 2.4 mA
ICCL Supply Current with Outputs LOW VCC = Max 3.6 6.6 mA
RL = 2 kΩ
Symbol Parameter CL = 15 pF CL = 50 pF Units
Min Max Min Max
tPLH Propagation Delay Time3 10 4 15 ns
LOW-to-HIGH Level Output
tPHL Propagation Delay Time3 10 4 15 ns
HIGH-to-LOW Level Output
3 www.fairchildsemi.com
DM
74LS
04Physical Dimensions inches (millimeters) unless otherwise noted
14-Lead Small Outline Integrated Circuit (SOIC), JEDEC MS-120, 0.150 NarrowPackage Number M14A
www.fairchildsemi.com 4
DM
74L
S04 Physical Dimensions inches (millimeters) unless otherwise noted (Continued)
14-Lead Small Outline Package (SOP), EIAJ TYPE II, 5.3mm WidePackage Number M14D
5 www.fairchildsemi.com
DM
74LS
04 Hex In
verting
Gates
Physical Dimensions inches (millimeters) unless otherwise noted (Continued)
14-Lead Plastic Dual-In-Line Package (PDIP), JEDEC MS-001, 0.300 WidePackage Number N14A
Fairchild does not assume any responsibility for use of any circuitry described, no circuit patent licenses are implied andFairchild reserves the right at any time without notice to change said circuitry and specifications.
LIFE SUPPORT POLICY
FAIRCHILD’S PRODUCTS ARE NOT AUTHORIZED FOR USE AS CRITICAL COMPONENTS IN LIFE SUPPORTDEVICES OR SYSTEMS WITHOUT THE EXPRESS WRITTEN APPROVAL OF THE PRESIDENT OF FAIRCHILDSEMICONDUCTOR CORPORATION. As used herein:
1. Life support devices or systems are devices or systemswhich, (a) are intended for surgical implant into thebody, or (b) support or sustain life, and (c) whose failureto perform when properly used in accordance withinstructions for use provided in the labeling, can be rea-sonably expected to result in a significant injury to theuser.
2. A critical component in any component of a life supportdevice or system whose failure to perform can be rea-sonably expected to cause the failure of the life supportdevice or system, or to affect its safety or effectiveness.
www.fairchildsemi.com
TL/H/9341
LM
741
Opera
tionalA
mplifie
r
November 1994
LM741 Operational Amplifier
General DescriptionThe LM741 series are general purpose operational amplifi-
ers which feature improved performance over industry stan-
dards like the LM709. They are direct, plug-in replacements
for the 709C, LM201, MC1439 and 748 in most applications.
The amplifiers offer many features which make their appli-
cation nearly foolproof: overload protection on the input and
output, no latch-up when the common mode range is ex-
ceeded, as well as freedom from oscillations.
The LM741C/LM741E are identical to the LM741/LM741A
except that the LM741C/LM741E have their performance
guaranteed over a 0§C to a70§C temperature range, in-
stead of b55§C to a125§C.
Schematic Diagram
TL/H/9341–1
Offset Nulling Circuit
TL/H/9341–7
C1995 National Semiconductor Corporation RRD-B30M115/Printed in U. S. A.
Absolute Maximum RatingsIf Military/Aerospace specified devices are required, please contact the National Semiconductor Sales Office/
Distributors for availability and specifications.
(Note 5)
LM741A LM741E LM741 LM741C
Supply Voltage g22V g22V g22V g18V
Power Dissipation (Note 1) 500 mW 500 mW 500 mW 500 mW
Differential Input Voltage g30V g30V g30V g30V
Input Voltage (Note 2) g15V g15V g15V g15V
Output Short Circuit Duration Continuous Continuous Continuous Continuous
Operating Temperature Range b55§C to a125§C 0§C to a70§C b55§C to a125§C 0§C to a70§CStorage Temperature Range b65§C to a150§C b65§C to a150§C b65§C to a150§C b65§C to a150§CJunction Temperature 150§C 100§C 150§C 100§CSoldering Information
N-Package (10 seconds) 260§C 260§C 260§C 260§CJ- or H-Package (10 seconds) 300§C 300§C 300§C 300§CM-Package
Vapor Phase (60 seconds) 215§C 215§C 215§C 215§CInfrared (15 seconds) 215§C 215§C 215§C 215§C
See AN-450 ‘‘Surface Mounting Methods and Their Effect on Product Reliability’’ for other methods of soldering
surface mount devices.
ESD Tolerance (Note 6) 400V 400V 400V 400V
Electrical Characteristics (Note 3)
Parameter ConditionsLM741A/LM741E LM741 LM741C
UnitsMin Typ Max Min Typ Max Min Typ Max
Input Offset Voltage TA e 25§CRS s 10 kX 1.0 5.0 2.0 6.0 mV
RS s 50X 0.8 3.0 mV
TAMIN s TA s TAMAX
RS s 50X 4.0 mV
RS s 10 kX 6.0 7.5 mV
Average Input Offset15 mV/§C
Voltage Drift
Input Offset Voltage TA e 25§C, VS e g20Vg10 g15 g15 mV
Adjustment Range
Input Offset Current TA e 25§C 3.0 30 20 200 20 200 nA
TAMIN s TA s TAMAX 70 85 500 300 nA
Average Input Offset0.5 nA/§C
Current Drift
Input Bias Current TA e 25§C 30 80 80 500 80 500 nA
TAMIN s TA s TAMAX 0.210 1.5 0.8 mA
Input Resistance TA e 25§C, VS e g20V 1.0 6.0 0.3 2.0 0.3 2.0 MX
TAMIN s TA s TAMAX,0.5 MX
VS e g20V
Input Voltage Range TA e 25§C g12 g13 V
TAMIN s TA s TAMAX g12 g13 V
Large Signal Voltage Gain TA e 25§C, RL t 2 kX
VS e g20V, VO e g15V 50 V/mV
VS e g15V, VO e g10V 50 200 20 200 V/mV
TAMIN s TA s TAMAX,
RL t 2 kX,
VS e g20V, VO e g15V 32 V/mV
VS e g15V, VO e g10V 25 15 V/mV
VS e g5V, VO e g2V 10 V/mV
2
Electrical Characteristics (Note 3) (Continued)
Parameter ConditionsLM741A/LM741E LM741 LM741C
UnitsMin Typ Max Min Typ Max Min Typ Max
Output Voltage Swing VS e g20V
RL t 10 kX g16 V
RL t 2 kX g15 V
VS e g15V
RL t 10 kX g12 g14 g12 g14 V
RL t 2 kX g10 g13 g10 g13 V
Output Short Circuit TA e 25§C 10 25 35 25 25 mA
Current TAMIN s TA s TAMAX 10 40 mA
Common-Mode TAMIN s TA s TAMAX
Rejection Ratio RS s 10 kX, VCM e g12V 70 90 70 90 dB
RS s 50X, VCM e g12V 80 95 dB
Supply Voltage Rejection TAMIN s TA s TAMAX,
Ratio VS e g20V to VS e g5V
RS s 50X 86 96 dB
RS s 10 kX 77 96 77 96 dB
Transient Response TA e 25§C, Unity Gain
Rise Time 0.25 0.8 0.3 0.3 ms
Overshoot 6.0 20 5 5 %
Bandwidth (Note 4) TA e 25§C 0.437 1.5 MHz
Slew Rate TA e 25§C, Unity Gain 0.3 0.7 0.5 0.5 V/ms
Supply Current TA e 25§C 1.7 2.8 1.7 2.8 mA
Power Consumption TA e 25§CVS e g20V 80 150 mW
VS e g15V 50 85 50 85 mW
LM741A VS e g20V
TA e TAMIN 165 mW
TA e TAMAX 135 mW
LM741E VS e g20V
TA e TAMIN 150 mW
TA e TAMAX 150 mW
LM741 VS e g15V
TA e TAMIN 60 100 mW
TA e TAMAX 45 75 mW
Note 1: For operation at elevated temperatures, these devices must be derated based on thermal resistance, and Tj max. (listed under ‘‘Absolute Maximum
Ratings’’). Tj e TA a (ijA PD).
Thermal Resistance Cerdip (J) DIP (N) HO8 (H) SO-8 (M)
ijA (Junction to Ambient) 100§C/W 100§C/W 170§C/W 195§C/W
ijC (Junction to Case) N/A N/A 25§C/W N/A
Note 2: For supply voltages less than g15V, the absolute maximum input voltage is equal to the supply voltage.
Note 3: Unless otherwise specified, these specifications apply for VS e g15V, b55§C s TA s a125§C (LM741/LM741A). For the LM741C/LM741E, these
specifications are limited to 0§C s TA s a70§C.
Note 4: Calculated value from: BW (MHz) e 0.35/Rise Time(ms).
Note 5: For military specifications see RETS741X for LM741 and RETS741AX for LM741A.
Note 6: Human body model, 1.5 kX in series with 100 pF.
3
Connection Diagrams
Metal Can Package
TL/H/9341–2
Order Number LM741H, LM741H/883*,
LM741AH/883 or LM741CH
See NS Package Number H08C
Dual-In-Line or S.O. Package
TL/H/9341–3
Order Number LM741J, LM741J/883,
LM741CM, LM741CN or LM741EN
See NS Package Number J08A, M08A or N08E
Ceramic Dual-In-Line Package
TL/H/9341–5
Order Number LM741J-14/883*, LM741AJ-14/883**See NS Package Number J14A
*also available per JM38510/10101
**also available per JM38510/10102
Ceramic Flatpak
TL/H/9341–6
Order Number LM741W/883
See NS Package Number W10A
*LM741H is available per JM38510/10101
4
Physical Dimensions inches (millimeters)
Metal Can Package (H)
Order Number LM741H, LM741H/883, LM741AH/883, LM741CH or LM741EH
NS Package Number H08C
5
Physical Dimensions inches (millimeters) (Continued)
Ceramic Dual-In-Line Package (J)
Order Number LM741CJ or LM741J/883
NS Package Number J08A
Ceramic Dual-In-Line Package (J)
Order Number LM741J-14/883 or LM741AJ-14/883
NS Package Number J14A
6
Physical Dimensions inches (millimeters) (Continued)
Small Outline Package (M)
Order Number LM741CM
NS Package Number M08A
Dual-In-Line Package (N)
Order Number LM741CN or LM741EN
NS Package Number N08E
7
LM
741
Opera
tionalA
mplifier
Physical Dimensions inches (millimeters) (Continued)
10-Lead Ceramic Flatpak (W)
Order Number LM741W/883
NS Package Number W10A
LIFE SUPPORT POLICY
NATIONAL’S PRODUCTS ARE NOT AUTHORIZED FOR USE AS CRITICAL COMPONENTS IN LIFE SUPPORT
DEVICES OR SYSTEMS WITHOUT THE EXPRESS WRITTEN APPROVAL OF THE PRESIDENT OF NATIONAL
SEMICONDUCTOR CORPORATION. As used herein:
1. Life support devices or systems are devices or 2. A critical component is any component of a life
systems which, (a) are intended for surgical implant support device or system whose failure to perform can
into the body, or (b) support or sustain life, and whose be reasonably expected to cause the failure of the life
failure to perform, when properly used in accordance support device or system, or to affect its safety or
with instructions for use provided in the labeling, can effectiveness.
be reasonably expected to result in a significant injury
to the user.
National Semiconductor National Semiconductor National Semiconductor National SemiconductorCorporation Europe Hong Kong Ltd. Japan Ltd.1111 West Bardin Road Fax: (a49) 0-180-530 85 86 13th Floor, Straight Block, Tel: 81-043-299-2309Arlington, TX 76017 Email: cnjwge@ tevm2.nsc.com Ocean Centre, 5 Canton Rd. Fax: 81-043-299-2408Tel: 1(800) 272-9959 Deutsch Tel: (a49) 0-180-530 85 85 Tsimshatsui, KowloonFax: 1(800) 737-7018 English Tel: (a49) 0-180-532 78 32 Hong Kong
Fran3ais Tel: (a49) 0-180-532 93 58 Tel: (852) 2737-1600Italiano Tel: (a49) 0-180-534 16 80 Fax: (852) 2736-9960
National does not assume any responsibility for use of any circuitry described, no circuit patent licenses are implied and National reserves the right at any time without notice to change said circuitry and specifications.
APPENDIX C
PRESENTATION SLIDE
1
Application of Pseudo Random BinarySequence (PRBS) signal in systemidentification
Prepared by:Maimun binti Huja Husin
ME061188Masters of Electrical Engineering (Mechatronics)
Universiti Teknologi Malaysia
Supervised by:PM. Dr. Mohd Fua’ad Bin Hj. Rahmat
2
Contents
Objectives & Scope of Project Project background, Methodology & Theory Result, analysis & Discussion
PRBS signal as test signal to second order system(simulation)
PRBS signal generator (hardware) PRBS signal as test signal to second order system
(hardware)
Conclusion & Future works References
3
Objectives
To design and generate PRBS generator withdifferent maximum length sequence (MLS) usingsoftware (MATLAB)
To design PRBS generator using hardware(Transistor-transistor logic-TTL)
To analyze the characteristic of PRBS signal suchas ACF, CCF, and PSD using MATLAB anddynamic signal analyzer.
To perform an experiment using real systemwhere PRBS is the test input.
4
Scope of project
Designing PRBS generator with 15 differentmaximum length sequence using MATLAB(SIMULINK) and hardware implementation usingtransistor transistor logic
The response of simulated second order systemsusing PRBS signal as test input will beinvestigated using MATLAB (SIMULINK) and willbe validated using hardware implementation
5
Project background
Most existing test input (e.g. step, ramp,impulse or sinusoidal input)
Characteristics: Ease of signal generation, Ease ofanalysis & The physical understanding of systemresponse which result
Problem: Not practical because of limitationsimposed by the existence of system noise
PRBS Characteristics: Popular input signal for system
identification, Resembles a white noise correlationfunction & Easy to generate using an n stage shiftregister
6
Methodology
Designing PRBS generator usingMATLAB (SIMULINK)
LiteratureReview
Tests the PRBS signal onsimulated second order systems
using MATLAB (SIMULINK)
Build PRBS generator using TTL
Test the PRBS signal on realsecond order system
Verify? EndYesNo
7
Theory
PRBS signals Can take on only two possible states, say +a and –a State can change only at discrete intervals of time Δt Sequence is periodic with period T=NΔt where N is an
integer
The most commonly used type - maximum lengthsequence (length N=2n-1, where n is an integer) Generated by an n shift register
8
Theory
The first stage of the shift register is determined byfeedback of the appropriate modulo two sum (the logicfunction ‘exclusive or’).
The logic contents of the shift register are moved onestage to the right every Δt seconds by simultaneoustriggering by a clock pulse
9
Theory
ACF A measure of the predictability of the signal at some future time
based on knowledge of the present value of signal
CCF A process of comparing one signal with another by multiplication of
corresponding instantaneous values and taking the average
A measure of the similarity between two different signals.
T
TT
T
TT
dttxtxT
or
dttxtxT
)()(2
1lim)(
)()(2
1lim)(
xx
xx
T
TT
T
TT
dttxtyT
or
dttytxT
)()(2
1lim)(
)()(2
1lim)(
xy
xy
10
Theory
Determine transfer function general form
Calculate model parameter
Plug in all the parameters into transfer function generalform
Calculate impulse strength of the input signalImpulse strength = height of ACF triangle x bit interval
Start
End
Steps to determine the transfer functions model of system
11
Result, Analysis & Discussion
On PRBS signal as test signal(simulation)
12
PRBS signal as test signal(simulation)
Four condition of second order system will be examined:overdamped, underdamped, undamped and criticallydamped
Settings: Noise power for band-limited white noise is set to 0.01(1% of the
input magnitude); A step of magnitude unity (1) & N = 63
4
3
2
1
No
9 / (s2+9s+9)1.50Overdamped
9 / (s2+6s+9)1.00Critically damped
0.00
0.33
Damping ratio, ξ Transfer functionType of second ordersystem
9 / (s2+9)Undamped
9 / (s2+2s+9)Underdamped
13
PRBS signal as test signal(simulation) – critically damped
Block diagram of second order system criticallydamped (ξ = 1)
14
PRBS signal as test signal(simulation) – critically damped
Output responses
15
PRBS signal as test signal(simulation) – critically damped ACF of PRBS signal – theoretically expected ACF of system forced by PRBS input in absence of noise – reduction in signal
power ACF of noisy system forced by PRBS input – shows that is a significant
component of signal which approximates to white noise some increase ofsignal power)
Autocorrelation function of input & output signals
16
PRBS signal as test signal(simulation) – critically damped Response of systems forced by PRBS input – rise + decay wave General form : A (e-αt - e-βt)
Chosen Δt = 0.1s – gives adequate approximation to white noise for thissystem
Period of 6.3s correctly exceeds the system settling time sequence ofN = 31 could have been used instead
Cross correlation function of output signals
17
PRBS signal as test signal(simulation) – critically damped With PRBS input, almost entire power of output signals in contained in
frequency range of 1 to 3Hz.
Curve for PSD for PRBS input – shows that over this frequency rangePRBS input has substantially constant PSD Confirms that Δt used gives an excitation signal which is a good
approximation to true white noise for system tested
Power spectral density curves for input & output signals
18
PRBS signal as test signal(simulation) – critically damped
ACF of input signal and CCF of output signals are used todetermine the transfer functions model of system Difficult to obtain correct transfer function – CCF of system output
signal does not yield a good approximation to impulse response(decaying sine wave)
Transfer function obtained using 3 different PRBSmaximum length
9 / (s2+6s+9)
Transfer function used in the simulation:
11.10/(s2+7.41s+9.17)1023
9.21/(s2+5.94s+6.00)255
10.54/(s2+6.66s+7.44)63
Transfer functionLength, N
19
PRBS signal as test signal(simulation) – under damped
Block diagram of second order system underdamped (0 < ξ < 1)
20
PRBS signal as test signal(simulation) – under damped
Output responses
21
PRBS signal as test signal(simulation) – under damped ACF of PRBS signal – theoretically expected ACF of system forced by PRBS input in absence of noise – reduction in signal
power ACF of noisy system forced by PRBS input – shows that is a significant
component of signal which approximates to white noise some increase ofsignal power)
Autocorrelation function of input & output signals
22
PRBS signal as test signal(simulation) – under damped Response of systems forced by PRBS input – decaying sine wave General form : A e-αt sin ωt
Chosen Δt = 0.1s – gives adequate approximation to white noise for thissystem
Period of 6.3s correctly exceeds the system settling time sequence ofN = 31 could have been used instead
Cross correlation function of output signals
23
PRBS signal as test signal(simulation) – under damped With PRBS input, almost entire power of output signals in contained in
frequency range of 1 to 5Hz. Curve for PSD for PRBS input – shows that over this frequency range
PRBS input has substantially constant PSD Confirms that Δt used gives an excitation signal which is a good
approximation to true white noise for system tested
Power spectral density curves for input & output signals
24
PRBS signal as test signal(simulation) – under damped
ACF of input signal and CCF of output signals are used todetermine the transfer functions model of system CCF of system output signal yield a good approximation to
impulse response
Transfer function obtained using 3 different PRBS maximumlength
9 / (s2+2s+9)
Transfer function used in the simulation
8.60/(s2+1.94s+8.39)1023
9.04/(s2+1.87s+8.68)255
8.52/(s2+1.96s+8.41)63
Transfer functionLength, N
25
Result, Analysis & Discussion
On PRBS signal generator (hardware)
26
PRBS signal generator (hardware)
PRBS generator circuit
Supply voltage
PRBS GeneratorClock circuit
Feedback circuit
PRBS Signal
27
PRBS signal generator(hardware)
PRBS generator circuit for MLS (hardware implementation)
ACF and PSD of PRBS signal is performed using theDynamic Signal Analyzer (HP35670A DSA)
28
PRBS signal generator (hardware)
512 data of the PRBS signal is captured using Dynamic SignalAnalyzer for every MLS of PRBS signal
MATLAB is used to plot the PRBS signal, autocorrelation and powerspectral density
PRBS signal for MLS of N = 63
29
PRBS signal generator (hardware)
The height of the ACF triangle, V2 = 0.95V and the bitinterval is 0.1281s
Autocorrelation function for MLS of N = 63
30
PRBS signal generator(hardware)
The lowest frequency component is 70Hz – which is a bithigher than the calculated values 2π/Δt = 57Hz
Power spectral density for MLS of N = 63
31
Result, Analysis & Discussion
On PRBS signal as test signal(hardware)
32
PRBS signal as test signal(hardware)
A PRBS signal is used as an input signal to determine themodel of second order system
The autocorrelation of the input signal and crosscorrelation between the input and output signal isperformed using the Dynamic Signal Analyzer (HP35670ADSA)
Second ordersystem
g(t)
PRBS signal
x(t)
Output response
y(t)
33
PRBS signal as test signal(hardware)
R2R1
C1
C2
R3
R4
VOUT
VIN
)dampedcritically(7.4526.42
7.452)(0
)dampedunder(7.4529.19
7.452)(5
1.0eter);(potentiom10
;7.4;470
where
21
21
1
311
4
11
22
21
21
1
)(
24
24
214
321
sssAR
sssAkR
FCCkR
kRkRR
CRs
RCR
R
CRs
CRsA
Second order RC circuit
34
PRBS signal as test signal(hardware) – Critically damped
The measurement result has the same shape as prediction output.
Output signal using PRBS of MLS N=63
35
PRBS signal as test signal(hardware) – Critically damped
ACF of the measurement result has the value close to the predictionvalue
ACF of the output signal
36
PRBS signal as test signal(hardware) – Critically damped
Transfer function obtained: T (s) = 349.22 / (s2 + 57.88s + 476.52)
Transfer function used in hardware implementation: T(s)= 452.7 / (s2 + 42.6s + 452.7)
CCF of the input and output signal
37
PRBS signal as test signal(hardware) – Underdamped
The measurement values obtained follow the prediction values.
Output signal using PRBS of MLS N=63
38
PRBS signal as test signal(hardware) – Underdamped
Measurement result has the value close to the prediction value
ACF of the output signal
39
PRBS signal as test signal(hardware) – Underdamped
Transfer function obtained: T (s) = 155.47 / (s2 + 9.92s + 327.01)
Transfer function used in hardware implementation: T(s)= 452.7 / (s2 + 19.9s + 452.7)
CCF of the input and output signal
40
Conclusion
PRBS is a good input signal for systemidentification - easy to generate and introduceinto a system
Length of the MLS can be set according to thesystem under test – some system require higherMLS values
PRBS signal as test input has successfully designexcept for the undamped and overdampedsystem
41
Future works
Software: More convenient if GUI can bedesigned for the PRBS generator & its application
Hardware:
Test PRBS signal as test input to undamped andoverdamped second order system
Perform experiment on real system (e.g. suspensionsystem) where PRBS is the test input
42
References Schwarzenbach, J. and Gill, K.F. (1984). System modelling and Control, 2nd
Edition, Edward Arnold (Publishers) Ltd. Tan, A.H. and Godfrey, K.R. (2002). The generation of binary and near-
binary pseudorandom signals: an overview. IEEE Trans. Instrum. Meas.51 (4), 583-588.
Van Den Bos, A. (1993). Periodic test signals – Properties and use.Godfrey, K. Perturbation Signals for System Identification. (ch.4). Ed.London, U.K.: Prentice Hall.
Darnell, M. (1993). Periodic and nonperiodic, binary and multi-levelpseudorandom signals. Godfrey, K. Perturbation Signals for SystemIdentification. (ch.5). Ed. London, U.K.: Prentice-Hall.
Godfrey, K. (1993). Introduction to perturbation signals for frequency-domain system identification. Godfrey, K. Perturbation Signals for SystemIdentification. (ch.2). Ed. London, U.K.: Prentice-Hall.
Godfrey, K. R., Barker, H. A. and Tucker, A. J. (1999). Comparison ofperturbation signals for linear system identification in the frequencydomain. Proc. Inst. Elect. Eng. – Control Theory Applicat. 146(6), 535–548.
43
References Kollár, I. (1994). Frequency Domain System Identification Toolbox for
use With MATLAB. Natick, MA: The MathWorks Inc. McCormack, A. S., Godfrey, K. R. and Flower, J. O. (1995). Design of
multilevel multiharmonic signals for system identification. Proc. Inst.Elect. Eng. – Control Theory Applicat. 142(3), 247–252.
Zierler, N. (1959). Linear recurring sequences. J. Soc. Ind. Appl. Math.7, 31–48.
Godfrey, K. (1993). Introduction to perturbation signals for time-domain system identification. Godfrey, K. Perturbation Signals forSystem Identification. (ch.1). Ed. Englewood Cliffs, NJ: Prentice Hall.
Godfrey, K.R. (1991). Introduction to binary signals used in systemidentification. Control 1991. Control '91, International Conference on,vol., no., pp.161-166 vol.1, 25-28.
Zapernick, H.-J. and Finger, A. (2005). Pseudo Random SignalProcessing – Theory and Application. Chichester: John Wiley & Sons,Ltd.
Sodestrom, T. and Stoica, P. (1989). System Identification.Hertfordshire: Prentice Hall International (UK) Ltd.
44
References Godfrey, K. R. and Briggs, P. A. N. (1972). Identification of processes with
direction-dependent dynamics responses. Proc. Inst. Elect. Eng. – Control Sci.119(12), 1733–1739.
Godfrey, K. R. and D. J. Moore (1974). Identification of processes having direction-dependent responses, with gas – turbine engine applications. Automatica, 10(5),469–481.
Tan, A. H. and Godfrey, K. R. (2001). Identification of processes with direction-dependent dynamics. Proc. Inst. Elect. Eng. – Control Theory Applicat. 148(5),362–369.
Barker, H. A., Godfrey, K. R. and Tan, A. H. (2000). Identification of systems withdirection-dependent dynamics. Proc. 39th IEEE Conf. Decision Control (CDC 2000),2843–2848.
Mouine, J. and Boutin, N (1998). A novel way to generate pseudo – randomsequences longer than maximal length sequences. Proc. Inst. Elect. & Comp. Eng.2, 529-532.
Rahmat, M. F. (2007). Pseudo random binary sequence. System Identification &Parameter Estimation Lecture Note, UTM Skudai.