<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Questions about qrb5165-imu-server and specifically ICM42688 sample rates]]></title><description><![CDATA[<p dir="auto">I saved a log using <code>voxl-logger --preset_odometry</code> with the intent of creating some data sets to try other VIO solutions. I was curious about the sample rate (before I thought about looking in <code>/etc/modalai/voxl-imu-server.conf</code>, where it is configured to 1000 Hz) and decided to calculate it based on the actual data. The image shows a sequence of <code>1e9/data_imu['timestamp(ns)'].diff()[1:200]</code> which corresponds to the instantaneous frequency between two samples.</p>
<p dir="auto"><img src="/assets/uploads/files/1696945051758-output.png" alt="output.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">First I noticed that there is an offset from the 1000 Hz configured, which according to <a href="https://gitlab.com/voxl-public/voxl-sdk/services/qrb5165-imu-server/-/blob/master/server/src/icm42688.c" rel="nofollow ugc">icm42688.c</a> on line 117, the IMU should be able to reach. I find that the mean of this frequency, which is around 1023.89, is suspiciously related to the inverse of the <code>#define STARTING_CLOCK_RATIO	0.9765625</code> (which is excactly 1/1.024) parameter in the ICM42688 driver. Is this supposed to mean that the IMU runs at a deterministic 1.024x too fast, or am I missing something?</p>
<p dir="auto">The second thing I notice is that the frequency (and in turn the delta-time) varies a lot.  I see that the timestamp from the sensor itself it not used, but that they are instead generated manually using the <code>rc_ts_filter_...</code> functions. I imagine that the sensor itself is a lot more consistent than this, even if the actual frequency might have some bias. So is this timestamp misleading? Too rough of an approximation?</p>
]]></description><link>https://forum.modalai.com/topic/2740/questions-about-qrb5165-imu-server-and-specifically-icm42688-sample-rates</link><generator>RSS for Node</generator><lastBuildDate>Mon, 08 Jun 2026 05:07:00 GMT</lastBuildDate><atom:link href="https://forum.modalai.com/topic/2740.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 10 Oct 2023 14:05:24 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Questions about qrb5165-imu-server and specifically ICM42688 sample rates on Wed, 11 Oct 2023 06:21:14 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.modalai.com/uid/11">@James-Strawson</a> That makes a ton of sense, thanks for the explanation! Also just noticed that it mentions this right above the definition. I should just learn to use my eyes <img src="https://forum.modalai.com/assets/plugins/nodebb-plugin-emoji/emoji/android/1f601.png?v=r4gp3i66d9g" class="not-responsive emoji emoji-android emoji--grin" title=":grin:" alt="😁" /></p>
]]></description><link>https://forum.modalai.com/post/12636</link><guid isPermaLink="true">https://forum.modalai.com/post/12636</guid><dc:creator><![CDATA[peterkrull]]></dc:creator><pubDate>Wed, 11 Oct 2023 06:21:14 GMT</pubDate></item><item><title><![CDATA[Reply to Questions about qrb5165-imu-server and specifically ICM42688 sample rates on Tue, 10 Oct 2023 19:59:36 GMT]]></title><description><![CDATA[<p dir="auto">0.9765625 = 32/32.768</p>
<p dir="auto">The ICM42688 will run at roughly 32khz +- a few percent when running off its own internal oscillator. Optionally, you can drive it from a standard 32.768khz crystal which is what we opted to do on VOXL2 so the sample rate is consistent between boards.</p>
]]></description><link>https://forum.modalai.com/post/12624</link><guid isPermaLink="true">https://forum.modalai.com/post/12624</guid><dc:creator><![CDATA[James Strawson]]></dc:creator><pubDate>Tue, 10 Oct 2023 19:59:36 GMT</pubDate></item><item><title><![CDATA[Reply to Questions about qrb5165-imu-server and specifically ICM42688 sample rates on Tue, 10 Oct 2023 17:23:03 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.modalai.com/uid/206">@Moderator</a> I would just have expected the frequency graph to be smoother. I guess I could adjust the phase_constant and scale_constant parameters if it even turns out to be an issue. I am still a bit confused by the <code>STARTING_CLOCK_RATIO 0.9765625</code> == 1/1.024 thing. Do these IMUs come from the factory with a clock that is biased like that, and is it just chance that a good initialization for the clock ratio is 1e3/(2^10)?</p>
]]></description><link>https://forum.modalai.com/post/12620</link><guid isPermaLink="true">https://forum.modalai.com/post/12620</guid><dc:creator><![CDATA[peterkrull]]></dc:creator><pubDate>Tue, 10 Oct 2023 17:23:03 GMT</pubDate></item><item><title><![CDATA[Reply to Questions about qrb5165-imu-server and specifically ICM42688 sample rates on Tue, 10 Oct 2023 15:35:59 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.modalai.com/uid/1894">@peterkrull</a> These IMU have inaccuracies in their clocks. The code you are referring to is trying to calculate and adjust for those inaccuracies to provide a more consistent measurement. Otherwise, there would be gaps. The frequency offset could be different for each power cycle or each IMU, so it is generated online.</p>
]]></description><link>https://forum.modalai.com/post/12615</link><guid isPermaLink="true">https://forum.modalai.com/post/12615</guid><dc:creator><![CDATA[Moderator]]></dc:creator><pubDate>Tue, 10 Oct 2023 15:35:59 GMT</pubDate></item></channel></rss>