Chirp Sweep Signal



I’m looking so determine the bandwidth of my system. I will be using the ODrive board to drive a single gimbal motor that will be attached to a UAV. What I’d like to do is to input a sinusoidal exponential chirp/sweep function ( into the system, sweep from 1Hz to about 150-200Hz, and then measure the output. By looking at the phase or amplitude difference between the input and output, I will be able to determine the frequencies at which the system starts to degrade. From there I can look into how to isolate my system better,

I was looking for some assistance as far as the method to go about passing this function, as well as recording the output. I was thinking about using an ethermega 2560 (or Arduino mega 2560; I have both), but I’m not sure about how to get the output back out for post processing. Does anyone have any thoughts?



I think you can use the p command in the ODrive ascii protocol to send your position/velocity setpoints (and current too if you have the inertia). I see that we don’t have a suitable command for getting the encoder feedback, so I added it to devel branch just now. It is command f, the format is f <motornum>, and it gives you back position and velocity.

The commit for this feature is here, and it’s on devel branch. Do you have the tools to compile and flash the firmware?


@madcowswe I was thinking I had to send hundreds of points (that make up the sinusoidal sweep function) to the odrive, but your saying just send the “peak” position values an velocity setpoints and watch the encoder feedback? Does that mean I will have to manually enter each position/velocity, or is there a way to program it in so I when I say “begin” or something, it goes through it all automatically?
PS sorry, not super familiar with ascii protocol, so ill read into it.

I have the ODrive board 24V ODrive V3.5, with firmware version 0.4.7. To compile and flash via Ubuntu, I presume I just follow the direction here? -->