top of page
Search

Control System: how it works and why

  • Writer: Kirsty
    Kirsty
  • Apr 1, 2020
  • 2 min read

Updated: Apr 8, 2020

In order to implement the autonomous part of the semi-autonomous trike, we needed a way to automate steering and speed control. So the team sat down to discuss how we were going implement driving control. Note: for an explanation on the trike's level of autonomy please see the previous blog posts.


Steering Control


Speed Control


Implementation

In order to control the automated steering and speed for the trike, we needed some form of control system. Having worked with PID controllers in the past, I felt that a PID system would be the best fit since they have numerous online resources, making it also very easy to translate them into Python. One setback of a PID controller is the time and effort needed to tune the system, but this was considered to be outweighed by the time savings when developing a control system method that the team understood well.

Anti-windup

One major problem I encountered with PID controllers was the windup due to the integral term. Also known as integral windup, this is when a large change in the setpoint occurs and the integral term accumulates significant error during the rise (windup), thereby slowing down the system response. It is apparent in the figures below that the controller is attempting to output a value beyond what is possible and is blind to this saturation. Within the controller we can add an anti-windup block which will remove the integral buildup when the output saturates.


The end code which can be found on our GitHub repository and is based off of pseudo-code and sample PID scripts found online. There was the possibility of importing a Python PID library, but by writing the code ourselves we had the flexibility to add any additional features. For example if we needed any fuzzy-logic controls to improve the driving it could be easily inserted.

Testing

Due to COVID-19 around mid-March we had to stop meeting in person, this meant that testing the PID software and tuning were not possible. I looked into testing the PID code via other means back in January, which left me with two options.

  1. Build a test setup to control via PID, such as a heating element with a temperature sensor to determine how well the PID could maintain its target temperatures.

  2. Build a simulation test which would include simulating the input response, effects from the controller output and effects on feedback. Such as simulating the effects of friction, acceleration and deceleration to simulate a driving scenario.

Both of these options seemed too time and energy intensive and while still a possibility -given the updated acceptance criteria in the wake of COVID-19 -have been tabled.

 
 
 

Comments


bottom of page