* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download nDSP1 - School of Computer Science
Direction finding wikipedia , lookup
Regenerative circuit wikipedia , lookup
Phase-locked loop wikipedia , lookup
Radio direction finder wikipedia , lookup
Electronic engineering wikipedia , lookup
Audio crossover wikipedia , lookup
Battle of the Beams wikipedia , lookup
Signal Corps (United States Army) wikipedia , lookup
Radio transmitter design wikipedia , lookup
Oscilloscope types wikipedia , lookup
Oscilloscope history wikipedia , lookup
Mathematics of radio engineering wikipedia , lookup
Opto-isolator wikipedia , lookup
Telecommunication wikipedia , lookup
Broadcast television systems wikipedia , lookup
Analogue filter wikipedia , lookup
Analog-to-digital converter wikipedia , lookup
Passive radar wikipedia , lookup
Cellular repeater wikipedia , lookup
Analog television wikipedia , lookup
Index of electronics articles wikipedia , lookup
Linear filter wikipedia , lookup
University of Manchester Department of Computer Science CS3291 : Digital Signal Processing ‘05-‘06 Section 1: Introduction A signal is a time-varying measurable quantity whose variation normally conveys information. The quantity is often a voltage obtained from some transducer e.g. a microphone. It is useful to define two types of signal: (a) analogue signals, which are continuous functions of time (t) measured in seconds, and exist for all values of time in the range - to +. Examples of analogue signals are: (i) 5sin(62.82t) i.e. a sine wave of frequency 62.82 radians per second (i.e. approx. 10 Hz) 0:t<0 (ii) u(t) = i.e. a " step function " signal. 1:t0 Plotting graphs of these analogue signals against time gives a continuous 'waveform' for each as illustrated below: Voltage Voltage 5 -0.1 1 0.1 t t (b) discrete-time signals which exist only at discrete points in time. Such a signal is often obtained by sampling an analogue signal, i.e. measuring its value at discrete points in time. Sampling points are usually separated by equal intervals of time, say T seconds. Given an analogue signal x(t) and denoting by x[n] the value of x(t) when t=nT, the sampling process produces a sequence of numbers: { ..., x[-2], x[-1], x[0], x[1], x[2], ..... } which is referred to as {x[n]} or ' the sequence x[n] '. The sequence exists for all integer values of n in the range - to . Examples of discrete time signals are: (i) {..., -4, -2, 0, 2, 4, 6, ....} i.e. a sequence whose nth element, x[n], is defined by the formula x[n] = 2n. It is useful to underline the sample corresponding to n = 0. (ii) { ..., -4.75, -2.94, 0, 2.94, 4.75, 4.76, ...} i.e. a sequence whose nth element x[n] = 5 sin(62.82t) with t=nT and T=0.01. (iii) { ..., 0, ..., 0. 0, 1, 1, 1, ..., 1, ...} i.e. a “ unit step ” sequence whose nth element is: 0:n<0 u[n] = 1:n0 Discrete time signals are represented graphically as shown below for example (i): CS3291 1.2 5/6/2017 BMGC x[n] -3 -2 -1 n 2-2- 1 2 3 4 Discrete time signals are often generated by 'analogue to digital conversion' (ADC) devices which produce binary numbers to represent sampled voltages or currents. The accuracy of conversion is determined by the 'word-length ' of the ADC device, i.e. the number of bits available for each binary number. The process of truncating or rounding the sampled value to the nearest available binary number is termed ' quantisation ' and the resulting sequence of quantised numbers is termed a 'digital signal '. A digital signal is therefore a discrete time signal with each sample digitised for arithmetic processing. Signal Processing: Analogue signals may be "processed" in various ways by circuits typically consisting of resistors, capacitors, inductors, transistors and operational amplifiers. Digital signals may be "processed" using programmed computers, microcomputers or special purpose digital hardware. Examples of the type of processing that may be carried out are: (i) amplification or attenuation : making the voltage waveform larger or smaller. (ii) filtering : e.g. 'filtering out' some unwanted part of the signal. (iii) rectification : making the waveform purely positive, e.g. by zeroing all negative values. (iv) modulation : multiplying the signal by another signal, e.g. a high frequency sine wave. Applications of digital signal processing can be divided into 'real time' and 'non real time' processing. A mobile phone contains a 'DSP' processor that is fast and powerful enough to perform the mathematical operations required to filter digitised speech (and process it in other ways as well) as the speech is being received. This is real time processing. A standard PC can perform 'non-real time' DSP processing on a stored recording of music and can take as much time as it needs to complete this processing. Non real time DSP is extremely useful in its own right; consider MP3 compression as an example. It is also used to 'simulate' the software for real time DSP systems before they are actually built into special purpose hardware, say for a mobile phone. The simulated DSP systems may be tested with stored segments of speech representative of what is expected when people talk into a mobile phone for real. Real time DSP is often implemented using 'fixed point' microprocessors since these consume much less power and are less expensive than 'floating point' devices. A fixed point processor deals with all numbers as though they were integers, and the numbers are often restricted to a word-length of only 16 bits. Overflow (numbers becoming too big for 16 bits) can easily occur with disastrous consequences to the sound quality. If we try to avoid the possibility of overflow by scaling numbers to keep them small in amplitude, they may then not be represented accurately enough as the quantisation (rounding or truncation to the nearest integer) incurs error which is a larger proportion of the value being represented. Fixed point DSP programming can be quite a difficult task. When we use a PC to perform non real time DSP, we normally have floating point operations available with word-lengths that are larger than 16 bits. This makes the task much easier. However when simulating fixed point real time DSP on a PC, it is possible to deliberately restrict the program to integer arithmetic, and this is very useful. CS3291 1.3 5/6/2017 BMGC Examples of signals commonly processed in digital form are as follows: Speech, as encountered in telephony, for example. Biomedical signals such as heart signals and “brain waves”. Sound and music. Video and images. Radar and sonar signals. Advantages of digital as opposed to analogue signal processing include the following: More and more signals are being transmitted and/or stored in digital form so it makes sense to process them in digital form also. Digital signal processing (DSP) systems can be designed and tested in “simulation” using universally available computing equipment (e.g. PCs with sound and vision cards). Guaranteed accuracy, as pre-determined by word-length and sampling rate. Perfect reproducibility. Every copy of a DSP system will perform identically. The characteristics of the system will not drift with temperature or ageing Advantage can be taken of the availability of advanced semiconductor VLSI technology. DSP systems are flexible in that they can be reprogrammed to modify their operation without changing the hardware. Products can be distributed/sold and updated via Internet. Digital VLSI technology is now so powerful that DSP systems can now perform functions that would be extremely difficult or impossible in analogue form. Two examples of such functions are : (I) adaptive filtering (where the parameters of a digital filter are variable and must be adapted to the characteristics of the input signal ) and (II) speech recognition which is again based on information obtained from speech by digital filtering. Disadvantages of digital signal processing: DSP designs can be expensive especially for high bandwidth signals where fast analogue/digital conversion is required. The design of DSP systems can be extremely time-consuming and a highly complex and specialised activity. There is an acute shortage of computer science and electrical engineering graduates with the knowledge and skill required. The power requirements for DSP devices can be high, thus making them unsuitable for battery powered portable devices such as mobile telephones. Fixed point processing devices (offering integer arithmetic only) are available which are simpler than floating point devices and less power consuming. However the ability to program such devices is a particularly valued and difficult skill. Some processes, e.g. amplification, filtering and certain types of modulation may be classed as being "linear". Processes may also be "time-invariant" e.g. amplification, filtering and rectification are time-invariant. Processes which are both linear and time-invariant, e.g. amplification and filtering, are often referred to as LTI processes. An understanding of the basic concepts of linearity and time-invariance is vital for signal processing. It will be seen that the two concepts lead directly to formulae for the frequency response and the system function of an analogue or discrete time LTI signal processing system in terms of its impulse response. These formulae are well known as the Fourier, Laplace and z-transforms, and are all related to the idea of 'convolution'. An understanding of Fourier, Laplace and z-transforms allows us to clearly understand the effects of processing systems on analogue and discrete-time signals, and leads to useful design methods for such systems. CS3291 1.4 5/6/2017 BMGC Modern signal processing systems are becoming more and more digital, using discrete time methods programmed on special-purpose microprocessors which are fast enough to compute each output in "real time". Analogue signals must therefore be converted into digital form and viceversa. The effects of sampling, analogue-to-digital and digital-to-analogue conversion are studied in this course, and an introduction to the Fast Fourier transform (FFT) and its many applications, including spectral estimation, is also given. Summary of Course Objectives:1. Understanding of the current importance of DSP, its jargon, the meaning of real time processing and the advantages/disadvantages of processing signals in sampled form. Definition of continuous time (analogue), discrete time and digital signals. Sampling and quantisation in general terms. 2. Brief review of analogue and digital signal processing systems, Transfer function and frequency-response of an analogue filter. Low-pass and band-pass analogue filters. Butterworth low-pass gain response approximation. 3. Discrete time linear time-invariant (LTI) signal processing systems. Recursive and non-recursive difference equations. Signal flow-graphs and their implementation by simple computer programs. Linearity, time invariance and impulse-response for discrete time systems. Definition of finite impulse response (FIR) and infinite impulse response (IIR) type digital filters. Stability and causality. Time-domain convolution. Frequency response as discrete time Fourier transform (DTFT) of impulse response. Gain and phase responses. Linear phase and group delay. Inverse DTFT. Use of MATLAB for analysing the frequency-response of digital filters. 4. Design of FIR digital filters: Windowing method. Implementation of FIR digital filters. Effect of increasing order and use of non-rectangular windows. Alternative methods. . 5: Introduction to z-transforms and IIR type discrete time filters System function, H(z), as z-transform of impulse response. Relationship between system function, difference equation, signal flow-graph and software implementation of FIR and IIR type digital filters. Poles and zeros. Distance rule for estimating the gain response of a digital filter from an Argand diagram (z-plane) of poles and zeros. Design of a digital IIR "notch" filter and a resononator by pole/zero placement. Application to these filters to sound recordings. 6: Design of IIR type digital filters using analogue filter approximations Derivative approximation technique. Bilinear transformation method . Survey of alternative techniques. 7: Digital processing of analogue signals and other data Sampling theory, aliasing, effect of quantisation and, sample and hold reconstruction. Oversampling to simplify analogue filters. Overall design of a digital system for processing analogue signals. Processing of other time-series. 8. Introduction to the discrete Fourier transform (DFT) Derivation of DFT from DTFT. Inverse DFT. Effects of windowing CS3291 1.5 5/6/2017 BMGC and frequency domain sampling. Non-rectangular windows. Implementation of the DFT by the 'fast Fourier transform' algorithm (FFT) and speed comparison of direct DFT with FFT. Use of DFT and FFT for spectral estimation. 9. The use of MATLAB e.g. for designing, implementing and evaluating digital filters. Background knowledge needed:1. Basic mathematics (e.g. complex numbers, Argand diagram, modulus & argument, differentiation, simple integration, sum of an arithmetic series, complex roots of unity, factorisation of quadratic equation, De Moivre's Theorem, exponential function, natural logarithms). 2. Experience with any high-level computer programming language. 3. Material from the 2nd Yr Course CS2232: Signals & Systems. 4. Some material from CS2222: i.e. gain-responses of simple analogue filters. Recommended Book: 1. S.W. Smith, "Scientist and Engineer's Guide to Digital Signal Processing " California Tech. Publishing, 2nd ed., 1999, available complete at: http://www.dspguide.com/ Problems: 1.1. Why do we call continuous time signals “analogue”. 1.2. When could you describe a SIGNAL as being linear? 1.3 Give a formula for an analogue signal which is zero until t=0 and then becomes equal to a 50 Hz sine wave of amplitude 1 Volt. 1.4. Given that u(t) is an analogue step function, sketch the signal u(t)sin(2.5t). 1.5 If u(t)sin(5t) is sampled at intervals of T=0.1 seconds, what discrete time signal is obtained? What is the sampling frequency? 1.6. What is the difference between a discrete time signal and a digital signal? 1.7. Define (i) amplification, (ii) filtering, (iii) rectification and (iv) modulation. 1.8. From the types of signals listed as being commonly processed by DSP, choose one and describe a form of DSP processing which may usefully be applied to it. 1.9. There are many advantages of DSP other than those listed. Give one more. 1.10. Can you give one further possible disadvantage of DSP? 1.11. What is meant by the terms “fixed point” and “floating point”? 1.12. What does the term “filter” normally mean to an Electrical/Electronic Engineer or Computer Scientist? Explain the terms “analogue filter” and “digital filter”. 1.13. What is meant by the term “real time” in DSP? 1.14. DSP is often implemented in real time, e.g. to filter digitised speech received by a mobile phone. Can you think of an application of DSP where the processing of a digitised analogue signal need not be carried out in real time? 1.15. There are many applications of DSP where the digital signal being processed is not obtained by sampling an analogue signal. Give some examples. 1.16. Give the modulus and argument of each of the two complex numbers: 3+4j and -3e4j. Plot these numbers on an Argand diagram and calculate the distance between them. 1.17. The analogue signal: x(t) = 4 cos(t) is passed through an electronic circuit that differentiates it with respect to t. Give a formula for the output. Plot the amplitude and phase of the CS3291 1.6 5/6/2017 BMGC sinusoid obtained (if it is a sinusoid) against the frequency in the range 0 to 20 radians/second. 1.18. The analogue signal: x(t) = 4 cos(t) is passed through a circuit that integrates it with respect to t. Give a formula for the output and plot its amplitude & phase against as before. 1.19. Sum the geometric series: 1 + e-j + e-2j + e-3j + … + e-Nj. 1.20. Sum the infinite geometric series: 1 + 0.9e-j + 0.81e-2j + 0.729e-3j + … 1.21. Show that 1 + e-j = 2e-j/2[cos(/2)] and hence plot the modulus and argument of this complex number against in the range 0 to . 1.22. Find the roots of: x2 + 0.9 x + 0.81 = 0 in polar (modulus & argument) form. 1.23. Remember that the Fourier series for a periodic signal x(t) with period radians/second can be written in 3 forms: cos & sin form, amplitude & phase form and exponential form. Given that x(t) = 1+sin t-(1/2) cos(2t)-(1/3)sin(3t)+(1/4)cos(4t)+(1/5)sin(5t)-(1/6)sin(6t) – …etc convert this to each of the other two forms. Note, it is not a square wave. 1.24. The Fourier transform of a real non-periodic analogue signal x(t) produces a complex function of frequency (in radians/second) referred to in many signals & systems textbooks as X(j). There are two complications already: (a) some textbooks call this simply X() and (b) most Communicationss textbooks use f (frequency in Hertz) rather than . Give formulae for the analogue Fourier transform & its inverse using each of these 3 forms of notation. 1.25. Show that if x(t) is real, then X(-j) = X*(j) (* means complex conjugate) or in other notation X(-) = X*() or X((-f)) = X*((f)). Why do we need negative frequencies? 1.26. An nth order analogue Butterworth low-pass filter has the gain response: G() = 1 / (1 + ( /C )2n ). Show that, according to this formula, its gain is 0 dB at =0 and approximately -3 dB at = C. Show that the gain at = 10C for a 6th order Butterworth low-pass filter is approximately -120 dB. 1.27. The “frequency-response” H(j) of an analogue filter is the Fourier transform of its impulseresponse h(t). H(j) is complex even though h(t) is real. The “gain” (or “gain response”) G() is equal to the modulus of H(j). In dB, the gain is 20log10(G()) dB. An “attenuation” of 100 dB means a gain of -100 dB. Given a sinusoid of frequency , if filter A would attenuate it by 20 dB and filter B would amplify it by 50 dB, is it true that if x(t) is passed through filter A and the output from filter A is passed through filter B, the overall gain would be 30 dB?