LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

problems with derivative/integral in PD control for real time.

Hello to you all,
I'm using Labview 8.5 to build a PD controller.
i'm using a PXI 8187 with FPGA 7831-R.
I run a simulation of the controller both in matlab and laview using the simulation module and it worked fine.
the next step is to build the PD controller in a new VI and use it control the signals from the FPGA,but when i try to use others form of derivatives,including the mathematic's backward derivative, but  the system is not stable any more.
does anyone know what can i use to replace the derivative block that will work the same?
0 Kudos
Message 1 of 7
(3,608 Views)

does'nt anyone have a clue what might go wrong?

I'll try uploading the vI i've created..

 

thanks

0 Kudos
Message 2 of 7
(3,574 Views)

bgu_student,

It would definitely be helpful if you could post the VI that is not working for you.  Otherwise it is hard to guess what might be going wrong.  Just to clarify, is the VI with the Simulation Module that you posted working propertly?  For that VI, I would recommend removing the local variables of the 'x' output, since you can simply wire the output back to the inputs in a Sim Loop.  This will actually change the behavior of the system slightly.  Also, if you could post the VIs, as opposed to a screenshot, that would be most helpful.

Chris M

0 Kudos
Message 3 of 7
(3,568 Views)
hello again,
i've posted the VI's in here:
http://hl2.bgu.ac.il/users/www/18850/labview/


the system should be settling around the set point 0:
the file:1st working pd is the  same as in the picture: the system is stable, but i cant use a simulation to when using a RT controller.
the file 1st not working Pd is the same as the working one,but instead of using the simulation continous derivative and integral i used other whioch doesnt seem to work.
the file PD2 represent how the PD controller should look standalone-  location X as input and current I as output.
the file 2nd not working vi uses the PD2.vi to simulate the system unsuccesfully.

you can change the running time of each vi to see how the 1st working one is stable around 0 and how the other ones are not.

I hope that would help you guys to figure out what is wrong and let me continue my gradguation project.

thanks again.
elad.


0 Kudos
Message 4 of 7
(3,548 Views)
bgu_student,

I am looking at your code right now and am going to try this on a Real-Time target here. I will post back with my results and suggestions.
--Michelle

National Instruments
0 Kudos
Message 5 of 7
(3,474 Views)
thank you,
I've already found a solution using ptbypt derivative with initial conditions.
0 Kudos
Message 6 of 7
(3,465 Views)
bgu_student,

Thank you for the update - is there anyway you can post your work around so that others who may have this same issue can see what you've done? I am assuming the only thing you replaced was the Express VIs with the PtByPt derivative and integral VIs?

Thanks again!


--Michelle

National Instruments
0 Kudos
Message 7 of 7
(3,428 Views)