05-12-2021 01:58 AM
Hi GerdW
Thank you for the reply.
Yes i am aware of the polymorphic vi functions, are all the PID vis polymorphic? I have tried to wire my arrays into the auto-tune vis but this did not work.
05-12-2021 02:05 AM
05-12-2021 02:36 AM
Hi GerdW
My system is as follows
1) Setpoint is read
2) Camera takes X and Y centroids (process variable)
3) All variables go into the PID
4) Output is prouced
5) Output goes to picomotors (in a vector calculation)
6) Mirrors move
7) Repeat 1-6.
In How can I be sure that i am tuning this correctly. I have plotted the setpoint vs the process variable.
Does the Advanced PID vi compare to the others?
05-12-2021 02:46 AM - edited 05-12-2021 02:47 AM
Hi Andrew,
@AndrewIons01 wrote:
My system is as follows
1) Setpoint is read
2) Camera takes X and Y centroids (process variable)
3) All variables go into the PID
4) Output is prouced
5) Output goes to picomotors (in a vector calculation)
6) Mirrors move
7) Repeat 1-6.
This is called a (simple) control loop…
@AndrewIons01 wrote:
In How can I be sure that i am tuning this correctly. I have plotted the setpoint vs the process variable.
The tuning is "correct" when your PID loop works as expected ("within expectations and requirements")…
Where did you "plot sp vs pv"?
(You did not provide any code or data so far!)
@AndrewIons01 wrote:
Does the Advanced PID vi compare to the others?
Compare to which "others"?
05-12-2021 02:59 AM
Hi GerdW
I was planning to use the plots as way to visualize the PID performance. I can try (once again to attach the VI)
I mean, how does the advanced PID vi compare to the AutotunePID vi and the regular manual control PIDvi.
Here is the IV I am working on
05-12-2021 07:36 AM - edited 05-12-2021 07:37 AM
Hi Andrew,
wow, what a mess…
Have you heard about subVIs and any kind of project structure before?
That case structure might look like this:
Much more readable! (Still room for improvements…)
@AndrewIons01 wrote:
I was planning to use the plots as way to visualize the PID performance. I can try (once again to attach the VI)
I mean, how does the advanced PID vi compare to the AutotunePID vi and the regular manual control PIDvi.
There are no data in your charts. It would also make sense to plot PID output vs. process value…
The AdvancedPID offers more options than the default PID function. Read the help for all its options…
The AutoTunePID has that Autotuning feature built in: it may be useful, but I had never any good results when I tried to use it with our real-life control loops…
05-12-2021 09:04 AM
Hi GerdW
Thank you for the reply.
I know...…I know..... I know... its a mess and I apologize.
Yes i have heard of sub VIs, this would have probably been a better way of going about it while still achieving the same functionality.
Anyway, as for the PID i will tidy up my code and make this much nicer and more readable.
Ok, i will then use use either one of those vis in the code.
I do have another question for you, If i get closer to a tuned PID (the pv becomes equal to the setpoint. should the output become closer to 0).
Best Wishes
Andrew