A while back when I was working on tuning the control loops for the expressive degrees of freedom of our robot I thought I’d make a video showing a more fun example of classical controls tuning when you don’t know your system than what I typically see in classrooms.
For this, I’m using a DC motor as an actuator, hall effect quadrature encoder for position sensing, ROS with rqt_plot to visualize the position input and output, dynamic reconfigure to change the control gains, and have a few python scripts to generate and publish reference trajectories.
Step Response
I begin by just publishing a reference step function between 0 and 600 encoder ticks and start twiddling control gains! I’m doing this as quickly as I can to illustrate that you can tune things without actually looking at time domain step response parameters like rise time, settling time, etc.
Note: at 3:27 I mispoke and say “proportional term” when I actually meant “integral term”.
Frequency Response
After first tuning my gains via visual inspection from a step response, I move on to a frequency response to illustrate what tracking of a varying frequency sinusoidal position input looks like.
The basic thing that I’m trying to convey to students is that the rise time and overshoot from our step response can in a way be translated to our frequency response. When the inverse of the frequency is faster than our rise time, we begin to see that the magnitude of our frequency response decreases. When the inverse of the frequency is at about the time that we see an overshoot in step response we begin to see the beginning of a resonant peak in our frequency response.
Putting It All Together
I’m just kidding, this is me goofing off, but system dynamics and controls don’t need be dry and boring! Ignore the commentary, we were delirious from working long hours.