Controlling air suspension, PID or on/off

Hello everyone!

My first post here so hopefully I selected the right section.
I've done some searching on this but find conflicting information and seem to have a bit of problem grasping it all.

I'm building a custom car and have decided on implementing air suspension on it.
Since the controllers available are severely overpriced(IMHO) I've decided to make my own using some Arduino.

My main questions at this stage are related to the control loop.

To explain the system:
Each wheel has an air bag that is filled and emptied through the use of 2 seperate solenoids.
Each wheel also has a potentiometer connected to it to provide height feedback.

The first method I thought of was this:
A slow PID loop taking wheel height as input/feedback.
The problem is using the output in a sensible manner.
First of all there's 2 seperate solenoids and secondly they're on/off.
So even if I have this PID loop, I need a hysteresis of some sort on the output, so a low value will fill the bag and a high value will empty it.

The second method I thought of is as following:
Have 4 fixed values for different ride heights.
Let's say the lowest fixed value is A, it then has a B value that's always A+C, C being the hysteresis value.
This would be easy to control with IF loops:
IF input is less than A = fill
IF input is more than B = empty
ELSE do nothing

The problem arises here that if I hit a little bump, it might make the control loop instantly try to adjust which spontaneously feels wrong.
Maybe it's a better idea to not use the input value directly, but rather average it over 30 seconds and use that for the control loop?

Ideas? Thoughts?

Would highly appreciate some input on this, trying to word it as clearly as possible but finding it a bit difficult. :slight_smile:

Maybe it's a better idea to not use the input value directly, but rather average it over 30 seconds and use that for the control loop?

That should work, but 30 seconds may not be long enough while cornering.

And if you're not making an active suspension you don't have to measure fast or even continuously - One reading per second should be more than enough enough, or maybe just check/monitor the height when you change the height setting or when you start the car, etc.

There is a 'relay' example with the PID_V1 library that shows how to work with slow-reacting devices like relay-controlled heaters. It divides the time into 5-second windows and uses the Output of the PID to decide where in the 5-second window to turn the relay off.

For each 5-second window you can be averaging the height to smooth the Input.

This is a very difficult project. Have you considered the electrical environment you will encounter in the car? Do you know about Load Dump, Reverse Battery, 24 Volt Jump, etc. Your computer must be designed to survive all of the above and a lot more. What happens if the system fails full on or full off? Have you done a DFEMA (Design Failure Effects Mode Analysis). What is your Limp Home Strategy?

DVDdoug:
Good points. I had not even considered turning yet.
I agree that a much slower measuring intervall could be used.

Brings to mind how the car would react to an 'active' solution. As you enter a right turn and the left side starts lowering and the suspension stiffens up to counter whilst the right side softens to level the car out.
Would be interesting to have that as a test mode, this would most likely put high demands on emptying and filling the bags quickly and precisely.

Johnwasser:
Awesome, thanks! I will read up on that to get some inspiration of how it's done.

Gilshultz:
Difficult projects are fun. I have considered the messy enviroment to some degree. Great input tho!

There will be filtration before the arduino, it will not be hooked up straight to the cars 12VDC, this will protected against varius noise and varying voltage levels.
This could be designed to protected against reverse charge, load dump etc.

If the system fails full off nothing happens, no valve will be affected.
If the deflate valve is stuck on the bags will deflate and the car will land on the suspension bump stops, ie limp home.
If the inflate valve is stuck on the bags will inflate to max pressure and raise the car, the suspension will stop against the lower stops.
The compressor cannot push the pressure high enough to cause damage to suspension or bags.

This does bring to mind that I need some kind of seperate surveillance system to indicate if there's a fault, something that does not rely on sensitive electronics.
Perhaps also a "off" switch within reach just in case, much like you can turn TCS off in many cars.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.