1 00:00:00,000 --> 00:00:03,700 All right. Thanks. Thanks for bearing with me. 2 00:00:05,100 --> 00:00:08,760 And thanks for all turning up. 3 00:00:09,920 --> 00:00:11,560 Everyone enjoying DEF CON so far? 4 00:00:13,060 --> 00:00:13,840 Better now. 5 00:00:15,820 --> 00:00:18,520 All right. Well, my name is Balint Siva. 6 00:00:18,700 --> 00:00:21,520 I'm the Director of Vulnerability Research at Bastille. 7 00:00:22,640 --> 00:00:24,820 And I like SDR. SDR is pretty cool. 8 00:00:25,040 --> 00:00:27,540 I thought today I'd share some more tips and tricks with you. 9 00:00:27,540 --> 00:00:32,120 I've got a couple of different projects that I've been working on for some of the many years. 10 00:00:32,440 --> 00:00:41,520 And I thought I might just take you through some flow graphs, how to build them up. 11 00:00:41,880 --> 00:00:43,240 We'll leave that one until later. 12 00:00:45,440 --> 00:00:47,080 We'll build up to that one. 13 00:00:49,020 --> 00:00:54,800 And, of course, don't forget that here's the first tip. 14 00:00:54,980 --> 00:00:56,660 You might appreciate this for this one. 15 00:00:56,660 --> 00:01:01,820 If you, oh, what the hell did I just do? 16 00:01:06,240 --> 00:01:10,520 X-Quartz with multi-monitor is crazy. 17 00:01:10,700 --> 00:01:11,000 There we go. 18 00:01:13,400 --> 00:01:18,800 So, but tip zero, if you're using X-Quartz on OS X, who uses a Mac, by the way? 19 00:01:18,920 --> 00:01:19,220 Yeah? 20 00:01:19,300 --> 00:01:19,600 Linux? 21 00:01:21,960 --> 00:01:22,400 Windows? 22 00:01:22,940 --> 00:01:23,320 Windows? 23 00:01:24,420 --> 00:01:24,640 Yeah? 24 00:01:27,760 --> 00:01:30,060 If you're on OS X, OS X is really good. 25 00:01:30,160 --> 00:01:32,480 You can use Homebrew and Mac ports to set up. 26 00:02:12,860 --> 00:02:17,140 I'm running an older version, but there's this button here. 27 00:02:17,340 --> 00:02:19,300 I think it's Control-B, right? 28 00:02:19,380 --> 00:02:20,000 Control-B. 29 00:02:25,760 --> 00:02:26,640 Control-B. 30 00:02:26,660 --> 00:02:28,280 Control-B. 31 00:02:28,280 --> 00:02:32,800 Control-B. 32 00:02:32,800 --> 00:02:35,140 Control-B. 33 00:02:35,140 --> 00:02:36,720 Control-B. 34 00:02:36,720 --> 00:02:37,500 Control-B. 35 00:02:37,500 --> 00:02:42,720 Control-B. 36 00:02:42,720 --> 00:02:42,760 Control-B. 37 00:02:42,760 --> 00:02:44,580 Control-B. 38 00:02:44,580 --> 00:02:44,600 Control-B. 39 00:02:44,600 --> 00:02:44,640 Control-B. 40 00:02:44,640 --> 00:02:50,500 Control-B. 41 00:02:51,800 --> 00:02:53,200 Control-B. 42 00:02:53,200 --> 00:02:53,320 Control-B. 43 00:02:53,320 --> 00:02:54,580 Control-B. 44 00:02:54,580 --> 00:02:56,120 Control-B. 45 00:02:59,160 --> 00:03:07,360 And some other stuff, but I was just updating the InMarsat stuff so you might like that. 46 00:03:07,540 --> 00:03:17,700 Again, all of this is pretty experimental and it's just mainly so that people can get 47 00:03:17,700 --> 00:03:19,780 an appreciation of what you can do with Rayo. 48 00:03:19,920 --> 00:03:23,560 You might remember this, I've spoken about this a couple of times. 49 00:03:23,560 --> 00:03:27,680 This was a system that I put together using Gunu Radio back in Sydney, it would track 50 00:03:27,680 --> 00:03:28,180 all the planes. 51 00:03:28,760 --> 00:03:31,260 Everyone, who's tracked planes with ADS-B before? 52 00:03:32,040 --> 00:03:33,660 Yeah, it's quite a bit of fun. 53 00:03:34,840 --> 00:03:41,420 And the software that sort of drives this aviation mapper, it's just been collecting 54 00:03:41,420 --> 00:03:43,260 dust so I'm going to open source it when I get home. 55 00:03:43,600 --> 00:03:47,620 I've added support for all the different decoders so you can do cool stuff like this. 56 00:03:47,880 --> 00:03:52,280 But what I wanted to demonstrate here is that apart from the trails of the planes, you have 57 00:03:52,280 --> 00:03:52,740 these dots. 58 00:03:52,740 --> 00:03:55,280 And so these dots actually represent ACARS messages. 59 00:03:55,460 --> 00:03:56,840 Who's read ACARS messages before? 60 00:03:57,000 --> 00:03:58,600 Aircraft Communication Reporting System. 61 00:03:58,840 --> 00:04:03,840 So a lot of these short text message like messages, transmissions are sent to and from 62 00:04:03,840 --> 00:04:04,160 aircraft. 63 00:04:04,500 --> 00:04:11,020 They contain performance reports, human readable text messages to the cockpit, information 64 00:04:11,020 --> 00:04:14,140 that carries waypoints of the planned flight routes and so on. 65 00:04:14,540 --> 00:04:19,340 And this is really cool because it's VHF so it propagates a long way and you can easily 66 00:04:19,340 --> 00:04:20,580 receive these on the ground. 67 00:04:20,680 --> 00:04:22,720 You can go to your airport and see all the information. 68 00:04:22,740 --> 00:04:25,000 You can go to your airport and see all the different messages that are going on. 69 00:04:25,800 --> 00:04:29,520 But there are areas around the world where you can't receive these terrestrial messages 70 00:04:29,520 --> 00:04:34,860 like over the ocean, transatlantic flights for example, or Transpacific. 71 00:04:35,600 --> 00:04:38,280 And there are two other systems that are used there. 72 00:04:38,720 --> 00:04:44,660 One is using HF so on the order of 10 to 20 megahertz and they send very short messages 73 00:04:44,660 --> 00:04:49,080 over those frequencies and they obviously propagate a long way because the wavelengths are very 74 00:04:49,080 --> 00:04:52,720 long and you can get quite good distribution. 75 00:04:53,300 --> 00:04:58,600 The other one is SATCOM and SATCOM is of course enabled by the fact that you have satellites 76 00:04:58,600 --> 00:05:00,820 that orbit the Earth that allow you to relay messages. 77 00:05:03,140 --> 00:05:07,400 So all sorts of interesting stuff you can see. 78 00:05:07,760 --> 00:05:11,740 So can anybody tell me what we're looking at here in terms of this diagram? 79 00:05:12,080 --> 00:05:15,440 What is this diagram portraying given what I've just told you? 80 00:05:15,520 --> 00:05:15,940 The satellite footprint. 81 00:05:16,040 --> 00:05:16,800 The satellite footprint. 82 00:05:17,000 --> 00:05:17,060 Yeah. 83 00:05:17,180 --> 00:05:18,060 That's exactly right. 84 00:05:18,280 --> 00:05:22,660 So this is the portion of the Earth that this particular satellite sees. 85 00:05:22,700 --> 00:05:23,780 And we're going to look at. 86 00:05:25,060 --> 00:05:28,740 And there's a nice document the FCC has, you can look that up there. 87 00:05:29,380 --> 00:05:35,420 And this is a sort of artist's rendition of InMarsat 3 geostationary satellite. 88 00:05:36,300 --> 00:05:40,080 InMarsat is a company that has a constellation of satellites and they offer a whole different 89 00:05:40,560 --> 00:05:46,080 bunch of services to different customers in different sectors. 90 00:05:46,340 --> 00:05:48,940 The one that we're going to look at in particular is for aviation. 91 00:05:49,880 --> 00:05:52,340 And they have these geostationary birds. 92 00:05:52,340 --> 00:05:57,220 Placed around the Earth so they have really good coverage of the entire Earth and their 93 00:05:57,220 --> 00:06:01,080 orbits of nearly 36,000 kilometers above the surface of the Earth. 94 00:06:01,220 --> 00:06:06,400 So obviously geostationary so they spin at the same rate as the Earth spins and so they're 95 00:06:06,400 --> 00:06:07,720 always at the same point in the sky. 96 00:06:08,220 --> 00:06:17,540 So the one that we're going to look at is 3e, oh I can't see it, 3f3 maybe? 97 00:06:17,960 --> 00:06:18,400 Anyway. 98 00:06:20,780 --> 00:06:21,300 What's that? 99 00:06:21,880 --> 00:06:22,320 3f3. 100 00:06:25,140 --> 00:06:25,660 3f3. 101 00:06:25,660 --> 00:06:26,960 So how does it actually work? 102 00:06:27,100 --> 00:06:31,560 Well in these instances this is just a dumb satellite. 103 00:06:31,720 --> 00:06:38,400 The satellite is a linear transponder, it essentially just receives messages sent from 104 00:06:38,400 --> 00:06:43,320 an Earth ground station on one frequency and then sends it back down, relays back down 105 00:06:43,320 --> 00:06:43,800 on another one. 106 00:06:44,040 --> 00:06:48,160 And anything coming back up from another frequency will get relayed back down to the ground 107 00:06:48,160 --> 00:06:48,320 station. 108 00:06:48,680 --> 00:06:51,960 So the objects of interest here are commercial airliners. 109 00:06:52,340 --> 00:06:57,220 If you look at them you can see on the top one of those sort of bumps is usually the 110 00:06:57,220 --> 00:07:03,200 SATCOM antenna and you can make phone calls and it's also used to convey these text messages 111 00:07:03,200 --> 00:07:09,180 and so on so that pilots can maintain communications with your home base and air traffic control 112 00:07:09,180 --> 00:07:09,700 and so on. 113 00:07:10,400 --> 00:07:15,760 There are these pretty much two large companies Aaron considered that actually roll out and 114 00:07:15,760 --> 00:07:19,300 deploy and manage aviation networks around the world. 115 00:07:19,920 --> 00:07:21,720 The ones that obviously use A-cars. 116 00:07:21,780 --> 00:07:22,320 They have their V-cars. 117 00:07:22,340 --> 00:07:24,060 They have their VHF data link set up. 118 00:07:24,360 --> 00:07:29,500 And they also have these internetworking agreements so it's like a different sort of large scale 119 00:07:29,500 --> 00:07:34,260 network that planes and operators and so on can use to transfer messages. 120 00:07:35,180 --> 00:07:36,540 I guess much like the internet. 121 00:07:39,420 --> 00:07:46,860 So the ground station to SAT link is C-band and the L-band is the link to the plane. 122 00:07:47,900 --> 00:07:52,260 So let's have a look at what the bent pipe transponder architecture usually looks like. 123 00:07:54,160 --> 00:07:59,900 You've got your L-band antenna here which operates in this frequency. 124 00:08:00,120 --> 00:08:06,780 This frequency is nice because you can use pretty much every SDR to receive it and this 125 00:08:06,780 --> 00:08:12,020 is what is sent down to planes and what the planes communicate back up to the satellite 126 00:08:12,020 --> 00:08:12,260 with. 127 00:08:12,900 --> 00:08:18,700 So we can, as it turns out, pretty easily listen to the downlink to the planes and I'll 128 00:08:18,700 --> 00:08:21,300 show you what sort of antenna you need to use to do that. 129 00:08:21,300 --> 00:08:27,180 And then on the other end, if a plane sends something up, it downlinks it back to the 130 00:08:27,180 --> 00:08:29,780 ground station on 3 and 6 gig. 131 00:08:29,960 --> 00:08:33,980 I can't remember which one is which but that's on the C-band. 132 00:08:34,080 --> 00:08:37,140 So if you want to use that, then you need a slightly more sophisticated setup. 133 00:08:37,880 --> 00:08:40,020 So we haven't got to that point yet. 134 00:08:40,480 --> 00:08:45,880 But essentially, if you look at the architecture here, it's basically receiving stuff, doing 135 00:08:45,880 --> 00:08:50,980 some processing, going in beamformer, coming back down and then the reverse process on 136 00:08:50,980 --> 00:08:51,380 the other end. 137 00:08:52,600 --> 00:08:55,700 So this is what you need to actually receive the downlink. 138 00:08:57,380 --> 00:09:01,640 My friend and colleague Ian Buckley has helped a lot with this and he actually found this 139 00:09:01,640 --> 00:09:05,400 old dish and he created this feed, custom feed. 140 00:09:05,760 --> 00:09:11,400 It's a left-hand, circularly polarized helical feed. 141 00:09:11,600 --> 00:09:15,820 So if you look at it, it's pretty much this bent wire that rotates in this particular 142 00:09:15,820 --> 00:09:20,960 circular polarization which is the polarization that's used on, in, often on the ground 143 00:09:20,960 --> 00:09:21,620 but in satellite links. 144 00:09:22,280 --> 00:09:25,340 And then that goes to a band pass filter. 145 00:09:25,480 --> 00:09:30,940 So you filter out all the other noise and then there's also an LNA there to give you 146 00:09:30,940 --> 00:09:31,980 a bit of a boost in the signal. 147 00:09:33,660 --> 00:09:38,060 And, you know, essentially you can calculate roughly where the bird is in the sky, set 148 00:09:38,060 --> 00:09:43,900 the dish up, have a little spectrum analyzer running, FFT, what have you, and then, you 149 00:09:43,900 --> 00:09:47,880 know, adjust the pointing of your dish until you get good peaks on your spectrum and then 150 00:09:47,880 --> 00:09:48,360 you're good to go. 151 00:09:51,920 --> 00:09:53,440 So, there's only one LNA out there now. 152 00:09:53,820 --> 00:09:55,340 So it's actually relatively easy to do. 153 00:09:56,000 --> 00:09:57,660 So why is this service interesting? 154 00:09:57,920 --> 00:10:03,640 Well, as it turns out, there are a lot of different channels on it and I should put 155 00:10:03,640 --> 00:10:06,240 out there that, you know, this is just one stab at it. 156 00:10:06,340 --> 00:10:10,720 Other people have also done different implementations and looked at different things, some really 157 00:10:10,720 --> 00:10:11,900 nice stuff out there. 158 00:10:12,940 --> 00:10:15,840 But I just want to share this with you because I've sort of attacked it from the Goody Radio 159 00:10:15,840 --> 00:10:17,800 side and, you know. 160 00:10:17,800 --> 00:10:18,020 Yeah. 161 00:10:18,700 --> 00:10:22,040 If you want to build on it at some point, then that would be great. 162 00:10:22,340 --> 00:10:26,880 But everything begins with the P channel and that's where the coordination and timing is 163 00:10:26,880 --> 00:10:27,940 set for the system. 164 00:10:28,880 --> 00:10:32,860 It's this time division multiplex packet mode signaling. 165 00:10:33,280 --> 00:10:38,360 And if we're listening to the information that's addressed to all the aircraft, they're 166 00:10:38,900 --> 00:10:41,080 contained in little packets called signaling units. 167 00:10:42,280 --> 00:10:47,520 And it's basically just a constant stream of these on I think there were nine P channels 168 00:10:47,520 --> 00:10:48,900 that are available there. 169 00:10:49,900 --> 00:10:53,540 There are other channels than the R channel, T channel, C channel that are used for random 170 00:10:53,540 --> 00:10:55,300 access signaling from the aircraft. 171 00:10:55,680 --> 00:11:00,760 So if you imagine kind of like cellular networks now, there's a random access channel if your 172 00:11:00,760 --> 00:11:02,700 phone wants to get the attention of the network. 173 00:11:03,700 --> 00:11:10,000 Once you actually coordinate and set up a reservation on the T channel, you have TDMA. 174 00:11:10,140 --> 00:11:12,160 So that's from the aircraft for data transmissions. 175 00:11:12,300 --> 00:11:17,500 And then you've got the circuit mode C channel, which is something that carries voice to the 176 00:11:17,500 --> 00:11:18,240 P channel and also user data. 177 00:11:18,600 --> 00:11:23,020 So once you actually receive it and synchronize to the P channel, all of the other channels 178 00:11:23,020 --> 00:11:25,220 are synchronized in terms of timing to the P channel. 179 00:11:25,780 --> 00:11:30,680 And then once you go through the layers and end up decoding more of the protocol, then 180 00:11:30,680 --> 00:11:35,380 you can get to the point where you can actually follow the establishment of calls and then 181 00:11:36,020 --> 00:11:39,320 decode that data and put it through vocoder and maybe get voice. 182 00:11:39,920 --> 00:11:44,840 I've not looked at that part of it, but that's not outside the realm of possibility. 183 00:11:48,640 --> 00:11:49,840 That's what it used to look like. 184 00:11:50,760 --> 00:11:52,060 I cleaned it up a little bit. 185 00:11:55,700 --> 00:11:57,580 And I made it even cleaner. 186 00:11:57,780 --> 00:12:02,760 And believe it or not, for those of you that know the in-joke, I use hierarchical blocks. 187 00:12:04,200 --> 00:12:08,820 So I'll go through and show you that shortly, but I'll just go through the system, the theory, 188 00:12:08,880 --> 00:12:11,660 and the process of breaking it down, and then I'll step through the flow graph. 189 00:12:11,780 --> 00:12:12,800 So this is the old version. 190 00:12:13,580 --> 00:12:16,820 What we did initially was just record the spectrum. 191 00:12:17,500 --> 00:12:19,400 We did it a while and then do offline processing. 192 00:12:19,820 --> 00:12:21,820 So remember, we only want to look at the P channel. 193 00:12:22,060 --> 00:12:26,800 And what you can see here is the P channels that are actually available coming down. 194 00:12:27,560 --> 00:12:29,520 I think they're on the different spot beams. 195 00:12:30,700 --> 00:12:35,100 But because it's a satellite link, obviously your signal-to-noise ratio isn't fantastic. 196 00:12:35,340 --> 00:12:41,040 But luckily, it's good enough so that you can use the simple blocks and demodulator 197 00:12:41,040 --> 00:12:43,580 and clock synchronization to do it. 198 00:12:43,620 --> 00:12:46,320 You don't need to do anything particularly fancy. 199 00:12:46,320 --> 00:12:50,060 At this link budget, anyway. 200 00:12:51,040 --> 00:12:54,620 So the first thing, obviously, is you want to select the channel that you want to listen to. 201 00:12:54,800 --> 00:12:56,900 There are actually a bunch of P channels, as it turns out. 202 00:12:57,120 --> 00:12:59,120 In this case, we're just going to decode one. 203 00:13:00,640 --> 00:13:08,000 And you want to basically tell your channelizer to move your baseband spectrum to that point 204 00:13:08,000 --> 00:13:10,400 and then filter out just that one channel. 205 00:13:10,540 --> 00:13:11,680 The narrower you get, the better. 206 00:13:11,960 --> 00:13:15,500 But as you will see, one of the common things you have to deal with 207 00:13:15,500 --> 00:13:17,500 with a real-world radio system is clock drift. 208 00:13:18,420 --> 00:13:22,700 So the oscillator that's originally being used to synthesize the signal 209 00:13:22,700 --> 00:13:27,000 is going to be drifting in relation to the synthesizer on your own SDR, 210 00:13:27,200 --> 00:13:30,800 which means that when you tune to the particular frequency you might know this is at, 211 00:13:30,920 --> 00:13:32,020 it might be offset. 212 00:13:32,540 --> 00:13:37,660 Or even if you manage to zero it down completely, it'll move back and forth. 213 00:13:37,740 --> 00:13:40,200 And that could be due to a whole bunch of different factors. 214 00:13:40,500 --> 00:13:44,800 But usually, you want to implement some sort of a scheme to keep a lock on it. 215 00:13:45,540 --> 00:13:49,040 And I'll show you how to do that. 216 00:13:49,160 --> 00:13:50,280 This is one way to do it. 217 00:13:50,840 --> 00:13:55,540 As it turns out, the signal is actually GMSK, Gaussian Minimum Shift King. 218 00:13:56,440 --> 00:14:00,740 So it's essentially two-level frequency shift king with a pulse shape filter on it. 219 00:14:01,000 --> 00:14:02,940 And I'll show you what this looks like in board line. 220 00:14:03,100 --> 00:14:04,500 Who's used board line before, by the way? 221 00:14:05,180 --> 00:14:05,980 Yeah, a couple of you. 222 00:14:06,360 --> 00:14:07,980 I'll show you. It's a really cool tool. 223 00:14:09,600 --> 00:14:14,380 It's one of the most invaluable tools for doing offline and online signal analysis. 224 00:14:14,380 --> 00:14:16,120 I can demonstrate that to you. 225 00:14:16,220 --> 00:14:23,200 But one nice property about GMSKs or FSKs is that if you square the signal, 226 00:14:23,260 --> 00:14:25,760 like you literally take a complex sample and you square it, 227 00:14:25,800 --> 00:14:27,000 and then you take the FFT, 228 00:14:27,920 --> 00:14:29,820 you get these two peaks coming out. 229 00:14:30,340 --> 00:14:32,740 And these peaks, as it turns out, 230 00:14:33,280 --> 00:14:37,560 are separated in terms of hertz by what your board rate is. 231 00:14:37,760 --> 00:14:41,080 So immediately from this, you might guess that this is 232 00:14:42,560 --> 00:14:44,380 how fast are the symbols coming down, 233 00:14:45,020 --> 00:14:46,740 if it's a separation between these two. 234 00:14:47,480 --> 00:14:48,360 Okay, I'll come back to it. 235 00:14:48,580 --> 00:14:51,200 But the point is, as this moves around, 236 00:14:51,400 --> 00:14:54,420 you want to be tuned to exactly the midpoint here. 237 00:14:55,160 --> 00:15:00,240 And so this green line is showing where the tracker is locked onto that line. 238 00:15:01,080 --> 00:15:04,800 That was the first primitive stab that had a problem, 239 00:15:04,940 --> 00:15:05,920 and then I'll show you why. 240 00:15:06,580 --> 00:15:08,880 So the second thing is you want to identify 241 00:15:08,880 --> 00:15:11,060 how quickly the symbols are coming out. 242 00:15:11,080 --> 00:15:12,880 So if you're looking down, instead of looking at it that way, 243 00:15:13,020 --> 00:15:15,920 what you can do is you can take the sample 244 00:15:15,920 --> 00:15:19,060 and then multiply it by another stream, 245 00:15:19,120 --> 00:15:20,080 which is a delayed version. 246 00:15:20,320 --> 00:15:21,900 So basically you can just delay by one sample. 247 00:15:22,020 --> 00:15:23,600 So you basically multiply your current sample 248 00:15:23,600 --> 00:15:24,580 by the previous sample. 249 00:15:25,440 --> 00:15:28,500 And then you take the FFT of that. 250 00:15:29,520 --> 00:15:32,540 And then your first big peak is your symbol rate. 251 00:15:32,640 --> 00:15:35,700 That's telling you what the periodic component to your symbol is. 252 00:15:35,780 --> 00:15:37,740 And this works with a whole bunch of different modulations. 253 00:15:39,460 --> 00:15:40,020 Primitive ones. 254 00:15:41,080 --> 00:15:41,600 This is here. 255 00:15:41,760 --> 00:15:43,380 So what's our board rate? 256 00:15:45,740 --> 00:15:47,320 600 bits per second. 257 00:15:47,400 --> 00:15:48,040 Symbols per second. 258 00:15:48,160 --> 00:15:48,620 Yeah, that's it. 259 00:15:49,740 --> 00:15:51,000 So it's just a really convenient way. 260 00:15:51,420 --> 00:15:53,540 I was coming at this as I usually try to do 261 00:15:53,540 --> 00:15:57,640 from sort of what's called the blind signal analysis perspective. 262 00:15:57,760 --> 00:15:59,900 So you don't actually know what the properties of your signal are, 263 00:15:59,940 --> 00:16:02,220 and you want to use some DSP tricks like this 264 00:16:02,220 --> 00:16:03,080 to figure out what's going on. 265 00:16:03,560 --> 00:16:06,940 So the next step then is you've got your raw symbols, 266 00:16:07,360 --> 00:16:08,880 and I've oversampled here. 267 00:16:09,100 --> 00:16:10,400 But you want to turn those, 268 00:16:11,080 --> 00:16:13,200 those samples into discrete symbols 269 00:16:13,200 --> 00:16:14,860 that you can then turn into a bit. 270 00:16:15,200 --> 00:16:18,520 So one neat visualization you can do is with samples, 271 00:16:19,520 --> 00:16:20,680 instead of drawing lines, 272 00:16:21,200 --> 00:16:22,460 you can draw them as dots. 273 00:16:22,860 --> 00:16:26,440 And so this is where I haven't classified them as bits yet. 274 00:16:26,660 --> 00:16:29,760 We're purely just looking at the samples coming in on our channel. 275 00:16:30,320 --> 00:16:32,900 And you can see that they're sort of scattered all throughout 276 00:16:32,900 --> 00:16:34,480 between one and negative one. 277 00:16:35,000 --> 00:16:38,480 So that means, you know, we've got them in the right range. 278 00:16:39,220 --> 00:16:40,960 We're essentially doing FMD modules 279 00:16:41,080 --> 00:16:41,700 and then we're going to do a bit of simulation on this, 280 00:16:41,800 --> 00:16:44,360 and then adjusting the deviation appropriately, 281 00:16:44,560 --> 00:16:47,780 or the gain on that so it falls between these normalized values. 282 00:16:48,660 --> 00:16:51,080 But we want to turn them into a symbol stream, 283 00:16:51,840 --> 00:16:55,120 and a really easy way to do that is just to slice around the middle. 284 00:16:55,340 --> 00:16:56,780 But to slice around the middle, 285 00:16:56,900 --> 00:16:59,900 we want to have clock recovery going on 286 00:16:59,900 --> 00:17:01,800 so that we have a block that will lock on and say, 287 00:17:01,880 --> 00:17:02,920 oh, I'm going to sample here, 288 00:17:02,980 --> 00:17:04,420 then I'm going to go forward a couple of samples, 289 00:17:04,460 --> 00:17:06,500 sample here, and sample, and keep sampling like that. 290 00:17:06,900 --> 00:17:09,940 And make sure that we get really good separation 291 00:17:11,080 --> 00:17:13,640 between our symbol streams so that we can turn them into bits. 292 00:17:13,900 --> 00:17:16,540 So I think I may have oversampled by four here or something. 293 00:17:16,860 --> 00:17:18,780 So there are four times as many dots here. 294 00:17:18,960 --> 00:17:21,780 So you're seeing the intermediary dots between each symbol. 295 00:17:22,060 --> 00:17:23,780 And here it's tracking it 296 00:17:23,780 --> 00:17:26,980 and just picking out the one symbol that represents a bit. 297 00:17:27,160 --> 00:17:29,320 And you can see that it's actually doing that really well 298 00:17:29,320 --> 00:17:30,940 because there's this big gap 299 00:17:30,940 --> 00:17:33,020 between the bottom line and the top line. 300 00:17:33,380 --> 00:17:34,980 So then we can just simply say, 301 00:17:35,160 --> 00:17:38,620 right, draw a line through the middle across zero. 302 00:17:38,820 --> 00:17:40,400 Anything above that's going to be a one. 303 00:17:40,400 --> 00:17:41,680 Anything below that's going to be a zero. 304 00:17:42,360 --> 00:17:45,520 And then that's a really basic way of doing it. 305 00:17:45,560 --> 00:17:47,060 There are far more sophisticated ways of doing it 306 00:17:47,060 --> 00:17:48,980 if you know things about your modulation 307 00:17:48,980 --> 00:17:51,540 or you've got a really low signal and so on. 308 00:17:51,600 --> 00:17:53,020 But this is just the simple approach. 309 00:17:54,220 --> 00:17:57,300 And then the next step is you want to actually visualize your bits 310 00:17:57,300 --> 00:17:59,640 to see if there's some sort of structure to them, 311 00:17:59,640 --> 00:18:00,680 if there's some sort of a pattern. 312 00:18:01,180 --> 00:18:03,020 And then you can use that to further deconstruct 313 00:18:03,020 --> 00:18:04,300 and deframe your packets. 314 00:18:05,060 --> 00:18:07,580 So there's a cool raster plot. 315 00:18:07,700 --> 00:18:08,620 I'll show you how to do that. 316 00:18:09,620 --> 00:18:12,800 Actually in this flow graph I have it going out a UDP socket 317 00:18:12,800 --> 00:18:15,460 and then I've just got a little flow graph that's listening on that 318 00:18:15,460 --> 00:18:17,020 and then plotting all the data that comes out. 319 00:18:17,760 --> 00:18:22,080 And then usually when there is some structure like here, 320 00:18:22,940 --> 00:18:25,780 if you're looking for the scan line length 321 00:18:25,780 --> 00:18:28,180 or your fixed frame length 322 00:18:28,180 --> 00:18:31,080 so that they all pile up on top of one or another 323 00:18:31,080 --> 00:18:32,020 and then you're synchronized, 324 00:18:32,100 --> 00:18:33,380 then you'll get these as straight lines. 325 00:18:33,520 --> 00:18:34,840 If you're offset then they're going to be diagonal 326 00:18:34,840 --> 00:18:37,820 and you just need to sort of adjust your length 327 00:18:37,820 --> 00:18:38,600 until it looks good. 328 00:18:38,620 --> 00:18:41,280 And once you do that you can see here 329 00:18:41,280 --> 00:18:43,780 that the vast majority of this packet 330 00:18:43,780 --> 00:18:46,180 or each scan line looks like it's random, right? 331 00:18:46,400 --> 00:18:48,640 It just looks like a mixture of ones and zeros, 332 00:18:48,680 --> 00:18:49,600 no structure to it. 333 00:18:49,760 --> 00:18:56,720 However, in here there is this very repetitive series of bits 334 00:18:56,720 --> 00:18:58,920 which is why you get these vertical lines. 335 00:18:59,140 --> 00:19:02,080 So each one of these scan lines has the same series of bits here 336 00:19:02,080 --> 00:19:03,680 and then there's some sort of a counter 337 00:19:03,680 --> 00:19:05,320 or some marker happening here as well. 338 00:19:06,100 --> 00:19:08,600 So that would be indicative of a synchronization process 339 00:19:08,620 --> 00:19:11,220 in the field to begin decoding that packet. 340 00:19:12,920 --> 00:19:14,180 So it appears random 341 00:19:14,180 --> 00:19:17,780 and then when you often deal with links 342 00:19:17,780 --> 00:19:19,220 and satellite links in this case, 343 00:19:19,340 --> 00:19:21,880 there are often three measures that are employed 344 00:19:21,880 --> 00:19:24,620 to add more redundancy 345 00:19:24,620 --> 00:19:29,120 and allow you to decode your signal in your packets 346 00:19:29,120 --> 00:19:30,680 even in the presence of errors 347 00:19:30,680 --> 00:19:32,360 that might have corrupted your data. 348 00:19:32,640 --> 00:19:34,060 So the first thing is interleaving 349 00:19:34,400 --> 00:19:36,220 and this will protect against burst errors. 350 00:19:36,420 --> 00:19:37,140 I'll show you why. 351 00:19:37,140 --> 00:19:40,120 Forward error correction, so that adds a little bit more data 352 00:19:40,120 --> 00:19:41,680 so that you can recover the data 353 00:19:41,680 --> 00:19:43,820 if bits are corrupted or flipped. 354 00:19:44,160 --> 00:19:47,180 And scrambling, and that's important because 355 00:19:49,080 --> 00:19:52,540 if you have a long sequence of the same bits, 356 00:19:52,540 --> 00:19:53,900 a long sequence of ones or zeros, 357 00:19:54,480 --> 00:19:57,840 there aren't changes to which the receiver 358 00:19:57,840 --> 00:20:00,060 can train its clock recovery. 359 00:20:00,280 --> 00:20:03,000 So you want to have as many flipped bits as possible 360 00:20:03,000 --> 00:20:05,260 so that there are these 361 00:20:06,420 --> 00:20:09,280 back here, these excursions to either end 362 00:20:09,280 --> 00:20:11,220 as often as possible. 363 00:20:11,400 --> 00:20:12,680 If you don't do it as often as possible, 364 00:20:12,880 --> 00:20:15,220 then you may lose synchronization. 365 00:20:16,660 --> 00:20:19,060 And there are scrambling codes, 366 00:20:19,200 --> 00:20:20,780 fixed scrambling codes that use a polynomial 367 00:20:21,300 --> 00:20:22,980 in a shift register and then 368 00:20:22,980 --> 00:20:25,520 you can actually deterministically figure out what that is. 369 00:20:28,940 --> 00:20:30,640 So, you can go that far. 370 00:20:30,740 --> 00:20:33,400 I found a couple of hints, which is what that's about. 371 00:20:33,400 --> 00:20:37,040 But the hints are that a frame payload consists of 372 00:20:37,800 --> 00:20:39,480 multiple fixed signaling units. 373 00:20:40,180 --> 00:20:41,440 And for the P-channel, 374 00:20:42,160 --> 00:20:44,400 it usually depends on the data rate, 375 00:20:44,520 --> 00:20:47,880 but here it's six SUs and each of them are 96 bits. 376 00:20:48,560 --> 00:20:49,900 So, for transmission, 377 00:20:50,780 --> 00:20:52,820 you basically construct the entire group, 378 00:20:52,980 --> 00:20:55,740 you scramble it, use a half-rate convolutional encoder, 379 00:20:55,840 --> 00:20:57,100 then you put it through interleaver. 380 00:20:57,320 --> 00:20:58,720 So what does that actually look like? 381 00:20:59,580 --> 00:21:03,100 You have your six 96-bit signaling units here, 382 00:21:03,600 --> 00:21:06,300 you have a scramble, so you generate your scrambling sequence, 383 00:21:06,600 --> 00:21:09,520 you take all the bits and you X-all them together. 384 00:21:10,160 --> 00:21:11,100 Once you've got that, 385 00:21:11,140 --> 00:21:13,400 you put them through a convolutional encoder, 386 00:21:13,420 --> 00:21:14,180 I'll show what it looks like, 387 00:21:14,420 --> 00:21:17,200 and then you interleave them and create your payload now. 388 00:21:17,540 --> 00:21:20,500 And that fixed set of lines that we saw before, 389 00:21:20,600 --> 00:21:22,640 that's your unique word and the frame header. 390 00:21:23,100 --> 00:21:25,280 And that's what's used to demarcate then the payload. 391 00:21:25,420 --> 00:21:27,460 And these just run back-to-back the entire time 392 00:21:27,460 --> 00:21:28,780 on each one of those channels. 393 00:21:29,940 --> 00:21:32,360 So, what is an interleaver, 394 00:21:32,360 --> 00:21:34,140 or how does the D interleaver actually work? 395 00:21:34,780 --> 00:21:39,260 In this case, you can consider an interleaver as a memory cell, 396 00:21:39,440 --> 00:21:43,580 and you write into the interleaver in one particular order 397 00:21:43,580 --> 00:21:45,360 and you read out of it in another order. 398 00:21:45,580 --> 00:21:49,480 And what that does is it distributes temporally the bits. 399 00:21:49,620 --> 00:21:51,660 So, we've got N rows and N columns, 400 00:21:52,340 --> 00:21:54,320 and in terms of writing in, 401 00:21:54,420 --> 00:21:57,900 we're going to write row-wise, like this. 402 00:21:58,100 --> 00:22:00,780 So we write across each row, 403 00:22:00,780 --> 00:22:03,540 and once the interleaver is full, 404 00:22:03,740 --> 00:22:05,880 then we read out column-wise. 405 00:22:06,140 --> 00:22:07,620 So instead of going the same way, 406 00:22:07,680 --> 00:22:11,660 we go 1, 5, 9, 13, and so on like this, 407 00:22:11,760 --> 00:22:13,960 until we've read out each of the columns. 408 00:22:14,220 --> 00:22:15,660 And what we've effectively done there 409 00:22:15,660 --> 00:22:18,220 is instead of having 1 and 2 next to one another, 410 00:22:18,440 --> 00:22:19,620 we've got 1 and 5, 411 00:22:19,800 --> 00:22:21,840 so we've redistributed them temporarily. 412 00:22:23,000 --> 00:22:25,760 Because, remember we've also got forward error correction on this, 413 00:22:25,920 --> 00:22:30,740 if we affect some of these bits, 414 00:22:31,480 --> 00:22:33,240 then if we were to read it out, 415 00:22:33,280 --> 00:22:36,100 if we weren't interleaving and we just had them serially in order, 416 00:22:36,240 --> 00:22:38,940 if we had a burst error that affected some of these bits, 417 00:22:39,080 --> 00:22:41,680 it might affect too many in that one small group 418 00:22:41,680 --> 00:22:44,380 for the error corrector to actually correct fully, 419 00:22:44,540 --> 00:22:47,380 because there's only so far that an error corrector can go, 420 00:22:48,380 --> 00:22:51,460 given the amount of additional bits that you're putting in there. 421 00:22:51,620 --> 00:22:53,340 However, if you put them, 422 00:22:53,420 --> 00:22:55,240 if you distribute these bits temporarily, 423 00:22:55,820 --> 00:22:57,420 so they're not in sequence anymore, 424 00:22:57,600 --> 00:22:59,220 but they're temporarily distributed like that, 425 00:22:59,220 --> 00:23:03,560 then if we end up affecting these three bits 1, 5, 9, 426 00:23:03,800 --> 00:23:06,820 then we can still rely on the error correcting data 427 00:23:06,820 --> 00:23:10,060 that might be in this smaller group around 1 428 00:23:10,060 --> 00:23:12,580 to fix 1, and then also fix 5, and then also fix 9. 429 00:23:13,460 --> 00:23:15,340 So, it's just a really effective way of doing it. 430 00:23:15,360 --> 00:23:19,240 It's pretty much used in every single modern communication system, 431 00:23:19,400 --> 00:23:20,920 even on CDs, for example, 432 00:23:21,340 --> 00:23:23,060 because, you know, you can take a drill, right, 433 00:23:23,140 --> 00:23:25,180 and drill a hole in your CD and it will still play back. 434 00:23:25,340 --> 00:23:26,800 It's because they use a hell of a lot of this 435 00:23:26,800 --> 00:23:28,480 and other error correcting codes. 436 00:23:29,500 --> 00:23:33,540 And then the next step is a convolutional encoder. 437 00:23:33,840 --> 00:23:35,440 This is used in all... 438 00:23:35,440 --> 00:23:36,820 I mean, this has been superseded now 439 00:23:36,820 --> 00:23:39,740 by much more modern codes like turbo coding 440 00:23:39,740 --> 00:23:41,260 that's used in LTE, 441 00:23:41,500 --> 00:23:43,440 but this was used for a very long time 442 00:23:43,440 --> 00:23:44,160 and still is used. 443 00:23:44,560 --> 00:23:48,280 A lot of the NASA space probes used to use this and so on. 444 00:23:49,280 --> 00:23:52,840 But what you do is you feed your data bits into a buffer, 445 00:23:53,420 --> 00:23:55,840 and then you basically take these taps off 446 00:23:55,840 --> 00:23:59,040 and produce extra bits for the incoming bits. 447 00:23:59,840 --> 00:24:01,920 And then that adds the redundancy. 448 00:24:01,980 --> 00:24:04,460 So what happens is, depending on the polynomial that you've used, 449 00:24:04,540 --> 00:24:05,760 how you've configured this, 450 00:24:05,920 --> 00:24:08,800 then you can generate this trellis, it's called. 451 00:24:09,400 --> 00:24:12,600 I won't go into details because it's a bit outside the scope here, 452 00:24:12,640 --> 00:24:13,840 but you can use a decoder then. 453 00:24:13,980 --> 00:24:16,800 And as you fill in your received symbols, 454 00:24:17,320 --> 00:24:20,880 the decoder will try and find the most likely path 455 00:24:20,880 --> 00:24:22,920 to traverse through the trellis 456 00:24:22,920 --> 00:24:25,940 that matched the symbols that you actually received. 457 00:24:26,180 --> 00:24:28,300 So although you might receive some symbols in error, 458 00:24:28,300 --> 00:24:32,940 that won't exactly match what's in these elements here, 459 00:24:33,120 --> 00:24:35,220 it will still find the most likely path 460 00:24:36,240 --> 00:24:38,920 because there are going to be paths that are more likely than others, 461 00:24:39,140 --> 00:24:42,120 and then it'll use that as the data that you actually received. 462 00:24:42,340 --> 00:24:44,580 And in that way you can then correct or recover 463 00:24:45,080 --> 00:24:46,600 the bits that might have been corrupted. 464 00:24:47,340 --> 00:24:48,920 It's a really neat system. 465 00:24:49,820 --> 00:24:51,900 One problem with this approach is that 466 00:24:51,900 --> 00:24:53,880 if you implement it on a PC, 467 00:24:54,080 --> 00:24:57,100 because processes, although there is parallelism, 468 00:24:58,520 --> 00:25:00,180 you've only got a certain number of cores, 469 00:25:01,220 --> 00:25:04,180 this actually is highly parallelizable. 470 00:25:04,280 --> 00:25:06,660 So on FPGAs you can pretty much do the entire thing in one step 471 00:25:06,660 --> 00:25:11,300 because you can have like 256 or really more branches 472 00:25:11,960 --> 00:25:13,500 and compute it really quickly, 473 00:25:13,600 --> 00:25:17,140 but on a serial machine you actually have to traverse all of them all, 474 00:25:18,120 --> 00:25:20,360 and so that can be quite computationally expensive 475 00:25:20,360 --> 00:25:25,340 for very large values of k, 476 00:25:25,500 --> 00:25:26,920 which defines how long your... 477 00:25:27,100 --> 00:25:29,020 your constraint length, how long the trellis is. 478 00:25:30,380 --> 00:25:33,800 But what's nice is GNU Radio has blocks to do all this kind of stuff already, 479 00:25:34,600 --> 00:25:38,780 and in grfeq, which is a submodule in the main tree, 480 00:25:38,900 --> 00:25:42,720 there's this nice extended decoder object, 481 00:25:42,960 --> 00:25:45,120 and then you can configure that with this definition, 482 00:25:45,300 --> 00:25:48,620 and as it turns out, they actually used the original configuration 483 00:25:48,620 --> 00:25:50,640 that was on the Voyager space probe. 484 00:25:50,820 --> 00:25:54,820 So that's convolutional code of k7 and these two polynomials, 485 00:25:54,860 --> 00:25:55,900 and you put that in there, 486 00:25:55,900 --> 00:25:59,040 and magically things start working. 487 00:25:59,420 --> 00:26:03,380 The next step is that they use scrambling. 488 00:26:03,800 --> 00:26:06,400 So you can set up your own scrambler, 489 00:26:06,520 --> 00:26:07,860 an additive scrambler. 490 00:26:07,940 --> 00:26:10,780 There's a different sort of scrambler called a multiplicative scrambler, 491 00:26:10,840 --> 00:26:12,180 but here we use additive, 492 00:26:12,760 --> 00:26:15,380 and we implement that as a linear feedback shift register. 493 00:26:16,260 --> 00:26:20,440 The one that's already in GNU Radio didn't quite do what I wanted it to do. 494 00:26:20,500 --> 00:26:21,040 It wasn't... 495 00:26:21,040 --> 00:26:24,720 It had to read out the bits before or after the opposite one. 496 00:26:25,900 --> 00:26:27,440 So I just modified that into this new one, 497 00:26:27,580 --> 00:26:30,640 and then you can use this mask in the seed to initialize it, 498 00:26:31,200 --> 00:26:33,340 and every time you reach a frame boundary, 499 00:26:33,520 --> 00:26:36,600 it just spits out your scrambling sequence and it descrambles it. 500 00:26:37,120 --> 00:26:38,560 So when you actually do that, 501 00:26:38,640 --> 00:26:40,480 remember that really noisy plot that we had before? 502 00:26:40,820 --> 00:26:43,400 Now it looks like it has far more structure, 503 00:26:43,460 --> 00:26:44,200 and it's repeating. 504 00:26:44,400 --> 00:26:45,280 Can you see that? 505 00:26:45,380 --> 00:26:47,200 It's not that random mess anymore. 506 00:26:47,880 --> 00:26:48,840 So that's really good. 507 00:26:48,900 --> 00:26:50,560 That means that we're on the right track. 508 00:26:51,040 --> 00:26:53,240 The last thing in a communications system 509 00:26:53,240 --> 00:26:55,560 is often adding a checksum on the end of your frame. 510 00:26:55,900 --> 00:26:57,480 So once you've decoded it, 511 00:26:57,540 --> 00:27:00,200 you can verify that the data that you've received and decoded 512 00:27:00,200 --> 00:27:01,900 is actually correct and free of errors. 513 00:27:02,260 --> 00:27:06,280 So in this case, they're using CRC16CCITT, 514 00:27:06,880 --> 00:27:08,300 which is one particular variant. 515 00:27:08,480 --> 00:27:10,260 That's just on the end of the payload there, 516 00:27:10,770 --> 00:27:12,780 and when you run it, you should get this value. 517 00:27:14,380 --> 00:27:15,720 So once you do that, 518 00:27:16,700 --> 00:27:20,880 the program will start spitting out these SUs. 519 00:27:20,880 --> 00:27:23,480 So this is 96 bits worth plus the CRC on the end. 520 00:27:23,860 --> 00:27:25,840 And these just come out in order 521 00:27:25,900 --> 00:27:26,520 one after another. 522 00:27:26,920 --> 00:27:28,540 And well, what are they? 523 00:27:28,600 --> 00:27:29,460 As it turns out, 524 00:27:30,120 --> 00:27:32,100 they mean a whole bunch of different things. 525 00:27:32,320 --> 00:27:34,640 But what I was particularly interested in 526 00:27:34,640 --> 00:27:36,580 is there's a certain combination of bits 527 00:27:36,580 --> 00:27:39,040 in the upper significant, 528 00:27:39,320 --> 00:27:40,920 most significant bits of the first byte 529 00:27:40,920 --> 00:27:43,140 that determines what sort of a message it is. 530 00:27:43,340 --> 00:27:45,800 And in particular, this user data message. 531 00:27:46,980 --> 00:27:49,780 So what they do is it can be of arbitrary length 532 00:27:49,780 --> 00:27:51,840 and cross multiple signaling units. 533 00:27:52,060 --> 00:27:53,960 And there's a sequence number that's indicated 534 00:27:53,960 --> 00:27:55,700 by the rest of the bits in the message. 535 00:27:55,900 --> 00:27:57,100 And as you can see, it counts down. 536 00:27:57,880 --> 00:27:59,960 So this indicates that we're starting an ISU, 537 00:28:00,060 --> 00:28:02,840 and then it's D6543210. 538 00:28:03,120 --> 00:28:04,300 And on the end of it, 539 00:28:05,000 --> 00:28:07,320 once you've been accumulating those bytes, 540 00:28:07,580 --> 00:28:09,380 you can then turn that into a message. 541 00:28:10,320 --> 00:28:12,880 And there's a whole bunch of other stuff going on here. 542 00:28:12,920 --> 00:28:14,200 Remember, this is the coordination channel, 543 00:28:14,300 --> 00:28:16,240 so you see logons and acknowledgements 544 00:28:16,240 --> 00:28:18,340 and information about the constellation, 545 00:28:18,940 --> 00:28:20,240 system time, and so on. 546 00:28:20,900 --> 00:28:22,580 So once you accumulate that, 547 00:28:23,360 --> 00:28:25,060 in this case, it was going on for longer, 548 00:28:25,060 --> 00:28:26,400 and it finally ends when you get to C0. 549 00:28:27,060 --> 00:28:30,440 Then you can turn that into, actually, as it turns out, 550 00:28:30,900 --> 00:28:33,660 a message that looks an awful lot like 551 00:28:33,660 --> 00:28:35,600 the sort of ACARS messages that we see on the ground. 552 00:28:36,080 --> 00:28:37,420 So in this case, 553 00:28:38,760 --> 00:28:40,560 you know, this has this weird formatting, 554 00:28:40,740 --> 00:28:43,320 but I actually see this often. 555 00:28:43,420 --> 00:28:44,460 Please arrive at the boarding gate 556 00:28:44,460 --> 00:28:47,340 at least however many minutes before departure. 557 00:28:47,880 --> 00:28:49,480 Late passengers may not be accepted. 558 00:28:50,040 --> 00:28:52,280 I thought they weren't generally accepted. 559 00:28:52,540 --> 00:28:54,140 But you also see, 560 00:28:55,200 --> 00:28:56,760 from all around the world, actually, 561 00:28:56,820 --> 00:28:57,600 I was looking this morning, 562 00:28:57,740 --> 00:28:59,100 I was seeing them from Hong Kong 563 00:28:59,100 --> 00:29:01,480 and I think Singapore, 564 00:29:04,380 --> 00:29:06,300 notices regarding those particular airports 565 00:29:06,300 --> 00:29:07,380 and weather reports. 566 00:29:07,760 --> 00:29:09,960 So these are all being downlinked to planes 567 00:29:09,960 --> 00:29:11,700 that are probably en route to those airports, 568 00:29:11,820 --> 00:29:13,600 and they want to know what the weather conditions are. 569 00:29:13,980 --> 00:29:15,980 And instead of, you know, calling someone up, 570 00:29:16,060 --> 00:29:19,180 they can just have the, you know, request weather 571 00:29:19,180 --> 00:29:21,220 and it'd be sent over in Marsat to the cockpit. 572 00:29:21,520 --> 00:29:24,840 And so this is saying that, you know, 573 00:29:25,060 --> 00:29:27,820 there's a taxiway K that's closed between runway 33 574 00:29:27,820 --> 00:29:30,180 and taxiway J, blah, blah, blah. 575 00:29:31,860 --> 00:29:35,940 And then you have these METAR weather reports. 576 00:29:36,680 --> 00:29:38,060 So if you actually look online, 577 00:29:38,160 --> 00:29:40,100 you can figure out what it means. 578 00:29:40,280 --> 00:29:42,060 They refer to visibility and various, 579 00:29:42,680 --> 00:29:43,900 you know, that's overcast 580 00:29:43,900 --> 00:29:46,860 and various other aviation acronyms. 581 00:29:47,600 --> 00:29:49,220 And this is where it gets really interesting 582 00:29:50,300 --> 00:29:52,900 with CPDLC and AFN. 583 00:29:53,000 --> 00:29:54,800 These are a layer on top of the, 584 00:29:55,060 --> 00:29:55,740 you know, the messaging protocol. 585 00:29:57,180 --> 00:30:01,620 And again, it looks like some odd things, 586 00:30:01,740 --> 00:30:02,880 but, you know, here you've got 587 00:30:02,880 --> 00:30:04,420 some sort of obvious encoding. 588 00:30:05,200 --> 00:30:07,120 This is another ADS protocol. 589 00:30:08,360 --> 00:30:11,000 And again, that'll be, you know, 590 00:30:11,000 --> 00:30:12,120 one of the next steps to look at. 591 00:30:12,220 --> 00:30:14,800 But this actually relates to airlines 592 00:30:14,800 --> 00:30:17,140 sort of logging on and off these various networks 593 00:30:17,140 --> 00:30:21,300 and various updates as they fly through the sky. 594 00:30:22,900 --> 00:30:24,420 And then, you know, scheduling 595 00:30:25,060 --> 00:30:28,900 and often you see all sorts of free text messages too. 596 00:30:29,020 --> 00:30:35,240 It was sending various names and so on of the flight crew. 597 00:30:35,540 --> 00:30:37,280 So let's actually have a look then 598 00:30:37,280 --> 00:30:39,940 what the flow graph looks like. 599 00:30:47,460 --> 00:30:48,540 So not that one. 600 00:30:48,700 --> 00:30:50,640 Let's start with... 601 00:30:56,400 --> 00:30:57,120 this one. 602 00:30:58,960 --> 00:31:00,540 So this is the original one. 603 00:31:01,680 --> 00:31:03,880 This is testing one, one two. 604 00:31:04,380 --> 00:31:06,620 So one other nice thing you can do is, 605 00:31:06,700 --> 00:31:07,960 and I'll show you how this works, 606 00:31:08,120 --> 00:31:10,300 is that if you've got simple data streams like this, 607 00:31:10,440 --> 00:31:13,500 it can also be a bit of a clue to actually listen to them 608 00:31:13,500 --> 00:31:16,180 because this is slow rate data and it's FSK. 609 00:31:16,380 --> 00:31:19,480 You can pretty simply modulate this into your sound card 610 00:31:20,100 --> 00:31:22,960 and you get something that sounds like that. 611 00:31:23,740 --> 00:31:26,100 And, you know, that sounds like it should. 612 00:31:27,080 --> 00:31:29,840 So you can see down the bottom there 613 00:31:29,840 --> 00:31:31,780 as it's actually working. 614 00:31:31,940 --> 00:31:34,120 I'll bring the console over so you can see that. 615 00:31:49,040 --> 00:31:51,060 So it's just getting this on one particular channel 616 00:31:51,060 --> 00:31:53,660 and it's constantly decoding that. 617 00:31:53,720 --> 00:31:57,400 When it gets a message, it'll print that out. 618 00:32:00,120 --> 00:32:02,860 But usually, you know, it's this sort of fixed frames 619 00:32:02,860 --> 00:32:03,900 that are happening all the time 620 00:32:03,900 --> 00:32:06,840 and then every so often you see the interesting text messages. 621 00:32:07,380 --> 00:32:10,600 So if you look at the flow graph itself, 622 00:32:13,120 --> 00:32:15,140 then is it going to fit more or less? 623 00:32:15,280 --> 00:32:17,780 So here we've got these various channels. 624 00:32:18,920 --> 00:32:19,360 And... 625 00:32:21,740 --> 00:32:24,380 What's neat is that in this... 626 00:32:25,820 --> 00:32:27,260 You can just click on one. 627 00:32:27,520 --> 00:32:28,200 Oh, what's that? 628 00:32:29,860 --> 00:32:30,660 Special reach. 629 00:32:30,960 --> 00:32:31,240 Yeah. 630 00:32:32,520 --> 00:32:33,640 You can just click on... 631 00:32:33,640 --> 00:32:34,360 Come on. 632 00:32:36,240 --> 00:32:37,480 You can click on one of these 633 00:32:39,360 --> 00:32:42,760 and then, you know, see what the baseband looks like, 634 00:32:42,880 --> 00:32:45,600 do that power stuff that I was talking about with the squaring 635 00:32:45,600 --> 00:32:46,660 and looking for the peaks, 636 00:32:47,980 --> 00:32:50,000 you know, looking for the board rate and so on. 637 00:32:50,000 --> 00:32:52,860 So I'll show you this in the newer version. 638 00:32:53,140 --> 00:32:55,100 But initially, I just thought, 639 00:32:55,180 --> 00:32:56,880 well, why not do something like 640 00:32:56,880 --> 00:32:58,800 once you actually click on one of these things, 641 00:32:59,280 --> 00:33:01,740 the channels are really narrow, so you have to be pretty accurate. 642 00:33:02,060 --> 00:33:03,620 But you can't be accurate all the time, 643 00:33:03,720 --> 00:33:05,460 so you wanted to do some automatic tuning. 644 00:33:07,480 --> 00:33:08,620 So if you look here, 645 00:33:08,700 --> 00:33:10,660 you see how the green line's tracking over 646 00:33:10,660 --> 00:33:12,440 and trying to find the midpoint there. 647 00:33:13,380 --> 00:33:17,600 In this case, I was using that squaring technique with the peaks. 648 00:33:18,600 --> 00:33:19,000 See? 649 00:33:19,000 --> 00:33:19,720 Even that... 650 00:33:19,720 --> 00:33:20,660 That should get it. 651 00:33:20,740 --> 00:33:21,920 The newer version does get it, 652 00:33:21,940 --> 00:33:23,080 but that's still slightly off. 653 00:33:25,740 --> 00:33:28,520 So what this is doing then is 654 00:33:28,520 --> 00:33:31,020 it actually takes the output of this FFT 655 00:33:31,860 --> 00:33:37,140 and then it looks in one half for the highest peak 656 00:33:37,940 --> 00:33:41,040 and then uses that to calculate the frequency offset 657 00:33:41,040 --> 00:33:42,460 because this peak should be at 300. 658 00:33:42,860 --> 00:33:46,260 It should be at half the symbol right out from the middle. 659 00:33:46,460 --> 00:33:48,500 And so whatever the difference is between that 660 00:33:50,420 --> 00:33:52,780 expected peak and where the actual peak is, 661 00:33:52,880 --> 00:33:55,800 that's how much it'll shift the frequency over automatically. 662 00:33:56,060 --> 00:33:57,660 But the obvious problem with that is 663 00:33:57,660 --> 00:34:00,300 if you've got two peaks in one side of the spectrum, 664 00:34:00,500 --> 00:34:04,220 then it won't know which one is the one to use. 665 00:34:04,360 --> 00:34:06,620 So that didn't work. 666 00:34:06,820 --> 00:34:11,000 But the implementation is a bit fun if you can... 667 00:34:11,560 --> 00:34:13,320 Well, it's a mess, really, 668 00:34:13,420 --> 00:34:15,300 but you go into this FFT 669 00:34:15,300 --> 00:34:18,980 and then when you take the output, 670 00:34:19,000 --> 00:34:19,660 the output of that FFT, 671 00:34:20,360 --> 00:34:22,880 these are some nice blocks you can use. 672 00:34:22,960 --> 00:34:23,920 You can go into... 673 00:34:24,740 --> 00:34:26,260 Basically, you take the magnitudes, 674 00:34:26,820 --> 00:34:28,460 do the log of that, 675 00:34:28,580 --> 00:34:29,840 and then you use argmax, 676 00:34:30,020 --> 00:34:32,020 which finds the maximum input value 677 00:34:32,020 --> 00:34:34,860 and the maximum index where that value was found 678 00:34:34,860 --> 00:34:36,800 in the array that you end up passing through. 679 00:34:37,220 --> 00:34:41,000 And then you hook the index into this probe signal. 680 00:34:41,320 --> 00:34:42,840 And what the probe signal does 681 00:34:42,840 --> 00:34:44,980 is it just basically feeds on the incoming data. 682 00:34:45,240 --> 00:34:47,480 And then here in this function probe, 683 00:34:47,480 --> 00:34:50,740 you supply the ID of this probe signal, 684 00:34:51,600 --> 00:34:54,980 which is probe max FFT index. 685 00:34:57,640 --> 00:34:59,440 And in function probe, 686 00:34:59,720 --> 00:35:00,800 it basically just calls level, 687 00:35:01,040 --> 00:35:03,020 which is a function that's exposed by probe signal, 688 00:35:03,200 --> 00:35:04,200 and that gets the index. 689 00:35:05,260 --> 00:35:05,780 What? 690 00:35:06,280 --> 00:35:08,040 I guess five times a second or something. 691 00:35:09,980 --> 00:35:11,840 And then when it does that, 692 00:35:12,300 --> 00:35:14,220 you put it through one of these variables 693 00:35:14,220 --> 00:35:17,140 and then it calculates that as a frequency offset. 694 00:35:17,480 --> 00:35:22,720 Which then is fed back as a variable into this rotator. 695 00:35:23,840 --> 00:35:25,400 So it takes the fine offset 696 00:35:26,360 --> 00:35:28,700 divided by the baseband sample rate 697 00:35:28,700 --> 00:35:30,880 and then multiplies it by pi. 698 00:35:30,940 --> 00:35:33,480 And so it shifts the baseband around 699 00:35:34,280 --> 00:35:35,620 so it lines it up. 700 00:35:35,680 --> 00:35:37,220 But that wasn't so good 701 00:35:37,220 --> 00:35:39,700 because of those obvious issues I pointed out. 702 00:35:39,780 --> 00:35:43,700 So let's take a look at how you can build up a decoder. 703 00:35:45,800 --> 00:35:47,320 So the first step was 704 00:35:51,880 --> 00:35:53,380 The first step was 705 00:35:54,180 --> 00:35:55,840 decoding this as an FM signal 706 00:35:55,840 --> 00:35:57,040 because this is GMSK. 707 00:35:57,340 --> 00:35:59,620 This is basically just moving your frequency 708 00:36:00,620 --> 00:36:02,060 around a center frequency 709 00:36:02,060 --> 00:36:03,560 to convey bits. 710 00:36:03,860 --> 00:36:06,120 So you have your baseband coming in 711 00:36:06,120 --> 00:36:07,660 to quadrature demodulator, 712 00:36:07,740 --> 00:36:08,720 which is your FM demod. 713 00:36:08,800 --> 00:36:11,120 You go into an FIR filter. 714 00:36:11,380 --> 00:36:12,940 So I just made up some 715 00:36:15,180 --> 00:36:17,160 Gaussian pole-shaped taps there. 716 00:36:17,480 --> 00:36:18,380 And what that does is 717 00:36:18,380 --> 00:36:20,340 you might have a really noisy incoming signal 718 00:36:20,340 --> 00:36:22,520 and that smooths it out nicely 719 00:36:22,520 --> 00:36:24,980 so that you have some symbols 720 00:36:24,980 --> 00:36:27,860 that you can then do clock recovery on. 721 00:36:28,040 --> 00:36:32,180 And then you do this very simple subtraction here. 722 00:36:32,260 --> 00:36:34,480 So this single pole IR filter 723 00:36:34,480 --> 00:36:37,360 is actually really a long-term averaging filter. 724 00:36:37,820 --> 00:36:40,440 And so when you actually see the signal 725 00:36:40,440 --> 00:36:42,800 it'll be moving between two values. 726 00:36:43,220 --> 00:36:44,540 Hopefully negative one and one. 727 00:36:44,860 --> 00:36:46,260 But it might be elsewhere. 728 00:36:46,260 --> 00:36:48,120 But the point is remember how we were 729 00:36:48,120 --> 00:36:49,560 scrambling our incoming signal, 730 00:36:49,640 --> 00:36:52,040 which means that it's changing between one and zero. 731 00:36:52,500 --> 00:36:53,560 The bits are. 732 00:36:53,980 --> 00:36:55,700 That means that we have a lot of transitions. 733 00:36:55,980 --> 00:36:58,580 And so if you average that over a very long period of time, 734 00:36:58,780 --> 00:37:00,660 that should average to zero. 735 00:37:01,180 --> 00:37:02,500 And so what we can do is 736 00:37:02,500 --> 00:37:03,440 we do that long-running average 737 00:37:03,440 --> 00:37:06,840 and then subtract that from our original signal. 738 00:37:07,160 --> 00:37:09,320 And then we will get something that's actually 739 00:37:09,320 --> 00:37:12,440 nicely sitting around the zero point. 740 00:37:12,660 --> 00:37:14,460 And you'll see why that's important in a second. 741 00:37:14,700 --> 00:37:16,240 So this is the demod part of it. 742 00:37:16,260 --> 00:37:16,880 Very simple. 743 00:37:17,360 --> 00:37:19,160 And then we go and actually look at 744 00:37:19,820 --> 00:37:21,020 how that's used here. 745 00:37:21,160 --> 00:37:23,000 So this is the next hierarchical block layer. 746 00:37:23,200 --> 00:37:24,760 So you've got the demod here. 747 00:37:25,520 --> 00:37:28,020 And then you go into clock recovery. 748 00:37:28,240 --> 00:37:30,780 So here I've oversampled by eight. 749 00:37:31,220 --> 00:37:36,360 Because it's quite cheap here at this low rate. 750 00:37:37,040 --> 00:37:40,600 And then once you get your soft bits out. 751 00:37:40,820 --> 00:37:43,260 So remember these are not hard ones and zeros. 752 00:37:43,560 --> 00:37:45,480 These are soft bits because 753 00:37:45,480 --> 00:37:47,420 remember in that bottom diagram here 754 00:37:47,420 --> 00:37:50,540 when they were just above and below zero, 755 00:37:50,780 --> 00:37:52,900 they were sort of sprinkled around there 756 00:37:52,900 --> 00:37:53,860 with that separation. 757 00:37:54,240 --> 00:37:56,900 But they're not sort of your hard one and zero bit. 758 00:37:57,240 --> 00:37:59,620 That will go into this block. 759 00:37:59,900 --> 00:38:01,600 So this is actually a Python block. 760 00:38:02,840 --> 00:38:04,500 I've become really lazy 761 00:38:04,500 --> 00:38:08,320 so I don't actually make the GRC XML definitions anymore. 762 00:38:08,620 --> 00:38:09,980 I just want to use my block. 763 00:38:10,380 --> 00:38:14,100 So I write the code, expose it in Python, 764 00:38:14,100 --> 00:38:16,220 and then drop one of these any blocks in. 765 00:38:17,000 --> 00:38:22,680 And here you can simply type in the Python block 766 00:38:22,680 --> 00:38:26,820 that GRC would ordinarily inject for you. 767 00:38:26,860 --> 00:38:28,700 You can just do it in there manually. 768 00:38:28,980 --> 00:38:31,160 And then that'll make the block. 769 00:38:31,300 --> 00:38:33,780 You set input, output, and then that's done. 770 00:38:34,240 --> 00:38:35,800 So what this block is doing 771 00:38:35,800 --> 00:38:37,980 is it's looking for that magic sequence 772 00:38:37,980 --> 00:38:39,000 that begins at the beginning 773 00:38:39,000 --> 00:38:41,340 to mark the beginning of a payload. 774 00:38:41,560 --> 00:38:43,160 And then de-interleave them 775 00:38:43,160 --> 00:38:44,080 like I showed you 776 00:38:44,100 --> 00:38:45,360 with that interleaver diagram. 777 00:38:45,760 --> 00:38:47,240 So it builds up the memory 778 00:38:47,240 --> 00:38:49,120 because we know how long the payload is. 779 00:38:49,880 --> 00:38:51,760 And then once the interleaver's full, 780 00:38:52,020 --> 00:38:53,680 it just spits all the bits out here 781 00:38:53,680 --> 00:38:55,140 to the next stage. 782 00:38:55,500 --> 00:38:58,760 So nothing is coming out of this port 783 00:38:58,760 --> 00:39:01,600 until it's seen the synchronization sequence 784 00:39:01,600 --> 00:39:03,400 and then filled up the interleaver. 785 00:39:03,500 --> 00:39:04,920 Then it pumps everything out 786 00:39:04,920 --> 00:39:06,780 and then resets its state internally. 787 00:39:08,220 --> 00:39:10,180 And what's nice is that this 788 00:39:10,180 --> 00:39:12,840 is actually just Python code inside. 789 00:39:13,040 --> 00:39:13,640 There's no C++. 790 00:39:14,320 --> 00:39:16,520 It actually turns out to be 791 00:39:16,520 --> 00:39:18,540 the most expensive block 792 00:39:18,540 --> 00:39:19,400 in the entire flow graph. 793 00:39:19,640 --> 00:39:20,940 So if you want to run it, 794 00:39:20,980 --> 00:39:22,520 you probably should implement a C++. 795 00:39:22,800 --> 00:39:24,520 But for the purpose of prototyping offline, 796 00:39:24,820 --> 00:39:26,260 that was quite easy. 797 00:39:27,660 --> 00:39:29,860 And then as you saw before, 798 00:39:29,960 --> 00:39:32,620 you can go to this FEC decoder. 799 00:39:32,780 --> 00:39:33,760 So this is what's implementing 800 00:39:33,760 --> 00:39:36,460 that convolutional decoding. 801 00:39:37,560 --> 00:39:40,840 And it's passed an entire payload's worth 802 00:39:40,840 --> 00:39:42,560 and then it decodes that payload. 803 00:39:42,560 --> 00:39:45,200 And then these are soft bits coming in. 804 00:39:45,260 --> 00:39:47,320 And then it puts hard bits out. 805 00:39:47,480 --> 00:39:48,960 So it uses those soft bits 806 00:39:49,880 --> 00:39:51,460 when traversing that trellis 807 00:39:51,460 --> 00:39:52,840 to find the most likely path. 808 00:39:53,380 --> 00:39:57,380 And then once you've got your path decided, 809 00:39:58,360 --> 00:40:00,560 it outputs the hard bits 810 00:40:00,560 --> 00:40:03,100 that make up the traversal of that path. 811 00:40:03,400 --> 00:40:04,940 So once you come out of this, 812 00:40:05,020 --> 00:40:07,540 you've got error-corrected, hopefully, 813 00:40:08,780 --> 00:40:11,240 bits from your original receive symbol stream. 814 00:40:11,240 --> 00:40:15,640 Now our length at this point is 576 bits. 815 00:40:17,020 --> 00:40:19,340 So we go stream to tag stream, 816 00:40:19,500 --> 00:40:22,860 which basically takes the first 576 bits 817 00:40:22,860 --> 00:40:26,440 and puts a length tag on that 818 00:40:26,440 --> 00:40:29,360 to say how long the actual stream is, 819 00:40:29,420 --> 00:40:30,280 that packet in the stream, 820 00:40:30,460 --> 00:40:32,200 and then turns it into here, 821 00:40:32,320 --> 00:40:34,180 into a PDU, which is like a message. 822 00:40:34,400 --> 00:40:37,600 So so far, we've been sending samples 823 00:40:37,600 --> 00:40:39,180 and bytes through the flow graph 824 00:40:39,180 --> 00:40:40,720 in a continuous streaming manner. 825 00:40:41,240 --> 00:40:42,020 And at this point, 826 00:40:42,100 --> 00:40:44,180 we turn our payloads, our bits, 827 00:40:44,240 --> 00:40:45,400 into a packet, 828 00:40:45,480 --> 00:40:46,960 which we can just asynchronously send 829 00:40:46,960 --> 00:40:48,000 through the rest of the system. 830 00:40:48,400 --> 00:40:50,420 So this now is sending a message 831 00:40:50,420 --> 00:40:52,040 to this block here, 832 00:40:52,600 --> 00:40:56,400 which is the descrambling block. 833 00:40:56,620 --> 00:40:58,100 Again, this is just a Python block. 834 00:40:58,300 --> 00:40:59,780 So you saw before that 835 00:41:00,320 --> 00:41:02,400 you basically need to generate a scrambled stream. 836 00:41:02,740 --> 00:41:04,120 This block will do it too. 837 00:41:06,300 --> 00:41:09,420 But this block also internally checks the CRC. 838 00:41:09,880 --> 00:41:11,120 So once it descrambles, 839 00:41:11,120 --> 00:41:11,340 it descrambles it, 840 00:41:11,360 --> 00:41:12,960 and makes sure it's a valid CRC, 841 00:41:13,080 --> 00:41:15,060 and then adds metadata to the message, 842 00:41:15,100 --> 00:41:16,380 saying if it's valid or not. 843 00:41:17,020 --> 00:41:18,420 If I was to use this outside, 844 00:41:18,620 --> 00:41:20,060 I need to also implement another block 845 00:41:20,060 --> 00:41:21,480 to do the CRC checking separately. 846 00:41:21,860 --> 00:41:22,700 But at the moment, 847 00:41:22,780 --> 00:41:23,860 that's all being done in there. 848 00:41:24,720 --> 00:41:26,400 So out of this, then, 849 00:41:26,540 --> 00:41:27,600 you get a message 850 00:41:28,820 --> 00:41:33,860 that contains your individual signaling units. 851 00:41:33,960 --> 00:41:34,680 Remember, we had six. 852 00:41:35,080 --> 00:41:36,300 This will descramble them, 853 00:41:36,380 --> 00:41:37,040 CRC check them, 854 00:41:37,120 --> 00:41:39,120 and then break them up into the individual packets. 855 00:41:39,120 --> 00:41:41,020 And then that's output on this 856 00:41:41,020 --> 00:41:45,060 to whatever is using this particular flow graph here. 857 00:41:45,300 --> 00:41:46,360 And at that point, 858 00:41:46,480 --> 00:41:47,780 we're good to go. 859 00:41:47,980 --> 00:41:50,580 So this is the GUI here. 860 00:41:52,240 --> 00:41:54,420 And this is a little bit simpler than before. 861 00:41:54,600 --> 00:41:55,400 So we have this file, 862 00:41:55,560 --> 00:41:56,380 which we recorded. 863 00:41:56,940 --> 00:42:01,260 And then we put that into this 864 00:42:02,240 --> 00:42:03,800 frequency-translating FIR filter. 865 00:42:04,000 --> 00:42:06,120 So that's used to actually select the channel 866 00:42:06,120 --> 00:42:06,940 that we want to listen to. 867 00:42:07,480 --> 00:42:08,760 And then, again, 868 00:42:08,760 --> 00:42:09,800 we do that tricky stuff 869 00:42:09,800 --> 00:42:10,580 where we square stuff 870 00:42:10,580 --> 00:42:11,960 just to visualize it anyway. 871 00:42:12,740 --> 00:42:15,800 And then there are a couple of different ways 872 00:42:15,800 --> 00:42:16,380 of doing this. 873 00:42:16,620 --> 00:42:17,560 But in this case, 874 00:42:17,640 --> 00:42:19,320 we go into the decoder here. 875 00:42:20,200 --> 00:42:21,660 And I've also got a DMOD here. 876 00:42:21,780 --> 00:42:22,680 And the reason why I have the DMOD 877 00:42:22,680 --> 00:42:23,640 is I'm not using the output. 878 00:42:23,880 --> 00:42:25,420 I'm just looking at the average value. 879 00:42:26,160 --> 00:42:28,140 So remember how the DMOD 880 00:42:28,140 --> 00:42:29,680 actually subtracted the average? 881 00:42:30,300 --> 00:42:31,840 We could actually just run it by itself. 882 00:42:32,160 --> 00:42:33,480 But because I want to visualize 883 00:42:34,500 --> 00:42:35,940 what the frequency offset is 884 00:42:35,940 --> 00:42:37,940 and maybe plot it or what have you, 885 00:42:37,940 --> 00:42:40,040 I'm bringing this DMOD in here 886 00:42:40,040 --> 00:42:42,020 and just using the output of the average here. 887 00:42:44,480 --> 00:42:45,620 And then in this case, 888 00:42:45,660 --> 00:42:46,980 it's feeding back to the rotator, 889 00:42:47,020 --> 00:42:48,760 which is doing a frequency adjustment for that. 890 00:42:49,940 --> 00:42:51,640 Just another way to do it anyway. 891 00:42:51,860 --> 00:42:52,840 So the output, remember, 892 00:42:52,920 --> 00:42:53,320 we're getting messages. 893 00:42:53,680 --> 00:42:55,220 And here we've got these two blocks. 894 00:42:55,600 --> 00:42:57,920 One of them is the message parser. 895 00:42:57,920 --> 00:42:58,820 So it's just going to tell you 896 00:42:58,820 --> 00:43:00,180 all the messages that are coming in. 897 00:43:00,380 --> 00:43:03,400 And the other one is this user message parser, 898 00:43:03,820 --> 00:43:06,200 which will specifically look for those user messages 899 00:43:06,200 --> 00:43:07,920 and then accumulate the data 900 00:43:07,940 --> 00:43:09,680 and then print out the payloads. 901 00:43:09,920 --> 00:43:10,960 And then in addition, 902 00:43:11,960 --> 00:43:14,380 I go PDU back to a stream, 903 00:43:14,820 --> 00:43:16,260 unpack those bytes to bits, 904 00:43:16,400 --> 00:43:18,280 and then send it out on a UDP sync 905 00:43:18,280 --> 00:43:20,540 because then there's another little flow graph 906 00:43:20,540 --> 00:43:21,180 that you can run 907 00:43:21,180 --> 00:43:23,020 that will do the raster plot for you 908 00:43:23,020 --> 00:43:25,020 so we can see what the structure 909 00:43:25,460 --> 00:43:26,580 of the data actually looks like. 910 00:43:26,820 --> 00:43:28,920 And then in this corner is the audio output. 911 00:43:29,280 --> 00:43:32,060 So basically, you're taking in your bits here. 912 00:43:32,460 --> 00:43:34,240 You're resampling them to an audio rate, 913 00:43:34,400 --> 00:43:35,480 doing some filtering, 914 00:43:36,740 --> 00:43:37,920 using a VCO data 915 00:43:37,940 --> 00:43:39,600 to generate one of two tones, 916 00:43:40,340 --> 00:43:42,820 moving those tones and the separation between them 917 00:43:42,820 --> 00:43:44,680 and then going out to your audio sync. 918 00:43:44,880 --> 00:43:49,520 So that's just a nice little visualized audio. 919 00:43:51,220 --> 00:43:53,520 What's the term to convert it? 920 00:43:53,580 --> 00:43:53,900 Sonification? 921 00:43:54,900 --> 00:43:55,420 Sonifying? 922 00:43:57,520 --> 00:43:58,920 So have a look at this. 923 00:43:59,420 --> 00:44:02,800 So this is that recording again. 924 00:44:04,300 --> 00:44:06,340 And we've clicked on that particular frequency. 925 00:44:06,340 --> 00:44:08,080 You can see it's printing out the information there. 926 00:44:09,240 --> 00:44:09,700 Here, 927 00:44:15,120 --> 00:44:16,120 you'll notice that 928 00:44:17,240 --> 00:44:20,440 this is where I clicked on it in the previous one. 929 00:44:20,940 --> 00:44:23,900 So you'll notice that this is 0, DC, 930 00:44:24,200 --> 00:44:25,940 but I clicked on it so it's slightly offset. 931 00:44:26,560 --> 00:44:28,460 And here the green line is showing you 932 00:44:28,460 --> 00:44:30,880 where the center of this particular signal is. 933 00:44:31,040 --> 00:44:32,920 And then we can use that rotator 934 00:44:32,920 --> 00:44:35,940 to rotate that back so it's exactly at DC again. 935 00:44:36,620 --> 00:44:38,000 And good for slicing. 936 00:44:38,720 --> 00:44:40,160 So how does that work? 937 00:44:40,560 --> 00:44:44,780 Well, we're not using this technique anymore. 938 00:44:45,700 --> 00:44:46,800 Why is that so slow? 939 00:44:51,660 --> 00:44:52,840 Hello. There we go. 940 00:44:53,860 --> 00:44:55,320 So this is what's originally coming in. 941 00:44:55,360 --> 00:44:57,280 You can square it and those peaks are still offset. 942 00:44:58,220 --> 00:44:59,780 Here we've moved it back 943 00:44:59,780 --> 00:45:02,880 because we're showing what the output post rotator is 944 00:45:02,880 --> 00:45:05,440 and that's nicely lined up around the center marker there. 945 00:45:06,020 --> 00:45:07,660 It's off the screen, unfortunately, 946 00:45:07,840 --> 00:45:11,880 but it actually has a little graphical text box 947 00:45:11,880 --> 00:45:14,060 that's telling you what the detected frequency offset is. 948 00:45:14,300 --> 00:45:15,960 But there's a really easy way to do it. 949 00:45:16,080 --> 00:45:17,740 Of course, we've got the board right there 950 00:45:17,740 --> 00:45:19,800 and it's exactly at 600 as we expect. 951 00:45:20,200 --> 00:45:21,660 So let's look at this. 952 00:45:28,120 --> 00:45:30,900 So you can see the green line is the DC average, 953 00:45:31,180 --> 00:45:33,220 which is nicely at 0. 954 00:45:33,440 --> 00:45:35,060 And then we have our symbol stream, 955 00:45:35,440 --> 00:45:35,940 which is the blue line, 956 00:45:35,980 --> 00:45:40,780 nicely shaped after the filtering that we end up slicing on. 957 00:45:40,920 --> 00:45:42,600 So you can see that we've got these nice excursions 958 00:45:42,600 --> 00:45:44,100 and it all looks good. 959 00:45:45,380 --> 00:45:47,260 So let's look at the clock recovery 960 00:45:48,340 --> 00:45:51,860 and we can do the dots 961 00:45:51,860 --> 00:45:53,300 and you've got the nice separation there. 962 00:45:53,720 --> 00:45:54,500 That all looks good. 963 00:45:54,600 --> 00:45:56,900 So this is actually what's coming out of the FM demodulator 964 00:45:57,420 --> 00:45:58,760 and then once we do that filtering, 965 00:45:58,900 --> 00:46:01,300 it turns that into that. 966 00:46:01,920 --> 00:46:03,340 So you can see what an effect 967 00:46:03,840 --> 00:46:05,420 a nice match filter is. 968 00:46:05,440 --> 00:46:06,060 So you can see what an effect filter can have 969 00:46:06,060 --> 00:46:08,640 on your signal and the performance of your decoder. 970 00:46:09,340 --> 00:46:11,300 Another nice view is if you use the histogram, 971 00:46:11,600 --> 00:46:14,020 then these are actually the soft bits 972 00:46:14,020 --> 00:46:15,580 that are coming out of the clock recovery. 973 00:46:15,880 --> 00:46:18,940 So again, this is a sort of nice representation 974 00:46:18,940 --> 00:46:21,820 of that separation between a negative one and one. 975 00:46:22,380 --> 00:46:27,820 So that's like looking at this from the side. 976 00:46:29,900 --> 00:46:32,540 Now, one thing I didn't want to show you was 977 00:46:32,540 --> 00:46:34,240 . . . 978 00:46:36,540 --> 00:46:38,460 That DC, which I'll show you in a second, 979 00:46:40,260 --> 00:46:42,180 that DC value and that little number 980 00:46:42,180 --> 00:46:43,420 that would show the frequency offset, 981 00:46:43,600 --> 00:46:45,120 that's cool just to watch it 982 00:46:45,120 --> 00:46:46,400 and maybe you output to a block 983 00:46:46,400 --> 00:46:47,940 and then you plot it later. 984 00:46:49,320 --> 00:46:50,960 And there's probably other ways of doing this too, 985 00:46:51,080 --> 00:46:53,480 but I pulled this in a while back 986 00:46:53,480 --> 00:46:54,520 and it seemed to work quite nicely. 987 00:46:55,600 --> 00:46:58,980 I have a Python module called Real Time Graph 988 00:46:59,640 --> 00:47:01,100 and it's been quite handy 989 00:47:01,100 --> 00:47:02,960 because it just gives you a really simple 990 00:47:02,960 --> 00:47:03,760 Pythonic interface 991 00:47:04,240 --> 00:47:05,740 to draw stuff in Matplotlib. 992 00:47:06,320 --> 00:47:08,920 And in this case, you can just import it 993 00:47:08,920 --> 00:47:12,980 and I have this variable here 994 00:47:12,980 --> 00:47:14,280 which is just an empty list, 995 00:47:14,440 --> 00:47:16,180 which are the points that we're going to plot. 996 00:47:16,740 --> 00:47:20,680 And then we have this AnyCode one 997 00:47:22,460 --> 00:47:24,140 and AnyCode is a block 998 00:47:24,140 --> 00:47:26,400 where you can inject arbitrary Python 999 00:47:26,400 --> 00:47:28,760 into the Python that this generates. 1000 00:47:29,360 --> 00:47:31,400 So in this case, I just go Real Time Graph 1001 00:47:31,400 --> 00:47:33,020 and the title is Fine Tuning 1002 00:47:33,020 --> 00:47:33,660 and I want to show it 1003 00:47:33,660 --> 00:47:34,160 and that's it. 1004 00:47:34,200 --> 00:47:36,320 I just call this block Graph 1005 00:47:36,320 --> 00:47:44,040 and then here I use this AnyCode 1006 00:47:44,040 --> 00:47:45,240 with this variable dependency. 1007 00:47:45,520 --> 00:47:46,920 So this code then gets fired 1008 00:47:46,920 --> 00:47:49,000 every time frequency shift changes. 1009 00:47:49,240 --> 00:47:51,060 And every time frequency shift changes 1010 00:47:51,060 --> 00:47:53,260 is when that probe is running 1011 00:47:53,260 --> 00:47:56,040 on that average value 1012 00:47:56,040 --> 00:47:58,680 that's used to compute the DC offset. 1013 00:47:59,040 --> 00:48:00,720 So what that does is it just goes 1014 00:48:00,720 --> 00:48:01,740 fine tune points 1015 00:48:01,740 --> 00:48:03,520 and then add the shift value 1016 00:48:03,520 --> 00:48:04,160 to that list 1017 00:48:04,160 --> 00:48:06,300 and then set the data of the graph. 1018 00:48:06,720 --> 00:48:08,360 I'm actually using a semicolon there 1019 00:48:08,360 --> 00:48:10,840 to do two lines of Python in one. 1020 00:48:11,540 --> 00:48:13,440 And that just automatically fires 1021 00:48:13,440 --> 00:48:14,400 every time we get a new point. 1022 00:48:14,540 --> 00:48:16,400 So what's cool is when you run it, 1023 00:48:16,480 --> 00:48:17,140 you get... 1024 00:48:17,140 --> 00:48:18,980 This is popping up on my screen here 1025 00:48:18,980 --> 00:48:19,820 so I'll just move it over. 1026 00:48:22,040 --> 00:48:23,440 So this is showing you 1027 00:48:23,440 --> 00:48:24,660 as the program is running 1028 00:48:25,420 --> 00:48:28,780 that the receiver is adjusting its fine tuning 1029 00:48:29,980 --> 00:48:31,900 of the incoming signal 1030 00:48:31,900 --> 00:48:33,420 and moving the baseband 1031 00:48:33,420 --> 00:48:34,740 and now it's actually locked 1032 00:48:34,740 --> 00:48:35,520 on the signal properly. 1033 00:48:35,660 --> 00:48:40,050 So that's about a 250 and a bit-ish 1034 00:48:40,540 --> 00:48:41,340 hertz offset 1035 00:48:43,120 --> 00:48:44,980 from where we clicked on this 1036 00:48:45,680 --> 00:48:48,160 to where it actually needs to be centered up. 1037 00:48:48,300 --> 00:48:49,540 So that's this offset 1038 00:48:49,540 --> 00:48:50,960 that's showing you in that graph. 1039 00:48:51,320 --> 00:48:54,240 So how does that actually work? 1040 00:48:54,340 --> 00:48:58,420 Well, it's really quite simple. 1041 00:48:58,640 --> 00:49:00,040 So let's have a look over here. 1042 00:49:00,820 --> 00:49:02,420 What I'm going to do is 1043 00:49:02,420 --> 00:49:06,440 instead of plotting the DC 1044 00:49:06,440 --> 00:49:11,380 coming out of the already corrected version... 1045 00:49:13,040 --> 00:49:13,800 Go away. 1046 00:49:15,440 --> 00:49:17,460 I'm going to plot it coming out of here 1047 00:49:20,520 --> 00:49:23,460 which is effectively the same 1048 00:49:23,460 --> 00:49:24,660 as if I did not rotate 1049 00:49:25,400 --> 00:49:27,220 and just use the output of that. 1050 00:49:28,420 --> 00:49:30,020 But this is what sort of 1051 00:49:30,040 --> 00:49:32,100 coming out actually. 1052 00:49:32,900 --> 00:49:33,940 What I'm going to do 1053 00:49:35,420 --> 00:49:36,980 is turn all that off. 1054 00:49:37,160 --> 00:49:39,980 So disable that. 1055 00:49:40,620 --> 00:49:41,440 Disable that. 1056 00:49:43,940 --> 00:49:44,980 Disable that. 1057 00:49:46,960 --> 00:49:54,260 And then I want that 1058 00:49:54,260 --> 00:49:55,880 and then I want that. 1059 00:49:58,560 --> 00:49:59,080 And... 1060 00:50:07,540 --> 00:50:09,080 Okay, so what we're going to do is 1061 00:50:09,080 --> 00:50:09,940 we're going to turn this 1062 00:50:10,560 --> 00:50:11,860 rotator off effectively by 1063 00:50:11,860 --> 00:50:13,860 multiplying frequency shift by zero. 1064 00:50:14,040 --> 00:50:16,160 So we never rotate this incoming spectrum. 1065 00:50:16,380 --> 00:50:18,580 This is just doing the averaging internally 1066 00:50:18,580 --> 00:50:20,360 but we get to see what the output looks like. 1067 00:50:20,560 --> 00:50:22,600 So remember before we had that green line around zero 1068 00:50:24,300 --> 00:50:27,780 and we had the blue moving between... 1069 00:50:33,180 --> 00:50:34,860 Is that the right output? 1070 00:50:36,700 --> 00:50:39,560 Average and filtered. 1071 00:50:42,960 --> 00:50:44,120 Let's do... 1072 00:50:46,560 --> 00:50:47,560 dmod... 1073 00:51:00,100 --> 00:51:00,920 Okay, there we go. 1074 00:51:01,140 --> 00:51:04,160 So what's interesting is this is the signal 1075 00:51:04,160 --> 00:51:05,260 before the filtering step 1076 00:51:05,260 --> 00:51:07,260 so it actually looks really noisy as you can see. 1077 00:51:07,460 --> 00:51:09,380 But as it turns out when you average it 1078 00:51:09,900 --> 00:51:12,760 when you take the long-term running average 1079 00:51:12,760 --> 00:51:14,000 of the filtered version of the signal 1080 00:51:14,000 --> 00:51:16,620 you see how the green is actually up here 1081 00:51:16,620 --> 00:51:17,920 instead of at zero? 1082 00:51:18,860 --> 00:51:20,720 That's because although 1083 00:51:21,860 --> 00:51:23,320 once you've actually done the 1084 00:51:23,320 --> 00:51:24,360 quadrature demodulation 1085 00:51:24,360 --> 00:51:26,720 although it's worked and it's done it 1086 00:51:26,720 --> 00:51:29,840 and it's still within our bandwidth here 1087 00:51:30,040 --> 00:51:33,400 you can see it's still within our bandwidth 1088 00:51:33,400 --> 00:51:34,320 it's just off center. 1089 00:51:34,600 --> 00:51:38,280 This effectively moves your one and zero 1090 00:51:38,280 --> 00:51:39,980 which would nominally be 1091 00:51:40,520 --> 00:51:42,740 here at negative 300 and positive 300 1092 00:51:42,740 --> 00:51:43,580 since we moved it 1093 00:51:43,580 --> 00:51:45,820 it actually adds a total offset 1094 00:51:45,820 --> 00:51:47,380 to your output signal 1095 00:51:48,260 --> 00:51:50,220 which is what the green line is. 1096 00:51:50,400 --> 00:51:52,360 So because we've moved it in frequency 1097 00:51:52,360 --> 00:51:54,520 now we've got this DC component 1098 00:51:54,520 --> 00:51:55,800 that's also moved with it 1099 00:51:55,800 --> 00:51:56,840 after that long-term averaging. 1100 00:51:57,080 --> 00:51:58,880 And what's nice is that we can probe 1101 00:51:58,880 --> 00:52:00,860 this value of this DC 1102 00:52:00,860 --> 00:52:03,060 and then convert that back 1103 00:52:03,060 --> 00:52:04,040 into the frequency offset. 1104 00:52:04,200 --> 00:52:06,000 I mean this is linearly proportional 1105 00:52:06,000 --> 00:52:06,960 to that frequency offset. 1106 00:52:07,140 --> 00:52:08,680 So that's why it's going to that probe 1107 00:52:08,680 --> 00:52:10,980 and then you can do that little calculation 1108 00:52:10,980 --> 00:52:14,040 and get that DC offset back to hertz. 1109 00:52:16,640 --> 00:52:18,300 So that's that 1110 00:52:18,300 --> 00:52:21,320 and it's just a super super easy way 1111 00:52:21,880 --> 00:52:23,740 to correct your frequency offset 1112 00:52:25,080 --> 00:52:27,180 but I just thought I'd take you through it 1113 00:52:27,180 --> 00:52:27,960 so you can sort of visualize 1114 00:52:27,960 --> 00:52:28,820 what's going on 1115 00:52:28,880 --> 00:52:31,360 and see how you can put that together. 1116 00:52:32,060 --> 00:52:33,140 And so that way 1117 00:52:33,140 --> 00:52:35,480 now we've got one, two, three, four, five 1118 00:52:36,080 --> 00:52:39,180 six, seven, eight, nine channels there. 1119 00:52:40,360 --> 00:52:42,620 What happens if you want to do them all at once? 1120 00:52:42,880 --> 00:52:43,860 We just picked one 1121 00:52:43,860 --> 00:52:45,080 let's do them all. 1122 00:52:45,660 --> 00:52:46,400 And again 1123 00:52:47,200 --> 00:52:49,180 I've got certain members of the audience 1124 00:52:49,180 --> 00:52:51,140 that probably have far better ways to do it 1125 00:52:51,140 --> 00:52:52,560 like with a polyphase channelizer 1126 00:52:52,560 --> 00:52:54,220 that's what all the cool kids are doing 1127 00:52:54,720 --> 00:52:57,060 but I wanted to use something 1128 00:52:57,060 --> 00:52:58,620 that didn't require too much 1129 00:52:59,760 --> 00:53:00,660 too much thought. 1130 00:53:00,940 --> 00:53:01,980 Let me just show you this 1131 00:53:01,980 --> 00:53:02,600 while it's still on the screen. 1132 00:53:02,940 --> 00:53:05,680 Oh, did you see how it sort of found it 1133 00:53:05,680 --> 00:53:07,240 and there was the sorts of bumps in it? 1134 00:53:07,880 --> 00:53:09,940 They're the sorts of frequency offsets 1135 00:53:09,940 --> 00:53:11,120 that you can sometimes encounter 1136 00:53:11,120 --> 00:53:12,940 larger than you might expect 1137 00:53:12,940 --> 00:53:14,800 and which is why you need to have this sort of 1138 00:53:14,800 --> 00:53:16,140 this setup 1139 00:53:16,140 --> 00:53:18,300 to do that fine frequency correction 1140 00:53:18,300 --> 00:53:18,840 because remember 1141 00:53:18,840 --> 00:53:23,000 our two symbol points are only 300 kilohertz 1142 00:53:23,000 --> 00:53:24,760 in this case 1143 00:53:24,760 --> 00:53:26,980 normalizes either side of the DC. 1144 00:53:27,200 --> 00:53:28,860 So if you have some massive frequency offset 1145 00:53:28,880 --> 00:53:29,560 frequency shift 1146 00:53:29,560 --> 00:53:31,020 that's even just temporary 1147 00:53:31,580 --> 00:53:33,160 it's going to end up corrupting your data 1148 00:53:33,160 --> 00:53:34,680 because you'll have all 1s or all 0s. 1149 00:53:35,940 --> 00:53:37,520 So let's do them all at once. 1150 00:53:38,080 --> 00:53:39,000 How to do that? 1151 00:53:39,120 --> 00:53:40,900 Well, a while back 1152 00:53:41,820 --> 00:53:44,600 I created this sort of multi-channel decoder idea 1153 00:53:44,600 --> 00:53:47,240 where you could specify the 1154 00:53:47,790 --> 00:53:50,120 the sort of singleton instance of a decoder 1155 00:53:50,120 --> 00:53:52,740 and then you would give that to the multi-channel decoder 1156 00:53:52,740 --> 00:53:55,800 and it would spin up that many versions of it 1157 00:53:55,800 --> 00:53:58,460 for each of the channels that you want to actually decode. 1158 00:53:58,880 --> 00:54:02,700 So this is rather a computationally expensive way to do it. 1159 00:54:03,060 --> 00:54:04,120 If you're going to do it 1160 00:54:04,120 --> 00:54:07,500 and I might go back and try using a polyphase channelizer approach 1161 00:54:07,500 --> 00:54:10,520 that's a computationally far less expensive way to do it. 1162 00:54:10,600 --> 00:54:12,020 That's right, Tom, right? 1163 00:54:12,100 --> 00:54:12,800 That's the way to do it. 1164 00:54:13,540 --> 00:54:16,540 But there are various assumptions and restrictions around that. 1165 00:54:18,580 --> 00:54:20,660 Yeah, not really. 1166 00:54:20,940 --> 00:54:24,100 Well, yeah, but I suppose 1167 00:54:24,720 --> 00:54:28,620 Yeah, but actually being able to 1168 00:54:28,620 --> 00:54:31,600 set programmatically how to combine them. 1169 00:54:32,100 --> 00:54:35,040 So, I mean, that would be the Python that I'd need to implement. 1170 00:54:35,460 --> 00:54:36,960 Yeah, you can do it, but it's just 1171 00:54:36,960 --> 00:54:37,360 Yeah. 1172 00:54:37,560 --> 00:54:39,280 the math is pretty tough to actually set those up 1173 00:54:39,280 --> 00:54:40,140 because the building blocks are there. 1174 00:54:40,280 --> 00:54:40,640 Yeah, yeah. 1175 00:54:40,720 --> 00:54:42,660 And it depends on which channel you actually want to pull down 1176 00:54:42,660 --> 00:54:44,180 whether or not it's going to bring you a point. 1177 00:54:44,220 --> 00:54:44,340 Yeah. 1178 00:54:45,140 --> 00:54:46,600 But that's the cool way to do it. 1179 00:54:46,620 --> 00:54:48,820 Actually, if you look online, Tom and others have 1180 00:54:48,820 --> 00:54:52,780 Tom Rondeau, by the way, is the former now maintainer 1181 00:54:52,780 --> 00:54:53,920 of the Gooner Radio project. 1182 00:54:54,140 --> 00:54:55,620 He spent many years really 1183 00:54:56,940 --> 00:54:58,320 really adding great documentation 1184 00:54:58,620 --> 00:55:02,280 and fixing up the framework and making it what it is today. 1185 00:55:02,420 --> 00:55:04,380 So, big props to Tom. 1186 00:55:06,480 --> 00:55:10,640 But in this case, just you can consider this approach as well. 1187 00:55:10,860 --> 00:55:13,760 So, what I've done here is I've created this sort of template. 1188 00:55:14,080 --> 00:55:16,960 And so, we would have our baseband coming in from our receiver. 1189 00:55:17,320 --> 00:55:20,180 We translate that to the frequency where our channel is. 1190 00:55:20,360 --> 00:55:23,020 And then we just plug it into our page channel decoder 1191 00:55:23,020 --> 00:55:25,740 as we had before in that single instance of it. 1192 00:55:25,820 --> 00:55:27,500 And then we just send the messages back out. 1193 00:55:27,500 --> 00:55:28,280 And that's all it is. 1194 00:55:28,360 --> 00:55:30,780 It's just move it to your channel and then decode it. 1195 00:55:33,560 --> 00:55:34,280 And then... 1196 00:55:45,140 --> 00:55:45,500 Yep. 1197 00:55:57,660 --> 00:56:02,060 AKA TNT has also done some pretty amazing Satcom style hacking 1198 00:56:02,060 --> 00:56:04,540 and some really advanced Gooner Radio stuff too. 1199 00:56:05,180 --> 00:56:06,620 So, definitely check out his work. 1200 00:56:08,340 --> 00:56:10,440 But once we've defined that template, 1201 00:56:15,520 --> 00:56:19,760 this is then all you need to decode all of the nine channels there. 1202 00:56:19,880 --> 00:56:22,700 So, I just have a list here that contains the frequency offsets 1203 00:56:23,100 --> 00:56:25,880 for all of the nine channels there. 1204 00:56:26,340 --> 00:56:31,820 And then here, you just connect the USURP source into the multi-channel decoder. 1205 00:56:32,080 --> 00:56:35,960 And we tell it that we want to use the InMarsat Aero P-channel decoder. 1206 00:56:36,120 --> 00:56:37,340 We give it a frequency list. 1207 00:56:38,600 --> 00:56:43,440 And then we hook the output port into the user message parser. 1208 00:56:43,880 --> 00:56:45,620 And so, what this will do is when you press play, 1209 00:56:45,820 --> 00:56:48,260 this will spin up nine versions of the decoder, 1210 00:56:48,400 --> 00:56:49,960 hook them up to each of those channels, 1211 00:56:50,100 --> 00:56:50,880 and then just let it run. 1212 00:56:51,940 --> 00:56:53,560 So, once we hit play then, 1213 00:56:53,560 --> 00:57:03,480 we get an error, naturally. 1214 00:57:07,740 --> 00:57:10,380 Apparently, something's still running. 1215 00:57:11,100 --> 00:57:13,680 Oh, no, that's old. 1216 00:57:15,940 --> 00:57:19,840 Hmm. Give me a second. 1217 00:57:21,800 --> 00:57:22,560 Okay. 1218 00:57:24,920 --> 00:57:25,360 What's that? 1219 00:57:29,840 --> 00:57:30,500 No, is it? 1220 00:57:32,180 --> 00:57:33,060 No, it was here before. 1221 00:57:34,880 --> 00:57:36,300 No, I'm seeing a trace back. 1222 00:57:43,960 --> 00:57:46,340 I was running this in one of these terminal windows. 1223 00:57:48,680 --> 00:57:49,160 Hmm. 1224 00:57:52,360 --> 00:57:53,580 I'll just try it here. 1225 00:57:54,340 --> 00:57:55,480 What is this saying? 1226 00:57:56,620 --> 00:57:57,100 . 1227 00:58:02,220 --> 00:58:02,700 Oh. 1228 00:58:03,960 --> 00:58:05,140 That was kind of obvious. 1229 00:58:06,420 --> 00:58:06,900 . 1230 00:58:08,900 --> 00:58:10,180 I haven't got a USURP. 1231 00:58:10,280 --> 00:58:10,380 Right. 1232 00:58:12,620 --> 00:58:15,300 So, actually, here's something I prepared earlier. 1233 00:58:15,300 --> 00:58:16,580 I've got that same recording. 1234 00:58:17,020 --> 00:58:17,960 It was off the screen, 1235 00:58:18,060 --> 00:58:19,500 which is why I didn't have the visual cue. 1236 00:58:19,820 --> 00:58:21,380 The reason why I have the USURP is because 1237 00:58:22,660 --> 00:58:24,440 this is what I want to show you with the internet, 1238 00:58:24,560 --> 00:58:26,100 but since we don't have it, 1239 00:58:26,140 --> 00:58:27,920 we might come back to that later if I can set it up, 1240 00:58:27,940 --> 00:58:28,720 but probably won't, 1241 00:58:28,720 --> 00:58:29,480 because I don't want to get hacked. 1242 00:58:31,480 --> 00:58:32,860 My friend Ian Buckley, 1243 00:58:32,960 --> 00:58:34,320 who set up the dish and everything, 1244 00:58:34,480 --> 00:58:36,940 he's actually got an Odroid, 1245 00:58:37,520 --> 00:58:40,860 which is a small embedded eight-core arm 1246 00:58:40,860 --> 00:58:42,840 with four big cores and four small cores, 1247 00:58:42,840 --> 00:58:46,700 in an enclosure next to that dish 1248 00:58:47,220 --> 00:58:48,700 plugged into a USRP, 1249 00:58:49,380 --> 00:58:50,240 which is hooked up. 1250 00:58:50,500 --> 00:58:52,720 So, that whole little thing sitting there 1251 00:58:52,720 --> 00:58:53,840 running all the time, 1252 00:58:53,940 --> 00:58:55,320 and it's running this, 1253 00:58:55,460 --> 00:58:58,080 and it's just streaming messages, 1254 00:58:58,140 --> 00:58:59,600 and I've had it log into a file, 1255 00:59:00,060 --> 00:59:03,360 and it's just been storing all sorts of stuff there 1256 00:59:03,360 --> 00:59:05,100 just to, you know, see what turns up. 1257 00:59:05,720 --> 00:59:07,200 But what's kind of nice is that 1258 00:59:07,200 --> 00:59:09,120 because of the low bit rate and so on, 1259 00:59:09,200 --> 00:59:10,920 it can actually do all the nine channels 1260 00:59:10,920 --> 00:59:12,820 even with this expensive non-USURP. 1261 00:59:12,840 --> 00:59:16,480 It's a non-polyphase approach on the embedded platform. 1262 00:59:16,740 --> 00:59:17,920 So, if we run that, 1263 00:59:19,000 --> 00:59:19,780 there we go. 1264 00:59:20,800 --> 00:59:23,800 So, you can see that it's saying that it's, 1265 00:59:23,800 --> 00:59:26,040 you know, created all the decoder instances 1266 00:59:26,040 --> 00:59:27,100 and all the different options. 1267 00:59:27,340 --> 00:59:29,440 Each of the decoders is now finding 1268 00:59:29,440 --> 00:59:31,040 the unique synchronization word, 1269 00:59:31,640 --> 00:59:35,300 and they're not printing out the generic messages. 1270 00:59:35,480 --> 00:59:38,020 They're just accumulating user messages. 1271 00:59:38,320 --> 00:59:40,120 And so, you can see... 1272 00:59:40,120 --> 00:59:42,120 You plug this into a USRP. 1273 00:59:42,840 --> 00:59:42,940 Oh, thanks. 1274 00:59:43,120 --> 00:59:46,380 Well, we very kindly had a USURP brought up. 1275 00:59:49,520 --> 00:59:50,300 That's great, too. 1276 00:59:50,660 --> 00:59:52,400 The only thing we're missing is a dish 1277 00:59:52,400 --> 00:59:54,400 with a circularly polarized antenna 1278 00:59:54,400 --> 00:59:55,980 feeding an LNA in a bandpass filter, 1279 00:59:56,580 --> 00:59:58,360 which is why I wanted to log into the box. 1280 00:59:59,460 --> 01:00:00,060 Oh, yeah? 1281 01:00:00,640 --> 01:00:01,460 We can make one? 1282 01:00:02,320 --> 01:00:04,240 You've got, I don't know, what, 40 minutes? 1283 01:00:04,600 --> 01:00:06,040 Turn that chandelier into a dish. 1284 01:00:06,280 --> 01:00:09,360 But we still need an LNA and a filter. 1285 01:00:09,520 --> 01:00:10,500 But thank you very much. 1286 01:00:12,840 --> 01:00:15,380 Thank you very much. 1287 01:00:15,380 --> 01:00:16,200 So,こと is... 1288 01:00:19,160 --> 01:00:20,260 That's come and gone. 1289 01:00:20,660 --> 01:00:22,600 So, this recording is really short, 1290 01:00:22,660 --> 01:00:24,580 so actually we don't get a lot of stuff out of that. 1291 01:00:24,880 --> 01:00:26,980 But, you know, it's just, I guess 1292 01:00:26,980 --> 01:00:29,800 my goal here was just to do a really clean 1293 01:00:29,800 --> 01:00:31,920 try to do a cleaner implementation of it. 1294 01:00:33,180 --> 01:00:33,900 And so... 1295 01:00:35,340 --> 01:00:37,240 Yeah, I'll put all that up on my GitHub 1296 01:00:37,240 --> 01:00:39,140 and then people can play with it. 1297 01:00:39,820 --> 01:00:41,500 And then, you know, if anybody wants to look at 1298 01:00:41,500 --> 01:00:43,660 using the P channel and synchronizing to it 1299 01:00:43,660 --> 01:00:45,240 and you can go up the layers 1300 01:00:45,240 --> 01:00:46,600 and look at the rest of it 1301 01:00:46,600 --> 01:00:47,320 and maybe get to voice. 1302 01:00:47,980 --> 01:00:49,120 But that's for another day. 1303 01:00:49,220 --> 01:00:51,140 So any questions on this InMarsat stuff 1304 01:00:51,140 --> 01:00:52,660 before I move on to the next topic? 1305 01:00:53,460 --> 01:00:55,000 So when you're logging all that data, 1306 01:00:55,240 --> 01:00:57,160 do you have any idea 1307 01:00:57,160 --> 01:00:59,120 of what you might be able to find in there 1308 01:00:59,120 --> 01:01:01,260 or what long-term patterns might emerge? 1309 01:01:01,500 --> 01:01:02,840 Yeah, so a lot of them 1310 01:01:02,840 --> 01:01:05,480 usually have the rego of the aircraft. 1311 01:01:05,860 --> 01:01:07,100 So you can actually look at 1312 01:01:07,100 --> 01:01:08,820 how often and where they pop up. 1313 01:01:08,820 --> 01:01:11,660 You can also then infer... 1314 01:01:12,220 --> 01:01:13,420 I've seen messages... 1315 01:01:14,500 --> 01:01:15,900 Maybe I can connect to it at the end. 1316 01:01:15,980 --> 01:01:18,180 Maybe I still have part of the log open 1317 01:01:18,180 --> 01:01:19,060 in my console. 1318 01:01:20,540 --> 01:01:21,700 Oh, here it is. 1319 01:01:28,340 --> 01:01:29,660 It was running in screen. 1320 01:01:32,740 --> 01:01:34,640 But again, you get messages 1321 01:01:34,640 --> 01:01:35,720 that contain waypoints 1322 01:01:35,720 --> 01:01:37,120 so that you can derive flight paths. 1323 01:01:37,700 --> 01:01:38,800 When you have the waypoints, 1324 01:01:38,820 --> 01:01:39,140 you get the rego 1325 01:01:39,140 --> 01:01:40,920 and it gives them information 1326 01:01:40,920 --> 01:01:44,620 about weather and airport state. 1327 01:01:44,720 --> 01:01:45,540 Then you can determine 1328 01:01:45,540 --> 01:01:46,620 where they're actually flying to. 1329 01:01:46,960 --> 01:01:48,340 And there are all the weird 1330 01:01:48,340 --> 01:01:49,360 sort of human-readable messages 1331 01:01:49,360 --> 01:01:51,180 that you wouldn't expect to see 1332 01:01:51,180 --> 01:01:52,700 that identify people 1333 01:01:52,700 --> 01:01:54,860 or interesting factoids 1334 01:01:54,860 --> 01:01:56,020 about the aircraft or whatever. 1335 01:01:56,640 --> 01:01:59,620 So it's just kind of another tool 1336 01:01:59,620 --> 01:02:01,700 in the plane spotter's arsenal. 1337 01:02:02,780 --> 01:02:03,700 But it's just cool 1338 01:02:03,700 --> 01:02:04,840 because usually you get them 1339 01:02:04,840 --> 01:02:05,640 from a terrestrial network. 1340 01:02:05,760 --> 01:02:06,260 In this case, 1341 01:02:06,760 --> 01:02:07,800 you're getting them from a satellite 1342 01:02:07,800 --> 01:02:08,720 which is actually servicing 1343 01:02:08,720 --> 01:02:09,760 a huge portion of the Earth. 1344 01:02:09,880 --> 01:02:11,560 So you're hearing any aircraft 1345 01:02:12,180 --> 01:02:13,780 in that area potentially. 1346 01:02:14,860 --> 01:02:16,680 So this is super simple 1347 01:02:16,680 --> 01:02:17,800 compared to some of the other stuff 1348 01:02:17,800 --> 01:02:20,900 like Sec came to Cyberspectrum last night. 1349 01:02:22,240 --> 01:02:23,680 Oh, there he is up the back 1350 01:02:23,680 --> 01:02:25,200 with the cool radio badge. 1351 01:02:25,840 --> 01:02:28,380 But he's done some absolutely incredible work 1352 01:02:28,380 --> 01:02:30,760 with the Iridium constellation 1353 01:02:34,060 --> 01:02:36,620 with Schneider and some other guys. 1354 01:02:37,180 --> 01:02:38,520 So definitely check out 1355 01:02:38,520 --> 01:02:41,380 their talk from the most recent HOPE conference. 1356 01:02:42,420 --> 01:02:44,580 Really, really stunning stuff, 1357 01:02:44,760 --> 01:02:45,920 like way beyond this. 1358 01:02:46,100 --> 01:02:47,700 But I guess I just wanted to show you 1359 01:02:47,700 --> 01:02:50,660 how you can sort of easily get into SATCOM 1360 01:02:50,660 --> 01:02:52,380 using this kind of technology. 1361 01:02:54,420 --> 01:02:56,220 So what else have I got for you today? 1362 01:02:57,480 --> 01:03:00,060 Oh, we had the RasterSync 2. 1363 01:03:00,360 --> 01:03:01,260 This is just, 1364 01:03:02,980 --> 01:03:04,320 this was that little tool 1365 01:03:04,320 --> 01:03:07,680 that I was telling you 1366 01:03:07,680 --> 01:03:08,220 that you could use 1367 01:03:08,220 --> 01:03:11,700 to actually visualize the data, the plots. 1368 01:03:11,920 --> 01:03:14,120 So here, it's just a UDP socket 1369 01:03:14,120 --> 01:03:15,900 hooked up to the Time RasterSync. 1370 01:03:15,980 --> 01:03:16,720 That's all it is. 1371 01:03:16,780 --> 01:03:17,620 Really basic. 1372 01:03:17,820 --> 01:03:18,920 But it's a very powerful tool 1373 01:03:18,920 --> 01:03:20,880 to enable you to look at the bit patterns. 1374 01:03:21,220 --> 01:03:22,340 So if I run this, 1375 01:03:31,480 --> 01:03:32,360 maybe not that. 1376 01:03:32,580 --> 01:03:33,020 Maybe, 1377 01:03:34,320 --> 01:03:34,760 maybe, 1378 01:03:37,760 --> 01:03:38,200 maybe, 1379 01:03:38,900 --> 01:03:39,420 maybe, 1380 01:03:40,300 --> 01:03:40,320 maybe, 1381 01:03:40,320 --> 01:03:40,960 maybe, 1382 01:03:40,960 --> 01:03:41,960 maybe, 1383 01:03:41,960 --> 01:03:42,860 maybe, 1384 01:03:42,860 --> 01:03:42,900 maybe. 1385 01:03:43,300 --> 01:03:44,400 So that's running. 1386 01:03:44,640 --> 01:03:45,640 Do we have a signal? 1387 01:03:49,020 --> 01:03:49,540 Yup. 1388 01:03:49,920 --> 01:03:52,580 And then once we start spitting out data packets, 1389 01:03:56,920 --> 01:03:57,440 there. 1390 01:03:57,620 --> 01:03:59,900 You can see that as it's actually decoding 1391 01:04:00,660 --> 01:04:03,040 an entire payload's worth, 1392 01:04:04,600 --> 01:04:07,380 you get this data coming out. 1393 01:04:07,420 --> 01:04:07,860 Now this is, 1394 01:04:08,220 --> 01:04:11,360 showing you the bits post de-scrambling. 1395 01:04:14,140 --> 01:04:15,480 So this is sort of the, 1396 01:04:15,560 --> 01:04:18,400 looking for repeating patterns with the actual raw data. 1397 01:04:18,720 --> 01:04:20,380 The data on the, 1398 01:04:20,460 --> 01:04:21,120 over the air, 1399 01:04:21,680 --> 01:04:22,220 you know, 1400 01:04:22,240 --> 01:04:23,880 you could equally just hook up your, 1401 01:04:26,840 --> 01:04:29,040 your UDP sync. 1402 01:04:32,240 --> 01:04:32,960 Where is it? 1403 01:04:34,020 --> 01:04:35,480 UDP sync, where are you? 1404 01:04:35,540 --> 01:04:35,940 Here. 1405 01:04:36,220 --> 01:04:37,800 So this is just looking at the output of messages. 1406 01:04:37,800 --> 01:04:39,080 You could easily just take, 1407 01:04:39,720 --> 01:04:40,320 you know, 1408 01:04:40,340 --> 01:04:41,960 this new chart of float. 1409 01:04:42,280 --> 01:04:42,920 And then, 1410 01:04:43,000 --> 01:04:44,580 or just take the floating point, 1411 01:04:45,240 --> 01:04:46,540 output of say the, 1412 01:04:46,580 --> 01:04:47,720 the demod or, 1413 01:04:47,820 --> 01:04:48,300 or, 1414 01:04:48,380 --> 01:04:49,900 yeah, the demod. 1415 01:04:50,020 --> 01:04:53,200 And then we can actually see what that looks like. 1416 01:04:55,180 --> 01:04:59,940 So this is before any of the decoding has actually happened. 1417 01:05:05,340 --> 01:05:06,440 See what that looks like. 1418 01:05:13,220 --> 01:05:13,800 Where's my, 1419 01:05:16,260 --> 01:05:17,220 did I close it? 1420 01:05:26,600 --> 01:05:27,220 So again, 1421 01:05:27,320 --> 01:05:28,140 that's looking at the raw, 1422 01:05:30,400 --> 01:05:31,220 demodulated symbols. 1423 01:05:31,820 --> 01:05:34,040 And I probably hooked it at the wrong thing, 1424 01:05:34,100 --> 01:05:35,500 because that looks like noise. 1425 01:05:38,060 --> 01:05:38,820 It's purty. 1426 01:05:39,820 --> 01:05:40,740 It is purty. 1427 01:05:41,280 --> 01:05:42,080 Demod, filtered. 1428 01:05:46,100 --> 01:05:46,500 Oh, 1429 01:05:46,620 --> 01:05:47,060 SIMS. 1430 01:05:47,060 --> 01:05:48,000 I meant to hook it up to SIMS. 1431 01:05:48,000 --> 01:05:48,560 I beg your pardon. 1432 01:05:48,740 --> 01:05:50,420 The symbols coming out of the clock recovery. 1433 01:05:50,660 --> 01:05:53,500 So let's try that like this. 1434 01:05:57,220 --> 01:05:57,980 Oh, what's wrong? 1435 01:05:58,420 --> 01:05:59,460 Port is not connected. 1436 01:05:59,640 --> 01:06:00,460 Which port is not connected? 1437 01:06:06,180 --> 01:06:06,780 Scope sync. 1438 01:06:09,680 --> 01:06:10,600 What have I done? 1439 01:06:14,000 --> 01:06:15,960 Oh, this is no longer connected. 1440 01:06:16,060 --> 01:06:17,500 This was connected to this. 1441 01:06:21,400 --> 01:06:21,920 Okay. 1442 01:06:23,460 --> 01:06:23,980 Yeah. 1443 01:06:27,840 --> 01:06:28,360 Um. 1444 01:06:31,460 --> 01:06:32,760 Oh, no. 1445 01:06:32,820 --> 01:06:33,300 That's the other monitor. 1446 01:06:33,440 --> 01:06:34,020 A little bit. 1447 01:06:34,120 --> 01:06:34,580 Okay. 1448 01:06:35,080 --> 01:06:35,600 So, 1449 01:06:36,420 --> 01:06:37,260 so, 1450 01:06:37,260 --> 01:06:37,320 so, 1451 01:07:10,060 --> 01:07:10,940 I thought it was 1200. 1452 01:07:11,900 --> 01:07:12,360 No, no. 1453 01:07:12,400 --> 01:07:13,540 It was 152. 1454 01:07:14,860 --> 01:07:15,520 I can't remember. 1455 01:07:15,640 --> 01:07:16,400 It's one of those. 1456 01:07:16,500 --> 01:07:17,260 But in one of them, 1457 01:07:17,300 --> 01:07:19,140 you get exactly that plot that I showed you in the, 1458 01:07:19,140 --> 01:07:20,320 in the presentation before. 1459 01:07:22,140 --> 01:07:22,780 So again, 1460 01:07:22,860 --> 01:07:23,700 that's going there. 1461 01:07:23,760 --> 01:07:25,120 You can see that it's, 1462 01:07:25,120 --> 01:07:25,440 you know, 1463 01:07:25,440 --> 01:07:27,160 making these subtle adjustments every so often. 1464 01:07:31,340 --> 01:07:32,000 So, yeah. 1465 01:07:32,600 --> 01:07:32,960 Another, 1466 01:07:33,060 --> 01:07:35,120 another cool little trick you can do to visualize stuff. 1467 01:07:35,840 --> 01:07:36,320 All right. 1468 01:07:37,400 --> 01:07:37,500 Let's, 1469 01:07:37,540 --> 01:07:38,020 in my set. 1470 01:07:46,340 --> 01:07:46,760 Let's, 1471 01:07:46,760 --> 01:07:47,020 um. 1472 01:07:52,480 --> 01:07:52,900 Yeah. 1473 01:07:52,940 --> 01:07:54,200 There's some stuff I want to show you remotely, 1474 01:07:54,320 --> 01:07:55,120 but we might, 1475 01:07:55,160 --> 01:07:56,300 might leave that for another time. 1476 01:07:58,180 --> 01:07:58,600 Uh. 1477 01:08:01,760 --> 01:08:02,180 Okay. 1478 01:08:02,760 --> 01:08:03,180 Um. 1479 01:08:03,400 --> 01:08:03,820 So, 1480 01:08:03,860 --> 01:08:04,060 I'm, 1481 01:08:04,060 --> 01:08:04,300 I'll, 1482 01:08:04,300 --> 01:08:05,140 I'll do a, 1483 01:08:05,160 --> 01:08:05,780 a quick little, 1484 01:08:06,640 --> 01:08:07,220 sort of, 1485 01:08:07,400 --> 01:08:07,500 fun, 1486 01:08:07,500 --> 01:08:08,300 fun tidbit. 1487 01:08:08,560 --> 01:08:09,320 And then, 1488 01:08:09,360 --> 01:08:09,520 um, 1489 01:08:09,760 --> 01:08:10,240 we'll, 1490 01:08:10,240 --> 01:08:12,980 we'll look at some analog NTSC video decoding. 1491 01:08:13,800 --> 01:08:14,280 Um. 1492 01:08:14,820 --> 01:08:15,640 One thing, 1493 01:08:15,740 --> 01:08:17,280 I wanted to have more of it done for today. 1494 01:08:17,640 --> 01:08:18,120 Unfortunately, 1495 01:08:19,040 --> 01:08:19,520 uh, 1496 01:08:19,680 --> 01:08:21,560 it actually turned out to be a lot harder than I, 1497 01:08:22,960 --> 01:08:24,380 I thought it would be. 1498 01:08:24,800 --> 01:08:25,280 Um. 1499 01:08:25,440 --> 01:08:29,460 But there are some old signals that are still used and, 1500 01:08:29,460 --> 01:08:30,020 um, 1501 01:08:30,180 --> 01:08:31,760 are really quite, 1502 01:08:33,420 --> 01:08:34,380 quite neat. 1503 01:08:34,540 --> 01:08:34,940 And, 1504 01:08:34,940 --> 01:08:35,060 and, 1505 01:08:35,380 --> 01:08:35,540 um, 1506 01:08:37,180 --> 01:08:37,620 cool. 1507 01:08:37,880 --> 01:08:38,620 One of them is, 1508 01:08:38,680 --> 01:08:39,040 um, 1509 01:08:44,920 --> 01:08:45,800 frequency modulated, 1510 01:08:45,800 --> 01:08:46,300 um, 1511 01:08:47,060 --> 01:08:48,440 continuous wave radar. 1512 01:08:49,200 --> 01:08:51,420 Just trying to find where I put it. 1513 01:08:54,980 --> 01:08:55,420 Um. 1514 01:08:56,080 --> 01:08:56,520 Anyway, 1515 01:08:56,580 --> 01:08:58,000 I'll show you a quick demo, 1516 01:09:00,120 --> 01:09:01,360 with what you can do with it. 1517 01:09:01,440 --> 01:09:01,500 So, 1518 01:09:01,580 --> 01:09:02,540 in this case, 1519 01:09:03,020 --> 01:09:03,460 uh, 1520 01:09:03,620 --> 01:09:04,000 in a, 1521 01:09:04,040 --> 01:09:04,920 a lot of radar systems, 1522 01:09:04,920 --> 01:09:05,980 what happens is, 1523 01:09:06,040 --> 01:09:06,660 um, 1524 01:09:06,880 --> 01:09:08,560 and I've spoken about this before, 1525 01:09:08,720 --> 01:09:09,340 is that you have, 1526 01:09:09,380 --> 01:09:10,160 like at the airports, 1527 01:09:10,360 --> 01:09:11,660 you have the large spinning radar, 1528 01:09:11,780 --> 01:09:13,660 and that sends out a very powerful pulse of energy, 1529 01:09:13,840 --> 01:09:17,800 and then it waits for echoes to reflect off and come back from, 1530 01:09:17,860 --> 01:09:18,240 say, 1531 01:09:18,360 --> 01:09:20,360 the fuselages of airplanes flying through the sky, 1532 01:09:20,580 --> 01:09:24,640 and other objects that will present themselves as a significant radar cross section. 1533 01:09:24,880 --> 01:09:26,040 They have that huge antenna, 1534 01:09:26,300 --> 01:09:27,320 because it's directional, 1535 01:09:27,420 --> 01:09:28,900 and thus you get quite a lot of gain, 1536 01:09:29,120 --> 01:09:29,740 uh, 1537 01:09:29,900 --> 01:09:32,320 so that you can receive that very weak signal as it, 1538 01:09:32,340 --> 01:09:33,240 as it bounces back. 1539 01:09:33,680 --> 01:09:34,120 Uh, 1540 01:09:34,120 --> 01:09:35,140 in that particular case, 1541 01:09:35,940 --> 01:09:38,960 they're basically just sending out a very powerful, 1542 01:09:39,060 --> 01:09:39,640 quick, 1543 01:09:39,820 --> 01:09:40,360 uh, 1544 01:09:40,560 --> 01:09:42,480 pulse of energy at a single frequency. 1545 01:09:42,860 --> 01:09:45,580 But then there's another radar system called FMCW, 1546 01:09:45,720 --> 01:09:46,400 where, 1547 01:09:46,540 --> 01:09:48,320 instead of just sending out a one frequency, 1548 01:09:48,620 --> 01:09:49,500 you can actually, 1549 01:09:50,340 --> 01:09:50,760 linearly, 1550 01:09:50,940 --> 01:09:51,320 or, 1551 01:09:51,320 --> 01:09:52,200 or otherwise, 1552 01:09:52,880 --> 01:09:55,800 increase the frequency from a low point to a high point, 1553 01:09:55,940 --> 01:09:56,760 and then jump back. 1554 01:09:56,880 --> 01:09:58,180 So it ends up being a sawtooth, 1555 01:09:58,600 --> 01:10:00,480 and then you generate what's called a chirp. 1556 01:10:00,720 --> 01:10:03,120 So this chirp goes from a low frequency to a high frequency, 1557 01:10:03,300 --> 01:10:04,100 and then just keeps running, 1558 01:10:04,120 --> 01:10:04,320 just repeating. 1559 01:10:04,620 --> 01:10:07,840 And that actually has some very powerful properties that you can exploit, 1560 01:10:07,980 --> 01:10:10,080 to very effectively create a radar system. 1561 01:10:10,380 --> 01:10:10,740 Uh, 1562 01:10:10,840 --> 01:10:13,040 and this is used in all sorts of different environments. 1563 01:10:14,040 --> 01:10:14,460 Um, 1564 01:10:14,680 --> 01:10:15,720 but the nice thing is that, 1565 01:10:16,240 --> 01:10:16,660 firstly, 1566 01:10:16,940 --> 01:10:18,220 because you're effectively, 1567 01:10:18,440 --> 01:10:19,820 when you're decoding and demodulating it, 1568 01:10:19,900 --> 01:10:21,640 that chirp is unique, 1569 01:10:21,760 --> 01:10:22,520 and so you're effectively, 1570 01:10:22,620 --> 01:10:24,120 you're creating a match filter for it, 1571 01:10:24,200 --> 01:10:25,700 so other noise will then disappear. 1572 01:10:26,180 --> 01:10:26,920 And also, 1573 01:10:27,020 --> 01:10:29,220 when you run the FFT of that, 1574 01:10:29,360 --> 01:10:31,360 the frequency shift that you get, 1575 01:10:32,120 --> 01:10:32,540 uh, 1576 01:10:32,700 --> 01:10:33,560 is actually, 1577 01:10:33,560 --> 01:10:37,500 your range information for your targets. 1578 01:10:37,720 --> 01:10:38,020 So, 1579 01:10:38,080 --> 01:10:38,960 when you do that convolution, 1580 01:10:39,260 --> 01:10:41,780 you actually go from the frequency domain into the time domain. 1581 01:10:41,940 --> 01:10:43,160 It's really pretty powerful. 1582 01:10:43,380 --> 01:10:43,820 But, 1583 01:10:43,920 --> 01:10:45,660 you can do something like this. 1584 01:10:51,560 --> 01:10:52,000 So, 1585 01:10:52,940 --> 01:10:53,380 um, 1586 01:10:54,520 --> 01:10:56,820 a little bit too big for the projector. 1587 01:10:58,020 --> 01:10:58,740 So this is, 1588 01:10:58,760 --> 01:10:59,220 this is running, 1589 01:10:59,860 --> 01:11:01,380 and we're all about SDR, 1590 01:11:01,520 --> 01:11:03,000 but you don't even need an SDR 1591 01:11:03,000 --> 01:11:04,880 to actually play with this. 1592 01:11:05,380 --> 01:11:07,260 You can see that there's some stuff happening there, 1593 01:11:08,440 --> 01:11:11,060 and I've muted the speakers on my laptop, 1594 01:11:11,160 --> 01:11:11,940 but I'm gonna unmute them. 1595 01:11:12,140 --> 01:11:13,700 Can somebody give me a piece of paper? 1596 01:11:13,840 --> 01:11:14,180 Just like, 1597 01:11:14,580 --> 01:11:15,780 does anybody have a piece of paper? 1598 01:11:17,520 --> 01:11:18,360 Maybe I've got one. 1599 01:11:19,040 --> 01:11:19,900 I'll just use my lap, 1600 01:11:19,980 --> 01:11:20,600 oh, the laptop's alright. 1601 01:11:21,680 --> 01:11:21,820 Um, 1602 01:11:22,740 --> 01:11:23,100 check, 1603 01:11:23,240 --> 01:11:23,400 check, 1604 01:11:23,440 --> 01:11:24,500 I've got another two in there. 1605 01:11:25,140 --> 01:11:25,500 Alright, 1606 01:11:25,620 --> 01:11:26,200 have a look at this. 1607 01:11:30,720 --> 01:11:31,500 Let's get a good, 1608 01:11:31,500 --> 01:11:32,560 good setting here. 1609 01:11:33,620 --> 01:11:34,520 That should be pretty good. 1610 01:11:34,700 --> 01:11:35,640 Unfortunately, you can't see the, 1611 01:11:35,640 --> 01:11:36,160 the bottom, 1612 01:11:36,280 --> 01:11:37,080 but you'll, 1613 01:11:37,080 --> 01:11:37,700 you'll get the effect. 1614 01:11:45,280 --> 01:11:45,920 This is good. 1615 01:11:58,560 --> 01:11:59,660 Install Gen 2. 1616 01:12:07,560 --> 01:12:08,380 The range, 1617 01:12:08,560 --> 01:12:08,900 you know, 1618 01:12:08,960 --> 01:12:09,240 it's not, 1619 01:12:09,240 --> 01:12:09,700 it's not that, 1620 01:12:10,760 --> 01:12:11,920 it's not that fantastic. 1621 01:12:12,480 --> 01:12:12,960 But, 1622 01:12:13,040 --> 01:12:13,380 anyway, 1623 01:12:13,400 --> 01:12:13,900 you get the idea. 1624 01:12:14,040 --> 01:12:14,380 So, 1625 01:12:14,400 --> 01:12:15,340 what's actually going on here, 1626 01:12:17,320 --> 01:12:21,460 this is a flow graph that generates an FMCW chirp, 1627 01:12:21,460 --> 01:12:24,280 and then plays it through the speakers on the laptop, 1628 01:12:24,540 --> 01:12:27,000 but then it's simultaneously listening on the microphone, 1629 01:12:28,460 --> 01:12:31,020 and it's doing a transformation then, 1630 01:12:31,020 --> 01:12:31,540 I mean, 1631 01:12:31,560 --> 01:12:33,080 this is effectively an FFT here, 1632 01:12:33,220 --> 01:12:36,260 it's doing a transformation that looks for that pulse, 1633 01:12:36,460 --> 01:12:37,700 and then plots it out. 1634 01:12:37,780 --> 01:12:38,400 And the reason why, 1635 01:12:39,080 --> 01:12:42,020 as I change this distance between the, 1636 01:12:42,020 --> 01:12:44,740 the laptop speakers and the microphone effectively, 1637 01:12:45,220 --> 01:12:45,700 uh, 1638 01:12:45,900 --> 01:12:51,540 you're changing the time delay for that chirp to bounce off another surface and come back. 1639 01:12:52,020 --> 01:12:52,620 And, 1640 01:12:52,820 --> 01:12:53,480 because that, 1641 01:12:54,440 --> 01:12:55,040 uh, 1642 01:12:56,000 --> 01:12:57,380 can go through that convolution, 1643 01:12:57,740 --> 01:12:59,160 this is an FFT plot, 1644 01:12:59,380 --> 01:13:00,220 but, 1645 01:13:00,220 --> 01:13:05,340 the bin that it falls into is actually directly related to the range information or the, 1646 01:13:05,380 --> 01:13:09,160 the propagation of that chirp from one point to another one. 1647 01:13:09,780 --> 01:13:10,180 And, 1648 01:13:10,180 --> 01:13:10,360 um, 1649 01:13:10,640 --> 01:13:11,060 you know, 1650 01:13:11,060 --> 01:13:13,160 these signals that the microphone's picking up are quite noisy, 1651 01:13:13,200 --> 01:13:14,240 so you get this kind of stuff, 1652 01:13:14,700 --> 01:13:15,100 but, 1653 01:13:15,120 --> 01:13:15,420 um, 1654 01:13:15,460 --> 01:13:18,800 in other sort of systems you can actually process and filter that out pretty effectively. 1655 01:13:19,440 --> 01:13:19,840 Um, 1656 01:13:20,040 --> 01:13:20,540 so, 1657 01:13:20,600 --> 01:13:21,240 one other thing, 1658 01:13:22,220 --> 01:13:23,940 is that this doesn't work very well because, 1659 01:13:24,000 --> 01:13:24,240 again, 1660 01:13:24,280 --> 01:13:25,240 this is just hardware, 1661 01:13:25,240 --> 01:13:27,180 hardware speakers and a microphone. 1662 01:13:28,540 --> 01:13:28,940 But, 1663 01:13:28,940 --> 01:13:32,800 if you listen carefully, 1664 01:13:36,260 --> 01:13:39,540 there are two speakers in this laptop, 1665 01:13:39,800 --> 01:13:39,980 right? 1666 01:13:40,720 --> 01:13:48,420 Which means we can create a phased array and try to get angle information out of the target space above the laptop. 1667 01:13:49,000 --> 01:13:49,460 So, 1668 01:13:49,500 --> 01:13:50,760 what happens is if you listen, 1669 01:13:51,000 --> 01:13:52,300 hopefully you'll be able to hear it, 1670 01:13:52,320 --> 01:13:53,980 but it sounds pretty uniform right now. 1671 01:13:54,140 --> 01:13:54,580 So, 1672 01:13:54,580 --> 01:13:56,220 what I'm going to do is I'm going to click this button here, 1673 01:13:56,850 --> 01:13:57,940 and then it's going to phase, 1674 01:13:58,700 --> 01:14:01,060 from the left channel through the right channel. 1675 01:14:01,120 --> 01:14:01,200 So, 1676 01:14:01,220 --> 01:14:01,940 it's basically going to sweep. 1677 01:14:02,180 --> 01:14:07,140 And what that's doing is it's changing the delay between the two wave fronts that come out of the laptop. 1678 01:14:07,640 --> 01:14:08,000 So, 1679 01:14:08,060 --> 01:14:09,700 when you modify them, 1680 01:14:09,740 --> 01:14:10,580 when they come out at the same time, 1681 01:14:10,640 --> 01:14:11,280 it'll go directly up. 1682 01:14:11,400 --> 01:14:11,740 But, 1683 01:14:11,800 --> 01:14:12,620 when you offset one, 1684 01:14:13,380 --> 01:14:15,360 for one to come out a little bit sooner than the other one, 1685 01:14:15,520 --> 01:14:18,280 you're basically going to add them together as the wave fronts propagate, 1686 01:14:18,660 --> 01:14:21,400 and then beam form it in one particular direction. 1687 01:14:21,760 --> 01:14:24,100 And that will then sweep through. 1688 01:14:24,280 --> 01:14:24,400 So, 1689 01:14:24,480 --> 01:14:25,820 you basically change that, 1690 01:14:25,820 --> 01:14:27,080 that delay there. 1691 01:14:27,220 --> 01:14:27,560 And, 1692 01:14:27,600 --> 01:14:27,720 so, 1693 01:14:27,760 --> 01:14:27,920 you can see, 1694 01:14:27,940 --> 01:14:29,860 you effectively get a wave front that propagates, 1695 01:14:29,880 --> 01:14:30,640 basically, 1696 01:14:30,660 --> 01:14:30,900 like, 1697 01:14:30,960 --> 01:14:31,440 like this. 1698 01:14:32,540 --> 01:14:32,940 And, 1699 01:14:33,340 --> 01:14:33,740 again, 1700 01:14:33,800 --> 01:14:34,900 it doesn't work very well because, 1701 01:14:35,700 --> 01:14:36,220 you know, 1702 01:14:36,260 --> 01:14:38,620 you've got your microphone inside your laptop, 1703 01:14:38,700 --> 01:14:39,600 right next to the speakers. 1704 01:14:40,400 --> 01:14:40,800 But, 1705 01:14:40,860 --> 01:14:41,060 so, 1706 01:14:41,100 --> 01:14:41,420 have a listen. 1707 01:14:41,560 --> 01:14:42,640 You might be able to hear what's going on, 1708 01:14:42,700 --> 01:14:43,620 with the stereo effect. 1709 01:14:47,980 --> 01:14:48,700 Can you hear that? 1710 01:14:49,100 --> 01:14:49,500 Yes. 1711 01:14:51,040 --> 01:14:51,440 So, 1712 01:14:55,240 --> 01:14:56,500 what that's doing is, 1713 01:14:56,520 --> 01:14:57,860 it's processing the FFT, 1714 01:14:57,940 --> 01:15:01,640 and then I've fixed the rate at which it's doing this beam forming, 1715 01:15:01,820 --> 01:15:07,760 and every time it actually runs one transform, 1716 01:15:07,900 --> 01:15:09,260 that builds up one scan line, 1717 01:15:09,440 --> 01:15:12,440 and then for each of those beam formed angles, 1718 01:15:12,620 --> 01:15:13,760 it produces, 1719 01:15:13,780 --> 01:15:14,420 you know, 1720 01:15:14,440 --> 01:15:16,440 each stack scan line. 1721 01:15:16,560 --> 01:15:16,660 So, 1722 01:15:16,740 --> 01:15:20,360 one of these pictures is supposed to be a full run through the, 1723 01:15:20,360 --> 01:15:23,840 through the beam forming range. 1724 01:15:24,200 --> 01:15:24,640 So, 1725 01:15:24,700 --> 01:15:24,920 I mean, 1726 01:15:24,940 --> 01:15:25,840 the idea is that if you were to, 1727 01:15:25,900 --> 01:15:26,180 you know, 1728 01:15:30,260 --> 01:15:32,380 you've got to sort of get it right. 1729 01:15:32,700 --> 01:15:33,380 It's very, 1730 01:15:33,520 --> 01:15:34,000 very finicky. 1731 01:15:34,120 --> 01:15:34,240 But, 1732 01:15:34,280 --> 01:15:35,820 the idea is that you would see, 1733 01:15:37,080 --> 01:15:41,600 this is from on the horizontal axis here, 1734 01:15:41,600 --> 01:15:42,100 the X axis, 1735 01:15:42,200 --> 01:15:43,160 this is still range information. 1736 01:15:43,800 --> 01:15:44,280 But, 1737 01:15:44,360 --> 01:15:47,380 your vertical axis is now angle information. 1738 01:15:47,840 --> 01:15:48,280 So, 1739 01:15:48,300 --> 01:15:52,940 you would expect to see sort of a hotspot at the angle at which your, 1740 01:15:53,000 --> 01:15:55,840 your target object is actually sitting at. 1741 01:15:56,000 --> 01:15:56,360 And, 1742 01:15:56,420 --> 01:15:56,700 again, 1743 01:15:57,940 --> 01:15:59,840 maybe the transfer function isn't quite right. 1744 01:16:00,360 --> 01:16:00,620 But, 1745 01:16:01,120 --> 01:16:01,520 oh, 1746 01:16:01,540 --> 01:16:01,840 there we go. 1747 01:16:01,880 --> 01:16:02,000 Yeah, 1748 01:16:02,060 --> 01:16:02,380 see there? 1749 01:16:02,560 --> 01:16:03,120 There's that, 1750 01:16:04,060 --> 01:16:04,920 is that a fluke? 1751 01:16:08,180 --> 01:16:08,580 Okay. 1752 01:16:08,660 --> 01:16:08,800 So, 1753 01:16:08,860 --> 01:16:09,200 actually, 1754 01:16:09,300 --> 01:16:10,380 that's kind of working. 1755 01:16:11,420 --> 01:16:11,820 But, 1756 01:16:11,920 --> 01:16:12,580 I have to stop talking. 1757 01:16:14,340 --> 01:16:17,240 You can see there's that line that comes down. 1758 01:16:17,720 --> 01:16:19,040 I'll just describe it quickly. 1759 01:16:19,180 --> 01:16:20,280 There's a line that comes down, 1760 01:16:20,860 --> 01:16:22,960 and it gets a little bit weak at the edges, 1761 01:16:23,020 --> 01:16:24,860 but it's a little bit stronger at the center point. 1762 01:16:25,080 --> 01:16:25,340 Well, 1763 01:16:25,420 --> 01:16:26,640 just offset from center. 1764 01:16:26,640 --> 01:16:27,320 Let's see. 1765 01:16:31,040 --> 01:16:31,360 See, 1766 01:16:31,460 --> 01:16:33,220 it's slightly stronger offset from center, 1767 01:16:33,360 --> 01:16:35,900 and that's because I'm holding laptop offset from center. 1768 01:16:36,000 --> 01:16:36,180 Maybe, 1769 01:16:36,320 --> 01:16:36,780 I don't, 1770 01:16:36,780 --> 01:16:38,460 I don't know how well this is going to work if I hold it here. 1771 01:16:45,280 --> 01:16:45,600 Yeah, 1772 01:16:45,680 --> 01:16:45,820 a little, 1773 01:16:45,920 --> 01:16:47,960 that one that's quite close on the left-hand side. 1774 01:16:48,440 --> 01:16:48,760 So, 1775 01:16:48,820 --> 01:16:49,960 it was around about here, 1776 01:16:50,060 --> 01:16:50,340 I think. 1777 01:16:51,580 --> 01:16:51,900 Anyway, 1778 01:16:51,960 --> 01:16:52,420 you get the idea. 1779 01:16:54,260 --> 01:16:54,580 But, 1780 01:16:55,140 --> 01:16:55,460 again, 1781 01:16:55,460 --> 01:16:55,880 that's just, 1782 01:16:55,920 --> 01:16:56,120 you know, 1783 01:16:56,120 --> 01:16:56,860 super simple with this. 1784 01:16:56,960 --> 01:16:59,700 What's nice is that you can get a USERP, 1785 01:16:59,760 --> 01:17:00,300 like a, 1786 01:17:00,300 --> 01:17:03,500 like a B210 or something with two coherent outputs, 1787 01:17:03,720 --> 01:17:04,960 get some CANs, 1788 01:17:04,960 --> 01:17:06,120 point them somewhere, 1789 01:17:06,220 --> 01:17:08,120 and then get this to do exactly the same thing, 1790 01:17:08,200 --> 01:17:09,420 but in the RF domain. 1791 01:17:10,160 --> 01:17:10,520 And, 1792 01:17:11,640 --> 01:17:12,360 you know, 1793 01:17:12,380 --> 01:17:14,820 you can do FMCW and look at Doppler shifts. 1794 01:17:15,240 --> 01:17:15,600 So, 1795 01:17:15,620 --> 01:17:15,920 you can, 1796 01:17:15,920 --> 01:17:18,020 you can do normal CW and just look at Doppler shifts. 1797 01:17:18,140 --> 01:17:18,260 But, 1798 01:17:18,300 --> 01:17:19,160 if you use FMCW, 1799 01:17:19,740 --> 01:17:23,000 then you can do this phasing and also get range information out of it, 1800 01:17:23,040 --> 01:17:23,180 too, 1801 01:17:23,180 --> 01:17:24,220 quite effectively. 1802 01:17:24,600 --> 01:17:25,160 And, 1803 01:17:26,220 --> 01:17:29,920 I started doing it very quickly at the end of one cyber spectrum with some CANs, 1804 01:17:29,920 --> 01:17:30,060 but, 1805 01:17:30,120 --> 01:17:31,900 I think I was getting overruns and stuff. 1806 01:17:32,420 --> 01:17:32,980 But, 1807 01:17:33,020 --> 01:17:33,260 again, 1808 01:17:34,540 --> 01:17:37,200 maybe for a new radio conference. 1809 01:17:39,300 --> 01:17:39,860 So, 1810 01:17:39,960 --> 01:17:41,060 how does that actually work? 1811 01:17:41,400 --> 01:17:41,860 Well, 1812 01:17:42,700 --> 01:17:43,260 it's, 1813 01:17:44,600 --> 01:17:45,660 it's pretty, 1814 01:17:47,340 --> 01:17:47,900 pretty 1815 01:17:48,840 --> 01:17:49,400 straightforward. 1816 01:17:51,680 --> 01:17:52,240 Oh, 1817 01:17:55,040 --> 01:17:55,800 Let's see. 1818 01:17:55,880 --> 01:17:56,920 I know what I can show you. 1819 01:17:58,300 --> 01:17:58,800 Oh, 1820 01:17:58,840 --> 01:17:59,340 it's not open. 1821 01:18:00,100 --> 01:18:01,180 What's the document called? 1822 01:18:06,900 --> 01:18:07,540 Let's see. 1823 01:18:08,320 --> 01:18:08,960 Here we go. 1824 01:18:10,160 --> 01:18:10,660 As, 1825 01:18:10,660 --> 01:18:12,680 as you sort of do research and, 1826 01:18:12,700 --> 01:18:13,460 and read things, 1827 01:18:13,620 --> 01:18:18,400 you basically find out that everything cool that has ever been done in, 1828 01:18:18,440 --> 01:18:20,280 in computer science, 1829 01:18:20,320 --> 01:18:21,120 or DSP, 1830 01:18:21,260 --> 01:18:21,780 or, 1831 01:18:21,840 --> 01:18:22,220 you know, 1832 01:18:22,220 --> 01:18:22,620 anything, 1833 01:18:22,780 --> 01:18:24,920 it was all done in the 60s and 70s. 1834 01:18:25,520 --> 01:18:26,660 I found this paper, 1835 01:18:27,120 --> 01:18:29,260 I'll show you in a minute why this is interesting, 1836 01:18:32,940 --> 01:18:34,880 that talks about FMCW radar. 1837 01:18:35,680 --> 01:18:36,740 And what I want you to, 1838 01:18:36,740 --> 01:18:37,660 to imagine is, 1839 01:18:37,860 --> 01:18:40,000 and I'll show you what this actually looks like in board line in, 1840 01:18:40,020 --> 01:18:40,500 in a second. 1841 01:18:40,660 --> 01:18:43,960 What I want you to imagine is that this solid black line, 1842 01:18:46,080 --> 01:18:50,100 this is a paper by Barrick from 1973 about FMCW. 1843 01:18:50,100 --> 01:18:55,240 This black line is actually what's transmitted by your radar system. 1844 01:18:55,580 --> 01:18:56,000 So, 1845 01:18:56,060 --> 01:18:58,900 you've got time running along the horizontal axis, 1846 01:18:59,160 --> 01:19:01,220 and vertical is your frequency. 1847 01:19:01,560 --> 01:19:02,160 So, 1848 01:19:03,100 --> 01:19:08,040 you're effectively making a tone that goes from a low frequency to a high frequency. 1849 01:19:14,760 --> 01:19:19,920 And then this dotted version is actually what you're receiving. 1850 01:19:20,100 --> 01:19:22,460 And what you can consider is, 1851 01:19:23,580 --> 01:19:26,060 if you're transmitting this waveform, 1852 01:19:26,380 --> 01:19:28,640 and it's bouncing off an object and coming back to you, 1853 01:19:28,740 --> 01:19:31,940 you will essentially see the same waveform, 1854 01:19:32,260 --> 01:19:34,380 but delayed in time a little bit. 1855 01:19:36,040 --> 01:19:38,440 And that's really nice because this waveform, 1856 01:19:38,720 --> 01:19:40,340 because you can create a match field for it, 1857 01:19:40,360 --> 01:19:44,360 has really nice correlation properties so that you can ignore noise. 1858 01:19:44,980 --> 01:19:45,540 Now, 1859 01:19:45,620 --> 01:19:48,640 what's pretty cool about this chirp waveform is that, 1860 01:19:48,640 --> 01:19:50,160 on the receiver side, 1861 01:19:50,440 --> 01:19:53,380 you can create the same chirp, 1862 01:19:53,400 --> 01:19:55,280 basically take the chirp that you transmitted, 1863 01:19:55,520 --> 01:20:02,420 and multiply that by your incoming samples from your USRP. 1864 01:20:02,840 --> 01:20:07,400 And if you end up receiving this signal or a delayed version of it, 1865 01:20:07,500 --> 01:20:12,040 you'll effectively undo that chirp nature of it, 1866 01:20:12,120 --> 01:20:14,620 and then get a tone, 1867 01:20:14,860 --> 01:20:16,100 a single tone. 1868 01:20:16,360 --> 01:20:17,860 And you can take the FFT of that, 1869 01:20:17,860 --> 01:20:19,520 and then in the frequency domain, 1870 01:20:19,660 --> 01:20:20,920 you get a bin that lights up, 1871 01:20:20,940 --> 01:20:21,620 and that's your range information. 1872 01:20:21,880 --> 01:20:23,580 I'll show you what that looks like in just a second. 1873 01:20:24,580 --> 01:20:26,880 But that's the kind of waveform that we're dealing with here. 1874 01:20:27,040 --> 01:20:28,940 And we can realize that pretty easily. 1875 01:20:29,240 --> 01:20:30,100 We've got our... 1876 01:20:33,280 --> 01:20:34,600 I'm going to start up at the top here. 1877 01:20:34,620 --> 01:20:35,460 So you've got the audio source, 1878 01:20:35,520 --> 01:20:36,560 which represents the microphone. 1879 01:20:37,040 --> 01:20:38,660 And then you go through a Hilbert transform 1880 01:20:38,660 --> 01:20:41,440 and turn it from floating point into the complex domain. 1881 01:20:41,760 --> 01:20:43,580 And the reason why we do that here is because 1882 01:20:43,580 --> 01:20:46,160 we're going to multiply it by the chirp that we generate. 1883 01:20:47,940 --> 01:20:49,300 In this block here. 1884 01:20:49,540 --> 01:20:55,540 But what we do is we have this signal source, 1885 01:20:55,860 --> 01:20:58,800 which is the sawtooth waveform, 1886 01:20:59,140 --> 01:21:02,040 which is exactly the waveform that I just showed you here, 1887 01:21:02,180 --> 01:21:02,800 sawtooth. 1888 01:21:04,180 --> 01:21:06,960 And we have this particular frequency here. 1889 01:21:07,040 --> 01:21:08,100 I'm running it at 50. 1890 01:21:08,260 --> 01:21:10,200 So that noise that you heard before, 1891 01:21:10,320 --> 01:21:12,600 that was actually a chirp running at 50 hertz. 1892 01:21:12,660 --> 01:21:14,920 So you hear 50 chirps per second. 1893 01:21:16,140 --> 01:21:17,840 And then that's generating a sawtooth. 1894 01:21:17,860 --> 01:21:18,080 So this is the sawtooth waveform, 1895 01:21:19,140 --> 01:21:21,020 which is then going into this VCO, 1896 01:21:21,160 --> 01:21:21,960 voltage control oscillator. 1897 01:21:22,300 --> 01:21:26,820 And so this is actually producing the chirp signal. 1898 01:21:26,980 --> 01:21:28,560 So what you can think about is 1899 01:21:28,560 --> 01:21:31,100 the sawtooth is controlling the frequency 1900 01:21:32,700 --> 01:21:34,740 of the waveform that we want to generate. 1901 01:21:34,920 --> 01:21:36,320 And the VCO is actually generating 1902 01:21:36,320 --> 01:21:37,920 that waveform at the frequency. 1903 01:21:38,140 --> 01:21:40,420 So this is constantly doing this sawtooth. 1904 01:21:40,600 --> 01:21:43,540 And so our frequency is constantly going from low to high 1905 01:21:43,540 --> 01:21:45,220 and then low to high and then low to high. 1906 01:21:46,600 --> 01:21:47,800 So what we're doing is, 1907 01:21:47,860 --> 01:21:48,980 once we've generated the chirp, 1908 01:21:49,040 --> 01:21:50,600 we mix that with our incoming signal 1909 01:21:51,220 --> 01:21:54,060 and then it goes off down there. 1910 01:21:58,680 --> 01:21:59,400 Let's see. 1911 01:22:00,720 --> 01:22:04,020 So that goes down here. 1912 01:22:04,200 --> 01:22:05,700 So we've got our sawtooth 1913 01:22:05,700 --> 01:22:08,820 and we're also going into this VCO. 1914 01:22:11,040 --> 01:22:13,640 And this is the phased array component. 1915 01:22:13,640 --> 01:22:16,160 So I'll come back to that in a second. 1916 01:22:17,380 --> 01:22:19,560 So what we've done is, 1917 01:22:19,600 --> 01:22:22,020 once we've actually multiplied our incoming signal 1918 01:22:22,020 --> 01:22:23,980 from the microphone by this chirp, 1919 01:22:24,680 --> 01:22:30,740 then we go and we put it into this multiply block. 1920 01:22:31,860 --> 01:22:34,040 And I've just done a bit of trickery here. 1921 01:22:34,240 --> 01:22:36,880 I can't even remember whether this is a restriction anymore 1922 01:22:36,880 --> 01:22:38,120 because when I do it in Python, 1923 01:22:38,300 --> 01:22:39,900 I don't worry about it. 1924 01:22:40,080 --> 01:22:42,200 But I'm trying to do an FFT. 1925 01:22:42,600 --> 01:22:44,160 They're restricted to powers of two here, right? 1926 01:22:44,380 --> 01:22:46,020 You can't do arbitrary size FFTs? 1927 01:22:46,620 --> 01:22:47,540 Yeah, you can, yeah. 1928 01:22:47,680 --> 01:22:48,040 Really? 1929 01:22:49,180 --> 01:22:49,540 Yes. 1930 01:22:49,960 --> 01:22:50,580 All right. 1931 01:22:50,660 --> 01:22:52,320 So I've overcomplicated things, 1932 01:22:52,440 --> 01:22:53,880 but what's new? 1933 01:22:55,820 --> 01:22:57,840 So I was trying to make a power of two FFTs. 1934 01:22:57,840 --> 01:23:00,120 So what I'm actually doing here is I'm padding out the samples. 1935 01:23:00,340 --> 01:23:02,420 It turns out that you don't actually need to do that. 1936 01:23:02,720 --> 01:23:04,180 I mean, you don't need to do that. 1937 01:23:04,460 --> 01:23:06,760 I've been using NumPy to do some offline stuff 1938 01:23:06,760 --> 01:23:07,960 and you don't need to do it. 1939 01:23:08,100 --> 01:23:11,000 So here, I basically have a window. 1940 01:23:11,000 --> 01:23:15,060 Usually, the window is applied within the FFT block. 1941 01:23:15,400 --> 01:23:18,200 But here, I window the samples that I've received, 1942 01:23:18,360 --> 01:23:20,700 which are shorter than 1024. 1943 01:23:21,080 --> 01:23:22,980 And then I'm padding the rest out with zero. 1944 01:23:23,100 --> 01:23:25,380 So I'm effectively bringing it up to power two. 1945 01:23:26,000 --> 01:23:28,560 And then the stream mux is combining the samples 1946 01:23:28,560 --> 01:23:29,900 that I've brought in and windowed 1947 01:23:29,900 --> 01:23:31,360 with the padding on the end, 1948 01:23:31,420 --> 01:23:32,520 and then it's going into the FFT. 1949 01:23:34,720 --> 01:23:36,840 So that works too. 1950 01:23:37,540 --> 01:23:40,040 And then I'm running the FFT, 1951 01:23:40,040 --> 01:23:42,260 and then I'm chopping off half of the FFT, 1952 01:23:42,440 --> 01:23:45,280 because we're just interested in one side 1953 01:23:45,280 --> 01:23:46,040 and the magnitude information. 1954 01:23:46,400 --> 01:23:48,960 So again, I take the magnitude, do the log of it, 1955 01:23:49,100 --> 01:23:51,880 and then I decimate that stream. 1956 01:23:51,960 --> 01:23:54,320 So I'm keeping one in every 512 transforms 1957 01:23:55,540 --> 01:23:58,220 because this sort of modified sink 1958 01:23:59,080 --> 01:24:00,520 can't accept too much data, 1959 01:24:00,540 --> 01:24:01,700 otherwise the GUI hangs. 1960 01:24:01,840 --> 01:24:03,900 It's just a weird OSX thing. 1961 01:24:05,460 --> 01:24:08,320 And that's how we actually then get that visualization 1962 01:24:08,320 --> 01:24:09,460 of the range information. 1963 01:24:11,100 --> 01:24:12,540 So that's essentially what you're doing. 1964 01:24:12,560 --> 01:24:13,740 You're taking the incoming signal, 1965 01:24:13,920 --> 01:24:15,260 multiplying it by the chirp 1966 01:24:15,260 --> 01:24:16,180 that you originally sent out, 1967 01:24:16,260 --> 01:24:16,980 take the FFT, 1968 01:24:17,180 --> 01:24:18,420 and then you get range information. 1969 01:24:19,420 --> 01:24:22,160 And then what about the rest of it? 1970 01:24:23,380 --> 01:24:24,440 What about the phasing? 1971 01:24:24,860 --> 01:24:26,520 So I've had that checkbox there. 1972 01:24:26,880 --> 01:24:28,460 So the checkbox is this run array. 1973 01:24:28,600 --> 01:24:29,760 It's either a one or a zero. 1974 01:24:30,300 --> 01:24:31,680 Here I've got the signal source, 1975 01:24:32,120 --> 01:24:33,660 and this is a sine wave, 1976 01:24:34,220 --> 01:24:39,040 but it's actually set at a frequency of 0.6 hertz. 1977 01:24:40,040 --> 01:24:40,980 So that's... 1978 01:24:41,540 --> 01:24:42,520 If you imagine, 1979 01:24:42,840 --> 01:24:44,840 don't think about it as a sine wave, 1980 01:24:44,880 --> 01:24:48,100 think about it on the complex... 1981 01:24:50,380 --> 01:24:51,240 Unit circle. 1982 01:24:51,500 --> 01:24:52,320 Yeah, unit circle. 1983 01:24:52,580 --> 01:24:53,100 Thanks. 1984 01:24:53,220 --> 01:24:55,940 Think about it on the complex of a unit circle, 1985 01:24:56,200 --> 01:25:00,160 and what you can imagine then is a phasor 1986 01:25:00,160 --> 01:25:02,360 that's slowly rotating around. 1987 01:25:03,320 --> 01:25:05,000 And it's doing that rather slowly 1988 01:25:05,000 --> 01:25:07,120 because I've set it at this really low frequency. 1989 01:25:08,000 --> 01:25:09,040 And usually, 1990 01:25:14,700 --> 01:25:16,040 since we're not running the array, 1991 01:25:16,220 --> 01:25:18,460 we just take the output of this VCO, 1992 01:25:18,640 --> 01:25:19,760 which is our CHIRP. 1993 01:25:19,980 --> 01:25:21,380 But if we want to phase it, 1994 01:25:21,460 --> 01:25:23,120 then we can do that too. 1995 01:25:23,760 --> 01:25:26,540 So when we're not running the phasing, 1996 01:25:26,620 --> 01:25:28,020 we want the same signal to come out 1997 01:25:28,020 --> 01:25:30,580 the left and right channels of our speakers. 1998 01:25:30,960 --> 01:25:33,060 So if we go and look at the audio sync here, 1999 01:25:34,160 --> 01:25:35,560 the audio sync... 2000 01:25:35,560 --> 01:25:37,680 Oh, for some reason I have this all up there. 2001 01:25:37,740 --> 01:25:38,700 This is a multiply cons block, 2002 01:25:38,700 --> 01:25:40,620 so it's basically just getting the signal 2003 01:25:40,620 --> 01:25:42,940 to a nice level for the audio sync. 2004 01:25:43,160 --> 01:25:44,720 But here we've got our left and right channels. 2005 01:25:48,120 --> 01:25:50,000 And once we've created our CHIRP, 2006 01:25:50,160 --> 01:25:53,700 we go through and just take the real component, 2007 01:25:53,940 --> 01:25:55,380 put that into the left channel, 2008 01:25:55,820 --> 01:25:57,800 and then with the array, 2009 01:26:00,780 --> 01:26:02,780 we essentially have... 2010 01:26:04,260 --> 01:26:05,620 Oh, that's what I forgot. 2011 01:26:05,760 --> 01:26:07,220 So in here, in the signal source, 2012 01:26:08,760 --> 01:26:11,520 the amplitude is actually set to run array. 2013 01:26:11,680 --> 01:26:12,520 So if run array is on, 2014 01:26:12,940 --> 01:26:16,100 we're actually going to get samples coming out of this 2015 01:26:16,100 --> 01:26:18,560 with all sorts of ranges of values. 2016 01:26:18,740 --> 01:26:20,040 But if the array is not running, 2017 01:26:20,160 --> 01:26:21,400 then amplitude is zero. 2018 01:26:21,640 --> 01:26:23,240 So this is going to be producing samples, 2019 01:26:23,400 --> 01:26:24,660 but they're all going to be zero, 2020 01:26:24,720 --> 01:26:28,040 which is like as if it was turned off. 2021 01:26:30,900 --> 01:26:32,420 So if the array is off, 2022 01:26:32,540 --> 01:26:34,080 this is producing zero samples. 2023 01:26:34,440 --> 01:26:35,860 We add one to it. 2024 01:26:36,940 --> 01:26:38,620 So we actually get ones coming out here. 2025 01:26:38,700 --> 01:26:41,580 Then we multiply that by our CHIRP signal. 2026 01:26:41,740 --> 01:26:43,200 So then we get the CHIRP signal happening 2027 01:26:43,200 --> 01:26:45,340 with the same phase offset. 2028 01:26:45,620 --> 01:26:46,700 Take the real component 2029 01:26:46,700 --> 01:26:48,420 and put that to the right speaker. 2030 01:26:48,580 --> 01:26:50,700 So we get the same signal going out left and right. 2031 01:26:50,880 --> 01:26:52,480 If we click that checkbox, 2032 01:26:52,700 --> 01:26:56,180 suddenly we get useful samples coming out of here. 2033 01:26:56,440 --> 01:26:57,580 But when we add, 2034 01:26:57,820 --> 01:27:01,720 we're actually adding one minus array to it. 2035 01:27:01,880 --> 01:27:04,200 So that actually swaps what's going on now. 2036 01:27:04,300 --> 01:27:07,640 So now this is going to be producing valid useful samples, 2037 01:27:07,640 --> 01:27:09,080 but this is going to be producing zero. 2038 01:27:09,360 --> 01:27:11,720 So valid samples plus zero is the valid samples. 2039 01:27:12,160 --> 01:27:15,240 Then you multiply that by the CHIRP signal. 2040 01:27:15,620 --> 01:27:17,380 And although this is a slow sine wave, 2041 01:27:17,520 --> 01:27:21,060 this has the effect of changing the phase slowly 2042 01:27:21,640 --> 01:27:23,300 of our CHIRP signal. 2043 01:27:24,860 --> 01:27:26,820 And once you then take the real component 2044 01:27:26,820 --> 01:27:27,660 and put it out to the right speaker, 2045 01:27:27,840 --> 01:27:30,980 we've got two CHIRP signals that are offset in phase. 2046 01:27:31,140 --> 01:27:32,600 One is a constant phase 2047 01:27:32,600 --> 01:27:34,860 and the other one is retarded in phase 2048 01:27:34,860 --> 01:27:36,420 and then forward in phase 2049 01:27:36,420 --> 01:27:38,520 as they come out the left and right speakers. 2050 01:27:38,660 --> 01:27:40,580 And that's why you get that weird stereo effect 2051 01:27:40,580 --> 01:27:44,800 because you can hear it on either side of your head. 2052 01:27:45,820 --> 01:27:47,620 And that's all there is to it. 2053 01:27:47,700 --> 01:27:49,120 Really pretty basic. 2054 01:27:49,180 --> 01:27:52,640 No complicated processing beyond doing this CHIRP in an FFT. 2055 01:27:52,940 --> 01:27:55,940 So it's a pretty cool waveform. 2056 01:27:59,720 --> 01:28:04,540 Now I'm trying to find some photos here. 2057 01:28:10,160 --> 01:28:11,240 Where did they go? 2058 01:28:15,480 --> 01:28:17,820 So this radar, in this case, 2059 01:28:18,500 --> 01:28:24,320 it's used to do a bit of fun stuff. 2060 01:28:26,460 --> 01:28:31,520 And in other situations, if you actually look at the FM band, 2061 01:28:31,700 --> 01:28:34,780 let me show you what that looks like. 2062 01:28:36,420 --> 01:28:41,720 I'm going to open a board line here for you. 2063 01:28:46,280 --> 01:28:48,540 And we can look at some signals. 2064 01:28:52,740 --> 01:28:53,620 Let's see. 2065 01:28:54,660 --> 01:28:56,600 Something not huge. 2066 01:28:57,000 --> 01:28:57,820 Maybe this one. 2067 01:28:58,660 --> 01:28:59,600 Oh, geez. 2068 01:29:06,440 --> 01:29:08,680 I brought it over here and it disappears. 2069 01:29:13,980 --> 01:29:14,580 Okay. 2070 01:29:17,820 --> 01:29:19,380 Now that's a flooding point. 2071 01:29:28,380 --> 01:29:29,540 Let's see what happens. 2072 01:29:29,680 --> 01:29:30,400 What do we get? 2073 01:29:31,060 --> 01:29:31,660 Cool. 2074 01:29:35,640 --> 01:29:38,100 I'm just going to resize this so I can access the whole window. 2075 01:29:43,480 --> 01:29:44,740 So this is Boardline. 2076 01:29:46,220 --> 01:29:48,640 Boardline is a really cool piece of software 2077 01:29:48,640 --> 01:29:51,980 that you can use to do offline analysis of files with. 2078 01:29:52,320 --> 01:29:54,240 Made by a guy called Eric Olson. 2079 01:29:54,740 --> 01:30:00,160 And this is part of the HF spectrum 2080 01:30:00,160 --> 01:30:03,540 that I've recorded. 2081 01:30:04,160 --> 01:30:09,240 And let's try to get this all on the screen here. 2082 01:30:12,540 --> 01:30:15,540 And I've just gone out with a long wire 2083 01:30:16,040 --> 01:30:23,700 and attempted to receive things over HF. 2084 01:30:25,580 --> 01:30:28,800 And let me see if I can get a photo of that. 2085 01:30:28,920 --> 01:30:29,720 No, not there. 2086 01:30:29,720 --> 01:30:34,580 Anyway, what we're actually looking at here now, 2087 01:30:34,700 --> 01:30:38,300 this is time on the vertical and frequency on the horizontal. 2088 01:30:38,780 --> 01:30:41,440 This was at what frequency we got here? 2089 01:30:42,100 --> 01:30:43,820 Is it 13 meg? 2090 01:30:47,100 --> 01:30:48,900 This should be 3 megs, I think. 2091 01:30:49,800 --> 01:30:50,260 Oh, yeah. 2092 01:30:50,300 --> 01:30:51,220 No, I'm using a transverter. 2093 01:30:51,260 --> 01:30:53,380 So you can get a long wire to loosen the HF 2094 01:30:53,380 --> 01:30:54,620 and then you can plug it in. 2095 01:30:54,680 --> 01:30:55,380 Who's got a hammered up? 2096 01:30:55,460 --> 01:30:56,560 Who's sort of a hammered up converter? 2097 01:30:56,640 --> 01:30:59,260 Yes, you can get a hammered up or other sorts of up converters. 2098 01:30:59,260 --> 01:31:00,260 It's essentially a mixer. 2099 01:31:00,400 --> 01:31:01,980 And then plug it into your normal SDR 2100 01:31:01,980 --> 01:31:04,120 to actually receive these HF signals. 2101 01:31:04,500 --> 01:31:06,080 You've got AM radio stations, 2102 01:31:06,360 --> 01:31:07,320 hams talking on them, 2103 01:31:08,160 --> 01:31:08,940 PSK 31, 2104 01:31:09,380 --> 01:31:12,520 all sorts of other interesting analog and digital modes. 2105 01:31:13,060 --> 01:31:15,960 But then you've also got these chirps that show up. 2106 01:31:16,140 --> 01:31:18,400 And as it turns out, there's this system called CODAR. 2107 01:31:18,540 --> 01:31:19,560 There's a company called CODAR 2108 01:31:19,560 --> 01:31:22,480 that makes this HF radar mapping system. 2109 01:31:22,740 --> 01:31:25,320 And you can see these characteristic antennas around the place. 2110 01:31:25,440 --> 01:31:29,040 And they actually set them up to map the ocean currents. 2111 01:31:29,260 --> 01:31:33,220 So they're set up near the shorelines. 2112 01:31:33,560 --> 01:31:36,480 And they actually just set up an antenna 2113 01:31:36,480 --> 01:31:38,080 and they're constantly sending out this chirp. 2114 01:31:38,260 --> 01:31:42,520 And then the system is specifically tuned 2115 01:31:42,520 --> 01:31:45,560 so as the wave front travels out over the ocean, 2116 01:31:45,760 --> 01:31:48,380 it will actually reflect off waves. 2117 01:31:48,860 --> 01:31:52,380 And those waves will reflect a small amount of energy back here. 2118 01:31:52,580 --> 01:31:57,580 But also, as the wave is moving either away from the transmitter 2119 01:31:57,580 --> 01:31:58,560 or toward the transmitter, 2120 01:31:59,260 --> 01:32:02,300 then that will actually impart a Doppler shift, 2121 01:32:02,500 --> 01:32:06,260 which you can also pick up after integrating on this chirp for some time. 2122 01:32:09,520 --> 01:32:12,000 Now, you can do all sorts of interesting experiments with this. 2123 01:32:12,060 --> 01:32:15,660 If you know the guy that creates aerospace radios and stuff on his blog, 2124 01:32:15,740 --> 01:32:18,260 he's done some really cool processing of these sorts of signals. 2125 01:32:19,080 --> 01:32:20,820 Once you start doing this sort of thing, 2126 01:32:20,940 --> 01:32:24,860 it's really important that your receiver is locked to the transmitter. 2127 01:32:25,040 --> 01:32:28,360 But because you have no control over the transmitter, 2128 01:32:29,260 --> 01:32:31,600 usually, if you're lucky, the transmitter is locked to GPS. 2129 01:32:32,000 --> 01:32:35,420 So if you can get an SDR that accepts an external reference input, 2130 01:32:35,660 --> 01:32:37,860 you can actually get then a GPS DO, 2131 01:32:38,000 --> 01:32:40,460 GPS Disciplined Oscillator, that will output 10 MHz 2132 01:32:40,460 --> 01:32:44,160 that's disciplined by the atomic clocks on the satellites. 2133 01:32:44,580 --> 01:32:50,300 And then that will bring your sampling rate into alignment with the transmitter, 2134 01:32:50,480 --> 01:32:53,360 which is what you need to then very accurately process the information 2135 01:32:53,360 --> 01:32:55,580 and then extract Doppler information as well. 2136 01:32:55,780 --> 01:32:57,720 But this is what the wave form actually looks like. 2137 01:32:57,720 --> 01:32:59,180 And you can hear these things. 2138 01:33:00,840 --> 01:33:01,880 It's kind of running out of time, 2139 01:33:01,960 --> 01:33:03,880 so I don't know whether we can necessarily listen to them. 2140 01:33:04,940 --> 01:33:07,360 But what it looks like on the spectrum, as you saw before, 2141 01:33:07,440 --> 01:33:08,300 was this sawtooth wave. 2142 01:33:08,380 --> 01:33:12,880 So in this case, this is a down chirp. 2143 01:33:13,000 --> 01:33:14,260 The frequency is going down. 2144 01:33:15,280 --> 01:33:17,440 And you can see here that you've got these lines. 2145 01:33:17,720 --> 01:33:19,240 And if you actually zoom in there, 2146 01:33:22,860 --> 01:33:25,760 and we can also zoom in in terms of frequency, 2147 01:33:31,680 --> 01:33:32,080 you can see that you've got these lines. 2148 01:33:32,080 --> 01:33:32,400 Where is it? 2149 01:33:32,460 --> 01:33:32,920 Is that it? 2150 01:33:33,420 --> 01:33:35,580 You've got all these other cool signals there. 2151 01:33:42,520 --> 01:33:45,560 So there's our chirp. 2152 01:33:45,960 --> 01:33:54,280 And so what's interesting is that you've got what looks like this main lobe, 2153 01:33:54,340 --> 01:33:55,120 the central signal, 2154 01:33:55,260 --> 01:33:56,600 and then you've got all these side lobes there. 2155 01:33:56,600 --> 01:33:58,280 And the reason why that turns out, 2156 01:33:59,400 --> 01:34:02,360 Peter, who does RRspace, actually had this on his blog, 2157 01:34:02,460 --> 01:34:02,900 but really interesting, 2158 01:34:03,080 --> 01:34:05,760 is that this is actually AMing of the signal 2159 01:34:05,760 --> 01:34:10,360 due to the fact that the transmitted signal that they're transmitting 2160 01:34:10,360 --> 01:34:11,680 is actually gated, 2161 01:34:11,700 --> 01:34:15,080 which means that they're not transmitting continuously. 2162 01:34:15,460 --> 01:34:17,200 They transmit a little burst, 2163 01:34:17,900 --> 01:34:20,580 and then they stop the transmitter, 2164 01:34:20,760 --> 01:34:22,100 switch to receive mode, 2165 01:34:22,400 --> 01:34:23,020 listen, 2166 01:34:23,280 --> 01:34:24,720 and then switch back to the transmitter, 2167 01:34:24,800 --> 01:34:26,220 which is what, you know, for example, 2168 01:34:26,600 --> 01:34:28,480 a primary surveillance radar does at an airport. 2169 01:34:29,680 --> 01:34:33,180 And that makes sense because they're using the same antenna to transmit and receive. 2170 01:34:34,620 --> 01:34:38,740 So that's what's actually producing this AMing effect in the frequency domain. 2171 01:34:39,180 --> 01:34:42,160 I won't do it now because it can be a bit of a pain, 2172 01:34:42,320 --> 01:34:48,780 but if you were to actually look at that signal, 2173 01:34:51,360 --> 01:34:52,160 where are we? 2174 01:34:53,160 --> 01:34:53,800 Here we go. 2175 01:34:56,600 --> 01:34:58,860 If you were actually to zoom into that signal even more 2176 01:34:58,860 --> 01:35:01,060 and adjust your windowing function and all that kind of stuff, 2177 01:35:01,680 --> 01:35:03,620 each one of these chirps actually looks like this. 2178 01:35:03,700 --> 01:35:05,340 Can you see that it's actually dotted line now? 2179 01:35:05,480 --> 01:35:07,560 So that's actually the gating of the signal that's turning on and off. 2180 01:35:07,720 --> 01:35:10,080 And when you do put that in the frequency domain, 2181 01:35:10,100 --> 01:35:11,120 you get that AMing effect. 2182 01:35:11,680 --> 01:35:14,880 But that's okay because we're talking about, 2183 01:35:15,400 --> 01:35:16,500 well, not quite, 2184 01:35:16,700 --> 01:35:18,160 but almost the speed of light. 2185 01:35:18,640 --> 01:35:21,000 So if that reception time, 2186 01:35:22,500 --> 01:35:23,820 if you take that reception time, 2187 01:35:23,860 --> 01:35:24,740 multiply it by the speed of light, 2188 01:35:24,780 --> 01:35:26,200 if that distance is within, 2189 01:35:26,600 --> 01:35:29,220 the virtual range distance that you want to monitor, 2190 01:35:29,480 --> 01:35:31,940 like to the actual ocean waves, 2191 01:35:32,840 --> 01:35:34,720 then that's all you need to do and that's fine. 2192 01:35:36,180 --> 01:35:38,260 But what's interesting is that these signals are out there 2193 01:35:38,260 --> 01:35:39,980 and you can actually take these signals 2194 01:35:40,480 --> 01:35:45,400 and process them and produce these really cool plots, 2195 01:35:45,700 --> 01:35:46,820 which I'll show you. 2196 01:35:47,040 --> 01:35:48,240 I wanted to have more done, 2197 01:35:48,380 --> 01:35:51,440 but didn't quite get there. 2198 01:35:52,180 --> 01:35:53,860 But in terms of the actual setup, 2199 01:35:54,960 --> 01:35:56,580 what you actually need to do, 2200 01:35:56,600 --> 01:35:58,620 here are some photos. 2201 01:36:00,100 --> 01:36:01,660 So we actually went up, 2202 01:36:01,720 --> 01:36:03,980 if you're familiar with the area in San Francisco, 2203 01:36:04,080 --> 01:36:04,960 Skyline Boulevard, 2204 01:36:05,160 --> 01:36:06,800 there's that road that goes up 2205 01:36:06,800 --> 01:36:07,700 and it's quite close to the ocean. 2206 01:36:07,840 --> 01:36:09,380 You need to get away from civilization 2207 01:36:09,380 --> 01:36:11,580 because everybody's switch mode power supply 2208 01:36:11,580 --> 01:36:13,560 absolutely destroys the HF spectrum. 2209 01:36:13,980 --> 01:36:14,980 As it turned out, 2210 01:36:15,060 --> 01:36:16,660 we had to do this entire operation 2211 01:36:16,660 --> 01:36:18,200 purely off battery power, 2212 01:36:18,420 --> 01:36:19,900 no inverters. 2213 01:36:20,100 --> 01:36:23,660 So I had some DC to DC inverters to power the USERP 2214 01:36:23,660 --> 01:36:25,220 and when we turned that on, 2215 01:36:25,220 --> 01:36:27,020 the spectrum just went to junk. 2216 01:36:27,280 --> 01:36:28,760 We ended up getting these lantern batteries 2217 01:36:28,760 --> 01:36:30,120 and using those, 2218 01:36:30,300 --> 01:36:32,660 actually getting parallel to power the USERP. 2219 01:36:32,880 --> 01:36:34,900 The laptops just ran as long as they could 2220 01:36:34,900 --> 01:36:35,920 on the internal battery power. 2221 01:36:36,220 --> 01:36:36,620 Unfortunately, 2222 01:36:36,780 --> 01:36:37,740 because they're MacBooks, 2223 01:36:37,740 --> 01:36:39,400 you can't just pop in another battery, 2224 01:36:39,440 --> 01:36:41,380 but not that you could exchange the battery 2225 01:36:41,380 --> 01:36:42,340 while you were recording anyway. 2226 01:36:42,600 --> 01:36:45,340 But I got about an hour's worth of recording on that, 2227 01:36:45,400 --> 01:36:46,020 which is pretty good. 2228 01:36:46,420 --> 01:36:48,120 And we've got two setups here. 2229 01:36:48,260 --> 01:36:50,720 We've got a USERP N210 connected. 2230 01:36:51,240 --> 01:36:53,120 We've got a basic board plugged in there 2231 01:36:53,120 --> 01:36:54,280 with a band pass filter. 2232 01:36:55,220 --> 01:36:56,720 So that's just receiving it straight in there. 2233 01:36:56,840 --> 01:37:00,100 Here, this is a USERP B210 hooked up to a hammered up. 2234 01:37:00,240 --> 01:37:01,480 So we had two antennas there. 2235 01:37:01,940 --> 01:37:03,960 And we were really cold 2236 01:37:03,960 --> 01:37:05,360 and the mist was coming in. 2237 01:37:05,820 --> 01:37:10,040 And we had a long wire antenna and a... 2238 01:37:12,060 --> 01:37:13,580 So that's kind of the setup there. 2239 01:37:13,660 --> 01:37:17,000 A long wire antenna as well as a dipole 2240 01:37:17,000 --> 01:37:19,500 that I brought. 2241 01:37:20,420 --> 01:37:21,860 And, you know, so the... 2242 01:37:21,860 --> 01:37:24,140 We've got an LNA here 2243 01:37:24,140 --> 01:37:25,440 and some other things, 2244 01:37:25,540 --> 01:37:26,640 but everything's powered off batteries. 2245 01:37:26,800 --> 01:37:28,300 Like the hammered up is powered off. 2246 01:37:28,380 --> 01:37:29,020 And I think... 2247 01:37:30,520 --> 01:37:31,460 Well, that's off USB, 2248 01:37:31,700 --> 01:37:34,040 but there's also nine volts powering and LNA. 2249 01:37:34,400 --> 01:37:36,080 And, you know, really, really... 2250 01:37:36,080 --> 01:37:37,200 Basically, any... 2251 01:37:37,200 --> 01:37:39,820 And then, oh, then we also got a 110 inverter 2252 01:37:39,820 --> 01:37:41,120 to power off the car battery 2253 01:37:41,560 --> 01:37:44,320 to actually attempt to charge the laptops with. 2254 01:37:44,500 --> 01:37:45,740 And as soon as we plug that in, 2255 01:37:46,280 --> 01:37:48,100 you have to make sure that when you plug it in, 2256 01:37:48,640 --> 01:37:51,520 you can't just verify and determine what's going on 2257 01:37:51,520 --> 01:37:52,120 just by plugging it in. 2258 01:37:52,160 --> 01:37:53,460 You actually have to put load 2259 01:37:53,460 --> 01:37:56,020 on those switch mode supplies. 2260 01:37:56,460 --> 01:37:57,640 So you plug it in, nothing happens. 2261 01:37:57,700 --> 01:37:59,520 And when you actually plug in the laptop to charge, 2262 01:37:59,620 --> 01:38:02,580 then everything disappears into the noise. 2263 01:38:06,720 --> 01:38:09,260 Oh, I don't have the photos I need, 2264 01:38:09,320 --> 01:38:12,900 but I have these two squid fishing poles. 2265 01:38:13,120 --> 01:38:14,000 You can use them. 2266 01:38:14,060 --> 01:38:14,800 They're telescopic. 2267 01:38:14,800 --> 01:38:16,560 Put them up and then basically just... 2268 01:38:16,560 --> 01:38:18,280 You've got a long wire hanging off there. 2269 01:38:18,900 --> 01:38:20,200 And you can hook it up 2270 01:38:20,200 --> 01:38:22,180 and then that's pretty much all you need. 2271 01:38:23,880 --> 01:38:25,480 And so what can you do? 2272 01:38:25,980 --> 01:38:29,040 Well, I've generated some Python scripts 2273 01:38:29,040 --> 01:38:34,600 that you can use to actually transform this data. 2274 01:38:35,360 --> 01:38:37,040 So I won't demonstrate them to you, 2275 01:38:37,060 --> 01:38:40,300 but I'll just show you the sort of progression here. 2276 01:38:43,360 --> 01:38:46,480 Actually, another guy that is pretty much the expert 2277 01:38:46,480 --> 01:38:49,700 in this field is Yuha... 2278 01:38:49,700 --> 01:38:51,080 Do you know how to pronounce his last name? 2279 01:38:51,080 --> 01:38:51,460 Vernon. 2280 01:38:51,760 --> 01:38:52,280 Vernon. 2281 01:38:52,820 --> 01:38:52,900 Vernon. 2282 01:38:53,980 --> 01:38:57,300 And he's done some absolutely amazing experiments. 2283 01:38:57,500 --> 01:38:58,480 The reason why this is cool 2284 01:38:58,480 --> 01:39:00,200 is because they're generating a signal 2285 01:39:00,200 --> 01:39:01,640 that they're using to map the ocean, 2286 01:39:01,780 --> 01:39:03,180 but it's also very powerful 2287 01:39:03,180 --> 01:39:04,380 and because it's HF, 2288 01:39:04,380 --> 01:39:06,800 it can also go up and bounce off the ionosphere. 2289 01:39:06,980 --> 01:39:08,660 So you can actually use this, 2290 01:39:08,720 --> 01:39:09,840 especially at nighttime, 2291 01:39:10,140 --> 01:39:13,440 to look at ionospheric effects of the signal 2292 01:39:13,440 --> 01:39:15,800 because effectively the ionosphere is becoming a mirror 2293 01:39:15,800 --> 01:39:18,660 to these HF signals that somebody else is producing. 2294 01:39:18,880 --> 01:39:20,260 And then you're using essentially 2295 01:39:20,260 --> 01:39:23,380 passive radar techniques to then visualize 2296 01:39:23,380 --> 01:39:26,320 the signal and the effect that the natural world 2297 01:39:26,320 --> 01:39:28,940 and the sun is also having, 2298 01:39:29,700 --> 01:39:32,540 how that's affecting your thing. 2299 01:39:32,760 --> 01:39:35,540 So this is a plot... 2300 01:39:36,320 --> 01:39:38,220 I've got some Python code and I'm going to put it up, 2301 01:39:38,300 --> 01:39:40,420 but this is essentially an FFT. 2302 01:39:40,740 --> 01:39:42,440 I wrote this because I wanted to create 2303 01:39:42,440 --> 01:39:44,860 really, really big FFTs 2304 01:39:46,520 --> 01:39:49,760 and not have to use a tool 2305 01:39:50,660 --> 01:39:52,060 and muck around with a tool, 2306 01:39:52,120 --> 01:39:54,540 just have it spit out a massive image. 2307 01:39:54,680 --> 01:39:56,880 So this is actually part of that spectrum again. 2308 01:39:57,140 --> 01:40:01,140 And you can see that there are these 2309 01:40:01,140 --> 01:40:03,160 various different CODAR signals 2310 01:40:03,160 --> 01:40:04,860 at different frequencies that you can pick up. 2311 01:40:05,400 --> 01:40:08,520 And then once you do some clever processing, 2312 01:40:09,080 --> 01:40:11,520 you can basically find the bandwidth 2313 01:40:11,520 --> 01:40:17,360 and then you can use some simple DSP tricks 2314 01:40:18,020 --> 01:40:19,740 and do autocorrelation. 2315 01:40:22,160 --> 01:40:27,020 And then you can create a matching chirp 2316 01:40:27,020 --> 01:40:29,340 and then filter that down. 2317 01:40:30,060 --> 01:40:32,420 So you get a plot like this essentially. 2318 01:40:32,580 --> 01:40:34,020 Remember how we had the aiming effect 2319 01:40:34,020 --> 01:40:35,280 and we had those side lobes? 2320 01:40:35,980 --> 01:40:39,500 Because you have that frequency that's chirping down, 2321 01:40:39,560 --> 01:40:41,200 going from high frequency to low frequency, 2322 01:40:41,440 --> 01:40:43,880 if you match that with your own chirp 2323 01:40:43,880 --> 01:40:44,860 and you mix it down, 2324 01:40:45,060 --> 01:40:46,960 you then get a straight line. 2325 01:40:47,220 --> 01:40:49,080 So that main lobe then just becomes 2326 01:40:49,080 --> 01:40:49,740 this straight line. 2327 01:40:49,740 --> 01:40:52,120 And then we have the other side lobes 2328 01:40:52,120 --> 01:40:52,820 that come off there. 2329 01:40:53,600 --> 01:40:56,240 And the way this is running 2330 01:40:56,240 --> 01:40:57,260 is this is actually an FFT 2331 01:40:57,260 --> 01:40:59,440 that's running from left to right. 2332 01:41:00,380 --> 01:41:02,060 And so this is time here. 2333 01:41:02,200 --> 01:41:04,300 And each FFT is the length 2334 01:41:04,300 --> 01:41:06,040 in terms of samples of one chirp. 2335 01:41:06,160 --> 01:41:08,700 And that's how then you can produce these nice plots. 2336 01:41:09,320 --> 01:41:11,160 And what we're interested in is 2337 01:41:11,160 --> 01:41:13,220 what's going on in this band right here. 2338 01:41:13,300 --> 01:41:15,000 Because if you consider the speed of light 2339 01:41:15,000 --> 01:41:17,160 and the distance that it would traverse 2340 01:41:17,160 --> 01:41:19,720 over the length of a chirp, 2341 01:41:19,740 --> 01:41:20,800 we're talking, you know, 2342 01:41:21,280 --> 01:41:23,380 multiple times around the world and then some, 2343 01:41:23,820 --> 01:41:25,900 we're only interested in stuff that's close 2344 01:41:25,900 --> 01:41:27,640 and effectively up to the ionosphere, 2345 01:41:27,800 --> 01:41:29,040 which can be a virtual range 2346 01:41:29,040 --> 01:41:30,220 of a couple of thousand kilometers. 2347 01:41:30,500 --> 01:41:32,360 So that's just in this very small band. 2348 01:41:32,620 --> 01:41:33,820 And if you zoom in there, 2349 01:41:34,780 --> 01:41:37,260 then it ends up looking a little bit like this. 2350 01:41:37,580 --> 01:41:38,940 I'll show you another plot in a minute. 2351 01:41:39,260 --> 01:41:40,220 But, um... 2352 01:41:41,380 --> 01:41:42,560 Excuse me. Time. 2353 01:41:42,960 --> 01:41:43,680 Oh, time. 2354 01:41:44,700 --> 01:41:46,060 Are we up or... 2355 01:41:46,540 --> 01:41:47,360 Is that it? 2356 01:41:48,140 --> 01:41:49,660 Dad, how long do you need to set up? 2357 01:41:50,780 --> 01:41:51,220 Um... 2358 01:41:51,900 --> 01:41:52,840 Not too long. 2359 01:41:53,120 --> 01:41:54,760 Boss says you've got five minutes. 2360 01:41:54,840 --> 01:41:55,380 Five minutes is good. 2361 01:41:57,460 --> 01:42:00,840 So we are effectively looking now at, 2362 01:42:01,300 --> 01:42:03,140 you know, whatever propagation 2363 01:42:03,140 --> 01:42:04,420 and wave fronts are coming back 2364 01:42:04,420 --> 01:42:06,000 and we're receiving them all here. 2365 01:42:06,520 --> 01:42:08,260 And let me try and find another plot. 2366 01:42:08,360 --> 01:42:10,380 The cool thing is that you can actually see stuff 2367 01:42:11,640 --> 01:42:13,120 that's actually moving. 2368 01:42:13,920 --> 01:42:14,360 Maybe... 2369 01:42:15,300 --> 01:42:16,160 Not in that one. 2370 01:42:16,220 --> 01:42:19,340 Let me find another one here. 2371 01:42:19,460 --> 01:42:19,720 Ah, here we go. 2372 01:42:19,740 --> 01:42:19,980 Here it is. 2373 01:42:21,500 --> 01:42:22,400 Have a look at this. 2374 01:42:26,940 --> 01:42:27,780 Which is a good one. 2375 01:42:31,160 --> 01:42:35,680 So again, we've got our sort of, um... 2376 01:42:36,360 --> 01:42:38,240 They can't see them aliasing there, 2377 01:42:38,320 --> 01:42:40,420 but we've got our sidebands there, AM. 2378 01:42:40,700 --> 01:42:42,320 And if you actually zoom into one of them, 2379 01:42:42,840 --> 01:42:44,140 you can see... 2380 01:42:44,840 --> 01:42:45,440 Where was it? 2381 01:42:45,660 --> 01:42:46,120 This thing. 2382 01:42:46,220 --> 01:42:47,160 So this should be straight. 2383 01:42:47,280 --> 01:42:47,880 And in this case, 2384 01:42:47,880 --> 01:42:49,280 I wasn't using a GPSDO. 2385 01:42:49,840 --> 01:42:51,640 And I have to go back and reprocess everything 2386 01:42:51,640 --> 01:42:53,820 and do some fine frequency offset. 2387 01:42:53,960 --> 01:42:56,140 I think I calculated that at each step, 2388 01:42:56,400 --> 01:42:59,300 I was losing like 0.02 Hz. 2389 01:42:59,700 --> 01:43:02,680 So even in that tiny amount of frequency offset, 2390 01:43:02,940 --> 01:43:06,300 it ends up actually producing this visible offset over time, 2391 01:43:06,440 --> 01:43:08,640 which is why I need to lock and integrate 2392 01:43:08,640 --> 01:43:10,500 and make sure that you round everything up. 2393 01:43:11,000 --> 01:43:14,580 But, you know, you can see stuff moving there in the middle. 2394 01:43:14,680 --> 01:43:16,520 There's a better plot and... 2395 01:43:17,140 --> 01:43:19,340 Unfortunately, I just can't... 2396 01:43:19,820 --> 01:43:20,660 Oh, that's the one. 2397 01:43:21,380 --> 01:43:23,940 So here, you get this really interesting fringing effect. 2398 01:43:24,240 --> 01:43:25,260 And you can kind of see here, 2399 01:43:25,320 --> 01:43:27,460 there's this discontinuity because I had an overrun. 2400 01:43:27,580 --> 01:43:29,960 So everything, all the timing got desynchronized. 2401 01:43:30,140 --> 01:43:32,760 But you can see here that, you know, 2402 01:43:32,820 --> 01:43:34,420 stuff is actually moving. 2403 01:43:34,560 --> 01:43:35,760 Because this is a range plot 2404 01:43:35,760 --> 01:43:37,580 and these intensities are moving in there, 2405 01:43:38,340 --> 01:43:39,740 there's something out there 2406 01:43:39,740 --> 01:43:41,500 that's actually changing its virtual range 2407 01:43:41,500 --> 01:43:44,240 with respect to my receiver and the transmitter. 2408 01:43:44,420 --> 01:43:46,020 So things are sort of, you know, 2409 01:43:46,020 --> 01:43:47,540 might be getting close or are moving away 2410 01:43:47,540 --> 01:43:49,820 and you get, you know, these sorts of effects there. 2411 01:43:50,020 --> 01:43:50,540 I'm not... 2412 01:43:50,540 --> 01:43:51,920 I haven't looked into it enough. 2413 01:43:52,080 --> 01:43:53,480 I don't actually know what's going on here. 2414 01:43:53,580 --> 01:43:56,940 I have a feeling this is probably more likely the ionosphere 2415 01:43:56,940 --> 01:43:57,740 than the ocean. 2416 01:43:58,040 --> 01:44:01,360 But it might be a combination of both 2417 01:44:01,360 --> 01:44:02,380 or something else completely. 2418 01:44:02,700 --> 01:44:05,260 So if, you know, if anybody has any ideas, 2419 01:44:05,340 --> 01:44:06,380 please talk to me afterward. 2420 01:44:06,740 --> 01:44:08,440 But this is a continuing area of research. 2421 01:44:08,660 --> 01:44:10,420 And when we went out, we used GPS DOs. 2422 01:44:10,480 --> 01:44:12,540 I still have to process all that data 2423 01:44:12,540 --> 01:44:13,960 and optimize my code a little bit 2424 01:44:13,960 --> 01:44:14,980 because it's like... 2425 01:44:16,020 --> 01:44:18,720 many, many gigs of samples to convert. 2426 01:44:19,020 --> 01:44:20,560 But anyway, this is just an experiment. 2427 01:44:20,760 --> 01:44:23,200 Again, a little feel for what you can do. 2428 01:44:23,660 --> 01:44:25,220 And in the last minute, 2429 01:44:25,400 --> 01:44:28,060 I didn't get time to show you, 2430 01:44:29,340 --> 01:44:34,340 but you can also do analog video decoding. 2431 01:44:35,840 --> 01:44:41,900 So FPV on drones ends up actually using NTSC over FM. 2432 01:44:42,620 --> 01:44:44,060 That's the one that I've seen anyway. 2433 01:44:44,060 --> 01:44:46,560 And so when you... 2434 01:44:46,560 --> 01:44:48,080 You can read a flow graph. 2435 01:44:48,140 --> 01:44:49,420 I was mucking around with this a little bit. 2436 01:44:49,560 --> 01:44:50,840 Still very experimental. 2437 01:44:53,140 --> 01:44:53,780 Let's see. 2438 01:44:55,320 --> 01:44:57,940 So my vertical sync needs some improvement there. 2439 01:44:59,320 --> 01:45:00,280 But I've... 2440 01:45:01,240 --> 01:45:04,640 Effectively, this is an NTSC waveform coming in. 2441 01:45:04,900 --> 01:45:07,320 And I've got two match filters that look for 2442 01:45:07,320 --> 01:45:08,820 the vertical sync and the horizontal sync. 2443 01:45:09,080 --> 01:45:11,820 And then it tries to line everything up 2444 01:45:11,820 --> 01:45:12,740 and then give you a picture. 2445 01:45:12,740 --> 01:45:14,680 I didn't actually see color burst in this one, 2446 01:45:14,760 --> 01:45:15,820 so I didn't have any color information. 2447 01:45:16,480 --> 01:45:19,020 And I'm just plotting luminance information anyway. 2448 01:45:19,940 --> 01:45:24,120 But usually, I've found that if... 2449 01:45:24,680 --> 01:45:26,480 I just have to tweak the timing on some stuff. 2450 01:45:28,780 --> 01:45:30,980 But there's some weird blocks that I had to add, 2451 01:45:31,060 --> 01:45:33,700 like certain things to look for peak detection and... 2452 01:45:33,700 --> 01:45:33,980 Whoa. 2453 01:45:36,340 --> 01:45:37,920 But it's kind of getting there. 2454 01:45:38,300 --> 01:45:40,720 If you take out all the special synchronization stuff, 2455 01:45:40,800 --> 01:45:41,480 you get a solid image, 2456 01:45:41,480 --> 01:45:43,860 but then you get a roll in both vertical and horizontal 2457 01:45:43,860 --> 01:45:45,980 because the timing's not quite right. 2458 01:45:46,400 --> 01:45:47,080 But anyway. 2459 01:45:47,600 --> 01:45:48,960 And that's ongoing work, too. 2460 01:45:49,160 --> 01:45:50,760 So if you've got FPV... 2461 01:45:50,760 --> 01:45:53,320 I think someone was gonna bring an FPV thing. 2462 01:45:53,460 --> 01:45:53,820 But anyway. 2463 01:45:55,600 --> 01:45:56,720 It's an old-school signal. 2464 01:45:57,040 --> 01:45:58,700 So I'll wrap it up there. 2465 01:45:58,860 --> 01:46:00,140 Thank you very much for your attention, 2466 01:46:00,320 --> 01:46:01,580 especially for that amount of time.