LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PID control of sinsuiod - w crio

Solved!
Go to solution

 hello 

 

Overview: We are building a current controlled servo tube capable of sinusoidal load control to 4htz.  We have a load cell providing input to a crio 9014 (9237 module) which is running in scan mode (not fgpa).  The digitized load cell value is then sent to a PID VI to allow a computation of the next current (I) value to send  back to the servo tube which thus, close the loop on the load control.  This  computed current value is sent through crio analog output module to the servo amplifier.  A copy of the main program (mouseloader.vi) and other pertinent files such as project files can be found here.

http://www.engr.uconn.edu/~jmacione/temp/labview43-Copy/

 

  Problem.   The program starts to fail when the sinusoid load needs to go above 1htz.   The sinusoidal input to the PID control, called "basic function generator.vi", outputs 1000 points per sinusoid.  We can chart sinusoid going into the PID control (pid vi) and it appears as a clean. Yet, the waveform leaving the PID control is suffering from distortions which appear as jaggies, as if there were not enough points to represent the sinusoid. This appears to limit how fast our loading device can function (max of 1htz) as well as distorts the waveform. 

Thoughts.  From basic research, the fpga mode (which we are not using) has  an independent timing module which can multiply out with our timer.  There is a good answer by dustin w here. http://forums.ni.com/ni/board/message?board.id=170&message.id=215968&query.id=757585#M215968 But Im not sure that this applies as we are using scan mode interface which i thought would execute on our computer.  Im also thinking that the internal PID control timer (dt) is complicating the timing. We have at this point turned off all of our other timing devices but are unable to establish the waveform to correct. Desires:  I would like any suggestions to allow us to create a smooth sinusoidal 4htz waveform (4 times a second) using the PID control. 

 

thanks

Jim

Message Edited by jimmyinct3 on 09-15-2009 06:43 PM
Message 1 of 4
(3,057 Views)

here is an example of what im seeing

it shows its not any type of tuning issue.

this is just 1htz, ie, one cycle a second

 

Message Edited by jimmyinct3 on 09-15-2009 06:57 PM
Message 2 of 4
(3,048 Views)
Solution
Accepted by jimmyinct3

 

Im going to move this to the real time forum

http://forums.ni.com/ni/board/message?board.id=280&thread.id=6813

 

Message 3 of 4
(3,022 Views)

there is a fundamental flaw in your program.  You have a selector controled by "signal" that outputs a scalar "Load (N)" or the waveform output of the function generator.  Only a scalar is returned from the selector.  you are not actually feading the sinusoid you think you are into the PID.  You need to use the sine generator pt by pt.  you are also computing the incoming frequency incorrectly.  you should not be dividing by iterations per second.

 

What is the iterations per second that you are getting using the current loop?  This will be the limiting factor on how well you can control force.

Stu
0 Kudos
Message 4 of 4
(3,017 Views)