MATLAB SIMULINK MODEL FOR THE DOUBLE ACTING PNEUMATIC CYLINDER REPORT Presented to Dr. Mitty C. Plummer, Professor in Engineering Technology, University of north Texas in partial fulfillment of the requirements for special problem MSET 5900.703, Spring 2003 By Sunitha Vegerla Denton, Texas May, 2003 ACKNOWLEDGEMENTS I would like to extend my very sincere thanks to my advisor, Dr. Mitty C. Plummer, for introducing me to the area of cryogenic heat engines, for the wealth of knowledge he shared with me, and for the great enthusiasm with which he directed all the time. This work would not have been possible without the continuous help and support from Dr. Igor N. Kudryavtsev in the Matlab design. Finally, I would like to thank Department of Engineering Technology, UNT for the computer support. 1 Contents Objective Introduction Pneumatic Systems The double acting Pneumatic Cylinder Significance of Parameters used in the Mathematical Model Step1: During First Cycle - Filling o Physical Assumptions o Parameters used for Calculations Step2: During Second Cycle – Expansion o Physical Assumptions o Parameters used for Calculations Mathematical Model of Piston Dynamics Matlab - Simulink Design References 2 Objective Develop a Matlab-Simulink model of the proposed dual expansion engine for the next liquid nitrogen automobile. Introduction Pneumatic Systems The pneumatics is termed as compressible fluid mechanics since it deals with the use of compressed or pressurized gas as a source of power. Pneumatics differs from the theory of aerodynamics in the same way that mechanics of materials differs from the theory of elasticitythat is, pneumatics is concerned with the macroscopic point of view. From this point of view a volume containing gas is characterized by single values of pressure and temperature which are presumed constant throughout the volume1. A basic result of the compressibility is the in a fixed volume of gas either temperature of mass (or both) must change before pressure changes. Therefore, when a pneumatic volume under a spring loaded piston has been vented, opening a valve does not move the piston immediately. Rather, sufficient gas must flow into the volume to increase the pressure until the force overcomes the spring preload. Another result of compressibility is the energy storage capacity of gases. It is the capacity that has placed much pneumatic equipment on board space vehicles of all types, where energy storage is vital, as is package size and weight. To increases the load on a pneumatic actuator (motor) either gas must be added to the volume or the motor must stroke, decreasing the volume of the enclosed mass of gas. This means the load changes are difficult to absorb by means of a piston held in place by gas pressure. 3 The major application of pneumatics is in the area of cryogenic tank pressurization, in which the use of pneumatics in low-temperature environments is highly favored by the very low temperatures. 2 The double acting pneumatic cylinder Figure (1) Direction of movement of piston is considered to be one directional, i.e., from left to right as shown in the figure (1). The working and exhaust cavities are denoted as 1st cavity and 2nd cavity respectively including all the indexes associated with them. The points A, B, C, and D are piston position detectors that control opening and closing of electromagnetic valves at the manifolds. The sequence of operation is shown in table 1 below. 4 TABLE 1 Pm1 Pm1′ Pm2′ Pm2 A 0 X X 0 B X X X 0 C X X X 0 D X X X X Where Pm1′ is the inlet manifold for the 1-st cavity Pm1 is the -----------------------Pm2′ is the exhaust manifold for the 2-nd cavity Pm2 is the ---------------------------S1 and S2 are the squares of the piston ts is the width of the piston, D is the diameter of the cylinder, Dd1 and Dd2 are the diameters of the rod (from left and right sides accordingly), xA, xB, xC and xD are the correspondent distances for the piston position measured from zero, F is the force of load (constant for the first approximation), x is the position of the piston (variable, dependent on time), and dx/dt is the velocity of piston motion during operation. In the first cycle (step1), the inlet valve is open for the gas to enter into the working cavity. In the second cycle (step2), the inlet valve is closed for the gas to expand in the working region. 5 Significance of Parameters used in the Mathematical Model x – Coordinate of the piston (m) v – Velocity of the piston (m/sec) t – Time of operation (sec) M – Mass of piston (kg) FL – Load force (N) FFR – Frictional force (N) S – Cross-sectional area of the piston (m2) Sv – Cross-sectional area of the input valve (m2) vg - Velocity of gas entering the cylinder (m/sec) P1 – Pressure in working cavity (Pa) V1 – Volume of gas in working cavity (m3) m1 – Mass of gas in working cavity (kg) ρ1 – Density of gas in working cavity (kg/m3) T1 – Temperature in working cavity (K) P2 – Pressure in exhaust cavity (Pa) Pm – Pressure of gas in the intake manifold (Pa) Variables are indicated with blue color. 6 First Cycle (Step 1) The inlet valve is open and hence the pressure is taken as the atmospheric pressure. The following assumptions are considered on the basis of ideal gas behavior. Physical Assumptions Consider the ideal gas as a working fluid, which possesses constant temperature T1 during the working cycle. We assume constant pressure at the manifold Pm and exhaust cavity P2 for the first approximation. Parameters for Calculations Length of the cylinder L= 0.3 m Density of Nitrogen gas at n.c. ρ0 = 1.2506 kg/m3 Cross-sectional area of the piston S = 3.5256∙10-3 m2 (diameter 0.067 m) Cross-sectional area of the intake valve Sv = 3.1416∙10-4 m2 (diameter 0.02 m) Mass of piston with all moving parts M = 2 kg Load force FL = 400 N Frictional force FFR = 10 N Gas constant3 (for nitrogen) R = 296.8 J/(kg∙K) Pressure of gas in the intake manifold Pm = 0.5 MPa Temperature of gas in working cavity T1 = 295 K Pressure of gas in exhaust cavity P2 = 0.101325 MPa Position of piston detector location A XA= 0.01 m Position of piston detector location B XB = 0.02 m Position of piston detector location C XC = 0.28 m Position of piston detector location D XD = 0.29 m 7 Mathematical Model of Piston Dynamics The change in position of the piston with respect to time depends on the mass of the piston (M), load force (FL), frictional forces (FFR), pressure in the working cavity (P1), and on the pressure in the exhaust cavity (P2). This can be represented with the equation (1) as following: d 2x M 2 ( P1 P 2) S ( FL FFR ) dt (1) Applying Ideal gas law for the working cavity results in equation (2) P1V1 m1RT1 , (2) where R is a gas constant. The change in mass of gas with respect to time in working cavity depends on the density of the gas, 1 , velocity of the gas, vg , and cross sectional area of the valve in the working cavity, Sv ; which can be represented using equation (3) dm1 1v g Sv . dt (3) Bernoulli’s equation 3 for gas flow through the input valve is represented using equation (4) ( Pm P1 ) 1v g 2 2 . (4) The volume of the gas in the working cavity is calculated from the piston position and cross sectional area of the piston, which is shown in equation V1 x S . From equation (4), the velocity of gas can be written as, vg 2( Pm P1 ) 1 . (5) 8 Substituting the formula for velocity, vg in equation (4) results dm1/dt as, 2( Pm P1 ) dm1 , 1Sv dt 1 (6) dm1 Sv 2 1 ( Pm P1 ) . dt (7) or From the equation (2) one can obtain m1 P1V1 R T1 or 1 P1 . R T1 (8) Substituting the given formulas for m1 and 1 in equation (7), one can obtain d P1V1 P Sv 2 1 ( Pm P1 ) . dt RT1 R T1 (9) Substituting the equation for V1 results in, d P1 xS P S v 2 1 ( Pm P1 ) . dt RT1 R T1 (10) Taking out the constants S, R, and T1 from the derivative results in, S d ( P1 x) v 2 RT1P1 ( Pm P1 ) . dt S Using product rule of the differentiation, above equation is further simplified as; x dP1 dx S v P1 dt dt S 2 RT1 P1 ( Pm P1 ) . (11) Hence dP1/dt can be written as; dP1 1 S v { dt x S 2RT1 P1 ( Pm P1 ) P1 dx }. dt 9 As a result, we have a system of two differential equations d 2 x 1 [( P P2 ) S FL FFR ], dt 2 M 1 dP1 1 { S v 2 RT P ( P P ) P dx 1 1 m 1 1 dt x S dt (12) In order to solve the equations (12) numerically it is necessary to add the initial coordinate, velocity of piston as well as initial pressure in the working cavity: x (0)=0.01 m, v (0) = 0, P1 (0)=0.2 MPa. Second Cycle (Step2) Second cycle is the expansion cycle, in which both the inlet and exhaust valves are closed, leaving the conditions in close approximation to polytropic expansion. Physical Assumptions In reality, the compressor conditions are neither purely isothermal nor isentropic but somewhere in between. This is accounted for calculating the compression work by using the isentropic equation with n, where n (1< n <1.4) is the polytropic constant. Parameters for Calculations Pressure of gas in the intake manifold Pm = 0.5 MPa Pressure of gas in exhaust cavity P2 = 0.101325 Mpa As the name indicates temperature is constant. For an ideal gas under adiabatic frictionless (isentropic) conditions, specific heat ratio, k, is approximately 1.4 for diatomic gases (O2, N2. Etc.) 10 Mathematical Equations for the Expansion Cycle Polytropic Expansion is given by the following relationship P1V1n P1BV1nB Const (1) General Expressions for the Double Acting Pneumatic Cylinder The following are the set of equations based on the position of piston. 0, x xA d 2x 1 [( P1 P2 ) S FL FFR ], xA x xD dt 2 M 0, x xD dP1 1 S v [ dt x S P1 P1B ( 2RT1 P1 ( Pm P1 ) P1 dx ], x xB dt xB n ) , x xB x References: 1. Blaine W. Anderson, “The Analysis and Design of Pneumatic Systems”, John Wiley & Sons, Inc. 1967, page No. 1-16. 2. Ron Darby, “Chemical Engineering Fluid Dynamics”, Marcel Dekker, Inc. 1996, page. No. 106. 3. David R. Lide, “Handbook of Chemistry and Physics”, 71st Edition, 1990-1991, The Chemical Rubber Co. Page 1-1. 4. Simulink Dynamic System Simulation for Matlab, Using Simulink Version 4, Mathworks, 1990-2000. 5. Sample results 11