import "C:/Cellier/Classes/Ece449/BondLib/BondLib.mo"; package mmps_hw9 "Homework 9 of Mathematical Modeling of Physical Systems" package Hydraulic "Library for 1D hydraulic models" annotation (Icon( Rectangle(extent=[-100,-100; 80,50], style( color=42, fillColor=30, fillPattern=1)), Polygon(points=[-100,50; -80,70; 100,70; 80,50; -100,50], style( color=42, fillColor=30, fillPattern=1)), Polygon(points=[100,70; 100,-80; 80,-100; 80,50; 100,70], style( color=42, fillColor=30, fillPattern=1)), Text( extent=[-85,35; 65,-85], string="Library", style(color=42)), Text( extent=[-120,122; 120,73], string="%name", style(color=1)))); package Interfaces "Interface models of the hydraulic library" annotation (Icon( Text( extent=[-118,112; 122,63], string="%name", style(color=1)), Rectangle(extent=[-100,-100; 80,50], style( color=58, fillColor=30, fillPattern=1)), Polygon(points=[-100,50; -80,70; 100,70; 80,50; -100,50], style( color=58, fillColor=30, fillPattern=1)), Polygon(points=[100,70; 100,-80; 80,-100; 80,50; 100,70], style( color=58, fillColor=30, fillPattern=1)), Text( extent=[-85,35; 65,-85], string="Library", style(color=58))), Documentation(info=" Sublibrary of interface models: connectors, wrapper models, and partial models that are being used by the 1D hydraulic library. ")); connector Port_A "Inflow connector of hydraulic library" Modelica.SIunits.Pressure p "Pressure at port"; flow Modelica.SIunits.VolumeFlowRate q "Flow rate through port"; annotation ( Icon( Rectangle(extent=[-100,-100; 100,100], style(color=1, fillColor=1))), Diagram(Rectangle(extent=[-40,-40; 40,40], style( color=1, rgbcolor={255,0,0}, fillColor=1, rgbfillColor={255,0,0})), Text( extent=[-160,110; 40,50], string="%name", style( color=1, rgbcolor={255,0,0}, fillColor=1, rgbfillColor={255,0,0}))), Documentation(info=" \"Inflow\" hydraulic connector.
This connector is incompatible with the corresponding connector of the HyLib library because of the oil properties imported in HyLib through the connectors. ")); end Port_A; connector Port_B "Outflow connector of hydraulic library" Modelica.SIunits.Pressure p "Pressure at port"; flow Modelica.SIunits.VolumeFlowRate q "Flow rate through port"; annotation ( Icon( Rectangle(extent=[-100,-100; 100,100], style(color=1, fillColor=7))), Diagram(Rectangle(extent=[-40,-40; 40,40], style( color=1, rgbcolor={255,0,0}, fillColor=7, rgbfillColor={255,255,255})), Text( extent=[-40,110; 160,50], string="%name", style( color=1, rgbcolor={255,0,0}, fillColor=7, rgbfillColor={255,255,255}))), Documentation(info=" \"Outflow\" hydraulic connector.
This connector is incompatible with the corresponding connector of the HyLib library because of the oil properties imported in HyLib through the connectors. ")); end Port_B; model Hy2BG "Hydraulic to bond graph conversion" BondLib.Interfaces.BondCon BondCon1 "Bond graph connector" annotation (extent=[90,-10; 110,10]); annotation ( Icon( Line(points=[-80,-80; -80,80; 80,80; -80,-80], style(color=1, rgbcolor={255,0,0})), Line(points=[80,80; 80,-80; -80,-80], style(color=9)), Line(points=[94,0; 80,0], style(color=9)), Line(points=[-90,0; -80,0], style(color=1, rgbcolor={255,0,0})), Text( extent=[-64,56; 0,12], string="Hy", style(color=44, rgbcolor={255,170,170})), Text( extent=[4,-14; 70,-64], string="BG", style(color=9)), Line(points=[52,0; 40,-10], style(color=3, rgbcolor={0,0,255})), Line(points=[52,0; 40,10], style(color=3, rgbcolor={0,0,255})), Line(points=[-50,0; 52,0], style(color=3, rgbcolor={0,0,255}))), Diagram( Line(points=[-80,-80; -80,80; 80,80; -80,-80], style(color=1, rgbcolor={255,0,0})), Line(points=[80,80; 80,-80; -80,-80], style(color=9)), Line(points=[94,0; 80,0], style(color=9)), Line(points=[-96,0; -80,0], style(color=1, rgbcolor={255,0,0})), Text( extent=[-64,56; 0,12], string="Hy", style(color=44, rgbcolor={255,170,170})), Text( extent=[4,-14; 70,-64], string="BG", style(color=9)), Line(points=[-50,0; 52,0], style(color=3, rgbcolor={0,0,255})), Line(points=[52,0; 40,10], style(color=3, rgbcolor={0,0,255})), Line(points=[52,0; 40,-10], style(color=3, rgbcolor={0,0,255}))), Documentation(info=" This model converts a hydraulic flow to a bondgraphic power signal. ")); Port_A port_A "Hydraulic connector" annotation (extent=[-110,-10; -90,10]); equation BondCon1.e = port_A.p; BondCon1.f = port_A.q; end Hy2BG; model BG2Hy "Bond graph to hydraulic conversion" BondLib.Interfaces.BondCon BondCon1 "Bond graph connector" annotation (extent=[-110,-10; -90, 10]); Port_B port_B "Hydraulic connector" annotation (extent=[90,-10; 110,10]); equation BondCon1.e = port_B.p; BondCon1.f = -port_B.q; annotation ( Icon( Line(points=[-80,-80; -80,80; 80,80; -80,-80], style(color=9)), Line(points=[-94,0; -80,0], style(color=9)), Line(points=[80,80; 80,-80; -80,-80], style(color=1, rgbcolor={255, 0,0})), Line(points=[90,0; 80,0], style(color=1, rgbcolor={255,0,0})), Text( extent=[-64,70; 2,20], string="BG", style(color=9)), Text( extent=[0,-16; 64,-60], string="Hy", style(color=44, rgbcolor={255,170,170})), Line(points=[52,0; 40,-10], style(color=3, rgbcolor={0,0,255})), Line(points=[52,0; 40,10], style(color=3, rgbcolor={0,0,255})), Line(points=[-50,0; 52,0], style(color=3, rgbcolor={0,0,255}))), Diagram( Line(points=[-80,-80; -80,80; 80,80; -80,-80], style(color=9)), Line(points=[-94,0; -80,0], style(color=9)), Line(points=[80,80; 80,-80; -80,-80], style(color=1, rgbcolor={255, 0,0})), Line(points=[96,0; 80,0], style(color=1, rgbcolor={255,0,0})), Text( extent=[-64,70; 2,20], string="BG", style(color=9)), Text( extent=[0,-16; 64,-60], string="Hy", style(color=44, rgbcolor={255,170,170})), Line(points=[52,0; 40,-10], style(color=3, rgbcolor={0,0,255})), Line(points=[52,0; 40,10], style(color=3, rgbcolor={0,0,255})), Line(points=[-50,0; 52,0], style(color=3, rgbcolor={0,0,255}))), Documentation(info=" This model converts a bondgraphic power signal to a hydraulic flow. ")); end BG2Hy; partial model OnePort "OnePort partial model of the hydraulic library" Modelica.SIunits.Pressure p "Pressure drop between the two ports"; Modelica.SIunits.VolumeFlowRate q "Liquid flowing from port_A to port_B"; Port_A port_A "Left hydraulic connector" annotation (extent=[-110,-10; -90,10]); Port_B port_B "Right hydraulic connector" annotation (extent=[90,-10; 110,10]); equation p = port_A.p - port_B.p; q = port_A.q; annotation (Documentation(info=" OnePort partial model of the hydraulic wrapped bondgraph library. "), Diagram( Line(points=[-110,20; -85,20], style(color=9, fillColor=9)), Polygon(points=[-95,23; -85,20; -95,17; -95,23], style( color=9, fillColor=9, fillPattern=1)), Line(points=[90,20; 115,20], style(color=9, fillColor=9)), Text( extent=[-114,19; -94,39], style(color=9), string="q"), Polygon(points=[105,23; 115,20; 105,17; 105,23], style( color=9, fillColor=9, fillPattern=1)), Text( extent=[98,41; 118,21], style(color=9), string="q"))); end OnePort; partial model ModOnePort "Modulated OnePort partial model of the hydraulic library" Modelica.SIunits.Pressure p "Pressure drop between the two ports"; Modelica.SIunits.VolumeFlowRate q "Liquid flowing from port_A to port_B"; Port_A port_A "Left hydraulic connector" annotation (extent=[-110,-10; -90,10]); Port_B port_B "Right hydraulic connector" annotation (extent=[90,-10; 110,10]); Modelica.Blocks.Interfaces.RealInput u "Modulation signal" annotation (extent=[-10,80; 10,100], rotation=-90); equation p = port_A.p - port_B.p; q = port_A.q; annotation (Diagram( Line(points=[-110,20; -85,20], style(color=9, fillColor=9)), Polygon(points=[-95,23; -85,20; -95,17; -95,23], style( color=9, fillColor=9, fillPattern=1)), Line(points=[90,20; 115,20], style(color=9, fillColor=9)), Text( extent=[-114,19; -94,39], style(color=9), string="q"), Polygon(points=[105,23; 115,20; 105,17; 105,23], style( color=9, fillColor=9, fillPattern=1)), Text( extent=[98,41; 118,21], style(color=9), string="q")), Documentation(info=" Modulated OnePort partial model of the hydraulic wrapped bondgraph library. ")); end ModOnePort; end Interfaces; package Motors "Hydraulic motors" model Hydromotor "Hydraulic motor model built from wrapped bond graph technology" parameter Real ce(unit="kg/(m4.s)") = 1 "External leakage"; parameter Real ci(unit="kg/(m4.s)") = 1 "Internal leakage"; parameter Real c1(unit="kg/(m4.s2)") = 1 "Compression coefficient"; parameter Real psi(unit="kg/(m.s)") = 1 "Motor induction constant"; parameter Real rhom(unit="kg.m2/s") = 1 "Motor friction constant"; parameter Modelica.SIunits.Inertia jm=1 "Motor inertia"; parameter Modelica.SIunits.Pressure pS=1 "Service pressure"; parameter Modelica.SIunits.Pressure p0=0 "Environment pressure"; Modelica.Blocks.Interfaces.RealOutput wm "Velocity signal connector" annotation (extent=[92,-30; 112,-10]); annotation ( Icon( Rectangle(extent=[-80,40; 80,-80], style(gradient=2, fillColor=41)), Polygon(points=[-80,-120; -80,-100; -60,-100; -42,-20; 38,-20; 60, -100; 80,-100; 80,-120; -80,-120], style(color=0, fillColor=0)), Rectangle(extent=[-68,20; 70,-60], style(fillColor=7)), Rectangle(extent=[-10,16; 12,-56], style(fillColor=73)), Rectangle(extent=[-68,-16; -80,-24], style(pattern=0, fillColor=7)), Rectangle(extent=[80,-16; 68,-24], style(pattern=0, fillColor=7)), Rectangle(extent=[94,-18; -86,-22], style(fillColor=73)), Rectangle(extent=[-64,74; -56,18], style(pattern=0, fillColor=7)), Rectangle(extent=[56,74; 64,18], style(pattern=0, fillColor=7)), Polygon(points=[-64,86; -64,20; -68,20; -68,-16; -80,-16; -80,-18; -10,-18; -10,16; 12,16; 12,-18; 80,-18; 80,-16; 70,-16; 70,20; 64,20; 64,86; 56,86; 56,20; -56,20; -56,86; -64,86], style(pattern=0, fillColor=65)), Polygon(points=[-80,-22; -80,-24; -68,-24; -68,-60; 70,-60; 70,-24; 80,-24; 80,-22; 12,-22; 12,-56; -10,-56; -10,-22; -80,-22], style(pattern=0, fillColor=65)), Line(points=[-64,86; -64,20; -68,20; -68,-16; -80,-16]), Line(points=[-80,-24; -68,-24; -68,-60; 70,-60; 70,-24; 80,-24]), Line(points=[-56,80; -56,20; 56,20; 56,80]), Line(points=[64,80; 64,20; 70,20; 70,-16; 80,-16]), Line(points=[22,8; 14,18], style(color=0)), Text( extent=[20,10; 30,2], string="qi", style(color=0)), Line(points=[-12,18; -20,10], style(color=0)), Text( extent=[-28,10; -18,2], string="qi", style(color=0)), Line(points=[-58,-8; -66,-16], style(color=0)), Line(points=[-66,-12; -66,-16; -62,-16], style(color=0)), Text( extent=[-60,-8; -48,-16], string="qe1", style(color=0)), Line(points=[58,-8; 68,-16], style(color=0)), Line(points=[68,-12; 68,-16; 64,-16], style(color=0)), Text( extent=[48,-8; 60,-16], string="qe2", style(color=0)), Line(points=[60,38; 60,18], style(color=0)), Line(points=[-62,22; -60,18; -58,22], style(color=0)), Text( extent=[54,18; 66,10], string="qL2", style(color=0)), Line(points=[-60,18; -60,36], style(color=0)), Line(points=[58,34; 60,38; 62,34], style(color=0)), Text( extent=[-66,18; -54,10], string="qL1", style(color=0)), Text(extent=[-56,138; 56,100], string="%name"), Line(points=[92,-4; 112,-4], style(color=0)), Line(points=[106,0; 112,-4; 106,-8], style(color=0)), Text( extent=[94,6; 104,-2], string="wm", style(color=0)), Line(points=[-16,18; -12,18; -12,14], style(color=0)), Line(points=[22,12; 22,8; 18,8], style(color=0)), Polygon(points=[-86,100; -86,86; -56,86; -56,94; -74,94; -74,100; -86, 100], style(pattern=0, fillColor=65)), Polygon(points=[74,100; 74,94; 56,94; 56,86; 86,86; 86,100; 74,100], style(pattern=0, fillColor=65)), Line(points=[-64,86; -86,86; -86,100]), Line(points=[-56,80; -56,94; -74,94; -74,100]), Line(points=[74,100; 74,94; 56,94; 56,80]), Line(points=[86,100; 86,86; 64,86; 64,80]), Text( extent=[-46,-36; -34,-44], style(color=0), string="p1"), Text( extent=[36,-36; 48,-44], style(color=0), string="p2")), Coordsys(extent=[-100,-140; 100,120], scale=0.1), Diagram, Documentation(info=" The hydraulic motor model described here has two bondgraphic inputs: the two load flows, qL1 and qL2. It has a signal output: the angular velocity, omegam, of the motor. The bondgraphic interface is designed such that the hydraulic motor can be directly connected to the servo valve without either a set of bonds or a set of junctions in between.
The two chambers of the hydraulic motor are at the pressures p1 and p2, respectively.
The model also contains an internal leakage flow, qi, and two external leakage flows, qe1 and qe2. The leakage flows are assumed to be laminar flows. ")); Interfaces.Port_A port_A "Left hydraulic connector" annotation (extent=[-90,100; -70,120]); Interfaces.Port_B port_B "Right hydraulic connector" annotation (extent=[70,100; 90,120]); Passive.Laminar IntLeak(G=ci) annotation (extent=[-20,100; 20,60]); Passive.Motor motor(psi=psi) annotation (extent=[-20,20; 20,-20]); Passive.Chamber Chamber_1(C=1/c1, p0=(pS + p0)/2) annotation (extent=[-40,20; -80,60], rotation=0); Passive.Chamber Chamber_2(C=1/c1, p0=(pS + p0)/2) annotation (extent=[40,20; 80,60], rotation=0); Passive.Laminar ExtLeak1(G=ce) annotation (extent=[-60,-80; -100,-40], rotation=-90); Passive.Tank Tank1 annotation (extent=[-100,-120; -60,-80]); Passive.Laminar ExtLeak2(G=ce) annotation (extent=[100,-80; 60,-40], rotation=-90); Passive.Tank Tank2 annotation (extent=[60,-120; 100,-80]); BondLib.Mechanical.Rotational.Passive.Fixed Fixed annotation (extent=[-10,30; 10,50], rotation=180); BondLib.Mechanical.Rotational.Passive.Inertia Inertia(J=jm) annotation (extent=[-10,-50; 10,-30], rotation=-90); BondLib.Mechanical.Rotational.Passive.Damper Damper(d=rhom) annotation (extent=[-10,-80; 10,-60], rotation=-90); BondLib.Mechanical.Rotational.Passive.Fixed Fixed1 annotation (extent=[-10,-100; 10,-80], rotation=0); BondLib.Mechanical.Rotational.Sensors.SpeedSensor SpeedSensor annotation (extent=[20,-70; 40,-50]); equation connect(port_A, IntLeak.port_A) annotation (points=[-80,110; -80,80; -20,80], style(color=1, rgbcolor={255,0,0})); connect(port_B, IntLeak.port_B) annotation (points=[80,110; 80,80; 20, 80], style(color=1, rgbcolor={255,0,0})); connect(Chamber_1.port_A, IntLeak.port_A) annotation (points=[-40,40; -40,80; -20,80], style(color=1, rgbcolor={255,0,0})); connect(Chamber_1.port_A, motor.port_A) annotation (points=[-40,40; -40, 0; -20,0], style(color=1, rgbcolor={255,0,0})); connect(motor.port_B, Chamber_2.port_A) annotation (points=[20,0; 40,0; 40,40], style(color=1, rgbcolor={255,0,0})); connect(IntLeak.port_B, Chamber_2.port_A) annotation (points=[20,80; 40, 80; 40,40], style(color=1, rgbcolor={255,0,0})); connect(motor.port_A, ExtLeak1.port_A) annotation (points=[-20,0; -80,0; -80,-40], style(color=1, rgbcolor={255,0,0})); connect(Tank1.port_B, ExtLeak1.port_B) annotation (points=[-80,-100; -80,-80], style(color=1, rgbcolor={255,0,0})); connect(ExtLeak2.port_A, motor.port_B) annotation (points=[80,-40; 80,0; 20,0], style(color=1, rgbcolor={255,0,0})); connect(ExtLeak2.port_B, Tank2.port_B) annotation (points=[80,-80; 80, -100], style(color=1, rgbcolor={255,0,0})); connect(Fixed.flange_b, motor.flange_b) annotation (points=[0,40; 0,20], style(color=0, rgbcolor={0,0,0})); connect(Inertia.flange_a, motor.flange_a) annotation (points=[ -6.12303e-016,-30; 0,-30; 0,-20], style(color=0, rgbcolor={0,0,0})); connect(Damper.flange_a, Inertia.flange_b) annotation (points=[ -6.12303e-016,-60; -6.12303e-016,-71; 6.12303e-016,-71; 6.12303e-016,-50], style(color=0, rgbcolor={0,0,0})); connect(Damper.flange_b, Fixed1.flange_b) annotation (points=[ 6.12303e-016,-80; 6.12303e-016,-85; 0,-85; 0,-90], style(color=0, rgbcolor={0,0,0})); connect(SpeedSensor.flange_a, Damper.flange_a) annotation (points=[20,-60; -6.12303e-016,-60], style(color=0, rgbcolor={0,0,0})); connect(SpeedSensor.w, wm) annotation (points=[40,-60; 60,-60; 60,-20; 102,-20], style(color=74, rgbcolor={0,0,127})); end Hydromotor; end Motors; package Passive "Passive hydraulic elements" annotation (Icon( Text( extent=[-120,118; 120,69], string="%name", style(color=1)), Rectangle(extent=[-100,-100; 80,50], style(fillColor=30, fillPattern= 1)), Polygon(points=[-100,50; -80,70; 100,70; 80,50; -100,50], style( fillColor=30, fillPattern=1)), Polygon(points=[100,70; 100,-80; 80,-100; 80,50; 100,70], style( fillColor=30, fillPattern=1)), Text( extent=[-85,35; 65,-85], string="Library", style(color=3))), Documentation(info=" Passive elements of the 1D hydraulic library. ")); model Tank "Infinitely large container at standard atmospheric pressure (ground node)" parameter Modelica.SIunits.Pressure p0=101.325e3 "Standard atmospheric pressure"; annotation ( Icon( Line(points=[-30,-50; -30,-70; 30,-70; 30,-50], style(color=0)), Text(extent=[0,-118; 0,-78], string="%name"), Line(points=[0,-7; 0,-60], style(color=1))), Diagram, Documentation(info=" Ground node of the wrapped bond graph 1D hydraulic library. The ground node represents an infinitely large container at standard atmospheric pressure. In contrast with the electrical or mechanical libraries, the hydraulic ground node is not at zero potential. ")); Interfaces.Port_B port_B "Hydraulic connector" annotation (extent=[-10,-10; 10,10]); protected Interfaces.BG2Hy BG2Hy1 annotation (extent=[-40,-10; -20,10]); BondLib.Bonds.fBond B1 annotation (extent=[-60,-10; -40,10]); BondLib.Sources.Se P0(e0=p0) annotation (extent=[-60,-10; -80,10]); equation connect(BG2Hy1.port_B, port_B) annotation (points=[-20,0; 0,0], style( color=1, rgbcolor={255,0,0}, fillColor=7, rgbfillColor={255,255,255}, fillPattern=1)); connect(B1.fBondCon1, BG2Hy1.BondCon1) annotation (points=[-40,0; -40,0], style( color=8, rgbcolor={192,192,192}, fillColor=7, rgbfillColor={255,255,255}, fillPattern=1)); connect(P0.BondCon1, B1.eBondCon1) annotation (points=[-60,0; -60,0], style( color=8, rgbcolor={192,192,192}, fillColor=7, rgbfillColor={255,255,255}, fillPattern=1)); end Tank; model Laminar "Hydraulic resistance with laminar flow" extends Interfaces.OnePort; parameter Types.Conductance G=1 "Laminar conductance"; protected BondLib.Junctions.J1p3 J1p3_1 annotation (extent=[-10,10; 10,-10]); BondLib.Bonds.Bond B1 annotation (extent=[-30,-10; -10,10]); BondLib.Bonds.Bond B2 annotation (extent=[10,-10; 30,10]); BondLib.Bonds.Bond B3 annotation (extent=[-10,10; 10,30], rotation= 90); BondLib.Passive.G G1(G=G) annotation (extent=[-10,30; 10,50], rotation=90); Interfaces.Hy2BG Hy2BG1 annotation (extent=[-50,-10; -30,10]); Interfaces.BG2Hy BG2Hy1 annotation (extent=[30,-10; 50,10]); equation connect(B1.BondCon2,J1p3_1. BondCon1) annotation (points=[-10,0; -10,0], style(color=8)); connect(J1p3_1.BondCon2,B2. BondCon1) annotation (points=[10,0; 10.2,0], style(color=8)); connect(B3.BondCon1,J1p3_1. BondCon3) annotation (points=[-6.00057e-016, 10.2; -6.00057e-016,10; 0,10], style(color=8)); annotation ( Diagram, Icon( Text(extent=[0,-48; 0,-88], string="%name"), Line(points=[-26,-24; -20,-20; -14,-17; -7,-16; 0,-15; 7,-16; 14, -17; 20,-20; 26,-24], style(color=1, rgbcolor={255,0,0})), Line(points=[-26,24; -20,20; -14,17; -7,16; 0,15; 7,16; 14,17; 20, 20; 26,24], style(color=1, rgbcolor={255,0,0})), Line(points=[-100,0; 90,0], style(color=1))), Documentation(info=" Hydraulic laminar resistance model. The resistance value is specified in the inverse form of a hydraulic conductance. ")); connect(G1.BondCon1, B3.BondCon2) annotation (points=[-6.12303e-016,30; 6.12303e-016,30], style( color=8, rgbcolor={192,192,192}, fillColor=7, rgbfillColor={255,255,255}, fillPattern=1)); connect(Hy2BG1.BondCon1, B1.BondCon1) annotation (points=[-30,0; -29.8, 0], style( color=8, rgbcolor={192,192,192}, fillColor=7, rgbfillColor={255,255,255}, fillPattern=1)); connect(Hy2BG1.port_A, port_A) annotation (points=[-50,0; -100,0], style( color=1, rgbcolor={255,0,0}, fillColor=7, rgbfillColor={255,255,255}, fillPattern=1)); connect(BG2Hy1.BondCon1, B2.BondCon2) annotation (points=[30,0; 30,0], style( color=8, rgbcolor={192,192,192}, fillColor=7, rgbfillColor={255,255,255}, fillPattern=1)); connect(BG2Hy1.port_B, port_B) annotation (points=[50,0; 100,0], style( color=1, rgbcolor={255,0,0}, fillColor=7, rgbfillColor={255,255,255}, fillPattern=1)); end Laminar; model Valve "Turbulent resistance of the 1D hydraulic library" extends Interfaces.ModOnePort; protected BondLib.Junctions.J1p3 J1p3_1 annotation (extent=[-10,10; 10,-10]); BondLib.Bonds.Bond B1 annotation (extent=[-30,-10; -10,10]); BondLib.Bonds.Bond B2 annotation (extent=[10,-10; 30,10]); BondLib.Bonds.Bond B3 annotation (extent=[-10,10; 10,30], rotation= 90); Interfaces.Hy2BG Hy2BG1 annotation (extent=[-50,-10; -30,10]); Interfaces.BG2Hy BG2Hy1 annotation (extent=[30,-10; 50,10]); BondLib.Passive.HydromG G1(p0=1) annotation (extent=[-10,30; 10,50], rotation=90); equation connect(B1.BondCon2,J1p3_1. BondCon1) annotation (points=[-10,0; -10,0], style(color=8)); connect(J1p3_1.BondCon2,B2. BondCon1) annotation (points=[10,0; 10.2,0], style(color=8)); connect(B3.BondCon1,J1p3_1. BondCon3) annotation (points=[-6.00057e-016, 10.2; -6.00057e-016,12.12; 0,12.12; 0,10], style(color=8)); connect(Hy2BG1.BondCon1,B1. BondCon1) annotation (points=[-30,0; -29.8, 0], style( color=8, rgbcolor={192,192,192}, fillColor=7, rgbfillColor={255,255,255}, fillPattern=1)); connect(BG2Hy1.BondCon1,B2. BondCon2) annotation (points=[30,0; 30,0], style( color=8, rgbcolor={192,192,192}, fillColor=7, rgbfillColor={255,255,255}, fillPattern=1)); annotation ( Diagram, Icon( Text(extent=[0,-48; 0,-88], string="%name"), Line(points=[-100,0; 90,0], style(color=1)), Polygon(points=[-40,20; -40,-20; 0,0; -40,20], style( color=1, rgbcolor={255,0,0}, fillColor=7, rgbfillColor={255,255,255}, fillPattern=1)), Polygon(points=[40,-20; 40,20; 0,0; 40,-20], style( color=1, rgbcolor={255,0,0}, fillColor=7, rgbfillColor={255,255,255}, fillPattern=1)), Line(points=[0,80; 0,0], style( color=74, rgbcolor={0,0,127}, fillColor=7, rgbfillColor={255,255,255}, fillPattern=1))), Documentation(info=" Hydraulic turbulent resistance model. The resistance value is specified in the inverse form of a hydraulic turbulent flow rate and is imported through a modulating signal port. ")); connect(port_A, Hy2BG1.port_A) annotation (points=[-100,0; -50,0], style( color=1, rgbcolor={255,0,0}, fillColor=7, rgbfillColor={255,255,255}, fillPattern=1)); connect(BG2Hy1.port_B, port_B) annotation (points=[50,0; 100,0], style( color=1, rgbcolor={255,0,0}, fillColor=7, rgbfillColor={255,255,255}, fillPattern=1)); connect(G1.BondCon1, B3.BondCon2) annotation (points=[-6.12303e-016,30; 6.12303e-016,30], style( color=8, rgbcolor={192,192,192}, fillColor=7, rgbfillColor={255,255,255}, fillPattern=1)); connect(G1.s, u) annotation (points=[5.51073e-016,49; 5.51073e-016,65.5; 0,65.5; 0,90], style( color=74, rgbcolor={0,0,127}, fillColor=7, rgbfillColor={255,255,255}, fillPattern=1)); end Valve; model Chamber "Container of compressible fluid" parameter Types.Capacitance C=1 "Hydraulic capacitance"; parameter Modelica.SIunits.Pressure p0 "Initial pressure in chamber"; annotation ( Icon( Text(extent=[0,100; 0,60], string="%name"), Ellipse(extent=[-50,-50; 50,50], style(fillColor=1)), Line(points=[-100,0; -50,0], style(color=1))), Diagram, Documentation(info=" Model of a container containing a compressible fluid. ")); Interfaces.Port_A port_A "Hydraulic connector" annotation (extent=[-110,-10; -90,10]); protected Interfaces.Hy2BG Hy2BG1 annotation (extent=[-50,-10; -30,10]); BondLib.Bonds.eBond B1 annotation (extent=[-30,-10; -10,10]); BondLib.Passive.C C1(C=C, e(start=p0)) annotation (extent=[-10,-10; 10,10]); equation connect(Hy2BG1.port_A, port_A) annotation (points=[-50,0; -100,0], style(color=1, rgbcolor={255,0,0})); connect(B1.fBondCon1, Hy2BG1.BondCon1) annotation (points=[-30,0; -30,0], style(color=8, rgbcolor={192,192,192})); connect(C1.BondCon1, B1.eBondCon1) annotation (points=[-10,0; -10,0], style(color=8, rgbcolor={192,192,192})); end Chamber; model Motor "Conversion of hydraulic to rotational energy" extends Interfaces.OnePort; parameter Real psi(unit="kg/(m.s)") = 1 "Motor induction constant"; annotation (Icon( Text(extent=[72,100; 72,60], string="%name"), Ellipse(extent=[-65,65; 65,-65], style(color=0)), Polygon(points=[-57,-30; -27,0; -57,30; -57,-30], style(color=0, fillColor=0)), Polygon(points=[57,-30; 27,0; 57,30; 57,-30], style(color=0, fillColor=0)), Line(points=[65,0; 90,0], style(color=1)), Line(points=[-100,0; -65,0], style(color=1)), Line(points=[0,-85; 0,-100], style(color=0)), Rectangle(extent=[-15,-65; 15,-85], style(color=0)), Line(points=[0,85; 0,100], style(color=0)), Rectangle(extent=[-15,65; 15,85], style(color=0))), Diagram); BondLib.Mechanical.Rotational.Interfaces.Flange_a flange_a "Left rotational connector" annotation (extent=[-10,90; 10,110]); BondLib.Mechanical.Rotational.Interfaces.Flange_b flange_b annotation (extent=[-10,-110; 10,-90]); BondLib.Mechanical.Rotational.Interfaces.Rot2BG Rot2BG1 annotation (extent=[-10,60; 10,80], rotation=-90); BondLib.Mechanical.Rotational.Interfaces.BG2Rot BG2Rot1 "Right rotational connector" annotation (extent=[-10,-80; 10,-60], rotation=-90); Interfaces.Hy2BG Hy2BG1 annotation (extent=[-90,-10; -70,10]); Interfaces.BG2Hy BG2Hy1 annotation (extent=[70,-10; 90,10]); protected BondLib.Passive.TF TF1(m=1/psi) annotation (extent=[-10,-10; 10,10]); BondLib.Bonds.Bond B1 annotation (extent=[-30,-10; -10,10]); BondLib.Bonds.Bond B2 annotation (extent=[10,-10; 30,10]); BondLib.Junctions.J1p3 J1p3_1 annotation (extent=[-50,-10; -30,10], rotation=90); BondLib.Bonds.Bond B3 annotation (extent=[-50,10; -30,30], rotation= -90); BondLib.Bonds.Bond B4 annotation (extent=[-50,-30; -30,-10], rotation=-90); BondLib.Bonds.Bond B5 annotation (extent=[30,10; 50,30], rotation=- 90); BondLib.Bonds.Bond B6 annotation (extent=[30,-30; 50,-10], rotation= -90); public BondLib.Junctions.J0p3 j0p3_1 annotation (extent=[30,-10; 50,10], rotation=-90); equation connect(Rot2BG1.Rot, flange_a) annotation (points=[-6.12303e-016,80; 0, 80; 0,100], style(color=0, rgbcolor={0,0,0})); connect(BG2Rot1.Rot, flange_b) annotation (points=[6.12303e-016,-80; 0, -80; 0,-100], style(color=0, rgbcolor={0,0,0})); connect(Hy2BG1.port_A, port_A) annotation (points=[-90,0; -100,0], style(color=1, rgbcolor={255,0,0})); connect(BG2Hy1.port_B, port_B) annotation (points=[90,0; 100,0], style( color=1, rgbcolor={255,0,0})); connect(B1.BondCon2,TF1. BondCon1) annotation (points=[-10,0; -10,0], style(color=8)); connect(TF1.BondCon2,B2. BondCon1) annotation (points=[10,0; 10.2,0], style(color=8)); connect(J1p3_1.BondCon3,B1. BondCon1) annotation (points=[-30, -6.12303e-016; -30,0; -29.8,0], style(color=8)); connect(B3.BondCon2,J1p3_1. BondCon2) annotation (points=[-40,10; -40, 10], style(color=8)); connect(J1p3_1.BondCon1,B4. BondCon1) annotation (points=[-40,-10; -40, -10.2], style(color=8)); connect(Hy2BG1.BondCon1, B3.BondCon1) annotation (points=[-70,0; -60,0; -60,40; -40,40; -40,29.8], style(color=8, rgbcolor={192,192,192})); connect(BG2Hy1.BondCon1, B4.BondCon2) annotation (points=[70,0; 60,0; 60,-40; -40,-40; -40,-30], style(color=8, rgbcolor={192,192,192})); connect(Rot2BG1.BondCon1, B5.BondCon1) annotation (points=[6.12303e-016, 60; 0,60; 0,50; 40,50; 40,29.8], style(color=8, rgbcolor={192,192, 192})); connect(B6.BondCon2, BG2Rot1.BondCon1) annotation (points=[40,-30; 40, -50; 0,-50; 0,-60; -6.12303e-016,-60], style(color=8, rgbcolor={ 192,192,192})); connect(j0p3_1.BondCon1, B5.BondCon2) annotation (points=[40,10; 40,10], style(color=8, rgbcolor={192,192,192})); connect(j0p3_1.BondCon3, B2.BondCon2) annotation (points=[30, -6.12303e-016; 30,0], style(color=8, rgbcolor={192,192,192})); connect(j0p3_1.BondCon2, B6.BondCon1) annotation (points=[40,-10; 40, -10.2], style(color=8, rgbcolor={192,192,192})); end Motor; end Passive; package Sensors "Sensor models of the 1D hydraulic library" annotation (Icon( Text( extent=[-120,118; 120,69], string="%name", style(color=1)), Rectangle(extent=[-100,-100; 80,50], style(fillColor=30, fillPattern= 1)), Polygon(points=[-100,50; -80,70; 100,70; 80,50; -100,50], style( fillColor=30, fillPattern=1)), Polygon(points=[100,70; 100,-80; 80,-100; 80,50; 100,70], style( fillColor=30, fillPattern=1)), Text( extent=[-85,35; 65,-85], string="Library", style(color=3)))); end Sensors; package Servovalves "Models of servovalves" model Servovalve "Servo valve built from wrapped bond graph technology" parameter Modelica.SIunits.VolumeFlowRate k=1 "Hydraulic valve flow constant"; parameter Real x0=0 "Percentage of mechanical valve underlap"; parameter Modelica.SIunits.Pressure pS=1 "System pressure"; parameter Modelica.SIunits.Pressure p0=0 "Environmental pressure"; Modelica.Blocks.Interfaces.RealInput x "Position signal connector" annotation (extent=[-108,-10; -88,10]); Interfaces.Port_A port_A "Left hydraulic connector" annotation (extent=[-90,-110; -70,-90]); Interfaces.Port_B port_B "Right hydraulic connector" annotation (extent=[70,-110; 90,-90]); BondLib.Hydraulic.Modulator M1( k=k, x0=x0) annotation (extent=[-80,10; -60,-10]); Passive.Valve mG2 annotation (extent=[-60,60; -20,20]); Passive.Valve mG3 annotation (extent=[60,60; 20,20]); Passive.Valve mG1 annotation (extent=[-20,-60; -60,-20]); Passive.Valve mG4 annotation (extent=[20,-60; 60,-20]); Passive.Tank tank annotation (extent=[-20,10; 20,50]); Sources.PressureSource pressureSource(pS=pS) annotation (extent=[-20,-90; 20,-50], rotation=-90); Passive.Tank tank1 annotation (extent=[10,-70; -30,-110], rotation=90); equation annotation ( Icon( Polygon(points=[-80,-90; -32,-60; -32,-42; -40,-42; -40,-2; -8,-2; -8, -38; 8,-38; 8,-2; 40,-2; 40,-42; 32,-42; 32,-60; 80,-90; 74, -94; 20,-60; 20,-42; -20,-42; -20,-60; -72,-94; -80,-90], style(pattern=0, fillColor=65)), Polygon(points=[-56,66; -56,38; -40,38; -40,2; -8,2; -8,38; 8,38; 8,2; 40,2; 40,38; 56,38; 56,66; 40,66; 40,42; 8,42; 8,66; -8,66; -8,42; -40,42; -40,66; -56,66], style( pattern=0, fillColor=65)), Line(points=[-108,14; -88,14], style(color=0)), Text( extent=[-104,24; -94,14], string="x", style(color=0)), Rectangle(extent=[-88,2; 100,-2], style(fillColor=73)), Rectangle(extent=[-8,38; 8,-38], style(fillColor=73)), Rectangle(extent=[-56,38; -40,-38], style(fillColor=73)), Rectangle(extent=[40,38; 56,-38], style(fillColor=73)), Line(points=[-80,4; -68,4; -68,42; -56,42; -56,66]), Line(points=[-40,66; -40,42; -8,42; -8,66]), Line(points=[8,66; 8,42; 40,42; 40,66]), Line(points=[56,66; 56,42; 68,42; 68,4; 80,4]), Line(points=[-80,-4; -68,-4; -68,-42; -32,-42; -32,-60; -80,-90]), Line(points=[80,-4; 68,-4; 68,-42; 32,-42; 32,-60; 80,-90]), Line(points=[-72,-94; -20,-60; -20,-42; 20,-42; 20,-60; 74,-94]), Line(points=[-48,48; -48,72], style(color=0)), Line(points=[48,48; 48,72], style(color=0)), Line(points=[0,72; 0,48], style(color=0)), Text( extent=[-56,86; -40,74], string="p0", style(color=0)), Text( extent=[40,86; 56,74], string="p0", style(color=0)), Text( extent=[-8,86; 8,74], style(color=0), string="pS"), Line(points=[-34,36; -46,46], style(color=0)), Line(points=[-4,44; -14,36], style(color=0)), Line(points=[4,44; 14,36], style(color=0)), Line(points=[34,36; 46,46], style(color=0)), Text( extent=[-38,36; -28,28], string="q2", style(color=0)), Text( extent=[-22,36; -12,28], string="q1", style(color=0)), Text( extent=[12,36; 22,28], string="q4", style(color=0)), Text( extent=[28,36; 38,28], string="q3", style(color=0)), Line(points=[26,-40; 26,-58], style(color=0)), Line(points=[-26,-58; -26,-40], style(color=0)), Text( extent=[20,-32; 32,-40], string="qL2", style(color=0)), Text( extent=[-32,-32; -20,-40], string="qL1", style(color=0)), Line(points=[-50,68; -48,72; -46,68], style(color=0)), Line(points=[-2,52; 0,48; 2,52], style(color=0)), Line(points=[46,68; 48,72; 50,68], style(color=0)), Line(points=[-44,42; -46,46; -42,44], style(color=0)), Line(points=[-14,40; -14,36; -10,36], style(color=0)), Line(points=[12,40; 14,36; 10,36], style(color=0)), Line(points=[42,44; 46,46; 44,42], style(color=0)), Line(points=[24,-44; 26,-40; 28,-44], style(color=0)), Line(points=[-28,-54; -26,-58; -24,-54], style(color=0)), Text(extent=[-80,132; 80,84], string="%name"), Line(points=[-92,16; -88,14; -92,12], style(color=0)), Text( extent=[-30,-8; -14,-20], string="p1", style(color=0)), Text( extent=[18,-8; 34,-20], string="p2", style(color=0))), Documentation(info=" The servo valve model described here has a signal input, the position of the tongue, x, and two bondgraphic outputs: the two load flows, qL1 and qL2. The bondgraphic interface is designed such that the servo valve can be directly connected to the hydraulic motor without either a set of bonds or a set of junctions in between.
The two chambers of the servo valve are at the pressures p1 and p2, respectively.
The four valve flows, q1, q2, q3, and q4, are assumed to be turbulent flows. The valve flows are modulated by the tongue position. The modulation of the four hydraulic conductors representing the turbulent flows is computed by the Modulator block. "),Diagram( Text( extent=[-104,24; -94,14], string="x", style(color=0)), Line(points=[-108,14; -88,14], style(color=0)), Line(points=[-91,16; -87,14; -91,12], style(color=0)))); connect(M1.u, x) annotation (points=[-80,0; -98,0], style(color=74, rgbcolor={0,0,127})); connect(mG4.port_B, port_B) annotation (points=[60,-40; 80,-40; 80,-100], style(color=1, rgbcolor={255,0,0})); connect(mG4.port_B, mG3.port_A) annotation (points=[60,-40; 80,-40; 80, 40; 60,40], style(color=1, rgbcolor={255,0,0})); connect(mG1.port_B, port_A) annotation (points=[-60,-40; -80,-40; -80, -100], style(color=1, rgbcolor={255,0,0})); connect(mG1.port_B, mG2.port_A) annotation (points=[-60,-40; -80,-40; -80,40; -60,40], style(color=1, rgbcolor={255,0,0})); connect(mG2.port_B, mG3.port_B) annotation (points=[-20,40; 20,40], style(color=1, rgbcolor={255,0,0})); connect(mG1.port_A, mG4.port_A) annotation (points=[-20,-40; 20,-40], style(color=1, rgbcolor={255,0,0})); connect(tank.port_B, mG2.port_B) annotation (points=[0,30; 0,40; -20,40], style(color=1, rgbcolor={255,0,0})); connect(pressureSource.port_A, mG1.port_A) annotation (points=[ -1.22461e-015,-50; -1.22461e-015,-40; -20,-40], style(color=1, rgbcolor={255,0,0})); connect(tank1.port_B, pressureSource.port_B) annotation (points=[-10, -90; 1.22461e-015,-90], style(color=1, rgbcolor={255,0,0})); connect(M1.y2, mG2.u) annotation (points=[-60,6; -40,6; -40,22], style( color=74, rgbcolor={0,0,127})); connect(M1.y2, mG4.u) annotation (points=[-60,6; -20,6; -20,0; 40,0; 40, -22], style(color=74, rgbcolor={0,0,127})); connect(M1.y1, mG1.u) annotation (points=[-60,-6; -40,-6; -40,-22], style(color=74, rgbcolor={0,0,127})); connect(M1.y1, mG3.u) annotation (points=[-60,-6; 20,-6; 20,6; 40,6; 40, 22], style(color=74, rgbcolor={0,0,127})); end Servovalve; end Servovalves; package Sources "Source models of the 1D hydraulic library" annotation (Icon( Text( extent=[-120,118; 120,69], string="%name", style(color=1)), Rectangle(extent=[-100,-100; 80,50], style(fillColor=30, fillPattern= 1)), Polygon(points=[-100,50; -80,70; 100,70; 80,50; -100,50], style( fillColor=30, fillPattern=1)), Polygon(points=[100,70; 100,-80; 80,-100; 80,50; 100,70], style( fillColor=30, fillPattern=1)), Text( extent=[-85,35; 65,-85], string="Library", style(color=3)))); model PressureSource "Source of constant pressure" extends Interfaces.OnePort; parameter Modelica.SIunits.Pressure pS=1 "Service pressure"; annotation ( Icon( Line(points=[-90,0; 90,0], style(color=1, rgbcolor={255,0,0})), Ellipse(extent=[-10,30; 50,-30], style( color=1, rgbcolor={255,0,0}, fillColor=7, rgbfillColor={255,255,255}, fillPattern=1)), Ellipse(extent=[-50,30; 10,-30], style( color=1, rgbcolor={255,0,0}, fillColor=7, rgbfillColor={255,255,255}, fillPattern=1)), Text( extent=[-86,26; -54,-2], style( color=1, rgbcolor={255,0,0}, fillColor=7, rgbfillColor={255,255,255}, fillPattern=1), string="+"), Text( extent=[54,28; 86,0], style( color=1, rgbcolor={255,0,0}, fillColor=7, rgbfillColor={255,255,255}, fillPattern=1), string="-")), Diagram, Documentation(info=" Source of constant pressure. ")); protected BondLib.Junctions.J1p3 J1p3_1 annotation (extent=[-10,10; 10,-10]); BondLib.Bonds.Bond B1 annotation (extent=[-30,-10; -10,10]); BondLib.Bonds.Bond B2 annotation (extent=[10,-10; 30,10]); public BondLib.Bonds.fBond B3 annotation (extent=[-10,10; 10,30], rotation=-90); protected Interfaces.BG2Hy BG2Hy1 annotation (extent=[40,-10; 60,10]); Interfaces.Hy2BG Hy2BG1 annotation (extent=[-50,-10; -30,10]); BondLib.Sources.Se PS(e0=pS) annotation (extent=[-10,30; 10,50], rotation=-270); equation connect(B1.BondCon2,J1p3_1. BondCon1) annotation (points=[-10,0; -10,0], style(color=8)); connect(J1p3_1.BondCon2,B2. BondCon1) annotation (points=[10,0; 10.2,0], style(color=8)); connect(B3.fBondCon1, J1p3_1.BondCon3) annotation (points=[6.12303e-016, 10; 0,10], style( color=8, rgbcolor={192,192,192}, fillColor=7, rgbfillColor={255,255,255}, fillPattern=1)); connect(Hy2BG1.BondCon1, B1.BondCon1) annotation (points=[-30,0; -29.8, 0], style( color=8, rgbcolor={192,192,192}, fillColor=7, rgbfillColor={255,255,255}, fillPattern=1)); connect(Hy2BG1.port_A, port_A) annotation (points=[-50,0; -100,0], style( color=1, rgbcolor={255,0,0}, fillColor=7, rgbfillColor={255,255,255}, fillPattern=1)); connect(BG2Hy1.BondCon1, B2.BondCon2) annotation (points=[40,0; 30,0], style( color=8, rgbcolor={192,192,192}, fillColor=7, rgbfillColor={255,255,255}, fillPattern=1)); connect(BG2Hy1.port_B, port_B) annotation (points=[60,0; 100,0], style( color=1, rgbcolor={255,0,0}, fillColor=7, rgbfillColor={255,255,255}, fillPattern=1)); connect(PS.BondCon1, B3.eBondCon1) annotation (points=[1.83691e-015,30; -6.12303e-016,30], style( color=8, rgbcolor={192,192,192}, fillColor=7, rgbfillColor={255,255,255}, fillPattern=1)); end PressureSource; end Sources; package Types "Types used by the 1D hydraulic library" annotation (Icon( Rectangle(extent=[-100,-100; 80,50], style( color=42, rgbcolor={127,0,0}, fillColor=30, rgbfillColor={235,235,235}, fillPattern=1)), Polygon(points=[-100,50; -80,70; 100,70; 80,50; -100,50], style( color=42, rgbcolor={127,0,0}, fillColor=30, rgbfillColor={235,235,235}, fillPattern=1)), Polygon(points=[100,70; 100,-80; 80,-100; 80,50; 100,70], style( color=42, rgbcolor={127,0,0}, fillColor=30, rgbfillColor={235,235,235}, fillPattern=1)), Text( extent=[-85,35; 65,-85], string="Library", style(color=42, rgbcolor={127,0,0})), Text( extent=[-120,122; 120,73], string="%name", style(color=1)))); type Conductance = Real ( final quantity="Conductance", final min=0.0, final unit="m4.s/kg", displayUnit="m4.s/kg"); type Capacitance = Real ( final quantity="Capacitance", final min=0.0, final unit="m4.s2/kg", displayUnit="m4.s2/kg"); end Types; package Examples "Examples of the 1D hydraulic library" annotation (Icon( Rectangle(extent=[-100,-100; 80,50], style( color=0, rgbcolor={0,0,0}, fillColor=30, rgbfillColor={235,235,235}, fillPattern=1)), Polygon(points=[-100,50; -80,70; 100,70; 80,50; -100,50], style( color=0, rgbcolor={0,0,0}, fillColor=30, rgbfillColor={235,235,235}, fillPattern=1)), Polygon(points=[100,70; 100,-80; 80,-100; 80,50; 100,70], style( color=0, rgbcolor={0,0,0}, fillColor=30, rgbfillColor={235,235,235}, fillPattern=1)), Text( extent=[-118,114; 122,65], string="%name", style(color=1)), Text( extent=[-85,63; 65,-57], string="Sample", style(color=0)), Text( extent=[-97,15; 78,-106], string="Programs", style(color=0)))); model HydraulicControl "A hydraulic control system" parameter Modelica.SIunits.Pressure pS=0.137e8 "Service pressure"; parameter Modelica.SIunits.Pressure p0=1.0132e5 "Standard atmospheric pressure"; annotation ( Coordsys(extent=[-100,-100; 300,100], scale=0.1), Icon( Rectangle(extent=[10,100; 210,-100], style( color=0, thickness=2, fillColor=9)), Text( extent=[66,46; 162,18], style( color=0, thickness=2, fillColor=9, fillPattern=1), string="A hydraulic"), Text( extent=[26,32; 194,-14], style( color=0, thickness=2, fillColor=9, fillPattern=1), string="position control circuit")), Documentation(info=" This is a hydraulic position control circuit. From the outside, the system is described as a simple block diagram. Yet, three of the blocks have been modeled internally using bond graph technology. The development of this control circuit has been described in:
References:
Experimentation:
Simulate the bond graph during 0.3 second.
Simulation Results:
"),Diagram,
experiment(StopTime=0.3),
experimentSetupOutput);
Modelica.Blocks.Sources.Constant ThSet annotation (extent=[-80,0; -40,
40]);
Modelica.Blocks.Math.Feedback Feedback1 annotation (extent=[-20,0; 20,
40]);
Modelica.Blocks.Nonlinear.Limiter Limiter1 annotation (extent=[40,0; 80,
40]);
BondLib.Hydraulic.Servo Servo1(
ls=1e-12,
bs=2,
ms=0.01,
ks=400,
psis=0.005,
rs=1.25e-5) annotation (extent=[100,0; 140,40]);
Modelica.Blocks.Continuous.Integrator Integrator1 annotation (extent=[220,-40;
260,0]);
Servovalves.Servovalve Servovalve1(
k=0.248e-6,
x0=0.05,
pS=pS,
p0=p0) annotation (extent=[160,0; 200,40]);
Motors.Hydromotor Hydromotor1(
ce=0.737e-12,
ci=0.737e-13,
c1=5.857e13,
psi=0.575e-5,
rhom=1.5,
jm=0.08,
pS=pS,
p0=p0) annotation (extent=[160,-38; 200,2]);
equation
connect(ThSet.y,Feedback1.u1) annotation (points=[-38,20;
-16,20], style(color=3));
connect(Integrator1.y,Feedback1.u2) annotation (points=[262,-20;
280,-20; 280,-80; 0,-80; 0,4], style(color=74, rgbcolor={0,0,
156}));
connect(Feedback1.y,Limiter1. u) annotation (points=[18,20; 36,20], style(
color=74, rgbcolor={0,0,127}));
connect(Limiter1.y,Servo1. u) annotation (points=[82,20; 96,20], style(
color=74, rgbcolor={0,0,127}));
connect(Servovalve1.x, Servo1.y) annotation (points=[160.4,20; 142,20],
style(color=74, rgbcolor={0,0,127}));
connect(Servovalve1.port_A, Hydromotor1.port_A) annotation (points=[164,
0; 164,0.461538], style(color=1, rgbcolor={255,0,0}));
connect(Servovalve1.port_B, Hydromotor1.port_B) annotation (points=[196,
0; 196,0.461538], style(color=1, rgbcolor={255,0,0}));
connect(Hydromotor1.wm, Integrator1.u) annotation (points=[200.4,
-19.5385; 206.2,-19.5385; 206.2,-20; 216,-20], style(color=74,
rgbcolor={0,0,127}));
end HydraulicControl;
end Examples;
end Hydraulic;
annotation (uses(Modelica(version="2.2.1"), BondLib(version="2.3"),
HyLibLight(version="2.3.1")));
end mmps_hw9;