Fuzzy Logic Position Control of a Shape Memory Alloy Wire Daniela MAFFIODO, Terenziano RAPARELLI, Guido BELFORTE Abstract: Due to the complex thermomechanical characteristics of Shape Memory Alloy wires, it is important to develop control systems in order to design new applications for these smart materials. This paper presents three SMA wire position control algorithms: a classic PD control with PWM modulation is compared to two different fuzzy logic solutions. They are implemented on an SMA wire (Flexinol®) with a diameter of 250 and length of about 200 mm. Fuzzy logic is particularly suitable in cases involving uncertain conditions and data acquisition noise, and is widely used to model and control time-dependent and/or nonlinear processes. Experimental tests included square wave response tests, sinusoidal wave tests and multiple step response tests. Results indicate that maximum error during the stability phase with the fuzzy logic control is about 2%, four times smaller than that obtained with the PD control, with a lower fluctuation amplitude. The PD control with fuzzy supervisor is simpler than the fuzzy control and provides similar results in the sinusoidal tests and multiple step response tests, with fluctuation amplitude of about 0.01 mm, much lower than those observed with the PD or the fuzzy control. Keywords: Position control, fuzzy logic, shape memory alloy ■ 1 Introduction Shape Memory Alloy (SMA) wires are currently employed in robotics, as well as in actuators for various industrial, aeronautical and space applications, where they can be a good alternative to traditional actuators [1]. SMA wires are particularly suitable for small devices with simple design and high power-to-weight ratio, and are also an optimum solution when employed as sensors and actuators at the same time. Since their thermomechanical characteristics depend on a number of vari- Assist. prof. dr. Daniela Maffiodo, prof. dr. Terenziano Raparelli, prof. dr. Guido Belforte; all: Di-partimento di Meccanica, Poli-tecnico di Torino, Italy ables, the constitutive models presented by various researchers [2, 3, 4, 5] attempt to consider wire nonlinearity, hysteresis and nonrepeatability. The complexity of these models, however, has led a number of groups to look for a way to design SMA wire applications without knowing all aspects of thermomechanical characteristics. This can be accomplished by applying control methods to the wire considered as a "black box". Some researchers [6, 7] designed a PD control, using pulse-width pulse-frequency (PWPF) or PWM modulation to reduce energy consumption. Results demonstrate that the latter solution provides better stability and energy savings. An interesting approach [8] consists of using neural networks to compensate for wire hysteresis. Another possible solution is an SMA wire position control [9], where the feedback signal is the simple linearized law between the wire strain and its electrical resistance, assuming constant load. The same idea of resistance feedback is the basis of other researchers' work [10], where the relationship between position and resistance is mapped by applying neural networks. A nonlinear PID control with hysteresis compensation permits good position control of SMA actuators [11]. A further possibility is so-called fuzzy logic control, which is particularly suitable in cases involving uncertain conditions and data acquisition noise. This type of logic, first developed in '65, is now widely used to model and control time-dependent and/or nonlinear processes [12, 13]. This article presents three SMA wire position control algorithms: a classic control (PD with PWM modulation), a fuzzy logic control and a hybrid con trol (PWM control with fuzzy supervisor). The controlled actuator is a Ni-Ti wire (Flexinol® 250 HT) 250 ^m in diameter, 200 mm in length and showing a one-way shape memory effect. Our goal was to optimize SMA wire position control algorithms, making it possible to design more reliable and efficient applications. In particular, the aim was to achieve a good compromise between the control's ability to maintain a desired position and fast actuator response. For this reason, we sought to develop a control algorithm capable of ensuring small errors in sinusoidal wave and multiple step response tests. It will thus be possible to design SMA wire applications with continuous, rather than only digital, behavior. As an example, some researchers [14] designed a SMA-actuated humanoid flexible gripper and studied the associated control. More generally, the implemented control scheme makes it possible to improve the performance of a wide range of applications: from robots and parallel manipulators to minimally invasive surgery applications, and from grippers to artificial limbs. ■ 2 Test bench The selected SMA wire achieves its contracted shape at temperatures above 70°C. To return to the other crystalline form, it is necessary to cool the wire and apply a bias tension of at least 35 MPa in the wire axial direction. Heating is accomplished via the Joule effect, while cooling is in still air. As one end of the SMA wire is fixed, shortening caused by heating can be considered as the upwards displacement of the free end of the wire. The term "position control" will refer to the position of the free end with respect to the fixed end. The wire must be firmly constrained, under mechanical strain and heated by electric current; a sensor is also required to measure the position reached by the free end. A schematic view of the control test bench is shown in Figure 1. Wire layout is simple and efficient: the SMA wire (2) is positioned vertically and connected at both ends to an insulated electric wire. On the upper side, the wire is connected to the structure (1), while an approximately 1 kg mass (3) is suspended on the lower side. The cursor of a Schaevitz E200 LVDT position sensor (4) is rigidly connected to the mass, sliding inside an external cylinder secured to the structure. SMA wire position control is executed with appropriate software on PC (7). The DAQ NI Pa-6052E data acquisition device (6) is the interface between the mechanical system and the control system. In particular, the SMA wire position feedback signal from the LVDT sensor, the signal representing the potential drop across the SMA wire and the signal representing the potential drop across a known resistance in series with the SMA wire are also acquired in order to monitor supplied power and not to exceed the wire limits. The command signal needed to control the SMA wire is also transmitted. Sample time is 0.0001 seconds. The amplification device (5) fulfills two purposes: to amplify the low power signal from DAQ and to acquire the electric current magnitude flowing into the SMA wire. ■ 3 Control logic In developing the control, the SMA wire was considered as a "black box". The input is the thermal power supplied to the wire; the outputs are the generated force and the displacement of a wire end. Wire temperature and electrical resistance are internal variables. Actually, the thermal power supplied to the SMA wire is the difference between the power supplied by Joule effect and the power continuously dispersed by conduction, convection and radiation. Total power supplied is known, and represented by the product VsmaxIsma. The dispersed power is unknown and not considered: during heating this power is negative, but during cooling it is essential in order to produce the austenite-martensite transformation. It depends on environmental conditions (e.g., temperature, ventilation, etc.), that are not controlled or monitored during this study because this is the normal operating condition for SMA applications. Except for the temporary phases, the force generated by the SMA wire is equal to the constant load applied. The wire end displacement, corresponding to wire contraction, is measured by the LVDT position transducer. The electrical resistance, an internal variable, is indirectly obtained as the ratio Vsma/Isma, while temperature is not measured. ■ 4 Control method Three different closed loop control methods were investigated, each developed with Matlab/Simulink software. Figure 1. Control test bench schematics (the arrow beside the wire indicates the heating/shortening direction) Figure 2. Block diagram of the PD control with PWM modulator Figure 3. PWM subsystem 4.1 PWM modulated PD Control The proportional derivative control with PWM (Pulse Width Modulation) modulator is shown in Figure 2. The desired position is the control input, compared with the position feedback provided by the LVDT sensor. The difference between the two signals is the positioning error, subsequently multiplied by the proportional gain Kp; its derivative is amplified by means of the derivative gain Kd. The sum of these signals is the command signal VOUT, which is processed by the PWM to provide the corresponding wave train. Figure 3 shows an example of the generated PWM output. The triangular waveform (frequency f=10 Hz, amplitude A=2V) is compared to the reference signal. This difference is the relay input signal. When the reference signal value is greater than the modulation waveform, the PWM signal is in the high state, otherwise it is in the low state. The saturation block limits maximum output for safety reasons. As output frequency is obviously the same as the carrier wave frequency, the period is T=0.1 s. 4.2 Fuzzy Logic Control Figure 4 shows the block diagram of the SMA wire controlled with fuzzy logic. It is similar to the PD control, but the PWM modulator is eliminated. Control input and output are nominally the same as in the PD control, but the internal process is profoundly different. Figure 5 shows the block diagram of the fuzzy logic control. The error and derivative error variables of a fuzzy control are defined and split up into five different levels using linguistic variables: negative big, negative small, zero, positive small, and positive big. The output variable VOUT is described by seven linguistic variables: very low, low, mean low, medium, medium high, high, very high. Figure 6 shows the membership functions for the error variable. Since the actuator stroke is 8 mm, the absolute value maximum error is 8. Triangular and trapezoidal membership functions were chosen to reduce computational costs. Trapezoidal wide negative big and positive big operate when the error is big, e.g., for step signals; negative small, zero and positive small are the membership functions operating for sinusoidal position input signals. Figure 7 shows the membership functions for the derivative error variable. Figure 4. Fuzzy Logic Control Figure 5. Fuzzy logic controller block The membership function range (-5/+5 mm/s) was evaluated experimentally. Figure 8 shows the membership functions for the output variable, voltage VOUT. There are 5 narrow triangular and 2 trapezoidal membership functions with no intersections. The VOUT range is 0/3.8 V; the maximum cooling speed (environmental conditions permitting) is achieved with null input, and the maximum heating speed is obtained with the highest voltage. Note that the VOUT voltage is not exactly the wire supply voltage VSma because there is a resistance in series with the wire in order to measure electric current. Maximum voltage is 3.8 V to avoid the risk of overheating. This value was experimentally evaluated. The rule set is composed of 9 rules: 1. IF error is neg. big THEN voltage is very low; 2. IF error is neg small THEN voltage is low; 3. IF error is neg. small AND derivative error is pos. big THEN voltage is medium high; 4. IF error is zero AND derivative error is neg. small THEN voltage is medium low; 5. IF error is zero THEN voltage is medium; 6. IF error is zero AND derivative error is pos. small THEN voltage is medium high; 7. IF error is pos. small AND derivative error is neg. big THEN voltage is medium low; 8. IF error is pos. small THEN voltage is high; 9. IF error is pos. big THEN voltage is very high. To explain the rule set, it is necessary to note that negative error means that the value for the position reached is higher than that for the desired position value, so applied voltage must be reduced to cool the wire; the converse situation applies for positive error. Negative derivative error means that error is decreasing (when error is positive, its absolute value is decreasing; when error is negative, its absolute value is increasing), while the Figure 6. Membership functions of the error variable Figure 7. Membership functions of the derivative error variable Figure 8. Membership functions for the output variable, voltage VOUT converse situation applies for positive derivative error. Moreover, big derivative error (positive or negative) means that error variation speed is high, and vice versa for small derivative error. These obvious qualitative observations are the foundations of the inference rule set. Rules 1, 2, 5, 8 and 9 are simple and based only on the error value. Rules 4 and 6 operate when there is very little difference between the real position and the desired position (zero error means that its value is between -0.002 and +0.002 mm), and derivative error is small (between -1 and +1). Referring to rule 6, small derivative error means that error "will be" positive and the control will operate to increase output voltage, as for rule 4. Rules 3 and 7 are intended to prevent overshoots. During both heating and cooling step tests, derivative error exceeded 1.5 only when error was big (negative big and positive big derivative error). As an example, if error is rapidly decreasing during heating, without rule 7 the control would supply high voltage with the risk of exceeding the desired position value. With rule 7, the fuzzy control supplies a medium low voltage (about 1 V) to decrease the error speed. When error is low, other rules will operate. It should be noted that when the difference between the real position and the desired position is very small (zero error), an external noise (e.g., a convection increase) involves rule 8, not 7, because error becomes positive or negative small. This means that the system is well-built. 4.3 PD Control with fuzzy supervisor The last control solution is a PD con- Figure 9. PD control with fuzzy supervisor Figure 10. Fuzzy block trol with fuzzy supervisor. The fuzzy subsystem is used to calibrate the KD parameter of a PD controller. The derivative is used to damp system response, so it is advantageous to increase it at the end of the transition phase. Experimental tests carried out to determine the correct value for parameter Kp and KD show that, for a fixed KP value, a high KD value is important during the transition phase and a low KD value is useful in reducing vibrations when the difference between the real position and the desired position is very small. The fuzzy subsystem, shown in Figure 9, provides the most suitable derivative value, evaluating only the position error. Figure 10 shows the fuzzy block: the input is the position error and the output is the KD value. Figure 11 shows the membership functions for fuzzification, while Figure 12 shows the membership functions for the de-fuzzification phase. The rule set is very simple, with only three rules: Figure 11. Membership functions for fuzzification Figure 12. Membership functions of the output variable KD 1. IF error is negative THEN KD is big 2. IF error is null THEN KD is small 3. IF error is positive THEN KD is big Thus, fuzzy block output is a big derivative gain (around 9) when the system is far from the desired position and a small one (about 0.1) when there is very little difference between the real position and the desired position. ■ 5 Experimental tests and results Square wave response and sinusoidal wave response tests with different frequencies and a multiple step response test were carried out for the three different control algorithms. In order to evaluate control behavior, it is important to know whether the control is capable of maintaining the desired position for an adequate period of time, and, on the other hand, the control's tracking performance, evaluating any delays. The first capability is assessed through square wave and multiple step response tests, while the second is assessed through sinusoidal tests. The square wave test, with frequency of 1/20 Hz, makes it possible to evaluate maintenance of two predetermined positions corresponding to a SMA wire contraction of 1 mm and of 7 mm. Sinusoidal wave frequencies were assumed to be equal to 1/60, 1/30, 1/20 and 1/15 Hz. The multiple step response tests employ a command signal with 5 upward slopes and 5 downward slopes. Each step corresponds to a 1 mm contraction (or relaxation) of the SMA wire and lasts 10 seconds; the entire command signal being from 2 to 7 mm of the actuator wire range. This test investigates the wire's ability to maintain a desired position during a sufficiently long period of time. The maximum error observed during a single test step is considered the error of that test, and the maximum overshoot observed during all up and downwards steps of a single test is considered as the overshoot of that test. 5.1 Results for PD control with PWM modulator Experimental tests demonstrate that it is not possible to choose a pair of values for KP and KD that minimize both overshoot and error while maintaining the desired position. KP=60 and Kd=4 are the compromise values used for the tests. Figure 13. (a) Square wave response test with PD control and PWM modulator, f=1/20 Hz, 1 kg bias load; (b) Corresponding position error Figure 14. (a) Example of a sinusoidal wave test with PD control and PWM modulator: f=1/20 Hz; 1 kg bias load; (b) Corresponding position error Figure 15. (a) Multiple step response tests with PD control and PWM modulator (1 kg bias load); (b) Corresponding position error Figure 16. (a) Square wave response test with fuzzy control, f=1/20 Hz, 1 kg bias load; (b) Corresponding position error Square wave response tests (Figure 13) show a maximum error while maintaining the desired position of less than 0.04 mm, or 0.67%. Heating lasts about 2 seconds and is always faster than cooling, though this process depends on environmental conditions. Sinusoidal wave tests demonstrate little difference between the various frequencies, a maximum error of about 1.33% and fluctuation around the desired position with maximum amplitude of 0.14 mm and 10 Hz frequency. Figure 14 shows an example of a sinusoidal wave test. Figure 15 shows an example of a multiple step response test. Part a) highlights the good correspondence between the desired position and the real position, but part b) shows rather high fluctuations while maintaining the desired position (maximum amplitude of 0.15 mm and 10 Hz frequency). The maximum error is about 9%. 5.2 Fuzzy logic control results The setup phase for the fuzzy logic control was a delicate operation. Square wave response tests (Figure 16) show a maximum error while maintaining the desired position of less than 0.005 mm (corresponding to 0.08%), about 10 times smaller than that obtained with the PD control with PWM modulator. Sinusoidal wave tests demonstrate little difference between the different frequencies, and a maximum er- ror of about 1%. Fluctuations around the desired positions have maximum amplitude of 0.11 mm and 3 to 5 Hz frequency. They occur when wire position reaches actuator mid-stroke, at minimum and maximum sinusoidal signal levels, and when fluctuations are almost zero. For these tests, control behavior is similar to that in the previous test, with a slightly lower maximum error and similar fluctuation amplitude. As an example, Figure 17 shows results of a sinusoidal wave test with 1/20 Hz frequency. Figure 18 shows results of a multiple step response test. The correspondence between the desired position and the real position is excellent. The maximum error while maintaining the desired position is about 0.02 mm (2%), four times smaller than that ob Figure 17. (a) Example of a sinusoidal wave test with fuzzy control: f=1/20 Hz; 1 kg bias load; (b) Corresponding position error Figure 18. (a) Multiple step response tests with fuzzy control (1 kg bias load); (b) Corresponding position error tained with the PD control with PWM modulator. Fluctuations have maximum amplitude of 0.04 mm, lower than those observed previously, and frequencies of 5-6 Hz 5.3 Results for PD control and fuzzy supervisor with PWM modulator Experimental tests show that decreasing Kd values, with Kp constant, causes high overshoots and low position errors when the desired position is maintained, while increasing Kd leads to high oscillations and errors while maintaining the desired position, but negligible overshoots. Consequently, a "supervisor" block was developed which is capable of choosing the correct KD value on the basis of position to be controlled: a fuzzy supervisor. Square wave response tests with fuzzy supervisor (Figure 19) show maximum error while maintaining the desired position of less than 0.33%, or about one half of the corresponding error with simple PD control and PWM modulator; in addition, the error decreases with no increase in overshoot. The supervisor was not found to have major advantages in the sinusoidal wave tests, as errors and oscillations are comparable. Figure 20 shows the results of a multiple step response test with the fuzzy supervisor. The correspondence between the desired position and the real position is excellent. The maximum error while maintaining the desired position is less than 2%, similar to the that obtained with the fuzzy control. Fluctuations have maximum amplitude of 0.01 mm, lower than that observed with both the PD control with PWM modulation and the fuzzy control. ■ 6 Conclusions Due to the thermomechanical characteristics of Shape Memory Alloy wires, it is important to develop control systems in order to design new applications for these smart materials. This paper presents and compares three SMA wire position control algorithms: a PD control with PWM modulation, a fuzzy logic control and a PWM control with fuzzy supervisor. Experimental tests included square wave response tests, sinusoidal wave tests and multiple step response tests. Results indicate that maximum error while maintaining the desired position with the fuzzy logic control is four times smaller than that obtained with the PD control, with a lower fluctuation amplitude. The PD control Figure 19. (a) Square wave response test with PD control and fuzzy supervisor, f=1/20 Hz, 1 kg bias load; (b) Corresponding position error Figure 20. (a) Multiple step response test with PD control and fuzzy supervisor (1 kg bias load); (b) Corresponding position error with fuzzy supervisor is simpler than the fuzzy control and provides similar results in the sinusoidal tests and step response tests, with a lower fluctuation amplitude than those observed with the PD or the fuzzy control. The best of these control systems can be used in many applications, including flexible actuators and grippers. The control system's reliability could permit simple design solutions for a variety of robots and robotic end-effectors. Future work will address the development of a resistance feedback control. The relationship between electrical resistance and wire position would be experimentally determined, and the position control would then be modified, comparing the position reached with this "predicted position". Implementing these position control al- gorithms on different SMA actuators will make it possible to evaluate their actual performance. References [1] Reynaerts, D. and Van Brus-sel, H. 1998. Design aspects of shape memory actuators. Me-chatronics, vol.8, pp. 635-656. [2] Tanaka, K. 1986. A thermome-chanical sketch of shape memory effect: one-dimensional tensile behaviour. Res. Meccanica, Vol.18, pp. 251-263. [3 Liang, C. and Rogers, C. A. 1990. One-dimensional ther-momechanical constitutive relations for shape memory material. Journal of Intelligent Material and Structures, Vol. 1, pp. 207-234. [4] Brinson, L.C. 1990. One-dimensional constitutive behaviour of shape memory alloys: thermo mechanical derivation with non-constant material function. Journal of Intelligent Material and Structures, Vol. 7, pp. 108-114. [5] Boyd, J.G. and Lagoudas, D.C. 1998. A thermodynamic constitutive model for the shape memory materials part I. The monolithic shape memory alloys. International Journal of Plasticity, Vol.6, pp. 805-842. [6] Ma, N. and Song, G. 2003. Control of shape memory alloy actuators using pulse-width pulse-frequency (PWPF) modulation. Journal of Intelligent Material Systems and Structures, Vol. 14, pp. 15-22. [7] Ma, N. and Song, G. 2003. Control of shape memory alloy actuators using pulse width modulation. Smart Materials and Structures, Vol. 12, pp. 712-719. [8] Song, G., Chaudhry, V. and Batur, C. 2003. A neural network inverse model for a shape memory alloy wire actuator. Journal of Intelligent Material Systems and Structures, Vol. 14, pp. 371-377. [9] Raparelli, T., Zobel, P. B. and Durante, F. 2002. SMA wire position control with electrical resistance feedback. Conf. On Structural Control, Como, Italy, Vol. 2 , pp. 391-398. [10] Ma, N., Song, G and Lee, H-J. 2004. Position control of shape memory alloy actuators with internal electrical resistance feedback using neural networks. Smart Materials and Structures, Vol. 13, pp. 777-783. [11] Shameli, E., Alasty, A. and Sa-laarieh, H. 2005. Stability analysis and nonlinear control of a miniature shape memory alloy actuator for precise applications. Me-chatronics, Vol. 15, pp. 471-486. [12] Mac Neill, D. and Freiberger, P. 1993. Fuzzy logic. Simon & Schuster, NY. [13] Li, H. and Gupta, M. 1995. Fuzzy logic and intelligent systems. International series in intelligent technologies, Kluver Academic Publishers. [14] Yang, K., Wang, Y. 2008. Design, drive and control of a novel SMA-actuated humanoid flexible gripper Journal of Mechanical Science and Technology, Vol. 22, N. 5, pp. 895-904. [15] Raparelli, T., Zobel, P. B. and Durante, F. 2008 Mechanical Design of a 3-dof Parallel Robot Actuated by Smart Wires Proc. of EUCOMES 08 The 2 nd European Conf. on Mechanism Science, pp. 271-278. [16] Sreekumar, M., Nagarajan, T., Singaperumal M., Zoppi, M., Molfino, R. 2007. Critical review of current trends in shape memory alloy actuators for intelligent robots Industrial Robot: An International Journal. Vol. 34, pp. 285-294. Mehka regulacija položaja kovinske žice s spominom Razširjeni povzetek Termomehanične lastnosti kovin s spominom narekujejo nove možnosti njihove uporabe, ki se kažejo tudi na področju vodenja sistemov. V prispevku so predstavljeni in primerjani trije načini regulacije položaja žice, ki vključujejo uporabo PD-vodenja v kombinaciji s PWM-modulacijo, mehko vodenje ter kombinacijo obeh pristopov, kjer mehka logika prevzame vlogo nadzornega sistema vodenja. Pri tem gre za obdelavo tako imenovane spominske žice (Flexinol®) premera 250 in dolžine 200 mm. Mehko vodenje sistemov je pogosto ustrezno v primerih, ko gre za nelinearne in/ali časovno spremenljive sisteme in takrat, ko je delovanje procesov podvrženo nezanesljivostim, zajem signalov pa je močno pošumljen. Eksperimentalno testiranje in vrednotenje posameznih načinov vodenja vključuje opazovanje odzivov na vlak pravokotnih impulzov, na sinusno vzbujanje izbrane frekvence in na stopničasto vzbujanje. Rezultati načrtovanja kažejo na relativne prednosti predstavljene hibridne rešitve, ki ima preprostejšo strukturo od mehkega regulatorja in dosega boljšo kvaliteto obnašanja od klasične regulacije tipa PD. Ključne besede: regulacija položaja, mehko vodenje, spominska zlitina TRANSPORR^ LOGISTIKA^ DNEVI PREVOZNIKOV 14. in 15. maj20i0, BTC Logistični center Ljubljana • Konferenca: predstavitev vodilnih managerjev največjih logističnih sistemov • Ogled primera dobre prakse v skladišču Spar Slovenija d. o. o. več informacij na: • Podelitev priznanja Prevoznik leta 2010 WWW.l02istika-sl0.Si * Državnoprvenstvopoklicnihvoznikov ° ' • Interaktivne delavnice www.l0gisticni-center.si • Bogat spremljevalni program Jörfner^nredifue Sponzor ^egi^-tracije /'hncorULii