LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Fuzzy -> PID produces jumpy output control

I'm working on a VI that will control the voltage to a blower and I'm trying to do a fuzzy controlled PID to get the pressure of a chamber to the setpoint.

 

When I test it out on the actual system the voltage output from the PID jumps up to a fixed voltage and holds it there for a while making the pressure overshoot the setpoint by a long ways. After a while it will move the voltage down and hold it at another fixed point for a while.

 

Right as of right now its just the setpoint going into the "fuzzy controller" function, the P output from that goes into a bundle that feeds into the PID controller and the PID directly controls the voltage.

 

Just wondering if there is some setting I need to change so the "P" value can be updated during the process or if there is some function that I'm missing to make this work properly.

 

Thanks,

Dan

0 Kudos
Message 1 of 31
(4,522 Views)

Bumping it up, still interested in an answer to this. The PID controller acts like its dead for a while then finally wakes up to output one change then it's dead again.

0 Kudos
Message 2 of 31
(4,487 Views)

Any response will be helpful whether its telling me that the question is not understood, you understand the question but don't have the answer, or you have an answer. I've put together a simple PID controller that has a moving P value and it seems to work fine so I'm not understanding the reason for the fuzzy controlled PID to not be working.

0 Kudos
Message 3 of 31
(4,474 Views)

There can be many reasons why a feedback control system does not work as expected.

 

Tuning the controller parameters may be very sensitive to the nature of the system being controlled.

 

You referred to a pressure chamber controlled by a blower. To me that suggests very low pressures.  How sensitive is your pressure measurement system? What is its resolution? How fast can the pressure change?  Is it symmetrical up and down? How fast does the setpoint change?

 

What was the reason for choosing a fuzzy controller in addition to the PID?

 

Lynn

0 Kudos
Message 4 of 31
(4,470 Views)

Thanks for the reply.

 

Yes the pressure chamber has to go from about 1.57 psf to 120 psf so a pretty broad range of pressure.  The pressure measurement is accurate to about 1/10th of a PSF and is rather sensitive so we have it filtered. It will change about 1.5 psf per second when the blower output is at its maximum and is fairly symmetrical but its hard to get a good gauge of that.  The setpoint starts at 0 and using a hyperbolic tangent function it goes up to the setpoint in about 10 seconds.

 

The reason we decided to try to use the fuzzy controller in addition to the PID is because we need to have very little overshoot but we also need to be at the setpoint within 15 seconds. After tuning the PID we are able to achieve this but the responsiveness of the system will change from case to case and the thought was that the fuzzy controller would be able to give us more adaptablility to changing conditions in the system.

 

To provide a bit more information on the problem, the voltage output from the PID only steps in sharp changes and never gradually changes to any given voltage.  While it was doing this I was monitoring the output of the fuzzy controller and it seemed to be working properly and should have been inputing reasonable P values into the controller.

 

Dan

0 Kudos
Message 5 of 31
(4,467 Views)

Dan,

 

Thanks for the information.  You might have received a response more quickly if you had given that information in your initial post.  Specific questions tend to get more and better responses than general ones.

 

Fairly symmetrical is probably good enough.  Systems with significant asymmetry can be difficult to control.

 

You say the PID output only makes step changes. Are the changes always to full scale or zero or does it change to several intermediate values in steps? How large are the steps (in terms of the chamber pressure or percentage of full scale)?

 

I think I would test this by first trying to get the PID controller to run as a porportional controller ovver a small portion of the range.  Disable the fuzzy controller. Run at an intermediate range such as 80-100 psf. See if you can tune the PID to give you a proportional control behavior in that range, even if it overshoots somewhat or takes a minute to reach the setpoint.  Then you will know the PID controller works and can make adjustments from there.

 

If you are not familiar with tuning PID controllers, search the web for several tuning systems which should get you started.

 

After you get it working reasonably well in one range repeat the process in several other ranges (2-5 psf, 15-40 psf, 50-70 psf,...) and note whether the tuning changes significantly from range to range.  That will give you some clues about how adaptive the system needs to be.

 

Lynn

0 Kudos
Message 6 of 31
(4,465 Views)

Do exactly as Lynn suggests, get rid of Fuzzy part to to make sure PID is indeed working as it should be, even with a slow setpoint.

 

If your PID output is at its limits you may have an actuator that is just too small, and no fancy control can make it work faster.

If your PID output is toggling betwen max/min values then you may have scaling/tuning issues, or more likely anti-windup not implemented or configured properly.

If your PID output is stepping badly, but away not hitting limits, then check that is also seen in the error - if error is smooth then there is a problem in yoru PID code. If error is stepping then trace where they are coming from.

 

Once you get to bottom of this problem, then see how fast you can tuned PID controller - to see if desired performance can be attained.

A better way of getting more peformance than using Fuzzy, might be to use feedforward of setpoint trajectory.

 

Andy

Consultant Control Engineer
www-isc-ltd.com
0 Kudos
Message 7 of 31
(4,460 Views)

Thanks for the help. I'm working now on putting together a VI to test this out.

 

In the mean time, I was wondering if I could get some advice on the control in general. We started looking into fuzzy because it was thought that it would be able to adapt to changes in a system and be able to adjust to them properly.  We are going to try to use the same code to work on different systems that will respond differently to voltage inputs depending on how large it is and how leaky it is.  From what I'm gathering I will need more variables in a fuzzy controller than just pressure and rate of pressure change to adjust to these changes properly. We want it to work without needing a user input telling it how large the system is and how leaky it will be. I am planning on setting up a loop that will blip the voltage and gauge how long it takes the pressure to respond and how much it increases. I think information from that will be able to be used in adjusting the control parameters and giving the performance we want.+

 

What I'm getting at is I don't want to put a bunch of work into making adjustments to the controller and find out I'm barking up the wrong tree. Will I be able to get the performance I want out of the fuzzy controller? 

 

 

0 Kudos
Message 8 of 31
(4,447 Views)

Dan,

 

I think that you may want to look at adaptive controllers rather than fuzzy controllers.  Adaptive controllers estimate the parameters of the controlled system and change the controller parameters to meet the requirements.

 

This is one of the reasons I suggested trying a simple controller at several different pressure ranges.  The results may give you some idea of how much variation you have in the "plant" over the range of pressures.  If the variation is smooth and reproducible, something as simple as a table-look-up might be all the adaptation you need.

 

"Plant" is the term used in much of the literature on control systems to describe the characteristics of the system being controlled. In your case it would refer to the chamber volume, the leakage, the blower characteristics, and the sensor behavior.

 

Lynn

0 Kudos
Message 9 of 31
(4,443 Views)

Sounds like it could be helpful, I'll start doing some research.

 

I'm attaching a screenshot for a run that I just did. I had it set up with the best PID gains that we found after tuning and then testing, they seem to work pretty well for this specific system.  On the one we are using currently we can only test up to 15psf but we will switch to another that can go up higher once we have something that could work.

 

When I switch the fuzzy on it switches from using a set P value to the P value being sent out from the fuzzy.  I think you can see all the graphs and the lables so you can get an idea of what is happening.  The first run was with just the PID, the second is the Fuzzy fed PID.

0 Kudos
Message 10 of 31
(4,440 Views)