pmac servo tuning - pure - aanmelden · motors are controlled by a pmac control system, which can...

72
PMAC servo tuning Citation for published version (APA): Evers, W. J. E. (2003). PMAC servo tuning: Vermeulen C.O.D. turning maching. (DCT rapporten; Vol. 2003.106). Technische Universiteit Eindhoven. Document status and date: Published: 01/01/2003 Document Version: Publisher’s PDF, also known as Version of Record (includes final page, issue and volume numbers) Please check the document version of this publication: • A submitted manuscript is the version of the article upon submission and before peer-review. There can be important differences between the submitted version and the official published version of record. People interested in the research are advised to contact the author for the final version of the publication, or visit the DOI to the publisher's website. • The final author version and the galley proof are versions of the publication after peer review. • The final published version features the final layout of the paper including the volume, issue and page numbers. Link to publication General rights Copyright and moral rights for the publications made accessible in the public portal are retained by the authors and/or other copyright owners and it is a condition of accessing publications that users recognise and abide by the legal requirements associated with these rights. • Users may download and print one copy of any publication from the public portal for the purpose of private study or research. • You may not further distribute the material or use it for any profit-making activity or commercial gain • You may freely distribute the URL identifying the publication in the public portal. If the publication is distributed under the terms of Article 25fa of the Dutch Copyright Act, indicated by the “Taverne” license above, please follow below link for the End User Agreement: www.tue.nl/taverne Take down policy If you believe that this document breaches copyright please contact us at: [email protected] providing details and we will investigate your claim. Download date: 22. Dec. 2020

Upload: others

Post on 30-Aug-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

PMAC servo tuning

Citation for published version (APA):Evers, W. J. E. (2003). PMAC servo tuning: Vermeulen C.O.D. turning maching. (DCT rapporten; Vol.2003.106). Technische Universiteit Eindhoven.

Document status and date:Published: 01/01/2003

Document Version:Publisher’s PDF, also known as Version of Record (includes final page, issue and volume numbers)

Please check the document version of this publication:

• A submitted manuscript is the version of the article upon submission and before peer-review. There can beimportant differences between the submitted version and the official published version of record. Peopleinterested in the research are advised to contact the author for the final version of the publication, or visit theDOI to the publisher's website.• The final author version and the galley proof are versions of the publication after peer review.• The final published version features the final layout of the paper including the volume, issue and pagenumbers.Link to publication

General rightsCopyright and moral rights for the publications made accessible in the public portal are retained by the authors and/or other copyright ownersand it is a condition of accessing publications that users recognise and abide by the legal requirements associated with these rights.

• Users may download and print one copy of any publication from the public portal for the purpose of private study or research. • You may not further distribute the material or use it for any profit-making activity or commercial gain • You may freely distribute the URL identifying the publication in the public portal.

If the publication is distributed under the terms of Article 25fa of the Dutch Copyright Act, indicated by the “Taverne” license above, pleasefollow below link for the End User Agreement:www.tue.nl/taverne

Take down policyIf you believe that this document breaches copyright please contact us at:[email protected] details and we will investigate your claim.

Download date: 22. Dec. 2020

Page 2: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

PMAC servo tuning: Vermeulen C. 0 .D. Turning Machine

Willem- Jan Evers

DCT Report 2003.106

Graduate professor: Prof. dr. ir. M. Steinbuch Supervisor: ir. P. Nuij GTD Contact: ing. P. Aedenroomer

November 2003

Page 3: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

Abstract

The subject of this traineeship is the Vermeulen CNC turning machine, which servo- loops needed to be tuned. To do this, the PMAC controller, which is embedded in the system and the dynamical behavior of the system were analyzed. With this knowledge a simulation file was made in Matlab, which was used for the off-line tuning of the con- trollers. For the spindle a 0.5 Hz bandwidth controller was tuned and after testing this, it was found satisfactory as long as it was brought to its intended constant velocity in a step- wise manner. For both the X- and Z-axis two controllers were tuned, one with a low-pass filter and one with a notch filter, as both cannot be implemented at the same time. While testing these on the machine, during a turning experiment, it became clear that the controllers with low-pass filters did not have a high enough bandwidth to successfully suppress the turning noise. The accuracy did not came near the intended 100 nm. The test of the two controllers with notch filters, which both have a bandwidth above 60 Hz, gave better results. For both the flat and conical part of the turning experiment, accuracies of around 150 nm (spike to spike) were measured by the 5 nm scales. The part of the experiment with holes in the cylinder surface, gave far worse results though. No more than a micrometer could be obtained there. After observing the turning result under a microscope, it became clear that there exists a difference between the measured and real following error. An analysis was made of the disturbances and a few could be eliminated, but there are some left and each of them has to be solved if the aimed accuracy is to be reached. Finally, an effort was made to minimize the error caused by holes in the turning object and other step disturbances. It was found that this could not be done with the used firmware, as the loss in bandwidth (needed for the extra robustness) would raise the following error to much. The use of the SEP-software combined with a newer PMAC, with higher sampling frequency might yield a better result though.

Page 4: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by
Page 5: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

Sarnenvat t ing

Het onderwerp van deze stage is de Vermeulen CNC draaibank, waarvan de servo-loops getuned dienen te worden. Hiervoor moest het dynamische gedrag van het systeem en van de PMAC controller, welke in het systeem is ingebouwd, geanalyseerd worden. Met die kennis kon een simulatie file gemaakt worden in Matlab, welke werd gebruikt voor de off-line controller ontwerp. Voor de spindle werd een regelaar ontworpen met een bandbreedte van 0.5 Hz en na testen werd deze bevredigend bevonden, zolang deze maar stapsgewijs naar de ben- odigde constante snelheid werd gebracht. Voor zowel de X- als de Z-as werden twee controllers getuned, BBn met een low-pass filter en BBn met een notch filter, aangezien beide niet tegelijkertijd geimplementeerd konden worden. Bij het testen van deze op de machine tijdens een draaiproef, werd het duidelijk dat de regelaars met een low-pass filter niet voldoende bandbreedte bezaten om de draai ruis te onderdrukken. De nauwkeurigheid kwam niet in de buurt van de geeiste 100 nm. De test van de twee regelaars met notch filters, met beide een bandbreedte van boven de 60 Hz, gaf betere resultaten. Voor zowel het vlakke als het conische deel van de draaiproef, werden nauwkeurigheden van rond de 150 nm (piek-piek) gemeten door de 5 nm linealen. Het deel van de proef met gaten in de cylinder oppervlakte, gaf echter een veel slechter resultaat. Niet meer dan een micrometer nauwkeurigheid kon daar gehaald worden. Nadat het draai resultaat onder de miscroscoop was bestudeerd werd het duidelijk dat er een verschil bestaat tussen de gemeten en werkelijke volg fout. Een analyse werd gemaakt van de verstoringen en een paar konden er geelimineerd wor- den, maar er zijn er nog steeds over en ze dienen allemaal opgelost te worden voordat de geeiste nauwkeurigheid gehaald kan worden. Tenslotte is er een poging gedaan om een regelaar te tunen zodanig dat de invloed van gaten in het te draaien object en andere stap verstoringen werd geminimaliseerd. Dit bleek niet mogelijk met de gebruikte firmware, aangezien het verlies van bandbreedte (benodigd voor de extra robuustheid) de volgfout te veel zou verhogen. Het gebruik van de SEP-software in combinatie met een nieuwere PMAC, met hogere sample frequentie zou echter een beter resultaat kunnen geven.

Page 6: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by
Page 7: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

Contents

1 The CNC turning machine 3

2 System identification 5

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.1 Setup 5

. . . . . . . . . . . . . 2.1.1 Open loop transfer function determination 5

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.1.2 Siglab 6

. . . . . . . . . . . . . . . . . . . . . 2.2 Frequency response measurements 8

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.1 X-axis 8

. . . . . . . . . . . . . . . 2.2.2 Derivative scaling factor determination 11

. . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.3 X-axis (continued) 12

. . . . . . . . . . . . . . . . 2.2.4 Integral scaling factor determination 14

. . . . . . . . . . . . . . 2.2.5 Low-pass implementation determination 15

. . . . . . . . . . . . . . . . 2.2.6 Notch implementation determination 17

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.7 Z-axis 18

. . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.8 Spindle (R-axis) 20

3 Feedback design 23

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1 X-axis 24

. . . . . . . . . . . . . . . 3.1.1 Controller design with a low-pass filter 24

. . . . . . . . . . . . . . . . 3.1.2 Controller design with a notch filter 26

. . . . . . . . . . . . . . . . . . . . . . . . . . 3.1.3 Controller validation 26

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2 Z-axis 28

. . . . . . . . . . . . . . 3.2.1 Controller design with a Low-pass filter 28

Page 8: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

Contents

3.2.2 Controller design with a notch filter . . . . . . . . . . . . . . . . 28

3.2.3 Controller validation . . . . . . . . . . . . . . . . . . . . . . . . . 30

3.3 R-axis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

4 Feed forward design 33

4.1 X-axis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

4.2 Z-axis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

4.3 R-axis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

5 Turning experiments 43

5.1 setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

5.2 First run . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

5.3 Disturbance analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

5.3.1 Aerostatic bearings under the table . . . . . . . . . . . . . . . . . 46

5.3.2 Unbalance of the spindle . . . . . . . . . . . . . . . . . . . . . . . 47

. . . . . . . . . . . . 5.3.3 Reduced stiffness aerostatic bearings Z-axis 48

5.3.4 Tapping of the cables . . . . . . . . . . . . . . . . . . . . . . . . 48

5.3.5 Deviations of the 5 nm scales . . . . . . . . . . . . . . . . . . . . 49

5.3.6 Other effects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

5.4 Controller improvement . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

Bibliography 53

A Matched pole zero discretisation method 55

B Trapezoid trajectory program 5 7

C Simulation file ptune3.m 59

Page 9: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

Int roduction

