1 / 46

CoCoViLa

CoCoViLa. Compiler C ompiler of V isual L anguages. Mait Harf. Institute of Cybernetics, TUT. mait@cs.ioc.ee. CoCoViLa programming environment. CoCoViLa is platform independent Java based graphical programming environment.

vito
Download Presentation

CoCoViLa

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CoCoViLa Compiler Compiler of Visual Languages Mait Harf Institute of Cybernetics, TUT mait@cs.ioc.ee

  2. CoCoViLa programming environment • CoCoViLa is platform independent Java based graphical programming environment. • CoCoViLa ( Compiler Compiler of Visual Languages) provides a framework for developing • visual specification languages. • Implemented in the Institute of Cybernetics at Tallinn University of Technology. • http://www.cs.ioc.ee/cocovila • Main features: • declarative object-oriented programming • visual programming • automatic program synthesisbasedon proof search in intuitionistic propositional logic. • platform independent • requires at least Java Runtime Environment 1.6. • CoCoViLa includes: • class editor for composing classes • scheme editor for composing schemes • synthesizer for automatic generation of Java programs from the scheme and the class specifications

  3. Motivation • Simplify using computer for domain area experts. • Create visual languages for formal describing models in different problem areas • Create a tool for problem area experts for solving problems in their problem areas. • Automate computing processes

  4. Technology of visual programming The first steps described in the figure are taken by the developer of the language who is responsible for writing the necessary Java classes, specifications and visual extensions. The language developer must understand the problem domain. The language user need not be a software expert, but can work on the level of visual programming, arranging and connecting objects to create a scheme. After a scheme has been built by the language user, the remaining steps: parsing, translating, planning and compiling are automatically taken by the computer.

  5. Visuality and object orientation • Classes as types of components • Class • components • relations (methods) • constants • Visual class • class • image • icon • Schemes (models) ascouples of objects • objects • links between objects

  6. Automatic program synthesis Automatic synthesis of programs is a technique for the automatic construction of programs from the knowledge available in specifications of classes. Having a specification of a class, we are, in general, interested in solving the following problem: find an algorithm for computing the values of components y1, ..., yn from the values of components x1, ..., xm. The automatic synthesis of programs, is based on proof search in intuitionistic propositional logic. Specification Description of problem area (model, scheme) Known values x1, ..., xm (constants, initial values of components) Unknown values y1, ..., yn (components to be computed) Computing tasks Compute required components values Compute all the components values that can be computed Computing algorithm is synthesized automatically

  7. Creating a new package Creating visual class Defining ports Defining visible components Defining click area

  8. Class specification in Java

  9. Composing scheme and computing Load package Create elements Link elements via ports Input initial values Draw specification (scheme) Synthesize computing program ( Compute All) Perform calculations Propagate values

  10. Specification Program Result

  11. Specification language 1) Declaration of variables type id,id,...; The type is a primitive type, a class, or a metaclass. Examples: int i,step; Boiler b; 2) Binding a = b; Binding is an equality, where a, b are variables. 3) Equation Example: x = 2* y*sin(alpha); 3) Axiom precondition -> variable{name-of-method} Example:x,y -> z{P} This axiom specifies that a method P can be used for calculating z int P(int a, int b) {…} 4) Alias alias name = (list of names); Examples: alias state = (*.state); alias in = (x1, x2);

  12. Logic chains Classes: • And • Or • Gener • Delay • Not

  13. Dif Classes: • Adder • Invertor • Integrator • Multiplier • Graph • Clock

  14. Modeling and simulation systems for fluid power systems developed inCoCoViLa environment Hydraulic elements (tubes, resistors, volume elasticities, interface elements)and hydraulic circuits Electro-hydraulic load-sensing systems Electro-hydraulic servo-valves and servo-systems Library has been developed containing more than 100 CoCoViLa visual classes implementing multi-pole models of different components.

  15. Hydraulic piston in cylinder withthree pairs of variables: p1, Q1; p2, Q2; x (or v), F, where p1, p2 pressures in the cylinderchambers, Q1, Q2 volume flow rates in cylinderchambers, x, v positionand velocity of the piston rod, F force on the piston rod. Multi-pole models Multi-pole models enable to represent complex chain systems Four forms (causalities) of six-pole modelsfor a hydraulic piston in cylinder

  16. Functional scheme and multi-pole model of an electro-hydraulic load-sensing system Feeding circuit of hydraulic motor: • Tube1, Tube2 - Tubes • RIDW - Pressure compensator • RVW - Measuring valve • CV - Check valvel • RSKZ - Meter-in throttle edge of directional valve •Res3, Tube3; Res4, Tube4 - Silencers Hydraulic motor MH Outlet circuit of the hydraulic motor: • RSKA - Meter-out throttle edge of directional valve • CJhM - Clutch Pump with controller: • PV - Variable displacement axial-piston pump • ME - Elektric motor • CJh - Clutch • VP - Control valve • RVP, RVT - Throttle edges of the controlvalve • Res1, Res2, Res5, Res6 - Resistors • ZV - Positioning cylinder

  17. Pump control deviceValve block Components : • Spool valve • Spool valve inflow slot • Spool valve outflow slot • Constant resistor • Positioning cylinder • Swash plate with spring Throttle edges : • Measuring throttle edge Rvw • Pressure compensator throttle edge Ridw • Meter-in throttle edge Rsk-zu • Meter-out throttle edge Rsk-r

  18. ZV - Positioning cylinder with pump swash plate Static displacement of the swash plate spring x = f0 - Fc / c where Fc = A*p1/krp - F – Ff; A = P *D²/ 4; Ff = Ff0 + kf *p1 Difference of the swash plate velocity in the spot of spring dv = delta*(Fc - (f0 - x)*c - (Ff0 + kf*p1)*signum(v) - h*v)/m Difference of the swash plate displacement in the spot of spring dx = - delta*v Displacement angle of the swash plate al = atan(x/rz) Volumetric flow to the positioning cylinder Q1 = A*v Parameters:f0 = 0.0265 m, c = 20874 N/m, D = 0.018 m, Ff0 = 0.5 N, kf = 5E-6 m², krp =0.833, rz = 0.065 m, almax = 0.3264 rad, m = 0.5 kg, h = 10 N/(m/s).

  19. 5.3.3 RVP – Meter-in throttle edge of the control valve RVP – Meter-in throttle edge of the control valve Output pressure p2c = p1 - Q2² * TR * rho / 2, where TR = 1 / (al*Ad1)² + 1 / (al*Ad2)² longitudinal area of two slots: Ad1 = (5e-08 + (lmax * R - amax * (R - hmax))) +2 * (yS - hmax) * (amax + d) / 2 across area of two slots: Ad2 = 5e-08 + 2*d*g lmax = R *(180 - 2 * beta) * 2 * Pi / 360 hmax = R * (1 - cos ((90 - beta) * 2 * Pi / 360)) amax = 2 * sqrt (2 * hmax * R - hmax * hmax) yS = y + l0 d = amax + 2 * (yS - hmax) * tan(beta * 2 * Pi/360) Scheme of the valve slot Output volumetric flow Q1 = Q2 Parameters:D = 0.008 m,al = 0.81,R = 1.1E-4 m, beta = 0.3º, l0 = 5.6E-4 m, g = 0.001 m.

  20. Description of positioning cylinder ZV in CoCoViLa

  21. Computing process organization Simulation process is organized by class “process”.State variables are introduced for every functional element to characterize the features of the element at each simulation step. Simulation process starts from initial state (initstate) and includes calculation of next state (nextstate) from previous states (usually from prevstate and state). As a result of simulationfinal state (finalstate) is computed. For computing variables in case of loop dependencies iterations have been used. When starting the process, approximate values of such variables have been given as initials. For example in the model a loop dependence TM.th1 -> NF.th1 -> NF.Thd -> TM.Thd -> TM.th1 takes place. All the loop dependences can be solved if variables TM.th1, TM.x1, SP.th2, SP.v are split and calculated using built-in iteration method. State variables and split variables must be described in component models. When building a particular simulation task model and performing simulations state variables and split variables are handled and used automatically.

  22. Processes in mechatronic systems Processes inmechatronic systems: Static– caused by static inputs Steady-state– caused by steady-state inputs Dynamic – caused by inputs depending on time (disturbances) Main disturbances of dynamic responses: theoretical practical Disturbances cause transient responses or continuous oscillations. Step Impulse Sine curve

  23. Simulating steady-state conditions Simulating components Multi-pole models: RSKA – meter-out throttle edge of a hydraulic motor static Source – range of values for volumetric flow Q1 and for position angle ofthe pump swash platey const Source– constantpressure p2in pump outlet static Process – simulation manager Output pressure p1e, Pa Output flow Q2, m3/s Simulation task of meter-out throttle edge of a hydraulic motor Displacement of the control valve, m Simulated graphs

  24. Simulating a subsystem Multi-pole models: static Process - simulation manager VP – control valve RVP - meter-in throttle edge of the control valve IEH1-3 - hydraulic interface element RVT - meter-out throttle edge of the control valve ZV - positioning cylinder with swash plate ResY - hydraulic resistor static Source - input values constant Source - constant input Simulation task of a hydraulic-mechanical controller 1 Pump control pressure, Pa 2 Swash plate position angel, rad Intervals of changing: Control valve displacement: 0…0.0028 m Pump control pressure: (3.3…19) E5Pa Displacement angle of thepump swashplate: 0.3264…0 rad Displacement of control valve, m

  25. Simulating steady-state conditions of a load-sensing system Load moment of the hydraulic motor, Nm Pump volumetric flow, m3/s Pump outlet pressure, Pa Pump efficiency coefficient Load-sensing system efficiency coefficient 3D simulation of steady-state conditions Calculated 1000 x 1000 points Calculation time 119 s

  26. Multi-pole models:VP – Displacement of the pump control valve; RVP – Meter-in throttle edge of the pump control valve; IEH – Hydraulic interface elements; RVT – Meter-out throttle edge of the pump control valve; ResG,ResH, ResY – Hydraulic resistors; ZV – Positioning cylinder with swash plate; PV – Variable displacement pump; ME – Electric motor; CJh – Clutch with rotor of the pump; RIDVWlin – Measuring valve with pressure compensator; TubeH – Tubes; Tubeg – Tubes with closed end; RSKZ – Check valve and meter-in throttle edge of the hydraulic motor; MH – Hydraulic motor; RSKA – Meter-out throttle edge of the hydraulic motor; CJhM – Clutch with rotor of the hydraulic motor and drive mechanism. Inputs: dynamic Source – Values of the hydraulic motor load moment M and the directional valve displacement y; constant Source – Constant values. Simulating dynamics of a load-sensing system Inputs: dynamic Sourcey: mean = 0.0045 m, step = - 0.0015 m dynamic SourceM2: mean = 65 Nm, step = 20 Nm constant Source: RVP: p1 = 6E6 Pa, RVT, ResY, TubeH: p2 = 2E4 Pa Simulating conditions: tau = 1/delta = 1E6 1/s timesteps = 1.3E4 Simulation task of dynamics of the load-sensing system

  27. Results of simulation of a load-sensing system dynamics Time, s Time, s 1 Pump control pressure, Pa 2 Position angle of the pump swash plate, rad 3 Displacement of the pump control valve, m 1 Angle velocity of the drive mechnism, rad/s 2 Pressure at the hydraulic motor outlet, Pa • Conditions: • Both a step change +10 Nm to the load moment • of the drive mechanism 65 Nm and step change • 0.0015 m to the displacement of the directional • valve 0.0045 m were applied simultaneously • (during 0.01 s). • Time 1.3 s, timestep10 μs. • Results have been calculated for 130 000 points. • Observations: • Dynamic responses damp in 1.3 s. • Natural frequences are about 5 Hz. • Pressure at the outlet of the hydraulic motor • carries frequency ~40Hz because no • hydraulic silencer is used at the outlet tube Time, s 1 Angle velocity of the pump, rad/s 2 Volumetric flow of the pump, m3/s 3 Outlet pressure of the pump, Pa

  28. Electro-hydraulic servo-system Simulation task of servo system dynamics Feeding system Safety valve Servo-drive Servo-valve

  29. Conditions: step disturbance 3 V of input voltage U during 0.01 s and step disturbance 8E4 N of load force F during 0.01 s Time, s 1 Displacement of sliding spool, m 2 Displacement of flapper, m Time, s 1 Actuator position, m 2 Actuator velocity, m/s 3 Step disturbance of the input voltage, V 4Step disturbance of the load force, N 1 Sliding spool moves rapidly from zero to 6.7E-5 m during 0.03 s. After 0.18 s the sliding spool moves to final position 3E-5 m. 2 Flapper jumps out to 7.5E-7 m and then moves to the positionzero at time 0.3 s. 1 Actuator moves almost linearly from 0 to 0.03 m in time interval 0…0.27 s. Precise analysis shows that lack155 μm of desired actuator position 0.03 m takes place at time moment 0.30 s. 2 Actuator velocity oscillates with high frequency 900 Hz until the time moment 0.03 s, then increases to maximum 9E-2 m/s, thereafter decreases to zero at time moment 0.30 s. 3Step disturbance of the input voltage is 3 V. 4Step disturbance of the load force is 8E4 N.

  30. 1 Feeding volumetric flow, m3/s 2 Feeding pressure, Pa 3 Displacement of safety valve, m 1 Pressure in left chamber, Pa 2 Pressure in right chamber, Pa Time, s Time, s 1 Feeding volumetric flow achieves the maximum value 6.2E-4 m3/s. After 0.18 s the feeding volumetric flow decreases to 5E-6 m3/s at time moment 0.3 s. 2 At the beginning the feeding pressure decreases to 15.6E6 Pa during the time 0.06 s. Then the feeding pressure increases to 21.7E6 Pa, after which damps at 21.5E6 Pa. 3Safety valve reacts to changes of pressure. • 1 Pressure in left chamber of the hydraulic cylinder rapidly increases from 10.5E6 Pa to 17.1E6 Pa. Pressure stabilizes at 17.6E6 Pa. • Pressure in right chamber of the hydraulic cylinder rapidly decreases from 10.5E6 Pa to 4.8E6 Pa. Thereafter the pressure stabilizes at 5.4E6 Pa. • Difference of pressures remains constant 12.2E6 Pa from the time moment the load force reaches the value of step disturbance 8E4 N.

  31. Sizes and complexities Load-sensing system Servo-system Model: Number of components 26 (+4+11) 37 (+4+13) Iterated variables 17 20 Simulation task of dynamics: Java code lines 5113 8920 Time step 1E-5 s1E-6 s Number of simulation steps 130 000 700 000 Simulation time (3.2 GHz processor )7 min 31 min • Difficulties: • Short timestep and large number of simulation stepsare required • Parameters of working fluid must be recalculated at each simulation step

  32. Computing 3D graphs of a transient response of an electro-hydraulic servo-system

  33. History Models Computers Software Tasks 1970 four-pole models Minsk22 Fortran calculating of of elements, Malgolfrequency responses signal flow graphs of tubes 1975four-pole models Minsk32 Fortran calculating of and transfer functions frequency responses of valves of valves 1985 multi-pole models EC PRIZ calculations on of components, minicomputers C-PRIZ schemas models of systems Labtam 1995 visual Sun workstations NUT calculations on models visual schemas 2006->visual models personal CoCoViLa sizable calculations of large systems computers on large visual schemas

  34. Observations • Avoiding large equation systems: - multilevel calculations - iterative recomputing (on scheme) using subtasks • Multi-pole models are very suitable in CoCoViLa applications • First it has been possible to model and simulate real-life hydraulic systems. • Large applications need cooperation both domain area experts and system experts

  35. History of programming environments • SMP • PRIZ • ExpertPriz • NUT • CoCoViLa

  36. An application in NUT system Radar calculations

  37. Vertical coverage

  38. Surface profile

  39. Radar coverages

  40. Concluding remarks Advantages: • Language of the problem area can be used • Visuality • Structuring To keep in mind: • Non-traditional approach • Consistency of the model must be guaranteed Possible problems: • Lack of information in specifications • Nonsolvability of equations • Nonsolvability of equation systems

  41. Thank you for attention

More Related