Feedforward control algorithm help

Pandiani

Lifetime Supporting Member
Join Date
Apr 2005
Location
Tz
Posts
718
Hello folks,

I need help understanding what "feed forward" control algorithm really is. I must confess that I'm failed to acquire a good understanding of this type of control algorithm. I have a reasonably good understanding closed loop control i.e. feedback control strategy. Basically, story is always the same: some kind of transmitter measure process variable (PV), then, deviation from the setpoint is calculated (SP-PV) and feed to controller (for instance PID) which produce control output that drive actuator. These scheme can be easily pictured and we all see it countless times. On the other hand, I'm not quite sure if I can draw feed forward control scheme. I now the basics and I've read some articles about it (http://www.controlguru.com/wp/p41.html). In this particular example, some kind of signal that causes disturbance is "feed forwarded" to controller to produce output not waiting too long to sense temperature's deviation with the thermocouple.
How that kind of controller can be implemented?
"The computed change was fed to the controller and combined with the traditional feedback signal." I'm interesting to see how that signal is "combined".
I've also read that feed forward control algorithm combines disturbance with traditional feedback signal and produce CO, but I'm really interested to see on some particular example how?

Can you help me clarify these things?

I hope Peter will jump in with his valuable suggestions.

Looking forward to read your comments.
 
Have you even though about how you would control a system without feedback?

Basically, feed forwards basically estimate the control output based on what the SP is doing. The link below shows how we use feed forwards in our motion controllers. You can see that if I can ID the system then I can estimate very accurately what the control output should be without waiting for the PID to respond to errors. If you want to track accurately then one must use feed forwards or some other method to estimate the control output instead of just waiting for error to occurs as in simple PID only control. In reality I can get very close but there are still variations in linearity or load and other modeled feature that make a PID necessary. If the feed forwards can correctly estimate the control output to within %5 of the true value then the PID only needs to correct the final %5. This means the errors are reduced by a factor of 20.

ftp://ftp.deltacompsys.com/public/NG/Mathcad%20-%20FeedForward%20and%20the%20RMC.pdf
Notice how feed forwards are calcuated simply inverting the actuator or plant transfer function

Disturbance rejection is similar. It tries do estimate the control output based on the disturbances or changes in the load.
For instance a conveyor moving material to be heat treated or cooked in an over. As the conveyor rate of product going into or out of the oven increases the heating requirements increase. It makes sense that the heaters should get extra energy to make up for the extra energy transferred to the product. If you analyze the system you will find the heaters must be compensate for losses to surroundings plus the energy transferred to the product. One should be able to estimate the control output very accurately and add the PID just to correct for errors. Since the system has dead time one may not be able to tune the PID is aggressively as desired so having the disturbance rejection helps. In this case the SP doesn't change so this isn't a feed forward but a disturbance rejection.

I have lots of examples of feed forwards in motion control at work. We stress the use of feed forwards in our training classes.
 
A good example of a feedforward control would be changing the temperature of a tank of water by adding hot water.

You can measure the temperature of the water, the temparture of the hot water, and measure the volume of water in the tank. You can calculate mathematically the volume of hot water required to get the temperature change needed, and add that volume.
 
I don't think that is a good example, at least not as a batch process. Feed forwards don't care about the current state only the SP and its derivatives. Your example requires that you know the current temperature before you do the mixing calculations. If you keep adding water continuously, bleed and feed, as a function of a desired SP and its derivatives then OK. The system should reach the same temperature as the added water eventually regardless of the initial state.
 
Feedforward

Would this be a good example?