The main focus of this internship lies on the cooperative analysis and tuning of a system controlled by a PMAC Lite [I]. As the PMAC is a frequently used device within the Central Design and Engineering Facility (GTD), knowledge of its behavior is impera- tive. To reach the understanding needed, one of their cases shall be considered for this study, the Vermeulen Ceramic Optical Diamond Turning Machine. The machine will be tuned and the results given, in a step by step approach. This way the members of the GTD should be able to solve identical problems, using this report as a tuning example. The tuning shall be done with the PMAC firmware, using frequency domain techniques, which should give the opportunity to reduce the periodic disturbance the system is ini- tially sensitive to, without losing to much of the tracking accuracy. An overall tracking error below 100 nm (on the product) is to be obtained. To obtain this it will be essential to first get a clear understanding of the PMAC and the CNC machine itself. After this, a feedback controller shall be tuned, in simulation and real- time implementation. To further reduce the tracking error, feed forward control will be applied. At that stage the developed controller will be tested with a turning experiment to see if the turning accuracy is acceptable. Finally an analysis shall be made of the remaining error sources and recommendations shall be made to further improve the turning result.

Page 10: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

Contents

Page 11: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

Chapter 1

The CNC turning machine

In 1999, Hans Vermeulen delivered the Cermic Optical Diamond Turning (CODT) ma- chine (figure 1.1), he designed and build, to the Central Design and Engineering Facility (GTD) at the Eindhoven University of Technologie [2]. This gave them the ability of turning high accuracy products with mirror surface quality.

Figure 1.1: The Vermeulen CNC turning machine

This universal single point diamond turning (SPDT) machine, has some differences compared to the traditional high accuracy turning machines. Besides the kinematic and thermo-mechanically stable concept, the machine was designed to have a high stiff- ness per unit mass. This should achieve repeatability, giving it deterministic behavior, which is necessary to obtain high accuracy. This was done by using closed boxes of, specially for this design developed, materials (which were patented in 1996). These ceramic-epoxy laminate materials gave additional stiffness and 3 - 4 percent viscoelas- tic material damping within the structural material itself. The structural shape of the

Page 12: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

4 Chapter 1. The CNC turning machine

machine was build up using 14000 tiles in multiple layers, with a combined weight of around 85 kg. The first natural frequency, using these, was determined to be around 200 Hz. The CODT machine has three actuated degrees of freedom (which are not coupled), the X- and Z-axis allow translations, in horizontal and vertical direction respectively and the spindle, where the object which has to be turned is placed on, allows rotations. Due to the high demands on X- and Z-axis accuracy, linear motors are used. The three motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by Vermeulen. To decrease friction, aerostatic bearings are used to support the X- and Z-axis, as well as to lift the table to reduce external noise. This is absolutely crucial for obtaining accuracies in the sub-micrometer range. Measurement of the X- and Z-axis is done with 5 nm resolution scales with a maximum input frequency of 22 kHz, which proved to be more than enough for the velocity range of this machine. Measurement of the spindle is done with a 1.57.10-~ rad resolution. When Vermeulen delivered the machine to the members of the GTD, fine tuning of the PMAC was still to be done. He himself had not been able to do this due to time lim- itations. They used time-domain tuning techniques to obtain a reasonable controller, but after testing this in a turning experiment, periodic disturbances became visible. In the next chapter information shall be gathered, which is needed for a thorough un- derstanding of the dynamical behavior of the system.

Page 13: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

Chapter

System identification

2.1 Setup

Looking at the CNC turning machine, the first thing which should ,be noted is the fact that it appears to have virtually no friction on the X- and R-axis (spindle). It floats on a bed of air. When determining the plant transfer functions Hi(s) for these axis, this should also become visible. As there is no visible friction or damping the transfer function should have a -2 slope (in a bode diagram) for the whole frequency range for which the ma- chine can be modelled as a single mass. So for the X-axis, there should be a -2 slope till around 200 Hz where, according to the calculations by Vermeulen [2], the first reso- nance frequency lies. Using a Siglab- measuring system it is possible to obtain frequency response measurements and check this. The use of - and settings within - Siglab will be discussed later on. First it is necessary to consider how the open loop transfer function can be determined.

2.1.1 Open loop transfer function determination

Consider the schematic block representation of the closed loop system as given in figure 2.1. Knowledge of the transfer function of the plant (which is one axis), indicated by H ( s ) , is desired. The reference trajectory is given by r(t) and the following error by e(t). White noise w(t) can be added (using a specially made sum-point) to the control signal v(t), generated by the controller C(s), to control the plant with u(t). The resulting measured position is given by y(t).

Using this representation, the desired transfer function can be determined in a couple of ways. These possibilities are given in table 2.1.

Page 14: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

Chapter 2. System identification

Figure 2.1: Closed-loop system representation

Table 2.1: Possibilities for the determination of transfer function H(s)

I Possibility I Measured signals I Transfer function / Formula

The first option of table 2.1: determination of the plant transfer function through deter- mination of the sensitivity function, shall be used. The main reason for this is the fact that the second option is more sensitive to signal-to-noise-ratio problems, as the noise is filtered through the closed loop. Furthermore, determination of the plant transfer func- tion with sensitivity measurement yields better results for lower frequencies, because of the shape of the function.

1 2

2.1.2 Siglab

As there are manuals on the use of Szglab available, no detailed information on the general use shall be given here. Instead, only the settings as used shall be discussed. The hardware connection of the Szglab-system is given in figure 2.2.

u(t) ,w(t) v(t),u(t)

Szglab shall be used to generate the white noise (w) (needed to excite the system in all frequencies) and to measure the signals w (t) and v( t ) -k w (t) = u(t). Using these signals Szglab will determine the sensitivity function. It is essential though that the settings within Siglab are correct. These are given in table 2.2.

As the behavior of the X- and Z-axis differs greatly from that of the spindle (response of the spindle is slower, which shows its lower bandwidth), different settings must be used. Without these, the low hequent frequency response function and the bandwidth of the spindle itself will not be obtained. For both the X- and Z-axis, the first resonance frequency is known to lie around the 200 Hz, so a measuring bandwidth of 500 Hz is the lowest possibility. However, to obtain a full view of the frequency range of the PMAC controller which has its sampling frequency a t 2.26 kHz, 1 kHz shall be used (mainly)

Sensitivity -Open LOOP

s = v = ~ w I+CH

H o~ - E - - , - -CH

Page 15: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

2.1. Setup

1 Inputs Siglab Outputs

Linear Motor I Figure 2.2: Connecting Siglab

as bandwidth, which brings the measuring frequency to 2.6 kHz. This combined with a record length of 2048 samples should give a fine enough frequency grid to detect all main resonances. The measuring range is set to 5V for both input channels to improve the accuracy. When the performance of the system is improved with a decent controller however, it might be necessary to boost this to 10V, to prevent multiple input overload. All cases of input overload shall be rejected. The intensity of the random (is closest to white) noise differs for each axis. The choice of the intensities is based on a good coherence on the one end and not damaging the machine on the other. Twenty counts should prove more then enough to reduce the measuring errors. Further- more, anti-aliasing filters will be used to prevent misplaced resonances from popping

UP. The gathered data shall be imported in Matlab with the help of sl2ml.m and the open- loop frequency response function (CH) can then be obtained with the help of sens201.m. After that, the only thing left to do is divide the controller from the measurement to gain the frequency response function of the plant.

Page 16: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

Chapter 2. System identification

Table 2.2: Settings within Szglab VNA

Channel Setup / Frequency Range I

BW: X-axis: 1.0 kHz Z-axis: 1.0 kHz Spindle: 2 Hz Record Length: 2048 AA Filters ON Zoom Off

Processing I Excitation I

1 Count: 20 1

X-as: 0.600V Z-as: 0.300V

2.2 Frequency response measurements

With the settings as given in the previous section, measurements can be done. Normally, white noise is added to a constant velocity to prevent friction from filtering responses. Due to the fact though, that there is no friction on the X- and R-axis, no constant ve- locity is necessary for those. Furthermore, it may also be possible to gain the frequency response function of the Z-axis without using a constant velocity, as the constant force which compensates the mass, does not switch sign (as friction does). This, and the assumption that no further friction is present at the Z-axis, have to be checked though, before measuring from standstill.

2.2.1 X-axis

Using a proportional gain of 1, the measured open loop frequency response function (CH) will equal the frequency response function of the plant. Unfortunately, this was impossible for the X-axis as its bandwidth for this setting was to low. By increasing the proportional gain to Kp = 500 a reasonable measurement could be obtained. The result had a surprise: there were two resonances between 5 Hz and 8 Hz. They were the result of a malfunction in the rear air bearing. After this was fixed, they disappeared, giving the expected -2 slope (figure 2.3). However, it is not possible to determine the location of the f i s t resonance from this figure. The only thing visible is the upward movement above 100 Hz, which might be an effect of higher order dynamics, the measurement at the edge of stability or a small offset between the two measuring signals.

Page 17: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

2.2. Frequency response measurements

frequency [Hz]

fiequency [Hz]

Figure 2.3: X-as open loop transfer function (CH), P=500 BW=2kHz.

Due to the large oscillations during measuring it was decided to obtain the transfer function of the plant by using a 'slack' controller with both a proportional and a deriva- tive gain. This brought another problem however, as it was unknown how the PMAC controller was exactly implemented.

Figure 2.4: Firmware Z-domain implementation

The PMAC users manual (page 3-61) [5] gave the z-domain representation of the con- troller as given in figure 2.4. It was also said, however that the precise implementation can be written as:

with the parameters as given in table 2.3.

Apparently there are multiple scaling factors used. How these are rewritten to the z- domain formulation is at this stage unclear however. The exact scaling factors in the

Page 18: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

Chapter 2. System identification

Table 2.3: Parameter declaration

internal scaling factor, default 96 internal scaling factor, default 96 Kp, the proportional gain Kd, the derivative gain Kfv, the velocity feedforward Ki, the integral gain Kfa, the acceleration feedforward following error for measurement n commanded velocity for measurement n actual velocity for measurement n commanded acceleration for measurement n

