Jump to content
OMRON Forums

PID Self-Adjustment


xiaomupeng2009

Recommended Posts

  • Replies 9
  • Created
  • Last Reply

Top Posters In This Topic

Xiaomupeng,

 

There is no automatic self-adjustment algorithm in the Turbo PMAC firmware, such as adaptive control. In contrast, Power PMAC does have such an adaptive control algorithm in firmware.

 

However, if you have enough controls knowledge, you can implement your own PLC program to change your controller (PID) gains dynamically. Some PMAC-users use the technique "gain scheduling," some use "adaptive control," etc. The PLC would just modify the gains depending on the "state" or situation the PMAC is encountering. You can also use the "User-Written Servo Algorithms" in an unused motor whose number precedes the motor whose gains you want to vary. This user algorithm can read inputs and vary the gains of subsequent motors at the servo rate. See page 169 of the Turbo PMAC User Manual.

 

What specifically do you need to do for your application? If you give us more specific details, we can help you better.

Link to comment
Share on other sites

  • 2 weeks later...

Xiaomupeng,

 

There is no automatic self-adjustment algorithm in the Turbo PMAC firmware, such as adaptive control. In contrast, Power PMAC does have such an adaptive control algorithm in firmware.

 

However, if you have enough controls knowledge, you can implement your own PLC program to change your controller (PID) gains dynamically. Some PMAC-users use the technique "gain scheduling," some use "adaptive control," etc. The PLC would just modify the gains depending on the "state" or situation the PMAC is encountering. You can also use the "User-Written Servo Algorithms" in an unused motor whose number precedes the motor whose gains you want to vary. This user algorithm can read inputs and vary the gains of subsequent motors at the servo rate. See page 169 of the Turbo PMAC User Manual.

 

What specifically do you need to do for your application? If you give us more specific details, we can help you better.

 

 

 

i want to use the turbo PMAC to control the linear motor,but influence of the load is different in different time, it is to say different situations have different PID parameters, so i want the PMAC can turning the PID parameters in itself! thank you !

 

the PLC program can edit the pmac adaptive control algorithm ?

I have used the PLC to change the PID parameters before,but the pid parameters is have adjusted by myself ,then i use the PLC program to change the PID parameters!!! thank charles very much!!!

 

Link to comment
Share on other sites

Turbo PMAC does NOT have adaptive control. If you want to use it, you will have to write your own, either using Open Servo or by modifying the gains of the default servo algorithm using a PLC. Using Open Servo is only recommended if you are a very experienced user of PMAC, and have experience with control design.

 

Here is an example of how to perform gain scheduling (not adaptive control) in a PLC. Using motor 1, the PLC will set a specific middle range for Kp (Ixx30) while the motor's position is between -10000 and 10000 counts. When the motor's position goes above 10000 cts, Kp doubles. If the motor's position goes below -10000 cts, Kp halves:

 

M162->D:$00008B ; #1 Actual position (1/[ixx08*32] cts)
#define Mtr1ActPos			M162
#define Mtr1PosSF			I108*32
#define Mtr1ActPosScaled	P1000
#define Latch				P1001
#define Mtr1Kp			I130

Latch=0
I5=3	;	Enable background and foreground PLCs to run
I8=0	;	 Set Real Time Interrupt rate equal to Servo Rate
End Gat
Del Gat
Close
Open PLCC0 Clear
Mtr1ActPosScaled=Mtr1ActPos/(Mtr1PosSF) ; Compute motor 1 actual position in counts
If(Mtr1ActPosScaled<10000 AND Mtr1ActPosScaled >-10000) ; If motor 1 between -10000 and 10000 counts
Mtr1Kp=446782	;	Set Kp to middle range
Latch=0			; Set latch low
EndIf

If(Mtr1ActPosScaled!<10000 AND Latch=0)	;	If motor 1 goes beyond 10000 counts
Mtr1Kp=Mtr1Kp*2	;	Double Kp gain
Latch=1			; Set latch high
EndIf

If(Mtr1ActPosScaled!>-10000 AND Latch=0)	;	If motor 1 goes below -10000 counts
Mtr1Kp=Mtr1Kp/2	;	Divide Kp by two
Latch=1			; Set latch high
EndIf
Close

Link to comment
Share on other sites

  • 1 month later...
If I want to detect the change of the load of the linear motor,for example ,i want to detect the velocity,I can use the M parameters to visit the register,then i can change the PID parameters according to different velocitys. but how can i know the change of the load and how to detect the change of the load? thank you?
Link to comment
Share on other sites

There are a number of sensors available for load detection. For example, you can try using a "load cell" or a "strain gauge". Try googling those sensors. http://www.omega.com/ has some great documentation on how strain gauges work for reference.

 

If you do not want to add another sensor, you can detect a change in load by monitoring the following error. If at one point in your motion your following error spikes greatly and then remains much larger than normal, you may have experienced a change in load, because your servo loop is no longer able to minimize the following error like it was doing before the load changed.

Link to comment
Share on other sites

  • 2 weeks later...

Xiaomepeng,

 

Although almost all linear motors have high frequency dynamics, you may assume it as rigid body i.e. (ma=u(t)) If the load is changing in time, the simplest thing to estimate the mass (to be more precise the overall gain of the system in terms of dac bits/s^2) is to divide control input to acceleration. A better way is of course using least square estimation to average out the effects of measurement noise. In terms of implementation you should be aware of the drawbacks of adaptive control. There are means to robustify adaptive control laws (forgetting factor and dead zone). This is not a place that I can go on the details of adaptive control theory, see Applied Nonlinear Control by Slotine, Petros Ioannou's book, etc.

Link to comment
Share on other sites

  • 2 months later...

Brain,can you tell me how to detect the drive signal in the pmac?

 

If you use the recommended M variable setup, this would be Mx68, Filter Output. You will need to scale the +/- 32767 output to with the tranconductance gain of your amplifier and your motor force constant. Execute a constant acceleration move and observe the value.

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

×
×
  • Create New...