Gain scheduling for non linear systems

rscott9399

Member
Join Date
Aug 2017
Location
in space
Posts
114
Hi guys and gals



I have a severely non linear system that i am trying to develop a controller for.

The non linear curve can be broken down into 3 linear-ized sections.

With a single fine tune in the s7-1200 i can get close but when the controller set point travels from one linear region to another we experience large overshoots and large errors.

Research tells me that gain scheduling may be an idea. a set table of gains for a different range of the process variable.

Has anyone implemented this before?
Recommendations on how to implement this?



Thanks
 
Last edited:
what is the sensor you are having an issue with?
is there a dead band at the end of each travel?
I have seen this before.
what is the length you are trying to measure and what is the input voltage to the plc?

can you tell me the 3 band zones. ie. start point, position, voltage input.
endpoint, position, voltage input for all 3 sections?

we had this issue with a displacement laser in the past where I used to work.

james
 
you can make it fuzzy, with gliding gains, and keep the numbers correct only change the K,I,P values themselves.
or use real fuzzy logic.
 
Shooter,

he MUST look at the sensor specs for a deadband at each end.
that makes a world of difference.

we had to linearize laser sensors before and that is the first step.
you then had to mount the sensor and do a position, voltage map
you then have to linearize the curve. our first sensors had multiple segments,
the more advanced they became, the less work we had to do.

james
 
I believe a function generator should be available in the s7 controller. If you know the unlinear curve (logarithmic), there is a way to convert it to linear. I did it once when making a pH controller but now the method escapes me.

In a nut a shell, you essentially make two arrays (x, y) and plot the controller output(x) in one and the resulting process value(y) in the other. For example using arbitrary values:
x[0] = 0, y[0] = 0
X[1] = 2, y[1] = 22
x[2] = 4, y[2] = 27

Using the function generator, you feed it the desired setpoint and it gives you what the controller output should be based on the values in the table.

The more values you give it to reference, the more accurate it will be. If a setpoint is in between two values in your y array, the function generator ciphers out a value somewhere between.

If you don’t have the gains for each phase then this approach will get you results quicker than trying to schedule gains. Rather, you are scheduling the approximate controller output based on a setpoint.
 
Last edited:
I can hear the PID experts scream even as I type. If the PID parameters in one section will also work in the other section then it isn't the PID settings that are the problem, it is the shock change in Set Point. You could add some averaging to the Set Point so that the system has time to react without overshoot.

You can do Gain scheduling with the S7-1200 though I haven't tried it with the built in PID system. To know what effect step changes in PID settings will have you really need to know what PID formula is being used, and as Siemens keep it secret you would probably just have to try it to see what happens.
 
I thought I answered this question before but I looks like I haven't here.
Yes, we provide training classes on this.
We use cubic splines to linearize motion and to compensate for changing open loop gains.
The video is long but you can scroll through it.

https://deltamotion.com/peter/Video...roller - Demo of 12 Axes position control.mp4
Basically we use the cubic splines or curves so the motion command can be given in degrees but then translated to linear positions for the hydraulic cylinder. On top of that we tune the system in 3 or 4 different places of the arc and enter that data into even more cubic splines. So now the controller can use the current position in degrees to interpolate to get linear interpolations and the controller gains. The controller gains can be updated every millisecond.


BTW, this is more that a simple cubic spline look up. We apply the chain rule too so that rates of change are taken into account.
 
Originally posted by James Mcquade:

he MUST look at the sensor specs for a deadband at each end.

rscott9399 doesn't have a sensor linearity problem. He has a system linearity problem. He knows where his process is in he span but one set of control loop gains isn't giving him stable performance through the whole range of the process.

Originally posted by Peter Nachtwey:

The video is long but you can scroll through it.
Peter, I don't think that link is to the video you intended to show. I think you meant the video that has the heavy weight on the arm that swings over center controlled by a hydraulic cylinder. At least that is the one I would think that would match up with this thread the best.

rscott9399, if you haven't noticed Peter Nachtwey is involved in some pretty advanced stuff. I don't know your process so I don't know if you would need to go to the level Peter can to control it. But as you said initially, gain scheduling, or more correctly gain profiling, is what you are looking for.

If you know you can tune the system to be stable in three general areas as you state, then performing linear interpolation of the gains between the process points you have tuned would be a good first step. It will not be optimal but it may be good enough for what you are trying to achieve. This is something I do on many of the systems I end up working with.

Keith
 

Similar Topics

When I connect to the site PLCS.NET is checking to see if the connection is secure. I click on a topic and it does it again. Click back and it...
Replies
20
Views
1,192
This old chestnut again... Our clocks (UK) went back an hour yesterday. Now the time displayed on the HMI is 1hr behind what it should be. In...
Replies
24
Views
1,929
My Lenovo P50 has served me well. it is still working, but I want to get something newer before I can no longer get a laptop w/ windows 10. I was...
Replies
23
Views
6,640
I input error into PID as a percent and limit the control variable +/- 100. i.e. rError[0] := (rTarget-rPV)/(rSP-rPVInit)*100 When calculating...
Replies
24
Views
6,446
Wizards, I have been gone from my plant for a while and upon returning I have two, 480vac-24vdc power supplies on my desk with DEAD written on...
Replies
4
Views
2,249
Back
Top Bottom