IE(n) = integrated following error for measurement n

z-domain will have to be determined by matching a number of measurements to the known z-domain formulation (derived from figure 2.4):

KpKiSi C(z) = KpKdSd(1- 8 ) + K p + 1 - z-l '

with Sd and Si scaling factors for the derivative- and integral gain and no notch, nor low pass implemented. As both scaling factors are independent of one and other, they can be found one at a time. To discover the effects of the PMAC tuning variables in the fi-equency domain, the following has to done:

0 Frequency response functions need to be measured for one setting of the pro- portional gain and a great number of derivative gains. After this, the derivative scaling factor needs to be determined (by matching measurement to simulation) and it needs to be checked that this factor is constant for all measurements;

Frequency response functions need to be measured for one setting of the propor- tional gain and 2 different settings of the derivative gain. For each of these two settings, the frequency response functions of a range of integral values need to be measured and matched to the simulations to determine the integral scaling factor and prove that this is indeed independent of the derivative scaling factor;

0 Frequency response functions need to be measured with different low pass filter settings and these need to be matched with the simulations;

Page 19: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

2.2. Ekequency response measurements 11

Frequency response functions need to be measured with different notch filters im- plemented and these need to be matched with the simulations.

2.2.2 Derivative scaling factor determination

A comparison between measured en simulated frequency response functions, without scaling factors is given in figure 2.5, for an experiment with only a derivative and proportional gain. For the simulation the frequency response function from figure 2.3 is used (with the controller gain divided out). Although it is known to be less accurate, it will suffice for determining the derivative scaling factor.

frequency [Hz]

frequency [Hz]

Figure 2.5: Comparison without scaling: Kp = 500, Kd = 4000

The scaling factor for the derivative gain was found to be ~ T T ' , with T the sampling frequency. It should be noted that the fact that this scaling gain is given as a function of the sampling frequency only holds for this case. No measurements are done with other sampling frequencies to really validate this representation. Still, it is chosen to write the scaling gain like this as the sampling frequency is bound to be in there one way or the other, due to the s-z-domain transformation. As can be seen in figure 2.6, this scaling factor indeed matches measured and simulated functions for different Kd. Because Kp is located at the end of the filter it will not affect the scaling factors so it is not necessary to check measurements with another proportional gain. The strange high frequent behavior is at this stage uninteresting. Once a decent frequency response function for the plant is determined, t o use in the simulations, interpretation of that part will be possible. This will be done next, as it will also facilitate the determination of the implementation of the other PMAC control

Page 20: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

Chapter 2. System identification

features.

frequency [Hz]

frequency [Hz]

frequency [Hz]

frequency [Hz]

Figure 2.6: Comparison with scaling: (a) K p = 500, K d = 4000; (b) K p = 500, K d = 500.

2.2.3 X-axis (continued)

Now that the implementation of the PMAC's derivative gain is known, it is possible to divide the controller C(jw) out of the open-loop measurement CH(jw), giving the frequency response plot of the X-axis H(jw). For this, a stable controller is chosen (Kp is 500 and K d is 4000) and Siglab is set to a measuring bandwidth of 5 kHz and a maximum number of samples. The frequency response function of the X-axis is given in figure 2.7. Although a couple of its features are already explained, the frequency response function shall be considered in detail.

The X-axis can be seen as a single controlled mass, attached with a spring and damper (the closed-box construction) to a second mass (Z-axis). Due to the fact that there is no friction nor damping and the connection of the masses is very stiff, the X-axis can be seen as a single actuated mass for low frequencies. This can also be seen in figure 2.7, as there is a -2 slope (indicating a single mass) up to 163 Hz. Below 10 Hz the coherence of the measurement was below 0.7 so that data is unreliable. At 163 Hz the second mass gives a resonance. After that first resonance frequency, the -2 slope continues, but other resonances will appear, indicating higher order dynamics. From 100 Hz to 500 Hz the phase drastically decreases, indicating phase delay of the PMAC, which has its sampling frequency at 2260 Hz. However, above 500 Hz the phase

Page 21: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

2.2. Frequency response measurements

frequency [Hz]

frequency [Hz]

Figure 2.7: Frequency response function, X-axis

and amplitude seem to be increasing. This is a calculation error, caused by an offset in the two Siglab input channels. When both channels are offered the same signal and are compared, they should give 0 dB and 0 degrees phase. As this is not the case an error occurs for high hequencies (S(s) will not be exactly 1, which causes the positive slope), caused by the Sensitivity to open-loop calculations, see equations 2.3 and 2.4.

so: 1

C(s)H(s) = - - 1. S(s)

The last thing that needs to be explained are the spikes at 2260 Hz and 4520 Hz. These are caused by the fact that the PMAC has a sampling frequency of 2260 Hz. This means that after 1130 Hz, the nyquist frequency, a periodically copied pattern occurs. This holds no real system information though. So it can be concluded that the frequency response function as given in figure 2.7, can be considered accurate to from 10 Hz to 500 Hz. There are however still two assumptions which need to be checked, namely that the X-axis does not have any friction and that it is constant over its whole range. To do this the plant frequency response function is measured for three different Z-positions and three X-positions (so nine measurements) and these are compared. Furthermore, two measurements have been done, while constantly moving the X-axis. Once from left to right and once in the opposite direction. The assumptions indeed were valid. The frequency response function for three different X positions and the two moving measurements are given in figure 2.8.

I t must be noted that the measurement of the X-axis on the left side was not

Page 22: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

Chapter 2. System identification

frequency [Hz]

frequency [Hz]

Figure 2.8: Frequency response plots, X-axis

done in i t s outermost position, as there was a very small area where indeed friction occurred, probably due t o a failing air bearing. This still has t o be fixed, but as i t i s not located at a position normally used during turning, no further attention was payed to this.

Before determining the frequency response functions of the other axis, the exact PMAC implementation will first be further investigated. This will give a base for future simu- lations, needed for the off-line tuning of the controllers.

2.2.4 Integral scaling factor determination

For the determination of the integral scaling factor the earlier determined derivative scaling factor will also have to be used. Implementing a controller with an integral gain, but without a derivative gain would (for most Ki) result in an unstable system. Again, the integral scaling factor is independent of the proportional gain, because of its location in the loop. An unscaled comparison is iven in figure 2.9. By matching measurement 8 and simulation a scaling factor (Si) of 5 (which is around 2-24 see equation 2.1) was determined for the integral gain. Again, the scaling factor is bound to be a function of the sampling frequency, but if this is the correct way is uncertain as the sampling frequency could not easily be changed. For this sampling frequency the measurements and simulations do match though, as can be seen in figure 2.10.

Page 23: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

2.2. Frequency response measurements

frequency [Hz]

... lo-, 10' I$ to4

frequency [Hz]

Figure 2.9: Comparison without scaling: Kp = 2000, Kd = 4000, Ki = 256000

frequency [Hz]

frequency [Hz] frequency [Hz]

Figure 2.10: Comparison with scaling: Kp = 500, Kd = 4000, (a) Ki = 64000, (b) Ki = 256000.

2.2.5 Low-pass implementation determination

The determination of the low-pass implementation is more tricky compared to the pre- vious, as the manual does not describe its implementation. It is known that equation 2.2 holds, when no notch or low-pass are implemented. This can be rewritten in the form of equation 2.5.

z - 1 Z cPD(z) = Kp Kd Sd- f Kp + KP Ki Si- Z 2 - 1

(2.5)

Page 24: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

16 Chapter 2. System identification

Due to the fact that this equation is given in the z-domain it is by definition not a true PD-controller as can be defined in the s-domain, but a lead-lag-filter with a pole at the sample frequency. The most likely way to add a low-pass-filter is by shifting the pole in the z-domain (using the matched zero pole discretisation technique [6] or [7]). The filter gain at low frequencies should remain the same though, so a scaling gain must also be added (this is the same gain change the PMAC firmware automatically executes when a low-pass filter is added). This representation of the filter with low-pass implemented is given in equation 2.6.

z - 1 Z CPDflStLP(z) = Kdc K p K d Sd- + K p + K p K i S i -

z - a 2 - 1 ' (2.6)

with: a = eCWT, w [radjs] the pole due to the fact that z = eST, T the sample frequency and Kdc the scaling gain. For the scaling gain equation 2.7 can be found using the low-frequent-gain-matching criterium, earlier mentioned.

zzm C P D ( ~ ) = w+o Kdc CPD+lstLP (2)

This leads to (for s = j w ) :

K d c = l - a

Using this, a low-pass filter in simulation is compared to measurements. The results are given in figure 2.11. The simulations indeed match the measurements.

frequency [Hz]

1 o" 10' 10' 1 ox

frequency [Hz]

10' lo2 id

frequency /Hz]

fcequency [Hz]

Figure 2.11: Comparison first order low-pass: K p = 2000, K d = 400, (a) LP 50Hz, (b) LP 400Hz.

Page 25: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

2.2. Frequency response measurements 17

To further upgrade the low-pass filter, from first to second order, another pole needs to be added at the crossing frequency. Of course, the proportional gain also needs to be corrected in the same way as done before. The resulting control equation is given in equation 2.9.

with: Kdc = (1 - a)2.

A comparison between measurements and simulations is given in figure 2.12. Again, the simulations and measurements seem to match nicely, despite the fact that a rather crude method (matched zero pole method) was used for the z-s-domain transformation.

7

- Simulal~n - Measurement ; .3 i2 -:r;Tl .--+ -

G , o o bo rd

-150 10 ' 1 o" 10' lo2 d 1 oa

frequency [Hz]

1 o" 10' 1 o2

frequency [Hz]

frequency [Hz]

1 o0 10' 1 o2

frequency [Hz]

Figure 2.12: Comparison second order low-pass: K p = 2000, Kd = 400, (a) L P 100Hz, (b) LP 400Hz.

2.2.6 Notch implementation determination

