Cocovila
Visual DSLs and Automatic Synthesis of Programs
Pavel Grigorenko
DevClub
25.04.2012
About(Me);
http://cs.ioc.ee/~pavelg
• Founded in 1960 (Estonian Academy of Sciences)
• Since 1997 - R&D @TUT
• Research staff: ~70 people
• Fields: mechanics,...
Cocovila
• Declarative model-based software development
• Domain-specific languages
• Visual specification
• Program synthes...
Visual Dsls In Cocovila
• Automatic Editor generation from language definition
• Well-defined abstract syntax
• No need to i...
(Pre)History
• Research in Artificial Intelligence
• Structural Synthesis 

of Programs (E.Tyugu 1979; 

G. Mints, E.Tyugu ...
Structural Synthesis Of Programs
• Structural properties of computations
• Based on implicational fragment of intuitionist...
Computational Problems In Ssp
Knowing M, compute y1,...,yn from x1,...,xm
Example:
(Triangle; a,b,c S)
Triangle

var: 

a,...
Visual Language Lifecycle
Create
Use
Execute
Domain
Concepts
Java classes
Metaclasses
Visual
classes
Scheme
Metaclass
Computational
model
Java classes
Bytecode
Automat...
Metaclass
public class AndGate {
/*@
specification AndGate {
int in1, in2, out;
in1, in2 -> out {calc};
}
@*/
public int c...
Domain
Concepts
Java classes
Metaclasses
Visual
classes
Scheme
Metaclass
Computational
model
Java classes
Bytecode
Automat...
• Metaclass
• Image/Graphics
• Ports
• Fields
• Toolbar icon
Visual Class
Cocovila Class Editor
Package<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE package SYSTEM "package2.dtd">
<package>
<name>Logic</name>
<descr...
Domain
Concepts
Java classes
Metaclasses
Visual
classes
Scheme
Metaclass
Computational
model
Java classes
Bytecode
Automat...
• Instantiate objects
• Connect ports
• Assign values
• Assign a superclass
Cocovila Scheme Editor
Domain
Concepts
Java classes
Metaclasses
Visual
classes
Scheme
Metaclass
Computational
model
Java classes
Bytecode
Automat...
SchemeTo Metaclass
Domain
Concepts
Java classes
Metaclasses
Visual
classes
Scheme
Metaclass
Computational
model
Java classes
Bytecode
Automat...
MetaclassesTo Code
Domain
Concepts
Java classes
Metaclasses
Visual
classes
Scheme
Metaclass
Computational
model
Java classes
Bytecode
Automat...
Compilation
• Storing generated Java files: in memory or file system
• Eclipse JDT Core compiler
• Compiling Classloader (CC...
Execution
Specification Language
• Variables
double a, b;
AndGate and;
• Constants
const double PI = Math.PI;
• Bindings (equality)
a...
Simple Functional Dependencies
in1, in2 -> out {calc};
Realization in Java:
public int calc( int x, int y ) {
return Math....
Higher-Order F. D-S (W/
Subtasks)
[arg -> val], from, to, step -> done {loop};
Realization in Java:
public void loop(Subta...
Higher-Order Dataflow
loop
from, to, step done
arg val
Specification Language
• Equations (built-in solver)
specification AndGate {
double in1, in2, out;
in1*in2 = out;
}


speci...
Specification Language
• Tuples
alias x = (a, b);
alias y = (c, d);
x = y;
x.0 = y.1;
x.length -> x {init};
• Wildcards
ali...
Tuples
alias axial = (n, T);
alias tang = (v, m, F);
Tuples
alias axial = (n, T);
alias tang = (v, m, F);
W0.axial = W1.axial;
W1.tang = W2.tang;
Tuples
alias axial = (n, T);
alias tang = (v, m, F);
W0.axial = W1.axial;
W1.tang = W2.tang;
W0.n = W1.n;
W0.T = W1.T;
W1....
Inheritance
public class Dif {
/*@ specification Dif {
Process Process_0;
Clock Clock_0;
Integrator Integrator_0;
Integrat...
Wildcards (Example)
scheme’s superclass
Wildcards (Example)
double state, nextstatestate stat
scheme’s superclass
double state, nextstate;
Wildcards (Example)
alias st = (*.state);
alias nst = (*.nextstate);
st -> nst {calculate};
double state, nextstatestate
a...
Wildcards (Example)
alias st = (*.state);
alias nst = (*.nextstate);
st -> nst {calculate};
double state, nextstatestate
a...
Applications
• Hydraulic systems
• GrADAR model
• Security Costs Optimization
• Web-service composition
• Functional Const...
Hands-On Demo
Starting CoCoViLa
• Requires Java 1.6
• How to run:
• Java Web Start (http://cs.ioc.ee/cocovila -> Web Start)
• Download z...
Predator-Prey Model (Lotka-Volterra)
• Prey (rabbits)
• Predators (wolfs)
dR
dt
= kR aRW
dW
dt
= rW + bRW
dR
dt
= kR aRW
d...
Mechanical
parts
Functional scheme
Modeling And Simulation Of An
Electro-Hydraulic Servo-Valve
!!!!!!!!!!!!!!!!!!!!!!!!!!!...
Mechanical
parts
Functional scheme
Modeling And Simulation Of An
Electro-Hydraulic Servo-Valve
!!!!!!!!!!!!!!!!!!!!!!!!!!!...
Mechanical
parts
Functional scheme
Modeling And Simulation Of An
Electro-Hydraulic Servo-Valve
!!!!!!!!!!!!!!!!!!!!!!!!!!!...
Composition Of X-Road Services
Graded It Security Cost
Optimization
Modeling and Simulation Group @ IoC
http://www.cs.ioc.ee/msg/
Upcoming SlideShare
Loading in …5
×

CoCoViLa @ devclub.eu

1,561 views

Published on

CoCoViLa homepage: http://www.cs.ioc.ee/cocovila
Video (in russian): http://vimeo.com/41040729

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,561
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
8
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

CoCoViLa @ devclub.eu

  1. 1. Cocovila Visual DSLs and Automatic Synthesis of Programs Pavel Grigorenko DevClub 25.04.2012
  2. 2. About(Me); http://cs.ioc.ee/~pavelg
  3. 3. • Founded in 1960 (Estonian Academy of Sciences) • Since 1997 - R&D @TUT • Research staff: ~70 people • Fields: mechanics, control systems, applied mathematics, computer science, systems biology, human language technology, ...
  4. 4. Cocovila • Declarative model-based software development • Domain-specific languages • Visual specification • Program synthesis • Java + OSS + GPL • Portable and extensible
  5. 5. Visual Dsls In Cocovila • Automatic Editor generation from language definition • Well-defined abstract syntax • No need to implement custom parsers and code generators • Precise semantics: • Shallow semantics textual representation • Deep semantics executable code
  6. 6. (Pre)History • Research in Artificial Intelligence • Structural Synthesis 
 of Programs (E.Tyugu 1979; 
 G. Mints, E.Tyugu 1982) • 1980s - PRIZ/UTOPIST • 1990s - NUT • >= 2003 - CoCoViLa
 (A. Saabas,A.Aasmaa, P. Grigorenko) Programmeerimiskeelte tasemed: ülesannete kirjeldamise keeled (6) Visuaalkeeled:
  7. 7. Structural Synthesis Of Programs • Structural properties of computations • Based on implicational fragment of intuitionistic propositional logic (uses Curry-Howard correspondence) • Deductive method:
 (specification existence theorem proof code) • Complexity: Polynomial-space complete 
 (Statman ’78)
  8. 8. Computational Problems In Ssp Knowing M, compute y1,...,yn from x1,...,xm Example: (Triangle; a,b,c S) Triangle
 var: 
 a, b, c, p, S;
 rel:
 a, b, c p {sp};
 a, b, c, p S {h}; ⊢a, b, c p {sp}; a, b, c ⊢ a, b, c ( -) ⊢a, b, c, p S {h}; a, b, c ⊢a, b, c, p ( -) a, b, c ⊢ S (h(a,b,c,sp(a,b,c))) ( +) ⊢a, b, c S (λabc.h(a,b,c,sp(a,b,c)))
  9. 9. Visual Language Lifecycle Create Use Execute
  10. 10. Domain Concepts Java classes Metaclasses Visual classes Scheme Metaclass Computational model Java classes Bytecode AutomaticDesignerUser Programming Add spec Draw Planning and code generation Transform Translate Compile Compose Execute (w/ feedback)
  11. 11. Metaclass public class AndGate { /*@ specification AndGate { int in1, in2, out; in1, in2 -> out {calc}; } @*/ public int calc( int x, int y ) { return Math.min(x, y); } }
  12. 12. Domain Concepts Java classes Metaclasses Visual classes Scheme Metaclass Computational model Java classes Bytecode AutomaticDesignerUser Programming Add spec Draw Planning and code generation Transform Translate Compile Compose Execute (w/ feedback)
  13. 13. • Metaclass • Image/Graphics • Ports • Fields • Toolbar icon Visual Class
  14. 14. Cocovila Class Editor
  15. 15. Package<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE package SYSTEM "package2.dtd"> <package> <name>Logic</name> <description>Logical circuits builder</description> <class type="class"> <name>And</name> <description>And</description> <icon>images/and.png</icon> <graphics> <bounds height="83" width="202" x="0" y="0"/> <image fixed="false" height="100" path="/images/200px-AND_ANSI.png" width="200" x="3" y="-11"/> </graphics> <ports> <port name="in1" portConnection="" strict="false" type="int" x="13" y="19"/> <port name="in2" portConnection="" strict="false" type="int" x="13" y="59"/> <port name="out" portConnection="" strict="false" type="int" x="190" y="39"/> </ports> <fields> <field name="in1" type="int">
  16. 16. Domain Concepts Java classes Metaclasses Visual classes Scheme Metaclass Computational model Java classes Bytecode AutomaticDesignerUser Programming Add spec Draw Planning and code generation Transform Translate Compile Compose Execute (w/ feedback)
  17. 17. • Instantiate objects • Connect ports • Assign values • Assign a superclass Cocovila Scheme Editor
  18. 18. Domain Concepts Java classes Metaclasses Visual classes Scheme Metaclass Computational model Java classes Bytecode AutomaticDesignerUser Programming Add spec Draw Planning and code generation Transform Translate Compile Compose Execute (w/ feedback)
  19. 19. SchemeTo Metaclass
  20. 20. Domain Concepts Java classes Metaclasses Visual classes Scheme Metaclass Computational model Java classes Bytecode AutomaticDesignerUser Programming Add spec Draw Planning and code generation Transform Translate Compile Compose Execute (w/ feedback)
  21. 21. MetaclassesTo Code
  22. 22. Domain Concepts Java classes Metaclasses Visual classes Scheme Metaclass Computational model Java classes Bytecode AutomaticDesignerUser Programming Add spec Draw Planning and code generation Transform Translate Compile Compose Execute (w/ feedback)
  23. 23. Compilation • Storing generated Java files: in memory or file system • Eclipse JDT Core compiler • Compiling Classloader (CCL) URLClassLoader CCL RunnerClassLoader PackageClassLoader
  24. 24. Execution
  25. 25. Specification Language • Variables double a, b; AndGate and; • Constants const double PI = Math.PI; • Bindings (equality) a = b; • Value assignments a = 3; and.in1 = 1;
  26. 26. Simple Functional Dependencies in1, in2 -> out {calc}; Realization in Java: public int calc( int x, int y ) { return Math.min(x, y); }
  27. 27. Higher-Order F. D-S (W/ Subtasks) [arg -> val], from, to, step -> done {loop}; Realization in Java: public void loop(Subtask s, int st, int fn, int inc){ for(int i = st; i <= fn; i+=inc){ s.run(new Object[]{ i }); } } public interface Subtask { public Object[] run(Object[] args); }
  28. 28. Higher-Order Dataflow loop from, to, step done arg val
  29. 29. Specification Language • Equations (built-in solver) specification AndGate { double in1, in2, out; in1*in2 = out; }

 specification Complex { double re, im, arg, mod; mod^2 = re^2 + im^2; mod * sin(arg) = im; }
  30. 30. Specification Language • Tuples alias x = (a, b); alias y = (c, d); x = y; x.0 = y.1; x.length -> x {init}; • Wildcards alias ts = (*.t); x.*.1 = y.*.z; • Inheritance • Goals • Polymorphic types • Control variables • ...
  31. 31. Tuples alias axial = (n, T); alias tang = (v, m, F);
  32. 32. Tuples alias axial = (n, T); alias tang = (v, m, F); W0.axial = W1.axial; W1.tang = W2.tang;
  33. 33. Tuples alias axial = (n, T); alias tang = (v, m, F); W0.axial = W1.axial; W1.tang = W2.tang; W0.n = W1.n; W0.T = W1.T; W1.v = W2.v; W1.m = W2.m; W1.F = W2.F;
  34. 34. Inheritance public class Dif { /*@ specification Dif { Process Process_0; Clock Clock_0; Integrator Integrator_0; Integrator Integrator_1; } @*/ } public class Dif extends Process { /*@ specification Dif super Process { Clock Clock_0; Integrator Integrator_0; Integrator Integrator_1; } @*/ }
  35. 35. Wildcards (Example) scheme’s superclass
  36. 36. Wildcards (Example) double state, nextstatestate stat scheme’s superclass double state, nextstate;
  37. 37. Wildcards (Example) alias st = (*.state); alias nst = (*.nextstate); st -> nst {calculate}; double state, nextstatestate alias st = (*.state); alias nst = (*.nextstate); st -> nst {calculate}; stat scheme’s superclass double state, nextstate;
  38. 38. Wildcards (Example) alias st = (*.state); alias nst = (*.nextstate); st -> nst {calculate}; double state, nextstatestate alias st = (*.state); alias nst = (*.nextstate); st -> nst {calculate}; stat scheme’s superclass double state, nextstate; st = (Clock_0.state, Integrator_0.state, Integrator_1.state);
  39. 39. Applications • Hydraulic systems • GrADAR model • Security Costs Optimization • Web-service composition • Functional Constraint Networks • Differential Equations • Discrete Event Simulation • Hybrid Network Simulation • Logic Circuits • Electric Circuits • Gearbox kinematics • Neural networks • Petri nets • AttackTrees • UML diagrams • ∞
  40. 40. Hands-On Demo
  41. 41. Starting CoCoViLa • Requires Java 1.6 • How to run: • Java Web Start (http://cs.ioc.ee/cocovila -> Web Start) • Download zipped version and execute .jar • git clone 
 git://cocovila.git.sourceforge.net/ gitroot/cocovila/cocovila -> ant run-se
  42. 42. Predator-Prey Model (Lotka-Volterra) • Prey (rabbits) • Predators (wolfs) dR dt = kR aRW dW dt = rW + bRW dR dt = kR aRW dW dt = rW + bRW Parameters: k = .08, a = .001, r=.02, b=.00002, R=1000,W=30
  43. 43. Mechanical parts Functional scheme Modeling And Simulation Of An Electro-Hydraulic Servo-Valve !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!2! ! ! of!multi=pole!models!with!their!input!and!output!poles.! NCTIONAL!SCHEME!OF!AN!ELECTRO1 AULIC!SERVOVALVE! electro=hydraulic!servovalve!with!mechanical!feedback![16=18]! red!in!the!paper!is!shown!in!Fig.!1.!In!considered!servovalve!a! motor! is! used! as! electro=mechanical! transducer.! !A! flapper! is! between!nozzles!by!the!torque!motor.!Feedback!from!sliding! !flapper!acts!by!elastic!rod.! ! ure!1:!Cross!section!of!nozzle=flapper!type!servovalve!with! mechanical!feedback!(MOOG!D761!Series)! !R8!in!Fig.!2!are!not!shown!in!Fig.!1.! They!have!been!added!and!taken!into!account!to!increase!the!stability! of!the!servovalve.! Scheme!of!mechanical!parts!of!an!electro=hydraulic!servovalve!is! shown!in!Fig.!3.! ! Figure!3:!Scheme!of!mechanical!parts!of!an!electro=hydraulic! servovalve! The!anchor!of!the!torque!motor!is!fixed!on!the!flexure!tube.!The! anchor!turn!angle!th1$transmits!to!the!stiff!rod,!which!gives!flapper!the! moving!h1$between!the!nozzles.!Difference!of!pressures!at!the!ends!of! sliding!spool!causes!the!spool!shift!z.! ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!2! ! ! ent!CoCoViLa![15]!supporting! ,! automatic! program! synthesis! ol!for!modeling!and!simulation! do! not! need! to! deal! with! with!prepared!calculating!codes.! !tasks!visually,!using!prepared! input!and!output!poles.! AN!ELECTRO1 h!mechanical!feedback![16=18]! .!1.!In!considered!servovalve!a! nical! transducer.! !A! flapper! is! motor.!Feedback!from!sliding! ! apper!type!servovalve!with! OOG!D761!Series)! ! Figure!2:!Functional!scheme!of!an!electro=hydraulic!servovalve!! Input!variables:!the!input!voltage!U!for!the!torque!motor!and!the! feeding!pressure!p1!and!outlet$pressure$p10.!! Output!variables:!Current!to!the!TM!I,!position!of!the!flapper!h,! position!of!the!sliding!spool!z!and!volumetric!flow!rates!qV1$and!qV8.!! !R8!in!Fig.!2!are!not!shown!in!Fig.!1.! They!have!been!added!and!taken!into!account!to!increase!the!stability! of!the!servovalve.! Scheme!of!mechanical!parts!of!an!electro=hydraulic!servovalve!is! shown!in!Fig.!3.! ! Figure!3:!Scheme!of!mechanical!parts!of!an!electro=hydraulic! servovalve! The!anchor!of!the!torque!motor!is!fixed!on!the!flexure!tube.!The! anchor!turn!angle!th1$transmits!to!the!stiff!rod,!which!gives!flapper!the! moving!h1$between!the!nozzles.!Difference!of!pressures!at!the!ends!of! sliding!spool!causes!the!spool!shift!z.! ! variables.!Usually!variables!in!fluid!power!system!components!must!be! considered!in!pair!(effort!and!flow!variable),!one!variable!is!input!and! the!other!is!output.!Therefore!a!multi=pole!model!contains!at!least!two! outer!variables!and!more!than!one!equation.!The!oriented!mathematical! dependences! between! inner! variables! of! components! (e.g.! various! hydraulic! pressure! and! flow! valves)! are! convenient! to! express! as! oriented!graphs.! Using! multi=pole! models! allows! describe! models! of! required! complexity!for!each!component.!For!example,!a!component!model!can! enclose! nonlinear! dependences,! inner! iterations,! logic! functions! and! own!integration!procedures.! Multi=pole!models!of!components!can!be!connected!together!only! using! poles.! Using! multi=pole! models! enables! methodical,! graphical! representation! of! mathematical! models! of! large! and! complicated! systems.!In!this!way!we!can!be!convinced!of!the!correct!composition! t! is! possible! directly! simulate! the! statics! or! steady! state! conditions! without! using! differential!equation!systems.!! Implementing! the! multi=pole! models! for! each! object! gives! us! possibility!to!use!distributed!calculations.! Integrations! are!performed! in!each!model!separately.!Solving!smaller!equation!systems!is!required! instead!of!solving!large!equation!systems.!The!multi=pole!model!of!the! perform!simulations,!taking!into!account!adequately!the!dynamics!of! all! components.! In! case! of! loop! dependences! between! component! models!the!iteration!method!is!used.! An!intelligent!simulation!environment!CoCoViLa![15]!supporting! programming! in! a! high=level! language,! automatic! program! synthesis! and!visual!programming!is!used!as!a!tool!for!modeling!and!simulation! of! fluid! power! systems.! Designer! do! not! need! to! deal! with! programming,!he!can!use!the!models!with!prepared!calculating!codes.! It!is!convenient!to!describe!simulation!tasks!visually,!using!prepared! images!of!multi=pole!models!with!their!input!and!output!poles.! ! ! 2!!!FUNCTIONAL!SCHEME!OF!AN!ELECTRO1 HYDRAULIC!SERVOVALVE! ! Functional!scheme!of!the!electro=hydraulic!servovalve!is!show Fig.!2.!Electro=hydraulic!servovalve!(Fig.!2)!consists!of!the!follow functional! elements! and! subsystems:! torque! motor!TM! with! flap flexure!tube!FT,!nozzle=and=flapper!valve!NF!with!nozzles!N1!and hydraulic! resistors! R1...R8,! interface! elements! (tee! coupli IE1...IE4,!sliding!spool!SP!and!elastic!feedback!EFB!(as!elastic!c rod)!from!spool!to!flapper.!! Working! slots! of! sliding! spool! structurally! belong! to! servovalve.!Functionally!it!is!appropriate!to!consider!working!slot separate!subsystem!when!modeling!and!simulating!a!servo=system. ! Figure!2:!Functional!scheme!of!an!electro=hydraulic!servovalve Input!variables:!the!input!voltage!U!for!the!torque!motor!and feeding!pressure!p1!and!outlet$pressure$p10.!! Output!variables:!Current!to!the!TM!I,!position!of!the!flappe position!of!the!sliding!spool!z!and!volumetric!flow!rates!qV1$and!qV !R8!in!Fig.!2!are!not!shown!in!Fi They!have!been!added!and!taken!into!account!to!increase!the!stab of!the!servovalve.! Scheme!of!mechanical!parts!of!an!electro=hydraulic!servovalv shown!in!Fig.!3.! Servo-valve with mechanical feedback
  44. 44. Mechanical parts Functional scheme Modeling And Simulation Of An Electro-Hydraulic Servo-Valve !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!2! ! ! of!multi=pole!models!with!their!input!and!output!poles.! NCTIONAL!SCHEME!OF!AN!ELECTRO1 AULIC!SERVOVALVE! electro=hydraulic!servovalve!with!mechanical!feedback![16=18]! red!in!the!paper!is!shown!in!Fig.!1.!In!considered!servovalve!a! motor! is! used! as! electro=mechanical! transducer.! !A! flapper! is! between!nozzles!by!the!torque!motor.!Feedback!from!sliding! !flapper!acts!by!elastic!rod.! ! ure!1:!Cross!section!of!nozzle=flapper!type!servovalve!with! mechanical!feedback!(MOOG!D761!Series)! !R8!in!Fig.!2!are!not!shown!in!Fig.!1.! They!have!been!added!and!taken!into!account!to!increase!the!stability! of!the!servovalve.! Scheme!of!mechanical!parts!of!an!electro=hydraulic!servovalve!is! shown!in!Fig.!3.! ! Figure!3:!Scheme!of!mechanical!parts!of!an!electro=hydraulic! servovalve! The!anchor!of!the!torque!motor!is!fixed!on!the!flexure!tube.!The! anchor!turn!angle!th1$transmits!to!the!stiff!rod,!which!gives!flapper!the! moving!h1$between!the!nozzles.!Difference!of!pressures!at!the!ends!of! sliding!spool!causes!the!spool!shift!z.! ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!2! ! ! ent!CoCoViLa![15]!supporting! ,! automatic! program! synthesis! ol!for!modeling!and!simulation! do! not! need! to! deal! with! with!prepared!calculating!codes.! !tasks!visually,!using!prepared! input!and!output!poles.! AN!ELECTRO1 h!mechanical!feedback![16=18]! .!1.!In!considered!servovalve!a! nical! transducer.! !A! flapper! is! motor.!Feedback!from!sliding! ! apper!type!servovalve!with! OOG!D761!Series)! ! Figure!2:!Functional!scheme!of!an!electro=hydraulic!servovalve!! Input!variables:!the!input!voltage!U!for!the!torque!motor!and!the! feeding!pressure!p1!and!outlet$pressure$p10.!! Output!variables:!Current!to!the!TM!I,!position!of!the!flapper!h,! position!of!the!sliding!spool!z!and!volumetric!flow!rates!qV1$and!qV8.!! !R8!in!Fig.!2!are!not!shown!in!Fig.!1.! They!have!been!added!and!taken!into!account!to!increase!the!stability! of!the!servovalve.! Scheme!of!mechanical!parts!of!an!electro=hydraulic!servovalve!is! shown!in!Fig.!3.! ! Figure!3:!Scheme!of!mechanical!parts!of!an!electro=hydraulic! servovalve! The!anchor!of!the!torque!motor!is!fixed!on!the!flexure!tube.!The! anchor!turn!angle!th1$transmits!to!the!stiff!rod,!which!gives!flapper!the! moving!h1$between!the!nozzles.!Difference!of!pressures!at!the!ends!of! sliding!spool!causes!the!spool!shift!z.! ! variables.!Usually!variables!in!fluid!power!system!components!must!be! considered!in!pair!(effort!and!flow!variable),!one!variable!is!input!and! the!other!is!output.!Therefore!a!multi=pole!model!contains!at!least!two! outer!variables!and!more!than!one!equation.!The!oriented!mathematical! dependences! between! inner! variables! of! components! (e.g.! various! hydraulic! pressure! and! flow! valves)! are! convenient! to! express! as! oriented!graphs.! Using! multi=pole! models! allows! describe! models! of! required! complexity!for!each!component.!For!example,!a!component!model!can! enclose! nonlinear! dependences,! inner! iterations,! logic! functions! and! own!integration!procedures.! Multi=pole!models!of!components!can!be!connected!together!only! using! poles.! Using! multi=pole! models! enables! methodical,! graphical! representation! of! mathematical! models! of! large! and! complicated! systems.!In!this!way!we!can!be!convinced!of!the!correct!composition! t! is! possible! directly! simulate! the! statics! or! steady! state! conditions! without! using! differential!equation!systems.!! Implementing! the! multi=pole! models! for! each! object! gives! us! possibility!to!use!distributed!calculations.! Integrations! are!performed! in!each!model!separately.!Solving!smaller!equation!systems!is!required! instead!of!solving!large!equation!systems.!The!multi=pole!model!of!the! perform!simulations,!taking!into!account!adequately!the!dynamics!of! all! components.! In! case! of! loop! dependences! between! component! models!the!iteration!method!is!used.! An!intelligent!simulation!environment!CoCoViLa![15]!supporting! programming! in! a! high=level! language,! automatic! program! synthesis! and!visual!programming!is!used!as!a!tool!for!modeling!and!simulation! of! fluid! power! systems.! Designer! do! not! need! to! deal! with! programming,!he!can!use!the!models!with!prepared!calculating!codes.! It!is!convenient!to!describe!simulation!tasks!visually,!using!prepared! images!of!multi=pole!models!with!their!input!and!output!poles.! ! ! 2!!!FUNCTIONAL!SCHEME!OF!AN!ELECTRO1 HYDRAULIC!SERVOVALVE! ! Functional!scheme!of!the!electro=hydraulic!servovalve!is!show Fig.!2.!Electro=hydraulic!servovalve!(Fig.!2)!consists!of!the!follow functional! elements! and! subsystems:! torque! motor!TM! with! flap flexure!tube!FT,!nozzle=and=flapper!valve!NF!with!nozzles!N1!and hydraulic! resistors! R1...R8,! interface! elements! (tee! coupli IE1...IE4,!sliding!spool!SP!and!elastic!feedback!EFB!(as!elastic!c rod)!from!spool!to!flapper.!! Working! slots! of! sliding! spool! structurally! belong! to! servovalve.!Functionally!it!is!appropriate!to!consider!working!slot separate!subsystem!when!modeling!and!simulating!a!servo=system. ! Figure!2:!Functional!scheme!of!an!electro=hydraulic!servovalve Input!variables:!the!input!voltage!U!for!the!torque!motor!and feeding!pressure!p1!and!outlet$pressure$p10.!! Output!variables:!Current!to!the!TM!I,!position!of!the!flappe position!of!the!sliding!spool!z!and!volumetric!flow!rates!qV1$and!qV !R8!in!Fig.!2!are!not!shown!in!Fi They!have!been!added!and!taken!into!account!to!increase!the!stab of!the!servovalve.! Scheme!of!mechanical!parts!of!an!electro=hydraulic!servovalv shown!in!Fig.!3.! Servo-valve with mechanical feedback
  45. 45. Mechanical parts Functional scheme Modeling And Simulation Of An Electro-Hydraulic Servo-Valve !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!2! ! ! of!multi=pole!models!with!their!input!and!output!poles.! NCTIONAL!SCHEME!OF!AN!ELECTRO1 AULIC!SERVOVALVE! electro=hydraulic!servovalve!with!mechanical!feedback![16=18]! red!in!the!paper!is!shown!in!Fig.!1.!In!considered!servovalve!a! motor! is! used! as! electro=mechanical! transducer.! !A! flapper! is! between!nozzles!by!the!torque!motor.!Feedback!from!sliding! !flapper!acts!by!elastic!rod.! ! ure!1:!Cross!section!of!nozzle=flapper!type!servovalve!with! mechanical!feedback!(MOOG!D761!Series)! !R8!in!Fig.!2!are!not!shown!in!Fig.!1.! They!have!been!added!and!taken!into!account!to!increase!the!stability! of!the!servovalve.! Scheme!of!mechanical!parts!of!an!electro=hydraulic!servovalve!is! shown!in!Fig.!3.! ! Figure!3:!Scheme!of!mechanical!parts!of!an!electro=hydraulic! servovalve! The!anchor!of!the!torque!motor!is!fixed!on!the!flexure!tube.!The! anchor!turn!angle!th1$transmits!to!the!stiff!rod,!which!gives!flapper!the! moving!h1$between!the!nozzles.!Difference!of!pressures!at!the!ends!of! sliding!spool!causes!the!spool!shift!z.! ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!2! ! ! ent!CoCoViLa![15]!supporting! ,! automatic! program! synthesis! ol!for!modeling!and!simulation! do! not! need! to! deal! with! with!prepared!calculating!codes.! !tasks!visually,!using!prepared! input!and!output!poles.! AN!ELECTRO1 h!mechanical!feedback![16=18]! .!1.!In!considered!servovalve!a! nical! transducer.! !A! flapper! is! motor.!Feedback!from!sliding! ! apper!type!servovalve!with! OOG!D761!Series)! ! Figure!2:!Functional!scheme!of!an!electro=hydraulic!servovalve!! Input!variables:!the!input!voltage!U!for!the!torque!motor!and!the! feeding!pressure!p1!and!outlet$pressure$p10.!! Output!variables:!Current!to!the!TM!I,!position!of!the!flapper!h,! position!of!the!sliding!spool!z!and!volumetric!flow!rates!qV1$and!qV8.!! !R8!in!Fig.!2!are!not!shown!in!Fig.!1.! They!have!been!added!and!taken!into!account!to!increase!the!stability! of!the!servovalve.! Scheme!of!mechanical!parts!of!an!electro=hydraulic!servovalve!is! shown!in!Fig.!3.! ! Figure!3:!Scheme!of!mechanical!parts!of!an!electro=hydraulic! servovalve! The!anchor!of!the!torque!motor!is!fixed!on!the!flexure!tube.!The! anchor!turn!angle!th1$transmits!to!the!stiff!rod,!which!gives!flapper!the! moving!h1$between!the!nozzles.!Difference!of!pressures!at!the!ends!of! sliding!spool!causes!the!spool!shift!z.! ! variables.!Usually!variables!in!fluid!power!system!components!must!be! considered!in!pair!(effort!and!flow!variable),!one!variable!is!input!and! the!other!is!output.!Therefore!a!multi=pole!model!contains!at!least!two! outer!variables!and!more!than!one!equation.!The!oriented!mathematical! dependences! between! inner! variables! of! components! (e.g.! various! hydraulic! pressure! and! flow! valves)! are! convenient! to! express! as! oriented!graphs.! Using! multi=pole! models! allows! describe! models! of! required! complexity!for!each!component.!For!example,!a!component!model!can! enclose! nonlinear! dependences,! inner! iterations,! logic! functions! and! own!integration!procedures.! Multi=pole!models!of!components!can!be!connected!together!only! using! poles.! Using! multi=pole! models! enables! methodical,! graphical! representation! of! mathematical! models! of! large! and! complicated! systems.!In!this!way!we!can!be!convinced!of!the!correct!composition! t! is! possible! directly! simulate! the! statics! or! steady! state! conditions! without! using! differential!equation!systems.!! Implementing! the! multi=pole! models! for! each! object! gives! us! possibility!to!use!distributed!calculations.! Integrations! are!performed! in!each!model!separately.!Solving!smaller!equation!systems!is!required! instead!of!solving!large!equation!systems.!The!multi=pole!model!of!the! perform!simulations,!taking!into!account!adequately!the!dynamics!of! all! components.! In! case! of! loop! dependences! between! component! models!the!iteration!method!is!used.! An!intelligent!simulation!environment!CoCoViLa![15]!supporting! programming! in! a! high=level! language,! automatic! program! synthesis! and!visual!programming!is!used!as!a!tool!for!modeling!and!simulation! of! fluid! power! systems.! Designer! do! not! need! to! deal! with! programming,!he!can!use!the!models!with!prepared!calculating!codes.! It!is!convenient!to!describe!simulation!tasks!visually,!using!prepared! images!of!multi=pole!models!with!their!input!and!output!poles.! ! ! 2!!!FUNCTIONAL!SCHEME!OF!AN!ELECTRO1 HYDRAULIC!SERVOVALVE! ! Functional!scheme!of!the!electro=hydraulic!servovalve!is!show Fig.!2.!Electro=hydraulic!servovalve!(Fig.!2)!consists!of!the!follow functional! elements! and! subsystems:! torque! motor!TM! with! flap flexure!tube!FT,!nozzle=and=flapper!valve!NF!with!nozzles!N1!and hydraulic! resistors! R1...R8,! interface! elements! (tee! coupli IE1...IE4,!sliding!spool!SP!and!elastic!feedback!EFB!(as!elastic!c rod)!from!spool!to!flapper.!! Working! slots! of! sliding! spool! structurally! belong! to! servovalve.!Functionally!it!is!appropriate!to!consider!working!slot separate!subsystem!when!modeling!and!simulating!a!servo=system. ! Figure!2:!Functional!scheme!of!an!electro=hydraulic!servovalve Input!variables:!the!input!voltage!U!for!the!torque!motor!and feeding!pressure!p1!and!outlet$pressure$p10.!! Output!variables:!Current!to!the!TM!I,!position!of!the!flappe position!of!the!sliding!spool!z!and!volumetric!flow!rates!qV1$and!qV !R8!in!Fig.!2!are!not!shown!in!Fi They!have!been!added!and!taken!into!account!to!increase!the!stab of!the!servovalve.! Scheme!of!mechanical!parts!of!an!electro=hydraulic!servovalv shown!in!Fig.!3.! Servo-valve with mechanical feedback
  46. 46. Composition Of X-Road Services
  47. 47. Graded It Security Cost Optimization
  48. 48. Modeling and Simulation Group @ IoC http://www.cs.ioc.ee/msg/

×