Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

P. I. D. for Cruise control

Status
Not open for further replies.

kinarfi

Well-Known Member
I have been working on this cruise control for quite some time and now that it seems to be working, I would like to add integral and derivative control to it. I purchased an AUDIOVOX CRUISE CONTROL CCS-100, but it just would not stay active, so I used some of it's parts and designed my own, but it over and under shoots a lot if the engine isn't pulling a fair amount of load. This is the same circuit as in time step error, but with the lt1001 op amp instead of a lm3324 so it simulates. Hope this isn't double posting.
It is a vacuum activated system and R2, R1, and R7, are the valves that let air in and out of the vacuum chamber that operates the throttle. R2 VAC lets the vacuum in, and R1 VENT and R7 DUMP let air in.
I will be trying to figure this out as I go, but would appreciate some help and advice.
Thank You,
Kinarfi
 

Attachments

  • CRUISE CONTROL.asc
    10.6 KB · Views: 168
  • Cruise Control Spice.png
    Cruise Control Spice.png
    69.3 KB · Views: 352
  • Cruise Control.png
    Cruise Control.png
    119.9 KB · Views: 600
Last edited:
Your circuit is amazingly complex and I am having some trouble figuring out what everything does. It looks like what you are trying to do is to have the ciucuit analize the speed of your tires and modify the throttle based on the sensed speed. From what I can tell this is the correct way of doing things, what confuses me is why are you using a vacuum to control the throttle instead of a motor which would normaly be the case. The motor in my car is a high torque stepper, while the motor in my parents car is simply a low torque dc motor that is driven through a gear system to get more torque.

In your first schematic you have a sine wave of 1Hz going through a 2.2nF dc blocking capacitor. Running off a rough guess from the top of my head, I would say that your sine wave signal isn't getting through (at least not a very strong signal). Your schematics are very cluttered so it is hard to find the real problem. Try simplifying them a little bit and we'll see if that helps.
 
................
From what I can tell this is the correct way of doing things, what confuses me is why are you using a vacuum to control the throttle instead of a motor which would normally be the case. The motor in my car is a high torque stepper, while the motor in my parents car is simply a low torque dc motor that is driven through a gear system to get more torque.
...............
I added an aftermarket cruise control to my old '83 Datsun and it used a vacuum powered diaphragm motor to control the throttle. A vacuum motor is probably cheaper than an electric motor.

Edit: Adding PID to this circuit looks to be difficult since it appears to use some form of PWM to control the vacuum valves. PID is easily added to a pure analog control loop but not sure how to add it to such a PWM circuit without a significant increase in complexity.
 
Last edited:
I appreciate your replies, here's my explanation of the circuit using the 1st .png file, which is the same as the .asc file, The oscillator in use has an 8 hz triangle out put (the 1uf should be 3 uf), it is the mixed with the speed setting and separation setting and a balance setting to give me 2 triangle waves that are separated 1.4 volt and balanced to the amp-out signal. The LM2907-8 frequency to voltage converter is fed with the tach signal from the engine and varies accordingly. The amp-out signal is compared to the two triangle wave form to give me a PWM out put to the vac FET or the Vent FET which opens and closed the valves accordingly. The PID would be applied to amp-out signal from the frequency to voltage converter to make it slower acting.
I attached another .asc that has fixed settings. If you run it, look at upper, lower, and amp-out, then change the frequency of the sine generator and also look at how it effects the vac and vent signals.
This is being used on an off road vehicle, so there is no standard for it, and I started with a vacuum actuated unit that has enough power to move my throttle, even though the new model of the same thing is electric.
If you break it down, by chips, it's quite simple, oscillator, mixer separator, f to v converter, comparators, drivers and voltage regulators (the 12 regulator is more stable than the supply and 8 volt is plenty of voltage for the valves without making them hot.
Thanks
Kinarfi
 

Attachments

  • CRUISE CONTROL 1 setting.asc
    10.6 KB · Views: 153
So it would seem that the PID integrator/differentiator would be included as part of the U13 signal path. This gives some info on implementing analog PID circuits. Selecting the correct time-constants for the compensation is trial-and-error more or less. The lead (differentiator) value is what helps minimize the overshoot your are experiencing. The lag (integrator) value helps minimize any oscillations (hunting) around the set point.
 
I'm missing a few parts for your model, but just guessing it sounds like there is a lot of lag in the system. Maybe you could run a response curve on it. My bet is that there is no gain above 1 or 2 HZ.
 
I'm missing a few parts for your model, but just guessing it sounds like there is a lot of lag in the system. Maybe you could run a response curve on it. My bet is that there is no gain above 1 or 2 HZ.
I doubt that you need a frequency response even that high for a cruise control since speed changes relatively slowly. If you Google "Cruise Control Frequency Response" you will find several articles that mention a loop response rise time of <5s with a frequency response of less than 1Hz.


 
It's OK to use PI control.

The differential part is the one screwing up your system. Kicking "D" completely out the overshoot might happen moderately with a slight overshoot and stabilize within a short time at the setpoint.

For an initial setup us 50% Proportional and 1 minute of Integral control.

Boncuk
 
Last edited:
I revisited the LM2907-8 Data sheet and I think I can cure some of the problem by using 2uf for C2 which will slow the response time and give me a smoother out put at amp-out.
I'll post my results after I get some.
Kinarfi
 
My take. Your RPM could be varying quite a bit and the vaccum increments are pretty discrete, so you may have a "hunting" behavior.

I think the logic becomes somewhat "fuzzy" for control and you need to get things in the digital dimension. It seems like your not using actual spped.

1. Get a good RPM signal. Averaged and to nearest x RPM.
2. Determine if throttle position vs RPM is linear.
3. Limit the rate in which the throttle can vary. (based on #2 and what is reasonable)

Have a micro control the throttle. I don't think you need PID.
 
I was out this previous week and when I was using the higher gears, the unit worked quite well, so I think what I will try next is to use a little larger capacitor for C2 on the LM2907 which should slow the response to over and under RPM situations and allow the vacuum actuator to keep up with variations. PID does seem excessive, especially when the speed is set by a pot and can be changed so simply. After I get done, I'll come back and make a post about the results. Again,
Thanks for the help,
Kinarfi
 
Last edited:
update

here's where I'm at today, still need to do some more testing, It's cold outside here, but I'm fishing for comments and suggestions. It appears to use the integral of the frequency conversion to move the set point wave form away form the throttle input and will hopefully slow the engine response.
The .asc file has the circuit twice, one with the throttle at 0 and one with the throttle at 1.
The picture is of the the results from 2 different simulations added to the same picture.
Kinarfi
 

Attachments

  • Cruise Control Fast Responce--000 X 2.asc
    27.6 KB · Views: 182
  • INTEGRAL.png
    INTEGRAL.png
    188.2 KB · Views: 194
here you go, I mount the pcb in an aluminum box and it goes in the dash of my ohv, connected to the ohv via 25 pin D connector.

**broken link removed** on webshots

Interesting problem, the aluminum electrolytic cap at the bottom center of the .asc file had to be put in back to back until I find a non polarized 10uf because leakage at the higher freq was messing things up, the vent would stay on(closed) so the throttle would not back off, <BENCH testing> , I plan to function test shortly.

kinarfi
 

Attachments

  • CRUISE CONTROL FAST RESPONSE W INTEGRAL.jpg
    CRUISE CONTROL FAST RESPONSE W INTEGRAL.jpg
    1.8 MB · Views: 308
  • Cruise Control Fast Responce--000.asc
    14.6 KB · Views: 145
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top