1 00:00:00,135 --> 00:00:02,490 The following content is provided under a Creative 2 00:00:02,490 --> 00:00:04,030 Commons license. 3 00:00:04,030 --> 00:00:06,330 Your support will help MIT OpenCourseWare 4 00:00:06,330 --> 00:00:10,720 continue to offer high-quality educational resources for free. 5 00:00:10,720 --> 00:00:13,320 To make a donation or view additional materials 6 00:00:13,320 --> 00:00:17,280 from hundreds of MIT courses, visit MIT OpenCourseWare 7 00:00:17,280 --> 00:00:18,450 at ocw.mit.edu. 8 00:00:25,439 --> 00:00:30,329 [MUSIC PLAYING] 9 00:00:56,761 --> 00:00:58,510 ALAN OPPENHEIM: Throughout these lectures, 10 00:00:58,510 --> 00:01:03,330 we have been considering the analysis and the implementation 11 00:01:03,330 --> 00:01:07,200 of discrete time linear shift invariant systems, 12 00:01:07,200 --> 00:01:11,670 or what we've been referring to as digital filters. 13 00:01:11,670 --> 00:01:13,920 In this lecture, I would like to begin 14 00:01:13,920 --> 00:01:18,840 the discussion of the design of digital filters. 15 00:01:18,840 --> 00:01:21,660 Now the rationale for digital filters 16 00:01:21,660 --> 00:01:26,160 is exactly the same as it is for analog filters. 17 00:01:26,160 --> 00:01:31,080 In particular, we have taken advantage several times 18 00:01:31,080 --> 00:01:34,010 of the important property of linear shift 19 00:01:34,010 --> 00:01:39,960 in variance systems that complex exponentials are eigenfunctions 20 00:01:39,960 --> 00:01:41,880 of this class of systems. 21 00:01:41,880 --> 00:01:45,810 In other words, then with a complex exponential input, 22 00:01:45,810 --> 00:01:48,450 the output is a complex exponential 23 00:01:48,450 --> 00:01:52,500 of the same complex frequency multiplied by the system 24 00:01:52,500 --> 00:01:55,080 function H v to the j omega. 25 00:01:55,080 --> 00:01:58,830 Or equivalently, with a sinusoidal input, 26 00:01:58,830 --> 00:02:01,710 the output is likewise sinusoidal 27 00:02:01,710 --> 00:02:05,250 with the same frequency but with a change in amplitude 28 00:02:05,250 --> 00:02:08,100 and with a change in phase. 29 00:02:08,100 --> 00:02:13,380 Now what this property of linear shift invariant systems 30 00:02:13,380 --> 00:02:17,610 permits us to consider is the separation 31 00:02:17,610 --> 00:02:22,230 of signals that have been added when these signals occupy 32 00:02:22,230 --> 00:02:24,870 different frequency bands. 33 00:02:24,870 --> 00:02:29,520 Specifically, we can consider a signal composed 34 00:02:29,520 --> 00:02:34,470 of the sum of two signals, one of which we want, 35 00:02:34,470 --> 00:02:36,240 the other of which we don't want, 36 00:02:36,240 --> 00:02:38,850 or we would like to suppress. 37 00:02:38,850 --> 00:02:42,390 And if those two signals are in different frequency bands-- 38 00:02:42,390 --> 00:02:47,820 in other words, their spectra occupy different segments 39 00:02:47,820 --> 00:02:54,180 of the frequency axis, then we can choose the system function 40 00:02:54,180 --> 00:02:57,210 for the linear shift invariant system 41 00:02:57,210 --> 00:03:01,680 so that it is unity in the band of frequencies 42 00:03:01,680 --> 00:03:05,580 that we want to keep and at 0 in the band of frequencies 43 00:03:05,580 --> 00:03:07,590 that we want to reject. 44 00:03:07,590 --> 00:03:10,560 That of course, is exactly the same notion 45 00:03:10,560 --> 00:03:16,000 as we have in continuous time or analog systems or filters. 46 00:03:16,000 --> 00:03:19,620 So for example, if we had a signal, which 47 00:03:19,620 --> 00:03:24,000 was the sum of two components, one of which was low frequency, 48 00:03:24,000 --> 00:03:26,580 and that we wanted to keep, and the other of which 49 00:03:26,580 --> 00:03:29,910 was high frequency and that we wanted to suppress, 50 00:03:29,910 --> 00:03:34,800 then we can consider extracting the wanted signal 51 00:03:34,800 --> 00:03:39,000 with a system whose frequency response ideally 52 00:03:39,000 --> 00:03:42,120 is unity at the low frequency end 53 00:03:42,120 --> 00:03:45,480 and at zero at the high frequency end, 54 00:03:45,480 --> 00:03:50,000 or after some cutoff frequency, which I've denoted by omega sub 55 00:03:50,000 --> 00:03:51,270 P. 56 00:03:51,270 --> 00:03:53,790 So this then is one type of filter 57 00:03:53,790 --> 00:03:56,070 and one class of filtering problems, 58 00:03:56,070 --> 00:03:58,710 generally, what we would refer to as 59 00:03:58,710 --> 00:04:01,050 frequency selective filters. 60 00:04:01,050 --> 00:04:04,380 We've illustrated that here with the example 61 00:04:04,380 --> 00:04:06,090 of a low-pass filter. 62 00:04:06,090 --> 00:04:08,400 But of course there are other kinds of frequency 63 00:04:08,400 --> 00:04:09,430 selective filters-- 64 00:04:09,430 --> 00:04:12,140 for example, high-pass, band-pass, 65 00:04:12,140 --> 00:04:17,240 band-stop, multiple band filters, et cetera. 66 00:04:17,240 --> 00:04:21,329 Furthermore, the filtering problem, 67 00:04:21,329 --> 00:04:23,790 both digital and analog, is of course, 68 00:04:23,790 --> 00:04:28,230 not restricted to just simply frequency selective filters. 69 00:04:28,230 --> 00:04:33,240 We can think of problems-- we can talk about a wide variety 70 00:04:33,240 --> 00:04:34,920 of problems, in fact-- 71 00:04:34,920 --> 00:04:37,950 where the frequency characteristics 72 00:04:37,950 --> 00:04:42,240 that are desired are not piecewise constant as they 73 00:04:42,240 --> 00:04:45,420 are in the frequency selective filter case, 74 00:04:45,420 --> 00:04:51,570 but might be non-piecewise constant such as, for example, 75 00:04:51,570 --> 00:04:55,100 with the case of a differentiator, in which case 76 00:04:55,100 --> 00:04:57,620 the desired frequency characteristic is 77 00:04:57,620 --> 00:05:01,460 in fact, linear with frequency, or in the inverse filtering 78 00:05:01,460 --> 00:05:06,230 problem where the desired frequency characteristic is 79 00:05:06,230 --> 00:05:09,350 in general of a somewhat arbitrary shape. 80 00:05:09,350 --> 00:05:11,360 And so in this more general sense, 81 00:05:11,360 --> 00:05:14,450 the filtering problem can be thought 82 00:05:14,450 --> 00:05:18,080 of in terms of the implementation 83 00:05:18,080 --> 00:05:21,200 of a linear shift invariant system 84 00:05:21,200 --> 00:05:25,520 with a specified frequency response characteristic 85 00:05:25,520 --> 00:05:29,370 that we wish to achieve. 86 00:05:29,370 --> 00:05:33,060 To carry out the discussion, all the discussion that 87 00:05:33,060 --> 00:05:36,270 will be carrying out today and in fact throughout most 88 00:05:36,270 --> 00:05:39,420 of these lectures on digital filter design, 89 00:05:39,420 --> 00:05:44,265 I'll relate primarily to frequency selective filters 90 00:05:44,265 --> 00:05:46,900 and in fact, to low-pass filters, 91 00:05:46,900 --> 00:05:51,000 although it's important to keep in mind that the digital filter 92 00:05:51,000 --> 00:05:53,940 problem, the digital filter design problem, 93 00:05:53,940 --> 00:05:58,600 is not restricted to just that class of filters. 94 00:05:58,600 --> 00:06:02,920 Well, for the case of an ideal low-pass filter, 95 00:06:02,920 --> 00:06:05,950 or a low-pass filter, this is the desired frequency 96 00:06:05,950 --> 00:06:07,360 characteristic. 97 00:06:07,360 --> 00:06:09,400 And so what's the problem? 98 00:06:09,400 --> 00:06:14,380 Well, we have seen in the last several lectures 99 00:06:14,380 --> 00:06:18,520 that for the implementation of digital filters, 100 00:06:18,520 --> 00:06:24,520 it's particularly convenient to have a filter or a system whose 101 00:06:24,520 --> 00:06:30,010 system function is representable as a rational function of z, 102 00:06:30,010 --> 00:06:33,520 or equivalently whose input-output characteristic 103 00:06:33,520 --> 00:06:39,190 can be related by means of a linear constant coefficient 104 00:06:39,190 --> 00:06:41,430 difference equation. 105 00:06:41,430 --> 00:06:44,800 A linear constant coefficient difference equation, 106 00:06:44,800 --> 00:06:48,310 or a rational system function, can't 107 00:06:48,310 --> 00:06:52,420 achieve exactly an ideal low-pass filter characteristic 108 00:06:52,420 --> 00:06:55,870 as we have here, and in general can't achieve 109 00:06:55,870 --> 00:06:59,410 any ideal frequency selective characteristic 110 00:06:59,410 --> 00:07:02,530 where the transition from one band to another 111 00:07:02,530 --> 00:07:06,640 is as abrupt as we would like it to be ideally. 112 00:07:06,640 --> 00:07:12,190 So in fact, what's required is to approximate 113 00:07:12,190 --> 00:07:14,960 this ideal frequency characteristic, 114 00:07:14,960 --> 00:07:18,460 and the approximation of the ideal frequency 115 00:07:18,460 --> 00:07:23,320 characteristic, and the design of a rational transfer 116 00:07:23,320 --> 00:07:26,350 function to implement that approximation 117 00:07:26,350 --> 00:07:31,700 is what the digital filter design problem is about. 118 00:07:31,700 --> 00:07:35,800 So whereas we talk ideally about a filter characteristic, 119 00:07:35,800 --> 00:07:39,250 as I've indicated here, in fact, we 120 00:07:39,250 --> 00:07:43,480 have to allow some deviation from this ideal characteristic 121 00:07:43,480 --> 00:07:51,760 so that we would permit as an example a frequency response, 122 00:07:51,760 --> 00:07:55,410 rather than being unity in the passband, 123 00:07:55,410 --> 00:07:58,180 to deviate from unity by some amount. 124 00:07:58,180 --> 00:08:02,690 And let's designate that by say, delta sub P, 125 00:08:02,690 --> 00:08:05,680 denoting a passband deviation. 126 00:08:05,680 --> 00:08:08,320 So that in fact where we might specify 127 00:08:08,320 --> 00:08:12,770 is a filter which in the passband, 128 00:08:12,770 --> 00:08:15,520 in the band of frequencies that we wish to pass, 129 00:08:15,520 --> 00:08:18,010 rather than being exactly unity, is 130 00:08:18,010 --> 00:08:22,390 constrained in the interval between unity 131 00:08:22,390 --> 00:08:25,940 and 1 minus delta sub P. 132 00:08:25,940 --> 00:08:31,190 Similarly, we might permit the frequency characteristics, 133 00:08:31,190 --> 00:08:37,309 rather than requiring them to be exactly 0 in a stopband region. 134 00:08:37,309 --> 00:08:41,240 We might permit the frequency characteristic to deviate 135 00:08:41,240 --> 00:08:45,575 from 0 by some amount which we can denote as delta sub 136 00:08:45,575 --> 00:08:51,560 S, which is the stopband deviation, in which case 137 00:08:51,560 --> 00:08:56,735 we would ask that the filter fall between 0 and delta sub 138 00:08:56,735 --> 00:09:01,400 S, that is that the filter that we actually design 139 00:09:01,400 --> 00:09:06,150 be restricted to this frequency range. 140 00:09:06,150 --> 00:09:09,410 And finally recognizing that in reality we 141 00:09:09,410 --> 00:09:13,070 can't achieve a discontinuity in the frequency response as sharp 142 00:09:13,070 --> 00:09:16,940 as I've indicated here, we would permit also 143 00:09:16,940 --> 00:09:20,900 a transition region. 144 00:09:20,900 --> 00:09:27,760 That is, we would permit a region, after which 145 00:09:27,760 --> 00:09:31,660 the frequency characteristic must be below delta sub S, 146 00:09:31,660 --> 00:09:34,420 and before which the frequency characteristic must 147 00:09:34,420 --> 00:09:37,420 be between 1 and 1 minus delta sub P, 148 00:09:37,420 --> 00:09:41,140 but allowing a region for it to make the transition 149 00:09:41,140 --> 00:09:44,130 from the passband to the stopband. 150 00:09:44,130 --> 00:09:48,990 So these are the kinds of specifications on a filter. 151 00:09:48,990 --> 00:09:52,620 And a typical kind of characteristic then 152 00:09:52,620 --> 00:09:54,780 that might result is a filter perhaps 153 00:09:54,780 --> 00:09:58,920 that ripples between these limits 1 and 1 154 00:09:58,920 --> 00:10:01,620 minus delta sub P in the passband, 155 00:10:01,620 --> 00:10:06,840 and then makes the transition into a stopband region 156 00:10:06,840 --> 00:10:11,160 and perhaps wiggles around in the stopband region, 157 00:10:11,160 --> 00:10:15,720 sometimes perhaps touching the limits and sometimes not. 158 00:10:15,720 --> 00:10:20,950 So what the digital filter design problem is then, 159 00:10:20,950 --> 00:10:24,390 is given a set of specifications on the filter, 160 00:10:24,390 --> 00:10:27,570 recognizing that we can implement an ideal filter, 161 00:10:27,570 --> 00:10:29,490 but in fact allowing some deviation 162 00:10:29,490 --> 00:10:31,180 from the ideal filter. 163 00:10:31,180 --> 00:10:33,600 The digital filter design problem 164 00:10:33,600 --> 00:10:39,900 is then to design a rational transfer function, which 165 00:10:39,900 --> 00:10:45,180 approximates in some sense, this ideal filter maintaining 166 00:10:45,180 --> 00:10:50,100 the specifications of passband and stopband deviation 167 00:10:50,100 --> 00:10:52,290 that we've imposed on the problem. 168 00:10:54,900 --> 00:11:00,300 Now, there are several classes of design techniques 169 00:11:00,300 --> 00:11:02,950 that we can consider. 170 00:11:02,950 --> 00:11:05,360 The first class of design techniques, 171 00:11:05,360 --> 00:11:08,660 which in fact, we won't be talking much about, 172 00:11:08,660 --> 00:11:12,860 is the class that I've referred to as analytical design 173 00:11:12,860 --> 00:11:13,950 techniques. 174 00:11:13,950 --> 00:11:18,740 Basically what I mean by that are design techniques that 175 00:11:18,740 --> 00:11:23,720 permit the approximation of the ideal frequency characteristic. 176 00:11:23,720 --> 00:11:28,550 The approximation is carried out through an analytical procedure 177 00:11:28,550 --> 00:11:33,410 and results in a closed form transfer function. 178 00:11:33,410 --> 00:11:36,290 That in fact is a very common class 179 00:11:36,290 --> 00:11:43,170 of techniques for continuous time or analog filter design. 180 00:11:43,170 --> 00:11:47,880 And that leads us to the second class of design techniques, 181 00:11:47,880 --> 00:11:50,070 namely the class of design techniques 182 00:11:50,070 --> 00:11:54,500 that I refer to as mapping continuous time 183 00:11:54,500 --> 00:11:56,910 to discrete time. 184 00:11:56,910 --> 00:11:59,280 Well, why in the world would we ever want a map 185 00:11:59,280 --> 00:12:02,960 from continuous time to discrete time? 186 00:12:02,960 --> 00:12:08,440 Well, the reason, very simply, is that a lot of work. 187 00:12:08,440 --> 00:12:13,720 And a lot of results have developed for the design 188 00:12:13,720 --> 00:12:16,915 of continuous time filters. 189 00:12:16,915 --> 00:12:19,510 And in fact, a lot of these procedures 190 00:12:19,510 --> 00:12:21,070 are analytical procedures. 191 00:12:21,070 --> 00:12:23,590 They lead to analytical, or they lead 192 00:12:23,590 --> 00:12:27,310 to closed form designs and their analytical procedures that 193 00:12:27,310 --> 00:12:28,930 can be used. 194 00:12:28,930 --> 00:12:34,270 Now, if it's possible to map those designs 195 00:12:34,270 --> 00:12:38,350 to digital designs, then in fact, that's something 196 00:12:38,350 --> 00:12:41,290 we should do simply to take advantage 197 00:12:41,290 --> 00:12:44,290 of the kinds of results that have been worked out previously 198 00:12:44,290 --> 00:12:48,290 in the design of analog filters. 199 00:12:48,290 --> 00:12:50,220 An important point to keep in mind, 200 00:12:50,220 --> 00:12:56,556 however, is that we don't mean by this approximating 201 00:12:56,556 --> 00:13:00,030 an analog filter with a digital filter. 202 00:13:00,030 --> 00:13:02,640 That's not the objective, that's a point that we've stressed 203 00:13:02,640 --> 00:13:03,870 throughout these lectures. 204 00:13:03,870 --> 00:13:07,710 Our objective is not to approximate an analog filter 205 00:13:07,710 --> 00:13:09,240 with a digital filter. 206 00:13:09,240 --> 00:13:14,100 But if in fact, we can utilize analog designs 207 00:13:14,100 --> 00:13:16,560 in designing digital filters, then that's 208 00:13:16,560 --> 00:13:17,640 something we should do. 209 00:13:17,640 --> 00:13:19,710 And in fact, there are some procedures 210 00:13:19,710 --> 00:13:24,470 that allow us to do this that are very successful. 211 00:13:24,470 --> 00:13:27,590 The third class of design techniques 212 00:13:27,590 --> 00:13:30,860 are what are referred to as algorithmic 213 00:13:30,860 --> 00:13:34,010 or computer-aided design techniques. 214 00:13:34,010 --> 00:13:39,230 And the basic idea here is that there 215 00:13:39,230 --> 00:13:42,230 are a variety of algorithmic procedures, 216 00:13:42,230 --> 00:13:48,070 iterative procedures that we can go through to carry out 217 00:13:48,070 --> 00:13:50,110 the digital filter design. 218 00:13:50,110 --> 00:13:55,780 And we'll see a brief discussion of a number of these 219 00:13:55,780 --> 00:13:59,350 in the next several lectures, both for infinite impulse 220 00:13:59,350 --> 00:14:04,030 response filters and for finite impulse response filters. 221 00:14:04,030 --> 00:14:07,270 Now, in fact on the issue of infinite impulse response 222 00:14:07,270 --> 00:14:10,420 and finite impulse response, it turns out 223 00:14:10,420 --> 00:14:15,430 that it's convenient to separate the design 224 00:14:15,430 --> 00:14:18,880 issues for infinite impulse response 225 00:14:18,880 --> 00:14:22,210 and for finite impulse response filters. 226 00:14:22,210 --> 00:14:24,820 There are techniques for the finite impulse response 227 00:14:24,820 --> 00:14:28,780 case that are not applicable to the infinite impulse response 228 00:14:28,780 --> 00:14:30,970 case, and vice versa. 229 00:14:30,970 --> 00:14:34,540 And consequently, as we talk about digital filter design 230 00:14:34,540 --> 00:14:37,060 techniques, we'll be talking first 231 00:14:37,060 --> 00:14:40,690 about the design of infinite impulse response, 232 00:14:40,690 --> 00:14:43,420 or what we alternatively refer to as 233 00:14:43,420 --> 00:14:46,780 recursive digital filters, and then we'll 234 00:14:46,780 --> 00:14:50,320 talk separately about some design procedures 235 00:14:50,320 --> 00:14:55,430 for finite impulse response or non-recursive digital filters. 236 00:14:55,430 --> 00:15:03,580 So for this lecture, and in fact for this lecture 237 00:15:03,580 --> 00:15:07,450 and the next lecture, and in fact for this and the next two 238 00:15:07,450 --> 00:15:10,300 lectures, we'll be focusing entirely 239 00:15:10,300 --> 00:15:14,020 on the design of infinite impulse response 240 00:15:14,020 --> 00:15:15,334 digital filters. 241 00:15:15,334 --> 00:15:16,750 And in the lecture following that, 242 00:15:16,750 --> 00:15:20,050 we'll consider some design procedures for finite impulse 243 00:15:20,050 --> 00:15:22,660 response filters. 244 00:15:22,660 --> 00:15:26,980 All right, well, the first class of procedures, 245 00:15:26,980 --> 00:15:30,190 design techniques that I'd like to discuss, 246 00:15:30,190 --> 00:15:34,480 are ones related to mapping from continuous time 247 00:15:34,480 --> 00:15:35,860 to discrete time-- 248 00:15:35,860 --> 00:15:42,220 that is, taking analog filter design techniques 249 00:15:42,220 --> 00:15:47,180 and utilizing them for the design of digital filters. 250 00:15:47,180 --> 00:15:51,220 So the procedure basically is that we're 251 00:15:51,220 --> 00:15:55,040 mapping from continuous time to discrete time. 252 00:15:55,040 --> 00:16:01,310 We have a continuous time system function, H sub a of S, 253 00:16:01,310 --> 00:16:04,770 which is the Laplace transform of the impulse response, 254 00:16:04,770 --> 00:16:09,380 H sub a of T, the H standing for analog. 255 00:16:09,380 --> 00:16:15,170 And we'd like to map that to a digital filter transfer 256 00:16:15,170 --> 00:16:18,320 function, H of z, or equivalently 257 00:16:18,320 --> 00:16:23,570 map the impulse response to a digital filter unit 258 00:16:23,570 --> 00:16:26,180 sample response, H of n. 259 00:16:26,180 --> 00:16:29,270 And we'd like to do this, of course, in such a way 260 00:16:29,270 --> 00:16:34,790 that if this was a good filter in the analog domain, then 261 00:16:34,790 --> 00:16:39,390 this will be a good filter in the digital domain. 262 00:16:39,390 --> 00:16:43,740 Well, of course in designing digital filters by implementing 263 00:16:43,740 --> 00:16:47,340 and mapping of the type that we're talking about, 264 00:16:47,340 --> 00:16:49,680 there are some obvious restrictions 265 00:16:49,680 --> 00:16:52,440 that we would like to impose, one 266 00:16:52,440 --> 00:16:58,710 of which is that we would like the behavior of H sub a of S, 267 00:16:58,710 --> 00:17:02,460 the analog system function, on the j omega 268 00:17:02,460 --> 00:17:10,940 axis to map to a corresponding behavior on the unit circle. 269 00:17:10,940 --> 00:17:15,339 The point, of course, is that an analog system 270 00:17:15,339 --> 00:17:21,130 function or an analog filter, an analog frequency response, when 271 00:17:21,130 --> 00:17:23,319 we talk about the frequency response, 272 00:17:23,319 --> 00:17:27,040 we're looking in the s-plane on the j omega axis. 273 00:17:27,040 --> 00:17:31,810 And for the digital filter, it is the behavior 274 00:17:31,810 --> 00:17:34,270 of the system function on the unit circle 275 00:17:34,270 --> 00:17:38,020 that dictates what the frequency response is like. 276 00:17:38,020 --> 00:17:41,500 If the analog filter has a good frequency response-- 277 00:17:41,500 --> 00:17:45,710 in other words, it has a good behavior on the j omega axis-- 278 00:17:45,710 --> 00:17:48,280 that's what we would like to have mapped over 279 00:17:48,280 --> 00:17:54,380 to a good behavior in the z-plane on the unit circle. 280 00:17:54,380 --> 00:17:57,550 So this then is the first condition 281 00:17:57,550 --> 00:17:59,500 that we would like to impose. 282 00:17:59,500 --> 00:18:02,590 And a second condition that it's reasonable to impose 283 00:18:02,590 --> 00:18:08,350 is that a stable analog system function 284 00:18:08,350 --> 00:18:12,830 mapped to a stable digital system function. 285 00:18:12,830 --> 00:18:15,560 In other words, we'd like to be confident 286 00:18:15,560 --> 00:18:18,290 that our design procedure is such 287 00:18:18,290 --> 00:18:21,230 that if we had a good analog filter 288 00:18:21,230 --> 00:18:24,770 and it was stable, that when we were all done, 289 00:18:24,770 --> 00:18:27,860 we would end up with a good digital filter that was also 290 00:18:27,860 --> 00:18:28,970 stable. 291 00:18:28,970 --> 00:18:33,050 So these, then, are two of the conditions that 292 00:18:33,050 --> 00:18:36,590 are basic to any design procedure that 293 00:18:36,590 --> 00:18:41,350 maps from continuous time to discrete time. 294 00:18:41,350 --> 00:18:47,420 Well, there are a number of procedures that are available. 295 00:18:47,420 --> 00:18:50,230 One of the first that tends to come 296 00:18:50,230 --> 00:18:53,740 to mind when you think of mapping a continuous time 297 00:18:53,740 --> 00:18:56,920 filter to a discrete time filter is 298 00:18:56,920 --> 00:18:59,470 to approximate in some sense, let's 299 00:18:59,470 --> 00:19:03,100 say the differential equation for the analog filter, 300 00:19:03,100 --> 00:19:07,760 by simply replacing the derivatives by differences. 301 00:19:07,760 --> 00:19:10,690 So the first method that I'd like to talk about 302 00:19:10,690 --> 00:19:18,220 is a method which corresponds to going from the analog filter 303 00:19:18,220 --> 00:19:22,720 to the digital filter by mapping differentials 304 00:19:22,720 --> 00:19:25,450 in the analog domain to differences 305 00:19:25,450 --> 00:19:27,940 in the digital domain. 306 00:19:27,940 --> 00:19:31,900 And let me tell you in advance that what we'll see, 307 00:19:31,900 --> 00:19:35,500 in fact, is that although this is intuitively 308 00:19:35,500 --> 00:19:39,220 one of the first methods that tends to come to mind, 309 00:19:39,220 --> 00:19:42,820 that in fact, it is not a particularly good method 310 00:19:42,820 --> 00:19:46,730 in terms of the basic guidelines that we've set down. 311 00:19:46,730 --> 00:19:49,480 But let's go through the method anyway. 312 00:19:49,480 --> 00:19:54,080 Here we have an analog system function, H sub a of S. 313 00:19:54,080 --> 00:19:57,830 And the corresponding differential equation, 314 00:19:57,830 --> 00:20:02,120 the filter then is described in terms of a linear combination 315 00:20:02,120 --> 00:20:06,140 of derivatives of the output equal to a linear combination 316 00:20:06,140 --> 00:20:09,390 of derivatives of the input. 317 00:20:09,390 --> 00:20:13,400 Now we want to convert this in some way 318 00:20:13,400 --> 00:20:15,880 to a difference equation. 319 00:20:15,880 --> 00:20:25,820 And so we can consider replacing y sub a of t by y of n, 320 00:20:25,820 --> 00:20:29,270 y of n, of course is the output of the digital filter, 321 00:20:29,270 --> 00:20:33,980 in such a way that the derivative, a first derivative 322 00:20:33,980 --> 00:20:39,510 sampled at t equal to n times T gets 323 00:20:39,510 --> 00:20:42,870 replaced by the first difference of the output 324 00:20:42,870 --> 00:20:45,030 of the digital filter. 325 00:20:45,030 --> 00:20:47,790 Where the first difference I'm defining 326 00:20:47,790 --> 00:20:50,490 as the first forward difference. 327 00:20:50,490 --> 00:20:55,710 That is, y of n plus 1 minus y of n divided by T. 328 00:20:55,710 --> 00:20:58,530 So the idea here is basically to say, well 329 00:20:58,530 --> 00:21:00,390 look, I can generate a difference 330 00:21:00,390 --> 00:21:03,540 equation from this differential equation 331 00:21:03,540 --> 00:21:07,530 by replacing the derivatives by differences-- 332 00:21:07,530 --> 00:21:09,630 in the particular case I'm talking about, 333 00:21:09,630 --> 00:21:11,370 by forward differences. 334 00:21:11,370 --> 00:21:13,500 And what will result is a difference equation, 335 00:21:13,500 --> 00:21:18,240 and consequently what also results is a digital filter. 336 00:21:18,240 --> 00:21:21,930 Incidentally, I'm talking about this here 337 00:21:21,930 --> 00:21:25,980 for the case of forward differences in the text 338 00:21:25,980 --> 00:21:29,336 to see the contrast. 339 00:21:29,336 --> 00:21:31,710 We talk about a similar procedure, 340 00:21:31,710 --> 00:21:34,350 but with the use of backward differences rather than 341 00:21:34,350 --> 00:21:37,370 forward differences. 342 00:21:37,370 --> 00:21:41,420 All right, well let's see, in fact, what happens then. 343 00:21:41,420 --> 00:21:45,530 We want to replace a first derivative 344 00:21:45,530 --> 00:21:48,080 by a first forward difference. 345 00:21:48,080 --> 00:21:49,970 More generally, what we would want 346 00:21:49,970 --> 00:21:57,560 to replace a k-th derivative by is the k-th forward difference, 347 00:21:57,560 --> 00:21:59,750 where the k-th forward difference 348 00:21:59,750 --> 00:22:02,090 is defined iteratively. 349 00:22:02,090 --> 00:22:05,510 In other words, the k-th forward difference of y of n 350 00:22:05,510 --> 00:22:08,300 is the first forward difference of the k 351 00:22:08,300 --> 00:22:11,510 minus first forward difference of y of n. 352 00:22:11,510 --> 00:22:14,120 Simply the k-th forward difference 353 00:22:14,120 --> 00:22:16,670 to correspond to the k-th derivative 354 00:22:16,670 --> 00:22:20,840 is the first difference implemented over and over 355 00:22:20,840 --> 00:22:23,870 and over again, k times. 356 00:22:23,870 --> 00:22:29,870 So what results then by making this substitution, 357 00:22:29,870 --> 00:22:33,000 is that the differential equation that we had, 358 00:22:33,000 --> 00:22:36,650 which was a linear combination of the derivatives 359 00:22:36,650 --> 00:22:40,340 of y of t equal to a linear combination of the derivatives 360 00:22:40,340 --> 00:22:44,420 of x of t, that's replaced by the same linear combination 361 00:22:44,420 --> 00:22:49,700 of the k-th difference of y of n equal to the corresponding 362 00:22:49,700 --> 00:22:55,650 linear combination of the k-th differences of x of n. 363 00:22:55,650 --> 00:23:00,510 And this then is a difference equation, 364 00:23:00,510 --> 00:23:04,620 because of the fact that each of these differences, each 365 00:23:04,620 --> 00:23:07,440 of these four differences, or the k-th forward difference, 366 00:23:07,440 --> 00:23:09,850 involves differences of y of n. 367 00:23:09,850 --> 00:23:12,540 That is why even plus 1 minus y of n 368 00:23:12,540 --> 00:23:17,760 So this is a difference equation derived from the differential 369 00:23:17,760 --> 00:23:20,850 equation by replacing the k-th derivative 370 00:23:20,850 --> 00:23:23,690 by the k-th forward difference. 371 00:23:23,690 --> 00:23:28,100 Well let's see what this means in terms of the mapping 372 00:23:28,100 --> 00:23:31,790 from the s-plane to the z-plane. 373 00:23:31,790 --> 00:23:36,170 First of all, let me remind you that in the continuous time 374 00:23:36,170 --> 00:23:41,540 domain, the Laplace transform of the derivative of a time 375 00:23:41,540 --> 00:23:46,860 function is equal to s times the Laplace transform of the time 376 00:23:46,860 --> 00:23:47,360 function. 377 00:23:47,360 --> 00:23:51,690 That is, the operation of differentiation in the Laplace 378 00:23:51,690 --> 00:23:57,470 transform domain gets carried over to a multiplication by s. 379 00:23:57,470 --> 00:24:00,590 Similarly, we can look at the z transform 380 00:24:00,590 --> 00:24:04,880 of the first difference, the z transform 381 00:24:04,880 --> 00:24:07,580 of the first difference, y of n plus 1 minus y 382 00:24:07,580 --> 00:24:11,990 of n divided by T, simply by applying the properties of z 383 00:24:11,990 --> 00:24:15,950 transforms, results in z minus 1 divided 384 00:24:15,950 --> 00:24:21,590 by T times the z transform of y of n. 385 00:24:21,590 --> 00:24:26,930 So the operation of taking the first difference corresponds 386 00:24:26,930 --> 00:24:32,090 to multiplying the z transform by z minus 1 divided by T. 387 00:24:32,090 --> 00:24:34,520 So in the continuous time domain, 388 00:24:34,520 --> 00:24:38,090 the derivative corresponded to multiplication by s. 389 00:24:38,090 --> 00:24:41,210 In the z transform domain, first differencing 390 00:24:41,210 --> 00:24:43,850 corresponded to multiplication by z minus 1 391 00:24:43,850 --> 00:24:47,930 divided by T. And it's straightforward to show 392 00:24:47,930 --> 00:24:54,110 that, in fact, the k-th forward difference corresponds 393 00:24:54,110 --> 00:24:57,680 to multiplying by z minus 1 over t to the k. 394 00:24:57,680 --> 00:25:01,070 And we know that the k-th derivative corresponds 395 00:25:01,070 --> 00:25:03,980 to multiplication by s to the k. 396 00:25:03,980 --> 00:25:07,970 So if you track that through, put that into the difference 397 00:25:07,970 --> 00:25:11,870 equation, and obtain the system function 398 00:25:11,870 --> 00:25:14,120 for the digital system, and compare it 399 00:25:14,120 --> 00:25:19,770 with the system function for the analog system, what you see 400 00:25:19,770 --> 00:25:26,090 resulting is that the operation of replacing differentials 401 00:25:26,090 --> 00:25:32,330 by differences corresponds to obtaining the transfer 402 00:25:32,330 --> 00:25:36,680 function of the digital filter from the transfer 403 00:25:36,680 --> 00:25:41,120 function of the analog filter by the substitution 404 00:25:41,120 --> 00:25:46,950 s equal to z minus 1 divided by T. 405 00:25:46,950 --> 00:25:50,160 So it's basically a mapping then, 406 00:25:50,160 --> 00:25:54,720 S being replaced by z minus 1 over T, 407 00:25:54,720 --> 00:26:00,510 or equivalently, z is equal to 1 plus s times T. 408 00:26:00,510 --> 00:26:03,750 First point then is that this technique in fact 409 00:26:03,750 --> 00:26:08,490 corresponds to a mapping from the s-plane to the z-plane, 410 00:26:08,490 --> 00:26:13,420 with s replaced by a function of z. 411 00:26:13,420 --> 00:26:16,120 Well, let's see what this mapping is, in fact, 412 00:26:16,120 --> 00:26:20,410 and decide whether it satisfies the objectives that we 413 00:26:20,410 --> 00:26:23,270 set down before. 414 00:26:23,270 --> 00:26:25,850 Here is a picture of the s-plane, 415 00:26:25,850 --> 00:26:28,520 and here's the j omega axis. 416 00:26:28,520 --> 00:26:33,860 Below we have the z-plane, the imaginary axis, real axis, 417 00:26:33,860 --> 00:26:36,210 and the unit circle. 418 00:26:36,210 --> 00:26:41,090 And the first question is, what does the j omega 419 00:26:41,090 --> 00:26:45,650 axis in the s-plane map to in the z-plane? 420 00:26:45,650 --> 00:26:48,950 Well, we substitute s equals j omega, 421 00:26:48,950 --> 00:26:55,310 so that z is equal to 1 plus j omega times T. 422 00:26:55,310 --> 00:26:59,870 Consequently, the j omega axis in the s-plane 423 00:26:59,870 --> 00:27:06,170 for this particular method maps to this line in the z-plane. 424 00:27:06,170 --> 00:27:07,580 Well, is that good? 425 00:27:07,580 --> 00:27:10,490 No, it's not good, because it says 426 00:27:10,490 --> 00:27:15,840 that if we saw a good filter as we ran up and down this axis, 427 00:27:15,840 --> 00:27:20,510 we would see a good filter as we run up and down this line. 428 00:27:20,510 --> 00:27:25,540 However, where we are interested in the filter characteristics 429 00:27:25,540 --> 00:27:28,820 ending up are on the unit circle, 430 00:27:28,820 --> 00:27:31,850 which in fact, are only close to this line when 431 00:27:31,850 --> 00:27:36,290 we're in the vicinity of z equal to 1. 432 00:27:36,290 --> 00:27:40,250 So in fact, the first condition that we wanted 433 00:27:40,250 --> 00:27:43,910 isn't satisfied, namely the j omega axis does not 434 00:27:43,910 --> 00:27:47,710 get mapped to the unit circle. 435 00:27:47,710 --> 00:27:53,480 Furthermore, stable analog filters do not necessarily 436 00:27:53,480 --> 00:27:55,830 map to stable digital filters. 437 00:27:55,830 --> 00:28:02,310 For example, if we had a pole, let's say in the s-plane there, 438 00:28:02,310 --> 00:28:07,020 then it would fall in the z-plane, let's say there. 439 00:28:07,020 --> 00:28:08,160 Well, that's all right. 440 00:28:08,160 --> 00:28:12,480 That's a stable pole, stable analog filter mapping 441 00:28:12,480 --> 00:28:14,840 to a stable digital filter. 442 00:28:14,840 --> 00:28:20,430 However, here's an even more stable analog filter. 443 00:28:20,430 --> 00:28:26,220 And if this pole is negative enough, then in fact, 444 00:28:26,220 --> 00:28:29,250 it falls outside the unit circle in the z-plane, 445 00:28:29,250 --> 00:28:33,750 and consequently the digital filter will be unstable. 446 00:28:33,750 --> 00:28:36,630 That incidentally is a well-known property 447 00:28:36,630 --> 00:28:40,200 in numerical analysis of forward differences-- 448 00:28:40,200 --> 00:28:43,630 that is, the notion that forward differences are unstable. 449 00:28:43,630 --> 00:28:45,750 And this is one way of seeing that 450 00:28:45,750 --> 00:28:47,760 by interpreting it in terms of a mapping 451 00:28:47,760 --> 00:28:50,300 from the s-plane to the z-plane. 452 00:28:50,300 --> 00:28:55,880 We know incidentally that at least in an intuitive sense, 453 00:28:55,880 --> 00:29:01,970 it's reasonable to imagine that if we pick samples 454 00:29:01,970 --> 00:29:06,800 of a continuous time signal close enough together, that 455 00:29:06,800 --> 00:29:08,870 at least intuitively we ought to be 456 00:29:08,870 --> 00:29:14,120 able to approximate a derivative by a difference. 457 00:29:14,120 --> 00:29:18,650 And in fact, that fits in with the kinds of things 458 00:29:18,650 --> 00:29:21,686 that we've been seeing here in the following sense. 459 00:29:21,686 --> 00:29:26,060 If we very highly oversample the signal, much higher 460 00:29:26,060 --> 00:29:28,670 than the Nyquist rate, then in fact, 461 00:29:28,670 --> 00:29:33,140 the portion of the z-plane where the signal spectrum falls 462 00:29:33,140 --> 00:29:37,940 is the portion of the z-plane around in the vicinity of z 463 00:29:37,940 --> 00:29:40,010 equal to 1. 464 00:29:40,010 --> 00:29:42,590 And you can see that in that case, 465 00:29:42,590 --> 00:29:45,770 that portion of the unit circle is 466 00:29:45,770 --> 00:29:48,560 pretty close to this line which was 467 00:29:48,560 --> 00:29:53,420 the mapping from the j omega axis into the z-plane. 468 00:29:53,420 --> 00:29:58,160 And so consequently, if we oversample rather extensively, 469 00:29:58,160 --> 00:30:02,300 then we can, in fact, map, more or less, our analog 470 00:30:02,300 --> 00:30:04,370 filter to a digital filter. 471 00:30:04,370 --> 00:30:07,900 But in fact, in the more usual case, 472 00:30:07,900 --> 00:30:11,930 the digital signal spectrum occupies the entire unit 473 00:30:11,930 --> 00:30:12,860 circle. 474 00:30:12,860 --> 00:30:15,570 And clearly away from the regions equals 1, 475 00:30:15,570 --> 00:30:18,650 the unit circle deviates rather dramatically 476 00:30:18,650 --> 00:30:20,960 from this vertical line. 477 00:30:20,960 --> 00:30:26,030 All right, so this is a method then of filter design, 478 00:30:26,030 --> 00:30:31,370 which didn't satisfy either one of our initial guidelines. 479 00:30:31,370 --> 00:30:35,510 Namely, it didn't map the j omega axis to the unit circle. 480 00:30:35,510 --> 00:30:40,520 And also, it didn't map a stable analog filter 481 00:30:40,520 --> 00:30:43,560 to a stable digital filter. 482 00:30:43,560 --> 00:30:49,010 Well, let's go on to a second method, which is better 483 00:30:49,010 --> 00:30:51,020 in both of those respects. 484 00:30:51,020 --> 00:30:54,080 And this is a method that is commonly 485 00:30:54,080 --> 00:30:59,000 referred to as the method of impulse invariance. 486 00:30:59,000 --> 00:31:03,800 And again, it's a filter design method, which 487 00:31:03,800 --> 00:31:07,700 intuitively is very reasonable. 488 00:31:07,700 --> 00:31:11,240 The basic idea of impulse invariance 489 00:31:11,240 --> 00:31:18,570 is to convert an analog filter to a digital filter, 490 00:31:18,570 --> 00:31:20,660 simply by choosing the unit sample 491 00:31:20,660 --> 00:31:23,390 response of the digital filter to be 492 00:31:23,390 --> 00:31:26,540 equally spaced samples of the impulse 493 00:31:26,540 --> 00:31:28,950 response of the analog filter. 494 00:31:28,950 --> 00:31:32,140 So the unit sample response h of n 495 00:31:32,140 --> 00:31:36,260 is chosen to be equally spaced samples, samples spaced 496 00:31:36,260 --> 00:31:42,260 by T, equally spaced samples of the analog or continuous time 497 00:31:42,260 --> 00:31:44,720 filter. 498 00:31:44,720 --> 00:31:52,180 Well, in at least one sense, we can see that this certainly 499 00:31:52,180 --> 00:31:54,580 leads to a good filter. 500 00:31:54,580 --> 00:31:59,200 And that is, if we had a continuous time analog 501 00:31:59,200 --> 00:32:04,180 filter that had good impulse response characteristics, 502 00:32:04,180 --> 00:32:08,350 then those good impulse response characteristics 503 00:32:08,350 --> 00:32:11,620 would be carried over to the digital filter unit sample 504 00:32:11,620 --> 00:32:12,200 response. 505 00:32:12,200 --> 00:32:15,970 For example, if we were interested in a filter 506 00:32:15,970 --> 00:32:19,900 with very low ringing or very short impulse response, 507 00:32:19,900 --> 00:32:23,170 then if we had an analog filter with those characteristics, 508 00:32:23,170 --> 00:32:26,800 then the digital filter would likewise have good impulse 509 00:32:26,800 --> 00:32:29,600 response characteristics. 510 00:32:29,600 --> 00:32:31,930 However we've been phrasing most of our discussion 511 00:32:31,930 --> 00:32:35,230 in terms of frequency response characteristics, 512 00:32:35,230 --> 00:32:37,870 we know from the discussion of sampling 513 00:32:37,870 --> 00:32:42,040 that we had a number of lectures ago that periodic sampling 514 00:32:42,040 --> 00:32:48,040 of this type results in a frequency response 515 00:32:48,040 --> 00:32:53,860 for the digital system, which is basically 516 00:32:53,860 --> 00:32:56,440 an aliased version of the frequency 517 00:32:56,440 --> 00:32:58,900 response for the analog system. 518 00:32:58,900 --> 00:33:04,510 That is, the digital frequency response is given by the sum 519 00:33:04,510 --> 00:33:07,180 that I've indicated here, which consists 520 00:33:07,180 --> 00:33:10,690 of scaled replicas of the Fourier 521 00:33:10,690 --> 00:33:19,510 transform of the analog filter, repeated over and over again 522 00:33:19,510 --> 00:33:24,760 with a spacing in little omega of 2 pi. 523 00:33:24,760 --> 00:33:28,090 Well, let's take a look at that in a little more detail. 524 00:33:33,470 --> 00:33:39,830 Here we have the analog frequency response. 525 00:33:39,830 --> 00:33:42,860 And let's say that we're considering 526 00:33:42,860 --> 00:33:45,020 this for the case of a low-pass filter, which 527 00:33:45,020 --> 00:33:48,140 is what we've tended to focus on in this lecture. 528 00:33:48,140 --> 00:33:51,560 So that if we had an analog low-pass filter, 529 00:33:51,560 --> 00:33:55,910 cutoff frequency between minus omega sub a and plus omega sub 530 00:33:55,910 --> 00:34:04,400 a, then in forming the digital filter frequency response, 531 00:34:04,400 --> 00:34:10,520 we first want to form h sub a of j omega divided by T, 532 00:34:10,520 --> 00:34:16,219 and then shift that in omega by integer multiples of 2 pi 533 00:34:16,219 --> 00:34:18,210 and add up those results. 534 00:34:18,210 --> 00:34:20,719 So the first step is the scaling, 535 00:34:20,719 --> 00:34:27,320 basically replacing Omega by omega divided by T, 536 00:34:27,320 --> 00:34:32,120 in which case plotted as a function of omega, 537 00:34:32,120 --> 00:34:36,889 the cutoff frequency is then omega sub a T and minus 538 00:34:36,889 --> 00:34:44,540 omega sub a T, so that this step results in a linear scaling 539 00:34:44,540 --> 00:34:48,739 of the frequency axis so that Omega 540 00:34:48,739 --> 00:34:53,179 is replaced by omega divided by T. 541 00:34:53,179 --> 00:34:57,800 The second step then is to add together 542 00:34:57,800 --> 00:35:02,930 replicas of this analog frequency response separated 543 00:35:02,930 --> 00:35:06,620 in omega by integer multiples of 2 pi. 544 00:35:06,620 --> 00:35:09,260 And that's what I've indicated here. 545 00:35:09,260 --> 00:35:12,470 Of course, this periodically repeats over and over again, 546 00:35:12,470 --> 00:35:17,210 but I've sketched it just from minus 2 pi to plus 2 pi. 547 00:35:17,210 --> 00:35:22,040 We have the factor 1 over T out in front for the amplitude. 548 00:35:22,040 --> 00:35:25,640 But an important aspect of this is 549 00:35:25,640 --> 00:35:29,600 that we have in going from the analog frequency variable 550 00:35:29,600 --> 00:35:33,770 to the digital frequency variable, a linear scaling 551 00:35:33,770 --> 00:35:36,080 in the frequency axis. 552 00:35:36,080 --> 00:35:37,760 That doesn't show up particularly 553 00:35:37,760 --> 00:35:40,370 for a piecewise constant frequency characteristic 554 00:35:40,370 --> 00:35:41,750 as I have here. 555 00:35:41,750 --> 00:35:46,580 But generally, if I had some complicated shape, then 556 00:35:46,580 --> 00:35:51,320 when I convert to h sub a of j omega over T, 557 00:35:51,320 --> 00:35:54,120 that basic shape will be preserved. 558 00:35:54,120 --> 00:35:58,970 And it will only be distorted by a linear scaling 559 00:35:58,970 --> 00:36:00,530 in the frequency axis. 560 00:36:00,530 --> 00:36:03,020 And that is an important advantage 561 00:36:03,020 --> 00:36:07,820 of the technique of impulse invariance. 562 00:36:07,820 --> 00:36:11,120 Now there are some problems, one in particular. 563 00:36:11,120 --> 00:36:13,810 And this is the major problem. 564 00:36:13,810 --> 00:36:17,750 And that is that as I've drawn this example, 565 00:36:17,750 --> 00:36:21,800 we've considered an analog filter whose frequency response 566 00:36:21,800 --> 00:36:23,990 is strictly bandlimited. 567 00:36:23,990 --> 00:36:28,070 And so of course there is no aliasing that results. 568 00:36:28,070 --> 00:36:32,180 But more generally, the kind of frequency characteristic 569 00:36:32,180 --> 00:36:40,580 that we would have would look perhaps like this, 570 00:36:40,580 --> 00:36:44,780 as an approximation, admittedly a somewhat crude approximation, 571 00:36:44,780 --> 00:36:47,390 to this ideal low-pass filter. 572 00:36:47,390 --> 00:36:51,440 In which case, as we add up the replicas 573 00:36:51,440 --> 00:36:56,690 of the scaled frequency response, then we in general 574 00:36:56,690 --> 00:36:59,450 will have interference or aliasing 575 00:36:59,450 --> 00:37:02,090 between different terms in this sum. 576 00:37:02,090 --> 00:37:06,170 So that in that case, while we start with an analog frequency 577 00:37:06,170 --> 00:37:10,790 characteristic that's desirable, the resulting digital frequency 578 00:37:10,790 --> 00:37:14,960 characteristic will be distorted somewhat 579 00:37:14,960 --> 00:37:18,590 because of the aliasing that results 580 00:37:18,590 --> 00:37:22,830 due to the separate terms that are added together in this sum. 581 00:37:22,830 --> 00:37:28,790 And one of the important aspects of implementing an impulse 582 00:37:28,790 --> 00:37:31,700 invariant filter design, then, is 583 00:37:31,700 --> 00:37:34,760 to in some way account for and hopefully 584 00:37:34,760 --> 00:37:37,640 minimize the effect of this aliasing. 585 00:37:37,640 --> 00:37:42,770 All right, so with the impulse invariant method, 586 00:37:42,770 --> 00:37:48,680 one of the important advantages of impulse invariance 587 00:37:48,680 --> 00:37:53,360 is the fact that it tends to preserve good time domain 588 00:37:53,360 --> 00:37:54,470 characteristics. 589 00:37:54,470 --> 00:37:59,100 That is, the impulse response characteristics were preserved. 590 00:37:59,100 --> 00:38:06,570 And also, it provides a linear scaling 591 00:38:06,570 --> 00:38:09,960 from analog frequency to digital frequency 592 00:38:09,960 --> 00:38:14,790 so that if we had an analog filter with a very complicated 593 00:38:14,790 --> 00:38:17,430 frequency response, then we could 594 00:38:17,430 --> 00:38:20,370 be assured that the corresponding digital filter 595 00:38:20,370 --> 00:38:25,240 except for aliasing would have that same shape, 596 00:38:25,240 --> 00:38:29,600 but only with a linear scaling of the frequency axis. 597 00:38:29,600 --> 00:38:31,710 It should be pointed out incidentally 598 00:38:31,710 --> 00:38:36,840 that impulse invariance doesn't imply step invariance, 599 00:38:36,840 --> 00:38:39,030 and you'll see this in the problems 600 00:38:39,030 --> 00:38:41,190 that you work through the study guide. 601 00:38:41,190 --> 00:38:44,580 Impulse invariance does not imply step invariance so 602 00:38:44,580 --> 00:38:48,360 that in fact, if it was the step response characteristics 603 00:38:48,360 --> 00:38:52,260 that we wanted to preserve, then the technique here 604 00:38:52,260 --> 00:38:53,490 isn't what we would use. 605 00:38:53,490 --> 00:38:55,170 We would use a modified technique, 606 00:38:55,170 --> 00:38:57,860 which would be not impulse invariance, but step 607 00:38:57,860 --> 00:39:00,000 invariance. 608 00:39:00,000 --> 00:39:04,650 Well, let's finally look at what impulse invariance 609 00:39:04,650 --> 00:39:09,330 means in terms of a mapping from the s-plane to the z-plane. 610 00:39:09,330 --> 00:39:11,640 Let's look at it in a slightly different way 611 00:39:11,640 --> 00:39:14,350 than we've looked at it here. 612 00:39:14,350 --> 00:39:21,420 And we can do that by expressing the analog system function 613 00:39:21,420 --> 00:39:25,950 in a partial fraction expansion, in terms of a sum of factors 614 00:39:25,950 --> 00:39:26,670 of this form. 615 00:39:26,670 --> 00:39:33,480 So we have residues A sub k, poles s at s equals s of k, 616 00:39:33,480 --> 00:39:35,580 and we're expressing the system function 617 00:39:35,580 --> 00:39:39,640 as a linear combination of terms of this form. 618 00:39:39,640 --> 00:39:41,350 If there are multiple order poles, 619 00:39:41,350 --> 00:39:43,720 this expression is slightly more complicated. 620 00:39:43,720 --> 00:39:48,010 And what I'm about to say can be generalized to that case. 621 00:39:48,010 --> 00:39:51,670 But let's consider it here just for the case of simple poles, 622 00:39:51,670 --> 00:39:53,620 so that the system function in fact 623 00:39:53,620 --> 00:39:57,750 can be expanded out in the form that I have here. 624 00:39:57,750 --> 00:40:01,530 All right, well, if this is the analog system function, 625 00:40:01,530 --> 00:40:06,710 then you should recall that the analog impulse response-- 626 00:40:06,710 --> 00:40:09,720 that is, the inverse Laplace transform of this-- 627 00:40:09,720 --> 00:40:14,790 is the sum of exponentials with amplitudes 628 00:40:14,790 --> 00:40:17,580 A sub k, the same amplitudes as we 629 00:40:17,580 --> 00:40:22,950 have here, and complex exponentials e to s sub k. 630 00:40:22,950 --> 00:40:29,400 And this should be a t, not a T. That is time, t. 631 00:40:29,400 --> 00:40:32,560 So this then is the form of the impulse response, 632 00:40:32,560 --> 00:40:35,730 which corresponds to this system function. 633 00:40:35,730 --> 00:40:40,230 And now the impulse invariant method says, 634 00:40:40,230 --> 00:40:43,950 replace this by a unit sample response 635 00:40:43,950 --> 00:40:46,590 for the digital filter, which is obtained 636 00:40:46,590 --> 00:40:52,170 by replacing t by n times T. That is, 637 00:40:52,170 --> 00:40:55,710 obtaining the unit sample response of the digital filter 638 00:40:55,710 --> 00:41:00,840 by sampling the impulse response of the analog filter, in which 639 00:41:00,840 --> 00:41:07,140 case we get the sum of A sub k, E to s of k. 640 00:41:07,140 --> 00:41:13,420 And now time, t, is replaced by n times T. 641 00:41:13,420 --> 00:41:18,000 A sampled unit step, a sampled analog unit step, 642 00:41:18,000 --> 00:41:22,080 results in a discrete time unit step. 643 00:41:22,080 --> 00:41:24,930 And so consequently, the unit sample response 644 00:41:24,930 --> 00:41:28,950 that we end up with is A sub k, the same coefficients 645 00:41:28,950 --> 00:41:33,750 as we had here, e to the s sub k, n times T times 646 00:41:33,750 --> 00:41:35,910 the unit step. 647 00:41:35,910 --> 00:41:39,450 Well, we can write that in a slightly different way. 648 00:41:39,450 --> 00:41:43,920 We can write that as the sum of A sub k, 649 00:41:43,920 --> 00:41:48,390 and some factor, e to the s sub k T is what it is. 650 00:41:48,390 --> 00:41:52,860 Some factor raised to the n-th power times the unit step. 651 00:41:52,860 --> 00:41:56,430 And consequently we can write down by inspection 652 00:41:56,430 --> 00:42:00,660 the z transform or system function that corresponds 653 00:42:00,660 --> 00:42:02,880 to this unit sample response. 654 00:42:02,880 --> 00:42:09,330 In particular, it is H of z equal to the sum of A sub 655 00:42:09,330 --> 00:42:15,780 k, times 1 minus 8, e the s of k times T z to the minus 1, 656 00:42:15,780 --> 00:42:20,401 that's simply by inspection of this expression. 657 00:42:20,401 --> 00:42:20,900 All right. 658 00:42:20,900 --> 00:42:25,870 Well, so we started with an analog system 659 00:42:25,870 --> 00:42:32,010 function of this form, these coefficients in these poles. 660 00:42:32,010 --> 00:42:35,130 We ended up with a digital system function 661 00:42:35,130 --> 00:42:38,820 of this form, the same coefficients, and poles 662 00:42:38,820 --> 00:42:42,290 instead of at s sub k, as they were in the analog case, 663 00:42:42,290 --> 00:42:46,260 at e to the s sub k T. 664 00:42:46,260 --> 00:42:51,690 So this says then that the impulse invariant method 665 00:42:51,690 --> 00:42:57,660 maps a pole in the s-plane which was at s sub k, maps 666 00:42:57,660 --> 00:43:02,430 it to a pole in the z-plane at z equal 667 00:43:02,430 --> 00:43:07,200 to e to the s sub k, T. Well, does 668 00:43:07,200 --> 00:43:10,500 that mean that impulse invariance is basically 669 00:43:10,500 --> 00:43:14,940 a method which maps s to z according 670 00:43:14,940 --> 00:43:17,700 to this transformation. 671 00:43:17,700 --> 00:43:19,550 Well no, it doesn't do that. 672 00:43:19,550 --> 00:43:23,000 What it does is it maps the poles in the s-plane 673 00:43:23,000 --> 00:43:27,630 to poles in the z-plane according to this mapping. 674 00:43:27,630 --> 00:43:29,220 The other thing that it preserves 675 00:43:29,220 --> 00:43:32,400 are these coefficients, the coefficients A sub k, 676 00:43:32,400 --> 00:43:34,380 that is the residues of the poles. 677 00:43:34,380 --> 00:43:36,960 So it maintains the residues of the poles. 678 00:43:36,960 --> 00:43:41,610 It maps the poles according to z equals e to the st. 679 00:43:41,610 --> 00:43:45,220 The 0s, by the way, in general will not 680 00:43:45,220 --> 00:43:48,130 come out to have been mapped according 681 00:43:48,130 --> 00:43:51,530 to the same mappings equals e to the st. In other words, 682 00:43:51,530 --> 00:43:56,320 if we had a 0 at s equals s sub 0, as we'll see actually 683 00:43:56,320 --> 00:44:00,160 in an example that we'll work next time, the 0 in the z-plane 684 00:44:00,160 --> 00:44:05,620 will not come out, will not come out at z equals e to the s 0 T. 685 00:44:05,620 --> 00:44:08,180 The poles are mapped according to that mapping, 686 00:44:08,180 --> 00:44:09,820 and the residues are preserved. 687 00:44:09,820 --> 00:44:13,070 And that is essentially what defines the impulse invariant 688 00:44:13,070 --> 00:44:15,520 mapping. 689 00:44:15,520 --> 00:44:18,880 Well, we had our two initial guidelines. 690 00:44:18,880 --> 00:44:21,970 One is that we want the behavior on the j omega 691 00:44:21,970 --> 00:44:28,150 axis to map to the behavior in the digital domain on the unit 692 00:44:28,150 --> 00:44:29,620 circle. 693 00:44:29,620 --> 00:44:32,200 Does the impulse invariant method do that? 694 00:44:32,200 --> 00:44:36,670 Well, it does, except for the effect of aliasing. 695 00:44:36,670 --> 00:44:42,130 But basically, it is the analog frequency response 696 00:44:42,130 --> 00:44:45,610 that dictates what the digital frequency response is. 697 00:44:45,610 --> 00:44:48,940 And so in that sense, impulse invariance 698 00:44:48,940 --> 00:44:51,040 satisfies that objective. 699 00:44:51,040 --> 00:44:54,210 The second question is whether it maintains 700 00:44:54,210 --> 00:44:56,260 the ability of the filter. 701 00:44:56,260 --> 00:44:58,350 And the answer there also is that it does, 702 00:44:58,350 --> 00:45:00,280 so we can see that very easily. 703 00:45:00,280 --> 00:45:06,140 In particular, if we have an analog pole with a real part 704 00:45:06,140 --> 00:45:09,030 sigma sub k, an imaginary part omega sub 705 00:45:09,030 --> 00:45:15,440 k, then the digital pole, the pole of the digital filter, 706 00:45:15,440 --> 00:45:20,756 maps to z sub k equal to e to the s sub k T, 707 00:45:20,756 --> 00:45:28,670 e to the j omega sub k T. And the magnitude of this 708 00:45:28,670 --> 00:45:34,040 is equal to of course, the product of the magnitudes. 709 00:45:34,040 --> 00:45:38,390 The magnitude of this term is unity. 710 00:45:38,390 --> 00:45:41,940 So all that we care about is the magnitude of the sigma 711 00:45:41,940 --> 00:45:46,930 sub k T. Well, if the analog filter is stable, 712 00:45:46,930 --> 00:45:49,060 sigma sub k is negative. 713 00:45:49,060 --> 00:45:51,960 If sigma sub k is negative, then either the sigma 714 00:45:51,960 --> 00:45:55,590 sub k T has a magnitude less than 1. 715 00:45:55,590 --> 00:46:01,430 So consequently, if the real part of s sub k is less than 0, 716 00:46:01,430 --> 00:46:05,300 negative, then the magnitude of z sub k, 717 00:46:05,300 --> 00:46:09,210 the magnitude of the pole is less than 1. 718 00:46:09,210 --> 00:46:15,620 So this in fact is a digital filter design technique that 719 00:46:15,620 --> 00:46:19,900 has a number of advantages. 720 00:46:19,900 --> 00:46:24,010 And in fact, it's a very useful design technique. 721 00:46:24,010 --> 00:46:29,390 It's one of the standard digital filter design techniques. 722 00:46:29,390 --> 00:46:33,680 In the next lecture, I will briefly 723 00:46:33,680 --> 00:46:38,810 present an example of an impulse invariant design, just simply 724 00:46:38,810 --> 00:46:41,660 to remind you actually again of the fact 725 00:46:41,660 --> 00:46:45,650 that aliasing is an issue, number one, and number two, 726 00:46:45,650 --> 00:46:49,730 that it maps poles according to z equals z to the st, 727 00:46:49,730 --> 00:46:51,170 but not 0s. 728 00:46:51,170 --> 00:46:54,110 In fact, the 0s end up someplace else. 729 00:46:54,110 --> 00:46:57,230 And in addition in that lecture, we'll 730 00:46:57,230 --> 00:47:02,450 talk about another design technique, which is likewise 731 00:47:02,450 --> 00:47:05,060 one of the classical digital filter design 732 00:47:05,060 --> 00:47:09,080 methods, which is referred to as the bilinear transformation. 733 00:47:09,080 --> 00:47:11,690 And the lecture following that then I 734 00:47:11,690 --> 00:47:17,030 will show some examples of some digital filter 735 00:47:17,030 --> 00:47:20,870 designs, using both impulse invariance and the bilinear 736 00:47:20,870 --> 00:47:22,510 transformation to compare them. 737 00:47:22,510 --> 00:47:24,260 Thank you.