1 00:00:00,090 --> 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:22,976 --> 00:00:25,406 [MUSIC PLAYING] 9 00:00:55,395 --> 00:00:57,270 ALAN OPPENHEIM: In the last several lectures, 10 00:00:57,270 --> 00:01:00,970 we've considered a number of procedures 11 00:01:00,970 --> 00:01:06,610 for designing digital filters for the class 12 00:01:06,610 --> 00:01:09,730 of infinite impulse response filters. 13 00:01:09,730 --> 00:01:12,880 And the two primary design techniques 14 00:01:12,880 --> 00:01:16,120 that we considered, in fact, the two useful design 15 00:01:16,120 --> 00:01:19,240 techniques that we developed, were the techniques 16 00:01:19,240 --> 00:01:24,190 which we refer to as impulse invariance, and also 17 00:01:24,190 --> 00:01:27,400 the bilinear transformation. 18 00:01:27,400 --> 00:01:31,180 You recall, hopefully, that both of these techniques 19 00:01:31,180 --> 00:01:37,560 are techniques that correspond to mapping a continuous time 20 00:01:37,560 --> 00:01:42,120 or analog filter to a digital filter. 21 00:01:42,120 --> 00:01:43,660 What I'd like to do in this lecture 22 00:01:43,660 --> 00:01:47,860 is consider an example of the design 23 00:01:47,860 --> 00:01:52,180 of a digital low-pass filter using each of these techniques, 24 00:01:52,180 --> 00:01:55,900 using impulse invariance and the bilinear transformation. 25 00:01:55,900 --> 00:01:59,740 And hopefully this will give you a better feeling for how 26 00:01:59,740 --> 00:02:03,080 both of these techniques work. 27 00:02:03,080 --> 00:02:09,050 The class of analog filters that I would like to use 28 00:02:09,050 --> 00:02:13,200 are the class of so-called analog Butterworth filters, 29 00:02:13,200 --> 00:02:16,970 which are a useful class of lowpass analog 30 00:02:16,970 --> 00:02:20,525 and digital filters, and also a relatively simple class. 31 00:02:23,120 --> 00:02:28,360 To first of all, define the class of analog filters 32 00:02:28,360 --> 00:02:31,270 that we're considering, they are the class 33 00:02:31,270 --> 00:02:33,550 of analog Butterworth filters. 34 00:02:33,550 --> 00:02:39,970 And this class of filters is defined by the analog system 35 00:02:39,970 --> 00:02:45,820 function H sub a of j omega magnitude squared of the form 36 00:02:45,820 --> 00:02:51,910 1 over 1 plus j omega divided by j omega sub c to the 2N. 37 00:02:51,910 --> 00:02:55,750 Now, there are two parameters in this expression. 38 00:02:55,750 --> 00:03:00,370 One is what's referred to often as the cutoff frequency, omega 39 00:03:00,370 --> 00:03:01,720 sub c. 40 00:03:01,720 --> 00:03:04,600 And the second is the order of the filter, 41 00:03:04,600 --> 00:03:07,720 namely N. Let me remind you that we're 42 00:03:07,720 --> 00:03:10,660 looking at here an expression for the squared magnitude 43 00:03:10,660 --> 00:03:11,970 function. 44 00:03:11,970 --> 00:03:15,910 And so we have a 2N here. 45 00:03:15,910 --> 00:03:18,610 But in fact, N is what corresponds 46 00:03:18,610 --> 00:03:21,490 to the order of the filter. 47 00:03:21,490 --> 00:03:24,000 Well, if we look at this frequency response 48 00:03:24,000 --> 00:03:30,390 characteristic, we observe that at omega equal to 0, 49 00:03:30,390 --> 00:03:35,180 the gain or the magnitude squared is equal to unity. 50 00:03:35,180 --> 00:03:41,810 At omega equal to omega sub c, the j's of course cancel out. 51 00:03:41,810 --> 00:03:46,610 At omega equal to omega sub c, this term then is equal to 1, 52 00:03:46,610 --> 00:03:50,660 and we have for the magnitude squared function, a half. 53 00:03:50,660 --> 00:03:53,210 Or for the magnitude function, which 54 00:03:53,210 --> 00:03:56,810 is what we're looking at here, 1 divided 55 00:03:56,810 --> 00:03:58,910 by the square root of 2. 56 00:03:58,910 --> 00:04:01,820 So at omega equal to omega sub c, 57 00:04:01,820 --> 00:04:06,410 an analog Butterworth filter has a magnitude which is down by 1 58 00:04:06,410 --> 00:04:08,570 over the square root of 2. 59 00:04:08,570 --> 00:04:11,510 And the other important characteristic 60 00:04:11,510 --> 00:04:17,000 is that the frequency response is a monotonic function 61 00:04:17,000 --> 00:04:18,589 of capital Omega. 62 00:04:18,589 --> 00:04:23,720 So that as capital Omega increases from 0 to infinity, 63 00:04:23,720 --> 00:04:26,180 the magnitude or the frequency response 64 00:04:26,180 --> 00:04:28,990 is a monotonic function. 65 00:04:28,990 --> 00:04:32,250 Well, we observed that the cutoff frequency, the parameter 66 00:04:32,250 --> 00:04:39,500 omega sub c, adjusts in a sense where we might divide 67 00:04:39,500 --> 00:04:43,480 the frequency characteristic into passband, transition band, 68 00:04:43,480 --> 00:04:45,530 and stopband. 69 00:04:45,530 --> 00:04:48,090 We have another parameter, which is the parameter 70 00:04:48,090 --> 00:04:50,540 N, the order of the filter. 71 00:04:50,540 --> 00:04:55,220 And basically the effect that the parameter N has 72 00:04:55,220 --> 00:05:00,500 is to affect the shape of this frequency response in the sense 73 00:05:00,500 --> 00:05:06,590 that if capital N is larger, the frequency response tends 74 00:05:06,590 --> 00:05:12,650 to be flatter longer, so that for a larger N than what I've 75 00:05:12,650 --> 00:05:15,590 drawn with the black curve, the frequency response might 76 00:05:15,590 --> 00:05:21,150 look more like this and then drop off sharper. 77 00:05:21,150 --> 00:05:25,500 Whereas if capital N is smaller, then it 78 00:05:25,500 --> 00:05:28,350 will be less flat in the passband 79 00:05:28,350 --> 00:05:30,430 and drop off more slowly. 80 00:05:30,430 --> 00:05:34,760 So in fact, the way that I've drawn it here, 81 00:05:34,760 --> 00:05:38,480 this is the behavior of the frequency response curve 82 00:05:38,480 --> 00:05:44,780 as the parameter capital N increases. 83 00:05:44,780 --> 00:05:47,630 So, the higher the order of the filter, 84 00:05:47,630 --> 00:05:52,040 the sharper the drop from what we 85 00:05:52,040 --> 00:05:56,270 could consider as a passband region into a stopband region. 86 00:05:56,270 --> 00:05:59,870 And obviously then, the sharper the filter we want, 87 00:05:59,870 --> 00:06:04,430 the higher order filter we would design. 88 00:06:04,430 --> 00:06:07,880 Now, to look at the pole 0 pattern 89 00:06:07,880 --> 00:06:13,470 or the 0 pattern really of the Butterworth filter, 90 00:06:13,470 --> 00:06:19,070 we can convert this expression into an expression relating 91 00:06:19,070 --> 00:06:22,160 the magnitude squared function expressed 92 00:06:22,160 --> 00:06:26,240 in terms of the Laplace transform variable s. 93 00:06:26,240 --> 00:06:31,250 And so this expression corresponds to the product 94 00:06:31,250 --> 00:06:36,500 H sub a of s times H sub a of minus s, evaluated at s 95 00:06:36,500 --> 00:06:41,840 equals j omega, in which case the j omega 96 00:06:41,840 --> 00:06:46,755 is what corresponds to s, and so H sub a of s times H sub 97 00:06:46,755 --> 00:06:51,590 a of minus s is of the form 1 over 1 plus 98 00:06:51,590 --> 00:06:58,650 s divided by j omega sub c raised to the 2N power. 99 00:06:58,650 --> 00:07:05,040 Well, what we recognize is that this expression has poles, 100 00:07:05,040 --> 00:07:07,200 if we solve this equation. 101 00:07:07,200 --> 00:07:10,470 This expression has poles at of course the roots 102 00:07:10,470 --> 00:07:15,690 of the denominator polynomial or at s sub p equal to minus 1 103 00:07:15,690 --> 00:07:19,830 to the over 2N times j omega sub c. 104 00:07:19,830 --> 00:07:23,040 That's simply solving the equation with this denominator 105 00:07:23,040 --> 00:07:26,830 polynomial equal to 0. 106 00:07:26,830 --> 00:07:30,460 Well, we can see more specifically 107 00:07:30,460 --> 00:07:34,990 where these poles lie in the s plane 108 00:07:34,990 --> 00:07:40,870 by recognizing that these are the 2N roots of minus 1. 109 00:07:40,870 --> 00:07:44,020 And then we have a j, which corresponds 110 00:07:44,020 --> 00:07:48,700 to e to the j pi over 2. 111 00:07:48,700 --> 00:07:52,810 So we can rewrite this expression for the poles 112 00:07:52,810 --> 00:07:59,450 as s sub p equal to e to the j pi over 2N. 113 00:08:03,336 --> 00:08:09,450 That's one of the roots of minus 1, plus k times 2 pi 114 00:08:09,450 --> 00:08:11,380 where k is an integer. 115 00:08:11,380 --> 00:08:14,790 This generates the roots of minus 1. 116 00:08:14,790 --> 00:08:17,310 We need to multiply by j, and we can do that 117 00:08:17,310 --> 00:08:20,220 by multiplying by e to the j pi over 2, which 118 00:08:20,220 --> 00:08:25,680 is equal to j times omega sub c, which is the cutoff frequency 119 00:08:25,680 --> 00:08:28,680 parameter for the Butterworth filter. 120 00:08:28,680 --> 00:08:32,370 So this then specifies where the pole locations 121 00:08:32,370 --> 00:08:34,470 are for the Butterworth filter. 122 00:08:34,470 --> 00:08:38,940 For example, if we consider the case, 123 00:08:38,940 --> 00:08:45,570 let's say with n equal to 3, k let's say equal to 0. 124 00:08:45,570 --> 00:08:49,105 That says then that we have a pole at e 125 00:08:49,105 --> 00:08:56,300 to the j pi divided by 6, e to the j pi over 6, times 126 00:08:56,300 --> 00:08:58,320 e to the j pi over 2. 127 00:08:58,320 --> 00:09:01,670 In other words, we have a pole in the s plane 128 00:09:01,670 --> 00:09:05,570 at an angle of pi over 6 plus pi over 2, 129 00:09:05,570 --> 00:09:08,870 which corresponds to this location. 130 00:09:08,870 --> 00:09:14,750 Then we'll have poles distributed in angle 131 00:09:14,750 --> 00:09:18,410 around a circle in the s plane, distributed 132 00:09:18,410 --> 00:09:22,400 in an angle where the angular spacing is pi over 3. 133 00:09:22,400 --> 00:09:28,010 The pi over 3 arising from a consideration of 2 pi k 134 00:09:28,010 --> 00:09:32,930 divided by 2N, where in this case, N is equal to 6. 135 00:09:32,930 --> 00:09:39,100 So these poles are distributed equally spaced in angle 136 00:09:39,100 --> 00:09:42,070 on a circle in the s plane. 137 00:09:42,070 --> 00:09:45,810 For N equal to 3, the angular spacing is pi over 3. 138 00:09:45,810 --> 00:09:50,500 For k equal to 0 that first pole corresponds to this one, 139 00:09:50,500 --> 00:09:53,040 and then we continue around. 140 00:09:53,040 --> 00:09:56,640 Now these are poles distributed on a circle, which 141 00:09:56,640 --> 00:09:59,910 tends to look like the z plane. 142 00:09:59,910 --> 00:10:03,360 But I stress that what we're talking about here 143 00:10:03,360 --> 00:10:04,410 is the s plane. 144 00:10:04,410 --> 00:10:07,830 In particular, we're talking about the analog frequency 145 00:10:07,830 --> 00:10:12,730 response design as the class of analog Butterworth filters, 146 00:10:12,730 --> 00:10:15,630 which we're then going to map to digital filters. 147 00:10:15,630 --> 00:10:18,840 So this is a circle in the s plane. 148 00:10:18,840 --> 00:10:21,870 It's often referred to as the Butterworth circle. 149 00:10:21,870 --> 00:10:28,320 And it has a radius which is equal to omega sub c. 150 00:10:28,320 --> 00:10:33,240 In designing an analog Butterworth filter then, 151 00:10:33,240 --> 00:10:38,720 the procedure is to appropriately choose 152 00:10:38,720 --> 00:10:41,490 the parameters omega sub c and capital 153 00:10:41,490 --> 00:10:45,840 N. Those are the parameters of the analog Butterworth filter. 154 00:10:45,840 --> 00:10:52,530 And then from the poles distributed on the Butterworth 155 00:10:52,530 --> 00:10:58,240 circle, this gives us the pole locations for the product, 156 00:10:58,240 --> 00:11:04,970 H sub a of s times H sub a of minus s. 157 00:11:04,970 --> 00:11:09,500 We can then simply associate with the transfer function 158 00:11:09,500 --> 00:11:11,180 H sub a of s. 159 00:11:11,180 --> 00:11:13,490 The poles in the left half plane, 160 00:11:13,490 --> 00:11:18,200 to generate a stable filter, and then the ones which 161 00:11:18,200 --> 00:11:21,740 are contributed by the factor H sub a of minus s 162 00:11:21,740 --> 00:11:26,200 are the corresponding image poles in the right half plane. 163 00:11:26,200 --> 00:11:31,800 The procedure then is to design a squared magnitude function. 164 00:11:31,800 --> 00:11:33,810 Talking about a Butterworth filter, 165 00:11:33,810 --> 00:11:36,375 we choose these parameters omega sub c 166 00:11:36,375 --> 00:11:39,300 and N. That tells us where the poles are located 167 00:11:39,300 --> 00:11:42,150 on the Butterworth circle. 168 00:11:42,150 --> 00:11:46,320 From the pole locations for the squared magnitude function, 169 00:11:46,320 --> 00:11:50,700 then we can factor that into H sub a of s times H sub 170 00:11:50,700 --> 00:11:53,760 a of minus s, by choosing the poles that 171 00:11:53,760 --> 00:11:56,820 fall in the left half plane, to give us 172 00:11:56,820 --> 00:12:01,631 a causal, stable analog filter. 173 00:12:01,631 --> 00:12:02,130 All right. 174 00:12:02,130 --> 00:12:05,970 Well, that is an analog filter. 175 00:12:05,970 --> 00:12:07,830 What we would like to talk about is 176 00:12:07,830 --> 00:12:10,500 the design of a digital filter. 177 00:12:10,500 --> 00:12:13,140 And the procedure that we're going to go through 178 00:12:13,140 --> 00:12:18,600 is to choose a set of specs for the digital filter, 179 00:12:18,600 --> 00:12:22,230 and then decide on what the corresponding specifications 180 00:12:22,230 --> 00:12:25,170 should be for the analog filter, depending on whether we're 181 00:12:25,170 --> 00:12:29,130 using impulse invariance or the bilinear transformation, 182 00:12:29,130 --> 00:12:32,640 design the analog filter, and then map 183 00:12:32,640 --> 00:12:36,300 the result to a digital filter using 184 00:12:36,300 --> 00:12:39,300 one of those two techniques. 185 00:12:39,300 --> 00:12:44,070 So let's choose a set of digital filter specifications 186 00:12:44,070 --> 00:12:50,490 for a digital lowpass filter with a passband which 187 00:12:50,490 --> 00:12:55,710 occurs for frequencies now in the digital domain, 188 00:12:55,710 --> 00:13:03,150 for frequencies below 0.2 pi, and a stopband region that 189 00:13:03,150 --> 00:13:07,050 occurs for frequencies greater than 0.3 pi, 190 00:13:07,050 --> 00:13:10,110 and the transition band then, of course, is the region 191 00:13:10,110 --> 00:13:13,370 in between those. 192 00:13:13,370 --> 00:13:20,060 So, we would like to design a digital filter, which 193 00:13:20,060 --> 00:13:24,020 stays within some limits in this passband region, 194 00:13:24,020 --> 00:13:28,670 drops below some limit, delta sub s in the stopband region. 195 00:13:28,670 --> 00:13:32,810 And we'll choose as the limits in the passband, 196 00:13:32,810 --> 00:13:37,100 unity for the upper limit and 1 minus delta sub p for the lower 197 00:13:37,100 --> 00:13:38,390 limit. 198 00:13:38,390 --> 00:13:42,860 Where delta 1 minus delta sub p might not 199 00:13:42,860 --> 00:13:47,100 and in fact it won't turn out to be 1 over the square root of 2, 200 00:13:47,100 --> 00:13:50,390 in other words, this cutoff frequency 201 00:13:50,390 --> 00:13:54,725 will not necessarily correspond to the parameter omega sub 202 00:13:54,725 --> 00:13:57,850 c for the Butterworth filter. 203 00:13:57,850 --> 00:13:58,350 All right. 204 00:13:58,350 --> 00:14:01,950 Well, so let's choose a set of specifications. 205 00:14:01,950 --> 00:14:05,250 The ones that I've chosen are the requirement 206 00:14:05,250 --> 00:14:11,970 that the frequency response characteristic be within 1db 207 00:14:11,970 --> 00:14:14,340 of unity in the passband. 208 00:14:14,340 --> 00:14:17,160 In other words, the requirement that 1 minus deltas sub 209 00:14:17,160 --> 00:14:20,970 p be greater than or equal to minus 1db. 210 00:14:20,970 --> 00:14:26,080 So this deviation must be less than 1db. 211 00:14:26,080 --> 00:14:28,800 And then the requirement that in the stopband 212 00:14:28,800 --> 00:14:31,260 the frequency response characteristic 213 00:14:31,260 --> 00:14:35,550 is below minus 15db. 214 00:14:35,550 --> 00:14:38,580 In other words, the stopband attenuation 215 00:14:38,580 --> 00:14:45,090 for frequencies greater than 0.3 pi is greater than minus 15db. 216 00:14:45,090 --> 00:14:48,270 It's further down than minus 15db. 217 00:14:48,270 --> 00:14:52,500 So delta sub s is less than or equal to minus 15db. 218 00:14:52,500 --> 00:14:55,980 The one other specification that we'll impose, 219 00:14:55,980 --> 00:14:59,220 or in fact, it's really a consequence that 220 00:14:59,220 --> 00:15:02,070 will result from using a Butterworth filter, 221 00:15:02,070 --> 00:15:07,800 is the fact that the frequency characteristic is monotonic. 222 00:15:07,800 --> 00:15:12,030 So we have the passband edge, the stopband edge, 223 00:15:12,030 --> 00:15:15,330 the passband ripple or deviation, 224 00:15:15,330 --> 00:15:18,700 and the stopband ripple or deviation. 225 00:15:18,700 --> 00:15:24,240 And we can, of course, rewrite these specifications 226 00:15:24,240 --> 00:15:30,240 in terms of requirements on the transfer function or frequency 227 00:15:30,240 --> 00:15:36,420 response, the magnitude of the frequency response. 228 00:15:36,420 --> 00:15:41,760 The requirement that the deviation be less than 1db 229 00:15:41,760 --> 00:15:45,510 in the passband is the requirement then 230 00:15:45,510 --> 00:15:49,680 that 20 log to the base 10 of the magnitude of the frequency 231 00:15:49,680 --> 00:15:51,030 response-- 232 00:15:51,030 --> 00:15:53,270 that's the deviation db-- 233 00:15:53,270 --> 00:15:58,425 be greater than or equal to minus 1, or that the magnitude 234 00:15:58,425 --> 00:16:03,650 be greater than or equal to 10 to the minus 0.05. 235 00:16:03,650 --> 00:16:06,960 And of course, we wanted also to be less than unity, 236 00:16:06,960 --> 00:16:09,110 and that's an implied condition. 237 00:16:09,110 --> 00:16:11,210 So it must be less than unity, and it 238 00:16:11,210 --> 00:16:14,740 must be greater than or equal to 10 to the minus 0.05 239 00:16:14,740 --> 00:16:19,100 for frequencies from 0 to 0.2 pi. 240 00:16:19,100 --> 00:16:21,560 So in particular, since it's monotonic, 241 00:16:21,560 --> 00:16:28,280 we'll impose that condition at the frequency point 0.2 pi, 242 00:16:28,280 --> 00:16:30,520 corresponding to the end of the stopband 243 00:16:30,520 --> 00:16:33,590 and the beginning of the transition band. 244 00:16:33,590 --> 00:16:36,770 The second condition that we impose 245 00:16:36,770 --> 00:16:40,980 is the condition that by the time 246 00:16:40,980 --> 00:16:45,340 we get to omega equal to 0.3 pi, we 247 00:16:45,340 --> 00:16:49,780 would like the frequency response to be down at least 15 248 00:16:49,780 --> 00:16:52,810 db, and more if possible. 249 00:16:52,810 --> 00:16:56,300 But the condition is that the 20 log 250 00:16:56,300 --> 00:16:59,980 to the base 10 of the magnitude at omega equal to 0.3 pi 251 00:16:59,980 --> 00:17:04,310 must be less than or equal to minus 15. 252 00:17:04,310 --> 00:17:07,720 So this says we must be further down than 15 db, 253 00:17:07,720 --> 00:17:11,433 or we can translate that into a condition on the magnitude, 254 00:17:11,433 --> 00:17:13,599 so that the magnitude of that frequency is less than 255 00:17:13,599 --> 00:17:18,790 or equal to 10 to the minus 0.75. 256 00:17:18,790 --> 00:17:22,319 Well, let's consider two-- 257 00:17:22,319 --> 00:17:25,589 we want to consider two design procedures. 258 00:17:25,589 --> 00:17:30,360 Let's first consider the impulse invariant design procedure, 259 00:17:30,360 --> 00:17:34,590 in which case we would like to convert these specifications 260 00:17:34,590 --> 00:17:40,800 on the digital filter to corresponding specifications 261 00:17:40,800 --> 00:17:44,050 on the analog filter. 262 00:17:44,050 --> 00:17:47,500 Now, we know that from discussions 263 00:17:47,500 --> 00:17:52,120 that we've had previously that if we have an analog frequency 264 00:17:52,120 --> 00:17:57,130 response and we apply impulse invariance to the impulse 265 00:17:57,130 --> 00:18:01,630 response, the digital frequency response consists 266 00:18:01,630 --> 00:18:05,920 of the analog frequency response scaled in frequency so 267 00:18:05,920 --> 00:18:09,940 that capital Omega is equal to little omega divided 268 00:18:09,940 --> 00:18:16,775 by capital T. And then that scaled replica of H 269 00:18:16,775 --> 00:18:23,950 sub a added to itself delayed by little omega equal to 2 pi, 4 270 00:18:23,950 --> 00:18:24,790 pi, et cetera. 271 00:18:24,790 --> 00:18:28,210 That is multiples of 2 pi. 272 00:18:28,210 --> 00:18:36,220 So, that means then that the digital filter is scaled 273 00:18:36,220 --> 00:18:39,310 repeated replicas of the analog filter, 274 00:18:39,310 --> 00:18:44,380 and so we would choose the analog filter 275 00:18:44,380 --> 00:18:48,760 to have similar specifications to the digital filter, 276 00:18:48,760 --> 00:18:53,830 but with the corresponding frequency parameters dictated 277 00:18:53,830 --> 00:18:57,610 by this transformation, capital Omega equal to little omega, 278 00:18:57,610 --> 00:19:05,260 divided by capital T. Well, that of course neglects aliasing, 279 00:19:05,260 --> 00:19:08,980 and in fact as we go through the impulse invariant design, 280 00:19:08,980 --> 00:19:11,890 we'll initially neglect aliasing. 281 00:19:11,890 --> 00:19:17,800 And a rationale for doing this or a reason why, in fact, it's 282 00:19:17,800 --> 00:19:20,770 not unreasonable to do that, will emerge 283 00:19:20,770 --> 00:19:22,439 as we go through the example. 284 00:19:22,439 --> 00:19:23,980 So for the time being, in fact, we're 285 00:19:23,980 --> 00:19:27,310 going to neglect aliasing, so that we'll 286 00:19:27,310 --> 00:19:31,030 think of the analog and digital frequency responses 287 00:19:31,030 --> 00:19:34,450 as simply related by this substitution of frequency 288 00:19:34,450 --> 00:19:37,210 variable, capital Omega equal to little omega 289 00:19:37,210 --> 00:19:40,480 divided by capital T. 290 00:19:40,480 --> 00:19:49,230 Well, that leads us then to the analog frequency response 291 00:19:49,230 --> 00:19:52,720 which I've depicted here. 292 00:19:52,720 --> 00:19:57,220 We had a factor of 1 over capital T in the amplitude 293 00:19:57,220 --> 00:20:00,230 of this expression. 294 00:20:00,230 --> 00:20:03,340 So for the digital filter to result 295 00:20:03,340 --> 00:20:06,970 with an amplitude of unity at dc, 296 00:20:06,970 --> 00:20:11,425 we would scale the analog frequency response by capital 297 00:20:11,425 --> 00:20:18,620 T. So the important values then in capital Omega 298 00:20:18,620 --> 00:20:23,870 are the ones corresponding to little omega equal to 0.2 pi, 299 00:20:23,870 --> 00:20:27,290 or since capital Omega is equal to little omega divided 300 00:20:27,290 --> 00:20:33,170 by capital T. We have a passband edge occurring at capital 301 00:20:33,170 --> 00:20:36,310 Omega equal to 0.2 pi over capital T, 302 00:20:36,310 --> 00:20:42,250 and a stopband edge equal to 0.3 pi over capital T. 303 00:20:42,250 --> 00:20:46,660 At this passband edge, according to the specifications 304 00:20:46,660 --> 00:20:49,600 on the digital filter that we want, 305 00:20:49,600 --> 00:20:53,530 we would like the frequency response for frequencies 306 00:20:53,530 --> 00:20:54,500 below this-- 307 00:20:54,500 --> 00:20:56,560 In other words, in the passband-- 308 00:20:56,560 --> 00:21:00,130 to be between capital T and capital T times 10 309 00:21:00,130 --> 00:21:02,080 to the minus 0.05. 310 00:21:02,080 --> 00:21:04,630 That's the guarantee that we have less than 1 db 311 00:21:04,630 --> 00:21:06,610 ripple in the passband. 312 00:21:06,610 --> 00:21:10,000 And for frequencies greater than 0.3 pi, 313 00:21:10,000 --> 00:21:12,940 we would like to be below capital T times 10 314 00:21:12,940 --> 00:21:14,950 to the minus 0.75. 315 00:21:14,950 --> 00:21:19,330 That's the guarantee that we're down 15 db or more 316 00:21:19,330 --> 00:21:21,880 in the stopband. 317 00:21:21,880 --> 00:21:26,620 The way I've drawn it here, I've implied that I will exactly 318 00:21:26,620 --> 00:21:29,980 meet the specifications at the passband edge, 319 00:21:29,980 --> 00:21:31,690 and exactly meet the specifications 320 00:21:31,690 --> 00:21:33,550 at the stopband edge. 321 00:21:33,550 --> 00:21:39,550 You can imagine, of course, that if I did that and then 322 00:21:39,550 --> 00:21:44,350 converted to a digital filter using impulse invariance 323 00:21:44,350 --> 00:21:48,340 that there would be an effect due to aliasing, which 324 00:21:48,340 --> 00:21:51,610 in fact would result in my not meeting 325 00:21:51,610 --> 00:21:55,450 exactly the specifications at the stopband edge. 326 00:21:55,450 --> 00:21:59,870 And that's a point that we'll deal with in a few minutes. 327 00:21:59,870 --> 00:22:02,740 All right, well now we have our specifications. 328 00:22:02,740 --> 00:22:06,220 Let me incidentally point out that there's 329 00:22:06,220 --> 00:22:10,990 this parameter capital T that we're carrying around. 330 00:22:10,990 --> 00:22:15,730 And as I'll justify partly on the basis of this example, 331 00:22:15,730 --> 00:22:20,510 the parameter capital T is an irrelevant parameter. 332 00:22:20,510 --> 00:22:22,810 It's a parameter that will disappear. 333 00:22:22,810 --> 00:22:26,800 We'll carry it through with us for this one example. 334 00:22:26,800 --> 00:22:29,800 But for other examples and problems 335 00:22:29,800 --> 00:22:33,340 that you work through the study guide, 336 00:22:33,340 --> 00:22:35,320 you should have absorbed the fact 337 00:22:35,320 --> 00:22:38,080 that capital T is irrelevant, and in fact capital 338 00:22:38,080 --> 00:22:40,720 T can be chosen equal to unity. 339 00:22:40,720 --> 00:22:43,120 But let's carry it through in this example, 340 00:22:43,120 --> 00:22:47,300 and just see how it disappears. 341 00:22:47,300 --> 00:22:47,800 All right. 342 00:22:47,800 --> 00:22:53,710 Well, so we want the analog Butterworth filter 343 00:22:53,710 --> 00:22:56,360 meaning these specifications. 344 00:22:56,360 --> 00:22:59,830 And we want it at omega equal to 0 345 00:22:59,830 --> 00:23:03,460 to have a gain magnitude squared function to be T squared, 346 00:23:03,460 --> 00:23:06,100 so that the magnitude is T. So here we 347 00:23:06,100 --> 00:23:11,590 have the form then of the analog Butterworth filter. 348 00:23:11,590 --> 00:23:15,310 And in order to meet these specifications 349 00:23:15,310 --> 00:23:20,930 at this frequency and this one, we then have two equations. 350 00:23:20,930 --> 00:23:24,650 One equation says that at capital Omega 351 00:23:24,650 --> 00:23:28,680 equal to 0.2 pi over capital T, we 352 00:23:28,680 --> 00:23:35,450 would like the value of the magnitude function 353 00:23:35,450 --> 00:23:38,480 to be T times 10 to the minus 0.05, 354 00:23:38,480 --> 00:23:41,450 which implies that this denominator should 355 00:23:41,450 --> 00:23:46,438 be equal to 10 to the 0.1. 356 00:23:46,438 --> 00:23:50,160 Second of all, at the stopband frequency, 357 00:23:50,160 --> 00:23:54,510 0.3 pi divided by capital T, the fact 358 00:23:54,510 --> 00:24:00,480 that we want the magnitude to be T times 10 to the minus 0.75 359 00:24:00,480 --> 00:24:05,410 implies the magnitude squared is of course the square of that. 360 00:24:05,410 --> 00:24:12,300 And we want then the denominator to be equal to 10 to the 1.5. 361 00:24:12,300 --> 00:24:15,500 So we have two points that we're trying to nail down. 362 00:24:15,500 --> 00:24:20,020 We have two parameters, omega sub c and N. 363 00:24:20,020 --> 00:24:22,330 From these two points that we're trying to nail down, 364 00:24:22,330 --> 00:24:24,520 we get two equations. 365 00:24:24,520 --> 00:24:28,510 And we can now solve these equations for our parameters, 366 00:24:28,510 --> 00:24:31,690 omega sub c and capital N. 367 00:24:31,690 --> 00:24:35,200 Well, if we do that, and it's a little tedious to do it, 368 00:24:35,200 --> 00:24:37,150 let me point out incidentally since we're 369 00:24:37,150 --> 00:24:39,940 trying to keep track of this capital T, 370 00:24:39,940 --> 00:24:44,080 that capital T drops down into the numerator 371 00:24:44,080 --> 00:24:49,300 and so, in fact, we can solve for capital N and omega sub 372 00:24:49,300 --> 00:24:51,910 c times capital T. In other words, 373 00:24:51,910 --> 00:24:55,570 we can just move this down here algebraically. 374 00:24:55,570 --> 00:24:58,990 And so we have then instead of the parameter omega sub c, 375 00:24:58,990 --> 00:25:03,730 we have the parameter omega sub c times capital T. 376 00:25:03,730 --> 00:25:07,090 If you grind through these two equations, 377 00:25:07,090 --> 00:25:12,640 what results is a value for N equal to 5.8858 and probably 378 00:25:12,640 --> 00:25:14,170 some other digits. 379 00:25:14,170 --> 00:25:20,130 And omega sub c capital T equal to 0.70474. 380 00:25:20,130 --> 00:25:24,220 And we could imagine that at this point 381 00:25:24,220 --> 00:25:31,130 we're done, except that the parameter N 382 00:25:31,130 --> 00:25:35,410 corresponding to the order of the filter, of course, 383 00:25:35,410 --> 00:25:38,000 has to be an integer. 384 00:25:38,000 --> 00:25:43,000 So, what that means is that we can't use the value of N 385 00:25:43,000 --> 00:25:44,920 as I've indicated here. 386 00:25:44,920 --> 00:25:47,790 We need an integer value. 387 00:25:47,790 --> 00:25:51,500 Also if we were to round this down or truncate 388 00:25:51,500 --> 00:25:55,860 it down to a choice of N equal to 5, 389 00:25:55,860 --> 00:25:58,410 then since the order is lower you 390 00:25:58,410 --> 00:26:00,480 can imagine that the filter characteristics 391 00:26:00,480 --> 00:26:02,200 won't be as good. 392 00:26:02,200 --> 00:26:06,540 In other words, we're not going to meet these specifications. 393 00:26:06,540 --> 00:26:12,600 So the other choice then is to use instead of this value of N, 394 00:26:12,600 --> 00:26:15,540 use a value of N equal to 6. 395 00:26:15,540 --> 00:26:21,190 In other words, round up to the next integer value. 396 00:26:21,190 --> 00:26:26,550 And if we do that then these two equations 397 00:26:26,550 --> 00:26:30,010 will no longer be satisfied. 398 00:26:30,010 --> 00:26:32,590 We're now using a higher order filter 399 00:26:32,590 --> 00:26:35,550 than these equations would dictate. 400 00:26:35,550 --> 00:26:37,380 Of course, we're using an integer order, 401 00:26:37,380 --> 00:26:39,120 because that's what we need. 402 00:26:39,120 --> 00:26:44,710 We're using a sixth order filter. 403 00:26:44,710 --> 00:26:51,040 And what that means is that if we choose N equal to 6, 404 00:26:51,040 --> 00:26:56,130 we can satisfy this equation, or we can satisfy this equation, 405 00:26:56,130 --> 00:26:57,850 but we can't satisfy both of them. 406 00:27:00,480 --> 00:27:03,570 Well, which one should we try to meet 407 00:27:03,570 --> 00:27:07,440 and which one should we exceed? 408 00:27:07,440 --> 00:27:09,840 Well, we know that with impulse invariance 409 00:27:09,840 --> 00:27:14,460 there is the issue of aliasing. 410 00:27:14,460 --> 00:27:17,850 And so in fact, in impulse invariant design 411 00:27:17,850 --> 00:27:22,530 it will often happen that although we design exactly 412 00:27:22,530 --> 00:27:25,370 to meet the stopband specifications, 413 00:27:25,370 --> 00:27:27,030 the stopband specifications won't 414 00:27:27,030 --> 00:27:29,400 be met because of aliasing. 415 00:27:29,400 --> 00:27:33,500 Consequently, given the flexibility that we have, 416 00:27:33,500 --> 00:27:36,870 due to the fact that we can actually implement a higher 417 00:27:36,870 --> 00:27:38,610 order filter than these equations 418 00:27:38,610 --> 00:27:42,420 dictate, to compensate for aliasing 419 00:27:42,420 --> 00:27:47,580 we can exceed the stopband specifications 420 00:27:47,580 --> 00:27:51,840 and meet exactly the passband specifications. 421 00:27:51,840 --> 00:27:56,940 So if we substitute for N, N equals 6 422 00:27:56,940 --> 00:28:03,280 into this equation that then requires 423 00:28:03,280 --> 00:28:07,180 that omega sub c T be such that we exactly 424 00:28:07,180 --> 00:28:11,950 meet the passband specifications, in which case 425 00:28:11,950 --> 00:28:13,600 this equation won't be met. 426 00:28:13,600 --> 00:28:15,970 In fact, what will happen at the stopband 427 00:28:15,970 --> 00:28:19,240 edge is that the stopband specifications 428 00:28:19,240 --> 00:28:21,490 will be exceeded. 429 00:28:21,490 --> 00:28:27,580 If we do this, then we have for the equation 430 00:28:27,580 --> 00:28:31,210 that we solve for omega sub c T from, 431 00:28:31,210 --> 00:28:37,150 the equation which specified the passband edge, which is where 432 00:28:37,150 --> 00:28:39,310 we're going to meet the specs. 433 00:28:39,310 --> 00:28:45,370 And what results then is for omega sub c T, this value, 434 00:28:45,370 --> 00:28:48,490 rather than the previous value that had been obtained 435 00:28:48,490 --> 00:28:51,670 from the two equations. 436 00:28:51,670 --> 00:28:55,490 Well, from these parameters then, 437 00:28:55,490 --> 00:29:00,060 we have that omega sub c is 0.7032 divided by capital T. 438 00:29:00,060 --> 00:29:05,610 We can substitute these parameters into the form 439 00:29:05,610 --> 00:29:09,285 for the squared magnitude function, H sub a of s times H 440 00:29:09,285 --> 00:29:12,660 sub a of minus s, and actually it's 441 00:29:12,660 --> 00:29:16,620 this raised to the 2N, which is the 2 times 442 00:29:16,620 --> 00:29:19,530 sixth power, which is the 12th power. 443 00:29:19,530 --> 00:29:24,420 So this then is the form for the analog squared magnitude 444 00:29:24,420 --> 00:29:27,100 function. 445 00:29:27,100 --> 00:29:30,700 Now notice that the parameter capital T still 446 00:29:30,700 --> 00:29:32,050 hasn't disappeared. 447 00:29:32,050 --> 00:29:32,770 We still have it. 448 00:29:32,770 --> 00:29:35,020 We have it there, and we have it here. 449 00:29:35,020 --> 00:29:39,270 But notice that when we substitute in for omega sub c, 450 00:29:39,270 --> 00:29:41,590 this number divided by capital T if you 451 00:29:41,590 --> 00:29:45,340 track through that algebra, capital T 452 00:29:45,340 --> 00:29:50,200 reappears in this expression as a multiplier on s. 453 00:29:50,200 --> 00:29:53,770 That is we had 0.7032 divided by capital T. 454 00:29:53,770 --> 00:29:56,620 That gets reflected back up into this numerator, 455 00:29:56,620 --> 00:29:59,650 so that we have s times capital T. Well, 456 00:29:59,650 --> 00:30:02,800 let's see what that means. 457 00:30:02,800 --> 00:30:06,500 Suppose that capital T were equal to 1. 458 00:30:06,500 --> 00:30:12,060 And we got an analog impulse response, H sub a of T, 459 00:30:12,060 --> 00:30:14,790 or the system function H sub a of s. 460 00:30:17,470 --> 00:30:21,960 If instead we reinserted capital T 461 00:30:21,960 --> 00:30:24,880 and considered H sub a of s times 462 00:30:24,880 --> 00:30:31,610 capital T multiplied by capital T 463 00:30:31,610 --> 00:30:34,760 that impulse response would be related to this one 464 00:30:34,760 --> 00:30:37,046 by simply a time scaling. 465 00:30:37,046 --> 00:30:38,420 In other words, this one would be 466 00:30:38,420 --> 00:30:44,660 replaced by H sub a of t divided by capital T. Well, 467 00:30:44,660 --> 00:30:49,280 let's look at this and ask what happens when we sample it 468 00:30:49,280 --> 00:30:52,910 at samples spaced by capital T. 469 00:30:52,910 --> 00:30:55,850 So, we look at this impulse response 470 00:30:55,850 --> 00:30:59,230 with T replaced by n times capital 471 00:30:59,230 --> 00:31:02,932 T, as we've specified here. 472 00:31:02,932 --> 00:31:05,015 And we observe that no matter what we pick capital 473 00:31:05,015 --> 00:31:08,750 T to be that parameter disappears. 474 00:31:08,750 --> 00:31:11,990 Because little t equal to n times 475 00:31:11,990 --> 00:31:15,380 capital T gives us samples H sub a 476 00:31:15,380 --> 00:31:19,730 of n, which are exactly the same samples that we would 477 00:31:19,730 --> 00:31:23,600 get no matter how we chose the parameter capital T, 478 00:31:23,600 --> 00:31:26,240 or equivalently whether or not we chose the parameter 479 00:31:26,240 --> 00:31:30,020 capital T equal to unity. 480 00:31:30,020 --> 00:31:32,570 I think that it requires a little reflection 481 00:31:32,570 --> 00:31:35,240 to absorb this point. 482 00:31:35,240 --> 00:31:39,980 It's basically tied to the fact that the frequency response 483 00:31:39,980 --> 00:31:42,440 is specified for the digital filter, 484 00:31:42,440 --> 00:31:44,420 not for the analog filter. 485 00:31:44,420 --> 00:31:46,940 And specifying the frequency response 486 00:31:46,940 --> 00:31:49,160 for the digital filter, in effect, 487 00:31:49,160 --> 00:31:55,340 specifies capital Omega times capital T. Well, 488 00:31:55,340 --> 00:31:59,480 I leave it to you to think about this a little. 489 00:31:59,480 --> 00:32:03,880 But the important point is that, in fact this parameter 490 00:32:03,880 --> 00:32:07,940 T, if we specify the filter in terms 491 00:32:07,940 --> 00:32:11,270 of digital specifications, this parameter capital T 492 00:32:11,270 --> 00:32:14,760 is really irrelevant. 493 00:32:14,760 --> 00:32:15,260 All right. 494 00:32:15,260 --> 00:32:20,190 Well, so here is our analog design. 495 00:32:20,190 --> 00:32:26,190 And we can obtain H sub a of s from this, 496 00:32:26,190 --> 00:32:28,320 according to the method that we talked 497 00:32:28,320 --> 00:32:30,720 about previously taking the left half plane 498 00:32:30,720 --> 00:32:33,120 poles of this expression. 499 00:32:33,120 --> 00:32:35,730 Converting those to a digital filter 500 00:32:35,730 --> 00:32:39,300 by using the transformation that we discussed 501 00:32:39,300 --> 00:32:42,030 in the previous two lectures, expanding, 502 00:32:42,030 --> 00:32:45,300 for example, in terms of residues and poles, 503 00:32:45,300 --> 00:32:49,380 and then applying the impulse invariant transformation. 504 00:32:49,380 --> 00:32:59,160 And if we do that, what results is a digital lowpass filter, 505 00:32:59,160 --> 00:33:02,280 which was the lowpass filter that we set out to design. 506 00:33:02,280 --> 00:33:06,330 And let me just show how those specifications, 507 00:33:06,330 --> 00:33:09,510 or how that design comes out. 508 00:33:09,510 --> 00:33:14,040 So this, for the example that we've been talking about, 509 00:33:14,040 --> 00:33:20,220 is a graph of the frequency response characteristics. 510 00:33:20,220 --> 00:33:24,570 Here is the magnitude as a function of digital frequency 511 00:33:24,570 --> 00:33:25,920 omega. 512 00:33:25,920 --> 00:33:29,130 And here is the same frequency response 513 00:33:29,130 --> 00:33:32,180 plotted in terms of db. 514 00:33:32,180 --> 00:33:37,340 And we see that we had in the specifications 515 00:33:37,340 --> 00:33:45,400 a passband edge at 0.2 pi, a stopband edge at 0.3 pi. 516 00:33:45,400 --> 00:33:51,190 At 0.2 pi we asked that the gain be down by 1db. 517 00:33:51,190 --> 00:33:55,840 And of course, it's hard to tell exactly that we're down 1db, 518 00:33:55,840 --> 00:33:57,640 but in fact we are. 519 00:33:57,640 --> 00:34:01,930 At omega equal to 0.3 pi, our specification 520 00:34:01,930 --> 00:34:07,900 was that we wanted to be down by 15 db. 521 00:34:07,900 --> 00:34:10,810 In fact, we overcompensated, because of the fact 522 00:34:10,810 --> 00:34:14,650 that we had to round the order of the filter up to an integer 523 00:34:14,650 --> 00:34:15,860 value. 524 00:34:15,860 --> 00:34:20,360 And you can see, in fact, that if you look at this carefully, 525 00:34:20,360 --> 00:34:25,929 we exceed the specifications of 0.3 pi by a little bit. 526 00:34:25,929 --> 00:34:30,460 In other words, we're down by a little more than 15 db. 527 00:34:30,460 --> 00:34:32,620 In fact, for this particular filter 528 00:34:32,620 --> 00:34:35,980 you can imagine that the effective aliasing is, in fact, 529 00:34:35,980 --> 00:34:37,239 rather minimal. 530 00:34:37,239 --> 00:34:42,340 Because this frequency response, by the time we get out to pi 531 00:34:42,340 --> 00:34:43,870 is essentially 0. 532 00:34:43,870 --> 00:34:48,014 Here we're down to minus 75 db. 533 00:34:48,014 --> 00:34:49,389 And that's, of course, the amount 534 00:34:49,389 --> 00:34:52,040 that would get aliased back in. 535 00:34:52,040 --> 00:34:55,960 So this is the resulting filter frequency characteristics 536 00:34:55,960 --> 00:34:59,560 for the impulse invariant design where 537 00:34:59,560 --> 00:35:06,840 we exceed slightly the stopband edge specifications. 538 00:35:06,840 --> 00:35:10,050 Now, the next thing that I'd like to go onto 539 00:35:10,050 --> 00:35:14,430 is the corresponding design, the design 540 00:35:14,430 --> 00:35:17,100 or the corresponding Butterworth filter, 541 00:35:17,100 --> 00:35:19,770 now using the bilinear transformation 542 00:35:19,770 --> 00:35:23,280 rather than using impulse invariance. 543 00:35:23,280 --> 00:35:29,160 I remind you that the basic idea with the bilinear 544 00:35:29,160 --> 00:35:34,770 transformation, as we've discussed in the last lectures, 545 00:35:34,770 --> 00:35:44,790 is that we basically choose the analog specifications 546 00:35:44,790 --> 00:35:48,330 by pre-warping the critical frequencies 547 00:35:48,330 --> 00:35:53,730 for the digital filter through the nonlinear distortion 548 00:35:53,730 --> 00:35:57,970 curve corresponding to the bilinear transformation. 549 00:35:57,970 --> 00:36:01,839 So, we would start here for the digital filter. 550 00:36:01,839 --> 00:36:04,380 Of course, here we're talking about a monotonic filter rather 551 00:36:04,380 --> 00:36:05,940 than one that ripples. 552 00:36:05,940 --> 00:36:09,420 But we have a passband edge at 0.2 pi, 553 00:36:09,420 --> 00:36:12,120 a stopband edge at 0.3 pi. 554 00:36:12,120 --> 00:36:14,850 We reflect those critical frequencies 555 00:36:14,850 --> 00:36:18,090 through the arctangent curve to obtain 556 00:36:18,090 --> 00:36:21,090 the corresponding critical frequencies 557 00:36:21,090 --> 00:36:25,320 for the analog Butterworth filter. 558 00:36:25,320 --> 00:36:27,990 When the analog Butterworth filter is designed, 559 00:36:27,990 --> 00:36:31,770 we then obtain the digital Butterworth filter 560 00:36:31,770 --> 00:36:35,700 by transforming this filter back through the bilinear 561 00:36:35,700 --> 00:36:38,390 transformation. 562 00:36:38,390 --> 00:36:47,070 So, let's look at how this design works then. 563 00:36:47,070 --> 00:36:52,590 We have, as we've just reflected on that curve, 564 00:36:52,590 --> 00:36:58,680 we begin with the digital frequency specifications, 565 00:36:58,680 --> 00:37:02,310 reflect those through the bilinear warping curve 566 00:37:02,310 --> 00:37:07,590 to the analog specifications, and consequently 567 00:37:07,590 --> 00:37:09,840 the critical frequencies-- 568 00:37:09,840 --> 00:37:13,650 and let me emphasize first of all that 569 00:37:13,650 --> 00:37:16,500 just as with impulse invariance, you 570 00:37:16,500 --> 00:37:18,600 can show that the parameter capital 571 00:37:18,600 --> 00:37:21,090 T is an irrelevant parameter. 572 00:37:21,090 --> 00:37:24,690 We could, in fact, carry it all the way through. 573 00:37:24,690 --> 00:37:28,680 And what would happen is that we would find that no matter 574 00:37:28,680 --> 00:37:33,600 what we chose capital T to be, the digital filter design 575 00:37:33,600 --> 00:37:35,920 that resulted would be exactly the same. 576 00:37:35,920 --> 00:37:39,330 So in fact, for this example I'll work through it simply 577 00:37:39,330 --> 00:37:41,900 with capital T equal to 1. 578 00:37:41,900 --> 00:37:42,400 All right. 579 00:37:42,400 --> 00:37:47,070 With capital T equal to 1, we reflect 580 00:37:47,070 --> 00:37:51,390 these critical frequencies into this passband frequency 581 00:37:51,390 --> 00:37:54,060 edge and this stopband edge. 582 00:37:54,060 --> 00:37:57,900 And consequently, the analog filter-- 583 00:37:57,900 --> 00:38:01,290 this is the analog filter-- 584 00:38:01,290 --> 00:38:05,640 the analog filter that we design is one that 585 00:38:05,640 --> 00:38:08,340 meets these specifications. 586 00:38:08,340 --> 00:38:14,100 And consequently we have, again, the two equations 587 00:38:14,100 --> 00:38:19,840 that say that at the passband edge, 588 00:38:19,840 --> 00:38:25,730 we want the magnitude to be within 1db of unity. 589 00:38:25,730 --> 00:38:28,930 And at the stopband edge, we want the magnitude 590 00:38:28,930 --> 00:38:34,940 to be less than, down by more than 15 db. 591 00:38:34,940 --> 00:38:36,830 And the two equations that result 592 00:38:36,830 --> 00:38:40,580 are these, exactly the same as we had in the impulse invariant 593 00:38:40,580 --> 00:38:45,150 case, except that the frequencies are different. 594 00:38:45,150 --> 00:38:49,820 So now substituting in for the form of the analog Butterworth 595 00:38:49,820 --> 00:38:54,710 filter into these expressions, and setting this up 596 00:38:54,710 --> 00:38:59,210 for equality in these expressions, 597 00:38:59,210 --> 00:39:03,650 what results then are the two equations which 598 00:39:03,650 --> 00:39:08,390 are identical to the two equations 599 00:39:08,390 --> 00:39:11,030 that we had for the impulse invariant design, 600 00:39:11,030 --> 00:39:17,930 except that the frequencies at which the passband and stopband 601 00:39:17,930 --> 00:39:23,620 edges of the analog Butterworth filter fall are different. 602 00:39:23,620 --> 00:39:27,050 They're different because of the warping of the bilinear curve, 603 00:39:27,050 --> 00:39:29,670 or the pre-warping that we have to apply. 604 00:39:29,670 --> 00:39:32,660 So, these are the two equations. 605 00:39:32,660 --> 00:39:40,700 And if we solve these two equations for capital N, 606 00:39:40,700 --> 00:39:45,840 the resulting value for capital N is 5.3 and some digits. 607 00:39:45,840 --> 00:39:48,350 Notice incidentally that it's less 608 00:39:48,350 --> 00:39:51,020 than it was for the impulse invariant design. 609 00:39:51,020 --> 00:39:53,270 And in general that's a characteristic 610 00:39:53,270 --> 00:39:55,310 of the bilinear transformation. 611 00:39:55,310 --> 00:40:00,452 But so it's less, but it is not an integer. 612 00:40:00,452 --> 00:40:01,910 So the first thing we can ask again 613 00:40:01,910 --> 00:40:04,940 is, could we just simply truncate this down or round it 614 00:40:04,940 --> 00:40:07,850 down to the nearest integer value, in other words, 615 00:40:07,850 --> 00:40:09,380 N equals 5. 616 00:40:09,380 --> 00:40:11,750 But of course if we did that, then 617 00:40:11,750 --> 00:40:14,390 we wouldn't be able to pick omega sub c, 618 00:40:14,390 --> 00:40:17,510 so that these equations were satisfied or so 619 00:40:17,510 --> 00:40:20,970 that the specifications were met or exceeded. 620 00:40:20,970 --> 00:40:26,510 So in fact, we need to choose, we have to choose N equal to 6. 621 00:40:26,510 --> 00:40:30,830 We have to choose the next highest integer value. 622 00:40:30,830 --> 00:40:34,550 Choosing N equal to 6, we then have the choice 623 00:40:34,550 --> 00:40:38,990 of exactly satisfying this equation, 624 00:40:38,990 --> 00:40:42,440 or exactly satisfying this equation, or in fact 625 00:40:42,440 --> 00:40:44,150 not satisfying either one of them, 626 00:40:44,150 --> 00:40:47,780 but playing back and forth between the two. 627 00:40:47,780 --> 00:40:51,050 Well let's do it in a particular way. 628 00:40:51,050 --> 00:40:55,250 We can, for example, exactly meet 629 00:40:55,250 --> 00:40:57,830 the stopband specifications. 630 00:40:57,830 --> 00:41:01,110 In other words, we can use N equals 6 in this equation, 631 00:41:01,110 --> 00:41:04,400 and solve for omega sub c, in which case 632 00:41:04,400 --> 00:41:08,540 the passband specifications will be exceeded. 633 00:41:08,540 --> 00:41:10,770 Recall that in the impulse invariant design 634 00:41:10,770 --> 00:41:12,630 we did it the other way around. 635 00:41:12,630 --> 00:41:16,580 We met exactly the passband specifications, in which case 636 00:41:16,580 --> 00:41:19,250 the stopband specs were exceeded. 637 00:41:19,250 --> 00:41:21,380 But there we had a good reason for doing that. 638 00:41:21,380 --> 00:41:24,920 The reason that we did that is because we knew in advance 639 00:41:24,920 --> 00:41:29,270 that in any case the passband specs wouldn't be met exactly, 640 00:41:29,270 --> 00:41:31,340 because of the effect of aliasing. 641 00:41:31,340 --> 00:41:33,110 For the bilinear transformation, we 642 00:41:33,110 --> 00:41:35,180 don't have a problem with aliasing. 643 00:41:35,180 --> 00:41:40,130 So, in fact, we're free to play with this flexibility in a more 644 00:41:40,130 --> 00:41:41,881 general way. 645 00:41:41,881 --> 00:41:42,380 All right. 646 00:41:42,380 --> 00:41:46,750 Well, in any case then if we meet the stopband specs, 647 00:41:46,750 --> 00:41:49,320 substituting N equals 6 in this equation, 648 00:41:49,320 --> 00:41:53,030 and solving for omega sub c; we end up 649 00:41:53,030 --> 00:41:58,910 with a value for omega sub c, which is 0.76622. 650 00:41:58,910 --> 00:42:03,590 And so this then gives us the parameters omega sub c 651 00:42:03,590 --> 00:42:09,530 and N for the analog Butterworth filter. 652 00:42:09,530 --> 00:42:12,770 We can then use those specifications, 653 00:42:12,770 --> 00:42:15,790 again to generate the pole pattern 654 00:42:15,790 --> 00:42:20,060 for the squared magnitude function H sub a 655 00:42:20,060 --> 00:42:23,480 of s times H sub a of minus s. 656 00:42:26,470 --> 00:42:30,820 Factor this by choosing the left half plane poles in s plane, 657 00:42:30,820 --> 00:42:34,810 and then mapping this function to a digital filter using 658 00:42:34,810 --> 00:42:36,760 the bilinear transformation. 659 00:42:36,760 --> 00:42:42,340 And let's now look at how this filter comes out as compared 660 00:42:42,340 --> 00:42:49,060 with the digital Butterworth filter that we obtained 661 00:42:49,060 --> 00:42:52,090 by using impulse invariance. 662 00:42:52,090 --> 00:42:59,710 Well again, I have a display of the magnitude of the frequency 663 00:42:59,710 --> 00:43:03,105 response and also the gain in db. 664 00:43:05,770 --> 00:43:08,020 From what you may recall from the curve 665 00:43:08,020 --> 00:43:12,010 that I showed previously, this looks roughly the same. 666 00:43:12,010 --> 00:43:16,900 It's a monotonic filter and drops off. 667 00:43:16,900 --> 00:43:19,780 It's down by some amount at 0.2 pi, 668 00:43:19,780 --> 00:43:24,820 and the stopband is at 0.3 pi. 669 00:43:24,820 --> 00:43:27,250 In particular, according to the specifications, 670 00:43:27,250 --> 00:43:32,860 we wanted this to be down by no more than 1db at 0.2 pi. 671 00:43:32,860 --> 00:43:38,710 Well, it's hard again to say that this is 1db or less. 672 00:43:38,710 --> 00:43:41,560 But if we look at 0.3 pi, we can see 673 00:43:41,560 --> 00:43:48,160 that this is in fact exactly down by 15 db. 674 00:43:48,160 --> 00:43:51,700 And that's the way that we designed it. 675 00:43:51,700 --> 00:43:55,750 We designed it to exactly meet the stopband cutoff 676 00:43:55,750 --> 00:43:59,280 and exceed the passband cutoff. 677 00:43:59,280 --> 00:44:03,960 And then the frequency response continues on from there. 678 00:44:03,960 --> 00:44:06,570 It's interesting, in fact, to compare the design 679 00:44:06,570 --> 00:44:11,130 that we got from the bilinear transformation with the design 680 00:44:11,130 --> 00:44:14,860 that we got previously with impulse invariance. 681 00:44:14,860 --> 00:44:20,350 And let me do that by superimposing the two of them. 682 00:44:20,350 --> 00:44:22,500 So that the one that I'm putting on now 683 00:44:22,500 --> 00:44:26,400 is the impulse invariant design, and let 684 00:44:26,400 --> 00:44:30,372 me just lay them on top of each other. 685 00:44:34,300 --> 00:44:37,006 OK. 686 00:44:37,006 --> 00:44:40,030 You can see incidentally that looking at the frequency 687 00:44:40,030 --> 00:44:43,540 response on a magnitude plot there, in fact, 688 00:44:43,540 --> 00:44:44,830 are some differences. 689 00:44:44,830 --> 00:44:47,170 This line has gotten a little thicker. 690 00:44:47,170 --> 00:44:50,140 That is, the two don't exactly superimpose. 691 00:44:50,140 --> 00:44:53,350 But you can't really see the differences. 692 00:44:53,350 --> 00:44:58,060 Whereas you can when we look at this on a logarithmic plot. 693 00:44:58,060 --> 00:45:01,810 In particular, this is the frequency response 694 00:45:01,810 --> 00:45:05,720 that corresponded to the bilinear transformation. 695 00:45:05,720 --> 00:45:07,960 This is the frequency response that corresponded 696 00:45:07,960 --> 00:45:10,270 to impulse invariance. 697 00:45:10,270 --> 00:45:14,050 And this is, in general, a characteristic 698 00:45:14,050 --> 00:45:17,610 of the use of the bilinear transformation. 699 00:45:17,610 --> 00:45:21,280 It's a result essentially of the frequency distortion, 700 00:45:21,280 --> 00:45:25,360 because we've taken the frequency 701 00:45:25,360 --> 00:45:29,590 axis and the continuous time frequency axis. 702 00:45:29,590 --> 00:45:32,470 As you run along it at a constant rate, 703 00:45:32,470 --> 00:45:39,400 it gets compressed more and more along the digital frequency 704 00:45:39,400 --> 00:45:40,120 axis. 705 00:45:40,120 --> 00:45:41,140 That wasn't well said. 706 00:45:41,140 --> 00:45:44,920 But what I really mean to say is as we walk along here 707 00:45:44,920 --> 00:45:48,850 at a constant rate, the farther we walk, the faster we're 708 00:45:48,850 --> 00:45:51,200 running along the j omega axis. 709 00:45:51,200 --> 00:45:57,970 And that's why, in fact, the use of the bilinear transformation 710 00:45:57,970 --> 00:46:03,580 on a lowpass filter will give better attenuation 711 00:46:03,580 --> 00:46:07,030 at the higher frequencies than impulse invariance will. 712 00:46:07,030 --> 00:46:09,220 And I don't know if you can really 713 00:46:09,220 --> 00:46:18,400 see the fact that the passband specs were exceeded 714 00:46:18,400 --> 00:46:20,990 for the bilinear design. 715 00:46:20,990 --> 00:46:24,250 In fact, when you look at these view graphs in the study guide, 716 00:46:24,250 --> 00:46:28,420 I think you'll see that for impulse invariance 717 00:46:28,420 --> 00:46:32,440 the curve is slightly lower than it is for the bilinear 718 00:46:32,440 --> 00:46:34,810 transformation 719 00:46:34,810 --> 00:46:36,400 OK well, look. 720 00:46:36,400 --> 00:46:43,750 This is a simple example that hopefully at least illustrates 721 00:46:43,750 --> 00:46:46,960 for you the basic procedure involved 722 00:46:46,960 --> 00:46:51,460 in carrying through a design of an infinite impulse response 723 00:46:51,460 --> 00:46:55,600 filter using impulse invariance and the bilinear 724 00:46:55,600 --> 00:46:57,610 transformation. 725 00:46:57,610 --> 00:47:01,840 There are other examples that are considered in the text. 726 00:47:01,840 --> 00:47:08,900 There is a discussion of digital Chebyshev filters, 727 00:47:08,900 --> 00:47:11,660 in other words digital designs beginning 728 00:47:11,660 --> 00:47:13,850 from an analog Chebyshev filter. 729 00:47:13,850 --> 00:47:15,350 And you'll also have an opportunity 730 00:47:15,350 --> 00:47:20,235 to carry through some designs in the study guide. 731 00:47:20,235 --> 00:47:24,040 A point that I would like to mention briefly 732 00:47:24,040 --> 00:47:26,540 is that most of the discussion, in fact 733 00:47:26,540 --> 00:47:29,260 all of the discussion that we've gone through, 734 00:47:29,260 --> 00:47:33,410 has focused entirely on lowpass filters. 735 00:47:33,410 --> 00:47:36,310 In fact, the discussion generalizes 736 00:47:36,310 --> 00:47:41,030 in a fairly straightforward way to bandpass, bandstop, 737 00:47:41,030 --> 00:47:43,000 highpass, et cetera filters. 738 00:47:43,000 --> 00:47:47,530 In particular, as is discussed in some detail in the text, 739 00:47:47,530 --> 00:47:51,400 there are a class of frequency transformations 740 00:47:51,400 --> 00:47:54,430 that allow lowpass designs to get 741 00:47:54,430 --> 00:48:00,010 converted to bandstop, bandpass, highpass, et cetera designs. 742 00:48:00,010 --> 00:48:05,980 So this concludes our discussion of design procedures 743 00:48:05,980 --> 00:48:10,380 for recursive or infinite impulse response 744 00:48:10,380 --> 00:48:11,860 digital filters. 745 00:48:11,860 --> 00:48:17,470 In the next lecture I'll discuss the design of finite impulse 746 00:48:17,470 --> 00:48:20,830 response filters, and in particular 747 00:48:20,830 --> 00:48:25,330 introduce a number of designs, one of which 748 00:48:25,330 --> 00:48:28,020 corresponds to a class of algorithmic designs. 749 00:48:28,020 --> 00:48:30,500 Thank you. 750 00:48:30,500 --> 00:48:33,250 [MUSIC PLAYING]