Edge friction driven spool winder (same as center driven winder, but with variable slip when near empty...need for feedforward #2): Variable diameter product being fed into a free hanging loop at at unknown line speed (need for feedforward #1, since it's the largest influence on final wind speed)

As found: A simple PLC PID runs an analog signal to a VFD driving rubber rollers that contact the edge of the spool. The PV is the input loop light curtain, the SP is the desired height (about 8 inches from the top, a little on the full side for best quality)

When I became responsible for theses machines, the PID controlling each winder was like a whole separate control, only relying of the loop height sensor to control speed. The code was very clean and simple and it worked okay most of the time...

My observations right off the bat: The winder PID must wait until the error signal drives the analog reference up and then the winder starts. A little I gain gets the winder to recover faster with a soft accel rate.

Problems: The line feeding the free hanging loop can stop quickly at any time. The accel rate is limited just for the purpose of allowing the PID reaction at the winder to be controllable. This hurts productivity.

The other results of the blind PID running the winder as an entirely separate control were a loop height that would sometimes go way out of control due to slip at the beginning of a spool, (product loop reaches floor...makes scrap). And sudden stops with short duration run cycles between them at any point in the spool would send the PID off in the wrong direction sometimes. Upstream quality issues were a common cause of this temporary, unpredictable disturbance.

The winder would then hunt for speed and jerk the loop up and down sometimes for minutes before the PID would reign it in. I fixed most of this my freezing the PID action when the line was stopped. You can't allow the PID to continue to take action on a CV that can't influence the PV. That helped a lot.

Also, there was no way to know when a spool was started or finished due to the loading being entirely pnuematic hand controls, but the line speed could be estimated quite accurately, so I used that known value as a feedforward, and relabelled my PID output signal as "Wind Ratio Detector", for the most part, that is what the PID output would become.

I made the amount of influence given to these TWO control variables variable to cope with slip that only occurred at the beginning of the cycle:

When the wind_ratio was highest (beginning of a roll) it had more influnece on the CV to better deal with frction drive slippage that happened at the beginning of a spool when there was less weight and more slip. Since there was still some I gain in the PID driving the windratio value, it would cope with slip quite nicely.

I think it started off with a fifty percent influence and at about 50% wind_ratio, it's percent of influence sloped down to about 20%, because the line speed was accurate enough to bank on within 20% when the slip was predictably low or zero.

I tried tighter tuning only to discover that very narrow products had a large degree of stretch that introduced another variable, so I settled on a 20% influence to let the PID do it's thing, and cope with all unpredictable distrubances with a little power.

When a new roll started, the PID would ramp the CV from a low value to the higher one and within a few seconds be a good indicator of the spool's wound progress.

As the roll grew, the slippage would vanish at a ratio of about "half a spool" and then the line speed dominated the final output signal.

This allowed me to keep the loop height more steady during stops, and allowed a reduction in line accel rate from 10 seconds down to 5 (could have gone 3, but an upstream system needed a soft start).

These changes made a very crude and somewhat dumb PID become the icing on the cake that resulted in much better performance with known or modelled variables plugged in for the main control.

So by adding Line_Speed as a feedforward, I was able to drastically reduce the PID gains eliminating most overhoot to a tiny little ripple on the error trend.

I did not incorporate the feedforward into hte PID math, but rather strapped ithe PID on the back of what I saw as the largest influence on the final control element which was line_speed. I never understood why the original author of the code did not do this because the same PLC controlled speed references to the entire line.

So Peter, would this be a good example of feedforward?

Sorry for the length, I wanted a thorough description...
 
Last edited:
So Peter, would this be a good example of feedforward?
Yes, but you arrived at you values by trial and error.

One should be able to predict the spool speed by the line speed and the radius of the material on the spool. THe spool speed is then mulitplied by the velocity feed forward and added to the control output. One should be able to calculate acceleration feed forwards by estimating the inertia of the material on the spool by knowing the radius. The acceleration is then multiplied by the acceleration feed forward and that too is added to the control output. This ability to estimate the control output. Perhaps loop error should be weighted by the velocity.
 
A feedforward system attempts to model a process to control it. The feedforward control attempts to predict what should be done when changes occur in the process to prevent errors from subsequently ocurring, whereas a fedback controller can only react once an error has ocurred in the process.An example of feedforward control is a boiler drum level control which uses the steam flow measured leaving the steam drum to predict what the boiler feedwater flow should be to maintain the drum level.
Initially assume that there is no instrumentation around the drum other the the steam flow transmitter and a feedwater control valve in the feedwater line to the drum and that the drum level is at required level of 50%. If the steam flow signal is X then a simple feedforward model equation to solve would be Y = kX + m.
Where k is a constant and m is a constant. k is used to try and match the steam flow X to the required valve position and m is a constant which tries to match the continuos blowdown from the drum. If the model is correct (which seldom occurs) then the system works as it should and the valve is assigned the required signal / position whenever the steam flow rises or falls. This feedforward system would theoretically work although in practice there are other things to consider which I will can add later depending upon the responce to this reply.
 
Calistodwt said:
A feedforward system attempts to model
Actually, the system identification does the modeling. There was and 'Advanced Control' thread where this was done with temperature. Then inverts the model to find the feed forward gains as in the .pdf I posted. Otherwise you are correct.

One can find the feed forward values by trial and error. This is a means of doing system identification. After finding the right values for the feed forward gains, one can invert then to get the plant model.

I will can add later depending upon the response to this reply.
Are you going to mention shrink and swell? You left that part out.
 
I'm starting to understand

Peter Nachtwey said:
Are you going to mention shrink and swell? You left that part out.

I've also read that three element control algorithm is a good example of feed forward algorithm.
There is a lot to be said about drum level control. Not just shrink and swell.
I'm also interested about accurate measuring of the level. In most plants deltaP transmitters are used, then in DCS a compensation with pressure and temperature is done (using interanl lookup tables). I'm also interested about how spots for installing pipes (that leads to transmitter via condensation vessels) s determined.
Maybe it will be interesting to start new thread about boiler drum level measuring one day, but for now I'm interested in understanding what feed forward algorithm really is and why it is called that way. I'm begining to understand the story behind it through this discussion.
I learned that main element in feed forawrd algorithm is "target generator", and this algorithm is not measure PV at all. Feed forward algrithm got its name because value that is generated by target generator is forwarded to the input on one side and used in comparator to produce deviation on the other side.
Really interesting, please more example. Drum level would be good...
 
Peter Nachtwey said:
I don't think that is a good example, at least not as a batch process. Feed forwards don't care about the current state only the SP and its derivatives. Your example requires that you know the current temperature before you do the mixing calculations. If you keep adding water continuously, bleed and feed, as a function of a desired SP and its derivatives then OK. The system should reach the same temperature as the added water eventually regardless of the initial state.

I agree it isn't an ideal example. I was trying to indicate that a process model is used to predict the control action. You could do this feedforward control in a continuous system. The flow rate of cold water, the flow rate of hot water, and the measured temperature of each are used to determine the hot water flow rate needed to get to setpoint based on an energy and mass balance formula. This is actually the example used in one of my references. (Process Instruments and Controls Handbook, Mc Graw Hill, 3rd Edition)

It isn't accurate to state that feedforward control doesn't require a measurement of the process variable. Without that measurement there can't be any kind of control. To me the essential difference between feedforward and feedback control is that in feedforward a process model based on physical process characterstics is used to calculate the control action required to bring the measured parameter to setpoint. In feedback control the error is used to determine how much control action is required to get to the setpoint, and feedback control is essentially a trial and error technique. Feedforward, where feasible, is a predictive technique. The best control often combines the two, with the feedforward control action modified by feedback to get more precise control.
 
Tom-

This is kind of semantic argument, although understanding the sources of an output are of extreme value. When people talk about feed forward they often lump together any correction that is not generated by the feedback filter. Technically this is not correct. Feed forward is contingent ONLY on the setpoint and its derivatives and the process model. While other control elements may also be based on the process model they are technically referred to by different names. Feed forward by its nature is open loop. It doesn't rely on feedback, which is why it is unconditionally stable. In a perfectly modeled world a feed forward signal would be all you need to control a process. You need a feedback filter only because it is logistically impractical at best (and actually impossible at worst) to EXACTLY model a system.

Here is where things get funny. A designer can implement adaptive modeling. This will make it appear as if the feed forward term is based on feedback. However, technically, the model is modified by the feedback value. The feed forward value for a given setpoint only changes as a result of the model changing.

While this may seem semantics, keep in mind that the model can be used for things other than feed forward. The model could be the basis of an adaptive control gain scheme. The model is also used for disturbance rejection, which is related to but different than feed forward.

When I started at my current job I had someone tell me they needed a way to measure the 'inertia' of a rewind spindle. I told them I could calculate this value much more quickly than I could measure it since the machine wasn't operational yet. I was asked how I would correctly compensate for bearing friction and drivetrain losses. It was obvious that this person was tossing much more than inertia into their definition of inertia. I think the same can be said for many people's idea of feed forward.

Keith
 
More feed forwards

ftp://ftp.deltamotion.com/public/NG/Mathcad%20-%20FeedForward3.pdf

This is a motion control related example that uses a model of a motor with a compliant load on the shaft. One can see that using all the feed forwards and a fifth order motion profile provides the best result. This work sheet also shows the importance of the motion profile. Systems with a lot of poles require more feed forwards and this requires higher order motion profiles too.

Notice, I am not using any feed back of any kind. Just feed forwards and these are generated using the motion profile and the derivatives and the system model. One can see that the initial state doesn't matter much. The actual will eventually follow the target. Of course all this depends on have a perfect model. In reality there isn't such a thing but one can get very close. In these cases the PID will need only to correct the last few percent so the error are minimal.

I chose a sine wave of 10Hz because that is the resonant frequency of the compliant load. This is normally an impossible situation.

Second sinusoid shows what happens when a tradition motion controller tries to control a system like this. In reality the controllers with only a velocity and acceleration feed forward would not be able to control the system above 1 or 2 Hz.

The last two example show why fifth order motion profiles are so much better than linear ramps. This motion profile has relatively long ramps so the trapezoidal motion isn't near as bad as it would be with shorter ramps.

Pandiani, I know you aren't a motion person but you know enough to understand the worksheets.
 
Feedforward systems measure disturbance(s) entering a process and takes appropriate action before this disturbance affects the process. With the basic steam drum level control given previously a change in steam demand from the boiler is measured by the steam flow transmitter. If the steam demand increases then the feedwater to the drum must also be increased by an equal amount. So the steam flow exiting the system is "fed forward" via the feedforward function (which modifies it) to the feedwater valve at the inlet to the system to change the feedwater flow to the drum to match the steam flow change.
There are a number of reasons why this system as it is will not work very well:
1) There is no drum level controller
2) There is no feedwater flow controller
3) There is no means of establishing the initial level in the drum.
4) Pressure variation in feedwater will cause the feedwater flow to vary.
5) the drum level is an integrating process and so the drum will either tend to fill up or empty as it is not self regulating.
6) Shrink and swell could be a whole subject in it's own right so I would not propose to cloud the issue here. The approach to shrink and swell is either ignore it or try to do something about it depending upon how critical it can be to your boiler.
 
