Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Oscillations in Fuzzy Logic Controller Output

Solved!
Go to solution

Hello there,

 

I recently implemented Fuzzy Logic Controller in Labview 8 for controlling a level process station. I used Compact Field Point (cFP AIO 110) to interface it with the equipment.Here are some other details

 

Inputs to FLC : Error, Derivative of Error Signal from the Level Transmitter

Fuzzification : Max-Min

Defuzzification : Center of Gravity

Level Sensor : Capacitive Type Level Transmitter

FCE : Control Valve

DAQ : cFP2020, cFP AIO110

 

So, when I run the VI..I'm able to control the level of water in the tank successfully but there are oscillations in the output of the fuzzy logic controller. The oscillations are so intense and change very adbruptly. I need to fix this oscillations as it may damage the equipment.

 

I'm in need for a solution that makes the response of the controller smooth..Any suggestions ?? I need to solve this problem as soon as possible as the deadlines for my acad project work is nearing

 

PS: I'm not sure if this post is in the right section, if its not please move it to the correct section. Please let me know I'f I have to provide any other additional information

 

Thanks in advance

0 Kudos
Message 1 of 7
(9,059 Views)

megaposiedon,

 

When you try to implement a PD controller with fuzzy, you are also going to mimic the controller issue, which is amplifying the high frequency (rapid changes) of the signal. You can fix this several ways:

1. Modify the values of the derivative portion in Fuzzy (the membership values) to reduce the derivative action

2. Reduce the high frequency content of the input signal by applying a 'filter' on the input signal. The PID Palette has a filter for it.

3. limit the rate of change of the output. There is another VI on the PID palette that would make the output less 'fast'.

 

Those can be easily implemented and we have shipping examples under <LabVIEW folder>/examples/control/pid and look for examples in that area.

 

Hopefully this helps...

 

Barp - Control, Simulation, RTT and HIL - National Instruments
0 Kudos
Message 2 of 7
(9,050 Views)

Hi Barp

 

Thanks for your timeley response !. I would like to clarify something here.. I was wrong when I said Derivative of error signal. What I actually meant is "the difference between two successive error data". [The Error and dError are used as inputs to the fuzzy logic]

 

I'm bit confused now, Please check the image attachment for the way I implemented difference between the consecutive data.

 

I'm using LabVIEW8 and there are no such filters in the PID palette and could you please ellaborate the 3 solutions you cited in the above answer

0 Kudos
Message 3 of 7
(9,043 Views)
Solution
Accepted by megaposiedon

When you do e(k) - e(k-1), it is an implementation of derivative action, actually. You can implement by error or by using y(k) - y (k-1) too. This would avoid the setpoint kick effect, when you change the setpoint, this applies an error that is used by the derivative variable.

 

To better describe what I mean, please open the example:

C:\Program Files (x86)\National Instruments\LabVIEW 7.1\examples\control\fuzzy\tanks.llb\Tanks - fuzzy control PI.vi

 

and try to see the screen shots below:

1. Change the limits of your membership function related to derivative action will make the response less susceptive to noise. Here is the location you should focus on the Fuzzy Editor.

fuzzy3.PNG

2. The filter function is called: PID Control Input Filter.vi and this implements a 5th order FIR filter. If you want more option on filtering, you would have to use the LabVIEW functions under Analysis >> Signal Processing >> Filters. Here is how you would use the FIR Filter:

 

fuzzy2.PNG

 

 

3. The Rate limiter is called PID Output Rate Limiter.vi and it is used as:

 

fuzzy1.PNG

 

Those are the options I was discussing.

Barp - Control, Simulation, RTT and HIL - National Instruments
Message 4 of 7
(9,033 Views)

One more thing: Your version of Fuzzy is very old. If you would have the option to upgrade your LabVIEW version, in 2009 we had a major update of the toolkit that is much better than the version you are using on your application. You can download and evaluate this version for 30 days from here:

 

http://www.ni.com/trylabview/

 

and download LabVIEW and the PID and Fuzzy Logic Toolkit.

 

Also, keep in mind that there is an update for Fuzzy 6.0 with LabVIEW 8.0:

 

http://joule.ni.com/nidu/cds/view/p/id/603/lang/en

 

hope this helps.

Barp - Control, Simulation, RTT and HIL - National Instruments
0 Kudos
Message 5 of 7
(9,032 Views)

 

Thanks a lot barp, I will follow your suggestions and let you know how the controller response was. But I cannot access the computer in which is conneteced to the equipment and cFP until tomorrow. So I just want to know if there will be PID Control Input Filter.vi and PID Output Rate Limiter.vi in the LabVIEW ver 8 I'm using ?

0 Kudos
Message 6 of 7
(9,022 Views)

Most likely. I did the screenshots using LV 7.1 with PID Control Toolkit 6.0 and these software is more than 10 years old. 🙂

Barp - Control, Simulation, RTT and HIL - National Instruments
0 Kudos
Message 7 of 7
(9,011 Views)