/ D O M DEVELOPMENT OF PNEUMATIC ROBOT ARM CONTROLLER FOR INDUSTRIAL APPLICATION A thesis submitted to the Department of Electrical Engineering, University of Moratuwa in partial fulfillment of the requirements for the Degree of Master of Science by PATHIRANAGE GUMINDA SANJEEWA PRIYADARSHANA Supervised by: Dr. Lanka Udawatta C)\\b3 Department of Electrical Engineering University of Moratuwa, Sri Lanka April 2008 University of Moratuwa 91163 91163 DECLARATION The work submitted in this thesis is the result of my own investigation, except where otherwise stated. It has not already been accepted for any other degree, and is also not being concurrently submitted for any other degree. £ P.G. S. Priyadarshana (Candidate) Date: O ^ j o ^ - |;2£>m I endorse the declaration by the candidate. Dr. Lanka Udawatta (Supervisor) CONTENTS Declaration Abstract Acknowledgement List of Figures List of Tables 1. Introduction 1 1.1 Robotics actuators 1 1.2 Pneumatic artificial muscle 4 1.2.1 Braided muscle 5 1.2.2 Netted muscle 5 1.2.3 Embedded muscle 5 1.3 Simple application of pneumatic artificial muscle 6 1.3.1 Lifting and lowering masses 6 1.3.2 Antagonistic setups 7 1.3.3 Bicep and tricep configurations 7 1.4 Industrial applications of pneumatic artificial muscle 9 1.5 Research objective 12 1.6 Dynamic behavior of pneumatic artificial muscle 13 2. Hardware development 14 2.1 Pneumatic muscle 14 2.2 Pressure regulator valve 15 2.3 Hall effect sensor 16 2.4 Current control circuit 16 2.5 Complete hardware assembly 17 3. Theoretical development 18 3.1 Dynamic analysis of pneumatic artificial muscle 18 3.2 Mathematical model 25 3.2.1 Mathematical model for pneumatic muscle 25 3.2.2 Mathematical model for pneumatic robot arm 26 3.3 State space model 27 3.3.1 State space model for pneumatic muscle 27 3.3.2 State space model for pneumatic robot arm 28 ii 4. Proposed solution 30 4.1 Develop state space model 30 4.2 Inverse based control approach 31 4.3 Applications of inverse based control approach 32 5. Prototype realization 33 5.1 Practical results 33 5.2 Comparison of theoretical and practical situations 42 5.3 Summary 43 6. Results 44 6.1 Tracking a triangular waveform 44 6.2 Tracking a sinusoidal waveform 47 7. Conclusion and Future Directions 49 7.1 Conclusion 49 7.2 Suggestions for Future directions 50 References 51 Appendix A: (Data logging Program) 55 Appendix B: (Hall effect sensor data sheet) 59 Appendix C: (MCP4250 Digital potentiometer) 63 Appendix D: (PIC 16F877A Microcontroller) 64 Appendix E: (Micro C Program code) 65 Appendix F: (MATLAB Program) 70 iii Abstract This research study focuses on developing a pneumatic robot arm for industrial applications, where the discussion here is narrowed down to the application of Pneumatic Artificial Muscles (PAM) on bicep configuration. When compared with other robotic actuators Pneumatic muscles have several advantages such as lower power to weight ratios, high strength, lightweight and easiness of employment. Hence pneumatic artificial muscles have become more attractive actuators in industrial robotics applications. A pneumatic muscle analysis was carried out with the help of practical results which were obtained with a prototype experiment. It was realized that the muscle behaves in a non-linear manner which is the main disadvantage. The system equation is linearised in order to derive the state space model. With this the system would be linearised only within a small range of inputs, where it is impossible to use it as a general model with whole range of inputs. A simulation study has been carried out for the system using Matlab/Simulink environment for various categories of inputs and it is experienced that the system responded to linear input signal, as per anticipated output of the theoretical analysis. Even though the above paradigm is discussed for single pneumatic sub-systems, it is emphasized, that the same approach can effectively be extended without any major conceptual breakthrough to any number of muscles. Depending on the application the pneumatic muscle may require different contraction profiles, where the controlling task of the muscle contraction would be vital. To obtain the desired tracking of the actual performance, Inversion Based Control (IBC) concept has been employed. Simulated results showed the proposed methodology could be effectively applied. Further, investigations need to be carried out to model the complete system with other perturbations and apply the inversion based control concept for precise control of the tip of the arm. iv Acknowledgement I specially thank my supervisor, Dr. Lanka Udawatta for his unwavering guidance, support and advice for carrying out this research work successfully. I am also very appreciative for his extensive help in fulfillment of some publications related to this research work, in some prestigious international forums. I am indebted to my parents for constant support and encouragement for successfully carrying out this work. My gratitude is also due to Prof. H.Y.R. Perera, Head/Electrical Engineering, for the support given with my studies. My sincere thanks to the chairman and the committee members of the SRC grant committee, University of Moratuwa, for the grant provided, which existed as an extensive support in my research studies. Dr. N Munasinghe and his staff, at the Engineering Post Graduate Unit, are also thanked for all assistance extended. I would like to take this opportunity to extend my thanks to Dr. Thrishantha Nanayakkara, Dr. Palitha Dassanayaka and Dr. Sisil Kumarawadu for being the members of the review committee for my research. If not for their guidance and advice this work wouldn't have been a success at the end. I have been assisted extensively by Mr. Pasidu Pallewella , Mr. Gamini Jayasinghe Mr. Geeth Jayendra, in developing the prototypes for the research work which I should greatly appreciate. I would also like to thank Mr. Buddhika Jayasekera, Mr. Dharshana Prasad, Ms. Imali Hettiarachchi and Mr. Chang Jong Baek, who have been my colleagues at the Departmental Research Lab, for helping me in various ways for successfully carrying out this work. Finally, my thanks go to various other personnel without whose help this work wouldn't be a success. Understandably, their individual names cannot be mentioned here due to being large in number. v List of Figures Figure Page Figure 1.1 Braided muscle 5 Figure 1.2 Embedded muscles 6 Figure 1.3 Lifting and lowering masses 6 Figure 1.4 Antagonistic setups 7 Figure 1.5 Muscle configuration in the human arm 8 Figure 1.6 Pneumatic robots 9 Figure 1.7 Pneumatic muscle applications (Drive for a tab punching) 9 Figure 1.8 Pneumatic muscle applications (Emergency stop for rollers) 10 Figure 1.9 Pneumatic muscle applications (Drive for a vibrating Hopper) 10 Figure 1.10 Pneumatic muscle applications (Fatigue failure test bench) 11 Figure 2.1 Pneumatic muscles 14 Figure 2.2 Pressure regulator valve 15 Figure 2.3 Hall effect sensor 16 Figure 2.4 Current control circuit 16 Figure 2.5 Complete hardware assembly 17 Figure 3.1 Solid tube with two end closed rubber end cap 18 Figure 3.2 Pressures vs. Volume 20 Figure 3.3 Forces vs. Contraction 20 Figure 3.4 Spring mass damper system 21 Figure 3.5 Transfer function 22 Figure 3.6 Step response 23 Figure 3.7 Pneumatic muscle system 24 Figure 3.8 Pneumatic muscle states 24 Figure 3.9 Pneumatic muscle in bicep configuration 26 Figure 4.1 Concepts of inverse based tracking 31 Figure 4.2 System transfer.. 31 Figure 4.3 Inverse based control 31 vi Figure Page Figure 5.1 Area Vs. Contraction (No Load) 34 Figure 5.2 Area Vs. Pressure (No Load) 34 Figure 5.3 Area Vs. Contraction (2.5 kg) 35 Figure 5.4 Area Vs. Pressure (2.5 kg) 35 Figure 5.5 Area Vs. Contraction (5 kg) 36 Figure 5.6 Area Vs. Pressure (5 kg) 36 Figure 5.7 Area Vs. Contraction (7.5 kg) 37 Figure 5.8 Area Vs. Pressure (7.5 kg) 37 Figure 5.9 Area Vs. Contraction (10 kg) 38 Figure 5.10 Area Vs. Pressure (10 kg) 38 Figure 5.11 Voltage input to the controller 39 Figure 5.12 Muscle contraction Vs. Time 41 Figure 5.13 Muscle velocity Vs. Time 41 Figure 5.14 Muscle acceleration Vs. Time 42 Figure 5.15 Theoretical and Practical results 43 Figure 6.1 Tracking application with out pole replacement 44 Figure 6.2 Desired output waveform for T=1 Seconds 45 Figure 6.3 Triangular tracking application for T=1 Seconds 45 Figure 6.4 Desired output waveform for T=0.1 Seconds 46 Figure 6.5 Triangular tracking application for T=0.1 Seconds 46 Figure 6.6 Desired output waveform for T=0.1 Seconds (Sinusoidal waveform) 47 Figure 6.7 Tracking application for T=0.1 Seconds (Sinusoidal waveform) 47 Figure 6.8 Desired output waveform for T=1 Seconds (Sinusoidal waveform) 48 Figure 6.9 Tracking application f o r T = l Seconds (Sinusoidal waveform) 48 List of Tables Table Page Table 5.1 Practical results (No Load) 33 Table 5.2 Practical results (2.5 kg) 35 Table 5.3 Practical results (5 kg) 36 Table 5.4 Practical results (7.5 kg) 37 Table 5.5 Practical results (10 kg) 38 Table 5.6 Hall effect sensor output results 39 Table 5.7 Summary of Practical results 43 viii Chapter 1 Introduction 1.1 Robotics actuators In most of robotic applications, the common actuator technology is electrical systems with very limited use of hydraulics or pneumatics. But electrical systems suffer from relatively low power/weight ratio and power/volume ratio. Electromagnetic motors DC motors, AC motors, stepper motors, linear motors, which are widely used in robotics at present fail on the requirements of weight and direct transmission. Weight is the major drawback of electric motors in this application. Electric motors have power to weight ratios in the order of magnitude of 100 W/kg, and their torque to weight ratios range more or less within l-10Nm/kg [1], Mean while hydraulic system suffer from relatively less reliability and expensiveness. Hydraulic actuators have a very good power to weight ratio, 2000W/kg on average and high torques at low speeds, but their energy source can leak due to the high operating pressures, typically 20Mpa [1]. They can be directly connected to the robot joints, however. Compliance is not inherent to this type of actuation but it can be introduced by means of servo valve control. The most common pneumatic actuators are cylinders. These have power to weight ratios of 400W/kg [1], Pneumatic cylinders have been used for many years and are well adapted to simple repetitive tasks requiring only a very limited amount of system control [2]. They have not, however been widely applied in advance robotics due primarily to two interrelated problems, such as difficulty to control accurately and compliance (sponginess). Both of these problems are due to air compressibility. The human arm is not very accurate, but its lightness and joint flexibility due to the human musculature give it a natural capability for working in contact A novel pneumatic artificial muscle actuator has been regarded during the recent decades as an interesting alternative to hydraulic and electric actuators [3]. However, the main failure of pneumatic muscle actuator is non-linear behavior The present research works are highly focused to find out a suitable solution. Most importantly, it needs to be lightweight; especially in autonomous robot because adding weight to the system will create new faults like increasing required strength of supportive frame structure and energy demands. 1 Autonomous machine operation, requiring the energy source to be carried along, is a requirement that has not to be fulfilled in a first instance but its possibility needs to be present. Autonomous machine operation can then be guaranteed in a number of ways, e.g. by using on-board small size internal combustion engines and compressors [4], Now research works used to make robotic actuators to replace human muscle as much as possible. It was successfully progressing up to now. As mentioned above a new trend is to develope pneumatic actuators, which have more ability to replace human muscles. One of the developments was Pneumatic Artificial Muscle (PAM), which has a better power to weight ratio than a cylinder. Basically, this is a contractile device operated by pressurized gas. Its core element, the fluid chamber, is a deformable membrane, which is the reason of its low weight. Most of the existing types of PAMs use elastromeric materials for this and, hence, their deformation is based on material elongation. Power to weight ratios of these kinds of actuator exceeds values of 1 kW/kg [1], The most commonly used type, the McKibben Muscle, shows a moderate capacity of contraction, hysteresis as a result of friction between an outer sleeve and its membrane and threshold behavior. It is therefore difficult to control. Besides this, friction reduces the life span of this actuator. Other types use more or less high tensile stiffness membranes, trapped in netting and bulging through their meshes. Although friction is largely avoided this way, these types are difficult to build. Several research works are going on to meet following properties in order to make the pneumatic Muscles behavior excellent as human one [5]. (1) The membrane material deformation should minimize. (2) Minimum frictional hysteresis. (3) High tensile strength in the longitudinal direction. (4) Uniform membrane loading. (5) Low threshold pressure. (6) High maximum pressure and maximum contraction. From the discussion above, it is clear that material deformation should be avoided. This has been done using membrane rearranging in order to allow for inflation. The principle of rearranging was to have a membrane that in some way unfurls as it is inflated. When such PAMs contract their membrane's surface area do not change contrary to the increasing surface area of deforming membranes. 2 The basic idea of the Pleated Pneumatic Artificial Muscle (PPAM) was to do this by using a cylindrical membrane of a high tensile stiffness and high flexibility and folding it together along its central axis. The PPAM is very strong compared to other design which has a larger stroke and is not bothered by friction related hysteresis'. It is also extremely lightweight; a PPAM of less than 60 grams was seen able to pull 3500 N [5]. In summary, PPAMs have several characteristics that are not inherent to other, more classical drives, and are an improvement over existing PAMs. Therefore, PPAMs are very suitable for range of robotic and automation applications [5] - [7]. For autonomous systems, it is crucial to apply lightweight actuators. For the passive dynamic walker, another requirement is that the actuators should not interface with the passive swinging motion of the legs. The geared motors or fluidic actuators used on most mechanical biped do not satisfy this requirement [8], By using pneumatic actuators, it can be achieved [9], Basically two compliant actuator technologies available out of it, PPAM technology use airflow to control the system. Originally it was developed for bipedal robot, for example LUCY bipedal walking robot uses PPAMs. The LUCY robot, which was made out of an aluminium alloy, all included weighs about 30 kg and is 150 cm tall. The robot has 12 pneumatic actuators to implement 6 degree of freedom [10], Presently, researchers exceed 20 DOF level robot hand with 186 touch sensors and 24 joint sensors, actuated by pneumatically driven Mckibben style muscles [11], It is very hard to control Pneumatic Muscles because of their non-linear and time varying behavior. Also uneven and unpredictable forces and pressure condition makes it highly complex. The limitations of the PAM manipulators have promoted research into a number of control strategies, So far, several advanced control strategies have been utilize to control pneumatic muscles, such as adoptive control method, predictive control method, gain scheduling control method, neural network control method and fuzzy logic based control method [12] [13] [14]. PPAM has gradually become a position to make use it to medical and industrial applications. In medical applications, it is aiming to replace body features with artificial features, which will help to treat patients as well as do the research on serious diseases. On the other hand in industrial application it may vary from simple muscle to complex working robot applications. The advantages of Pneumatic Artificial Muscle can be pointed out as follow. (1) High power to weight ratio. (2) High volume to weight ratio (3) Minimum environmental pollution. (4) High compactness. (5) Simplicity in design. As mentioned above each robotic actuator has relative advantages as well as disadvantages. Some of disadvantages can be listed as follows. (1) Highly nonlinear behavior. (2) Two different dynamic behaviors for inflation and deflation condition. 1.2 Pneumatic artificial muscle Pneumatic Artificial Muscle (PAM) can be defined as contractile and linear motion engine operated by gas pressure. Pneumatic Muscle has lesser weight as well as high power to weight ratio which is around lkW/kg and it can handle more weight. For an example Pleated Pneumatic Artificial Muscle of less than 60 grams was seen able to pull 3500 N [5], Pneumatic Artificial Muscle can only obtain unidirectional linear motion and most of muscles operate better over pressure condition than under pressure condition. The reason for that was it needed higher energy consumption than over pressure Muscle. The characteristics of Pneumatic Artificial Muscle can be listed as follow; o Linear motion, o Unidirectional. o Over pressure operating muscle (Under pressure operating muscle are possible but it need more energy consumption). PAM usually operated at an over pressure generating and supplying compressed gas is easier to accomplish and, with ambient pressure mostly at about 100 kPa, a lot more energy can be conveyed by over pressure than by under pressure. Many kinds of fluid driven muscle like actuators have been developed. They can be distinguished according to their operation such as pneumatic or hydraulic operations, over pressure 4 or under pressure operations and according to their design such as stretching membrane or rearranging membrane type muscles. Few of them were discussed here. 1.2.1 Braided muscles: Braided muscles Consists of Compressed gas tight elastic tube or bladder surrounded by a braided sleeving. Braided pneumatic actuators exhibit non-linear force-length properties grossly similar to a muscle, and have a high strength to weight ratio. These properties make them desirable for legged robot. In addition, braided muscle has a limitation. It can't be used at under pressure conditions [15] [16]. ol When pressurized Figure 1.1 Braided muscle 1.2.2 Netted muscle: The difference between braided and netted muscle is the density of the network surrounding the membrane, a net being a mesh with relatively large holes and a braid being tightly woven. Because of this, if the membrane is of the stretching kind, it will only withstand low pressures. Therefore this type of fluid actuator will usually have a diaphragm of the rearranging kind [15]. 1.2.3 Embedded muscle: The load carrying structure of this type of fluid muscles is embedded in its membrane. Under Pressure Artificial Muscle belongs to this category [15]. 5 (») i;b) (c) Figure 1.2 Embedded muscles 1.3 Simple applications of pneumatic artificial muscle 1.3.1 Lifting and lowering masses Using a single PAM, it can be obtain one degree of freedom actuator that has the ability of lowering and lifting the mass. The Pneumatic Muscle can handle high loads with a high power/weight ratio. To depict the dynamic and static behavior of single muscle system a mathematically derived non-liner equation can be used. The air pressure inside the muscle depends on the amount of air inside the muscle and pressure developed by the muscle will be directly inter-related with force exerted by the muscle[17].PAM could develop required force values by means of controlling the air flow rate accordingly [18]. In order to test out the practical behavior, a pressure sensor, pressure regulating valve, flow regulating valve and a proper interface would be required [19]. Pneumatic Muscle (inflated) Pneumatic Muscle (fully deflated) Figure 1.3 Lifting and lowering masses 6 1.3.2 Antagonistic setups Pneumatic artificial muscle actuators are contractile non-linear device and can consequently, generate motion in only one direction. However, by employing two muscles it can be constructed two degree of freedom actuator [20], In the case of rotary actuators, the angle can be controlled by means of flow and pressure regulation. On the other hand linear actuators can be used to control the movement of an object within the limits of the track. The opposite connection of the muscles to the load is generally referred to as an Antagonistic setup. The antagonistic coupling can be used for either linear or rotational motion, because the generated force of each muscle is proportional to the applied pressure, the equilibrium position of the effecter driven by the antagonistic couple will be determined by the ratio of both muscle gauge pressures. And only the ratio of gauge pressures will determine the equilibrium position [15]. \ \ \ X \ \ \ \ Pneumatic Muscles . Force -er i i l i i IBIlll VR.otat?<3 \ \ \ \ \ Force iMi'liWllM(tMl>Mi s i r Inflated PM M Neutral position kg Deflated PM I \ \ Figure 1.4 Antagonistic Setups 1.3.3 Biceps and triceps configurations By accommodating a single pneumatic muscle, the bicep configuration of the human arm could be modeled. However, the controlling task of Pneumatic muscle is not same as an actual human arm. The muscle configuration of actual human arm will appeared in Figure 1.5. More researches are being carried out to find out much sophisticated solution [13] [21]. Virtually half of the human body weight is made up of the muscular system. Muscles are excitable, contractible organs. In order to perform movement they need to exist in pairs, since they can only generate and transmit tensile forces. As you can see in Figure 1.5, these are biceps and triceps (agonist and antagonist, muscle and counter muscle) [26], Figure 1.5 Muscle configurations in the human arm 8 1.4 Industrial applications of pneumatic artificial muscle By employing the above simple application, it is possible to develop many real world applications, of which some examples are illustrated below. Robotics applications: As shown in Figure 1.6 robot arms could be constructed using pneumatic muscles. Once it is possible to control the compressed air pressure, it is also possible to control the pneumatic robot arm. For high precision applications, the dynamic motion needs to be fine tuned [26]. Figure 1.6 Pneumatic robots Drive for a tab punching: Pneumatic muscle can be used for repetitive upward and downward motion. Therefore it can be used to drive a tab punching machine. P " JPfi i f | Figure 1.7 Pneumatic muscle applications (Drive for a tab punching). Emergency stop for rollers: The sponginess nature of Pneumatic muscles makes the muscle good in absorbing emergency shocks. Therefore pneumatic muscles can be used in emergency stop mechanisms as shown in Figure 1.8. Figure 1.8 Pneumatic muscle applications (Emergency stop for rollers). Drive for a vibratory hopper: To generate vibration there should be some kind of cyclic or repetitive force component attached with the machine. Due to the spring effect of pneumatic muscles, those are well applicable for these kinds of applications. Figure 1.9 Pneumatic muscle applications (Drive for a vibratory hopper). 10 Drive for a fatigue failure testing bench: To test the failure due to fatigue repetitive impact force should be applied to the object. Due to both spring and damping effect of pneumatic muscles those are well applicable for this kind of applications. \ \ \ \ \ > ^ \ \ \ \ \ \ Pneumatic Muscle Cyclic Motion Figure 1.10 Pneumatic muscle applications (Drive for a fatigue failure testing bench) 11 1.5 Research objective For several decades already, industrial robots have proved their value by obtaining high performance in terms of speed, accuracy and reliability. By employing high accurate electric and mechanical actuators robots are built that even have nanometer precision. This state of the art technology is reached by making the construction as ideal as possible. The constructions are very stiff, the behavior is almost perfectly linear and every degree of freedom can be independently controlled. But it has some negative points too. In comparison to pneumatic robot actuators, electrical and mechanical actuators have low power to weight ratio. Moreover, their heavy construction and strength makes interaction with human dangerous. Therefore, the robot should be in lightweight and the force generated should be restricted. As far as human safety and power to weight ratio is concerned, pneumatic muscle would be the best alternative. But the main difficulty is high non-linear behavior of the pneumatic muscle. Due to that it is very hard to think about the controlling function of the pneumatic muscle. This research work is mainly considered about developing and controlling of a pneumatic robot arm. As discussed above there are several industrial applications and all the applications initiate with single pneumatic muscle. By means of analyzing a single pneumatic muscle dynamic behavior, it could give a better view of simple industrial applications. Then the dynamic analysis of the pneumatic muscle will lead to develop the state space model for bicep configuration. More generally inversion technique will be utilized to tackle nonlinear situation like this. The inversion technique has also been applied to a number of output tracking applications such as precision control of flexible manipulators, aircraft control, high precision positioning etc. So finally, the objective is to narrow down to control a pneumatic robot arm by means of an inverse based tracking method. 12 1.6 Dynamic behavior of pneumatic artificial muscle Understanding the dynamics of the pneumatic muscle is necessary to decide preferable controlling task. At initial condition (fully deflated condition) force exerted by pneumatic muscle is equal to zero. And at final condition it is has some value and let's take it as F N. Where the dynamical equation describing the system of figure 3 is as follows [13] [25], Where, F = Force exerted on PM. B(x) = Give force exerted by the viscous friction action. K(x) = Give forces due to spring action. B (x) and K (x) are coefficients defend on whether the PM is being inflated or deflated as follows. At Inflation: F + B{x)x + K(x)x = -Mix (1.1) Bt(x) = 0.04x2 +1.30x + 12.60 K: (x) = 1,6x2 +10.9x + 27.10 (1.2) At Deflation: Bj(x) = 0 .12i 2 + 2 .49 i + 14.48 Kd(x) = 3.6x2 + 20.7x +47.23 (1.3) 13 Chapter 2 Hardware development The following components have been selected for the development of the intended prototype for studying the muscle behavior. The prototype has a pneumatic muscle, pressure regulating valve, hall effect sensor and magnet, compressor and electronic control circuit. Those basic elements are discussed below. 2.1 Pneumatic muscle Fluidic muscle is a tensile actuator which mimics natural muscular movement.. The contraction system is formed by a pressure-tight length of rubber tube, sheathed in high-strength fibers. The fibers create a three-dimensional grid structure. When pressure is applied, the pneumatic muscle expands in its radial direction, thus creating a tensile force and a contraction motion in the muscle 's longitudinal direction. As shown in the figure pneumatic muscle comes in various lengths and diameters. Here the prototype uses a pneumatic muscle with 20 cm length and 1 cm diameter. It can stand up to 400N load and the maximum safety pressure condition will be 6 bars. And it was an over pressure operating muscle. The muscle with above specifications is suitable enough for the research work. fcW1 Figure 2.1 Pneumatic muscles 14 2.2 Pressure regulator valve Figure 2.2 Pressure regulator valve Pressure regulator valve is used to regulate the input pressure to the system. There are two types of pressure regulator valves. The first one will be voltage variant type linear pressure regulator valve and with existing valve it can obtain 0 - 2 or 3 bar pressure variation. The other type is current variant type and it can handle 0 - 8 bars of pressure variation. Compared with the current variation type, the voltage variant type is easy to use. But according to our requirement, which is 0 - - 6 bars pressure variation; it is required to use a current variant type pressure regulator. The pressure regulator valve consists of an integrated inbuilt pressure sensor. The integrated pressure sensor records the pressure at the working air supply. The electronic controller compares the pressure value with the nominal value. An electrical signal is then transmitted proportional to the output pressure. If there is a deviation between nominal and actual values, the regulating valve will be activated until the output pressure is the same as the nominal value. 15 2.3 Hall effect sensor Figure 2.3 Hall effect sensor The hall effect sensor used here is small, versatile and a linear device which is operated by a magnetic field from a permanent magnet or an electromagnet. The linear sourcing output voltage is set by the supply voltage and varies proportionately to the strength of the magnetic field. Using serial communication with the computer the muscle contraction was observed (See Appendix A). The integrated circuitry features low noise output, which makes it unnecessary to use external filtering. It also includes thin film resistors to provide increased temperature stability and accuracy. The hall effect sensor has an operating temperature range of -40°C to 100 °C (See appendix B). 2.4 Current control circuit Figure 2.4 Current control circuit The pressure regulator valve needs 4mA to 20mA current variation. For that purpose the above circuit diagram was developed. With the help of market available electronic circuitry items above circuit was developed to obtain 4mA to 18mA current variation. According to the above circuit diagram, it needs 0 to 5 V input voltage variation. Here a Digital Potentio meter (See Appendix C) and a microcontroller (See Appendix D) are used. The microcontroller was programmed (See Appendix E) according to our requirement then the current variation is observed to 4ma to 18mA approximately. 2.5 Complete hardware assembly. When all the hardware parts assembled, the system will appear as follows. By applying various loads on the platform, muscle pressure, contraction and diameter variation is observed. To measure the muscle contraction in relation Hall Effect sensor output, a linear scale is used. Figure 2.5 Complete hardware assembly 17 Chapter 3 Theoretical development 3.1 Dynamic analysis of pneumatic artificial muscle Before considering the dynamic behavior of an Artificial Pneumatic Muscle it is better to have an analysis on a simple situation such as a pressurized rubber tube, which is enclosed by both ends. Changes of internal pressure of the rubber tube will affect to deform it both axially as well as radially. When the internal pressure of the rubber tube is increased it might have axial contraction or elongation and it is determined by the reinforcement structure and material strength of the rubber tube. The contraction system is formed by a pressure-tight length of rubber tube, sheathed in high-strength fibers. The fibers create a special pattern with a three-dimensional grid structure. Figure 3.1 describes a system which has two rubber end caps placed in the solid tube, connected by means of elastic string which has spring coefficient K. In this case, internal pressure of the solid tube won't affect to change its diameter. Therefore deformation is taking place only in longitudinal direction and the relevant dynamic equation will be as follow. PtEL Initial condition A A PA. Kx P+P Am PA Kx A L+x Intermediate condition PA. PA KXf P+P Ad KXf A L+x, Final condition Figure 3.1 Solid tube with two end closed rubber end cap As shown in Figure 3.1, elastic string elongates x m from its initial condition due to the increase in the pressure of the tube. Original length of the elastic string is L m. 18 LIBRARY UNIVERSITY CF MORATUWA, SF.I LANKA moratuwa At the initial condition elastic string has zero tensile force and it will gradually increase up to Kxf and finally maintain at equilibrium condition. For the equilibrium; PA = Kxf (3.1) A Where A is cross sectional area of the solid tube which is constant. But K may not be a constant and it can be a function of x. If it is a constant then pressure vs. expansion length curve will be a liner curve. But in the case of variable spring coefficient the above curve will not be a linear curve. Let's assume K as a function of expansion length and will behave in a function of K(x) = ax2+bx+c where a, b and c are constants. The above sets of equations are derived for the static condition. If it was considered in a dynamic situation the case would be different. Assume the rubber end cap has a mass M and the effect of the friction force between solid tube and rubber end cap is negligible. For dynamic condition, Unbalance Force = PA - Kx = Mx PA = Kx + Mx (3.2) „ Kx Mx P = + A A Now it is clear that the pressure vs. expansion length curve will not be a linear curve. If the system has a damping effect too, the dynamic equations will become complex than previous cases. The above system can be analyzed with the help of the following theoretical equation too. If it is assumed the energy losses are negligible the energy input to the system should be equal to the energy out put from the system. It means that the work done to the system should be equal to work done by the system. Assume that the system changed its volume by AV due to pressure applied and the system is expanded by AX. Then the following set of equations obtained. As discussed in Figure 3.2 and 3.3 the area under the PV curve and FX curve should be equal. P + P + A P 2 x AV = / F + F + A F 2 _ . . . APxAV _ A V AFxAX P x AV + = F x AX + x AX (3.3) 19 911o3 Pressure (Nrrr2) 6vt Volume (m3) Figure 3.2 Pressure vs. Volume Force (N) 6 F $ Contraction (m) Figure 3.3 Force vs. Contraction Since AV and AP values are small equation 3.3 can be solved as follows, P x AV = F x AX ' A V ^ AX x P V Since the cross section of the solid tube A is a constant, AV A x A X ^ A X " ! , AX , (3.4) = A = Positive Constant 20 In equation 3.4, AV to AX ratio is equal to cross sectional area of the solid tube and it is a positive constant. It means force F will be applied to expand the system. If we consider a more general situation, the above ratio could have a positive value as well as a negative value. In the case of AV to AX ratio is negative the direction of the force has to be changed. It means force is applied to contract the system. According to a previous research work, it has been shown that the Pneumatic Muscle has both a spring and damping effect. To analyze the dynamic behavior of a system of pneumatic muscle arrangement figure 3.4 can be used. When an internal pressure is applied, the pneumatic muscle expands in its radial, thus creating a tensile force and a contraction motion in the muscle's longitudinal direction. The tensile force is at its maximum at the start of the contraction and then decreases in a specific manner as a function of stroke. According to the manufacturer's (FESTO Company Ltd.) technical specification the maximum longitudinal contraction of the muscle will be 25% of the nominal length. The nominal length is 20 cm; that means the maximum contraction will be 5 cm. Initial state Dynamic state Final state Figure 3.4 Spring mass damper system Figure 3.4 shows a spring mass damper system. Where K, B are spring coefficient and damping coefficient respectively and M is the mass attached to the system. As shown in Figure 3.4, the system has three states called initial state, dynamic state and final state. For static analysis, both final and initial states can be used. For dynamic analysis the system both dynamic and initial states can be used. Where F is the external force and it will input to the system and muscle contraction x can be assumed as the out put of the system. Then the system can be analyzed both statically and dynamically as follows. 21 Firstly in the dynamic analysis it may also have many cases. That means it can have constant spring and damping coefficient case as well as variable spring and damping coefficient case. Both spring and damping coefficients have to be realized by means of practical results. Figure 3.5 Transfer function F - Bx - Kx = Mx F = Mx + Bx + Kx Taking LaplaceTransform F ( s ) = M [ S 2 X ( S ) - sX(0) - x ( 0 ) ] + - X ( 0 ) ] + K X ( s ) Assume initial condition set to be zero. ^ ^^ F(s) = MS2X(S) + BsX(s) + KX(s) = +Bs + K X(s) Transfer Function = G(s) = ^ ^ = — F(s) Ms + Bs + K For example, just assume spring coefficient K and damping coefficient B are constant and equal to 27.5 Nra"1, 12.5 Nm"'s respectively. The mass attached to the system assume to be equal to 5 kg. If a unit impulsive, signal input is put to the system the system will behave as follows. 22 Step Response Figure 3.6 Step response If the spring coefficient and damping coefficient are variables, the case will be too different. With the help of above analysis it would be a better approach to determine pneumatic muscle's dynamic behavior. The system described on Figure 3.7, is similar to dynamic behavior of the pneumatic muscle. As shown in Figure 3.7 it has an external force which was considered as an input to the system. The system out put was the muscle contraction. If We consider internal pressure of pneumatic muscle it will be the input and muscle contraction will be the out put. In our system pressure can be varied by means of a pressure regulator valve. By changing the current drawn to the valve, we can obtain various pressure conditions. Since pressure and current have proportional relationship pressure can be varied with high accuracy. Finally we can also consider a current variation as input to the system. 23 w w w w w Initial state Dynamic state Final state Figure 3.7 Pneumatic muscle system. Initial State Dynamic State 1 Dynamic State 2 Final State Figure 3.8 Pneumatic muscle states. Where pressure P, Area A, Volume V, spring coefficient K, Damping coefficient B and muscle contraction x are variables. According to previous research activity it can be assumed that the muscle's spring coefficient is a function of muscle contraction x, and damping coefficient is a function o f x . According to figure 3.8 there are two dynamic states. To develop a mathematical relationship it is necessary to think about the changes of system within a minor period. The system will change from the 1st dynamic state to the 2nd dynamic state with in a very small time duration. With the time other variables also may change and variation can be assumed as shown in the figure 3.8. 24 For dynamic state ; F -Bx-Kx-Mx F = Mx +Bx + Kx Consider 1st Dynamicstate and2" dynamicstate; P, = P + AP A, = A K X, AA V + AV •-X + AX (3.6) L = L0-X X, = L0- Xx AL = L - L = -AX -AV AX xP According to the above set of equations AV to AX ratio should be negative other wise a force applied on the muscle will be in expand direction. 3.2 Mathematical model 3.2.1 Mathematical model for pneumatic muscle For simple lowering and lifting applications the following set of equations can be derived (Using equation 1.1 and 3.4), F = K(x)x + B(x)x + Mx ' dV F = -P dx F = PA — PL (3.7) dA dx Where P is pressure, L is muscle length, A is area, and V is volume at operating condition. In this case to simplify the system equation there should be some relation ship between muscle area A and muscle contraction x, as well as muscle pressure and cross sectional area relationship. The easiest and simplest way to derive those relation ships will be based on practical values. By varying load applied to the muscle a set of results were obtained. According to those results, the following empirical equations could be obtained. Where A is cross sectional Area of the muscle in cm and load condition is in 5kg. 25 A = 0.015 IP2 + 0.165 IP + 0.7041 = - 3 x 10~5x2 + 0.4119x + 0.7608 (3.8) Just assume that Muscle and mass system will be in equilibrium condition when the muscle contraction is 1 cm. In that case muscle pressure was obsered to be equal to 2.0 bar. If we increase the muscle pressure by a small amount it will create an unbalance force F on the mass then the dynamic equation of the system could be obtained. 3.2.2 Mathematical model for pneumatic robot arm. In bicep configuration Muscle inflate x cm from it is initial position as shown above. The muscle will create a force on point Q. point R is a friction less joint. Due to this force mass M rotate around joint R. the PQ length and QR length are equal to 'a' and 'b' as shown in the figure. The whole length of forearm is equal to L. Using cosine P b Figure 3.9 Pneumatic muscle in bicep configuration. law [27], 26 cos(£ - Ad) = (a2 +b2 - (I-Ax)2) lab (3.9) cos(0) = (a2 +b2 -I2) (3.10) 2 ab Axl Atfsin 0 = (3.11) ab ab sin 6 (3.12) By taking moment around pointR, (3.14) 3.3 State space model As discussed in section 3.2.1 and 3.2.2 mathematical equations for the system were developed. In order to develop state space model those non liner equations should linearize, 3.3.1 State space model for pneumatic muscle F = (\ ,6x3 +10.9x2 + 27. lx) + (0.04x3 +1,3x2 + 12.6 x) + 5x F = PA = (°-0 1 5 1 i > 2 + 0-165 LP + 0.704 l ) - ? x 20x 0.4119]x 10 F - 0.15 IP3 + 1.65 IP2 -0 .837P x = 0.0302/'3 + 0.3302P2 - 0.1674P -(o.32x3 + 2.18x2 + 5.42x)-(0.008x3 + 0.26x2 + 2. Then we can define state space variable as follow, state vector x - [Xx X21' , where X,=x X2= x Let the input vector u = [u{ u2 f, where u l - 0 u2=P Let's take A, B, C matrix as follows, A= Gn °12 • B= K ; C = [l 0] d*)\ d-yy bf i Where an =0, au =1 and a2l , a22 will be as follows; 27 a2] = -0.96X* -4.36Xl - 5 . 4 2 a22 = -0.024X22 - 0.52X2 - 2.52 The system is to be made linear around x =1 cm. in that movement pressure will be 2.0 bar, and system should be in equilibrium condition. With those condition muscles was observed as 2.29 cm/S. And where bn = 0, b2l = 0.0906P2 + 0.6604P-0.1674 then it could obtain following state space model. 0 1 0 " ; B = -10.74 -3.84_ 1.52 3.3.2 State space model for pneumatic robot arm Let's take state vectors x = [Xl X2 X3 ]7 , where Xl = x X2=0 X3 =<9 Then the system can be model as follow, ab sin X, I X X2 - X3 MgL sin X2 ML2 ab(0A5\P3 +1.65IP2 -0.837P)sinX2 ( / - X . ) Where / = - y - = 0.5 x 5 x 0.62 = 0.9 kgm2 Let's take A, B, C matrix as follows, ;C = [ 1 0 0] an an °13 V A = U2l a22 a23 ; B = b2l _an a32 °33. K. Where an = 0 , a2l = 0, a22 = 0, a23 = 1 and aI2,a13,a31 ,a32 ,a33 will be as follows; abX, cos X, I ab sin X2 ~ 7 : 0.4038 = 0.039 28 a31 = a&(0.1 5 I P 3 + 1 . 6 5 I P 2 - 0 . 8 3 7 P ) s i n X 2 { i - x x y x o . 9 = 0 .706 a3 2 = -MgZ cos X 2 + a ^ ( 0 . 1 5 1 P 3 + 1.65 I P 2 - 0 . 8 3 7 P ) c o s X 2 (/ - X j ) x 0.9 - 5.72 a3 3 = 0 And where Z>n =0, Z>21 = 0 and Z>3, will be as follows; K = ab{ 0.151 x 3P2 +1.651 x 2P - 0.837) sin X 2 _ 0.34 ( / - X , ) x 0 . 9 Let the input vector U = [m, U2 m3 ] r , where ux =0 u2- 0 m3 = 0.34 The system is to be made linear around x =1 cm. in that movement pressure will be 2.0 bar, and system should be in equilibrium condition. Let's assume our system parameter as; a = 0.04 m, b=0.40 m,7=0.40 m, 1=0.60 m , M=5kg and angle 6»=(4^/9). Then it could obtain following state space model. With those condition muscles velocity can be calculated as 2.29 cm/S. using equation 3.12, lx e=x, =- ab sin 6 • = 58.13rad/s 0 0.4038 0.039" 0 A = 0 0 1 ; B = 0 0.706 5.72 0 0.34 ;C = [ 1 0 0]; D = 0 29 Chapter 4 Proposed solution 4.1 Development of state space model For a simple lowering and lifting application system, equations were obtained and it is observed to be nonlinear. In the next step, the system is lenearised in order to obtain the state space model. Nonlinear dynamic continuous-time systems (CS) can be described by non linear differential equations (or difference equations for discrete- time system (DS)) as x - F(x,u) for CS (4.1) x(t + \) = F(x,u) forDS Where x e S.R" is the state vector and u e 9?m gives the control input vector of the systems. The equilibrium points (x ,u) (or fixed points) of the dynamic system satisfy. £ = {(x,u)e 9T+m| F(x,w) = 0 } for CS £ = {(x,u) e 9T+m |x = F(x,u)} for DS Neglecting higher order terms, we obtain a linearised model around any arbitrary point(x0,w0) e Cas follows; (4.2) x = A0(x-x0) + B0(u-u0) + F(x0,u0) x(t + \) = A0(x-x0) + B0(u-u0) + F(x0,u0) where A0 — {X0,U0), D0 — XQ,U0). ox du (4.3) The dynamics of the nonlinear system are approximated near an arbitrary point(x0,w0) e C. Then, equation (13) can be rewritten in the form: x = A,x + Bnu + dn 0 0 (4.4) x(t +1) = AQX + B0u + d0 Where d0 = F(x0, u0) - AQX0 - B0u0. Note here that an arbitrary point (x0,u0) need not be an equilibrium point (x ,u) .linearized model of the PAM is given below: ; C = [ 1 0 0]; D = 0 0 0.4038 0.039" 0 A = 0 0 1 ; B = 0 0.706 5.72 0 0.34 30 Then the inverse based control technique can be applied directly to the above derived state space model. 4.2 Inverse based control approach Reference state xa Actual state .v U=Ud+K(xd-x) Figure 4.1 Concepts of inverse based tracking. For a given system, the behavior can be described by a mathematical model. According to the mathematical model the system has a specific relationship between its inputs and outputs. Therefore system should have unique output for a given input. The key idea of inverse based tracking is to find out best input in order to realize desired output [28] [29]. Input (U) Actual system • Figure 4.2 System transfer Mathematically, define the inverse model for a given System model Gq as follows: -lr Input = [G0 ] [Desired Output] Desired Output Desired Output [Go]-1 [Go] Figure 4.3 Inverse based control 31 This approach could be used in high precision control application specially for non linear application. 4.3 Applications of inverse based control approach Model based inversion of system dynamics can be used to find inputs that achieve high precision output tracking. This input is referred to as the inverse input. The inversion technique has been applied to a number of output tracking applications. Here it can be listed as follow [30]-[32]. (1) In the precision control of flexible manipulator. (2) In air craft controller application. (3) In high precision positioning application. However the model based inversion approach suffers from two problems. (1) The inverse input will be erroneous if the modeling uncertainty is large and (2) The inverse input will be unacceptable if it violates input energy or bandwidth limitation. 32 Chapter 5 Practical realization 5.1 Practical results The practical results obtained from the model experiment are given in the table 5.1. The internal pressure of the muscle was increased from 0 bar pressure to 6 bar pressure with steps of 1 bar. Then the muscle diameter and the muscle contraction were observed and recorded for different load conditions. For the entire range of load conditions, muscle thickness was assumed to be constant. Here Do and Di are the muscle external and internal diameters respectively. As shown in table 5.1 muscle diameter, muscle contraction and muscle pressure variations were obtained for no load condition. According to practical results the cross sectional area of the muscle was calculated as in the table. Table 5.1 Practical results (No load). No load condition(0 kg) Pressure(bar) Do(cm) Di(cm) Area(cm2) Contraction(cm) 0 1.4 1 0.785 0 1 1.45 1.05 0.865463 0.15 2 1.565 1.165 1.065422 0.6 3 1.735 1.335 1.399047 1.6 4 1.936 1.536 1.852047 2.6 5 2.069 1.669 2.186665 3.4 6 2.124 1.724 2.333158 3.9 As shown in Figure 5.1 Area vs. Contraction curve was plotted for No load condition. Then the trend line of the variation is identified as y = -0.0008x2 + 0.4025x + 0.798. Then Area vs. Pressure curve is also generated and the according trend line was obtained. 33 3 y = - 0 . 0 0 0 8 X 2 + 0 . 4 0 2 5 x + 0 . 7 9 8 2 . 5 0 , , , r 0 1 2 3 4 5 Contraction (cm) Figure 5.1 Area Vs. Contraction (No Load). The Area vs. Contraction curve for no load condition will be as shown in Figure 5.1. The trend line is appeared on the top of the figure and it is much closer to linear variation. Pressure (bar) Figure 5.2 Area Vs. Pressure (No Load). The Area vs. Pressure curve for no load condition will be as shown in Figure 5.2. The trend line is appeared on the top of the figure and it has a non-linear variation. Then the same procedure was followed for each load condition where the results are shown bellow. 34 Table 5.4 Practical results (7.5 kg). 2.5 kg load condition Pressure(bar) Do(cm) Di(cm) Area(cm2) Contraction(cm) 0 1.395 0.995 0.77717 0 1 1.445 1.045 0.85724 0.2 2 1.545 1.145 1.029155 0.6 3 1.755 1.355 1.44128 1.7 4 1.925 1.525 1.825616 2.4 5 2.033 1.633 2.093351 3.2 6 2.108 1.708 2.290052 3.7 Figure 5.3 Area Vs. Contraction (2.5 kg). The Area vs. Contraction curve for 2.5 kg load condition will be as shown in Figure 5.3. The trend line is appeared on the top of the figure and it is much closer to linear variation. Pressure (bar) Figure 5.4 Area Vs. Pressure (2.5 kg). The Area vs. Pressure curve for 2.5 kg load condition will be as shown in Figure 5.4. The trend line is appeared on the top of the figure and it has a non-linear variation. 35 Table 5.4 Practical results (7.5 kg). 5 kg load condition Pressure(bar) D0(cm) Di(cm) Area(cm2) Contraction(cm) 0 1.385 0.985 0.761627 0 1 1.44 1.04 0.849056 0.2 2 1.527 1.127 0.997051 0.6 3 1.705 1.305 1.336875 1.4 4 1.863 1.463 1.68019 2.2 5 1.988 1.588 1.979569 3 6 2.062 1.662 2.168362 3.4 Contraction (cm) Figure 5.5 Area Vs. Contraction (5 kg). The Area vs. Contraction curve for 5 kg load condition will be as shown in Figure 5.5. The trend line is appeared on the top of the figure and it is much closer to linear variation. Pressure (bar) Figure 5.6 Area Vs. Pressure (5 kg). The Area vs. Pressure curve for 2.5 kg load condition will be as shown in Figure 5.4. The trend line is appeared on the top of the figure and it has a non-linear variation. 36 Table 5.4 Practical results (7.5 kg). 7.5 kg load condition Pressure(bar) Do(cm) Di(cm) Area(cm2) Contraction(cm) 0 1.37 0.97 0.738607 0 1 1.423 1.023 0.821525 0.2 2 1.488 1.088 0.929239 0.5 3 1.632 1.232 1.191492 1 4 1.794 1.394 1.52544 1.95 5 1.952 1.552 1.890833 2.8 6 2.063 1.663 2.170972 3.4 2 .5 — 2 - I 1 5 " TO 1 - CD ' < 0 .5 0 Figure 5.7 Area Vs. Contraction (7.5 kg). The Area vs. Contraction curve for 7.5 kg load condition will be as shown in Figure 5.7. The trend line is appeared on the top of the figure and it is much closer to linear variation. 2.5 -j — 2 CM I 1 5 jg 1 < 0 .5 - 0 Figure 5.8 Area Vs. Pressure (7.5 kg). The Area vs. Pressure curve for 2.5 kg load condition will be as shown in Figure 5.4. The trend line is appeared on the top of the figure and it has a non-linear variation. y = 0.0037X + 0.4043X + 0 .7422 Contraction (cm) Pressure (bar) 37 Table 5.4 Practical results (7.5 kg). 10 kg load condition Pressure(bar) D0(cm) Di(cm) Area(cm2) Contraction(cm) 0 1.366 0.966 0.732527 0 1 1.408 1.008 0.79761 0.1 2 1.462 1.062 0.885358 0.3 3 1.592 1.192 1.115378 0.8 4 1.732 1.332 1.392766 1.5 5 1.888 1.488 1.738103 2.3 6 2.007 1.607 2.027222 3 Contraction (cm) Figure 5.9 Area Vs. Contraction (10 kg). The Area vs. Contraction curve for 10 kg load condition will be as shown in Figure 5.9. The trend line is appeared on the top of the figure and it is much closer to linear variation. Pressure (bar) Figure 5.10 Area Vs. Pressure (10 kg). The Area vs. Pressure curve for 2.5 kg load condition will be as shown in Figure 5 . 4 . The trend line is appeared on the top of the figure and it has a non-linear variation. 38 Figure 5.11 Voltage input to the controller. In the muscle control, system there is a proportional pressure regulator valve and it will maintain the proportional relationship between current variation and working pressure condition. If the circuit provides 4 to 20mA current variation, muscle pressure will vary from 1 bar to 6 bars. As discussed in section 1.7.4 by changing input voltage it can have an approximately 0 to 18 mA current variation. The input voltage wave form display as 0 to 4V voltage variation as shown in Figure 5.11. Then the control system generates the following set of data and it is identified that the muscle contraction vs. time curves are somewhat similar to a triangular wave form. Table 5.6 Hall effect sensor output results. Record no. Time(S) Distance(mm) Velocity(mm/S) Acc(mm/SS) 1 0 18.8 0 0 2 1 18.8 0 0 3 2 18.7 0.1 -0.1 4 3 18.11 0.59 -0.49 5 4 17.18 0.93 -0.34 6 5 15.18 2 -1.07 7 6 13.18 2 3.55271 E-15 8 7 9.91 3.27 -1.27 9 8 6.3 3.61 -0.34 10 9 2.88 3.42 0.19 11 10 0.58 2.3 1.12 39 12 11 0 0.58 1.72 13 12 0.48 -0.48 1.06 14 13 0.92 -0.44 -0.04 15 14 0.44 0.48 -0.92 16 15 0.09 0.35 0.13 17 16 0.44 -0.35 0.7 18 17 1.71 -1.27 0.92 19 18 4.05 -2.34 1.07 20 19 7.22 -3.17 0.83 21 20 10.89 -3.67 0.5 22 21 13.03 -2.14 -1.53 23 22 15.72 -2.69 0.55 24 23 17.38 -1.66 -1.03 25 24 18.21 -0.83 -0.83 26 25 18.6 -0.39 -0.44 27 26 18.84 -0.24 -0.15 28 27 18.8 0.04 -0.28 29 28 18.8 0 0.04 30 29 18.89 -0.09 0.09 31 30 18.8 0.09 -0.18 32 31 18.75 0.05 0.04 33 32 18.4 0.35 -0.3 34 33 17.62 0.78 -0.43 35 34 15.96 1.66 -0.88 36 35 14.16 1.8 -0.14 37 36 11.28 2.88 -1.08 38 37 7.96 3.32 -0.44 39 38 4.24 3.72 -0.4 40 39 2 2.24 1.48 41 40 0.19 1.81 0.43 42 41 0.14 0.05 1.76 43 42 0.68 -0.54 0.59 44 43 0.88 -0.2 -0.34 45 44 0.34 0.54 -0.74 46 45 0.19 0.15 0.39 47 46 0.58 -0.39 0.54 48 47 1.71 -1.13 0.74 49 48 3.95 • -2.24 1.11 50 49 7.22 -3.27 1.03 51 50 9.96 -2.74 -0.53 52 51 13.23 -3.27 0.53 53 52 15.91 -2.68 -0.59 54 53 17.28 -1.37 -1.31 55 54 18.21 -0.93 -0.44 56 55 18.7 -0.49 -0.44 57 56 18.75 -0.05 -0.44 58 57 18.8 -0.05 -7.10543E-15 59 58 18.84 -0.04 -0.01 60 59 18.84 0 -0.04 Figure 5.12 Muscle contraction Vs. Time. According to hall effect sensor output results the Muscle contraction Vs. Time curve was shown in Figure 5.12. It is somewhat closer to sinusoidal variation. Figure 5.13 Muscle velocity Vs. Time. According to hall effect sensor output results the Muscle velocity Vs. Time curve was shown in Figure 5.13. It has complex variation. 41 Figure 5.14 Muscle acceleration vs. Time According to hall effect sensor output results the Muscle acceleration Vs. Time curve was shown in Figure 5.14. It is also complex variation. 5.2 Comparison of theoretical and practical situations In order to analyze pneumatic artificial muscle dynamic behavior, a better approach would be based on practical values. To obtain practical results it is required to have some kind of an apparatus. According to the requirement hardware parts were constructed. With the help of a control circuit muscle pressure vs. time curve and muscle contraction vs. time curve were plotted. To have some idea about volume changes it is required to take some results manually. According to previous research work, spring coefficient and damping coefficient will be non linear as discussed in equation 1.2 and 1.3. With the help of practical results it can easily be determined muscle force, in the mean time it can easily determine the muscle force by using equation 1.1. Final result was that both values are some what close and acceptable. There fore it is fair enough to think that the practical values are acceptable. By controlling the muscle in various pressure conditions, muscle diameter and muscle contraction were figured out. The muscle diameter will be the most critical result and it is measured with 0.01 mm accuracy. The result can be represented graphically as follow, 42 5.3 Summary Table 5.7 Summary of Practical results Pressure X L AL Do Di V AV AV/AL Force Force (bar) (cm) (cm) (cm) (cm) (cm) (cm3) (cm3) (cm2) (N) Practic al(N) 0 0 20 0 1.400 1.000 15.70 0 0 0 0 1 0.34 19.66 0.34 1.421 1.021 16.09 0.393 1.1826 10.29 11.8265 2 0.94 19.06 0.6 1.472 1.072 17.20 1.106 1.8445 36.07 36.8898 3 1.83 18.17 0.9 1.622 1.220 21.22 4.026 4.4730 96.15 134.1898 4 2.83 17.17 1 1.770 1.370 25.29 4.067 4.0671 200.6 162.6828 5 3.84 16.17 1 1.931 1.531 29.71 4.415 4.4153 354.2 220.7651 6 4 16 0.17 1.961 1.561 30.57 0.857 5.1343 385.2 308.0593 Figure 5.15 Theoretical and Practical results. According to above results both theoretical and practical values are close and final conclusion is our practical results are compatible. 43 Chapter 6 Results 6.1 Tracking a triangular waveform Firstly it was tried to track a triangular wave form, basically for controlling the position of the tip of the pneumatic arm. Here, the periodic time of the wave form is taken as T=0.01 seconds. The amplitude of the waveform is set to 5 cm. The below figure shows the time response for a triangular tracking application without pole replacement. It can be observed that the steady state error of the output is high. Figure 6.1 Tracking application without pole replacement (Triangular waveform). Secondly, pole replacement is employed with state feedback. Figure 6.3 shows the time response for a triangular tracking application for T=1 seconds with pole replacement. Figure 6.5 shows the time response for a triangular tracking application for T=0.1 seconds. For each condition system has different desired and invert input wave form. Even though the practical wave form observed to be very low frequency according to simulation work it can control the system for high frequency condition also. 44 0.025 0.02 0.015 0.01 £ 0.005 Q. § 0 "O £ S -0.005 o •O -0.01 -0.015 -0.02 -0.025 0 1 2 3 4 5 6 7 8 9 10 time(S) Figure 6.2 Desired Output waveform for T=1 Second. The desired output wave form for one second periodical time was defined as shown in Figure 6.2. It is triangular waveform with 10 second total time duration. 0.03 0.02 0.01 ? I 0 o -0.01 -0 .02 -0.03 0 1 2 3 4 5 6 7 8 9 10 time(S) Figure 6.3 Triangular tracking application for T=1 Seconds. Both desired and achieved waveforms will be shown in Figure 6.3. Here the tracking task was very quick. For small periodical time tracking performance can easily observe. 45 Figure 6.4 Desired output waveform for T=0.1 Second. The desired output wave form for 0.1 second periodical time was defined as shown in Figure 6.4. It is triangular waveform with 1 second total time duration. Figure 6.5 Triangular tracking application for T=0.1 Seconds. Both desired and achieved waveforms will be shown in Figure 6.5. Here the tracking performance can easily observe. 46 6.2 Tracking a sinusoidal wave form Secondly it was tried to track a sinusoidal wave form, basically for controlling the position of the tip of the pneumatic arm. Here, the periodic time of the wave form is taken as T=0.1 seconds. Same procedure was followed as discuss in previous title. 0.03 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 time(S) Figure 6.6 Desired output waveform for T=0.1 Seconds (Sinusoidal waveform). The desired output wave form for 0.1 second periodical time was defined as shown in Figure 6.6. It is waveform with 1 second total time duration. 0.05 0 .04 - 0.03 0.02 o 0.01 - - 0 . 0 1 -0.02 Figure 6.7 Tracking applications for T=0.1 Seconds (Sinusoidal waveform). 47 Both desired and achieved waveforms will be shown in Figure 6.7. Here the tracking task was very quick. By changing periodical time tracking performance were observed as shown in Figure 6.9. 4 5 6 time(S) Figure 6.8 Desired output waveform for T=1 Seconds (Sinusoidal waveform). The desired output wave form for 1 second periodical time was defined as shown in Figure 6.8. It is waveform with 10 seconds total time duration. 0.5 r - 0.4 0.3 0.2 0.1 - 0 . 1 - 0 . 2 desired achiewd 0 1 2 3 4 5 6 7 time(S) 8 9 10 Figure 6.9 Tracking applications for T=1 Seconds (Sinusoidal wave form). 48 Chapter 7 Conclusion and Future directions 7.1 Conclusion The research work presents and demonstrates the controlling and modeling task of the pneumatic robot arm in bicep configuration. By employing a set of pneumatic muscles it can replace the motions of the human arm. For example, by using two muscles in antagonistic configuration it can have rotary motion. In order to consider pneumatic robot arm behavior it is required to analyze single muscle behavior at first. According to previous research work and practical findings it is identified to behave in highly non linear manner. Then with the help of prototype some practical results were obtained and compare with the theoretical values. It is observed that the practical results and theoretical values are some what closer. Therefore it is fair to assume the theoretical approach is correct to a large extent. It is hard to develop all the system equations by means of theoretical point of view and more easier and suitable method could be developed based on the practical point of view. Finally, two empirical equations were derived for muscle pressure and area relationship as well as muscle pressure and contraction relationship. By means of theoretical and empirical equations the mathematical model and state space model for the system were developed. In this study, an inverse based control approach has been successfully applied to control pneumatic muscle contraction. To control muscle contraction it is required to control the muscle pressure. The basic idea behind the inverse based controlling approach is to get desired output, there should be a best input and if it is known in terms of previous knowledge then the system can be controlled as intended. That is, to have the required muscle contraction profile, there should be best fit muscle pressure profile as well. With the help of a prototype, the muscle contraction profile is observed for linear pressure variation and it is some what similar in shape of a triangular wave. Then for the simulation study I tried to track the triangular wave form and it is observed to be successful. Even though, this study has been done for single muscle system, these results can be generalized even for multi muscles systems without a significant conceptual breakthrough. 49 I may have to define a different pressure profile for the secondary and tertiary muscles in relation to the other muscles. The mathematical equations for the system were highly non linear and it is linearized around specific operating point. It means the state space model is valid only for a small range of input. Due to this reason there may be some error. But for very small input variation, it can be assumed that the error is negligible. Finally the muscle contraction profile was tracked by means of an inverse based approach. 7.2 Suggestions for Future directions In this study, the controller was tested onboard a single pneumatic muscle in simple lowering and lifting application but not for a real pneumatic robot arm. In the future studies, the controller needs to be taken up with a real robot arm in order to study the effectiveness of the maneuvers it generates. It is also very important to do the experiments with most of the up to date industrial application to be in par with the usage in the industry today. Some of the application may require robot arm with high degree of freedom. As far as other alternative directions are concerned, an inverse based controller would give a more effective solution due to its inherent characteristics in finding a relevant solution for the problem discussed. To the extent that it concerns autonomous robots weight is a very important issue to be addressed. But the pneumatic muscle has a very high power to weight as well as power to volume ratios. And the other thing is that there are no barriers to obtain human motion by employing pneumatic muscle. Therefore this research work could be extended up to an artificial robot with a closer operation to human arm. All these new research directions will-guide us to find much advanced solutions to the problem of human like robots in the future. 50 References [1] F. Daerden, "Conception and realization of pleated pneumatic artificial muscles and their use as compliant actuation elements," PhD Dissertation, Vrije Universiteit Brussel, July 1999. [2] D. G. Caldwell, G. A. M. Cerda and M. Goodwin "Control of pneumatic muscle actuators," Control Systems Magazine, IEEE Vol. 15, pp.40-48, Feb 1995. [3] T. D. C. Thanh and K. K. Ahn, "Intelligent Phase Plane Switching Control of Pneumatic Artificial Muscle Manipulators with Magneto Rheological Brake," Mechatronics (Mechatronics) ISSN 0957-4158 vol. 16, pp. 85-95, 2006. [4] F. Daerden, D. Lefeber, B. Verrelst and R.V. Ham, "Pleated pneumatic artificial muscles," compliant robotic actuators 2001 IEEE/RSJ International Conference on Intelligent Robots and Systems, Maui, Hawaii October- November 2001, pp. 1958-1963. [5] F. Daerden and D. Lefeber, "The concept and design of pleated pneumatic artificial muscles," International Journal of Fluid Power, 2001. [6] A.V. Gonzales, P. Cinquin, J. Troccaz, A. Guerraz, B. Hennion, F. Pellissier, P. Thorel, F. Courreges, A. Gourdon, G. Poisson, P.Vieyres and P. Caron, "TER: a system for robotic tele-echography,"2002. [7] M. L. Turner, R. P. Findley, W. B. Griffin, M. R. Cutkosky and D. H. Gomez, "Development and Testing of a Tele manipulation System with Arm and Hand Motion," [8] K. Hosoda and T. Takuma, "Ballistic.Control for 2D/3D Pneumatic Actuated Walking Robots," Proceedings of Workshop on Morphology,Control and Passive Dynamics, 2005. [9] M. Wisse and J. V. Frankenhuyzen, "Design and construction of mike; 2d autonomous biped based on passive dynamic walking," International Symposium on Adaptive Motion of Animals and Machines, 3 2003. [10] B. Vanderborght, B. Verrelst, V. R Ham, J. Naudet, J. Vermeulen, D. Lefeber and F. Daerden, "LUCY a Bipedal Walking Robot with Pneumatic Artificial Muscles," IEEE Mechatronics and Robotics 2004, Aachen. Germany, September 2004. 51 [11] H. Ritter, R. Haschke, R. Koiva, F. Rothling and J J . Steil, "A layered control architecture for imitation grasping with a 20-DOF pneumatic anthropomorphic hand," Neuroinformatics Group. Faculty of Technology, University of Bielefeld. [12] X. Chang and J. H. Lilly, "Fuzzy Control for Pneumatic Muscle Tracking via Evolutionary Tuning," Intelligent Automation and Soft Computing, international Journal, Publisher: Autosoft Press, Albuguerque. ISSN: 1079- 8587. [13] J. H. Lilly, "Adaptive Tracking for Pneumatic Muscle Actuators in Bicep and Tricep Configurations," IEEE Transactions on Neural Systems and Rehabilitation Engineering, vol. 11, no.3, September 2003. [14] M. Zeller, K. R. Wallace and K. Schulten., "Biological visuomotor control of a pneumatic robot arm," Intelligent Engineering Systems Through Artificial Neural Networks, American Society of Mechanical Engineers. New York, vol. 5, pp.645-650, 1995. [15] F. Daerden and D. Lefeber, "Pneumatic artificial muscles: actuators for robotics and automation," European Journal of Mechanical and Environmental Engineering, 2002. [16] R. W. Colbrunn, G. M. Nelson and R. D. Quinn, "Modeling of Braided Pneumatic Actuators for Robotic Control," Case Western Reserve University. [17] P. Beyl, B. Vanderborght, R. V. Ham, M.V. Damme, R. Versluys and D. Lefeber "Compliant actuation in New Robotic Applications," Proceedings of the NCTAM06 - 7th National Congress on Theoretical and Applied Mechanics. Belgium, May 29th and 30th 2006. [18] S. Maas, M. Wiering and B. Verhaar, "Reinforcement Learning of a Pneumatic Robot Arm Controller," September 2004. [19] A. Hildebrandt, O. Sawodny, R. Neumann and A. Hartmann, "A Flatness Based Design for Tracking Control of Pneumatic Muscle Actuators," Seventh International Conference on Control, Automation, Robotics And Vision (ICARCV'02), Singapore, Dec 2002. 52 [20] V. M. Damme, F. Daerden and D. Lefeber,"A Pneumatic Manipulator used in Direct Contact with an Operator," Proceedings of the 2005 IEEE International Conference on Robotics and Automation, Barcelona, Spain, April 2005 pp. 4505-4510. [21] M. Zeller, R. Sharma, K. Schulten, "Topology Representing network for sensor based robot motion planning," http://citeseer.ist.psu.edu/zeller96topologv.html, 1996. [22] T. Hesselroth, K. Sarkar, P.P.V. Smagt and K. Schulten, "Neural Network Control of a Pneumatic Robot Arm," IEEE Trans, on Systems, Man and Cybernetics, vol. 24, no. 1, PP- 28-38, January 1994. [23] B. Tondu and P. Lopez, "Modeling and control of Mckibben Artificial Muscle Robot Actuators," IEEE Control Systems Magazine 20(2), pp. 15-38, 2000. [24] K. Hosoda, T. Takuma and M. Ishikawa, "Design and Control of a 3D Biped Robot Actuated by Antagonistic Pairs of Pneumatic Muscles" Proceedings of 3rd International Symposium on Adaptive Motion in Animals and Machines, 2005. [25] P. Carbonell, Z. P. Jiang, and D. Repperger, "Nonlinear Control of a Pneumatic Muscle Actuator: backstepping vs. Sliding-mode," Proc. Of the IEEE International Conference on Control Applications, Mexico, 2001. [26] http://www.arn.org/docs/glicksinan/eyw 040901 .htm. [27] Lanka Udawatta, P.G.S. Priyadarshana and Sanjeeva Witharana, " Control of Pneumatic Artificial Muscle for Bicep Configuration Using IBC" Proc. 3rd International Conference on Information and Automation for sustainability, 4-6 December 2007. [28] S. Devasia, D. chen, and B.paden,"Nonlinear Inversion-based output tracking," IEEE Tran.Automat Contr.,vol.4l,pp.930-942,July 1996. [29] S. Devasia, and Q. Zon,"Preview-Based Optimal Inversion for Output Tracking: Application to Scanning Tunneling Microscopy," IEEE Tran.Automat Contr., vol.12, No 3, May 2004. [30] D. Kwon and W.J.Book, "A time-domain inverse dynamic tracking control of a single-link flexible manipulator," J.Dyanamic Syst. Measurement Control, vol.116, no.2, pp. 193-200, 1994. [31] B.Parden, D.Chen, R.Ledsema, and E. Bayo,"Exponentially stable tracking control for Multi-joint Flexible manipulators," ASME J.Dyanamic Syst. Measurement Control, vol. 115, no.2, pp.53-59, 1993. [32] C.Tomlin, J.Lygeros and S.Sastry, "Output Tracking for nonminimum phase dynamic CTOL aircraft Model," in Proc. IEEE conf. Decision and Control, New Orleans, LA, 1995, pp. 1867-1872. 54 Appendix A Option Explicit Dim i As Long Dim obje As Excel.Application Dim answer As String Dim answerl As String Dim sData As String Dim sLefitl As String Dim sLeft2 As String Dim sLefit3 As String Dim sLeft4 As String Dim sRightl As String Dim sRight2 As String Dim sRight3 As String Dim sRight4 As String Dim sRight5 As String Dim sRight6 As String Dim sRight7 As String Dim sRight8 As String Dim call As Integer Dim cal2 As Integer Dim cal3 As Integer Dim cal4 As Integer Dim cal5 As Integer Dim cal6 As Integer Dim cal7 As Integer Dim cal8 As Integer Private Sub Commandl_Click() If Text2.Text = "" Then Text2.Text = "2" End If Set obje = New Excel.Application obje.Visible = True obje.SheetsInNewWorkbook = 1 obje. Workbooks. Add Form4.Show If MSComml .PortOpen = False Then ' Fire Rx Event Every Two Bytes MSComml.RThreshold = 17 ' When Inputting Data, Input 2 Bytes at a time MSComm 1 .InputLen = 17 ' 2400 Baud, No Parity, 8 Data Bits, 1 Stop Bit MSComm 1.Settings = "9600, N, 8,1" ' Disable DTR MSComml .DTREnable = False ' Open COM1 MSComml .CommPort = Text2.Text MSComml .PortOpen = True 'Timer 1. Enabled = False Else Beep answer = MsgBox("Communication Port is already Open", vbOKCancel, "Warnning !!!") End If Timerl.Enabled = False Timer2.Enabled = True With obje.ActiveSheet .Cells(4, l).Value = "Red No:" .Columns("A:A").HorizontalAlignment = xlCenter .Cells(2, 4).Value = "Record Name" .Cells(2, 4).Font.Bold = True .Cells(2, 5).Value = Textl.Text 56 .Cells(4, 2).Value = "Date" .Cells(4, 4).Value = "Time" .Cells(4, 6).Value = "Distance(mm)" .Cells(4, 8).Value = "Velocity(mm/S)" .Cells(4, 10). Value = "Acceleration(mm/SS)" End With Label3.Caption = Time i = 4 End Sub Private Sub Command2_Click() If MSComml.PortOpen = True Then MSComml.PortOpen = False Else answerl = MsgBox("Communication Port is already Closed", vbOKCancel, "Warnning !!!") End If Timerl.Enabled = False Set obje = Nothing Form4.Hide End End Sub Private Sub MSComml_OnComm() If MSComml.CommEvent = comEvReceive Then sData = MSComml .Input End If End Sub Private Sub Timerl_Timer() 'sData = "A123N345M161H123" Label7.Caption = sData If Left$(sData, 1) = "A" Then 57 Form4.Hide i = i + 1 obje.ActiveSheet.Cells(i, 2).Value = MonthViewl.Value obje.ActiveSheet.Cells(i, 4).Value = Time obje.ActiveSheet.Cells(i, 1).Value = i - 4 sLeftl = Mid$(sData, 2, 4) call = sLeftl cal3 = call - cal2 cal5 = cal3 - cal4 obje.ActiveSheet.Cells(i, On Error Resume Next obje.ActiveSheet.Cells(i, On Error Resume Next obje.ActiveSheet.Cells(i, On Error Resume Next cal2 = call cal4 = cal3 End If End Sub Private Sub Timer2_Timer() If Left$(sData, 1) = "A" Then Form4.Hide Timerl.Enabled = True Timer2.Enabled = False End If 6) .Value = call 8).Value = cal3 10).Value = cal5 End Sub Appendix B — ssBSBtm Solid State Hall-effect Sensors Economical Linear Position Sensor SS49E/SS59ET Series FEATURE!- p VI n a;. re : trL SJc r p Pcifcsr oorsunsUiri e f t mA a iSVUt lh i a t a i t f » St^ls o-irsrl sajr:rfl ot.tojr. » -intarcJ3xit^a'cro.t! design flcxSD 1t>- p JOUi YlK MilXt HtlUiJ c t i M a t e ' « d tor Useftug p "ran f i r reshlors far 4 stasis and accjrabe >.tj)J: » Tarpersxire -ai^e of - A D " C t » 1 K ' 0 [ - 4 C ' = tc p Resoonislo sillier positive or regsl .s jauss. TYPtEAL AFPLIGAT10H4 p ZXirirt senslrg p Wclar so-frol » Fcsltcn sewing p Vaj-F-bc neaclTg p Sctoy en:>jir « F e n r e l s detecla- * Vtaraflor senstrg p JqJd le .e scnilrfl p A'sgtrtMrtng A WARNING PERSONAL INJURY NOT USE l-vese :rc«u:ts- as safer/ cr WiS-gerry slop dtv ces cr r ary clier apoiicsia- Af-ere lal ure of Iht protJ.c: :nJd rsxiitlnpetsctia n.ury H n to comply with 1h»M InctructSoficopuld racuC In death or « e r o j t JotoL % % •"heSB4SEanc SSE3ET Series Econgr'tcal Linear Ha l-e^ecrserscrc-are si-a I versatIt tnsar ha 1-eTfest dsvfcs-s dra: i re aoeralsd t>- Iht rrap;re:: fleld from a psrTajisril T a g > r t « an eie:1rc'ft»g*iet T"w Inter sctirclng cu jx l VS la5* H; -SET: ty the 5jpo VSIAJE ara -A-FCS H prcpa-IAN to r e ssrsrgl- cite Tagnetldea. "he int-sralK CrcUty fsafij-es c * 'Kiss outset, Jtd-ldh ra.«es I: unneDessarjto use KelH-al l te i rs . t also t'x u d s tflr ftmresrairstc pnc.lde Ircreased temperature i ts t l ty and -accuracy. Thsse I rear - a t seniors ha.e y as-aral ng temoeralu-e range cf-^D *0 501X "C MD r F to : - 2 ' F j , a:prcp-teleicr K w i e r c a , :ctKUTemas a srocu:t nsialasa'igild; * Conrplete rstalalsr, axra lcn ardraniina'KSirriomiacanls aro^ced h (tie inslOicBcris. H-pated vritti e K h prodiKL Failure to oomply w t i : t i m IncfruatJGfiG » j d n>t j t r death or CEdou: h l j -v . izd Control 59 Solid State Hall-effect Sensors SS49E/SS59ET Economical Linear Position Sensor Series CPEHATIN3 CHARACTERISTICS [>'. = O V, TA = -W >C TO 36 :C. EXCEPT W - E R E MSTEIy j.c IU H a S-T-V* irnAi TvE e C 2 ! -u M y m CXffc.LT;.nan". |irA,;. Mil IV, ' JjC V| IJC Ivc IVi * SLlV-i Oufc-I Yu t iy i im'«VU| Mil M l Tw "M lite. I V * MU c u - K i x n » Mil 3.2S T * M is 2./S Ouflp.l Vli bi^ M ^Mli 1V 1>-1 Mil IJES 1= (V. - ' Utj 1 * c-ssfc.v, -USKV Utfj^ TM! I ,'UiauaCRI Mil l »K i w ( 1 U K 4 . 1 OUHK.1 R » » L n i f . Su .c i i ; Uhlan 1 : l -YU€ A-itea l i S K i a i 1>IMIM>I 3 lit i If 1 mVtl* a ma 1 Mil 1,6 1V5 1.4 Mai, 1,?S Opaneit; -»: --c is IWI • - :-43 t m JU r: "• i isntAr* k"5i e v f t l Hid Htfl Mil -c Maa C.1U Samt/iff u-r. L A - C N I I -C. l i vat CCS « IS "J Mil -c.c+ » M»J C.1KS •ABSOLUTE MAXMIJMP.ATIN38' s. lv •vn -{'i'V'J.u ; ttfti.IC.imi! IU irA Siii^i t '«!• !C i itm« i: ill: laBr^ ga h i K>AKI«9 FEN LI 6M DVPIUA M. **I fc Irt :rr*_-« rt:MT«i, UM * ndjloi uri irnJtmtctl Llu-iLiaiafeai ar« ivl y.anu-Hwj nl'airatn.tr knAi lateva nuiniHraJtiJ UPNAUNJ CCIFII URA| 1 1 I I V C K I I C U - U « l I * p tfcr/ iMcvenii 'i cix-ih il nivui-ta ir «tuii. ir "41 BLOCK D AGRAM CURRENT SOURCINQ OUTPUT , r 1 «#*# ' 1 iWI 1 ) « il j. I'W TRANSFER CHARACTEMTICS |VS = €.0 VDC| 2 HeodywaL • I and COTJCL 60 Solid State Hall-Effect Sensors SS49E/SS59ET Economical Linear Position Sensor Series S14QE I ERIEJ MO.NTIN3 D VES-SONS nn»Difl|ln> l A i m n etilyj T A ? E i T Y L £ T 2 TAPE STYLE T3 3W8ET SEHIEB MOUNTING DMEKi lQNS ramTlnJ |loi r*«r«nc» TAPE DIMENSIONS I»z*d in b i t * und(Ml la in amy, pmi CIA src> 411, 1 IW j i r h m i l HEEL DIMENSIONS 3 M5n:v-.vsll • 'asisans isd Csntro] 61 Solid State Hal I-effect Sensors Economical Linear Position Sensor SS49E/SS59ET Series CflDE^ GUIDE Csiaktefl Utllrsg Oi»cnpi*=n SiM&fc Sbi-dm-^ c^ i>J vn MI SiHSt-L _ZAito*-J&i vtnkn~ SS4Bt>lZ " m -d-rBMil ««*e in wffi wad a ' v H K i i H1SS\ yh^ iA ssisfcr WARRAMTY'REMECY Hcfir >,-Mjl waTans jooss S Es rna-L'so-re as Berne fr« ct wtel.e TBltrabind'auty warsmarsl-l> Cor tact jcu- cal mIk cflfc; 'cr amity l-ferrn-slar. Ifwarrarr.M seeds a-s RjtumBd tc HonejifcEH du-t-j tft: pcicd of cwerag? htmeswiel wJI repsr a- rssiass -Allicul d-a-j; ttraie I I t lies o r t d - a . T h t fcrvgolna It Euytr't ule nantKly and It In lisj ol zdI cthar wamrt«c. a»pr9«4d or frrpllEtd, Including lfws« DT meratiarrlablitji and Htrvscc 1or a oaiJoular purooK. N O T I C E F-acuzfcs oree-K h tu fc pactej r j {Dlar c bay; m-:;,' noe ba-E p«!fKtT/ sl-a £tfl Isads as a MSJH of nar-a, tiardtnj and sl-ljpl'e cpefiBcflt Plsjcicrasr a tax Eiitaj nj cpiai for agplciUxs-Mft! ir.lci ncqjrerrKnls fx stra gtr It-ads. Saeef caix-s may charge wlhxl tctici TIE Intawatfln Y« suDfl.- Is fcelE.td la :< accurate ard i Istit as at ttife p^ nsnji a* ass.mt na -sstwsiB Ily fB" ts use. All It we xovidt acJicarta- a-sslslarci persa->il y Urajjti y.r I tE-ai.rs aic Ihe hantj'wel Acs s te II Is up ta trte zus-xmcr todEtor-ref-e MJ taailly of xxurt n l-pf a:cl liter. FaT appical CN U S S'JTDS, cj-srl spEsdzaj ens, x rame a? *E rearM Alftsmtzed Chl-ttilx cartari a nEarty/ -SSES a*1se. Or a t VflO>53?-€545 JHA 1-S3>7I7-3i&3 Csnaca 1-€15£sS-6M7 rteTiYiara FAX 1-615-235-8545 JE>, NTERHET •mm . ?/it si I oc rr: -r; r j l1"fo scfljh 0!WJWEL. DC M Fkineywoil >»c.1 L a I D S C c-orrx-L 11 Wirt ttpu^ SiMi xMM ph u: 3.: :t:i •»»« www Jh • rwywel I. corn's enc-rg 62 Appendix C © MICROCHIP MCP41XXX/42XXX TM . Single/Dual Digital Potentiometer with SPI Interface Features • 25S tsps far each D3lenlb-r,e*.ar»e- CMOS is:frc(OBy • 1 wAr-a*l»!um*UFFl> cuiTiT! n sialic cpera/icn • WLIIID e dev ces car te dalsy-chalrec Keener {MDP42XXK cnlji • Shutaear iea?.re apen rircuhs cral resistors tr raslTt-rn Dower sa.inas • Hardware shubScM- pin a^lsae en MCF42XXX cci>' • ainjie iupplj cperascn (2.7V - 5.5VJ • rct-slrlal :en¥erature-anae: -40*C to -125'C Block Diagram i.p—f Corral Lcgl: R2 SHDN 9 S 'Alps' 3egls3e * Hi 1€-Et u 3Hft =!.t3 ^ ler S3 A per Res star ^e j l s t e r V r a > * • P&D Resistor An a> c FV»C «-U=B « - C I P A I +-d PiVI ctertto-nele-P1 Is cnlj svalatle ®n me pja MCP42XXX versfcc Description The MCF41X3CX ara MCPi2XJXJ< deuces are 256- pastlJa-, 3 alia poJenitoroelsrs a»'.iw>e In • C >.u ED i£J and 1DD resistance verstons. The MCP41XXX 5 a slnje-channe devce ana Is efflenee In an 3-plr FC F cr 30IC pa:fcaje.7he MDP4:XXX :cr- larstwa ndependetf channels Ir a i-pin PDF 30C a' TS3QP parage. Te wper position of 1ne MCP41XXX^.2XXX vales I rear))- 3>: s :crtrc«lec .la an rc^ sfty-stsndard SP nter"ace. The cedces £«•- stre <1 pA during Starr oiefalcn. A so^ ware drwn '*ixr; Is prcvlcec lhat cisccnnen: tne W le-mlna l-amreressb-sfcscs and strutaneojsly ctr- nerSs Ins wfcer»tne'B* ten- nal r accillor re dual MCP4ZSODC nas a 2HDN an thai pertPrms 9-e same fjnrttsn Ir na-daare Dj-lnj st*cUcw>r r « t true len- ient: of re *laer register :ar De chanjea and tne paten! cmebsr TEBNU Isom SHLTOOW » re rew .alJS. The »1perIsreiettoine md-scae posBan (SCt-1 upon paraer-tp "he R3 ;r«ei; plr Imaemenls a hardware reset and a so •eturri Ihe *lper la mlc-scale Tne MCP42XXX 3PI rter"ace Inrljdes tcth re 31 ard SO plrs, abwIrcPalsy-cnainlnjc/rmiKplecevces Crau- neHo-trarrel reslslanse ratchfc or re MCP42XXX »are5 ty less lhan 1%. These devices operate her- a slnale 2,7 - 5LSV s<.pp*y ara ai spec flea eve- ine eii^ jerded ana Iroiixlrta terrpera^ .re -anges Package Types PDIPiSOIC cad £ * X L. • PEC • PKVO • PAD PDlP SIUPS • M* .1 ¥l£iUIt3U • —r- ITICKMBjnWMMni m*-» r- ,•• • „•»»» dMMaBt IB J MIS'illMIMrM ithll i as » k £ - - J 1 '8« NJ3 UldhK WMMUflTIr .A ' fc , •fBii*!,!!.; • m - IM> • •MHMt , Wk IM , 3Mb «tb*n*fc - tmpxmm. • ! >. laOOCM * "- it- ' - MM L-A.>,!*.!» • HMElKaK< _••!». * jHMi . imanmMvi • JIUMMMEKW* r -MMKlMMri r MK* iWKjeiWM r lth~ JfH . MMM* sKMS 3KK dHdMd-SE WiJElfiEKJ '-Id VXZ8d9lDfd q xipuaddy Appendix E > Micro c code: / * * Project name: Exploring Muscle Characteristics * Copyright: (c) Sanjeewa Priyadarshana * Description: This code converts the analog signal on RA1 (Hall sensor O/P) and send it to a PC through RS232. Send Commands+Data to the digital potentiometer to change the position of load. * Test configuration: MCU: PIC16F877A Dev.Board: Garkoni PIC Development board Oscillator: XT, 04.0000 MHz Ext. Modules: LCD SW: mikroC v6.0 * NOTES: None. * / //Functions and variable definitions void my_spi(int value); //Define software SPI function #include"built_in.h" //Header file unsigned char ch; unsigned int t; long tlong; int j ; char direction; //Main function void main() { INTCON = 0; // disable all interrupts USART_Init(9600); // Initalize USART (9600 baud rate, 1 stop bit, ... LCD_Init(&PORTD); // initialize (4-bit interface connection) LCD_Cmd(LCD_CURSOR_OFF); // send command to LCD (cursor off) LCDCmd(LCDCLEAR); // send command to LCD (clear LCD) OPTIONREG =0x80 ADCON1 =0x82; TRISA = OxFF; TRISC =0 ; TRISD =0 ; Delay_ms(2000); direction = 0; j = 0; // RB0 pull up settings // configure VDD as Vref, and analog channels // designate porta as input // designate portC as output // designate portD as output // 2 Second delay // Start with rising the muscle // Loop counter while (1) { //Start Analog to Digital Convertion and serial communication t = ADC read(l); // get ADC value from RA1 channel tlong = t * 5000; // use (int) multiplication instead of (long) asm { // and fill the upper two bytes manually MOVF STACK_2,W MOVWF _tlong+2 MOVF STACK_3,W MOVWF _tlong+3 } t = tlong » 10; ch = t / 1000; // prepare value for diplay 66 LCD_Chr( 1,1,48+ch); // write ASCII at 2nd row, 9th column LCD_Chr_CP(7); // display the digit and . on LCD USARTWrite(A'); USART_Write(ch+48); //USA RT_ Write('.'); // Send the starting character A // Send first digit after converting in to ASCII ch = (t /100) % 10; LCD_Chr_CP(48+ch); USART_Write(ch+48); // Calculate the second digit // Display on the LCD // Send second digit to PC in ASCIi format ch = (t / 10) % 10; LC D_C hr_C P(4 8+ch); USART_Write(ch+48); // Calculate the third digit // Display on the LCD // Send third digit to PC in ASCIi format ch = t % 10; // Calculate the forth digit LCD_Chr_CP(48+ch); // Display on the LCD LC D C hr_C P('V'); // Display letter V on the LCD USART_Write(ch+48); // Send forth digit to PC in ASCIi format USART_Write('N'); USART_Write(' 1'); USART_Write('2'); USART_Write('3'); //Other relevant characters required by // by the PC software USARTWrite('M'); USART_Write('4'); USART_Write('5'); USART_Write('6'); USARTWrite('H'); USART_Write('7'); USART_Write('8'); USART_Write('9'); //End of ADC and serial communication // Change the potention meter Delay_ms(50); //Rising Up indirection ==0) { j++; if(j>=200) {direction = 1;} } //Falliong down indirection ==1) { j = j - i ; if(j<=l) {direction = 0;} } my_spi(4608 + j); //Send Command+Data to the Potentioometer via SPI } }/ /- ! //Software SPI void my_spi(int value) { int i; // C4 cs C5 data C3 elk PORTC.F4=l; //output_bit(PIN_C4,l); PORTC.F3=0; //output_bit(PIN_C6,0); for(i=0;i<=15;i++) 68 { PC)RTC.F4=0; //output_bit(PIN_C4,0); if((value & 0bl000000000000000)==32768) (bit_test(value, 15)==1) { PORTC.F5=l; //output_bit(PIN_C5 , 1); Delay_us(2); P0RTC.F3=1; Delay_us(50); PORTC.F3=0; Delay _us(50); } //output_bit(PIN_C6,l); //output_bit(PIN_C6,0); //if if((value & 0bl000000000000000)==0) //if((value //if(bit_test(value, 15)==0) { PC)RTC.F5=0; //output_bit(PIN_C5 ,0); Delay_us(2); PORTC.F3=l; //output_bit(PIN_C6,1); Delay_us(50); PORTC.F3=0; //output_bit(PIN_C6,0); Delay_us(50); } value = value * 2; } PORTC.F4=l; PORTC.F3=0; } //End of the code & 32768)==0) //shift_left(&value,2,0); //output_bit(PIN_C4,1); //output_bit(PIN_C6,0); 69 Appendix F % Tracking problem (Triangular waveform for T=0.1 seconds.) clear all close all %Define the System, and the Inverse A=[ 0 0.4038 0.039 ;0 0 1;0.706 5.72 0]; B=[0;0;0.3 4] ; C=[1 0 0 ] ; D=0 ; pi = -100 + li; p2 = -100 - li; p3 = -5; t = 0:0.01:10; u = 0*t; % K = place(A,B,[pi p2 p3]); B*K; A-B*K xO = [0.01 1.4 0]; %x0 = [0 0]; lsim(A-B*K,B,C,0,u,t,x0); A=A-B*K; B=[0;0;0.3 4 ] ; C=[1 0 0]; D=0; [num,den]=ss2tf(A,B,C,D) ; 70 %zeta = 0.1; %wn = 2*pi*400; %num=[wn*wn]; %den=[l 2*zeta*wn wn*wn'J ; G=tf(num,den); Ginv = 1/G; figure(30); bode(Ginv) %Optimul inverse s c -1 ; % Q=tf([wn*sc],[1,wn*sc]); % R 0.1*1/Q; % Goptinv=(G'*Q)/(R+G'*Q*G) ; % figure(31);elf;bode(Ginv,Goptinv) ; % Ginv=Goptinv; %define the output's (triangle wave's) components h=0.05; % height of triangle freq=10; % frequency of outputs Hz T=0.1; % Time period of output in seconds L=T/2; % half a time period Nterms =5; % no of harmonics A_y =zeros(Nterms ,1); % initialize the amplitudes w_y=zeros (Nterms, 1); %initialize the frequencies % compute the coefficient terms for the output A_y(l) =h/2; w_y(l)=0; for jj=2:Nterms n = j j - 1 ; A_y(n) = (4*h/(piA2))*(1/((2*n-l)A2)) ; w_y(n)=(2*n-l)*pi/L; end 71 % compute the desired output and plot it delt =T/10 0; Nperiods =10; t=0:delt:T*Nperiods ; y=zeros(size(t)); for n=l:Nterms y=y+A_y(n)* cos(w_y(n)* t); end figure(1) plot(t,y) xlabel("time(S)'); ylabel('desired output(m)'); % compute the coefficient terms for the inverse input M_i=zeros(size(A_y)); Phase_i=zeros(size(w_y)); for n=l:Nterms w=w_y(n) ; Ginvw=freqresp(Ginv, w); M_i(n)=abs(Ginvw); Phase_i(n)=angle(Ginvw) ; end % compute the invese input arid plot it inv_ff=zeros(size(t)); for n=l:Nterms inv_ff=inv_ff + A_y(n)*M_i(n)*cos(w_y(n)*t + Phase_i(n)); end figure(2) plot(t,inv_ff) xlabel('time'); ylabel('Inverse Input'); 72 •: Tracking problem. (Triangular waveform for T=1 seconds.) clear all close all %Define the System and the Inverse A=[ 0 0.4038 0.039 ;0 0 1;0.706 5.72 0] ; B=[0;0;0 . 3 4] ; C=[1 0 0]; D=0; pi = -100 + li; p2 = -100 - li; p3 = -5; t = 0:0.01:10; u = 0*t; K = place(A,B,[pi p2 p3]); B*K; A - B * K xO = [0.01 1.4 0]; 1x0 = [0 0]; l s im(A-B*K,B,C,0,u, t ,x0) ; A=A-B*K; B=[0;0;0.34]; C=[1 0 0]; D=0 ; [num,den]=ss2tf(A,B,C,D) ; 74 %zeta = 0.1; %wn = 2*pi*400; %num=[wn*wn]; %den=[l 2*zeta*wn wn*wn]; G=tf(num,den); Ginv = 1/G; figure(30); bode(Ginv) %0ptimul inverse % sc=l; % Q=tf([wn*sc],[1,wn*sc]); % R=0.1*1/Q; % Gopt.inv= (G ' *Q) / (R+G ' *Q*G) ; % figure(31);clf;bode(Ginv,Goptinv); % Ginv=Goptinv; %define the output's (=tringle wave's) components h=0.05; % height of traingle freq=10; % frequency of outputs Hz T=l; % Time period of output in seconds L=T/2; % half a time period Nterms =5; % no of harmonics A_y =zeros(Nterms ,1); % initialize the amplitudes w_y=zeros (Nterms, 1); ^initialize the frequencies % compute the coefficient terms for the output A_y(l) =h/2; w_y(l)=0; for jj=2:Nterms n = j j - i ; A_y(n) = (4*h/(piA2) ) * (1/( (2*n-l) A2) )"'; w_y(n)=(2*n-l)*pi/L; end 75 % compute the desired output and plot it delt =T/100; Nperiods =10; t=0:delt:T*Nperiods; y=zeros(size(t)); for n=l:Nterms y=y+A_y(n)* cos(w_y(n)* t) ; end I figure (1) plot(t,y) xlabel('time(S)'); ylabel('desired output(m)'); % compute the coefficient terms for the inverse input M_i=zeros(size(A_y)); Phase_i=zeros(size(w_y)); for n=l:Nterms w=w_y(n); Ginvw=freqresp(Ginv,w); M_i(n)=abs(Ginvw); Phase_i(n)=angle(Ginvw); end % compute the invese input and plot it inv_ff=zeros(size(t)); for n=l:Nterms inv_ff=inv_ff + A_y (n)*M_i(n)*cos(w_y(n)*t + Phase_i(n)); end figure(2) plot(t,inv_ff) xlabel('time'); ylabel('Inverse Input1); 76 % simulate the response of the system to such an input yachieved=lsim(G,inv_ff, t) ; figure(3) plot(t,y,'g',t,yachieved, ' r ' ) ; legend('desired','achieved') ; xlabel('time(S)') ylabel('output(m)') Tracking problem (Sinusoidal waveform for T=0.1) clear all close all define the System and the Inverse A=[ 0 0.4038 0.039 ;0 0 1/0.706 5.72 0]; B= [ 0;0;0 . 3 4] ; C=[1 0 0]; D=0; r v pi = -100 + li; p2 = -100 - li; p3 = -5; t = 0:0.01:10; u = 0*t; K = place(A,B,[pi p2 p3]); B*K; A-B*K xO = [0.01 1.4 0] ; 1x0 = [0 0] ; lsim (A-B*K, B,C,0,u,t,x0) ; A=A-B*K; B=[0;0;0.34]; C=[l 0 0]; D=0; [num,den]=ss2tf(A,B,C,D) ; 78 %zeta = 0.1; %wn = 2*pi*400; %num=[wn*wn]; %den=[l 2*zeta*wn wn*wn]; G=tf(num,den); Ginv = 1/G; figure(30); bode(Ginv) %Optimul inverse % sc=l; % Q=tf([wn*sc],[1,wn*sc]); % R=0.1*1./Q; % Goptinv=(G'*Q)/(R+G,*Q*G); % figure(31);elf;bode(Ginv,Goptinv); % Ginv=Goptinv; ^define the output's (=tringle wave's) components h=0.05; % height of traingle freq=10; % frequency of outputs Hz T=l/10; % Time period of output in seconds L=T/2; % half a time period Nterms =5; % no of harmonics A_y =zeros(Nterms ,1); % initialize the amplitudes w_y=zeros (Nterms, 1); ^initialize the frequencies % compute the coefficient terms for the output A_y(l) =piA2/3; w_y(l)=0; for jj=2:Nterms n=jj-1; A_y(n) = (4*(-1)An*L/(nA2 *piA2)); w_y(n)=(n)*pi/L; end % compute the desired output and plot it delt =T/100; Nperiods =10; t=0:delt:T*Nperiods; y=zeros(size (t)); for n=l:Nterms y=y+A_y(n)*cos(w_y(n)*t); end figure(1) plot(t,y) xlabel('time (S)') ; ylabel('desired output(m)'); % compute the coefficient terms for the inverse input M_i=zeros(size(A_y)); Phase_i=zeros(size(w_y)); for n=l:Nterms w=w_y(n); Ginvw=freqresp(Ginv,w) ; M_i(n)=abs(Ginvw); Phase_i(n)=angle(Ginvw); end % compute the invese input and plot it inv_ff=zeros(size(t)); for n=l:Nterms inv_ff=inv_ff + A_y(n)*M_i(n)*cos(w_y(n)*t + Phase_i(n)); end figure(2) plot(t,inv_ff) xlabel('time '); ylabel('Inverse Input'); 80 % simulate the response of the system to such an input yachieved=lsim(G,inv_ff,t) ; figure(3) plot(t,y,'g',t,yachieved,'r'); legend('desired','achieved'); xlabel('time(S)') ylabel('output(m)') % Tracking problem (Sinusoidal waveform for T=1 seconds) clear all close all %Define the System and the Inverse A=[ 0 0.4038 0.039 ;0 0 1;0.706 5.72 0]; B = [ 0 ; 0 ; 0 . 3 4 ] ; C=[l 0 0]; D = 0 ; pi = -100 + li; p2 = -100 - li; p3 = -5; t = 0:0.01:10; u = 0*t; xO = [0.01 1.4 0]; %x0 = [0 0]; lsim (A-B*K,B,C,0,u,t,xO); A=A-B*K; B=[0;0;0.3 4 ] ; C=[1 0 0 ] ; D=0; [num,den]=ss2tf(A,B,C,D); : c K = place(A,B, [pi p2 p3]) ; B*K; A-B*K 82 %zeta = 0.1; %wn = 2*pi*400; %num=[wn*wn]; %den=[l 2*zeta*wn wn*wn'J ; G=tf(num,den); Ginv = 1/G; figure(30); bode(Ginv) -s Opt imu 1 inverse s s c -1 ; » Q=tf([wn*sc], [1,wn* s c]); % R=0.1*1/Q; v Goptinv=(G'*Q)/(R+G'*Q*G); figure(31);clf;bode(Ginv,Goptinv); % Ginv=Goptinv; define the output's (=tringle wave's) components h=0.05; % height of traingle freq=10; % frequency of outputs Hz T=l; % Time period of output in seconds L=T/2; % half a time period Nterms =5; % no of harmonics A_y =zeros(Nterms ,1); % initialize the amplitudes w_y=zeros (Nterms, 1); %initialize the frequencies % compute the coefficient terms for the output A_y(l) =piA2/3; w_y(l)=0; for jj=2:Nterms n = j j - 1 ; A_y(n)=(4*(-1)An*L/(nA2 *piA2)); w_y(n)=(n)*pi/L; end % compute the desired output and plot it delt =T/10 0; Nperiods =10; t=0:delt:T*Nperiods; y=zeros (size (t)); for n=l:Nterms y=y+A_y(n)*cos(w_y(n)*t); end figure(1) plot(t,y) xlabel('time(S)'); ylabel('desired output(m)'); -> compute the coefficient terms for the inverse input M_i=zeros(size(A_y)) ; Phase_i=zeros(size(w_y)); i for n=l:Nterms w=w_y(n); Ginvw=freqresp(Ginv,w); M_i(n)=abs(Ginvw); Phase_i(n)=angle(Ginvw); end % compute the invese input and plot it. inv_ff=zeros(size(t)); for n=l:Nterms inv_ff=inv_ff + A_y(n)*M_i(n)*cos(w_y(n)*t + Phase_i(n)); end figure(2) plot(t,inv_ff) xlabel('time'); ylabel('Inverse Input'); 84 % simulate the response of the system to such an input yachieved=lsim(G,inv_ff,t); figure(3) plot(t,y,'g',t,yachieved,' r ') ; legend('desired','achieved'); xlabel('time(S)') ylabel('output(m)')