Unlike the PID and low-pass implementation, the implementation of the notch-filter is well described in the users manual [ 5 ] . It even describes a way of calculating the corrective gain, which is needed to match the low frequent behavior with and without the notch. The way this result is obtained is quite complex though and differs greatly from the matched-zero-pole discretisation method, which was earlier used. For reasons of clarity, the matched-zero-pole technique will also be used to determine the notch implementation. Note though, that in the end the resulting corrective gain is identical.

Page 26: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

18 Chapter 2. System identification

For a notch filter in the s-domain equation 2.11 holds.

with zeros at:

s = [si, 521 = -ICI1w1 f W1\lG, (2.12)

and poles at:

s = [dl, d2] = - ~ Z W Z I w2 JG. (2.13)

Using the matched pole zero method, this can be rewritten in the z-domain, see equa- tion 2.14.

with for the low-frequent scaling gain:

This last step is performed by the PMAC firmware automatically. It only needs to know wl, w2, pl and p2 to auto-implement the notch filter and automatically scale the proportional gain. To be complete though, the exact implementation of the notch filter is given in 2.16, which is similar to that of equation 2.14, besides the fact that the scaling gain is no longer visible, as it is multiplied with the proportional gain as it was.

Using equation 2.14, the notch filter can also be simulated. A graphical comparison between the measurements and simulations is given in figures 2.13a t /m d. For low frequencies (a) the simulation can accurately describe a normal notch. When the notch frequencies are split though (b and d), the simulations are way off. Although corrections were sought, none were found that could solve this difference, which is probably caused by inaccuracies of the chosen discretisation technique. Due to the fact though, that no split up notch will be required, no further efforts shall be made on this point. For higher frequencies, the measurements and simulations of the pure notch also starts to differ more with respect to the dept of the notch (c). This is probably caused by limitations of the PMAC. Simulations with a notch implementation should therefore be used with care.

2.2.7 Z-axis

For the vertical axis the same scaling factors can be used as were determined for the X-axis. Unlike the X-axis though, a constant velocity will be used, while measuring the

Page 27: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

2.2. Frequency response measurements 19

- W 'O

a 0

4 -20

1 -c3 4 0 .d

d hc "0 cd E ";

frequency [Hz] 2m -

hc w iw a - % c3 & -100

a -200

1 o0 10' 10' 1 o1 1 o" 10' 1 o2 ro4

frequency [Hz] frequency [Hz]

frequency [Hz] frequency IHz)

frequency [Hz] frequency [Hz]

Figure 2.13: Comparison notch implementation: Kp = 2000, Kd = 4000, PI = 0.05, P2 = 0.5, (a) fi = f2 = 50Hz, (b) f~ = 50Hz, f 2 = 100Hz) (c) f l = f2 = 163Hz, (d) fl = 160, f2 = 200Hz.

white-noise response (Sensitivity). This way, no friction- or weight compensation effects will disturb the final frequency response representation. For the Szglab-settings as given in table 2.2, a constant velocity of 400 counts/msec was enough to prevent stand still. Because a stable response was needed for the frequency response determination, a slack controller was again used, with a Kp of 250 and a Kd of 1280. These values were found by means of online tuning. In the same manner as was done for the X-axis, the open-loop response was determined from the sensitivity. By dividing the controller out,

Page 28: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

20 Chapter 2. System identification

the Z-axis frequency response plot was found. This is given in figure 2.14.

frequency [Hz]

frequency [Hz]

Figure 2.14: Frequency response plot, Z-axis

Low-frequent the frequency response plot has a zero-slope to around 5 Hz. This is caused by the weight compensation technique, which dampens disturbances and causes a constant force upwards. So without the feedback-loop, the Z-axis moves upward to its end switch. Still, it has to be noted that below 8 Hz the coherence was below 0.7, so that data is not really reliable. At 5 Hz, the weight compensation gives the first resonance frequency. From 5 Hz to 100 Hz, the Z-axis has the -2-slope, characteristic for a single mass, without friction or damping. Unlike the X-axis though, the first resonance of the Z-axis lies at 127 Hz (quite a big difference with the 200 Hz which was calculated!). Above 127 Hz the -2-slope continues up to the valid frequency range of 500 Hz. Note that again phase delay is visible from about 100 Hz and up, but there are not as many spikes indicating little higher order dynamic effects. Above 500 Hz the frequency response plot is again unreliable due to the small Szglab channel offset.

2.2.8 Spindle (R-axis)

The spindle is like the X-axis movable, without any friction nor damping effects. So it is possible to determine its frequency response plot without the need of a constant velocity. Because of its low bandwidth however, it was hard to manually find a decent slack controller. While doing this it was essential to monitor the PMAC's output for small disturbances, as the motor was easily saturated (output f lOV). Finally, a Kp and Kd of 100.000 were found to give a nice damped response, which did not saturate the motor for small disturbances (manually turning the spindle 180

Page 29: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

2.2. Frequency response measurements 2 1

deg). To get an accurate measurement, Szglab was set to the low-frequent bandwidth, given in table 2.2. The found frequency response plot had only a small frequency range though. To solve this limitation a second order fit was made, using frsft.m, which allows tuning over a larger frequency range. Both the measured and fitted h-equency response function are given in figure 2.15.

frequency [Hz]

frequency [Hz]

Figure 2.15: Frequency response plot, R-axis

It can be seen that the plant has indeed a truly low crossover frequency ( 4 . 1 0 ~ ~ Hz). The slope is -2 over its whole range, without any resonances, which is no real surprise as the spindle really is a single mass. Still, tuning this low-frequent motor might prove difficult as saturation is easily obtained. More on this in the next chapter.

Page 30: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

Chapter 2. System identification

Page 31: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

Chapter 3

Feedback design

With the help of the plant measurements as given in the previous chapter and the Mut- lab simulation file ptune3.m (see appendix C), which is able to simulate the open-loop frequency response for certain control parameters, it is now possible to determine an optimal feedback controller in simulation. After that, the tracking error can be further reduced with feed forward control, which shall be done in the next chapter. In the previous chapter the implementation of all PMAC control features were deter- mined. While testing a controller with notch and low-pass filter though, the simulation was very inaccurate. This was caused by the fact that the PMAC firmware is unable to use both in one controller. It uses either the low-pass or the notch. This leaves the question what is favorable. As the notch can be used to suppress a resonance, the bandwidth can be increased to higher values when using it. Still, with the low-pass filter high-frequent noise can be suppressed better. As it is unclear at this stage which will give the lowest tracking error, for each axis two controllers will be tuned. One controller with a second order low-pass filter and one with a notch on the first (problematic) res- onance frequency. The tuning (within Matlab) will be done in a step-wise manner, derived from [8]:

1. Choose a bandwidth;

2. With a proportional gain of one, the derivative gain will be increased till the breakpoint lies around i" of the bandwidth;

3. A low-pass filter is placed on about 5 times the chosen bandwidth or a notch is implemented;

4. The proportional gain is increased till the chosen bandwidth is reached;

Page 32: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

Chapter 3. Feedback design

5. The integral gain is increased till its breakpoint is on about $th of the bandwidth;

6. Parameters can be tuned a little to minimize the Sensitivity function;

7. Choose a higherllower bandwidth and start over till the result is satisfactory.

Once a decent controller is determined in simulation its implementation can be checked on the machine with Siglab. With decent a controller is meant which gives maximum bandwidth and low Sensitivity (preferably lower then 6 dB).

3.1 X-axis

The step-wise tuning manner, shall be demonstrated for the X-axis.

3.1.1 Controller design with a low-pass filter

Following the steps, a bandwidth has to be chosen first, this is always a little tricky though. If it is chosen to high, tuning a stable controller may not be possible. If it is chosen to low, many tuning steps may be needed. Looking back at the X-axis frequency response plot (figure 2.7), it can be seen that due to the phase lag, a bandwidth of 100 Hz or above will be impossible. Furthermore it was written by Vermeulen that a bandwidth of a t least 50 Hz was necessary for a reasonably small tracking error. Therefore a bandwidth of 40 Hz is chosen initially. This means the breaking point (or 45 degree point) should be around 13 Hz. This is reached with Kd = 1500, as is demonstrated in figure 3.la.

Next a second order low-pass filter may be added at 200 Hz. To get a little more phase margin 240 Hz was chosen though. The result can be seen in figure 3.lb. It should be noted that this controller gives about 50 degrees of phase margin around the chosen bandwidth. To obtain the chosen bandwidth the only thing left to be done is increasing the propor- tional gain. It was found that for Kp = 24000 the wanted result was obtained. This is given in figure 3.2. It can also be seen that the Sensitivity almost reaches the 6 dB a t two frequencies. Further increasing the bandwidth is therefore not an option as one of the two spikes would then cross the 6 dB.

Page 33: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

3.1. X-axis

10' lo2

frequency [Hz]

frequency [Hz]

frequency [Hz]

frequency [Hz]

(b)

Figure 3.1: X-axis PD Controller, LP tuning: (a) step 2, (b) step 3.

frequency [Hz]

frequency [Hz]

frequency [Hz] c lo3 frequency I$ [Hz] in3 10'

Figure 3.2: X-axis Controller LP tuning step 4: (a) Open-loop (C(s)H(s)); (b) Sensi- tivity (S(s)).

The last step that needs to be taken is adding an integral gain, with a breaking point a t about 6 Hz. This is achieved with Ki = 1.105, as can be seen in figure 3.3, giving the first low-pass controller which shall later be tested on the CNC machine.

Page 34: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

Chapter 3. Feedback design

frequency [Hz]

frequency [Hz]

frequency [Hz]

l o1 lo2 lo1 lo4

frequency [Hz]

Figure 3.3: X-axis Controller LP tuning step 5: (a) Open-loop (C(s)H(s)); (b) Sensi- tivity (S (s)).

3.1.2 Controller design with a notch filter

Lets start with the previously determined low-pass controller and exchange the low-pass filter for a pure notch a t 163 Hz (PI = 0.03 and pz = 0.3). As can be seen in figure 3.4, the spike at 163 Hz in the sensitivity is cleared, allowing a higher bandwidth. The next resonance that will give problems is also visible though at 430 Hz.

