Closed Loop Piezo Stage Operation.

Have questions about the equipment used for macro- or micro- photography? Post those questions in this forum.

Moderators: rjlittlefield, ChrisR, Chris S., Pau

mawyatt
Posts: 2497
Joined: Thu Aug 22, 2013 6:54 pm
Location: Clearwater, Florida

Post by mawyatt »

The final "Lab Quality" PCBs arrived and were assembled over the weekend. Two boards, one is a full custom controller/driver/amp for the piezo stages, the other is a custom controller for the OEM PI-P603K driver/amp available as surplus on eBay.

The evolution of the custom developed controllers started with the surplus PI-P601K piezo stages from eBay. Open Loop Controller/Drivers were developed and custom PCBs fabricated, assembled and tested. The results were very good!!

Later a custom Controller/Driver/Amp utilizing Current Mode was developed for using a Voice Coil Motor (Audio Speaker), results were also very good!

Then Closed Loop control of the piezo stages was investigated, this proved to be a very difficult task indeed :shock: Follow above for more details!!

Various piezo stages and controllers were acquired and used for initial evaluation to help with the final development goals for Full Closed Loop operation. This lead to the development of two completely different paths, a "Plan B" just in case :roll:

Well both Plan A and B worked, and both worked beautifully :D

Plan A is the Full Custom Controller/Driver/Amp which is highly adaptable and configurable to allow operation with various piezo stages.

Plan B is to interface with the OEM PI P603K controller and allow stand alone operation without any additional OEM gear (or software) other than the PI-P603K piezo stage.

Both operate with a Raspberry Pi and support single +12V supply operation with total current consumption below 1/2 amp, and have position dictated by an effective 20 Bit DAC.

Both have external manual position input capability in the form of an external potentiometer which operates by superposition with the RPi control and have internal 16Bit (and 18 Bit) ADC to read out the actual stage position by reading the Strain Gauge feedback. This same ADC is utilized for self setup and calibration.

Now the effort focuses on software development as all the hardware is in place and fully functional. Initial test routines have been developed to position stages, readout positions, help setup & calibrate stage and run some simple stacks for linearity evaluation.

Anyway, that's where the hardware development has finished and here's some image showing the evolution and details.

Best,

Various piezo controllers, VCM controllers & motor, and OEM Driver/Amps and Piezo Stages
Image
Image

Full Custom Controller/Driver/Amp
Image

Custom P603K Controller mounted on top of OEM P603K Driver/Amp
Image
Image
Custom P603K & OEM Driver/Amp connected to RPI and OEM P603K Stage. Complete setup.
Image
Image
Image

Custom P603K Controller with OEM P603K Driver/Amp and External Pot for Manual Positioning.
Image

Full Custom Closed Loop Controller with OEM P601K Stage, External Pot and RPi. Complete Setup.
Image
Image

PI P603K Piezo Stage connected to RPI & Custom P603K Controller & OEM Driver/Amp.
Image

PI P603K Piezo Stage with Adapter by JW.
Image
Last edited by mawyatt on Tue Nov 12, 2019 8:10 am, edited 1 time in total.
Research is like a treasure hunt, you don't know where to look or what you'll find!
~Mike

Saul
Posts: 1781
Joined: Mon Jan 31, 2011 11:59 am
Location: Naperville, IL USA
Contact:

Post by Saul »

Looks impressive !

mawyatt
Posts: 2497
Joined: Thu Aug 22, 2013 6:54 pm
Location: Clearwater, Florida

Post by mawyatt »

Saul,

Thanks.

I was surprised that I could get the OEM P603K Driver/Amp to work with the P601K Piezo Stages. The "K" in these means Kustom and they are "tailored" to each application, and thus "mated" to a specific piezo stage & type, the P603K in this case. The Full Complete Controller/Driver/Amp is designed to be more flexible and adaptable, but the OEM P603K Driver/Amp is setup for the mating P603K stage.

An offset correction adapter allows the P601K stage to be operated with the OEM P603K Driver/Amp and custom Controller. The P601K stages have a much bigger offset than the P603K stages, they also are for much heavier loads, solid Stainless Steel block rather than partial aluminum & SS and have dual piezo element arrays for the heavy lifting.

Anyway, I have a few of the 1st generation PCBs for the Full Custom Controller/Driver/Amp and Custom Controller for the OEM P603K Driver/Amp available if someone is interested. May release the Lab versions later, but have "other" uses for these besides macro work :roll:

Best,
Research is like a treasure hunt, you don't know where to look or what you'll find!
~Mike

Smokedaddy
Posts: 1951
Joined: Sat Oct 07, 2006 10:16 am
Location: Bigfork, Montana
Contact:

