Ben Riley talk HRV Technology

April 18, 2024 00:31:58
Ben Riley talk HRV Technology
Heart Rate Variability Podcast
Ben Riley talk HRV Technology

Apr 18 2024 | 00:31:58

/

Show Notes

Ben Riley joins Matt to discuss the technology behind heart rate variability. Learn what is behind those numbers that seemingly magically appear on your phone or watch. 

View Full Transcript

Episode Transcript

[00:00:00] Speaker A: Welcome to the Heart Rate Variability podcast. Each week we talk about heart rate variability and how it can be used to improve your overall health and wellness. Please consider the information in this podcast for your informational use and not medical advice. Please see your medical provider to apply any of the strategies outlined in this episode. Heart Rate Variability Podcast is a production of Optimal LLC and optimal HRV. Check us [email protected] dot. Please enjoy the show. Welcome, friends, to the Heart Rate variability podcast. I am Matt Bennett. I am here with my good friend Ben Riley from optimal HRV. Ben, how are you doing today? [00:00:43] Speaker B: Good, thank you. Yes, it is nearly sunny here in the UK. Who knew that was a thing? [00:00:48] Speaker A: Awesome. Good, good. I know, that's what I've learned about the UK. That's a rare thing pretty much any time of the year. So I hope you enjoy that. I'm excited to have Ben on today. If you follow optimal. And again, if you don't, stay tuned. This podcast is not just going to be about the work at optimal. You know, we've released a few weeks ago, about a month plus ago now the optimal zone, where during your biofeedback mindfulness readings, we give you real time feedback on how your breathing is impacting your low frequency hrV. And one of the things that I think is, as I listened to other podcasts around heart rate variability and other sort of wellness, we don't talk a lot about the technology. Heavy lifting behind the scenes, I think, and I was guilty of this as well. Oh, you want a heart rate variability app contract with a couple of developers, and in two weeks you've got a totally functional app. And I've learned otherwise since being on this journey. So, Ben, I would love to just start out kind of talking a little bit about with this new build and trying to track real time low frequency, providing optimal zone to feedback like we are. What does this look like? I put a wristband on and things magically get transmitted to my phone. But what are we talking about? Nerd out with us a little bit on the data transfer. What are you seeing from the development in and how does that end up giving me optimal zone or my RMSSD after a three minute reading? [00:02:36] Speaker B: Yeah, unfortunately, it's not magic. I wish it was, but it's. But the cool thing is that it is just sort of sensible logic, I guess. So if we just talk through sort of the experience, right, you go and put a, you put the armband on, you go and connect in to the app and you start going. What we start doing is we start streaming various ri intervals, basically, but it's actually, we stream it in binary just for added complexity. [00:03:13] Speaker A: I stop you there. So the device. I thought the device would send you a nice thing called an RR interval. But when you showed me the data, unfortunately, it's almost like a jumble of nonsensical numbers. So you're not necessarily just getting something so clean initially either, are you? [00:03:33] Speaker B: No, you're essentially every sample. So sort of every millisecond, essentially, we're collecting some binary code. So it's in four little quadrants, and it can be essentially unintelligible, apart from when you know the name of your device. So we know that we're looking for HRV devices, and that means that that four little sequence code to us can be then translated into not just intervals, like RR intervals. There's a ton of stuff that sits behind all of the calculations that we sort of stream back and forth. But the logical, the sensible part that we try and then apply is actually what's. What is sort of real and what is not. Maybe artifact, which is something that I think people might be familiar with. [00:04:26] Speaker A: Yeah, I'd love that. Like, talk about that a little bit, because artifact's a big issue, obviously. [00:04:33] Speaker B: You know, it's. If you're sneezing on a trampoline, going for a run versus deadly, still, it's two very different states. Right. And so the ability for your censor to read what your body is essentially doing, we give it challenges, and those challenges get named artifact. And so if we spot particularly low intervals or particularly high intervals, or we see a group or a cluster of data that just seems to be almost idle, like it's just not doing anything, or it's like your car has stopped at a traffic light, we can sort of pick that out. And so as part of that binary that we get sent and we start to analyze and have a look at, we'll start to not just take it that it is all real and that it is all true, but we'll start to analyze it. And it's really important to analyze it to make sure that we take out sections of things that just don't quite add up or alike. Because you've moved around a little bit, and it can be a tiny, tiny vibration. It doesn't take much, but we're also collecting so much data that also doesn't really matter on a trampoline. Right. Don't be doing those things. But so just being sat reasonably still is fine for us, but you'd be amazed at the amount of artifact that we have to sort of clean out of your. Your data points to give you the most accurate reading that you can have. And so you don't sort of, you know, sit above or below a threshold that is, you know, either impossible to reach or just not quite, you know, where. Whereabouts you should be. Does that make sense? [00:06:14] Speaker A: And how you tell our folks, I know we've had these discussions internally, but, you know, looking at, you know, because if I. If I remember correctly, there was like, if you. If you set artifact too aggressively, you might not have enough data to give people their HRV scores. Yeah, but if you set it too loose, you're not giving them accurate scores. So, you know, how sort of do you look at that from. From the technology side? [00:06:43] Speaker B: When we look at artifact, we look at a whole host of different boundaries. So the simple stuff is the low end and the high end. So without going too much into, I guess, some of the numbers and bits and pieces, we sort of set a low end around 300 and a high end around 1800. So anything that sits in that range is seen as being pretty, pretty sensible for us. But there are other sort of questions to answer. So what do you do if everything is around one of those? If everything is around the 1800 mark or everything is around the 300 mark, what do we do? We just see that as maybe the devices is set wrong? Do we see it is that actually this is just whereabouts that person is and they're just right on that sort of cusp of collection where we've got particular growth in number and it just keeps on going. Keeps on going. There's typically waves within those intervals. And so we look at all of these different calculations and essentially strip out stuff that just doesn't meet what we would see as being, like, the highest standard for. For collection. Like, you shouldn't be able to have big jumps between your intervals. You shouldn't go from 800 to a 1500 and then back down to an 800. You'd see that 1500 as being a bit of an outlier. Right. So there's these different kind of patterns and analytics that we run to make sure that things are sensible and that actually we're not. You know, you're not getting a score that kind of throws your day wildly out of whack. [00:08:31] Speaker A: Yeah. So all this is happening before. We then apply these incredibly complex. If you've never seen RMSSD, the actual equation, I encourage our listeners to go Google that really quickly and see if that makes any logical sense whatsoever. So, Ben, I don't know if when you joined our team, you had any idea kind of what you were signing up for? So is there anything else, before we apply another level of complexity on top of this, anything else we do before we start the heart rate variability, actual configuration? [00:09:10] Speaker B: Not really. I think one thing to be super clear on is we do store every piece of data we get, be good or bad, and then we strip stuff out from it. So as we try and learn, as we sort of, as our development team tries to work out how to maintain accurate readings and the rest of it, we want to make sure that actually, we don't chuck any of that information away, and so that we can look back at historical records and we can look back at historical readings just to make sure that all of our algorithms that are processing are doing it sort of correctly. But essentially, once that artifact processing piece has been completed, we're kind of good to go. We've got enough to then be able to provide you some serious. Some serious analysis of your data points and then also be able to say, right, here are. Here are your various readings and calculations. But depending on the type of reading you're doing will depend on the type of calculations that we run. So if you're doing, say, your three minute morning reading, it's a little bit different how we process that data compared to, say, a biofeedback session or a mindfulness session. [00:10:22] Speaker A: Right. Well, let's, you know, with the. With the RMSSD, the three minute reading, I, you know, do. Basically, we take all the data that got through the artifacting process, stick it into an equation that I did not take enough school and math to really fully understand what I'm looking. I, you know, I think there's square roots and all kinds of fun stuff in there. You know what? We put it in there, and then that kicks out the RMSSD score. Do I have. Am I close to that vehicle? [00:10:54] Speaker B: I mean, not far off. Right. So we're looking at successive heartbeats and then squaring the differences, and then we average them just for good fun. And then I think we look at the square root of that average to get your final rms, which is incredibly complex. And I say that slightly casually, but from a. From a coding perspective, it's a reasonably straightforward equation that capture that capture process and then the artifact or treating that information to make sure it's accurate. And the rest of it really allows us just to plug that into some formula code that we run to be able to push out your RMSSD. There's terms in some of the software world around garbage in, garbage out. So if you put garbage in something, you're going to get a poor result. So we like to make sure that everything pre. That processing is as good as we possibly can be, and then it means that we can hit that sort of square root and the rest of it that's associated, and then give you a super accurate reading. And that's really important. [00:12:07] Speaker A: So then we then embarked on optimal zone. And I kind of. When I say embark, I think it was our version of the Odyssey, as long as it took. So for those that are not on the optimal app, we've been working hard. Again, when I say it's an odyssey, you could probably read the Odyssey 100 times as long as it took us to put all these pieces together. So it was a lot of heavy lifting, of giving people feedback in the moment. And we can define moment is not necessarily a second, but that 62nd interval. And I just. I'm curious of how that development process providing real time feedback, how that was different, and some of the challenges we had to overcome to, again, ensure that accuracy in a more real time way. [00:13:08] Speaker B: Yeah, real time is the. Is the complex part, right. The good thing about collecting all of the stream data that we stream, we can always look back historically and provide calculations. Even though six months ago, we didn't have the capability to give somebody their optimal zone against a reading. We can do all that historically, which is super cool. But what we wanted, I think, taking things to the next level for us, was being able to do in real time, like driving the car and changing the wheels, or whatever metaphor you want to use. So what that means is that we'd have to stream the data so that we are sort of capturing it in real time, and not just capturing it, but storing it in real time, applying some of those calculations around artifact in real time, and then running the calculations also in real time. So essentially what we're doing is we're taking a 62nd sort of buffer, a 62nd loop of information. So, 1st, 60 seconds, we're just collecting data, which gives us enough to then provide a seriously accurate optimal zone. If you use kind of. Not if you don't have enough data, or if you go too far the other way, the readings are just. It's not enough to get through, basically, there's just not enough data to provide sort of an accurate reading. So 60 seconds is kind of there, or thereabouts in terms of the amount of data that you need. And so we had to figure out a way to be able to stream that, collect it, clean it, and then, of course, every second that goes by, you're removing a second and you're adding a new second's worth of data. So you're sort of, you know, adding to the front, taking off the back, whichever way you want to sort of see it. So that was, that was sort of some serious concepts in being able to do that. And then the plethora of problems that can occur. Your phone, you know, the network drops, you accidentally turn your bluetooth off and on, the device is running on low battery or, you know, so on and so forth. There's various things that can happen during that, and we sort of try and cater to them in a way that will sort of, you know, provide the least frustrating experience that you can sort of have. Right. You're 20 minutes into a biofeedback reading and it all turns off. That's a little bit annoying. Totally understand that. But ultimately what we do is we've managed to build some tech that will allow us to do all of that in real time, store of that information. Also, at the same time, imagine there's two threads going on there and then run rolling calculations. Every time we move on to a new second, we're running calculations. So if you imagine across the 20 minutes reading, that's quite a serious amount because after the first 60 seconds, it's a little bit more frequent than per second that we do the calculations. But it's essentially then every second going on. So some loose maths with the number of subscribers and people doing it, there's a lot of processing power going on in the background. And then we, as part of that, we then have to calculate three different metrics. So it's your low frequency, your very low frequency, your high frequency to make your total power. And then as part of that, we want to understand where your percentage gain, where your percentage of your low frequency is to that total power. So super complex, lots of room for mistakes now, which is, you know, a lot of testing had to go into it, a lot of trial and figuring it out. When we first did it, we were doing it in sequential minute blocks. So we do a minute and then calculate your optimal zone and then do another minute and calculate it. But we decided if we're going to do it, we're going to do it properly, we're going to do it real time. We've got to see where people are and get people to realize so they can train themselves. Right? Like if you're right, you know, if you're into your running and you're trying to run yourself in a zone two. Right. You know, heart rate, you need immediate, you want immediate feedback more than just being able to talk to somebody on your own. Right. That's a good starter point, but you want to go and win your race, you're going to get that data points kind of spot on. We feel the same with the optional zone. So super complex. [00:17:28] Speaker A: Yeah. So it sounds like if you're doing a math problem, it's like doing a math problem, but somebody every second or fraction of the second is telling you, you giving you new data, you have to incorporate into your answer and just continuously doing that for the link and then again, then applying all the algorithms on top of it and then a calculation to get you this one metric. [00:17:58] Speaker B: Yeah. I mean, as you think about it, we sort of have to pull together both. So the addition and then removal of data. So just the addition of the streamed information. Then we've got to chop off the front of it. Chop off the back of it. They'll add the back of it. And then we have to decide, okay, then we have to run two or three calculations, depending on what we're doing. So get your lf get your total power, and then we have to do the final one, which is. Okay, are we in zone or not? Right. Is this. And then as soon as you've done all of that, you got to do it again. You got to do it again. And then, of course, at the end of it, what we want to do is then start. We only collect, we essentially collect all of those different calculation points and then we look to. For the entire session. Right. So now we've got however many over all of those things over all of those minutes, be it two minutes to 20, to however long you've gone on for, how do you then calculate all your averages? We need all of that data, so we've got to store it all. Yes. A minor headache is, is. But it's all, you know, it's great. It's in, it's super powerful. So I think the team are very proud of it. But it was some headaches when it comes to figuring out how to do it. [00:19:15] Speaker A: Yeah. And there's a constant communication between. I've learned the concept of APIs. It's so much so it's haunted my dreams during this process. But. So we're constantly transferring information from the phone into the cloud, calculating it there and sending it back. [00:19:39] Speaker B: Yeah, we'd use the term we're streaming. So just like you would stream a movie off of whatever Netflix, it's that same tv to cloud server and back for us. So if you think of. You've got your. Let's just say it's your wearable on your arm. It's. That's talking to your phone. Your phone is talking to our cloud. Our cloud is running some calculations and then feeding it back all within, all within milliseconds. And actually, we do it across multiple streams because there's so much data that we're processing back and forth that it is technically not one, but I think it's two or three that we actually. That you're doing as part of any reading. So, yes, lots of things in tow that all need to be playing nicely together to get it working. And then the final calculation piece, which, right at the end, is when we then amalgamate all of that data together from the cloud and kick it back into your mobile. [00:20:43] Speaker A: Awesome. And if I'm correct and we're looking at this option, but it could be a real challenge, too, is one of the reasons we don't do that all on someone's phone, is just we would need, without some real creative work from our dev team. We probably need a quarter of your phone's memory in order to do all this pieces. Am I kind of right with that? [00:21:07] Speaker B: You'd need quite a lot. I mean, the. The goal in my mind, for a lot of the optimal zone is real time. And so I've actually just got a new ish phone, so I think it could potentially handle it. But there's so many different variants of that. Phones that exist and everybody knows has different health and battery life and associated processing and all that. [00:21:32] Speaker A: You don't throw away your old phone. If you're on the optimal team, we'll test on those. [00:21:37] Speaker B: We'll keep it because we want to. [00:21:38] Speaker A: See how it holds up. [00:21:39] Speaker B: Yeah, but what we are looking at is maybe some sort of offline options for if your network drops out, you're on a plane somewhere and you haven't got Wifi or there's various scenarios that. But for me, the real pro, like, the real goal of optical zone is knowing at that moment, right, are you in it? Are you out of it? How do you adjust your breathing cadence to sort of hit that? And so there are, you know, there are questions as to whether it's any good to sort of save a reading or, you know, do it offline, so to speak. And if actually your phone would just set on fire because it's out of. [00:22:16] Speaker A: A lot of processing, not good for the airplane flight, so less good and. [00:22:23] Speaker B: Probably, you know, better turbulence, the artifact would be slightly wild as well. Yeah, that's true. Yeah, it's. But you are right, it is a lot of processing power. It's a lot of calculations that get run. So I'm sure as people sort of use it and have used it, probably think, why do we do it? Like, why is this a problem? It's just need a lot of horsepower. [00:22:46] Speaker A: Yeah. So I would just kind of like to start to wrap up just by what insights have you gained? I think you and I have been so focused on getting optimal zone out the testing aspects of it that I actually, this is a real time question that I haven't asked you sort of off just between our conversations, just sort of through the experiences, especially with optimal zone, but just with your experience working with us over the years, what are just some, I don't know, insights that you have had if you really become an expert on heart rate variability in order to really help us do this, if you don't understand it, I mean, ina myself, we can throw things at you, but, you know, your learning curve has been so impressive in understanding these biometrics over the years. So just wanted to just kind of see your insights and impressions at this point in your journey too. [00:23:49] Speaker B: So what I found, I mean, the whole, I was completely oblivious to HIV, let alone RM, SSD, let alone frequency domain, time domain, nonlinear stuff like Welsh's periogram, power, natural log, like these terms that I've just amazingly rattled off. I mean, it's a fascinating world, right? It's truly amazing. And the bits that I've sort of found, especially around optimal zone, just picking on that sort of component, understanding some of the mathematics that sit behind it to do those calculations. And so, for example, I know that we. And I don't even know if I'm pronouncing some of these things correctly, right? This is how much mine has just been sort of self taught investigation, et cetera, et cetera, like doing calculations. I know that we use sort of Welch's like periogram, I think it's called, to do those calculations of frequency. I'm still not 100% sure on the origins of frequency. And when you start to delve into some of the requirements and the documents associated to it, there's a whole world there that could be an entire career for the next 40 years of learning. But it's fascinating. It's been fascinating from my side in terms of understanding that. Understanding the points that switch from very low to low to high frequency, the impacts and the associated training that you can do to improve those things that's been unreal, that's been incredible, but also things like spectral analysis. There was a time where we were doing the research for this. I don't know if you remember this, Matt, where I remember reading and trying to understand so much about spectral analysis and how that works and why you need. In this case, we settled on 60 seconds of data. It's as a learning opportunity. Incredible just to be able to have some of these. I'm sure I'm in the top 0.1% of people who can talk about spectrum analysis. [00:26:04] Speaker A: Yeah. [00:26:05] Speaker B: Which to many people is not cool, but to me, I'm like, yeah, we went through this battle. It's like, you know, it was so understanding that and trying to apply that in a way that ultimately somebody else doesn't have to go through that battle to be able to get, to get into an optimal zone, to be able to train where they're getting. So I feel sort of like I've genuinely helped and genuinely sort of been a part of that process. So, yeah, incredible. If people want to go and start googling spectral analysis and the associations to it, I'll happily move down the high percentage problem. [00:26:47] Speaker A: I've googled it, and I'm glad you have the brain that you have in your head to hold both the technology and the biometric side of that because. [00:26:59] Speaker B: It might fall out. [00:26:59] Speaker A: It's such a rat. You know, if our listeners haven't, if you're newer to the podcast, Fred Shearer, I did a great job of explaining a few, a few months ago about the frequency domains. And I mean, it's still like, okay, I think I could explain it to somebody who's brand new, but it's, it's like you said, I think it's a lifelong journey to really, really understand the, I mean, there's some real brilliance behind this, but, you know, we're just looking for fluctuations of heartbeats, and yet behind that is so complex. [00:27:39] Speaker B: Yeah, it's incredible. It's incredible. And I knew I was in trouble when I was looking through some of the documentation, and there are words in there that just, I had no idea. It's like, right, let's see what we can figure out, figure out this evening. [00:27:52] Speaker A: So, yeah, I mean, the good thing is for our listeners who might feel a little bit lost, is this, is that, you know, we would ask ina some questions who, you know, you can raise bids like, you know, definitely the 1% if not a higher fraction of that. Ina been, you know, world expert on this. And then we're asking Fred and other folks to help us, you know, with some of these questions. I mean, we're pushing the world experts on this, and they were incredibly helpful. And yet it wasn't like a quick answer a lot of times, either. It was a working it out, trying to figure this out again with the top experts in the field, which we're fortunate enough to have contact with. And it's a spectacular world. And what I love is you hit up against these walls, and there may not be an answer, but you hit up against the wall of, okay, maybe ten years from now, how can we contribute to looking on the other side of the wall and pushing that wall through research and other things just a little bit further and increasing our knowledge out? But I don't know. I kind of like living out on that edge of, you know, the field's knowledge. [00:29:16] Speaker B: Absolutely. I mean, the fun. I mean, you might not. I think so, but it would be when we're looking through some of the data sets, right, and you collect some data and you sort of say, well, does this meet, does this meet our criteria or not? Everyone has to go away and try and figure it out. And then essentially, all we've done is figure out that to the point where now we can do it in a fraction of a second. So that sort of analysis and learning has been fascinating, frustrating, for sure, right, in trying to. Trying to figure it out and do it. But, yeah, it's been. It's. It's been great. And see it now in live and doing its stuff and knowing the complexity in the background, it's a proud moment. So, yeah, it's great. [00:30:01] Speaker A: Yeah, absolutely. Well, Ben, I really appreciate your time and walking us through this. Like I said, one of the things that you don't hear, or I haven't heard on a lot of podcasts is really what's going on behind the scenes. We spit out numbers. Your watch spits out the numbers. Our strap spits out numbers, your channel, you know, and then some magic seems to happen on the phone that just gives you this number. And I think for a lot of us who are fortunate enough to live in this time where we don't have to do the algorithms on paper, you know, it's. It's great to get that. But understanding how we get to that, that metric, I just think is incredibly fascinating and just appreciate that people like you exist in the world. So. Because if I had to learn all this and then what the heck you all do on the dev team to make this a reality on my phone, I would have given up a long time ago. So I just appreciate you all. I do want to shout out to Ali, Doc and Viv as well, our dev team who I think really tracked especially with optimal zone, some really innovative ground and I think we've been struggling with it for so long. It's just like God, get this thing out into the world. But really hopefully potentially a metric that can live alongside low frequency and high frequency and these logs and all this stuff is a real practical metric of usable for biofeedback for decades to come. So absolutely we push that wall of understanding a little bit more with all your hard work. [00:31:41] Speaker B: It's open. I think we will. [00:31:44] Speaker A: Awesome. Well, Ben, thank you so much. And to our listeners, thank you as well. As always. You can find show notes, videos, everything you [email protected]. And we'll see you next week. Thanks, Ben. [00:31:57] Speaker B: Pleasure. Thanks, Matt.

Other Episodes

Episode 0

September 08, 2020 00:32:34
Episode Cover

Gaining Insight through Heart Rate Variability Tags

In this episode, Matt and Jeff talk about the insight tags can provide when measuring how certain activities and behavior impact overall health and...

Listen

Episode 0

July 13, 2023 00:55:37
Episode Cover

Dr. Cisco Reyes talks HRV and Athletic Training

In this episode, Dr. Cisco Reyes joins Matt and Dr. Dave to discuss his word at Linfield University. Dr. Reyes has utilized HRV to...

Listen

Episode 0

March 30, 2021 00:24:40
Episode Cover

The Rest of the (Matt's HRV) Story

Back from our adventures in the Wayback machine, Jeff and Matt update listeners on the journey since the Trauma-Informed Lens podcast series on heart...

Listen