Changeset 713
- Timestamp:
- 10/16/07 22:05:39 (14 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
Modelica/branches/maintenance/2.2.2/Modelica/Electrical/Machines.mo
r702 r713 1 within Modelica.Electrical; 1 within ; 2 // Modelica.Electrical; 3 2 4 3 5 package Machines "Library for electric machines" 4 6 extends Modelica.Icons.Library2; 5 annotation ( 6 version="1.8.9 ", versionDate="2007-10-15",7 annotation (uses(Modelica(version="2.2.2")), 8 version="1.8.9a", versionDate="2007-10-16", 7 9 Settings(NewStateSelection=true, Evaluate=true), 8 10 preferedView="info", Documentation(info="<HTML> … … 127 129 <li> v1.8.9 2007/10/15 Anton Haumer<br> 128 130 solved a bug with replaceable airgap / partial machines</li> 131 <li> v1.8.9a 2007/10/16 Anton Haumer<br> 132 removed replaceable from airgaps<br> 133 removed cardinality from support, using a boolean parameter</li> 129 134 </ul> 130 135 </HTML>"), … … 1512 1517 70; -20,83], style(color=5, rgbcolor={255,0,255})); 1513 1518 connect(plugToPin_p3.plug_p, plugToPin_p2.plug_p) 1514 annotation (points=[-30,-12; -25,-12; -25,-4; -20,-4; -20,- 20; -10,-20],1519 annotation (points=[-30,-12; -25,-12; -25,-4; -20,-4; -20,-12; -10,-12], 1515 1520 style(color=3, rgbcolor={0,0,255})); 1516 1521 connect(plugToPin_p2.plug_p,plugToPin_p1. plug_p) 1517 annotation (points=[-10,-12; -5,-12; -5,-4; 0,-4; 0,- 20; 10,-20],1522 annotation (points=[-10,-12; -5,-12; -5,-4; 0,-4; 0,-12; 10,-12], 1518 1523 style(color=3, rgbcolor={0,0,255})); 1519 1524 connect(plugToPin_p3.pin_p, SineVoltage1.n) annotation (points=[-30,-8; … … 1921 1926 final idq_rs = airGapS.i_rs, 1922 1927 final idq_rr = airGapS.i_rr); 1923 replaceable Components.AirGapS airGapS(final p=p, final m=3, final Lm=Lm) extends 1924 Components.PartialAirGap 1928 Components.AirGapS airGapS( final p=p, final m=3, final Lm=Lm) 1925 1929 annotation (extent=[-10,-10; 10,10], rotation=-90); 1926 1930 parameter Modelica.SIunits.Inductance Lm=3*sqrt(1 - 0.0667)/(2*pi*fNominal) … … 2054 2058 final idq_rs = airGapS.i_rs, 2055 2059 final idq_rr = airGapS.i_rr); 2056 replaceable Components.AirGapS airGapS(final p=p, final m=3, final Lm=Lm) extends 2057 Components.PartialAirGap 2060 Components.AirGapS airGapS( final p=p, final m=3, final Lm=Lm) 2058 2061 annotation (extent=[-10,-10; 10,10], rotation=-90); 2059 2062 parameter Modelica.SIunits.Inductance Lm=3*sqrt(1 - 0.0667)/(2*pi*fNominal) … … 2327 2330 final idq_rs = airGapR.i_rs, 2328 2331 final idq_rr = airGapR.i_rr); 2329 replaceable Components.AirGapR airGapR(final p=p, final m=3, final Lmd=Lmd, final Lmq=Lmq) extends 2330 Components.PartialAirGap 2332 Components.AirGapR airGapR( final p=p, final m=3, final Lmd=Lmd, final Lmq=Lmq) 2331 2333 annotation (extent=[-10,-10; 10,10], rotation=-90); 2332 2334 parameter Modelica.SIunits.Voltage V0=112.3 … … 2533 2535 final idq_rs = airGapR.i_rs, 2534 2536 final idq_rr = airGapR.i_rr); 2535 replaceable Components.AirGapR airGapR(final p=p, final m=3, final Lmd=Lmd, final Lmq=Lmq) extends 2536 Components.PartialAirGap 2537 Components.AirGapR airGapR( final p=p, final m=3, final Lmd=Lmd, final Lmq=Lmq) 2537 2538 annotation (extent=[-10,-10; 10,10], rotation=-90); 2538 2539 parameter Modelica.SIunits.Inductance Lmd=1.5/(2*pi*fNominal) … … 2786 2787 final idq_rs = airGapR.i_rs, 2787 2788 final idq_rr = airGapR.i_rr); 2788 replaceable Components.AirGapR airGapR(final p=p, final m=3, final Lmd=Lmd, final Lmq=Lmq) extends 2789 Components.PartialAirGap 2789 Components.AirGapR airGapR( final p=p, final m=3, final Lmd=Lmd, final Lmq=Lmq) 2790 2790 annotation (extent=[-10,-10; 10,10], rotation=-90); 2791 2791 parameter Modelica.SIunits.Inductance Lmd=2.9/(2*pi*fNominal) … … 3004 3004 extends Machines.Interfaces.PartialBasicDCMachine( 3005 3005 final TurnsRatio=(VaNominal-Ra*IaNominal)/(Modelica.SIunits.Conversions.from_rpm(rpmNominal)*Le*IeNominal)); 3006 replaceable Components.AirGapDC airGapDC(final TurnsRatio=TurnsRatio, final Le=Le) extends3007 Components.PartialAirGapDCannotation (extent=[-10,-10; 10,10], rotation=-90);3006 Components.AirGapDC airGapDC( final TurnsRatio=TurnsRatio, final Le=Le) 3007 annotation (extent=[-10,-10; 10,10], rotation=-90); 3008 3008 protected 3009 3009 final parameter Modelica.SIunits.Inductance Le=1 … … 3115 3115 extends Machines.Interfaces.PartialBasicDCMachine( 3116 3116 final TurnsRatio=(VaNominal-Ra*IaNominal)/(Modelica.SIunits.Conversions.from_rpm(rpmNominal)*Le*IeNominal)); 3117 replaceable Components.AirGapDC airGapDC(final TurnsRatio=TurnsRatio, final Le=Le) extends3118 Components.PartialAirGapDCannotation (extent=[-10,-10; 10,10], rotation=-90);3117 Components.AirGapDC airGapDC( final TurnsRatio=TurnsRatio, final Le=Le) 3118 annotation (extent=[-10,-10; 10,10], rotation=-90); 3119 3119 parameter Modelica.SIunits.Current IeNominal=1 3120 3120 "nominal excitation current" … … 3256 3256 extends Machines.Interfaces.PartialBasicDCMachine(rpmNominal = 1410, 3257 3257 final TurnsRatio=(VaNominal-(Ra+Re)*IaNominal)/(Modelica.SIunits.Conversions.from_rpm(rpmNominal)*Le*IaNominal)); 3258 replaceable Components.AirGapDC airGapDC(final TurnsRatio=TurnsRatio, final Le=Le) extends3259 Components.PartialAirGapDCannotation (extent=[-10,-10; 10,10], rotation=-90);3258 Components.AirGapDC airGapDC( final TurnsRatio=TurnsRatio, final Le=Le) 3259 annotation (extent=[-10,-10; 10,10], rotation=-90); 3260 3260 parameter Modelica.SIunits.Resistance Re=0.01 3261 3261 "warm field excitation resistance" … … 3363 3363 rgbcolor={0,0,0}, 3364 3364 smooth=0)); 3365 connect(airGapDC.pin_ap, la.n) annotation (points=[10,10; 10,60 ; 10,60],3365 connect(airGapDC.pin_ap, la.n) annotation (points=[10,10; 10,60], 3366 3366 style( 3367 3367 color=3, … … 5830 5830 constant Integer m=3 "number of phases"; 5831 5831 parameter Integer p(min=1) "number of pole pairs"; 5832 parameter Boolean useSupport=false "use support or fixed housing" 5833 annotation(Evaluate=true); 5832 5834 Modelica.Blocks.Interfaces.RealOutput rotorAngle(redeclare type 5833 5835 SignalType = … … 5855 5857 Modelica.Blocks.Routing.DeMultiplex2 deMultiplex2(final n1=1, 5856 5858 final n2=1) annotation (extent=[60,-20; 80,0]); 5857 Modelica.Mechanics.Rotational.Interfaces.Flange_a support 5859 Modelica.Mechanics.Rotational.Interfaces.Flange_a support if useSupport 5858 5860 "support at which the reaction torque is acting" 5859 5861 annotation (extent=[90,90; 110,110]); 5860 protected 5861 Interfaces.Adapter adapter(final bearingConnected=cardinality(support) > 1) 5862 annotation (extent=[80,70; 60,90]); 5862 Modelica.Mechanics.Rotational.Fixed fixed if (not useSupport) 5863 annotation (extent=[90,70; 110,90]); 5863 5864 annotation ( 5864 5865 Diagram, … … 5921 5922 rotating the space phasor to the rotor-fixed coordinate system and calculating the angle of this space phasor. 5922 5923 <p> 5923 The sensor's housing is implicitely fixed.<br> 5924 Since the machine's stator also implicitely fixed, the angle at the flange 5925 is equal to the angle of the machine's rotor against the stator. 5924 The sensor's housing can be implicitely fixed (useSupport=false).<br> 5925 If the machine's stator also implicitely fixed (useSupport=false), the angle at the flange 5926 is equal to the angle of the machine's rotor against the stator.<br> 5927 Otherwise, the sensor's support has to be connected to the machine's support. 5926 5928 </p> 5927 5929 </HTML>")); … … 5954 5956 connect(relativeAngleSensor.flange_b, flange) annotation (points=[20,80; 5955 5957 0,80; 0,100], style(color=0, rgbcolor={0,0,0})); 5956 connect(relativeAngleSensor.flange_a, adapter.flange_b) 5957 annotation (points=[40,80; 60,80], style(color=0, rgbcolor={0,0,0})); 5958 connect(adapter.flange_a, support) annotation (points=[80,80; 100,80; 100, 5959 100], style(color=0, rgbcolor={0,0,0})); 5958 connect(relativeAngleSensor.flange_a, fixed.flange_b) annotation (points=[40, 5959 80; 100,80], style( 5960 color=0, 5961 rgbcolor={0,0,0}, 5962 smooth=0)); 5963 connect(relativeAngleSensor.flange_a, support) annotation (points=[40,80; 60, 5964 80; 60,100; 100,100], style( 5965 color=0, 5966 rgbcolor={0,0,0}, 5967 smooth=0)); 5960 5968 end RotorAngle; 5961 5969 end Sensors; … … 6608 6616 end SpacePhasor; 6609 6617 6610 model Adapter6611 "From Modelica.Mechanics.Rotational.Interfaces.TwoFlangesAndBearingH"6612 extends Modelica.Mechanics.Rotational.Interfaces.TwoFlanges;6613 parameter Boolean bearingConnected "Choose wether bearing is connected";6614 annotation (Icon(Rectangle(extent=[-90, 10; 90, -10], style(color=8,6615 fillColor=8)), Text(extent=[0, 60; 0, 20], string="%name")),6616 Documentation(info="<html>6617 From Modelica.Mechanics.Rotational.Interfaces.TwoFlangesAndBearingH:<br>6618 If bearingConnected = true torque is given from flange_a to flange_b<br>6619 If bearingConnected = false flange_a is fixed6620 </html>"));6621 equation6622 flange_a.phi = flange_b.phi;6623 if bearingConnected then6624 0 = flange_a.tau + flange_b.tau;6625 else6626 0 = flange_a.phi;6627 end if;6628 end Adapter;6629 6618 6630 6619 partial model PartialBasicMachine "Partial model for all machines" 6631 6620 parameter Modelica.SIunits.Inertia J_Rotor "rotor's moment of inertia"; 6621 parameter Boolean useSupport=false "use support or fixed stator" 6622 annotation(Evaluate=true); 6632 6623 parameter Modelica.SIunits.Inertia J_Stator=J_Rotor 6633 "stator's moment of inertia"; 6634 output Modelica.SIunits.Angle phi_mechanical = flange_a.phi-support.phi 6624 "stator's moment of inertia" 6625 annotation(Dialog(enable=useSupport)); 6626 output Modelica.SIunits.Angle phi_mechanical = flange_a.phi-internalSupport.phi 6635 6627 "mechanical angle of rotor against stator"; 6636 6628 output Modelica.SIunits.AngularVelocity w_mechanical = der(phi_mechanical) … … 6646 6638 Modelica.Mechanics.Rotational.Inertia inertiaRotor(final J=J_Rotor) 6647 6639 annotation (extent=[80,10; 60,-10], rotation=-180); 6648 Modelica.Mechanics.Rotational.Interfaces.Flange_a support 6640 Modelica.Mechanics.Rotational.Interfaces.Flange_a support if useSupport 6649 6641 "support at which the reaction torque is acting" 6650 6642 annotation (extent=[90,-110; 110,-90]); 6651 Modelica.Mechanics.Rotational.Inertia inertiaStator(final J=J_Stator) 6643 Modelica.Mechanics.Rotational.Inertia inertiaStator(final J=J_Stator) if useSupport 6652 6644 annotation (extent=[80,-90; 60,-110], rotation=-180); 6645 Modelica.Mechanics.Rotational.Fixed fixed if (not useSupport) 6646 annotation (extent=[30,-110; 50,-90]); 6653 6647 protected 6654 Machines.Interfaces.Adapter adapter(final bearingConnected=cardinality(support) > 1)6655 annotation (extent=[30,-90; 50,-110], rotation=180);6656 6648 Modelica.Mechanics.Rotational.Interfaces.Flange_b internalSupport 6657 6649 annotation (extent=[19,-101; 21,-99]); … … 6703 6695 </ul> 6704 6696 Besides the mechanical connector <i>flange_a</i> (i.e. the shaft) the machines have a second mechanical connector <i>support</i>.<br> 6705 If nothing is connected to <i>support</i>, it is assumed that the stator is fixed.<br>6697 If <i>useSupport</i> = false, it is assumed that the stator is fixed.<br> 6706 6698 Otherwise reaction torque (i.e. airGap torque, minus acceleration torque for stator's moment of inertia) can be measured at <i>support</i>.<br> 6707 One may also fix the the shaft and let rotate the stator; parameter Js is only of importance when the stator is rotating.<br> 6708 <b>Take care:</b> Even if You connect only a sensor (e.g. Modelica.Mechanics.Rotational.Sensors.RelAngleSensor or Machines.Sensors.RotorDisplacementAngle) to the <i>support</i>, You have to fix the <i>support</i>! 6699 One may also fix the the shaft and let rotate the stator; parameter Js is only of importance when the stator is rotating. 6709 6700 </HTML>"), 6710 6701 Diagram); … … 6715 6706 connect(inertiaStator.flange_b, support) 6716 6707 annotation (points=[80,-100; 100,-100], style(color=0, rgbcolor={0,0,0})); 6717 connect(adapter.flange_a, inertiaStator.flange_a) annotation (points=[50,-100; 6718 60,-100], 6719 style(color=0, rgbcolor={0,0,0})); 6720 connect(adapter.flange_b, internalSupport) 6721 annotation (points=[30,-100; 20,-100], style(color=0, rgbcolor={0,0,0})); 6708 connect(internalSupport, fixed.flange_b) annotation (points=[20,-100; 40,-100], 6709 style( 6710 color=0, 6711 rgbcolor={0,0,0}, 6712 smooth=0)); 6713 connect(internalSupport, inertiaStator.flange_a) annotation (points=[20,-100; 6714 20,-96; 60,-96; 60,-100], style( 6715 color=0, 6716 rgbcolor={0,0,0}, 6717 smooth=0)); 6722 6718 end PartialBasicMachine; 6723 6719 … … 6788 6784 rgbcolor={0,0,255}, 6789 6785 smooth=0)); 6790 connect(spacePhasorS.ground,spacePhasorS. zero) annotation (points=[-10,20; 6786 connect(spacePhasorS.ground,spacePhasorS. zero) annotation (points=[-10,20; 6791 6787 -10,14; -6.12323e-016,14; -6.12323e-016,20], style( 6792 6788 color=3,