Post by Smokedaddy »

... you've been busy. :D

mawyatt
Posts: 2497
Joined: Thu Aug 22, 2013 6:54 pm
Location: Clearwater, Florida

Post by mawyatt »

Yes indeed!!!

The hardware is finished unless I can find a piezo XY stage like the PI P612 XY Stage or similar at "reasonable" prices, then I'll create a dual axis Full Custom Controller/Driver/Amp which should be relatively easy since all the really difficult work has already been accomplished. The dual axis will be utilized for pixel shifting.

Now the efforts shift to the arduous task of creating the software routines and integrating these with the Trinamic routines. In the meantime I have a some proprietary chip images I need to create.

So I'm working harder now I've retired than when I was actually "working" :roll:

Best,
Research is like a treasure hunt, you don't know where to look or what you'll find!
~Mike

chris_ma
Posts: 570
Joined: Fri Mar 22, 2019 2:23 pm
Location: Germany

Post by chris_ma »

looks great!
wish I had your energy, everything takes ages here :)

mawyatt
Posts: 2497
Joined: Thu Aug 22, 2013 6:54 pm
Location: Clearwater, Florida

Post by mawyatt »

Thanks Chris.

Different things take different amounts of energy and time for different folks, everything has it's place and everyone has their expertise. Software is not my forte, so suspect this will take much more of my energy and time :?

The long-awaited connectors just arrived and I was able to make an adapter cable for the OEM P603K piezo stages to operate with the Full Custom Controller/Driver/Amp, they worked beautifully with the Custom Controller/Driver/Amp!

One thing I realized I forgot to mention is you can operated these devices without the Raspberry Pi in manual mode, where the stage is precisely positioned and stabilized (Closed Loop) with a simple precision potentiometer. The "pot" can be remotely located for convenience and when the RPi is active the "pot" position and RPi position are superimposed. eBay has provided some nice cheap 10 turn 10K pots with dials for under $4 that work superbly.

One simple test that can be easily performed is to position the stage and then load the stage and look for any deflection. With focus rails and especially micro stepping, there will be some deflection because there is no feedback to indicate movement, they are Open Loop Systems.

With these ultra-high gain negative feedback Closed Loop Piezo Systems, almost any stage movement is detected and immediately fed back to the control loop for compensation. Just did a quick test, where I opened the feedback loop an monitored the feedback after a gain of ~30,000. This feedback system is so sensitive I could see a toothpick added to the stage, just touching it with my finger without any pressure caused a massive change in feedback. Then I closed the loop, placed the toothpick with no change in feedback, then placed my finger with no steady state change, then pressed with no SS change, then pressed hard with no SS change, then mounted the very heavy Mitutoyo 50X lens with no change in steady state feedback :shock:

What this means is the control loop is sensing and correcting for these external loads and adjusting the piezo element voltage to compensate, so the actual stage position isn't changing under load. When the Mitutoyo lens was added the piezo control voltage changed by ~11volts to compensate and keep the stage at the same position with the extra load. Noise becomes an issue at these extreme low levels of movement, especially low 1/f noise. Much thought and effort was put into the design to mitigate noise effects, including a somewhat special type amplifier for driving these piezo loads for macro use. These are the benefits of precision negative feedback implemented and applied properly.

I think you can say we've "cracked the code" on these difficult piezo devices with their highly unique and complex behavior and can now operate with various configurations at nanometer levels for our macro use, and this can be done at a very modest cost :D

Now back to work on the software :roll: Anyone want to help :D

Best,
Research is like a treasure hunt, you don't know where to look or what you'll find!
~Mike

mawyatt
Posts: 2497
Joined: Thu Aug 22, 2013 6:54 pm
Location: Clearwater, Florida

Post by mawyatt »

mawyatt wrote:Kalman filters won't help with this kind of control loop, they are more for the long term control systems (drift) like we've used in our Ring Laser, Fiber Optic, and Electrostatically Suspended gyros back when I was with Honeywell, the world leader in these areas.

This system requires a very high open loop gain to achieve this level of precision, but must overcome the multiple resonances of the system as well as the mechanical, electromechanical, electronic and feedback delays.

You have at least three 2nd or 3rd order mechanical systems in play, the subject holder, subject actuator flexures (at least 6 flexures which could have a separate function for each!), and piezo element to mechanical interface. These all have resonances and delay functions. The piezo elements themselves have a non-linear displacement vs. voltage, have at least a 2nd order memory effect, and a highly non-linear and non-monotonic capacitive effect. Adding to this are the strain gauge sensors which produce only a millivolt output or so full scale on a ~2.5V common mode, requiring a precision fully differential high CMR ultra low noise feedback amplifier which introduces another delay and of course noise. The feedback scale factor is 1mv/100um, at 10nm resolution is only 100nv feedback voltage, so amplifier noise becomes a limiting factor.

