Control time

Posted on November 18, 2009


First, an update on a couple of modifications I made to the Soapbox.

1 – I put in a seat back to support the rider in those crazy curves:

2 – I had a friendly machine shop weld the freewheeling cogs so that they won’t freewheel anymore:

The reasons for the first of the above are perfectly understandable by anyone; for the second one they may not be so obvious: it’s all about control.

From my little experience with the Soapbox PoC so far, I have gathered two conclusions:

1 – the current controls are extremely non-linear; both the brakes and the accelerators lack proportionality in response and stability in behavior.

2 – even if the controls were absolutely linear, I doubt that any average human being is capable of controlling such a vehicle above very small speeds. Our neuro-motor capabilities are just not up to the challenge.

So, as fun as it is now, it is time to hack the controls of this trike to pieces and re-engineer them into something more usable.

Analyzing the real-world application brings up 3 main problems:

1 – Differential Steering: to steer the vehicle, we need to regulate the speed difference between the two wheels very precisely, and this difference decreases non-linearly with vehicle speed;

2 – Traction Control: the same old basic problem every kind of wheeled vehicle has – applying as much torque on the floor as possible while accelerating or decelerating without skidding – that’s why they invented ABS and ASR, to save us from the messy floors we put ourselves over;

3 – Stability Control: in such a vehicle where the center of gravity rests behind the only wheel axle, the probability of over-steering is quite large; therefore independent wheel torque control to counteract body rotation (also known as ESP) is essential for any real-world usage.

So yes, I’m trying to build what is probably the world’s first Trike with ABS + ASR + ESP. 🙂

There is another fundamental design problem which is also linked to the control equation: if the center of mass is located too close to the front wheel axle, the vehicle may flip over the axle during hard braking and land the rider on its head. If the center of mass is too far back, then the over-steering becomes a big problem even for low speed and long curve radius. To solve this delicate balance, I plan to locate the center of mass adequately close to the front and also rely on the ESP control above described, among other small details.

In the coming weeks, I’ll be hacking up a new electronic control system for the Soapbox. A digital one, of course. Firmware is a lot more flexible than analog circuitry. 😉

This is why welding the freewheels stiff was an essential step: I want the electric motors to have full control of the wheel speed and torque, and so I needed a direct transmission. Exactly how this system will be made, I don’t know and is still under evaluation; but I do know what kind of control algorithm I want to run on it.

There will be a logic or virtual controller for each of the three problems stated above: Steering, Traction, and Stability. You can see them in the diagram below.

This diagram was built with Scicoslab (an open source alternative to Matlab/Simulink) and is a very simplified version of the full simulation I’m working on. The PID blocks are just placeholders, they don’t really have to be PID controllers; in fact, I intend to use Hysteretic control for the motor currents, and possibly Fuzzy control for all else. I hate PIDs. 🙂

I’ll be posting news about this later, when it has enough consistency.