# How to investigate the relation between planning frequency and control response?

I have a speed control system which is part of a hierarchical planning and control stack. The final output of this system is torque and the input is desired speed. The system is experiencing some oscillation which seems related to the highest level of the target speed planning frequency. I have a hunch that the different operational frequencies of various levels of the stack might be having an impact, but I am unsure how best to investigate and quantify the impacts. So I am wondering the following:

1. What are the terms I can use to find information about the impact of input frequency on control response?
2. Are there any well known approaches to analyzing the relation between input frequency and control response so I can more clearly conclude if this is the issue?

The system is developed using ROS, so if there are any ROS package which might help the analysis please let me know.

On the theory side, this is related to the Nyquist Sampling Rate, which is how frequently you must measure a single to get an accurate reconstruction of it's peaks / valleys.

Not suprisingly, Nyquist as a name appears all over some fundamental results in optimal control like the nyquist stability theorem. I suspect the insight you are looking for is right there, but understanding it will require some study. Begin with Nyquist stability, and follow the keywords "Stability, Optimal Control, Sampling Rate", and probably "Nyqist" on Google Scholar. Start with textbooks on optimal control. Understanding the state of the art is actually near impossible from paper sampling (that's where you go to understand what's just beyond the SoA).

On the practical side, I have never seen anything done except the following:

1. Increase the low-level controller to the maximum possible rate (e.g., 100Hz). This loop tries to achieve velocities.
2. Decrease the input to the controller (desired velocities) to the minimum rate and increase only as necessary (e.g 1Hhz). This loop tries to follow paths.
3. Re-plan paths very infrequently (e.g., every few seconds or slower).
4. For time-critical events like hazard avoidance, the robot just ceases these loops temporarily and goes into a hard-coded avoidance maneuver (e.g., BRAKES!) until it can replan.

This seems like an interesting question! Read it once and haven't put a ton of thought into this, but my gut reaction was a disturbance model.

Suppose you had some optimal path, $$P$$. Your path planning could be attempting to map that optimal path, but the calculated path might be constantly updating based on noise in sensor readings, localization estimates, etc.

Your path updates are occurring on some sample interval, which is introducing a disturbance input on the input-side of your control loop. I would try running some models that inject noise at the same frequency and see if that reproduces the results you're seeing.

I don't know what form of control you're using for the controller, but disturbance rejection should be well-studied regardless of the format.

• Thanks for the suggestion! So, you are saying that I could try setting a fixed input, but try adding controlled noise to that input at the frequency I would normally be planning and see if I see the same behavior? That makes quite a bit of sense plus it has the bonus that it would let me see the impact of different noise amounts as well as differing frequencies. Apr 5, 2021 at 0:33
• @user1433734 yeah exactly. You could approach the solution in one of two ways - you can either redesign the controller for disturbance rejection in the target frequency, or you could redesign your path planner to generate updates at a frequency that is not near your controller dynamics. Basically, make the controller less responsive to noise, or make the noise less exciting to the controller. Apr 5, 2021 at 0:52
• Thanks this definitely seems like a good way to think about it. I'll leave the question open for another day or two, but if no one else responses I accept this as the answer. Apr 6, 2021 at 2:07