01-02-2014 10:09 PM
Hi,
New year wishes to all.
the Pid control block of FPGA(I think even in windows), LabVIEW is differentiating the Process variable instead of differentiating the error, Is that same?
Regard,
N. Madhan Kumar.
Solved! Go to Solution.
01-02-2014 10:56 PM
Two pictures of equations doesn't really tell us anything about what LabVIEW is doing.
But think about it.
Error is Setpoint - Present Value. Setpoint is constant while Present value changes in time. So if you are differentiating the error, the result is the same as differentiating the present value. When you differentiate a constant, it's value is zero. so dE/dt becomes equal to dPV/dt.
01-02-2014 11:23 PM
01-03-2014 03:42 AM
01-03-2014 07:17 AM
01-03-2014 07:53 AM
I don't have the control design / PID toolkits installed at the moment as I rarely use them nowadays but when I last did it, I ended up implementing my own. This should be a good starting point:
It is about as basic of a parallel PID implementation as I can come up with (for Windows - hence the doubles, if on the FPGA you'll probably be using floats). You may wish to extend to allow the controller to reset (as per the LabVIEW implementation by reinitialising the shift registers).
I've attached the VI (LV2012).
01-03-2014 08:21 AM
Sorry i had marked it as a solution accidently,
This is the Function of PID i agree, infact i am also using this same logic(with feedback node, instead of shift register, wiith SP,Output and PV inside the while loop and surely not giving a true constant to the stop button ) for windows, in the case of Fpga and Periodic waveform input I didnt find this as a good option.
01-03-2014 09:00 AM
01-03-2014 09:33 AM
01-03-2014 10:04 AM - edited 01-03-2014 10:11 AM
@nmadhaneie wrote:
I agree with your point. but this holds good only for a static set point. I am working on a Linear time invariant system(LTI), My set point to the system is a sine wave of frequency from 1 Hz to 200 Hz, so in that case how the above explanation suits,?
I think Sam's response is stated pretty well.
Generally the Setpoint is constant. Yes it is going to occasionally change in a stepwise fashion.
If you are changing the setpoint continuously, then you have a completely different problem, and perhaps a PID algorithm is not the best solution for it. But maybe the PID is going to be okay for you. If you are dealing with a conitnually changing setpoint, that is adjusted with the proportional part of the algorithm already. Are you sure you even need to used the derivative part of the algorithm?
Are you have any particular problems now using the subVI's that NI provided with LabVIEW FPGA, or is this all just a theoretical question about implementation?