You are absolutely correct than the controller and power supplies must be well thought out and designed, otherwise you'll just end up with a bunch of garbage electronics and worthless system.

Certainly one of the more complex pure analog control loops I've encountered in my career, far more complex than a simple pendulum, and well beyond my ability to solve mathematically. Simplied it's a 10~15th order equation, so I resorted to further simplifications to reduce the system order to something more manageable.

Here's the highly simplified open loop Bode plot of gain and phase.

Image

Initial double split pole compensated open loop with a Phase margin of ~40 degrees and gain margin of ~16dB. I'm working on getting the PM up to ~50 degrees or better.
Image

Full scale transient step responses for 30mv per bit (12 bits = 122.9 V)
Image.

Anyway, I've got a couple approaches to this and the initial results are very encouraging indeed. The measurement plots I've shown were with a very simple setup with a couple grounds loops (I know since I could influence the static output by changing the ground connections) and a non-compensated 12 bit DAC for initial position control. These test will continue when the custom PCBs arrive and I'll have better grounding, digital isolation, and a compensated 20 bit DAC, expandable to 24 bits.

Edit: I've tweaked the compensation network slightly to achieve more optimal dampning.

Image

Best,
We've been able to get some instruments off eBay and refurbish them. Since the Agilent and HP 6-1/2 Digit 34401A meters agree with a few mircovolts (on lower scales and within the least significant digits), and these agree with an older Fluke 87 and 77 meter within a least significant digit of the Flukes, I think it's safe to assume the 34401A are accurate enough for use as calibration.

https://www.photomacrography.net/forum/ ... hp?t=40775

These meters are being utilized to calibrate the Closed Loop Controllers with the PI P601K Piezo Stages for a Closed Loop Piezo Controller & Stage Setup, this is eventually for a member.

Preparing for the initial calibration of the P601K stage with the 16 bit control DAC, a routine was created to allow control of the stage in various ways, one of which is to allow the stage to "jump" between various ranges including full scale. This is referred as a "Step Function" in the electronics world and a excellent verification of closed loop system stability. This very function was utilized in the development of the Closed Loop controller as shown above. Parameters were entered (65535 DAC counts for full scale) into the routine to cause the stage to range for zero position to full position and back, this requires ~110V signal across the piezo element for this setup scale factor.

Here's the measured piezo signal at 20 Volts/Div.

Image

Classic step response of a stable system verifying the design & assumed parameters. You may note the near critical optimal rising step response dampning, while the falling has a response of slightly over damped. This is by design as the rising "Going To" position was desired to be sightly quicker than the "Returning To" position, so the output transconductance amplifier has different responses to rising and falling positions. This also allows the amplifier to have only the high side active during steady state at any output voltage, thus only this side contributes output noise during steady state (where it matters). The low side is only active in falling transition and "pulls" charge from the piezo stage, the high side delivers charge.

To check out the actual stage use a setup was reconfigured with the piezo stage securely attached to a horizontal bar (part of WeMacro Stage). This arrangement allows the piezo stage to move the subject (laser printed random "grey" patten paper mounted to a flat surface) vertically and the camera/lens (D850 & Mitutoyo 20X) is horizontal on a THK KR20 focus rail.

The camera/lens is moved into focus on the paper with the THK KR20 unpowered, so the movement is only in cogs and not micro steps. This is 2.5um per cog step. The piezo stage is then moved vertically and images captured with the camera utilizing fully electronic shutter mode (no induced vibration).

Zerene then aligns the images and creates an alignment text file which is imported into Excel and a graph created. Zerene is setup to use "Higher Precision Alignment" since the actual step size is in the nanometer range.

Here's the result of a full scale range from zero the 65535 DAC counts (produces ~110V piezo drive voltage). This equates to 262 um range, so 262um/65535 = 4nm/DAC count (agrees with a much earlier test where the P601K stage moved 400um as measured with the KR20 with an applied 160VDC).

Image

And here's 750nm range.

Image

Later I may make a video of the stage in operation, the absolute smoothness of motion when using a full scale "ramp" 65535 count waveform when viewed at magnifications up to 800X is encouraging. The stage always returns to exactly the same position, even viewed at 800X regardless of direction or speed of approach, from a full scale 0 to 65536 step or to a 1 count incremental step!

Best & Happy Holidays,
Research is like a treasure hunt, you don't know where to look or what you'll find!
~Mike