Why is it so hard to see the difference?

Calistodwt said:
Feedforward systems measure disturbance(s)
In one case the output is affected by the SP and its derivatives. In the other case the output is affected by changes in the load. I think the difference between feed forwards and distrubance rejection is clear. Yes, both methods by pass the PID but the reason for changing the output is different.

Obviously one can not be perfect when compensating for changes in the set point or the load so closed loop control is required but the need can be minimized.
 
Another example....

We measure incoming cotton moisture and set a drying temperature based only on the incoming moisture value. This makes for a very fast response which is an absolute necessity. We can (but don't always) feedback to adjust the bias of the feed-forward controller.

Basically we know that if the cotton moisture is X then the drying temperature needs to be Y.
 

Similar Topics

Hi, I am looking at doing some optimization works for a processing plant. The plant utilizes a 5 stage counter current decantation circuit (5...
Replies
1
Views
1,715
Hey Forum, I have a pass through tempering furnace that is setup and works using direct PID control using temperature PV and SP to control my...
Replies
12
Views
3,948
I'm working in implementing a bias into logic for a Compactlogix PLC using the PID instruction. I have it close to working but there's one part...
Replies
19
Views
5,802
Just to check my sanity even though I think I found the solution. So, for this loop with long lag time we got 2 PID loops with the Outer Loop...
Replies
1
Views
1,152
Hi, I have a feedforward implementation I am trying to accomplish. I was wondering what would happen when cv is at 70 and Feedforward wanted to...
Replies
5
Views
3,387
Back
Top Bottom