LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

New to LabView...trying to design a PID.

Hey,
I'm new to LabView, and although I'm a software developer by trade this graphical development stuff doesn't come easy to me.

Anyhow, I'm using the Labview FPGA module and Labview 8.2 to try and design a servo control system.  I'm shining a laser onto a mirror on a piezo tube, the laser beam is reflected at a quad-sector photosensor pad.  The pad does a left-right and bottom-top subtraction and outputs two respective voltages to let me know where the laser is reflecting to.  The idea would be to take this data and create a signal with destructive interference to output to the piezo in order to stabilize the mirror and keep the laser centered on the photo pad.

For testing purposes I'm subsituting a speaker with an arbitrary signal being passed to it to simulate the motion of the piezo tube...when I can get the thing working I'll sub the piezo for the speaker and adjust the parameters.

I'm trying to use the LabView PID controller examples, but I can't seem to get it to work...the audio signal I'm using for test hardly even gets attenuated.

Keeping in mind that I'm new to this, and might be a little slow...does anybody have any suggestions they could give me to point me in the right direction?

Thanks a bunch!
Ben
0 Kudos
Message 1 of 6
(3,994 Views)
The thing I don't get is you appear to need 2 axes of movement to center the laser, but are you using 2 speakers to do this?  What mode will you be using the piezo tube in?  Other than that, PID output is very dependant on the tuning.  If you can give some more details about the system, we will see if we can help some more.
0 Kudos
Message 2 of 6
(3,985 Views)

Ah...I'm sorry I omitted that.  There ARE two outputs from the photosensor pad, but I'm planning on aligning the laser so that one axis of the pad is in the plane of the laser beam and reflected beam.  There will only be one degree of freedom for the object that the piezo tube is mounted to.  Therefore, as that object oscillates, and the piezo along with it, the beam will "walk" back and forth on one axis of the pad, but the other coordinate will be changing.  I'll draw a picture...

All right, well, I took a couple of minutes to do a crappy diagram in paint.  Assume that the laser is coming in from left to right...the green thing at the bottom is a piezo tube, the laser is reflecting off of a mirror at the tip of the tube, and the reflection is hitting the detector (that little green line near the upper right hand corner), and we're imaging that it's "walking" along one of the axes of the detector.  The difference in current from the right and left hemispheres of the detector is converted to voltage, from - to +3VDC.  That's getting picked up and sent to the FPGA.  In the case of the piezo tube, I just want to create a waveform that will try to cancel the movement of the reflective mirror and send it back to the piezo tube...which no one can find the datasheet for.  So in order to keep from destroying the piezo tube with my tests, I decided to try and get the damn thing right with a speaker first.  Maybe not such a great idea, since the equations of motion are not at all similar, and response won't be anything alike.  But I figure, if I can write the thing and get it working for the speaker, then won't I be able to get it to work for the piezo as well by simply changing input parameters, relative gain, that sort of thing?

Well, I'll shut up now.  If it still needs more clarification, please let me know...thanks a lot!

Ben

 

0 Kudos
Message 3 of 6
(3,976 Views)

That makes more sense.  A couple of more questions.  What are you feeding the FPGA output into?  Whether you are driving the speaker or the tube, you will need an amplifier.  From a PID standpoint, this is pretty straightforward.

Do you have any information on the piezo tube?  What material, dimensions, where the electrodes are?

0 Kudos
Message 4 of 6
(3,962 Views)
I hadn't considered that yet...thanks for forcing me to!  For the speaker, I guess I'll just use a simple PA amplifier...I have one of those lying around the lab.  As for the piezo tube, I'm not sure.  I guess, depending on the power required, I might be able to build a simple amp with a couple of op-amps...I'll check into that.  I'll post whatever info I can find about the piezo on here as soon as I get a chance.  In the meantime, do you need any other information in order to give me a nudge in the right direction for the speaker scenario?  I'm probably not going to be the one working on the final piezo implementation anyway, just doing the groundwork so that others can modify it to taste.

Thanks again,
Ben

Message Edited by bcoats on 04-15-2007 06:45 PM

0 Kudos
Message 5 of 6
(3,949 Views)
It may be worthwhile to check out PI's website for info on the various piezo systems and driver requirements....
They have a lot of systems so something should be similar to the components your working with.

http://www.physikinstrumente.com/en/products/nanopositioning/index.php




0 Kudos
Message 6 of 6
(3,602 Views)