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 in completing 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. I greatly appreciate his dedication in constructively criticizing my work, including my thesis. I have truly enjoyed working with him. I wish to thank Universiti Malaysia Sarawak (UNIMAS) and Malaysian government, for a study leave and financial support, through SLAB-JPA scholarship. Finally, I would like to thank my parents and family for their constant support, 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 1 2 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 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 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 Power Spectral Density 17 2.7.3 2.8 3 Summary 18 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 PRBS signal as test signal to second 31 3.3.2 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) 5 4.5.1 Critically damped response 53 4.5.2 Underdamped response 56 CONCLUSIONS AND FUTURE WORKS 60 5.1 Conclusion 60 5.2 Future Works 61 REFERENCES Appendices A – C 62 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, (c) Autocorrelation function, and 36 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 signal 58 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. Disturbance v (t) Input u (t) System Output y (t) 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). parameters. Identification methods can be applied to estimate unknown 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. identification experiment is shown in Figure 2.2. The summary of 7 Start Design of experiment A priori knowledge Planned use of the model Perform experiment Collect data Determine/ choose model structure Choose method Estimate parameters Model validation NO Model accepted? New data set YES End 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 { xr }, r 1,2,, N is formed from the rule (Tan and Godfrey, 2002) xr 1 if r is a square, modulo N xr 1 otherwise xN 1 or 1 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) xr 1 if r u t , modulo N where t 0, 1 or 3 (modulo 6) xr 1 otherwise 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 { ar } and { br } respectively [1]. Then the TPB sequence { xr } is defined by (Tan and Godfrey, 2002) xr ar br xr 1 xr 1 for r 0, modulo k or modulo (k 2) if r 0 modulo (k 2) if r 0 modulo k, but r 0 modulo (k 2) 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 xN 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 N 2 n 1 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 Clock pulse (to shift contents every t second) + Modulo 2 addition 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 2.7 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 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 2.7.2 A B Q 0 0 0 0 1 1 1 0 1 1 1 0 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, 1 T 2T xx ( ) lim T x(t ) x(t )dt T or 1 T 2T xx ( ) lim T x(t ) x(t )dt T where x(t ) and x(t ) is displacement of signal x(t ) 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. xx ( ) xx ( ) , because the same set of product values is averaged regardless of the direction of translation in time. (ii) xx (0) is the mean square value, or average power of x(t). 15 (iii) xx (0) 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, xx ( ) 0 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 kt where k is an integer. Let value of the sequence for successive intervals ∆t to be x(1), x(2), x(3),...x(N) . The autocorrelation function of PRBS is xx (k ) 1 N x( j ) x( j k ) N j 1 a2 (number of matching digits - number of differing digits ) N a2 if k 0 xx (k ) N a 2 if k 0 xx (k ) 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 xx (k ) a2 a2 N t t Nt Figure 2.4 Autocorrelation function of PRBS signal As t 0 and N becomes large the autocorrelation function tends closer to that of true periodic white noise as shown in Figure 2.5. xx ( ) time shift 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, 1 T 2T xy ( ) lim T x(t ) y (t )dt T or 1 T 2T xy ( ) lim T y (t ) x(t )dt T where y (t ) and x(t ) are displacements of signal y (t ) and x(t ) respectively 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: xx ( ) xx ( )e j d where xx ( ) is autocorrelation function 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 xx ( ) a 2 t ( N 1 ) N 3dB 2 Nt 2 3t 2 t 4 t 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 Nt . 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 9 s 6s 9 2 2 Underdamped 0<ξ<1 9 s 2s 9 2 3 Overdamped ξ>1 9 s 9s 9 2 4 Undamped ξ=0 9 s 9 2 For overdamped response, C ( s) 9 9 s ( s 9s 9) s ( s 7.854)( s 1.146) 2 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, C ( s) 9 9 s ( s 2 s 9) s ( s 1 j 8 )( s 1 j 8 ) 2 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, C ( s) 9 9 s ( s 9) s ( s j 3)( s j 3) 2 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 j 3 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, C ( s) 9 9 s ( s 6 s 9) s ( s 3)( s 3) 2 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. Figure 3.2 Block diagram of system (critically damped) being identified 23 Figure 3.3 Block diagram of system (overdamped) being identified 24 Figure 3.4 Block diagram of system (underdamped) being identified 25 Figure 3.5 Block diagram of system (undamped) being identified 26 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. Supply voltage PRBS Signal Clock circuit Shift Register Feedback circuit 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. 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 R1 2.0k 3 R2 47k 555 5 R3 470k 1 8 2 7 3 6 4 5 2 9 7 NET_8 6 R4 10k C1 100nF C2 10nF 4 Figure 3.7 Clock circuitry The output for this clock circuitry is clock pulses of frequency 15Hz. To calculate the frequency: 1 0.693 ( R1 2 R 2) C 1 f 0.693 (47 k 2 470k) 0.1F f 15 Hz f 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. 74LS86D U6B 74LS86D U6A U6C 74LS86D 18 17 2 1 3 15 2 1 3 1K 19 1K 1CLK 1J 1Q ~1Q 15 2 1 3 ~1CLR 74LS112D 14 9 15 6 5 ~1CLR ~1Q 1Q ~1PR 4 4 ~1PR 1Q ~1Q U3A 1K 1CLK 1J 15 2 1 3 ~1PR 4 ~1CLR 2 1 22 74LS112D 6 5 U1A 15 ~1Q 1Q 5V ~1CLR 1CLK 1J 1K 1CLK 1J ~1PR 4 VCC VCC 4 13 10 74LS112D 6 5 U3B 7 5 21 74LS112D 6 5 U1B Figure 3.8 Block diagram of PRBS generator for MLS of N = 255 74LS04D U5A 20 10 Hz 2V V1 2 1 3 2 1 3 1K 4 1Q 15 ~1CLR ~1Q 15 ~1PR 1Q ~1Q ~1CLR 1CLK 1J 1K 1CLK 1J ~1PR 4 6 3 12 11 74LS112D 6 5 U4A 74LS112D 6 5 U2A 2 1 3 2 1 3 1K 4 1Q 15 ~1CLR ~1Q 15 ~1PR 1Q ~1Q ~1CLR 1CLK 1J 1K 1CLK 1J ~1PR 4 74LS112D 6 5 U4B 74LS112D 6 5 U2B 30 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. R1 R2 C2 VIN VOUT R4 C1 R3 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 32 The transfer function for the above second order system is: 1 2 R C2 1 1 T (s) R 4 s 1 s2 2 RC RC R R 2C 2 1 1 3 1 1 1 1 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 452.7 s 42.6 s 452.7 2 2 Underdamped 0 < R4 < 9.4 k R4 = 5 k 452.7 s 19.9s 452.7 2 3 Overdamped R4 < 0 - 4 Undamped R4 = 9.4 k 452.7 s 452.7 2 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. repeated after a complete cycle of N value. The sequence / pattern will be 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 and 2 1 1 0 1 0 1 1 0 0 1 0 0 0 1 1 1 the 3 1 1 1 0 1 0 1 1 0 0 1 0 0 0 1 1 pattern 4 1 1 1 1 0 1 0 1 1 0 0 1 0 0 0 1 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) (c) Run property: Length of run 1 2 3 4 Number of runs 4 2 1 1 Actual ratio 4 2 1 1 Ideal ratio 1 8 2 1 8 4 1 8 8 8 1 16 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 A(e t e t ) . 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, 1.42 and 5.24 . (d) A is obtained from value of peak height, A 0.276 . (e) Divide by the unit impulse response, f (t ) 2.76(e 1.42t e 5.24t ) . (f) F ( s) 2.76 2.76 10.54 2 s 1.42 s 5.24 s 6.66 s 7.44 The chosen time interval, t 0.1s 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 t 0.1s 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 10.54 s 6.66 s 7.44 2 255 9.21 s 5.94 s 6.00 2 1023 11.10 s 7.41s 9.17 2 Average transfer function model using 3 different length of PRBS 10.18 s 6.67 s 7.54 2 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 Ae t sin t . This response yields a good approximation to impulse response. 2 2.73rad/s 2 .3 (c) ω is obtained from cycle time, (d) α is obtained from peak decay ratio, (e) A is obtained from the first peak height, A 0.312 (f) Divide by the unit impulse response, f (t ) 3.12e 0.9787t sin 2.73t . (g) F ( s) 2 0.06518 ln 0.9787 . 2.3 0.2009 3.12(2.73) 8.52 2 2 2 ( s 0.9787) 2.73 s 1.96 s 8.41 43 The chosen time interval, t 0.1s 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 t 0.1s 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 8.52 s 1.96 s 8.41 2 255 9.04 s 1.87 s 8.68 2 1023 8.60 s 1.94 s 8.39 2 Average transfer function model using 3 different length of PRBS 8.72 s 1.92 s 8.49 2 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 A(e t e t ) . 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, 1.2195 and 6.0976 . (d) A is obtained from value of peak height, A 0.1680 . (e) Divide by the unit impulse response, f (t ) 1.68(e 1.2195t e 6.0976t ) . (f) F ( s) 1.68 1.68 8.20 2 s 1.2195 s 6.0976 s 7.32 s 7.44 The chosen time interval, t 0.1s 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 8.20 s 7.32 s 7.44 2 255 7.13 s 6.82 s 5.79 2 1023 7.16 s 7.15s 6.25 2 Average transfer function model using 3 different length of PRBS 7.50 s 7.10 s 6.49 2 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 t 0.1s 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. PRBS signal x(t) Second order system g(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: 1 (470k) 2 (0.1F ) 2 T ( s) 2 1 s2 s 2 2 ( 470 k )( 0 . 1 F ) (470k) (0.1F ) 452.7 T ( s) 2 s 42.6 s 452.7 54 470k 470k 0.1u VIN VOUT 0.1u 4.7k 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 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 A(e t e t ) . 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). 9.94 and 47.94 . (d) A is obtained from value of peak height, A 1.103 . So, 56 (e) Divide by the unit impulse response, f (t ) 9.19(e 9.94t e 47.94t ) (f) F ( s) 9.19 9.19 349.22 2 s 9.94 s 47.94 s 57.88s 476.52 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. 470k 470k 0.1u VIN VOUT 5k 0.1u 4.7k Figure 4.29 Schematic circuits for underdamped response Transfer function of the second order underdamped response is obtained using this equation: 57 1 (470k) 2 (0.1F ) 2 T ( s) 5k 2 1 s2 s 2 ( 470 k )( 0 . 1 F ) ( 470 k )( 0 . 1 F )( 4 . 7 k ) ( 470 k ) (0.1F ) 2 T ( s) 452.7 s 19.9 s 452.7 2 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 Ae t sin t . This response yields a good approximation to impulse response. 2 17.39rad/s 0.3612 (c) ω is obtained from cycle time, (d) α is obtained from peak decay ratio, 2 0.3098 ln 4.96 . 0.3612 0.7592 59 (e) A is obtained from the first peak height, A 1.073 (f) Divide by the unit impulse response, f (t ) 8.94e 4.96t sin 17.39t . (g) F (s) 8.94(17.39) 155.47 2 2 2 ( s 4.96) 17.39 s 9.92 s 327.01 The transfer function obtained is not very close to the actual transfer function used in the hardware analysis. correlation. This is due to the shorter time duration for 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 Transfer function used in Transfer function obtained system hardware implementation using correlation technique Critically damped 452.7 s 42.6 s 452.7 349.22 s 57.88s 476.52 452.7 s 19.9 s 452.7 155.47 s 9.92 s 327.01 2 Underdamped 2 2 2 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. 1 Type of second Transfer function used in Transfer function obtained order system simulation from correlograms Critically damped 9 s 6s 9 10.18 s 6.67 s 7.54 9 s 2s 9 8.72 s 1.92 s 8.49 9 s 9s 9 7.50 s 7.10 s 6.49 9 s 9 Difficult to obtained using 2 2 Underdamped 2 3 Overdamped 2 4 Undamped 2 2 2 2 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. 1 Type of second Transfer function used in Transfer function obtained order system hardware implementation from correlograms Critically damped 452.7 s 42.6 s 452.6 349.22 s 57.88s 476.52 452.7 s 19.9 s 452.7 155.47 s 9.92 s 327.01 2 2 Underdamped 2 2 2 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 nearbinary pseudorandom signals: an overview. IEEE Trans. Instrum. Meas. 51 (4), 583-588. 2. Van Den Bos, A. (1993). Godfrey, K. Periodic test signals – Properties and use. Perturbation Signals for System Identification. (ch.4). Ed. London, U.K.: Prentice Hall. 3. Darnell, M. (1993). pseudorandom signals. Periodic and nonperiodic, binary and multi-level Godfrey, K. Perturbation Signals for System Identification. (ch.5). Ed. London, U.K.: Prentice-Hall. 4. Godfrey, K. (1993). Introduction to perturbation signals for frequencydomain 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. Identification & Parameter Estimation Lecture Note, UTM Skudai. System 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_noi se); Rxx3 = real(vector3); %real=Real part of complex number figure (1) plot(tout, hold on plot(tout, hold on plot(tout, hold on plot(tout, Rxx, 'magenta'); grid; Rxx1, 'k'); grid; Rxx2, 'b'); grid; 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 on plot(t, Rxy2, 'b'); grid; hold on plot(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 prbs amp(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_noise amp1(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)/ang le1(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_noise amp2(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)/angl e2(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_noise amp3(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)/an gle3(k)); power3(k) = amp3(k)^2; end %plot power againts harmonic number figure (1) plot(harmonic -1, power, 'magenta') hold on plot(harmonic1 -1, power1, 'k') hold on plot(harmonic2 -1, power2, 'b') hold on plot(harmonic3 -1, power3, 'r') hold on APPENDIX B DATASHEETS Revised March 2000 DM74LS112A Dual Negative-Edge-Triggered Master-Slave J-K Flip-Flop with Preset, Clear, and Complementary Outputs General Description This device contains two independent negative-edge-triggered J-K flip-flops with complementary outputs. The J and K data is processed by the flip-flop on the falling edge of the clock pulse. The clock triggering occurs at a voltage level and is not directly related to the transition time of the falling edge of the clock pulse. Data on the J and K inputs may be changed while the clock is HIGH or LOW without affecting the outputs as long as the setup and hold times are not violated. A low logic level on the preset or clear inputs will set or reset the outputs regardless of the logic levels of the other inputs. Ordering Code: 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 Devices also available in Tape and Reel. Specify by appending the suffix letter “X” to the ordering code. Connection Diagram Function Table Inputs PR CLR CLK Outputs 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 H H H X X Toggle Q0 Q0 H = HIGH Logic Level L = LOW Logic Level X = Either LOW or HIGH Logic Level ↓ = Negative Going Edge of Pulse Q0 = 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 when preset and/or clear inputs return to their inactive (HIGH) level. © 2000 Fairchild Semiconductor Corporation DS006382 www.fairchildsemi.com DM74LS112A Dual Negative-Edge-Triggered Master-Slave J-K Flip-Flop with Preset, Clear, and Complementary Outputs August 1986 DM74LS112A Absolute Maximum Ratings(Note 2) Supply Voltage Note 2: The “Absolute Maximum Ratings” are those values beyond which the safety of the device cannot be guaranteed. The device should not be operated at these limits. The parametric values defined in the Electrical Characteristics tables are not guaranteed at the absolute maximum ratings. The “Recommended Operating Conditions” table will define the conditions for actual device operation. 7V Input Voltage 7V 0°C to +70°C Operating Free Air Temperature Range −65°C to +150°C Storage Temperature Range Recommended Operating Conditions Symbol Parameter Min Nom Max Units 4.75 5 5.25 V VCC Supply Voltage VIH HIGH Level Input Voltage VIL LOW Level Input Voltage 0.8 V IOH HIGH Level Output Current −0.4 mA IOL LOW Level Output Current fCLK Clock Frequency (Note 3) fCLK tW V 8 mA 0 30 MHz Clock Frequency (Note 5) 0 25 MHz Pulse Width Clock HIGH 20 (Note 3) tW 2 Preset LOW 25 Clear LOW 25 Pulse Width Clock HIGH 25 (Note 5) Preset LOW 30 Clear LOW 30 ns ns 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↓ TA Free Air Operating Temperature 0 Note 3: CL = 15 pF, R L = 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, R L = 2 kΩ, TA = 25°C and VCC = 5V. www.fairchildsemi.com 2 ns 70 °C over recommended operating free air temperature range (unless otherwise noted) Symbol Parameter Conditions VI Input Clamp Voltage VCC = Min, II = −18 mA VOH HIGH Level VCC = Min, IOH = Max Output Voltage VIL = Max, VIH = Min VOL LOW Level VCC = Min, IOL = Max Output Voltage VIL = Max, VIH = Min Min Typ (Note 6) 2.7 Input Current @ Max VCC = Max, VI = 7V Input Voltage HIGH Level Input Current IIH VCC = Max, VI = 2.7V Units −1.5 V 3.4 IOL = 4 mA, VCC = Min II Max V 0.35 0.5 0.25 0.4 J, K 0.1 Clear 0.3 Preset 0.3 Clock 0.4 J, K 20 Clear 60 Preset 60 Clock IIL LOW Level Input Current VCC = Max, VI = 0.4V Short Circuit Output Current VCC = Max (Note 7) ICC Supply Current VCC = Max (Note 8) mA µA 80 J, K −0.4 Clear −0.8 Preset −0.8 mA −0.8 Clock IOS V −20 −100 mA 6 mA 4 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 RL = 2 kΩ From (Input) Symbol Parameter To (Output) CL = 15 pF Min fMAX Maximum Clock Frequency tPLH Propagation Delay Time LOW-to-HIGH Level Output tPHL Propagation Delay Time HIGH-to-LOW Level Output tPLH Propagation Delay Time LOW-to-HIGH Level Output tPHL Propagation Delay Time HIGH-to-LOW Level Output tPLH Propagation Delay Time LOW-to-HIGH Level Output tPHL Propagation Delay Time HIGH-to-LOW Level Output Max 30 CL = 50 pF Min Units Max 25 MHz Preset to Q 20 24 ns Preset to Q 20 28 ns Clear to Q 20 24 ns Clear to Q 20 28 ns Clock to Q or Q 20 24 ns Clock to Q or Q 20 28 ns 3 www.fairchildsemi.com DM74LS112A Electrical Characteristics DM74LS112A Physical Dimensions inches (millimeters) unless otherwise noted 16-Lead Small Outline Integrated Circuit (SOIC), JEDEC MS-012, 0.150 Narrow Package Number M16A www.fairchildsemi.com 4 16-Lead Plastic Dual-In-Line Package (PDIP), JEDEC MS-001, 0.300 Wide Package Number N16E Fairchild does not assume any responsibility for use of any circuitry described, no circuit patent licenses are implied and Fairchild 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 SUPPORT DEVICES OR SYSTEMS WITHOUT THE EXPRESS WRITTEN APPROVAL OF THE PRESIDENT OF FAIRCHILD SEMICONDUCTOR CORPORATION. As used herein: 2. A critical component in any component of a life support device or system whose failure to perform can be reasonably expected to cause the failure of the life support device or system, or to affect its safety or effectiveness. 1. Life support devices or systems are devices or systems which, (a) are intended for surgical implant into the body, or (b) support or sustain life, and (c) whose failure to perform when properly used in accordance with instructions for use provided in the labeling, can be reasonably expected to result in a significant injury to the user. www.fairchildsemi.com 5 www.fairchildsemi.com DM74LS112A Dual Negative-Edge-Triggered Master-Slave J-K Flip-Flop with Preset, Clear, and Complementary Outputs Physical Dimensions inches (millimeters) unless otherwise noted (Continued) SN54/74LS86 QUAD 2-INPUT EXCLUSIVE OR GATE QUAD 2-INPUT EXCLUSIVE OR GATE LOW POWER SCHOTTKY VCC 14 13 12 11 10 9 8 J SUFFIX CERAMIC CASE 632-08 14 1 2 3 4 5 6 1 7 GND N SUFFIX PLASTIC CASE 646-06 14 1 TRUTH TABLE IN OUT A B Z L L H H L H L H L H H L 14 1 D SUFFIX SOIC CASE 751A-02 ORDERING INFORMATION SN54LSXXJ SN74LSXXN SN74LSXXD Ceramic Plastic SOIC GUARANTEED OPERATING RANGES Symbol Parameter Min Typ Max Unit VCC Supply Voltage 54 74 4.5 4.75 5.0 5.0 5.5 5.25 V TA Operating Ambient Temperature Range 54 74 – 55 0 25 25 125 70 °C IOH Output Current — High 54, 74 – 0.4 mA IOL Output Current — Low 54 74 4.0 8.0 mA FAST AND LS TTL DATA 5-1 SN54/74LS86 DC CHARACTERISTICS OVER OPERATING TEMPERATURE RANGE (unless otherwise specified) Limits S b l Symbol Min P Parameter VIH Input HIGH Voltage VIL Input LOW Voltage VIK Input Clamp Diode Voltage VOH Output HIGH Voltage VOL Output LOW Voltage IIH Input HIGH Current IIL Input LOW Current IOS Short Circuit Current (Note 1) ICC Power Supply Current Typ Max 2.0 54 0.7 74 0.8 – 0.65 – 1.5 U i Unit T Test C Conditions di i V Guaranteed Input HIGH Voltage for All Inputs V Guaranteed Input p LOW Voltage g for All Inputs V VCC = MIN, IIN = – 18 mA 54 2.5 3.5 V 74 2.7 3.5 V VCC = MIN,, IOH = MAX,, VIN = VIH or VIL per Truth Table 54, 74 0.25 0.4 V IOL = 4.0 mA 74 0.35 0.5 V IOL = 8.0 mA VCC = VCC MIN, VIN = VIL or VIH per Truth Table 40 µA VCC = MAX, VIN = 2.7 V 0.2 mA VCC = MAX, VIN = 7.0 V – 0.8 mA VCC = MAX, VIN = 0.4 V –100 mA VCC = MAX 10 mA VCC = MAX Typ Max U i Unit – 20 Note 1: Not more than one output should be shorted at a time, nor for more than 1 second. AC CHARACTERISTICS (TA = 25°C) Limits S b l Symbol P Parameter Min tPLH tPHL Propagation Delay, Other Input LOW 12 10 23 17 ns tPLH tPHL Propagation Delay, Other Input HIGH 20 13 30 22 ns FAST AND LS TTL DATA 5-2 T Test C Conditions di i VCC = 5.0 V CL = 15 pF Revised March 2000 DM74LS04 Hex Inverting Gates General Description This device contains six independent gates each of which performs the logic INVERT function. Ordering Code: 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 Devices also available in Tape and Reel. Specify by appending the suffix letter “X” to the ordering code. Connection Diagram Function Table Y=A Input Output A Y L H H L H = HIGH Logic Level L = LOW Logic Level © 2000 Fairchild Semiconductor Corporation DS006345 www.fairchildsemi.com DM74LS04 Hex Inverting Gates August 1986 DM74LS04 Absolute Maximum Ratings(Note 1) Supply Voltage Note 1: The “Absolute Maximum Ratings” are those values beyond which the safety of the device cannot be guaranteed. The device should not be operated at these limits. The parametric values defined in the Electrical Characteristics tables are not guaranteed at the absolute maximum ratings. The “Recommended Operating Conditions” table will define the conditions for actual device operation. 7V Input Voltage 7V 0°C to +70°C Operating Free Air Temperature Range −65°C to +150°C Storage Temperature Range Recommended Operating Conditions Symbol Parameter Min Nom Max Units 4.75 5 5.25 V VCC Supply Voltage VIH HIGH Level Input Voltage 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 70 °C 2 V 0 Electrical Characteristics over recommended operating free air temperature range (unless otherwise noted) Symbol Parameter Conditions VI Input Clamp Voltage VCC = Min, II = −18 mA VOH HIGH Level VCC = Min, IOH = Max, Output Voltage VIL = Max VOL LOW Level VCC = Min, IOL = Max, Output Voltage VIH = Min Typ Min (Note 2) 2.7 −1.5 V V 0.35 0.5 0.25 0.4 VCC = Max, VI = 7V Input Current @ Max Units 3.4 IOL = 4 mA, VCC = Min II Max 0.1 V 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) −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 −20 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 RL = 2 kΩ Symbol tPLH Propagation Delay Time LOW-to-HIGH Level Output tPHL CL = 15 pF Parameter Propagation Delay Time HIGH-to-LOW Level Output www.fairchildsemi.com CL = 50 pF Units Min Max Min Max 3 10 4 15 ns 3 10 4 15 ns 2 DM74LS04 Physical Dimensions inches (millimeters) unless otherwise noted 14-Lead Small Outline Integrated Circuit (SOIC), JEDEC MS-120, 0.150 Narrow Package Number M14A 3 www.fairchildsemi.com DM74LS04 Physical Dimensions inches (millimeters) unless otherwise noted (Continued) 14-Lead Small Outline Package (SOP), EIAJ TYPE II, 5.3mm Wide Package Number M14D www.fairchildsemi.com 4 DM74LS04 Hex Inverting Gates Physical Dimensions inches (millimeters) unless otherwise noted (Continued) 14-Lead Plastic Dual-In-Line Package (PDIP), JEDEC MS-001, 0.300 Wide Package Number N14A Fairchild does not assume any responsibility for use of any circuitry described, no circuit patent licenses are implied and Fairchild 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 SUPPORT DEVICES OR SYSTEMS WITHOUT THE EXPRESS WRITTEN APPROVAL OF THE PRESIDENT OF FAIRCHILD SEMICONDUCTOR CORPORATION. As used herein: 2. A critical component in any component of a life support device or system whose failure to perform can be reasonably expected to cause the failure of the life support device or system, or to affect its safety or effectiveness. 1. Life support devices or systems are devices or systems which, (a) are intended for surgical implant into the body, or (b) support or sustain life, and (c) whose failure to perform when properly used in accordance with instructions for use provided in the labeling, can be reasonably expected to result in a significant injury to the user. www.fairchildsemi.com 5 www.fairchildsemi.com LM741 Operational Amplifier General Description The LM741 series are general purpose operational amplifiers which feature improved performance over industry standards 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 application nearly foolproof: overload protection on the input and output, no latch-up when the common mode range is exceeded, 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 a 70§ C temperature range, instead of b55§ C to a 125§ C. Schematic Diagram TL/H/9341 – 1 Offset Nulling Circuit TL/H/9341 – 7 C1995 National Semiconductor Corporation TL/H/9341 RRD-B30M115/Printed in U. S. A. LM741 Operational Amplifier November 1994 Absolute Maximum Ratings If Military/Aerospace specified devices are required, please contact the National Semiconductor Sales Office/ Distributors for availability and specifications. (Note 5) LM741A LM741E LM741 LM741C g 22V g 22V g 22V g 18V Supply Voltage Power Dissipation (Note 1) 500 mW 500 mW 500 mW 500 mW g 30V g 30V g 30V g 30V Differential Input Voltage g 15V g 15V g 15V g 15V Input Voltage (Note 2) Output Short Circuit Duration Continuous Continuous Continuous Continuous b 55§ C to a 125§ C b 55§ C to a 125§ C 0§ C to a 70§ C 0§ C to a 70§ C Operating Temperature Range b 65§ C to a 150§ C b 65§ C to a 150§ C b 65§ C to a 150§ C b 65§ C to a 150§ C Storage Temperature Range Junction Temperature 150§ C 100§ C 150§ C 100§ C Soldering Information N-Package (10 seconds) 260§ C 260§ C 260§ C 260§ C J- or H-Package (10 seconds) 300§ C 300§ C 300§ C 300§ C M-Package Vapor Phase (60 seconds) 215§ C 215§ C 215§ C 215§ C Infrared (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 Conditions LM741A/LM741E Min Input Offset Voltage TA e 25§ C RS s 10 kX RS s 50X Typ Max 0.8 3.0 TAMIN s TA s TAMAX RS s 50X RS s 10 kX TA e 25§ C, VS e g 20V Input Offset Current TA e 25§ C 5.0 Units Typ Max 2.0 6.0 7.5 g 15 3.0 g 15 TA e 25§ C 30 30 20 200 70 85 500 20 200 nA 300 nA nA/§ C 80 80 0.210 TA e 25§ C, VS e g 20V 1.0 TAMIN s TA s TAMAX, VS e g 20V 0.5 6.0 500 80 1.5 0.3 2.0 0.3 TA e 25§ C g 12 50 TAMIN s TA s TAMAX, RL t 2 kX, VS e g 20V, VO e g 15V VS e g 15V, VO e g 10V VS e g 5V, VO e g 2V 32 2.0 500 nA 0.8 mA MX MX TAMIN s TA s TAMAX TA e 25§ C, RL t 2 kX VS e g 20V, VO e g 15V VS e g 15V, VO e g 10V mV mV mV 0.5 TAMIN s TA s TAMAX mV mV mV/§ C g 10 Average Input Offset Current Drift Large Signal Voltage Gain 1.0 Min 6.0 TAMIN s TA s TAMAX Input Voltage Range Max 15 Input Offset Voltage Adjustment Range Input Resistance LM741C Typ 4.0 Average Input Offset Voltage Drift Input Bias Current LM741 Min g 12 g 13 50 200 25 10 2 g 13 V V 20 15 200 V/mV V/mV V/mV V/mV V/mV Electrical Characteristics (Note 3) (Continued) Parameter Conditions LM741A/LM741E Min Output Voltage Swing VS e g 20V RL t 10 kX RL t 2 kX Typ Max 10 10 25 Common-Mode Rejection Ratio TAMIN s TA s TAMAX RS s 10 kX, VCM e g 12V RS s 50X, VCM e g 12V 80 95 86 96 TAMIN s TA s TAMAX, VS e g 20V to VS e g 5V RS s 50X RS s 10 kX Transient Response Rise Time Overshoot TA e 25§ C, Unity Gain Bandwidth (Note 4) TA e 25§ C Slew Rate TA e 25§ C, Unity Gain Supply Current TA e 25§ C LM741A LM741E LM741 Min Typ Units Max V V TA e 25§ C TAMIN s TA s TAMAX 0.25 6.0 TA VS VS LM741C Max g 15 Output Short Circuit Current Power Consumption Typ g 16 VS e g 15V RL t 10 kX RL t 2 kX Supply Voltage Rejection Ratio LM741 Min 0.437 1.5 0.3 0.7 e 25§ C e g 20V e g 15V 80 g 12 g 14 g 12 g 14 g 10 g 13 g 10 g 13 35 40 0.8 20 25 V V 25 mA mA dB dB 70 90 70 90 77 96 77 96 dB dB 0.3 5 0.3 5 ms % 0.5 0.5 V/ms MHz 1.7 2.8 1.7 2.8 mA 50 85 50 85 mW mW 150 VS e g 20V TA e TAMIN TA e TAMAX 165 135 mW mW VS e g 20V TA e TAMIN TA e TAMAX 150 150 mW mW VS e g 15V TA e TAMIN TA e TAMAX 60 45 100 75 mW 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 N/A N/A 25§ C/W N/A ijC (Junction to Case) Note 2: For supply voltages less than g 15V, the absolute maximum input voltage is equal to the supply voltage. Note 3: Unless otherwise specified, these specifications apply for VS e g 15V, b 55§ C s TA s a 125§ C (LM741/LM741A). For the LM741C/LM741E, these specifications are limited to 0§ C s TA s a 70§ 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 Ceramic Dual-In-Line Package Metal Can Package TL/H/9341–2 TL/H/9341 – 5 Order Number LM741H, LM741H/883*, LM741AH/883 or LM741CH See NS Package Number H08C Order Number LM741J-14/883*, LM741AJ-14/883** See NS Package Number J14A *also available per JM38510/10101 **also available per JM38510/10102 Dual-In-Line or S.O. Package Ceramic Flatpak TL/H/9341 – 6 Order Number LM741W/883 See NS Package Number W10A TL/H/9341–3 Order Number LM741J, LM741J/883, LM741CM, LM741CN or LM741EN See NS Package Number J08A, M08A or N08E *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 LM741 Operational Amplifier 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 systems which, (a) are intended for surgical implant into the body, or (b) support or sustain life, and whose failure to perform, when properly used in accordance with instructions for use provided in the labeling, can be reasonably expected to result in a significant injury to the user. National Semiconductor Corporation 1111 West Bardin Road Arlington, TX 76017 Tel: 1(800) 272-9959 Fax: 1(800) 737-7018 2. A critical component is any component of a life support device or system whose failure to perform can be reasonably expected to cause the failure of the life support device or system, or to affect its safety or effectiveness. National Semiconductor Europe Fax: (a49) 0-180-530 85 86 Email: cnjwge @ tevm2.nsc.com Deutsch Tel: (a49) 0-180-530 85 85 English Tel: (a49) 0-180-532 78 32 Fran3ais Tel: (a49) 0-180-532 93 58 Italiano Tel: (a49) 0-180-534 16 80 National Semiconductor Hong Kong Ltd. 13th Floor, Straight Block, Ocean Centre, 5 Canton Rd. Tsimshatsui, Kowloon Hong Kong Tel: (852) 2737-1600 Fax: (852) 2736-9960 National Semiconductor Japan Ltd. Tel: 81-043-299-2309 Fax: 81-043-299-2408 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 Application of Pseudo Random Binary Sequence (PRBS) signal in system identification Prepared by: Maimun binti Huja Husin ME061188 Masters of Electrical Engineering (Mechatronics) Universiti Teknologi Malaysia Supervised by: PM. Dr. Mohd Fua’ad Bin Hj. Rahmat 1 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 2 Objectives To design and generate PRBS generator with different maximum length sequence (MLS) using software (MATLAB) To design PRBS generator using hardware (Transistor-transistor logic-TTL) To analyze the characteristic of PRBS signal such as ACF, CCF, and PSD using MATLAB and dynamic signal analyzer. To perform an experiment using real system where PRBS is the test input. 3 Scope of project Designing PRBS generator with 15 different maximum length sequence using MATLAB (SIMULINK) and hardware implementation using transistor transistor logic The response of simulated second order systems using PRBS signal as test input will be investigated using MATLAB (SIMULINK) and will be validated using hardware implementation 4 Project background Most existing test input (e.g. step, ramp, impulse or sinusoidal input) Characteristics: Ease of signal generation, Ease of analysis & The physical understanding of system response which result Problem: Not practical because of limitations imposed by the existence of system noise PRBS Characteristics: Popular input signal for system identification, Resembles a white noise correlation function & Easy to generate using an n stage shift register 5 Methodology Literature Review Designing PRBS generator using MATLAB (SIMULINK) Tests the PRBS signal on simulated second order systems using MATLAB (SIMULINK) Build PRBS generator using TTL Test the PRBS signal on real second order system No Verify? Yes End 6 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 length sequence (length N=2n-1, where n is an integer) Generated by an n shift register 7 Theory The first stage of the shift register is determined by feedback of the appropriate modulo two sum (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 8 Theory 1 xx ( ) lim T 2T T x(t ) x(t )dt T x(t ) y(t )dt T T x(t ) x(t )dt T 1 xy ( ) lim T 2T T y(t ) x(t )dt T ACF T or or 1 xx ( ) lim T 2T 1 xy ( ) lim T 2T 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. 9 Theory Steps to determine the transfer functions model of system Start Calculate impulse strength of the input signal Impulse strength = height of ACF triangle x bit interval Determine transfer function general form Calculate model parameter Plug in all the parameters into transfer function general form End 10 Result, Analysis & Discussion On PRBS signal as test signal (simulation) 11 PRBS signal as test signal (simulation) Four condition of second order system will be examined: overdamped, underdamped, undamped and critically damped 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 No Type of second order system Damping ratio, ξ Transfer function 1 Critically damped 1.00 9 / (s2+6s+9) 2 Underdamped 0.33 9 / (s2+2s+9) 3 Overdamped 1.50 9 / (s2+9s+9) 4 Undamped 0.00 9 / (s2+9) 12 PRBS signal as test signal (simulation) – critically damped Block diagram of second order system critically damped (ξ = 1) 13 PRBS signal as test signal (simulation) – critically damped Output responses 14 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 of signal power) Autocorrelation function of input & output signals 15 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 this system Period of 6.3s correctly exceeds the system settling time sequence of N = 31 could have been used instead Cross correlation function of output signals 16 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 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 17 PRBS signal as test signal (simulation) – critically damped ACF of input signal and CCF of output signals are used to determine 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 PRBS maximum length Length, N Transfer function 63 10.54/(s2+6.66s+7.44) 255 9.21/(s2+5.94s+6.00) 1023 11.10/(s2+7.41s+9.17) Transfer function used in the simulation: 9 / (s2+6s+9) 18 PRBS signal as test signal (simulation) – under damped Block diagram of second order system under damped (0 < ξ < 1) 19 PRBS signal as test signal (simulation) – under damped Output responses 20 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 of signal power) Autocorrelation function of input & output signals 21 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 this system Period of 6.3s correctly exceeds the system settling time sequence of N = 31 could have been used instead Cross correlation function of output signals 22 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 23 PRBS signal as test signal (simulation) – under damped ACF of input signal and CCF of output signals are used to determine 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 maximum length Length, N Transfer function 63 8.52/(s2+1.96s+8.41) 255 9.04/(s2+1.87s+8.68) 1023 8.60/(s2+1.94s+8.39) Transfer function used in the simulation 9 / (s2+2s+9) 24 Result, Analysis & Discussion On PRBS signal generator (hardware) 25 PRBS signal generator (hardware) PRBS generator circuit Supply voltage PRBS Signal Clock circuit PRBS Generator Feedback circuit 26 PRBS signal generator (hardware) PRBS generator circuit for MLS (hardware implementation) ACF and PSD of PRBS signal is performed using the Dynamic Signal Analyzer (HP35670A DSA) 27 PRBS signal generator (hardware) 512 data of the PRBS signal is captured using Dynamic Signal Analyzer for every MLS of PRBS signal MATLAB is used to plot the PRBS signal, autocorrelation and power spectral density PRBS signal for MLS of N = 63 28 PRBS signal generator (hardware) The height of the ACF triangle, V2 = 0.95V and the bit interval is 0.1281s Autocorrelation function for MLS of N = 63 29 PRBS signal generator (hardware) The lowest frequency component is 70Hz – which is a bit higher than the calculated values 2π/Δt = 57Hz Power spectral density for MLS of N = 63 30 Result, Analysis & Discussion On PRBS signal as test signal (hardware) 31 PRBS signal as test signal (hardware) A PRBS signal is used as an input signal to determine the model of second order system The autocorrelation of the input signal and cross correlation between the input and output signal is performed using the Dynamic Signal Analyzer (HP35670A DSA) PRBS signal x(t) Second order system g(t) Output response y(t) 32 PRBS signal as test signal (hardware) 1 R 2C 2 1 1 A( s) R 2 2 4 s 1 s R C R C R R 2C 2 1 1 3 1 1 1 1 where R1 R2 470k; R3 4.7 k; R4 10k (potentiometer); C1 C2 0.1F R1 R2 C2 VIN VOUT R4 C1 R3 Second order RC circuit 452.7 (under damped) 2 s 19.9 s 452.7 452.7 R4 0 A( s ) 2 (critically damped) s 42.6 s 452.7 R4 5k A( s) 33 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 34 PRBS signal as test signal (hardware) – Critically damped ACF of the measurement result has the value close to the prediction value ACF of the output signal 35 PRBS signal as test signal (hardware) – Critically damped CCF of the input and output signal 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) 36 PRBS signal as test signal (hardware) – Underdamped The measurement values obtained follow the prediction values. Output signal using PRBS of MLS N=63 37 PRBS signal as test signal (hardware) – Underdamped Measurement result has the value close to the prediction value ACF of the output signal 38 PRBS signal as test signal (hardware) – Underdamped CCF of the input and output signal 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) 39 Conclusion PRBS is a good input signal for system identification - easy to generate and introduce into a system Length of the MLS can be set according to the system under test – some system require higher MLS values PRBS signal as test input has successfully design except for the undamped and overdamped system 40 Future works Software: More convenient if GUI can be designed for the PRBS generator & its application Hardware: Test PRBS signal as test input to undamped and overdamped second order system Perform experiment on real system (e.g. suspension system) where PRBS is the test input 41 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 nearbinary 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-level pseudorandom signals. Godfrey, K. Perturbation Signals for System Identification. (ch.5). Ed. London, U.K.: Prentice-Hall. Godfrey, K. (1993). Introduction to perturbation signals for frequencydomain system identification. Godfrey, K. Perturbation Signals for System Identification. (ch.2). Ed. London, U.K.: Prentice-Hall. 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. 42 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 timedomain system identification. Godfrey, K. Perturbation Signals for System Identification. (ch.1). Ed. Englewood Cliffs, NJ: Prentice Hall. 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. Zapernick, H.-J. and Finger, A. (2005). Pseudo Random Signal Processing – Theory and Application. Chichester: John Wiley & Sons, Ltd. Sodestrom, T. and Stoica, P. (1989). System Identification. Hertfordshire: Prentice Hall International (UK) Ltd. 43 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 directiondependent responses, with gas – turbine engine applications. Automatica, 10(5), 469–481. Tan, A. H. and Godfrey, K. R. (2001). Identification of processes with directiondependent 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 with direction-dependent dynamics. Proc. 39th IEEE Conf. Decision Control (CDC 2000), 2843–2848. 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. Rahmat, M. F. (2007). Pseudo random binary sequence. System Identification & Parameter Estimation Lecture Note, UTM Skudai. 44