Page 1 of 1

C187 PID help

PostPosted: Wed Feb 03, 2021 8:46 pm
by Donovan CR6
So i've been trying to use PID to control automatic tyre inflation.
So there is a inflate solenoid , deflate solenoid and pressure sensor.
I've been using a constant aim value for now the problem i've been having is that as soon a the solenoid inflates obviously the pressure goes higher than the aim and deflates again.
I Added a small log file
Tyre pressure rear
PID 1 output
PID Integral out

Maybe i've missed something important

Thanks in advanced

Re: C187 PID help

PostPosted: Thu Feb 04, 2021 2:59 am
by quadcam
Before adjusting PID settings can you explain how the pressure reading represents the actual tyre pressure? Is the pressure sensor in the inflate / deflate line? The log shows that the tyre pressure can go up by 2.5 bar in about 0.2 sec and down very fast also, so this does not seem like the real tyre pressure.

Also from the log, the tyre pressure starts to go up from the minimum value while the PID output value is still -ve. From the config it appears when the PID value is -ve the dash sends a deflate command to a PDM, so what can make the tyre pressure start to increase before the PID output goes +ve?

It looks like an interesting installation by the log channels!

Re: C187 PID help

PostPosted: Thu Feb 04, 2021 11:38 pm
by Donovan CR6
Yes that is correct, the only way it will work is if the pressure sensor is in the tyre. Putting a sensor in the tyre is not viable at the moment. I was hoping to maybe find another way.

Re: C187 PID help

PostPosted: Fri Feb 05, 2021 1:58 am
by quadcam
As the pressure sensor is in the inflate / deflate line maybe you could inhibit the solenoids and sample the pressure after a suitable time for the pressure to equalise in the line. Then run the control algorithm for a fixed time and then resample, etc. In order to calculate control times between pressure sampling can you ascertain (from some static testing) typical inflation and deflation rates with the solenoids?

Also, as the PDM signals from the dash are inflate or deflate only (and not related to the actual pressure error or solenoid duty cycles), is there any need to use a PID function? I think you could achieve the same inflate / deflate commands with a 3D-Table and some hysteresis in the table values.

To measure the pressure I think you could use cascading timers (where each one finishes and starts the next timer) and a maths channel with a condition. The first time would be a settling timer to allow the pressure to stabilise, the next would be a timer where the pressure reading would be valid and the other would be the inflate deflate timer (which could also be no action if the pressure is in range). The condition for the maths channel would be the reading valid timer value.

Could that work?

Edit: Actually, it could probably be done with one timer where the different validities are unique ranges in the timer period.