Pid

Hi guys

I know PID has been well discussed hereabouts, but here's another I'm afraid.

I'm in a position where I need to effect PI control (I'll throw the D in for future-proofing) in a motion controller i.e. no luxury of ready rolled PID instruction (apart from the 500us servo loops, of course!). I'll be encrypting, I mean coding in BASIC.



Anywho, I've started from scratch, but have a few fundamental q's.



1. Starting with P. If the error is zero, then the P component of the output will be zero, but i need it to be maintaining 70% (say)

So, should the P component accumulate the current output each cycle?



2. What's opinion on whether the P gain should apply to the I and D too, or just the error. I've seen examples of both during my rooting around. Hope that makes sense.



Cheers, Pp
 
paraffin power said:
Hi guys

I know PID has been well discussed hereabouts, but here's another I'm afraid.

I'm in a position where I need to effect PI control (I'll throw the D in for future-proofing) in a motion controller i.e. no luxury of ready rolled PID instruction (apart from the 500us servo loops, of course!). I'll be encrypting, I mean coding in BASIC.



Anywho, I've started from scratch, but have a few fundamental q's.



1. Starting with P. If the error is zero, then the P component of the output will be zero, but i need it to be maintaining 70% (say)
You will not have a zero error. You will have an error that provide 70% output.


So, should the P component accumulate the current output each cycle?
No, that is why you have an integrator.

2. What's opinion on whether the P gain should apply to the I and D too, or just the error. I've seen examples of both during my rooting around.
I have never seen the P gain applied to the I and D terms in a real motion controller, but PLCs controlled systems do this all the time because that is the way the PLC PIDs are designed. PLC PIDs are not designed for motion systems though. Motion systems and temperature systems are quite different in a lot of little details.

Note, it is cheaper to buy the motion controller. There is no way you can save money writing your own. The questions you asked are VERY BASIC. I could ask many more and your head will spin.

BTW, what are you really trying to do? What does the motion controller really need to do. Does it control velocity or position? It makes a BIG difference.

I forgot. I told another person you were going to write a motion control program in VB. He laughed. I was reminded is NOT a good idea for many reasons such as:
1. what do you do when windows hangs up?
2. How do you make sure the encoders are sampled at regular intervals. I don't even trust the realtime OSs we use. I use a FPGA so no software is required to sample the encoders.

BUY A PC BASED MOTION CONTROLLER. If you want something realy fancy you can buy motion controllers that you can easily access with over the Ethernet and can be programmed in VB.
 
Sorry - I've not been clear. This PID is nothing to do with motion. The motion controller is taking care of that without trouble. I mentioned the MC to avoid the "PLCs have PID instructions" replies.
It's actually maintaining pressure, but the MC is the 'PLC' in this system, I have analog ins, analog outs, so it's providing the control.

Thanks for the replies, guys
 
Peter Nachtwey said:
I told another person you were going to write a motion control program in VB.
The very idea.


LD[AR...
70% - just an example. If I have a 'large' error, then the output will be proportionally large. As the error decreases, the output will decrease - I see it that I won't reach target.
I know the 'I' term will pick this up, but thought a PID with just 'P' should 'work', of sorts. Cheers mate
 

Similar Topics

TM221CE24R, Machine Expert Basic, PID Assistant (native block, not scripted). Controlling a steam valve via PWM (%Q0.1) for a slow batch heating...
12
Replies
361
Views
Hello, for the first time in my career, I have a project involving PID control on Mitsubishi FX5U controllers. I’ve spent years working with...
17
Replies
816
Views
Has anyone been working with the Colab Research tool in Google? It showed up in this forum ca. Oct, 2024. It's a way to do modeling, plots, etc...
2
Replies
317
Views
I've put something together here. Archive contents: Project1.exe – approximation/tuning soft csv files initial data examples Comments...
54
Replies
2,850
Views
I am troubleshooting a PID loop on an Allen-Bradley Logix platform (Logix 5000 / Studio 5000). The loop is reacting violently to any error...
28
Replies
1,420
Views
Top