MATRIXx

cancel
Showing results for 
Search instead for 
Did you mean: 

Anti Reset windup in PID controller block

Hi
 
How to take care of reset windup in PID controller block ?
Because after saturation of output, the state variable go on increasing by integrating the input, so when input decreases it takes long time to respond.
Is there any way to access the states as % variables or by any other mean so that they can be limited ?
 
Thanks
 
 
Regards
Ishant
 
 
0 Kudos
Message 1 of 6
(16,773 Views)

Hi Ishant,

Looking at the documentation for the PIDcontroller it states that any of the parameters can be represented by %Variables, and are compatible with RVE. I believe that you should be able to access them this way to limit the reset integral windup.

Looking to help,

Steven B.

0 Kudos
Message 2 of 6
(16,767 Views)
The PID block on the pallet from what I recall has no such capability. You are looking for the integrator element not to windup, if for example, your effector (or actuator) gets maxed. I had a  PID controller superblock that performed that function. I don't have Mx but I may be able to locate an SBA script for the block on my home computer. Basically what you need to do is wrap some logic around the integrator that lets it reset to the value you specify based upon some input logic. The logic may not be completely straight forward: http://www.controlguru.com/?p=75 In the example above, if the effector is saturated you might us the logic to reset the value of the integral output to some other value that makes sense within the context of the system and the controlled value. Once the controlled variable begins to respond and the effector is no longer saturated they you can stop resetting the value. In case I find the block, is this for a continuous implementation of a controller or a discrete? As I recall it was a discrete implementation.
Garrett Thurston
gthurston@foliage.com
Phone: 781.993.5540
0 Kudos
Message 3 of 6
(16,761 Views)
Thanks Steven for replying but as Garrett rightly pointed out that there is no such facility for PID Controller block to have the states variable accessible as % variables. THe only variables available are p i and d gains, and startup value.
 
One solution i found is to write a code which limits/stops the state variable for integrating action incrementing further if output saturated.
But the problem here is to have access of this state variable which is referenced by structure pointers X,XD in generated code.
So this variable x->PID_S2 to be specific (if name of block is PID and no name for state is chosen) is accessible inside the subsystem function, but it can not be accessed outside the subsystem function code.
You must have these pointers globally defined in order to access these state variables.
 
So is there any way to change code generated by this block or in other way customize this block so that this state can be accessed from external input?
 
0 Kudos
Message 4 of 6
(16,754 Views)

Hi Ishant,

I didnt find any way any way to change code generated by this block but one way to get more control of the states of a PID is to implement a different three block PID using a PID with zero integral gain and a parallel limited integrator and a summer to add the output of the PID(zero integral gain) and the limited integrator. The limited integrator allows the outputs to be limited using %vars, but not the states directly.

Regards,

Steven B.

0 Kudos
Message 5 of 6
(16,729 Views)
As I mentioned I do not have MATRIXx so I put together a simple concept that you could build on in PowerPoint of all things. It has the PID controller broken into its three elements, Proportional, Integral and Derivative. To create the anti Reset Windup capability, as indicated in a prior post, I use the Resetable integrator. Here I show the reset values as static, more sophisticated controllers might even have those as computed values depending on the limitations of the system. So you will need some logical that determines which value to take. Next is the actual reset, you will have to reset the integrator to that value and decide which type of reset in the integrator block, I am not sure if there is a level resetable integrator, that is something that continues to reset until the logical changes, but that logic can be worked. Then the derivative is in its form simply to keep the transfer function proper. You can set tau to some sufficiently small value to that it approximates a derivative term.  If I have overlooked anything please be forgiving, I was using PowerPoint. I have attached a .jpg of the controller. You would create this in a superblock. Naturally, the dynamic blocks would be different if this was a discrete implementation.
Garrett Thurston
gthurston@foliage.com
Phone: 781.993.5540
0 Kudos
Message 6 of 6
(16,717 Views)