LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PID Help

Hello Experts,
 
I am trying to use NI9263 Analog output module to generate a sine wave to drive a shaker. I will use an accelerometer to measure the real responses. The goal is to make sure the response is as close as possible to the generated sine wave.
 
Can anybody tell me should I use directly the generated sine wave as setpoint, the measured acceleration as process variable? Then where should the output go?  It seemed the output is a single number not a wave.
 
Thanks a lot
 
Bill Shaw
0 Kudos
Message 1 of 7
(3,448 Views)
Hi Bill,

You are mostly correct as far as using the sine wave as a setpoint.  The way that PID control works, you are actually comparing the current value to a setpiont value to generate your output.  This is done in a loop, so the setpoint can change from one iteration of the loop to the next.  The output that is computed is based on the difference and your PID gains, but it is not necessarily an accurate representation of the actual position difference (although it would be if your I and D gains were set to zero).

I have a couple other concerns though.  First, if you are using the 9263 in a cRIO chassis running realtime, you should have the determinism to find if this will work.  If the 9263 is in the cDAQ chassis, your measurements might not be deterministic enough for accurate response.

Also, you will not be able to directly compare the setpoint position to the accelerometer value.  You could integrate the acceleration twice to obtain position, but the position still cannot be explicitly determined from acceleration, and there will likely be quite a bit of error in calculating this.  A better approach would be to use enoders to get position values.

Hopefully this gets you started.  Please let us know if you have any further questions.
Regards,
Brandon M.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 7
(3,417 Views)
You might want to take a look at this discussion.
0 Kudos
Message 3 of 7
(3,402 Views)

Thank you guys for the help. I have made a subvi according to my understanding.  Can anybody take a look at it and give me some suggestions?

Thank you in advance

Bill Shaw

 

0 Kudos
Message 4 of 7
(3,371 Views)

Hi Brandon,

Can you help me take a look at my subvi?


Thank you in advance

0 Kudos
Message 5 of 7
(3,359 Views)
You shouldn't create a new message thread for the same question.
 
 
Are you Vr6Fidelity as well?
 
The message seems similar to this thread. with eerily similar VI's posted !!!!!!Smiley Mad

Message Edited by Ravens Fan on 07-30-2007 10:44 PM

Message Edited by Ravens Fan on 07-30-2007 10:48 PM

0 Kudos
Message 6 of 7
(3,341 Views)
Hi Bill,

Ravens Fan is absolutely correct; you should not create multiple threads for the same issue.  By keeping it in one thread, it makes it easier for those having future problems to search for their problem and see the solution, and it also helps to get accurate information to you, by allowing for users who are responding to you to work with one another.

Because many users have already commented on your code in your other thread, I will address the code itself there.

http://forums.ni.com/ni/board/message?board.id=170&message.id=262252#M262252
Regards,
Brandon M.
Applications Engineer
National Instruments
0 Kudos
Message 7 of 7
(3,300 Views)