Smokedaddy
Posts: 1951
Joined: Sat Oct 07, 2006 10:16 am
Location: Bigfork, Montana
Contact:

Post by Smokedaddy »

mawyatt wrote:The stage always returns to exactly the same position, even viewed at 800X regardless of direction or speed of approach, from a full scale 0 to 65536 step or to a 1 count incremental step!
Thanks great news. As usual, you've been a busy elf. :shock:

mawyatt
Posts: 2497
Joined: Thu Aug 22, 2013 6:54 pm
Location: Clearwater, Florida

Post by mawyatt »

Running some "burn in" tests with a complete setup (PI P601K with Custom Controller/Driver/Amp) for a member. After 1st initial calibration on New Years Day, the system hasn't moved any I can tell with 800X optical detection (Nikon D850 at 16X and Mitty 50X) or electronically it only indicates 3.6 nanometers (6 1/2 digit Agilent DVM reading strain gauge output with ~1000X amplifier). Yet this system is sensitive enough to easily detect a toothpick placed on the stage which is capable of supporting a kilogram or more.

I don't think I've memioned this before but another benefit of a tight, high gain closed loop system that's optimally compensated & configurated is the reduction of vibration effects. This occurs as a consequence of the vibration influence being from "outside" the tight closed loop system and sensed as a disturbance rather than a desired signal. Of course this is highly system, frequency, phase, amplitude & position sensitive, but none-the-less some means of reduction (every little bit helps!!).

I decided to do a quick and dirty (slang for not very scientific!) test by "pinging" the stage with my finger and observing the response on a scope (oscilloscope). The "pinging" represents external vibration and the scope shows the feedback response as sensed by the strain gauge and amplified by ~1000X, thus the piezo stage response.

1st test was with the loop opened without any feedback (the design & PCB have a convenient means of opening the loop and maintaining control stability while monitoring the result). 2nd test was with loop closed. These 2 tests were performed on a PI P601K stage mounted to a WeMacro Horizontal Stand and another not mounted.

Both cases showed low frequency improvement in settling time (time to return to initial state) after the initial "ping" when the loop was closed. This should be no surprise as the closed loop can help attenuate the vibration induced effects well below the loop bandwidth since they appear as an error source within the loop (just like noise) and the loop attempts correct this error source.

Anyway, this is a nice side benefit of a tight closed loop system that may not be obvious.

Edit: I decided to try another quick & dirty test, this time to see the effects of a purposeful induced thermal change to the stage. Using a hairdryer on high and hot settings I aimed at the piezo stage and watched the controlled feedback voltage and the piezo electric drive voltage... and watched the camera output with a 20X mitty (what was already attached to the setup) at 16X, so 320X effective.

The feedback control voltage didn't move and the piezo element drive voltage changed by ~30 volts, indicating that the stage was being corrected for the thermally induced transient temperature. The feedback indicated that the stage was being held at the same position while the piezo element drive voltage indicated that the piezo element was being driven hard to maintain the fixed position. As the stage temperature slowly returned to room the element voltage slowly returned to the initial voltage.

The camera indicated that the stage was not moving in the direction of the normal movement (Z axis in this case) and the position of the image remained fixed in the z axis, there was movement tho in the X and Y axis which are not controlled but not in Z which is under piezo control.

Then I pointed the hairdryer at the THK KR20 focus rail, the image immediately began to move quickly off the screen, showing the extreme temperature sensitivity of the KR20 rail relative to the piezo stage. Just repeated the test and the results were the same!!

To help explain what's happening and why this system can be more resilient to temperature induced movements, consider the electronics for a second.

The Closed Loop design is created around a response to the computer generated DAC command voltage and nothing else. Feedback is utilized to "sense" the stage position and feed this to the control loop which attempts to match the feedback to the control voltage exactly. This control is achieved by driving the piezo element to move the stage.

Outside influences are not responded to unless they can effect either the command voltage or the feedback system, since they are considered "outside the loop".

On might wonder about how the piezo stage movement is sensed and how is this not temperature sensitive, those are great questions.

Stage movement is sensed by strain on the monolithic SS piezo stage block at strategic positions to align the stress with the stage movement. Precision resistive stain gauges accomplish this stress sensing in a cross-coupled differential manner called a Bridge. 4 precision stress sensitive low temperature coefficient resistors are bonded to the SS block and have a nominal resistance of 1000.0 ohms, under stress the resistance value changes. The Bridge is driven by a precision 5.000 volt reference and the resistors are electrically configured as a cross-coupled voltage divider. When stress is applied the voltage across the Bridge changes slightly and sensed by a Precision High Gain Differential Amplifier which becomes the "feedback voltage" of the system.