After simply increasing the proportional gain to Kp = 5.10~ and shifting the integral breaking point with Ki = 3 .10~ (the derivative gain was left in place to compensate the phase loss of the PMAC), a bandwidth of 63 Hz was reached, see figure 3.5. With these settings, the Sensitivity has a spike of 9 dB a t 430 Hz, so further increasing the bandwidth is unwise.

3.1.3 Controller validation

To check whether simulation and implementation are identical, measurements were done. The results are given in figure 3.6. As can be seen measurement and simulation for both the notch as the low-pass controller have the same bandwidth and a similar shape. Even though the notch filter is not as deep as was simulated, the available phase margin gives a sensitivity of below 9 dB for the controller with notch filter and below 6

Page 35: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

3.1. X-axis

frequency [Hz]

frequency [Hz]

frequency [Hz]

frequency [Hz]

Figure 3.4: X-axis Controller notch tuning step 1: (a) Open-loop (C(s)H(s)); (b) Sen- sitivity (S(s)).

frequency [Hz]

frequency [Hz] frequency [Hz]

(b)

Figure 3.5: X-axis Controller notch tuning step 2: (a) Open-loop (C(s)H(s)); (b) Sen- sitivity (S(s)).

dB for the controller with low-pass filter.

Page 36: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

Chapter 3. Feedback design

frequency [Hz]

30' 10' 10'

frequency [Hz]

1 OD 10' 12

frequency [Hz]

1 o0 - 10'

frequency [Hz]

Figure 3.6: X-axis Controller validation: (a)controller with low-pass; (b) controller with notch.

3.2 Z-axis

The tuning of the Z-axis can be done in a similar way as was done for the X-axis. The main problem is however, that there are more and lower frequent resonances. The resonance a t 5 Hz will not give any problems, but the one at 127 Hz will.

3.2.1 Controller design with a Low-pass filter

When using a low-pass filter the 127 Hz frequency will, as said before, limit the maxi- mum bandwidth. It was not possible to reach more then 20 Hz and maintain a Sensi- tivity around the 6 dB. The final result, with Kp = 678, Kd = 6000, Ki = 1 . 1 0 ~ and second order low-pass a t 90 Hz, is given in figure 3.7.

3.2.2 Controller design with a notch filter

I t may be clear that the resonance a t 127 Hz is indeed an obstacle in the way of reaching high bandwidths. With the help of a notch filter this obstacle may be removed though. Once more the design process will be gone through step by step to illustrate it. As initial bandwidth, the same bandwidth is chosen as was reached for the X-axis with a notch filter, around 60 Hz. Using a derivative gain of Kd = 2000 and a notch at 127 Hz, with: ,Dl = 0.03, ,& = 0.3; enough phase margin is obtained and the 127 Hz

Page 37: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

3.2. Z-axis

frequency [Hz]

frequency [Hz]

frequency [Hz]

(b)

Figure 3.7: Z-axis LP Controller tuning: (a) Open-loop (C(s)H(s)); (b) Sensitivity

(S(s)).

resonance is given a negative counterpart. This can be seen in the bode plot of the controller as is given in figure 3.8.

