# Understanding RAMSETE Controller

Hi, I wanted to know what a RAMSETE controller does. I saw that it follows a trajectory, so does this mean that it’s not an actual physical controller and instead, it makes the robot, for example, follow an autonomous path? What are the steps I could use to implement this? Thanks!

“Controller” in this context does not mean a physical controller like a XBox Controller. Instead, a "controller’ solves the following problem: we have a mechanism, and we want it to have a specific motion (for example, speed up smoothly until it reaches a certain speed for 5 seconds, then slow down smoothly), and turn that abstract description of motion to what voltage we should actually command the motors. For example, a PID controller might take the speed at which we want to spin a flywheel, and tell us what voltage we should command to flywheel motor.

In the case of the Ramsete controller, we are controlling a drivetrain to move according to a trajectory. So, the trajectory generation function returns a series of robot states (Pose, velocity, acceleration, and turn rate) that our drivetrain should meet over many timesteps. Then the Ramsete controller tells us what speed we should move the wheels in order to accomplish those states. Then, PID controllers tell us what voltage we should command to to the wheels to accomplish the desired wheel velocity.

You might wonder why we can’t use something like PID directly to simply meet our desired velocities and turn rate at any given time. The problem as I understand is that errors in meeting our desired velocities build up over time, without a Ramsete controller in the middle we will have nothing preventing us from drifting off the trajectory.

As for how it works, most teams that use the Ramsete controller probably have no one on their team who fully understands the math an internals, and they treat it like a black box. I don’t think you should necessarily be intimidated by the math, though, and if you want to fully understand it, there’s an explanation in Controls Engineering for FRC. Keep in mind you might have to learn a lot of things before understanding it (including some calculus concepts and matrix math).

For implementation on an FRC robot you should follow:

and read this for more explanation:

3 Likes
{"ft_lang_label":"__label__en","ft_lang_prob":0.91766423,"math_prob":0.7097347,"size":2260,"snap":"2023-40-2023-50","text_gpt3_token_len":461,"char_repetition_ratio":0.11968085,"word_repetition_ratio":0.020887729,"special_character_ratio":0.19646017,"punctuation_ratio":0.09907834,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9525665,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-10-01T06:17:53Z\",\"WARC-Record-ID\":\"<urn:uuid:ca478411-58fc-4450-a4e8-02e1d3471748>\",\"Content-Length\":\"22966\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:e2663a33-7298-42fa-bb60-a5dd9c4e2e88>\",\"WARC-Concurrent-To\":\"<urn:uuid:00873c64-53e4-49f9-892d-f2f8441ba7e6>\",\"WARC-IP-Address\":\"172.64.151.142\",\"WARC-Target-URI\":\"https://www.chiefdelphi.com/t/understanding-ramsete-controller/436253\",\"WARC-Payload-Digest\":\"sha1:XDFW3SB6ICMOOO7W2GJ6TOKXS6JGTGYF\",\"WARC-Block-Digest\":\"sha1:7KJJ2LK7ELLXJL33E3VX22V3MKUZFKES\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-40/CC-MAIN-2023-40_segments_1695233510781.66_warc_CC-MAIN-20231001041719-20231001071719-00812.warc.gz\"}"}