When temperature changes the resistor values change with temperature, even low TC resistors change. The resistors change to temperature is common to the 4 resistors and they change equally. The Bridge is configured such that this doesn't influence the Bridge output, this is a "Common Mode" effect and rejected, even the Bridge Reference voltage doesn't affect the output to a 1st order degree so noise or other small variations are rejected.

However, and big HOWEVER, the stage does respond to the temperature and in a big way due to the thermal induced dimension changes. The TC for SS is about 15ppm/C, so as it heats up the stage size expands and causes the stage to move. This movement is detected by the Strain Gauges and interpreted as a error source by the Closed Loop System which creates a correction voltage to drive the piezo element to return the feedback signal to it's original value before the temperature changes, thus corrected by negative feedback.

Best,
Research is like a treasure hunt, you don't know where to look or what you'll find!
~Mike

mawyatt
Posts: 2497
Joined: Thu Aug 22, 2013 6:54 pm
Location: Clearwater, Florida

Post by mawyatt »

See Edit above.

Try the hairdryer test on your stage while viewing in Live View at very high magnifications to see how stable it is.

Best,
Research is like a treasure hunt, you don't know where to look or what you'll find!
~Mike

Smokedaddy
Posts: 1951
Joined: Sat Oct 07, 2006 10:16 am
Location: Bigfork, Montana
Contact:

Post by Smokedaddy »

... more good news. Thanks again for all the hard work.

mawyatt
Posts: 2497
Joined: Thu Aug 22, 2013 6:54 pm
Location: Clearwater, Florida

Post by mawyatt »

Funny story, well not so funny initially, but funny in the end :roll:

While preparing another setup for someone we noted that High + Output Voltage Blue LED on the original test Closed Loop Piezo Controller was brightly lit meaning a high output voltage is being applied to the piezo stage. This setup has been running non-stop for a month, and the piezo stage is my 1st stage (PI P601K) that I’ve experimented with and it has been treated roughly, as has the original closed loop controller PCB. So out came the DVMs and starting with the built-in PCB diagnostics to try a trace down the problem (output voltage wasn't commanded to be high). 1st thought was the controller board had failed, likely the HV section devices, maybe blown output transistors and driver op amp, after all this has been abused and abused. So a couple jumpers set and a little thought process on how the design works and the DVM reading results didn’t seem likely, another rearrangement of the jumpers and the output begins to slowly drift (about a volt per second) upwards, eventually hitting the 120VDC rail. This indicates a loss of feedback, but the feedback signal responds to touching the stage indicating stage movement, thus feedback, so what's going on?? We measured the strain gauge resistance and it’s correct, so maybe the amplifier output is toast. Another rearrangement of jumpers and the output amp appears to be fine, so puzzled we decided to try another piezo stage (nice to have backups for comparison!!), which worked perfectly!

Now another thinking process about all this over some Strawberry ShortCake (It’s strawberry season here). Everything is behaving as if there is no feedback but the feedback tests OK, and the amp tests OK. Wait a minute, what if the core piezo element isn’t responding to the control voltage, that would effectively open the loop and create this type behavior. Another jumper setup confirmed the piezo core element isn’t responding to the control voltage. So now fear sets in (we can fix the controller electronics, but if the piezo element has failed…well that’s the end of this original test PI P601K piezo stage).

We always check the wiring 1st, that was fine…we thought!! :? After careful inspection (an more SSC) the center conductor of the coaxial cable that supplies voltage to the piezo elements had pulled away from the connector contact, an ohmmeter won’t generally show this unless you are careful to judge the capacitive nature of these piezo elements (they look like capacitors electrically). The coaxial cable insulation was still running into the connector shell, but the conductor was severed!! :shock:

Lesson learned again, and again, and again…with electronics always check the obvious things first, then check again , and then check again before proceeding to step 2!! :oops:

I can hear Murphy now :roll:

Best,

Mike
Research is like a treasure hunt, you don't know where to look or what you'll find!
~Mike

Smokedaddy
Posts: 1951
Joined: Sat Oct 07, 2006 10:16 am
Location: Bigfork, Montana
Contact:

Post by Smokedaddy »

... I think I can relate.

Image

-JW:

mawyatt
Posts: 2497
Joined: Thu Aug 22, 2013 6:54 pm
Location: Clearwater, Florida

Post by mawyatt »

Yep, very similar!!

Except the wire isn't obviously severed :shock:

Best,

Image
Image
Research is like a treasure hunt, you don't know where to look or what you'll find!
~Mike

Post Reply Previous topicNext topic