frequency [Hz/

frequency [Hz]

Figure 3.8: Z-axis PD Controller, notch tuning step 2+3.

By increasing the proportional gain to Kp = 8000 a bandwidth of 60 Hz is obtained. Finally, the integral gain is added, Ki = 300000. The result is given in figure 3.9.

Page 38: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

30 Chapter 3. Feedback design

Clearly, further increasing the bandwidth is not an option due to the elevation in the Sensitivity around 300 Hz.

frequency [Hz] frequency [Hz]

(4 (b)

Figure 3.9: Z-axis Controller tuning: (a) Open-loop (C(s)H(s)); (b) Sensitivity (S(s)).

Another way of interpreting the open-loop response is by looking at the Nyquist di- agram. This is given in figure 3.10. It can be seen that the point -1, is left at the right-hand side, indicating a stable system. As the sensitivity reaches values above 6 dB though, the circle with a radius of $ (around -1) is crossed in the Nyquist diagram.

3.2.3 Controller validation

The simulation file, which was used for the tuning process was constructed with the help of data from X-axis measurements. The logical question that follows is if this file is also suitable for the other axis (when using their plant frequency response function). To check that this is indeed the case, the tuned Z controllers were checked with Siglab. The results are shown in figure 3.11. It can be seen that, apart from some minor variations, the frequency response functions indeed match. There is a rather large deviation in the bandwidth of the controller with low-pass filter however, caused by the used discretisation technique. Another thing that is visible is the difference in notch dept. Apparently, the PMAC is unable to fully notch that frequency. To cope with this, higher values of p2 and lower values of have been tried, but to no result. The frequency response measurement was unaffected. However, as the sensitivity function

Page 39: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

3.2. Z-axis

Figure 3.10: Z-axis Controller tuning: (a) Nyquist; (b) Nyquist (zoom).

remained below 9 dB (same as the simulations), the result was still found acceptable.

frequency [Hz]

frequency [Hz]

(4

frequency [Hz]

frequency [Hz]

Figure 3.11: Z-axis Controller validation: (a) controller with low-pass; (b) controller with notch.

Page 40: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

Chapter 3. Feedback design

For the tuning of the R-axis a completely different approach needs to be taken. This is caused by the fact that the limitations on bandwidth are not caused by resonances, but by the saturation of the spindle. When the controller has a too high bandwidth the controller will give a control signal of more than the maximum 310V. The PMAC will then output the maximum voltage, resulting in a non-linear characteristic. The spindle is not subject to the same accuracy demands as the vertical and horizontal axis though. It needs to accel to the given velocity as rapid as possible and then keep it spinning at that velocity without too many deviations caused by the turning process. To achieve this a control strategy will be applied, which allows saturation in the first acceleration part of the trajectory. This will give the maximum acceleration which is needed, but will also give rise to a huge following error, causing major over-shoot of the intended velocity. Although the velocity will eventually reach the intended value, the settling time will be far too long. To counter this it was decided to reset the controller once it reaches the intended velocity. This will eliminate the huge following error, leaving the smaller variations to the tuned controller. For the tuned controller it is of course essential that no saturation occurs due to these small variations as that would completely nullify the linearity of the controlled system. Therefore multiple controllers were tuned in a bandwidth range kom 0.05 Hz to 1 Hz. After experimenting with these, a controller with 0.5 Hz bandwidth was chosen. This allowed f 7r rad deviations without saturation, which should be more than enough during turning. The open-loop fcequency response simulation of this controller is given in figure 3.12, with: Kp = 10000, Kd = 750000, Ki = 100 and a second order low-pass filter a t 10 Hz.

frequency [Hz]

frequency [Hz]

Figure 3.12: Spindle final controller: Frequency response plot open-loop.

Page 41: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

Chapter 4

Feed forward design

Now that the feedback controllers are tuned, it is possible to further reduce the tracking error by tuning a decent feed forward action. By doing so, errors correlated to velocity, acceleration and friction can be eliminated, allowing the feedback action to "concen- trate" on reducing the noise level. So, to determine the correlated errors a trajectory needs to be found which has both a decent velocity, as acceleration. And with "decent" a velocity and acceleration are meant, which are far above the static control actions. Of course there are many ways to achieve this, but a trajectory with a constant velocity, constant standstill and constant acceleration part is preferable as the correlations are visible, without any calculations. This trajectory is given in figure 4.1.

-

?_ -

0 4

Per

Figure 4.1: Trapezoid feed forward trajectory.

Page 42: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

Chapter 4. Feed forward design

4.1 X-axis

To implement the trajectory as given in figure 4.1, a program has to be written and uploaded in the PMAC. This program is given in appendix B. To enable it the following has to be done:

1. Startup PEWIN (Firmware computer program) and enable all hardware;

2. release the X-axis from its brake;

3. select the X-axis in PE WIN:

4. disable integral action;

5. download the program (within the editor);

6. disable acceleration and velocity limitation:

ix16=ix17=10000000;

7. enable the controller:

j /;

8. select the proper coordinate system:

9. select the program: bl;

10. start the program:

r;

11. start quick plot measurement;

Page 43: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

4.1. X-axis

12. stop the program: q or a.

Due to the way the controller is implemented, the feed forward gains which shall be determined depend on the tuned feedback controller. So for each controller a separate feed forward gain needs to be tuned. Lets start with finding one for the controller with low-pass filter. After the controller settings are implemented in PEWIN, the integral action needs to be disabled. Without this no correct correlations can be determined. After this, the first measurement can be performed. Looking at the machine movement it can be seen that there are indeed great velocities and accelerations (with the settings of appendix B), but without saturation of the motor (Max(input) = +5V). Furthermore, the tracking error (figure 4.2a) shows a great velocity correlation.

1 6 x 10'

- Scaled h l e r a f i o n - Following Emor

I 0 5 1 1.5 2 2 5 3 3 5

Time [s] 0 5 1 1 5 2 2 5

Time [s]

Figure 4.2: Trapezoid trajectory, tracking error: (a) no feed forward; (b) K fv = 1500.

To eliminate the velocity induced part of the error, the velocity feed forward gain (Kfv) shall be tuned so, that the error remains constant for varying velocities. This means a constant error for the constant acceleration part of the trajectory. As a rule of thumb [9] for PMAC tuning: Kfv should be initially chosen equal to the derivative gain. In this case that means a value of 1500. The result is given in figure 4.2b. As can be seen, this velocity feed forward gain indeed eradicates the velocity correlated part of the tracking error. What remains is the acceleration related part of the tracking error. By step wise increasing (and when necessary decreasing) the acceleration feed forward (Kfa), a value

Page 44: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

36 Chapter 4. Feed forward design

of 12000 was found to effectively reduce the acceleration correlated part, as can be seen in figure 4.3a.

300 - Scaled Acceleatm - Follwng Emor

4001 0.5 1 1.5 2 2 5 3

Time [s]

Figure 4.3: Trapezoid trajectory, tracking error: (a) K f v = 1500, K f a = 12000; (b) feed forward + Ki.

What remains are jerk effects, noise and a constant deviation mainly caused by the angle of the table. When enabling the integral gain, the latter is countered though, as can be seen in figure 4.3b. So, apparently an error of 700 counts (spike to spike), is the minimum which can be achieved, for this (rather extreme) trajectory and these feedback settings. This is a factor 30 lower then the initial tracking error though. In a similar way the feed forward parameters for the feedback controller with notch were determined to be: K f a = 4100 and K f v = 1510.

4.2 Z-axis

Tuning the feed forward gains of the vertical axis proved more difficult. Using the controller with low-pass filter and a similar trapezoid trajectory, again a strong velocity correlation appeared as can be seen in figure 4.4a. Still, there are also quite a few other effects visible. One of these effects takes place after about 3.5 seconds. This is caused by one of the cables, which touches the ceramic frame. By reducing the range of the trajectory this was prevented as can be seen in figure 4.4b. The input range is still between f 2.5V.

Page 45: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

4.2. Z-axis

- Scaled commanded acceleratlar - FolIm8ng Error

Figure 4.4: Trapezoid trajectory, tracking error, no feed forward: (a) TA = 200, F =

4000000, Z = 1000000; (b) TA = 500, F = 400000, Z = 800000.

- Scaled commanded acc eieralon

-5000 , , , , , , ,

0 1 2 3 4 5 6 7 8 3 1 0

Time [s]

I 2 4 6 8 10 12

Time [s]

Figure 4.5: Trapezoid trajectory, tracking error: (a) K f v = 17300; (b) K f v = 17300, K f a = -6.10~.

Beside the clear velocity correlation, the tracking error shows a strange curve at the constant velocity part. Apparently there are also other effects present, probably caused by the weight compensation unit. As nothing can be done to nullify these within the firmware, an effort must be made to reduce the parts of the tracking error that are

Page 46: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

38 Chapter 4. Feed forward design

linearly correlated to velocity and acceleration, although these are not as clearly visible as it was for the X-axis. Again, for determining the initial value of the velocity feed forward, the rule of thumb is used. In this case that results in K f v = 6000. Although this method provided a correct value for the X-axis, for the Z-axis the value is far to low. Apparently there is a damping effect additional to that induced by the feedback controller. After increasing K f v to 17300, the velocity correlation was sufficiently reduced. The result is given in figure 4.5a. The first thing that should be noted from this figure is the remarkable negative tracking error - acceleration correlation. For most mechanical systems such a situation is im- possible as it means the system has a negative mass, which is physically impossible. In this case however, that is exactly what is happening, caused by an overcompensation of the weight compensation unit. To compensate the overcompensation, a negative accel- eration feed forward has to be used, as can be seen in figure 4.5b. The resulting error is caused by both jerk effects, noise and the characteristics of the weight compensation unit. When also enabling the integral gain, an error of 1400 counts remains, which is 7.10W6m, as can be seen in figure 4.6. The tracking error is trajectory dependant and the used tuning trajectory is far worse than anything which shall be used in practice. Still, this result is noway near the de- manded accuracy.

I 2 4 6 8 10 12

Time [s]

Figure 4.6: Trapezoid trajectory, tracking error: feed forward + Ki.

Due to the fact that the velocity and acceleration correlation are not clearly visible, another way of feed forward tuning was sought and found in [7]. It is possible to use a sine-shaped trajectory, generated by PEWIN. After executing this, both velocity and acceleration correlation are given (numerical). As before with the trapezoid trajectory, the sine trajectory has to have command velocities and acceleration far above the static

Page 47: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

level. For a sine trajectory that moves 1 . 1 0 ~ counts in 500 ms the feed forward gains were tuned to: K f v = 10500 and Kfa = -9.105, with correlations beneath 0.2.

-300 10 20 30 40 50 MI

Time [s]

Figure 4.7: Constant velocity full Z-range: K f v = 10500, K f a = -9.10~ and Ki.

Using these settings, while executing a trajectory with a constant velocity over the whole Z-range gave the result as given in figure 4.7. Because the acceleration and velocity cor- related parts of the tracking error are reduced, the disturbances can be countered better by the feedback control action. That is why, the disturbance caused by the touching cable is less visible. Beside the fact that tuning within PEWIN is more easy, the result for the Z-axis also seems better. The downside is that the effects and correlations are not visually deter- minable as with the trapezoid trajectory. Still, henceforth the feed forward gains for the Z-axis shall be determined using this sine generator as this gives the best representation of the correlations. In a similar way as was done for the controller with low-pass filter, the feed forward gains for the controller with notch filter were determined to be: K f a = -18.10~ and K f v = 2800.

Determining the feed forward gains for the spindle will again be done with a trapezoid trajectory. Using the sine generator of PEWIN is not an option, due to the limited record length of 2 seconds.

Page 48: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

40 Chapter 4. Feed forward design

The trajectory is similar to the one given in appendix B, but with:

TA10000, 10 seconds acceleration time;

F3000, 0.75 rev/sec maximum velocity;

e Y30000, move spindle 7.5 rev.

This trajectory gives a motor input of &3V, leaving enough space for enabling the feed forward gains, without saturation. The tracking error without feed forward for this trajectory, is given in figure 4.8a.

-1 51 I 20 40 60 80 100 120

Time [s] Time [s]

Figure 4.8: Trapezoid trajectory, tracking error: (a) No feed forward; (b) Kfv = 750.10~.

As can be seen, large oscillations occur caused by the spindle's low bandwidth. Still, looking at the constant velocity part of the trajectory, a clear error-velocity correlation is visible. Using the rule of thumb [9], a velocity feed forward gain of 750.10~ is found to eliminate this correlation. This is given in figure 4.8b. The last part, finding an effective acceleration feed forward proved more difficult. It was not possible to obtain a trajectory with enough acceleration, to clearly visualize the acceleration correlation. Nor could the acceleration feed forward effect be visualized. Not even with Kf a = 9999999, the maximal numerical value. Still, the only trajectory

Page 49: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

the spindle will have to execute is a constant velocity. So there is no real need for the acceleration feed forward, as the error at constant velocity is already minimized with the velocity feed forward. Therefore an acceleration feed forward gain of 0 is chosen.

Page 50: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

Chapter 4. Feed forward design

Page 51: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

Chapter 5

Turning experiments

5.1 setup

The previously tuned controllers may now be validated in a turning experiment. In this experiment a flat aluminium cylinder will be fine turned. The surface of this cylinder consists of a flat part and a conical part, each of equal size. On the boundary of the two parts are six drilled holes, three large and three small ones. Although these holes cause step distortions, they are not uncommon in turning objects. The spindle will be rotated with a velocity of 40.000 counts/sec, which is about 600 revolutions per minute. To achieve this velocity, the spindle speed needs to be set (i322 = 40), the controller needs to be activated and the motor needs to be put in jog mode (j+). This will cause a saturation of the motor (+lOV), giving maximum acceleration. Once the intended velocity is reached, the build up following error needs to be removed (k) and the controller needs to be reactivated (j+). At that stage the controller will be able to follow the given constant velocity without saturation. It should be noted though, that the command jt, turns the spindle in a clock-wise direction. As the diamond chisel has but one cutting side, only one direction will give a reasonable result. A petroleum sprayer shall be used during turning. This gives a small layer of petroleum on the product, preventing burrs (which are not immediately sucked away) from dam- aging the object, see also figure 1.1. Before turning, the exact boundary point between conical and flat, needs to be de- termined by hand and the X-direction needs to be homed (x = 0) there. This will be necessary as the turning experiment shall be executed with simple jog-mode commands. After this is done the X-axis may be brought to the center of the cylinder (which has a starting hole). The only thing that remains is finding the right height for the Z-axis, to give an optimal cut dept. Each experiment shall consist of two parts. First, the Z-axis shall be positioned (and

Page 52: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

44 Chapter 5. Turning experiments

homed) with the naked eye and the surface will be roughly turned. After this is done, another run shall be made, turning off a set number of nanometers. This cutting dept, can also be optimized. Cutting deep will give a firmer burr, but will also induce larger errors, due to the larger cutting force. It was found that a dept of 300 counts gave a satisfying result.

5.2 First run

Lets again start with the low-pass controllers. With the spindle at 600 rpm, but without any cutting done, thk following error of Z-axis was already at 400 nm (spike to spike). The following error of the X-axis was a little better a t 200 nm. The only controller that reaches the intended accuracy is that of the spindle, which has a following error of a few degrees.

I

x -80; 10 20 30 40 50 W I

Time [s]

- N - l o o l 10

20 30 40 50 M1

Time [s]

Figure 5.1: Turning experiment, low-pass controllers: (a) flat part; (b) conical part.

The turning process is started with the activation of the jog-mode in X-direction, with a speed of 40000 counts/sec. When the X-position reaches the conical part, the Z-axis is also enabled with a speed of 1000 counts/sec. The following error of both parts is given in figure. 5.1. As can be seen from figure 5.la, both the X- as Z-axis have a following error of 500 nm (spike to spike), for the flat part. From figure 5.lb, it can be seen that the holes almost double the following error of the Z-axis (first part of the figure), but that the conical turning itself does not seem to influence the following error (last part of the figure).

Page 53: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

5.2. First run 45

The large bumps in the following error of the X-axis are probably caused by the air bearings underneath the table. Still, these following errors are far too large.

To decrease the following errors, higher bandwidth controllers are needed. So i t is time to test the 60 Hz controllers with notch filters. Furthermore, the jog speed of both axis has been halved. This lowers the cutting force and thereby the following errors. The results are given in figure 5.2.

10 20 30 40 50 60

Time [s]

Time [s]

go -151 ' , 1 , 5 10 15 20 25 30 35 40

Time [s]

I 5 70 15 20 25 30 35 40

Time [s]

Figure 5.2: Turning experiment, notch controllers: (a) flat part; (b) conical part.

As can be seen the following error of the X-axis is brought back to 150 nm and that of the Z-axis to 100 nm (spike to spike), for both the flat as the conical part. In the conical part though, there now is an other disturbance visible, which lasts 15 seconds and is repetitive in position. Although it is unclear a t this stage what causes it, it is not the largest distortion. The largest are the holes, which cause a periodically shaped following error of *lo0 counts in Z-direction, or 1000 nm. This can be seen in figure 5.3. Apparently, the 9 dB Sensitivity is to high to suppress this kind of disturbances.

Another experiment that is necessary is the turning of the side of the cylinder. The X-axis is placed a t the edge of the cylinder to hold its position and the Z-axis will jog down with 20000 counts/sec. The following error during this experiment was for both axis around 150 nm, as can be seen in figure 5.4. Still, the error on the product itself seemed larger, and more periodic. Apparently, there are disturbances which are not measured on the X-axis.

Page 54: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

Chapter 5. Turning experiments

I 1 2 3 4 5 6

Time [s] - 2001 rn I

Time [s]

Figure 5.3: Turning experiment, notch controllers: conical part with holes.

I 5 10 15 20 25 30

Time [s]

Time [s]

Figure 5.4: Turning experiment: side of the cylinder.

5.3 Disturbance analysis

5.3.1 Aerostatic bearings under the table

Like any mechanical system, the CNC machine is sensitive to external noise. Unlike most systems though, the main part of this noise is eliminated by the air bearings under- neath the granite table. However, these bearings are actively controlled with a number of on/off switches. When they switch, the system is exited with a step response, which causes the following error to explode. This problem can be eliminated in two ways. One is to tune a controller which has a reduced sensitivity and more robustness to step response disturbances (which would

Page 55: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

5.3. Disturbance analysis 47

also reduce the error cause by the holes). The other option is to replace the active table control system by a system that does not uses on/off switches, but passively keeps the table on one level.

5.3.2 Unbalance of the spindle

According to Vermeulen, an unbalance of the spindle also gives rise to a larger following error than necessary. This assumption can easily be checked with an experiment. First, the following error is measured with all motors a t standstill and with active controllers, see figure 5.5. This will give a steady state error caused by "normal" noise.

I 1 2 3 4 5 6 7 8

Time [s]

* - 6 L h I 1 5 1 7 : Time [s]

Figure 5.5: Measurement X- and Z-axis with rotor at standstill.

Secondly, the spindle is placed in a jog-mode of 60000 counts/sec and the measurement is done again. Any effects a possible unbalance has, are so made visible. This experiment was performed (see figure 5.6a) and the following error with spindle enabled was indeed twice that of the measurement with the spindle at standstill (for the Z-axis, the X-axis is less sensitive to the unbalance). Furthermore, the frequency of the new disturbance was determined to be around 15 Hz, which is exactly the frequency of the spindle (15 rounds per second). By using a kind of sticky gum, the major part of this unbalance effect was reduced, see figure 5.6b. A small error induced by the unbalance remains though.

Page 56: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

Chapter 5. Turning experiments

I 2 4 6 8 10 12

Time [s]

Time [s]

I 1 2 3 4 5 6 7

Time [s]

N -10; 1 2 3 4 5 6

Time [s]

Figure 5.6: Measurement X- and Z-axis with rotor at constant velocity: (a) normal; (b) with unbalance compensation.

5.3.3 Reduced stiffness aerostatic bearings Z-axis

While turning the side of the cylinder, strange deviations became visible, which were not measured by the X- and Z-axis sensors. This gave rise to the idea that the stiffness of the Z-axis in X-direction is not as much near infinity, as is described in [2]. To check this another experiment was done in which the side of a small cylinder was turned, with the X-axis locked (so not controlled). This way all deviations from the controller are eliminated and what remains are displacements from the Z-axis in X- direction, caused by the limited stiffness of the aerostatic bearings of the Z-axis. Looking a t the end result under the microscope, it became clear that this indeed was the case, see figure 5.7.

To get an indication of the size of the distortion, a capitative displacement sensor was used. This showed a displacement of 400 nm for a force of 1 N and about 50 nm static (spike to spike). The only way to solve this deviation is by fixing, or arranging better aerostatic bearings for the Z-axis.

5.3.4 Tapping of the cables

As pointed out before, there is a cable running beside the Z-axis, which taps against the chassis. Although the controller is capable of suppressing most of it, it is an unwanted disturbance. By tying it up better, the tapping could be prevented.

Page 57: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

5.4. Controller improvement

Figure 5.7: Surface image, lOOx cylinder side, X locked.

5.3.5 Deviations of the 5 nm scales

The producers of the 5 nm scales, also included a measurement table of the scales, which can be found in [2]. From these it can be concluded that deviations can rise up to A200 nm. Although these are not measured by the controller, they are visible in the final product. It should be possible to include the measurement table in PEWIN, to calibrate the scales. This is omitted though, due to time limitations.

5.3.6 Other effects

Of course there are also other disturbances and effects that influence the following error. One of them, which was measurable, but for which no explanation has been found is the position bound error visible in figure 5.2b. Furthermore, looking at the flat part under a microscope (figure 5.8), periodic distur- bances can be seen on 1 and 10 Hz. What causes these is also unknown, but the fact that the controller cannot suppress them suggests they are far from trivial.

5.4 Controller improvement

To further improve the controller, it must be made more robust to step-disturbances. As the Sensitivity function represents the way, distortions of a certain frequency influ- ence the following error, it means lowering the Sensitivity function. Other controllers were tuned, with a maximum Sensitivity of 6 dB and a bandwidth

Page 58: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

Chapter 5. Turning experiments

Figure 5.8: Surface image, 200x, flat part.

of around 50 Hz. When testing these however, it became clear that the reduction in Sensitivity was countered by the reduction in bandwidth. Not only was the tracking error of the flat and conical parts higher, the parts with holes still showed the same deviations as before. It can be concluded that for both the X- as Z-axis controllers are needed with at least 60 Hz bandwidth, preferably more. The Sensitivity of these controllers should be lower than 6 dB however, which is something that cannot be achieved with the current soft- ware and PMAC. This is mainly caused by the phase delay for the higher frequencies, the poor effectiveness of the notch-filter for higher frequencies and the limitations of the software itself.

Page 59: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

Conclusion and Recommendat ions

In the previous chapters an analysis has been made concerning the Vermeulen CNC turning machine and its PMAC Lite controller. This resulted in a Matlab simulation file, which was used for the feed back design. These controllers were further improved by adding feed forward gains and tested in a turning experiment. This resulted in one set of acceptable controllers, which were capable of reaching an accuracy of 150 nm (spike to spike) for the X- and Z-axis and a few degrees for the spindle at constant velocity. These controller settings (simulated and fine tuned on the machine) are given in table 5.1.

The downside of these controllers however, are their capability of suppressing step shaped deviations. Holes in the turning object cause an explosion of the following error. One part of the problem is the rather high Sensitivity of 9 dB. Lowering this would increase the systems robustness to these kind of disturbances. When using the firmware though, lowering the Sensitivity can only be accomplished by lowering the bandwidth, which is unacceptable as that would cause the overall following error to rise.

So, on the control part of this assignment it can be concluded that controllers have been designed for all three axis that approach the set goal of 100 nm accuracy for X- and Z-axis and a stable and robust constant velocity for the spindle, as long as the turned object is not subject to step shaped deviations.

It has also been shown that there is a large difference between the tracking error that is measured by the X- and Z-axis scales and the real error, visible under the microscope. A few sources could be identified which contribute to this difference, but not all could be eliminated.

It is recommended that the possibilities of a PMAC with higher sampling fi-equency, in combination with the SEP software are explored. This might give a solution for the wanted robustness.

Page 60: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

Chapter 5. Turning experiments

Table 5.1: Final controllers

Simulation settings:

KP

2nd order low-pass [hz] PMAC implementation settings: Ix30 1x3 1 1x33 1x32 Ix35 Ix36 1x37 1x38 1x39

X-axis Z-axis Spindle

10000 750000 100 0 0 0 0 10

Before starting with this though, it is essential to first make a reasonable distortion analysis (same as given in chapter 5, but with more dept) and to eliminate all possible sources. Furthermore, it is also recommended that the deviations of the scales are countered. This way, the resulting turning result can be interpreted more clearly under the micfo- scope.

Page 61: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

Bibliography

[I] Delta Tau Data Systems. PMAC-Lite Hardware Reference, 1992.

[2] J.P.M.B. Vermeulen. Ceramic Optical Diamond Turning Machine - Design and development. PhD thesis, Eindhoven University of Technologie, 1999.

[3] Delta Tau Data Systems. PMAC Software Reference - for firmware version 2.13, 1992.

[4] Delta Tau Data Systems. PMAC Servo Evaluation Program (SEP), 1992. Version 1.1. User's manual for: PMAC Accessory 25A. For use in conjunction PMAC OPT-6, the Extended Servo Algorithm (ESA) EPROM.

[5] Delta Tau Data Systems. PMAC User's Manual - for firmware version 1.13, 1992.

[6] L.A.M. van Maldegem. Evaluation of Discretisation Methods. Philips Centre for Manufacturing Technologie, 1994.

[7] G.F. Franklin and J.D. Powell. Feedback Control of Dynamic Systems. Addison- Wesley Publishing Company, 1994.

[8] Maarten Steinbuch. Course sheets: Digital Motion Control. Eindhoven University of Technology, 2002.

191 Delta Tau Data Systems. PMAC quick reference. Version 2.2.

Page 62: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by
Page 63: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

Appendix - - A

Matched pole zero discretisat ion method

The main idea of this method is to match poles and zeros in z- and s-domain by applying z = eST. This should result in a digital filter with a time and kequency response identical to the continuous function. After the mapping is done, the gain of the continuous and discrete filter have to be matched by using a DC-gain. The matched pole zero method shall be demonstrated by transforming a first order high pass filter (inspired by [2]). The continuous function can be written as:

This transfer function has a pole at s = -117 and a zero at s = 0. Transforming this to a z-domain equivalent, it can be written as: z = e-Tl' and z = 1. This leads to:

with:

so:

Page 64: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

Appendix A. Matched pole zero discretisation method

Page 65: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

Appendix B

Trapezoid trajectory program

The given configuration is for a X-axis trapezoid movement.

CLOSE

; *************** open prog I

#1 c l e a r

l i n e a r

abs

TA200

TSO

F2000000

Setup and de f in i t i ons *************** ; coordinate system 1

;make sure a l l buf fers a r e closed

; motor 1 assigned t o x a x i s ; 1 un i t i s 1 encoder count

; motor 2 assigned t o z a x i s

; motor 3 assigned t o r a x i s

Motion Program Text *************** ; Open buffer f o r program ent ry , Program

; Erase ex i s t i ng contents of buffer

; Blended l i n e a r i n t e rpo la t ion move mode

; Absolute mode - moves spec i f i ed by pos i t i on

; Set 0.2 sec acce l time

; Set S-curve acce l time

; Set feedra te (speed) of lcm/s

Page 66: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

X800000

DWELL200

xo

CLOSE

Appendix B. Trapezoid trajectory program

; Move X-axis t o 800000 cn t s

; Stay i n pos i t i on f o r 1/2 sec

; Move X-axis t o 0

; Close buffer - end program

Page 67: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

Appendix C

Simulation file ptune3.m

funct ion [HZ,CH] = ptune3(axis,PID,LPN, mode) % PTUNE3 - tuning f i l e f o r t h e Pmac embedded i n t h e Vermeulen CNC prec is ion machine

% % [HZ, CHI = PTUNE3 (AXIS, PID ,LPN, MODE) % % with: % AXIS : system cons is t ing o f :

% AXIS.NR: I f o r x a x i s % 2 f o r z a x i s % 3 f o r spindle % 4 f o r o ther , i n t h a t case: % AXIS.SENS: s e n s i t i v i t y funct ion a s measured with s i g l a b [FRF, H Z J ] % AXIS.CNTR: Control ler used f o r s e n s i t i v i t y measurement [Kp Kd] % PID : [Proportional ga in , I n t e r g r a l ga in , Derative gain] % LPN : [O] f o r no lp/notch % [ I , wl, wO , b l , b01 - notch % f o r C(s) = (s~2+2*bl*wl*s+w1~2)/(s~2+2*b0*w0*s+w0~2) % with w i n [rad/s] ! ! - o r % [2, order , hz] - Lowpass f i l t e r % with order I o r 2 and hz t h e breakpoint i n hz % MODE : 0 (defaul t ) show f i g u r e s , I no f igu res

% % NOTE : LP and NOTCH can ' t be combined, t h a t w i l l g ive f a u l t y in fo !

% % Example I : X-axis tuning % a x i s - n r = I ; % ptune3(axis, [EIOOOO, 3OOOOO,l5OO] , [ I , l63*2*pi, l63*2*pi, 0.03, O.31,O) ;

% % Example 2 : o ther FRF, p lant v i sua l i s a t ion , no con t ro l l ac t ions

Page 68: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

60 Appendix C. Simulation file ptune3.m

% axis.nr = 4; axis.sens = [FRF, hz']; axis.cntr = [Kp Kdl; % ptune3(axis, [1,0,01 , C01,O) ; % % Internship 2003 % - Willem-Jan Evers

clc

% Simulation settings o D o D O O D o O O o o o o D o o l o O O I D O LLLLLLLLLLLLLLLLLLLLLLLL Ts = 1/2.26e3; %Sample time [s]

% Scaling parameters Sd = Ts*4*pi-2; %Scaling factor Kd Si = Tsa2/(pi) ;

% Simulation plant sensitivity loading if axis.nr == 1

load wj I7090 .mat ;

P = 2000; Kp = P; D = 4000; Kd = D*Sd;

elseif axis.nr == 2 load 100928.mat; P = 250; Kp = P; D = 1280; Kd = D*Sd;

elseif axis.nr == 3 %load wj2509r .mat load raxis.mat; % model with lower order estimate hz = logspace(-4,1.5,1000); P = 100000; Kp = P; D = 100000; Kd = D*Sd;

elseif axis.nr == 4 P = axis.cntr(1); Kp = P; D = axis. cntr (2) ; Kd = D*Sd; FRF = axis. sens ( : , I) ; hz = axis.sens(: ,2)';

end

if nargin < 4 mode = 0;

elseif nargin < 3

Page 69: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

LPN = [O] ; end

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ~ 0 0 0 D 0 0 0 D 0 0 LLLLLLLLLLLLLLLLLLLLLLLLLLL % Plant transfer determination

[m , p] =dbode (num, den, Ts ,2*pi. *hz) ; m = squeeze (m) ; p = squeeze (p) ; Cs = p2r(m,p);

elseif axis.nr == 3 [m, p] =bode (nu, den, 2*pi. *hd ; m = squeeze (m) ; p = squeeze (p) ; H = p2r(m,p);

elseif axis.nr == 4 H-ol=l./FRF-I; % Regelaar num = [Kp+Kp*Kd, -Kp*Kd] ; den = [l 01;

[m,p]=dbode(num,den,Ts ,2*pi. *hz) ; m = squeeze (m) ; p = squeeze (p) ; Cs = p2r(m,p);

% Regelaar uitdelen H = H-01. /Cs;

end

clear Kp Kd

Page 70: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

Appendix C. Simulation file ptune3.m

% Tuning parameters 0 0 0 0 0 0 D 0 0 0 0 0 0 0 0 0 0 0 0 LLLLLLLLLLLLLLLLLLL % PID Kp = PID (I) ; Ki = PID(2)*Si; Kd = PID(3)*Sd;

% Notch or LP if LPN(1) == I %notch

Cpid = Kp*(Kd.*(l-z.-(-I))+(l+Ki./(l-2.-(-1)))) ;

wl = LPN(2) ; % Crad/sl wO = LPN(3); bl = LPN(4) ;

b2 = LPN(5); sl = -bl*wl+wl*sqrt (bl-2-1) ; s2 = -bl*wl-wl*sqrt (bl-2-11; dl = -b2*wO+wO*sqrt (b2-2-11; d2 = -b2*w0-wO*sqrt(b2-2-11; Kdcn = wl~2/w0~2*(l-(exp(dl*~s)+exp(d2*~s))+exp(dl*~s)*exp(d2*~s))

/(I-(exp(sl*Ts)+exp(s2*Ts) )+exp(sl*Ts) *exp(s2*Ts) 1 ; Cn = Kdcn* (z . -2-2. * (exp (sl*Ts) +exp (s2*Ts) ) +exp (sl*Ts) *exp (s2*Ts) . *

ones (I ,length(z))) . / (z. -2-z. * (exp(d1*Ts)+exp(d2*Ts) )

+exp(dl*Ts) *exp(d2*Ts) . *ones (I, length(z) ) ) ; elseif LPN(1) == 2 %Lp

tau = LPN(3); if LPN(2) == I %le orde

a = exp(-tau*2*pi*Ts) ;

Kdc= I-a; Cpid = Kp* (Kd*Kdc. * (z-I) . / (z-a)+(l+Ki. *z. /(z-I))) ;

Cn = I; elseif LPN(2) == 2 %2e orde

a = exp(-tau*2*pi*Ts) ;

Kdc = (1-a)-2; Cpid = Kp*(Kd*Kdc.*(z-l)./(z-a).-2+(1+Ki.*z./(z-I))); Cn = I

end elseif LPN(1) == 0

Cpid = Kp*(Kd.*(l-z.-(-l))+(l+Ki./(l-2.-(-1)))); Cn = I;

end

Page 71: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

i f mode == 0 f igure subplot (211) semilogx (f ,20*logIO (abs (Cpid) ) )

xlabel( 'Frequency [hz] ' ) ylabel( 'Magnitude [dB] ')

t i t l e ( ' P I D J ) g r i d subplot (212) semilogx(f ,180*angle (Cpid) /p i ) ; g r i d y label ( 'phase [deg] ' ) xlabe l ( 'frequency [Hz] ' )

end i f mode == 0

f igure subplot (211) semilogx (f ,20*log10 (abs (C) ) ) xlabel ( 'Frequency [hz] ' ) ylabel( 'Magnitude [dB] ' ) title('PID+Notch/LP ' ) g r i d subplot (212) semilogx (f ,180*angle (C) /pi) ; g r i d ylabel ( 'phase [deg] ' ) xlabel ( 'frequency [Hz] ' )

end

i f mode == 0 f igure subplot (211) semilogx(f ,20*log10 (abs (CH) ) , 'k ' ) ; g r i d t i t le ( 'CH s imulat ieJ) ylabel('magnitude [dB] ') subplot (212)

Page 72: PMAC servo tuning - Pure - Aanmelden · motors are controlled by a PMAC control system, which can use the standard firmware [3] or the special SEP software [4], which was bought by

64 Appendix C. Simulation file ptune3.m

semilogx(f , l80*angle (CH)/pi, 'k' ; grid ylabel ('phase [deg] ' ) xlabel ( ' frequency [Hz] ' )

0 0 0 1 0 0 0 0 0 0 0 0 0 LLLLLLLLLLLLL % Nyquist 0 D D 0 0 0 0 0 0 0 0 D 0 LLLLLLLLLLLLL [x,y]=circle(-1 ,O,O . 5 ) ; % 6dB sens circle figure plot(real(CH) ,imag(CH), 'k',x,y, 'k: '1; grid title ('Nyquist plot ' ) ylabel ( ' Imaginary (CH) ' ) xlabel ( 'Real (CH) ' )

figure subplot (211) semilogx(f ,20*logIO(abs(S)), 'k' , [hz(2) max(hz)l, [6 61, 'k: '1; grid title('Sensitivity') ylabel ('magnitude [dB] ' ) subplot (2 12) semilogx(f ,l80*angle (S) /pi, ' k' ; grid ylabel ( 'phase [degl ' xlabel ( 'frequency [Hz] ' )

end