From 4461da7d2969d2b22b10d3cb8b8eb73cbfead78b Mon Sep 17 00:00:00 2001 From: Dag Date: Mon, 2 Feb 2004 11:32:16 +0000 Subject: [PATCH] Modelica standard library, version 1.5, release date December 16, 2002. git-svn-id: https://svn.modelica.org/projects/Modelica/trunk@10 7ce873d0-865f-4ce7-a662-4bb36ea78beb --- Blocks/Continuous.mo | 1100 ++-- Blocks/Examples.mo | 301 + Blocks/Interfaces.mo | 776 ++- Blocks/Math.mo | 2614 ++++---- Blocks/Nonlinear.mo | 301 +- Blocks/Sources.mo | 2993 ++++----- Blocks/package.mo | 74 +- Constants.mo | 130 +- Documentation/ChangeNotes1.5.html | 347 + Electrical/Analog/Basic.mo | 552 +- Electrical/Analog/Examples/CauerFilter.mo | 577 +- Electrical/Analog/Examples/ChuaCircuit.mo | 86 +- .../Analog/Examples/DifferenceAmplifier.mo | 157 +- Electrical/Analog/Examples/NandGate.mo | 101 +- Electrical/Analog/Examples/Utilities/Nand.mo | 199 +- .../Examples/Utilities/NonlinearResistor.mo | 9 +- .../Analog/Examples/Utilities/RealSwitch.mo | 28 +- .../Analog/Examples/Utilities/Transistor.mo | 30 +- .../Analog/Examples/Utilities/package.mo | 29 +- Electrical/Analog/Examples/package.mo | 26 +- Electrical/Analog/Ideal.mo | 971 ++- Electrical/Analog/Interfaces.mo | 525 +- Electrical/Analog/Lines.mo | 439 +- Electrical/Analog/Semiconductors.mo | 251 +- Electrical/Analog/Sensors.mo | 108 +- Electrical/Analog/Sources.mo | 3199 +++++---- Electrical/Analog/package.mo | 28 +- Electrical/package.mo | 35 +- Icons.mo | 483 +- Images/ControlledIdealIntermediateSwitch1.png | Bin 0 -> 1871 bytes Images/ControlledIdealIntermediateSwitch2.png | Bin 0 -> 2820 bytes ...anslational.examples.InitialConditions.gif | Bin 0 -> 11637 bytes Images/IdealIntermediateSwitch1.png | Bin 0 -> 1742 bytes Images/IdealIntermediateSwitch2.png | Bin 0 -> 2714 bytes Images/PreLoad.gif | Bin 0 -> 8889 bytes Images/PreLoad.png | Bin 0 -> 5510 bytes Images/Preload2.gif | Bin 0 -> 3289 bytes Images/Preload2.png | Bin 0 -> 4790 bytes Images/Preload3.png | Bin 0 -> 12304 bytes Images/Preload4.png | Bin 0 -> 10088 bytes Images/Stribeck.gif | Bin 0 -> 9403 bytes Images/_readme.txt | 2 + Images/drive1.gif | Bin 0 -> 3065 bytes Images/drive2.gif | Bin 0 -> 5551 bytes Images/drive3.gif | Bin 0 -> 3187 bytes Images/drive4.gif | Bin 0 -> 4027 bytes Images/driveAxis.gif | Bin 0 -> 4709 bytes Images/driveConnections.gif | Bin 0 -> 2848 bytes Images/driveConnections2.gif | Bin 0 -> 4658 bytes Images/driveWithHeatTransfer.png | Bin 0 -> 5460 bytes Images/inertias.gif | Bin 0 -> 2126 bytes Images/relativeStates.gif | Bin 0 -> 1956 bytes Images/relativeStates2.gif | Bin 0 -> 2070 bytes Math.mo | 749 --- Math/package.mo | 829 +++ Mechanics/CoupledClutches.mos | 6 + Mechanics/Rotational.mo | 5742 ++++++++++------- Mechanics/Translational.mo | 2679 ++++++++ Mechanics/package.mo | 57 +- SIunits.mo | 1409 ++-- Thermal/HeatTransfer.mo | 2300 +++++++ Thermal/package.mo | 6 + help/Modelica.Blocks.Continuous.DerD.png | Bin 0 -> 246 bytes help/Modelica.Blocks.Continuous.DerI.png | Bin 0 -> 464 bytes ...Modelica.Blocks.Continuous.DerivativeD.png | Bin 0 -> 714 bytes ...Modelica.Blocks.Continuous.DerivativeI.png | Bin 0 -> 628 bytes ...Modelica.Blocks.Continuous.FirstOrderD.png | Bin 0 -> 679 bytes ...Modelica.Blocks.Continuous.FirstOrderI.png | Bin 0 -> 645 bytes ...Modelica.Blocks.Continuous.IntegratorD.png | Bin 0 -> 642 bytes ...Modelica.Blocks.Continuous.IntegratorI.png | Bin 0 -> 662 bytes ...elica.Blocks.Continuous.LimIntegratorD.png | Bin 0 -> 716 bytes ...elica.Blocks.Continuous.LimIntegratorI.png | Bin 0 -> 636 bytes help/Modelica.Blocks.Continuous.LimPIDD.png | Bin 0 -> 5988 bytes help/Modelica.Blocks.Continuous.LimPIDI.png | Bin 0 -> 613 bytes help/Modelica.Blocks.Continuous.PID.png | Bin 0 -> 717 bytes help/Modelica.Blocks.Continuous.PIDD.png | Bin 0 -> 3645 bytes help/Modelica.Blocks.Continuous.PIDI.png | Bin 0 -> 610 bytes help/Modelica.Blocks.Continuous.PII.png | Bin 0 -> 563 bytes ...odelica.Blocks.Continuous.SecondOrderD.png | Bin 0 -> 847 bytes ...odelica.Blocks.Continuous.SecondOrderI.png | Bin 0 -> 704 bytes ...Modelica.Blocks.Continuous.StateSpaceD.png | Bin 0 -> 801 bytes ...Modelica.Blocks.Continuous.StateSpaceI.png | Bin 0 -> 608 bytes ...ca.Blocks.Continuous.TransferFunctionD.png | Bin 0 -> 850 bytes ...ca.Blocks.Continuous.TransferFunctionI.png | Bin 0 -> 604 bytes help/Modelica.Blocks.ContinuousI.png | Bin 0 -> 523 bytes ...ocks.Examples.BusUsage.Interfaces.BusD.png | Bin 0 -> 691 bytes ...ocks.Examples.BusUsage.Interfaces.BusI.png | Bin 0 -> 282 bytes ...xamples.BusUsage.Interfaces.MultiPortD.png | Bin 0 -> 434 bytes ...xamples.BusUsage.Interfaces.MultiPortI.png | Bin 0 -> 226 bytes ...odelica.Blocks.Examples.BusUsage.PartD.png | Bin 0 -> 124 bytes ...odelica.Blocks.Examples.BusUsage.PartI.png | Bin 0 -> 339 bytes ...lica.Blocks.Examples.BusUsage.RestBusD.png | Bin 0 -> 103 bytes ...lica.Blocks.Examples.BusUsage.RestBusI.png | Bin 0 -> 559 bytes help/Modelica.Blocks.Examples.BusUsageD.png | Bin 0 -> 3846 bytes help/Modelica.Blocks.Examples.BusUsageI.png | Bin 0 -> 520 bytes help/Modelica.Blocks.ExamplesI.png | Bin 0 -> 537 bytes .../Modelica.Blocks.Interfaces.BlockIconI.png | Bin 0 -> 323 bytes ...ca.Blocks.Interfaces.BooleanBlockIconI.png | Bin 0 -> 346 bytes ...elica.Blocks.Interfaces.BooleanInPortD.png | Bin 0 -> 1076 bytes ...elica.Blocks.Interfaces.BooleanInPortI.png | Bin 0 -> 382 bytes ...delica.Blocks.Interfaces.BooleanMIMOsD.png | Bin 0 -> 245 bytes ...delica.Blocks.Interfaces.BooleanMIMOsI.png | Bin 0 -> 434 bytes ...lica.Blocks.Interfaces.BooleanOutPortD.png | Bin 0 -> 1110 bytes ...lica.Blocks.Interfaces.BooleanOutPortI.png | Bin 0 -> 383 bytes ...odelica.Blocks.Interfaces.BooleanPortI.png | Bin 0 -> 174 bytes ...odelica.Blocks.Interfaces.BooleanSISOD.png | Bin 0 -> 245 bytes ...odelica.Blocks.Interfaces.BooleanSISOI.png | Bin 0 -> 435 bytes ...Blocks.Interfaces.BooleanSignalSourceD.png | Bin 0 -> 139 bytes ...Blocks.Interfaces.BooleanSignalSourceI.png | Bin 0 -> 499 bytes ...ces.BusAdaptors.Internal.InputBooleanD.png | Bin 0 -> 937 bytes ...ces.BusAdaptors.Internal.InputBooleanI.png | Bin 0 -> 348 bytes ...ces.BusAdaptors.Internal.InputIntegerD.png | Bin 0 -> 870 bytes ...ces.BusAdaptors.Internal.InputIntegerI.png | Bin 0 -> 330 bytes ...rfaces.BusAdaptors.Internal.InputRealD.png | Bin 0 -> 922 bytes ...rfaces.BusAdaptors.Internal.InputRealI.png | Bin 0 -> 340 bytes ...es.BusAdaptors.Internal.OutputBooleanD.png | Bin 0 -> 966 bytes ...es.BusAdaptors.Internal.OutputBooleanI.png | Bin 0 -> 345 bytes ...es.BusAdaptors.Internal.OutputIntegerD.png | Bin 0 -> 815 bytes ...es.BusAdaptors.Internal.OutputIntegerI.png | Bin 0 -> 352 bytes ...faces.BusAdaptors.Internal.OutputRealD.png | Bin 0 -> 949 bytes ...faces.BusAdaptors.Internal.OutputRealI.png | Bin 0 -> 364 bytes ...locks.Interfaces.BusAdaptors.InternalI.png | Bin 0 -> 491 bytes ...Interfaces.BusAdaptors.ReceiveBooleanD.png | Bin 0 -> 189 bytes ...Interfaces.BusAdaptors.ReceiveBooleanI.png | Bin 0 -> 495 bytes ...Interfaces.BusAdaptors.ReceiveIntegerD.png | Bin 0 -> 190 bytes ...Interfaces.BusAdaptors.ReceiveIntegerI.png | Bin 0 -> 506 bytes ...ks.Interfaces.BusAdaptors.ReceiveRealD.png | Bin 0 -> 191 bytes ...ks.Interfaces.BusAdaptors.ReceiveRealI.png | Bin 0 -> 503 bytes ...ks.Interfaces.BusAdaptors.SendBooleanD.png | Bin 0 -> 232 bytes ...ks.Interfaces.BusAdaptors.SendBooleanI.png | Bin 0 -> 501 bytes ...ks.Interfaces.BusAdaptors.SendIntegerD.png | Bin 0 -> 228 bytes ...ks.Interfaces.BusAdaptors.SendIntegerI.png | Bin 0 -> 512 bytes ...locks.Interfaces.BusAdaptors.SendRealD.png | Bin 0 -> 232 bytes ...locks.Interfaces.BusAdaptors.SendRealI.png | Bin 0 -> 498 bytes ...odelica.Blocks.Interfaces.BusAdaptorsI.png | Bin 0 -> 546 bytes help/Modelica.Blocks.Interfaces.InPortD.png | Bin 0 -> 1147 bytes help/Modelica.Blocks.Interfaces.InPortI.png | Bin 0 -> 383 bytes ...ca.Blocks.Interfaces.IntegerBlockIconI.png | Bin 0 -> 386 bytes ...elica.Blocks.Interfaces.IntegerInPortD.png | Bin 0 -> 1172 bytes ...elica.Blocks.Interfaces.IntegerInPortI.png | Bin 0 -> 370 bytes ...Blocks.Interfaces.IntegerMIBooleanMOsD.png | Bin 0 -> 248 bytes ...Blocks.Interfaces.IntegerMIBooleanMOsI.png | Bin 0 -> 475 bytes .../Modelica.Blocks.Interfaces.IntegerMOD.png | Bin 0 -> 137 bytes .../Modelica.Blocks.Interfaces.IntegerMOI.png | Bin 0 -> 404 bytes ...lica.Blocks.Interfaces.IntegerOutPortD.png | Bin 0 -> 1144 bytes ...lica.Blocks.Interfaces.IntegerOutPortI.png | Bin 0 -> 383 bytes ...odelica.Blocks.Interfaces.IntegerPortI.png | Bin 0 -> 174 bytes ...Blocks.Interfaces.IntegerSignalSourceD.png | Bin 0 -> 137 bytes ...Blocks.Interfaces.IntegerSignalSourceI.png | Bin 0 -> 439 bytes ...elica.Blocks.Interfaces.MI2BooleanMOsD.png | Bin 0 -> 390 bytes ...elica.Blocks.Interfaces.MI2BooleanMOsI.png | Bin 0 -> 481 bytes help/Modelica.Blocks.Interfaces.MI2MOD.png | Bin 0 -> 387 bytes help/Modelica.Blocks.Interfaces.MI2MOI.png | Bin 0 -> 422 bytes help/Modelica.Blocks.Interfaces.MIMOD.png | Bin 0 -> 246 bytes help/Modelica.Blocks.Interfaces.MIMOI.png | Bin 0 -> 361 bytes help/Modelica.Blocks.Interfaces.MIMOsD.png | Bin 0 -> 246 bytes help/Modelica.Blocks.Interfaces.MIMOsI.png | Bin 0 -> 382 bytes help/Modelica.Blocks.Interfaces.MISOD.png | Bin 0 -> 246 bytes help/Modelica.Blocks.Interfaces.MISOI.png | Bin 0 -> 381 bytes help/Modelica.Blocks.Interfaces.MOD.png | Bin 0 -> 143 bytes help/Modelica.Blocks.Interfaces.MOI.png | Bin 0 -> 307 bytes .../Modelica.Blocks.Interfaces.MVcontrolD.png | Bin 0 -> 830 bytes .../Modelica.Blocks.Interfaces.MVcontrolI.png | Bin 0 -> 430 bytes help/Modelica.Blocks.Interfaces.OutPortD.png | Bin 0 -> 1227 bytes help/Modelica.Blocks.Interfaces.OutPortI.png | Bin 0 -> 384 bytes help/Modelica.Blocks.Interfaces.RealPortI.png | Bin 0 -> 174 bytes help/Modelica.Blocks.Interfaces.SI2SOD.png | Bin 0 -> 387 bytes help/Modelica.Blocks.Interfaces.SI2SOI.png | Bin 0 -> 434 bytes help/Modelica.Blocks.Interfaces.SIMOD.png | Bin 0 -> 246 bytes help/Modelica.Blocks.Interfaces.SIMOI.png | Bin 0 -> 381 bytes help/Modelica.Blocks.Interfaces.SISOD.png | Bin 0 -> 246 bytes help/Modelica.Blocks.Interfaces.SISOI.png | Bin 0 -> 384 bytes help/Modelica.Blocks.Interfaces.SOD.png | Bin 0 -> 143 bytes help/Modelica.Blocks.Interfaces.SOI.png | Bin 0 -> 326 bytes .../Modelica.Blocks.Interfaces.SVcontrolD.png | Bin 0 -> 823 bytes .../Modelica.Blocks.Interfaces.SVcontrolI.png | Bin 0 -> 433 bytes ...delica.Blocks.Interfaces.SignalSourceD.png | Bin 0 -> 143 bytes ...delica.Blocks.Interfaces.SignalSourceI.png | Bin 0 -> 416 bytes help/Modelica.Blocks.InterfacesI.png | Bin 0 -> 516 bytes help/Modelica.Blocks.Math.AbsD.png | Bin 0 -> 986 bytes help/Modelica.Blocks.Math.AbsI.png | Bin 0 -> 641 bytes help/Modelica.Blocks.Math.AcosD.png | Bin 0 -> 1135 bytes help/Modelica.Blocks.Math.AcosI.png | Bin 0 -> 611 bytes help/Modelica.Blocks.Math.Add3D.png | Bin 0 -> 1005 bytes help/Modelica.Blocks.Math.Add3I.png | Bin 0 -> 442 bytes help/Modelica.Blocks.Math.AddD.png | Bin 0 -> 1239 bytes help/Modelica.Blocks.Math.AddI.png | Bin 0 -> 565 bytes help/Modelica.Blocks.Math.AsinD.png | Bin 0 -> 1085 bytes help/Modelica.Blocks.Math.AsinI.png | Bin 0 -> 591 bytes help/Modelica.Blocks.Math.Atan2D.png | Bin 0 -> 1254 bytes help/Modelica.Blocks.Math.Atan2I.png | Bin 0 -> 702 bytes help/Modelica.Blocks.Math.AtanD.png | Bin 0 -> 1015 bytes help/Modelica.Blocks.Math.AtanI.png | Bin 0 -> 597 bytes help/Modelica.Blocks.Math.BooleanChangeD.png | Bin 0 -> 245 bytes help/Modelica.Blocks.Math.BooleanChangeI.png | Bin 0 -> 583 bytes help/Modelica.Blocks.Math.CosD.png | Bin 0 -> 1125 bytes help/Modelica.Blocks.Math.CosI.png | Bin 0 -> 635 bytes help/Modelica.Blocks.Math.CoshD.png | Bin 0 -> 1122 bytes help/Modelica.Blocks.Math.CoshI.png | Bin 0 -> 592 bytes help/Modelica.Blocks.Math.DivisionD.png | Bin 0 -> 1056 bytes help/Modelica.Blocks.Math.DivisionI.png | Bin 0 -> 576 bytes help/Modelica.Blocks.Math.EdgeD.png | Bin 0 -> 245 bytes help/Modelica.Blocks.Math.EdgeI.png | Bin 0 -> 516 bytes help/Modelica.Blocks.Math.ExpD.png | Bin 0 -> 1066 bytes help/Modelica.Blocks.Math.ExpI.png | Bin 0 -> 625 bytes help/Modelica.Blocks.Math.FeedbackD.png | Bin 0 -> 663 bytes help/Modelica.Blocks.Math.FeedbackI.png | Bin 0 -> 501 bytes help/Modelica.Blocks.Math.GainD.png | Bin 0 -> 979 bytes help/Modelica.Blocks.Math.GainI.png | Bin 0 -> 549 bytes help/Modelica.Blocks.Math.IntegerChangeD.png | Bin 0 -> 248 bytes help/Modelica.Blocks.Math.IntegerChangeI.png | Bin 0 -> 630 bytes help/Modelica.Blocks.Math.IntegerToRealD.png | Bin 0 -> 254 bytes help/Modelica.Blocks.Math.IntegerToRealI.png | Bin 0 -> 576 bytes help/Modelica.Blocks.Math.Log10D.png | Bin 0 -> 973 bytes help/Modelica.Blocks.Math.Log10I.png | Bin 0 -> 578 bytes help/Modelica.Blocks.Math.LogD.png | Bin 0 -> 1030 bytes help/Modelica.Blocks.Math.LogI.png | Bin 0 -> 590 bytes help/Modelica.Blocks.Math.MatrixGainD.png | Bin 0 -> 869 bytes help/Modelica.Blocks.Math.MatrixGainI.png | Bin 0 -> 545 bytes help/Modelica.Blocks.Math.MaxD.png | Bin 0 -> 387 bytes help/Modelica.Blocks.Math.MaxI.png | Bin 0 -> 541 bytes help/Modelica.Blocks.Math.MinD.png | Bin 0 -> 387 bytes help/Modelica.Blocks.Math.MinI.png | Bin 0 -> 479 bytes help/Modelica.Blocks.Math.ProductD.png | Bin 0 -> 1112 bytes help/Modelica.Blocks.Math.ProductI.png | Bin 0 -> 609 bytes help/Modelica.Blocks.Math.RealToIntegerD.png | Bin 0 -> 255 bytes help/Modelica.Blocks.Math.RealToIntegerI.png | Bin 0 -> 576 bytes help/Modelica.Blocks.Math.SignD.png | Bin 0 -> 806 bytes help/Modelica.Blocks.Math.SignI.png | Bin 0 -> 548 bytes help/Modelica.Blocks.Math.SinD.png | Bin 0 -> 1091 bytes help/Modelica.Blocks.Math.SinI.png | Bin 0 -> 627 bytes help/Modelica.Blocks.Math.SinhD.png | Bin 0 -> 1083 bytes help/Modelica.Blocks.Math.SinhI.png | Bin 0 -> 594 bytes help/Modelica.Blocks.Math.SqrtD.png | Bin 0 -> 951 bytes help/Modelica.Blocks.Math.SqrtI.png | Bin 0 -> 609 bytes help/Modelica.Blocks.Math.SumD.png | Bin 0 -> 736 bytes help/Modelica.Blocks.Math.SumI.png | Bin 0 -> 449 bytes help/Modelica.Blocks.Math.TanD.png | Bin 0 -> 974 bytes help/Modelica.Blocks.Math.TanI.png | Bin 0 -> 553 bytes help/Modelica.Blocks.Math.TanhD.png | Bin 0 -> 1026 bytes help/Modelica.Blocks.Math.TanhI.png | Bin 0 -> 594 bytes help/Modelica.Blocks.Math.TwoInputsD.png | Bin 0 -> 271 bytes help/Modelica.Blocks.Math.TwoInputsI.png | Bin 0 -> 437 bytes help/Modelica.Blocks.Math.TwoOutputsD.png | Bin 0 -> 208 bytes help/Modelica.Blocks.Math.TwoOutputsI.png | Bin 0 -> 437 bytes help/Modelica.Blocks.MathI.png | Bin 0 -> 477 bytes help/Modelica.Blocks.Nonlinear.DeadZoneD.png | Bin 0 -> 773 bytes help/Modelica.Blocks.Nonlinear.DeadZoneI.png | Bin 0 -> 703 bytes help/Modelica.Blocks.Nonlinear.LimiterD.png | Bin 0 -> 797 bytes help/Modelica.Blocks.Nonlinear.LimiterI.png | Bin 0 -> 654 bytes ...lica.Blocks.Nonlinear.VariableLimiterD.png | Bin 0 -> 1125 bytes ...lica.Blocks.Nonlinear.VariableLimiterI.png | Bin 0 -> 712 bytes help/Modelica.Blocks.NonlinearI.png | Bin 0 -> 507 bytes ...delica.Blocks.Sources.BooleanConstantD.png | Bin 0 -> 773 bytes ...delica.Blocks.Sources.BooleanConstantI.png | Bin 0 -> 540 bytes .../Modelica.Blocks.Sources.BooleanPulseD.png | Bin 0 -> 1163 bytes .../Modelica.Blocks.Sources.BooleanPulseI.png | Bin 0 -> 611 bytes help/Modelica.Blocks.Sources.BooleanStepD.png | Bin 0 -> 904 bytes help/Modelica.Blocks.Sources.BooleanStepI.png | Bin 0 -> 655 bytes help/Modelica.Blocks.Sources.ClockD.png | Bin 0 -> 1036 bytes help/Modelica.Blocks.Sources.ClockI.png | Bin 0 -> 811 bytes help/Modelica.Blocks.Sources.ConstantD.png | Bin 0 -> 733 bytes help/Modelica.Blocks.Sources.ConstantI.png | Bin 0 -> 509 bytes help/Modelica.Blocks.Sources.ExpSineD.png | Bin 0 -> 1586 bytes help/Modelica.Blocks.Sources.ExpSineI.png | Bin 0 -> 712 bytes .../Modelica.Blocks.Sources.ExponentialsD.png | Bin 0 -> 1323 bytes .../Modelica.Blocks.Sources.ExponentialsI.png | Bin 0 -> 708 bytes ...delica.Blocks.Sources.IntegerConstantD.png | Bin 0 -> 737 bytes ...delica.Blocks.Sources.IntegerConstantI.png | Bin 0 -> 566 bytes help/Modelica.Blocks.Sources.IntegerStepD.png | Bin 0 -> 1013 bytes help/Modelica.Blocks.Sources.IntegerStepI.png | Bin 0 -> 643 bytes .../Modelica.Blocks.Sources.KinematicPTPD.png | Bin 0 -> 776 bytes .../Modelica.Blocks.Sources.KinematicPTPI.png | Bin 0 -> 700 bytes help/Modelica.Blocks.Sources.PulseD.png | Bin 0 -> 1240 bytes help/Modelica.Blocks.Sources.PulseI.png | Bin 0 -> 564 bytes help/Modelica.Blocks.Sources.RampD.png | Bin 0 -> 1120 bytes help/Modelica.Blocks.Sources.RampI.png | Bin 0 -> 617 bytes ...Modelica.Blocks.Sources.SampleTriggerD.png | Bin 0 -> 964 bytes ...Modelica.Blocks.Sources.SampleTriggerI.png | Bin 0 -> 641 bytes help/Modelica.Blocks.Sources.SawToothD.png | Bin 0 -> 1270 bytes help/Modelica.Blocks.Sources.SawToothI.png | Bin 0 -> 624 bytes help/Modelica.Blocks.Sources.SineD.png | Bin 0 -> 1356 bytes help/Modelica.Blocks.Sources.SineI.png | Bin 0 -> 655 bytes help/Modelica.Blocks.Sources.StepD.png | Bin 0 -> 1009 bytes help/Modelica.Blocks.Sources.StepI.png | Bin 0 -> 604 bytes help/Modelica.Blocks.Sources.TimeTableD.png | Bin 0 -> 1040 bytes help/Modelica.Blocks.Sources.TimeTableI.png | Bin 0 -> 596 bytes help/Modelica.Blocks.Sources.TrapezoidD.png | Bin 0 -> 1488 bytes help/Modelica.Blocks.Sources.TrapezoidI.png | Bin 0 -> 668 bytes help/Modelica.Blocks.SourcesI.png | Bin 0 -> 518 bytes help/Modelica.BlocksI.png | Bin 0 -> 608 bytes help/Modelica.ConstantsI.png | Bin 0 -> 588 bytes .../Modelica.Electrical.Analog.Basic.CCCD.png | Bin 0 -> 875 bytes .../Modelica.Electrical.Analog.Basic.CCCI.png | Bin 0 -> 446 bytes .../Modelica.Electrical.Analog.Basic.CCVD.png | Bin 0 -> 863 bytes .../Modelica.Electrical.Analog.Basic.CCVI.png | Bin 0 -> 476 bytes ...ica.Electrical.Analog.Basic.CapacitorD.png | Bin 0 -> 431 bytes ...ica.Electrical.Analog.Basic.CapacitorI.png | Bin 0 -> 435 bytes ...ica.Electrical.Analog.Basic.ConductorD.png | Bin 0 -> 344 bytes ...ica.Electrical.Analog.Basic.ConductorI.png | Bin 0 -> 423 bytes .../Modelica.Electrical.Analog.Basic.EMFD.png | Bin 0 -> 1192 bytes .../Modelica.Electrical.Analog.Basic.EMFI.png | Bin 0 -> 526 bytes ...delica.Electrical.Analog.Basic.GroundD.png | Bin 0 -> 389 bytes ...delica.Electrical.Analog.Basic.GroundI.png | Bin 0 -> 357 bytes ...elica.Electrical.Analog.Basic.GyratorD.png | Bin 0 -> 875 bytes ...elica.Electrical.Analog.Basic.GyratorI.png | Bin 0 -> 541 bytes ...ectrical.Analog.Basic.HeatingResistorD.png | Bin 0 -> 774 bytes ...ectrical.Analog.Basic.HeatingResistorI.png | Bin 0 -> 555 bytes ...lica.Electrical.Analog.Basic.InductorD.png | Bin 0 -> 410 bytes ...lica.Electrical.Analog.Basic.InductorI.png | Bin 0 -> 401 bytes ...odelica.Electrical.Analog.Basic.OpAmpD.png | Bin 0 -> 1004 bytes ...odelica.Electrical.Analog.Basic.OpAmpI.png | Bin 0 -> 560 bytes ...lica.Electrical.Analog.Basic.ResistorD.png | Bin 0 -> 414 bytes ...lica.Electrical.Analog.Basic.ResistorI.png | Bin 0 -> 440 bytes ...a.Electrical.Analog.Basic.TransformerD.png | Bin 0 -> 836 bytes ...a.Electrical.Analog.Basic.TransformerI.png | Bin 0 -> 448 bytes .../Modelica.Electrical.Analog.Basic.VCCD.png | Bin 0 -> 870 bytes .../Modelica.Electrical.Analog.Basic.VCCI.png | Bin 0 -> 467 bytes .../Modelica.Electrical.Analog.Basic.VCVD.png | Bin 0 -> 859 bytes .../Modelica.Electrical.Analog.Basic.VCVI.png | Bin 0 -> 472 bytes help/Modelica.Electrical.Analog.BasicI.png | Bin 0 -> 495 bytes ...lectrical.Analog.Examples.CauerFilterD.png | Bin 0 -> 16366 bytes ...lectrical.Analog.Examples.CauerFilterI.png | Bin 0 -> 316 bytes ...lectrical.Analog.Examples.ChuaCircuitD.png | Bin 0 -> 3159 bytes ...lectrical.Analog.Examples.ChuaCircuitI.png | Bin 0 -> 306 bytes ...l.Analog.Examples.DifferenceAmplifierD.png | Bin 0 -> 3724 bytes ...l.Analog.Examples.DifferenceAmplifierI.png | Bin 0 -> 334 bytes ...a.Electrical.Analog.Examples.NandGateD.png | Bin 0 -> 2328 bytes ...a.Electrical.Analog.Examples.NandGateI.png | Bin 0 -> 314 bytes ...trical.Analog.Examples.Utilities.NandD.png | Bin 0 -> 2658 bytes ...trical.Analog.Examples.Utilities.NandI.png | Bin 0 -> 389 bytes ....Examples.Utilities.NonlinearResistorD.png | Bin 0 -> 966 bytes ....Examples.Utilities.NonlinearResistorI.png | Bin 0 -> 366 bytes ....Analog.Examples.Utilities.RealSwitchD.png | Bin 0 -> 1440 bytes ....Analog.Examples.Utilities.RealSwitchI.png | Bin 0 -> 234 bytes ....Analog.Examples.Utilities.TransistorD.png | Bin 0 -> 1786 bytes ....Analog.Examples.Utilities.TransistorI.png | Bin 0 -> 392 bytes ....Electrical.Analog.Examples.UtilitiesI.png | Bin 0 -> 504 bytes help/Modelica.Electrical.Analog.ExamplesI.png | Bin 0 -> 545 bytes ...al.Analog.Ideal.ControlledIdealCloserD.png | Bin 0 -> 1680 bytes ...al.Analog.Ideal.ControlledIdealCloserI.png | Bin 0 -> 399 bytes ....Ideal.ControlledIdealCommutingSwitchD.png | Bin 0 -> 599 bytes ....Ideal.ControlledIdealCommutingSwitchI.png | Bin 0 -> 407 bytes ...eal.ControlledIdealIntermediateSwitchD.png | Bin 0 -> 712 bytes ...eal.ControlledIdealIntermediateSwitchI.png | Bin 0 -> 439 bytes ...al.Analog.Ideal.ControlledIdealOpenerD.png | Bin 0 -> 1691 bytes ...al.Analog.Ideal.ControlledIdealOpenerI.png | Bin 0 -> 398 bytes ...al.Analog.Ideal.ControlledIdealSwitchD.png | Bin 0 -> 478 bytes ...al.Analog.Ideal.ControlledIdealSwitchI.png | Bin 0 -> 392 bytes ...a.Electrical.Analog.Ideal.IdealCloserD.png | Bin 0 -> 2560 bytes ...a.Electrical.Analog.Ideal.IdealCloserI.png | Bin 0 -> 438 bytes ...cal.Analog.Ideal.IdealCommutingSwitchD.png | Bin 0 -> 595 bytes ...cal.Analog.Ideal.IdealCommutingSwitchI.png | Bin 0 -> 436 bytes ...ca.Electrical.Analog.Ideal.IdealDiodeD.png | Bin 0 -> 588 bytes ...ca.Electrical.Analog.Ideal.IdealDiodeI.png | Bin 0 -> 453 bytes ...trical.Analog.Ideal.IdealGTOThyristorD.png | Bin 0 -> 836 bytes ...trical.Analog.Ideal.IdealGTOThyristorI.png | Bin 0 -> 523 bytes ....Electrical.Analog.Ideal.IdealGyratorD.png | Bin 0 -> 855 bytes ....Electrical.Analog.Ideal.IdealGyratorI.png | Bin 0 -> 498 bytes ....Analog.Ideal.IdealIntermediateSwitchD.png | Bin 0 -> 712 bytes ....Analog.Ideal.IdealIntermediateSwitchI.png | Bin 0 -> 468 bytes ...lectrical.Analog.Ideal.IdealOpAmp3PinD.png | Bin 0 -> 784 bytes ...lectrical.Analog.Ideal.IdealOpAmp3PinI.png | Bin 0 -> 531 bytes ...ca.Electrical.Analog.Ideal.IdealOpAmpD.png | Bin 0 -> 957 bytes ...ca.Electrical.Analog.Ideal.IdealOpAmpI.png | Bin 0 -> 558 bytes ...trical.Analog.Ideal.IdealOpAmpLimitedD.png | Bin 0 -> 879 bytes ...trical.Analog.Ideal.IdealOpAmpLimitedI.png | Bin 0 -> 550 bytes ...a.Electrical.Analog.Ideal.IdealOpenerD.png | Bin 0 -> 2609 bytes ...a.Electrical.Analog.Ideal.IdealOpenerI.png | Bin 0 -> 445 bytes ...a.Electrical.Analog.Ideal.IdealSwitchD.png | Bin 0 -> 942 bytes ...a.Electrical.Analog.Ideal.IdealSwitchI.png | Bin 0 -> 450 bytes ...lectrical.Analog.Ideal.IdealThyristorD.png | Bin 0 -> 836 bytes ...lectrical.Analog.Ideal.IdealThyristorI.png | Bin 0 -> 520 bytes ...ctrical.Analog.Ideal.IdealTransformerD.png | Bin 0 -> 836 bytes ...ctrical.Analog.Ideal.IdealTransformerI.png | Bin 0 -> 455 bytes ...Modelica.Electrical.Analog.Ideal.IdleD.png | Bin 0 -> 510 bytes ...Modelica.Electrical.Analog.Ideal.IdleI.png | Bin 0 -> 345 bytes ...odelica.Electrical.Analog.Ideal.ShortD.png | Bin 0 -> 662 bytes ...odelica.Electrical.Analog.Ideal.ShortI.png | Bin 0 -> 359 bytes help/Modelica.Electrical.Analog.IdealI.png | Bin 0 -> 477 bytes ...ical.Analog.Interfaces.AbsoluteSensorD.png | Bin 0 -> 925 bytes ...ical.Analog.Interfaces.AbsoluteSensorI.png | Bin 0 -> 592 bytes ...rical.Analog.Interfaces.CurrentSourceD.png | Bin 0 -> 1101 bytes ...rical.Analog.Interfaces.CurrentSourceI.png | Bin 0 -> 457 bytes ...ctrical.Analog.Interfaces.NegativePinD.png | Bin 0 -> 884 bytes ...ctrical.Analog.Interfaces.NegativePinI.png | Bin 0 -> 219 bytes ....Electrical.Analog.Interfaces.OnePortD.png | Bin 0 -> 338 bytes ....Electrical.Analog.Interfaces.OnePortI.png | Bin 0 -> 214 bytes ...lica.Electrical.Analog.Interfaces.PinD.png | Bin 0 -> 692 bytes ...lica.Electrical.Analog.Interfaces.PinI.png | Bin 0 -> 203 bytes ...ctrical.Analog.Interfaces.PositivePinD.png | Bin 0 -> 863 bytes ...ctrical.Analog.Interfaces.PositivePinI.png | Bin 0 -> 203 bytes ...ical.Analog.Interfaces.RelativeSensorD.png | Bin 0 -> 1021 bytes ...ical.Analog.Interfaces.RelativeSensorI.png | Bin 0 -> 623 bytes ...a.Electrical.Analog.Interfaces.TwoPinD.png | Bin 0 -> 369 bytes ...a.Electrical.Analog.Interfaces.TwoPinI.png | Bin 0 -> 214 bytes ....Electrical.Analog.Interfaces.TwoPortD.png | Bin 0 -> 610 bytes ....Electrical.Analog.Interfaces.TwoPortI.png | Bin 0 -> 222 bytes ...rical.Analog.Interfaces.VoltageSourceD.png | Bin 0 -> 1095 bytes ...rical.Analog.Interfaces.VoltageSourceI.png | Bin 0 -> 472 bytes ...Modelica.Electrical.Analog.InterfacesI.png | Bin 0 -> 516 bytes ...odelica.Electrical.Analog.Lines.OLineD.png | Bin 0 -> 469 bytes ...odelica.Electrical.Analog.Lines.OLineI.png | Bin 0 -> 385 bytes ...delica.Electrical.Analog.Lines.TLine1D.png | Bin 0 -> 898 bytes ...delica.Electrical.Analog.Lines.TLine1I.png | Bin 0 -> 403 bytes ...delica.Electrical.Analog.Lines.TLine2D.png | Bin 0 -> 824 bytes ...delica.Electrical.Analog.Lines.TLine2I.png | Bin 0 -> 415 bytes ...delica.Electrical.Analog.Lines.TLine3D.png | Bin 0 -> 821 bytes ...delica.Electrical.Analog.Lines.TLine3I.png | Bin 0 -> 420 bytes ...odelica.Electrical.Analog.Lines.ULineD.png | Bin 0 -> 469 bytes ...odelica.Electrical.Analog.Lines.ULineI.png | Bin 0 -> 377 bytes help/Modelica.Electrical.Analog.LinesI.png | Bin 0 -> 476 bytes ...lectrical.Analog.Semiconductors.DiodeD.png | Bin 0 -> 588 bytes ...lectrical.Analog.Semiconductors.DiodeI.png | Bin 0 -> 475 bytes ...Electrical.Analog.Semiconductors.NMOSD.png | Bin 0 -> 464 bytes ...Electrical.Analog.Semiconductors.NMOSI.png | Bin 0 -> 408 bytes ....Electrical.Analog.Semiconductors.NPND.png | Bin 0 -> 499 bytes ....Electrical.Analog.Semiconductors.NPNI.png | Bin 0 -> 394 bytes ...Electrical.Analog.Semiconductors.PMOSD.png | Bin 0 -> 465 bytes ...Electrical.Analog.Semiconductors.PMOSI.png | Bin 0 -> 403 bytes ....Electrical.Analog.Semiconductors.PNPD.png | Bin 0 -> 506 bytes ....Electrical.Analog.Semiconductors.PNPI.png | Bin 0 -> 389 bytes ...lica.Electrical.Analog.SemiconductorsI.png | Bin 0 -> 523 bytes ...ectrical.Analog.Sensors.CurrentSensorD.png | Bin 0 -> 717 bytes ...ectrical.Analog.Sensors.CurrentSensorI.png | Bin 0 -> 643 bytes ...trical.Analog.Sensors.PotentialSensorD.png | Bin 0 -> 648 bytes ...trical.Analog.Sensors.PotentialSensorI.png | Bin 0 -> 593 bytes ...ectrical.Analog.Sensors.VoltageSensorD.png | Bin 0 -> 717 bytes ...ectrical.Analog.Sensors.VoltageSensorI.png | Bin 0 -> 655 bytes help/Modelica.Electrical.Analog.SensorsI.png | Bin 0 -> 520 bytes ...trical.Analog.Sources.ConstantCurrentD.png | Bin 0 -> 286 bytes ...trical.Analog.Sources.ConstantCurrentI.png | Bin 0 -> 470 bytes ...trical.Analog.Sources.ConstantVoltageD.png | Bin 0 -> 484 bytes ...trical.Analog.Sources.ConstantVoltageI.png | Bin 0 -> 371 bytes ...ctrical.Analog.Sources.ExpSineCurrentD.png | Bin 0 -> 4573 bytes ...ctrical.Analog.Sources.ExpSineCurrentI.png | Bin 0 -> 649 bytes ...ctrical.Analog.Sources.ExpSineVoltageD.png | Bin 0 -> 4701 bytes ...ctrical.Analog.Sources.ExpSineVoltageI.png | Bin 0 -> 655 bytes ...al.Analog.Sources.ExponentialsCurrentD.png | Bin 0 -> 3287 bytes ...al.Analog.Sources.ExponentialsCurrentI.png | Bin 0 -> 610 bytes ...al.Analog.Sources.ExponentialsVoltageD.png | Bin 0 -> 3719 bytes ...al.Analog.Sources.ExponentialsVoltageI.png | Bin 0 -> 603 bytes ...lectrical.Analog.Sources.PulseCurrentD.png | Bin 0 -> 3082 bytes ...lectrical.Analog.Sources.PulseCurrentI.png | Bin 0 -> 516 bytes ...lectrical.Analog.Sources.PulseVoltageD.png | Bin 0 -> 3253 bytes ...lectrical.Analog.Sources.PulseVoltageI.png | Bin 0 -> 524 bytes ...Electrical.Analog.Sources.RampCurrentD.png | Bin 0 -> 3031 bytes ...Electrical.Analog.Sources.RampCurrentI.png | Bin 0 -> 584 bytes ...Electrical.Analog.Sources.RampVoltageD.png | Bin 0 -> 3247 bytes ...Electrical.Analog.Sources.RampVoltageI.png | Bin 0 -> 565 bytes ...trical.Analog.Sources.SawToothCurrentD.png | Bin 0 -> 3135 bytes ...trical.Analog.Sources.SawToothCurrentI.png | Bin 0 -> 593 bytes ...trical.Analog.Sources.SawToothVoltageD.png | Bin 0 -> 3252 bytes ...trical.Analog.Sources.SawToothVoltageI.png | Bin 0 -> 594 bytes ...ectrical.Analog.Sources.SignalCurrentD.png | Bin 0 -> 399 bytes ...ectrical.Analog.Sources.SignalCurrentI.png | Bin 0 -> 517 bytes ...ectrical.Analog.Sources.SignalVoltageD.png | Bin 0 -> 399 bytes ...ectrical.Analog.Sources.SignalVoltageI.png | Bin 0 -> 516 bytes ...Electrical.Analog.Sources.SineCurrentD.png | Bin 0 -> 3680 bytes ...Electrical.Analog.Sources.SineCurrentI.png | Bin 0 -> 623 bytes ...Electrical.Analog.Sources.SineVoltageD.png | Bin 0 -> 3894 bytes ...Electrical.Analog.Sources.SineVoltageI.png | Bin 0 -> 623 bytes ...Electrical.Analog.Sources.StepCurrentD.png | Bin 0 -> 2682 bytes ...Electrical.Analog.Sources.StepCurrentI.png | Bin 0 -> 535 bytes ...Electrical.Analog.Sources.StepVoltageD.png | Bin 0 -> 2898 bytes ...Electrical.Analog.Sources.StepVoltageI.png | Bin 0 -> 524 bytes ...lectrical.Analog.Sources.TableCurrentD.png | Bin 0 -> 2693 bytes ...lectrical.Analog.Sources.TableCurrentI.png | Bin 0 -> 545 bytes ...lectrical.Analog.Sources.TableVoltageD.png | Bin 0 -> 2834 bytes ...lectrical.Analog.Sources.TableVoltageI.png | Bin 0 -> 538 bytes ...rical.Analog.Sources.TrapezoidCurrentD.png | Bin 0 -> 3838 bytes ...rical.Analog.Sources.TrapezoidCurrentI.png | Bin 0 -> 604 bytes ...rical.Analog.Sources.TrapezoidVoltageD.png | Bin 0 -> 3940 bytes ...rical.Analog.Sources.TrapezoidVoltageI.png | Bin 0 -> 602 bytes help/Modelica.Electrical.Analog.SourcesI.png | Bin 0 -> 518 bytes help/Modelica.Electrical.AnalogI.png | Bin 0 -> 516 bytes help/Modelica.ElectricalI.png | Bin 0 -> 604 bytes help/Modelica.Icons.EnumerationI.png | Bin 0 -> 535 bytes help/Modelica.Icons.ExampleI.png | Bin 0 -> 460 bytes help/Modelica.Icons.FunctionI.png | Bin 0 -> 499 bytes help/Modelica.Icons.GearIconI.png | Bin 0 -> 589 bytes help/Modelica.Icons.InfoD.png | Bin 0 -> 666 bytes help/Modelica.Icons.InfoI.png | Bin 0 -> 350 bytes help/Modelica.Icons.Library2I.png | Bin 0 -> 529 bytes help/Modelica.Icons.LibraryI.png | Bin 0 -> 497 bytes help/Modelica.Icons.MotorIconI.png | Bin 0 -> 487 bytes help/Modelica.Icons.RecordI.png | Bin 0 -> 369 bytes help/Modelica.Icons.RotationalSensorD.png | Bin 0 -> 810 bytes help/Modelica.Icons.RotationalSensorI.png | Bin 0 -> 435 bytes help/Modelica.Icons.TranslationalSensorD.png | Bin 0 -> 321 bytes help/Modelica.Icons.TranslationalSensorI.png | Bin 0 -> 279 bytes help/Modelica.IconsI.png | Bin 0 -> 619 bytes help/Modelica.Math.acosD.png | Bin 0 -> 973 bytes help/Modelica.Math.acosI.png | Bin 0 -> 551 bytes help/Modelica.Math.asinD.png | Bin 0 -> 935 bytes help/Modelica.Math.asinI.png | Bin 0 -> 551 bytes help/Modelica.Math.atan2D.png | Bin 0 -> 1011 bytes help/Modelica.Math.atan2I.png | Bin 0 -> 606 bytes help/Modelica.Math.atanD.png | Bin 0 -> 851 bytes help/Modelica.Math.atanI.png | Bin 0 -> 537 bytes help/Modelica.Math.baseIcon1D.png | Bin 0 -> 221 bytes help/Modelica.Math.baseIcon1I.png | Bin 0 -> 381 bytes help/Modelica.Math.baseIcon2D.png | Bin 0 -> 221 bytes help/Modelica.Math.baseIcon2I.png | Bin 0 -> 397 bytes help/Modelica.Math.cosD.png | Bin 0 -> 965 bytes help/Modelica.Math.cosI.png | Bin 0 -> 567 bytes help/Modelica.Math.coshD.png | Bin 0 -> 973 bytes help/Modelica.Math.coshI.png | Bin 0 -> 514 bytes help/Modelica.Math.expD.png | Bin 0 -> 923 bytes help/Modelica.Math.expI.png | Bin 0 -> 574 bytes help/Modelica.Math.log10D.png | Bin 0 -> 827 bytes help/Modelica.Math.log10I.png | Bin 0 -> 516 bytes help/Modelica.Math.logD.png | Bin 0 -> 901 bytes help/Modelica.Math.logI.png | Bin 0 -> 535 bytes help/Modelica.Math.sinD.png | Bin 0 -> 949 bytes help/Modelica.Math.sinI.png | Bin 0 -> 588 bytes help/Modelica.Math.sinhD.png | Bin 0 -> 930 bytes help/Modelica.Math.sinhI.png | Bin 0 -> 539 bytes help/Modelica.Math.tanD.png | Bin 0 -> 829 bytes help/Modelica.Math.tanI.png | Bin 0 -> 525 bytes help/Modelica.Math.tanhD.png | Bin 0 -> 899 bytes help/Modelica.Math.tanhI.png | Bin 0 -> 530 bytes help/Modelica.Math.tempInterpol1I.png | Bin 0 -> 174 bytes help/Modelica.Math.tempInterpol2I.png | Bin 0 -> 174 bytes help/Modelica.MathI.png | Bin 0 -> 567 bytes ...elica.Mechanics.Rotational.AccelerateD.png | Bin 0 -> 863 bytes ...elica.Mechanics.Rotational.AccelerateI.png | Bin 0 -> 542 bytes ....Mechanics.Rotational.BearingFrictionD.png | Bin 0 -> 1063 bytes ....Mechanics.Rotational.BearingFrictionI.png | Bin 0 -> 657 bytes help/Modelica.Mechanics.Rotational.BrakeD.png | Bin 0 -> 1274 bytes help/Modelica.Mechanics.Rotational.BrakeI.png | Bin 0 -> 702 bytes .../Modelica.Mechanics.Rotational.ClutchD.png | Bin 0 -> 1313 bytes .../Modelica.Mechanics.Rotational.ClutchI.png | Bin 0 -> 719 bytes .../Modelica.Mechanics.Rotational.DamperD.png | Bin 0 -> 690 bytes .../Modelica.Mechanics.Rotational.DamperI.png | Bin 0 -> 460 bytes ...a.Mechanics.Rotational.ElastoBacklashD.png | Bin 0 -> 1126 bytes ...a.Mechanics.Rotational.ElastoBacklashI.png | Bin 0 -> 569 bytes ...s.Rotational.Examples.CoupledClutchesD.png | Bin 0 -> 1907 bytes ...s.Rotational.Examples.CoupledClutchesI.png | Bin 0 -> 506 bytes ...a.Mechanics.Rotational.Examples.FirstD.png | Bin 0 -> 2778 bytes ...a.Mechanics.Rotational.Examples.FirstI.png | Bin 0 -> 467 bytes ...echanics.Rotational.Examples.FrictionD.png | Bin 0 -> 2610 bytes ...echanics.Rotational.Examples.FrictionI.png | Bin 0 -> 472 bytes ...cs.Rotational.Examples.LossyGearDemo1D.png | Bin 0 -> 2434 bytes ...cs.Rotational.Examples.LossyGearDemo1I.png | Bin 0 -> 511 bytes ...cs.Rotational.Examples.LossyGearDemo2D.png | Bin 0 -> 3328 bytes ...cs.Rotational.Examples.LossyGearDemo2I.png | Bin 0 -> 511 bytes ...odelica.Mechanics.Rotational.ExamplesI.png | Bin 0 -> 537 bytes help/Modelica.Mechanics.Rotational.FixedD.png | Bin 0 -> 597 bytes help/Modelica.Mechanics.Rotational.FixedI.png | Bin 0 -> 396 bytes help/Modelica.Mechanics.Rotational.Gear2D.png | Bin 0 -> 2273 bytes help/Modelica.Mechanics.Rotational.Gear2I.png | Bin 0 -> 768 bytes help/Modelica.Mechanics.Rotational.GearD.png | Bin 0 -> 2302 bytes ...a.Mechanics.Rotational.GearEfficiencyD.png | Bin 0 -> 868 bytes ...a.Mechanics.Rotational.GearEfficiencyI.png | Bin 0 -> 647 bytes help/Modelica.Mechanics.Rotational.GearI.png | Bin 0 -> 745 bytes ...delica.Mechanics.Rotational.IdealGearD.png | Bin 0 -> 1344 bytes ...delica.Mechanics.Rotational.IdealGearI.png | Bin 0 -> 853 bytes ...ica.Mechanics.Rotational.IdealGearR2TD.png | Bin 0 -> 1280 bytes ...ica.Mechanics.Rotational.IdealGearR2TI.png | Bin 0 -> 725 bytes ...a.Mechanics.Rotational.IdealPlanetaryD.png | Bin 0 -> 1790 bytes ...a.Mechanics.Rotational.IdealPlanetaryI.png | Bin 0 -> 946 bytes ...Modelica.Mechanics.Rotational.InertiaD.png | Bin 0 -> 1031 bytes ...Modelica.Mechanics.Rotational.InertiaI.png | Bin 0 -> 636 bytes ....Rotational.Interfaces.AbsoluteSensorD.png | Bin 0 -> 943 bytes ....Rotational.Interfaces.AbsoluteSensorI.png | Bin 0 -> 598 bytes ...anics.Rotational.Interfaces.CompliantD.png | Bin 0 -> 169 bytes ...anics.Rotational.Interfaces.CompliantI.png | Bin 0 -> 223 bytes ...hanics.Rotational.Interfaces.Flange_aD.png | Bin 0 -> 883 bytes ...hanics.Rotational.Interfaces.Flange_aI.png | Bin 0 -> 218 bytes ...hanics.Rotational.Interfaces.Flange_bD.png | Bin 0 -> 873 bytes ...hanics.Rotational.Interfaces.Flange_bI.png | Bin 0 -> 217 bytes ...cs.Rotational.Interfaces.FrictionBaseI.png | Bin 0 -> 174 bytes ....Rotational.Interfaces.RelativeSensorD.png | Bin 0 -> 1051 bytes ....Rotational.Interfaces.RelativeSensorI.png | Bin 0 -> 625 bytes ...Mechanics.Rotational.Interfaces.RigidD.png | Bin 0 -> 169 bytes ...Mechanics.Rotational.Interfaces.RigidI.png | Bin 0 -> 223 bytes ...nics.Rotational.Interfaces.TwoFlangesD.png | Bin 0 -> 169 bytes ...nics.Rotational.Interfaces.TwoFlangesI.png | Bin 0 -> 223 bytes ...elica.Mechanics.Rotational.InterfacesI.png | Bin 0 -> 516 bytes ...delica.Mechanics.Rotational.LossyGearD.png | Bin 0 -> 1344 bytes ...delica.Mechanics.Rotational.LossyGearI.png | Bin 0 -> 930 bytes help/Modelica.Mechanics.Rotational.MoveD.png | Bin 0 -> 787 bytes help/Modelica.Mechanics.Rotational.MoveI.png | Bin 0 -> 561 bytes ...ica.Mechanics.Rotational.OneWayClutchD.png | Bin 0 -> 341 bytes ...ica.Mechanics.Rotational.OneWayClutchI.png | Bin 0 -> 889 bytes ...odelica.Mechanics.Rotational.PositionD.png | Bin 0 -> 891 bytes ...odelica.Mechanics.Rotational.PositionI.png | Bin 0 -> 540 bytes ...a.Mechanics.Rotational.RelativeStatesD.png | Bin 0 -> 1095 bytes ...a.Mechanics.Rotational.RelativeStatesI.png | Bin 0 -> 522 bytes ...echanics.Rotational.Sensors.AccSensorD.png | Bin 0 -> 1154 bytes ...echanics.Rotational.Sensors.AccSensorI.png | Bin 0 -> 606 bytes ...hanics.Rotational.Sensors.AngleSensorD.png | Bin 0 -> 1160 bytes ...hanics.Rotational.Sensors.AngleSensorI.png | Bin 0 -> 619 bytes ...anics.Rotational.Sensors.RelAccSensorD.png | Bin 0 -> 1286 bytes ...anics.Rotational.Sensors.RelAccSensorI.png | Bin 0 -> 694 bytes ...ics.Rotational.Sensors.RelAngleSensorD.png | Bin 0 -> 1279 bytes ...ics.Rotational.Sensors.RelAngleSensorI.png | Bin 0 -> 710 bytes ...ics.Rotational.Sensors.RelSpeedSensorD.png | Bin 0 -> 1266 bytes ...ics.Rotational.Sensors.RelSpeedSensorI.png | Bin 0 -> 706 bytes ...hanics.Rotational.Sensors.SpeedSensorD.png | Bin 0 -> 1144 bytes ...hanics.Rotational.Sensors.SpeedSensorI.png | Bin 0 -> 634 bytes ...anics.Rotational.Sensors.TorqueSensorD.png | Bin 0 -> 1276 bytes ...anics.Rotational.Sensors.TorqueSensorI.png | Bin 0 -> 673 bytes ...Modelica.Mechanics.Rotational.SensorsI.png | Bin 0 -> 610 bytes .../Modelica.Mechanics.Rotational.SpringD.png | Bin 0 -> 882 bytes ...ica.Mechanics.Rotational.SpringDamperD.png | Bin 0 -> 972 bytes ...ica.Mechanics.Rotational.SpringDamperI.png | Bin 0 -> 611 bytes .../Modelica.Mechanics.Rotational.SpringI.png | Bin 0 -> 494 bytes .../Modelica.Mechanics.Rotational.TorqueD.png | Bin 0 -> 940 bytes .../Modelica.Mechanics.Rotational.TorqueI.png | Bin 0 -> 544 bytes help/Modelica.Mechanics.RotationalI.png | Bin 0 -> 750 bytes ...ca.Mechanics.Translational.AccelerateD.png | Bin 0 -> 494 bytes ...ca.Mechanics.Translational.AccelerateI.png | Bin 0 -> 445 bytes ...delica.Mechanics.Translational.DamperD.png | Bin 0 -> 725 bytes ...delica.Mechanics.Translational.DamperI.png | Bin 0 -> 466 bytes ...ica.Mechanics.Translational.ElastoGapD.png | Bin 0 -> 791 bytes ...ica.Mechanics.Translational.ElastoGapI.png | Bin 0 -> 593 bytes ...ics.Translational.Examples.AccelerateD.png | Bin 0 -> 1247 bytes ...ics.Translational.Examples.AccelerateI.png | Bin 0 -> 508 bytes ...chanics.Translational.Examples.DamperD.png | Bin 0 -> 3557 bytes ...chanics.Translational.Examples.DamperI.png | Bin 0 -> 479 bytes ...anics.Translational.Examples.FrictionD.png | Bin 0 -> 3117 bytes ...anics.Translational.Examples.FrictionI.png | Bin 0 -> 472 bytes ...nslational.Examples.InitialConditionsD.png | Bin 0 -> 2652 bytes ...nslational.Examples.InitialConditionsI.png | Bin 0 -> 504 bytes ...ics.Translational.Examples.OscillatorD.png | Bin 0 -> 4029 bytes ...ics.Translational.Examples.OscillatorI.png | Bin 0 -> 503 bytes ...hanics.Translational.Examples.PreLoadD.png | Bin 0 -> 6485 bytes ...hanics.Translational.Examples.PreLoadI.png | Bin 0 -> 479 bytes ...hanics.Translational.Examples.SensorsD.png | Bin 0 -> 3454 bytes ...hanics.Translational.Examples.SensorsI.png | Bin 0 -> 502 bytes ...Translational.Examples.SignConventionD.png | Bin 0 -> 4125 bytes ...Translational.Examples.SignConventionI.png | Bin 0 -> 520 bytes ...nics.Translational.Examples.WhyArrowsD.png | Bin 0 -> 4616 bytes ...nics.Translational.Examples.WhyArrowsI.png | Bin 0 -> 509 bytes ...lica.Mechanics.Translational.ExamplesI.png | Bin 0 -> 537 bytes ...odelica.Mechanics.Translational.FixedD.png | Bin 0 -> 498 bytes ...odelica.Mechanics.Translational.FixedI.png | Bin 0 -> 391 bytes ...odelica.Mechanics.Translational.ForceD.png | Bin 0 -> 748 bytes ...odelica.Mechanics.Translational.ForceI.png | Bin 0 -> 496 bytes ...anslational.Interfaces.AbsoluteSensorD.png | Bin 0 -> 436 bytes ...anslational.Interfaces.AbsoluteSensorI.png | Bin 0 -> 501 bytes ...cs.Translational.Interfaces.CompliantD.png | Bin 0 -> 383 bytes ...cs.Translational.Interfaces.CompliantI.png | Bin 0 -> 220 bytes ...ics.Translational.Interfaces.Flange_aD.png | Bin 0 -> 867 bytes ...ics.Translational.Interfaces.Flange_aI.png | Bin 0 -> 202 bytes ...ics.Translational.Interfaces.Flange_bD.png | Bin 0 -> 875 bytes ...ics.Translational.Interfaces.Flange_bI.png | Bin 0 -> 217 bytes ...Translational.Interfaces.FrictionBaseD.png | Bin 0 -> 166 bytes ...Translational.Interfaces.FrictionBaseI.png | Bin 0 -> 220 bytes ...anslational.Interfaces.RelativeSensorD.png | Bin 0 -> 557 bytes ...anslational.Interfaces.RelativeSensorI.png | Bin 0 -> 549 bytes ...hanics.Translational.Interfaces.RigidD.png | Bin 0 -> 166 bytes ...hanics.Translational.Interfaces.RigidI.png | Bin 0 -> 220 bytes ...s.Translational.Interfaces.TwoFlangesD.png | Bin 0 -> 166 bytes ...s.Translational.Interfaces.TwoFlangesI.png | Bin 0 -> 220 bytes ...ca.Mechanics.Translational.InterfacesI.png | Bin 0 -> 516 bytes ...Modelica.Mechanics.Translational.MoveD.png | Bin 0 -> 462 bytes ...Modelica.Mechanics.Translational.MoveI.png | Bin 0 -> 465 bytes ...lica.Mechanics.Translational.PositionD.png | Bin 0 -> 463 bytes ...lica.Mechanics.Translational.PositionI.png | Bin 0 -> 426 bytes ...echanics.Translational.RelativeStatesD.png | Bin 0 -> 1110 bytes ...echanics.Translational.RelativeStatesI.png | Bin 0 -> 591 bytes .../Modelica.Mechanics.Translational.RodD.png | Bin 0 -> 620 bytes .../Modelica.Mechanics.Translational.RodI.png | Bin 0 -> 438 bytes ...anics.Translational.Sensors.AccSensorD.png | Bin 0 -> 442 bytes ...anics.Translational.Sensors.AccSensorI.png | Bin 0 -> 495 bytes ...ics.Translational.Sensors.ForceSensorD.png | Bin 0 -> 436 bytes ...ics.Translational.Sensors.ForceSensorI.png | Bin 0 -> 538 bytes ....Translational.Sensors.PositionSensorD.png | Bin 0 -> 442 bytes ....Translational.Sensors.PositionSensorI.png | Bin 0 -> 517 bytes ...ics.Translational.Sensors.SpeedSensorD.png | Bin 0 -> 444 bytes ...ics.Translational.Sensors.SpeedSensorI.png | Bin 0 -> 531 bytes ...elica.Mechanics.Translational.SensorsI.png | Bin 0 -> 610 bytes ...a.Mechanics.Translational.SlidingMassD.png | Bin 0 -> 1095 bytes ...a.Mechanics.Translational.SlidingMassI.png | Bin 0 -> 690 bytes ...delica.Mechanics.Translational.SpringD.png | Bin 0 -> 887 bytes ....Mechanics.Translational.SpringDamperD.png | Bin 0 -> 934 bytes ....Mechanics.Translational.SpringDamperI.png | Bin 0 -> 651 bytes ...delica.Mechanics.Translational.SpringI.png | Bin 0 -> 509 bytes ...Modelica.Mechanics.Translational.StopD.png | Bin 0 -> 1171 bytes ...Modelica.Mechanics.Translational.StopI.png | Bin 0 -> 660 bytes help/Modelica.Mechanics.TranslationalI.png | Bin 0 -> 803 bytes help/Modelica.MechanicsI.png | Bin 0 -> 734 bytes ...ca.SIunits.Conversions.ConversionIconI.png | Bin 0 -> 399 bytes ...delica.SIunits.Conversions.NonSIunitsI.png | Bin 0 -> 630 bytes ...Modelica.SIunits.Conversions.from_barI.png | Bin 0 -> 546 bytes ...Modelica.SIunits.Conversions.from_dayI.png | Bin 0 -> 554 bytes ...odelica.SIunits.Conversions.from_degCI.png | Bin 0 -> 551 bytes ...odelica.SIunits.Conversions.from_degFI.png | Bin 0 -> 530 bytes ...Modelica.SIunits.Conversions.from_degI.png | Bin 0 -> 564 bytes ...delica.SIunits.Conversions.from_degRkI.png | Bin 0 -> 539 bytes ...Modelica.SIunits.Conversions.from_gpsI.png | Bin 0 -> 600 bytes ...odelica.SIunits.Conversions.from_hourI.png | Bin 0 -> 492 bytes ...Modelica.SIunits.Conversions.from_kWhI.png | Bin 0 -> 476 bytes ...Modelica.SIunits.Conversions.from_kmhI.png | Bin 0 -> 505 bytes ...delica.SIunits.Conversions.from_litreI.png | Bin 0 -> 533 bytes ...elica.SIunits.Conversions.from_minuteI.png | Bin 0 -> 501 bytes ...Modelica.SIunits.Conversions.from_rpmI.png | Bin 0 -> 507 bytes help/Modelica.SIunits.Conversions.to_barI.png | Bin 0 -> 526 bytes help/Modelica.SIunits.Conversions.to_dayI.png | Bin 0 -> 537 bytes .../Modelica.SIunits.Conversions.to_degCI.png | Bin 0 -> 546 bytes .../Modelica.SIunits.Conversions.to_degFI.png | Bin 0 -> 514 bytes help/Modelica.SIunits.Conversions.to_degI.png | Bin 0 -> 550 bytes ...Modelica.SIunits.Conversions.to_degRkI.png | Bin 0 -> 553 bytes help/Modelica.SIunits.Conversions.to_gpsI.png | Bin 0 -> 587 bytes .../Modelica.SIunits.Conversions.to_hourI.png | Bin 0 -> 475 bytes help/Modelica.SIunits.Conversions.to_kWhI.png | Bin 0 -> 460 bytes help/Modelica.SIunits.Conversions.to_kmhI.png | Bin 0 -> 487 bytes ...Modelica.SIunits.Conversions.to_litreI.png | Bin 0 -> 517 bytes ...odelica.SIunits.Conversions.to_minuteI.png | Bin 0 -> 499 bytes help/Modelica.SIunits.Conversions.to_rpmI.png | Bin 0 -> 496 bytes help/Modelica.SIunits.ConversionsI.png | Bin 0 -> 619 bytes help/Modelica.SIunitsD.png | Bin 0 -> 136 bytes help/Modelica.SIunitsI.png | Bin 0 -> 599 bytes ...ca.Thermal.HeatTransfer.BodyRadiationD.png | Bin 0 -> 836 bytes ...ca.Thermal.HeatTransfer.BodyRadiationI.png | Bin 0 -> 701 bytes ...HeatTransfer.Celsius.FixedTemperatureD.png | Bin 0 -> 1311 bytes ...HeatTransfer.Celsius.FixedTemperatureI.png | Bin 0 -> 716 bytes ...ermal.HeatTransfer.Celsius.FromKelvinD.png | Bin 0 -> 908 bytes ...ermal.HeatTransfer.Celsius.FromKelvinI.png | Bin 0 -> 617 bytes ...ransfer.Celsius.PrescribedTemperatureD.png | Bin 0 -> 1497 bytes ...ransfer.Celsius.PrescribedTemperatureI.png | Bin 0 -> 711 bytes ...eatTransfer.Celsius.TemperatureSensorD.png | Bin 0 -> 837 bytes ...eatTransfer.Celsius.TemperatureSensorI.png | Bin 0 -> 585 bytes ...Thermal.HeatTransfer.Celsius.ToKelvinD.png | Bin 0 -> 904 bytes ...Thermal.HeatTransfer.Celsius.ToKelvinI.png | Bin 0 -> 603 bytes ...Modelica.Thermal.HeatTransfer.CelsiusI.png | Bin 0 -> 513 bytes ...elica.Thermal.HeatTransfer.ConvectionD.png | Bin 0 -> 1028 bytes ...elica.Thermal.HeatTransfer.ConvectionI.png | Bin 0 -> 663 bytes ...ontrolledTemperature.SwitchControllerD.png | Bin 0 -> 390 bytes ...ontrolledTemperature.SwitchControllerI.png | Bin 0 -> 705 bytes ...ansfer.Examples.ControlledTemperatureD.png | Bin 0 -> 3425 bytes ...ansfer.Examples.ControlledTemperatureI.png | Bin 0 -> 501 bytes ...atTransfer.Examples.FrequencyInverterD.png | Bin 0 -> 3592 bytes ...atTransfer.Examples.FrequencyInverterI.png | Bin 0 -> 513 bytes ...ermal.HeatTransfer.Examples.TwoMassesD.png | Bin 0 -> 3613 bytes ...ermal.HeatTransfer.Examples.TwoMassesI.png | Bin 0 -> 514 bytes ...odelica.Thermal.HeatTransfer.ExamplesI.png | Bin 0 -> 537 bytes ...tTransfer.Fahrenheit.FixedTemperatureD.png | Bin 0 -> 1158 bytes ...tTransfer.Fahrenheit.FixedTemperatureI.png | Bin 0 -> 659 bytes ...al.HeatTransfer.Fahrenheit.FromKelvinD.png | Bin 0 -> 857 bytes ...al.HeatTransfer.Fahrenheit.FromKelvinI.png | Bin 0 -> 592 bytes ...sfer.Fahrenheit.PrescribedTemperatureD.png | Bin 0 -> 1331 bytes ...sfer.Fahrenheit.PrescribedTemperatureI.png | Bin 0 -> 655 bytes ...Transfer.Fahrenheit.TemperatureSensorD.png | Bin 0 -> 778 bytes ...Transfer.Fahrenheit.TemperatureSensorI.png | Bin 0 -> 543 bytes ...rmal.HeatTransfer.Fahrenheit.ToKelvinD.png | Bin 0 -> 842 bytes ...rmal.HeatTransfer.Fahrenheit.ToKelvinI.png | Bin 0 -> 577 bytes ...elica.Thermal.HeatTransfer.FahrenheitI.png | Bin 0 -> 520 bytes ...ca.Thermal.HeatTransfer.FixedHeatFlowD.png | Bin 0 -> 565 bytes ...ca.Thermal.HeatTransfer.FixedHeatFlowI.png | Bin 0 -> 556 bytes ...Thermal.HeatTransfer.FixedTemperatureD.png | Bin 0 -> 1202 bytes ...Thermal.HeatTransfer.FixedTemperatureI.png | Bin 0 -> 672 bytes ...ca.Thermal.HeatTransfer.HeatCapacitorD.png | Bin 0 -> 1029 bytes ...ca.Thermal.HeatTransfer.HeatCapacitorI.png | Bin 0 -> 646 bytes ...a.Thermal.HeatTransfer.HeatFlowSensorD.png | Bin 0 -> 1036 bytes ...a.Thermal.HeatTransfer.HeatFlowSensorI.png | Bin 0 -> 633 bytes ...mal.HeatTransfer.Interfaces.Element1DD.png | Bin 0 -> 168 bytes ...mal.HeatTransfer.Interfaces.Element1DI.png | Bin 0 -> 215 bytes ...rmal.HeatTransfer.Interfaces.HeatPortI.png | Bin 0 -> 174 bytes ...al.HeatTransfer.Interfaces.HeatPort_aD.png | Bin 0 -> 828 bytes ...al.HeatTransfer.Interfaces.HeatPort_aI.png | Bin 0 -> 311 bytes ...al.HeatTransfer.Interfaces.HeatPort_bD.png | Bin 0 -> 833 bytes ...al.HeatTransfer.Interfaces.HeatPort_bI.png | Bin 0 -> 321 bytes ...elica.Thermal.HeatTransfer.InterfacesI.png | Bin 0 -> 516 bytes ...ermal.HeatTransfer.PrescribedHeatFlowD.png | Bin 0 -> 557 bytes ...ermal.HeatTransfer.PrescribedHeatFlowI.png | Bin 0 -> 510 bytes ...al.HeatTransfer.PrescribedTemperatureD.png | Bin 0 -> 1388 bytes ...al.HeatTransfer.PrescribedTemperatureI.png | Bin 0 -> 671 bytes ...HeatTransfer.Rankine.FixedTemperatureD.png | Bin 0 -> 1236 bytes ...HeatTransfer.Rankine.FixedTemperatureI.png | Bin 0 -> 687 bytes ...ermal.HeatTransfer.Rankine.FromKelvinD.png | Bin 0 -> 900 bytes ...ermal.HeatTransfer.Rankine.FromKelvinI.png | Bin 0 -> 613 bytes ...ransfer.Rankine.PrescribedTemperatureD.png | Bin 0 -> 1429 bytes ...ransfer.Rankine.PrescribedTemperatureI.png | Bin 0 -> 677 bytes ...eatTransfer.Rankine.TemperatureSensorD.png | Bin 0 -> 808 bytes ...eatTransfer.Rankine.TemperatureSensorI.png | Bin 0 -> 567 bytes ...Thermal.HeatTransfer.Rankine.ToKelvinD.png | Bin 0 -> 912 bytes ...Thermal.HeatTransfer.Rankine.ToKelvinI.png | Bin 0 -> 594 bytes ...Modelica.Thermal.HeatTransfer.RankineI.png | Bin 0 -> 506 bytes ...mal.HeatTransfer.RelTemperatureSensorD.png | Bin 0 -> 567 bytes ...mal.HeatTransfer.RelTemperatureSensorI.png | Bin 0 -> 531 bytes ...hermal.HeatTransfer.TemperatureSensorD.png | Bin 0 -> 792 bytes ...hermal.HeatTransfer.TemperatureSensorI.png | Bin 0 -> 561 bytes ...Thermal.HeatTransfer.ThermalConductorD.png | Bin 0 -> 566 bytes ...Thermal.HeatTransfer.ThermalConductorI.png | Bin 0 -> 532 bytes help/Modelica.Thermal.HeatTransferI.png | Bin 0 -> 771 bytes help/Modelica.ThermalI.png | Bin 0 -> 493 bytes help/Modelica.html | 225 + help/ModelicaI.png | Bin 0 -> 513 bytes help/Modelica_Blocks.html | 103 + help/Modelica_Blocks_Continuous.html | 901 +++ help/Modelica_Blocks_Examples.html | 348 + help/Modelica_Blocks_Examples_Interfaces.html | 54 + help/Modelica_Blocks_Interfaces.html | 980 +++ ...odelica_Blocks_Interfaces_BusAdaptors.html | 195 + ...locks_Interfaces_BusAdaptors_Internal.html | 87 + help/Modelica_Blocks_Math.html | 1611 +++++ help/Modelica_Blocks_Nonlinear.html | 193 + help/Modelica_Blocks_Sources.html | 1173 ++++ help/Modelica_Constants.html | 110 + help/Modelica_Electrical.html | 57 + help/Modelica_Electrical_Analog.html | 74 + help/Modelica_Electrical_Analog_Basic.html | 646 ++ help/Modelica_Electrical_Analog_Examples.html | 684 ++ ..._Electrical_Analog_Examples_Utilities.html | 302 + help/Modelica_Electrical_Analog_Ideal.html | 1104 ++++ ...Modelica_Electrical_Analog_Interfaces.html | 322 + help/Modelica_Electrical_Analog_Lines.html | 459 ++ ...lica_Electrical_Analog_Semiconductors.html | 625 ++ help/Modelica_Electrical_Analog_Sensors.html | 113 + help/Modelica_Electrical_Analog_Sources.html | 843 +++ help/Modelica_Icons.html | 190 + help/Modelica_Icons_Library.html | 13 + help/Modelica_Icons_Library2.html | 13 + help/Modelica_Math.html | 467 ++ help/Modelica_Mechanics.html | 77 + help/Modelica_Mechanics_Rotational.html | 2673 ++++++++ ...odelica_Mechanics_Rotational_Examples.html | 589 ++ ...elica_Mechanics_Rotational_Interfaces.html | 504 ++ ...Modelica_Mechanics_Rotational_Sensors.html | 328 + help/Modelica_Mechanics_Translational.html | 1047 +++ ...lica_Mechanics_Translational_Examples.html | 727 +++ ...ca_Mechanics_Translational_Interfaces.html | 428 ++ ...elica_Mechanics_Translational_Sensors.html | 181 + help/Modelica_SIunits.html | 990 +++ help/Modelica_SIunits_Conversions.html | 678 ++ ...delica_SIunits_Conversions_NonSIunits.html | 55 + help/Modelica_Thermal.html | 15 + help/Modelica_Thermal_HeatTransfer.html | 793 +++ ...Modelica_Thermal_HeatTransfer_Celsius.html | 202 + ...odelica_Thermal_HeatTransfer_Examples.html | 336 + ...elica_Thermal_HeatTransfer_Fahrenheit.html | 202 + ...elica_Thermal_HeatTransfer_Interfaces.html | 147 + ...Modelica_Thermal_HeatTransfer_Rankine.html | 203 + package.mo | 212 +- 838 files changed, 41647 insertions(+), 10880 deletions(-) create mode 100644 Blocks/Examples.mo create mode 100644 Documentation/ChangeNotes1.5.html create mode 100644 Images/ControlledIdealIntermediateSwitch1.png create mode 100644 Images/ControlledIdealIntermediateSwitch2.png create mode 100644 Images/Fig.translational.examples.InitialConditions.gif create mode 100644 Images/IdealIntermediateSwitch1.png create mode 100644 Images/IdealIntermediateSwitch2.png create mode 100644 Images/PreLoad.gif create mode 100644 Images/PreLoad.png create mode 100644 Images/Preload2.gif create mode 100644 Images/Preload2.png create mode 100644 Images/Preload3.png create mode 100644 Images/Preload4.png create mode 100644 Images/Stribeck.gif create mode 100644 Images/_readme.txt create mode 100644 Images/drive1.gif create mode 100644 Images/drive2.gif create mode 100644 Images/drive3.gif create mode 100644 Images/drive4.gif create mode 100644 Images/driveAxis.gif create mode 100644 Images/driveConnections.gif create mode 100644 Images/driveConnections2.gif create mode 100644 Images/driveWithHeatTransfer.png create mode 100644 Images/inertias.gif create mode 100644 Images/relativeStates.gif create mode 100644 Images/relativeStates2.gif delete mode 100644 Math.mo create mode 100644 Math/package.mo create mode 100644 Mechanics/CoupledClutches.mos create mode 100644 Mechanics/Translational.mo create mode 100644 Thermal/HeatTransfer.mo create mode 100644 Thermal/package.mo create mode 100644 help/Modelica.Blocks.Continuous.DerD.png create mode 100644 help/Modelica.Blocks.Continuous.DerI.png create mode 100644 help/Modelica.Blocks.Continuous.DerivativeD.png create mode 100644 help/Modelica.Blocks.Continuous.DerivativeI.png create mode 100644 help/Modelica.Blocks.Continuous.FirstOrderD.png create mode 100644 help/Modelica.Blocks.Continuous.FirstOrderI.png create mode 100644 help/Modelica.Blocks.Continuous.IntegratorD.png create mode 100644 help/Modelica.Blocks.Continuous.IntegratorI.png create mode 100644 help/Modelica.Blocks.Continuous.LimIntegratorD.png create mode 100644 help/Modelica.Blocks.Continuous.LimIntegratorI.png create mode 100644 help/Modelica.Blocks.Continuous.LimPIDD.png create mode 100644 help/Modelica.Blocks.Continuous.LimPIDI.png create mode 100644 help/Modelica.Blocks.Continuous.PID.png create mode 100644 help/Modelica.Blocks.Continuous.PIDD.png create mode 100644 help/Modelica.Blocks.Continuous.PIDI.png create mode 100644 help/Modelica.Blocks.Continuous.PII.png create mode 100644 help/Modelica.Blocks.Continuous.SecondOrderD.png create mode 100644 help/Modelica.Blocks.Continuous.SecondOrderI.png create mode 100644 help/Modelica.Blocks.Continuous.StateSpaceD.png create mode 100644 help/Modelica.Blocks.Continuous.StateSpaceI.png create mode 100644 help/Modelica.Blocks.Continuous.TransferFunctionD.png create mode 100644 help/Modelica.Blocks.Continuous.TransferFunctionI.png create mode 100644 help/Modelica.Blocks.ContinuousI.png create mode 100644 help/Modelica.Blocks.Examples.BusUsage.Interfaces.BusD.png create mode 100644 help/Modelica.Blocks.Examples.BusUsage.Interfaces.BusI.png create mode 100644 help/Modelica.Blocks.Examples.BusUsage.Interfaces.MultiPortD.png create mode 100644 help/Modelica.Blocks.Examples.BusUsage.Interfaces.MultiPortI.png create mode 100644 help/Modelica.Blocks.Examples.BusUsage.PartD.png create mode 100644 help/Modelica.Blocks.Examples.BusUsage.PartI.png create mode 100644 help/Modelica.Blocks.Examples.BusUsage.RestBusD.png create mode 100644 help/Modelica.Blocks.Examples.BusUsage.RestBusI.png create mode 100644 help/Modelica.Blocks.Examples.BusUsageD.png create mode 100644 help/Modelica.Blocks.Examples.BusUsageI.png create mode 100644 help/Modelica.Blocks.ExamplesI.png create mode 100644 help/Modelica.Blocks.Interfaces.BlockIconI.png create mode 100644 help/Modelica.Blocks.Interfaces.BooleanBlockIconI.png create mode 100644 help/Modelica.Blocks.Interfaces.BooleanInPortD.png create mode 100644 help/Modelica.Blocks.Interfaces.BooleanInPortI.png create mode 100644 help/Modelica.Blocks.Interfaces.BooleanMIMOsD.png create mode 100644 help/Modelica.Blocks.Interfaces.BooleanMIMOsI.png create mode 100644 help/Modelica.Blocks.Interfaces.BooleanOutPortD.png create mode 100644 help/Modelica.Blocks.Interfaces.BooleanOutPortI.png create mode 100644 help/Modelica.Blocks.Interfaces.BooleanPortI.png create mode 100644 help/Modelica.Blocks.Interfaces.BooleanSISOD.png create mode 100644 help/Modelica.Blocks.Interfaces.BooleanSISOI.png create mode 100644 help/Modelica.Blocks.Interfaces.BooleanSignalSourceD.png create mode 100644 help/Modelica.Blocks.Interfaces.BooleanSignalSourceI.png create mode 100644 help/Modelica.Blocks.Interfaces.BusAdaptors.Internal.InputBooleanD.png create mode 100644 help/Modelica.Blocks.Interfaces.BusAdaptors.Internal.InputBooleanI.png create mode 100644 help/Modelica.Blocks.Interfaces.BusAdaptors.Internal.InputIntegerD.png create mode 100644 help/Modelica.Blocks.Interfaces.BusAdaptors.Internal.InputIntegerI.png create mode 100644 help/Modelica.Blocks.Interfaces.BusAdaptors.Internal.InputRealD.png create mode 100644 help/Modelica.Blocks.Interfaces.BusAdaptors.Internal.InputRealI.png create mode 100644 help/Modelica.Blocks.Interfaces.BusAdaptors.Internal.OutputBooleanD.png create mode 100644 help/Modelica.Blocks.Interfaces.BusAdaptors.Internal.OutputBooleanI.png create mode 100644 help/Modelica.Blocks.Interfaces.BusAdaptors.Internal.OutputIntegerD.png create mode 100644 help/Modelica.Blocks.Interfaces.BusAdaptors.Internal.OutputIntegerI.png create mode 100644 help/Modelica.Blocks.Interfaces.BusAdaptors.Internal.OutputRealD.png create mode 100644 help/Modelica.Blocks.Interfaces.BusAdaptors.Internal.OutputRealI.png create mode 100644 help/Modelica.Blocks.Interfaces.BusAdaptors.InternalI.png create mode 100644 help/Modelica.Blocks.Interfaces.BusAdaptors.ReceiveBooleanD.png create mode 100644 help/Modelica.Blocks.Interfaces.BusAdaptors.ReceiveBooleanI.png create mode 100644 help/Modelica.Blocks.Interfaces.BusAdaptors.ReceiveIntegerD.png create mode 100644 help/Modelica.Blocks.Interfaces.BusAdaptors.ReceiveIntegerI.png create mode 100644 help/Modelica.Blocks.Interfaces.BusAdaptors.ReceiveRealD.png create mode 100644 help/Modelica.Blocks.Interfaces.BusAdaptors.ReceiveRealI.png create mode 100644 help/Modelica.Blocks.Interfaces.BusAdaptors.SendBooleanD.png create mode 100644 help/Modelica.Blocks.Interfaces.BusAdaptors.SendBooleanI.png create mode 100644 help/Modelica.Blocks.Interfaces.BusAdaptors.SendIntegerD.png create mode 100644 help/Modelica.Blocks.Interfaces.BusAdaptors.SendIntegerI.png create mode 100644 help/Modelica.Blocks.Interfaces.BusAdaptors.SendRealD.png create mode 100644 help/Modelica.Blocks.Interfaces.BusAdaptors.SendRealI.png create mode 100644 help/Modelica.Blocks.Interfaces.BusAdaptorsI.png create mode 100644 help/Modelica.Blocks.Interfaces.InPortD.png create mode 100644 help/Modelica.Blocks.Interfaces.InPortI.png create mode 100644 help/Modelica.Blocks.Interfaces.IntegerBlockIconI.png create mode 100644 help/Modelica.Blocks.Interfaces.IntegerInPortD.png create mode 100644 help/Modelica.Blocks.Interfaces.IntegerInPortI.png create mode 100644 help/Modelica.Blocks.Interfaces.IntegerMIBooleanMOsD.png create mode 100644 help/Modelica.Blocks.Interfaces.IntegerMIBooleanMOsI.png create mode 100644 help/Modelica.Blocks.Interfaces.IntegerMOD.png create mode 100644 help/Modelica.Blocks.Interfaces.IntegerMOI.png create mode 100644 help/Modelica.Blocks.Interfaces.IntegerOutPortD.png create mode 100644 help/Modelica.Blocks.Interfaces.IntegerOutPortI.png create mode 100644 help/Modelica.Blocks.Interfaces.IntegerPortI.png create mode 100644 help/Modelica.Blocks.Interfaces.IntegerSignalSourceD.png create mode 100644 help/Modelica.Blocks.Interfaces.IntegerSignalSourceI.png create mode 100644 help/Modelica.Blocks.Interfaces.MI2BooleanMOsD.png create mode 100644 help/Modelica.Blocks.Interfaces.MI2BooleanMOsI.png create mode 100644 help/Modelica.Blocks.Interfaces.MI2MOD.png create mode 100644 help/Modelica.Blocks.Interfaces.MI2MOI.png create mode 100644 help/Modelica.Blocks.Interfaces.MIMOD.png create mode 100644 help/Modelica.Blocks.Interfaces.MIMOI.png create mode 100644 help/Modelica.Blocks.Interfaces.MIMOsD.png create mode 100644 help/Modelica.Blocks.Interfaces.MIMOsI.png create mode 100644 help/Modelica.Blocks.Interfaces.MISOD.png create mode 100644 help/Modelica.Blocks.Interfaces.MISOI.png create mode 100644 help/Modelica.Blocks.Interfaces.MOD.png create mode 100644 help/Modelica.Blocks.Interfaces.MOI.png create mode 100644 help/Modelica.Blocks.Interfaces.MVcontrolD.png create mode 100644 help/Modelica.Blocks.Interfaces.MVcontrolI.png create mode 100644 help/Modelica.Blocks.Interfaces.OutPortD.png create mode 100644 help/Modelica.Blocks.Interfaces.OutPortI.png create mode 100644 help/Modelica.Blocks.Interfaces.RealPortI.png create mode 100644 help/Modelica.Blocks.Interfaces.SI2SOD.png create mode 100644 help/Modelica.Blocks.Interfaces.SI2SOI.png create mode 100644 help/Modelica.Blocks.Interfaces.SIMOD.png create mode 100644 help/Modelica.Blocks.Interfaces.SIMOI.png create mode 100644 help/Modelica.Blocks.Interfaces.SISOD.png create mode 100644 help/Modelica.Blocks.Interfaces.SISOI.png create mode 100644 help/Modelica.Blocks.Interfaces.SOD.png create mode 100644 help/Modelica.Blocks.Interfaces.SOI.png create mode 100644 help/Modelica.Blocks.Interfaces.SVcontrolD.png create mode 100644 help/Modelica.Blocks.Interfaces.SVcontrolI.png create mode 100644 help/Modelica.Blocks.Interfaces.SignalSourceD.png create mode 100644 help/Modelica.Blocks.Interfaces.SignalSourceI.png create mode 100644 help/Modelica.Blocks.InterfacesI.png create mode 100644 help/Modelica.Blocks.Math.AbsD.png create mode 100644 help/Modelica.Blocks.Math.AbsI.png create mode 100644 help/Modelica.Blocks.Math.AcosD.png create mode 100644 help/Modelica.Blocks.Math.AcosI.png create mode 100644 help/Modelica.Blocks.Math.Add3D.png create mode 100644 help/Modelica.Blocks.Math.Add3I.png create mode 100644 help/Modelica.Blocks.Math.AddD.png create mode 100644 help/Modelica.Blocks.Math.AddI.png create mode 100644 help/Modelica.Blocks.Math.AsinD.png create mode 100644 help/Modelica.Blocks.Math.AsinI.png create mode 100644 help/Modelica.Blocks.Math.Atan2D.png create mode 100644 help/Modelica.Blocks.Math.Atan2I.png create mode 100644 help/Modelica.Blocks.Math.AtanD.png create mode 100644 help/Modelica.Blocks.Math.AtanI.png create mode 100644 help/Modelica.Blocks.Math.BooleanChangeD.png create mode 100644 help/Modelica.Blocks.Math.BooleanChangeI.png create mode 100644 help/Modelica.Blocks.Math.CosD.png create mode 100644 help/Modelica.Blocks.Math.CosI.png create mode 100644 help/Modelica.Blocks.Math.CoshD.png create mode 100644 help/Modelica.Blocks.Math.CoshI.png create mode 100644 help/Modelica.Blocks.Math.DivisionD.png create mode 100644 help/Modelica.Blocks.Math.DivisionI.png create mode 100644 help/Modelica.Blocks.Math.EdgeD.png create mode 100644 help/Modelica.Blocks.Math.EdgeI.png create mode 100644 help/Modelica.Blocks.Math.ExpD.png create mode 100644 help/Modelica.Blocks.Math.ExpI.png create mode 100644 help/Modelica.Blocks.Math.FeedbackD.png create mode 100644 help/Modelica.Blocks.Math.FeedbackI.png create mode 100644 help/Modelica.Blocks.Math.GainD.png create mode 100644 help/Modelica.Blocks.Math.GainI.png create mode 100644 help/Modelica.Blocks.Math.IntegerChangeD.png create mode 100644 help/Modelica.Blocks.Math.IntegerChangeI.png create mode 100644 help/Modelica.Blocks.Math.IntegerToRealD.png create mode 100644 help/Modelica.Blocks.Math.IntegerToRealI.png create mode 100644 help/Modelica.Blocks.Math.Log10D.png create mode 100644 help/Modelica.Blocks.Math.Log10I.png create mode 100644 help/Modelica.Blocks.Math.LogD.png create mode 100644 help/Modelica.Blocks.Math.LogI.png create mode 100644 help/Modelica.Blocks.Math.MatrixGainD.png create mode 100644 help/Modelica.Blocks.Math.MatrixGainI.png create mode 100644 help/Modelica.Blocks.Math.MaxD.png create mode 100644 help/Modelica.Blocks.Math.MaxI.png create mode 100644 help/Modelica.Blocks.Math.MinD.png create mode 100644 help/Modelica.Blocks.Math.MinI.png create mode 100644 help/Modelica.Blocks.Math.ProductD.png create mode 100644 help/Modelica.Blocks.Math.ProductI.png create mode 100644 help/Modelica.Blocks.Math.RealToIntegerD.png create mode 100644 help/Modelica.Blocks.Math.RealToIntegerI.png create mode 100644 help/Modelica.Blocks.Math.SignD.png create mode 100644 help/Modelica.Blocks.Math.SignI.png create mode 100644 help/Modelica.Blocks.Math.SinD.png create mode 100644 help/Modelica.Blocks.Math.SinI.png create mode 100644 help/Modelica.Blocks.Math.SinhD.png create mode 100644 help/Modelica.Blocks.Math.SinhI.png create mode 100644 help/Modelica.Blocks.Math.SqrtD.png create mode 100644 help/Modelica.Blocks.Math.SqrtI.png create mode 100644 help/Modelica.Blocks.Math.SumD.png create mode 100644 help/Modelica.Blocks.Math.SumI.png create mode 100644 help/Modelica.Blocks.Math.TanD.png create mode 100644 help/Modelica.Blocks.Math.TanI.png create mode 100644 help/Modelica.Blocks.Math.TanhD.png create mode 100644 help/Modelica.Blocks.Math.TanhI.png create mode 100644 help/Modelica.Blocks.Math.TwoInputsD.png create mode 100644 help/Modelica.Blocks.Math.TwoInputsI.png create mode 100644 help/Modelica.Blocks.Math.TwoOutputsD.png create mode 100644 help/Modelica.Blocks.Math.TwoOutputsI.png create mode 100644 help/Modelica.Blocks.MathI.png create mode 100644 help/Modelica.Blocks.Nonlinear.DeadZoneD.png create mode 100644 help/Modelica.Blocks.Nonlinear.DeadZoneI.png create mode 100644 help/Modelica.Blocks.Nonlinear.LimiterD.png create mode 100644 help/Modelica.Blocks.Nonlinear.LimiterI.png create mode 100644 help/Modelica.Blocks.Nonlinear.VariableLimiterD.png create mode 100644 help/Modelica.Blocks.Nonlinear.VariableLimiterI.png create mode 100644 help/Modelica.Blocks.NonlinearI.png create mode 100644 help/Modelica.Blocks.Sources.BooleanConstantD.png create mode 100644 help/Modelica.Blocks.Sources.BooleanConstantI.png create mode 100644 help/Modelica.Blocks.Sources.BooleanPulseD.png create mode 100644 help/Modelica.Blocks.Sources.BooleanPulseI.png create mode 100644 help/Modelica.Blocks.Sources.BooleanStepD.png create mode 100644 help/Modelica.Blocks.Sources.BooleanStepI.png create mode 100644 help/Modelica.Blocks.Sources.ClockD.png create mode 100644 help/Modelica.Blocks.Sources.ClockI.png create mode 100644 help/Modelica.Blocks.Sources.ConstantD.png create mode 100644 help/Modelica.Blocks.Sources.ConstantI.png create mode 100644 help/Modelica.Blocks.Sources.ExpSineD.png create mode 100644 help/Modelica.Blocks.Sources.ExpSineI.png create mode 100644 help/Modelica.Blocks.Sources.ExponentialsD.png create mode 100644 help/Modelica.Blocks.Sources.ExponentialsI.png create mode 100644 help/Modelica.Blocks.Sources.IntegerConstantD.png create mode 100644 help/Modelica.Blocks.Sources.IntegerConstantI.png create mode 100644 help/Modelica.Blocks.Sources.IntegerStepD.png create mode 100644 help/Modelica.Blocks.Sources.IntegerStepI.png create mode 100644 help/Modelica.Blocks.Sources.KinematicPTPD.png create mode 100644 help/Modelica.Blocks.Sources.KinematicPTPI.png create mode 100644 help/Modelica.Blocks.Sources.PulseD.png create mode 100644 help/Modelica.Blocks.Sources.PulseI.png create mode 100644 help/Modelica.Blocks.Sources.RampD.png create mode 100644 help/Modelica.Blocks.Sources.RampI.png create mode 100644 help/Modelica.Blocks.Sources.SampleTriggerD.png create mode 100644 help/Modelica.Blocks.Sources.SampleTriggerI.png create mode 100644 help/Modelica.Blocks.Sources.SawToothD.png create mode 100644 help/Modelica.Blocks.Sources.SawToothI.png create mode 100644 help/Modelica.Blocks.Sources.SineD.png create mode 100644 help/Modelica.Blocks.Sources.SineI.png create mode 100644 help/Modelica.Blocks.Sources.StepD.png create mode 100644 help/Modelica.Blocks.Sources.StepI.png create mode 100644 help/Modelica.Blocks.Sources.TimeTableD.png create mode 100644 help/Modelica.Blocks.Sources.TimeTableI.png create mode 100644 help/Modelica.Blocks.Sources.TrapezoidD.png create mode 100644 help/Modelica.Blocks.Sources.TrapezoidI.png create mode 100644 help/Modelica.Blocks.SourcesI.png create mode 100644 help/Modelica.BlocksI.png create mode 100644 help/Modelica.ConstantsI.png create mode 100644 help/Modelica.Electrical.Analog.Basic.CCCD.png create mode 100644 help/Modelica.Electrical.Analog.Basic.CCCI.png create mode 100644 help/Modelica.Electrical.Analog.Basic.CCVD.png create mode 100644 help/Modelica.Electrical.Analog.Basic.CCVI.png create mode 100644 help/Modelica.Electrical.Analog.Basic.CapacitorD.png create mode 100644 help/Modelica.Electrical.Analog.Basic.CapacitorI.png create mode 100644 help/Modelica.Electrical.Analog.Basic.ConductorD.png create mode 100644 help/Modelica.Electrical.Analog.Basic.ConductorI.png create mode 100644 help/Modelica.Electrical.Analog.Basic.EMFD.png create mode 100644 help/Modelica.Electrical.Analog.Basic.EMFI.png create mode 100644 help/Modelica.Electrical.Analog.Basic.GroundD.png create mode 100644 help/Modelica.Electrical.Analog.Basic.GroundI.png create mode 100644 help/Modelica.Electrical.Analog.Basic.GyratorD.png create mode 100644 help/Modelica.Electrical.Analog.Basic.GyratorI.png create mode 100644 help/Modelica.Electrical.Analog.Basic.HeatingResistorD.png create mode 100644 help/Modelica.Electrical.Analog.Basic.HeatingResistorI.png create mode 100644 help/Modelica.Electrical.Analog.Basic.InductorD.png create mode 100644 help/Modelica.Electrical.Analog.Basic.InductorI.png create mode 100644 help/Modelica.Electrical.Analog.Basic.OpAmpD.png create mode 100644 help/Modelica.Electrical.Analog.Basic.OpAmpI.png create mode 100644 help/Modelica.Electrical.Analog.Basic.ResistorD.png create mode 100644 help/Modelica.Electrical.Analog.Basic.ResistorI.png create mode 100644 help/Modelica.Electrical.Analog.Basic.TransformerD.png create mode 100644 help/Modelica.Electrical.Analog.Basic.TransformerI.png create mode 100644 help/Modelica.Electrical.Analog.Basic.VCCD.png create mode 100644 help/Modelica.Electrical.Analog.Basic.VCCI.png create mode 100644 help/Modelica.Electrical.Analog.Basic.VCVD.png create mode 100644 help/Modelica.Electrical.Analog.Basic.VCVI.png create mode 100644 help/Modelica.Electrical.Analog.BasicI.png create mode 100644 help/Modelica.Electrical.Analog.Examples.CauerFilterD.png create mode 100644 help/Modelica.Electrical.Analog.Examples.CauerFilterI.png create mode 100644 help/Modelica.Electrical.Analog.Examples.ChuaCircuitD.png create mode 100644 help/Modelica.Electrical.Analog.Examples.ChuaCircuitI.png create mode 100644 help/Modelica.Electrical.Analog.Examples.DifferenceAmplifierD.png create mode 100644 help/Modelica.Electrical.Analog.Examples.DifferenceAmplifierI.png create mode 100644 help/Modelica.Electrical.Analog.Examples.NandGateD.png create mode 100644 help/Modelica.Electrical.Analog.Examples.NandGateI.png create mode 100644 help/Modelica.Electrical.Analog.Examples.Utilities.NandD.png create mode 100644 help/Modelica.Electrical.Analog.Examples.Utilities.NandI.png create mode 100644 help/Modelica.Electrical.Analog.Examples.Utilities.NonlinearResistorD.png create mode 100644 help/Modelica.Electrical.Analog.Examples.Utilities.NonlinearResistorI.png create mode 100644 help/Modelica.Electrical.Analog.Examples.Utilities.RealSwitchD.png create mode 100644 help/Modelica.Electrical.Analog.Examples.Utilities.RealSwitchI.png create mode 100644 help/Modelica.Electrical.Analog.Examples.Utilities.TransistorD.png create mode 100644 help/Modelica.Electrical.Analog.Examples.Utilities.TransistorI.png create mode 100644 help/Modelica.Electrical.Analog.Examples.UtilitiesI.png create mode 100644 help/Modelica.Electrical.Analog.ExamplesI.png create mode 100644 help/Modelica.Electrical.Analog.Ideal.ControlledIdealCloserD.png create mode 100644 help/Modelica.Electrical.Analog.Ideal.ControlledIdealCloserI.png create mode 100644 help/Modelica.Electrical.Analog.Ideal.ControlledIdealCommutingSwitchD.png create mode 100644 help/Modelica.Electrical.Analog.Ideal.ControlledIdealCommutingSwitchI.png create mode 100644 help/Modelica.Electrical.Analog.Ideal.ControlledIdealIntermediateSwitchD.png create mode 100644 help/Modelica.Electrical.Analog.Ideal.ControlledIdealIntermediateSwitchI.png create mode 100644 help/Modelica.Electrical.Analog.Ideal.ControlledIdealOpenerD.png create mode 100644 help/Modelica.Electrical.Analog.Ideal.ControlledIdealOpenerI.png create mode 100644 help/Modelica.Electrical.Analog.Ideal.ControlledIdealSwitchD.png create mode 100644 help/Modelica.Electrical.Analog.Ideal.ControlledIdealSwitchI.png create mode 100644 help/Modelica.Electrical.Analog.Ideal.IdealCloserD.png create mode 100644 help/Modelica.Electrical.Analog.Ideal.IdealCloserI.png create mode 100644 help/Modelica.Electrical.Analog.Ideal.IdealCommutingSwitchD.png create mode 100644 help/Modelica.Electrical.Analog.Ideal.IdealCommutingSwitchI.png create mode 100644 help/Modelica.Electrical.Analog.Ideal.IdealDiodeD.png create mode 100644 help/Modelica.Electrical.Analog.Ideal.IdealDiodeI.png create mode 100644 help/Modelica.Electrical.Analog.Ideal.IdealGTOThyristorD.png create mode 100644 help/Modelica.Electrical.Analog.Ideal.IdealGTOThyristorI.png create mode 100644 help/Modelica.Electrical.Analog.Ideal.IdealGyratorD.png create mode 100644 help/Modelica.Electrical.Analog.Ideal.IdealGyratorI.png create mode 100644 help/Modelica.Electrical.Analog.Ideal.IdealIntermediateSwitchD.png create mode 100644 help/Modelica.Electrical.Analog.Ideal.IdealIntermediateSwitchI.png create mode 100644 help/Modelica.Electrical.Analog.Ideal.IdealOpAmp3PinD.png create mode 100644 help/Modelica.Electrical.Analog.Ideal.IdealOpAmp3PinI.png create mode 100644 help/Modelica.Electrical.Analog.Ideal.IdealOpAmpD.png create mode 100644 help/Modelica.Electrical.Analog.Ideal.IdealOpAmpI.png create mode 100644 help/Modelica.Electrical.Analog.Ideal.IdealOpAmpLimitedD.png create mode 100644 help/Modelica.Electrical.Analog.Ideal.IdealOpAmpLimitedI.png create mode 100644 help/Modelica.Electrical.Analog.Ideal.IdealOpenerD.png create mode 100644 help/Modelica.Electrical.Analog.Ideal.IdealOpenerI.png create mode 100644 help/Modelica.Electrical.Analog.Ideal.IdealSwitchD.png create mode 100644 help/Modelica.Electrical.Analog.Ideal.IdealSwitchI.png create mode 100644 help/Modelica.Electrical.Analog.Ideal.IdealThyristorD.png create mode 100644 help/Modelica.Electrical.Analog.Ideal.IdealThyristorI.png create mode 100644 help/Modelica.Electrical.Analog.Ideal.IdealTransformerD.png create mode 100644 help/Modelica.Electrical.Analog.Ideal.IdealTransformerI.png create mode 100644 help/Modelica.Electrical.Analog.Ideal.IdleD.png create mode 100644 help/Modelica.Electrical.Analog.Ideal.IdleI.png create mode 100644 help/Modelica.Electrical.Analog.Ideal.ShortD.png create mode 100644 help/Modelica.Electrical.Analog.Ideal.ShortI.png create mode 100644 help/Modelica.Electrical.Analog.IdealI.png create mode 100644 help/Modelica.Electrical.Analog.Interfaces.AbsoluteSensorD.png create mode 100644 help/Modelica.Electrical.Analog.Interfaces.AbsoluteSensorI.png create mode 100644 help/Modelica.Electrical.Analog.Interfaces.CurrentSourceD.png create mode 100644 help/Modelica.Electrical.Analog.Interfaces.CurrentSourceI.png create mode 100644 help/Modelica.Electrical.Analog.Interfaces.NegativePinD.png create mode 100644 help/Modelica.Electrical.Analog.Interfaces.NegativePinI.png create mode 100644 help/Modelica.Electrical.Analog.Interfaces.OnePortD.png create mode 100644 help/Modelica.Electrical.Analog.Interfaces.OnePortI.png create mode 100644 help/Modelica.Electrical.Analog.Interfaces.PinD.png create mode 100644 help/Modelica.Electrical.Analog.Interfaces.PinI.png create mode 100644 help/Modelica.Electrical.Analog.Interfaces.PositivePinD.png create mode 100644 help/Modelica.Electrical.Analog.Interfaces.PositivePinI.png create mode 100644 help/Modelica.Electrical.Analog.Interfaces.RelativeSensorD.png create mode 100644 help/Modelica.Electrical.Analog.Interfaces.RelativeSensorI.png create mode 100644 help/Modelica.Electrical.Analog.Interfaces.TwoPinD.png create mode 100644 help/Modelica.Electrical.Analog.Interfaces.TwoPinI.png create mode 100644 help/Modelica.Electrical.Analog.Interfaces.TwoPortD.png create mode 100644 help/Modelica.Electrical.Analog.Interfaces.TwoPortI.png create mode 100644 help/Modelica.Electrical.Analog.Interfaces.VoltageSourceD.png create mode 100644 help/Modelica.Electrical.Analog.Interfaces.VoltageSourceI.png create mode 100644 help/Modelica.Electrical.Analog.InterfacesI.png create mode 100644 help/Modelica.Electrical.Analog.Lines.OLineD.png create mode 100644 help/Modelica.Electrical.Analog.Lines.OLineI.png create mode 100644 help/Modelica.Electrical.Analog.Lines.TLine1D.png create mode 100644 help/Modelica.Electrical.Analog.Lines.TLine1I.png create mode 100644 help/Modelica.Electrical.Analog.Lines.TLine2D.png create mode 100644 help/Modelica.Electrical.Analog.Lines.TLine2I.png create mode 100644 help/Modelica.Electrical.Analog.Lines.TLine3D.png create mode 100644 help/Modelica.Electrical.Analog.Lines.TLine3I.png create mode 100644 help/Modelica.Electrical.Analog.Lines.ULineD.png create mode 100644 help/Modelica.Electrical.Analog.Lines.ULineI.png create mode 100644 help/Modelica.Electrical.Analog.LinesI.png create mode 100644 help/Modelica.Electrical.Analog.Semiconductors.DiodeD.png create mode 100644 help/Modelica.Electrical.Analog.Semiconductors.DiodeI.png create mode 100644 help/Modelica.Electrical.Analog.Semiconductors.NMOSD.png create mode 100644 help/Modelica.Electrical.Analog.Semiconductors.NMOSI.png create mode 100644 help/Modelica.Electrical.Analog.Semiconductors.NPND.png create mode 100644 help/Modelica.Electrical.Analog.Semiconductors.NPNI.png create mode 100644 help/Modelica.Electrical.Analog.Semiconductors.PMOSD.png create mode 100644 help/Modelica.Electrical.Analog.Semiconductors.PMOSI.png create mode 100644 help/Modelica.Electrical.Analog.Semiconductors.PNPD.png create mode 100644 help/Modelica.Electrical.Analog.Semiconductors.PNPI.png create mode 100644 help/Modelica.Electrical.Analog.SemiconductorsI.png create mode 100644 help/Modelica.Electrical.Analog.Sensors.CurrentSensorD.png create mode 100644 help/Modelica.Electrical.Analog.Sensors.CurrentSensorI.png create mode 100644 help/Modelica.Electrical.Analog.Sensors.PotentialSensorD.png create mode 100644 help/Modelica.Electrical.Analog.Sensors.PotentialSensorI.png create mode 100644 help/Modelica.Electrical.Analog.Sensors.VoltageSensorD.png create mode 100644 help/Modelica.Electrical.Analog.Sensors.VoltageSensorI.png create mode 100644 help/Modelica.Electrical.Analog.SensorsI.png create mode 100644 help/Modelica.Electrical.Analog.Sources.ConstantCurrentD.png create mode 100644 help/Modelica.Electrical.Analog.Sources.ConstantCurrentI.png create mode 100644 help/Modelica.Electrical.Analog.Sources.ConstantVoltageD.png create mode 100644 help/Modelica.Electrical.Analog.Sources.ConstantVoltageI.png create mode 100644 help/Modelica.Electrical.Analog.Sources.ExpSineCurrentD.png create mode 100644 help/Modelica.Electrical.Analog.Sources.ExpSineCurrentI.png create mode 100644 help/Modelica.Electrical.Analog.Sources.ExpSineVoltageD.png create mode 100644 help/Modelica.Electrical.Analog.Sources.ExpSineVoltageI.png create mode 100644 help/Modelica.Electrical.Analog.Sources.ExponentialsCurrentD.png create mode 100644 help/Modelica.Electrical.Analog.Sources.ExponentialsCurrentI.png create mode 100644 help/Modelica.Electrical.Analog.Sources.ExponentialsVoltageD.png create mode 100644 help/Modelica.Electrical.Analog.Sources.ExponentialsVoltageI.png create mode 100644 help/Modelica.Electrical.Analog.Sources.PulseCurrentD.png create mode 100644 help/Modelica.Electrical.Analog.Sources.PulseCurrentI.png create mode 100644 help/Modelica.Electrical.Analog.Sources.PulseVoltageD.png create mode 100644 help/Modelica.Electrical.Analog.Sources.PulseVoltageI.png create mode 100644 help/Modelica.Electrical.Analog.Sources.RampCurrentD.png create mode 100644 help/Modelica.Electrical.Analog.Sources.RampCurrentI.png create mode 100644 help/Modelica.Electrical.Analog.Sources.RampVoltageD.png create mode 100644 help/Modelica.Electrical.Analog.Sources.RampVoltageI.png create mode 100644 help/Modelica.Electrical.Analog.Sources.SawToothCurrentD.png create mode 100644 help/Modelica.Electrical.Analog.Sources.SawToothCurrentI.png create mode 100644 help/Modelica.Electrical.Analog.Sources.SawToothVoltageD.png create mode 100644 help/Modelica.Electrical.Analog.Sources.SawToothVoltageI.png create mode 100644 help/Modelica.Electrical.Analog.Sources.SignalCurrentD.png create mode 100644 help/Modelica.Electrical.Analog.Sources.SignalCurrentI.png create mode 100644 help/Modelica.Electrical.Analog.Sources.SignalVoltageD.png create mode 100644 help/Modelica.Electrical.Analog.Sources.SignalVoltageI.png create mode 100644 help/Modelica.Electrical.Analog.Sources.SineCurrentD.png create mode 100644 help/Modelica.Electrical.Analog.Sources.SineCurrentI.png create mode 100644 help/Modelica.Electrical.Analog.Sources.SineVoltageD.png create mode 100644 help/Modelica.Electrical.Analog.Sources.SineVoltageI.png create mode 100644 help/Modelica.Electrical.Analog.Sources.StepCurrentD.png create mode 100644 help/Modelica.Electrical.Analog.Sources.StepCurrentI.png create mode 100644 help/Modelica.Electrical.Analog.Sources.StepVoltageD.png create mode 100644 help/Modelica.Electrical.Analog.Sources.StepVoltageI.png create mode 100644 help/Modelica.Electrical.Analog.Sources.TableCurrentD.png create mode 100644 help/Modelica.Electrical.Analog.Sources.TableCurrentI.png create mode 100644 help/Modelica.Electrical.Analog.Sources.TableVoltageD.png create mode 100644 help/Modelica.Electrical.Analog.Sources.TableVoltageI.png create mode 100644 help/Modelica.Electrical.Analog.Sources.TrapezoidCurrentD.png create mode 100644 help/Modelica.Electrical.Analog.Sources.TrapezoidCurrentI.png create mode 100644 help/Modelica.Electrical.Analog.Sources.TrapezoidVoltageD.png create mode 100644 help/Modelica.Electrical.Analog.Sources.TrapezoidVoltageI.png create mode 100644 help/Modelica.Electrical.Analog.SourcesI.png create mode 100644 help/Modelica.Electrical.AnalogI.png create mode 100644 help/Modelica.ElectricalI.png create mode 100644 help/Modelica.Icons.EnumerationI.png create mode 100644 help/Modelica.Icons.ExampleI.png create mode 100644 help/Modelica.Icons.FunctionI.png create mode 100644 help/Modelica.Icons.GearIconI.png create mode 100644 help/Modelica.Icons.InfoD.png create mode 100644 help/Modelica.Icons.InfoI.png create mode 100644 help/Modelica.Icons.Library2I.png create mode 100644 help/Modelica.Icons.LibraryI.png create mode 100644 help/Modelica.Icons.MotorIconI.png create mode 100644 help/Modelica.Icons.RecordI.png create mode 100644 help/Modelica.Icons.RotationalSensorD.png create mode 100644 help/Modelica.Icons.RotationalSensorI.png create mode 100644 help/Modelica.Icons.TranslationalSensorD.png create mode 100644 help/Modelica.Icons.TranslationalSensorI.png create mode 100644 help/Modelica.IconsI.png create mode 100644 help/Modelica.Math.acosD.png create mode 100644 help/Modelica.Math.acosI.png create mode 100644 help/Modelica.Math.asinD.png create mode 100644 help/Modelica.Math.asinI.png create mode 100644 help/Modelica.Math.atan2D.png create mode 100644 help/Modelica.Math.atan2I.png create mode 100644 help/Modelica.Math.atanD.png create mode 100644 help/Modelica.Math.atanI.png create mode 100644 help/Modelica.Math.baseIcon1D.png create mode 100644 help/Modelica.Math.baseIcon1I.png create mode 100644 help/Modelica.Math.baseIcon2D.png create mode 100644 help/Modelica.Math.baseIcon2I.png create mode 100644 help/Modelica.Math.cosD.png create mode 100644 help/Modelica.Math.cosI.png create mode 100644 help/Modelica.Math.coshD.png create mode 100644 help/Modelica.Math.coshI.png create mode 100644 help/Modelica.Math.expD.png create mode 100644 help/Modelica.Math.expI.png create mode 100644 help/Modelica.Math.log10D.png create mode 100644 help/Modelica.Math.log10I.png create mode 100644 help/Modelica.Math.logD.png create mode 100644 help/Modelica.Math.logI.png create mode 100644 help/Modelica.Math.sinD.png create mode 100644 help/Modelica.Math.sinI.png create mode 100644 help/Modelica.Math.sinhD.png create mode 100644 help/Modelica.Math.sinhI.png create mode 100644 help/Modelica.Math.tanD.png create mode 100644 help/Modelica.Math.tanI.png create mode 100644 help/Modelica.Math.tanhD.png create mode 100644 help/Modelica.Math.tanhI.png create mode 100644 help/Modelica.Math.tempInterpol1I.png create mode 100644 help/Modelica.Math.tempInterpol2I.png create mode 100644 help/Modelica.MathI.png create mode 100644 help/Modelica.Mechanics.Rotational.AccelerateD.png create mode 100644 help/Modelica.Mechanics.Rotational.AccelerateI.png create mode 100644 help/Modelica.Mechanics.Rotational.BearingFrictionD.png create mode 100644 help/Modelica.Mechanics.Rotational.BearingFrictionI.png create mode 100644 help/Modelica.Mechanics.Rotational.BrakeD.png create mode 100644 help/Modelica.Mechanics.Rotational.BrakeI.png create mode 100644 help/Modelica.Mechanics.Rotational.ClutchD.png create mode 100644 help/Modelica.Mechanics.Rotational.ClutchI.png create mode 100644 help/Modelica.Mechanics.Rotational.DamperD.png create mode 100644 help/Modelica.Mechanics.Rotational.DamperI.png create mode 100644 help/Modelica.Mechanics.Rotational.ElastoBacklashD.png create mode 100644 help/Modelica.Mechanics.Rotational.ElastoBacklashI.png create mode 100644 help/Modelica.Mechanics.Rotational.Examples.CoupledClutchesD.png create mode 100644 help/Modelica.Mechanics.Rotational.Examples.CoupledClutchesI.png create mode 100644 help/Modelica.Mechanics.Rotational.Examples.FirstD.png create mode 100644 help/Modelica.Mechanics.Rotational.Examples.FirstI.png create mode 100644 help/Modelica.Mechanics.Rotational.Examples.FrictionD.png create mode 100644 help/Modelica.Mechanics.Rotational.Examples.FrictionI.png create mode 100644 help/Modelica.Mechanics.Rotational.Examples.LossyGearDemo1D.png create mode 100644 help/Modelica.Mechanics.Rotational.Examples.LossyGearDemo1I.png create mode 100644 help/Modelica.Mechanics.Rotational.Examples.LossyGearDemo2D.png create mode 100644 help/Modelica.Mechanics.Rotational.Examples.LossyGearDemo2I.png create mode 100644 help/Modelica.Mechanics.Rotational.ExamplesI.png create mode 100644 help/Modelica.Mechanics.Rotational.FixedD.png create mode 100644 help/Modelica.Mechanics.Rotational.FixedI.png create mode 100644 help/Modelica.Mechanics.Rotational.Gear2D.png create mode 100644 help/Modelica.Mechanics.Rotational.Gear2I.png create mode 100644 help/Modelica.Mechanics.Rotational.GearD.png create mode 100644 help/Modelica.Mechanics.Rotational.GearEfficiencyD.png create mode 100644 help/Modelica.Mechanics.Rotational.GearEfficiencyI.png create mode 100644 help/Modelica.Mechanics.Rotational.GearI.png create mode 100644 help/Modelica.Mechanics.Rotational.IdealGearD.png create mode 100644 help/Modelica.Mechanics.Rotational.IdealGearI.png create mode 100644 help/Modelica.Mechanics.Rotational.IdealGearR2TD.png create mode 100644 help/Modelica.Mechanics.Rotational.IdealGearR2TI.png create mode 100644 help/Modelica.Mechanics.Rotational.IdealPlanetaryD.png create mode 100644 help/Modelica.Mechanics.Rotational.IdealPlanetaryI.png create mode 100644 help/Modelica.Mechanics.Rotational.InertiaD.png create mode 100644 help/Modelica.Mechanics.Rotational.InertiaI.png create mode 100644 help/Modelica.Mechanics.Rotational.Interfaces.AbsoluteSensorD.png create mode 100644 help/Modelica.Mechanics.Rotational.Interfaces.AbsoluteSensorI.png create mode 100644 help/Modelica.Mechanics.Rotational.Interfaces.CompliantD.png create mode 100644 help/Modelica.Mechanics.Rotational.Interfaces.CompliantI.png create mode 100644 help/Modelica.Mechanics.Rotational.Interfaces.Flange_aD.png create mode 100644 help/Modelica.Mechanics.Rotational.Interfaces.Flange_aI.png create mode 100644 help/Modelica.Mechanics.Rotational.Interfaces.Flange_bD.png create mode 100644 help/Modelica.Mechanics.Rotational.Interfaces.Flange_bI.png create mode 100644 help/Modelica.Mechanics.Rotational.Interfaces.FrictionBaseI.png create mode 100644 help/Modelica.Mechanics.Rotational.Interfaces.RelativeSensorD.png create mode 100644 help/Modelica.Mechanics.Rotational.Interfaces.RelativeSensorI.png create mode 100644 help/Modelica.Mechanics.Rotational.Interfaces.RigidD.png create mode 100644 help/Modelica.Mechanics.Rotational.Interfaces.RigidI.png create mode 100644 help/Modelica.Mechanics.Rotational.Interfaces.TwoFlangesD.png create mode 100644 help/Modelica.Mechanics.Rotational.Interfaces.TwoFlangesI.png create mode 100644 help/Modelica.Mechanics.Rotational.InterfacesI.png create mode 100644 help/Modelica.Mechanics.Rotational.LossyGearD.png create mode 100644 help/Modelica.Mechanics.Rotational.LossyGearI.png create mode 100644 help/Modelica.Mechanics.Rotational.MoveD.png create mode 100644 help/Modelica.Mechanics.Rotational.MoveI.png create mode 100644 help/Modelica.Mechanics.Rotational.OneWayClutchD.png create mode 100644 help/Modelica.Mechanics.Rotational.OneWayClutchI.png create mode 100644 help/Modelica.Mechanics.Rotational.PositionD.png create mode 100644 help/Modelica.Mechanics.Rotational.PositionI.png create mode 100644 help/Modelica.Mechanics.Rotational.RelativeStatesD.png create mode 100644 help/Modelica.Mechanics.Rotational.RelativeStatesI.png create mode 100644 help/Modelica.Mechanics.Rotational.Sensors.AccSensorD.png create mode 100644 help/Modelica.Mechanics.Rotational.Sensors.AccSensorI.png create mode 100644 help/Modelica.Mechanics.Rotational.Sensors.AngleSensorD.png create mode 100644 help/Modelica.Mechanics.Rotational.Sensors.AngleSensorI.png create mode 100644 help/Modelica.Mechanics.Rotational.Sensors.RelAccSensorD.png create mode 100644 help/Modelica.Mechanics.Rotational.Sensors.RelAccSensorI.png create mode 100644 help/Modelica.Mechanics.Rotational.Sensors.RelAngleSensorD.png create mode 100644 help/Modelica.Mechanics.Rotational.Sensors.RelAngleSensorI.png create mode 100644 help/Modelica.Mechanics.Rotational.Sensors.RelSpeedSensorD.png create mode 100644 help/Modelica.Mechanics.Rotational.Sensors.RelSpeedSensorI.png create mode 100644 help/Modelica.Mechanics.Rotational.Sensors.SpeedSensorD.png create mode 100644 help/Modelica.Mechanics.Rotational.Sensors.SpeedSensorI.png create mode 100644 help/Modelica.Mechanics.Rotational.Sensors.TorqueSensorD.png create mode 100644 help/Modelica.Mechanics.Rotational.Sensors.TorqueSensorI.png create mode 100644 help/Modelica.Mechanics.Rotational.SensorsI.png create mode 100644 help/Modelica.Mechanics.Rotational.SpringD.png create mode 100644 help/Modelica.Mechanics.Rotational.SpringDamperD.png create mode 100644 help/Modelica.Mechanics.Rotational.SpringDamperI.png create mode 100644 help/Modelica.Mechanics.Rotational.SpringI.png create mode 100644 help/Modelica.Mechanics.Rotational.TorqueD.png create mode 100644 help/Modelica.Mechanics.Rotational.TorqueI.png create mode 100644 help/Modelica.Mechanics.RotationalI.png create mode 100644 help/Modelica.Mechanics.Translational.AccelerateD.png create mode 100644 help/Modelica.Mechanics.Translational.AccelerateI.png create mode 100644 help/Modelica.Mechanics.Translational.DamperD.png create mode 100644 help/Modelica.Mechanics.Translational.DamperI.png create mode 100644 help/Modelica.Mechanics.Translational.ElastoGapD.png create mode 100644 help/Modelica.Mechanics.Translational.ElastoGapI.png create mode 100644 help/Modelica.Mechanics.Translational.Examples.AccelerateD.png create mode 100644 help/Modelica.Mechanics.Translational.Examples.AccelerateI.png create mode 100644 help/Modelica.Mechanics.Translational.Examples.DamperD.png create mode 100644 help/Modelica.Mechanics.Translational.Examples.DamperI.png create mode 100644 help/Modelica.Mechanics.Translational.Examples.FrictionD.png create mode 100644 help/Modelica.Mechanics.Translational.Examples.FrictionI.png create mode 100644 help/Modelica.Mechanics.Translational.Examples.InitialConditionsD.png create mode 100644 help/Modelica.Mechanics.Translational.Examples.InitialConditionsI.png create mode 100644 help/Modelica.Mechanics.Translational.Examples.OscillatorD.png create mode 100644 help/Modelica.Mechanics.Translational.Examples.OscillatorI.png create mode 100644 help/Modelica.Mechanics.Translational.Examples.PreLoadD.png create mode 100644 help/Modelica.Mechanics.Translational.Examples.PreLoadI.png create mode 100644 help/Modelica.Mechanics.Translational.Examples.SensorsD.png create mode 100644 help/Modelica.Mechanics.Translational.Examples.SensorsI.png create mode 100644 help/Modelica.Mechanics.Translational.Examples.SignConventionD.png create mode 100644 help/Modelica.Mechanics.Translational.Examples.SignConventionI.png create mode 100644 help/Modelica.Mechanics.Translational.Examples.WhyArrowsD.png create mode 100644 help/Modelica.Mechanics.Translational.Examples.WhyArrowsI.png create mode 100644 help/Modelica.Mechanics.Translational.ExamplesI.png create mode 100644 help/Modelica.Mechanics.Translational.FixedD.png create mode 100644 help/Modelica.Mechanics.Translational.FixedI.png create mode 100644 help/Modelica.Mechanics.Translational.ForceD.png create mode 100644 help/Modelica.Mechanics.Translational.ForceI.png create mode 100644 help/Modelica.Mechanics.Translational.Interfaces.AbsoluteSensorD.png create mode 100644 help/Modelica.Mechanics.Translational.Interfaces.AbsoluteSensorI.png create mode 100644 help/Modelica.Mechanics.Translational.Interfaces.CompliantD.png create mode 100644 help/Modelica.Mechanics.Translational.Interfaces.CompliantI.png create mode 100644 help/Modelica.Mechanics.Translational.Interfaces.Flange_aD.png create mode 100644 help/Modelica.Mechanics.Translational.Interfaces.Flange_aI.png create mode 100644 help/Modelica.Mechanics.Translational.Interfaces.Flange_bD.png create mode 100644 help/Modelica.Mechanics.Translational.Interfaces.Flange_bI.png create mode 100644 help/Modelica.Mechanics.Translational.Interfaces.FrictionBaseD.png create mode 100644 help/Modelica.Mechanics.Translational.Interfaces.FrictionBaseI.png create mode 100644 help/Modelica.Mechanics.Translational.Interfaces.RelativeSensorD.png create mode 100644 help/Modelica.Mechanics.Translational.Interfaces.RelativeSensorI.png create mode 100644 help/Modelica.Mechanics.Translational.Interfaces.RigidD.png create mode 100644 help/Modelica.Mechanics.Translational.Interfaces.RigidI.png create mode 100644 help/Modelica.Mechanics.Translational.Interfaces.TwoFlangesD.png create mode 100644 help/Modelica.Mechanics.Translational.Interfaces.TwoFlangesI.png create mode 100644 help/Modelica.Mechanics.Translational.InterfacesI.png create mode 100644 help/Modelica.Mechanics.Translational.MoveD.png create mode 100644 help/Modelica.Mechanics.Translational.MoveI.png create mode 100644 help/Modelica.Mechanics.Translational.PositionD.png create mode 100644 help/Modelica.Mechanics.Translational.PositionI.png create mode 100644 help/Modelica.Mechanics.Translational.RelativeStatesD.png create mode 100644 help/Modelica.Mechanics.Translational.RelativeStatesI.png create mode 100644 help/Modelica.Mechanics.Translational.RodD.png create mode 100644 help/Modelica.Mechanics.Translational.RodI.png create mode 100644 help/Modelica.Mechanics.Translational.Sensors.AccSensorD.png create mode 100644 help/Modelica.Mechanics.Translational.Sensors.AccSensorI.png create mode 100644 help/Modelica.Mechanics.Translational.Sensors.ForceSensorD.png create mode 100644 help/Modelica.Mechanics.Translational.Sensors.ForceSensorI.png create mode 100644 help/Modelica.Mechanics.Translational.Sensors.PositionSensorD.png create mode 100644 help/Modelica.Mechanics.Translational.Sensors.PositionSensorI.png create mode 100644 help/Modelica.Mechanics.Translational.Sensors.SpeedSensorD.png create mode 100644 help/Modelica.Mechanics.Translational.Sensors.SpeedSensorI.png create mode 100644 help/Modelica.Mechanics.Translational.SensorsI.png create mode 100644 help/Modelica.Mechanics.Translational.SlidingMassD.png create mode 100644 help/Modelica.Mechanics.Translational.SlidingMassI.png create mode 100644 help/Modelica.Mechanics.Translational.SpringD.png create mode 100644 help/Modelica.Mechanics.Translational.SpringDamperD.png create mode 100644 help/Modelica.Mechanics.Translational.SpringDamperI.png create mode 100644 help/Modelica.Mechanics.Translational.SpringI.png create mode 100644 help/Modelica.Mechanics.Translational.StopD.png create mode 100644 help/Modelica.Mechanics.Translational.StopI.png create mode 100644 help/Modelica.Mechanics.TranslationalI.png create mode 100644 help/Modelica.MechanicsI.png create mode 100644 help/Modelica.SIunits.Conversions.ConversionIconI.png create mode 100644 help/Modelica.SIunits.Conversions.NonSIunitsI.png create mode 100644 help/Modelica.SIunits.Conversions.from_barI.png create mode 100644 help/Modelica.SIunits.Conversions.from_dayI.png create mode 100644 help/Modelica.SIunits.Conversions.from_degCI.png create mode 100644 help/Modelica.SIunits.Conversions.from_degFI.png create mode 100644 help/Modelica.SIunits.Conversions.from_degI.png create mode 100644 help/Modelica.SIunits.Conversions.from_degRkI.png create mode 100644 help/Modelica.SIunits.Conversions.from_gpsI.png create mode 100644 help/Modelica.SIunits.Conversions.from_hourI.png create mode 100644 help/Modelica.SIunits.Conversions.from_kWhI.png create mode 100644 help/Modelica.SIunits.Conversions.from_kmhI.png create mode 100644 help/Modelica.SIunits.Conversions.from_litreI.png create mode 100644 help/Modelica.SIunits.Conversions.from_minuteI.png create mode 100644 help/Modelica.SIunits.Conversions.from_rpmI.png create mode 100644 help/Modelica.SIunits.Conversions.to_barI.png create mode 100644 help/Modelica.SIunits.Conversions.to_dayI.png create mode 100644 help/Modelica.SIunits.Conversions.to_degCI.png create mode 100644 help/Modelica.SIunits.Conversions.to_degFI.png create mode 100644 help/Modelica.SIunits.Conversions.to_degI.png create mode 100644 help/Modelica.SIunits.Conversions.to_degRkI.png create mode 100644 help/Modelica.SIunits.Conversions.to_gpsI.png create mode 100644 help/Modelica.SIunits.Conversions.to_hourI.png create mode 100644 help/Modelica.SIunits.Conversions.to_kWhI.png create mode 100644 help/Modelica.SIunits.Conversions.to_kmhI.png create mode 100644 help/Modelica.SIunits.Conversions.to_litreI.png create mode 100644 help/Modelica.SIunits.Conversions.to_minuteI.png create mode 100644 help/Modelica.SIunits.Conversions.to_rpmI.png create mode 100644 help/Modelica.SIunits.ConversionsI.png create mode 100644 help/Modelica.SIunitsD.png create mode 100644 help/Modelica.SIunitsI.png create mode 100644 help/Modelica.Thermal.HeatTransfer.BodyRadiationD.png create mode 100644 help/Modelica.Thermal.HeatTransfer.BodyRadiationI.png create mode 100644 help/Modelica.Thermal.HeatTransfer.Celsius.FixedTemperatureD.png create mode 100644 help/Modelica.Thermal.HeatTransfer.Celsius.FixedTemperatureI.png create mode 100644 help/Modelica.Thermal.HeatTransfer.Celsius.FromKelvinD.png create mode 100644 help/Modelica.Thermal.HeatTransfer.Celsius.FromKelvinI.png create mode 100644 help/Modelica.Thermal.HeatTransfer.Celsius.PrescribedTemperatureD.png create mode 100644 help/Modelica.Thermal.HeatTransfer.Celsius.PrescribedTemperatureI.png create mode 100644 help/Modelica.Thermal.HeatTransfer.Celsius.TemperatureSensorD.png create mode 100644 help/Modelica.Thermal.HeatTransfer.Celsius.TemperatureSensorI.png create mode 100644 help/Modelica.Thermal.HeatTransfer.Celsius.ToKelvinD.png create mode 100644 help/Modelica.Thermal.HeatTransfer.Celsius.ToKelvinI.png create mode 100644 help/Modelica.Thermal.HeatTransfer.CelsiusI.png create mode 100644 help/Modelica.Thermal.HeatTransfer.ConvectionD.png create mode 100644 help/Modelica.Thermal.HeatTransfer.ConvectionI.png create mode 100644 help/Modelica.Thermal.HeatTransfer.Examples.ControlledTemperature.SwitchControllerD.png create mode 100644 help/Modelica.Thermal.HeatTransfer.Examples.ControlledTemperature.SwitchControllerI.png create mode 100644 help/Modelica.Thermal.HeatTransfer.Examples.ControlledTemperatureD.png create mode 100644 help/Modelica.Thermal.HeatTransfer.Examples.ControlledTemperatureI.png create mode 100644 help/Modelica.Thermal.HeatTransfer.Examples.FrequencyInverterD.png create mode 100644 help/Modelica.Thermal.HeatTransfer.Examples.FrequencyInverterI.png create mode 100644 help/Modelica.Thermal.HeatTransfer.Examples.TwoMassesD.png create mode 100644 help/Modelica.Thermal.HeatTransfer.Examples.TwoMassesI.png create mode 100644 help/Modelica.Thermal.HeatTransfer.ExamplesI.png create mode 100644 help/Modelica.Thermal.HeatTransfer.Fahrenheit.FixedTemperatureD.png create mode 100644 help/Modelica.Thermal.HeatTransfer.Fahrenheit.FixedTemperatureI.png create mode 100644 help/Modelica.Thermal.HeatTransfer.Fahrenheit.FromKelvinD.png create mode 100644 help/Modelica.Thermal.HeatTransfer.Fahrenheit.FromKelvinI.png create mode 100644 help/Modelica.Thermal.HeatTransfer.Fahrenheit.PrescribedTemperatureD.png create mode 100644 help/Modelica.Thermal.HeatTransfer.Fahrenheit.PrescribedTemperatureI.png create mode 100644 help/Modelica.Thermal.HeatTransfer.Fahrenheit.TemperatureSensorD.png create mode 100644 help/Modelica.Thermal.HeatTransfer.Fahrenheit.TemperatureSensorI.png create mode 100644 help/Modelica.Thermal.HeatTransfer.Fahrenheit.ToKelvinD.png create mode 100644 help/Modelica.Thermal.HeatTransfer.Fahrenheit.ToKelvinI.png create mode 100644 help/Modelica.Thermal.HeatTransfer.FahrenheitI.png create mode 100644 help/Modelica.Thermal.HeatTransfer.FixedHeatFlowD.png create mode 100644 help/Modelica.Thermal.HeatTransfer.FixedHeatFlowI.png create mode 100644 help/Modelica.Thermal.HeatTransfer.FixedTemperatureD.png create mode 100644 help/Modelica.Thermal.HeatTransfer.FixedTemperatureI.png create mode 100644 help/Modelica.Thermal.HeatTransfer.HeatCapacitorD.png create mode 100644 help/Modelica.Thermal.HeatTransfer.HeatCapacitorI.png create mode 100644 help/Modelica.Thermal.HeatTransfer.HeatFlowSensorD.png create mode 100644 help/Modelica.Thermal.HeatTransfer.HeatFlowSensorI.png create mode 100644 help/Modelica.Thermal.HeatTransfer.Interfaces.Element1DD.png create mode 100644 help/Modelica.Thermal.HeatTransfer.Interfaces.Element1DI.png create mode 100644 help/Modelica.Thermal.HeatTransfer.Interfaces.HeatPortI.png create mode 100644 help/Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_aD.png create mode 100644 help/Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_aI.png create mode 100644 help/Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_bD.png create mode 100644 help/Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_bI.png create mode 100644 help/Modelica.Thermal.HeatTransfer.InterfacesI.png create mode 100644 help/Modelica.Thermal.HeatTransfer.PrescribedHeatFlowD.png create mode 100644 help/Modelica.Thermal.HeatTransfer.PrescribedHeatFlowI.png create mode 100644 help/Modelica.Thermal.HeatTransfer.PrescribedTemperatureD.png create mode 100644 help/Modelica.Thermal.HeatTransfer.PrescribedTemperatureI.png create mode 100644 help/Modelica.Thermal.HeatTransfer.Rankine.FixedTemperatureD.png create mode 100644 help/Modelica.Thermal.HeatTransfer.Rankine.FixedTemperatureI.png create mode 100644 help/Modelica.Thermal.HeatTransfer.Rankine.FromKelvinD.png create mode 100644 help/Modelica.Thermal.HeatTransfer.Rankine.FromKelvinI.png create mode 100644 help/Modelica.Thermal.HeatTransfer.Rankine.PrescribedTemperatureD.png create mode 100644 help/Modelica.Thermal.HeatTransfer.Rankine.PrescribedTemperatureI.png create mode 100644 help/Modelica.Thermal.HeatTransfer.Rankine.TemperatureSensorD.png create mode 100644 help/Modelica.Thermal.HeatTransfer.Rankine.TemperatureSensorI.png create mode 100644 help/Modelica.Thermal.HeatTransfer.Rankine.ToKelvinD.png create mode 100644 help/Modelica.Thermal.HeatTransfer.Rankine.ToKelvinI.png create mode 100644 help/Modelica.Thermal.HeatTransfer.RankineI.png create mode 100644 help/Modelica.Thermal.HeatTransfer.RelTemperatureSensorD.png create mode 100644 help/Modelica.Thermal.HeatTransfer.RelTemperatureSensorI.png create mode 100644 help/Modelica.Thermal.HeatTransfer.TemperatureSensorD.png create mode 100644 help/Modelica.Thermal.HeatTransfer.TemperatureSensorI.png create mode 100644 help/Modelica.Thermal.HeatTransfer.ThermalConductorD.png create mode 100644 help/Modelica.Thermal.HeatTransfer.ThermalConductorI.png create mode 100644 help/Modelica.Thermal.HeatTransferI.png create mode 100644 help/Modelica.ThermalI.png create mode 100644 help/Modelica.html create mode 100644 help/ModelicaI.png create mode 100644 help/Modelica_Blocks.html create mode 100644 help/Modelica_Blocks_Continuous.html create mode 100644 help/Modelica_Blocks_Examples.html create mode 100644 help/Modelica_Blocks_Examples_Interfaces.html create mode 100644 help/Modelica_Blocks_Interfaces.html create mode 100644 help/Modelica_Blocks_Interfaces_BusAdaptors.html create mode 100644 help/Modelica_Blocks_Interfaces_BusAdaptors_Internal.html create mode 100644 help/Modelica_Blocks_Math.html create mode 100644 help/Modelica_Blocks_Nonlinear.html create mode 100644 help/Modelica_Blocks_Sources.html create mode 100644 help/Modelica_Constants.html create mode 100644 help/Modelica_Electrical.html create mode 100644 help/Modelica_Electrical_Analog.html create mode 100644 help/Modelica_Electrical_Analog_Basic.html create mode 100644 help/Modelica_Electrical_Analog_Examples.html create mode 100644 help/Modelica_Electrical_Analog_Examples_Utilities.html create mode 100644 help/Modelica_Electrical_Analog_Ideal.html create mode 100644 help/Modelica_Electrical_Analog_Interfaces.html create mode 100644 help/Modelica_Electrical_Analog_Lines.html create mode 100644 help/Modelica_Electrical_Analog_Semiconductors.html create mode 100644 help/Modelica_Electrical_Analog_Sensors.html create mode 100644 help/Modelica_Electrical_Analog_Sources.html create mode 100644 help/Modelica_Icons.html create mode 100644 help/Modelica_Icons_Library.html create mode 100644 help/Modelica_Icons_Library2.html create mode 100644 help/Modelica_Math.html create mode 100644 help/Modelica_Mechanics.html create mode 100644 help/Modelica_Mechanics_Rotational.html create mode 100644 help/Modelica_Mechanics_Rotational_Examples.html create mode 100644 help/Modelica_Mechanics_Rotational_Interfaces.html create mode 100644 help/Modelica_Mechanics_Rotational_Sensors.html create mode 100644 help/Modelica_Mechanics_Translational.html create mode 100644 help/Modelica_Mechanics_Translational_Examples.html create mode 100644 help/Modelica_Mechanics_Translational_Interfaces.html create mode 100644 help/Modelica_Mechanics_Translational_Sensors.html create mode 100644 help/Modelica_SIunits.html create mode 100644 help/Modelica_SIunits_Conversions.html create mode 100644 help/Modelica_SIunits_Conversions_NonSIunits.html create mode 100644 help/Modelica_Thermal.html create mode 100644 help/Modelica_Thermal_HeatTransfer.html create mode 100644 help/Modelica_Thermal_HeatTransfer_Celsius.html create mode 100644 help/Modelica_Thermal_HeatTransfer_Examples.html create mode 100644 help/Modelica_Thermal_HeatTransfer_Fahrenheit.html create mode 100644 help/Modelica_Thermal_HeatTransfer_Interfaces.html create mode 100644 help/Modelica_Thermal_HeatTransfer_Rankine.html diff --git a/Blocks/Continuous.mo b/Blocks/Continuous.mo index b7f0290c4e..8205bbe3fe 100644 --- a/Blocks/Continuous.mo +++ b/Blocks/Continuous.mo @@ -1,29 +1,22 @@ -package Continuous "Continuous control blocks with internal states" +package Continuous + "Continuous control blocks with internal states" + extends Modelica.Icons.Library; - package Interfaces = Modelica.Blocks.Interfaces; - package SIunits = Modelica.SIunits; - - annotation ( - Coordsys( - extent=[0, 0; 272, 438], - grid=[1, 1], - component=[20, 20]), - Window( - x=0.02, - y=0.04, - width=0.27, - height=0.63, + annotation (Window( + x=0.05, + y=0.09, + width=0.35, + height=0.74, library=1, - autolayout=1), - Documentation(info=" - + autolayout=1), + Documentation(info="

This package contains basic continuous input/output blocks.

Main Author: -
Martin Otter
+
Martin Otter
Deutsches Zentrum fuer Luft und Raumfahrt e.V. (DLR)
Oberpfaffenhofen
Postfach 1116
@@ -35,7 +28,7 @@ This package contains basic continuous input/output blocks.

Release Notes:

  • June 30, 1999 - by Martin Otter:
    + by Martin Otter:
    Realized a first version, based on an existing Dymola library of Dieter Moormann and Hilding Elmqvist.
  • @@ -43,36 +36,26 @@ This package contains basic continuous input/output blocks.
    -

    Copyright (C) 1999, Modelica Design Group and DLR.

    +

    Copyright © 1999-2002, Modelica Association and DLR.

    The Modelica package is free software; it can be redistributed and/or modified under the terms of the Modelica license, see the license conditions -and the accompanying disclaimer in the documentation of package +and the accompanying disclaimer in the documentation of package Modelica in file \"Modelica/package.mo\".

    ")); - - block Integrator "Output the integral of the input signals" + block Integrator "Output the integral of the input signals" parameter Real k[:]={1} "Integrator gains"; - extends Interfaces.MIMOs(final n=size(k, 1)); - + parameter Real y0[:]=zeros(size(k, 1)) "Start values of integrators"; + extends Interfaces.MIMOs(final n=size(k, 1), y(start=y0)); + annotation ( - Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), - Window( - x=0.29, - y=0.05, - width=0.53, - height=0.54), - Documentation(info=" - + Documentation(info="

    -This blocks computes output y=outPort.signal element-wise as -integral of the input u=inPort.signal multiplied with +This blocks computes output y=outPort.signal element-wise as +integral of the input u=inPort.signal multiplied with the gain k:

    @@ -85,79 +68,70 @@ the gain k:

    Release Notes:

    -"), +"), Icon( - Line(points=[-80, 78; -80, -90], style(color=8)), + Line(points=[-80, 78; -80, -90], style(color=8)), Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style( - color=8, - fillColor=8, - fillPattern=1)), - Line(points=[-90, -80; 82, -80], style(color=8)), + color=8, + fillColor=8, + fillPattern=1)), + Line(points=[-90, -80; 82, -80], style(color=8)), Polygon(points=[90, -80; 68, -72; 68, -88; 90, -80], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Text( - extent=[0, -10; 60, -70], - string="I", - style(color=8)), + extent=[0, -10; 60, -70], + string="I", + style(color=8)), Text( - extent=[-150, -150; 150, -110], - string="k=%k", - style(color=0)), - Line(points=[-80, -80; 80, 80])), + extent=[-150, -150; 150, -110], + string="k=%k", + style(color=0)), + Line(points=[-80, -80; 80, 80])), Diagram( - Rectangle(extent=[-60, 60; 60, -60]), - Line(points=[-100, 0; -60, 0]), - Line(points=[60, 0; 100, 0]), + Rectangle(extent=[-60, 60; 60, -60]), + Line(points=[-100, 0; -60, 0]), + Line(points=[60, 0; 100, 0]), Text( - extent=[-36, 60; 32, 2], - string="k", - style(color=0)), + extent=[-36, 60; 32, 2], + string="k", + style(color=0)), Text( - extent=[-32, 0; 36, -58], - string="s", - style(color=0)), + extent=[-32, 0; 36, -58], + string="s", + style(color=0)), Line(points=[-46, 0; 46, 0], style(color=0)))); - equation + equation for i in 1:size(k, 1) loop der(y[i]) = k[i]*u[i]; end for; end Integrator; - - block LimIntegrator "Integrator with limited values of the outputs" + + block LimIntegrator "Integrator with limited values of the outputs" parameter Real k[:]={1} "Integrator gains"; parameter Real outMax[:]={1} "Upper limits of outputs"; parameter Real outMin[:]=-outMax "Lower limits of outputs"; - + parameter Real y0[:]=zeros(size(k, 1)) "Start values of integrators"; + extends Interfaces.MIMOs(final n=max([size(k, 1); size(outMax, 1); size( - outMin, 1)])); - - protected + outMin, 1)]), y(start=y0)); + + protected parameter Real p_k[n]=(if size(k, 1) == 1 then ones(n)*k[1] else k); parameter Real p_outMax[n]=(if size(outMax, 1) == 1 then ones(n)*outMax[1] else outMax); parameter Real p_outMin[n]=(if size(outMin, 1) == 1 then ones(n)*outMin[1] else outMin); annotation ( - Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), - Window( - x=0.31, - y=0.09, - width=0.54, - height=0.6), - Documentation(info=" - + Documentation(info="

    This blocks computes y=outPort.signal element-wise as integral of the input u=inPort.signal multiplied with the gain k. If the @@ -170,76 +144,74 @@ the integral away from the bounds.

    Release Notes:

    -

    Copyright (C) 1999, Modelica Design Group and DLR.

    +

    Copyright © 1999-2002, Modelica Association and DLR.

    -"), +"), Icon( - Line(points=[-80, 78; -80, -90], style(color=8)), - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-90, -80; 82, -80], style(color=8)), - Polygon(points=[90, -80; 68, -72; 68, -88; 90, -80], style(color=8, - fillColor=8)), - Line(points=[-80, -80; 20, 20; 80, 20]), + Line(points=[-80, 78; -80, -90], style(color=8)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-90, -80; 82, -80], style(color=8)), + Polygon(points=[90, -80; 68, -72; 68, -88; 90, -80], style(color=8, + fillColor=8)), + Line(points=[-80, -80; 20, 20; 80, 20]), Text( - extent=[0, -10; 60, -70], - string="I", - style(color=8)), + extent=[0, -10; 60, -70], + string="I", + style(color=8)), Text( - extent=[-150, -150; 150, -110], - string="k=%k", - style(color=0))), + extent=[-150, -150; 150, -110], + string="k=%k", + style(color=0))), Diagram( - Rectangle(extent=[-60, 60; 60, -60]), + Rectangle(extent=[-60, 60; 60, -60]), Text( - extent=[-54, 46; -4, -48], - string="lim", - style(color=0)), - Line(points=[-100, 0; -60, 0]), - Line(points=[60, 0; 100, 0]), + extent=[-54, 46; -4, -48], + string="lim", + style(color=0)), + Line(points=[-100, 0; -60, 0]), + Line(points=[60, 0; 100, 0]), Text( - extent=[-8, 60; 60, 2], - string="k", - style(color=0)), + extent=[-8, 60; 60, 2], + string="k", + style(color=0)), Text( - extent=[-8, -2; 60, -60], - string="s", - style(color=0)), + extent=[-8, -2; 60, -60], + string="s", + style(color=0)), Line(points=[4, 0; 46, 0], style(color=0)))); - equation + equation for i in 1:n loop - der(y[i]) = if y[i] < p_outMin[i] and u[i] < 0 or y[i] > p_outMax[i] - and u[i] > 0 then 0 else p_k[i]*u[i]; + der(y[i]) = if y[i] < p_outMin[i] and u[i] < 0 or y[i] > p_outMax[i] and + u[i] > 0 then 0 else p_k[i]*u[i]; end for; end LimIntegrator; - - block Derivative "Approximated derivative block" + + block Derivative "Approximated derivative block" parameter Real k[:]={1} "Gains"; - parameter SIunits.Time T[:](min=fill(Modelica.Constants.SMALL, size(T, 1)) - ) = {0.01} "Time constants (T>0 required; T=0 is ideal derivative block)" - ; - + parameter SI.Time T[:](min=fill(Modelica.Constants.small, size(T, 1))) = {0.01} + "Time constants (T>0 required; T=0 is ideal derivative block)"; + extends Interfaces.MIMOs(final n=max([size(k, 1); size(T, 1)])); - + output Real x[n] "State of block"; - - protected + + protected parameter Real p_k[n]=(if size(k, 1) == 1 then ones(n)*k[1] else k); parameter Real p_T[n]=(if size(T, 1) == 1 then ones(n)*T[1] else T); annotation ( - Documentation(info=" - + Documentation(info="

    -This blocks defines the transfer function between the -input u=inPort.signal and the output y=outPort.signal +This blocks defines the transfer function between the +input u=inPort.signal and the output y=outPort.signal element-wise as approximated derivative:

    @@ -251,7 +223,7 @@ element-wise as approximated derivative:

    If you would like to be able to change easily between different -transfer functions (FirstOrder, SecondOrder, ... ) by changing +transfer functions (FirstOrder, SecondOrder, ... ) by changing parameters, use the general block TransferFunction instead and model a derivative block with parameters
    b = {k,0}, a = {T, 1}. @@ -260,83 +232,82 @@ b = {k,0}, a = {T, 1}.

    Release Notes:

    -"), +"), Icon( - Line(points=[-80, 78; -80, -90], style(color=8)), - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-90, -80; 82, -80], style(color=8)), - Polygon(points=[90, -80; 68, -72; 68, -88; 90, -80], style(color=8, - fillColor=8)), - Line(points=[-80, -80; -80, 60; -70, 17.95; -60, -11.46; -50, -32.05; - -40, -46.45; -30, -56.53; -20, -63.58; -10, -68.51; 0, -71.96; 10 - , -74.37; 20, -76.06; 30, -77.25; 40, -78.07; 50, -78.65; 60, - -79.06]), + Line(points=[-80, 78; -80, -90], style(color=8)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-90, -80; 82, -80], style(color=8)), + Polygon(points=[90, -80; 68, -72; 68, -88; 90, -80], style(color=8, + fillColor=8)), + Line(points=[-80, -80; -80, 60; -70, 17.95; -60, -11.46; -50, -32.05; - + 40, -46.45; -30, -56.53; -20, -63.58; -10, -68.51; 0, -71.96; 10 + , -74.37; 20, -76.06; 30, -77.25; 40, -78.07; 50, -78.65; 60, - + 79.06]), Text( - extent=[0, 0; 60, 60], - string="DT1", - style(color=8)), + extent=[0, 0; 60, 60], + string="DT1", + style(color=8)), Text( - extent=[-150, -150; 150, -110], - string="k=%k", - style(color=0))), + extent=[-150, -150; 150, -110], + string="k=%k", + style(color=0))), Diagram( Text( - extent=[-54, 52; 50, 10], - string="k s", - style(color=0)), + extent=[-54, 52; 50, 10], + string="k s", + style(color=0)), Text( - extent=[-54, -6; 52, -52], - string="T s + 1", - style(color=0)), - Line(points=[-50, 0; 50, 0], style(color=0)), - Rectangle(extent=[-60, 60; 60, -60]), - Line(points=[-100, 0; -60, 0]), - Line(points=[60, 0; 100, 0])), + extent=[-54, -6; 52, -52], + string="T s + 1", + style(color=0)), + Line(points=[-50, 0; 50, 0], style(color=0)), + Rectangle(extent=[-60, 60; 60, -60]), + Line(points=[-100, 0; -60, 0]), + Line(points=[60, 0; 100, 0])), Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[2, 2], + component=[20, 20]), Window( - x=0.17, - y=0.03, - width=0.5, + x=0.17, + y=0.03, + width=0.5, height=0.61)); - equation + equation for i in 1:n loop - der(x[i]) = if noEvent(abs(p_k[i]) >= Modelica.Constants.EPS) then (u[i] - - x[i])/p_T[i] else 0; - y[i] = if noEvent(abs(p_k[i]) >= Modelica.Constants.EPS) then (p_k[i]/ - p_T[i])*(u[i] - x[i]) else 0; + der(x[i]) = if noEvent(abs(p_k[i]) >= Modelica.Constants.eps) then (u[i] - x[i])/ + p_T[i] else 0; + y[i] = if noEvent(abs(p_k[i]) >= Modelica.Constants.eps) then (p_k[i]/p_T[i])*(u[i + ] - x[i]) else 0; end for; end Derivative; - - block FirstOrder "First order transfer function block (= 1 pole)" + + block FirstOrder "First order transfer function block (= 1 pole)" parameter Real k[:]={1} "Gain"; - parameter SIunits.Time T[:]={1} "Time Constant"; - + parameter SI.Time T[:]={1} "Time Constant"; + extends Interfaces.MIMOs(final n=max([size(k, 1); size(T, 1)])); - - protected + + protected parameter Real p_k[n]=(if size(k, 1) == 1 then ones(n)*k[1] else k); parameter Real p_T[n]=(if size(T, 1) == 1 then ones(n)*T[1] else T); annotation ( - Documentation(info=" - + Documentation(info="

    This blocks defines the transfer function between the input u=inPort.signal and the output y=outPort.signal element-wise as first order system: @@ -350,7 +321,7 @@ and the output y=outPort.signal element-wise as first order system:

    If you would like to be able to change easily between different -transfer functions (FirstOrder, SecondOrder, ... ) by changing +transfer functions (FirstOrder, SecondOrder, ... ) by changing parameters, use the general block TransferFunction instead and model a first order SISO system with parameters
    b = {k}, a = {T, 1}. @@ -371,91 +342,90 @@ Example:

    Release Notes:

    -"), +"), Icon( - Line(points=[-80, 78; -80, -90], style(color=8)), + Line(points=[-80, 78; -80, -90], style(color=8)), Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 88; -80, 90], style( - color=8, - fillColor=8, - fillPattern=1)), - Line(points=[-90, -80; 82, -80], style(color=8)), + color=8, + fillColor=8, + fillPattern=1)), + Line(points=[-90, -80; 82, -80], style(color=8)), Polygon(points=[90, -80; 68, -72; 68, -88; 90, -80], style( - color=8, - fillColor=8, - fillPattern=1)), - Line(points=[-80, -80; -70, -45.11; -60, -19.58; -50, -0.9087; -40, - 12.75; -30, 22.75; -20, 30.06; -10, 35.41; 0, 39.33; 10, 42.19; - 20, 44.29; 30, 45.82; 40, 46.94; 50, 47.76; 60, 48.36; 70, 48.8; - 80, 49.12]), + color=8, + fillColor=8, + fillPattern=1)), + Line(points=[-80, -80; -70, -45.11; -60, -19.58; -50, -0.9087; -40, + 12.75; -30, 22.75; -20, 30.06; -10, 35.41; 0, 39.33; 10, 42.19; + 20, 44.29; 30, 45.82; 40, 46.94; 50, 47.76; 60, 48.36; 70, 48.8; + 80, 49.12]), Text( - extent=[0, 0; 60, -60], - string="PT1", - style(color=8)), + extent=[0, 0; 60, -60], + string="PT1", + style(color=8)), Text( - extent=[-150, -150; 150, -110], - string="T=%T", - style(color=0))), + extent=[-150, -150; 150, -110], + string="T=%T", + style(color=0))), Diagram( Text( - extent=[-48, 52; 50, 8], - string="k", - style(color=0)), + extent=[-48, 52; 50, 8], + string="k", + style(color=0)), Text( - extent=[-54, -6; 56, -56], - string="T s + 1", - style(color=0)), - Line(points=[-50, 0; 50, 0], style(color=0)), - Rectangle(extent=[-60, 60; 60, -60]), - Line(points=[-100, 0; -60, 0]), - Line(points=[60, 0; 100, 0])), + extent=[-54, -6; 56, -56], + string="T s + 1", + style(color=0)), + Line(points=[-50, 0; 50, 0], style(color=0)), + Rectangle(extent=[-60, 60; 60, -60]), + Line(points=[-100, 0; -60, 0]), + Line(points=[60, 0; 100, 0])), Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[2, 2], + component=[20, 20]), Window( - x=0.15, - y=0.04, - width=0.52, + x=0.15, + y=0.04, + width=0.52, height=0.55)); - equation + equation for i in 1:n loop der(y[i]) = (p_k[i]*u[i] - y[i])/p_T[i]; end for; end FirstOrder; - - block SecondOrder "Second order transfer function block (= 2 poles)" + + block SecondOrder "Second order transfer function block (= 2 poles)" parameter Real k[:]={1} "Gain"; parameter Real w[:]={1} "Angular frequency"; parameter Real D[:]={1} "Damping"; - - extends Interfaces.MIMOs(final n=max([size(k, 1); size(w, 1); size(D, 1)]) - ); + + extends Interfaces.MIMOs(final n=max([size(k, 1); size(w, 1); size(D, 1)])) + ; output Real yd[n] "Derivative of y"; - protected + protected parameter Real p_k[n]=(if size(k, 1) == 1 then ones(n)*k[1] else k); parameter Real p_w[n]=(if size(w, 1) == 1 then ones(n)*w[1] else w); parameter Real p_D[n]=(if size(D, 1) == 1 then ones(n)*D[1] else D); annotation ( Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[2, 2], + component=[20, 20]), Window( - x=0.23, - y=0.1, - width=0.54, - height=0.49), - Documentation(info=" - + x=0.23, + y=0.1, + width=0.54, + height=0.49), + Documentation(info="

    This blocks defines the transfer function between the input u=inPort.signal and the output y=outPort.signal element-wise as second order system: @@ -470,7 +440,7 @@ the output y=outPort.signal element-wise as second order system:

    If you would like to be able to change easily between different -transfer functions (FirstOrder, SecondOrder, ... ) by changing +transfer functions (FirstOrder, SecondOrder, ... ) by changing parameters, use the general model class TransferFunction instead and model a second order SISO system with parameters
    b = {k}, a = {1/w^2, 2*D/w, 1}. @@ -478,7 +448,7 @@ b = {k}, a = {1/w^2, 2*D/w, 1}.

     Example:
    -   
    +
        parameter: k =  {0.3},  w = {0.5},  D = {0.4}
     
        results in:
    @@ -491,112 +461,102 @@ Example:
     

    Release Notes:

    -"), +"), Icon( - Line(points=[-80, 78; -80, -90], style(color=8)), + Line(points=[-80, 78; -80, -90], style(color=8)), Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 88; -80, 90], style( - color=8, - fillColor=8, - fillPattern=1)), - Line(points=[-90, -80; 82, -80], style(color=8)), + color=8, + fillColor=8, + fillPattern=1)), + Line(points=[-90, -80; 82, -80], style(color=8)), Polygon(points=[90, -80; 68, -72; 68, -88; 90, -80], style( - color=8, - fillColor=8, - fillPattern=1)), - Line(points=[-80, -80; -72, -68.53; -64, -39.5; -56, -2.522; -48, - 32.75; -40, 58.8; -32, 71.51; -24, 70.49; -16, 58.45; -8, 40.06; - 0, 20.55; 8, 4.459; 16, -5.271; 24, -7.629; 32, -3.428; 40, 5.21 - ; 48, 15.56; 56, 25.03; 64, 31.66; 72, 34.5; 80, 33.61]), + color=8, + fillColor=8, + fillPattern=1)), + Line(points=[-80, -80; -72, -68.53; -64, -39.5; -56, -2.522; -48, 32.75 + ; -40, 58.8; -32, 71.51; -24, 70.49; -16, 58.45; -8, 40.06; 0, + 20.55; 8, 4.459; 16, -5.271; 24, -7.629; 32, -3.428; 40, 5.21; 48 + , 15.56; 56, 25.03; 64, 31.66; 72, 34.5; 80, 33.61]), Text( - extent=[0, -10; 60, -70], - string="PT2", - style(color=8)), + extent=[0, -10; 60, -70], + string="PT2", + style(color=8)), Text( - extent=[-150, -150; 150, -110], - string="w=%w", - style(color=0))), + extent=[-150, -150; 150, -110], + string="w=%w", + style(color=0))), Diagram( - Rectangle(extent=[-60, 60; 60, -60]), + Rectangle(extent=[-60, 60; 60, -60]), Text( - extent=[-60, 60; 60, 14], - string="k", - style(color=0)), + extent=[-60, 60; 60, 14], + string="k", + style(color=0)), Text( - extent=[-60, 8; -32, -20], - string="s", - style(color=0)), - Line(points=[-100, 0; -60, 0]), - Line(points=[60, 0; 100, 0]), - Line(points=[-50, 14; 50, 14], style(color=0)), - Line(points=[-54, -20; -38, -20], style(color=0)), + extent=[-60, 8; -32, -20], + string="s", + style(color=0)), + Line(points=[-100, 0; -60, 0]), + Line(points=[60, 0; 100, 0]), + Line(points=[-50, 14; 50, 14], style(color=0)), + Line(points=[-54, -20; -38, -20], style(color=0)), Text( - extent=[-52, -26; -36, -48], - string="w", - style(color=0)), - Line(points=[-50, 2; -56, -8; -56, -28; -52, -46], style(color=0)), - Line(points=[-40, 2; -34, -10; -34, -30; -38, -46], style(color=0)), + extent=[-52, -26; -36, -48], + string="w", + style(color=0)), + Line(points=[-50, 2; -56, -8; -56, -28; -52, -46], style(color=0)), + Line(points=[-40, 2; -34, -10; -34, -30; -38, -46], style(color=0)), Text( - extent=[-34, 8; -22, -10], - string="2", - style(color=0)), + extent=[-34, 8; -22, -10], + string="2", + style(color=0)), Text( - extent=[-34, -6; 6, -36], - string="+2D", - style(color=0)), + extent=[-34, -6; 6, -36], + string="+2D", + style(color=0)), Text( - extent=[2, 8; 30, -20], - string="s", - style(color=0)), - Line(points=[8, -20; 24, -20], style(color=0)), + extent=[2, 8; 30, -20], + string="s", + style(color=0)), + Line(points=[8, -20; 24, -20], style(color=0)), Text( - extent=[10, -26; 26, -48], - string="w", - style(color=0)), - Line(points=[12, 2; 6, -8; 6, -28; 10, -46], style(color=0)), - Line(points=[22, 2; 28, -10; 28, -30; 24, -46], style(color=0)), + extent=[10, -26; 26, -48], + string="w", + style(color=0)), + Line(points=[12, 2; 6, -8; 6, -28; 10, -46], style(color=0)), + Line(points=[22, 2; 28, -10; 28, -30; 24, -46], style(color=0)), Text( - extent=[30, 2; 58, -42], - string="+1", + extent=[30, 2; 58, -42], + string="+1", style(color=0)))); - equation + equation for i in 1:n loop der(y[i]) = yd[i]; der(yd[i]) = p_w[i]*(p_w[i]*(p_k[i]*u[i] - y[i]) - 2*p_D[i]*yd[i]); end for; end SecondOrder; - - block PI "Proportional-Integral controller" + + block PI "Proportional-Integral controller" parameter Real k[:]={1} "Gain"; - parameter SIunits.Time T[:]={1} "Time Constant (T>0 required)"; - + parameter SI.Time T[:]={1} "Time Constant (T>0 required)"; + extends Interfaces.MIMOs(final n=max([size(k, 1); size(T, 1)])); output Real x[n] "State of block"; - - protected + + protected parameter Real p_k[n]=(if size(k, 1) == 1 then ones(n)*k[1] else k); parameter Real p_T[n]=(if size(T, 1) == 1 then ones(n)*T[1] else T); annotation ( - Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), - Window( - x=0.24, - y=0.13, - width=0.56, - height=0.5), - Documentation(info=" - + Documentation(info="

    This blocks defines the transfer function between the input u=inPort.signal and the output y=outPort.signal element-wise as PI system: @@ -614,7 +574,7 @@ the output y=outPort.signal element-wise as PI system:

    If you would like to be able to change easily between different -transfer functions (FirstOrder, SecondOrder, ... ) by changing +transfer functions (FirstOrder, SecondOrder, ... ) by changing parameters, use the general model class TransferFunction instead and model a PI SISO system with parameters
    b = {k*T, k}, a = {T, 0}. @@ -622,9 +582,9 @@ b = {k*T, k}, a = {T, 0}.

     Example:
    -   
    +
        parameter: k = {0.3},  T = {0.4}
    - 
    +
        results in:
     
                    0.4 s + 1
    @@ -635,97 +595,86 @@ Example:
     

    Release Notes:

    -"), +"), Icon( - Line(points=[-80, 78; -80, -90], style(color=8)), + Line(points=[-80, 78; -80, -90], style(color=8)), Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 88; -80, 90], style( - color=8, - fillColor=8, - fillPattern=1)), - Line(points=[-90, -80; 82, -80], style(color=8)), + color=8, + fillColor=8, + fillPattern=1)), + Line(points=[-90, -80; 82, -80], style(color=8)), Polygon(points=[90, -80; 68, -72; 68, -88; 90, -80], style( - color=8, - fillColor=8, - fillPattern=1)), - Line(points=[-80, -80; -80, -20; 60, 80], style(thickness=1)), + color=8, + fillColor=8, + fillPattern=1)), + Line(points=[-80, -80; -80, -20; 60, 80], style(thickness=1)), Text( - extent=[0, 6; 60, -56], - string="PI", - style(color=8)), + extent=[0, 6; 60, -56], + string="PI", + style(color=8)), Text( - extent=[-150, -150; 150, -110], - string="T=%T", - style(color=0))), + extent=[-150, -150; 150, -110], + string="T=%T", + style(color=0))), Diagram( - Rectangle(extent=[-60, 60; 60, -60]), + Rectangle(extent=[-60, 60; 60, -60]), Text( - extent=[-68, 24; -24, -18], - string="k", - style(color=0)), + extent=[-68, 24; -24, -18], + string="k", + style(color=0)), Text( - extent=[-32, 48; 60, 0], - string="T s + 1", - style(color=0)), + extent=[-32, 48; 60, 0], + string="T s + 1", + style(color=0)), Text( - extent=[-30, -8; 52, -40], - string="T s", - style(color=0)), - Line(points=[-24, 0; 54, 0], style(color=0)), - Line(points=[-100, 0; -60, 0]), + extent=[-30, -8; 52, -40], + string="T s", + style(color=0)), + Line(points=[-24, 0; 54, 0], style(color=0)), + Line(points=[-100, 0; -60, 0]), Line(points=[62, 0; 100, 0]))); - equation + equation for i in 1:n loop der(x[i]) = u[i]/p_T[i]; y[i] = p_k[i]*(x[i] + u[i]); end for; end PI; - - block PID "PID-controller in additive description form" + + block PID "PID-controller in additive description form" extends Interfaces.SISO; - + parameter Real k=1 "Gain"; - parameter SIunits.Time Ti(min=Modelica.Constants.SMALL) = 0.5 + parameter SI.Time Ti(min=Modelica.Constants.small) = 0.5 "Time Constant of Integrator"; - parameter SIunits.Time Td(min=0) = 0.1 "Time Constant of Derivative block"; - parameter Real Nd(min=Modelica.Constants.SMALL) = 10 + parameter SI.Time Td(min=0) = 0.1 "Time Constant of Derivative block"; + parameter Real Nd(min=Modelica.Constants.small) = 10 "The higher Nd, the more ideal the derivative block"; - - annotation ( - Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), - Window( - x=0.15, - y=0.04, - width=0.55, - height=0.68), - Icon( - Line(points=[-80, 78; -80, -90], style(color=8)), - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-90, -80; 82, -80], style(color=8)), - Polygon(points=[90, -80; 68, -72; 68, -88; 90, -80], style(color=8, - fillColor=8)), - Line(points=[-80, -80; -80, 50; -80, -20; 60, 80]), + + annotation (Icon( + Line(points=[-80, 78; -80, -90], style(color=8)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-90, -80; 82, -80], style(color=8)), + Polygon(points=[90, -80; 68, -72; 68, -88; 90, -80], style(color=8, + fillColor=8)), + Line(points=[-80, -80; -80, 50; -80, -20; 60, 80]), Text( - extent=[-20, -20; 80, -60], - string="PID", - style(color=8)), + extent=[-20, -20; 80, -60], + string="PID", + style(color=8)), Text( - extent=[-150, -150; 150, -110], - string="Ti=%Ti", - style(color=0))), - Documentation(info=" + extent=[-150, -150; 150, -110], + string="Ti=%Ti", + style(color=0))), Documentation(info="

    This is the text-book version of a PID-controller. For a more practically useful PID-controller, use @@ -735,87 +684,80 @@ block LimPID.

    Release Notes:

    ")); - Modelica.Blocks.Math.Gain P "Proportional part of PID controller" - annotation (extent=[-60, 60; -20, 100]); - Modelica.Blocks.Continuous.Integrator I(k={1/Ti}) - "Integral part of PID controller" annotation (extent=[-60, -20; -20, 20]) - ; - Modelica.Blocks.Continuous.Derivative D(k={Td}, T={max([Td/Nd, 100* - Modelica.Constants.EPS])}) "Derivative part of PID controller" - annotation (extent=[-60, -100; -20, -60]); - Modelica.Blocks.Math.Gain Gain(k={k}) "Gain of PID controller" annotation - (extent=[60, -10; 80, 10]); - Modelica.Blocks.Math.Add3 Add annotation (extent=[20, -10; 40, 10]); - equation - connect(P.outPort, Add.inPort1) annotation (points=[-20, 80; 0, 80; 0, 8 - ; 20, 8]); - equation + Math.Gain P "Proportional part of PID controller" annotation (extent=[-60, + 60; -20, 100]); + Integrator I(k={1/Ti}) "Integral part of PID controller" annotation (extent + =[-60, -20; -20, 20]); + Derivative D(k={Td}, T={max([Td/Nd, 100*Modelica.Constants.eps])}) + "Derivative part of PID controller" annotation (extent=[-60, -100; -20, - + 60]); + Math.Gain Gain(k={k}) "Gain of PID controller" annotation (extent=[60, -10 + ; 80, 10]); + Math.Add3 Add annotation (extent=[20, -10; 40, 10]); + equation + connect(P.outPort, Add.inPort1) annotation (points=[-20, 80; 0, 80; 0, 8; + 20, 8]); connect(I.outPort, Add.inPort2) annotation (points=[-20, 0; 20, 0]); - equation - connect(D.outPort, Add.inPort3) annotation (points=[-20, -80; 0, -80; 0 - , -8; 20, -8]); - equation + connect(D.outPort, Add.inPort3) annotation (points=[-20, -80; 0, -80; 0, -8 + ; 20, -8]); connect(Add.outPort, Gain.inPort) annotation (points=[40, 0; 60, 0]); - equation connect(outPort, Gain.outPort) annotation (points=[100, 0; 80, 0]); - equation connect(inPort, I.inPort) annotation (points=[-100, 0; -60, 0]); - equation - connect(inPort, P.inPort) annotation (points=[-100, 0; -80, 0; -80, 80; - -60, 80]); - equation - connect(inPort, D.inPort) annotation (points=[-100, 0; -80, 0; -80, -80 - ; -60, -80]); + connect(inPort, P.inPort) annotation (points=[-100, 0; -80, 0; -80, 80; -60 + , 80]); + connect(inPort, D.inPort) annotation (points=[-100, 0; -80, 0; -80, -80; - + 60, -80]); end PID; - - block LimPID + + block LimPID "PID controller with limited output, anti-windup compensation and setpoint weighting" - + + extends Interfaces.SVcontrol; - + parameter Real k(min=0) = 1 "Gain of PID block"; - parameter SIunits.Time Ti(min=Modelica.Constants.SMALL) = 0.5 + parameter SI.Time Ti(min=Modelica.Constants.small) = 0.5 "Time constant of Integrator block"; - parameter SIunits.Time Td(min=0) = 0.1 "Time constant of Derivative block"; + parameter SI.Time Td(min=0) = 0.1 "Time constant of Derivative block"; parameter Real yMax=1 "Upper limit of output"; - parameter Real yMin(max=yMax) = -yMax "Lower limit of output"; - parameter Real wp(min=0) = 1 + parameter Real yMin=-yMax "Lower limit of output"; + parameter Real wp(min=0) = 1 "Set-point weight for Proportional block (0..1)"; - parameter Real wd(min=0) = 0 - "Set-point weight for Derivative block (0..1)"; - parameter Real Ni(min=100*Modelica.Constants.EPS) = 0.9 + parameter Real wd(min=0) = 0 "Set-point weight for Derivative block (0..1)" + ; + parameter Real Ni(min=100*Modelica.Constants.eps) = 0.9 "Ni*Ti is time constant of anti-windup compensation"; - parameter Real Nd(min=100*Modelica.Constants.EPS) = 10 + parameter Real Nd(min=100*Modelica.Constants.eps) = 10 "The higher Nd, the more ideal the derivative block"; - Modelica.Blocks.Nonlinear.Limiter limiter(uMax={yMax}, uMin={yMin}) - annotation (extent=[70, -10; 90, 10]); + Nonlinear.Limiter limiter(uMax={yMax}, uMin={yMin}) annotation (extent=[70 + , -10; 90, 10]); annotation ( Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[2, 2], + component=[20, 20]), Window( - x=0.22, - y=0.02, - width=0.6, - height=0.72), + x=0.22, + y=0.02, + width=0.6, + height=0.72), Icon( - Line(points=[-80, 78; -80, -90], style(color=8)), - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-90, -80; 82, -80], style(color=8)), - Polygon(points=[90, -80; 68, -72; 68, -88; 90, -80], style(color=8, - fillColor=8)), - Line(points=[-80, -80; -80, 50; -80, -20; 30, 60; 80, 60]), + Line(points=[-80, 78; -80, -90], style(color=8)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-90, -80; 82, -80], style(color=8)), + Polygon(points=[90, -80; 68, -72; 68, -88; 90, -80], style(color=8, + fillColor=8)), + Line(points=[-80, -80; -80, 50; -80, -20; 30, 60; 80, 60]), Text( - extent=[-20, -20; 80, -60], - string="PID", - style(color=8))), + extent=[-20, -20; 80, -60], + string="PID", + style(color=8))), Documentation(info="

    This is a PID controller incorporating several practical aspects. @@ -837,7 +779,7 @@ part of this controller, the following practical aspects are included: in its limits, anti-windup compensation is activated to drive the integrator state to zero. -

  • The high-frequency gain of the derivative part is limited +
  • The high-frequency gain of the derivative part is limited to avoid excessive amplification of measurement noise.
  • Setpoint weighting is present, which allows to weight @@ -853,119 +795,92 @@ part of this controller, the following practical aspects are included:

    Release Notes:

    ")); - Modelica.Blocks.Math.Add addP(k1=wp, k2=-1) annotation (extent=[-80, 40; - -60, 60]); - Modelica.Blocks.Math.Add addD(k1=wd, k2=-1) annotation (extent=[-80, -10; - -60, 10]); - Modelica.Blocks.Math.Gain P annotation (extent=[-40, 40; -20, 60]); - Modelica.Blocks.Continuous.Integrator I(k={1/Ti}) annotation (extent=[-40 - , -60; -20, -40]); - Modelica.Blocks.Continuous.Derivative D(k={Td}, T={max([Td/Nd, 1.e-14])}) - annotation (extent=[-40, -10; -20, 10]); - Modelica.Blocks.Math.Gain gainPID(k={k}) annotation (extent=[30, -10; 50, - 10]); - Modelica.Blocks.Math.Add3 addPID annotation (extent=[0, -10; 20, 10]); - Modelica.Blocks.Math.Add3 addI(k2=-1) annotation (extent=[-80, -60; -60, - -40]); - Modelica.Blocks.Math.Add addSat(k2=-1) annotation (extent=[70, -60; 90, - -40], rotation=-90); - Modelica.Blocks.Math.Gain gainTrack(k={1/(k*Ni)}) annotation (extent=[40, - -80; 20, -60]); - equation - connect(inPort_s, addP.inPort1) annotation (points=[-102, 0; -96, 0; -96 - , 56; -80, 56]); - equation - connect(inPort_m, addP.inPort2) annotation (points=[0, -100; 0, -92; -92 - , -92; -92, 44; -80, 44], style(thickness=2)); - equation - connect(inPort_s, addD.inPort1) annotation (points=[-102, 0; -96, 0; -96 - , 6; -82, 6]); - equation - connect(inPort_m, addD.inPort2) annotation (points=[0, -100; 0, -92; -92 - , -92; -92, -6; -82, -6; -82, -6], style(thickness=2)); - equation - connect(inPort_s, addI.inPort1) annotation (points=[-100, 0; -96, 0; -96 - , -42; -82, -42]); - equation - connect(inPort_m, addI.inPort2) annotation (points=[0, -104; 0, -92; -92 - , -92; -92, -50; -80, -50], style(thickness=2)); - equation - connect(gainTrack.outPort, addI.inPort3) annotation (points=[20, -70; - -88, -70; -88, -58; -80, -58]); - equation - connect(addP.outPort, P.inPort) annotation (points=[-60, 50; -40, 50; - -40, 50]); - equation - connect(addD.outPort, D.inPort) annotation (points=[-60, 0; -50, 0]); - equation - connect(addI.outPort, I.inPort) annotation (points=[-58, -50; -40, -50]) + Math.Add addP(k1=wp, k2=-1) annotation (extent=[-80, 40; -60, 60]); + Math.Add addD(k1=wd, k2=-1) annotation (extent=[-80, -10; -60, 10]); + Math.Gain P annotation (extent=[-40, 40; -20, 60]); + Integrator I(k={1/Ti}) annotation (extent=[-40, -60; -20, -40]); + Derivative D(k={Td}, T={max([Td/Nd, 1.e-14])}) annotation (extent=[-40, -10 + ; -20, 10]); + Math.Gain gainPID(k={k}) annotation (extent=[30, -10; 50, 10]); + Math.Add3 addPID annotation (extent=[0, -10; 20, 10]); + Math.Add3 addI(k2=-1) annotation (extent=[-80, -60; -60, -40]); + Math.Add addSat(k2=-1) annotation (extent=[70, -60; 90, -40], rotation=-90) ; - equation - connect(P.outPort, addPID.inPort1) annotation (points=[-18, 50; -10, 50 - ; -10, 8; 0, 8]); - equation - connect(D.outPort, addPID.inPort2) annotation (points=[-20, 0; -2, 0; -2 - , 0]); - equation - connect(I.outPort, addPID.inPort3) annotation (points=[-18, -50; -10, - -50; -10, -8; -2, -8; -2, -8]); - equation - connect(addPID.outPort, gainPID.inPort) annotation (points=[21, 0; 28, 0 + Math.Gain gainTrack(k={1/(k*Ni)}) annotation (extent=[40, -80; 20, -60]); + equation + assert(yMax >= yMin, "PID: Limits must be consistent"); + connect(inPort_s, addP.inPort1) annotation (points=[-102, 0; -96, 0; -96, + 56; -80, 56]); + connect(inPort_m, addP.inPort2) annotation (points=[0, -100; 0, -92; -92, - + 92; -92, 44; -80, 44], style(thickness=2)); + connect(inPort_s, addD.inPort1) annotation (points=[-102, 0; -96, 0; -96, 6 + ; -82, 6]); + connect(inPort_m, addD.inPort2) annotation (points=[0, -100; 0, -92; -92, - + 92; -92, -6; -82, -6; -82, -6], style(thickness=2)); + connect(inPort_s, addI.inPort1) annotation (points=[-100, 0; -96, 0; -96, - + 42; -82, -42]); + connect(inPort_m, addI.inPort2) annotation (points=[0, -104; 0, -92; -92, - + 92; -92, -50; -80, -50], style(thickness=2)); + connect(gainTrack.outPort, addI.inPort3) annotation (points=[20, -70; -88, + -70; -88, -58; -80, -58]); + connect(addP.outPort, P.inPort) annotation (points=[-60, 50; -40, 50; -40, + 50]); + connect(addD.outPort, D.inPort) annotation (points=[-60, 0; -50, 0]); + connect(addI.outPort, I.inPort) annotation (points=[-58, -50; -40, -50]); + connect(P.outPort, addPID.inPort1) annotation (points=[-18, 50; -10, 50; - + 10, 8; 0, 8]); + connect(D.outPort, addPID.inPort2) annotation (points=[-20, 0; -2, 0; -2, 0 ]); - equation - connect(gainPID.outPort, addSat.inPort2) annotation (points=[50, 0; 60, - 0; 60, -30; 74, -30; 74, -40]); - equation - connect(addSat.outPort, gainTrack.inPort) annotation (points=[80, -62; - 80, -70; 42, -70]); - equation - connect(gainPID.outPort, limiter.inPort) annotation (points=[50, 0; 70, - 0]); - equation + connect(I.outPort, addPID.inPort3) annotation (points=[-18, -50; -10, -50; + -10, -8; -2, -8; -2, -8]); + connect(addPID.outPort, gainPID.inPort) annotation (points=[21, 0; 28, 0]); + connect(gainPID.outPort, addSat.inPort2) annotation (points=[50, 0; 60, 0; + 60, -30; 74, -30; 74, -40]); + connect(addSat.outPort, gainTrack.inPort) annotation (points=[80, -62; 80, + -70; 42, -70]); + connect(gainPID.outPort, limiter.inPort) annotation (points=[50, 0; 70, 0]) + ; connect(limiter.outPort, outPort) annotation (points=[90, 0; 100, 0]); - equation - connect(limiter.outPort, addSat.inPort1) annotation (points=[90, 0; 94, - 0; 94, -20; 86, -20; 86, -40]); + connect(limiter.outPort, addSat.inPort1) annotation (points=[90, 0; 94, 0; + 94, -20; 86, -20; 86, -40]); end LimPID; - - block TransferFunction "Linear transfer function" + + block TransferFunction "Linear transfer function" extends Interfaces.SISO; - + parameter Real b[:]={1} "Numerator coefficients of transfer function."; - parameter Real a[:]={1,1} "Denominator coefficients of transfer function." - ; - output Real x[size(a, 1) - 1] + parameter Real a[:]={1,1} "Denominator coefficients of transfer function."; + output Real x[size(a, 1) - 1] "State of transfer function from controller canonical form"; - - protected - parameter Integer na=size(a, 1) - "Size of Denominator of transfer function."; - parameter Integer nb(max=na) = size(b, 1) + + protected + parameter Integer na=size(a, 1) "Size of Denominator of transfer function." + ; + parameter Integer nb(max=na) = size(b, 1) "Size of Numerator of transfer function."; parameter Integer nx=size(a, 1) - 1; Real x1dot "Derivative of first state of TransferFcn"; Real xn "Highest order state of TransferFcn"; annotation ( Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[2, 2], + component=[20, 20]), Window( - x=0.39, - y=0.09, - width=0.58, - height=0.77), - Documentation(info=" - + x=0.39, + y=0.09, + width=0.58, + height=0.77), + Documentation(info="

    -This block defines the transfer function between the input -u=inPort.signal[1] and the output y=outPort.signal[1] +This block defines the transfer function between the input +u=inPort.signal[1] and the output y=outPort.signal[1] as (nb = dimension of b, na = dimension of a):

    @@ -1001,67 +916,66 @@ results in the following transfer function:

    Release Notes:

    • August 7, 1999 - by Martin Otter:
      - Realized based on a realization of the corresponding + by Martin Otter:
      + Realized based on a realization of the corresponding Dymola library of Hilding Elmqvist.
    -"), +"), Icon( - Line(points=[-80, 0; 80, 0]), - Text(extent=[-90, 10; 90, 90], string="b(s)"), - Text(extent=[-90, -10; 90, -90], string="a(s)")), + Line(points=[-80, 0; 80, 0]), + Text(extent=[-90, 10; 90, 90], string="b(s)"), + Text(extent=[-90, -10; 90, -90], string="a(s)")), Diagram( - Line(points=[40, 0; -40, 0], style(color=0)), + Line(points=[40, 0; -40, 0], style(color=0)), Text( - extent=[-55, 55; 55, 5], - string="b(s)", - style(color=0)), + extent=[-55, 55; 55, 5], + string="b(s)", + style(color=0)), Text( - extent=[-55, -5; 55, -55], - string="a(s)", - style(color=0)), - Rectangle(extent=[-60, 60; 60, -60]), - Line(points=[-100, 0; -60, 0]), + extent=[-55, -5; 55, -55], + string="a(s)", + style(color=0)), + Rectangle(extent=[-60, 60; 60, -60]), + Line(points=[-100, 0; -60, 0]), Line(points=[60, 0; 100, 0]))); - equation + equation [der(x); xn] = [x1dot; x]; [u] = transpose([a])*[x1dot; x]; [y] = transpose([zeros(na - nb, 1); b])*[x1dot; x]; end TransferFunction; - - block StateSpace "Linear state space system" - parameter Real A[:, size(A, 1)]=[1, 0; 0, 1] + + block StateSpace "Linear state space system" + parameter Real A[:, size(A, 1)]=[1, 0; 0, 1] "Matrix A of state space model"; parameter Real B[size(A, 1), :]=[1; 1] "Matrix B of state space model"; parameter Real C[:, size(A, 1)]=[1, 1] "Matrix C of state space model"; - parameter Real D[size(C, 1), size(B, 2)]=zeros(size(C, 1), size(B, 2)) + parameter Real D[size(C, 1), size(B, 2)]=zeros(size(C, 1), size(B, 2)) "Matrix D of state space model"; - + extends Interfaces.MIMO(final nin=size(B, 2), final nout=size(C, 1)); output Real x[size(A, 1)] "State vector"; annotation ( Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[2, 2], + component=[20, 20]), Window( - x=0.2, - y=0.03, - width=0.64, - height=0.73), - Documentation(info=" - + x=0.2, + y=0.03, + width=0.64, + height=0.73), + Documentation(info="

    -The State Space block defines the relation -between the input u=inPort.signal and the output +The State Space block defines the relation +between the input u=inPort.signal and the output y=outPort.signal in state space form:

    -
     
    - 
    +
    +
         der(x) = A * x + B * u
             y  = C * x + D * u
     
    @@ -1072,19 +986,19 @@ The input is a vector of length nu, the output is a vector
     of length ny and nx is the number of states. Accordingly
     

    -        A has the dimension: A(nx,nx), 
    -        B has the dimension: B(nx,nu), 
    -        C has the dimension: C(ny,nx), 
    -        D has the dimension: D(ny,nu) 
    +        A has the dimension: A(nx,nx),
    +        B has the dimension: B(nx,nu),
    +        C has the dimension: C(ny,nx),
    +        D has the dimension: D(ny,nu)
     

    Example:

    -     parameter: A = [0.12, 2;3, 1.5] 
    -     parameter: B = [2, 7;3, 1] 
    -     parameter: C = [0.1, 2] 
    +     parameter: A = [0.12, 2;3, 1.5]
    +     parameter: B = [2, 7;3, 1]
    +     parameter: C = [0.1, 2]
          parameter: D = zeros(ny,nu)
     results in the following equations:
     
    @@ -1097,30 +1011,48 @@ results in the following equations:
                                  [x[2]]            [u[2]]
     
    -"), +"), Icon( - Text(extent=[-90, 10; -10, 90], string="A"), - Text(extent=[10, 10; 90, 90], string="B"), - Text(extent=[-90, -10; -10, -90], string="C"), - Text(extent=[10, -10; 90, -90], string="D"), - Line(points=[0, -90; 0, 90], style(color=8)), - Line(points=[-90, 0; 90, 0], style(color=8))), + Text(extent=[-90, 10; -10, 90], string="A"), + Text(extent=[10, 10; 90, 90], string="B"), + Text(extent=[-90, -10; -10, -90], string="C"), + Text(extent=[10, -10; 90, -90], string="D"), + Line(points=[0, -90; 0, 90], style(color=8)), + Line(points=[-90, 0; 90, 0], style(color=8))), Diagram( - Rectangle(extent=[-60, 60; 60, -60]), + Rectangle(extent=[-60, 60; 60, -60]), Text( - extent=[-60, 40; 60, 0], - string="sx=Ax+Bu", - style(color=0)), + extent=[-60, 40; 60, 0], + string="sx=Ax+Bu", + style(color=0)), Text( - extent=[-60, 0; 60, -40], - string=" y=Cx+Du", - style(color=0)), - Line(points=[-100, 0; -60, 0]), + extent=[-60, 0; 60, -40], + string=" y=Cx+Du", + style(color=0)), + Line(points=[-100, 0; -60, 0]), Line(points=[60, 0; 100, 0]))); - equation + equation der(x) = A*x + B*u; y = C*x + D*u; end StateSpace; - -end Continuous; + block Der "Derivative of input (= analytic differentations)" + extends Interfaces.MIMOs; + + annotation (Icon(Text(extent=[-80, 76; 80, -82], string="der()")), + Documentation(info=" +

    +Defines that the output (= outPort.signal) is the derivative +of the input (=inPort.signal). Note, that Modelica.Blocks.Continuous.Derivative +computes the derivative in an approximate sense, where this block computes +the derivative exactly. This requires that the input signals are differentiated +by the Modelica translator, if these derivatives are not yet present in +the model. +

    +")); + equation + for i in 1:n loop + y[i] = der(u[i]); + end for; + end Der; +end Continuous; diff --git a/Blocks/Examples.mo b/Blocks/Examples.mo new file mode 100644 index 0000000000..3a212e8613 --- /dev/null +++ b/Blocks/Examples.mo @@ -0,0 +1,301 @@ +package Examples "Demonstration examples of the components of this package" + + extends Icons.Library; + + encapsulated model BusUsage "Demonstration of signal bus usage" + import Modelica.Icons; + import Modelica.Blocks.Interfaces.BusAdaptors; + import Modelica.Blocks.Sources; + + extends Icons.Example; + + annotation (Documentation(info=" +

    Signal bus concept

    + +

    +In technical systems, such as vehicles, robots or satellites, many signals +are exchanged between components. In a simulation system, these signals +are usually modelled by signal connections of input/output blocks. +Unfortunately, the signal connection structure may become very complicated, +especially for hierarchical models. +

    + +

    +The same is also true for real technical systems. To reduce complexity +and get higher flexibility, many technical systems use data buses to +exchange data between components. For the same reasons, it is often better +to use a \"signal bus\" concept also in a Modelica model. This is demonstrated +at hand of this model (Modelica.Blocks.Examples.BusUsage), see diagram layer: +

    + +
      +
    • The thick line in the middle called \"bus\" is just a connector instance + which is drawn such that it looks like a \"usual\" bus representation.
    • +
    • A component, such as \"part\", can be directly connected to the \"bus\", + provided it has also a bus connector, or the \"part\" connector is a + sub-connector contained in the \"bus\".
    • +
    + +

    +Difficulties arise if the input or output connector of an +input/output block shall be connected directly to a variable +of a bus because connections can only be performed between +connectors but not between variables. For convenience, +single variable connectors for Real, Integer and Boolean +variables are provided as Modelica.Blocks.Interfaces.RealPort, +Modelica.Blocks.Interfaces.IntegerPort, +Modelica.Blocks.Interfaces.BooleanPort. +For example, the RealPort connector is basically defined as: +

    +
      connector RealPort = Real;
    +
    + +

    +This allows a definition of a bus in the form: +

    + +
       connector Bus
    +      RealPort r1;
    +      RealPort r2;
    +        ...
    +   end Bus;
    +
    + +

    +and a connection to r1 and r2 is possible since these are connectors. +Unfortunately, signals defined in this way have, by default, no unit. +To improve this situation, a RealPort is actually defined as +

    + +
       connector RealPort 
    +      replaceable type SignalType = Real;
    +      extends SignalType;
    +   end RealPort;
    +
    + +

    +This allows a redeclaration of the Real type to the desired type, such as: +

    + +
       connector Bus
    +      import SI=Modelica.SIunits;
    +      RealPort v(redeclare SignalType=SI.Velocity);
    +      RealPort p(redeclare SignalType=SI.Pressure);
    +      ...
    +   end Bus;
    +
    + +

    +In order to connect from a RealPort connector to an InPort or OutPort +connector of a block from the Modelica.Blocks package, an adaptor block +is needed, since the two connectors are not compatible. Appropriate adaptors +are provided in Modelica.Blocks.Interfaces.BusAdaptors. The usage can +be seen in the diagram layer of the model at hand +(Modelica.Blocks.Examples.BusUsage). +

    + +

    +If a bus connector contains many signals it is no longer so easy +to test just one part of a system, because all parts of +the bus connector must get a value. To simplify this, +it is practical to provide a RestBus component which +sets all parts of a bus to a default value when selected +via the parameter menu. This is also demonstrated in the example +model (see diagram layer). +

    + +

    Simulate the system for 1 s. The outputs of the 'receive' signal +blocks should be the same as the inputs of the 'send' signal blocks. +

    +")); + protected + Interfaces.Bus bus annotation (extent=[-80, -20; 80, -14]); + public + BusAdaptors.SendReal putRealSignal1 annotation (extent=[-60, 0; -40, 20], + rotation=-90); + BusAdaptors.SendBoolean putBooleanSignal annotation (extent=[-20, 0; 0, 20] + , rotation=-90); + BusAdaptors.SendInteger putIntegerSignal annotation (extent=[20, 0; 40, 20] + , rotation=-90); + BusAdaptors.ReceiveReal getRealSignal1 annotation (extent=[-40, -80; -20, - + 60], rotation=-90); + BusAdaptors.ReceiveBoolean getBooleanSignal annotation (extent=[0, -80; 20 + , -60], rotation=-90); + BusAdaptors.ReceiveInteger getIntegerSignal annotation (extent=[40, -80; 60 + , -60], rotation=-90); + RestBus restBus(set_realSignal2=true) annotation (extent=[60, 20; 80, 40]); + Sources.IntegerStep generateIntegerSignal( + height={1}, + offset={2}, + startTime={0.5}) annotation (extent=[20, 60; 40, 80], rotation=270); + Sources.BooleanStep generateBooleanSignal(startTime={0.5}) annotation ( + extent=[-20, 60; 0, 80], rotation=270); + Sources.Sine generateRealSignal1 annotation (extent=[-60, 60; -40, 80], + rotation=270); + + encapsulated package Interfaces "Interfaces specialised for this example" + + connector MultiPort "Combined port of real and boolean signal" + Real myRealSignal; + Boolean myBooleanSignal; + + annotation (Icon(Rectangle(extent=[-100, 100; 100, -100], style( + fillColor=76, fillPattern=1))), Diagram(Rectangle(extent=[- + 100, 100; 100, -100], style(fillColor=76, fillPattern=1)))); + end MultiPort; + + connector Bus "Signal bus" + import SI = Modelica.SIunits; + import Modelica.Blocks.Interfaces.*; + + RealPort realSignal1(redeclare type SignalType = SI.AngularVelocity) + "First Real signal (angular velocity)"; + RealPort realSignal2 "Second Real signal"; + IntegerPort integerSignal "Integer signal"; + BooleanPort booleanSignal "Boolean signal"; + MultiPort multiSignal "Combined signal"; + + annotation ( + Icon(Rectangle(extent=[-100, 100; 100, -100], style( + color=77, + fillColor=77, + fillPattern=1)), Text( + extent=[-134, 168; 134, 108], + string="%name", + style(color=77))), + Diagram(Text( + extent=[-134, 168; 134, 108], + string="%name", + style(color=77)), Rectangle(extent=[-100, 100; 100, -100], style( + color=77, + fillColor=77, + fillPattern=1))), + Documentation(info=" +

    Defines connector for signalbus.

    + +")); + end Bus; + end Interfaces; + + encapsulated model Part "Component with MultiPort connector" + import Modelica.Blocks.Examples; + + Examples.BusUsage.Interfaces.MultiPort multiSignal annotation (extent=[ + 100, -10; 120, 10]); + + annotation (Icon(Rectangle(extent=[-100, 60; 100, -60], style(fillColor= + 76, fillPattern=1)), Text( + extent=[-106, 124; 114, 68], + style(fillColor=76, fillPattern=1), + string="%name"))); + equation + multiSignal.myRealSignal = time; + multiSignal.myBooleanSignal = time > 0.5; + end Part; + + encapsulated model RestBus + "Set default values for bus variables that are not defined elsewhere" + + import Modelica.Blocks.Examples; + + parameter Boolean set_realSignal1=false + "Set dummy value for desiredThrottle"; + parameter Boolean set_realSignal2=false "Set dummy value for brake"; + parameter Boolean set_integerSignal=false + "Set dummy value for controlLeverPosition"; + parameter Boolean set_booleanSignal=false + "Set dummy value for desiredGear"; + parameter Boolean set_multiSignal=false "Set dummy value for ignition"; + + annotation (Icon( + Rectangle(extent=[-100, 100; 100, -100], style(fillColor=7, + fillPattern=1)), + Text( + extent=[-100, 156; 100, 96], + string="%name", + style(pattern=0)), + style(color=77), + Text( + extent=[46, -10; 88, -40], + style(color=0), + string="0"), + Text( + extent=[-82, 62; 38, 34], + style(color=0), + string="false"), + Line(points=[-28, 24; -28, -66; 0, -66; 0, -104; 0, -102], style( + color=77, + fillColor=7, + fillPattern=1)), + Line(points=[68, -46; 68, -66; 0, -66; 0, -108], style( + color=77, + fillColor=7, + fillPattern=1)), + Rectangle(extent=[-90, 78; 46, 24], style(color=0)), + Rectangle(extent=[40, -4; 92, -46], style(color=0)))); + Examples.BusUsage.Interfaces.Bus bus annotation (extent=[-10, -120; 10, - + 100], rotation=90); + equation + if set_realSignal1 then + bus.realSignal1 = 0; + end if; + if set_realSignal2 then + bus.realSignal2 = 0; + end if; + if set_integerSignal then + bus.integerSignal = 0; + end if; + if set_booleanSignal then + bus.booleanSignal = false; + end if; + if set_multiSignal then + bus.multiSignal.myRealSignal = 0; + bus.multiSignal.myBooleanSignal = false; + end if; + end RestBus; + + Part part annotation (extent=[-100, -60; -80, -40]); + equation + + connect(putRealSignal1.toBus, bus.realSignal1) annotation (points=[-50, -2 + ; -50, -16], style(color=77)); + connect(putIntegerSignal.toBus, bus.integerSignal) annotation (points=[30, + -2; 30, -16], style(color=77)); + connect(generateRealSignal1.outPort, putRealSignal1.inPort) annotation ( + points=[-50, 58; -50, 24], style(color=3)); + connect(generateBooleanSignal.outPort, putBooleanSignal.inPort) annotation + (points=[-10, 58; -10, 24], style(color=5)); + connect(generateIntegerSignal.outPort, putIntegerSignal.inPort) annotation + (points=[30, 58; 30, 24], style(color=45)); + connect(getRealSignal1.fromBus, bus.realSignal1) annotation (points=[-30, - + 58; -30, -18], style(color=77)); + connect(getIntegerSignal.fromBus, bus.integerSignal) annotation (points=[50 + , -60; 50, -18], style(color=77)); + connect(restBus.bus, bus) annotation (points=[70, 20; 70, -18], style(color + =77)); + connect(putBooleanSignal.toBus, bus.booleanSignal) annotation (points=[-10 + , -2; -10, -16], style(color=77)); + connect(getBooleanSignal.fromBus, bus.booleanSignal) annotation (points=[10 + , -60; 10, -18], style(color=77)); + connect(part.multiSignal, bus.multiSignal) annotation (points=[-78, -50; - + 70, -50; -70, -18]); + end BusUsage; + + annotation (Documentation(info=" +

    +This package contains currently one example model to demonstrate the usage of the +signal bus concept provided by the Modelica.Blocks package. +

    + +

    Copyright © 2002, Modelica Association and DLR.

    + +

    +The Modelica package is free software; it can be redistributed and/or modified +under the terms of the Modelica license, see the license conditions +and the accompanying disclaimer in the documentation of package +Modelica in file \"Modelica/package.mo\". +

    + +")); + +end Examples; diff --git a/Blocks/Interfaces.mo b/Blocks/Interfaces.mo index 34ccf7821c..70d57d84fd 100644 --- a/Blocks/Interfaces.mo +++ b/Blocks/Interfaces.mo @@ -1,39 +1,36 @@ package Interfaces "Connectors and partial models for input/output blocks" + extends Modelica.Icons.Library; - package SIunits = Modelica.SIunits ; - - annotation ( - Coordsys( - extent=[0, 0; 294, 599], - grid=[2, 2], - component=[20, 20]), - Window( - x=0.03, - y=0.01, - width=0.24, - height=0.63, - library=1, - autolayout=1), - Documentation(info=" - + annotation (Window( + x=0.05, + y=0.09, + width=0.72, + height=0.71, + library=1, + autolayout=1), + Documentation(info="

    -This package contains interface definitions for +This package contains interface definitions for continuous input/output blocks. In particular it contains the following connector classes:

    -  InPort           Connector with input signals of type Real.
    -  OutPort          Connector with output signals of type Real.
    -  BooleanInPort    Connector with input signals of type Boolean.
    -  BooleanOutPort   Connector with output signals of type Boolean.
    +  InPort           Connector with input        signals of type Real.
    +  OutPort          Connector with output       signals of type Real.
    +  BooleanInPort    Connector with input        signals of type Boolean.
    +  BooleanOutPort   Connector with output       signals of type Boolean.
    +  IntegerInPort    Connector with input        signals of type Integer.
    +  IntegerOutPort   Connector with output       signals of type Integer.
    +
    +  RealPort         Connector with input/output signals of type Real.
    +  BooleanPort      Connector with input/output signals of type Real.
    +  IntegerPort      Connector with input/output signals of type Real.
     
    -

    -The following partial block classes are provided -to model continuous control blocks: -

    +

    The following partial block classes are provided +to model continuous control blocks:

       BlockIcon     Basic graphical layout of continuous block
    @@ -41,16 +38,16 @@ to model continuous control blocks:
       MO            Multiple Output continuous control block
       SISO          Single Input Single Output continuous control block
       SI2SO         2 Single Input / 1 Single Output continuous control block
    +  SIMO          Single Input Multiple Output continuous control block
       MISO          Multiple Input Single Output continuous control block
       MIMO          Multiple Input Multiple Output continuous control block
       MIMOs         Multiple Input Multiple Output continuous control block
                     with same number of inputs and outputs
    -  MI2MO         2 Multiple Input / Multiple Output continuous 
    +  MI2MO         2 Multiple Input / Multiple Output continuous
                     control block
       SignalSource  Base class for continuous signal sources
    -  Periodic      Base class for periodic continuous signal sources
       SVcontrol     Single-Variable continuous controller
    -  MVcontrol     Multi-Variable continuous controller 
    +  MVcontrol     Multi-Variable continuous controller
     

    @@ -62,15 +59,34 @@ to model Boolean control blocks: BooleanBlockIcon Basic graphical layout of Boolean block BooleanSISO Single Input Single Output control block with signals of type Boolean - BooleanSignalSource Base class for Boolean signal sources - MI2BooleanMOs 2 Multiple Input / Boolean Multiple Output + BooleanMIMOs Multiple Input Multiple Output control block + with same number of inputs and outputs + MI2BooleanMOs 2 Multiple Input / Boolean Multiple Output block with same signal lengths + BooleanSignalSource Base class for Boolean signal sources + IntegerMIBooleanMOs Multiple Integer Input Multiple Boolean Output control block + with same number of inputs and outputs +

    + +

    +The following partial block classes are provided +to model Integer control blocks: +

    + +
    +  IntegerBlockIcon     Basic graphical layout of Integer block
    +  IntegerMO            Multiple Output control block
    +  IntegerSignalSource  Base class for Integer signal sources
     
    +

    In addition, a subpackage BusAdaptors is temporarily provided +in order to make a signal bus concept available. It will be removed, +when the package Block is revised exploiting new Modelica features.

    +
    Main Author: -
    Martin Otter
    - Deutsches Zentrum fuer Luft und Raumfahrt e.V. (DLR)
    +
    Martin Otter
    + Deutsches Zentrum für Luft und Raumfahrt e. V. (DLR)
    Oberpfaffenhofen
    Postfach 1116
    D-82230 Wessling
    @@ -80,8 +96,12 @@ to model Boolean control blocks:

    Release Notes:

      +
    • Oct. 21, 2002 + by Martin Otter + and Christian Schweiger:
      + Added several new interfaces. Detailed description available.
    • Oct. 24, 1999 - by Martin Otter:
      + by Martin Otter:
      RealInputSignal renamed to InPort. RealOutputSignal renamed to OutPort. GraphBlock renamed to BlockIcon. SISOreal renamed to SISO. SOreal renamed to SO. I2SOreal renamed to M2SO. @@ -90,71 +110,75 @@ to model Boolean control blocks: DiscreteBlock, DiscreteSISO, DiscreteMIMO, DiscreteMIMOs, BooleanBlockIcon, BooleanSISO, BooleanSignalSource, MI2BooleanMOs.
    • June 30, 1999 - by Martin Otter:
      + by Martin Otter:
      Realized a first version, based on an existing Dymola library of Dieter Moormann and Hilding Elmqvist.

    -

    Copyright (C) 1999, Modelica Design Group and DLR.

    +

    Copyright © 1999-2002, Modelica Association and DLR.

    The Modelica package is free software; it can be redistributed and/or modified under the terms of the Modelica license, see the license conditions -and the accompanying disclaimer in the documentation of package +and the accompanying disclaimer in the documentation of package Modelica in file \"Modelica/package.mo\".

    ")); connector InPort "Connector with input signals of type Real" parameter Integer n=1 "Dimension of signal vector"; - input Real signal[n] "Real input signals"; + replaceable type SignalType = Real "type of signal"; + input SignalType signal[n] "Real input signals"; annotation ( Coordsys(extent=[-100, -100; 100, 100]), Icon(Polygon(points=[-100, 100; 100, 0; -100, -100; -100, 100], style( color=3, fillColor=3))), - Diagram(Polygon(points=[-100, 100; 100, 0; -100, -100; -100, 100], style - (color=3, fillColor=3)), Text( + Diagram(Polygon(points=[-100, 100; 100, 0; -100, -100; -100, 100], style( + color=3, fillColor=3)), Text( extent=[-100, -120; 100, -220], string="%name", style(color=3))), - Terminal(Polygon(points=[-100, 100; 100, 0; -100, -100; -100, 100], - style(color=3, fillColor=3)))); + Terminal(Polygon(points=[-100, 100; 100, 0; -100, -100; -100, 100], style + (color=3, fillColor=3)))); end InPort; + connector OutPort "Connector with output signals of type Real" parameter Integer n=1 "Dimension of signal vector"; - output Real signal[n] "Real output signals"; + replaceable type SignalType = Real "type of signal"; + output SignalType signal[n] "Real output signals"; annotation ( Coordsys(extent=[-100, -100; 100, 100]), Icon(Polygon(points=[-100, 100; 100, 0; -100, -100; -100, 100], style( color=3, fillColor=7))), - Diagram(Polygon(points=[-100, 100; 100, 0; -100, -100; -100, 100], style - (color=3, fillColor=7)), Text( + Diagram(Polygon(points=[-100, 100; 100, 0; -100, -100; -100, 100], style( + color=3, fillColor=7)), Text( extent=[-100, -120; 100, -220], string="%name", style(color=3))), - Terminal(Polygon(points=[-100, 100; 100, 0; -100, -100; -100, 100], - style(color=3, fillColor=7)))); + Terminal(Polygon(points=[-100, 100; 100, 0; -100, -100; -100, 100], style + (color=3, fillColor=7)))); end OutPort; + connector BooleanInPort "Connector with input signals of type Boolean" parameter Integer n=1 "Dimension of signal vector"; input Boolean signal[n] "Boolean input signals"; annotation ( - Coordsys(extent=[-100, -100; 100, 100]), Icon(Polygon(points=[-100, 100; 100, 0; -100, -100; -100, 100], style( color=5, fillColor=5))), - Diagram(Polygon(points=[-100, 100; 100, 0; -100, -100; -100, 100], style - (color=5, fillColor=5)), Text( + Diagram(Polygon(points=[-100, 100; 100, 0; -100, -100; -100, 100], style( + color=5, fillColor=5)), Text( extent=[-100, -120; 100, -220], string="%name", style(color=5))), - Terminal(Polygon(points=[-100, 100; 100, 0; -100, -100; -100, 100], - style(color=5, fillColor=5)))); + Terminal(Polygon(points=[-100, 100; 100, 0; -100, -100; -100, 100], style + (color=5, fillColor=5)))); end BooleanInPort; + connector BooleanOutPort "Connector with output signals of type Boolean" parameter Integer n=1 "Dimension of signal vector"; output Boolean signal[n] "Boolean output signals"; @@ -163,25 +187,71 @@ Modelica in file \"Modelica/package.mo\". Coordsys(extent=[-100, -100; 100, 100]), Icon(Polygon(points=[-100, 100; 100, 0; -100, -100; -100, 100], style( color=5, fillColor=7))), - Diagram(Polygon(points=[-100, 100; 100, 0; -100, -100; -100, 100], style - (color=5, fillColor=7)), Text( + Diagram(Polygon(points=[-100, 100; 100, 0; -100, -100; -100, 100], style( + color=5, fillColor=7)), Text( extent=[-100, -120; 100, -220], string="%name", style(color=5))), - Terminal(Polygon(points=[-100, 100; 100, 0; -100, -100; -100, 100], - style(color=5, fillColor=7)))); + Terminal(Polygon(points=[-100, 100; 100, 0; -100, -100; -100, 100], style + (color=5, fillColor=7)))); end BooleanOutPort; - partial block BlockIcon "Basic graphical layout of continuous block" - annotation ( - Coordsys(extent=[-100, -100; 100, 100]), + + connector IntegerInPort "Connector with input signals of type Integer" + parameter Integer n=1 "Dimension of signal vector"; + input Integer signal[n] "Integer input signals"; + + annotation ( + Coordsys( + extent=[-100, -100; 100, 100], + grid=[2, 2], + component=[20, 20]), + Icon(Polygon(points=[-100, 100; 100, 0; -100, -100; -100, 100], style( + color=45, fillColor=45))), + Diagram(Polygon(points=[-100, 100; 100, 0; -100, -100; -100, 100], style( + color=45, fillColor=45)), Text( + extent=[-100, -120; 100, -220], + string="%name", + style(color=45))), + Terminal(Polygon(points=[-100, 100; 100, 0; -100, -100; -100, 100], style + (color=5, fillColor=5))), Window( - x=0, - y=0, + x=0.4, + y=0.4, width=0.6, - height=0.6), - Icon(Rectangle(extent=[-100, -100; 100, 100], style(color=3, fillColor=7 - )), Text(extent=[-150, 150; 150, 110], string="%name"))); end - BlockIcon; + height=0.6)); + end IntegerInPort; + + connector IntegerOutPort "Connector with output signals of type Integer" + parameter Integer n=1 "Dimension of signal vector"; + output Integer signal[n] "Integer output signals"; + + annotation ( + Coordsys( + extent=[-100, -100; 100, 100], + grid=[2, 2], + component=[20, 20]), + Icon(Polygon(points=[-100, 100; 100, 0; -100, -100; -100, 100], style( + color=45, fillColor=7))), + Diagram(Polygon(points=[-100, 100; 100, 0; -100, -100; -100, 100], style( + color=45, fillColor=7)), Text( + extent=[-100, -120; 100, -220], + string="%name", + style(color=45))), + Terminal(Polygon(points=[-100, 100; 100, 0; -100, -100; -100, 100], style + (color=5, fillColor=7))), + Window( + x=0.4, + y=0.4, + width=0.6, + height=0.6)); + end IntegerOutPort; + + partial block BlockIcon "Basic graphical layout of continuous block" + annotation (Icon(Rectangle(extent=[-100, -100; 100, 100], style(color=3, + fillColor=7)), Text(extent=[-150, 150; 150, 110], string="%name") + )); + end BlockIcon; + partial block SO "Single Output continuous control block" extends BlockIcon; @@ -198,9 +268,11 @@ Modelica in file \"Modelica/package.mo\". width=0.6, height=0.6), Diagram); - protected - Real y=outPort.signal[1]; + output Real y; + equation + y = outPort.signal[1]; end SO; + partial block MO "Multiple Output continuous control block" extends BlockIcon; @@ -217,12 +289,13 @@ Modelica in file \"Modelica/package.mo\". y=0.03, width=0.6, height=0.6), - Diagram, - Documentation(info=" + Documentation(info=" ")); - protected - Real y[nout]=outPort.signal; + output Real y[nout]; + equation + y = outPort.signal; end MO; + partial block SISO "Single Input Single Output continuous control block" extends BlockIcon; @@ -230,21 +303,22 @@ Modelica in file \"Modelica/package.mo\". extent=[-140, -20; -100, 20]); OutPort outPort(final n=1) "Connector of Real output signal" annotation ( extent=[100, -10; 120, 10]); - annotation ( - Diagram, - Coordsys( + output Real y; + + annotation (Coordsys( extent=[-100, -100; 100, 100], grid=[2, 2], - component=[20, 20]), - Window( + component=[20, 20]), Window( x=0.32, y=0.07, width=0.6, height=0.6)); protected Real u=inPort.signal[1]; - Real y=outPort.signal[1]; + equation + y = outPort.signal[1]; end SISO; + partial block SI2SO "2 Single Input / 1 Single Output continuous control block" extends BlockIcon; @@ -255,27 +329,39 @@ Modelica in file \"Modelica/package.mo\". extent=[-140, -80; -100, -40]); OutPort outPort(final n=1) "Connector of Real output signal" annotation ( extent=[100, -10; 120, 10]); + output Real y "Output signal"; - annotation ( - Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), - Window( - x=0.31, - y=0.07, - width=0.6, - height=0.6), - Documentation(info=" -Block has two Input vectors inPort1.signal and inPort2.signal and one -output vector outPort.signal. All vectors have one element. -"), - Diagram); + annotation (Documentation(info="

    +Block has two Input vectors inPort1.signal and inPort2.signal and one +output vector outPort.signal. All vectors have one element.

    +")); protected Real u1=inPort1.signal[1] "Input signal 1"; Real u2=inPort2.signal[1] "Input signal 2"; - Real y=outPort.signal[1] "Output signal"; + equation + y = outPort.signal[1]; end SI2SO; + + partial block SIMO "Single Input Multiple Output continuous control block" + extends BlockIcon; + parameter Integer nout=1 "Number of outputs"; + InPort inPort(final n=1) "Connector of Real input signal" annotation ( + extent=[-140, -20; -100, 20]); + OutPort outPort(final n=nout) "Connector of Real output signals" + annotation (extent=[100, -10; 120, 10]); + output Real y[nout] "Output signals"; + + annotation (Documentation(info=" +

    Block has one continuous input signal and a vector of continuous output +signals.

    + +")); + protected + Real u=inPort.signal[1] "Input signal"; + equation + y = outPort.signal; + end SIMO; + partial block MISO "Multiple Input Single Output continuous control block" extends BlockIcon; parameter Integer nin=1 "Number of inputs"; @@ -283,20 +369,22 @@ output vector outPort.signal. All vectors have one element. extent=[-140, -20; -100, 20]); OutPort outPort(final n=1) "Connector of Real output signal" annotation ( extent=[100, -10; 120, 10]); - annotation (Documentation(info=" - + output Real y "Output signal"; + + annotation (Documentation(info="

    -Block has a vector of continuous input signals and +Block has a vector of continuous input signals and one continuous output signal.

    ")); protected Real u[:]=inPort.signal "Input signals"; - Real y=outPort.signal[1] "Output signal"; + equation + y = outPort.signal[1]; end MISO; - partial block MIMO "Multiple Input Multiple Output continuous control block" - + + partial block MIMO "Multiple Input Multiple Output continuous control block" extends BlockIcon; parameter Integer nin=1 "Number of inputs"; @@ -305,8 +393,8 @@ one continuous output signal. extent=[-140, -20; -100, 20]); OutPort outPort(final n=nout) "Connector of Real output signals" annotation (extent=[100, -10; 120, 10]); - annotation (Documentation(info=" - + output Real y[nout] "Output signals"; + annotation (Documentation(info="

    Block has a continuous input and a continuous output signal vector. The signal sizes of the input and output vector may be different. @@ -315,8 +403,10 @@ The signal sizes of the input and output vector may be different. ")); protected Real u[:]=inPort.signal "Input signals"; - Real y[:]=outPort.signal "Output signals"; + equation + y = outPort.signal; end MIMO; + partial block MIMOs "Multiple Input Multiple Output continuous control block with same number of inputs and outputs" @@ -327,16 +417,15 @@ The signal sizes of the input and output vector may be different. extent=[-140, -20; -100, 20]); OutPort outPort(final n=n) "Connector of Real output signals" annotation ( extent=[100, -10; 120, 10]); + output Real y[n] "Output signals"; annotation ( - Documentation(info=" - + Documentation(info="

    Block has a continuous input and a continuous output signal vector where the signal sizes of the input and output vector are identical.

    "), - Diagram, Coordsys( extent=[-100, -100; 100, 100], grid=[2, 2], @@ -348,8 +437,10 @@ where the signal sizes of the input and output vector are identical. height=0.6)); protected Real u[:]=inPort.signal "Input signals"; - Real y[:]=outPort.signal "Output signals"; + equation + y = outPort.signal; end MIMOs; + partial block MI2MO "2 Multiple Input / Multiple Output continuous control block" extends BlockIcon; @@ -362,6 +453,7 @@ where the signal sizes of the input and output vector are identical. extent=[-140, -80; -100, -40]); OutPort outPort(final n=n) "Connector of Real output signals" annotation ( extent=[100, -10; 120, 10]); + output Real y[n] "Output signals"; annotation ( Coordsys( extent=[-100, -100; 100, 100], @@ -373,34 +465,36 @@ where the signal sizes of the input and output vector are identical. width=0.6, height=0.6), Documentation(info=" -Block has two Input vectors inPort1.signal and inPort2.signal and one +Block has two Input vectors inPort1.signal and inPort2.signal and one output vector outPort.signal. All vectors have the same number of elements. -"), - Diagram); +")); protected Real u1[:]=inPort1.signal "Input signals 1"; Real u2[:]=inPort2.signal "Input signals 2"; - Real y[:]=outPort.signal "Output signals"; + equation + y = outPort.signal; end MI2MO; + partial block SignalSource "Base class for continuous signal source" extends MO; parameter Real offset[:]={0} "offset of output signal"; - parameter SIunits.Time startTime[:]={0} "output = offset for time < startTime"; + parameter SI.Time startTime[:]={0} "output = offset for time < startTime"; end SignalSource; + partial block SVcontrol "Single-Variable continuous controller" extends BlockIcon; protected Real u_s "Scalar setpoint input signal"; Real u_m "Scalar measurement input signal"; - Real y "Scalar actuator output signal"; public - InPort inPort_s(final n=1) "Connector of setpoint input signal" - annotation (extent=[-140, -20; -100, 20]); + InPort inPort_s(final n=1) "Connector of setpoint input signal" annotation + (extent=[-140, -20; -100, 20]); InPort inPort_m(final n=1) "Connector of measurement input signal" annotation (extent=[20, -100; -20, -140], rotation=-90); OutPort outPort(final n=1) "Connector of actuator output signal" annotation (extent=[100, -10; 120, 10]); + output Real y "Scalar actuator output signal"; annotation ( Diagram( Text(extent=[-102, 34; -142, 24], string="(setpoint)"), @@ -420,6 +514,7 @@ output vector outPort.signal. All vectors have the same number of elements. u_m = inPort_m.signal[1]; y = outPort.signal[1]; end SVcontrol; + partial block MVcontrol "Multi-Variable continuous controller" extends BlockIcon; @@ -432,32 +527,18 @@ output vector outPort.signal. All vectors have the same number of elements. annotation (extent=[20, -100; -20, -140], rotation=-90); OutPort outPort(final n=ny) "Connector of actuator output signals" annotation (extent=[100, -10; 120, 10]); - annotation ( - Diagram( + annotation (Diagram( Text(extent=[-100, 36; -140, 26], string="(setpoint)"), Text(extent=[102, 24; 142, 14], string="(actuator)"), - Text(extent=[-75, -108; -25, -98], string=" (measurement)")), - Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), - Window( - x=0.26, - y=0.19, - width=0.6, - height=0.6)); + Text(extent=[-75, -108; -25, -98], string=" (measurement)"))); end MVcontrol; + partial block BooleanBlockIcon "Basic graphical layout of Boolean block" - annotation ( - Coordsys(extent=[-100, -100; 100, 100]), - Window( - x=0.1, - y=0.1, - width=0.6, - height=0.6), - Icon(Rectangle(extent=[-100, -100; 100, 100], style(color=5, fillColor=7 - )), Text(extent=[-150, 150; 150, 110], string="%name"))); end - BooleanBlockIcon; + annotation (Icon(Rectangle(extent=[-100, -100; 100, 100], style(color=5, + fillColor=7)), Text(extent=[-150, 150; 150, 110], string="%name") + )); + end BooleanBlockIcon; + partial block BooleanSISO "Single Input Single Output control block with signals of type Boolean" extends BooleanBlockIcon; @@ -467,21 +548,66 @@ output vector outPort.signal. All vectors have the same number of elements. annotation (extent=[-140, -20; -100, 20]); BooleanOutPort outPort(final n=1) "Connector of Boolean output signal" annotation (extent=[100, -10; 120, 10]); - annotation ( - Diagram, - Coordsys( + output Boolean y; + + annotation (Coordsys( extent=[-100, -100; 100, 100], grid=[2, 2], - component=[20, 20]), - Window( + component=[20, 20]), Window( x=0.37, y=0.14, width=0.6, height=0.6)); protected Boolean u=inPort.signal[1]; - Boolean y=outPort.signal[1]; + equation + y = outPort.signal[1]; end BooleanSISO; + + partial block BooleanMIMOs + "Multiple Input Multiple Output continuous control block with same number of inputs and outputs of boolean type" + + + extends BooleanBlockIcon; + parameter Integer n=1 "Number of inputs (= number of outputs)"; + BooleanInPort inPort(final n=n) "Connector of Boolean input signals" + annotation (extent=[-140, -20; -100, 20]); + BooleanOutPort outPort(final n=n) "Connector of Boolean output signals" + annotation (extent=[100, -10; 120, 10]); + output Boolean y[n] "Output signals"; + annotation (Documentation(info=" +

    +Block has a continuous input and a continuous output signal vector +where the signal sizes of the input and output vector are identical +and of type boolean. +

    + +")); + protected + Boolean u[:]=inPort.signal "Input signals"; + equation + y = outPort.signal; + end BooleanMIMOs; + + partial block MI2BooleanMOs + "2 Multiple Input / Boolean Multiple Output block with same signal lengths" + + + extends BooleanBlockIcon; + parameter Integer n=1 "Dimension of input and output vectors."; + InPort inPort1(final n=n) "Connector 1 of Boolean input signals" + annotation (extent=[-140, 40; -100, 80]); + InPort inPort2(final n=n) "Connector 2 of Boolean input signals" + annotation (extent=[-140, -80; -100, -40]); + BooleanOutPort outPort(final n=n) "Connector of Boolean output signals" + annotation (extent=[100, -10; 120, 10]); + annotation (Documentation(info=" +

    Block has two Boolean input vectors u1 and u2 and one Boolean output +vector y. All vectors have the same number of elements.

    + +")); + end MI2BooleanMOs; + partial block BooleanSignalSource "Base class for Boolean signal sources" extends BooleanBlockIcon; parameter Integer nout(min=1) = 1 "Number of Boolean outputs"; @@ -503,33 +629,361 @@ output vector outPort.signal. All vectors have the same number of elements. fillColor=8)), Line(points=[-90, -70; 68, -70], style(color=8)), Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style(color=8, - fillColor=8))), - Diagram); + fillColor=8)))); end BooleanSignalSource; - partial block MI2BooleanMOs - "2 Multiple Input / Boolean Multiple Output block with same signal lengths" + + partial block IntegerBlockIcon "Basic graphical layout of Integer block" + annotation (Icon(Rectangle(extent=[-100, -100; 100, 100], style(color=45, + fillColor=7)), Text(extent=[-150, 150; 150, 110], string="%name") + )); + end IntegerBlockIcon; + + partial block IntegerMO "Multiple Integer Output continuous control block" + extends IntegerBlockIcon; + + parameter Integer nout(min=1) = 1 "Number of outputs"; + IntegerOutPort outPort(final n=nout) "Connector of Integer output signals" + annotation (extent=[100, -10; 120, 10]); + output Integer y[nout]; + equation + y = outPort.signal; + end IntegerMO; + + partial block IntegerSignalSource + "Base class for continuous Integer signal source" + extends IntegerMO; + parameter Integer offset[:]={0} "offset of output signal"; + parameter SI.Time startTime[:]={0} "output = offset for time < startTime"; + end IntegerSignalSource; + + partial block IntegerMIBooleanMOs + "Multiple Integer Input Multiple Boolean Output continuous control block with same number of inputs and outputs" extends BooleanBlockIcon; - parameter Integer n=1 "Dimension of input and output vectors."; - InPort inPort1(final n=n) "Connector 1 of Boolean input signals" - annotation (extent=[-140, 40; -100, 80]); - InPort inPort2(final n=n) "Connector 2 of Boolean input signals" - annotation (extent=[-140, -80; -100, -40]); + parameter Integer n=1 "Number of inputs (= number of outputs)"; + IntegerInPort inPort(final n=n) "Connector of Integer input signals" + annotation (extent=[-140, -20; -100, 20]); BooleanOutPort outPort(final n=n) "Connector of Boolean output signals" annotation (extent=[100, -10; 120, 10]); + output Boolean y[n] "Boolean output signals"; + annotation (Documentation(info=" +

    +Block has a continuous integer input and a continuous boolean output signal vector +where the signal sizes of the input and output vector are identical. +

    + +")); + protected + Integer u[n]=inPort.signal "Input signals"; + equation + y = outPort.signal; + end IntegerMIBooleanMOs; + + connector RealPort "Real port (both input/output possible)" + replaceable type SignalType = Real; + extends SignalType; + end RealPort; + + /*connector RealPort "Connector with input signals of type Real" + parameter Integer n=1 "Dimension of signal vector"; + replaceable type SignalType = Real "type of signal"; + SignalType signal[n] "Real input signals"; + annotation ( - Coordsys(extent=[-100, -100; 100, 100]), - Window( - x=0.19, - y=0.16, - width=0.6, - height=0.6), - Documentation(info=" -Block has two Boolean input vectors u1 and u2 and one Boolean output vector y. -All vectors have the same number of elements. + Icon( + Polygon( + points=[-100, 100; 100, 0; -100, -100; -100, 100], + style(color=3, fillColor=3))), + Diagram( + Polygon( + points=[-100, 100; 100, 0; -100, -100; -100, 100], + style(color=3, fillColor=3)), + Text( + extent=[-100, -120; 100, -220], + string="%name", + style(color=3))), + Terminal( + Polygon( + points=[-100, 100; 100, 0; -100, -100; -100, 100], + style(color=3, fillColor=3)))); + end RealPort; */ + + connector BooleanPort = Boolean "Boolean port (both input/output possible)"; + + connector IntegerPort = Integer "Integer port (both input/output possible)"; + + package BusAdaptors + "Components to send signals to the bus or receive signals from the bus" + + extends Modelica.Icons.Library; + + block SendReal "Send Real signal to bus" + Internal.InputReal toBus annotation (extent=[100, -10; 120, 10]); + InPort inPort(final n=1) annotation (extent=[-140, -20; -100, 20]); + annotation (Icon( + Rectangle(extent=[-100, 40; 100, -40], style(color=73, fillColor=7)) + , + Text( + extent=[-144, 96; 144, 46], + string="%name", + style(color=0)), + Text( + extent=[-100, 30; 100, -30], + string="send", + style(color=73, fillColor=42))), Documentation(info=" +

    +Converts an InPort connector to a signal which can be connected to the +signal bus. Connect connector 'toBus' with the signal bus. A pop-up +dialog appears which allows to specify the signal from the bus +which is set equal to the signal of the InPort connector. +

    + + ")); - end MI2BooleanMOs; -end Interfaces; + equation + toBus = inPort.signal[1]; + end SendReal; + + block SendBoolean "Send Boolean signal to bus" + Internal.InputBoolean toBus annotation (extent=[100, -10; 120, 10]); + BooleanInPort inPort(final n=1) annotation (extent=[-140, -20; -100, 20]) + ; + annotation (Icon( + Rectangle(extent=[-100, 40; 100, -40], style(color=81, fillColor=7)) + , + Text( + extent=[-144, 96; 144, 46], + string="%name", + style(color=0)), + Text( + extent=[-100, 30; 100, -30], + string="send", + style(color=81, fillColor=42))), Documentation(info=" +

    +Converts a BooleanInPort connector to a signal which can be connected to the +signal bus. Connect connector 'toBus' with the signal bus. A pop-up +dialog appears which allows to specify the signal from the bus +which is set equal to the signal of the BooleanInPort connector. +

    + + +")); + equation + toBus = inPort.signal[1]; + end SendBoolean; + + block SendInteger "Send Integer signal to bus" + Internal.InputInteger toBus annotation (extent=[100, -10; 120, 10]); + IntegerInPort inPort(final n=1) annotation (extent=[-140, -20; -100, 20]) + ; + annotation (Icon( + Rectangle(extent=[-100, 40; 100, -40], style(color=45, fillColor=7)) + , + Text( + extent=[-144, 96; 144, 46], + string="%name", + style(color=0)), + Text( + extent=[-100, 30; 100, -30], + string="send", + style(color=45, fillColor=42))), Documentation(info=" +

    +Converts an IntegerInPort connector to a signal which can be connected to the +signal bus. Connect connector 'toBus' with the signal bus. A pop-up +dialog appears which allows to specify the signal from the bus +which is set equal to the signal of the IntegerInPort connector. +

    + + +")); + equation + toBus = inPort.signal[1]; + end SendInteger; + + block ReceiveReal "Receive Real signal from bus" + Internal.OutputReal fromBus annotation (extent=[-120, -10; -100, 10]); + OutPort outPort(final n=1) annotation (extent=[100, -10; 120, 10]); + annotation (Icon( + Rectangle(extent=[-100, 40; 100, -40], style(color=73, fillColor=7)) + , + Text( + extent=[-100, 30; 100, -30], + string="receive", + style(color=73, fillColor=42)), + Text( + extent=[-144, 96; 144, 46], + string="%name", + style(color=0))), Documentation(info=" +

    +Converts a signal from the signal bus to an OutPort connector. Use this +element by connecting connector 'fromBus' with the signal bus. A pop-up +dialog appears which allows to specify the signal from the bus +which is set equal to the signal of the OutPort connector. +

    + +")); + equation + fromBus = outPort.signal[1]; + end ReceiveReal; + + block ReceiveBoolean "Receive Boolean signal from bus" + Internal.OutputBoolean fromBus annotation (extent=[-120, -10; -100, 10]); + BooleanOutPort outPort(final n=1) annotation (extent=[100, -10; 120, 10]) + ; + annotation (Icon( + Rectangle(extent=[-100, 40; 100, -40], style(color=81, fillColor=7)) + , + Text( + extent=[-100, 30; 100, -30], + string="receive", + style(color=81, fillColor=42)), + Text( + extent=[-144, 96; 144, 46], + string="%name", + style(color=0))), Documentation(info=" +

    +Converts a signal from the signal bus to a BooleanOutPort connector. Use this +element by connecting connector 'fromBus' with the signal bus. A pop-up +dialog appears which allows to specify the signal from the bus +which is set equal to the signal of the BooleanOutPort connector. +

    + +")); + equation + fromBus = outPort.signal[1]; + end ReceiveBoolean; + + block ReceiveInteger "Receive Integer signal from bus" + Internal.OutputInteger fromBus annotation (extent=[-120, -10; -100, 10]); + IntegerOutPort outPort(final n=1) annotation (extent=[100, -10; 120, 10]) + ; + annotation (Icon( + Rectangle(extent=[-100, 40; 100, -40], style(color=45, fillColor=7)) + , + Text( + extent=[-100, 30; 100, -30], + string="receive", + style(color=45, fillColor=42)), + Text( + extent=[-144, 96; 144, 46], + string="%name", + style(color=0))), Documentation(info=" +

    +Converts a signal from the signal bus to an IntegerOutPort connector. Use this +element by connecting connector 'fromBus' with the signal bus. A pop-up +dialog appears which allows to specify the signal from the bus +which is set equal to the signal of the IntegerOutPort connector. +

    + + +")); + equation + fromBus = outPort.signal[1]; + end ReceiveInteger; + + package Internal + "Internal connector definitions only to be used from models of package BusAdaptors" + + + extends Modelica.Icons.Library; + + connector InputReal = input Real "'input Real' variable as connector" + annotation (Icon(Rectangle(extent=[-100, 100; 100, -100], style( + color=77, + fillColor=77, + fillPattern=1)), Text( + extent=[-132, -100; 132, -198], + string="%name", + style(color=77))), Diagram(Rectangle(extent=[-100, 100; 100, -100] + , style( + color=77, + fillColor=77, + fillPattern=1)), Text( + extent=[-132, -100; 132, -198], + string="%name", + style(color=77)))); + connector InputBoolean = input Boolean + "'input Boolean' variable as connector" annotation (Icon(Rectangle( + extent=[-100, 100; 100, -100], style( + color=77, + fillColor=77, + fillPattern=1)), Text( + extent=[-132, -100; 132, -198], + string="%name", + style(color=77))), Diagram(Rectangle(extent=[-100, 100; 100, -100] + , style( + color=77, + fillColor=77, + fillPattern=1)), Text( + extent=[-132, -100; 132, -198], + string="%name", + style(color=77)))); + connector InputInteger = input Integer + "'input Integer' variable as connector" annotation (Icon(Rectangle( + extent=[-100, 100; 100, -100], style( + color=77, + fillColor=77, + fillPattern=1)), Text( + extent=[-132, -100; 132, -198], + string="%name", + style(color=77))), Diagram(Rectangle(extent=[-100, 100; 100, -100] + , style( + color=77, + fillColor=77, + fillPattern=1)), Text( + extent=[-132, -100; 132, -198], + string="%name", + style(color=77)))); + connector OutputReal = output Real "'output Real' variable as connector" + annotation (Icon(Rectangle(extent=[-100, 100; 100, -100], style( + color=77, + fillColor=77, + fillPattern=1)), Text( + extent=[-132, -100; 132, -198], + string="%name", + style(color=77))), Diagram(Rectangle(extent=[-100, 100; 100, -100] + , style( + color=77, + fillColor=77, + fillPattern=1)), Text( + extent=[-132, -100; 132, -198], + string="%name", + style(color=77)))); + connector OutputBoolean = output Boolean + "'output Boolean' variable as connector" annotation (Icon(Rectangle( + extent=[-100, 100; 100, -100], style( + color=77, + fillColor=77, + fillPattern=1)), Text( + extent=[-132, -100; 132, -198], + string="%name", + style(color=77))), Diagram(Rectangle(extent=[-100, 100; 100, -100] + , style( + color=77, + fillColor=77, + fillPattern=1)), Text( + extent=[-132, -100; 132, -198], + string="%name", + style(color=77)))); + connector OutputInteger = output Integer + "'output Integer' variable as connector" annotation (Icon(Rectangle( + extent=[-100, 100; 100, -100], style( + color=77, + fillColor=77, + fillPattern=1)), Text( + extent=[-132, -100; 132, -198], + string="%name", + style(color=77))), Diagram(Rectangle(extent=[-100, 100; 100, -100] + , style( + color=77, + fillColor=77, + fillPattern=1)), Text( + extent=[-132, -100; 132, -198], + string="%name", + style(color=77)))); + end Internal; + end BusAdaptors; +end Interfaces; diff --git a/Blocks/Math.mo b/Blocks/Math.mo index 0a2d54bf6e..067e853961 100644 --- a/Blocks/Math.mo +++ b/Blocks/Math.mo @@ -1,21 +1,14 @@ +package Math "Mathematical functions as input/output blocks" - -package Math "Mathematical functions as input/output blocks" extends Modelica.Icons.Library; - package SIunits = Modelica.SIunits ; - package Interfaces = Modelica.Blocks.Interfaces ; - - annotation ( - Coordsys(extent=[0, 0; 200, 400], component=[20, 20]), - Window( - x=0.02, - y=0.02, - width=0.3, - height=0.7, - library=1, - autolayout=1), - Documentation(info=" - + + annotation (Window( + x=0.05, + y=0.09, + width=0.44, + height=0.71, + library=1, + autolayout=1),Documentation(info="

    This package contains basic mathematical operations, such as summation and multiplication, and basic mathematical @@ -26,36 +19,44 @@ In particular the following operations and functions are provided:

    -
    -   Gain          Output the input multiplied by a scalar gain           
    +
       TwoInputs     Change causality of input signals.
    +   TwoOutputs    Change causality of output signals.
    +   Gain          Output the input multiplied by a scalar gain
        MatrixGain    Output the product of a gain matrix with the input
    -   Sum           Output the sum of the elements of the input vector 
    -   Feedback      Output difference between commanded and feedback input        
    -   Add           Output the sum of the two inputs 
    -   Add3          Output the sum of the three inputs 
    -   Product       Output product of the two inputs 
    +   Sum           Output the sum of the elements of the input vector
    +   Feedback      Output difference between commanded and feedback input
    +   Add           Output the sum of the two inputs
    +   Add3          Output the sum of the three inputs
    +   Product       Output product of the two inputs
        Division      Output first input divided by second input
        Abs           Output the absolute value of the input
        Sign          Output the sign of the input
        Sqrt          Output the square root of the input
        Sin           Output the sine of the input
        Cos           Output the cosine of the input
    -   Tan           Output the tangent of the input        
    -   Asin          Output the arc sine of the input  
    -   Acos          Output the arc cosine of the input  
    -   Atan          Output the arc tangent of the input  
    -   Atan2         Output atan(u1/u2) of the inputs u1 and u2   
    -   Sinh          Output the hyperbolic sine of the input  
    -   Cosh          Output the hyperbolic cosine of the input  
    -   Tanh          Output the hyperbolic tangent of the input  
    -   Exp           Output the exponential (base e) of the input 
    -   Log           Output the natural (base e) logarithm of the input 
    -   Log10         Output the base 10 logarithm of the input    
    +   Tan           Output the tangent of the input
    +   Asin          Output the arc sine of the input
    +   Acos          Output the arc cosine of the input
    +   Atan          Output the arc tangent of the input
    +   Atan2         Output atan(u1/u2) of the inputs u1 and u2
    +   Sinh          Output the hyperbolic sine of the input
    +   Cosh          Output the hyperbolic cosine of the input
    +   Tanh          Output the hyperbolic tangent of the input
    +   Exp           Output the exponential (base e) of the input
    +   Log           Output the natural (base e) logarithm of the input
    +   Log10         Output the base 10 logarithm of the input
    +   RealToInteger Output the nearest Integer value to the input
    +   IntegerToReal Output the input as Real value
    +   Max           Output the maximum of the two inputs
    +   Min           Output the minimum of the two inputs
    +   Edge          Set output to true at rising edge of the input
    +   BooleanChange Set output to true when Boolean input changes
    +   IntegerChange Set output to true when Integer input changes
     
    Main Author: -
    Martin Otter
    +
    Martin Otter
    Deutsches Zentrum fuer Luft und Raumfahrt e.V. (DLR)
    Oberpfaffenhofen
    Postfach 1116
    @@ -66,8 +67,12 @@ provided:

    Release Notes:

      +
    • October 21, 2002 + by Martin Otter + and Christian Schweiger:
      + New blocks added: RealToInteger, IntegerToReal, Max, Min, Edge, BooleanChange, IntegerChange.
    • August 7, 1999 - by Martin Otter:
      + by Martin Otter:
      Realized (partly based on an existing Dymola library of Dieter Moormann and Hilding Elmqvist).
    • @@ -75,839 +80,772 @@ provided:
      -

      Copyright (C) 1999, Modelica Design Group and DLR.

      +

      Copyright © 1999-2002, Modelica Association and DLR.

      The Modelica package is free software; it can be redistributed and/or modified under the terms of the Modelica license, see the license conditions -and the accompanying disclaimer in the documentation of package +and the accompanying disclaimer in the documentation of package Modelica in file \"Modelica/package.mo\".

      ")); - - block Gain + + block TwoInputs "Change causality of input signals (e.g. for inverse models)" + + + extends Interfaces.BlockIcon; + parameter Integer n=1 "number of input signals"; + annotation (Documentation(info=" +

      This block is used to enable assignment of values to +variables preliminary defined as outputs (e.g. useful for +inverse model generation).

      + +

      Release Notes:

      +
        +
      • June 28, 2001 + by Michael Thümmel:
        + Realized.
      • +
      +")); + + Interfaces.InPort inPort1(n=n) annotation (extent=[-140, -20; -100, 20]); + Interfaces.InPort inPort2(n=n) annotation ( + extent=[100, -20; 140, 20], + rotation=180); + equation + inPort1.signal = inPort2.signal; + end TwoInputs; + + block TwoOutputs + "Change causality of output signals (e.g. for inverse models)" + extends Interfaces.BlockIcon; + parameter Integer n=1 "number of input signals"; + annotation (Documentation(info=" +

      This block is used to enable assignment of values to +variables preliminary defined as inputs (e.g. useful for +inverse model generation).

      + +

      Release Notes:

      +
        +
      • June 28, 2001 + by Michael Thümmel:
        + Realized.
      • +
      +")); + + Interfaces.OutPort OutPort1(n=n) annotation (extent=[100, -10; 120, 10]); + Interfaces.OutPort OutPort2(n=n) annotation (extent=[-120, -10; -100, 10], + rotation=180); + equation + OutPort1.signal = OutPort2.signal; + end TwoOutputs; + + block Gain "Output the element-wise product of a gain vector with the input signal vector" - - - parameter Real k[:]={1} + + + parameter Real k[:]={1} "Gain vector multiplied element-wise with input vector"; - protected + protected Real u[size(k, 1)] "Input signals"; Real y[size(k, 1)] "Output signals"; - public - Interfaces.InPort inPort(final n=size(k, 1)) "Input signal connector" + public + Interfaces.InPort inPort(final n=size(k, 1)) "Input signal connector" annotation (extent=[-140, -20; -100, 20]); - Interfaces.OutPort outPort(final n=size(k, 1)) "Output signal connector" + Interfaces.OutPort outPort(final n=size(k, 1)) "Output signal connector" annotation (extent=[100, -10; 120, 10]); annotation ( - Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), - Window( - x=0.19, - y=0.02, - width=0.59, - height=0.6), - Documentation(info=" - + Documentation(info="

      -This blocks computes output y=outPort.signal as -element-wise product of gain k with the +This block computes the output y=outPort.signal as +element-wise product of gain k with the input u = inPort.signal:

      -
      -    y[i] = k[i] * u[i];
      +
          y[i] = k[i] * u[i];
       

      Release Notes:

      -"), +"), Icon( - Polygon(points=[-100, -100; -100, 100; 100, 0; -100, -100], style( - color=3, fillColor=7)), - Text( - extent=[-150, -140; 150, -100], - string="k=%k", - style(color=9)), - Text(extent=[-150, 140; 150, 100], string="%name")), - Diagram(Polygon(points=[-100, -100; -100, 100; 100, 0; -100, -100], - style(color=3, fillColor=7)), Text(extent=[-76, 38; 0, -34], string - ="k"))); - equation + Polygon(points=[-100, -100; -100, 100; 100, 0; -100, -100], style(color + =3, fillColor=7)), + Text( + extent=[-150, -140; 150, -100], + string="k=%k", + style(color=0)), + Text(extent=[-150, 140; 150, 100], string="%name")), + Diagram(Polygon(points=[-100, -100; -100, 100; 100, 0; -100, -100], style + (color=3, fillColor=7)), Text(extent=[-76, 38; 0, -34], string="k") + )); + equation u = inPort.signal; y = outPort.signal; for i in 1:size(k, 1) loop y[i] = k[i]*u[i]; end for; end Gain; - - block MatrixGain - "Output the product of a gain matrix with the input signal vector" - parameter Real K[:, :]=[1, 0; 0, 1] + + block MatrixGain + "Output the product of a gain matrix with the input signal vector" + parameter Real K[:, :]=[1, 0; 0, 1] "Gain matrix which is multiplied with the input"; extends Interfaces.MIMO(final nin=size(K, 2), final nout=size(K, 1)); annotation ( - Documentation(info=" - + Documentation(info="

      -This blocks computes output y=outPort.signal as product of the +This block computes the output y=outPort.signal as product of the gain matrix K with the input signal vector u = inPort.signal:

      -
      -    y = K * u;
      +
          y = K * u;
       

      -Example: +Example:

      -
      -   parameter: K = [0.12 2; 3 1.5]
      +
         parameter: K = [0.12 2; 3 1.5]
       
          results in the following equations:
       
      -     | y[1] |     | 0.12  2.00 |   | u[1] | 
      -     |      |  =  |            | * |      | 
      +     | y[1] |     | 0.12  2.00 |   | u[1] |
      +     |      |  =  |            | * |      |
            | y[2] |     | 3.00  1.50 |   | u[2] |
       

      Release Notes:

      -"), +"), Icon(Text( - extent=[-90, -60; 90, 60], - string="*K", + extent=[-90, -60; 90, 60], + string="*K", style(color=9)), Text(extent=[-150, 150; 150, 110], string="%name")) - , - Diagram(Rectangle(extent=[-100, -100; 100, 100], style(color=3, - fillColor=7)), Text( - extent=[-90, -60; 90, 60], - string="*K", - style(color=9))), - Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), - Window( - x=0.35, - y=0.09, - width=0.6, - height=0.6)); - equation + , + Diagram(Rectangle(extent=[-100, -100; 100, 100], style(color=3, fillColor + =7)), Text( + extent=[-90, -60; 90, 60], + string="*K", + style(color=9)))); + equation y = K*u; end MatrixGain; - - block Sum "Output the sum of the elements of the input vector" + + block Sum "Output the sum of the elements of the input vector" extends Interfaces.MISO; + + parameter Real k[nin]=ones(nin) "Optional: sum coefficients"; + annotation ( - Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), - Window( - x=0.35, - y=0.08, - width=0.54, - height=0.66), - Documentation(info=" - -

      -This blocks computes output y=outPort.signal[1] as -sum of the elements of the input signal vector -u=inPort.signal: -

      + Documentation(info=" +

      This block computes the output y=outPort.signal[1] as +sum of the elements of the input signal vector +u=inPort.signal:

      -
      -    y = u[1] + u[2] + ...;
      +
          y = u[1] + u[2] + ... + u[nin];
       
      -

      -Example: -

      +

      Example: With parameter nin = 3 results the following equation:

      -
      -     parameter:   nin = 3;
      +
          y = u[1] + u[2] + u[3];
      +
      - results in the following equations: - - y = u[1] + u[2] + u[3]; +

      Optionally, the parameter Real k[nin]=ones(nin) could be +changed to weight the sum elements in order to calculate the scalar +product

      + +
          y = k*u = k[1]*u[1] + k[2]*u[2] + ... + k[nin]*u[nin]  .
       

      Release Notes:

        +
      • Oct. 25, 2002 + by Christian Schweiger:
        + Realized an improved implementation with avoidance of an + algorithm section, which would lead to expensive function calls.
      • Oct. 24, 1999 - by Martin Otter:
        - Realized. -
      • + by Martin Otter:
        + Realized.
      -"), - Icon(Line(points=[26, 42; -34, 42; 6, 2; -34, -38; 26, -38], style(color - =0, thickness=1)), Text(extent=[-150, 150; 150, 110], string= - "%name")), - Diagram(Rectangle(extent=[-100, -100; 100, 100], style(color=3, - fillColor=7)), Line(points=[26, 42; -34, 42; 6, 2; -34, -38; 26, - -38], style(color=0, thickness=1)))); - algorithm - y := u[1]; - for i in 2:nin loop - y := y + u[i]; - end for; +"), + Icon( + Line( + points=[26, 38; 26, 42; -34, 42; 6, 0; -34, -42; 26, -42; 26, -38], + style(color=0, thickness=1)), + Text(extent=[-150, 150; 150, 110], string="%name")), + Diagram( + Rectangle( + extent=[-100, -100; 100, 100], + style(color=3, fillColor=7)), + Line( + points=[26, 38; 26, 42; -34, 42; 6, 0; -34, -42; 26, -42; 26, -38], + style(color=0, thickness=1)))); + equation + y = k*u; end Sum; - - block Feedback "Output difference between commanded and feedback input" + + block Feedback "Output difference between commanded and feedback input" parameter Integer n=1 "size of input and feedback signal"; - Interfaces.InPort inPort1(final n=n) annotation (extent=[-100, -20; -60, - 20]); - Interfaces.InPort inPort2(final n=n) annotation (extent=[-20, -100; 20, - - 60], rotation=90); - Interfaces.OutPort outPort(final n=n) annotation (extent=[80, -10; 100, 10 + Interfaces.InPort inPort1(final n=n) annotation (extent=[-100, -20; -60, 20 ]); + Interfaces.InPort inPort2(final n=n) annotation (extent=[-20, -100; 20, -60 + ], rotation=90); + Interfaces.OutPort outPort(final n=n) annotation (extent=[80, -10; 100, 10] + ); annotation ( - Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), - Window( - x=0.35, - y=0.02, - width=0.52, - height=0.68), - Documentation(info=" - + Documentation(info="

      -This blocks computes output y=outPort.signal as difference of the -commanded input u1=inPort1.signal and the feedback +This block computes the output y=outPort.signal as difference of the +commanded input u1=inPort1.signal and the feedback input u2=inPort2.signal:

      -
      -    y = u1 - u2;
      +
          y = u1 - u2;
       

      -Example: +Example:

      -
      -     parameter:   n = 2
      +
           parameter:   n = 2
       
         results in the following equations:
      -     
      -     y[1] = u1[1] - u2[1] 
      +
      +     y[1] = u1[1] - u2[1]
            y[2] = u1[2] - u2[2]
       

      Release Notes:

      -"), +"), Icon( Ellipse(extent=[-20, 20; 20, -20], style( - pattern=1, - thickness=1, - fillColor=30, - fillPattern=1)), - Line(points=[-60, 0; -20, 0]), - Line(points=[20, 0; 80, 0]), - Line(points=[0, -20; 0, -60]), - Text( - extent=[-12, 10; 84, -84], - string="-", - style(color=0)), - Text(extent=[-100, 110; 100, 60], string="%name")), + pattern=1, + thickness=1, + fillColor=30, + fillPattern=1)), + Line(points=[-60, 0; -20, 0]), + Line(points=[20, 0; 80, 0]), + Line(points=[0, -20; 0, -60]), + Text( + extent=[-12, 10; 84, -84], + string="-", + style(color=0)), + Text(extent=[-100, 110; 100, 60], string="%name")), Diagram( Ellipse(extent=[-20, 20; 20, -20], style( - pattern=1, - thickness=1, - fillColor=30, - fillPattern=1)), - Line(points=[-60, 0; -20, 0]), - Line(points=[20, 0; 80, 0]), - Line(points=[0, -20; 0, -60]), - Text( - extent=[-12, 10; 84, -84], - string="-", + pattern=1, + thickness=1, + fillColor=30, + fillPattern=1)), + Line(points=[-60, 0; -20, 0]), + Line(points=[20, 0; 80, 0]), + Line(points=[0, -20; 0, -60]), + Text( + extent=[-12, 10; 84, -84], + string="-", style(color=0)))); - equation + equation outPort.signal = inPort1.signal - inPort2.signal; end Feedback; - - block Add "Output the sum of the two inputs" + + block Add "Output the sum of the two inputs" extends Interfaces.MI2MO; parameter Real k1=+1 "Gain of upper input"; parameter Real k2=+1 "Gain of lower input"; annotation ( - Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), - Window( - x=0.23, - y=0.22, - width=0.54, - height=0.66), - Documentation(info=" - + Documentation(info="

      -This blocks computes output y=outPort.signal as sum of the +This block computes the output y=outPort.signal as sum of the two input signals u1=inPort1.signal and u2=inPort2.signal:

      -
      -    y = k1*u1 + k2*u2;
      +
          y = k1*u1 + k2*u2;
       

      -Example: +Example:

      -
      -     parameter:   n = 2, k1= +2, k2= -3
      +
           parameter:   n = 2, k1= +2, k2= -3
       
         results in the following equations:
      -     
      -     y[1] = 2 * u1[1] - 3 * u2[1] 
      +
      +     y[1] = 2 * u1[1] - 3 * u2[1]
            y[2] = 2 * u1[2] - 3 * u2[2]
       

      Release Notes:

      -"), +"), Icon( Text( - extent=[-98, -52; 7, -92], - string="%k2", - style(color=0)), - Text( - extent=[-100, 90; 5, 50], - string="%k1", - style(color=0)), - Text(extent=[-150, 150; 150, 110], string="%name"), - Line(points=[-100, 60; -40, 60; -30, 40]), - Ellipse(extent=[-50, 50; 50, -50]), - Line(points=[-100, -60; -40, -60; -30, -40]), - Line(points=[-15, -25.99; 15, 25.99], style(color=0)), - Rectangle(extent=[-100, -100; 100, 100], style(color=3, fillColor=7)) - , - Line(points=[50, 0; 100, 0]), - Line(points=[-100, 60; -74, 24; -44, 24]), - Line(points=[-100, -60; -74, -28; -42, -28]), - Ellipse(extent=[-50, 50; 50, -50]), - Line(points=[50, 0; 100, 0]), - Text( - extent=[-38, 34; 38, -34], - string="+", - style(color=0)), - Text( - extent=[-100, 52; 5, 92], - string="%k1", - style(color=0)), - Text( - extent=[-100, -52; 5, -92], - string="%k2", - style(color=0))), + extent=[-98, -52; 7, -92], + string="%k2", + style(color=0)), + Text( + extent=[-100, 90; 5, 50], + string="%k1", + style(color=0)), + Text(extent=[-150, 150; 150, 110], string="%name"), + Line(points=[-100, 60; -40, 60; -30, 40]), + Ellipse(extent=[-50, 50; 50, -50]), + Line(points=[-100, -60; -40, -60; -30, -40]), + Line(points=[-15, -25.99; 15, 25.99], style(color=0)), + Rectangle(extent=[-100, -100; 100, 100], style(color=3, fillColor=7)), + Line(points=[50, 0; 100, 0]), + Line(points=[-100, 60; -74, 24; -44, 24]), + Line(points=[-100, -60; -74, -28; -42, -28]), + Ellipse(extent=[-50, 50; 50, -50]), + Line(points=[50, 0; 100, 0]), + Text( + extent=[-38, 34; 38, -34], + string="+", + style(color=0)), + Text( + extent=[-100, 52; 5, 92], + string="%k1", + style(color=0)), + Text( + extent=[-100, -52; 5, -92], + string="%k2", + style(color=0))), Diagram( - Rectangle(extent=[-100, -100; 100, 100], style(color=3, fillColor=7)) - , - Text( - extent=[-98, -52; 7, -92], - string="%k2", - style(color=0)), - Text( - extent=[-100, 90; 5, 50], - string="%k1", - style(color=0)), - Line(points=[-100, 60; -40, 60; -30, 40]), - Ellipse(extent=[-50, 50; 50, -50]), - Line(points=[-100, -60; -40, -60; -30, -40]), - Line(points=[-15, -25.99; 15, 25.99], style(color=0)), - Rectangle(extent=[-100, -100; 100, 100], style(color=3, fillColor=7)) - , - Line(points=[50, 0; 100, 0]), - Line(points=[-100, 60; -74, 24; -44, 24]), - Line(points=[-100, -60; -74, -28; -42, -28]), - Ellipse(extent=[-50, 50; 50, -50]), - Line(points=[50, 0; 100, 0]), - Text( - extent=[-38, 34; 38, -34], - string="+", - style(color=0)), - Text( - extent=[-100, 52; 5, 92], - string="k1", - style(color=0)), - Text( - extent=[-100, -52; 5, -92], - string="k2", + Rectangle(extent=[-100, -100; 100, 100], style(color=3, fillColor=7)), + Text( + extent=[-98, -52; 7, -92], + string="%k2", + style(color=0)), + Text( + extent=[-100, 90; 5, 50], + string="%k1", + style(color=0)), + Line(points=[-100, 60; -40, 60; -30, 40]), + Ellipse(extent=[-50, 50; 50, -50]), + Line(points=[-100, -60; -40, -60; -30, -40]), + Line(points=[-15, -25.99; 15, 25.99], style(color=0)), + Rectangle(extent=[-100, -100; 100, 100], style(color=3, fillColor=7)), + Line(points=[50, 0; 100, 0]), + Line(points=[-100, 60; -74, 24; -44, 24]), + Line(points=[-100, -60; -74, -28; -42, -28]), + Ellipse(extent=[-50, 50; 50, -50]), + Line(points=[50, 0; 100, 0]), + Text( + extent=[-38, 34; 38, -34], + string="+", + style(color=0)), + Text( + extent=[-100, 52; 5, 92], + string="k1", + style(color=0)), + Text( + extent=[-100, -52; 5, -92], + string="k2", style(color=0)))); - equation + equation y = k1*u1 + k2*u2; end Add; - - block Add3 "Output the sum of the three inputs" + + block Add3 "Output the sum of the three inputs" extends Interfaces.BlockIcon; - + parameter Real k1=+1 "Gain of upper input"; parameter Real k2=+1 "Gain of middle input"; parameter Real k3=+1 "Gain of lower input"; parameter Integer n=1 "Dimension of input and output vectors."; - Interfaces.InPort inPort1(final n=n) "Connector 1 of Real input signals" + Interfaces.InPort inPort1(final n=n) "Connector 1 of Real input signals" annotation (extent=[-140, 60; -100, 100]); - Interfaces.InPort inPort2(final n=n) "Connector 2 of Real input signals" + Interfaces.InPort inPort2(final n=n) "Connector 2 of Real input signals" annotation (extent=[-140, -20; -100, 20]); - Interfaces.InPort inPort3(final n=n) "Connector 3 of Real input signals" + Interfaces.InPort inPort3(final n=n) "Connector 3 of Real input signals" annotation (extent=[-140, -100; -100, -60]); - Interfaces.OutPort outPort(final n=n) "Connector of Real output signals" + Interfaces.OutPort outPort(final n=n) "Connector of Real output signals" annotation (extent=[100, -10; 120, 10]); annotation ( - Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), - Window( - x=0.37, - y=0.09, - width=0.54, - height=0.66), - Documentation(info=" - + Documentation(info="

      -This blocks computes output y=outPort.signal as sum of the +This block computes the output y=outPort.signal as sum of the three input signals u1=inPort1.signal, u2=inPort2.signal and u3=inPort3.signal:

      -
      -    y = k1*u1 + k2*u2 + k3*u3;
      +
          y = k1*u1 + k2*u2 + k3*u3;
       

      -Example: +Example:

      -
      -     parameter:   n = 2, k1= +2, k2= -3, k3=1;
      +
           parameter:   n = 2, k1= +2, k2= -3, k3=1;
       
         results in the following equations:
      -     
      -     y[1] = 2 * u1[1] - 3 * u2[1] + u3[1]; 
      +
      +     y[1] = 2 * u1[1] - 3 * u2[1] + u3[1];
            y[2] = 2 * u1[2] - 3 * u2[2] + u3[2];
       

      Release Notes:

      -"), +"), Icon( Text( - extent=[-100, 50; 5, 90], - string="%k1", - style(color=0)), + extent=[-100, 50; 5, 90], + string="%k1", + style(color=0)), Text( - extent=[-100, -20; 5, 20], - string="%k2", - style(color=0)), + extent=[-100, -20; 5, 20], + string="%k2", + style(color=0)), Text( - extent=[-100, -50; 5, -90], - string="%k3", - style(color=0)), + extent=[-100, -50; 5, -90], + string="%k3", + style(color=0)), Text( - extent=[2, 36; 100, -44], - string="+", - style(color=0))), + extent=[2, 36; 100, -44], + string="+", + style(color=0))), Diagram( - Rectangle(extent=[-100, -100; 100, 100], style(color=3, fillColor=7)) - , + Rectangle(extent=[-100, -100; 100, 100], style(color=3, fillColor=7)), Text( - extent=[-100, 50; 5, 90], - string="%k1", - style(color=0)), + extent=[-100, 50; 5, 90], + string="%k1", + style(color=0)), Text( - extent=[-100, -20; 5, 20], - string="%k2", - style(color=0)), + extent=[-100, -20; 5, 20], + string="%k2", + style(color=0)), Text( - extent=[-100, -50; 5, -90], - string="%k3", - style(color=0)), + extent=[-100, -50; 5, -90], + string="%k3", + style(color=0)), Text( - extent=[2, 36; 100, -44], - string="+", - style(color=0)), - Rectangle(extent=[-100, -100; 100, 100], style(color=3, fillColor=7)) - , + extent=[2, 36; 100, -44], + string="+", + style(color=0)), + Rectangle(extent=[-100, -100; 100, 100], style(color=3, fillColor=7)), Text( - extent=[-100, 50; 5, 90], - string="k1", - style(color=0)), + extent=[-100, 50; 5, 90], + string="k1", + style(color=0)), Text( - extent=[-100, -20; 5, 20], - string="k2", - style(color=0)), + extent=[-100, -20; 5, 20], + string="k2", + style(color=0)), Text( - extent=[-100, -50; 5, -90], - string="k3", - style(color=0)), + extent=[-100, -50; 5, -90], + string="k3", + style(color=0)), Text( - extent=[2, 36; 100, -44], - string="+", + extent=[2, 36; 100, -44], + string="+", style(color=0)))); - equation - outPort.signal = k1*inPort1.signal + k2*inPort2.signal + k3*inPort3. - signal; + equation + outPort.signal = k1*inPort1.signal + k2*inPort2.signal + k3*inPort3.signal; end Add3; - - block Product "Output product of the two inputs" + + block Product "Output product of the two inputs" extends Interfaces.MI2MO; annotation ( - Documentation(info=" - + Documentation(info="

      -This blocks computes the output y=outPort.signal element-wise +This block computes the output y=outPort.signal element-wise as product of the corresponding elements of the two inputs u1=inPort1.signal and u2=inPort2.signal:

      -
      -    y[i] = u1[i] * u2[i];
      +
          y[i] = u1[i] * u2[i];
       

      Release Notes:

      -"), +"), Icon( - Line(points=[-100, 60; -40, 60; -30, 40]), - Line(points=[-100, -60; -40, -60; -30, -40]), - Line(points=[50, 0; 100, 0]), - Line(points=[-30, 0; 30, 0], style(color=0)), - Line(points=[-15, 25.99; 15, -25.99], style(color=0)), - Line(points=[-15, -25.99; 15, 25.99], style(color=0)), - Ellipse(extent=[-50, 50; 50, -50])), + Line(points=[-100, 60; -40, 60; -30, 40]), + Line(points=[-100, -60; -40, -60; -30, -40]), + Line(points=[50, 0; 100, 0]), + Line(points=[-30, 0; 30, 0], style(color=0)), + Line(points=[-15, 25.99; 15, -25.99], style(color=0)), + Line(points=[-15, -25.99; 15, 25.99], style(color=0)), + Ellipse(extent=[-50, 50; 50, -50])), Diagram( - Rectangle(extent=[-100, -100; 100, 100], style(color=3, fillColor=7)) - , - Line(points=[-100, 60; -40, 60; -30, 40]), - Line(points=[-100, -60; -40, -60; -30, -40]), - Line(points=[50, 0; 100, 0]), - Line(points=[-30, 0; 30, 0], style(color=0)), - Line(points=[-15, 25.99; 15, -25.99], style(color=0)), - Line(points=[-15, -25.99; 15, 25.99], style(color=0)), - Ellipse(extent=[-50, 50; 50, -50])), - Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), - Window( - x=0.2, - y=0.01, - width=0.47, - height=0.62)); - equation + Rectangle(extent=[-100, -100; 100, 100], style(color=3, fillColor=7)), + Line(points=[-100, 60; -40, 60; -30, 40]), + Line(points=[-100, -60; -40, -60; -30, -40]), + Line(points=[50, 0; 100, 0]), + Line(points=[-30, 0; 30, 0], style(color=0)), + Line(points=[-15, 25.99; 15, -25.99], style(color=0)), + Line(points=[-15, -25.99; 15, 25.99], style(color=0)), + Ellipse(extent=[-50, 50; 50, -50]))); + equation for i in 1:n loop y[i] = u1[i]*u2[i]; end for; end Product; - - block Division "Output first input divided by second input" + + block Division "Output first input divided by second input" extends Interfaces.MI2MO; annotation ( - Documentation(info=" - + Documentation(info="

      This block computes the output y=outPort.signal element-wise by dividing the corresponding elements of the two inputs u1=inPort1.signal and u2=inPort2.signal:

      -
      -    y[i] = u1[i] / u2[i];
      +
          y[i] = u1[i] / u2[i];
       

      Release Notes:

      -"), +"), Icon( - Line(points=[50, 0; 100, 0]), - Line(points=[-30, 0; 30, 0], style(color=0)), - Ellipse(extent=[-5, 20; 5, 30], style(color=0, fillColor=0)), - Ellipse(extent=[-5, -20; 5, -30], style(color=0, fillColor=0)), - Ellipse(extent=[-50, 50; 50, -50]), - Text(extent=[-150, 150; 150, 110], string="%name"), - Line(points=[-100, 60; -66, 60; -40, 30]), - Line(points=[-100, -60; 0, -60; 0, -50])), + Line(points=[50, 0; 100, 0]), + Line(points=[-30, 0; 30, 0], style(color=0)), + Ellipse(extent=[-5, 20; 5, 30], style(color=0, fillColor=0)), + Ellipse(extent=[-5, -20; 5, -30], style(color=0, fillColor=0)), + Ellipse(extent=[-50, 50; 50, -50]), + Text(extent=[-150, 150; 150, 110], string="%name"), + Line(points=[-100, 60; -66, 60; -40, 30]), + Line(points=[-100, -60; 0, -60; 0, -50])), Diagram( - Rectangle(extent=[-100, -100; 100, 100], style(color=3, fillColor=7)) - , - Line(points=[50, 0; 100, 0]), - Line(points=[-30, 0; 30, 0], style(color=0)), - Ellipse(extent=[-5, 20; 5, 30], style(color=0, fillColor=0)), - Ellipse(extent=[-5, -20; 5, -30], style(color=0, fillColor=0)), - Ellipse(extent=[-50, 50; 50, -50]), - Line(points=[-100, 60; -66, 60; -40, 30]), - Line(points=[-100, -60; 0, -60; 0, -50])), - Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), - Window( - x=0.22, - y=0.09, - width=0.6, - height=0.6)); - equation + Rectangle(extent=[-100, -100; 100, 100], style(color=3, fillColor=7)), + Line(points=[50, 0; 100, 0]), + Line(points=[-30, 0; 30, 0], style(color=0)), + Ellipse(extent=[-5, 20; 5, 30], style(color=0, fillColor=0)), + Ellipse(extent=[-5, -20; 5, -30], style(color=0, fillColor=0)), + Ellipse(extent=[-50, 50; 50, -50]), + Line(points=[-100, 60; -66, 60; -40, 30]), + Line(points=[-100, -60; 0, -60; 0, -50]))); + equation for i in 1:n loop y[i] = u1[i]/u2[i]; end for; end Division; - - block Abs "Output the absolute value of the input" + + block Abs "Output the absolute value of the input" extends Interfaces.MIMOs; annotation ( Icon( - Polygon(points=[92, 0; 70, 8; 70, -8; 92, 0], style(color=8, fillColor - =8)), - Line(points=[-80, 80; 0, 0; 80, 80], style(color=0)), - Line(points=[0, -14; 0, 68], style(color=8)), - Polygon(points=[0, 90; -8, 68; 8, 68; 0, 90], style(color=8, fillColor - =8)), - Text( - extent=[-34, -28; 38, -76], - string="abs", - style(color=8)), - Line(points=[-88, 0; 76, 0], style(color=8))), + Polygon(points=[92, 0; 70, 8; 70, -8; 92, 0], style(color=8, fillColor= + 8)), + Line(points=[-80, 80; 0, 0; 80, 80], style(color=0)), + Line(points=[0, -14; 0, 68], style(color=8)), + Polygon(points=[0, 90; -8, 68; 8, 68; 0, 90], style(color=8, fillColor= + 8)), + Text( + extent=[-34, -28; 38, -76], + string="abs", + style(color=8)), + Line(points=[-88, 0; 76, 0], style(color=8))), Diagram( - Line(points=[-100, 0; 76, 0], style(color=8)), - Polygon(points=[92, 0; 76, 6; 76, -6; 92, 0], style(color=8, fillColor - =8)), - Line(points=[-80, 80; 0, 0; 80, 80], style(color=0)), - Line(points=[0, -80; 0, 68], style(color=8)), - Polygon(points=[0, 90; -8, 68; 8, 68; 0, 90], style(color=8, fillColor - =8)), - Line(points=[0, -80; 0, 68], style(color=8)), - Polygon(points=[0, 90; -8, 68; 8, 68; 0, 90], style(color=8, fillColor - =8)), - Text( - extent=[7, 98; 34, 78], - string="outPort", - style(color=9)), - Text( - extent=[74, -8; 96, -28], - string="inPort", - style(color=9)), - Text(extent=[52, -3; 72, -23], string="1"), - Text(extent=[-86, -1; -66, -21], string="-1"), - Text(extent=[-28, 79; -8, 59], string="1")), - Documentation(info=" - + Line(points=[-100, 0; 76, 0], style(color=8)), + Polygon(points=[92, 0; 76, 6; 76, -6; 92, 0], style(color=8, fillColor= + 8)), + Line(points=[-80, 80; 0, 0; 80, 80], style(color=0)), + Line(points=[0, -80; 0, 68], style(color=8)), + Polygon(points=[0, 90; -8, 68; 8, 68; 0, 90], style(color=8, fillColor= + 8)), + Line(points=[0, -80; 0, 68], style(color=8)), + Polygon(points=[0, 90; -8, 68; 8, 68; 0, 90], style(color=8, fillColor= + 8)), + Text( + extent=[7, 98; 34, 78], + string="outPort", + style(color=9)), + Text( + extent=[74, -8; 96, -28], + string="inPort", + style(color=9)), + Text(extent=[52, -3; 72, -23], string="1"), + Text(extent=[-86, -1; -66, -21], string="-1"), + Text(extent=[-28, 79; -8, 59], string="1")), + Documentation(info="

      -This blocks computes the output y=outPort.signal element-wise +This block computes the output y=outPort.signal element-wise as absolute value of the input u=inPort.signal:

      -
      -    y[i] = abs( u[i] );
      +
          y[i] = abs( u[i] );
       

      Release Notes:

      -"), - Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), - Window( - x=0.37, - y=0.06, - width=0.6, - height=0.6)); - equation +")); + equation y = abs(u); end Abs; - - block Sign "Output the sign of the input" + + block Sign "Output the sign of the input" extends Interfaces.MIMOs; annotation ( Icon( - Line(points=[-90, 0; 68, 0], style(color=8)), - Polygon(points=[90, 0; 68, 8; 68, -8; 90, 0], style(color=8, fillColor - =8)), - Line(points=[-80, -80; 0, -80], style(color=0)), - Polygon(points=[0, 90; -8, 68; 8, 68; 0, 90], style(color=8, fillColor - =8)), - Line(points=[0, -80; 0, 68], style(color=8)), - Text( - extent=[-90, 72; -18, 24], - string="sign", - style(color=8)), - Line(points=[0, 80; 80, 80], style(color=0)), + Line(points=[-90, 0; 68, 0], style(color=8)), + Polygon(points=[90, 0; 68, 8; 68, -8; 90, 0], style(color=8, fillColor= + 8)), + Line(points=[-80, -80; 0, -80], style(color=0)), + Polygon(points=[0, 90; -8, 68; 8, 68; 0, 90], style(color=8, fillColor= + 8)), + Line(points=[0, -80; 0, 68], style(color=8)), + Text( + extent=[-90, 72; -18, 24], + string="sign", + style(color=8)), + Line(points=[0, 80; 80, 80], style(color=0)), Rectangle(extent=[-2, 2; 2, -4], style( - color=0, - fillColor=0, - fillPattern=1))), + color=0, + fillColor=0, + fillPattern=1))), Diagram( - Line(points=[-90, 0; 68, 0], style(color=8)), - Polygon(points=[90, 0; 68, 8; 68, -8; 90, 0], style(color=8, fillColor - =8)), - Line(points=[-80, -80; 0, -80], style(color=0)), - Line(points=[-0.01, 0; 0.01, 0], style(color=0)), - Line(points=[0, 80; 80, 80], style(color=0)), + Line(points=[-90, 0; 68, 0], style(color=8)), + Polygon(points=[90, 0; 68, 8; 68, -8; 90, 0], style(color=8, fillColor= + 8)), + Line(points=[-80, -80; 0, -80], style(color=0)), + Line(points=[-0.01, 0; 0.01, 0], style(color=0)), + Line(points=[0, 80; 80, 80], style(color=0)), Rectangle(extent=[-2, 2; 2, -4], style( - color=0, - fillColor=0, - fillPattern=1)), - Polygon(points=[0, 100; -6, 84; 6, 84; 0, 100], style(color=8, - fillColor=8)), - Line(points=[0, -90; 0, 84], style(color=8)), - Text( - extent=[7, 102; 32, 82], - string="outPort", - style(color=9)), - Text( - extent=[70, -6; 94, -26], - string="inPort", - style(color=9)), - Text(extent=[-25, 86; -5, 70], string="1"), - Text(extent=[5, -72; 25, -88], string="-1")), - Documentation(info=" - + color=0, + fillColor=0, + fillPattern=1)), + Polygon(points=[0, 100; -6, 84; 6, 84; 0, 100], style(color=8, + fillColor=8)), + Line(points=[0, -90; 0, 84], style(color=8)), + Text( + extent=[7, 102; 32, 82], + string="outPort", + style(color=9)), + Text( + extent=[70, -6; 94, -26], + string="inPort", + style(color=9)), + Text(extent=[-25, 86; -5, 70], string="1"), + Text(extent=[5, -72; 25, -88], string="-1")), + Documentation(info="

      -This blocks computes the output y=outPort.signal element-wise +This block computes the output y=outPort.signal element-wise as sign of the input u=inPort.signal:

      -
      -            1  if u[i] > 0
      +
                  1  if u[i] > 0
           y[i] =  0  if u[i] == 0
      -           -1  if u[i] < 0 
      +           -1  if u[i] < 0
       

      Release Notes:

      -"), - Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), - Window( - x=0.38, - y=0.11, - width=0.6, - height=0.6)); - equation +")); + equation y = sign(u); end Sign; - - block Sqrt "Output the square root of the input (input >= 0 required)" + + block Sqrt "Output the square root of the input (input >= 0 required)" extends Interfaces.MIMOs; annotation ( Icon( - Line(points=[-90, -80; 68, -80], style(color=8)), - Polygon(points=[90, -80; 68, -72; 68, -88; 90, -80], style(color=8, - fillColor=8)), - Line(points=[-80, -80; -79.2, -68.7; -78.4, -64; -76.8, -57.3; -73.6, - -47.9; -67.9, -36.1; -59.1, -22.2; -46.2, -6.49; -28.5, 10.7; - - 4.42, 30; 27.7, 51.3; 69.5, 74.7; 80, 80], style(color=0)), - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-80, -88; -80, 68], style(color=8)), - Text( - extent=[-8, -4; 64, -52], - string="sqrt", - style(color=8))), + Line(points=[-90, -80; 68, -80], style(color=8)), + Polygon(points=[90, -80; 68, -72; 68, -88; 90, -80], style(color=8, + fillColor=8)), + Line(points=[-80, -80; -79.2, -68.7; -78.4, -64; -76.8, -57.3; -73.6, - + 47.9; -67.9, -36.1; -59.1, -22.2; -46.2, -6.49; -28.5, 10.7; - + 4.42, 30; 27.7, 51.3; 69.5, 74.7; 80, 80], style(color=0)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-80, -88; -80, 68], style(color=8)), + Text( + extent=[-8, -4; 64, -52], + string="sqrt", + style(color=8))), Diagram( - Line(points=[-92, -80; 84, -80], style(color=8)), - Polygon(points=[100, -80; 84, -74; 84, -86; 100, -80], style(color=8, - fillColor=8)), - Line(points=[-80, -80; -79.2, -68.7; -78.4, -64; -76.8, -57.3; -73.6, - -47.9; -67.9, -36.1; -59.1, -22.2; -46.2, -6.49; -28.5, 10.7; - - 4.42, 30; 27.7, 51.3; 69.5, 74.7; 80, 80], style(color=0)), - Polygon(points=[-80, 98; -86, 82; -74, 82; -80, 98], style(color=8, - fillColor=8)), - Line(points=[-80, -90; -80, 84], style(color=8)), - Text( - extent=[-71, 98; -44, 78], - string="outPort", - style(color=9)), - Text( - extent=[60, -52; 84, -72], - string="inPort", - style(color=9))), - Documentation(info=" - + Line(points=[-92, -80; 84, -80], style(color=8)), + Polygon(points=[100, -80; 84, -74; 84, -86; 100, -80], style(color=8, + fillColor=8)), + Line(points=[-80, -80; -79.2, -68.7; -78.4, -64; -76.8, -57.3; -73.6, - + 47.9; -67.9, -36.1; -59.1, -22.2; -46.2, -6.49; -28.5, 10.7; - + 4.42, 30; 27.7, 51.3; 69.5, 74.7; 80, 80], style(color=0)), + Polygon(points=[-80, 98; -86, 82; -74, 82; -80, 98], style(color=8, + fillColor=8)), + Line(points=[-80, -90; -80, 84], style(color=8)), + Text( + extent=[-71, 98; -44, 78], + string="outPort", + style(color=9)), + Text( + extent=[60, -52; 84, -72], + string="inPort", + style(color=9))), + Documentation(info="

      -This blocks computes the output y=outPort.signal element-wise +This block computes the output y=outPort.signal element-wise as square root of the input u=inPort.signal:

      -
      -    y[i] = sqrt( u[i] );
      +
          y[i] = sqrt( u[i] );
       

      @@ -918,951 +856,819 @@ Otherwise an error occurs.

      Release Notes:

      -"), - Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), - Window( - x=0.38, - y=0.15, - width=0.6, - height=0.6)); - equation +")); + equation y = sqrt(u); end Sqrt; - - block Sin "Output the sine of the input" + + block Sin "Output the sine of the input" extends Interfaces.MIMOs; annotation ( Icon( - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-80, -80; -80, 68], style(color=8)), - Line(points=[-90, 0; 68, 0], style(color=8)), - Line(points=[-80, 0; -68.7, 34.2; -61.5, 53.1; -55.1, 66.4; -49.4, - 74.6; -43.8, 79.1; -38.2, 79.8; -32.6, 76.6; -26.9, 69.7; -21.3, - 59.4; -14.9, 44.1; -6.83, 21.2; 10.1, -30.8; 17.3, -50.2; 23.7, - - 64.2; 29.3, -73.1; 35, -78.4; 40.6, -80; 46.2, -77.6; 51.9, -71.5 - ; 57.5, -61.9; 63.9, -47.2; 72, -24.8; 80, 0], style(color=0)), - Polygon(points=[90, 0; 68, 8; 68, -8; 90, 0], style(color=8, fillColor - =8)), - Text( - extent=[12, 84; 84, 36], - string="sin", - style(color=8))), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-80, -80; -80, 68], style(color=8)), + Line(points=[-90, 0; 68, 0], style(color=8)), + Line(points=[-80, 0; -68.7, 34.2; -61.5, 53.1; -55.1, 66.4; -49.4, 74.6 + ; -43.8, 79.1; -38.2, 79.8; -32.6, 76.6; -26.9, 69.7; -21.3, 59.4 + ; -14.9, 44.1; -6.83, 21.2; 10.1, -30.8; 17.3, -50.2; 23.7, -64.2 + ; 29.3, -73.1; 35, -78.4; 40.6, -80; 46.2, -77.6; 51.9, -71.5; + 57.5, -61.9; 63.9, -47.2; 72, -24.8; 80, 0], style(color=0)), + Polygon(points=[90, 0; 68, 8; 68, -8; 90, 0], style(color=8, fillColor= + 8)), + Text( + extent=[12, 84; 84, 36], + string="sin", + style(color=8))), Diagram( - Line(points=[-80, 80; -88, 80], style(color=8)), - Line(points=[-80, -80; -88, -80], style(color=8)), - Line(points=[-80, -90; -80, 84], style(color=8)), - Text( - extent=[-75, 98; -46, 78], - string="outPort", - style(color=9)), - Polygon(points=[-80, 96; -86, 80; -74, 80; -80, 96], style(color=8, - fillColor=8)), - Line(points=[-100, 0; 84, 0], style(color=8)), - Polygon(points=[100, 0; 84, 6; 84, -6; 100, 0], style(color=8, - fillColor=8)), - Line(points=[-80, 0; -68.7, 34.2; -61.5, 53.1; -55.1, 66.4; -49.4, - 74.6; -43.8, 79.1; -38.2, 79.8; -32.6, 76.6; -26.9, 69.7; -21.3, - 59.4; -14.9, 44.1; -6.83, 21.2; 10.1, -30.8; 17.3, -50.2; 23.7, - - 64.2; 29.3, -73.1; 35, -78.4; 40.6, -80; 46.2, -77.6; 51.9, -71.5 - ; 57.5, -61.9; 63.9, -47.2; 72, -24.8; 80, 0], style(color=0)), - Text(extent=[-105, 72; -85, 88], string="1"), - Text(extent=[70, 25; 90, 5], string="2*pi"), - Text(extent=[-105, -72; -85, -88], string="-1"), - Text( - extent=[76, -10; 98, -30], - string="inPort", - style(color=9))), - Documentation(info=" - + Line(points=[-80, 80; -88, 80], style(color=8)), + Line(points=[-80, -80; -88, -80], style(color=8)), + Line(points=[-80, -90; -80, 84], style(color=8)), + Text( + extent=[-75, 98; -46, 78], + string="outPort", + style(color=9)), + Polygon(points=[-80, 96; -86, 80; -74, 80; -80, 96], style(color=8, + fillColor=8)), + Line(points=[-100, 0; 84, 0], style(color=8)), + Polygon(points=[100, 0; 84, 6; 84, -6; 100, 0], style(color=8, + fillColor=8)), + Line(points=[-80, 0; -68.7, 34.2; -61.5, 53.1; -55.1, 66.4; -49.4, 74.6 + ; -43.8, 79.1; -38.2, 79.8; -32.6, 76.6; -26.9, 69.7; -21.3, 59.4 + ; -14.9, 44.1; -6.83, 21.2; 10.1, -30.8; 17.3, -50.2; 23.7, -64.2 + ; 29.3, -73.1; 35, -78.4; 40.6, -80; 46.2, -77.6; 51.9, -71.5; + 57.5, -61.9; 63.9, -47.2; 72, -24.8; 80, 0], style(color=0)), + Text(extent=[-105, 72; -85, 88], string="1"), + Text(extent=[70, 25; 90, 5], string="2*pi"), + Text(extent=[-105, -72; -85, -88], string="-1"), + Text( + extent=[76, -10; 98, -30], + string="inPort", + style(color=9))), + Documentation(info="

      -This blocks computes the output y=outPort.signal element-wise +This block computes the output y=outPort.signal element-wise as sine of the input u=inPort.signal:

      -
      -    y[i] = sin( u[i] );
      +
          y[i] = sin( u[i] );
       

      Release Notes:

      -"), - Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), - Window( - x=0.38, - y=0.23, - width=0.6, - height=0.6)); - equation +")); + equation y = Modelica.Math.sin(u); end Sin; - - block Cos "Output the cosine of the input" + + block Cos "Output the cosine of the input" extends Interfaces.MIMOs; annotation ( Icon( - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-80, -80; -80, 68], style(color=8)), - Line(points=[-90, 0; 68, 0], style(color=8)), - Polygon(points=[90, 0; 68, 8; 68, -8; 90, 0], style(color=8, fillColor - =8)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-80, -80; -80, 68], style(color=8)), + Line(points=[-90, 0; 68, 0], style(color=8)), + Polygon(points=[90, 0; 68, 8; 68, -8; 90, 0], style(color=8, fillColor= + 8)), Line(points=[-80, 80; -74.4, 78.1; -68.7, 72.3; -63.1, 63; -56.7, 48.7 ; -48.6, 26.6; -29.3, -32.5; -22.1, -51.7; -15.7, -65.3; -10.1, - - 73.8; -4.42, -78.8; 1.21, -79.9; 6.83, -77.1; 12.5, -70.6; 18.1, + 73.8; -4.42, -78.8; 1.21, -79.9; 6.83, -77.1; 12.5, -70.6; 18.1, -60.6; 24.5, -45.7; 32.6, -23; 50.3, 31.3; 57.5, 50.7; 63.9, 64.6 - ; 69.5, 73.4; 75.2, 78.6; 80, 80], style(color=0)), + ; 69.5, 73.4; 75.2, 78.6; 80, 80], style(color=0)), Text( - extent=[-36, 82; 36, 34], - string="cos", - style(color=8))), + extent=[-36, 82; 36, 34], + string="cos", + style(color=8))), Diagram( - Line(points=[-80, 80; -88, 80], style(color=8)), - Line(points=[-80, -80; -88, -80], style(color=8)), - Line(points=[-80, -90; -80, 84], style(color=8)), - Text( - extent=[-75, 102; -48, 82], - string="outPort", - style(color=9)), - Polygon(points=[-80, 100; -86, 84; -74, 84; -80, 100], style(color=8, - fillColor=8)), - Text(extent=[-103, 72; -83, 88], string="1"), - Text(extent=[-79, -72; -59, -88], string="-1"), - Text(extent=[70, 25; 90, 5], string="2*pi"), - Line(points=[-100, 0; 84, 0], style(color=8)), - Polygon(points=[100, 0; 84, 6; 84, -6; 100, 0], style(color=8, - fillColor=8)), + Line(points=[-80, 80; -88, 80], style(color=8)), + Line(points=[-80, -80; -88, -80], style(color=8)), + Line(points=[-80, -90; -80, 84], style(color=8)), + Text( + extent=[-75, 102; -48, 82], + string="outPort", + style(color=9)), + Polygon(points=[-80, 100; -86, 84; -74, 84; -80, 100], style(color=8, + fillColor=8)), + Text(extent=[-103, 72; -83, 88], string="1"), + Text(extent=[-79, -72; -59, -88], string="-1"), + Text(extent=[70, 25; 90, 5], string="2*pi"), + Line(points=[-100, 0; 84, 0], style(color=8)), + Polygon(points=[100, 0; 84, 6; 84, -6; 100, 0], style(color=8, + fillColor=8)), Line(points=[-80, 80; -74.4, 78.1; -68.7, 72.3; -63.1, 63; -56.7, 48.7 ; -48.6, 26.6; -29.3, -32.5; -22.1, -51.7; -15.7, -65.3; -10.1, - - 73.8; -4.42, -78.8; 1.21, -79.9; 6.83, -77.1; 12.5, -70.6; 18.1, + 73.8; -4.42, -78.8; 1.21, -79.9; 6.83, -77.1; 12.5, -70.6; 18.1, -60.6; 24.5, -45.7; 32.6, -23; 50.3, 31.3; 57.5, 50.7; 63.9, 64.6 - ; 69.5, 73.4; 75.2, 78.6; 80, 80], style(color=0)), + ; 69.5, 73.4; 75.2, 78.6; 80, 80], style(color=0)), Text( - extent=[74, -4; 98, -24], - string="inPort", - style(color=9))), - Documentation(info=" - + extent=[74, -4; 98, -24], + string="inPort", + style(color=9))), + Documentation(info="

      -This blocks computes the output y=outPort.signal element-wise +This block computes the output y=outPort.signal element-wise as cos of the input u=inPort.signal:

      -
      -    y[i] = cos( u[i] );
      +
          y[i] = cos( u[i] );
       

      Release Notes:

      -"), - Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), - Window( - x=0.38, - y=0.18, - width=0.6, - height=0.6)); - equation +")); + equation y = Modelica.Math.cos(u); end Cos; - - block Tan "Output the tangent of the input" + + block Tan "Output the tangent of the input" extends Interfaces.MIMOs; annotation ( Icon( - Polygon(points=[0, 90; -8, 68; 8, 68; 0, 90], style(color=8, fillColor - =8)), - Line(points=[0, -80; 0, 68], style(color=8)), - Line(points=[-80, -80; -78.4, -68.4; -76.8, -59.7; -74.4, -50; -71.2, - -40.9; -67.1, -33; -60.7, -24.8; -51.1, -17.2; -35.8, -9.98; - - 4.42, -1.07; 33.4, 9.12; 49.4, 16.2; 59.1, 23.2; 65.5, 30.6; 70.4 - , 39.1; 73.6, 47.4; 76, 56.1; 77.6, 63.8; 80, 80], style(color=0) - ), - Line(points=[-90, 0; 68, 0], style(color=8)), - Polygon(points=[90, 0; 68, 8; 68, -8; 90, 0], style(color=8, fillColor - =8)), - Text( - extent=[-90, 72; -18, 24], - string="tan", - style(color=8))), + Polygon(points=[0, 90; -8, 68; 8, 68; 0, 90], style(color=8, fillColor= + 8)), + Line(points=[0, -80; 0, 68], style(color=8)), + Line(points=[-80, -80; -78.4, -68.4; -76.8, -59.7; -74.4, -50; -71.2, - + 40.9; -67.1, -33; -60.7, -24.8; -51.1, -17.2; -35.8, -9.98; -4.42 + , -1.07; 33.4, 9.12; 49.4, 16.2; 59.1, 23.2; 65.5, 30.6; 70.4, + 39.1; 73.6, 47.4; 76, 56.1; 77.6, 63.8; 80, 80], style(color=0)) + , + Line(points=[-90, 0; 68, 0], style(color=8)), + Polygon(points=[90, 0; 68, 8; 68, -8; 90, 0], style(color=8, fillColor= + 8)), + Text( + extent=[-90, 72; -18, 24], + string="tan", + style(color=8))), Diagram( - Line(points=[0, 80; -8, 80], style(color=8)), - Line(points=[0, -80; -8, -80], style(color=8)), - Line(points=[0, -88; 0, 86], style(color=8)), - Text( - extent=[11, 100; 38, 80], - string="outPort", - style(color=9)), - Polygon(points=[0, 102; -6, 86; 6, 86; 0, 102], style(color=8, - fillColor=8)), - Text(extent=[-37, -72; -17, -88], string="-5.8"), - Text(extent=[-33, 86; -13, 70], string=" 5.8"), - Text(extent=[70, 25; 90, 5], string="1.4"), - Line(points=[-100, 0; 84, 0], style(color=8)), - Polygon(points=[100, 0; 84, 6; 84, -6; 100, 0], style(color=8, - fillColor=8)), - Line(points=[-80, -80; -78.4, -68.4; -76.8, -59.7; -74.4, -50; -71.2, - -40.9; -67.1, -33; -60.7, -24.8; -51.1, -17.2; -35.8, -9.98; - - 4.42, -1.07; 33.4, 9.12; 49.4, 16.2; 59.1, 23.2; 65.5, 30.6; 70.4 - , 39.1; 73.6, 47.4; 76, 56.1; 77.6, 63.8; 80, 80], style(color=0) - ), - Text( - extent=[70, -6; 94, -26], - string="inPort", - style(color=9))), - Documentation(info=" - + Line(points=[0, 80; -8, 80], style(color=8)), + Line(points=[0, -80; -8, -80], style(color=8)), + Line(points=[0, -88; 0, 86], style(color=8)), + Text( + extent=[11, 100; 38, 80], + string="outPort", + style(color=9)), + Polygon(points=[0, 102; -6, 86; 6, 86; 0, 102], style(color=8, + fillColor=8)), + Text(extent=[-37, -72; -17, -88], string="-5.8"), + Text(extent=[-33, 86; -13, 70], string=" 5.8"), + Text(extent=[70, 25; 90, 5], string="1.4"), + Line(points=[-100, 0; 84, 0], style(color=8)), + Polygon(points=[100, 0; 84, 6; 84, -6; 100, 0], style(color=8, + fillColor=8)), + Line(points=[-80, -80; -78.4, -68.4; -76.8, -59.7; -74.4, -50; -71.2, - + 40.9; -67.1, -33; -60.7, -24.8; -51.1, -17.2; -35.8, -9.98; -4.42 + , -1.07; 33.4, 9.12; 49.4, 16.2; 59.1, 23.2; 65.5, 30.6; 70.4, + 39.1; 73.6, 47.4; 76, 56.1; 77.6, 63.8; 80, 80], style(color=0)) + , + Text( + extent=[70, -6; 94, -26], + string="inPort", + style(color=9))), + Documentation(info="

      -This blocks computes the output y=outPort.signal element-wise +This block computes the output y=outPort.signal element-wise as tan of the input u=inPort.signal:

      -
      -    y[i] = tan( u[i] );
      +
          y[i] = tan( u[i] );
       

      Release Notes:

      -"), - Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), - Window( - x=0.39, - y=0.18, - width=0.6, - height=0.6)); - equation +")); + equation y = Modelica.Math.tan(u); end Tan; - - block Asin "Output the arc sine of the input" + + block Asin "Output the arc sine of the input" extends Interfaces.MIMOs; annotation ( Icon( - Polygon(points=[0, 90; -8, 68; 8, 68; 0, 90], style(color=8, fillColor - =8)), - Line(points=[0, -80; 0, 68], style(color=8)), + Polygon(points=[0, 90; -8, 68; 8, 68; 0, 90], style(color=8, fillColor= + 8)), + Line(points=[0, -80; 0, 68], style(color=8)), Line(points=[-80, -80; -79.2, -72.8; -77.6, -67.5; -73.6, -59.4; -66.3 , -49.8; -53.5, -37.3; -30.2, -19.7; 37.4, 24.8; 57.5, 40.8; 68.7 - , 52.7; 75.2, 62.2; 77.6, 67.5; 80, 80], style(color=0)), - Line(points=[-90, 0; 68, 0], style(color=8)), - Polygon(points=[90, 0; 68, 8; 68, -8; 90, 0], style(color=8, fillColor - =8)), - Text( - extent=[-88, 78; -16, 30], - string="asin", - style(color=8))), + , 52.7; 75.2, 62.2; 77.6, 67.5; 80, 80], style(color=0)), + Line(points=[-90, 0; 68, 0], style(color=8)), + Polygon(points=[90, 0; 68, 8; 68, -8; 90, 0], style(color=8, fillColor= + 8)), + Text( + extent=[-88, 78; -16, 30], + string="asin", + style(color=8))), Diagram( - Line(points=[0, 80; -8, 80], style(color=8)), - Line(points=[0, -80; -8, -80], style(color=8)), - Line(points=[0, -90; 0, 84], style(color=8)), - Text( - extent=[9, 102; 36, 82], - string="outPort", - style(color=9)), - Polygon(points=[0, 100; -6, 84; 6, 84; 0, 100], style(color=8, - fillColor=8)), - Text(extent=[-40, -72; -15, -88], string="-pi/2"), - Text(extent=[-38, 88; -13, 72], string=" pi/2"), - Text(extent=[70, 25; 90, 5], string="+1"), - Text(extent=[-90, 21; -70, 1], string="-1"), - Line(points=[-100, 0; 84, 0], style(color=8)), - Polygon(points=[100, 0; 84, 6; 84, -6; 100, 0], style(color=8, - fillColor=8)), + Line(points=[0, 80; -8, 80], style(color=8)), + Line(points=[0, -80; -8, -80], style(color=8)), + Line(points=[0, -90; 0, 84], style(color=8)), + Text( + extent=[9, 102; 36, 82], + string="outPort", + style(color=9)), + Polygon(points=[0, 100; -6, 84; 6, 84; 0, 100], style(color=8, + fillColor=8)), + Text(extent=[-40, -72; -15, -88], string="-pi/2"), + Text(extent=[-38, 88; -13, 72], string=" pi/2"), + Text(extent=[70, 25; 90, 5], string="+1"), + Text(extent=[-90, 21; -70, 1], string="-1"), + Line(points=[-100, 0; 84, 0], style(color=8)), + Polygon(points=[100, 0; 84, 6; 84, -6; 100, 0], style(color=8, + fillColor=8)), Line(points=[-80, -80; -79.2, -72.8; -77.6, -67.5; -73.6, -59.4; -66.3 , -49.8; -53.5, -37.3; -30.2, -19.7; 37.4, 24.8; 57.5, 40.8; 68.7 - , 52.7; 75.2, 62.2; 77.6, 67.5; 80, 80], style(color=0)), + , 52.7; 75.2, 62.2; 77.6, 67.5; 80, 80], style(color=0)), Text( - extent=[74, -4; 100, -26], - string="inPort", - style(color=9))), - Documentation(info=" - + extent=[74, -4; 100, -26], + string="inPort", + style(color=9))), + Documentation(info="

      -This blocks computes the output y=outPort.signal element-wise as the -sine-inverse of the input u=inPort.signal: +This block computes the output y=outPort.signal element-wise as the +sine-inverse of the input u=inPort.signal:

      -
      -    y[i] = asin( u[i] );
      +
          y[i] = asin( u[i] );
       

      -The absolute values of the elements of the input u need to -be less or equal to one (abs( u[i] ) <= 1). +The absolute values of the elements of the input u need to +be less or equal to one (abs( u[i] ) <= 1). Otherwise an error occurs.

      Release Notes:

      -"), - Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), - Window( - x=0.41, - y=0.13, - width=0.6, - height=0.6)); - equation +")); + equation y = Modelica.Math.asin(u); end Asin; - - block Acos "Output the arc cosine of the input" + + block Acos "Output the arc cosine of the input" extends Interfaces.MIMOs; annotation ( Icon( - Polygon(points=[0, 90; -8, 68; 8, 68; 0, 90], style(color=8, fillColor - =8)), - Line(points=[-80, 80; -79.2, 72.8; -77.6, 67.5; -73.6, 59.4; -66.3, + Polygon(points=[0, 90; -8, 68; 8, 68; 0, 90], style(color=8, fillColor= + 8)), + Line(points=[-80, 80; -79.2, 72.8; -77.6, 67.5; -73.6, 59.4; -66.3, 49.8; -53.5, 37.3; -30.2, 19.7; 37.4, -24.8; 57.5, -40.8; 68.7, - - 52.7; 75.2, -62.2; 77.6, -67.5; 80, -80], style(color=0)), - Line(points=[0, -88; 0, 68], style(color=8)), - Line(points=[-90, -80; 68, -80], style(color=8)), - Polygon(points=[90, -80; 68, -72; 68, -88; 90, -80], style(color=8, - fillColor=8)), - Text( - extent=[-86, -14; -14, -62], - string="acos", - style(color=8))), + 52.7; 75.2, -62.2; 77.6, -67.5; 80, -80], style(color=0)), + Line(points=[0, -88; 0, 68], style(color=8)), + Line(points=[-90, -80; 68, -80], style(color=8)), + Polygon(points=[90, -80; 68, -72; 68, -88; 90, -80], style(color=8, + fillColor=8)), + Text( + extent=[-86, -14; -14, -62], + string="acos", + style(color=8))), Diagram( - Line(points=[0, 80; -8, 80], style(color=8)), - Line(points=[0, -80; -8, -80], style(color=8)), - Line(points=[0, -90; 0, 84], style(color=8)), - Text( - extent=[13, 100; 42, 82], - string="outPort", - style(color=9)), - Polygon(points=[0, 100; -6, 84; 6, 84; 0, 100], style(color=8, - fillColor=8)), - Line(points=[-100, -80; 84, -80], style(color=8)), - Polygon(points=[100, -80; 84, -74; 84, -86; 100, -80], style(color=8, - fillColor=8)), - Line(points=[-80, 80; -79.2, 72.8; -77.6, 67.5; -73.6, 59.4; -66.3, + Line(points=[0, 80; -8, 80], style(color=8)), + Line(points=[0, -80; -8, -80], style(color=8)), + Line(points=[0, -90; 0, 84], style(color=8)), + Text( + extent=[13, 100; 42, 82], + string="outPort", + style(color=9)), + Polygon(points=[0, 100; -6, 84; 6, 84; 0, 100], style(color=8, + fillColor=8)), + Line(points=[-100, -80; 84, -80], style(color=8)), + Polygon(points=[100, -80; 84, -74; 84, -86; 100, -80], style(color=8, + fillColor=8)), + Line(points=[-80, 80; -79.2, 72.8; -77.6, 67.5; -73.6, 59.4; -66.3, 49.8; -53.5, 37.3; -30.2, 19.7; 37.4, -24.8; 57.5, -40.8; 68.7, - - 52.7; 75.2, -62.2; 77.6, -67.5; 80, -80], style(color=0)), - Text(extent=[-30, 88; -5, 72], string=" pi"), - Text(extent=[-94, -57; -74, -77], string="-1"), - Text(extent=[80, -45; 100, -65], string="+1"), + 52.7; 75.2, -62.2; 77.6, -67.5; 80, -80], style(color=0)), + Text(extent=[-30, 88; -5, 72], string=" pi"), + Text(extent=[-94, -57; -74, -77], string="-1"), + Text(extent=[80, -45; 100, -65], string="+1"), Text( - extent=[76, -84; 102, -102], - string="inPort", - style(color=9))), - Documentation(info=" - + extent=[76, -84; 102, -102], + string="inPort", + style(color=9))), + Documentation(info="

      -This blocks computes the output y=outPort.signal element-wise as the -cosine-inverse of the input u=inPort.signal: +This block computes the output y=outPort.signal element-wise as the +cosine-inverse of the input u=inPort.signal:

      -
      -    y[i] = acos( u[i] );
      +
          y[i] = acos( u[i] );
       

      -The absolute values of the elements of the input u need to -be less or equal to one (abs( u[i] ) <= 1). +The absolute values of the elements of the input u need to +be less or equal to one (abs( u[i] ) <= 1). Otherwise an error occurs.

      Release Notes:

      -"), - Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), - Window( - x=0.39, - y=0.18, - width=0.6, - height=0.6)); - equation +")); + equation y = Modelica.Math.acos(u); end Acos; - - block Atan "Output the arc tangent of the input" + + block Atan "Output the arc tangent of the input" extends Interfaces.MIMOs; annotation ( Icon( - Polygon(points=[0, 90; -8, 68; 8, 68; 0, 90], style(color=8, fillColor - =8)), - Line(points=[0, -80; 0, 68], style(color=8)), - Line(points=[-80, -80; -52.7, -75.2; -37.4, -69.7; -26.9, -63; -19.7, - -55.2; -14.1, -45.8; -10.1, -36.4; -6.03, -23.9; -1.21, -5.06; - 5.23, 21; 9.25, 34.1; 13.3, 44.2; 18.1, 52.9; 24.5, 60.8; 33.4, - 67.6; 47, 73.6; 69.5, 78.6; 80, 80], style(color=0)), - Line(points=[-90, 0; 68, 0], style(color=8)), - Polygon(points=[90, 0; 68, 8; 68, -8; 90, 0], style(color=8, fillColor - =8)), - Text( - extent=[-86, 68; -14, 20], - string="atan", - style(color=8))), + Polygon(points=[0, 90; -8, 68; 8, 68; 0, 90], style(color=8, fillColor= + 8)), + Line(points=[0, -80; 0, 68], style(color=8)), + Line(points=[-80, -80; -52.7, -75.2; -37.4, -69.7; -26.9, -63; -19.7, - + 55.2; -14.1, -45.8; -10.1, -36.4; -6.03, -23.9; -1.21, -5.06; + 5.23, 21; 9.25, 34.1; 13.3, 44.2; 18.1, 52.9; 24.5, 60.8; 33.4, + 67.6; 47, 73.6; 69.5, 78.6; 80, 80], style(color=0)), + Line(points=[-90, 0; 68, 0], style(color=8)), + Polygon(points=[90, 0; 68, 8; 68, -8; 90, 0], style(color=8, fillColor= + 8)), + Text( + extent=[-86, 68; -14, 20], + string="atan", + style(color=8))), Diagram( - Line(points=[0, 80; -8, 80], style(color=8)), - Line(points=[0, -80; -8, -80], style(color=8)), - Line(points=[0, -90; 0, 84], style(color=8)), - Text( - extent=[13, 102; 42, 82], - string="outPort", - style(color=9)), - Polygon(points=[0, 100; -6, 84; 6, 84; 0, 100], style(color=8, - fillColor=8)), - Line(points=[-100, 0; 84, 0], style(color=8)), - Polygon(points=[100, 0; 84, 6; 84, -6; 100, 0], style(color=8, - fillColor=8)), - Line(points=[-80, -80; -52.7, -75.2; -37.4, -69.7; -26.9, -63; -19.7, - -55.2; -14.1, -45.8; -10.1, -36.4; -6.03, -23.9; -1.21, -5.06; - 5.23, 21; 9.25, 34.1; 13.3, 44.2; 18.1, 52.9; 24.5, 60.8; 33.4, - 67.6; 47, 73.6; 69.5, 78.6; 80, 80], style(color=0)), - Text(extent=[-32, 91; -12, 71], string="1.4"), - Text(extent=[-32, -71; -12, -91], string="-1.4"), - Text(extent=[73, 26; 93, 10], string=" 5.8"), - Text(extent=[-103, 20; -83, 4], string="-5.8"), - Text( - extent=[66, -8; 94, -28], - string="inPort", - style(color=9))), - Documentation(info=" - + Line(points=[0, 80; -8, 80], style(color=8)), + Line(points=[0, -80; -8, -80], style(color=8)), + Line(points=[0, -90; 0, 84], style(color=8)), + Text( + extent=[13, 102; 42, 82], + string="outPort", + style(color=9)), + Polygon(points=[0, 100; -6, 84; 6, 84; 0, 100], style(color=8, + fillColor=8)), + Line(points=[-100, 0; 84, 0], style(color=8)), + Polygon(points=[100, 0; 84, 6; 84, -6; 100, 0], style(color=8, + fillColor=8)), + Line(points=[-80, -80; -52.7, -75.2; -37.4, -69.7; -26.9, -63; -19.7, - + 55.2; -14.1, -45.8; -10.1, -36.4; -6.03, -23.9; -1.21, -5.06; + 5.23, 21; 9.25, 34.1; 13.3, 44.2; 18.1, 52.9; 24.5, 60.8; 33.4, + 67.6; 47, 73.6; 69.5, 78.6; 80, 80], style(color=0)), + Text(extent=[-32, 91; -12, 71], string="1.4"), + Text(extent=[-32, -71; -12, -91], string="-1.4"), + Text(extent=[73, 26; 93, 10], string=" 5.8"), + Text(extent=[-103, 20; -83, 4], string="-5.8"), + Text( + extent=[66, -8; 94, -28], + string="inPort", + style(color=9))), + Documentation(info="

      -This blocks computes the output y=outPort.signal element-wise as the -tangent-inverse of the input u=inPort.signal: +This block computes the output y=outPort.signal element-wise as the +tangent-inverse of the input u=inPort.signal:

      -
      -    y[i] = atan( u[i] );
      +
          y[i] = atan( u[i] );
       

      Release Notes:

      -"), - Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), - Window( - x=0.38, - y=0.12, - width=0.6, - height=0.6)); - equation +")); + equation y = Modelica.Math.atan(u); end Atan; - - block Atan2 "Output atan(u1/u2) of the inputs u1 and u2" + + block Atan2 "Output atan(u1/u2) of the inputs u1 and u2" extends Interfaces.MI2MO; annotation ( Icon( - Text(extent=[-150, 150; 150, 110], string="%name"), - Polygon(points=[0, 90; -8, 68; 8, 68; 0, 90], style(color=8, fillColor - =8)), - Line(points=[0, -80; 0, 68], style(color=8)), - Line(points=[-90, 0; 68, 0], style(color=8)), - Polygon(points=[90, 0; 68, 8; 68, -8; 90, 0], style(color=8, fillColor - =8)), + Text(extent=[-150, 150; 150, 110], string="%name"), + Polygon(points=[0, 90; -8, 68; 8, 68; 0, 90], style(color=8, fillColor= + 8)), + Line(points=[0, -80; 0, 68], style(color=8)), + Line(points=[-90, 0; 68, 0], style(color=8)), + Polygon(points=[90, 0; 68, 8; 68, -8; 90, 0], style(color=8, fillColor= + 8)), Line(points=[-80, -34.9; -46.1, -31.4; -29.4, -27.1; -18.3, -21.5; - - 10.3, -14.5; -2.03, -3.17; 7.97, 11.6; 15.5, 19.4; 24.3, 25; 39, - 30; 62.1, 33.5; 80, 34.9], style(color=0)), - Line(points=[-80, 45.1; -45.9, 48.7; -29.1, 52.9; -18.1, 58.6; -10.2, - 65.8; -1.82, 77.2; 0, 80], style(color=0)), - Line(points=[0, -80; 8.93, -67.2; 17.1, -59.3; 27.3, -53.6; 42.1, - - 49.4; 69.9, -45.8; 80, -45.1], style(color=0)), - Text( - extent=[-90, -46; -18, -94], - string="atan2", - style(color=8))), + 10.3, -14.5; -2.03, -3.17; 7.97, 11.6; 15.5, 19.4; 24.3, 25; 39, + 30; 62.1, 33.5; 80, 34.9], style(color=0)), + Line(points=[-80, 45.1; -45.9, 48.7; -29.1, 52.9; -18.1, 58.6; -10.2, + 65.8; -1.82, 77.2; 0, 80], style(color=0)), + Line(points=[0, -80; 8.93, -67.2; 17.1, -59.3; 27.3, -53.6; 42.1, -49.4 + ; 69.9, -45.8; 80, -45.1], style(color=0)), + Text( + extent=[-90, -46; -18, -94], + string="atan2", + style(color=8))), Diagram( - Line(points=[0, 80; -8, 80], style(color=8)), - Line(points=[0, -80; -8, -80], style(color=8)), - Line(points=[0, -90; 0, 84], style(color=8)), - Text( - extent=[11, 98; 42, 78], - string="outPort", - style(color=9)), - Polygon(points=[0, 100; -6, 84; 6, 84; 0, 100], style(color=8, - fillColor=8)), - Line(points=[-100, 0; 84, 0], style(color=8)), - Polygon(points=[100, 0; 84, 6; 84, -6; 100, 0], style(color=8, - fillColor=8)), - Line(points=[0, -80; 8.93, -67.2; 17.1, -59.3; 27.3, -53.6; 42.1, - - 49.4; 69.9, -45.8; 80, -45.1], style(color=0)), + Line(points=[0, 80; -8, 80], style(color=8)), + Line(points=[0, -80; -8, -80], style(color=8)), + Line(points=[0, -90; 0, 84], style(color=8)), + Text( + extent=[11, 98; 42, 78], + string="outPort", + style(color=9)), + Polygon(points=[0, 100; -6, 84; 6, 84; 0, 100], style(color=8, + fillColor=8)), + Line(points=[-100, 0; 84, 0], style(color=8)), + Polygon(points=[100, 0; 84, 6; 84, -6; 100, 0], style(color=8, + fillColor=8)), + Line(points=[0, -80; 8.93, -67.2; 17.1, -59.3; 27.3, -53.6; 42.1, -49.4 + ; 69.9, -45.8; 80, -45.1], style(color=0)), Line(points=[-80, -34.9; -46.1, -31.4; -29.4, -27.1; -18.3, -21.5; - - 10.3, -14.5; -2.03, -3.17; 7.97, 11.6; 15.5, 19.4; 24.3, 25; 39, - 30; 62.1, 33.5; 80, 34.9], style(color=0)), - Line(points=[-80, 45.1; -45.9, 48.7; -29.1, 52.9; -18.1, 58.6; -10.2, - 65.8; -1.82, 77.2; 0, 80], style(color=0)), - Text(extent=[-30, 89; -10, 70], string="pi"), - Text(extent=[-30, -69; -10, -88], string="-pi"), - Text(extent=[-30, 49; -10, 30], string="pi/2"), - Line(points=[0, 40; -8, 40], style(color=8)), - Line(points=[0, -40; -8, -40], style(color=8)), - Text(extent=[-30, -31; -10, -50], string="-pi/2"), - Text( - extent=[48, 0; 100, -34], - string="inPort1 / inPort2", - style(color=9))), - Documentation(info=" - + 10.3, -14.5; -2.03, -3.17; 7.97, 11.6; 15.5, 19.4; 24.3, 25; 39, + 30; 62.1, 33.5; 80, 34.9], style(color=0)), + Line(points=[-80, 45.1; -45.9, 48.7; -29.1, 52.9; -18.1, 58.6; -10.2, + 65.8; -1.82, 77.2; 0, 80], style(color=0)), + Text(extent=[-30, 89; -10, 70], string="pi"), + Text(extent=[-30, -69; -10, -88], string="-pi"), + Text(extent=[-30, 49; -10, 30], string="pi/2"), + Line(points=[0, 40; -8, 40], style(color=8)), + Line(points=[0, -40; -8, -40], style(color=8)), + Text(extent=[-30, -31; -10, -50], string="-pi/2"), + Text( + extent=[48, 0; 100, -34], + string="inPort1 / inPort2", + style(color=9))), + Documentation(info="

      -This blocks computes the output y=outPort.signal element-wise as the -tangent-inverse of the input u1=inPort1.signal divided by -input u2=inPort2.signal: +This block computes the output y=outPort.signal element-wise as the +tangent-inverse of the input u1=inPort1.signal divided by +input u2=inPort2.signal:

      -
      -    y[i] = atan2( u1[i], u2[i] );
      +
          y[i] = atan2( u1[i], u2[i] );
       

      u1[i] and u2[i] shall not be zero at the same time instant. -Atan2 uses the sign of u1[i] and u2[i] in order to construct +Atan2 uses the sign of u1[i] and u2[i] in order to construct the solution in the range -180 deg <= y[i] <= 180 deg, whereas -block Atan gives a solution in the range +block Atan gives a solution in the range -90 deg <= y[i] <= 90 deg.

      Release Notes:

      -"), - Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), - Window( - x=0.38, - y=0.21, - width=0.6, - height=0.6)); - equation +")); + equation y = Modelica.Math.atan2(u1, u2); end Atan2; - - block Sinh "Output the hyperbolic sine of the input" + + block Sinh "Output the hyperbolic sine of the input" extends Interfaces.MIMOs; annotation ( Icon( - Polygon(points=[0, 90; -8, 68; 8, 68; 0, 90], style(color=8, fillColor - =8)), - Text( - extent=[-86, 80; -14, 32], - string="sinh", - style(color=8)), - Line(points=[0, -80; 0, 68], style(color=8)), - Line(points=[-90, 0; 68, 0], style(color=8)), - Line(points=[-80, -80; -76, -65.4; -71.2, -51.4; -65.5, -38.8; -59.1, - -28.1; -51.1, -18.7; -41.4, -11.4; -27.7, -5.5; -4.42, -0.653; - 24.5, 4.57; 39, 10.1; 49.4, 17.2; 57.5, 25.9; 63.9, 35.8; 69.5, - 47.4; 74.4, 60.4; 78.4, 73.8; 80, 80], style(color=0)), - Polygon(points=[90, 0; 68, 8; 68, -8; 90, 0], style(color=8, fillColor - =8))), + Polygon(points=[0, 90; -8, 68; 8, 68; 0, 90], style(color=8, fillColor= + 8)), + Text( + extent=[-86, 80; -14, 32], + string="sinh", + style(color=8)), + Line(points=[0, -80; 0, 68], style(color=8)), + Line(points=[-90, 0; 68, 0], style(color=8)), + Line(points=[-80, -80; -76, -65.4; -71.2, -51.4; -65.5, -38.8; -59.1, - + 28.1; -51.1, -18.7; -41.4, -11.4; -27.7, -5.5; -4.42, -0.653; + 24.5, 4.57; 39, 10.1; 49.4, 17.2; 57.5, 25.9; 63.9, 35.8; 69.5, + 47.4; 74.4, 60.4; 78.4, 73.8; 80, 80], style(color=0)), + Polygon(points=[90, 0; 68, 8; 68, -8; 90, 0], style(color=8, fillColor= + 8))), Diagram( - Line(points=[0, 80; -8, 80], style(color=8)), - Line(points=[0, -80; -8, -80], style(color=8)), - Line(points=[0, -90; 0, 84], style(color=8)), - Text( - extent=[9, 98; 34, 78], - string="outPort", - style(color=9)), - Polygon(points=[0, 100; -6, 84; 6, 84; 0, 100], style(color=8, - fillColor=8)), - Line(points=[-100, 0; 84, 0], style(color=8)), - Polygon(points=[100, 0; 84, 6; 84, -6; 100, 0], style(color=8, - fillColor=8)), - Line(points=[-80, -80; -76, -65.4; -71.2, -51.4; -65.5, -38.8; -59.1, - -28.1; -51.1, -18.7; -41.4, -11.4; -27.7, -5.5; -4.42, -0.653; - 24.5, 4.57; 39, 10.1; 49.4, 17.2; 57.5, 25.9; 63.9, 35.8; 69.5, - 47.4; 74.4, 60.4; 78.4, 73.8; 80, 80], style(color=0)), - Text(extent=[-31, 72; -11, 88], string="27"), - Text(extent=[-35, -88; -15, -72], string="-27"), - Text(extent=[70, 25; 90, 5], string="4"), - Text(extent=[-98, 21; -78, 1], string="-4"), - Text( - extent=[72, -6; 96, -26], - string="inPort", - style(color=9))), - Documentation(info=" - + Line(points=[0, 80; -8, 80], style(color=8)), + Line(points=[0, -80; -8, -80], style(color=8)), + Line(points=[0, -90; 0, 84], style(color=8)), + Text( + extent=[9, 98; 34, 78], + string="outPort", + style(color=9)), + Polygon(points=[0, 100; -6, 84; 6, 84; 0, 100], style(color=8, + fillColor=8)), + Line(points=[-100, 0; 84, 0], style(color=8)), + Polygon(points=[100, 0; 84, 6; 84, -6; 100, 0], style(color=8, + fillColor=8)), + Line(points=[-80, -80; -76, -65.4; -71.2, -51.4; -65.5, -38.8; -59.1, - + 28.1; -51.1, -18.7; -41.4, -11.4; -27.7, -5.5; -4.42, -0.653; + 24.5, 4.57; 39, 10.1; 49.4, 17.2; 57.5, 25.9; 63.9, 35.8; 69.5, + 47.4; 74.4, 60.4; 78.4, 73.8; 80, 80], style(color=0)), + Text(extent=[-31, 72; -11, 88], string="27"), + Text(extent=[-35, -88; -15, -72], string="-27"), + Text(extent=[70, 25; 90, 5], string="4"), + Text(extent=[-98, 21; -78, 1], string="-4"), + Text( + extent=[72, -6; 96, -26], + string="inPort", + style(color=9))), + Documentation(info="

      -This blocks computes the output y=outPort.signal element-wise as the -hyperbolic sine of the input u=inPort.signal: +This block computes the output y=outPort.signal element-wise as the +hyperbolic sine of the input u=inPort.signal:

      -
      -    y[i] = sinh( u[i] );
      +
          y[i] = sinh( u[i] );
       

      Release Notes:

      -"), - Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), - Window( - x=0.41, - y=0.13, - width=0.6, - height=0.6)); - equation +")); + equation y = Modelica.Math.sinh(u); end Sinh; - - block Cosh "Output the hyperbolic cosine of the input" + + block Cosh "Output the hyperbolic cosine of the input" extends Interfaces.MIMOs; annotation ( Icon( - Polygon(points=[0, 90; -8, 68; 8, 68; 0, 90], style(color=8, fillColor - =8)), - Line(points=[0, -80; 0, 68], style(color=8)), - Text( - extent=[4, 66; 66, 20], - string="cosh", - style(color=8)), - Line(points=[-80, 80; -77.6, 61.1; -74.4, 39.3; -71.2, 20.7; -67.1, + Polygon(points=[0, 90; -8, 68; 8, 68; 0, 90], style(color=8, fillColor= + 8)), + Line(points=[0, -80; 0, 68], style(color=8)), + Text( + extent=[4, 66; 66, 20], + string="cosh", + style(color=8)), + Line(points=[-80, 80; -77.6, 61.1; -74.4, 39.3; -71.2, 20.7; -67.1, 1.29; -63.1, -14.6; -58.3, -29.8; -52.7, -43.5; -46.2, -55.1; -39 - , -64.3; -30.2, -71.7; -18.9, -77.1; -4.42, -79.9; 10.9, -79.1; - 23.7, -75.2; 34.2, -68.7; 42.2, -60.6; 48.6, -51.2; 54.3, -40; - 59.1, -27.5; 63.1, -14.6; 67.1, 1.29; 71.2, 20.7; 74.4, 39.3; - 77.6, 61.1; 80, 80], style(color=0)), - Line(points=[-90, -86.083; 68, -86.083], style(color=8)), - Polygon(points=[90, -86.083; 68, -78.083; 68, -94.083; 90, -86.083], - style(color=8, fillColor=8))), + , -64.3; -30.2, -71.7; -18.9, -77.1; -4.42, -79.9; 10.9, -79.1; + 23.7, -75.2; 34.2, -68.7; 42.2, -60.6; 48.6, -51.2; 54.3, -40; + 59.1, -27.5; 63.1, -14.6; 67.1, 1.29; 71.2, 20.7; 74.4, 39.3; + 77.6, 61.1; 80, 80], style(color=0)), + Line(points=[-90, -86.083; 68, -86.083], style(color=8)), + Polygon(points=[90, -86.083; 68, -78.083; 68, -94.083; 90, -86.083], + style(color=8, fillColor=8))), Diagram( - Line(points=[0, 80; -8, 80], style(color=8)), - Line(points=[0, -80; -8, -80], style(color=8)), - Line(points=[0, -90; 0, 84], style(color=8)), - Text( - extent=[11, 98; 38, 78], - string="outPort", - style(color=9)), - Polygon(points=[0, 100; -6, 84; 6, 84; 0, 100], style(color=8, - fillColor=8)), - Line(points=[-100, -86.083; 84, -86.083], style(color=8)), - Polygon(points=[100, -86.083; 84, -80.083; 84, -92.083; 100, -86.083] - , style(color=8, fillColor=8)), - Line(points=[-80, 80; -77.6, 61.1; -74.4, 39.3; -71.2, 20.7; -67.1, + Line(points=[0, 80; -8, 80], style(color=8)), + Line(points=[0, -80; -8, -80], style(color=8)), + Line(points=[0, -90; 0, 84], style(color=8)), + Text( + extent=[11, 98; 38, 78], + string="outPort", + style(color=9)), + Polygon(points=[0, 100; -6, 84; 6, 84; 0, 100], style(color=8, + fillColor=8)), + Line(points=[-100, -86.083; 84, -86.083], style(color=8)), + Polygon(points=[100, -86.083; 84, -80.083; 84, -92.083; 100, -86.083], + style(color=8, fillColor=8)), + Line(points=[-80, 80; -77.6, 61.1; -74.4, 39.3; -71.2, 20.7; -67.1, 1.29; -63.1, -14.6; -58.3, -29.8; -52.7, -43.5; -46.2, -55.1; -39 - , -64.3; -30.2, -71.7; -18.9, -77.1; -4.42, -79.9; 10.9, -79.1; - 23.7, -75.2; 34.2, -68.7; 42.2, -60.6; 48.6, -51.2; 54.3, -40; - 59.1, -27.5; 63.1, -14.6; 67.1, 1.29; 71.2, 20.7; 74.4, 39.3; - 77.6, 61.1; 80, 80], style(color=0)), - Text(extent=[-31, 72; -11, 88], string="27"), - Text(extent=[62, -67; 82, -87], string="4"), - Text(extent=[-104, -63; -84, -83], string="-4"), - Text( - extent=[78, -54; 100, -74], - string="inPort", - style(color=9))), - Documentation(info=" - + , -64.3; -30.2, -71.7; -18.9, -77.1; -4.42, -79.9; 10.9, -79.1; + 23.7, -75.2; 34.2, -68.7; 42.2, -60.6; 48.6, -51.2; 54.3, -40; + 59.1, -27.5; 63.1, -14.6; 67.1, 1.29; 71.2, 20.7; 74.4, 39.3; + 77.6, 61.1; 80, 80], style(color=0)), + Text(extent=[-31, 72; -11, 88], string="27"), + Text(extent=[62, -67; 82, -87], string="4"), + Text(extent=[-104, -63; -84, -83], string="-4"), + Text( + extent=[78, -54; 100, -74], + string="inPort", + style(color=9))), + Documentation(info="

      -This blocks computes the output y=outPort.signal element-wise as the -hyperbolic cosine of the input u=inPort.signal: +This block computes the output y=outPort.signal element-wise as the +hyperbolic cosine of the input u=inPort.signal:

      -
      -    y[i] = cosh( u[i] );
      +
          y[i] = cosh( u[i] );
       

      Release Notes:

      -"), - Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), - Window( - x=0.28, - y=0.07, - width=0.6, - height=0.6)); - equation +")); + equation y = Modelica.Math.cosh(u); end Cosh; - - block Tanh "Output the hyperbolic tangent of the input" + + block Tanh "Output the hyperbolic tangent of the input" extends Interfaces.MIMOs; annotation ( Icon( - Line(points=[0, -90; 0, 84], style(color=8)), - Line(points=[-100, 0; 84, 0], style(color=8)), + Line(points=[0, -90; 0, 84], style(color=8)), + Line(points=[-100, 0; 84, 0], style(color=8)), Line(points=[-80, -80; -47.8, -78.7; -35.8, -75.7; -27.7, -70.6; -22.1 - , -64.2; -17.3, -55.9; -12.5, -44.3; -7.64, -29.2; -1.21, -4.82; - 6.83, 26.3; 11.7, 42; 16.5, 54.2; 21.3, 63.1; 26.9, 69.9; 34.2, - 75; 45.4, 78.4; 72, 79.9; 80, 80], style(color=0)), - Polygon(points=[0, 90; -8, 68; 8, 68; 0, 90], style(color=8, fillColor - =8)), - Text( - extent=[-88, 72; -16, 24], - string="tanh", - style(color=8)), - Polygon(points=[90, 0; 68, 8; 68, -8; 90, 0], style(color=8, fillColor - =8))), + , -64.2; -17.3, -55.9; -12.5, -44.3; -7.64, -29.2; -1.21, -4.82; + 6.83, 26.3; 11.7, 42; 16.5, 54.2; 21.3, 63.1; 26.9, 69.9; 34.2, + 75; 45.4, 78.4; 72, 79.9; 80, 80], style(color=0)), + Polygon(points=[0, 90; -8, 68; 8, 68; 0, 90], style(color=8, fillColor= + 8)), + Text( + extent=[-88, 72; -16, 24], + string="tanh", + style(color=8)), + Polygon(points=[90, 0; 68, 8; 68, -8; 90, 0], style(color=8, fillColor= + 8))), Diagram( - Line(points=[0, 80; -8, 80], style(color=8)), - Line(points=[0, -80; -8, -80], style(color=8)), - Line(points=[0, -90; 0, 84], style(color=8)), - Text( - extent=[9, 98; 42, 80], - string="outPort", - style(color=9)), - Polygon(points=[0, 100; -6, 84; 6, 84; 0, 100], style(color=8, - fillColor=8)), - Line(points=[-100, 0; 84, 0], style(color=8)), - Polygon(points=[100, 0; 84, 6; 84, -6; 100, 0], style(color=8, - fillColor=8)), + Line(points=[0, 80; -8, 80], style(color=8)), + Line(points=[0, -80; -8, -80], style(color=8)), + Line(points=[0, -90; 0, 84], style(color=8)), + Text( + extent=[9, 98; 42, 80], + string="outPort", + style(color=9)), + Polygon(points=[0, 100; -6, 84; 6, 84; 0, 100], style(color=8, + fillColor=8)), + Line(points=[-100, 0; 84, 0], style(color=8)), + Polygon(points=[100, 0; 84, 6; 84, -6; 100, 0], style(color=8, + fillColor=8)), Line(points=[-80, -80; -47.8, -78.7; -35.8, -75.7; -27.7, -70.6; -22.1 - , -64.2; -17.3, -55.9; -12.5, -44.3; -7.64, -29.2; -1.21, -4.82; - 6.83, 26.3; 11.7, 42; 16.5, 54.2; 21.3, 63.1; 26.9, 69.9; 34.2, - 75; 45.4, 78.4; 72, 79.9; 80, 80], style(color=0)), - Text(extent=[70, 25; 90, 5], string="4"), - Text(extent=[-106, 21; -86, 1], string="-4"), - Text(extent=[-29, 72; -9, 88], string="1"), - Text(extent=[3, -72; 23, -88], string="-1"), - Text( - extent=[72, -8; 98, -26], - string="inPort", - style(color=9))), - Documentation(info=" - + , -64.2; -17.3, -55.9; -12.5, -44.3; -7.64, -29.2; -1.21, -4.82; + 6.83, 26.3; 11.7, 42; 16.5, 54.2; 21.3, 63.1; 26.9, 69.9; 34.2, + 75; 45.4, 78.4; 72, 79.9; 80, 80], style(color=0)), + Text(extent=[70, 25; 90, 5], string="4"), + Text(extent=[-106, 21; -86, 1], string="-4"), + Text(extent=[-29, 72; -9, 88], string="1"), + Text(extent=[3, -72; 23, -88], string="-1"), + Text( + extent=[72, -8; 98, -26], + string="inPort", + style(color=9))), + Documentation(info="

      -This blocks computes the output y=outPort.signal element-wise as the -hyperbolic tangent of the input u=inPort.signal: +This block computes the output y=outPort.signal element-wise as the +hyperbolic tangent of the input u=inPort.signal:

      -
      -    y[i] = tanh( u[i] );
      +
          y[i] = tanh( u[i] );
       

      Release Notes:

      -"), - Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), - Window( - x=0.38, - y=0.14, - width=0.6, - height=0.6)); - equation +")); + equation y = Modelica.Math.tanh(u); end Tanh; - - block Exp "Output the exponential (base e) of the input" + + block Exp "Output the exponential (base e) of the input" extends Interfaces.MIMOs; annotation ( Icon( - Line(points=[0, -80; 0, 68], style(color=8)), - Polygon(points=[0, 90; -8, 68; 8, 68; 0, 90], style(color=8, fillColor - =8)), - Text( - extent=[-86, 50; -14, 2], - string="exp", - style(color=8)), - Line(points=[-80, -80; -31, -77.9; -6.03, -74; 10.9, -68.4; 23.7, -61 - ; 34.2, -51.6; 43, -40.3; 50.3, -27.8; 56.7, -13.5; 62.3, 2.23; - 67.1, 18.6; 72, 38.2; 76, 57.6; 80, 80], style(color=0)), - Line(points=[-90, -80.3976; 68, -80.3976], style(color=8)), - Polygon(points=[90, -80.3976; 68, -72.3976; 68, -88.3976; 90, -80.3976 - ], style(color=8, fillColor=8))), + Line(points=[0, -80; 0, 68], style(color=8)), + Polygon(points=[0, 90; -8, 68; 8, 68; 0, 90], style(color=8, fillColor= + 8)), + Text( + extent=[-86, 50; -14, 2], + string="exp", + style(color=8)), + Line(points=[-80, -80; -31, -77.9; -6.03, -74; 10.9, -68.4; 23.7, -61; + 34.2, -51.6; 43, -40.3; 50.3, -27.8; 56.7, -13.5; 62.3, 2.23; + 67.1, 18.6; 72, 38.2; 76, 57.6; 80, 80], style(color=0)), + Line(points=[-90, -80.3976; 68, -80.3976], style(color=8)), + Polygon(points=[90, -80.3976; 68, -72.3976; 68, -88.3976; 90, -80.3976] + , style(color=8, fillColor=8))), Diagram( - Line(points=[0, 80; -8, 80], style(color=8)), - Line(points=[0, -80; -8, -80], style(color=8)), - Line(points=[0, -90; 0, 84], style(color=8)), - Text( - extent=[9, 100; 40, 80], - string="outPort", - style(color=9)), - Polygon(points=[0, 100; -6, 84; 6, 84; 0, 100], style(color=8, - fillColor=8)), - Line(points=[-100, -80.3976; 84, -80.3976], style(color=8)), + Line(points=[0, 80; -8, 80], style(color=8)), + Line(points=[0, -80; -8, -80], style(color=8)), + Line(points=[0, -90; 0, 84], style(color=8)), + Text( + extent=[9, 100; 40, 80], + string="outPort", + style(color=9)), + Polygon(points=[0, 100; -6, 84; 6, 84; 0, 100], style(color=8, + fillColor=8)), + Line(points=[-100, -80.3976; 84, -80.3976], style(color=8)), Polygon(points=[100, -80.3976; 84, -74.3976; 84, -86.3976; 100, - - 80.3976], style(color=8, fillColor=8)), - Line(points=[-80, -80; -31, -77.9; -6.03, -74; 10.9, -68.4; 23.7, -61 - ; 34.2, -51.6; 43, -40.3; 50.3, -27.8; 56.7, -13.5; 62.3, 2.23; - 67.1, 18.6; 72, 38.2; 76, 57.6; 80, 80], style(color=0)), - Text(extent=[-31, 72; -11, 88], string="20"), - Text(extent=[-92, -83; -72, -103], string="-3"), - Text(extent=[70, -83; 90, -103], string="3"), - Text(extent=[-18, -53; 2, -73], string="1"), - Text( - extent=[66, -52; 96, -72], - string="inPort", - style(color=9))), - Documentation(info=" - + 80.3976], style(color=8, fillColor=8)), + Line(points=[-80, -80; -31, -77.9; -6.03, -74; 10.9, -68.4; 23.7, -61; + 34.2, -51.6; 43, -40.3; 50.3, -27.8; 56.7, -13.5; 62.3, 2.23; + 67.1, 18.6; 72, 38.2; 76, 57.6; 80, 80], style(color=0)), + Text(extent=[-31, 72; -11, 88], string="20"), + Text(extent=[-92, -83; -72, -103], string="-3"), + Text(extent=[70, -83; 90, -103], string="3"), + Text(extent=[-18, -53; 2, -73], string="1"), + Text( + extent=[66, -52; 96, -72], + string="inPort", + style(color=9))), + Documentation(info="

      -This blocks computes the output y=outPort.signal element-wise as the -exponential (of base e) of the input u=inPort.signal: +This block computes the output y=outPort.signal element-wise as the +exponential (of base e) of the input u=inPort.signal:

      -
      -    y[i] = exp( u[i] );
      +
          y[i] = exp( u[i] );
       

      Release Notes:

      -"), - Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), - Window( - x=0.27, - y=0.09, - width=0.6, - height=0.6)); - equation +")); + equation y = Modelica.Math.exp(u); end Exp; - - block Log - "Output the natural (base e) logarithm of the input (input > 0 required)" + + block Log + "Output the natural (base e) logarithm of the input (input > 0 required)" extends Interfaces.MIMOs; annotation ( Icon( - Line(points=[-80, -80; -80, 68], style(color=8)), - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), + Line(points=[-80, -80; -80, 68], style(color=8)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), Line(points=[-80, -80; -79.2, -50.6; -78.4, -37; -77.6, -28; -76.8, - 21.3; -75.2, -11.4; -72.8, -1.31; -69.5, 8.08; -64.7, 17.9; -57.5 , 28; -47, 38.1; -31.8, 48.1; -10.1, 58; 22.1, 68; 68.7, 78.1; 80 - , 80], style(color=0)), - Line(points=[-90, 0; 68, 0], style(color=8)), - Polygon(points=[90, 0; 68, 8; 68, -8; 90, 0], style(color=8, fillColor - =8)), - Text( - extent=[-6, -24; 66, -72], - string="log", - style(color=8))), + , 80], style(color=0)), + Line(points=[-90, 0; 68, 0], style(color=8)), + Polygon(points=[90, 0; 68, 8; 68, -8; 90, 0], style(color=8, fillColor= + 8)), + Text( + extent=[-6, -24; 66, -72], + string="log", + style(color=8))), Diagram( - Line(points=[-80, 80; -88, 80], style(color=8)), - Line(points=[-80, -80; -88, -80], style(color=8)), - Line(points=[-80, -90; -80, 84], style(color=8)), - Text( - extent=[-67, 98; -40, 80], - string="outPort", - style(color=9)), - Polygon(points=[-80, 100; -86, 84; -74, 84; -80, 100], style(color=8, - fillColor=8)), - Line(points=[-100, 0; 84, 0], style(color=8)), - Polygon(points=[100, 0; 84, 6; 84, -6; 100, 0], style(color=8, - fillColor=8)), + Line(points=[-80, 80; -88, 80], style(color=8)), + Line(points=[-80, -80; -88, -80], style(color=8)), + Line(points=[-80, -90; -80, 84], style(color=8)), + Text( + extent=[-67, 98; -40, 80], + string="outPort", + style(color=9)), + Polygon(points=[-80, 100; -86, 84; -74, 84; -80, 100], style(color=8, + fillColor=8)), + Line(points=[-100, 0; 84, 0], style(color=8)), + Polygon(points=[100, 0; 84, 6; 84, -6; 100, 0], style(color=8, + fillColor=8)), Line(points=[-80, -80; -79.2, -50.6; -78.4, -37; -77.6, -28; -76.8, - 21.3; -75.2, -11.4; -72.8, -1.31; -69.5, 8.08; -64.7, 17.9; -57.5 , 28; -47, 38.1; -31.8, 48.1; -10.1, 58; 22.1, 68; 68.7, 78.1; 80 - , 80], style(color=0)), - Text(extent=[-105, 72; -85, 88], string="3"), - Text(extent=[-109, -88; -89, -72], string="-3"), - Text(extent=[70, -3; 90, -23], string="20"), - Text(extent=[-78, -1; -58, -21], string="1"), - Text( - extent=[68, 28; 94, 8], - string="inPort", - style(color=9))), - Documentation(info=" - + , 80], style(color=0)), + Text(extent=[-105, 72; -85, 88], string="3"), + Text(extent=[-109, -88; -89, -72], string="-3"), + Text(extent=[70, -3; 90, -23], string="20"), + Text(extent=[-78, -1; -58, -21], string="1"), + Text( + extent=[68, 28; 94, 8], + string="inPort", + style(color=9))), + Documentation(info="

      -This blocks computes the output y=outPort.signal element-wise as the -natural (base e) logarithm of the input u=inPort.signal: +This block computes the output y=outPort.signal element-wise as the +natural (base e) logarithm of the input u=inPort.signal:

      -
      -    y[i] = log( u[i] );
      +
          y[i] = log( u[i] );
       

      @@ -1873,80 +1679,68 @@ zero or negative.

      Release Notes:

      -"), - Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), - Window( - x=0.38, - y=0.23, - width=0.6, - height=0.6)); - equation +")); + equation y = Modelica.Math.log(u); end Log; - + block Log10 "Output the base 10 logarithm of the input (input > 0 required)" - - + extends Interfaces.MIMOs; annotation ( Icon( - Polygon(points=[90, 0; 68, 8; 68, -8; 90, 0], style(color=8, fillColor - =8)), - Line(points=[-90, 0; 68, 0], style(color=8)), - Line(points=[-79.8, -80; -79.2, -50.6; -78.4, -37; -77.6, -28; -76.8, - -21.3; -75.2, -11.4; -72.8, -1.31; -69.5, 8.08; -64.7, 17.9; - - 57.5, 28; -47, 38.1; -31.8, 48.1; -10.1, 58; 22.1, 68; 68.7, 78.1 - ; 80, 80], style(color=0)), - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-80, -80; -80, 68], style(color=8)), - Text( - extent=[-30, -22; 60, -70], - string="log10", - style(color=8))), + Polygon(points=[90, 0; 68, 8; 68, -8; 90, 0], style(color=8, fillColor= + 8)), + Line(points=[-90, 0; 68, 0], style(color=8)), + Line(points=[-79.8, -80; -79.2, -50.6; -78.4, -37; -77.6, -28; -76.8, - + 21.3; -75.2, -11.4; -72.8, -1.31; -69.5, 8.08; -64.7, 17.9; -57.5 + , 28; -47, 38.1; -31.8, 48.1; -10.1, 58; 22.1, 68; 68.7, 78.1; 80 + , 80], style(color=0)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-80, -80; -80, 68], style(color=8)), + Text( + extent=[-30, -22; 60, -70], + string="log10", + style(color=8))), Diagram( - Line(points=[-80, 80; -88, 80], style(color=8)), - Line(points=[-80, -80; -88, -80], style(color=8)), - Line(points=[-80, -90; -80, 84], style(color=8)), - Text( - extent=[-65, 96; -38, 78], - string="outPort", - style(color=9)), - Polygon(points=[-80, 100; -86, 84; -74, 84; -80, 100], style(color=8, - fillColor=8)), - Line(points=[-100, 0; 84, 0], style(color=8)), - Polygon(points=[100, 0; 84, 6; 84, -6; 100, 0], style(color=8, - fillColor=8)), - Line(points=[-79.8, -80; -79.2, -50.6; -78.4, -37; -77.6, -28; -76.8, - -21.3; -75.2, -11.4; -72.8, -1.31; -69.5, 8.08; -64.7, 17.9; - - 57.5, 28; -47, 38.1; -31.8, 48.1; -10.1, 58; 22.1, 68; 68.7, 78.1 - ; 80, 80], style(color=0)), - Text(extent=[70, -3; 90, -23], string="20"), - Text(extent=[-78, -1; -58, -21], string="1"), - Text(extent=[-109, 72; -89, 88], string=" 1.3"), - Text(extent=[-109, -88; -89, -72], string="-1.3"), - Text( - extent=[62, 30; 90, 10], - string="inPort", - style(color=9))), - Documentation(info=" - + Line(points=[-80, 80; -88, 80], style(color=8)), + Line(points=[-80, -80; -88, -80], style(color=8)), + Line(points=[-80, -90; -80, 84], style(color=8)), + Text( + extent=[-65, 96; -38, 78], + string="outPort", + style(color=9)), + Polygon(points=[-80, 100; -86, 84; -74, 84; -80, 100], style(color=8, + fillColor=8)), + Line(points=[-100, 0; 84, 0], style(color=8)), + Polygon(points=[100, 0; 84, 6; 84, -6; 100, 0], style(color=8, + fillColor=8)), + Line(points=[-79.8, -80; -79.2, -50.6; -78.4, -37; -77.6, -28; -76.8, - + 21.3; -75.2, -11.4; -72.8, -1.31; -69.5, 8.08; -64.7, 17.9; -57.5 + , 28; -47, 38.1; -31.8, 48.1; -10.1, 58; 22.1, 68; 68.7, 78.1; 80 + , 80], style(color=0)), + Text(extent=[70, -3; 90, -23], string="20"), + Text(extent=[-78, -1; -58, -21], string="1"), + Text(extent=[-109, 72; -89, 88], string=" 1.3"), + Text(extent=[-109, -88; -89, -72], string="-1.3"), + Text( + extent=[62, 30; 90, 10], + string="inPort", + style(color=9))), + Documentation(info="

      -This blocks computes the output y=outPort.signal element-wise as the -base 10 logarithm of the input u=inPort.signal: +This block computes the output y=outPort.signal element-wise as the +base 10 logarithm of the input u=inPort.signal:

      -
      -    y[i] = log10( u[i] );
      +
          y[i] = log10( u[i] );
       

      @@ -1957,24 +1751,188 @@ zero or negative.

      Release Notes:

      -"), - Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), - Window( - x=0.27, - y=0.11, - width=0.6, - height=0.6)); - equation +")); + equation y = Modelica.Math.log10(u); end Log10; - + + block RealToInteger "Convert real to integer signals" + extends Interfaces.IntegerBlockIcon; + parameter Integer n=1 "Number of input and output signals"; + protected + Real u[n]; + annotation (Icon( + Text(extent=[-100, 60; 0, -60], string="R"), + Text( + extent=[20, 60; 120, -60], + string="I", + style(color=45)), + Polygon(points=[50, 0; 30, 20; 30, 10; 00, 10; 0, -10; 30, -10; 30, -20 + ; 50, 0], style(color=45, fillColor=45))), Documentation(info=" +

      +This block computes the output y=outPort.signal element-wise +as nearest integer value of the input u=inPort.signal: +

      + +
          y[i] = integer( floor( u[i] + 0.5 ) )  for  u[i] > 0;
      +    y[i] = integer( ceil ( u[i] - 0.5 ) )  for  u[i] < 0;
      +
      + +")); + public + Interfaces.InPort inPort(final n=n) annotation (extent=[-140, -20; -100, 20 + ]); + Interfaces.IntegerOutPort outPort(final n=n) annotation (extent=[100, -10; + 120, 10]); + equation + u = inPort.signal; + for i in 1:n loop + outPort.signal[i] = if (u[i] > 0) then integer(floor(u[i] + 0.5)) else + integer(ceil(u[i] - 0.5)); + end for; + end RealToInteger; + + block IntegerToReal "Convert integer to real signals" + extends Interfaces.BlockIcon; + parameter Integer n=1 + "Number of input signals (= number of output signals)"; + annotation (Icon( + Text( + extent=[-120, 60; -20, -60], + string="I", + style(color=45)), + Text(extent=[0, 60; 100, -60], string="R"), + Polygon(points=[10, 0; -10, 20; -10, 10; -40, 10; -40, -10; -10, -10; - + 10, -20; 10, 0], style(fillColor=73))), Documentation(info=" +

      +This block computes the output y=outPort.signal element-wise +as Real equivalent of the Integer input u=inPort.signal: +

      + +
          y[i] = u[i];
      +
      + +

      where u is of Integer and y of Real type.

      + +")); + Interfaces.OutPort outPort(final n=n) annotation (extent=[100, -10; 120, 10 + ]); + Interfaces.IntegerInPort inPort(final n=n) annotation (extent=[-140, -20; - + 100, 20]); + equation + outPort.signal = inPort.signal; + end IntegerToReal; + + block Max "Pass through the largest signal" + extends Interfaces.MI2MO; + annotation (Icon(Text( + extent=[-90, 36; 90, -36], + style(color=9), + string="max()")), Documentation(info=" +

      +This block computes the output y=outPort.signal element-wise +as maximum of the two inputs u1=inPort1.signal and u2=inPort2.signal: +

      + +
          y[i] = max ( u1[i] , u2[i] );
      +
      + +")); + equation + for i in 1:n loop + y[i] = max(u1[i], u2[i]); + end for; + end Max; + + block Min "Pass through the smallest signal" + extends Interfaces.MI2MO; + annotation (Icon(Text( + extent=[-90, 36; 90, -36], + style(color=9), + string="min()")), Documentation(info=" +

      +This block computes the output y=outPort.signal element-wise +as minimum of the two inputs u1=inPort1.signal and u2=inPort2.signal: +

      + +
          y[i] = min ( u1[i] , u2[i] );
      +
      + +")); + equation + for i in 1:n loop + y[i] = min(u1[i], u2[i]); + end for; + end Min; + + block Edge "Indicates rising edge of boolean signal" + extends Interfaces.BooleanMIMOs; + annotation (Icon(Text( + extent=[-90, 36; 90, -36], + style(color=9), + string="edge()")), Documentation(info=" +

      +This block sets the Boolean output y=outPort.signal element-wise +to true, when the Boolean input u=inPort.signal shows a rising edge: +

      + +
          y[i] = edge( u[i] );
      +
      + +")); + equation + for i in 1:n loop + y[i] = edge(u[i]); + end for; + annotation (Icon); + end Edge; + + block BooleanChange "Indicates boolean signal changing" + extends Interfaces.BooleanMIMOs; + annotation (Icon(Text( + extent=[-90, 36; 90, -36], + style(color=9), + string="change()")), Documentation(info=" +

      +This block sets the Boolean output y=outPort.signal element-wise +to true, when the Boolean input u=inPort.signal shows a rising +or falling edge, i.e., when the signal changes: +

      + +
          y[i] = change( u[i] );
      +
      + +")); + equation + for i in 1:n loop + y[i] = change(u[i]); + end for; + end BooleanChange; + + block IntegerChange "Indicates integer signal changing" + extends Interfaces.IntegerMIBooleanMOs; + annotation (Icon(Text( + extent=[-90, 36; 90, -36], + style(color=9), + string="change()")), Documentation(info=" +

      +This block sets the Boolean output y=outPort.signal element-wise +to true, when the Integer input u=inPort.signal changes: +

      + +
          y[i] = change( u[i] );
      +
      + +")); + equation + for i in 1:n loop + y[i] = change(u[i]); + end for; + end IntegerChange; end Math; diff --git a/Blocks/Nonlinear.mo b/Blocks/Nonlinear.mo index 3e400b044a..b62dd3b320 100644 --- a/Blocks/Nonlinear.mo +++ b/Blocks/Nonlinear.mo @@ -1,22 +1,15 @@ -package Nonlinear - "Discontinuous or non-differentiable algebraic control blocks" +package Nonlinear + "Discontinuous or non-differentiable algebraic control blocks" + extends Modelica.Icons.Library; - package Interfaces = Modelica.Blocks.Interfaces ; - - annotation ( - Coordsys( - extent=[0, 0; 268, 370], - grid=[1, 1], - component=[20, 20]), - Window( - x=0.03, - y=0.04, + + annotation (Window( + x=0.05, + y=0.1, width=0.21, - height=0.41, + height=0.23, library=1, - autolayout=1), - Documentation(info=" - + autolayout=1),Documentation(info="

      This package contains discontinuous and non-differentiable, algebraic input/output blocks. @@ -24,13 +17,14 @@ In particular the following blocks are provided:

      -   Limiter       Limit the range of a signal.
      -   DeadZone      Provide a region of zero output.
      +   Limiter           Limit the range of a signal to fixed limits.
      +   VariableLimiter   Limit the range of a signal to variable limits.
      +   DeadZone          Provide a region of zero output.
       
      Main Author: -
      Martin Otter
      +
      Martin Otter
      Deutsches Zentrum fuer Luft und Raumfahrt e.V. (DLR)
      Oberpfaffenhofen
      Postfach 1116
      @@ -41,8 +35,11 @@ In particular the following blocks are provided:

      Release Notes:

        +
      • October 21, 2002 + by Christian Schweiger:
        + New block VariableLimiter added.
      • August 22, 1999 - by Martin Otter:
        + by Martin Otter:
        Realized, based on an existing Dymola library of Dieter Moormann and Hilding Elmqvist.
      • @@ -50,104 +47,179 @@ In particular the following blocks are provided:
        -

        Copyright (C) 1999, Modelica Design Group and DLR.

        +

        Copyright © 1999-2002, Modelica Association and DLR.

        The Modelica package is free software; it can be redistributed and/or modified under the terms of the Modelica license, see the license conditions -and the accompanying disclaimer in the documentation of package +and the accompanying disclaimer in the documentation of package Modelica in file \"Modelica/package.mo\".

        ")); - block Limiter "Limit the range of a signal" + block Limiter "Limit the range of a signal" parameter Real uMax[:]={1} "Upper limits of input signals"; - parameter Real uMin[size(uMax, 1)](max=uMax) = -uMax + parameter Real uMin[size(uMax, 1)](max=uMax) = -uMax "Lower limits of input signals"; extends Interfaces.MIMOs(final n=size(uMax, 1)); - + annotation ( Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[2, 2], + component=[20, 20]), Window( - x=0.22, - y=0.06, - width=0.43, - height=0.51), - Documentation(info=" - + x=0.22, + y=0.06, + width=0.43, + height=0.51), + Documentation(info="

        The Limiter block passes its input signal as output signal as long as the input is within the specified upper and lower -limits. If this is not the case, the corresponding limits are passed +limits. If this is not the case, the corresponding limit is passed as output.

        -"), +"), Icon( - Line(points=[0, -90; 0, 68], style(color=8)), - Polygon(points=[0, 90; -8, 68; 8, 68; 0, 90], style(color=8, fillColor - =8)), - Line(points=[-90, 0; 68, 0], style(color=8)), - Polygon(points=[90, 0; 68, -8; 68, 8; 90, 0], style(color=8, fillColor - =8)), - Line(points=[-80, -70; -50, -70; 50, 70; 80, 70], style(color=0)), + Line(points=[0, -90; 0, 68], style(color=8)), + Polygon(points=[0, 90; -8, 68; 8, 68; 0, 90], style(color=8, fillColor= + 8)), + Line(points=[-90, 0; 68, 0], style(color=8)), + Polygon(points=[90, 0; 68, -8; 68, 8; 90, 0], style(color=8, fillColor= + 8)), + Line(points=[-80, -70; -50, -70; 50, 70; 80, 70], style(color=0)), Text( - extent=[-150, -150; 150, -110], - string="uMax=%uMax", - style(color=0)), - Text(extent=[-150, 150; 150, 110], string="%name")), + extent=[-150, -150; 150, -110], + string="uMax=%uMax", + style(color=0)), + Text(extent=[-150, 150; 150, 110], string="%name")), Diagram( - Line(points=[0, -60; 0, 50], style(color=8)), - Polygon(points=[0, 60; -5, 50; 5, 50; 0, 60], style(color=8, fillColor - =8)), - Line(points=[-60, 0; 50, 0], style(color=8)), - Polygon(points=[60, 0; 50, -5; 50, 5; 60, 0], style(color=8, fillColor - =8)), - Line(points=[-50, -40; -30, -40; 30, 40; 50, 40], style(color=0)), + Line(points=[0, -60; 0, 50], style(color=8)), + Polygon(points=[0, 60; -5, 50; 5, 50; 0, 60], style(color=8, fillColor= + 8)), + Line(points=[-60, 0; 50, 0], style(color=8)), + Polygon(points=[60, 0; 50, -5; 50, 5; 60, 0], style(color=8, fillColor= + 8)), + Line(points=[-50, -40; -30, -40; 30, 40; 50, 40], style(color=0)), Text( - extent=[46, -6; 68, -18], - string="inPort", - style(color=10)), + extent=[46, -6; 68, -18], + string="inPort", + style(color=10)), Text( - extent=[-30, 70; -5, 50], - string="outPort", - style(color=10)), + extent=[-30, 70; -5, 50], + string="outPort", + style(color=10)), Text( - extent=[-58, -54; -28, -42], - string="uMin", - style(color=10)), + extent=[-58, -54; -28, -42], + string="uMin", + style(color=10)), Text( - extent=[26, 40; 66, 56], - string="uMax", + extent=[26, 40; 66, 56], + string="uMax", style(color=10)))); - equation + equation for i in 1:n loop - y[i] = if u[i] > uMax[i] then uMax[i] else if u[i] < uMin[i] then uMin[i - ] else u[i]; + y[i] = if u[i] > uMax[i] then uMax[i] else if u[i] < uMin[i] then uMin[i] + else u[i]; end for; end Limiter; - block DeadZone "Provide a region of zero output" + + block VariableLimiter "Limit the range of a signal with variable limits" + extends Interfaces.MIMOs; + + Interfaces.InPort limit1(final n=n) annotation (extent=[-140, 60; -100, 100 + ]); + Interfaces.InPort limit2(final n=n) annotation (extent=[-140, -100; -100, - + 60]); + protected + Real uMax[n]; + Real uMin[n]; + + annotation ( + Documentation(info=" +

        +The Limiter block passes its input signal as output signal +as long as the input is within the upper and lower +limits specified by the two additional inputs limit1 and +limit2. If this is not the case, the corresponding limit +is passed as output. +

        + +"), + Icon( + Line(points=[0, -90; 0, 68], style(color=8)), + Line(points=[-90, 0; 68, 0], style(color=8)), + Polygon(points=[90, 0; 68, -8; 68, 8; 90, 0], style(color=8, fillColor= + 8)), + Line(points=[-80, -70; -50, -70; 50, 70; 80, 70], style(color=0)), + Text(extent=[-150, 150; 150, 110], string="%name"), + Line(points=[-100, 80; 66, 80; 66, 70], style(fillPattern=1)), + Line(points=[-100, -80; -64, -80; -64, -70], style(fillPattern=1)), + Polygon(points=[-64, -70; -66, -74; -62, -74; -64, -70], style( + fillPattern=1)), + Polygon(points=[66, 70; 64, 74; 68, 74; 66, 70], style(fillPattern=1)) + , + Polygon(points=[0, 90; -8, 68; 8, 68; 0, 90], style(color=8, fillColor= + 8))), + Diagram( + Line(points=[0, -60; 0, 50], style(color=8)), + Polygon(points=[0, 60; -5, 50; 5, 50; 0, 60], style(color=8, fillColor= + 8)), + Line(points=[-60, 0; 50, 0], style(color=8)), + Polygon(points=[60, 0; 50, -5; 50, 5; 60, 0], style(color=8, fillColor= + 8)), + Line(points=[-50, -40; -30, -40; 30, 40; 50, 40], style(color=0)), + Text( + extent=[46, -6; 68, -18], + string="inPort", + style(color=10)), + Text( + extent=[-30, 70; -5, 50], + string="outPort", + style(color=10)), + Text( + extent=[-66, -40; -26, -20], + string="uMin", + style(color=10)), + Text( + extent=[30, 20; 70, 40], + string="uMax", + style(color=10)), + Line(points=[-100, 80; 40, 80; 40, 40]), + Line(points=[-100, -80; -40, -80; -40, -40]), + Polygon(points=[40, 40; 35, 50; 45, 50; 40, 40], style(fillPattern=1)) + , + Polygon(points=[-40, -40; -45, -50; -35, -50; -40, -40], style( + fillPattern=1)))); + equation + for i in 1:n loop + uMax[i] = max(limit1.signal[i], limit2.signal[i]); + uMin[i] = min(limit1.signal[i], limit2.signal[i]); + y[i] = if u[i] > uMax[i] then uMax[i] else if u[i] < uMin[i] then uMin[i] + else u[i]; + end for; + end VariableLimiter; + + block DeadZone "Provide a region of zero output" parameter Real uMax[:]={1} "Upper limits of dead zones"; - parameter Real uMin[size(uMax, 1)](max=uMax) = -uMax + parameter Real uMin[size(uMax, 1)](max=uMax) = -uMax "Lower limits of dead zones"; extends Interfaces.MIMOs(final n=size(uMax, 1)); - + annotation ( Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Window( - x=0.39, - y=0.18, - width=0.56, - height=0.6), - Documentation(info=" - -

        + x=0.39, + y=0.18, + width=0.56, + height=0.6), + Documentation(info=" +

        The DeadZone block defines a region of zero output.

        @@ -157,49 +229,48 @@ is zero. Outside of this zone, the output is a linear function of the input with a slope of 1.

        -"), +"), Icon( - Line(points=[0, -90; 0, 68], style(color=8)), - Polygon(points=[0, 90; -8, 68; 8, 68; 0, 90], style(color=8, fillColor - =8)), - Line(points=[-90, 0; 68, 0], style(color=8)), - Polygon(points=[90, 0; 68, -8; 68, 8; 90, 0], style(color=8, fillColor - =8)), - Line(points=[-80, -60; -20, 0; 20, 0; 80, 60], style(color=0)), + Line(points=[0, -90; 0, 68], style(color=8)), + Polygon(points=[0, 90; -8, 68; 8, 68; 0, 90], style(color=8, fillColor= + 8)), + Line(points=[-90, 0; 68, 0], style(color=8)), + Polygon(points=[90, 0; 68, -8; 68, 8; 90, 0], style(color=8, fillColor= + 8)), + Line(points=[-80, -60; -20, 0; 20, 0; 80, 60], style(color=0)), Text( - extent=[-150, -150; 150, -110], - string="uMax=%uMax", - style(color=9)), - Text(extent=[-150, 150; 150, 110], string="%name")), + extent=[-150, -150; 150, -110], + string="uMax=%uMax", + style(color=9)), + Text(extent=[-150, 150; 150, 110], string="%name")), Diagram( - Line(points=[0, -60; 0, 50], style(color=8)), - Polygon(points=[0, 60; -5, 50; 5, 50; 0, 60], style(color=8, fillColor - =8)), - Line(points=[-76, 0; 74, 0], style(color=8)), - Polygon(points=[84, 0; 74, -5; 74, 5; 84, 0], style(color=8, fillColor - =8)), - Line(points=[-81, -40; -38, 0; 40, 0; 80, 40], style(color=0)), + Line(points=[0, -60; 0, 50], style(color=8)), + Polygon(points=[0, 60; -5, 50; 5, 50; 0, 60], style(color=8, fillColor= + 8)), + Line(points=[-76, 0; 74, 0], style(color=8)), + Polygon(points=[84, 0; 74, -5; 74, 5; 84, 0], style(color=8, fillColor= + 8)), + Line(points=[-81, -40; -38, 0; 40, 0; 80, 40], style(color=0)), Text( - extent=[62, -7; 88, -25], - string="inPort", - style(color=10)), + extent=[62, -7; 88, -25], + string="inPort", + style(color=10)), Text( - extent=[-36, 72; -5, 50], - string="outPort", - style(color=10)), + extent=[-36, 72; -5, 50], + string="outPort", + style(color=10)), Text( - extent=[-51, 1; -28, 19], - string="uMin", - style(color=10)), + extent=[-51, 1; -28, 19], + string="uMin", + style(color=10)), Text( - extent=[27, 21; 52, 5], - string="uMax", + extent=[27, 21; 52, 5], + string="uMax", style(color=10)))); - equation + equation for i in 1:n loop - y[i] = if u[i] > uMax[i] then u[i] - uMax[i] else if u[i] < uMin[i] - then u[i] - uMin[i] else 0; + y[i] = if u[i] > uMax[i] then u[i] - uMax[i] else if u[i] < uMin[i] then + u[i] - uMin[i] else 0; end for; end DeadZone; end Nonlinear; - diff --git a/Blocks/Sources.mo b/Blocks/Sources.mo index fb7312a6f7..f11420245e 100644 --- a/Blocks/Sources.mo +++ b/Blocks/Sources.mo @@ -1,32 +1,22 @@ +package Sources + "Signal source blocks generating Real, Integer and Boolean signals" - -package Sources "Signal source blocks generating Real and Boolean signals" extends Modelica.Icons.Library; - package Interfaces = Modelica.Blocks.Interfaces ; - package SIunits = Modelica.SIunits ; - - annotation ( - Coordsys( - extent=[0, 0; 289, 576], - grid=[1, 1], - component=[20, 20]), - Window( - x=0.03, - y=0.04, - width=0.29, - height=0.81, - library=1, - autolayout=1), - Documentation(info=" - + + annotation (Window( + x=0.06, + y=0.1, + width=0.43, + height=0.65, + library=1, + autolayout=1), + Documentation(info="

        This package contains source components, i.e., blocks which have only output signals. These blocks are used as signal generators.

        -

        -The following sources are provided to generate Real signals: -

        +

        The following sources are provided to generate Real signals:

           Clock             Generate actual time.
        @@ -39,15 +29,13 @@ The following sources are provided to generate Real signals:
           Pulse             Generate pulse signals.
           SawTooth          Generate sawtooth signals.
           Trapezoid         Generate trapezoidal signals.
        -  KinematicPTP      Generate an acceleration signal to move as fast as 
        +  KinematicPTP      Generate an acceleration signal to move as fast as
                             possible along a distance within given kinematic constraints.
        -  TimeTable         Generate a (possibly discontinuous) signal by 
        +  TimeTable         Generate a (possibly discontinuous) signal by
                             linear interpolation in a table.
        -
        -

        -The following sources are provided to generate Boolean signals: -

        +

        The following sources are provided to generate Boolean signals:

           BooleanConstant   Generate constant signals.
        @@ -56,6 +44,13 @@ The following sources are provided to generate Boolean signals:
           SampleTrigger     Generate sample triggers.
         
        +

        The following sources are provided to generate Integer signals:

        + +
        +  IntegerConstant   Generate constant signals.
        +  IntegerStep       Generate step signals.
        +
        +

        All sources are vectorized. This means that the output is a vector of signals. The number of outputs is in correspondance @@ -92,7 +87,6 @@ have at least the following two parameters: offset Value which is added to all signal values. startTime Start time of signal. For time < startTime, the output is set to offset. -

      @@ -104,7 +98,7 @@ usually requires a trimming calculation.

      Main Author: -
      Martin Otter
      +
      Martin Otter
      Deutsches Zentrum fuer Luft und Raumfahrt e.V. (DLR)
      Oberpfaffenhofen
      Postfach 1116
      @@ -115,1269 +109,1251 @@ usually requires a trimming calculation.

      Release Notes:


      -

      Copyright (C) 1999, Modelica Design Group, DLR and Fraunhofer-Gesellschaft.

      +

      Copyright © 1999-2002, Modelica Association, DLR and Fraunhofer-Gesellschaft.

      The Modelica package is free software; it can be redistributed and/or modified under the terms of the Modelica license, see the license conditions -and the accompanying disclaimer in the documentation of package +and the accompanying disclaimer in the documentation of package Modelica in file \"Modelica/package.mo\".

      ")); - block Clock "Generate actual time signals " + block Clock "Generate actual time signals " parameter Real offset[:]={0} "Offsets of output signals"; - parameter SIunits.Time startTime[:]={0} - "Output = offset for time < startTime"; - extends Interfaces.MO(final nout=max([size(offset, 1); size(startTime, 1)] - )); - protected + parameter SI.Time startTime[:]={0} "Output = offset for time < startTime"; + extends Interfaces.MO(final nout=max([size(offset, 1); size(startTime, 1)]) + ); + protected parameter Real p_offset[nout]=(if size(offset, 1) == 1 then ones(nout)* offset[1] else offset); - parameter SIunits.Time p_startTime[nout]=(if size(startTime, 1) == 1 then - ones(nout)*startTime[1] else startTime); - + parameter SI.Time p_startTime[nout]=(if size(startTime, 1) == 1 then ones( + nout)*startTime[1] else startTime); + annotation ( Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Window( - x=0.26, - y=0, - width=0.49, - height=0.59), + x=0.26, + y=0, + width=0.36, + height=0.52), Icon( - Text(extent=[-150, 150; 150, 110], string="%name"), - Ellipse(extent=[-80, 80; 80, -80], style(color=9)), - Line(points=[0, 80; 0, 60], style(color=9)), - Line(points=[80, 0; 60, 0], style(color=9)), - Line(points=[0, -80; 0, -60], style(color=9)), - Line(points=[-80, 0; -60, 0], style(color=9)), - Line(points=[37, 70; 26, 50], style(color=9)), - Line(points=[70, 38; 49, 26], style(color=9)), - Line(points=[71, -37; 52, -27], style(color=9)), - Line(points=[39, -70; 29, -51], style(color=9)), - Line(points=[-39, -70; -29, -52], style(color=9)), - Line(points=[-71, -37; -50, -26], style(color=9)), - Line(points=[-71, 37; -54, 28], style(color=9)), - Line(points=[-38, 70; -28, 51], style(color=9)), - Line(points=[0, 0; -50, 50], style(color=0, thickness=2)), - Line(points=[0, 0; 40, 0], style(color=0, thickness=2)), - Text( - extent=[-150, -150; 150, -110], - string="startTime=%startTime", - style(color=0))), + Ellipse(extent=[-80, 80; 80, -80], style(color=9)), + Line(points=[0, 80; 0, 60], style(color=9)), + Line(points=[80, 0; 60, 0], style(color=9)), + Line(points=[0, -80; 0, -60], style(color=9)), + Line(points=[-80, 0; -60, 0], style(color=9)), + Line(points=[37, 70; 26, 50], style(color=9)), + Line(points=[70, 38; 49, 26], style(color=9)), + Line(points=[71, -37; 52, -27], style(color=9)), + Line(points=[39, -70; 29, -51], style(color=9)), + Line(points=[-39, -70; -29, -52], style(color=9)), + Line(points=[-71, -37; -50, -26], style(color=9)), + Line(points=[-71, 37; -54, 28], style(color=9)), + Line(points=[-38, 70; -28, 51], style(color=9)), + Line(points=[0, 0; -50, 50], style(color=0, thickness=2)), + Line(points=[0, 0; 40, 0], style(color=0, thickness=2)), + Text( + extent=[-150, -150; 150, -110], + string="startTime=%startTime", + style(color=0))), Diagram( - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-80, 68; -80, -80], style(color=8)), - Line(points=[-80, 0; -10, 0; 60, 70], style(color=0, thickness=2)), - Line(points=[-90, -70; 82, -70], style(color=8)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-80, 68; -80, -80], style(color=8)), + Line(points=[-80, 0; -10, 0; 60, 70], style(color=0, thickness=2)), + Line(points=[-90, -70; 82, -70], style(color=8)), Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[-34, 0; -37, -13; -30, -13; -34, 0], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Line(points=[-34, -13; -34, -70], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), - Polygon(points=[-34, -69; -37, -56; -31, -56; -34, -69; -34, -69], + color=8, + pattern=1, + thickness=1, + arrow=0)), + Polygon(points=[-34, -69; -37, -56; -31, -56; -34, -69; -34, -69], style( - color=8, - fillColor=8, - fillPattern=1)), - Text( - extent=[-81, -25; -35, -43], - string="offset", - style(color=9)), - Text( - extent=[-33, -71; 13, -89], - string="startTime", - style(color=9)), - Text( - extent=[-66, 92; -25, 72], - string="outPort", - style(color=9)), - Text( - extent=[70, -80; 94, -100], - string="time", - style(color=9)), - Line(points=[-10, 0; -10, -70], style(color=8, pattern=2)), - Line(points=[-10, 0; 50, 0], style(color=8, pattern=2)), - Line(points=[50, 0; 50, 60], style(color=8, pattern=2)), - Text( - extent=[35, 33; 50, 23], - string="1", - style(color=9)), - Text( - extent=[14, 13; 32, 1], - string="1", + color=8, + fillColor=8, + fillPattern=1)), + Text( + extent=[-81, -25; -35, -43], + string="offset", + style(color=9)), + Text( + extent=[-33, -71; 13, -89], + string="startTime", + style(color=9)), + Text( + extent=[-66, 92; -25, 72], + string="outPort", + style(color=9)), + Text( + extent=[70, -80; 94, -100], + string="time", + style(color=9)), + Line(points=[-10, 0; -10, -70], style(color=8, pattern=2)), + Line(points=[-10, 0; 50, 0], style(color=8, pattern=2)), + Line(points=[50, 0; 50, 60], style(color=8, pattern=2)), + Text( + extent=[35, 33; 50, 23], + string="1", + style(color=9)), + Text( + extent=[14, 13; 32, 1], + string="1", style(color=9)))); - equation + equation for i in 1:nout loop - outPort.signal[i] = p_offset[i] + (if time < p_startTime[i] then 0 else + outPort.signal[i] = p_offset[i] + (if time < p_startTime[i] then 0 else time - p_startTime[i]); end for; end Clock; - block Constant "Generate constant signals of type Real" + + block Constant "Generate constant signals of type Real" parameter Real k[:]={1} "Constant output values"; extends Interfaces.MO(final nout=size(k, 1)); - + annotation ( Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[2, 2], + component=[20, 20]), Window( - x=0.29, - y=0.19, - width=0.6, - height=0.6), + x=0.29, + y=0.19, + width=0.6, + height=0.6), Icon( - Line(points=[-80, 68; -80, -80], style(color=8)), - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-90, -70; 82, -70], style(color=8)), - Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style(color=8, - fillColor=8)), - Line(points=[-80, 0; 80, 0], style(color=0)), - Text( - extent=[-150, -150; 150, -110], - string="k=%k", - style(color=0))), + Line(points=[-80, 68; -80, -80], style(color=8)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-90, -70; 82, -70], style(color=8)), + Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style(color=8, + fillColor=8)), + Line(points=[-80, 0; 80, 0], style(color=0)), + Text( + extent=[-150, -150; 150, -110], + string="k=%k", + style(color=0))), Diagram( - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-80, 68; -80, -80], style(color=8)), - Line(points=[-80, 0; 80, 0], style(color=0, thickness=2)), - Line(points=[-90, -70; 82, -70], style(color=8)), - Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style(color=8, - fillColor=8)), - Text( - extent=[-75, 94; -22, 76], - string="outPort", - style(color=9)), - Text( - extent=[70, -80; 94, -100], - string="time", - style(color=9)), - Text( - extent=[-101, 8; -81, -12], - string="k", + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-80, 68; -80, -80], style(color=8)), + Line(points=[-80, 0; 80, 0], style(color=0, thickness=2)), + Line(points=[-90, -70; 82, -70], style(color=8)), + Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style(color=8, + fillColor=8)), + Text( + extent=[-75, 94; -22, 76], + string="outPort", + style(color=9)), + Text( + extent=[70, -80; 94, -100], + string="time", + style(color=9)), + Text( + extent=[-101, 8; -81, -12], + string="k", style(color=9)))); - equation + equation outPort.signal = k; end Constant; - block Step "Generate step signals of type Real" + + block Step "Generate step signals of type Real" parameter Real height[:]={1} "Heights of steps"; - parameter Real offset[:]={0} "Offsets of output signals"; - parameter SIunits.Time startTime[:]={0} - "Output = offset for time < startTime"; - extends Interfaces.MO(final nout=max([size(height, 1); size(offset, 1); - size(startTime, 1)])); - protected + extends Interfaces.SignalSource(final nout=max([size(height, 1); size( + offset, 1); size(startTime, 1)])); + protected parameter Real p_height[nout]=(if size(height, 1) == 1 then ones(nout)* height[1] else height); parameter Real p_offset[nout]=(if size(offset, 1) == 1 then ones(nout)* offset[1] else offset); - parameter SIunits.Time p_startTime[nout]=(if size(startTime, 1) == 1 then - ones(nout)*startTime[1] else startTime); - annotation ( - Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), - Window( - x=0.38, - y=0.11, - width=0.6, - height=0.6), - Icon( - Line(points=[-80, 68; -80, -80], style(color=8)), - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-90, -70; 82, -70], style(color=8)), - Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style(color=8, - fillColor=8)), - Line(points=[-80, -70; 0, -70; 0, 50; 80, 50], style(color=0)), - Text( - extent=[-150, -150; 150, -110], - string="startTime=%startTime", - style(color=0))), - Diagram( - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-80, 68; -80, -80], style(color=8)), - Line(points=[-80, -18; 0, -18; 0, 50; 80, 50], style(color=0, - thickness=2)), - Line(points=[-90, -70; 82, -70], style(color=8)), - Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style(color=8, - fillColor=8)), - Text( - extent=[70, -80; 94, -100], - string="time", - style(color=9)), - Text( - extent=[-21, -72; 25, -90], - string="startTime", - style(color=9)), - Line(points=[0, -17; 0, -71], style(color=8, pattern=2)), - Text( - extent=[-68, -36; -22, -54], - string="offset", - style(color=9)), + parameter SI.Time p_startTime[nout]=(if size(startTime, 1) == 1 then ones( + nout)*startTime[1] else startTime); + annotation (Icon( + Line(points=[-80, 68; -80, -80], style(color=8)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-90, -70; 82, -70], style(color=8)), + Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style(color=8, + fillColor=8)), + Line(points=[-80, -70; 0, -70; 0, 50; 80, 50], style(color=0)), + Text( + extent=[-150, -150; 150, -110], + string="startTime=%startTime", + style(color=0))), Diagram( + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-80, 68; -80, -80], style(color=8)), + Line(points=[-80, -18; 0, -18; 0, 50; 80, 50], style(color=0, thickness + =2)), + Line(points=[-90, -70; 82, -70], style(color=8)), + Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style(color=8, + fillColor=8)), + Text( + extent=[70, -80; 94, -100], + string="time", + style(color=9)), + Text( + extent=[-21, -72; 25, -90], + string="startTime", + style(color=9)), + Line(points=[0, -17; 0, -71], style(color=8, pattern=2)), + Text( + extent=[-68, -36; -22, -54], + string="offset", + style(color=9)), Line(points=[-13, 50; -13, -17], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), - Polygon(points=[2, 50; -19, 50; 2, 50], style(color=8, pattern=2)), - Polygon(points=[-13, -17; -16, -4; -10, -4; -13, -17; -13, -17], style - ( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + pattern=1, + thickness=1, + arrow=0)), + Polygon(points=[2, 50; -19, 50; 2, 50], style(color=8, pattern=2)), + Polygon(points=[-13, -17; -16, -4; -10, -4; -13, -17; -13, -17], style( + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[-13, 50; -16, 37; -9, 37; -13, 50], style( - color=8, - fillColor=8, - fillPattern=1)), - Text( - extent=[-68, 26; -22, 8], - string="height", - style(color=9)), - Polygon(points=[-13, -69; -16, -56; -10, -56; -13, -69; -13, -69], + color=8, + fillColor=8, + fillPattern=1)), + Text( + extent=[-68, 26; -22, 8], + string="height", + style(color=9)), + Polygon(points=[-13, -69; -16, -56; -10, -56; -13, -69; -13, -69], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Line(points=[-13, -18; -13, -70], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), + color=8, + pattern=1, + thickness=1, + arrow=0)), Polygon(points=[-13, -18; -16, -31; -9, -31; -13, -18], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Text( - extent=[-72, 100; -31, 80], - string="outPort", + extent=[-72, 100; -31, 80], + string="outPort", style(color=9)))); - equation + equation for i in 1:nout loop - outPort.signal[i] = p_offset[i] + (if time < p_startTime[i] then 0 else + outPort.signal[i] = p_offset[i] + (if time < p_startTime[i] then 0 else p_height[i]); end for; end Step; - block Ramp "Generate ramp signals" + + block Ramp "Generate ramp signals" parameter Real height[:]={1} "Heights of ramps"; - parameter Real duration[:](min=Modelica.Constants.SMALL) = {2} - "Durations of ramps"; + parameter Real duration[:](min=Modelica.Constants.small) = {2} "Durations of ramps"; parameter Real offset[:]={0} "Offsets of output signals"; - parameter SIunits.Time startTime[:]={0} - "Output = offset for time < startTime"; - extends Interfaces.MO(final nout=max([size(height, 1); size(duration, 1); + parameter SI.Time startTime[:]={0} "Output = offset for time < startTime"; + extends Interfaces.MO(final nout=max([size(height, 1); size(duration, 1); size(offset, 1); size(startTime, 1)])); - protected + protected parameter Real p_height[nout]=(if size(height, 1) == 1 then ones(nout)* height[1] else height); - parameter Real p_duration[nout]=(if size(duration, 1) == 1 then ones(nout) - *duration[1] else duration); + parameter Real p_duration[nout]=(if size(duration, 1) == 1 then ones(nout)* + duration[1] else duration); parameter Real p_offset[nout]=(if size(offset, 1) == 1 then ones(nout)* offset[1] else offset); - parameter SIunits.Time p_startTime[nout]=(if size(startTime, 1) == 1 then - ones(nout)*startTime[1] else startTime); - + parameter SI.Time p_startTime[nout]=(if size(startTime, 1) == 1 then ones( + nout)*startTime[1] else startTime); + annotation ( Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Window( - x=0.19, - y=0.02, - width=0.59, - height=0.77), + x=0.19, + y=0.02, + width=0.59, + height=0.77), Icon( - Line(points=[-80, 68; -80, -80], style(color=8)), - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-90, -70; 82, -70], style(color=8)), + Line(points=[-80, 68; -80, -80], style(color=8)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-90, -70; 82, -70], style(color=8)), Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style( - color=8, - fillColor=8, - fillPattern=1)), - Line(points=[-80, -70; -40, -70; 31, 38], style(color=0)), - Text( - extent=[-150, -150; 150, -110], - string="duration=%duration", - style(color=0)), - Line(points=[31, 38; 86, 38], style(color=0))), + color=8, + fillColor=8, + fillPattern=1)), + Line(points=[-80, -70; -40, -70; 31, 38], style(color=0)), + Text( + extent=[-150, -150; 150, -110], + string="duration=%duration", + style(color=0)), + Line(points=[31, 38; 86, 38], style(color=0))), Diagram( - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-80, 68; -80, -80], style(color=8)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-80, 68; -80, -80], style(color=8)), Line(points=[-80, -20; -20, -20; 50, 50], style(color=0, thickness=2)) - , - Line(points=[-90, -70; 82, -70], style(color=8)), + , + Line(points=[-90, -70; 82, -70], style(color=8)), Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[-40, -20; -42, -30; -37, -30; -40, -20], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Line(points=[-40, -20; -40, -70], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), - Polygon(points=[-40, -70; -43, -60; -38, -60; -40, -70; -40, -70], + color=8, + pattern=1, + thickness=1, + arrow=0)), + Polygon(points=[-40, -70; -43, -60; -38, -60; -40, -70; -40, -70], style( - color=8, - fillColor=8, - fillPattern=1)), - Text( - extent=[-80, -33; -41, -49], - string="offset", - style(color=9)), - Text( - extent=[-40, -70; 6, -88], - string="startTime", - style(color=9)), - Text( - extent=[-66, 92; -25, 72], - string="outPort", - style(color=9)), - Text( - extent=[70, -80; 94, -100], - string="time", - style(color=9)), - Line(points=[-20, -20; -20, -70], style(color=8, pattern=2)), + color=8, + fillColor=8, + fillPattern=1)), + Text( + extent=[-80, -33; -41, -49], + string="offset", + style(color=9)), + Text( + extent=[-40, -70; 6, -88], + string="startTime", + style(color=9)), + Text( + extent=[-66, 92; -25, 72], + string="outPort", + style(color=9)), + Text( + extent=[70, -80; 94, -100], + string="time", + style(color=9)), + Line(points=[-20, -20; -20, -70], style(color=8, pattern=2)), Line(points=[-19, -20; 50, -20], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), - Line(points=[50, 50; 101, 50], style(color=0, thickness=2)), + color=8, + pattern=1, + thickness=1, + arrow=0)), + Line(points=[50, 50; 101, 50], style(color=0, thickness=2)), Line(points=[50, 50; 50, -20], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), + color=8, + pattern=1, + thickness=1, + arrow=0)), Polygon(points=[50, -20; 42, -18; 42, -22; 50, -20], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[-20, -20; -11, -18; -11, -22; -20, -20], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[50, 50; 48, 40; 53, 40; 50, 50], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[50, -20; 47, -10; 52, -10; 50, -20; 50, -20], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Text( - extent=[53, 25; 82, 7], - string="height", - style(color=9)), + extent=[53, 25; 82, 7], + string="height", + style(color=9)), Text( - extent=[0, -17; 35, -37], - string="duration", + extent=[0, -17; 35, -37], + string="duration", style(color=9)))); - equation + equation for i in 1:nout loop - outPort.signal[i] = p_offset[i] + (if time < p_startTime[i] then 0 else + outPort.signal[i] = p_offset[i] + (if time < p_startTime[i] then 0 else if time < (p_startTime[i] + p_duration[i]) then (time - p_startTime[i]) *p_height[i]/p_duration[i] else p_height[i]); end for; end Ramp; - block Sine "Generate sine signals" + + block Sine "Generate sine signals" parameter Real amplitude[:]={1} "Amplitudes of sine waves"; - parameter SIunits.Frequency freqHz[:]={1} "Frequencies of sine waves"; - parameter SIunits.Angle phase[:]={0} "Phases of sine waves"; + parameter SI.Frequency freqHz[:]={1} "Frequencies of sine waves"; + parameter SI.Angle phase[:]={0} "Phases of sine waves"; parameter Real offset[:]={0} "Offsets of output signals"; - parameter SIunits.Time startTime[:]={0} - "Output = offset for time < startTime"; - extends Interfaces.MO(final nout=max([size(amplitude, 1); size(freqHz, 1) - ; size(phase, 1); size(offset, 1); size(startTime, 1)])); - protected - constant Real pi=Modelica.Constants.PI; - parameter Real p_amplitude[nout]=(if size(amplitude, 1) == 1 then ones( - nout)*amplitude[1] else amplitude); + parameter SI.Time startTime[:]={0} "Output = offset for time < startTime"; + extends Interfaces.MO(final nout=max([size(amplitude, 1); size(freqHz, 1); + size(phase, 1); size(offset, 1); size(startTime, 1)])); + protected + constant Real pi=Modelica.Constants.pi; + parameter Real p_amplitude[nout]=(if size(amplitude, 1) == 1 then ones(nout + )*amplitude[1] else amplitude); parameter Real p_freqHz[nout]=(if size(freqHz, 1) == 1 then ones(nout)* freqHz[1] else freqHz); - parameter Real p_phase[nout]=(if size(phase, 1) == 1 then ones(nout)*phase - [1] else phase); + parameter Real p_phase[nout]=(if size(phase, 1) == 1 then ones(nout)*phase[ + 1] else phase); parameter Real p_offset[nout]=(if size(offset, 1) == 1 then ones(nout)* offset[1] else offset); - parameter SIunits.Time p_startTime[nout]=(if size(startTime, 1) == 1 then - ones(nout)*startTime[1] else startTime); + parameter SI.Time p_startTime[nout]=(if size(startTime, 1) == 1 then ones( + nout)*startTime[1] else startTime); annotation ( Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Window( - x=0.23, - y=0.08, - width=0.66, - height=0.68), + x=0.23, + y=0.08, + width=0.66, + height=0.68), Icon( - Line(points=[-80, 68; -80, -80], style(color=8)), - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-90, 0; 68, 0], style(color=8)), - Polygon(points=[90, 0; 68, 8; 68, -8; 90, 0], style(color=8, fillColor - =8)), - Line(points=[-80, 0; -68.7, 34.2; -61.5, 53.1; -55.1, 66.4; -49.4, - 74.6; -43.8, 79.1; -38.2, 79.8; -32.6, 76.6; -26.9, 69.7; -21.3, - 59.4; -14.9, 44.1; -6.83, 21.2; 10.1, -30.8; 17.3, -50.2; 23.7, - - 64.2; 29.3, -73.1; 35, -78.4; 40.6, -80; 46.2, -77.6; 51.9, -71.5 - ; 57.5, -61.9; 63.9, -47.2; 72, -24.8; 80, 0], style(color=0)), - Text( - extent=[-147, -152; 153, -112], - string="freqHz=%freqHz", - style(color=0))), + Line(points=[-80, 68; -80, -80], style(color=8)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-90, 0; 68, 0], style(color=8)), + Polygon(points=[90, 0; 68, 8; 68, -8; 90, 0], style(color=8, fillColor= + 8)), + Line(points=[-80, 0; -68.7, 34.2; -61.5, 53.1; -55.1, 66.4; -49.4, 74.6 + ; -43.8, 79.1; -38.2, 79.8; -32.6, 76.6; -26.9, 69.7; -21.3, 59.4 + ; -14.9, 44.1; -6.83, 21.2; 10.1, -30.8; 17.3, -50.2; 23.7, -64.2 + ; 29.3, -73.1; 35, -78.4; 40.6, -80; 46.2, -77.6; 51.9, -71.5; + 57.5, -61.9; 63.9, -47.2; 72, -24.8; 80, 0], style(color=0)), + Text( + extent=[-147, -152; 153, -112], + string="freqHz=%freqHz", + style(color=0))), Diagram( - Line(points=[-80, -90; -80, 84], style(color=8)), - Polygon(points=[-80, 100; -86, 84; -74, 84; -80, 100], style(color=8, - fillColor=8)), - Line(points=[-99, -40; 85, -40], style(color=8)), - Polygon(points=[101, -40; 85, -34; 85, -46; 101, -40], style(color=8, - fillColor=8)), - Line(points=[-40, 0; -31.6, 34.2; -26.1, 53.1; -21.3, 66.4; -17.1, - 74.6; -12.9, 79.1; -8.64, 79.8; -4.42, 76.6; -0.201, 69.7; 4.02, - 59.4; 8.84, 44.1; 14.9, 21.2; 27.5, -30.8; 33, -50.2; 37.8, -64.2 - ; 42, -73.1; 46.2, -78.4; 50.5, -80; 54.7, -77.6; 58.9, -71.5; - 63.1, -61.9; 67.9, -47.2; 74, -24.8; 80, 0], style(color=0, - thickness=2)), - Line(points=[-41, -2; -80, -2], style(color=0, thickness=2)), - Text( - extent=[-128, 7; -82, -11], - string="offset", - style(color=9)), - Line(points=[-41, -2; -41, -40], style(color=8, pattern=2)), - Text( - extent=[-60, -43; -14, -61], - string="startTime", - style(color=9)), - Text( - extent=[84, -52; 108, -72], - string="time", - style(color=9)), - Text( - extent=[-74, 106; -33, 86], - string="outPort", - style(color=9)), - Line(points=[-9, 79; 43, 79], style(color=8, pattern=2)), - Line(points=[-42, -1; 50, 0], style(color=8, pattern=2)), + Line(points=[-80, -90; -80, 84], style(color=8)), + Polygon(points=[-80, 100; -86, 84; -74, 84; -80, 100], style(color=8, + fillColor=8)), + Line(points=[-99, -40; 85, -40], style(color=8)), + Polygon(points=[101, -40; 85, -34; 85, -46; 101, -40], style(color=8, + fillColor=8)), + Line(points=[-40, 0; -31.6, 34.2; -26.1, 53.1; -21.3, 66.4; -17.1, 74.6 + ; -12.9, 79.1; -8.64, 79.8; -4.42, 76.6; -0.201, 69.7; 4.02, 59.4 + ; 8.84, 44.1; 14.9, 21.2; 27.5, -30.8; 33, -50.2; 37.8, -64.2; 42 + , -73.1; 46.2, -78.4; 50.5, -80; 54.7, -77.6; 58.9, -71.5; 63.1, + -61.9; 67.9, -47.2; 74, -24.8; 80, 0], style(color=0, thickness=2 + )), + Line(points=[-41, -2; -80, -2], style(color=0, thickness=2)), + Text( + extent=[-128, 7; -82, -11], + string="offset", + style(color=9)), + Line(points=[-41, -2; -41, -40], style(color=8, pattern=2)), + Text( + extent=[-60, -43; -14, -61], + string="startTime", + style(color=9)), + Text( + extent=[84, -52; 108, -72], + string="time", + style(color=9)), + Text( + extent=[-74, 106; -33, 86], + string="outPort", + style(color=9)), + Line(points=[-9, 79; 43, 79], style(color=8, pattern=2)), + Line(points=[-42, -1; 50, 0], style(color=8, pattern=2)), Polygon(points=[33, 80; 30, 67; 37, 67; 33, 80], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Text( - extent=[37, 57; 83, 39], - string="amplitude", - style(color=9)), + extent=[37, 57; 83, 39], + string="amplitude", + style(color=9)), Polygon(points=[33, 1; 30, 14; 36, 14; 33, 1; 33, 1], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Line(points=[33, 79; 33, 0], style( - color=8, - pattern=1, - thickness=1, + color=8, + pattern=1, + thickness=1, arrow=0)))); - equation + equation for i in 1:nout loop - outPort.signal[i] = p_offset[i] + (if time < p_startTime[i] then 0 else - p_amplitude[i]*Modelica.Math.sin(2*pi*p_freqHz[i]*(time - p_startTime[i - ]) + p_phase[i])); + outPort.signal[i] = p_offset[i] + (if time < p_startTime[i] then 0 else + p_amplitude[i]*Modelica.Math.sin(2*pi*p_freqHz[i]*(time - p_startTime[i]) + + p_phase[i])); end for; end Sine; - block ExpSine "Generate exponentially damped sine signals" + + block ExpSine "Generate exponentially damped sine signals" parameter Real amplitude[:]={1} "Amplitudes of sine waves"; - parameter SIunits.Frequency freqHz[:]={2} "Frequencies of sine waves"; - parameter SIunits.Angle phase[:]={0} "Phases of sine waves"; - parameter SIunits.Damping damping[:]={1} - "Damping coefficients of sine waves"; + parameter SI.Frequency freqHz[:]={2} "Frequencies of sine waves"; + parameter SI.Angle phase[:]={0} "Phases of sine waves"; + parameter SI.Damping damping[:]={1} "Damping coefficients of sine waves"; parameter Real offset[:]={0} "Offsets of output signals"; - parameter SIunits.Time startTime[:]={0} - "Output = offset for time < startTime"; - extends Interfaces.MO(final nout=max([size(amplitude, 1); size(freqHz, 1) - ; size(phase, 1); size(damping, 1); size(offset, 1); size(startTime, - 1)])); - protected - constant Real pi=Modelica.Constants.PI; - parameter Real p_amplitude[nout]=(if size(amplitude, 1) == 1 then ones( - nout)*amplitude[1] else amplitude); + parameter SI.Time startTime[:]={0} "Output = offset for time < startTime"; + extends Interfaces.MO(final nout=max([size(amplitude, 1); size(freqHz, 1); + size(phase, 1); size(damping, 1); size(offset, 1); size(startTime, 1) + ])); + protected + constant Real pi=Modelica.Constants.pi; + parameter Real p_amplitude[nout]=(if size(amplitude, 1) == 1 then ones(nout + )*amplitude[1] else amplitude); parameter Real p_freqHz[nout]=(if size(freqHz, 1) == 1 then ones(nout)* freqHz[1] else freqHz); - parameter Real p_phase[nout]=(if size(phase, 1) == 1 then ones(nout)*phase - [1] else phase); + parameter Real p_phase[nout]=(if size(phase, 1) == 1 then ones(nout)*phase[ + 1] else phase); parameter Real p_damping[nout]=(if size(damping, 1) == 1 then ones(nout)* damping[1] else damping); parameter Real p_offset[nout]=(if size(offset, 1) == 1 then ones(nout)* offset[1] else offset); - parameter SIunits.Time p_startTime[nout]=(if size(startTime, 1) == 1 then - ones(nout)*startTime[1] else startTime); + parameter SI.Time p_startTime[nout]=(if size(startTime, 1) == 1 then ones( + nout)*startTime[1] else startTime); annotation ( Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Window( - x=0.18, - y=0.05, - width=0.6, - height=0.63), + x=0.18, + y=0.05, + width=0.6, + height=0.63), Icon( - Line(points=[-80, 68; -80, -80], style(color=8)), - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-90, 0; 68, 0], style(color=8)), - Polygon(points=[90, 0; 68, 8; 68, -8; 90, 0], style(color=8, fillColor - =8)), - Line(points=[-80, 0; -75.2, 32.3; -72, 50.3; -68.7, 64.5; -65.5, 74.2 - ; -62.3, 79.3; -59.1, 79.6; -55.9, 75.3; -52.7, 67.1; -48.6, 52.2 - ; -43, 25.8; -35, -13.9; -30.2, -33.7; -26.1, -45.9; -22.1, -53.2 - ; -18.1, -55.3; -14.1, -52.5; -10.1, -45.3; -5.23, -32.1; 8.44, - 13.7; 13.3, 26.4; 18.1, 34.8; 22.1, 38; 26.9, 37.2; 31.8, 31.8; - 38.2, 19.4; 51.1, -10.5; 57.5, -21.2; 63.1, -25.9; 68.7, -25.9; - 75.2, -20.5; 80, -13.8], style(color=0)), - Text( - extent=[-147, -152; 153, -112], - string="freqHz=%freqHz", - style(color=0))), + Line(points=[-80, 68; -80, -80], style(color=8)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-90, 0; 68, 0], style(color=8)), + Polygon(points=[90, 0; 68, 8; 68, -8; 90, 0], style(color=8, fillColor= + 8)), + Line(points=[-80, 0; -75.2, 32.3; -72, 50.3; -68.7, 64.5; -65.5, 74.2; + -62.3, 79.3; -59.1, 79.6; -55.9, 75.3; -52.7, 67.1; -48.6, 52.2; + -43, 25.8; -35, -13.9; -30.2, -33.7; -26.1, -45.9; -22.1, -53.2; + -18.1, -55.3; -14.1, -52.5; -10.1, -45.3; -5.23, -32.1; 8.44, + 13.7; 13.3, 26.4; 18.1, 34.8; 22.1, 38; 26.9, 37.2; 31.8, 31.8; + 38.2, 19.4; 51.1, -10.5; 57.5, -21.2; 63.1, -25.9; 68.7, -25.9; + 75.2, -20.5; 80, -13.8], style(color=0)), + Text( + extent=[-147, -152; 153, -112], + string="freqHz=%freqHz", + style(color=0))), Diagram( - Line(points=[-80, -90; -80, 84], style(color=8)), - Polygon(points=[-80, 100; -86, 84; -74, 84; -80, 100], style(color=8, - fillColor=8)), - Line(points=[-99, -40; 85, -40], style(color=8)), - Polygon(points=[101, -40; 85, -34; 85, -46; 101, -40], style(color=8, - fillColor=8)), - Line(points=[-50, 0; -46.1, 28.2; -43.5, 44; -40.9, 56.4; -38.2, 64.9 - ; -35.6, 69.4; -33, 69.6; -30.4, 65.9; -27.8, 58.7; -24.5, 45.7; - -19.9, 22.5; -13.4, -12.2; -9.5, -29.5; -6.23, -40.1; -2.96, - - 46.5; 0.302, -48.4; 3.57, -45.9; 6.83, -39.6; 10.8, -28.1; 21.9, - 12; 25.8, 23.1; 29.7, 30.5; 33, 33.3; 36.9, 32.5; 40.8, 27.8; 46 - , 16.9; 56.5, -9.2; 61.7, -18.6; 66.3, -22.7; 70.9, -22.6; 76.1, - -18; 80, -12.1], style(color=0, thickness=2)), - Text( - extent=[-106, 10; -83, -10], - string="offset", - style(color=9)), - Text( - extent=[-72, -36; -26, -54], - string="startTime", - style(color=9)), - Text( - extent=[84, -52; 108, -72], - string="time", - style(color=9)), - Text( - extent=[-79, 104; -39, 87], - string="outPort", - style(color=9)), - Line(points=[-50, 0; 18, 0], style(color=8, pattern=2)), - Line(points=[-50, 0; -81, 0], style(color=0, thickness=2)), - Line(points=[-50, 77; -50, 0], style(color=8, pattern=2)), - Line(points=[18, -1; 18, 76], style(color=8, pattern=2)), - Line(points=[18, 73; -50, 73], style(color=8)), - Text( - extent=[-42, 88; 9, 74], - string="1/freqHz", - style(color=9)), + Line(points=[-80, -90; -80, 84], style(color=8)), + Polygon(points=[-80, 100; -86, 84; -74, 84; -80, 100], style(color=8, + fillColor=8)), + Line(points=[-99, -40; 85, -40], style(color=8)), + Polygon(points=[101, -40; 85, -34; 85, -46; 101, -40], style(color=8, + fillColor=8)), + Line(points=[-50, 0; -46.1, 28.2; -43.5, 44; -40.9, 56.4; -38.2, 64.9; + -35.6, 69.4; -33, 69.6; -30.4, 65.9; -27.8, 58.7; -24.5, 45.7; - + 19.9, 22.5; -13.4, -12.2; -9.5, -29.5; -6.23, -40.1; -2.96, -46.5 + ; 0.302, -48.4; 3.57, -45.9; 6.83, -39.6; 10.8, -28.1; 21.9, 12; + 25.8, 23.1; 29.7, 30.5; 33, 33.3; 36.9, 32.5; 40.8, 27.8; 46, + 16.9; 56.5, -9.2; 61.7, -18.6; 66.3, -22.7; 70.9, -22.6; 76.1, - + 18; 80, -12.1], style(color=0, thickness=2)), + Text( + extent=[-106, 10; -83, -10], + string="offset", + style(color=9)), + Text( + extent=[-72, -36; -26, -54], + string="startTime", + style(color=9)), + Text( + extent=[84, -52; 108, -72], + string="time", + style(color=9)), + Text( + extent=[-79, 104; -39, 87], + string="outPort", + style(color=9)), + Line(points=[-50, 0; 18, 0], style(color=8, pattern=2)), + Line(points=[-50, 0; -81, 0], style(color=0, thickness=2)), + Line(points=[-50, 77; -50, 0], style(color=8, pattern=2)), + Line(points=[18, -1; 18, 76], style(color=8, pattern=2)), + Line(points=[18, 73; -50, 73], style(color=8)), + Text( + extent=[-42, 88; 9, 74], + string="1/freqHz", + style(color=9)), Polygon(points=[-49, 73; -40, 75; -40, 71; -49, 73], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[18, 73; 10, 75; 10, 71; 18, 73], style( - color=8, - fillColor=8, - fillPattern=1)), - Line(points=[-50, -61; -19, -61], style(color=8)), + color=8, + fillColor=8, + fillPattern=1)), + Line(points=[-50, -61; -19, -61], style(color=8)), Polygon(points=[-18, -61; -26, -59; -26, -63; -18, -61], style( - color=8, - fillColor=8, - fillPattern=1)), - Text( - extent=[-51, -63; -27, -75], - string="t", - style(color=9)), - Text( - extent=[-82, -67; 108, -96], - string="amplitude*exp(-damping*t)*sin(2*pi*freqHz*t+phase)", - style(color=9)), - Line(points=[-50, 0; -50, -40], style(color=8, pattern=2)), - Line(points=[-50, -54; -50, -72], style(color=8, pattern=2)), + color=8, + fillColor=8, + fillPattern=1)), + Text( + extent=[-51, -63; -27, -75], + string="t", + style(color=9)), + Text( + extent=[-82, -67; 108, -96], + string="amplitude*exp(-damping*t)*sin(2*pi*freqHz*t+phase)", + style(color=9)), + Line(points=[-50, 0; -50, -40], style(color=8, pattern=2)), + Line(points=[-50, -54; -50, -72], style(color=8, pattern=2)), Line(points=[-15, -77; -1, -48], style(color=8, pattern=2)))); - equation + equation for i in 1:nout loop - outPort.signal[i] = p_offset[i] + (if time < p_startTime[i] then 0 else - p_amplitude[i]*Modelica.Math.exp(-(time - p_startTime[i])*p_damping[i]) - *Modelica.Math.sin(2*pi*p_freqHz[i]*(time - p_startTime[i]) + p_phase[i - ])); + outPort.signal[i] = p_offset[i] + (if time < p_startTime[i] then 0 else + p_amplitude[i]*Modelica.Math.exp(-(time - p_startTime[i])*p_damping[i])*Modelica.Math.sin + (2*pi*p_freqHz[i]*(time - p_startTime[i]) + p_phase[i])); end for; end ExpSine; - model Exponentials "Generate a rising and falling exponential signal" + + block Exponentials "Generate a rising and falling exponential signal" parameter Real outMax[:]={1} "Height of output for infinite riseTime"; - parameter SIunits.Time riseTime[:](min=0) = {0.5} "Rise time"; - parameter SIunits.Time riseTimeConst[:](min=Modelica.Constants.SMALL) = { - 0.1} "Rise time constant"; - parameter SIunits.Time fallTimeConst[:](min=Modelica.Constants.SMALL) = - riseTimeConst "Fall time constant"; + parameter SI.Time riseTime[:](min=0) = {0.5} "Rise time"; + parameter SI.Time riseTimeConst[:](min=Modelica.Constants.small) = {0.1} + "Rise time constant"; + parameter SI.Time fallTimeConst[:](min=Modelica.Constants.small) = riseTimeConst + "Fall time constant"; parameter Real offset[:]={0} "Offsets of output signals"; - parameter SIunits.Time startTime[:]={0} - "Output = offset for time < startTime"; - extends Interfaces.MO(final nout=max([size(outMax, 1); size(riseTime, 1); + parameter SI.Time startTime[:]={0} "Output = offset for time < startTime"; + extends Interfaces.MO(final nout=max([size(outMax, 1); size(riseTime, 1); size(riseTimeConst, 1); size(fallTimeConst, 1); size(offset, 1); size (startTime, 1)])); - protected + protected parameter Real p_outMax[nout]=(if size(outMax, 1) == 1 then ones(nout)* outMax[1] else outMax); - parameter SIunits.Time p_riseTime[nout]=(if size(riseTime, 1) == 1 then - ones(nout)*riseTime[1] else riseTime); - parameter SIunits.Time p_riseTimeConst[nout]=(if size(riseTimeConst, 1) - == 1 then ones(nout)*riseTimeConst[1] else riseTimeConst); - parameter SIunits.Time p_fallTimeConst[nout]=(if size(fallTimeConst, 1) - == 1 then ones(nout)*fallTimeConst[1] else fallTimeConst); + parameter SI.Time p_riseTime[nout]=(if size(riseTime, 1) == 1 then ones( + nout)*riseTime[1] else riseTime); + parameter SI.Time p_riseTimeConst[nout]=(if size(riseTimeConst, 1) == 1 + then ones(nout)*riseTimeConst[1] else riseTimeConst); + parameter SI.Time p_fallTimeConst[nout]=(if size(fallTimeConst, 1) == 1 + then ones(nout)*fallTimeConst[1] else fallTimeConst); parameter Real p_offset[nout]=(if size(offset, 1) == 1 then ones(nout)* offset[1] else offset); - parameter SIunits.Time p_startTime[nout]=(if size(startTime, 1) == 1 then - ones(nout)*startTime[1] else startTime); + parameter SI.Time p_startTime[nout]=(if size(startTime, 1) == 1 then ones( + nout)*startTime[1] else startTime); Real y_riseTime[nout]; annotation ( Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Window( - x=0.03, - y=0.05, - width=0.85, - height=0.74), + x=0.03, + y=0.05, + width=0.85, + height=0.74), Icon( - Line(points=[-90, -70; 68, -70], style(color=8)), - Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style(color=8, - fillColor=8)), + Line(points=[-90, -70; 68, -70], style(color=8)), + Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style(color=8, + fillColor=8)), Line(points=[-80, -70; -77.2, -55.3; -74.3, -42.1; -70.8, -27.6; -67.3 - , -15; -63.7, -4.08; -59.5, 7.18; -55.3, 16.7; -50.3, 26; -44.6, + , -15; -63.7, -4.08; -59.5, 7.18; -55.3, 16.7; -50.3, 26; -44.6, 34.5; -38.3, 42.1; -31.2, 48.6; -22.7, 54.3; -12.1, 59.2; -10, 60 ; -7.88, 47.5; -5.05, 32.7; -2.22, 19.8; 0.606, 8.45; 4.14, -3.7 - ; 7.68, -14; 11.9, -24.2; 16.2, -32.6; 21.1, -40.5; 26.8, -47.4; + ; 7.68, -14; 11.9, -24.2; 16.2, -32.6; 21.1, -40.5; 26.8, -47.4; 33.1, -53.3; 40.9, -58.5; 50.8, -62.8; 60, -65.4], style(color=0) - ), - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-80, 68; -80, -80], style(color=8)), - Text( - extent=[-150, -150; 150, -110], - string="riseTime=%riseTime", - style(color=0))), + ), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-80, 68; -80, -80], style(color=8)), + Text( + extent=[-150, -150; 150, -110], + string="riseTime=%riseTime", + style(color=0))), Diagram( - Line(points=[-100, -70; 84, -70], style(color=8)), - Polygon(points=[100, -70; 84, -64; 84, -76; 100, -70], style(color=8, - fillColor=8)), - Line(points=[-40, -30; -37.2, -15.3; -34.3, -2.1; -30.8, 12.4; -27.3, - 25; -23.7, 35.92; -19.5, 47.18; -15.3, 56.7; -10.3, 66; -4.6, - 74.5; 1.7, 82.1; 8.8, 88.6; 17.3, 94.3; 27.9, 99.2; 30, 100; + Line(points=[-100, -70; 84, -70], style(color=8)), + Polygon(points=[100, -70; 84, -64; 84, -76; 100, -70], style(color=8, + fillColor=8)), + Line(points=[-40, -30; -37.2, -15.3; -34.3, -2.1; -30.8, 12.4; -27.3, + 25; -23.7, 35.92; -19.5, 47.18; -15.3, 56.7; -10.3, 66; -4.6, + 74.5; 1.7, 82.1; 8.8, 88.6; 17.3, 94.3; 27.9, 99.2; 30, 100; 32.12, 87.5; 34.95, 72.7; 37.78, 59.8; 40.606, 48.45; 44.14, 36.3 ; 47.68, 26; 51.9, 15.8; 56.2, 7.4; 61.1, -0.5; 66.8, -7.4; 73.1 - , -13.3; 80.9, -18.5; 90.8, -22.8; 100, -25.4], style(color=0, - thickness=2)), - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-80, 68; -80, -80], style(color=8)), - Text( - extent=[-70, 91; -29, 71], - string="outPort", - style(color=9)), - Text( - extent=[-78, -43; -46, -56], - string="offset", - style(color=9)), - Polygon(points=[-40, -70; -43, -60; -38, -60; -40, -70; -40, -70], + , -13.3; 80.9, -18.5; 90.8, -22.8; 100, -25.4], style(color=0, + thickness=2)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-80, 68; -80, -80], style(color=8)), + Text( + extent=[-70, 91; -29, 71], + string="outPort", + style(color=9)), + Text( + extent=[-78, -43; -46, -56], + string="offset", + style(color=9)), + Polygon(points=[-40, -70; -43, -60; -38, -60; -40, -70; -40, -70], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Line(points=[-40, -29; -40, -60], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), + color=8, + pattern=1, + thickness=1, + arrow=0)), Polygon(points=[-40, -30; -42, -40; -37, -40; -40, -30], style( - color=8, - fillColor=8, - fillPattern=1)), - Line(points=[-39, -30; -80, -30], style(color=0, thickness=2)), - Text( - extent=[-59, -71; -13, -89], - string="startTime", - style(color=9)), + color=8, + fillColor=8, + fillPattern=1)), + Line(points=[-39, -30; -80, -30], style(color=0, thickness=2)), + Text( + extent=[-59, -71; -13, -89], + string="startTime", + style(color=9)), Polygon(points=[-41, -30; -32, -28; -32, -32; -41, -30], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Line(points=[-40, -30; 29, -30], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), + color=8, + pattern=1, + thickness=1, + arrow=0)), Polygon(points=[29, -30; 21, -28; 21, -32; 29, -30], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Text( - extent=[-26, -12; 19, -28], - string="riseTime", - style(color=9)), + extent=[-26, -12; 19, -28], + string="riseTime", + style(color=9)), Text( - extent=[78, -76; 102, -96], - string="time", - style(color=9)), + extent=[78, -76; 102, -96], + string="time", + style(color=9)), Line(points=[30, 100; 30, -34], style(color=8, pattern=2)))); - equation + equation for i in 1:nout loop - y_riseTime[i] = p_outMax[i]*(1 - Modelica.Math.exp(-p_riseTime[i]/ - p_riseTimeConst[i])); + y_riseTime[i] = p_outMax[i]*(1 - Modelica.Math.exp(-p_riseTime[i]/p_riseTimeConst[ + i])); outPort.signal[i] = p_offset[i] + (if (time < p_startTime[i]) then 0 else if (time < (p_startTime[i] + p_riseTime[i])) then p_outMax[i]*(1 - - exp(-(time - p_startTime[i])/p_riseTimeConst[i])) else y_riseTime[i] - *Modelica.Math.exp(-(time - p_startTime[i] - p_riseTime[i])/ - p_fallTimeConst[i])); + - Modelica.Math.exp(-(time - p_startTime[i])/p_riseTimeConst[i])) else y_riseTime[i] + *Modelica.Math.exp(-(time - p_startTime[i] - p_riseTime[i])/p_fallTimeConst[i])) + ; end for; - + end Exponentials; - block Pulse "Generate pulse signals of type Real" + + block Pulse "Generate pulse signals of type Real" parameter Real amplitude[:]={1} "Amplitudes of pulses"; parameter Real width[:]( - final min=Modelica.Constants.SMALL, + final min=Modelica.Constants.small, final max=100) = {50} "Widths of pulses in % of periods"; - parameter SIunits.Time period[:](final min=Modelica.Constants.SMALL) = {1} - "Times for one period"; + parameter SI.Time period[:](final min=Modelica.Constants.small) = {1} + "Times for one period"; parameter Real offset[:]={0} "Offsets of output signals"; - parameter SIunits.Time startTime[:]={0} - "Output = offset for time < startTime"; - extends Interfaces.MO(final nout=max([size(amplitude, 1); size(width, 1); + parameter SI.Time startTime[:]={0} "Output = offset for time < startTime"; + extends Interfaces.MO(final nout=max([size(amplitude, 1); size(width, 1); size(period, 1); size(offset, 1); size(startTime, 1)])); - protected - parameter Real p_amplitude[nout]=(if size(amplitude, 1) == 1 then ones( - nout)*amplitude[1] else amplitude); - parameter SIunits.Time p_period[nout]=(if size(period, 1) == 1 then ones( - nout)*period[1] else period); - parameter SIunits.Time p_width[nout]=diagonal(p_period)*(if size(width, 1) - == 1 then ones(nout)*width[1] else width)/100 "Width of one pulse"; + protected + parameter Real p_amplitude[nout]=(if size(amplitude, 1) == 1 then ones(nout + )*amplitude[1] else amplitude); + parameter SI.Time p_period[nout]=(if size(period, 1) == 1 then ones(nout)* + period[1] else period); + parameter SI.Time p_width[nout]=diagonal(p_period)*(if size(width, 1) == 1 + then ones(nout)*width[1] else width)/100 "Width of one pulse"; parameter Real p_offset[nout]=(if size(offset, 1) == 1 then ones(nout)* offset[1] else offset); - parameter SIunits.Time p_startTime[nout]=(if size(startTime, 1) == 1 then - ones(nout)*startTime[1] else startTime); - discrete SIunits.Time T0[nout](final start=p_startTime) - "Start time of current period"; + parameter SI.Time p_startTime[nout]=(if size(startTime, 1) == 1 then ones( + nout)*startTime[1] else startTime); + SI.Time T0[nout](final start=p_startTime) "Start time of current period"; annotation ( Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Window( - x=0.29, - y=0.05, - width=0.59, - height=0.72), + x=0.29, + y=0.05, + width=0.59, + height=0.72), Icon( - Line(points=[-80, 68; -80, -80], style(color=8)), - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-90, -70; 82, -70], style(color=8)), + Line(points=[-80, 68; -80, -80], style(color=8)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-90, -70; 82, -70], style(color=8)), Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style( - color=8, - fillColor=8, - fillPattern=1)), - Line(points=[-80, -70; -40, -70; -40, 44; 0, 44; 0, -70; 40, -70; 40, - 44; 79, 44], style(color=0)), - Text( - extent=[-147, -152; 153, -112], - string="period=%period", - style(color=0))), + color=8, + fillColor=8, + fillPattern=1)), + Line(points=[-80, -70; -40, -70; -40, 44; 0, 44; 0, -70; 40, -70; 40, + 44; 79, 44], style(color=0)), + Text( + extent=[-147, -152; 153, -112], + string="period=%period", + style(color=0))), Diagram( - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-80, 68; -80, -80], style(color=8)), - Line(points=[-90, -70; 82, -70], style(color=8)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-80, 68; -80, -80], style(color=8)), + Line(points=[-90, -70; 82, -70], style(color=8)), Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[-34, 1; -37, -12; -30, -12; -34, 1], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Line(points=[-34, -1; -34, -70], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), - Polygon(points=[-33, -70; -36, -57; -30, -57; -33, -70; -33, -70], + color=8, + pattern=1, + thickness=1, + arrow=0)), + Polygon(points=[-33, -70; -36, -57; -30, -57; -33, -70; -33, -70], style( - color=8, - fillColor=8, - fillPattern=1)), - Text( - extent=[-78, -24; -35, -36], - string="offset", - style(color=9)), - Text( - extent=[-31, -69; 15, -87], - string="startTime", - style(color=9)), - Text( - extent=[-76, 99; -35, 79], - string="outPort", - style(color=9)), - Text( - extent=[70, -80; 94, -100], - string="time", - style(color=9)), - Line(points=[-10, 0; -10, -70], style(color=8, pattern=2)), + color=8, + fillColor=8, + fillPattern=1)), + Text( + extent=[-78, -24; -35, -36], + string="offset", + style(color=9)), + Text( + extent=[-31, -69; 15, -87], + string="startTime", + style(color=9)), + Text( + extent=[-76, 99; -35, 79], + string="outPort", + style(color=9)), + Text( + extent=[70, -80; 94, -100], + string="time", + style(color=9)), + Line(points=[-10, 0; -10, -70], style(color=8, pattern=2)), Line(points=[-80, 0; -10, 0; -10, 50; 30, 50; 30, 0; 50, 0; 50, 50; 90 - , 50], style(color=0, thickness=2)), - Line(points=[-10, 88; -10, 49], style(color=8, pattern=2)), - Line(points=[30, 74; 30, 50], style(color=9, pattern=2)), - Line(points=[50, 88; 50, 50], style(color=8, pattern=2)), - Line(points=[-10, 83; 51, 83], style(color=8)), - Line(points=[-10, 69; 30, 69], style(color=8)), - Text( - extent=[0, 97; 46, 85], - string="period", - style(color=9)), - Text( - extent=[-9, 81; 30, 69], - string="width", - style(color=9)), - Line(points=[-43, 50; -10, 50], style(color=8, pattern=2)), + , 50], style(color=0, thickness=2)), + Line(points=[-10, 88; -10, 49], style(color=8, pattern=2)), + Line(points=[30, 74; 30, 50], style(color=9, pattern=2)), + Line(points=[50, 88; 50, 50], style(color=8, pattern=2)), + Line(points=[-10, 83; 51, 83], style(color=8)), + Line(points=[-10, 69; 30, 69], style(color=8)), + Text( + extent=[0, 97; 46, 85], + string="period", + style(color=9)), + Text( + extent=[-9, 81; 30, 69], + string="width", + style(color=9)), + Line(points=[-43, 50; -10, 50], style(color=8, pattern=2)), Line(points=[-34, 50; -34, 1], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), - Text( - extent=[-78, 34; -37, 20], - string="amplitude", - style(color=9)), + color=8, + pattern=1, + thickness=1, + arrow=0)), + Text( + extent=[-78, 34; -37, 20], + string="amplitude", + style(color=9)), Polygon(points=[-34, 49; -37, 36; -30, 36; -34, 49], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[-34, 1; -37, 14; -31, 14; -34, 1; -34, 1], style( - color=8, - fillColor=8, - fillPattern=1)), - Line(points=[90, 50; 90, 0; 100, 0], style(color=0, thickness=2)), + color=8, + fillColor=8, + fillPattern=1)), + Line(points=[90, 50; 90, 0; 100, 0], style(color=0, thickness=2)), Polygon(points=[-10, 69; -1, 71; -1, 67; -10, 69], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[30, 69; 22, 71; 22, 67; 30, 69], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[-10, 83; -1, 85; -1, 81; -10, 83], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[50, 83; 42, 85; 42, 81; 50, 83], style( - color=8, - fillColor=8, + color=8, + fillColor=8, fillPattern=1)))); - equation + equation for i in 1:nout loop when sample(p_startTime[i], p_period[i]) then T0[i] = time; end when; - outPort.signal[i] = p_offset[i] + (if time < p_startTime[i] or time >= - T0[i] + p_width[i] then 0 else p_amplitude[i]); + outPort.signal[i] = p_offset[i] + (if time < p_startTime[i] or time >= T0 + [i] + p_width[i] then 0 else p_amplitude[i]); end for; end Pulse; - block SawTooth "Generate saw tooth signals" + + block SawTooth "Generate saw tooth signals" parameter Real amplitude[:]={1} "Amplitudes of saw tooths"; - parameter SIunits.Time period[:](final min=Modelica.Constants.SMALL) = {1} - "Times for one period"; + parameter SI.Time period[:](final min=Modelica.Constants.small) = {1} + "Times for one period"; parameter Real offset[:]={0} "Offsets of output signals"; - parameter SIunits.Time startTime[:]={0} - "Output = offset for time < startTime"; - extends Interfaces.MO(final nout=max([size(amplitude, 1); size(period, 1) - ; size(offset, 1); size(startTime, 1)])); - protected - parameter Real p_amplitude[nout]=(if size(amplitude, 1) == 1 then ones( - nout)*amplitude[1] else amplitude); - parameter SIunits.Time p_period[nout]=(if size(period, 1) == 1 then ones( - nout)*period[1] else period); + parameter SI.Time startTime[:]={0} "Output = offset for time < startTime"; + extends Interfaces.MO(final nout=max([size(amplitude, 1); size(period, 1); + size(offset, 1); size(startTime, 1)])); + protected + parameter Real p_amplitude[nout]=(if size(amplitude, 1) == 1 then ones(nout + )*amplitude[1] else amplitude); + parameter SI.Time p_period[nout]=(if size(period, 1) == 1 then ones(nout)* + period[1] else period); parameter Real p_offset[nout]=(if size(offset, 1) == 1 then ones(nout)* offset[1] else offset); - parameter SIunits.Time p_startTime[nout]=(if size(startTime, 1) == 1 then - ones(nout)*startTime[1] else startTime); - discrete SIunits.Time T0[nout](final start=p_startTime) - "Start time of current period"; + parameter SI.Time p_startTime[nout]=(if size(startTime, 1) == 1 then ones( + nout)*startTime[1] else startTime); + SI.Time T0[nout](final start=p_startTime) "Start time of current period"; annotation ( Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Window( - x=0.21, - y=0.11, - width=0.55, - height=0.71), + x=0.21, + y=0.11, + width=0.55, + height=0.71), Icon( - Line(points=[-80, 68; -80, -80], style(color=8)), - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-90, -70; 82, -70], style(color=8)), + Line(points=[-80, 68; -80, -80], style(color=8)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-90, -70; 82, -70], style(color=8)), Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style( - color=8, - fillColor=8, - fillPattern=1)), - Line(points=[-80, -70; -60, -70; 0, 40; 0, -70; 60, 41; 60, -70], - style(color=0)), - Text( - extent=[-147, -152; 153, -112], - string="period=%period", - style(color=0))), + color=8, + fillColor=8, + fillPattern=1)), + Line(points=[-80, -70; -60, -70; 0, 40; 0, -70; 60, 41; 60, -70], style + (color=0)), + Text( + extent=[-147, -152; 153, -112], + string="period=%period", + style(color=0))), Diagram( - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-80, 68; -80, -80], style(color=8)), - Line(points=[-90, -70; 82, -70], style(color=8)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-80, 68; -80, -80], style(color=8)), + Line(points=[-90, -70; 82, -70], style(color=8)), Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[-34, -19; -37, -32; -30, -32; -34, -19], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Line(points=[-34, -20; -34, -70], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), - Polygon(points=[-34, -70; -37, -57; -31, -57; -34, -70; -34, -70], + color=8, + pattern=1, + thickness=1, + arrow=0)), + Polygon(points=[-34, -70; -37, -57; -31, -57; -34, -70; -34, -70], style( - color=8, - fillColor=8, - fillPattern=1)), - Text( - extent=[-78, -24; -35, -36], - string="offset", - style(color=9)), - Text( - extent=[-31, -69; 15, -87], - string="startTime", - style(color=9)), - Text( - extent=[-76, 99; -35, 79], - string="outPort", - style(color=9)), - Text( - extent=[70, -80; 94, -100], - string="time", - style(color=9)), - Line(points=[-10, -20; -10, -70], style(color=8, pattern=2)), - Line(points=[-10, 88; -10, -20], style(color=8, pattern=2)), - Line(points=[30, 88; 30, 59], style(color=8, pattern=2)), - Line(points=[-10, 83; 30, 83], style(color=8)), - Text( - extent=[-12, 97; 34, 85], - string="period", - style(color=9)), - Line(points=[-44, 60; 30, 60], style(color=8, pattern=2)), + color=8, + fillColor=8, + fillPattern=1)), + Text( + extent=[-78, -24; -35, -36], + string="offset", + style(color=9)), + Text( + extent=[-31, -69; 15, -87], + string="startTime", + style(color=9)), + Text( + extent=[-76, 99; -35, 79], + string="outPort", + style(color=9)), + Text( + extent=[70, -80; 94, -100], + string="time", + style(color=9)), + Line(points=[-10, -20; -10, -70], style(color=8, pattern=2)), + Line(points=[-10, 88; -10, -20], style(color=8, pattern=2)), + Line(points=[30, 88; 30, 59], style(color=8, pattern=2)), + Line(points=[-10, 83; 30, 83], style(color=8)), + Text( + extent=[-12, 97; 34, 85], + string="period", + style(color=9)), + Line(points=[-44, 60; 30, 60], style(color=8, pattern=2)), Line(points=[-34, 47; -34, -7], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), - Text( - extent=[-78, 34; -37, 20], - string="amplitude", - style(color=9)), + color=8, + pattern=1, + thickness=1, + arrow=0)), + Text( + extent=[-78, 34; -37, 20], + string="amplitude", + style(color=9)), Polygon(points=[-34, 60; -37, 47; -30, 47; -34, 60], style( - color=8, - fillColor=8, - fillPattern=1)), - Polygon(points=[-34, -20; -37, -7; -31, -7; -34, -20; -34, -20], style - ( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), + Polygon(points=[-34, -20; -37, -7; -31, -7; -34, -20; -34, -20], style( + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[-10, 83; -1, 85; -1, 81; -10, 83], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[30, 83; 22, 85; 22, 81; 30, 83], style( - color=8, - fillColor=8, - fillPattern=1)), - Line(points=[-80, -20; -10, -20; 30, 60; 30, -20; 72, 60; 72, -20], + color=8, + fillColor=8, + fillPattern=1)), + Line(points=[-80, -20; -10, -20; 30, 60; 30, -20; 72, 60; 72, -20], style(color=0, thickness=2)))); - equation + equation for i in 1:nout loop when sample(p_startTime[i], p_period[i]) then T0[i] = time; end when; - outPort.signal[i] = p_offset[i] + (if time < p_startTime[i] then 0 else - (p_amplitude[i]/p_period[i])*(time - T0[i])); + outPort.signal[i] = p_offset[i] + (if time < p_startTime[i] then 0 else ( + p_amplitude[i]/p_period[i])*(time - T0[i])); end for; end SawTooth; - block Trapezoid "Generate trapezoidal signals of type Real" + + block Trapezoid "Generate trapezoidal signals of type Real" parameter Real amplitude[:]={1} "Amplitudes of trapezoids"; - parameter SIunits.Time rising[:](final min=0) = {0} + parameter SI.Time rising[:](final min=0) = {0} "Rising durations of trapezoids"; - parameter SIunits.Time width[:](final min=0) = {0.5} + parameter SI.Time width[:](final min=0) = {0.5} "Width durations of trapezoids"; - parameter SIunits.Time falling[:](final min=0) = {0} + parameter SI.Time falling[:](final min=0) = {0} "Falling durations of trapezoids"; - parameter SIunits.Time period[:](final min=Modelica.Constants.small) = {1} - "Time for one period"; - parameter Integer nperiod[:]={-1} + parameter SI.Time period[:](final min=Modelica.Constants.small) = {1} + "Time for one period"; + parameter Integer nperiod[:]={-1} "Number of periods (< 0 means infinite number of periods)"; parameter Real offset[:]={0} "Offsets of output signals"; - parameter SIunits.Time startTime[:]={0} - "Output = offset for time < startTime"; - extends Interfaces.MO(final nout=max([size(amplitude, 1); size(rising, 1) - ; size(width, 1); size(falling, 1); size(period, 1); size(nperiod, 1) - ; size(offset, 1); size(startTime, 1)])); - protected - parameter Real p_amplitude[nout]=(if size(amplitude, 1) == 1 then ones( - nout)*amplitude[1] else amplitude); - parameter SIunits.Time T_rising[nout]=(if size(rising, 1) == 1 then ones( - nout)*rising[1] else rising) - "End time of rising phase within one period"; - parameter SIunits.Time T_width[nout]=T_rising + (if size(width, 1) == 1 - then ones(nout)*width[1] else width) + parameter SI.Time startTime[:]={0} "Output = offset for time < startTime"; + extends Interfaces.MO(final nout=max([size(amplitude, 1); size(rising, 1); + size(width, 1); size(falling, 1); size(period, 1); size(nperiod, 1); + size(offset, 1); size(startTime, 1)])); + protected + parameter Real p_amplitude[nout]=(if size(amplitude, 1) == 1 then ones(nout + )*amplitude[1] else amplitude); + parameter SI.Time T_rising[nout]=(if size(rising, 1) == 1 then ones(nout)* + rising[1] else rising) "End time of rising phase within one period"; + parameter SI.Time T_width[nout]=T_rising + (if size(width, 1) == 1 then + ones(nout)*width[1] else width) "End time of width phase within one period"; - parameter SIunits.Time T_falling[nout]=T_width + (if size(falling, 1) == 1 - then ones(nout)*falling[1] else falling) + parameter SI.Time T_falling[nout]=T_width + (if size(falling, 1) == 1 then + ones(nout)*falling[1] else falling) "End time of falling phase within one period"; - parameter SIunits.Time p_period[nout]=(if size(period, 1) == 1 then ones( - nout)*period[1] else period) "Duration of one period"; + parameter SI.Time p_period[nout]=(if size(period, 1) == 1 then ones(nout)* + period[1] else period) "Duration of one period"; parameter Real p_offset[nout]=(if size(offset, 1) == 1 then ones(nout)* offset[1] else offset); - parameter SIunits.Time p_startTime[nout]=(if size(startTime, 1) == 1 then - ones(nout)*startTime[1] else startTime); - discrete SIunits.Time T0[nout](final start=p_startTime) - "Start time of current period"; - discrete Integer counter[nout](start=(if size(nperiod, 1) == 1 then ones( - nout)*nperiod[1] else nperiod)) "Period counter"; - discrete Integer counter2[nout](start=(if size(nperiod, 1) == 1 then ones( - nout)*nperiod[1] else nperiod)); + parameter SI.Time p_startTime[nout]=(if size(startTime, 1) == 1 then ones( + nout)*startTime[1] else startTime); + SI.Time T0[nout](final start=p_startTime) "Start time of current period"; + Integer counter[nout](start=(if size(nperiod, 1) == 1 then ones(nout)* + nperiod[1] else nperiod)) "Period counter"; + Integer counter2[nout](start=(if size(nperiod, 1) == 1 then ones(nout)* + nperiod[1] else nperiod)); annotation ( Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Window( - x=0.35, - y=0, - width=0.49, - height=0.58), + x=0.35, + y=0, + width=0.49, + height=0.58), Icon( - Line(points=[-80, 68; -80, -80], style(color=8)), - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-90, -70; 82, -70], style(color=8)), + Line(points=[-80, 68; -80, -80], style(color=8)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-90, -70; 82, -70], style(color=8)), Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style( - color=8, - fillColor=8, - fillPattern=1)), - Text( - extent=[-147, -152; 153, -112], - string="period=%period", - style(color=0)), - Line(points=[-81, -70; -60, -70; -30, 40; 9, 40; 39, -70; 61, -70; 90 - , 40], style(color=0))), + color=8, + fillColor=8, + fillPattern=1)), + Text( + extent=[-147, -152; 153, -112], + string="period=%period", + style(color=0)), + Line(points=[-81, -70; -60, -70; -30, 40; 9, 40; 39, -70; 61, -70; 90, + 40], style(color=0))), Diagram( - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-80, 68; -80, -80], style(color=8)), - Line(points=[-90, -70; 82, -70], style(color=8)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-80, 68; -80, -80], style(color=8)), + Line(points=[-90, -70; 82, -70], style(color=8)), Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[-45, -30; -47, -41; -43, -41; -45, -30], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Line(points=[-45, -31; -45, -70], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), - Polygon(points=[-45, -70; -47, -60; -43, -60; -45, -70; -45, -70], + color=8, + pattern=1, + thickness=1, + arrow=0)), + Polygon(points=[-45, -70; -47, -60; -43, -60; -45, -70; -45, -70], style( - color=8, - fillColor=8, - fillPattern=1)), - Text( - extent=[-86, -43; -43, -55], - string="offset", - style(color=9)), - Text( - extent=[-47, -69; -1, -87], - string="startTime", - style(color=9)), - Text( - extent=[-76, 99; -35, 79], - string="outPort", - style(color=9)), - Text( - extent=[70, -80; 94, -100], - string="time", - style(color=9)), - Line(points=[-29, 82; -30, -70], style(color=8, pattern=2)), - Line(points=[-10, 59; -10, 40], style(color=8, pattern=2)), - Line(points=[20, 59; 20, 39], style(color=9, pattern=2)), - Line(points=[40, 59; 40, -30], style(color=8, pattern=2)), - Line(points=[-20, 76; 61, 76], style(color=8)), - Line(points=[-29, 56; 40, 56], style(color=8)), - Text( - extent=[-2, 86; 25, 77], - string="period", - style(color=9)), - Text( - extent=[-8, 70; 21, 60], - string="width", - style(color=9)), - Line(points=[-42, 40; -10, 40], style(color=8, pattern=2)), + color=8, + fillColor=8, + fillPattern=1)), + Text( + extent=[-86, -43; -43, -55], + string="offset", + style(color=9)), + Text( + extent=[-47, -69; -1, -87], + string="startTime", + style(color=9)), + Text( + extent=[-76, 99; -35, 79], + string="outPort", + style(color=9)), + Text( + extent=[70, -80; 94, -100], + string="time", + style(color=9)), + Line(points=[-29, 82; -30, -70], style(color=8, pattern=2)), + Line(points=[-10, 59; -10, 40], style(color=8, pattern=2)), + Line(points=[20, 59; 20, 39], style(color=9, pattern=2)), + Line(points=[40, 59; 40, -30], style(color=8, pattern=2)), + Line(points=[-20, 76; 61, 76], style(color=8)), + Line(points=[-29, 56; 40, 56], style(color=8)), + Text( + extent=[-2, 86; 25, 77], + string="period", + style(color=9)), + Text( + extent=[-8, 70; 21, 60], + string="width", + style(color=9)), + Line(points=[-42, 40; -10, 40], style(color=8, pattern=2)), Line(points=[-39, 40; -39, -19], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), - Text( - extent=[-77, 14; -40, 0], - string="amplitude", - style(color=9)), + color=8, + pattern=1, + thickness=1, + arrow=0)), + Text( + extent=[-77, 14; -40, 0], + string="amplitude", + style(color=9)), Polygon(points=[-29, 56; -22, 58; -22, 54; -29, 56], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[-10, 56; -17, 58; -17, 54; -10, 56], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[-29, 76; -20, 78; -20, 74; -29, 76], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[61, 76; 53, 78; 53, 74; 61, 76], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Line(points=[-80, -30; -30, -30; -10, 40; 20, 40; 40, -30; 60, -30; 80 - , 40; 100, 40], style(color=0, thickness=2)), + , 40; 100, 40], style(color=0, thickness=2)), Polygon(points=[-39, 40; -41, 29; -37, 29; -39, 40], style( - color=8, - fillColor=8, - fillPattern=1)), - Polygon(points=[-39, -29; -41, -19; -37, -19; -39, -29; -39, -29], + color=8, + fillColor=8, + fillPattern=1)), + Polygon(points=[-39, -29; -41, -19; -37, -19; -39, -29; -39, -29], style( - color=8, - fillColor=8, - fillPattern=1)), - Line(points=[61, 84; 60, -30], style(color=8, pattern=2)), + color=8, + fillColor=8, + fillPattern=1)), + Line(points=[61, 84; 60, -30], style(color=8, pattern=2)), Polygon(points=[39, 56; 32, 58; 32, 54; 39, 56], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[20, 56; 27, 58; 27, 54; 20, 56], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[20, 56; 13, 58; 13, 54; 20, 56], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[-12, 56; -5, 58; -5, 54; -12, 56], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Text( - extent=[-34, 70; -5, 60], - string="rising", - style(color=9)), + extent=[-34, 70; -5, 60], + string="rising", + style(color=9)), Text( - extent=[16, 70; 45, 60], - string="falling", + extent=[16, 70; 45, 60], + string="falling", style(color=9)))); - equation + equation for i in 1:nout loop - when (pre(counter2[i]) <> 0 and sample(p_startTime[i], p_period[i])) - then + when pre(counter2[i]) <> 0 and sample(p_startTime[i], p_period[i]) then T0[i] = time; counter2[i] = pre(counter[i]); counter[i] = pre(counter[i]) - (if pre(counter[i]) > 0 then 1 else 0); end when; - outPort.signal[i] = p_offset[i] + (if (time < p_startTime[i] or counter2 - [i] == 0 or time >= T0[i] + T_falling[i]) then 0 else if (time < T0[i] - + T_rising[i]) then (time - T0[i])*p_amplitude[i]/T_rising[i] else if + outPort.signal[i] = p_offset[i] + (if (time < p_startTime[i] or counter2[ + i] == 0 or time >= T0[i] + T_falling[i]) then 0 else if (time < T0[i] + + T_rising[i]) then (time - T0[i])*p_amplitude[i]/T_rising[i] else if (time < T0[i] + T_width[i]) then p_amplitude[i] else (T0[i] + T_falling [i] - time)*p_amplitude[i]/(T_falling[i] - T_width[i])); end for; end Trapezoid; - block KinematicPTP + + block KinematicPTP "Move as fast as possible along a distance within given kinematic constraints" - - + + parameter Real deltaq[:]={1} "Distance to move"; - parameter Real qd_max[:](final min=Modelica.Constants.SMALL) = {1} + parameter Real qd_max[:](final min=Modelica.Constants.small) = {1} "Maximum velocities der(q)"; - parameter Real qdd_max[:](final min=Modelica.Constants.SMALL) = {1} + parameter Real qdd_max[:](final min=Modelica.Constants.small) = {1} "Maximum accelerations der(qd)"; - parameter SIunits.Time startTime=0 "Time instant at which movement starts" - ; - - extends Interfaces.MO(final nout=max([size(deltaq, 1); size(qd_max, 1); + parameter SI.Time startTime=0 "Time instant at which movement starts"; + + extends Interfaces.MO(final nout=max([size(deltaq, 1); size(qd_max, 1); size(qdd_max, 1)])); - - protected + + protected parameter Real p_deltaq[nout]=(if size(deltaq, 1) == 1 then ones(nout)* deltaq[1] else deltaq); parameter Real p_qd_max[nout]=(if size(qd_max, 1) == 1 then ones(nout)* @@ -1389,81 +1365,79 @@ Modelica in file \"Modelica/package.mo\". Real sdd; Real aux1[nout]; Real aux2[nout]; - SIunits.Time Ta1; - SIunits.Time Ta2; - SIunits.Time Tv; - SIunits.Time Te; + SI.Time Ta1; + SI.Time Ta2; + SI.Time Tv; + SI.Time Te; Boolean noWphase; - // constants annotation ( Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Window( - x=0.32, - y=0.05, - width=0.48, - height=0.6), + x=0.17, + y=0.05, + width=0.69, + height=0.72), Icon( - Line(points=[-80, 78; -80, -82], style(color=8)), + Line(points=[-80, 78; -80, -82], style(color=8)), Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 88; -80, 90], style( - color=8, - fillColor=8, - fillPattern=1)), - Line(points=[-90, 0; 82, 0], style(color=8)), + color=8, + fillColor=8, + fillPattern=1)), + Line(points=[-90, 0; 82, 0], style(color=8)), Polygon(points=[90, 0; 68, 8; 68, -8; 90, 0], style( - color=8, - fillColor=8, - fillPattern=1)), - Line(points=[-80, 0; -70, 0; -70, 70; -30, 70; -30, 0; 20, 0; 20, -70 - ; 60, -70; 60, 0; 68, 0], style(color=0, thickness=1)), - Text( - extent=[2, 80; 80, 20], - string="acc", - style(color=8)), - Text( - extent=[-150, -150; 150, -110], - string="deltaq=%deltaq", - style(color=0))), + color=8, + fillColor=8, + fillPattern=1)), + Line(points=[-80, 0; -70, 0; -70, 70; -30, 70; -30, 0; 20, 0; 20, -70; + 60, -70; 60, 0; 68, 0], style(color=0, thickness=1)), + Text( + extent=[2, 80; 80, 20], + string="acc", + style(color=8)), + Text( + extent=[-150, -150; 150, -110], + string="deltaq=%deltaq", + style(color=0))), Diagram( Rectangle(extent=[-100, -100; 100, 100], style( - color=3, - gradient=0, - fillColor=0, - fillPattern=0)), - Line(points=[-80, 78; -80, -82], style(color=8)), + color=3, + gradient=0, + fillColor=0, + fillPattern=0)), + Line(points=[-80, 78; -80, -82], style(color=8)), Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 88; -80, 90], style( - color=8, - fillColor=8, - fillPattern=1)), - Line(points=[-90, 0; 82, 0], style(color=8)), + color=8, + fillColor=8, + fillPattern=1)), + Line(points=[-90, 0; 82, 0], style(color=8)), Polygon(points=[90, 0; 68, 8; 68, -8; 90, 0], style( - color=8, - fillColor=8, - fillPattern=1)), - Line(points=[-80, 0; -70, 0; -70, 70; -30, 70; -30, 0; 20, 0; 20, -70 - ; 60, -70; 60, 0; 68, 0], style(color=0, thickness=2)), - Text( - extent=[-76, 98; -19, 83], - string="acceleration", - style(color=8)), - Text( - extent=[69, 24; 91, 12], - string="time", - style(color=8))), - Documentation(info=" - + color=8, + fillColor=8, + fillPattern=1)), + Line(points=[-80, 0; -70, 0; -70, 70; -30, 70; -30, 0; 20, 0; 20, -70; + 60, -70; 60, 0; 68, 0], style(color=0, thickness=2)), + Text( + extent=[-76, 98; -19, 83], + string="acceleration", + style(color=8)), + Text( + extent=[69, 24; 91, 12], + string="time", + style(color=8))), + Documentation(info="

      The goal is to move as fast as possible along a distance deltaq -under given kinematical constraints. The distance can be a positional or +under given kinematical constraints. The distance can be a positional or angular range. In robotics such a movement is called PTP (Point-To-Point). -This source block generates the acceleration of this signal -as output. After integrating the output two times, the position is +This source block generates the acceleration qdd of this signal +as output. After integrating the output two times, the position q is obtained. The signal is constructed in such a way that it is not possible -to move faster, given the maximally allowed velocity qd_max and -the maximally allowed angular acceleration qdd_max. +to move faster, given the maximally allowed velocity qd_max and +the maximally allowed acceleration qdd_max.

      @@ -1476,157 +1450,151 @@ that the end point is reached at the same time instant.

      -This element is useful to generate a reference signal for a controller -which controls a drive train or in combination with model -Modelica.Mechanics.Rotationa.Accelerate to drive +This element is useful to generate a reference signal for a controller +which controls a drive train or in combination with model +Modelica.Mechanics.Rotational.Accelerate to drive a flange according to a given acceleration.

      Release Notes:

        +
      • June 27, 2001 + by Bernhard Bachmann.
        + Bug fixed that element is also correct if startTime is not zero.
      • +
      • Nov. 3, 1999 - by Martin Otter:
        + by Martin Otter:
        Vectorized and moved from Rotational to Blocks.Sources.
      • June 29, 1999 - by Martin Otter:
        + by Martin Otter:
        realized.
      ")); - equation + equation for i in 1:nout loop aux1[i] = p_deltaq[i]/p_qd_max[i]; aux2[i] = p_deltaq[i]/p_qdd_max[i]; end for; sd_max = 1/max(abs(aux1)); sdd_max = 1/max(abs(aux2)); - + Ta1 = sqrt(1/sdd_max); Ta2 = sd_max/sdd_max; noWphase = Ta2 >= Ta1; Tv = if noWphase then Ta1 else 1/sd_max; Te = if noWphase then Ta1 + Ta1 else Tv + Ta2; - + // path-acceleration - sdd = if time < startTime then 0 else ((if noWphase then (if time < Ta1 - then sdd_max else (if time < Te then -sdd_max else 0)) else (if time < - Ta2 then sdd_max else (if time < Tv then 0 else (if time < Te then - - sdd_max else 0))))); - + sdd = if time < startTime then 0 else ((if noWphase then (if time < Ta1 + + startTime then sdd_max else (if time < Te + startTime then -sdd_max else + 0)) else (if time < Ta2 + startTime then sdd_max else (if time < Tv + + startTime then 0 else (if time < Te + startTime then -sdd_max else 0))))) + ; + // acceleration - outPort.signal = deltaq*sdd; + outPort.signal = p_deltaq*sdd; end KinematicPTP; - block TimeTable + + block TimeTable "Generate a (possibly discontinuous) signal by linear interpolation in a table" - - - parameter Real table[:, :]=[0, 0; 1, 1; 2, 4] + + + parameter Real table[:, 2]=[0, 0; 1, 1; 2, 4] "Table matrix (time = first column)"; parameter Real offset[1]={0} "Offset of output signal"; - parameter SIunits.Time startTime[1]={0} - "Output = offset for time < startTime"; + parameter SI.Time startTime[1]={0} "Output = offset for time < startTime"; extends Interfaces.MO(final nout=1); - protected - discrete Real a - "Interpolation coefficients a of actual interval (y=a*x+b)"; - discrete Real b - "Interpolation coefficients b of actual interval (y=a*x+b)"; - discrete Integer last(start=1) "Last used lower grid index"; - discrete SIunits.Time nextEvent(start=0) "Next event instant"; + protected + Real a "Interpolation coefficients a of actual interval (y=a*x+b)"; + Real b "Interpolation coefficients b of actual interval (y=a*x+b)"; + Integer last(start=1) "Last used lower grid index"; + SI.Time nextEvent(start=0) "Next event instant"; annotation ( - Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), - Window( - x=0.26, - y=0.01, - width=0.7, - height=0.82), Icon( - Line(points=[-80, 68; -80, -80], style(color=8)), - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-90, -70; 82, -70], style(color=8)), + Line(points=[-80, 68; -80, -80], style(color=8)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-90, -70; 82, -70], style(color=8)), Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Rectangle(extent=[-48, 70; 2, -50], style( - color=7, - fillColor=8, - fillPattern=1)), - Line(points=[-48, -50; -48, 70; 52, 70; 52, -50; -48, -50; -48, -20; - 52, -20; 52, 10; -48, 10; -48, 40; 52, 40; 52, 70; 2, 70; 2, -51] - , style(color=0)), - Text( - extent=[-150, -150; 150, -110], - string="offset=%offset", - style(color=0))), + color=7, + fillColor=8, + fillPattern=1)), + Line(points=[-48, -50; -48, 70; 52, 70; 52, -50; -48, -50; -48, -20; 52 + , -20; 52, 10; -48, 10; -48, 40; 52, 40; 52, 70; 2, 70; 2, -51], + style(color=0)), + Text( + extent=[-150, -150; 150, -110], + string="offset=%offset", + style(color=0))), Diagram( - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-80, 68; -80, -80], style(color=8)), - Line(points=[-90, -70; 82, -70], style(color=8)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-80, 68; -80, -80], style(color=8)), + Line(points=[-90, -70; 82, -70], style(color=8)), Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Rectangle(extent=[-20, 90; 30, -30], style( - color=7, - fillColor=8, - fillPattern=1)), - Line(points=[-20, -30; -20, 90; 80, 90; 80, -30; -20, -30; -20, 0; 80 - , 0; 80, 30; -20, 30; -20, 60; 80, 60; 80, 90; 30, 90; 30, -31], - style(color=0)), - Text( - extent=[-77, -42; -38, -58], - string="offset", - style(color=9)), + color=7, + fillColor=8, + fillPattern=1)), + Line(points=[-20, -30; -20, 90; 80, 90; 80, -30; -20, -30; -20, 0; 80, + 0; 80, 30; -20, 30; -20, 60; 80, 60; 80, 90; 30, 90; 30, -31], + style(color=0)), + Text( + extent=[-77, -42; -38, -58], + string="offset", + style(color=9)), Polygon(points=[-31, -30; -33, -40; -28, -40; -31, -30], style( - color=8, - fillColor=8, - fillPattern=1)), - Polygon(points=[-30, -70; -33, -60; -28, -60; -30, -70; -30, -70], + color=8, + fillColor=8, + fillPattern=1)), + Polygon(points=[-30, -70; -33, -60; -28, -60; -30, -70; -30, -70], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Line(points=[-31, -31; -31, -70], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), - Line(points=[-20, -20; -20, -70], style(color=8, pattern=2)), - Text( - extent=[-38, -70; 8, -88], - string="startTime", - style(color=9)), - Line(points=[-20, -30; -80, -30], style(color=8, pattern=2)), - Text( - extent=[-73, 93; -41, 78], - string="outPort", - style(color=9)), - Text( - extent=[66, -81; 91, -93], - string="time", - style(color=9)), - Text( - extent=[-15, 83; 24, 68], - string="time", - style(color=0)), - Text( - extent=[33, 83; 76, 67], - string="outPort", - style(color=0))), + color=8, + pattern=1, + thickness=1, + arrow=0)), + Line(points=[-20, -20; -20, -70], style(color=8, pattern=2)), + Text( + extent=[-38, -70; 8, -88], + string="startTime", + style(color=9)), + Line(points=[-20, -30; -80, -30], style(color=8, pattern=2)), + Text( + extent=[-73, 93; -41, 78], + string="outPort", + style(color=9)), + Text( + extent=[66, -81; 91, -93], + string="time", + style(color=9)), + Text( + extent=[-15, 83; 24, 68], + string="time", + style(color=0)), + Text( + extent=[33, 83; 76, 67], + string="outPort", + style(color=0))), Documentation(info="

      This block generates an output signal by linear interpolation in -a table. The time points and function values are stored in a matrix -table[i,j], where the first column table[:,1] contains the -time points and the second column contains the data to be interpolated. +a table. The time points and function values are stored in a matrix +table[i,j], where the first column table[:,1] contains the +time points and the second column contains the data to be interpolated. The table interpolation has the following proporties:

      @@ -1634,17 +1602,17 @@ The table interpolation has the following proporties:
    • The time points need to be monotonically increasing.
    • Discontinuities are allowed, by providing the same time point twice in the table.
    • -
    • Values outside of the table range, are computed by +
    • Values outside of the table range, are computed by extrapolation through the last or first two points of the table.
    • If the table has only one row, no interpolation is performed and - the function value is just returned independantly of the + the function value is just returned independantly of the actual time instant.
    • Via parameters startTime and offset the curve defined by the table can be shifted both in time and in the ordinate value. -
    • The table is implemented in a numerically sound way by +
    • The table is implemented in a numerically sound way by generating time events at interval boundaries, - in order to not integrate over a discontinuous or not differentiable + in order to not integrate over a discontinuous or not differentiable points.
    @@ -1670,39 +1638,50 @@ If, e.g., time = 1.0, the output y = 0.0 (before event), 1.0 (after event)

    Release Notes:

      +
    • Oct. 21, 2002 + by Christian Schweiger:
      + Corrected interface from +
      +    parameter Real table[:, :]=[0, 0; 1, 1; 2, 4];
      +
      + to +
      +    parameter Real table[:, 2]=[0, 0; 1, 1; 2, 4];
      +
      +
    • Nov. 7, 1999 - by Martin Otter:
      + by Martin Otter:
      Realized.
    - + ")); - function getInterpolationCoefficients - "Determine interpolation coefficients and next time event" - input Real table[:, :] "Table for interpolation"; + function getInterpolationCoefficients + "Determine interpolation coefficients and next time event" + input Real table[:, 2] "Table for interpolation"; input Real offset "y-offset"; input Real startTime "time-offset"; input Real t "Actual time instant"; input Integer last "Last used lower grid index"; - input Real TimeEps + input Real TimeEps "Relative epsilon to check for identical time instants"; output Real a "Interpolation coefficients a (y=a*x + b)"; output Real b "Interpolation coefficients b (y=a*x + b)"; output Real nextEvent "Next event instant"; output Integer next "New lower grid index"; - protected + protected Integer columns=2 "Column to be interpolated"; Integer ncol=2 "Number of columns to be interpolated"; Integer nrow=size(table, 1) "Number of table rows"; Integer next0; Real tp; Real dt; - algorithm + algorithm next := last; nextEvent := t - TimeEps*abs(t); // in case there are no more time events tp := t + TimeEps*abs(t) - startTime; - + if tp < 0.0 then // First event not yet reached nextEvent := startTime; @@ -1713,19 +1692,19 @@ If, e.g., time = 1.0, the output y = 0.0 (before event), 1.0 (after event) a := 0; b := offset + table[1, columns]; else - - + + // Find next time event instant. Note, that two consecutive time instants // in the table may be identical due to a discontinuous point. while next < nrow and tp >= table[next, 1] loop next := next + 1; end while; - + // Define next time event, if last table entry not reached if next < nrow then nextEvent := startTime + table[next, 1]; end if; - + // Determine interpolation coefficients next0 := next - 1; dt := table[next, 1] - table[next0, 1]; @@ -1738,224 +1717,208 @@ If, e.g., time = 1.0, the output y = 0.0 (before event), 1.0 (after event) b := offset + table[next0, columns] - a*table[next0, 1]; end if; end if; + // Take into account startTime "a*(time - startTime) + b" + b := b - a*startTime; end getInterpolationCoefficients; - equation - when time >= pre(nextEvent) or initial() then - (a,b,nextEvent,last) = getInterpolationCoefficients(table, scalar(offset - ), scalar(startTime), time, last, 100*Modelica.Constants.EPS); + algorithm + when {time >= pre(nextEvent),initial()} then + (a,b,nextEvent,last) := getInterpolationCoefficients(table, scalar(offset + ), scalar(startTime), time, last, 100*Modelica.Constants.eps); end when; + equation outPort.signal[1] = a*time + b; end TimeTable; - block BooleanConstant "Generate constant signals of type Boolean" + + block BooleanConstant "Generate constant signals of type Boolean" parameter Boolean k[:]={true} "Constant output values"; extends Interfaces.BooleanSignalSource(final nout=size(k, 1)); - + annotation ( Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[2, 2], + component=[20, 20]), Window( - x=0.29, - y=0.23, - width=0.6, - height=0.6), + x=0.29, + y=0.23, + width=0.6, + height=0.6), Icon(Line(points=[-80, 0; 80, 0], style(color=0)), Text( - extent=[-150, -150; 150, -110], - string="k=%k", - style(color=0))), + extent=[-150, -150; 150, -110], + string="k=%k", + style(color=0))), Diagram( - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-80, 68; -80, -80], style(color=8)), - Line(points=[-80, 0; 80, 0], style(color=0, thickness=2)), - Line(points=[-90, -70; 82, -70], style(color=8)), - Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style(color=8, - fillColor=8)), - Text( - extent=[-75, 94; -22, 76], - string="outPort", - style(color=9)), - Text( - extent=[70, -80; 94, -100], - string="time", - style(color=9)), - Text( - extent=[-83, 20; -63, 0], - string="k", - style(color=9)), - Text( - extent=[-100, 6; -80, -6], - string="true", - style(color=9)), - Text( - extent=[-104, -58; -78, -70], - string="false", + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-80, 68; -80, -80], style(color=8)), + Line(points=[-80, 0; 80, 0], style(color=0, thickness=2)), + Line(points=[-90, -70; 82, -70], style(color=8)), + Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style(color=8, + fillColor=8)), + Text( + extent=[-75, 94; -22, 76], + string="outPort", + style(color=9)), + Text( + extent=[70, -80; 94, -100], + string="time", + style(color=9)), + Text( + extent=[-83, 20; -63, 0], + string="k", + style(color=9)), + Text( + extent=[-100, 6; -80, -6], + string="true", + style(color=9)), + Text( + extent=[-104, -58; -78, -70], + string="false", style(color=9)))); - equation + equation outPort.signal = k; end BooleanConstant; - block BooleanStep "Generate step signals of type Boolean" - parameter SIunits.Time startTime[:]={0} "Time instants of steps"; + + block BooleanStep "Generate step signals of type Boolean" + parameter SI.Time startTime[:]={0} "Time instants of steps"; + parameter Boolean startValue[size(startTime, 1)]=fill(false, size(startTime + , 1)) "Output before startTime"; extends Interfaces.BooleanSignalSource(final nout=size(startTime, 1)); - annotation ( - Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), - Window( - x=0.33, - y=0.1, - width=0.62, - height=0.7), - Icon( - Line(points=[-80, -70; 0, -70; 0, 34; 80, 34], style(color=0)), - Text( - extent=[-150, -150; 150, -110], - string="startTime=%startTime", - style(color=0)), - Text( - extent=[-25, 92; 47, 66], - string="Step", - style(color=8))), - Diagram( - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-80, 68; -80, -80], style(color=8)), - Line(points=[-80, -70; 0, -70; 0, 50; 80, 50], style(color=0, - thickness=2)), - Line(points=[-90, -70; 82, -70], style(color=8)), - Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style(color=8, - fillColor=8)), - Text( - extent=[70, -80; 94, -100], - string="time", - style(color=9)), - Text( - extent=[-23, -74; 23, -92], - string="startTime", - style(color=9)), - Polygon(points=[2, 50; -80, 50; 2, 50], style(color=8, pattern=2)), - Text( - extent=[-72, 100; -31, 80], - string="outPort", - style(color=9)), - Text( - extent=[-108, 58; -76, 44], - string="true", - style(color=9)), - Text( - extent=[-108, -56; -76, -70], - string="false", - style(color=9)), - Text( - extent=[-108, 58; -76, 44], - string="true", - style(color=9)), - Text( - extent=[-108, -56; -76, -70], - string="false", + annotation (Icon(Line(points=[-80, -70; 0, -70; 0, 50; 80, 50], style(color + =0)), Text( + extent=[-150, -150; 150, -110], + string="startTime=%startTime", + style(color=0))), Diagram( + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-80, 68; -80, -80], style(color=8)), + Line(points=[-80, -70; 0, -70; 0, 50; 80, 50], style(color=0, thickness + =2)), + Line(points=[-90, -70; 82, -70], style(color=8)), + Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style(color=8, + fillColor=8)), + Text( + extent=[70, -80; 94, -100], + string="time", + style(color=9)), + Text( + extent=[-23, -74; 23, -92], + string="startTime", + style(color=9)), + Polygon(points=[2, 50; -80, 50; 2, 50], style(color=8, pattern=2)), + Text( + extent=[-72, 100; -31, 80], + string="outPort", + style(color=9)), + Text( + extent=[-124, 58; -80, 44], + string="not startValue", + style(color=9)), + Text( + extent=[-112, -62; -80, -76], + string="startValue", style(color=9)))); - equation + equation for i in 1:nout loop - outPort.signal[i] = time >= startTime[i]; + outPort.signal[i] = if time >= startTime[i] then not startValue[i] else + startValue[i]; end for; end BooleanStep; - block BooleanPulse "Generate pulse signals of type Boolean" + + block BooleanPulse "Generate pulse signals of type Boolean" parameter Real width[:]( - final min=Modelica.Constants.SMALL, + final min=Modelica.Constants.small, final max=100) = {50} "Widths of pulses in % of period"; - parameter SIunits.Time period[:](final min=Modelica.Constants.SMALL) = {1} - "Times for one period"; - parameter SIunits.Time startTime[:]={0} "Iime instants of first pulse"; - extends Interfaces.BooleanSignalSource(final nout=max([size(width, 1); - size(period, 1); size(startTime, 1)])); - protected - parameter SIunits.Time p_period[nout]=(if size(period, 1) == 1 then ones( - nout)*period[1] else period); - parameter SIunits.Time Twidth[nout]=diagonal(p_period)*(if size(width, 1) - == 1 then ones(nout)*width[1] else width)/100 "width of one pulse"; - parameter SIunits.Time p_startTime[nout]=(if size(startTime, 1) == 1 then - ones(nout)*startTime[1] else startTime); - discrete SIunits.Time T0[nout](final start=p_startTime) - "Start time of current period"; + parameter SI.Time period[:](final min=Modelica.Constants.small) = {1} + "Times for one period"; + parameter SI.Time startTime[:]={0} "Iime instants of first pulse"; + extends Interfaces.BooleanSignalSource(final nout=max([size(width, 1); size + (period, 1); size(startTime, 1)])); + protected + parameter SI.Time p_period[nout]=(if size(period, 1) == 1 then ones(nout)* + period[1] else period); + parameter SI.Time Twidth[nout]=diagonal(p_period)*(if size(width, 1) == 1 + then ones(nout)*width[1] else width)/100 "width of one pulse"; + parameter SI.Time p_startTime[nout]=(if size(startTime, 1) == 1 then ones( + nout)*startTime[1] else startTime); + SI.Time T0[nout](final start=p_startTime) "Start time of current period"; annotation ( Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Window( - x=0.32, - y=0.08, - width=0.6, - height=0.6), + x=0.32, + y=0.08, + width=0.6, + height=0.6), Icon(Text( - extent=[-150, -150; 150, -110], - string="period=%period", - style(color=0)), Line(points=[-80, -70; -40, -70; -40, 44; 0, 44; 0 - , -70; 40, -70; 40, 44; 79, 44], style(color=0))), + extent=[-150, -150; 150, -110], + string="period=%period", + style(color=0)), Line(points=[-80, -70; -40, -70; -40, 44; 0, 44; 0, + -70; 40, -70; 40, 44; 79, 44], style(color=0))), Diagram( - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-80, 68; -80, -80], style(color=8)), - Line(points=[-90, -70; 82, -70], style(color=8)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-80, 68; -80, -80], style(color=8)), + Line(points=[-90, -70; 82, -70], style(color=8)), Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Text( - extent=[-60, -72; -14, -90], - string="startTime", - style(color=9)), + extent=[-60, -72; -14, -90], + string="startTime", + style(color=9)), Text( - extent=[-76, 99; -35, 79], - string="outPort", - style(color=9)), + extent=[-76, 99; -35, 79], + string="outPort", + style(color=9)), Text( - extent=[70, -80; 94, -100], - string="time", - style(color=9)), + extent=[70, -80; 94, -100], + string="time", + style(color=9)), Line(points=[-78, -70; -40, -70; -40, 20; 20, 20; 20, -70; 50, -70; 50 - , 20; 100, 20], style(color=0, thickness=2)), - Line(points=[-40, 61; -40, 21], style(color=8, pattern=2)), - Line(points=[20, 44; 20, 20], style(color=9, pattern=2)), - Line(points=[50, 58; 50, 20], style(color=8, pattern=2)), - Line(points=[-40, 53; 50, 53], style(color=8)), - Line(points=[-40, 35; 20, 35], style(color=8)), - Text( - extent=[-30, 67; 16, 55], - string="period", - style(color=9)), - Text( - extent=[-35, 49; 14, 37], - string="width", - style(color=9)), - Line(points=[-80, 20; -41, 20], style(color=8, pattern=2)), + , 20; 100, 20], style(color=0, thickness=2)), + Line(points=[-40, 61; -40, 21], style(color=8, pattern=2)), + Line(points=[20, 44; 20, 20], style(color=9, pattern=2)), + Line(points=[50, 58; 50, 20], style(color=8, pattern=2)), + Line(points=[-40, 53; 50, 53], style(color=8)), + Line(points=[-40, 35; 20, 35], style(color=8)), + Text( + extent=[-30, 67; 16, 55], + string="period", + style(color=9)), + Text( + extent=[-35, 49; 14, 37], + string="width", + style(color=9)), + Line(points=[-80, 20; -41, 20], style(color=8, pattern=2)), Polygon(points=[-40, 35; -31, 37; -31, 33; -40, 35], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[20, 35; 12, 37; 12, 33; 20, 35], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[-40, 53; -31, 55; -31, 51; -40, 53], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[50, 53; 42, 55; 42, 51; 50, 53], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Text( - extent=[-109, 28; -77, 14], - string="true", - style(color=9)), + extent=[-109, 28; -77, 14], + string="true", + style(color=9)), Text( - extent=[-101, -56; -80, -71], - string="false", + extent=[-101, -56; -80, -71], + string="false", style(color=9)))); - equation + equation for i in 1:nout loop when sample(p_startTime[i], p_period[i]) then T0[i] = time; @@ -1963,91 +1926,217 @@ If, e.g., time = 1.0, the output y = 0.0 (before event), 1.0 (after event) outPort.signal[i] = time >= T0[i] and time < T0[i] + Twidth[i]; end for; end BooleanPulse; - block SampleTrigger "Generate sample trigger signals" - parameter SIunits.Time period[:](final min=Modelica.Constants.SMALL) = { - 0.01} "Sample periods"; - parameter SIunits.Time startTime[:]={0} - "Time instants of first sample triggers"; - extends Interfaces.BooleanSignalSource(final nout=max([size(period, 1); + + block SampleTrigger "Generate sample trigger signals" + parameter SI.Time period[:](final min=Modelica.Constants.small) = {0.01} + "Sample periods"; + parameter SI.Time startTime[:]={0} "Time instants of first sample triggers" + ; + extends Interfaces.BooleanSignalSource(final nout=max([size(period, 1); size(startTime, 1)])); - - protected - parameter SIunits.Time p_period[nout]=(if size(period, 1) == 1 then ones( - nout)*period[1] else period); - parameter SIunits.Time p_startTime[nout]=(if size(startTime, 1) == 1 then - ones(nout)*startTime[1] else startTime); + + protected + parameter SI.Time p_period[nout]=(if size(period, 1) == 1 then ones(nout)* + period[1] else period); + parameter SI.Time p_startTime[nout]=(if size(startTime, 1) == 1 then ones( + nout)*startTime[1] else startTime); annotation ( Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Window( - x=0.22, - y=0.02, - width=0.58, - height=0.8), + x=0.22, + y=0.02, + width=0.58, + height=0.8), Icon( - Line(points=[-60, -70; -60, 70], style(color=0)), - Line(points=[-20, -70; -20, 70], style(color=0)), - Line(points=[20, -70; 20, 70], style(color=0)), - Line(points=[60, -70; 60, 70], style(color=0)), - Text( - extent=[-150, -150; 150, -110], - string="period=%period", - style(color=0))), + Line(points=[-60, -70; -60, 70], style(color=0)), + Line(points=[-20, -70; -20, 70], style(color=0)), + Line(points=[20, -70; 20, 70], style(color=0)), + Line(points=[60, -70; 60, 70], style(color=0)), + Text( + extent=[-150, -150; 150, -110], + string="period=%period", + style(color=0))), Diagram( - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-80, 68; -80, -80], style(color=8)), - Line(points=[-90, -70; 82, -70], style(color=8)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-80, 68; -80, -80], style(color=8)), + Line(points=[-90, -70; 82, -70], style(color=8)), Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style( - color=8, - fillColor=8, - fillPattern=1)), - Text( - extent=[-53, -71; -7, -89], - string="startTime", - style(color=9)), - Text( - extent=[-76, 99; -35, 79], - string="outPort", - style(color=9)), - Text( - extent=[70, -80; 94, -100], - string="time", - style(color=9)), - Line(points=[-30, 47; -30, 19], style(color=8, pattern=2)), - Line(points=[0, 47; 0, 18], style(color=8, pattern=2)), - Line(points=[-30, 41; 0, 41], style(color=8)), - Text( - extent=[-37, 61; 9, 49], - string="period", - style(color=9)), - Line(points=[-80, 19; -30, 19], style(color=8, pattern=2)), + color=8, + fillColor=8, + fillPattern=1)), + Text( + extent=[-53, -71; -7, -89], + string="startTime", + style(color=9)), + Text( + extent=[-76, 99; -35, 79], + string="outPort", + style(color=9)), + Text( + extent=[70, -80; 94, -100], + string="time", + style(color=9)), + Line(points=[-30, 47; -30, 19], style(color=8, pattern=2)), + Line(points=[0, 47; 0, 18], style(color=8, pattern=2)), + Line(points=[-30, 41; 0, 41], style(color=8)), + Text( + extent=[-37, 61; 9, 49], + string="period", + style(color=9)), + Line(points=[-80, 19; -30, 19], style(color=8, pattern=2)), Polygon(points=[-30, 41; -21, 43; -21, 39; -30, 41], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[0, 41; -8, 43; -8, 39; 0, 41], style( - color=8, - fillColor=8, - fillPattern=1)), - Text( - extent=[-100, 28; -80, 13], - string="true", - style(color=9)), - Text( - extent=[-100, -56; -80, -71], - string="false", - style(color=9)), - Line(points=[0, -70; 0, 19], style(color=0, thickness=2)), - Line(points=[-30, -70; -30, 19], style(color=0, thickness=2)), - Line(points=[30, -70; 30, 19], style(color=0, thickness=2)), + color=8, + fillColor=8, + fillPattern=1)), + Text( + extent=[-100, 28; -80, 13], + string="true", + style(color=9)), + Text( + extent=[-100, -56; -80, -71], + string="false", + style(color=9)), + Line(points=[0, -70; 0, 19], style(color=0, thickness=2)), + Line(points=[-30, -70; -30, 19], style(color=0, thickness=2)), + Line(points=[30, -70; 30, 19], style(color=0, thickness=2)), Line(points=[60, -70; 60, 19], style(color=0, thickness=2)))); - equation + equation for i in 1:nout loop outPort.signal[i] = sample(p_startTime[i], p_period[i]); end for; end SampleTrigger; -end Sources; + block IntegerConstant "Generate constant signals of type Integer" + parameter Integer k[:]={1} "Constant output values"; + extends Interfaces.IntegerMO(final nout=size(k, 1)); + + annotation (Icon( + Line(points=[-80, 68; -80, -80], style(color=8)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-90, -70; 82, -70], style(color=8)), + Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style(color=8, + fillColor=8)), + Line(points=[-80, 0; 80, 0], style(color=0)), + Text( + extent=[-150, -150; 150, -110], + string="k=%k", + style(color=0))), Diagram( + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-80, 68; -80, -80], style(color=8)), + Line(points=[-80, 0; 80, 0], style(color=0, thickness=2)), + Line(points=[-90, -70; 82, -70], style(color=8)), + Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style(color=8, + fillColor=8)), + Text( + extent=[-75, 94; -22, 76], + string="outPort", + style(color=9)), + Text( + extent=[70, -80; 94, -100], + string="time", + style(color=9)), + Text( + extent=[-101, 8; -81, -12], + string="k", + style(color=9)))); + equation + outPort.signal = k; + end IntegerConstant; + + block IntegerStep "Generate step signals of type Integer" + parameter Integer height[:]={1} "Heights of steps"; + extends Interfaces.IntegerSignalSource(final nout=max([size(height, 1); + size(offset, 1); size(startTime, 1)])); + protected + parameter Integer p_height[nout]=(if size(height, 1) == 1 then ones(nout)* + height[1] else height); + parameter Integer p_offset[nout]=(if size(offset, 1) == 1 then ones(nout)* + offset[1] else offset); + parameter SI.Time p_startTime[nout]=(if size(startTime, 1) == 1 then ones( + nout)*startTime[1] else startTime); + annotation (Icon( + Line(points=[-80, 68; -80, -80], style(color=8)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-90, -70; 82, -70], style(color=8)), + Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style(color=8, + fillColor=8)), + Line(points=[-80, -70; 0, -70; 0, 50; 80, 50], style(color=0)), + Text( + extent=[-150, -150; 150, -110], + string="startTime=%startTime", + style(color=0))), Diagram( + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-80, 68; -80, -80], style(color=8)), + Line(points=[-80, -18; 0, -18; 0, 50; 80, 50], style(color=0, thickness + =2)), + Line(points=[-90, -70; 82, -70], style(color=8)), + Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style(color=8, + fillColor=8)), + Text( + extent=[70, -80; 94, -100], + string="time", + style(color=9)), + Text( + extent=[-21, -72; 25, -90], + string="startTime", + style(color=9)), + Line(points=[0, -17; 0, -71], style(color=8, pattern=2)), + Text( + extent=[-68, -36; -22, -54], + string="offset", + style(color=9)), + Line(points=[-13, 50; -13, -17], style( + color=8, + pattern=1, + thickness=1, + arrow=0)), + Polygon(points=[2, 50; -19, 50; 2, 50], style(color=8, pattern=2)), + Polygon(points=[-13, -17; -16, -4; -10, -4; -13, -17; -13, -17], style( + color=8, + fillColor=8, + fillPattern=1)), + Polygon(points=[-13, 50; -16, 37; -9, 37; -13, 50], style( + color=8, + fillColor=8, + fillPattern=1)), + Text( + extent=[-68, 26; -22, 8], + string="height", + style(color=9)), + Polygon(points=[-13, -69; -16, -56; -10, -56; -13, -69; -13, -69], + style( + color=8, + fillColor=8, + fillPattern=1)), + Line(points=[-13, -18; -13, -70], style( + color=8, + pattern=1, + thickness=1, + arrow=0)), + Polygon(points=[-13, -18; -16, -31; -9, -31; -13, -18], style( + color=8, + fillColor=8, + fillPattern=1)), + Text( + extent=[-72, 100; -31, 80], + string="outPort", + style(color=9)))); + equation + for i in 1:nout loop + outPort.signal[i] = p_offset[i] + (if time < p_startTime[i] then 0 else + p_height[i]); + end for; + end IntegerStep; +end Sources; diff --git a/Blocks/package.mo b/Blocks/package.mo index c450499625..cf9fd51d93 100644 --- a/Blocks/package.mo +++ b/Blocks/package.mo @@ -1,34 +1,32 @@ package Blocks "Library for basic input/output control blocks" + +import SI = Modelica.SIunits; + + extends Modelica.Icons.Library2; -annotation ( - Coordsys( - extent=[0, 0; 302, 246], - grid=[2, 2], - component=[20, 20]), +annotation ( Window( - x=0.01, - y=0.22, - width=0.3, - height=0.38, + x=0.03, + y=0.05, + width=0.21, + height=0.48, library=1, autolayout=1), Icon( - Rectangle(extent=[-32, -6; 16, -35], style(color=0)), - Rectangle(extent=[-32, -56; 16, -85], style(color=0)), - Line(points=[16, -20; 49, -20; 49, -71; 16, -71], style(color=0)), - Line(points=[-32, -72; -64, -72; -64, -21; -32, -21], style(color=0)), + Rectangle(extent=[-32, -6; 16, -35], style(color=0)), + Rectangle(extent=[-32, -56; 16, -85], style(color=0)), + Line(points=[16, -20; 49, -20; 49, -71; 16, -71], style(color=0)), + Line(points=[-32, -72; -64, -72; -64, -21; -32, -21], style(color=0)), Polygon(points=[16, -71; 29, -67; 29, -74; 16, -71], style( - color=0, - fillColor=0, - fillPattern=1)), + color=0, + fillColor=0, + fillPattern=1)), Polygon(points=[-32, -21; -46, -17; -46, -25; -32, -21], style( - color=0, - fillColor=0, - fillPattern=1))), - Documentation(info=" - + color=0, + fillColor=0, + fillPattern=1))), Documentation(info="

    This library contains input/output blocks to build up block diagrams. The library is structured in the following sublibraries: @@ -36,6 +34,7 @@ The library is structured in the following sublibraries:

       Interfaces    Connectors and partial models for block diagram components
    +  Examples      Demonstration examples
       Continuous    Basic continuous input/output blocks
       Discrete      Discrete control blocks (not yet available)
       Logical       Logical and relational operations on Boolean signals
    @@ -48,8 +47,8 @@ The library is structured in the following sublibraries:
     
     
    Main Author: -
    Martin Otter
    - Deutsches Zentrum fuer Luft und Raumfahrt e.V. (DLR)
    +
    Martin Otter
    + Deutsches Zentrum für Luft und Raumfahrt e. V. (DLR)
    Oberpfaffenhofen
    Postfach 1116
    D-82230 Wessling
    @@ -59,25 +58,46 @@ The library is structured in the following sublibraries:

    Release Notes:

      +
    • October 21, 2002 + by Martin Otter + and Christian Schweiger:
      + New subpackage Examples, additional components. +
    • +
    • June 20, 2000 + by Martin Otter and + Michael Tiller:
      + Introduced a replaceable signal type into + Blocks.Interfaces.InPort/OutPort: +
      +   replaceable type SignalType = Real
      +
      + in order that the type of the signal of an input/output block + can be changed to a physical type, for example: + +
      +   Sine sin1(outPort(redeclare type SignalType=Modelica.SIunits.Torque))
      +
      +
    • +
    • Sept. 18, 1999 - by Martin Otter:
      + by Martin Otter:
      Renamed to Blocks. New subpackages Math, Nonlinear. Additional components in subpackages Interfaces, Continuous and Sources.
    • June 30, 1999 - by Martin Otter:
      + by Martin Otter:
      Realized a first version, based on an existing Dymola library of Dieter Moormann and Hilding Elmqvist.

    -

    Copyright (C) 1999, Modelica Design Group and DLR.

    +

    Copyright © 1999-2002, Modelica Association and DLR.

    The Modelica package is free software; it can be redistributed and/or modified under the terms of the Modelica license, see the license conditions -and the accompanying disclaimer in the documentation of package +and the accompanying disclaimer in the documentation of package Modelica in file \"Modelica/package.mo\".

    diff --git a/Constants.mo b/Constants.mo index 933250e601..35fe90dd27 100644 --- a/Constants.mo +++ b/Constants.mo @@ -1,40 +1,48 @@ -package Constants "Mathematical constants and constants of nature" +package Constants "Mathematical constants and constants of nature" + + import SI = Modelica.SIunits; + import NonSI = Modelica.SIunits.Conversions.NonSIunits; + extends Modelica.Icons.Library2; - package SIunits = Modelica.SIunits; - + // Mathematical constants - // (the definition is a temporary fix since not adapted to the - // machine where the Modelica translator is running) constant Real e=Modelica.Math.exp(1.0); - constant Real pi=2*Modelica.Math.asin(1.0); // 3.14159265358979; - + constant Real pi=2*Modelica.Math.asin(1.0); + // 3.14159265358979; + constant Real D2R=pi/180 "Degree to Radian"; + constant Real R2D=180/pi "Radian to Degree"; + // Machine dependent constants // (the definition is a temporary fix since not adapted to the // machine where the Modelica translator is running) - constant Real eps=1.e-15 "Biggest number such that 1.0 + EPS = 1.0"; - constant Real small=1.e-60 + constant Real eps=1.e-15 "Biggest number such that 1.0 + eps = 1.0"; + constant Real small=1.e-60 "Smallest number such that small and -small are representable on the machine" ; - constant Real inf=1.e+60 + constant Real inf=1.e+60 "Biggest Real number such that inf and -inf are representable on the machine" ; - constant Integer Integer_inf=2147483647 + constant Integer Integer_inf=2147483647 "Biggest Integer number such that Integer_inf and -Integer_inf are representable on the machine" ; - - // Constants of nature + + // Constants of nature // (name, value, description from http://physics.nist.gov/cuu/Constants/) - constant Modelica.SIunits.Velocity c = 299792458 "Speed of light in vacuum"; - constant Modelica.SIunits.Acceleration g_n = 9.80665 "Standard acceleration of gravity on earth"; - constant Real G(final unit="m3/(kg.s2)") = 6.673e-11 "Newtonian constant of gravitation"; + constant SI.Velocity c=299792458 "Speed of light in vacuum"; + constant SI.Acceleration g_n=9.80665 + "Standard acceleration of gravity on earth"; + constant Real G(final unit="m3/(kg.s2)") = 6.673e-11 + "Newtonian constant of gravitation"; constant Real h(final unit="J.s") = 6.62606876e-34 "Planck constant"; constant Real k(final unit="J/K") = 1.3806503e-23 "Boltzmann constant"; constant Real R(final unit="J/(mol.K)") = 8.314472 "Molar gas constant"; - constant Real sigma(final unit="W/(m2.K4)") = 5.670400e-8 "Stefan-Boltzmann constant"; + constant Real sigma(final unit="W/(m2.K4)") = 5.670400e-8 + "Stefan-Boltzmann constant"; constant Real N_A(final unit="1/mol") = 6.02214199e23 "Avogadro constant"; constant Real mue_0(final unit="N/A2") = 4*pi*1.e-7 "Magnetic constant"; - constant Real epsilon_0(final unit="F/m") = 1/(mue_0*c*c) "Electric constant"; - constant Modelica.SIunits.CelsiusTemperature T_zero = -273.15 "Absolute zero temperature"; + constant Real epsilon_0(final unit="F/m") = 1/(mue_0*c*c) "Electric constant" + ; + constant NonSI.Temperature_degC T_zero=-273.15 "Absolute zero temperature"; // For compatibility with previous versions (do not use in new models) constant Real E=e; @@ -50,10 +58,9 @@ package Constants "Mathematical constants and constants of nature" constant Real SIGMA=sigma; constant Real G_EARTH=g_n; constant Real T_ZERO=T_zero; - + annotation ( - Documentation(info=" - + Documentation(info="

    This package provides often needed constants from mathematics, machine dependent constants and constants from nature. The latter constants @@ -63,7 +70,7 @@ dependent constants and constants from nature. The latter constants

    Peter J. Mohr and Barry N. Taylor (1999):
    CODATA Recommended Values of the Fundamental Physical Constants: 1998. - Journal of Physical and Chemical Reference Data, Vol. 28, No. 6, 1999 and + Journal of Physical and Chemical Reference Data, Vol. 28, No. 6, 1999 and Reviews of Modern Physics, Vol. 72, No. 2, 2000. See also http://physics.nist.gov/cuu/Constants/ @@ -72,7 +79,7 @@ dependent constants and constants from nature. The latter constants
    Main Author: -
    Martin Otter
    +
    Martin Otter
    Deutsches Zentrum fuer Luft und Raumfahrt e.V. (DLR)
    Oberpfaffenhofen
    Postfach 1116
    @@ -84,68 +91,65 @@ dependent constants and constants from nature. The latter constants

    Release Notes:


    -

    Copyright (C) 1999, Modelica Design Group and DLR.

    +

    Copyright © 1999-2002, Modelica Association and DLR.

    The Modelica package is free software; it can be redistributed and/or modified under the terms of the Modelica license, see the license conditions -and the accompanying disclaimer in the documentation of package +and the accompanying disclaimer in the documentation of package Modelica in file \"Modelica/package.mo\".

    -"), - Coordsys( - extent=[0, 0; 658, 516], - grid=[2, 2], - component=[20, 20]), +"), Window( - x=0.16, - y=0.01, - width=0.65, - height=0.81, - library=1, - autolayout=1), + x=0.16, + y=0.01, + width=0.65, + height=0.81, + library=1, + autolayout=1), + Invisible=true, Icon( - Line(points=[-34, -38; 12, -38], style(color=0, thickness=2)), - Line(points=[-20, -38; -24, -48; -28, -56; -34, -64], style(color=0, - thickness=2)), - Line(points=[-2, -38; 2, -46; 8, -56; 14, -64], style(color=0, thickness - =2))), + Line(points=[-34, -38; 12, -38], style(color=0, thickness=2)), + Line(points=[-20, -38; -24, -48; -28, -56; -34, -64], style(color=0, + thickness=2)), + Line(points=[-2, -38; 2, -46; 8, -56; 14, -64], style(color=0, thickness= + 2))), Diagram( - Rectangle(extent=[200, 162; 380, 312], style(fillColor=30, fillPattern=1 - )), - Polygon(points=[200, 312; 220, 332; 400, 332; 380, 312; 200, 312], style - (fillColor=30, fillPattern=1)), - Polygon(points=[400, 332; 400, 182; 380, 162; 380, 312; 400, 332], style - (fillColor=30, fillPattern=1)), + Rectangle(extent=[200, 162; 380, 312], style(fillColor=30, fillPattern=1) + ), + Polygon(points=[200, 312; 220, 332; 400, 332; 380, 312; 200, 312], style( + fillColor=30, fillPattern=1)), + Polygon(points=[400, 332; 400, 182; 380, 162; 380, 312; 400, 332], style( + fillColor=30, fillPattern=1)), Text( - extent=[210, 302; 370, 272], - string="Library", + extent=[210, 302; 370, 272], + string="Library", style( - color=9, - fillColor=0, - fillPattern=1)), - Line(points=[266, 224; 312, 224], style(color=0, thickness=4)), - Line(points=[280, 224; 276, 214; 272, 206; 266, 198], style(color=0, - thickness=4)), - Line(points=[298, 224; 302, 216; 308, 206; 314, 198], style(color=0, - thickness=4)), + color=9, + fillColor=0, + fillPattern=1)), + Line(points=[266, 224; 312, 224], style(color=0, thickness=4)), + Line(points=[280, 224; 276, 214; 272, 206; 266, 198], style(color=0, + thickness=4)), + Line(points=[298, 224; 302, 216; 308, 206; 314, 198], style(color=0, + thickness=4)), Text( - extent=[152, 412; 458, 334], - string="Modelica.Constants", + extent=[152, 412; 458, 334], + string="Modelica.Constants", style(color=1)))); end Constants; diff --git a/Documentation/ChangeNotes1.5.html b/Documentation/ChangeNotes1.5.html new file mode 100644 index 0000000000..7a20299797 --- /dev/null +++ b/Documentation/ChangeNotes1.5.html @@ -0,0 +1,347 @@ + + +Changes in package Modelica 1.5 + + +

    Changes in package Modelica 1.5

    + +

    New components

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Modelica.Blocks.
    Continuous.DerDerivative of input (= analytic differentations)
    ExamplesDemonstration examples of the components of this package
    Nonlinear.VariableLimiterLimit the range of a signal with variable limits
    Modelica.Blocks.Interfaces.
    RealPortReal port (both input/output possible)
    IntegerPortInteger port (both input/output possible)
    BooleanPortBoolean port (both input/output possible)
    SIMOSingle Input Multiple Output continuous control block
    IntegerBlockIconBasic graphical layout of Integer block
    IntegerMOMultiple Integer Output continuous control block
    IntegerSignalSourceBase class for continuous Integer signal source
    IntegerMIBooleanMOsMultiple Integer Input Multiple Boolean Output continuous control block with same number of inputs and outputs
    BooleanMIMOsMultiple Input Multiple Output continuous control block with same number of inputs and outputs of boolean type
    BusAdaptorsComponents to send signals to the bus or receive signals from the bus
    Modelica.Blocks.Math.
    RealToIntegerConvert real to integer signals
    IntegerToRealConvert integer to real signals
    MaxPass through the largest signal
    MinPass through the smallest signal
    EdgeIndicates rising edge of boolean signal
    BooleanChangeIndicates boolean signal changing
    IntegerChangeIndicates integer signal changing
    Modelica.Blocks.Sources.
    IntegerConstantGenerate constant signals of type Integer
    IntegerStepGenerate step signals of type Integer
    Modelica.Electrical.Analog.Basic.
    HeatingResistorTemperature dependent electrical resistor
    OpAmpSimple nonideal model of an OpAmp with limitation
    Modelica.Electrical.Analog.Ideal.
    IdealCommutingSwitchIdeal commuting switch
    IdealIntermediateSwitchIdeal intermediate switch
    ControlledIdealCommutingSwitchControlled ideal commuting switch
    ControlledIdealIntermediateSwitchControlled ideal intermediate switch
    IdealOpAmpLimitedIdeal operational amplifier with limitation
    IdealOpenerIdeal opener
    IdealCloserIdeal closer
    ControlledIdealOpenerControlled ideal opener
    ControlledIdealCloserControlled ideal closer
    Modelica.Electrical.Analog.Lines.
    TLine1Lossless transmission line (Z0, TD)
    TLine2Lossless transmission line (Z0, F, NL)
    TLine2Lossless transmission line (Z0, F)
    Modelica.Icons.
    FunctionIcon for a function
    RecordIcon for a record
    EnumerationIcon for an enumeration
    Modelica.Math.
    tempInterpol2temporary routine for vectorized linear interpolation (will be removed)
    Modelica.Mechanics.Rotational.
    Examples.LossyGearDemo1Example to show that gear efficiency may lead to stuck motion
    Examples.LossyGearDemo2Example to show combination of LossyGear and BearingFriction
    LossyGearGear with mesh efficiency and bearing friction (stuck/rolling possible)
    Gear2Realistic model of a gearbox (based on LossyGear)
    Modelica.SIunits.
    ConversionsConversion functions to/from non SI units and type definitions of non SI units
    EnergyFlowRateSame definition as Power
    EnthalpyFlowRateReal (final quantity="EnthalpyFlowRate", final unit="W")
    Modelica.
    Thermal.HeatTransfer1-dimensional heat transfer with lumped elements
    ModelicaAdditions.Blocks.Discrete.
    TriggeredSamplerTriggered sampling of continuous signals
    TriggeredMaxCompute maximum, absolute value of continuous signal at trigger instants
    ModelicaAdditions.Blocks.Logical.Interfaces.
    BooleanMIRealMOsMultiple Boolean Input Multiple Real Output continuous control block with same number of inputs and outputs
    RealMIBooleanMOsMultiple Real Input Multiple Boolean Output continuous control block with same number of inputs and outputs
    ModelicaAdditions.Blocks.Logical.
    TriggeredTrapezoidTriggered trapezoid generator
    HysteresisTransform Real to Boolean with Hysteresis
    OnOffControllerOn-off controller
    CompareTrue, if signal of inPort1 is larger than signal of inPort2
    ZeroCrossingTrigger zero crossing of input signal
    ModelicaAdditions.
    Blocks.Multiplexer.ExtractorExtract scalar signal out of signal vector dependent on IntegerInPort index
    Tables.CombiTable1DsTable look-up in one dimension (matrix/file) with only single input
    + +

    Package-specific Changes

    + +
      +
    • All example models made encapsulated
    • +
    • Upper case constants changed to lower case (cf. Modelica.Constants)
    • +
    • Introduced Modelica.SIunits.Wavelength due to typo "Wavelenght"
    • +
    • Introduced ModelicaAdditions.Blocks.Logical.Interfaces.Comparison due to typo "Comparision"
    • +
    • Changed these components of *.Blocks to block class, which have not been already of block type
    • +
    • Changed *.Interfaces.RelativeSensor to partial models
    • +
    + +

    Class-specific Changes

    + +

    Modelica.SIunits

    + +

    Removed final from quantity attribute for Mass and MassFlowRate.

    + +

    Modelica.Blocks.Math.Sum

    + +

    Implemented avoiding algorithm section, which would lead to expensive function calls.

    + +

    Modelica.Blocks.Sources

    + +

    Step

    + +
    +  block Step "Generate step signals of type Real"
    +    parameter Real height[:]={1} "Heights of steps";
    + // parameter Real offset[:]={0} "Offsets of output signals";
    + // parameter SIunits.Time startTime[:]={0} "Output = offset for time < startTime";
    + // extends Interfaces.MO          (final nout=max([size(height, 1); size(offset, 1); size(startTime, 1)]));
    +    extends Interfaces.SignalSource(final nout=max([size(height, 1); size(offset, 1); size(startTime, 1)]));
    +  protected
    +    parameter Real p_height[nout]=(if size(height, 1) == 1 then ones(nout)*
    +        height[1] else height);
    +    parameter Real p_offset[nout]=(if size(offset, 1) == 1 then ones(nout)*
    +        offset[1] else offset);
    +    parameter SIunits.Time p_startTime[nout]=(if size(startTime, 1) == 1 then
    +        ones(nout)*startTime[1] else startTime);
    +  equation
    +    for i in 1:nout loop
    +      outPort.signal[i] = p_offset[i] + (if time < p_startTime[i] then 0 else
    +        p_height[i]);
    +    end for;
    +  end Step;
    +
    + +

    Exponentials

    + +

    Replaced usage of built-in function exp by Modelica.Math.exp. + +

    TimeTable

    + +

    Interface definition changed from

    + +
        parameter Real table[:, :]=[0, 0; 1, 1; 2, 4] "Table matrix (time = first column)";
    +
    + +

    to

    + +
        parameter Real table[:, 2]=[0, 0; 1, 1; 2, 4] "Table matrix (time = first column)";
    +
    + +

    Did the same for subfunction getInterpolationCoefficients.

    + +

    Bug in getInterpolationCoefficients for startTime <> 0 fixed:

    + +
            ...
    +        end if;
    +      end if;
    +      // Take into account startTime "a*(time - startTime) + b"
    +      b := b - a*startTime;
    +    end getInterpolationCoefficients;
    +
    + +

    BooleanStep

    + +
    +  block BooleanStep "Generate step signals of type Boolean"
    +    parameter SIunits.Time startTime[:]={0} "Time instants of steps";
    +    parameter Boolean startValue[size(startTime, 1)]=fill(false, size(startTime, 1)) "Output before startTime";
    +    extends Interfaces.BooleanSignalSource(final nout=size(startTime, 1));
    +  equation
    +    for i in 1:nout loop
    + //   outPort.signal[i] = time >= startTime[i];
    +      outPort.signal[i] = if time >= startTime[i] then not startValue[i] else startValue[i];
    +    end for;
    +  end BooleanStep;
    +
    + +

    Modelica.Electrical.Analog

    + +

    Corrected table of values and default for Beta by dividing them by 1000 +(consistent with the values used in the NAND-example model): +

    +
      +
    • Semiconductors.PMOS
    • +
    • Semiconductors.NMOS
    • +
    +

    Corrected parameter defaults, unit and description for TrapezoidCurrent. +This makes the parameters consistent with their use in the model. + +Models specifying parameter values are not changed. +Models not specifying parameter values did not generate trapezoids previously. +

    + +

    Icon layer background changed from transparent to white:

    + +
      +
    • Basic.Gyrator
    • +
    • Basic.EMF
    • +
    • Ideal.Idle
    • +
    • Ideal.Short
    • +
    + +

    Basic.Transformer: Replaced invalid escape characters '\ ' and '\[newline]' in documentation by '|'.

    + +

    Modelica.Mechanics

    + +

    Rotational

    + +

    Removed arrows and names documentation from flanges in diagram layer

    + +

    Rotational.Interfaces.FrictionBase

    + +
    +    partial model FrictionBase "Base class of Coulomb friction elements"
    +      parameter SIunits.AngularVelocity w_small=1
    +        "Relative angular velocity near to zero (see model info text)";
    +
    +
    +        // Equations to define the following variables have to be defined in subclasses
    +      SIunits.AngularVelocity w_relfric
    +        "Relative angular velocity between frictional surfaces";
    +      SIunits.AngularAcceleration a_relfric
    +        "Relative angular acceleration between frictional surfaces";
    +      SIunits.Torque tau
    +        "Friction torque (positive, if directed in opposite direction of w_rel)"
    +        ;
    +      SIunits.Torque tau0 "Friction torque for w=0 and forward sliding";
    +      SIunits.Torque tau0_max "Maximum friction torque for w=0 and locked";
    +      Boolean free "true, if frictional element is not active";
    +
    +      // Equations to define the following variables are given in this class
    +      Real sa "Path parameter of friction characteristic tau = f(a_relfric)";
    +
    +      Boolean startForward(start=false, fixed=true)
    +        "true, if w_rel=0 and start of forward sliding or w_rel > w_small";
    +      Boolean startBackward(start=false, fixed=true)
    +        "true, if w_rel=0 and start of backward sliding or w_rel < -w_small";
    +      Boolean locked "true, if w_rel=0 and not sliding";
    +
    +      constant Integer Unknown=3 "Value of mode is not known";
    +      constant Integer Free=2 "Element is not active";
    +      constant Integer Forward=1 "w_rel > 0 (forward sliding)";
    +      constant Integer Stuck=0
    +        "w_rel = 0 (forward sliding, locked or backward sliding)";
    +      constant Integer Backward=-1 "w_rel < 0 (backward sliding)";
    +      Integer mode(
    +        final min=Backward,
    +        final max=Unknown,
    +        start=Unknown,
    +        fixed=true);
    +    equation
    +      /* Friction characteristic
    +     (locked is introduced to help the Modelica translator determining
    +      the different structural configurations, if for each configuration
    +      special code shall be generated)
    +  */
    +
    +      startForward = pre(mode) == Stuck and (sa > tau0_max or pre(startForward)
    +         and sa > tau0) or pre(mode) == Backward and w_relfric > w_small or
    +        initial() and (w_relfric > 0);
    +      startBackward = pre(mode) == Stuck and (sa < -tau0_max or pre(
    +        startBackward) and sa < -tau0) or pre(mode) == Forward and w_relfric <
    +        -w_small or initial() and (w_relfric < 0);
    +      locked = not free and not (pre(mode) == Forward or startForward or pre(
    +        mode) == Backward or startBackward);
    +
    +      a_relfric = if locked then 0 else if free then sa else if startForward
    +         then sa - tau0 else if startBackward then sa + tau0 else if pre(mode)
    +         == Forward then sa - tau0 else sa + tau0;
    +
    +      /* Friction torque has to be defined in a subclass. Example for a clutch:
    +       tau = if locked then sa else if free then 0 else cgeo*fn*
    +                (if startForward  then  Math.tempInterpol1( w_relfric, mue_pos, 2)
    +             else if startBackward then -Math.tempInterpol1(-w_relfric, mue_pos, 2)
    +             else if pre(mode) == Forward then Math.tempInterpol1(w_relfric, mue_pos, 2)
    +             else -Math.tempInterpol1(-w_relfric, mue_pos, 2));
    +  */
    +
    +      // finite state machine to determine configuration
    +      mode = if free then Free else (if (pre(mode) == Forward or pre(mode) ==
    +        Free or startForward) and w_relfric > 0 then Forward else if (pre(mode)
    +         == Backward or pre(mode) == Free or startBackward) and w_relfric < 0
    +         then Backward else Stuck);
    +    end FrictionBase;
    +
    + +

    Rotational.Position

    + +

    Replaced reinit by initial equation

    + +

    Rotational.RelativeStates

    + +

    Bug corrected by using modifier stateSelect = StateSelect.prefer as implementation

    + +

    Translational.Interfaces.flange_b

    + +

    Attribute fillColor=7 added to Rectangle on Icon layer, i.e. it is now +filled with white and not transparent any more.

    + +

    Translational.Position

    + +

    Replaced reinit by initial equation

    + +

    Translational.RelativeStates

    + +

    Bug corrected by using modifier stateSelect = StateSelect.prefer as implementation

    + +

    Translational.Stop

    + +

    Use stateSelect = StateSelect.prefer.

    + +

    Translational.Examples.PreLoad

    + +

    Improved documentation and coordinate system used for example.

    + +

    ModelicaAdditions

    + +

    Blocks.Nonlinear.PadeDelay

    + +

    Replaced reinit by initial equation

    + +

    HeatFlow1D.Interfaces

    + +

    Definition of connectors Surface_a and Surface_b:
    +flow SIunits.HeatFlux q; changed to flow SIunits.HeatFlowRate q;

    + +

    MultiBody.Parts.InertialSystem

    + +

    Icon corrected.

    + + + diff --git a/Electrical/Analog/Basic.mo b/Electrical/Analog/Basic.mo index 3beb57e19a..02d83787e5 100644 --- a/Electrical/Analog/Basic.mo +++ b/Electrical/Analog/Basic.mo @@ -1,31 +1,29 @@ package Basic + extends Modelica.Icons.Library; - package SIunits = Modelica.SIunits ; - annotation ( - Coordsys( - extent=[0, 0; 400, 500], - grid=[1, 1], - component=[20, 20]), - Window( - x=0.03, - y=0.04, - width=0.50, - height=0.24, - library=1, - autolayout=1), - Documentation(info=" - + annotation (Window( + x=0.03, + y=0.04, + width=0.54, + height=0.35, + library=1, + autolayout=1), +Documentation(info="

    This package contains basic analog electrical components:

    • Ground
    • Resistor
    • +
    • HeatingResistor
    • Conductor
    • Capacitor
    • Inductor
    • Transformer
    • Gyrator
    • +
    • EMF (Electroc-Motoric-Force)
    • +
    • Linear controlled sources (VCV, VCC, CCV, CCC)
    • +
    • OpAmp

    @@ -33,9 +31,9 @@ This package contains basic analog electrical components:
    Main Authors:
    -Christoph Clauß +Christoph Clauß <clauss@eas.iis.fhg.de>
    - André Schneider + André Schneider <schneider@eas.iis.fhg.de>
    Fraunhofer Institute for Integrated Circuits
    Design Automation Department
    @@ -51,10 +49,10 @@ $Id$
    Copyright:
    -Copyright (C) 1998-1999, Modelica Design Group and Fraunhofer-Gesellschaft.
    +Copyright © 1998-2002, Modelica Association and Fraunhofer-Gesellschaft.
    The Modelica package is free software; it can be redistributed and/or modified under the terms of the Modelica license, see the license conditions -and the accompanying disclaimer in the documentation of package +and the accompanying disclaimer in the documentation of package Modelica in file \"Modelica/package.mo\".

    @@ -66,8 +64,7 @@ Modelica in file \"Modelica/package.mo\".

    extent=[-100, -100; 100, 100], grid=[2, 2], component=[20, 20]), - Documentation(info=" - + Documentation(info="

    Ground of an electrical circuit. The potential at the ground node is zero. Every electrical circuit has to contain @@ -80,7 +77,7 @@ at least one ground object. Line(points=[-40, 30; 40, 30]), Line(points=[-20, 10; 20, 10]), Line(points=[0, 90; 0, 50]), - Text(extent=[-100, -40; 100, -10], string="%name")), + Text(extent=[-100, -68; 100, -10], string="%name")), Diagram( Line(points=[-60, 50; 60, 50], style(thickness=2)), Line(points=[-40, 30; 40, 30], style(thickness=2)), @@ -92,20 +89,19 @@ at least one ground object. y=0.23, width=0.59, height=0.63)); - Modelica.Electrical.Analog.Interfaces.Pin p annotation (extent=[-10, 110; - 10, 90], rotation=-90); + Interfaces.Pin p annotation (extent=[-10, 110; 10, 90], rotation=-90); equation p.v = 0; end Ground; + model Resistor "Ideal linear electrical resistor" - extends Modelica.Electrical.Analog.Interfaces.OnePort; - parameter SIunits.Resistance R=1 "Resistance"; + extends Interfaces.OnePort; + parameter SI.Resistance R=1 "Resistance"; annotation ( - Documentation(info=" - + Documentation(info="

    The linear resistor connects the branch voltage v with the -branch current i by i*R = v. +branch current i by i*R = v. The Resistance R is allowed to be positive, zero, or negative.

    @@ -122,10 +118,10 @@ The Resistance R is allowed to be positive, zero, or negative. Line(points=[-90, 0; -70, 0]), Line(points=[70, 0; 90, 0]), Text( - extent=[-100, -60; 100, -80], + extent=[-98, -58; 102, -120], string="R=%R", style(color=0)), - Text(extent=[-100, 60; 100, 80], string="%name")), + Text(extent=[-100, 40; 100, 100], string="%name")), Diagram( Rectangle(extent=[-70, 30; 70, -30]), Line(points=[-90, 0; -70, 0]), @@ -138,15 +134,106 @@ The Resistance R is allowed to be positive, zero, or negative. equation R*i = v; end Resistor; + + model HeatingResistor "Temperature dependent electrical resistor" + extends Interfaces.OnePort; + + parameter SI.Resistance R_ref "Resistance at temperature T_ref"; + parameter SI.Temperature T_ref=300 "Reference temperature"; + parameter Real alpha(unit="1/K") = 0 + "Temperature coefficient of resistance"; + + SI.Resistance R "Resistance = R_ref*(1 + alpha*(heatPort.T - T_ref));"; + + 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)), + Line(points=[-125, 0; -115, 0], style(color=9)), + Line(points=[-120, -5; -120, 5], style(color=9)), + Text( + extent=[-110, 25; -90, 45], + string="i", + style(color=9)), + Polygon(points=[105, 23; 115, 20; 105, 17; 105, 23], style( + color=9, + fillColor=9, + fillPattern=1)), + Line(points=[115, 0; 125, 0], style(color=9)), + Text( + extent=[90, 45; 110, 25], + string="i", + style(color=9)), + Rectangle(extent=[-70, 30; 70, -30]), + Line(points=[-90, 0; -70, 0]), + Line(points=[70, 0; 90, 0]), + Line(points=[0, -30; 0, -90], style(color=42)), + Line(points=[-52, -50; 48, 50], style(color=73, fillColor=73)), + Polygon(points=[40, 52; 50, 42; 54, 56; 40, 52], style(color=73, + fillColor=73))), + Icon( + Text(extent=[-143, 60; 143, 98], string="%name"), + Line(points=[-90, 0; -70, 0]), + Line(points=[70, 0; 90, 0]), + Rectangle(extent=[-70, 30; 70, -30], style( + color=3, + fillColor=7, + fillPattern=1)), + Line(points=[0, -30; 0, -91], style(color=42)), + Line(points=[-52, -50; 48, 50], style(color=73, fillColor=73)), + Polygon(points=[40, 52; 50, 42; 54, 56; 40, 52], style(color=73, + fillColor=73))), + Documentation(info=" +

    This is a model for an electrical resistor where the generated heat +is dissipated to the environment via connector heatPort and where +the resistance R is temperature dependent according to the following +equation:

    + +
        R = R_ref*(1 + alpha*(heatPort.T - T_ref))
    +
    + +

    alpha is the temperature coefficient of resistance, which +is often abbreviated as TCR. In resistor catalogues, it is usually +defined as X [ppm/K] (parts per million, similarly to per centage) +meaning X*1.e-6 [1/K]. Resistors are available for 1 .. 7000 ppm/K, +i.e., alpha = 1e-6 .. 7e-3 1/K;

    + +

    When connector heatPort is not connected, the temperature +dependent behaviour is switched off by setting heatPort.T = T_ref. +Additionally, the equation heatPort.Q_dot = 0 is implicitly present +due to a special rule in Modelica that flow variables of not connected +connectors are set to zero.

    + +")); + Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a heatPort annotation ( + extent=[-10, -90; 10, -110], rotation=-90); + equation + v = R*i; + + if cardinality(heatPort) > 0 then + R = R_ref*(1 + alpha*(heatPort.T - T_ref)); + heatPort.Q_dot = -v*i; + else + /* heatPort is not connected resulting in the + implicit equation 'heatPort.Q_dot = 0' + */ + R = R_ref; + heatPort.T = T_ref; + end if; + end HeatingResistor; + model Conductor "Ideal linear electrical conductor" - extends Modelica.Electrical.Analog.Interfaces.OnePort; - parameter SIunits.Conductance G=1 "Conductance"; + extends Interfaces.OnePort; + parameter SI.Conductance G=1 "Conductance"; annotation ( - Documentation(info=" - + Documentation(info="

    The linear conductor connects the branch voltage v with the -branch current i by i = v*G. +branch current i by i = v*G. The Conductance G is allowed to be positive, zero, or negative.

    @@ -156,28 +243,29 @@ The Conductance G is allowed to be positive, zero, or negative. grid=[2, 2], component=[20, 20]), Icon( - Rectangle(extent=[-70, 30; 70, -30], style(fillColor=7, fillPattern=1) - ), + Rectangle(extent=[-70, 30; 70, -30], style(fillColor=7, fillPattern=1)) + , Rectangle(extent=[-70, 30; 70, -30]), Line(points=[-90, 0; -70, 0]), Line(points=[70, 0; 90, 0]), Text( - extent=[-100, -60; 100, -80], + extent=[-100, -60; 100, -122], string="G=%G", style(color=0, pattern=0)), - Text(extent=[-100, 60; 100, 80], string="%name")), + Text(extent=[-100, 40; 100, 98], string="%name")), Diagram(Line(points=[-90, 0; -70, 0]), Line(points=[70, 0; 90, 0])), Window( - x=0.17, - y=0.29, - width=0.6, - height=0.6)); + x=0, + y=0.2, + width=0.63, + height=0.68)); equation i = G*v; end Conductor; + model Capacitor "Ideal linear electrical capacitor" - extends Modelica.Electrical.Analog.Interfaces.OnePort; - parameter SIunits.Capacitance C=1 "Capacitance"; + extends Interfaces.OnePort; + parameter SI.Capacitance C=1 "Capacitance"; annotation ( Coordsys( extent=[-100, -100; 100, 100], @@ -188,11 +276,10 @@ The Conductance G is allowed to be positive, zero, or negative. y=0.33, width=0.48, height=0.58), - Documentation(info=" - + Documentation(info="

    The linear capacitor connects the branch voltage v with the -branch current i by i = C * dv/dt. +branch current i by i = C * dv/dt. The Capacitance C is allowed to be positive, zero, or negative.

    @@ -203,10 +290,10 @@ The Capacitance C is allowed to be positive, zero, or negative. Line(points=[-90, 0; -14, 0]), Line(points=[14, 0; 90, 0]), Text( - extent=[-100, -60; 100, -80], + extent=[-100, -60; 100, -120], string="C=%C", style(color=0)), - Text(extent=[-100, 60; 100, 80], string="%name")), + Text(extent=[-100, 40; 100, 100], string="%name")), Diagram( Line(points=[-20, 40; -20, -40], style(thickness=2)), Line(points=[20, 40; 20, -40], style(thickness=2)), @@ -215,19 +302,19 @@ The Capacitance C is allowed to be positive, zero, or negative. equation i = C*der(v); end Capacitor; + model Inductor "Ideal linear electrical inductor" - extends Modelica.Electrical.Analog.Interfaces.OnePort; - parameter SIunits.Inductance L=1 "Inductance"; + extends Interfaces.OnePort; + parameter SI.Inductance L=1 "Inductance"; annotation ( Coordsys( extent=[-100, -100; 100, 100], grid=[2, 2], component=[20, 20]), - Documentation(info=" - + Documentation(info="

    The linear inductor connects the branch voltage v with the -branch current i by v = L * di/dt. +branch current i by v = L * di/dt. The Inductance L is allowed to be positive, zero, or negative.

    @@ -241,10 +328,10 @@ The Inductance L is allowed to be positive, zero, or negative. Line(points=[60, 0; 90, 0]), Line(points=[-90, 0; -60, 0]), Text( - extent=[-100, -60; 100, -80], + extent=[-100, -60; 100, -120], string="L=%L", style(color=0)), - Text(extent=[-100, 60; 100, 80], string="%name")), + Text(extent=[-100, 40; 100, 100], string="%name")), Diagram( Ellipse(extent=[-60, -15; -30, 15]), Ellipse(extent=[-30, -15; 0, 15]), @@ -261,37 +348,29 @@ The Inductance L is allowed to be positive, zero, or negative. equation L*der(i) = v; end Inductor; + model Transformer "Transformer with two ports" - extends Modelica.Electrical.Analog.Interfaces.TwoPort; - parameter SIunits.Inductance L1=1 "Primary inductance"; - parameter SIunits.Inductance L2=1 "Secondary inductance"; - parameter SIunits.Inductance M=1 "Coupling inductance"; + extends Interfaces.TwoPort; + parameter SI.Inductance L1=1 "Primary inductance"; + parameter SI.Inductance L2=1 "Secondary inductance"; + parameter SI.Inductance M=1 "Coupling inductance"; annotation ( - Documentation(info=" - -

    -The transformer is a two port. The left port voltage v1, left port current i1, + Documentation(info=" +

    The transformer is a two port. The left port voltage v1, left port current i1, right port voltage v2 and right port current i2 are connected by the following -relation: -

    -
    -
    -         / v1 \          / L1   M  \  / i1' \
    -         |    |    =     |         |  |     |
    -         \ v2 /          \ M    L2 /  \ i2' /
    -
    -
    -

    -L1, L2, and M are the primary, secondary, and coupling inductances resp.. -

    - +relation:

    +
             | v1 |         | L1   M  |  | i1' |
    +         |    |    =    |         |  |     |
    +         | v2 |         | M    L2 |  | i2' |
    +

    L1, L2, and M are the primary, secondary, and coupling inductances respectively.

    + "), Coordsys( extent=[-100, -100; 100, 100], grid=[1, 1], component=[20, 20]), Icon( - Text(extent=[-100, 100; 100, 80], string="%name"), + Text(extent=[-100, 128; 100, 70], string="%name"), Ellipse(extent=[-45, -50; -20, -25]), Ellipse(extent=[-45, -25; -20, 0]), Ellipse(extent=[-45, 0; -20, 25]), @@ -306,9 +385,9 @@ relation: Rectangle(extent=[33, -60; 72, 60], style(color=7, fillColor=7)), Line(points=[32, 50; 90, 50]), Line(points=[32, -50; 90, -50]), - Text(extent=[-80, 10; -60, -10], string="L1"), - Text(extent=[60, 10; 80, -10], string="L2"), - Text(extent=[-10, -70; 10, -90], string="M")), + Text(extent=[-89, 18; -60, -10], string="L1"), + Text(extent=[64, 18; 90, -10], string="L2"), + Text(extent=[-18, -70; 20, -98], string="M")), Diagram( Ellipse(extent=[-45, -50; -20, -25]), Ellipse(extent=[-45, -25; -20, 0]), @@ -325,20 +404,22 @@ relation: Line(points=[32, 50; 90, 50]), Line(points=[32, -50; 90, -50])), Window( - x=0.28, - y=0.13, + x=0.26, + y=0.43, width=0.6, height=0.6)); equation v1 = L1*der(i1) + M*der(i2); v2 = M*der(i1) + L2*der(i2); end Transformer; + model Gyrator "Gyrator" - extends Modelica.Electrical.Analog.Interfaces.TwoPort; + extends Interfaces.TwoPort; + parameter SI.Conductance G1=1 "Gyration conductance"; + parameter SI.Conductance G2=1 "Gyration conductance"; annotation ( - Documentation(info=" - -

    + Documentation(info=" +

    A gyrator is a two-port element defined by the following equations:

    @@ -355,23 +436,23 @@ where the constants G1, G2 are called the gyration conductance.
             grid=[1, 1], 
             component=[20, 20]), 
           Icon(
    -        Rectangle(extent=[-60, 60; 60, -60]), 
    +        Rectangle(extent=[-60, 60; 60, -60], style(fillColor=7)), 
             Line(points=[-90, 50; -60, 50]), 
             Line(points=[-90, -50; -60, -50]), 
             Line(points=[60, 50; 90, 50]), 
             Line(points=[60, -50; 90, -50]), 
             Line(points=[-40, 30; 40, 30]), 
    -        Line(points=[-20, -30; 20, -30]), 
    +        Line(points=[-20, -20; 20, -20]), 
             Polygon(points=[30, 34; 40, 30; 30, 26; 30, 34], style(fillColor=3, 
                   fillPattern=1)), 
    -        Polygon(points=[-20, -30; -10, -26; -10, -34; -20, -30], style(
    +        Polygon(points=[-26, -19; -16, -15; -16, -23; -26, -19], style(
                   fillColor=3, fillPattern=1)), 
    -        Line(points=[-4, 5; -6, -5], style(thickness=2)), 
    -        Line(points=[3, 5; 1, -5], style(thickness=2)), 
    -        Line(points=[-8, 5; 7, 5], style(thickness=2)), 
    -        Text(extent=[-100, 100; 100, 70], string="%name"), 
    -        Text(extent=[-20, 50; 20, 35], string="G1"), 
    -        Text(extent=[-20, -35; 20, -50], string="G2")), 
    +        Line(points=[-5, 10; -10, -10], style(thickness=2)), 
    +        Line(points=[9, 10; 4, -9], style(thickness=2)), 
    +        Line(points=[-14, 9; 16, 10], style(thickness=2)), 
    +        Text(extent=[-100, 130; 100, 69], string="%name"), 
    +        Text(extent=[-29, 59; 30, 30], string="G1"), 
    +        Text(extent=[-29, -29; 29, -58], string="G2")), 
           Diagram(
             Rectangle(extent=[-60, 60; 60, -60]), 
             Line(points=[-90, 50; -60, 50]), 
    @@ -379,7 +460,7 @@ where the constants G1, G2 are called the gyration conductance.
             Line(points=[60, 50; 90, 50]), 
             Line(points=[60, -50; 90, -50]), 
             Line(points=[-40, 30; 40, 30]), 
    -        Line(points=[-20, -30; 20, -30]), 
    +        Line(points=[-21, -22; 19, -22]), 
             Polygon(points=[30, 34; 40, 30; 30, 26; 30, 34], style(fillColor=3, 
                   fillPattern=1)), 
             Polygon(points=[-20, -30; -10, -26; -10, -34; -20, -30], style(
    @@ -388,19 +469,23 @@ where the constants G1, G2 are called the gyration conductance.
             Line(points=[3, 5; 1, -5], style(thickness=4)), 
             Line(points=[-8, 5; 7, 5], style(thickness=4)), 
             Text(extent=[-20, 50; 20, 35], string="G1"), 
    -        Text(extent=[-20, -35; 20, -50], string="G2")));
    -    parameter SIunits.Conductance G1=1 "Gyration conductance";
    -    parameter SIunits.Conductance G2=1 "Gyration conductance";
    +        Text(extent=[-20, -35; 20, -50], string="G2")), 
    +      Window(
    +        x=0.4, 
    +        y=0.4, 
    +        width=0.6, 
    +        height=0.6));
       equation 
         i1 = G2*v2;
         i2 = -G1*v1;
       end Gyrator;
    +  
       model EMF "Electromotoric force (electric/mechanic transformer)" 
         parameter Real k(final unit="N.m/A") = 1 "Transformation coefficient";
         
    -    SIunits.Voltage v "Voltage drop between the two pins";
    -    SIunits.Current i "Current flowing from positive to negative pin";
    -    SIunits.AngularVelocity w "Angular velocity of flange_b";
    +    SI.Voltage v "Voltage drop between the two pins";
    +    SI.Current i "Current flowing from positive to negative pin";
    +    SI.AngularVelocity w "Angular velocity of flange_b";
         annotation (
           Coordsys(
             extent=[-100, -100; 100, 100], 
    @@ -412,11 +497,11 @@ where the constants G1, G2 are called the gyration conductance.
                 gradient=2, 
                 fillColor=8, 
                 fillPattern=1)), 
    -        Ellipse(extent=[-40, 40; 40, -40]), 
    +        Ellipse(extent=[-40, 40; 40, -40], style(fillColor=7)), 
             Line(points=[0, -90; 0, -40]), 
             Text(extent=[20, -40; 100, -100], string="%name"), 
             Text(
    -          extent=[40, 79; 119, 50], 
    +          extent=[30, 100; 119, 40], 
               string="k=%k", 
               style(color=9))), 
           Diagram(
    @@ -450,8 +535,8 @@ where the constants G1, G2 are called the gyration conductance.
             Line(points=[14, 80; 14, 70], style(color=8)), 
             Line(points=[140, 0; 110, 0], style(color=0, fillColor=0)), 
             Text(extent=[114, -4; 148, -14], string="flange_b.phi"), 
    -        Polygon(points=[140, 3; 150, 0; 140, -3; 140, 3; 140, 3], style(color=
    -                0, fillColor=0)), 
    +        Polygon(points=[140, 3; 150, 0; 140, -3; 140, 3; 140, 3], style(color=0
    +              , fillColor=0)), 
             Text(extent=[112, 16; 148, 6], string="flange_b.tau"), 
             Polygon(points=[120, 35; 100, 40; 100, 30; 120, 35], style(color=10, 
                   fillColor=10)), 
    @@ -467,17 +552,18 @@ where the constants G1, G2 are called the gyration conductance.
             height=0.66), 
           Documentation(info="
     

    -Transforms electrical energy into rotational mechanical energy. -Is used as basic building block of an electrical motor. The mechanical -connector flange_b can be connected to elements of the -Modelica.Mechanics.Rotational library. +EMF transforms electrical energy into rotational mechanical energy. +It is used as basic building block of an electrical motor. The mechanical +connector flange_b can be connected to elements of the +Modelica.Mechanics.Rotational library. flange_b.tau is the cut-torque, +flange_b.phi is the angle at the rotational connection.

    - + ")); - Modelica.Electrical.Analog.Interfaces.PositivePin p annotation (extent=[- - 10, 90; 10, 110], rotation=90); - Modelica.Electrical.Analog.Interfaces.NegativePin n annotation (extent=[- - 10, -110; 10, -90], rotation=90); + Interfaces.PositivePin p annotation (extent=[-10, 90; 10, 110], rotation=90 + ); + Interfaces.NegativePin n annotation (extent=[-10, -110; 10, -90], rotation= + 90); Modelica.Mechanics.Rotational.Interfaces.Flange_b flange_b annotation ( extent=[90, -10; 110, 10]); equation @@ -489,19 +575,26 @@ Modelica.Mechanics.Rotational library. k*w = v; flange_b.tau = -k*i; end EMF; + model VCV "Linear voltage-controlled voltage source" - extends Modelica.Electrical.Analog.Interfaces.TwoPort; + extends Interfaces.TwoPort; parameter Real gain=1 "Voltage gain"; annotation ( - Documentation(info=" - -Linear voltage-controlled voltage source + Documentation(info=" +

    +The linear voltage-controlled voltage source is a TwoPort. +The right port voltage v2 is controlled by the left port voltage v1 +via +

    - The linear voltage-controlled voltage source is a TwoPort. - The right port voltage vr is controlled by the left port voltage vl - via v2 = v1 * gain. - The left port current is zero. Any voltage gain can be chosen. +
    +    v2 = v1 * gain.
    +
    +

    +The left port current is zero. Any voltage gain can be chosen. +

    + "), Coordsys( extent=[-100, -100; 100, 100], @@ -510,14 +603,14 @@ Linear voltage-controlled voltage source Window( x=0.28, y=0.02, - width=0.56, - height=0.83), + width=0.59, + height=0.92), Icon( Rectangle(extent=[-70, 70; 70, -70], style(fillColor=7)), - Text(extent=[-100, -80; 100, -100], string="%name"), + Text(extent=[-99, -79; 100, -129], string="%name"), Line(points=[-90, 50; -30, 50]), Line(points=[-30, -50; -90, -50]), - Line(points=[90, 50; 30, 50; 30, -50; 90, -50]), + Line(points=[100, 50; 30, 50; 30, -50; 100, -50]), Ellipse(extent=[10, 20; 50, -20]), Line(points=[-20, 60; 20, 60]), Polygon(points=[20, 60; 10, 63; 10, 57; 20, 60], style(fillColor=3, @@ -535,20 +628,24 @@ Linear voltage-controlled voltage source v2 = v1*gain; i1 = 0; end VCV; + model VCC "Linear voltage-controlled current source" - extends Modelica.Electrical.Analog.Interfaces.TwoPort; - parameter Modelica.SIunits.Conductance transConductance=1 - "Transconductance"; + extends Interfaces.TwoPort; + parameter SI.Conductance transConductance=1 "Transconductance"; annotation ( - Documentation(info=" - -Linear voltage-controlled current source - - The linear voltage-controlled current source is a TwoPort. - The right port current ir is controlled by the left port voltage vl - via i2 = v1 * transConductance. - The left port current is zero. Any transConductance can be chosen. - + Documentation(info=" +

    +The linear voltage-controlled current source is a TwoPort. +The right port current i2 is controlled by the left port voltage v1 +via +

    +
    +    i2 = v1 * transConductance.
    +
    +

    +The left port current is zero. Any transConductance can be chosen. +

    + "), Coordsys( extent=[-100, -100; 100, 100], @@ -556,7 +653,7 @@ Linear voltage-controlled current source component=[20, 20]), Icon( Rectangle(extent=[-70, 70; 70, -70], style(fillColor=7)), - Text(extent=[-100, -80; 100, -100], string="%name"), + Text(extent=[-99, -80; 100, -129], string="%name"), Line(points=[-90, 50; -30, 50]), Line(points=[-30, -50; -90, -50]), Ellipse(extent=[10, 20; 50, -20]), @@ -586,20 +683,25 @@ Linear voltage-controlled current source i2 = v1*transConductance; i1 = 0; end VCC; + model CCV "Linear current-controlled voltage source" - extends Modelica.Electrical.Analog.Interfaces.TwoPort; + extends Interfaces.TwoPort; - parameter Modelica.SIunits.Resistance transResistance=1 "Transresistance"; + parameter SI.Resistance transResistance=1 "Transresistance"; annotation ( - Documentation(info=" - -Linear current-controlled voltage source - - The linear current-controlled voltage source is a TwoPort. - The right port voltage vr is controlled by the left port current i1 - via v2 = i1 * transResistance. - The left port voltage is zero. Any transResistance can be chosen. - + Documentation(info=" +

    +The linear current-controlled voltage source is a TwoPort. +The right port voltage v2 is controlled by the left port current i1 +via +

    +
    +    v2 = i1 * transResistance.
    +
    +

    +The left port voltage is zero. Any transResistance can be chosen. +

    + "), Coordsys( extent=[-100, -100; 100, 100], @@ -607,13 +709,13 @@ Linear current-controlled voltage source component=[20, 20]), Icon( Rectangle(extent=[-70, 70; 70, -70], style(fillColor=7)), - Text(extent=[-100, -80; 100, -100], string="%name"), + Text(extent=[-99, -80; 100, -130], string="%name"), + Line(points=[100, 50; 30, 50; 30, -50; 100, -50]), Ellipse(extent=[10, 20; 50, -20]), Line(points=[-20, 60; 20, 60]), Polygon(points=[20, 60; 10, 63; 10, 57; 20, 60], style(fillColor=3, fillPattern=1)), - Line(points=[90, 50; 30, 50; 30, -50; 90, -50]), - Line(points=[-90, 50; -30, 50; -30, -50; -90, -50])), + Line(points=[-90, 50; -20, 50; -20, -50; -90, -50])), Diagram( Ellipse(extent=[10, 20; 50, -20]), Rectangle(extent=[-70, 70; 70, -70]), @@ -631,19 +733,26 @@ Linear current-controlled voltage source v2 = i1*transResistance; v1 = 0; end CCV; + model CCC "Linear current-controlled current source" - extends Modelica.Electrical.Analog.Interfaces.TwoPort; + extends Interfaces.TwoPort; parameter Real gain=1 "Current gain"; annotation ( - Documentation(info=" - -Linear current-controlled current source + Documentation(info=" +

    +The linear current-controlled current source is a TwoPort. +The right port current i2 is controlled by the left port current i1 +via +

    - The linear current-controlled current source is a TwoPort. - The right port current ir is controlled by the left port current il - via ir = il * gain. - The left port voltage is zero. Any current gain can be chosen. +
    +    i2 = i1 * gain.
    +
    +

    +The left port voltage is zero. Any current gain can be chosen. +

    + "), Coordsys( extent=[-100, -100; 100, 100], @@ -651,15 +760,15 @@ Linear current-controlled current source component=[20, 20]), Icon( Rectangle(extent=[-70, 70; 70, -70], style(fillColor=7)), - Text(extent=[-100, -80; 100, -100], string="%name"), + Text(extent=[-104, -76; 97, -127], string="%name"), + Line(points=[-100, 50; -30, 50; -30, -50; -100, -50]), Ellipse(extent=[10, 20; 50, -20]), Line(points=[-20, 60; 20, 60]), Polygon(points=[20, 60; 10, 63; 10, 57; 20, 60], style(fillColor=3, fillPattern=1)), Line(points=[90, 50; 30, 50; 30, 20]), Line(points=[91, -50; 30, -50; 30, -20]), - Line(points=[10, 0; 50, 0]), - Line(points=[-90, 50; -30, 50; -30, -50; -91, -50])), + Line(points=[10, 0; 50, 0])), Diagram( Ellipse(extent=[10, 20; 50, -20]), Rectangle(extent=[-70, 70; 70, -70]), @@ -679,5 +788,110 @@ Linear current-controlled current source i2 = i1*gain; v1 = 0; end CCC; + + model OpAmp "Simple nonideal model of an OpAmp with limitation" + annotation ( + Documentation(info=" +

    +The OpAmp is a simle nonideal model with a smooth out.v = f(vin) characteristic, +where \"vin = in_p.v - in_n.v\". +The characteristic is limited by VMax.v and VMin.v. Its slope at vin=0 +is the parameter Slope, which must be positive. (Therefore, the absolute +value of Slope is taken into calculation.) +

    + +"), + Coordsys( + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), + Icon( + Text(extent=[-95, 88; 115, 146], string="%name"), + Polygon(points=[60, 0; -60, 70; -60, -70; 60, 0], style(fillColor=7)), + Line(points=[-45, -10; -20, -10; -14, -9; -11, -7; -9, 7; -6, 9; 0, 10 + ; 20, 10]), + Line(points=[0, 35; 0, 80]), + Line(points=[0, -35; 0, -80]), + Line(points=[-90, 50; -60, 50]), + Line(points=[-90, -50; -60, -50]), + Line(points=[60, 0; 90, 0]), + Line(points=[-48, 32; -28, 32]), + Line(points=[-39, -20; -39, -41]), + Line(points=[-50, -31; -28, -31])), + Diagram( + Polygon(points=[60, 0; -60, 70; -60, -70; 60, 0], style(fillColor=7)), + Line(points=[-45, -10; -20, -10; -14, -9; -11, -7; -9, 7; -6, 9; 0, 10 + ; 20, 10]), + Line(points=[0, 35; 0, 80]), + Line(points=[0, -35; 0, -80]), + Line(points=[-90, 50; -60, 50]), + Line(points=[-90, -50; -60, -50]), + Line(points=[60, 0; 90, 0]), + Line(points=[-55, 50; -45, 50]), + Line(points=[-50, -45; -50, -55]), + Line(points=[-55, -50; -45, -50]), + Text( + extent=[-112, -93; -91, -73], + style(color=9, fillColor=9), + string="in_p.i=0"), + Polygon(points=[120, 3; 110, 0; 120, -3; 120, 3], style( + color=9, + gradient=2, + fillColor=9, + fillPattern=1)), + Line(points=[111, 0; 136, 0], style( + color=9, + gradient=2, + fillColor=9)), + Text( + extent=[118, 2; 135, 17], + string="i2", + style( + color=9, + gradient=2, + fillColor=9)), + Text( + extent=[-111, 60; -85, 80], + style(color=9, fillColor=9), + string="in_n.i=0"), + Line(points=[-100, -35; -100, 23; -100, 24], style(color=9, arrow=1)), + Text( + extent=[-97, -16; -74, 4], + style(color=9, fillColor=9), + string="vin")), + Window( + x=0.28, + y=0.19, + width=0.71, + height=0.59)); + parameter Real Slope=1 "Slope of the out.v/vin characteristic at vin=0"; + Modelica.Electrical.Analog.Interfaces.PositivePin in_p + "Positive pin of the input port" annotation (extent=[-110, -60; -90, -40] + ); + Modelica.Electrical.Analog.Interfaces.NegativePin in_n + "Negative pin of the input port" annotation (extent=[-110, 40; -90, 60]); + Modelica.Electrical.Analog.Interfaces.PositivePin out "Output pin" + annotation (extent=[90, -10; 110, 10]); + Modelica.Electrical.Analog.Interfaces.PositivePin VMax + "Positive output voltage limitation" annotation (extent=[-10, 60; 10, 80] + ); + Modelica.Electrical.Analog.Interfaces.NegativePin VMin + "Negative output voltage limitation" annotation (extent=[-10, -80; 10, - + 60]); + SI.Voltage vin "input voltagae"; + protected + Real f "auxiliary variable"; + Real absSlope; + equation + in_p.i = 0; + in_n.i = 0; + VMax.i = 0; + VMin.i = 0; + vin = in_p.v - in_n.v; + f = 2/(VMax.v - VMin.v); + absSlope = if (Slope < 0) then -Slope else Slope; + out.v = (VMax.v + VMin.v)/2 + absSlope*vin/(1 + absSlope*noEvent(if (f*vin + < 0) then -f*vin else f*vin)); + end OpAmp; + end Basic; - diff --git a/Electrical/Analog/Examples/CauerFilter.mo b/Electrical/Analog/Examples/CauerFilter.mo index 18117cdb12..38c858d2a6 100644 --- a/Electrical/Analog/Examples/CauerFilter.mo +++ b/Electrical/Analog/Examples/CauerFilter.mo @@ -1,28 +1,22 @@ -// Example: Modelica.Electrical.Analog.Examples.CauerFilter +encapsulated model CauerFilter "CAUER Switched Capacitor Filter" + import Modelica.Electrical.Analog.Basic; + import Modelica.Electrical.Analog.Sources; + import Modelica.Electrical.Analog.Examples.Utilities; -// Version: $Id$ - - -model CauerFilter "CAUER Switched Capacitor Filter" annotation ( - Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), - Icon(Rectangle(extent=[-60, 60; 60, -60], style( - color=10, - thickness=2, - gradient=0, - fillColor=8, + Icon(Rectangle(extent=[-90, 90; 90, -90], style( + color=10, + thickness=2, + gradient=0, + fillColor=8, fillPattern=1)), Text( - extent=[-50, 20; 50, -20], - string="CauerFilter", - style(color=0))), - Documentation(info=" - + extent=[-50, 20; 50, -20], + string="CauerFilter", + style(color=0))), + Documentation(info="

    The example Cauer Filter is a low-pass-filter of the fifth order. It is realized -using a switched-capacitor network. The voltage source V is the input voltage, +using a switched-capacitor network. The voltage source V is the input voltage, and the Op5.p2.v is the filter output voltage. The pulse response is calculated.

    The simulation end time should be 2e5. Please plot the output voltage Op5.p2.v. @@ -31,9 +25,9 @@ The simulation end time should be 2e5. Please plot the output voltage Op5.p2.v.

    Main Authors:
    -Christoph Clauß +Christoph Clauß <clauss@eas.iis.fhg.de>
    - André Schneider + André Schneider <schneider@eas.iis.fhg.de>
    Fraunhofer Institute for Integrated Circuits
    Design Automation Department
    @@ -49,402 +43,283 @@ $Id$
    Copyright:
    -Copyright (C) 1998-1999, Modelica Design Group and Fraunhofer-Gesellschaft.
    +Copyright © 1998-2002, Modelica Association and Fraunhofer-Gesellschaft.
    The Modelica package is free software; it can be redistributed and/or modified under the terms of the Modelica license, see the license conditions -and the accompanying disclaimer in the documentation of package +and the accompanying disclaimer in the documentation of package Modelica in file \"Modelica/package.mo\".

    -"), +"), Window( - x=0.11, - y=0.1, - width=0.6, + x=0.11, + y=0.1, + width=0.6, height=0.6)); - Modelica.Electrical.Analog.Sources.TrapezoidVoltage V( - V=1, - startTime=499, - rising=1, - width=1500, - falling=1, - period=50000, + Sources.TrapezoidVoltage V( + V=1, + startTime=499, + rising=1, + width=1500, + falling=1, + period=50000, nperiod=1) annotation (extent=[-95.7143, 75.7143; -75.7143, 95.7143]); - Modelica.Electrical.Analog.Sources.TrapezoidVoltage Clk( - V=5, - rising=5, - width=500, - falling=5, + Sources.TrapezoidVoltage Clk( + V=5, + rising=5, + width=500, + falling=5, period=1000) annotation (extent=[-67.1429, 75.7143; -47.1429, 95.7143]); - Modelica.Electrical.Analog.Basic.Capacitor C1(C=1) annotation (extent=[ - -38.5714, 75.7143; -18.5714, 95.7143]); - Modelica.Electrical.Analog.Basic.Capacitor C2(C=1.55) annotation (extent=[ - -10, 75.7143; 10, 95.7143]); - Modelica.Electrical.Analog.Basic.Capacitor C3(C=1.527) annotation (extent=[ - 18.5714, 75.7143; 38.5714, 95.7143]); - Modelica.Electrical.Analog.Basic.Capacitor C4(C=1) annotation (extent=[ - 47.1429, 75.7143; 67.1429, 95.7143]); - Modelica.Electrical.Analog.Basic.Capacitor C5(C=1) annotation (extent=[ - 75.7143, 75.7143; 95.7143, 95.7143]); - Modelica.Electrical.Analog.Basic.Capacitor C6(C=1.018) annotation (extent=[ - -95.7143, 47.1429; -75.7143, 67.1429]); - Modelica.Electrical.Analog.Basic.Capacitor C7(C=1) annotation (extent=[ - -67.1429, 47.1429; -47.1429, 67.1429]); - Modelica.Electrical.Analog.Basic.Capacitor C8(C=1.644) annotation (extent=[ - -38.5714, 47.1429; -18.5714, 67.1429]); - Modelica.Electrical.Analog.Basic.Capacitor C9(C=2) annotation (extent=[-10, - 47.1429; 10, 67.1429]); - Modelica.Electrical.Analog.Basic.Capacitor C10(C=1) annotation (extent=[ - 18.5714, 47.1429; 38.5714, 67.1429]); - Modelica.Electrical.Analog.Basic.Capacitor C11(C=2) annotation (extent=[ - 47.1429, 47.1429; 67.1429, 67.1429]); - Modelica.Electrical.Analog.Basic.Capacitor C12(C=1) annotation (extent=[ - 75.7143, 47.1429; 95.7143, 67.1429]); - Modelica.Electrical.Analog.Basic.Capacitor C13(C=9.862) annotation (extent=[ - -95.7143, 18.5714; -75.7143, 38.5714]); - Modelica.Electrical.Analog.Basic.Capacitor C14(C=7.23) annotation (extent=[ - -67.1429, 18.5714; -47.1429, 38.5714]); - Modelica.Electrical.Analog.Basic.Capacitor C15(C=10.06) annotation (extent=[ - -38.5714, 18.5714; -18.5714, 38.5714]); - Modelica.Electrical.Analog.Basic.Capacitor C16(C=10.23) annotation (extent=[ - -10, 18.5714; 10, 38.5714]); - Modelica.Electrical.Analog.Basic.Capacitor C17(C=12.76) annotation (extent=[ - 18.5714, 18.5714; 38.5714, 38.5714]); - Modelica.Electrical.Analog.Basic.Capacitor C18(C=8.676) annotation (extent=[ - 47.1429, 18.5714; 67.1429, 38.5714]); - Modelica.Electrical.Analog.Examples.Utilities.RealSwitch S1 annotation ( - extent=[75.7143, 18.5714; 95.7143, 38.5714]); - Modelica.Electrical.Analog.Examples.Utilities.RealSwitch S2 annotation ( - extent=[-95.7143, -10; -75.7143, 10]); - Modelica.Electrical.Analog.Examples.Utilities.RealSwitch S3 annotation ( - extent=[-67.1429, -10; -47.1429, 10]); - Modelica.Electrical.Analog.Examples.Utilities.RealSwitch S4 annotation ( - extent=[-38.5714, -10; -18.5714, 10]); - Modelica.Electrical.Analog.Examples.Utilities.RealSwitch S5 annotation ( - extent=[-10, -10; 10, 10]); - Modelica.Electrical.Analog.Examples.Utilities.RealSwitch S6 annotation ( - extent=[18.5714, -10; 38.5714, 10]); - Modelica.Electrical.Analog.Examples.Utilities.RealSwitch S7 annotation ( - extent=[47.1429, -10; 67.1429, 10]); - Modelica.Electrical.Analog.Examples.Utilities.RealSwitch S8 annotation ( - extent=[75.7143, -10; 95.7143, 10]); - Modelica.Electrical.Analog.Examples.Utilities.RealSwitch S9 annotation ( - extent=[-95.7143, -38.5714; -75.7143, -18.5714]); - Modelica.Electrical.Analog.Examples.Utilities.RealSwitch S10 annotation ( - extent=[-67.1429, -38.5714; -47.1429, -18.5714]); - Modelica.Electrical.Analog.Examples.Utilities.RealSwitch S11 annotation ( - extent=[-38.5714, -38.5714; -18.5714, -18.5714]); - Modelica.Electrical.Analog.Examples.Utilities.RealSwitch S12 annotation ( - extent=[-10, -38.5714; 10, -18.5714]); - Modelica.Electrical.Analog.Examples.Utilities.RealSwitch S13 annotation ( - extent=[18.5714, -38.5714; 38.5714, -18.5714]); - Modelica.Electrical.Analog.Examples.Utilities.RealSwitch S14 annotation ( - extent=[47.1429, -38.5714; 67.1429, -18.5714]); - Modelica.Electrical.Analog.Examples.Utilities.RealSwitch S15 annotation ( - extent=[75.7143, -38.5714; 95.7143, -18.5714]); - Modelica.Electrical.Analog.Examples.Utilities.RealSwitch S16 annotation ( - extent=[-95.7143, -67.1429; -75.7143, -47.1429]); - Modelica.Electrical.Analog.Examples.Utilities.RealSwitch S17 annotation ( - extent=[-67.1429, -67.1429; -47.1429, -47.1429]); - Modelica.Electrical.Analog.Examples.Utilities.RealSwitch S18 annotation ( - extent=[-38.5714, -67.1429; -18.5714, -47.1429]); - Modelica.Electrical.Analog.Basic.VCV Op1(gain=30000) annotation (extent=[-10 - , -67.1429; 10, -47.1429]); - Modelica.Electrical.Analog.Basic.VCV Op2(gain=30000) annotation (extent=[ - 18.5714, -67.1429; 38.5714, -47.1429]); - Modelica.Electrical.Analog.Basic.VCV Op3(gain=30000) annotation (extent=[ - 47.1429, -67.1429; 67.1429, -47.1429]); - Modelica.Electrical.Analog.Basic.VCV Op4(gain=30000) annotation (extent=[ - 75.7143, -67.1429; 95.7143, -47.1429]); - Modelica.Electrical.Analog.Basic.VCV Op5(gain=30000) annotation (extent=[ - -95.7143, -95.7143; -75.7143, -75.7143]); - Modelica.Electrical.Analog.Basic.Ground G annotation (extent=[-67.1429, - -95.7143; -47.1429, -75.7143]); - Modelica.Electrical.Analog.Basic.Ground M annotation (extent=[-38.5714, - -95.7143; -18.5714, -75.7143]); -equation - connect(S1.n1, V.p) annotation (points=[95.7143, 34.5714; -95.7143, 85.7143] + Basic.Capacitor C1(C=1) annotation (extent=[-38.5714, 75.7143; -18.5714, + 95.7143]); + Basic.Capacitor C2(C=1.55) annotation (extent=[-10, 75.7143; 10, 95.7143]); + Basic.Capacitor C3(C=1.527) annotation (extent=[18.5714, 75.7143; 38.5714, + 95.7143]); + Basic.Capacitor C4(C=1) annotation (extent=[47.1429, 75.7143; 67.1429, + 95.7143]); + Basic.Capacitor C5(C=1) annotation (extent=[75.7143, 75.7143; 95.7143, + 95.7143]); + Basic.Capacitor C6(C=1.018) annotation (extent=[-95.7143, 47.1429; -75.7143, + 67.1429]); + Basic.Capacitor C7(C=1) annotation (extent=[-67.1429, 47.1429; -47.1429, + 67.1429]); + Basic.Capacitor C8(C=1.644) annotation (extent=[-38.5714, 47.1429; -18.5714, + 67.1429]); + Basic.Capacitor C9(C=2) annotation (extent=[-10, 47.1429; 10, 67.1429]); + Basic.Capacitor C10(C=1) annotation (extent=[18.5714, 47.1429; 38.5714, + 67.1429]); + Basic.Capacitor C11(C=2) annotation (extent=[47.1429, 47.1429; 67.1429, + 67.1429]); + Basic.Capacitor C12(C=1) annotation (extent=[75.7143, 47.1429; 95.7143, + 67.1429]); + Basic.Capacitor C13(C=9.862) annotation (extent=[-95.7143, 18.5714; -75.7143 + , 38.5714]); + Basic.Capacitor C14(C=7.23) annotation (extent=[-67.1429, 18.5714; -47.1429, + 38.5714]); + Basic.Capacitor C15(C=10.06) annotation (extent=[-38.5714, 18.5714; -18.5714 + , 38.5714]); + Basic.Capacitor C16(C=10.23) annotation (extent=[-10, 18.5714; 10, 38.5714]); + Basic.Capacitor C17(C=12.76) annotation (extent=[18.5714, 18.5714; 38.5714, + 38.5714]); + Basic.Capacitor C18(C=8.676) annotation (extent=[47.1429, 18.5714; 67.1429, + 38.5714]); + Utilities.RealSwitch S1 annotation (extent=[75.7143, 18.5714; 95.7143, + 38.5714]); + Utilities.RealSwitch S2 annotation (extent=[-95.7143, -10; -75.7143, 10]); + Utilities.RealSwitch S3 annotation (extent=[-67.1429, -10; -47.1429, 10]); + Utilities.RealSwitch S4 annotation (extent=[-38.5714, -10; -18.5714, 10]); + Utilities.RealSwitch S5 annotation (extent=[-10, -10; 10, 10]); + Utilities.RealSwitch S6 annotation (extent=[18.5714, -10; 38.5714, 10]); + Utilities.RealSwitch S7 annotation (extent=[47.1429, -10; 67.1429, 10]); + Utilities.RealSwitch S8 annotation (extent=[75.7143, -10; 95.7143, 10]); + Utilities.RealSwitch S9 annotation (extent=[-95.7143, -38.5714; -75.7143, - + 18.5714]); + Utilities.RealSwitch S10 annotation (extent=[-67.1429, -38.5714; -47.1429, - + 18.5714]); + Utilities.RealSwitch S11 annotation (extent=[-38.5714, -38.5714; -18.5714, - + 18.5714]); + Utilities.RealSwitch S12 annotation (extent=[-10, -38.5714; 10, -18.5714]); + Utilities.RealSwitch S13 annotation (extent=[18.5714, -38.5714; 38.5714, - + 18.5714]); + Utilities.RealSwitch S14 annotation (extent=[47.1429, -38.5714; 67.1429, - + 18.5714]); + Utilities.RealSwitch S15 annotation (extent=[75.7143, -38.5714; 95.7143, - + 18.5714]); + Utilities.RealSwitch S16 annotation (extent=[-95.7143, -67.1429; -75.7143, - + 47.1429]); + Utilities.RealSwitch S17 annotation (extent=[-67.1429, -67.1429; -47.1429, - + 47.1429]); + Utilities.RealSwitch S18 annotation (extent=[-38.5714, -67.1429; -18.5714, - + 47.1429]); + Basic.VCV Op1(gain=30000) annotation (extent=[-10, -67.1429; 10, -47.1429]); + Basic.VCV Op2(gain=30000) annotation (extent=[18.5714, -67.1429; 38.5714, - + 47.1429]); + Basic.VCV Op3(gain=30000) annotation (extent=[47.1429, -67.1429; 67.1429, - + 47.1429]); + Basic.VCV Op4(gain=30000) annotation (extent=[75.7143, -67.1429; 95.7143, - + 47.1429]); + Basic.VCV Op5(gain=30000) annotation (extent=[-95.7143, -95.7143; -75.7143, - + 75.7143]); + Basic.Ground G annotation (extent=[-67.1429, -95.7143; -47.1429, -75.7143]); + Basic.Ground M annotation (extent=[-38.5714, -95.7143; -18.5714, -75.7143]); +equation + connect(S1.n1, V.p) annotation (points=[95.7143, 34.5714; -95.7143, 85.7143]) + ; + connect(C8.p, C18.n) annotation (points=[-38.5714, 57.1429; 67.1429, 28.5714] ); -equation - connect(C8.p, C18.n) annotation (points=[-38.5714, 57.1429; 67.1429, 28.5714 - ]); -equation - connect(C8.p, S11.n1) annotation (points=[-38.5714, 57.1429; -18.5714, - -22.5714]); -equation - connect(C8.p, S17.n1) annotation (points=[-38.5714, 57.1429; -47.1429, - -51.1429]); -equation - connect(C8.p, Op5.p2) annotation (points=[-38.5714, 57.1429; -75.7143, - -80.7143]); -equation + connect(C8.p, S11.n1) annotation (points=[-38.5714, 57.1429; -18.5714, - + 22.5714]); + connect(C8.p, S17.n1) annotation (points=[-38.5714, 57.1429; -47.1429, - + 51.1429]); + connect(C8.p, Op5.p2) annotation (points=[-38.5714, 57.1429; -75.7143, - + 80.7143]); connect(C2.p, C13.p) annotation (points=[-10, 85.7143; -95.7143, 28.5714]); -equation connect(C2.p, C16.n) annotation (points=[-10, 85.7143; 10, 28.5714]); -equation connect(C2.p, S7.n1) annotation (points=[-10, 85.7143; 67.1429, 6]); -equation connect(C2.p, S13.n1) annotation (points=[-10, 85.7143; 38.5714, -22.5714]); -equation connect(C2.p, Op3.p2) annotation (points=[-10, 85.7143; 67.1429, -52.1429]); -equation - connect(C6.p, C14.n) annotation (points=[-95.7143, 57.1429; -47.1429, - 28.5714]); -equation - connect(C6.p, S1.n2) annotation (points=[-95.7143, 57.1429; 95.7143, 29.9714 + connect(C6.p, C14.n) annotation (points=[-95.7143, 57.1429; -47.1429, 28.5714 ]); -equation + connect(C6.p, S1.n2) annotation (points=[-95.7143, 57.1429; 95.7143, 29.9714] + ); connect(C6.p, S5.n1) annotation (points=[-95.7143, 57.1429; 10, 6]); -equation connect(C6.p, Op1.p2) annotation (points=[-95.7143, 57.1429; 10, -52.1429]); -equation - connect(C15.n, S9.n2) annotation (points=[-18.5714, 28.5714; -75.7143, - -27.1714]); -equation + connect(C15.n, S9.n2) annotation (points=[-18.5714, 28.5714; -75.7143, - + 27.1714]); connect(C15.n, S3.n1) annotation (points=[-18.5714, 28.5714; -47.1429, 6]); -equation - connect(C15.n, Op2.p2) annotation (points=[-18.5714, 28.5714; 38.5714, - -52.1429]); -equation + connect(C15.n, Op2.p2) annotation (points=[-18.5714, 28.5714; 38.5714, - + 52.1429]); connect(C14.p, C2.n) annotation (points=[-67.1429, 28.5714; 10, 85.7143]); -equation - connect(C14.p, S2.n2) annotation (points=[-67.1429, 28.5714; -75.7143, 1.4]) - ; -equation + connect(C14.p, S2.n2) annotation (points=[-67.1429, 28.5714; -75.7143, 1.4]); connect(C14.p, S4.n1) annotation (points=[-67.1429, 28.5714; -18.5714, 6]); -equation - connect(C14.p, Op1.n1) annotation (points=[-67.1429, 28.5714; -10, -62.1429] - ); -equation + connect(C14.p, Op1.n1) annotation (points=[-67.1429, 28.5714; -10, -62.1429]) + ; connect(C15.p, S6.n2) annotation (points=[-38.5714, 28.5714; 38.5714, 1.4]); -equation connect(C15.p, S8.n2) annotation (points=[-38.5714, 28.5714; 95.7143, 1.4]); -equation - connect(C15.p, Op2.n1) annotation (points=[-38.5714, 28.5714; 18.5714, - -62.1429]); -equation + connect(C15.p, Op2.n1) annotation (points=[-38.5714, 28.5714; 18.5714, - + 62.1429]); connect(C16.p, C6.n) annotation (points=[-10, 28.5714; -75.7143, 57.1429]); -equation connect(C16.p, C8.n) annotation (points=[-10, 28.5714; -18.5714, 57.1429]); -equation - connect(C16.p, S10.n2) annotation (points=[-10, 28.5714; -47.1429, -27.1714] - ); -equation - connect(C16.p, Op3.n1) annotation (points=[-10, 28.5714; 47.1429, -62.1429]) + connect(C16.p, S10.n2) annotation (points=[-10, 28.5714; -47.1429, -27.1714]) ; -equation + connect(C16.p, Op3.n1) annotation (points=[-10, 28.5714; 47.1429, -62.1429]); connect(C17.p, S12.n1) annotation (points=[18.5714, 28.5714; 10, -22.5714]); -equation - connect(C17.p, S14.n1) annotation (points=[18.5714, 28.5714; 67.1429, - -22.5714]); -equation - connect(C17.p, Op4.n1) annotation (points=[18.5714, 28.5714; 75.7143, - -62.1429]); -equation - connect(C18.p, C13.n) annotation (points=[47.1429, 28.5714; -75.7143, - 28.5714]); -equation - connect(C18.p, S16.n1) annotation (points=[47.1429, 28.5714; -75.7143, - -51.1429]); -equation - connect(C18.p, S18.n1) annotation (points=[47.1429, 28.5714; -18.5714, - -51.1429]); -equation - connect(C18.p, Op5.n1) annotation (points=[47.1429, 28.5714; -95.7143, - -90.7143]); -equation - connect(C17.n, S15.n2) annotation (points=[38.5714, 28.5714; 95.7143, - -27.1714]); -equation - connect(C17.n, S17.n2) annotation (points=[38.5714, 28.5714; -47.1429, - -55.7429]); -equation - connect(C17.n, S9.n1) annotation (points=[38.5714, 28.5714; -75.7143, - -22.5714]); -equation - connect(C17.n, Op4.p2) annotation (points=[38.5714, 28.5714; 95.7143, - -52.1429]); -equation + connect(C17.p, S14.n1) annotation (points=[18.5714, 28.5714; 67.1429, - + 22.5714]); + connect(C17.p, Op4.n1) annotation (points=[18.5714, 28.5714; 75.7143, - + 62.1429]); + connect(C18.p, C13.n) annotation (points=[47.1429, 28.5714; -75.7143, 28.5714 + ]); + connect(C18.p, S16.n1) annotation (points=[47.1429, 28.5714; -75.7143, - + 51.1429]); + connect(C18.p, S18.n1) annotation (points=[47.1429, 28.5714; -18.5714, - + 51.1429]); + connect(C18.p, Op5.n1) annotation (points=[47.1429, 28.5714; -95.7143, - + 90.7143]); + connect(C17.n, S15.n2) annotation (points=[38.5714, 28.5714; 95.7143, - + 27.1714]); + connect(C17.n, S17.n2) annotation (points=[38.5714, 28.5714; -47.1429, - + 55.7429]); + connect(C17.n, S9.n1) annotation (points=[38.5714, 28.5714; -75.7143, - + 22.5714]); + connect(C17.n, Op4.p2) annotation (points=[38.5714, 28.5714; 95.7143, - + 52.1429]); connect(C1.n, S2.p) annotation (points=[-18.5714, 85.7143; -95.7143, 4]); -equation connect(C3.p, S3.p) annotation (points=[18.5714, 85.7143; -67.1429, 4]); -equation connect(C3.n, S4.p) annotation (points=[38.5714, 85.7143; -38.5714, 4]); -equation connect(C4.p, S5.p) annotation (points=[47.1429, 85.7143; -10, 4]); -equation connect(C4.n, S6.p) annotation (points=[67.1429, 85.7143; 18.5714, 4]); -equation connect(C5.p, S7.p) annotation (points=[75.7143, 85.7143; 47.1429, 4]); -equation connect(C5.n, S8.p) annotation (points=[95.7143, 85.7143; 75.7143, 4]); -equation - connect(C7.p, S9.p) annotation (points=[-67.1429, 57.1429; -95.7143, - -24.5714]); -equation - connect(C7.n, S10.p) annotation (points=[-47.1429, 57.1429; -67.1429, - -24.5714]); -equation + connect(C7.p, S9.p) annotation (points=[-67.1429, 57.1429; -95.7143, -24.5714 + ]); + connect(C7.n, S10.p) annotation (points=[-47.1429, 57.1429; -67.1429, - + 24.5714]); connect(C9.p, S11.p) annotation (points=[-10, 57.1429; -38.5714, -24.5714]); -equation connect(C9.n, S12.p) annotation (points=[10, 57.1429; -10, -24.5714]); -equation - connect(C10.p, S13.p) annotation (points=[18.5714, 57.1429; 18.5714, - -24.5714]); -equation - connect(C10.n, S14.p) annotation (points=[38.5714, 57.1429; 47.1429, - -24.5714]); -equation - connect(C11.p, S15.p) annotation (points=[47.1429, 57.1429; 75.7143, - -24.5714]); -equation - connect(C11.n, S16.p) annotation (points=[67.1429, 57.1429; -95.7143, - -53.1429]); -equation - connect(C12.p, S17.p) annotation (points=[75.7143, 57.1429; -67.1429, - -53.1429]); -equation - connect(C12.n, S18.p) annotation (points=[95.7143, 57.1429; -38.5714, - -53.1429]); -equation - connect(C1.p, S1.p) annotation (points=[-38.5714, 85.7143; 75.7143, 32.5714] - ); -equation - connect(S1.control, Clk.p) annotation (points=[89.1143, 38.5714; -67.1429, + connect(C10.p, S13.p) annotation (points=[18.5714, 57.1429; 18.5714, -24.5714 + ]); + connect(C10.n, S14.p) annotation (points=[38.5714, 57.1429; 47.1429, -24.5714 + ]); + connect(C11.p, S15.p) annotation (points=[47.1429, 57.1429; 75.7143, -24.5714 + ]); + connect(C11.n, S16.p) annotation (points=[67.1429, 57.1429; -95.7143, - + 53.1429]); + connect(C12.p, S17.p) annotation (points=[75.7143, 57.1429; -67.1429, - + 53.1429]); + connect(C12.n, S18.p) annotation (points=[95.7143, 57.1429; -38.5714, - + 53.1429]); + connect(C1.p, S1.p) annotation (points=[-38.5714, 85.7143; 75.7143, 32.5714]) + ; + connect(S1.control, Clk.p) annotation (points=[89.1143, 38.5714; -67.1429, 85.7143]); -equation - connect(S2.control, Clk.p) annotation (points=[-82.3143, 10; -67.1429, + connect(S2.control, Clk.p) annotation (points=[-82.3143, 10; -67.1429, 85.7143]); -equation - connect(S3.control, Clk.p) annotation (points=[-53.7429, 10; -67.1429, + connect(S3.control, Clk.p) annotation (points=[-53.7429, 10; -67.1429, 85.7143]); -equation - connect(S4.control, Clk.p) annotation (points=[-25.1714, 10; -67.1429, + connect(S4.control, Clk.p) annotation (points=[-25.1714, 10; -67.1429, 85.7143]); -equation connect(S5.control, Clk.p) annotation (points=[3.4, 10; -67.1429, 85.7143]); -equation - connect(S6.control, Clk.p) annotation (points=[31.9714, 10; -67.1429, - 85.7143]); -equation - connect(S7.control, Clk.p) annotation (points=[60.5429, 10; -67.1429, - 85.7143]); -equation - connect(S8.control, Clk.p) annotation (points=[89.1143, 10; -67.1429, + connect(S6.control, Clk.p) annotation (points=[31.9714, 10; -67.1429, 85.7143 + ]); + connect(S7.control, Clk.p) annotation (points=[60.5429, 10; -67.1429, 85.7143 + ]); + connect(S8.control, Clk.p) annotation (points=[89.1143, 10; -67.1429, 85.7143 + ]); + connect(S9.control, Clk.p) annotation (points=[-82.3143, -18.5714; -67.1429, 85.7143]); -equation - connect(S9.control, Clk.p) annotation (points=[-82.3143, -18.5714; -67.1429 - , 85.7143]); -equation connect(S10.control, Clk.p) annotation (points=[-53.7429, -18.5714; -67.1429 , 85.7143]); -equation connect(S11.control, Clk.p) annotation (points=[-25.1714, -18.5714; -67.1429 , 85.7143]); -equation - connect(S12.control, Clk.p) annotation (points=[3.4, -18.5714; -67.1429, + connect(S12.control, Clk.p) annotation (points=[3.4, -18.5714; -67.1429, + 85.7143]); + connect(S13.control, Clk.p) annotation (points=[31.9714, -18.5714; -67.1429, + 85.7143]); + connect(S14.control, Clk.p) annotation (points=[60.5429, -18.5714; -67.1429, + 85.7143]); + connect(S15.control, Clk.p) annotation (points=[89.1143, -18.5714; -67.1429, 85.7143]); -equation - connect(S13.control, Clk.p) annotation (points=[31.9714, -18.5714; -67.1429 - , 85.7143]); -equation - connect(S14.control, Clk.p) annotation (points=[60.5429, -18.5714; -67.1429 - , 85.7143]); -equation - connect(S15.control, Clk.p) annotation (points=[89.1143, -18.5714; -67.1429 - , 85.7143]); -equation connect(S16.control, Clk.p) annotation (points=[-82.3143, -47.1429; -67.1429 , 85.7143]); -equation connect(S17.control, Clk.p) annotation (points=[-53.7429, -47.1429; -67.1429 , 85.7143]); -equation connect(S18.control, Clk.p) annotation (points=[-25.1714, -47.1429; -67.1429 , 85.7143]); -equation - connect(G.p, V.n) annotation (points=[-57.1429, -75.7143; -75.7143, 85.7143] - ); -equation + connect(G.p, V.n) annotation (points=[-57.1429, -75.7143; -75.7143, 85.7143]) + ; connect(G.p, S3.n2) annotation (points=[-57.1429, -75.7143; -47.1429, 1.4]); -equation connect(G.p, S4.n2) annotation (points=[-57.1429, -75.7143; -18.5714, 1.4]); -equation connect(G.p, S5.n2) annotation (points=[-57.1429, -75.7143; 10, 1.4]); -equation connect(G.p, S7.n2) annotation (points=[-57.1429, -75.7143; 67.1429, 1.4]); -equation - connect(G.p, S11.n2) annotation (points=[-57.1429, -75.7143; -18.5714, - -27.1714]); -equation + connect(G.p, S11.n2) annotation (points=[-57.1429, -75.7143; -18.5714, - + 27.1714]); connect(G.p, S12.n2) annotation (points=[-57.1429, -75.7143; 10, -27.1714]); -equation - connect(G.p, S13.n2) annotation (points=[-57.1429, -75.7143; 38.5714, - -27.1714]); -equation - connect(G.p, S14.n2) annotation (points=[-57.1429, -75.7143; 67.1429, - -27.1714]); -equation - connect(G.p, S16.n2) annotation (points=[-57.1429, -75.7143; -75.7143, - -55.7429]); -equation - connect(G.p, S18.n2) annotation (points=[-57.1429, -75.7143; -18.5714, - -55.7429]); -equation + connect(G.p, S13.n2) annotation (points=[-57.1429, -75.7143; 38.5714, - + 27.1714]); + connect(G.p, S14.n2) annotation (points=[-57.1429, -75.7143; 67.1429, - + 27.1714]); + connect(G.p, S16.n2) annotation (points=[-57.1429, -75.7143; -75.7143, - + 55.7429]); + connect(G.p, S18.n2) annotation (points=[-57.1429, -75.7143; -18.5714, - + 55.7429]); connect(G.p, S2.n1) annotation (points=[-57.1429, -75.7143; -75.7143, 6]); -equation connect(G.p, S6.n1) annotation (points=[-57.1429, -75.7143; 38.5714, 6]); -equation connect(G.p, S8.n1) annotation (points=[-57.1429, -75.7143; 95.7143, 6]); -equation - connect(G.p, S10.n1) annotation (points=[-57.1429, -75.7143; -47.1429, - -22.5714]); -equation - connect(G.p, S15.n1) annotation (points=[-57.1429, -75.7143; 95.7143, - -22.5714]); -equation - connect(M.p, Op1.p1) annotation (points=[-28.5714, -75.7143; -10, -52.1429]) - ; -equation - connect(M.p, Op2.p1) annotation (points=[-28.5714, -75.7143; 18.5714, - -52.1429]); -equation - connect(M.p, Op3.p1) annotation (points=[-28.5714, -75.7143; 47.1429, - -52.1429]); -equation - connect(M.p, Op4.p1) annotation (points=[-28.5714, -75.7143; 75.7143, - -52.1429]); -equation - connect(M.p, Op5.p1) annotation (points=[-28.5714, -75.7143; -95.7143, - -80.7143]); -equation + connect(G.p, S10.n1) annotation (points=[-57.1429, -75.7143; -47.1429, - + 22.5714]); + connect(G.p, S15.n1) annotation (points=[-57.1429, -75.7143; 95.7143, - + 22.5714]); + connect(M.p, Op1.p1) annotation (points=[-28.5714, -75.7143; -10, -52.1429]); + connect(M.p, Op2.p1) annotation (points=[-28.5714, -75.7143; 18.5714, - + 52.1429]); + connect(M.p, Op3.p1) annotation (points=[-28.5714, -75.7143; 47.1429, - + 52.1429]); + connect(M.p, Op4.p1) annotation (points=[-28.5714, -75.7143; 75.7143, - + 52.1429]); + connect(M.p, Op5.p1) annotation (points=[-28.5714, -75.7143; -95.7143, - + 80.7143]); connect(M.p, Op1.n2) annotation (points=[-28.5714, -75.7143; 10, -62.1429]); -equation - connect(M.p, Op2.n2) annotation (points=[-28.5714, -75.7143; 38.5714, - -62.1429]); -equation - connect(M.p, Op3.n2) annotation (points=[-28.5714, -75.7143; 67.1429, - -62.1429]); -equation - connect(M.p, Op4.n2) annotation (points=[-28.5714, -75.7143; 95.7143, - -62.1429]); -equation - connect(M.p, Op5.n2) annotation (points=[-28.5714, -75.7143; -75.7143, - -90.7143]); -equation - connect(M.p, Clk.n) annotation (points=[-28.5714, -75.7143; -47.1429, - 85.7143]); -equation - + connect(M.p, Op2.n2) annotation (points=[-28.5714, -75.7143; 38.5714, - + 62.1429]); + connect(M.p, Op3.n2) annotation (points=[-28.5714, -75.7143; 67.1429, - + 62.1429]); + connect(M.p, Op4.n2) annotation (points=[-28.5714, -75.7143; 95.7143, - + 62.1429]); + connect(M.p, Op5.n2) annotation (points=[-28.5714, -75.7143; -75.7143, - + 90.7143]); + connect(M.p, Clk.n) annotation (points=[-28.5714, -75.7143; -47.1429, 85.7143 + ]); + /*1*/ - + /*2*/ - + /*3*/ - + /*4*/ - + /*5*/ /*6*/ /*7*/ diff --git a/Electrical/Analog/Examples/ChuaCircuit.mo b/Electrical/Analog/Examples/ChuaCircuit.mo index 05f212739c..280b1ab734 100644 --- a/Electrical/Analog/Examples/ChuaCircuit.mo +++ b/Electrical/Analog/Examples/ChuaCircuit.mo @@ -1,20 +1,22 @@ -model ChuaCircuit "Chua's circuit, ns, V, A" +encapsulated model ChuaCircuit "Chua's circuit, ns, V, A" + import Modelica.Electrical.Analog.Basic; + import Modelica.Electrical.Analog.Examples.Utilities; + annotation ( Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), - Icon(Rectangle(extent=[-60, 60; 60, -60], style( - color=10, - thickness=2, - gradient=0, - fillColor=8, + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), + Icon(Rectangle(extent=[-90, 90; 90, -90], style( + color=10, + thickness=2, + gradient=0, + fillColor=8, fillPattern=1)), Text( - extent=[-50, 20; 50, -20], - string="ChuaCircuit", - style(color=0))), - Documentation(info=" - + extent=[-50, 20; 50, -20], + string="ChuaCircuit", + style(color=0))), + Documentation(info="

    Chua's circuit is the most simple nonlinear circuit which shows chaotic behaviour. The circuit consists of linear basic elements (capacitors, resistor, conductor, inductor), and one nonlinear element, which is called Chua's diode. The chaotic behaviour is simulated.

    @@ -30,9 +32,9 @@ Kennedy, M.P.: Three Steps to Chaos - Part I: Evolution. IEEE Transactions on CA

    Main Authors:
    -Christoph Clauß +Christoph Clauß <clauss@eas.iis.fhg.de>
    - André Schneider + André Schneider <schneider@eas.iis.fhg.de>
    Fraunhofer Institute for Integrated Circuits
    Design Automation Department
    @@ -48,47 +50,41 @@ $Id$
    Copyright:
    -Copyright (C) 1998-1999, Modelica Design Group and Fraunhofer-Gesellschaft.
    +Copyright © 1998-2002, Modelica Association and Fraunhofer-Gesellschaft.
    The Modelica package is free software; it can be redistributed and/or modified under the terms of the Modelica license, see the license conditions -and the accompanying disclaimer in the documentation of package +and the accompanying disclaimer in the documentation of package Modelica in file \"Modelica/package.mo\".

    -")); - Modelica.Electrical.Analog.Basic.Inductor L(L=18) annotation (extent=[-100, - 25; -50, 75], rotation=-90); - Modelica.Electrical.Analog.Basic.Resistor Ro(R=12.5e-3) annotation (extent=[ - -100, -30; -50, 20], rotation=-90); - Modelica.Electrical.Analog.Basic.Conductor G(G=0.565) annotation (extent=[- - 25, 50; 25, 100]); - Modelica.Electrical.Analog.Basic.Capacitor C1(C=10, v(start=4)) annotation ( - extent=[0, -10; 50, 40], rotation=-90); - Modelica.Electrical.Analog.Basic.Capacitor C2(C=100) annotation (extent=[-50 - , -10; 0, 40], rotation=-90); - Modelica.Electrical.Analog.Examples.Utilities.NonlinearResistor Nr( - Ga=-0.757576, - Gb=-0.409091, +"), + Window( + x=0.22, + y=0.17, + width=0.6, + height=0.6)); + Basic.Inductor L(L=18) annotation (extent=[-100, 25; -50, 75], rotation=-90); + Basic.Resistor Ro(R=12.5e-3) annotation (extent=[-100, -30; -50, 20], + rotation=-90); + Basic.Conductor G(G=0.565) annotation (extent=[-25, 50; 25, 100]); + Basic.Capacitor C1(C=10, v(start=4)) annotation (extent=[0, -10; 50, 40], + rotation=-90); + Basic.Capacitor C2(C=100) annotation (extent=[-50, -10; 0, 40], rotation=-90) + ; + Utilities.NonlinearResistor Nr( + Ga(min=-1) = -0.757576, + Gb(min=-1) = -0.409091, Ve=1) annotation (extent=[50, -10; 100, 40], rotation=-90); - Modelica.Electrical.Analog.Basic.Ground Gnd annotation (extent=[-25, -100; - 25, -50]); -equation - connect(L.p, G.p) annotation (points=[-72.6667, 75; -25, 75]); -equation + Basic.Ground Gnd annotation (extent=[-25, -100; 25, -50]); +equation + connect(L.p, G.p) annotation (points=[-75, 75; -25, 75]); connect(G.n, Nr.p) annotation (points=[25, 75; 75, 75; 75, 40]); -equation - connect(Nr.n, Gnd.p) annotation (points=[75, -10; 75, -50; 2.33333, -50]); -equation + connect(Nr.n, Gnd.p) annotation (points=[75, -10; 75, -50; 0, -50]); connect(C1.p, G.n) annotation (points=[25, 40; 25, 75]); -equation connect(L.n, Ro.p) annotation (points=[-75, 25; -75, 20]); -equation connect(G.p, C2.p) annotation (points=[-25, 75; -25, 40]); -equation connect(C1.n, Gnd.p) annotation (points=[25, -10; 25, -50; 0, -50]); -equation connect(C2.n, Gnd.p) annotation (points=[-25, -10; -25, -50; 0, -50]); -equation connect(Ro.n, Gnd.p) annotation (points=[-75, -30; -75, -50; 0, -50]); end ChuaCircuit; diff --git a/Electrical/Analog/Examples/DifferenceAmplifier.mo b/Electrical/Analog/Examples/DifferenceAmplifier.mo index 894c696dc7..1dc7188cd8 100644 --- a/Electrical/Analog/Examples/DifferenceAmplifier.mo +++ b/Electrical/Analog/Examples/DifferenceAmplifier.mo @@ -1,25 +1,23 @@ -// Example: Modelica.Electrical.Analog.Examples.NandGate +encapsulated model DifferenceAmplifier + import Modelica.Electrical.Analog.Basic; + import Modelica.Electrical.Analog.Sources; + import Modelica.Electrical.Analog.Examples.Utilities; -// Version: $Id$ - - -model DifferenceAmplifier annotation ( Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), - Icon(Rectangle(extent=[-60, 60; 60, -60], style( - color=10, - thickness=2, - gradient=0, - fillColor=8, + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), + Icon(Rectangle(extent=[-90, 90; 90, -90], style( + color=10, + thickness=2, + gradient=0, + fillColor=8, fillPattern=1)), Text( - extent=[-50, 20; 50, -20], - string="DifferenceAmplifier", - style(color=0))), - Documentation(info=" - + extent=[-77, 20; 79, -20], + string="DifferenceAmplifier", + style(color=0))), + Documentation(info="

    It is a simple NPN transistor amplifier circuit. The voltage difference between R1.p and R3.n is amplified. The output signal is the voltage between R2.n and R4.n. In this example the voltage at V1 is amplified because R3.n is grounded.

    @@ -35,9 +33,9 @@ Tietze, U.; Schenk, Ch.: Halbleiter-Schaltungstechnik. Springer-Verlag Berlin He

    Main Authors:
    -Christoph Clauß +Christoph Clauß <clauss@eas.iis.fhg.de>
    - André Schneider + André Schneider <schneider@eas.iis.fhg.de>
    Fraunhofer Institute for Integrated Circuits
    Design Automation Department
    @@ -53,109 +51,76 @@ $Id$
    Copyright:
    -Copyright (C) 1998-1999, Modelica Design Group and Fraunhofer-Gesellschaft.
    +Copyright © 1998-2002, Modelica Association and Fraunhofer-Gesellschaft.
    The Modelica package is free software; it can be redistributed and/or modified under the terms of the Modelica license, see the license conditions -and the accompanying disclaimer in the documentation of package +and the accompanying disclaimer in the documentation of package Modelica in file \"Modelica/package.mo\".

    -")); - Modelica.Electrical.Analog.Sources.ExpSineVoltage V1( - V=0.2, - freqHz=0.2e9, +"), + Window( + x=0.35, + y=0.01, + width=0.45, + height=0.61)); + Sources.ExpSineVoltage V1( + V=0.2, + freqHz=0.2e9, damping=0.1e8) annotation (extent=[-100, -60; -80, -40], rotation=-90); - Modelica.Electrical.Analog.Sources.RampVoltage V2(V=15, duration=1e-9) - annotation (extent=[70, 40; 90, 60], rotation=-90); - Modelica.Electrical.Analog.Sources.RampCurrent I1(I=0.16, duration=1e-9) - annotation (extent=[-20, -60; 0, -40], rotation=-90); - Modelica.Electrical.Analog.Basic.Resistor R1(R=0.0001) annotation (extent=[ - -90, -20; -70, 0]); - Modelica.Electrical.Analog.Basic.Resistor R2(R=100) annotation (extent=[-50 - , 20; -30, 40], rotation=-90); - Modelica.Electrical.Analog.Basic.Resistor R3(R=0.0001) annotation (extent=[ - 70, -20; 90, 0]); - Modelica.Electrical.Analog.Basic.Resistor R4(R=100) annotation (extent=[30, - 20; 50, 40], rotation=-90); - Modelica.Electrical.Analog.Basic.Capacitor C1(C=1e-10) annotation (extent=[ - -70, -60; -50, -40], rotation=-90); - Modelica.Electrical.Analog.Basic.Capacitor C4(C=1e-10) annotation (extent=[ - 10, -14; 30, 6]); - Modelica.Electrical.Analog.Basic.Capacitor C5(C=1e-10) annotation (extent=[0 - , -60; 20, -40], rotation=-90); - Modelica.Electrical.Analog.Basic.Capacitor C2(C=1e-10) annotation (extent=[ - -30, -14; -10, 6]); - Modelica.Electrical.Analog.Basic.Capacitor C3(C=1e-10) annotation (extent=[ - 50, -60; 70, -40], rotation=-90); - Modelica.Electrical.Analog.Basic.Ground Gnd1 annotation (extent=[-95, -80; - -85, -70]); - Modelica.Electrical.Analog.Basic.Ground Gnd9 annotation (extent=[75, 20; 85 - , 30]); - Modelica.Electrical.Analog.Basic.Ground Gnd3 annotation (extent=[-15, -20; - -5, -10]); - Modelica.Electrical.Analog.Basic.Ground Gnd2 annotation (extent=[-65, -80; - -55, -70]); - Modelica.Electrical.Analog.Basic.Ground Gnd6 annotation (extent=[5, -20; 15 - , -10]); - Modelica.Electrical.Analog.Basic.Ground Gnd7 annotation (extent=[-15, -80; - -5, -70]); - Modelica.Electrical.Analog.Basic.Ground Gnd8 annotation (extent=[5, -80; 15 - , -70]); - Modelica.Electrical.Analog.Basic.Ground Gnd5 annotation (extent=[55, -80; 65 - , -70]); - Modelica.Electrical.Analog.Basic.Ground Gnd4 annotation (extent=[85, -50; 95 - , -40]); - Modelica.Electrical.Analog.Examples.Utilities.Transistor Transistor1 - annotation (extent=[-60, -20; -40, 0]); - Modelica.Electrical.Analog.Examples.Utilities.Transistor Transistor2 - annotation (extent=[60, -20; 40, 0]); -equation + Sources.RampVoltage V2(V=15, duration=1e-9) annotation (extent=[70, 40; 90, + 60], rotation=-90); + Sources.RampCurrent I1(I=0.16, duration=1e-9) annotation (extent=[-20, -60; 0 + , -40], rotation=-90); + Basic.Resistor R1(R=0.0001) annotation (extent=[-90, -20; -70, 0]); + Basic.Resistor R2(R=100) annotation (extent=[-50, 20; -30, 40], rotation=-90) + ; + Basic.Resistor R3(R=0.0001) annotation (extent=[70, -20; 90, 0]); + Basic.Resistor R4(R=100) annotation (extent=[30, 20; 50, 40], rotation=-90); + Basic.Capacitor C1(C=1e-10) annotation (extent=[-70, -60; -50, -40], rotation + =-90); + Basic.Capacitor C4(C=1e-10) annotation (extent=[10, -14; 30, 6]); + Basic.Capacitor C5(C=1e-10) annotation (extent=[0, -60; 20, -40], rotation=- + 90); + Basic.Capacitor C2(C=1e-10) annotation (extent=[-30, -14; -10, 6]); + Basic.Capacitor C3(C=1e-10) annotation (extent=[50, -60; 70, -40], rotation=- + 90); + Basic.Ground Gnd1 annotation (extent=[-95, -80; -85, -70]); + Basic.Ground Gnd9 annotation (extent=[75, 20; 85, 30]); + Basic.Ground Gnd3 annotation (extent=[-15, -20; -5, -10]); + Basic.Ground Gnd2 annotation (extent=[-65, -80; -55, -70]); + Basic.Ground Gnd6 annotation (extent=[5, -20; 15, -10]); + Basic.Ground Gnd7 annotation (extent=[-15, -80; -5, -70]); + Basic.Ground Gnd8 annotation (extent=[5, -80; 15, -70]); + Basic.Ground Gnd5 annotation (extent=[55, -80; 65, -70]); + Basic.Ground Gnd4 annotation (extent=[85, -50; 95, -40]); + Utilities.Transistor Transistor1 annotation (extent=[-60, -20; -40, 0]); + Utilities.Transistor Transistor2 annotation (extent=[60, -20; 40, 0]); +equation connect(V1.n, Gnd1.p) annotation (points=[-90, -60; -90, -70]); -equation connect(C1.n, Gnd2.p) annotation (points=[-60, -60; -60, -70]); -equation connect(I1.n, Gnd7.p) annotation (points=[-10, -60; -10, -70]); -equation connect(C5.n, Gnd8.p) annotation (points=[10, -60; 10, -70]); -equation connect(C3.n, Gnd5.p) annotation (points=[60, -60; 60, -70]); -equation connect(R3.n, Gnd4.p) annotation (points=[90, -10; 90, -40]); -equation connect(C2.n, Gnd3.p) annotation (points=[-10, -4; -10, -10]); -equation connect(C4.p, Gnd6.p) annotation (points=[10, -4; 10, -10]); -equation connect(I1.p, C5.p) annotation (points=[-10, -40; 10, -40]); -equation connect(R1.p, V1.p) annotation (points=[-90, -10; -90, -40]); -equation connect(R2.p, V2.p) annotation (points=[-40, 40; -40, 70; 80, 70; 80, 60]); -equation connect(R4.p, V2.p) annotation (points=[40, 40; 40, 70; 80, 70; 80, 60]); -equation connect(V2.n, Gnd9.p) annotation (points=[80, 40; 80, 30]); -equation connect(R1.n, Transistor1.b) annotation (points=[-70, -10; -60, -10]); -equation connect(Transistor1.b, C1.p) annotation (points=[-60, -10; -60, -40]); -equation connect(Transistor1.c, C2.p) annotation (points=[-40, -4; -30, -4]); -equation connect(R2.n, Transistor1.c) annotation (points=[-40, 20; -40, -4]); -equation - connect(Transistor1.e, I1.p) annotation (points=[-40, -16; -30, -16; -30, - -40; -10, -40]); -equation + connect(Transistor1.e, I1.p) annotation (points=[-40, -16; -30, -16; -30, -40 + ; -10, -40]); connect(Transistor2.b, R3.p) annotation (points=[60, -10; 70, -10]); -equation connect(Transistor2.b, C3.p) annotation (points=[60, -10; 60, -40]); -equation connect(C4.n, Transistor2.c) annotation (points=[30, -4; 40, -4]); -equation connect(R4.n, Transistor2.c) annotation (points=[40, 20; 40, -4]); -equation - connect(C5.p, Transistor2.e) annotation (points=[10, -40; 30, -40; 30, -16; + connect(C5.p, Transistor2.e) annotation (points=[10, -40; 30, -40; 30, -16; 40, -16]); end DifferenceAmplifier; diff --git a/Electrical/Analog/Examples/NandGate.mo b/Electrical/Analog/Examples/NandGate.mo index 88465fc68d..7b273911d7 100644 --- a/Electrical/Analog/Examples/NandGate.mo +++ b/Electrical/Analog/Examples/NandGate.mo @@ -1,31 +1,25 @@ -// Example: Modelica.Electrical.Analog.Examples.NandGate +encapsulated model NandGate "CMOS NAND Gate (see Tietze/Schenk, page 157)" + import Modelica.Electrical.Analog.Basic; + import Modelica.Electrical.Analog.Sources; + import Modelica.Electrical.Analog.Examples.Utilities; -// Version: $Id$ - - -model NandGate "CMOS NAND Gate (see Tietze/Schenk, page 157)" annotation ( - Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), - Icon(Rectangle(extent=[-60, 60; 60, -60], style( - color=10, - thickness=2, - gradient=0, - fillColor=8, + Icon(Rectangle(extent=[-90, 91; 90, -90], style( + color=10, + thickness=2, + gradient=0, + fillColor=8, fillPattern=1)), Text( - extent=[-50, 20; 50, -20], - string="NandGate", - style(color=0))), - Documentation(info=" - + extent=[-50, 20; 50, -20], + string="NandGate", + style(color=0))), + Documentation(info="

    -The nand gate is a basic CMOS building block. It consists of four CMOS transistors. -The output voltage Nand.y.v is low if and only if the two input voltages at Nand.x1.v and Nand.x2.v +The nand gate is a basic CMOS building block. It consists of four CMOS transistors. +The output voltage Nand.y.v is low if and only if the two input voltages at Nand.x1.v and Nand.x2.v are both high. In this way the nand functionality is realized.

    -The simulation end time should be set to 1e-7. Please plot the input voltages Nand.x1.v, +The simulation end time should be set to 1e-7. Please plot the input voltages Nand.x1.v, d Nand.x2.v, and the output voltage Nand.y.v.

    @@ -38,9 +32,9 @@ Tietze, U.; Schenk, Ch.: Halbleiter-Schaltungstechnik. Springer-Verlag Berlin He
    Main Authors:
    -Christoph Clauß +Christoph Clauß <clauss@eas.iis.fhg.de>
    - André Schneider + André Schneider <schneider@eas.iis.fhg.de>
    Fraunhofer Institute for Integrated Circuits
    Design Automation Department
    @@ -56,54 +50,45 @@ $Id$
    Copyright:
    -Copyright (C) 1998-1999, Modelica Design Group and Fraunhofer-Gesellschaft.
    +Copyright © 1998-2002, Modelica Association and Fraunhofer-Gesellschaft.
    The Modelica package is free software; it can be redistributed and/or modified under the terms of the Modelica license, see the license conditions -and the accompanying disclaimer in the documentation of package +and the accompanying disclaimer in the documentation of package Modelica in file \"Modelica/package.mo\".

    -"), +"), Window( - x=0.31, - y=0.39, - width=0.6, + x=0.36, + y=0.01, + width=0.44, height=0.6)); - Modelica.Electrical.Analog.Sources.TrapezoidVoltage VIN1( - V=3.5, - startTime=20e-9, - rising=1e-9, - width=19e-9, - falling=1.e-9, + Sources.TrapezoidVoltage VIN1( + V=3.5, + startTime=20e-9, + rising=1e-9, + width=19e-9, + falling=1.e-9, period=40e-9) annotation (extent=[-80, 10; -60, 30], rotation=-90); - Modelica.Electrical.Analog.Sources.TrapezoidVoltage VIN2( - V=3.5, - startTime=10e-9, - rising=1e-9, - width=19e-9, - falling=1.e-9, + Sources.TrapezoidVoltage VIN2( + V=3.5, + startTime=10e-9, + rising=1e-9, + width=19e-9, + falling=1.e-9, period=40e-9) annotation (extent=[-80, -40; -60, -20], rotation=-90); - Modelica.Electrical.Analog.Sources.RampVoltage VDD(V=5, duration=1e-9) - annotation (extent=[40, 60; 60, 80], rotation=-90); - Modelica.Electrical.Analog.Basic.Ground Gnd1 annotation (extent=[45, 43; 55 - , 53]); - Modelica.Electrical.Analog.Basic.Ground Gnd4 annotation (extent=[-75, -5; - -65, 5]); - Modelica.Electrical.Analog.Basic.Ground Gnd5 annotation (extent=[-75, -55; - -65, -45]); - Modelica.Electrical.Analog.Examples.Utilities.Nand Nand annotation (extent=[ - -40, -45; 40, 55]); -equation + Sources.RampVoltage VDD(V=5, duration=1e-9) annotation (extent=[40, 60; 60, + 80], rotation=-90); + Basic.Ground Gnd1 annotation (extent=[45, 43; 55, 53]); + Basic.Ground Gnd4 annotation (extent=[-75, -5; -65, 5]); + Basic.Ground Gnd5 annotation (extent=[-75, -55; -65, -45]); + Utilities.Nand Nand annotation (extent=[-40, -45; 40, 55]); +equation connect(VDD.n, Gnd1.p) annotation (points=[50, 60; 50, 53]); -equation connect(VIN1.n, Gnd4.p) annotation (points=[-70, 10; -70, 5]); -equation connect(VIN2.n, Gnd5.p) annotation (points=[-70, -40; -70, -45]); -equation connect(Nand.Vdd, VDD.p) annotation (points=[0, 55; 0, 90; 50, 90; 50, 80]); -equation connect(VIN1.p, Nand.x1) annotation (points=[-70, 30; -40, 30]); -equation connect(VIN2.p, Nand.x2) annotation (points=[-70, -20; -40, -20]); end NandGate; diff --git a/Electrical/Analog/Examples/Utilities/Nand.mo b/Electrical/Analog/Examples/Utilities/Nand.mo index 913d7b5276..6d6c3f8bbf 100644 --- a/Electrical/Analog/Examples/Utilities/Nand.mo +++ b/Electrical/Analog/Examples/Utilities/Nand.mo @@ -1,33 +1,27 @@ -// Example: Modelica.Electrical.Analog.Examples.Utilities.Nand - -// Version: $Id$ - - -model Nand "CMOS NAND Gate (see Tietze/Schenk, page 157)" +model Nand "CMOS NAND Gate (see Tietze/Schenk, page 157)" annotation ( Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Icon( - Rectangle(extent=[-50, 70; 50, -70], style(color=0, fillColor=8)), - Ellipse(extent=[50, 5; 60, -5], style(color=0, pattern=0)), + Rectangle(extent=[-50, 70; 50, -70], style(color=0, fillColor=8)), + Ellipse(extent=[50, 5; 60, -5], style(color=0, pattern=0)), Text( - extent=[-16, 50; 14, 20], - string="&", - style(color=0)), - Line(points=[60, 0; 100, 0]), - Line(points=[0, 70; 0, 100]), - Line(points=[-50, 50; -100, 50]), - Line(points=[-50, -50; -100, -50]), - Ellipse(extent=[50, 5; 60, -5], style(color=0)), - Text(extent=[-100, 34; -90, 24], string="x1"), - Text(extent=[-100, -65; -90, -75], string="x2"), - Text(extent=[90, -15; 100, -25], string="y")), - Documentation(info=" - + extent=[-16, 50; 14, 20], + string="&", + style(color=0)), + Line(points=[60, 0; 100, 0]), + Line(points=[0, 70; 0, 100]), + Line(points=[-50, 50; -100, 50]), + Line(points=[-50, -50; -100, -50]), + Ellipse(extent=[50, 5; 60, -5], style(color=0)), + Text(extent=[-100, 34; -90, 24], string="x1"), + Text(extent=[-100, -65; -90, -75], string="x2"), + Text(extent=[90, -15; 100, -25], string="y")), + Documentation(info="

    -The nand gate is a basic CMOS building block. It consists of four CMOS transistors. +The nand gate is a basic CMOS building block. It consists of four CMOS transistors.

    @@ -39,9 +33,9 @@ Tietze, U.; Schenk, Ch.: Halbleiter-Schaltungstechnik. Springer-Verlag Berlin He
    Main Authors:
    -Christoph Clauß +Christoph Clauß <clauss@eas.iis.fhg.de>
    - André Schneider + André Schneider <schneider@eas.iis.fhg.de>
    Fraunhofer Institute for Integrated Circuits
    Design Automation Department
    @@ -57,121 +51,92 @@ $Id$
    Copyright:
    -Copyright (C) 1998-1999, Modelica Design Group and Fraunhofer-Gesellschaft.
    +Copyright © 1998-2002, Modelica Association and Fraunhofer-Gesellschaft.
    The Modelica package is free software; it can be redistributed and/or modified under the terms of the Modelica license, see the license conditions -and the accompanying disclaimer in the documentation of package +and the accompanying disclaimer in the documentation of package Modelica in file \"Modelica/package.mo\".

    -"), +"), Window( - x=0.28, - y=0.08, - width=0.6, - height=0.6), + x=0.28, + y=0.08, + width=0.6, + height=0.6), Diagram); - Modelica.Electrical.Analog.Semiconductors.PMOS TP1( - W=6.5e-6, - L=3.1e-6, - Beta=1.05e-5, - Vt=-1, - K2=0.41, - K5=0.8385, - dW=-2.5e-6, + Semiconductors.PMOS TP1( + W=6.5e-6, + L=3.1e-6, + Beta=1.05e-5, + Vt=-1, + K2=0.41, + K5=0.8385, + dW=-2.5e-6, dL=-2.1e-6) annotation (extent=[10, 60; 30, 80]); - Modelica.Electrical.Analog.Semiconductors.PMOS TP2( - W=6.5e-6, - L=3.1e-6, - Beta=1.05e-5, - Vt=-1, - K2=0.41, - K5=0.8385, - dW=-2.5e-6, + Semiconductors.PMOS TP2( + W=6.5e-6, + L=3.1e-6, + Beta=1.05e-5, + Vt=-1, + K2=0.41, + K5=0.8385, + dW=-2.5e-6, dL=-2.1e-6) annotation (extent=[-40, 45; -20, 65]); - Modelica.Electrical.Analog.Semiconductors.NMOS TN1( - W=6.5e-6, - L=3.1e-6, - Beta=4.1e-5, - Vt=0.8, - K2=1.144, - K5=0.7311, - dW=-2.5e-6, + Semiconductors.NMOS TN1( + W=6.5e-6, + L=3.1e-6, + Beta=4.1e-5, + Vt=0.8, + K2=1.144, + K5=0.7311, + dW=-2.5e-6, dL=-1.5e-6) annotation (extent=[10, 15; 30, 35]); - Modelica.Electrical.Analog.Semiconductors.NMOS TN2( - W=6.5e-6, - L=3.1e-6, - Beta=4.1e-5, - Vt=0.8, - K2=1.144, - K5=0.7311, - dW=-2.5e-6, + Semiconductors.NMOS TN2( + W=6.5e-6, + L=3.1e-6, + Beta=4.1e-5, + Vt=0.8, + K2=1.144, + K5=0.7311, + dW=-2.5e-6, dL=-1.5e-6) annotation (extent=[10, -25; 30, -5]); - Modelica.Electrical.Analog.Basic.Capacitor C4(C=0.4e-13) annotation (extent= - [50, 20; 70, 40], rotation=-90); - Modelica.Electrical.Analog.Basic.Capacitor C7(C=0.4e-13) annotation (extent= - [45, -60; 65, -40], rotation=-90); - Modelica.Electrical.Analog.Basic.Ground Gnd annotation (extent=[40, -25; 50 - , -15]); - Modelica.Electrical.Analog.Basic.Ground Gnd2 annotation (extent=[55, 0; 65, - 10]); - Modelica.Electrical.Analog.Basic.Ground Gnd3 annotation (extent=[50, -80; 60 - , -70]); - Modelica.Electrical.Analog.Basic.Ground Gnd6 annotation (extent=[-15, 30; -5 - , 40]); - Modelica.Electrical.Analog.Basic.Ground Gnd7 annotation (extent=[40, 15; 50 - , 25]); - Modelica.Electrical.Analog.Basic.Ground Gnd8 annotation (extent=[40, 60; 50 - , 70]); - Modelica.Electrical.Analog.Interfaces.Pin x1 annotation (extent=[-110, 40; - -90, 60]); - Modelica.Electrical.Analog.Interfaces.Pin x2 annotation (extent=[-110, -60; - -90, -40]); - Modelica.Electrical.Analog.Interfaces.Pin Vdd annotation (extent=[-10, 90; - 10, 110]); - Modelica.Electrical.Analog.Interfaces.Pin y annotation (extent=[90, -10; 110 - , 10]); -equation + Basic.Capacitor C4(C=0.4e-13) annotation (extent=[50, 20; 70, 40], rotation=- + 90); + Basic.Capacitor C7(C=0.4e-13) annotation (extent=[45, -60; 65, -40], rotation + =-90); + Basic.Ground Gnd annotation (extent=[40, -25; 50, -15]); + Basic.Ground Gnd2 annotation (extent=[55, 0; 65, 10]); + Basic.Ground Gnd3 annotation (extent=[50, -80; 60, -70]); + Basic.Ground Gnd6 annotation (extent=[-15, 30; -5, 40]); + Basic.Ground Gnd7 annotation (extent=[40, 15; 50, 25]); + Basic.Ground Gnd8 annotation (extent=[40, 60; 50, 70]); + Interfaces.Pin x1 annotation (extent=[-110, 40; -90, 60]); + Interfaces.Pin x2 annotation (extent=[-110, -60; -90, -40]); + Interfaces.Pin Vdd annotation (extent=[-10, 90; 10, 110]); + Interfaces.Pin y annotation (extent=[90, -10; 110, 10]); +equation connect(TN1.S, TN2.D) annotation (points=[30, 20; 30, -10]); -equation - connect(TN2.B, Gnd.p) annotation (points=[30, -15; 38, -15; 38, -15; 45, -15 - ]); -equation + connect(TN2.B, Gnd.p) annotation (points=[30, -15; 38, -15; 38, -15; 45, -15] + ); connect(TN2.D, C7.p) annotation (points=[30, -10; 55, -10; 55, -40]); -equation - connect(TN2.S, Gnd.p) annotation (points=[30, -20; 38, -20; 38, -15; 45, -15 - ]); -equation + connect(TN2.S, Gnd.p) annotation (points=[30, -20; 38, -20; 38, -15; 45, -15] + ); connect(TP1.S, TN1.D) annotation (points=[30, 65; 30, 30]); -equation connect(TP1.G, TN1.G) annotation (points=[10, 65; 10, 20]); -equation connect(C4.n, Gnd2.p) annotation (points=[60, 20; 60, 10]); -equation connect(C7.n, Gnd3.p) annotation (points=[55, -60; 55, -70]); -equation connect(TP2.B, Gnd6.p) annotation (points=[-20, 55; -10, 55; -10, 40]); -equation connect(TN1.B, Gnd7.p) annotation (points=[30, 25; 45, 25]); -equation connect(TP1.B, Gnd8.p) annotation (points=[30, 70; 45, 70]); -equation connect(TP2.G, x1) annotation (points=[-40, 50; -100, 50]); -equation connect(TP2.G, TN2.G) annotation (points=[-40, 50; -40, -20; 10, -20]); -equation - connect(TN1.G, x2) annotation (points=[10, 20; -70, 20; -70, -50; -100, -50] - ); -equation + connect(TN1.G, x2) annotation (points=[10, 20; -70, 20; -70, -50; -100, -50]) + ; connect(TP2.S, TN1.D) annotation (points=[-20, 50; 30, 50; 30, 30]); -equation connect(TN1.D, C4.p) annotation (points=[30, 30; 30, 50; 60, 50; 60, 40]); -equation connect(Vdd, TP1.D) annotation (points=[0, 100; 0, 80; 30, 80; 30, 75]); -equation connect(TP2.D, Vdd) annotation (points=[-20, 60; -20, 80; 0, 80; 0, 100]); -equation - connect(C4.p, y) annotation (points=[60, 40; 60, 50; 80, 50; 80, 0; 100, 0]) - ; + connect(C4.p, y) annotation (points=[60, 40; 60, 50; 80, 50; 80, 0; 100, 0]); end Nand; diff --git a/Electrical/Analog/Examples/Utilities/NonlinearResistor.mo b/Electrical/Analog/Examples/Utilities/NonlinearResistor.mo index 3eaf2d38df..485b490562 100644 --- a/Electrical/Analog/Examples/Utilities/NonlinearResistor.mo +++ b/Electrical/Analog/Examples/Utilities/NonlinearResistor.mo @@ -1,5 +1,5 @@ model NonlinearResistor "Chua's resistor" - extends Modelica.Electrical.Analog.Interfaces.OnePort; + extends Interfaces.OnePort; annotation ( Coordsys( extent=[-100, -100; 100, 100], @@ -25,11 +25,10 @@ model NonlinearResistor "Chua's resistor" Polygon(points=[50, 60; 38, 52; 44, 46; 50, 60], style(fillColor=3, fillPattern=1)), Text(extent=[-100, 100; 100, 70], string="%name"))); - parameter Modelica.SIunits.Conductance Ga; - parameter Modelica.SIunits.Conductance Gb; - parameter Modelica.SIunits.Voltage Ve; + parameter SI.Conductance Ga; + parameter SI.Conductance Gb; + parameter SI.Voltage Ve; equation i = if (v < -Ve) then Gb*(v + Ve) - Ga*Ve else if (v > Ve) then Gb*(v - Ve) + Ga*Ve else Ga*v; end NonlinearResistor; - diff --git a/Electrical/Analog/Examples/Utilities/RealSwitch.mo b/Electrical/Analog/Examples/Utilities/RealSwitch.mo index f249d9d585..55893426d7 100644 --- a/Electrical/Analog/Examples/Utilities/RealSwitch.mo +++ b/Electrical/Analog/Examples/Utilities/RealSwitch.mo @@ -1,30 +1,16 @@ -// Example: Modelica.Electrical.Analog.Examples.Utilities.RealSwitch - -// Version: $Id$ - - model RealSwitch - Modelica.Electrical.Analog.Ideal.ControlledIdealCommutingSwitch S(level=2.5) - annotation (extent=[11.3333, 18; 58, 64.6667]); - Modelica.Electrical.Analog.Basic.Resistor R(R=0.01) annotation (extent=[-66 - , 16; -19.3333, 62.6667]); - Modelica.Electrical.Analog.Interfaces.Pin p annotation (extent=[-110, 30; - -90, 50]); - Modelica.Electrical.Analog.Interfaces.Pin n1 annotation (extent=[90, 50; 110 - , 70]); - Modelica.Electrical.Analog.Interfaces.Pin n2 annotation (extent=[90, 4; 110 - , 24]); - Modelica.Electrical.Analog.Interfaces.Pin control annotation (extent=[24, 90 - ; 44, 110]); + Ideal.ControlledIdealCommutingSwitch S(level=2.5) annotation (extent=[11.3333 + , 18; 58, 64.6667]); + Basic.Resistor R(R=0.01) annotation (extent=[-66, 16; -19.3333, 62.6667]); + Interfaces.Pin p annotation (extent=[-110, 30; -90, 50]); + Interfaces.Pin n1 annotation (extent=[90, 50; 110, 70]); + Interfaces.Pin n2 annotation (extent=[90, 4; 110, 24]); + Interfaces.Pin control annotation (extent=[24, 90; 44, 110]); equation connect(p, R.p) annotation (points=[-100, 40; -66, 39.3333]); -equation connect(R.n, S.p) annotation (points=[-19.3333, 39.3333; 11.3333, 41.3333]); -equation connect(n1, S.n1) annotation (points=[100, 60; 58, 53]); -equation connect(n2, S.n2) annotation (points=[100, 14; 58, 41.3333]); -equation connect(control, S.control) annotation (points=[34, 100; 34.6667, 64.6667]); annotation (Coordsys( extent=[-100, -100; 100, 100], diff --git a/Electrical/Analog/Examples/Utilities/Transistor.mo b/Electrical/Analog/Examples/Utilities/Transistor.mo index 29e20f671f..6c2a015d3e 100644 --- a/Electrical/Analog/Examples/Utilities/Transistor.mo +++ b/Electrical/Analog/Examples/Utilities/Transistor.mo @@ -18,13 +18,11 @@ model Transistor y=0.24, width=0.6, height=0.6)); - Modelica.Electrical.Analog.Basic.Resistor rtb(R=0.05) annotation (extent=[ - -80, -10; -60, 10]); - Modelica.Electrical.Analog.Basic.Resistor rtc(R=0.1) annotation (extent=[40 - , 0; 60, 20]); - Modelica.Electrical.Analog.Basic.Capacitor ct(C=1e-10) annotation (extent=[ - -50, -40; -30, -20], rotation=-90); - Modelica.Electrical.Analog.Semiconductors.NPN Tr( + Basic.Resistor rtb(R=0.05) annotation (extent=[-80, -10; -60, 10]); + Basic.Resistor rtc(R=0.1) annotation (extent=[40, 0; 60, 20]); + Basic.Capacitor ct(C=1e-10) annotation (extent=[-50, -40; -30, -20], rotation + =-90); + Semiconductors.NPN Tr( Bf=50, Br=0.1, Is=1e-16, @@ -41,26 +39,16 @@ model Transistor Gbc=1e-15, Gbe=1e-15, Vt=0.02585) annotation (extent=[-20, -20; 20, 20]); - Modelica.Electrical.Analog.Basic.Ground Ground1 annotation (extent=[-50, -80 - ; -30, -60]); - Modelica.Electrical.Analog.Interfaces.Pin c annotation (extent=[90, 50; 110 - , 70]); - Modelica.Electrical.Analog.Interfaces.Pin b annotation (extent=[-110, -10; - -90, 10]); - Modelica.Electrical.Analog.Interfaces.Pin e annotation (extent=[90, -70; 110 - , -50]); + Basic.Ground Ground1 annotation (extent=[-50, -80; -30, -60]); + Interfaces.Pin c annotation (extent=[90, 50; 110, 70]); + Interfaces.Pin b annotation (extent=[-110, -10; -90, 10]); + Interfaces.Pin e annotation (extent=[90, -70; 110, -50]); equation connect(rtb.n, Tr.B) annotation (points=[-60, 0; -20, 0]); -equation connect(rtb.n, ct.p) annotation (points=[-60, 0; -40, 0; -40, -20]); -equation connect(ct.n, Ground1.p) annotation (points=[-40, -40; -40, -60]); -equation connect(Tr.C, rtc.p) annotation (points=[20, 10; 40, 10]); -equation connect(rtc.n, c) annotation (points=[60, 10; 80, 10; 80, 60; 100, 60]); -equation connect(b, rtb.p) annotation (points=[-100, 0; -80, 0]); -equation connect(Tr.E, e) annotation (points=[20, -10; 80, -10; 80, -60; 100, -60]); end Transistor; diff --git a/Electrical/Analog/Examples/Utilities/package.mo b/Electrical/Analog/Examples/Utilities/package.mo index f9f172fe1a..1cf3ff40e8 100644 --- a/Electrical/Analog/Examples/Utilities/package.mo +++ b/Electrical/Analog/Examples/Utilities/package.mo @@ -1,21 +1,17 @@ package Utilities "Utilities for examples" + + extends Modelica.Icons.Library2; -annotation ( - Coordsys( - extent=[0, 0; 400, 500], - grid=[1, 1], - component=[20, 20]), - Window( - x=0.03, - y=0.04, - width=0.50, - height=0.60, +annotation (Window( + x=0.09, + y=0.15, + width=0.26, + height=0.44, library=1, autolayout=1), - Documentation(info=" - + Documentation(info="

    This package contains utilities ...

    @@ -24,9 +20,9 @@ This package contains utilities ...
    Main Authors:
    -Christoph Clauß +Christoph Clauß <clauss@eas.iis.fhg.de>
    - André Schneider + André Schneider <schneider@eas.iis.fhg.de>
    Fraunhofer Institute for Integrated Circuits
    Design Automation Department
    @@ -42,14 +38,13 @@ $Id$
    Copyright:
    -Copyright (C) 1998-1999, Modelica Design Group and Fraunhofer-Gesellschaft.
    +Copyright © 1998-2002, Modelica Association and Fraunhofer-Gesellschaft.
    The Modelica package is free software; it can be redistributed and/or modified under the terms of the Modelica license, see the license conditions -and the accompanying disclaimer in the documentation of package +and the accompanying disclaimer in the documentation of package Modelica in file \"Modelica/package.mo\".

    ")); - end Utilities; diff --git a/Electrical/Analog/Examples/package.mo b/Electrical/Analog/Examples/package.mo index feeab71b6c..1c11334f8e 100644 --- a/Electrical/Analog/Examples/package.mo +++ b/Electrical/Analog/Examples/package.mo @@ -1,25 +1,22 @@ package Examples "Examples for analog electrical packages" + + extends Modelica.Icons.Library2; -annotation ( - Coordsys( - extent=[0, 0; 400, 500], - grid=[1, 1], - component=[20, 20]), +annotation ( Window( x=0.03, y=0.04, - width=0.50, - height=0.60, + width=0.49, + height=0.5, library=1, autolayout=1), - Documentation(info=" - + Documentation(info="

    This package contains examples for the analog electrical packages.

      -
    • Chua´s circuit
    • +
    • Chuas circuit
    • Cauer filter
    • NAND gate
    @@ -29,9 +26,9 @@ This package contains examples for the analog electrical packages.
    Main Authors:
    -Christoph Clauß +Christoph Clauß <clauss@eas.iis.fhg.de>
    - André Schneider + André Schneider <schneider@eas.iis.fhg.de>
    Fraunhofer Institute for Integrated Circuits
    Design Automation Department
    @@ -47,14 +44,13 @@ $Id$
    Copyright:
    -Copyright (C) 1998-1999, Modelica Design Group and Fraunhofer-Gesellschaft.
    +Copyright © 1998-2002, Modelica Association and Fraunhofer-Gesellschaft.
    The Modelica package is free software; it can be redistributed and/or modified under the terms of the Modelica license, see the license conditions -and the accompanying disclaimer in the documentation of package +and the accompanying disclaimer in the documentation of package Modelica in file \"Modelica/package.mo\".

")); - end Examples; diff --git a/Electrical/Analog/Ideal.mo b/Electrical/Analog/Ideal.mo index 59827ec0cd..41462c7d09 100644 --- a/Electrical/Analog/Ideal.mo +++ b/Electrical/Analog/Ideal.mo @@ -1,33 +1,34 @@ package Ideal + extends Modelica.Icons.Library; - package SIunits = Modelica.SIunits ; - annotation ( - Coordsys( - extent=[0, 0; 400, 500], - grid=[1, 1], - component=[20, 20]), - Window( - x=0.03, - y=0.04, - width=0.50, - height=0.36, - library=1, - autolayout=1), - Documentation(info=" - + annotation (Window( + x=0.03, + y=0.04, + width=0.50, + height=0.36, + library=1, + autolayout=1),Documentation(info="

-This package contains ideal components: +This package contains electrical components with idealized behaviour: +

@@ -35,9 +36,9 @@ This package contains ideal components:
Main Authors:
-Christoph Clauß +Christoph Clauß <clauss@eas.iis.fhg.de>
- André Schneider + André Schneider <schneider@eas.iis.fhg.de>
Fraunhofer Institute for Integrated Circuits
Design Automation Department
@@ -53,10 +54,10 @@ $Id$
Copyright:
-Copyright (C) 1998-1999, Modelica Design Group and Fraunhofer-Gesellschaft.
+Copyright © 1998-2002, Modelica Association and Fraunhofer-Gesellschaft.
The Modelica package is free software; it can be redistributed and/or modified under the terms of the Modelica license, see the license conditions -and the accompanying disclaimer in the documentation of package +and the accompanying disclaimer in the documentation of package Modelica in file \"Modelica/package.mo\".

@@ -64,18 +65,17 @@ Modelica in file \"Modelica/package.mo\".
")); model IdealThyristor "Ideal thyristor" - extends Modelica.Electrical.Analog.Interfaces.OnePort; - parameter SIunits.Resistance Roff(final min=0) = 1.E-5 + extends Interfaces.OnePort; + parameter SI.Resistance Roff(final min=0) = 1.E-5 "Closed thyristor resistance"; - parameter SIunits.Conductance Gon(final min=0) = 1.E-5 + parameter SI.Conductance Gon(final min=0) = 1.E-5 "Opened thyristor conductance"; protected Real s "Auxiliary variable"; Boolean off(start=true); Boolean fire(start=true); annotation ( - Documentation(info=" - + Documentation(info="

Ideal thyristor ... < description will be added >

@@ -121,19 +121,19 @@ Ideal thyristor ... < description will be added > v = s*(if off then 1 else Roff); i = s*(if off then Gon else 1); end IdealThyristor; + model IdealGTOThyristor "Ideal GTO thyristor" - extends Modelica.Electrical.Analog.Interfaces.OnePort; - parameter SIunits.Resistance Roff(final min=0) = 1.E-5 + extends Interfaces.OnePort; + parameter SI.Resistance Roff(final min=0) = 1.E-5 "Closed thyristor resistance"; - parameter SIunits.Conductance Gon(final min=0) = 1.E-5 + parameter SI.Conductance Gon(final min=0) = 1.E-5 "Opened thyristor conductance"; protected Real s "Auxiliary variable"; Boolean off(start=true) "Position of switch"; Boolean fire; annotation ( - Documentation(info=" - + Documentation(info="

Ideal GTO thyristor ...

@@ -179,11 +179,12 @@ Ideal GTO thyristor ... v = s*(if off then 1 else Roff); i = s*(if off then Gon else 1); end IdealGTOThyristor; + model IdealSwitch "Ideal electrical switch" - extends Modelica.Electrical.Analog.Interfaces.OnePort; - parameter SIunits.Resistance Roff(final min=0) = 1.E-5 + extends Interfaces.OnePort; + parameter SI.Resistance Roff(final min=0) = 1.E-5 "Closed switch resistance"; - parameter SIunits.Conductance Gon(final min=0) = 1.E-5 + parameter SI.Conductance Gon(final min=0) = 1.E-5 "Opened switch conductance"; protected Real s "Auxiliary variable"; @@ -193,20 +194,19 @@ Ideal GTO thyristor ... false})) "true/false opened/closed switch" annotation (extent=[-10 , 50; 10, 70], rotation=-90); annotation ( - Documentation(info=" - + Documentation(info="

Ideal electrical switch. In order to prevent singularities during switching, the opened switch has a high resistance -and the closed switch has a low resistance. +and the closed switch has a low resistance.

-If the actual circuit has an appropriate structure, the +If the actual circuit has an appropriate structure, the limiting case is also allowed, i.e., the resistance of the closed switch could be exactly zero and the conductance of the open switch could be also exactly zero (i.e. the resistance is -infinity). Note, there are circuits, where a description -with zero/infinity resistances is not possible. +infinite). Note, there are circuits, where a description +with zero/infinity resistances is not possible.

"), @@ -238,19 +238,190 @@ with zero/infinity resistances is not possible. v = s*(if off then 1 else Roff); i = s*(if off then Gon else 1); end IdealSwitch; - model ControlledIdealSwitch - parameter SIunits.Voltage level "Switch level"; - parameter SIunits.Resistance Roff(final min=0) = 1.E-5 + + model IdealCommutingSwitch "Ideal commuting switch" + parameter SI.Resistance Ron(final min=0) = 1.E-5 "Closed switch resistance" + ; + parameter SI.Conductance Goff(final min=0) = 1.E-5 + "Opened switch conductance"; + annotation ( + Documentation(info=" +

+The commuting switch has a positive pin p and two negative pins n1 and n2. +The switching behaviour is controlled +by the control signal. If the control signal is true, the pin p is connected +with the negative pin n2. Otherwise, the pin p is connected to the negative pin n1. +

+

+In order to prevent singularities during switching, the opened +switch has a (very low) conductance Goff +and the closed switch has a (very low) resistance Ron. +The limiting case is also allowed, i.e., the resistance Ron of the +closed switch could be exactly zero and the conductance Goff of the +open switch could be also exactly zero. Note, there are circuits, +where a description with zero Ron or zero Goff is not possible. +

+ +"), + Coordsys( + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), + Icon( + Ellipse(extent=[-44, 4; -36, -4]), + Text(extent=[-80, 0; -60, 22], string="p"), + Text(extent=[60, 50; 80, 72], string="n1"), + Text(extent=[60, 0; 80, 22], string="n2"), + Line(points=[-90, 0; -44, 0]), + Line(points=[-37, 2; 40, 50]), + Line(points=[40, 50; 90, 50]), + Line(points=[0, 90; 0, 25]), + Line(points=[40, 0; 90, 0]), + Text(extent=[-100, -70; 100, -100], string="%name")), + Diagram( + Ellipse(extent=[-44, 4; -36, -4]), + Text(extent=[-80, 0; -60, 22], string="p"), + Text(extent=[60, 50; 80, 72], string="n1"), + Text(extent=[60, 0; 80, 22], string="n2"), + Line(points=[-90, 0; -44, 0]), + Line(points=[-37, 2; 40, 50]), + Line(points=[40, 50; 90, 50]), + Line(points=[0, 90; 0, 25]), + Line(points=[40, 0; 90, 0])), + Window( + x=0.21, + y=0.05, + width=0.6, + height=0.6)); + public + Interfaces.PositivePin p annotation (extent=[-110, -10; -90, 10]); + Interfaces.NegativePin n2 annotation (extent=[90, -10; 110, 10]); + Interfaces.NegativePin n1 annotation (extent=[90, 40; 110, 60]); + Modelica.Blocks.Interfaces.BooleanInPort control(final n=1) + "true => p--n2 connected, false => p--n1 connected" annotation (extent=[- + 10, 70; 10, 90], rotation=-90); + protected + Real s1; + Real s2 "Auxiliary variables"; + Boolean off; + equation + off = control.signal[1]; + 0 = p.i + n2.i + n1.i; + + p.v - n1.v = s1*(if (off) then 1 else Ron); + n1.i = -s1*(if (off) then Goff else 1); + p.v - n2.v = s2*(if (off) then Ron else 1); + n2.i = -s2*(if (off) then 1 else Goff); + end IdealCommutingSwitch; + + model IdealIntermediateSwitch "Ideal intermediate switch" + parameter SI.Resistance Ron(final min=0) = 1.E-5 "Closed switch resistance" + ; + parameter SI.Conductance Goff(final min=0) = 1.E-5 + "Opened switch conductance"; + annotation ( + Documentation(info=" +

+The intermediate switch has four switching contact pins p1, p2, n1, and n2. +The switching behaviour is controlled by the control signal. If the control +signal is true, the pin p1 is connected to pin n2, and the pin p2 is +connected to the pin n2. Otherwise, the pin p1 is connected to n1, and +p2 is connected to n2. +

+ +\"IdealIntermediateSwitch1\" + +

+In order to prevent singularities during switching, the opened +switch has a (very low) conductance Goff +and the closed switch has a (very low) resistance Ron. +

+ +\"IdealIntermediateSwitch2\" + +

+The limiting case is also allowed, i.e., the resistance Ron of the +closed switch could be exactly zero and the conductance Goff of the +open switch could be also exactly zero. Note, there are circuits, +where a description with zero Ron or zero Goff is not possible. +

+ +"), + Coordsys( + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), + Icon( + Ellipse(extent=[-4, 30; 4, 22]), + Text(extent=[-80, 50; -60, 72], string="p1"), + Text(extent=[-80, 0; -60, 22], string="p2"), + Text(extent=[60, 50; 80, 72], string="n1"), + Text(extent=[60, 0; 80, 22], string="n2"), + Line(points=[-90, 0; -44, 0]), + Line(points=[-90, 50; -44, 50]), + Line(points=[-44, 0; 40, 50]), + Line(points=[-44, 50; 40, 0]), + Line(points=[40, 50; 90, 50]), + Line(points=[0, 90; 0, 25]), + Line(points=[40, 0; 90, 0]), + Text(extent=[-100, -70; 100, -100], string="%name")), + Diagram( + Ellipse(extent=[-4, 30; 4, 22]), + Text(extent=[-80, 50; -60, 72], string="p1"), + Text(extent=[-80, 0; -60, 22], string="p2"), + Text(extent=[60, 50; 80, 72], string="n1"), + Text(extent=[60, 0; 80, 22], string="n2"), + Line(points=[-90, 0; -44, 0]), + Line(points=[-90, 50; -44, 50]), + Line(points=[-44, 0; 40, 50]), + Line(points=[-44, 50; 40, 0]), + Line(points=[40, 50; 90, 50]), + Line(points=[0, 90; 0, 25]), + Line(points=[40, 0; 90, 0])), + Window( + x=0.21, + y=0.05, + width=0.6, + height=0.6)); + public + Interfaces.PositivePin p1 annotation (extent=[-110, 40; -90, 60]); + Interfaces.PositivePin p2 annotation (extent=[-110, -10; -90, 10]); + Interfaces.NegativePin n1 annotation (extent=[90, 40; 110, 60]); + Interfaces.NegativePin n2 annotation (extent=[90, -10; 110, 10]); + Modelica.Blocks.Interfaces.BooleanInPort control(final n=1) "true => p1--n2, p2--n1 connected, + otherwise p1--n1, p2--n2 connected" annotation (extent=[-10, 70; 10, + 90], rotation=-90); + protected + Real s1; + Real s2; + Real s3; + Real s4 "Auxiliary variables"; + Boolean off; + equation + off = control.signal[1]; + p1.v - n1.v = s1*(if (off) then 1 else Ron); + p2.v - n2.v = s2*(if (off) then 1 else Ron); + p1.v - n2.v = s3*(if (off) then Ron else 1); + p2.v - n1.v = s4*(if (off) then Ron else 1); + + p1.i = if (off) then s1*Goff + s3 else s1 + s3*Goff; + p2.i = if (off) then s2*Goff + s4 else s2 + s4*Goff; + n1.i = if (off) then -s1*Goff - s4 else -s1 - s4*Goff; + n2.i = if (off) then -s2*Goff - s3 else -s2 - s3*Goff; + end IdealIntermediateSwitch; + + model ControlledIdealSwitch "Controlled ideal switch" + parameter SI.Voltage level=0.5 "Switch level"; + parameter SI.Resistance Roff(final min=0) = 1.E-5 "Closed switch resistance"; - parameter SIunits.Conductance Gon(final min=0) = 1.E-5 + parameter SI.Conductance Gon(final min=0) = 1.E-5 "Opened switch conductance"; protected Real s "Auxiliary variable"; annotation ( - Documentation(info=" - + Documentation(info="

-The ideal switch is a three-pole. If the third pin voltage exceeds the given +The ideal switch is a three-pole. If the third pin voltage exceeds the given parameter Voltage, the pins p and n are open (no current flowing, any voltage possible). Otherwise, p and n are short cut.

@@ -279,33 +450,41 @@ possible). Otherwise, p and n are short cut. Line(points=[40, 0; 90, 0]), Line(points=[0, 90; 0, 25]))); public - Modelica.Electrical.Analog.Interfaces.Pin p "Positive pin" annotation ( - extent=[-110, -10; -90, 10]); - Modelica.Electrical.Analog.Interfaces.Pin n "Negative pin" annotation ( - extent=[90, -10; 110, 10]); - Modelica.Electrical.Analog.Interfaces.Pin control + Interfaces.Pin p "Positive pin" annotation (extent=[-110, -10; -90, 10]); + Interfaces.Pin n "Negative pin" annotation (extent=[90, -10; 110, 10]); + Interfaces.Pin control "Control pin: control.v > level open, otherwise closed" annotation ( extent=[-10, 90; 10, 110], rotation=90); equation control.i = 0; 0 = p.i + n.i; - p.v - n.v = s * (if (control.v < level) then Roff else 1); - n.i = s * (if (control.v < level) then 1 else Gon); + p.v - n.v = s*(if (control.v < level) then Roff else 1); + n.i = s*(if (control.v < level) then 1 else Gon); end ControlledIdealSwitch; - model ControlledIdealCommutingSwitch "Ideal commuting switch" - parameter SIunits.Voltage level "Switch level"; - parameter SIunits.Resistance Roff(final min=0) = 1.E-5 - "Closed switch resistance"; - parameter SIunits.Conductance Gon(final min=0) = 1.E-5 + + model ControlledIdealCommutingSwitch "Controlled ideal commuting switch" + parameter SI.Voltage level=0.5 "Switch level"; + parameter SI.Resistance Ron(final min=0) = 1.E-5 "Closed switch resistance" + ; + parameter SI.Conductance Goff(final min=0) = 1.E-5 "Opened switch conductance"; annotation ( - Documentation(info=" - + Documentation(info=" +

+The commuting switch has a positive pin p and two negative pins n1 and n2. +The switching behaviour is controlled +by the control pin. If its voltage exceeds the value of the parameter level, +the pin p is connected with the negative pin n2. Otherwise, the pin p is +connected the negative pin n1. +

-The commuting switch is a four pole. The switching behaviour is controlled -by the fourth pin. If its voltage exceeds the parameter Voltage value, -the first pin p is chort cut to the second pin ng. Otherwise, the pin p -is short cut to the third pin n1. +In order to prevent singularities during switching, the opened +switch has a (very low) conductance Goff +and the closed switch has a (very low) resistance Ron. +The limiting case is also allowed, i.e., the resistance Ron of the +closed switch could be exactly zero and the conductance Goff of the +open switch could be also exactly zero. Note, there are circuits, +where a description with zero Ron or zero Goff is not possible.

"), @@ -315,6 +494,9 @@ is short cut to the third pin n1. component=[20, 20]), Icon( Ellipse(extent=[-44, 4; -36, -4]), + Text(extent=[-80, 0; -60, 22], string="p"), + Text(extent=[60, 50; 80, 72], string="n1"), + Text(extent=[60, 0; 80, 22], string="n2"), Line(points=[-90, 0; -44, 0]), Line(points=[-37, 2; 40, 50]), Line(points=[40, 50; 90, 50]), @@ -323,6 +505,9 @@ is short cut to the third pin n1. Text(extent=[-100, -70; 100, -100], string="%name")), Diagram( Ellipse(extent=[-44, 4; -36, -4]), + Text(extent=[-80, 0; -60, 22], string="p"), + Text(extent=[60, 50; 80, 72], string="n1"), + Text(extent=[60, 0; 80, 22], string="n2"), Line(points=[-90, 0; -44, 0]), Line(points=[-37, 2; 40, 50]), Line(points=[40, 50; 90, 50]), @@ -334,39 +519,135 @@ is short cut to the third pin n1. width=0.6, height=0.6)); public - Modelica.Electrical.Analog.Interfaces.Pin p "Positive pin" annotation ( - extent=[-110, -10; -90, 10]); - Modelica.Electrical.Analog.Interfaces.Pin n2 "Negative pin 2" annotation ( - extent=[90, -10; 110, 10]); - Modelica.Electrical.Analog.Interfaces.Pin n1 "Negative pin 1" annotation ( - extent=[90, 40; 110, 60]); - Modelica.Electrical.Analog.Interfaces.Pin control - "Control pin: control.v > level p--n2, otherwise p--n1" annotation ( - extent=[-10, 90; 10, 110], rotation=90); - protected - Real s1, s2 "Auxiliary variables"; + Interfaces.PositivePin p annotation (extent=[-110, -10; -90, 10]); + Interfaces.NegativePin n2 annotation (extent=[90, -10; 110, 10]); + Interfaces.NegativePin n1 annotation (extent=[90, 40; 110, 60]); + Interfaces.Pin control + "Control pin: if control.v > level p--n2 connected, otherwise p--n1 connected" + annotation (extent=[-10, 90; 10, 110], rotation=90); + protected + Real s1; + Real s2 "Auxiliary variables"; equation control.i = 0; 0 = p.i + n2.i + n1.i; - - p.v - n1.v = s1 * (if (control.v > level) then 1 else Roff); - n1.i = s1 * (if (control.v > level) then Gon else 1); - p.v - n2.v = s2 * (if (control.v > level) then Roff else 1); - n2.i = s2 * (if (control.v > level) then 1 else Gon); + + p.v - n1.v = s1*(if (control.v > level) then 1 else Ron); + n1.i = -s1*(if (control.v > level) then Goff else 1); + p.v - n2.v = s2*(if (control.v > level) then Ron else 1); + n2.i = -s2*(if (control.v > level) then 1 else Goff); end ControlledIdealCommutingSwitch; - model IdealOpAmp "Ideal opamp (norator-nullator pair)" - SIunits.Voltage v1 "Voltage drop over the left port"; - SIunits.Voltage v2 "Voltage drop over the right port"; - SIunits.Current i1 - "Current flowing from pos. to neg. pin of the left port"; - SIunits.Current i2 - "Current flowing from pos. to neg. pin of the right port"; + + model ControlledIdealIntermediateSwitch + "Controlled ideal intermediate switch" + parameter SI.Voltage level=0.5 "Switch level"; + parameter SI.Resistance Ron(final min=0) = 1.E-5 "Closed switch resistance" + ; + parameter SI.Conductance Goff(final min=0) = 1.E-5 + "Opened switch conductance"; annotation ( - Documentation(info=" - + Documentation(info=" +

+The intermediate switch has four switching contact pins p1, p2, n1, and n2. +The switching behaviour is controlled +by the control pin. If its voltage exceeds the value of the +parameter level, the pin p1 is connected to pin n2, and the pin p2 is +connected to the pin n2. Otherwise, the pin p1 is connected to n1, and +p2 is connected to n2. +

+ +\"ControlledIdealIntermediateSwitch1\" + +

+In order to prevent singularities during switching, the opened +switch has a (very low) conductance Goff +and the closed switch has a (very low) resistance Ron. +

+ +\"ControlledIdealIntermediateSwitch2\" + +

+The limiting case is also allowed, i.e., the resistance Ron of the +closed switch could be exactly zero and the conductance Goff of the +open switch could be also exactly zero. Note, there are circuits, +where a description with zero Ron or zero Goff is not possible. +

+ +"), + Coordsys( + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), + Icon( + Ellipse(extent=[-4, 30; 4, 22]), + Text(extent=[-80, 50; -60, 72], string="p1"), + Text(extent=[-80, 0; -60, 22], string="p2"), + Text(extent=[60, 50; 80, 72], string="n1"), + Text(extent=[60, 0; 80, 22], string="n2"), + Line(points=[-90, 0; -44, 0]), + Line(points=[-90, 50; -44, 50]), + Line(points=[-44, 0; 40, 50]), + Line(points=[-44, 50; 40, 0]), + Line(points=[40, 50; 90, 50]), + Line(points=[0, 90; 0, 25]), + Line(points=[40, 0; 90, 0]), + Text(extent=[-100, -70; 100, -100], string="%name")), + Diagram( + Ellipse(extent=[-4, 30; 4, 22]), + Text(extent=[-80, 50; -60, 72], string="p1"), + Text(extent=[-80, 0; -60, 22], string="p2"), + Text(extent=[60, 50; 80, 72], string="n1"), + Text(extent=[60, 0; 80, 22], string="n2"), + Line(points=[-90, 0; -44, 0]), + Line(points=[-90, 50; -44, 50]), + Line(points=[-44, 0; 40, 50]), + Line(points=[-44, 50; 40, 0]), + Line(points=[40, 50; 90, 50]), + Line(points=[0, 90; 0, 25]), + Line(points=[40, 0; 90, 0])), + Window( + x=0.21, + y=0.05, + width=0.6, + height=0.6)); + + public + Interfaces.PositivePin p1 annotation (extent=[-110, 40; -90, 60]); + Interfaces.PositivePin p2 annotation (extent=[-110, -10; -90, 10]); + Interfaces.NegativePin n1 annotation (extent=[90, 40; 110, 60]); + Interfaces.NegativePin n2 annotation (extent=[90, -10; 110, 10]); + Interfaces.Pin control "Control pin: if control.v > level p1--n2, p2--n1 connected, + otherwise p1--n1, p2--n2 connected" annotation (extent=[-10, 90; 10, + 110], rotation=90); + protected + Real s1; + Real s2; + Real s3; + Real s4 "Auxiliary variables"; + equation + control.i = 0; + + p1.v - n1.v = s1*(if (control.v > level) then 1 else Ron); + p2.v - n2.v = s2*(if (control.v > level) then 1 else Ron); + p1.v - n2.v = s3*(if (control.v > level) then Ron else 1); + p2.v - n1.v = s4*(if (control.v > level) then Ron else 1); + + p1.i = if (control.v > level) then s1*Goff + s3 else s1 + s3*Goff; + p2.i = if (control.v > level) then s2*Goff + s4 else s2 + s4*Goff; + n1.i = if (control.v > level) then -s1*Goff - s4 else -s1 - s4*Goff; + n2.i = if (control.v > level) then -s2*Goff - s3 else -s2 - s3*Goff; + end ControlledIdealIntermediateSwitch; + + model IdealOpAmp "Ideal operational amplifier (norator-nullator pair)" + SI.Voltage v1 "Voltage drop over the left port"; + SI.Voltage v2 "Voltage drop over the right port"; + SI.Current i1 "Current flowing from pos. to neg. pin of the left port"; + SI.Current i2 "Current flowing from pos. to neg. pin of the right port"; + annotation ( + Documentation(info="

The ideal OpAmp is a two-port. The left port is fixed to v1=0 and i1=0 -(nullator). At the right port both any voltage v2 and any current i2 +(nullator). At the right port both any voltage v2 and any current i2 are possible (norator).

@@ -377,8 +658,7 @@ are possible (norator). component=[20, 20]), Icon( Text(extent=[-100, 80; 100, 100], string="%name"), - Polygon(points=[60, 0; -60, 70; -60, -70; 60, 0], style(fillColor=7)) - , + Polygon(points=[60, 0; -60, 70; -60, -70; 60, 0], style(fillColor=7)), Line(points=[-90, 50; -60, 50]), Line(points=[-90, -50; -60, -50]), Line(points=[60, 0; 90, 0]), @@ -387,8 +667,7 @@ are possible (norator). Line(points=[-39, -20; -39, -41]), Line(points=[-50, -31; -28, -31])), Diagram( - Polygon(points=[60, 0; -60, 70; -60, -70; 60, 0], style(fillColor=7)) - , + Polygon(points=[60, 0; -60, 70; -60, -70; 60, 0], style(fillColor=7)), Line(points=[-90, 50; -60, 50]), Line(points=[-90, -50; -60, -50]), Line(points=[60, 0; 90, 0]), @@ -437,16 +716,14 @@ are possible (norator). y=0.19, width=0.71, height=0.59)); - Modelica.Electrical.Analog.Interfaces.PositivePin p1 - "Positive pin of the left port" annotation (extent=[-110, -60; -90, -40]) - ; - Modelica.Electrical.Analog.Interfaces.NegativePin n1 - "Negative pin of the left port" annotation (extent=[-110, 40; -90, 60]); - Modelica.Electrical.Analog.Interfaces.PositivePin p2 - "Positive pin of the right port" annotation (extent=[90, -10; 110, 10]); - Modelica.Electrical.Analog.Interfaces.NegativePin n2 - "Negative pin of the right port" annotation (extent=[-10, -90; 10, -110] - , rotation=-90); + Interfaces.PositivePin p1 "Positive pin of the left port" annotation ( + extent=[-110, -60; -90, -40]); + Interfaces.NegativePin n1 "Negative pin of the left port" annotation ( + extent=[-110, 40; -90, 60]); + Interfaces.PositivePin p2 "Positive pin of the right port" annotation ( + extent=[90, -10; 110, 10]); + Interfaces.NegativePin n2 "Negative pin of the right port" annotation ( + extent=[-10, -90; 10, -110], rotation=-90); equation v1 = p1.v - n1.v; v2 = p2.v - n2.v; @@ -457,33 +734,200 @@ are possible (norator). v1 = 0; i1 = 0; end IdealOpAmp; + + model IdealOpAmp3Pin + "Ideal operational amplifier (norator-nullator pair), but 3 pins" + annotation ( + Documentation(info=" +

+The ideal OpAmp with three pins is of exactly the same behaviour as the ideal +OpAmp with four pins. Only the negative output pin is left out. +Both the input voltage and current are fixed to zero (nullator). +At the output pin both any voltage v2 and any current i2 +are possible. +

+ +"), + Coordsys( + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), + Icon( + Text(extent=[-100, 80; 100, 100], string="%name"), + Polygon(points=[60, 0; -60, 70; -60, -70; 60, 0], style(fillColor=7)), + Line(points=[-90, 50; -60, 50]), + Line(points=[-90, -50; -60, -50]), + Line(points=[60, 0; 90, 0]), + Line(points=[-48, 32; -28, 32]), + Line(points=[-39, -20; -39, -41]), + Line(points=[-50, -31; -28, -31])), + Diagram( + Polygon(points=[60, 0; -60, 70; -60, -70; 60, 0], style(fillColor=7)), + Line(points=[-90, 50; -60, 50]), + Line(points=[-90, -50; -60, -50]), + Line(points=[60, 0; 90, 0]), + Line(points=[-55, 50; -45, 50]), + Line(points=[-50, -45; -50, -55]), + Line(points=[-55, -50; -45, -50]), + Text( + extent=[-111, -39; -90, -19], + string="p1.i=0", + style(color=9, fillColor=9)), + Polygon(points=[120, 3; 110, 0; 120, -3; 120, 3], style( + color=9, + gradient=2, + fillColor=9, + fillPattern=1)), + Line(points=[111, 0; 136, 0], style( + color=9, + gradient=2, + fillColor=9)), + Text( + extent=[118, 2; 135, 17], + string="i2", + style( + color=9, + gradient=2, + fillColor=9)), + Text( + extent=[-111, 60; -90, 80], + string="n1.i=0", + style(color=9, fillColor=9))), + Window( + x=0.28, + y=0.19, + width=0.71, + height=0.59)); + Interfaces.PositivePin in_p "Positive pin of the input port" annotation ( + extent=[-110, -60; -90, -40]); + Interfaces.NegativePin in_n "Negative pin of the input port" annotation ( + extent=[-110, 40; -90, 60]); + Interfaces.PositivePin out "Output pin" annotation (extent=[90, -10; 110, + 10]); + equation + in_p.v = in_n.v; + in_p.i = 0; + in_n.i = 0; + end IdealOpAmp3Pin; + + model IdealOpAmpLimited "Ideal operational amplifier with limitation" + annotation ( + Documentation(info=" +

+The ideal OpAmp with limitation behaves like an ideal OpAmp without limitation, +if the output voltage is within the limits (VMin < out.v < VMax). In this case +the input voltage vin=in_p.v - in_n.v is zero. +If the input voltage is vin < 0, the output voltage is out.v = VMin. +If the input voltage is vin > 0, the output voltage is out.v = VMax. +

+ +"), + Coordsys( + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), + Icon( + Text(extent=[-110, 80; 100, 90], string="%name"), + Polygon(points=[60, 0; -60, 70; -60, -70; 60, 0], style(fillColor=7)), + Line(points=[-45, -10; -10, -10; -10, 10; 20, 10]), + Line(points=[0, 35; 0, 80]), + Line(points=[0, -35; 0, -80]), + Line(points=[-90, 50; -60, 50]), + Line(points=[-90, -50; -60, -50]), + Line(points=[60, 0; 90, 0]), + Line(points=[-48, 32; -28, 32]), + Line(points=[-39, -20; -39, -41]), + Line(points=[-50, -31; -28, -31])), + Diagram( + Polygon(points=[60, 0; -60, 70; -60, -70; 60, 0], style(fillColor=7)), + Line(points=[-45, -10; -10, -10; -10, 10; 20, 10]), + Line(points=[0, 35; 0, 80]), + Line(points=[0, -35; 0, -80]), + Line(points=[-90, 50; -60, 50]), + Line(points=[-90, -50; -60, -50]), + Line(points=[60, 0; 90, 0]), + Line(points=[-55, 50; -45, 50]), + Line(points=[-50, -45; -50, -55]), + Line(points=[-55, -50; -45, -50]), + Text( + extent=[-111, -39; -90, -19], + string="p1.i=0", + style(color=9, fillColor=9)), + Polygon(points=[120, 3; 110, 0; 120, -3; 120, 3], style( + color=9, + gradient=2, + fillColor=9, + fillPattern=1)), + Line(points=[111, 0; 136, 0], style( + color=9, + gradient=2, + fillColor=9)), + Text( + extent=[118, 2; 135, 17], + string="i2", + style( + color=9, + gradient=2, + fillColor=9)), + Text( + extent=[-111, 60; -90, 80], + string="n1.i=0", + style(color=9, fillColor=9))), + Window( + x=0.28, + y=0.19, + width=0.71, + height=0.59)); + Interfaces.PositivePin in_p "Positive pin of the input port" annotation ( + extent=[-110, -60; -90, -40]); + Interfaces.NegativePin in_n "Negative pin of the input port" annotation ( + extent=[-110, 40; -90, 60]); + Interfaces.PositivePin out "Output pin" annotation (extent=[90, -10; 110, + 10]); + Interfaces.PositivePin VMax "Positive output voltage limitation" + annotation (extent=[-10, 60; 10, 80]); + Interfaces.NegativePin VMin "Negative output voltage limitation" + annotation (extent=[-10, -80; 10, -60]); + SI.Voltage vin "input voltage"; + protected + Real s "Auxiliary variable"; + equation + in_p.i = 0; + in_n.i = 0; + VMax.i = 0; + VMin.i = 0; + vin = in_p.v - in_n.v; + in_p.v - in_n.v = if (s < -1) then s + 1 else if (s > 1) then s - 1 else 0; + out.v = if (s < -1) then VMin.v else if (s > 1) then VMax.v else (VMax.v - + VMin.v)*s/2 + (VMax.v + VMin.v)/2; + end IdealOpAmpLimited; + model IdealDiode "Ideal electrical diode" - extends Modelica.Electrical.Analog.Interfaces.OnePort; - parameter SIunits.Resistance Roff(final min=0) = 1.E-5 - "Closed diode resistance"; - parameter SIunits.Conductance Gon(final min=0) = 1.E-5 + extends Interfaces.OnePort; + parameter SI.Resistance Roff(final min=0) = 1.E-5 "Closed diode resistance" + ; + parameter SI.Conductance Gon(final min=0) = 1.E-5 "Opened diode conductance"; Boolean off(start=true) "Switching state of diode"; protected Real s "Auxiliary variable"; annotation ( - Documentation(info=" - + Documentation(info="

Ideal electrical diode. This is an ideal switch which is open, when it is reversed biased (voltage drop < 0) and which is closed, when it is conducting (current > 0). In order to prevent singularities during switching, the opened -diode has a high resistance and the closed diode has a low -resistance. +diode has a high resistance and the closed diode has a low +resistance.

-If the actual circuit has an appropriate structure, the +If the actual circuit has an appropriate structure, the limiting case is also allowed, i.e., the resistance of the closed diode could be exactly zero and the conductance of the open diode could be also exactly zero (i.e. the resistance is infinity). Note, there are circuits, where a description -with zero/infinity resistances is not possible. +with zero/infinity resistances is not possible.

"), @@ -519,16 +963,16 @@ with zero/infinity resistances is not possible. v = s*(if off then 1 else Roff); i = s*(if off then Gon else 1); end IdealDiode; + model IdealTransformer "Ideal electrical transformer" - extends Modelica.Electrical.Analog.Interfaces.TwoPort; + extends Interfaces.TwoPort; parameter Real n=1 "Turns ratio"; annotation ( Coordsys( extent=[-100, -100; 100, 100], grid=[2, 2], component=[20, 20]), - Documentation(info=" - + Documentation(info="

The ideal transformer is an ideal two-port resistive circuit element which is characterized by the following two equations: @@ -584,12 +1028,12 @@ where n is a real number called the turns ratio. v1 = n*v2; i2 = -n*i1; end IdealTransformer; + model IdealGyrator "Ideal gyrator" - extends Modelica.Electrical.Analog.Interfaces.TwoPort; + extends Interfaces.TwoPort; annotation ( - Documentation(info=" - -

+ Documentation(info=" +

A gyrator is an ideal two-port element defined by the following equations:

@@ -637,16 +1081,16 @@ where the constant G is called the gyration conductance.
         Ellipse(extent=[10, -30; 70, 30]), 
         Rectangle(extent=[80, -40; 40, 40], style(color=7, fillColor=7)), 
         Line(points=[90, 50; 40, 50; 40, -50; 90, -50])));
-    parameter SIunits.Conductance G=1 "Gyration conductance";
+    parameter SI.Conductance G=1 "Gyration conductance";
   equation 
     i1 = G*v2;
     i2 = -G*v1;
   end IdealGyrator;
+  
   model Idle "Idle branch" 
-    extends Modelica.Electrical.Analog.Interfaces.OnePort;
+    extends Interfaces.OnePort;
     annotation (
-      Documentation(info="
-
+      Documentation(info="
 

The model Idle is a simple idle running branch.

@@ -657,7 +1101,7 @@ The model Idle is a simple idle running branch. grid=[1, 1], component=[20, 20]), Icon( - Rectangle(extent=[-60, 60; 60, -60]), + Rectangle(extent=[-60, 60; 60, -60], style(fillColor=7)), Line(points=[-90, 0; -41, 0]), Line(points=[91, 0; 40, 0]), Text(extent=[-100, 100; 100, 70], string="%name")), @@ -675,11 +1119,11 @@ The model Idle is a simple idle running branch. i = 0; end Idle; + model Short "Short cut branch" - extends Modelica.Electrical.Analog.Interfaces.OnePort; + extends Interfaces.OnePort; annotation ( - Documentation(info=" - + Documentation(info="

The model Short is a simple short cut branch.

@@ -690,7 +1134,7 @@ The model Short is a simple short cut branch. grid=[1, 1], component=[20, 20]), Icon( - Rectangle(extent=[-60, 60; 60, -60]), + Rectangle(extent=[-60, 60; 60, -60], style(fillColor=7)), Line(points=[91, 0; -90, 0]), Text(extent=[-100, 100; 100, 70], string="%name")), Diagram( @@ -705,4 +1149,267 @@ The model Short is a simple short cut branch. equation v = 0; end Short; + + model IdealOpener "Ideal electrical opener" + extends Interfaces.OnePort; + parameter SI.Resistance Ron(final min=0) = 1.E-5 "Closed switch resistance" + annotation (extent=[-56.6667, 10; -10, 56.6667]); + parameter SI.Conductance Goff(final min=0) = 1.E-5 + "Opened switch conductance" annotation (extent=[10, 10; 56.6667, 56.6667] + ); + Modelica.Blocks.Interfaces.BooleanInPort control(final n=1) + "true => switch open, false => p--n connected" annotation (extent=[-10, + 50; 10, 70], rotation=-90); + protected + Real s "Auxiliary variable"; + Boolean off; + + annotation ( + Documentation(info=" +

+The ideal opener has a positive pin p and a negative pin n. +The switching behaviour is controlled by the control signal. +If the control signal is true, pin p is not connected +with negative pin n. Otherwise, pin p is connected +with negative pin n. +

+

+In order to prevent singularities during switching, the opened +switch has a (very low) conductance Goff +and the closed switch has a (very low) resistance Ron. +The limiting case is also allowed, i.e., the resistance Ron of the +closed switch could be exactly zero and the conductance Goff of the +open switch could be also exactly zero. Note, there are circuits, +where a description with zero Ron or zero Goff is not possible. +

+ +"), + Coordsys( + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), + Window( + x=0.45, + y=0.01, + width=0.44, + height=0.65), + Icon( + Ellipse(extent=[-44, 4; -36, -4]), + Line(points=[-90, 0; -44, 0]), + Line(points=[-37, 2; 40, 50]), + Line(points=[40, 0; 90, 0]), + Text(extent=[-100, -70; 100, -100], string="%name"), + Line(points=[0, 51; 0, 26]), + Line(points=[40, 20; 40, 0])), + Diagram( + Ellipse(extent=[-44, 4; -36, -4]), + Line(points=[-90, 0; -44, 0]), + Line(points=[-37, 2; 40, 50]), + Line(points=[40, 0; 90, 0]), + Text(extent=[-100, -40; 100, -79], string="%name"), + Line(points=[0, 51; 0, 26]), + Line(points=[40, 20; 40, 0]))); + equation + off = control.signal[1]; + v = s*(if off then 1 else Ron); + i = s*(if off then Goff else 1); + end IdealOpener; + + model IdealCloser "Ideal electrical closer" + extends Interfaces.OnePort; + parameter SI.Resistance Ron(final min=0) = 1.E-5 "Closed switch resistance" + annotation (extent=[-56.6667, 10; -10, 56.6667]); + parameter SI.Conductance Goff(final min=0) = 1.E-5 + "Opened switch conductance" annotation (extent=[10, 10; 56.6667, 56.6667] + ); + Modelica.Blocks.Interfaces.BooleanInPort control(final n=1) + "true => switch open, false => p--n connected" annotation (extent=[-10, + 50; 10, 70], rotation=-90); + protected + Real s "Auxiliary variable"; + Boolean on; + + annotation ( + Documentation(info=" +

+The ideal opener has a positive pin p and a negative pin n. +The switching behaviour is controlled by the control signal. +If the control signal is true, pin p is not connected +with negative pin n. Otherwise, pin p is connected +with negative pin n. +

+

+In order to prevent singularities during switching, the opened +switch has a (very low) conductance Goff +and the closed switch has a (very low) resistance Ron. +The limiting case is also allowed, i.e., the resistance Ron of the +closed switch could be exactly zero and the conductance Goff of the +open switch could be also exactly zero. Note, there are circuits, +where a description with zero Ron or zero Goff is not possible. +

+ +"), + Coordsys( + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), + Window( + x=0.24, + y=0.01, + width=0.65, + height=0.77), + Icon( + Ellipse(extent=[-44, 4; -36, -4]), + Line(points=[-90, 0; -44, 0]), + Line(points=[-37, 2; 40, 50]), + Line(points=[40, 0; 90, 0]), + Text(extent=[-100, -70; 100, -100], string="%name"), + Line(points=[0, 51; 0, 26])), + Diagram( + Ellipse(extent=[-44, 4; -36, -4]), + Line(points=[-90, 0; -44, 0]), + Line(points=[-37, 2; 40, 50]), + Line(points=[40, 0; 90, 0]), + Text(extent=[-100, -40; 100, -79], string="%name"), + Line(points=[0, 51; 0, 26]))); + equation + on = control.signal[1]; + v = s*(if not on then 1 else Ron); + i = s*(if not on then Goff else 1); + end IdealCloser; + + model ControlledIdealOpener "Controlled ideal electrical opener" + parameter SI.Voltage level=0.5 "Switch level" annotation (extent=[-56.6667 + , 10; -10, 56.6667]); + parameter SI.Resistance Ron(final min=0) = 1.E-5 "Closed switch resistance" + annotation (extent=[10, 10; 56.6667, 56.6667]); + parameter SI.Conductance Goff(final min=0) = 1.E-5 + "Opened switch conductance" annotation (extent=[-56.6667, -56.6667; -10, + -10]); + protected + Real s "Auxiliary variable"; + annotation ( + Documentation(info=" + +

+The ideal switch has a positive pin p and a negative pin n. +The switching behaviour is controlled by the control pin. +If its voltage exceeds the voltage of the parameter level, +pin p is not connected with negative pin n. +Otherwise, pin p is connected with negative pin n. +

+

+In order to prevent singularities during switching, the opened +switch has a (very low) conductance Goff +and the closed switch has a (very low) resistance Ron. +The limiting case is also allowed, i.e., the resistance Ron of the +closed switch could be exactly zero and the conductance Goff of the +open switch could be also exactly zero. Note, there are circuits, +where a description with zero Ron or zero Goff is not possible. +

+ +"), + Coordsys( + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), + Window( + x=0.45, + y=0.01, + width=0.44, + height=0.65), + Icon( + Ellipse(extent=[-44, 4; -36, -4]), + Line(points=[-90, 0; -44, 0]), + Line(points=[-37, 2; 40, 50]), + Line(points=[40, 0; 90, 0]), + Line(points=[0, 90; 0, 25]), + Text(extent=[-100, -70; 100, -100], string="%name"), + Line(points=[40, 20; 40, 0])), + Diagram( + Ellipse(extent=[-44, 4; -36, -4]), + Line(points=[-90, 0; -44, 0]), + Line(points=[-37, 2; 40, 50]), + Line(points=[40, 0; 90, 0]), + Line(points=[0, 90; 0, 25]), + Line(points=[40, 20; 40, 0]))); + public + Interfaces.PositivePin p annotation (extent=[-110, -10; -90, 10]); + Interfaces.NegativePin n annotation (extent=[90, -10; 110, 10]); + Interfaces.Pin control + "Control pin: control.v > level switch open, otherwise p--n connected" + annotation (extent=[-10, 90; 10, 110], rotation=90); + equation + control.i = 0; + 0 = p.i + n.i; + p.v - n.v = s*(if (control.v > level) then 1 else Ron); + p.i = s*(if (control.v > level) then Goff else 1); + end ControlledIdealOpener; + + model ControlledIdealCloser "Controlled ideal electrical closer" + parameter SI.Voltage level=0.5 "Switch level" annotation (extent=[-56.6667 + , 10; -10, 56.6667]); + parameter SI.Resistance Ron(final min=0) = 1.E-5 "Closed switch resistance" + annotation (extent=[10, 10; 56.6667, 56.6667]); + parameter SI.Conductance Goff(final min=0) = 1.E-5 + "Opened switch conductance" annotation (extent=[-56.6667, -56.6667; -10, + -10]); + protected + Real s "Auxiliary variable"; + annotation ( + Documentation(info=" + +

+The ideal switch has a positive pin p and a negative pin n. +The switching behaviour is controlled by the control pin. +If its voltage exceeds the voltage of the parameter level, +pin p is not connected with negative pin n. +Otherwise, pin p is connected with negative pin n. +

+

+In order to prevent singularities during switching, the opened +switch has a (very low) conductance Goff +and the closed switch has a (very low) resistance Ron. +The limiting case is also allowed, i.e., the resistance Ron of the +closed switch could be exactly zero and the conductance Goff of the +open switch could be also exactly zero. Note, there are circuits, +where a description with zero Ron or zero Goff is not possible. +

+ +"), + Coordsys( + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), + Window( + x=0.45, + y=0.01, + width=0.44, + height=0.65), + Icon( + Ellipse(extent=[-44, 4; -36, -4]), + Line(points=[-90, 0; -44, 0]), + Line(points=[-37, 2; 40, 50]), + Line(points=[40, 0; 90, 0]), + Line(points=[0, 90; 0, 25]), + Text(extent=[-100, -70; 100, -100], string="%name")), + Diagram( + Ellipse(extent=[-44, 4; -36, -4]), + Line(points=[-90, 0; -44, 0]), + Line(points=[-37, 2; 40, 50]), + Line(points=[40, 0; 90, 0]), + Line(points=[0, 90; 0, 25]))); + public + Interfaces.PositivePin p annotation (extent=[-110, -10; -90, 10]); + Interfaces.NegativePin n annotation (extent=[90, -10; 110, 10]); + Interfaces.Pin control + "Control pin: control.v > level switch open, otherwise p--n connected" + annotation (extent=[-10, 90; 10, 110], rotation=90); + equation + control.i = 0; + 0 = p.i + n.i; + p.v - n.v = s*(if (control.v > level) then Ron else 1); + p.i = s*(if (control.v > level) then 1 else Goff); + end ControlledIdealCloser; + end Ideal; diff --git a/Electrical/Analog/Interfaces.mo b/Electrical/Analog/Interfaces.mo index d311cfda73..41bdda4087 100644 --- a/Electrical/Analog/Interfaces.mo +++ b/Electrical/Analog/Interfaces.mo @@ -1,21 +1,13 @@ -package Interfaces - extends Modelica.Icons.Library; - package SIunits = Modelica.SIunits; +package Interfaces - annotation ( - Coordsys( - extent=[0, 0; 210, 333], - grid=[1, 1], - component=[20, 20]), - Window( + extends Modelica.Icons.Library; + annotation (Window( x=0.03, y=0.04, width=0.21, height=0.49, library=1, - autolayout=1), - Documentation(info=" - + autolayout=1),Documentation(info="

This package contains connectors and interfaces (partial models) for analog electrical components. @@ -25,9 +17,9 @@ analog electrical components.

Main Authors:
-Christoph Clauß +Christoph Clauß <clauss@eas.iis.fhg.de>
- André Schneider + André Schneider <schneider@eas.iis.fhg.de>
Fraunhofer Institute for Integrated Circuits
Design Automation Department
@@ -43,155 +35,123 @@ $Id$
Copyright:
-Copyright (C) 1998-1999, Modelica Design Group and Fraunhofer-Gesellschaft.
+Copyright © 1998-2002, Modelica Association and Fraunhofer-Gesellschaft.
The Modelica package is free software; it can be redistributed and/or modified under the terms of the Modelica license, see the license conditions -and the accompanying disclaimer in the documentation of package +and the accompanying disclaimer in the documentation of package Modelica in file \"Modelica/package.mo\".

")); - connector Pin "Pin of an electrical component" - SIunits.Voltage v "Potential at the pin"; - flow SIunits.Current i "Current flowing into the pin"; + + connector Pin "Pin of an electrical component" + SI.Voltage v "Potential at the pin"; + flow SI.Current i "Current flowing into the pin"; annotation ( - Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), - Documentation(info=" -"), - Icon(Rectangle(extent=[-100, 100; 100, -100], style(color=3, fillColor=3 - ))), - Diagram(Rectangle(extent=[-100, 100; 100, -100], style(color=3, - fillColor=3)), Text( - extent=[-100, -120; 100, -220], - string="%name", - style(color=3))), - Terminal(Rectangle(extent=[-100, 100; 100, -100], style(color=3, - fillColor=3))), - Window( - x=0.21, - y=0.11, - width=0.6, - height=0.63)); + Icon(Rectangle(extent=[-100, 100; 100, -100], style(color=3, fillColor=3) + )), + Diagram(Rectangle(extent=[-100, 100; 100, -100], style(color=3, fillColor + =3)), Text( + extent=[-100, -120; 100, -220], + string="%name", + style(color=3))), + Terminal(Rectangle(extent=[-100, 100; 100, -100], style(color=3, + fillColor=3)))); end Pin; - connector PositivePin "Positive pin of an electric component" - SIunits.Voltage v "Potential at the pin"; - flow SIunits.Current i "Current flowing into the pin"; + + connector PositivePin "Positive pin of an electric component" + SI.Voltage v "Potential at the pin"; + flow SI.Current i "Current flowing into the pin"; annotation ( - Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), - Documentation(info="Connectors PositivePin and NegativePin are nearly identical. + Documentation(info="

Connectors PositivePin +and NegativePin are nearly identical. The only difference is that the icons are different in order to identify more easily the pins of a component. Usually, connector PositivePin is used for the positive and connector NegativePin for the negative pin of an electrical -component. - -"), - Icon(Rectangle(extent=[-100, 100; 100, -100], style(color=3, fillColor=3 - ))), - Diagram(Rectangle(extent=[-100, 100; 100, -100], style(color=3, - fillColor=3)), Text( - extent=[-100, -120; 100, -220], - string="%name", - style(color=3))), - Terminal(Rectangle(extent=[-100, 100; 100, -100], style(color=3, - fillColor=3))), - Window( - x=0.21, - y=0.08, - width=0.6, - height=0.6)); +component.

"), + Icon(Rectangle(extent=[-100, 100; 100, -100], style(color=3, fillColor=3) + )), + Diagram(Rectangle(extent=[-100, 100; 100, -100], style(color=3, fillColor + =3)), Text( + extent=[-100, -120; 100, -220], + string="%name", + style(color=3))), + Terminal(Rectangle(extent=[-100, 100; 100, -100], style(color=3, + fillColor=3)))); end PositivePin; - connector NegativePin "Negative pin of an electric component" - SIunits.Voltage v "Potential at the pin"; - flow SIunits.Current i "Current flowing into the pin"; + + connector NegativePin "Negative pin of an electric component" + SI.Voltage v "Potential at the pin"; + flow SI.Current i "Current flowing into the pin"; annotation ( - Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), - Documentation(info="Connectors PositivePin and NegativePin are nearly identical. + Documentation(info="

Connectors PositivePin +and NegativePin are nearly identical. The only difference is that the icons are different in order to identify more easily the pins of a component. Usually, connector PositivePin is used for the positive and connector NegativePin for the negative pin of an electrical -component. - - -"), +component.

"), Icon(Rectangle(extent=[-100, 100; 100, -100], style( - color=3, - gradient=0, - fillColor=7, - fillPattern=1))), + color=3, + gradient=0, + fillColor=7, + fillPattern=1))), Diagram(Rectangle(extent=[-100, 100; 100, -100], style( - color=3, - fillColor=7, + color=3, + fillColor=7, fillPattern=1)), Text(extent=[-100, -120; 100, -220], string= - "%name")), - Terminal(Rectangle(extent=[-100, 100; 100, -100], style(color=3))), - Window( - x=0.33, - y=0.01, - width=0.56, - height=0.67)); + "%name")), + Terminal(Rectangle(extent=[-100, 100; 100, -100], style(color=3)))); end NegativePin; - partial model TwoPin "Component with one electrical port" - SIunits.Voltage v - "Voltage drop between the two pins (= p.v - n.v)"; - Modelica.Electrical.Analog.Interfaces.PositivePin p "Positive pin" - annotation (extent=[-110, -10; -90, 10]); - Modelica.Electrical.Analog.Interfaces.NegativePin n "Negative pin" - annotation (extent=[90, -10; 110, 10]); + partial model TwoPin "Component with one electrical port" + SI.Voltage v "Voltage drop between the two pins (= p.v - n.v)"; + PositivePin p "Positive pin" annotation (extent=[-110, -10; -90, 10]); + NegativePin n "Negative pin" annotation (extent=[90, -10; 110, 10]); annotation ( Diagram( Polygon(points=[-120, 3; -110, 0; -120, -3; -120, 3], style( - color=9, - fillColor=9, - fillPattern=1)), - Line(points=[-136, 0; -111, 0], style(color=9, fillColor=9)), + color=9, + fillColor=9, + fillPattern=1)), + Line(points=[-136, 0; -111, 0], style(color=9, fillColor=9)), Text( - extent=[-134, 5; -117, 20], - string="p.i", - style(color=9, fillColor=9)), - Line(points=[110, 0; 135, 0], style(color=9, fillColor=9)), + extent=[-134, 5; -117, 20], + string="p.i", + style(color=9, fillColor=9)), + Line(points=[110, 0; 135, 0], style(color=9, fillColor=9)), Polygon(points=[120, 3; 110, 0; 120, -3; 120, 3], style( - color=9, - fillColor=9, - fillPattern=1)), + color=9, + fillColor=9, + fillPattern=1)), Text( - extent=[117, 3; 134, 18], - string="n.i", - style(color=9, fillColor=9))), + extent=[117, 3; 134, 18], + string="n.i", + style(color=9, fillColor=9))), Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Window( - x=0.11, - y=0.14, - width=0.55, + x=0.11, + y=0.14, + width=0.55, height=0.64)); - equation + equation v = p.v - n.v; end TwoPin; - partial model OnePort - "Component with two electrical pins p and n and current i from p to n" - SIunits.Voltage v - "Voltage drop between the two pins (= p.v - n.v)"; - SIunits.Current i "Current flowing from pin p to pin n"; + + partial model OnePort + "Component with two electrical pins p and n and current i from p to n" + SI.Voltage v "Voltage drop between the two pins (= p.v - n.v)"; + SI.Current i "Current flowing from pin p to pin n"; annotation ( Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[2, 2], + component=[20, 20]), Documentation(info="

Superclass of elements which have two electrical pins: @@ -201,115 +161,111 @@ into pin p is identical to the current flowing out of pin n. This current is provided explicitly as current i.

-"), +"), Diagram( - Line(points=[-110, 20; -85, 20], style(color=9, fillColor=9)), + 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)), - Line(points=[-125, 0; -115, 0], style(color=9)), - Line(points=[-120, -5; -120, 5], style(color=9)), + color=9, + fillColor=9, + fillPattern=1)), + Line(points=[90, 20; 115, 20], style(color=9, fillColor=9)), + Line(points=[-125, 0; -115, 0], style(color=9)), + Line(points=[-120, -5; -120, 5], style(color=9)), Text( - extent=[-110, 25; -90, 45], - string="i", - style(color=9)), + extent=[-110, 25; -90, 45], + string="i", + style(color=9)), Polygon(points=[105, 23; 115, 20; 105, 17; 105, 23], style( - color=9, - fillColor=9, - fillPattern=1)), - Line(points=[115, 0; 125, 0], style(color=9)), + color=9, + fillColor=9, + fillPattern=1)), + Line(points=[115, 0; 125, 0], style(color=9)), Text( - extent=[90, 45; 110, 25], - string="i", - style(color=9))), + extent=[90, 45; 110, 25], + string="i", + style(color=9))), Window( - x=0.33, - y=0.04, - width=0.63, + x=0.33, + y=0.04, + width=0.63, height=0.67)); - Modelica.Electrical.Analog.Interfaces.PositivePin p annotation (extent=[ - -110, -10; -90, 10]); - Modelica.Electrical.Analog.Interfaces.NegativePin n annotation (extent=[ - 110, -10; 90, 10]); - equation + PositivePin p annotation (extent=[-110, -10; -90, 10]); + NegativePin n annotation (extent=[110, -10; 90, 10]); + equation v = p.v - n.v; 0 = p.i + n.i; i = p.i; end OnePort; - partial model TwoPort - "Component with two electrical ports, including current" - SIunits.Voltage v1 "Voltage drop over the left port"; - SIunits.Voltage v2 "Voltage drop over the right port"; - SIunits.Current i1 - "Current flowing from pos. to neg. pin of the left port"; - SIunits.Current i2 - "Current flowing from pos. to neg. pin of the right port"; - Modelica.Electrical.Analog.Interfaces.PositivePin p1 - "Positive pin of the left port" annotation (extent=[-110, 40; -90, 60]); - Modelica.Electrical.Analog.Interfaces.NegativePin n1 - "Negative pin of the left port" annotation (extent=[-110, -60; -90, -40]) - ; - Modelica.Electrical.Analog.Interfaces.PositivePin p2 - "Positive pin of the right port" annotation (extent=[90, 40; 110, 60]); - Modelica.Electrical.Analog.Interfaces.NegativePin n2 - "Negative pin of the right port" annotation (extent=[90, -60; 110, -40]); + + partial model TwoPort + "Component with two electrical ports, including current" + SI.Voltage v1 "Voltage drop over the left port"; + SI.Voltage v2 "Voltage drop over the right port"; + SI.Current i1 "Current flowing from pos. to neg. pin of the left port"; + SI.Current i2 "Current flowing from pos. to neg. pin of the right port"; + PositivePin p1 "Positive pin of the left port" annotation (extent=[-110, 40 + ; -90, 60]); + NegativePin n1 "Negative pin of the left port" annotation (extent=[-110, - + 60; -90, -40]); + PositivePin p2 "Positive pin of the right port" annotation (extent=[90, 40 + ; 110, 60]); + NegativePin n2 "Negative pin of the right port" annotation (extent=[90, -60 + ; 110, -40]); annotation ( Diagram( Polygon(points=[-120, 53; -110, 50; -120, 47; -120, 53], style( - color=9, - fillColor=9, - fillPattern=1)), - Line(points=[-136, 50; -111, 50], style(color=9, fillColor=9)), + color=9, + fillColor=9, + fillPattern=1)), + Line(points=[-136, 50; -111, 50], style(color=9, fillColor=9)), Polygon(points=[127, -47; 137, -50; 127, -53; 127, -47], style( - color=9, - fillColor=9, - fillPattern=1)), - Line(points=[111, -50; 136, -50], style(color=9, fillColor=9)), + color=9, + fillColor=9, + fillPattern=1)), + Line(points=[111, -50; 136, -50], style(color=9, fillColor=9)), Text( - extent=[112, -44; 128, -29], - string="i2", - style(color=9, fillColor=9)), + extent=[112, -44; 128, -29], + string="i2", + style(color=9, fillColor=9)), Text( - extent=[118, 52; 135, 67], - string="i2", + extent=[118, 52; 135, 67], + string="i2", style( - color=9, - gradient=2, - fillColor=9)), + color=9, + gradient=2, + fillColor=9)), Polygon(points=[120, 53; 110, 50; 120, 47; 120, 53], style( - color=9, - gradient=2, - fillColor=9, - fillPattern=1)), + color=9, + gradient=2, + fillColor=9, + fillPattern=1)), Line(points=[111, 50; 136, 50], style( - color=9, - gradient=2, - fillColor=9)), - Line(points=[-136, -49; -111, -49], style(color=9, fillColor=9)), + color=9, + gradient=2, + fillColor=9)), + Line(points=[-136, -49; -111, -49], style(color=9, fillColor=9)), Polygon(points=[-126, -46; -136, -49; -126, -52; -126, -46], style( - color=9, - fillColor=9, - fillPattern=1)), + color=9, + fillColor=9, + fillPattern=1)), Text( - extent=[-127, -46; -110, -31], - string="i1", - style(color=9, fillColor=9)), + extent=[-127, -46; -110, -31], + string="i1", + style(color=9, fillColor=9)), Text( - extent=[-136, 53; -119, 68], - string="i1", - style(color=9, fillColor=9))), + extent=[-136, 53; -119, 68], + string="i1", + style(color=9, fillColor=9))), Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Window( - x=0.16, - y=0.12, - width=0.6, + x=0.16, + y=0.12, + width=0.6, height=0.6)); - equation + equation v1 = p1.v - n1.v; v2 = p2.v - n2.v; 0 = p1.i + n1.i; @@ -318,113 +274,108 @@ This current is provided explicitly as current i. i2 = p2.i; end TwoPort; - partial model AbsoluteSensor - "Base class to measure the absolute value of a pin variable" + partial model AbsoluteSensor + "Base class to measure the absolute value of a pin variable" extends Modelica.Icons.RotationalSensor; - - Modelica.Electrical.Analog.Interfaces.PositivePin p "pin to be measured" - annotation (extent=[-110, -10; -90, 10]); - Modelica.Blocks.Interfaces.OutPort outPort(final n=1) annotation (extent=[ - 100, -10; 120, 10]); + + PositivePin p "pin to be measured" annotation (extent=[-110, -10; -90, 10]) + ; + Modelica.Blocks.Interfaces.OutPort outPort(final n=1) annotation (extent=[100, -10; 120, 10]); annotation ( Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Window( - x=0.31, - y=0.04, - width=0.6, - height=0.6), + x=0.31, + y=0.04, + width=0.6, + height=0.6), Icon( - Line(points=[-70, 0; -90, 0], style(color=0)), - Line(points=[70, 0; 100, 0]), - Text(extent=[-110, 80; 110, 120], string="%name")), - Diagram(Line(points=[-70, 0; -90, 0], style(color=0)), Line(points=[70, - 0; 100, 0]))); + Line(points=[-70, 0; -90, 0], style(color=0)), + Line(points=[70, 0; 100, 0]), + Text(extent=[-110, 80; 110, 120], string="%name")), + Diagram(Line(points=[-70, 0; -90, 0], style(color=0)), Line(points=[70, 0 + ; 100, 0]))); end AbsoluteSensor; - model RelativeSensor - "Base class to measure a relative variable between two pins" + + partial model RelativeSensor + "Base class to measure a relative variable between two pins" extends Modelica.Icons.RotationalSensor; - - Modelica.Electrical.Analog.Interfaces.PositivePin p "positive pin" - annotation (extent=[-110, -10; -90, 10]); - Modelica.Electrical.Analog.Interfaces.NegativePin n "negative pin" - annotation (extent=[90, -10; 110, 10]); - Modelica.Blocks.Interfaces.OutPort outPort(final n=1) annotation (extent=[ - -10, -90; 10, -110], rotation=90); + + PositivePin p "positive pin" annotation (extent=[-110, -10; -90, 10]); + NegativePin n "negative pin" annotation (extent=[90, -10; 110, 10]); + Modelica.Blocks.Interfaces.OutPort outPort(final n=1) annotation (extent=[-10, -90; 10, -110], + rotation=90); + annotation ( Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), - Window( - x=0.21, - y=0.04, - width=0.6, - height=0.6), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Icon( - Line(points=[-70, 0; -90, 0], style(color=0)), - Line(points=[70, 0; 90, 0], style(color=0)), - Line(points=[0, -90; 0, -70]), - Text(extent=[-110, 80; 110, 120], string="%name")), + Line(points=[-70, 0; -90, 0], style(color=0)), + Line(points=[70, 0; 90, 0], style(color=0)), + Line(points=[0, -90; 0, -70]), + Text(extent=[-110, 80; 110, 120], string="%name")), Diagram( - Line(points=[-70, 0; -90, 0], style(color=0)), - Line(points=[0, -90; 0, -70]), + Line(points=[-70, 0; -90, 0], style(color=0)), + Line(points=[0, -90; 0, -70]), Line(points=[70, 0; 90, 0], style(color=0)))); + end RelativeSensor; - partial model VoltageSource "Interface for voltage sources" + + partial model VoltageSource "Interface for voltage sources" extends OnePort; - parameter SIunits.Voltage offset=0 "Voltage offset"; - parameter SIunits.Time startTime=0 "Time offset"; + parameter SI.Voltage offset=0 "Voltage offset"; + parameter SI.Time startTime=0 "Time offset"; annotation ( Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Icon( - Ellipse(extent=[-50, 50; 50, -50], style(color=3, fillColor=7)), - Line(points=[-90, 0; -50, 0]), - Line(points=[50, 0; 90, 0]), - Text(extent=[-100, -120; 100, -80], string="%name=%V"), - Line(points=[-50, 0; 50, 0])), + Ellipse(extent=[-50, 50; 50, -50], style(color=3, fillColor=7)), + Line(points=[-90, 0; -50, 0]), + Line(points=[50, 0; 90, 0]), + Text(extent=[-100, -120; 100, -80], string="%name=%V"), + Line(points=[-50, 0; 50, 0])), Window( - x=0.31, - y=0.09, - width=0.6, + x=0.31, + y=0.09, + width=0.6, height=0.6)); - replaceable Modelica.Blocks.Interfaces.SignalSource signalSource(final - offset={offset}, final startTime={startTime}) annotation (extent=[70, - 70; 90, 90]); - equation + replaceable Modelica.Blocks.Interfaces.SignalSource signalSource(final offset={offset}, final + startTime={startTime}) annotation (extent=[70, 70; 90, 90]); + equation v = signalSource.outPort.signal[1]; end VoltageSource; - partial model CurrentSource "Interface for current sources" + + partial model CurrentSource "Interface for current sources" extends OnePort; - - parameter SIunits.Current offset=0 "Current offset"; - parameter SIunits.Time startTime=0 "Time offset"; + + parameter SI.Current offset=0 "Current offset"; + parameter SI.Time startTime=0 "Time offset"; annotation ( Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Icon( - Ellipse(extent=[-50, 50; 50, -50], style(color=3, fillColor=7)), - Line(points=[-90, 0; -50, 0]), - Line(points=[50, 0; 90, 0]), - Line(points=[0, -50; 0, 50]), - Text(extent=[-100, -120; 100, -80], string="%name=%I")), + Ellipse(extent=[-50, 50; 50, -50], style(color=3, fillColor=7)), + Line(points=[-90, 0; -50, 0]), + Line(points=[50, 0; 90, 0]), + Line(points=[0, -50; 0, 50]), + Text(extent=[-100, -120; 100, -80], string="%name=%I")), Window( - x=0.33, - y=0.24, - width=0.6, + x=0.33, + y=0.24, + width=0.6, height=0.6)); - replaceable Modelica.Blocks.Interfaces.SignalSource signalSource(final - offset={offset}, final startTime={startTime}) annotation (extent=[69, - 70; 90, 90]); - equation + replaceable Modelica.Blocks.Interfaces.SignalSource signalSource(final offset={offset}, final + startTime={startTime}) annotation (extent=[69, 70; 90, 90]); + equation i = signalSource.outPort.signal[1]; end CurrentSource; end Interfaces; diff --git a/Electrical/Analog/Lines.mo b/Electrical/Analog/Lines.mo index fb9a72f5e5..5a3825dd40 100644 --- a/Electrical/Analog/Lines.mo +++ b/Electrical/Analog/Lines.mo @@ -1,31 +1,29 @@ -package Lines +package Lines + extends Modelica.Icons.Library; - package SIunits = Modelica.SIunits; annotation ( - Coordsys( - extent=[0, 0; 400, 500], - grid=[1, 1], - component=[20, 20]), Window( x=0.03, y=0.04, width=0.50, height=0.24, library=1, - autolayout=1), - Documentation(info=" - + autolayout=1), + Documentation(info="

-This package contains lossy and lossless tranmission lines. +This package contains lossy and lossless segmented transmission lines, +and LC distributed line models.

Main Authors:
-Christoph Clauß +Christoph Clauß <clauss@eas.iis.fhg.de>
+ Joachim Haase; + <haase@eas.iis.fhg.de>
André Schneider <schneider@eas.iis.fhg.de>
Fraunhofer Institute for Integrated Circuits
@@ -42,56 +40,53 @@ $Id$
Copyright:
-Copyright (C) 1998-1999, Modelica Design Group and Fraunhofer-Gesellschaft.
+Copyright © 1998-2002, Modelica Association and Fraunhofer-Gesellschaft.
The Modelica package is free software; it can be redistributed and/or modified under the terms of the Modelica license, see the license conditions -and the accompanying disclaimer in the documentation of package +and the accompanying disclaimer in the documentation of package Modelica in file \"Modelica/package.mo\".

")); - - model OLine "Lossy Transmission Line" + model OLine "Lossy Transmission Line" //extends Interfaces.ThreePol; - Modelica.Electrical.Analog.Interfaces.Pin p1 annotation (extent=[-110, -10; -90, 10]); - Modelica.Electrical.Analog.Interfaces.Pin p2 annotation (extent=[90, -10; 110, 10]); - Modelica.Electrical.Analog.Interfaces.Pin p3 annotation (extent=[-10, -110; 10, -90]); - SIunits.Voltage v13; - SIunits.Voltage v23; - SIunits.Current i1; - SIunits.Current i2; + Interfaces.Pin p1 annotation (extent=[-110, -10; -90, 10]); + Interfaces.Pin p2 annotation (extent=[90, -10; 110, 10]); + Interfaces.Pin p3 annotation (extent=[-10, -110; 10, -90]); + SI.Voltage v13; + SI.Voltage v23; + SI.Current i1; + SI.Current i2; parameter Real r( - final min=Modelica.Constants.SMALL, + final min=Modelica.Constants.small, unit="Ohm/m") = 1 "Resistance per meter"; parameter Real l( - final min=Modelica.Constants.SMALL, + final min=Modelica.Constants.small, unit="H/m") = 1 "Inductance per meter"; parameter Real g( - final min=Modelica.Constants.SMALL, + final min=Modelica.Constants.small, unit="Siemens/m") = 1 "Conductance per meter"; parameter Real c( - final min=Modelica.Constants.SMALL, + final min=Modelica.Constants.small, unit="F/m") = 1 "Capacitance per meter"; - parameter SIunits.Length length(final min=Modelica.Constants.SMALL) - = 1 "Length of line"; + parameter SI.Length length(final min=Modelica.Constants.small) = 1 "Length of line"; parameter Integer N(final min=1) = 1 "Number of lumped segments"; - protected - Modelica.Electrical.Analog.Basic.Resistor R[N + 1](R=r*length/(N+1)); - Modelica.Electrical.Analog.Basic.Inductor L[N + 1](L=l*length/(N+1)); - Modelica.Electrical.Analog.Basic.Capacitor C[N](C=c*length/(N+1)); - Modelica.Electrical.Analog.Basic.Conductor G[N](G=g*length/(N+1)); + protected + Basic.Resistor R[N + 1](R=fill(r*length/(N + 1), N + 1)); + Basic.Inductor L[N + 1](L=fill(l*length/(N + 1), N + 1)); + Basic.Capacitor C[N](C=fill(c*length/(N), N)); + Basic.Conductor G[N](G=fill(g*length/(N), N)); annotation ( - Documentation(info=" - + Documentation(info="

-Lossy Transmission Line +Lossy Transmission Line. The lossy transmission line OLine consists of segments of lumped resistances and inductances in series and conductances and capacitances that are - connected with the reference pin g. The precision + connected with the reference pin p3. The precision of the model depends on the number N of lumped segments.

@@ -99,7 +94,7 @@ Lossy Transmission Line
References:
- Johnson, B.; Quarles, T.; Newton, A. R.; Pederson, D. O.; + Johnson, B.; Quarles, T.; Newton, A. R.; Pederson, D. O.; Sangiovanni-Vincentelli, A.: SPICE3 Version 3e User's Manual (April 1, 1991). Department of Electrical Engineering and Computer Sciences, University of California, Berkley @@ -107,39 +102,38 @@ Lossy Transmission Line

-"), +"), Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Icon( - Rectangle(extent=[-60, 60; 60, -60], style(fillColor=7)), - Line(points=[0, -60; 0, -90]), - Line(points=[60, 0; 90, 0]), - Line(points=[-60, 0; -90, 0]), - Line(points=[30, 30; -30, 30]), - Line(points=[-30, 40; -30, 20]), - Line(points=[30, 40; 30, 20]), - Text(extent=[-100, 100; 100, 70], string="%name")), + Rectangle(extent=[-60, 60; 60, -60], style(fillColor=7)), + Line(points=[0, -60; 0, -90]), + Line(points=[60, 0; 90, 0]), + Line(points=[-60, 0; -90, 0]), + Line(points=[30, 30; -30, 30]), + Line(points=[-30, 40; -30, 20]), + Line(points=[30, 40; 30, 20]), + Text(extent=[-100, 100; 100, 70], string="%name")), Diagram( - Rectangle(extent=[-60, 60; 60, -60]), - Line(points=[0, -60; 0, -90]), - Line(points=[60, 0; 90, 0]), - Line(points=[-60, 0; -90, 0]), - Line(points=[30, 30; -30, 30]), - Line(points=[-30, 40; -30, 20]), - Line(points=[30, 40; 30, 20])), + Rectangle(extent=[-60, 60; 60, -60]), + Line(points=[0, -60; 0, -90]), + Line(points=[60, 0; 90, 0]), + Line(points=[-60, 0; -90, 0]), + Line(points=[30, 30; -30, 30]), + Line(points=[-30, 40; -30, 20]), + Line(points=[30, 40; 30, 20])), Window( - x=0.24, - y=0.07, - width=0.6, + x=0.24, + y=0.07, + width=0.6, height=0.6)); - equation + equation v13 = p1.v - p3.v; v23 = p2.v - p3.v; i1 = p1.i; i2 = p2.i; - // other models if gg = 0 ... connect(p1, R[1].p); for i in 1:N loop connect(R[i].n, L[i].p); @@ -152,34 +146,33 @@ Lossy Transmission Line connect(R[N + 1].n, L[N + 1].p); connect(L[N + 1].n, p2); end OLine; - model ULine "Lossy RC Line" + + model ULine "Lossy RC Line" //extends Interfaces.ThreePol; - Modelica.Electrical.Analog.Interfaces.Pin p1 annotation (extent=[-110, -10; -90, 10]); - Modelica.Electrical.Analog.Interfaces.Pin p2 annotation (extent=[90, -10; 110, 10]); - Modelica.Electrical.Analog.Interfaces.Pin p3 annotation (extent=[-10, -110; 10, -90]); - SIunits.Voltage v13; - SIunits.Voltage v23; - SIunits.Current i1; - SIunits.Current i2; + Interfaces.Pin p1 annotation (extent=[-110, -10; -90, 10]); + Interfaces.Pin p2 annotation (extent=[90, -10; 110, 10]); + Interfaces.Pin p3 annotation (extent=[-10, -110; 10, -90]); + SI.Voltage v13; + SI.Voltage v23; + SI.Current i1; + SI.Current i2; parameter Real r( - final min=Modelica.Constants.SMALL, + final min=Modelica.Constants.small, unit="Ohm/m") = 1 "Resistance per meter"; parameter Real c( - final min=Modelica.Constants.SMALL, + final min=Modelica.Constants.small, unit="F/m") = 1 "Capacitance per meter"; - parameter SIunits.Length length(final min=Modelica.Constants.SMALL) = - 1 "Length of line"; + parameter SI.Length length(final min=Modelica.Constants.small) = 1 "Length of line"; parameter Integer N(final min=1) = 1 "Number of lumped segments"; - protected - Modelica.Electrical.Analog.Basic.Resistor R[N + 1](R=r*length/(N+1)); - Modelica.Electrical.Analog.Basic.Capacitor C[N](C=c*length/(N+1)); + protected + Basic.Resistor R[N + 1](R=fill(r*length/(N + 1), N + 1)); + Basic.Capacitor C[N](C=fill(c*length/(N), N)); annotation ( - Documentation(info=" - + Documentation(info="

-The lossy RC line ULine consists of segments of +The lossy RC line ULine consists of segments of lumped series resistances and capacitances that are -connected with the reference pin g. The precision +connected with the reference pin p3. The precision of the model depends on the number N of lumped segments.

@@ -187,7 +180,7 @@ lumped segments.
References:
- Johnson, B.; Quarles, T.; Newton, A. R.; Pederson, D. O.; + Johnson, B.; Quarles, T.; Newton, A. R.; Pederson, D. O.; Sangiovanni-Vincentelli, A.: SPICE3 Version 3e User's Manual (April 1, 1991). Department of Electrical Engineering and Computer Sciences, University of California, Berkley @@ -195,34 +188,34 @@ lumped segments.

-"), +"), Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[2, 2], + component=[20, 20]), Window( - x=0.2, - y=0.21, - width=0.6, - height=0.6), + x=0.2, + y=0.21, + width=0.6, + height=0.6), Icon( - Rectangle(extent=[-60, 60; 60, -60], style(fillColor=7)), - Line(points=[0, -60; 0, -90]), - Line(points=[60, 0; 90, 0]), - Line(points=[-60, 0; -90, 0]), - Line(points=[30, 30; -30, 30]), - Line(points=[-30, 40; -30, 20]), - Line(points=[30, 40; 30, 20]), - Text(extent=[-100, 100; 100, 70], string="%name")), + Rectangle(extent=[-60, 60; 60, -60], style(fillColor=7)), + Line(points=[0, -60; 0, -90]), + Line(points=[60, 0; 90, 0]), + Line(points=[-60, 0; -90, 0]), + Line(points=[30, 30; -30, 30]), + Line(points=[-30, 40; -30, 20]), + Line(points=[30, 40; 30, 20]), + Text(extent=[-100, 100; 100, 70], string="%name")), Diagram( - Rectangle(extent=[-60, 60; 60, -60]), - Line(points=[0, -60; 0, -90]), - Line(points=[60, 0; 90, 0]), - Line(points=[-60, 0; -90, 0]), - Line(points=[30, 30; -30, 30]), - Line(points=[-30, 40; -30, 20]), + Rectangle(extent=[-60, 60; 60, -60]), + Line(points=[0, -60; 0, -90]), + Line(points=[60, 0; 90, 0]), + Line(points=[-60, 0; -90, 0]), + Line(points=[30, 30; -30, 30]), + Line(points=[-30, 40; -30, 20]), Line(points=[30, 40; 30, 20]))); - equation + equation v13 = p1.v - p3.v; v23 = p2.v - p3.v; i1 = p1.i; @@ -239,5 +232,239 @@ lumped segments. end for; connect(R[N + 1].n, p2); end ULine; - + model TLine1 + "Lossless transmission line with characteristic impedance Z0 and transmission delay TD" + + extends Modelica.Electrical.Analog.Interfaces.TwoPort; + + parameter Modelica.SIunits.Resistance Z0=1 "Characteristic impedance"; + parameter Modelica.SIunits.Time TD=1 "Transmission delay"; + + protected + Modelica.SIunits.Voltage er; + Modelica.SIunits.Voltage es; + annotation ( + Documentation(info=" + +Lossless transmission line with characteristic impedance Z0 and transmission delay TD + + The lossless transmission line TLine1 is a two Port. Both port branches + consist of a resistor with characteristic impedance Z0 and a controled voltage + source that takes into consideration the transmission delay TD. + For further details see Branin's article. + The model parameters can be derived from inductance and + capacitance per length (L' resp. C'), i. e. + Z0 = sqrt(L'/C') and TD = sqrt(L'*C')*length_of_line. Resistance R' + and conductance C' per meter are assumed to be zero. + +References: + Branin Jr., F. H.: Transient Analysis of Lossless Transmission Lines. + Proceedings of the IEEE 55(1967), 2012 - 2013 + + Hoefer, E. E. E.; Nielinger, H.: SPICE : Analyseprogramm fuer elektronische + Schaltungen. Springer-Verlag, Berlin, Heidelberg, New York, Tokyo, 1985. + +"), + Coordsys( + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), + Icon( + Rectangle(extent=[-60, 60; 60, -60]), + Line(points=[60, -50; 90, -50]), + Line(points=[60, 50; 90, 50]), + Line(points=[-60, 50; -90, 50]), + Line(points=[-60, -50; -90, -50]), + Line(points=[30, 30; -30, 30]), + Line(points=[-30, 40; -30, 20]), + Line(points=[30, 40; 30, 20]), + Text(extent=[-100, 100; 100, 70], string="TLine1"), + Text(extent=[-30, 10; 30, -20], string="TLine1")), + Diagram( + Rectangle(extent=[-60, 60; 60, -60]), + Line(points=[60, -50; 90, -50]), + Line(points=[60, 50; 90, 50]), + Line(points=[-60, 50; -90, 50]), + Line(points=[-60, -50; -90, -50]), + Line(points=[30, 30; -30, 30]), + Line(points=[-30, 40; -30, 20]), + Line(points=[30, 40; 30, 20]), + Text(extent=[-100, 100; 100, 70], string="TLine1"), + Text(extent=[-30, 0; 31, -31], string="TLine1")), + Window( + x=0.45, + y=0.01, + width=0.51, + height=0.83)); + equation + + assert(Z0 > 0, "Z0 has to be positive"); + assert(TD > 0, "TD has to be positive"); + i1 = (v1 - es)/Z0; + i2 = (v2 - er)/Z0; + es = 2*delay(v2, TD) - delay(er, TD); + er = 2*delay(v1, TD) - delay(es, TD); + + end TLine1; + model TLine2 + "Lossless transmission line with characteristic impedance Z0, frequency F and normalized length NL" + + extends Modelica.Electrical.Analog.Interfaces.TwoPort; + + parameter Modelica.SIunits.Resistance Z0=1 "Characteristic impedance"; + parameter Modelica.SIunits.Frequency F=1 "Frequency"; + parameter Modelica.SIunits.Length NL=1 "Normalized length"; + + protected + Modelica.SIunits.Voltage er; + Modelica.SIunits.Voltage es; + Modelica.SIunits.Time TD; + annotation ( + Documentation(info=" + +Lossless transmission line with characteristic impedance Z0, frequency F and normalized length NL + + The lossless transmission line TLine2 is a two Port. Both port branches + consist of a resistor with the value of the characteristic impedance Z0 + and a controled voltage source that takes into consideration + the transmission delay. + For further details see Branin's article. + Resistance R' and conductance C' per meter are assumed to be zero. + The characteristic impedance Z0 can be derived from inductance and + capacitance per length (L' resp. C'), i. e. Z0 = sqrt(L'/C'). + The normalized length NL is equal to the length of the line divided + by the wavelength corresponding to the frequency F, i. e. the + transmission delay TD is the quotient of NL and F. + +References: + Branin Jr., F. H.: Transient Analysis of Lossless Transmission Lines. + Proceedings of the IEEE 55(1967), 2012 - 2013 + + Hoefer, E. E. E.; Nielinger, H.: SPICE : Analyseprogramm fuer elektronische + Schaltungen. Springer-Verlag, Berlin, Heidelberg, New York, Tokyo, 1985. + + +"), + Coordsys( + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), + Icon( + Rectangle(extent=[-60, 60; 60, -60]), + Line(points=[60, -50; 90, -50]), + Line(points=[60, 50; 90, 50]), + Line(points=[-60, 50; -90, 50]), + Line(points=[-60, -50; -90, -50]), + Line(points=[30, 30; -30, 30]), + Line(points=[-30, 40; -30, 20]), + Line(points=[30, 40; 30, 20]), + Text(extent=[-100, 100; 100, 70], string="TLine2"), + Text(extent=[-30, 10; 30, -20], string="TLine2")), + Diagram( + Rectangle(extent=[-60, 60; 60, -60]), + Line(points=[60, -50; 90, -50]), + Line(points=[60, 50; 90, 50]), + Line(points=[-60, 50; -90, 50]), + Line(points=[-60, -50; -90, -50]), + Line(points=[30, 30; -30, 30]), + Line(points=[-30, 40; -30, 20]), + Line(points=[30, 40; 30, 20]), + Text(extent=[-100, 100; 100, 70], string="TLine2")), + Window( + x=0.01, + y=0.03, + width=0.78, + height=0.89)); + equation + + assert(Z0 > 0, "Z0 has to be positive"); + assert(NL > 0, "NL has to be positive"); + assert(F > 0, "F has to be positive"); + TD = NL/F; + i1 = (v1 - es)/Z0; + i2 = (v2 - er)/Z0; + es = 2*delay(v2, TD) - delay(er, TD); + er = 2*delay(v1, TD) - delay(es, TD); + + end TLine2; + model TLine3 + "Lossless transmission line with characteristic impedance Z0 and frequency F" + + extends Modelica.Electrical.Analog.Interfaces.TwoPort; + + parameter Modelica.SIunits.Resistance Z0=1 "Natural impedance"; + parameter Modelica.SIunits.Frequency F=1 "Frequency"; + + protected + Modelica.SIunits.Voltage er; + Modelica.SIunits.Voltage es; + Modelica.SIunits.Time TD; + annotation ( + Documentation(info=" + +Lossless transmission line with characteristic impedance Z0 and frequency F + + The lossless transmission line TLine3 is a two Port. Both port branches + consist of a resistor with value of the characteristic impedance Z0 + and a controled voltage source that takes into consideration + the transmission delay. + For further details see Branin's article. + Resistance R' and conductance C' per meter are assumed to be zero. + The characteristic impedance Z0 can be derived from inductance and + capacitance per length (L' resp. C'), i. e. Z0 = sqrt(L'/C'). + The length of the line is equal to a quarter of the wavelength + corresponding to the frequency F, i. e. the + transmission delay is the quotient of 4 and F. + In this case, the caracteristic impedance is called natural impedance. + + References: + Branin Jr., F. H.: Transient Analysis of Lossless Transmission Lines. + Proceedings of the IEEE 55(1967), 2012 - 2013 + + Hoefer, E. E. E.; Nielinger, H.: SPICE : Analyseprogramm fuer elektronische + Schaltungen. Springer-Verlag, Berlin, Heidelberg, New York, Tokyo, 1985. + + +"), + Coordsys( + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), + Icon( + Rectangle(extent=[-60, 60; 60, -60]), + Line(points=[60, -50; 90, -50]), + Line(points=[60, 50; 90, 50]), + Line(points=[-60, 50; -90, 50]), + Line(points=[-60, -50; -90, -50]), + Line(points=[30, 30; -30, 30]), + Line(points=[-30, 40; -30, 20]), + Line(points=[30, 40; 30, 20]), + Text(extent=[-100, 100; 100, 70], string="TLine3"), + Text(extent=[-29, -1; 30, -31], string="TLine3")), + Diagram( + Rectangle(extent=[-60, 60; 60, -60]), + Line(points=[60, -50; 90, -50]), + Line(points=[60, 50; 90, 50]), + Line(points=[-60, 50; -90, 50]), + Line(points=[-60, -50; -90, -50]), + Line(points=[30, 30; -30, 30]), + Line(points=[-30, 40; -30, 20]), + Line(points=[30, 40; 30, 20]), + Text(extent=[-100, 100; 100, 70], string="TLine3")), + Window( + x=0, + y=0, + width=0.7, + height=0.92)); + equation + + assert(Z0 > 0, "Z0 has to be positive"); + assert(F > 0, "F has to be positive"); + TD = 1/F/4; + i1 = (v1 - es)/Z0; + i2 = (v2 - er)/Z0; + es = 2*delay(v2, TD) - delay(er, TD); + er = 2*delay(v1, TD) - delay(es, TD); + + end TLine3; end Lines; diff --git a/Electrical/Analog/Semiconductors.mo b/Electrical/Analog/Semiconductors.mo index 1a21bd5add..980442a314 100644 --- a/Electrical/Analog/Semiconductors.mo +++ b/Electrical/Analog/Semiconductors.mo @@ -1,12 +1,8 @@ package Semiconductors extends Modelica.Icons.Library; - package SIunits = Modelica.SIunits; + import Modelica.SIunits; annotation ( - Coordsys( - extent=[0, 0; 400, 500], - grid=[1, 1], - component=[20, 20]), Window( x=0.03, y=0.04, @@ -20,8 +16,8 @@ package Semiconductors This package contains semiconductor devices:
  • diode
  • -
  • bipolar transistors
  • MOS transistors
  • +
  • bipolar transistors

@@ -47,7 +43,7 @@ $Id$
Copyright:
-Copyright (C) 1998-1999, Modelica Design Group and Fraunhofer-Gesellschaft.
+Copyright (C) 1998-1999, Modelica Association and Fraunhofer-Gesellschaft.
The Modelica package is free software; it can be redistributed and/or modified under the terms of the Modelica license, see the license conditions and the accompanying disclaimer in the documentation of package @@ -59,18 +55,18 @@ Modelica in file \"Modelica/package.mo\".
model Diode "Simple diode" extends Modelica.Electrical.Analog.Interfaces.OnePort; - parameter SIunits.Current Ids=1 "Saturation current"; - parameter SIunits.Voltage Vt=1 + parameter SIunits.Current Ids=1.e-6 "Saturation current"; + parameter SIunits.Voltage Vt=0.04 "Voltage equivalent of temperature (kT/qn)"; - parameter Real Maxexp(final min=Modelica.Constants.SMALL) = 1 + parameter Real Maxexp(final min=Modelica.Constants.SMALL) = 15 "Max. exponent for linear continuation"; - parameter SIunits.Resistance R=1 "Parallel ohmic resistance"; + parameter SIunits.Resistance R=1.e8 "Parallel ohmic resistance"; annotation ( Documentation(info="

-The simple diode is a two pole. It consists of the diode itself and an parallel ohmic -resistance R. The diode formula is simple: +The simple diode is a one port. It consists of the diode itself and an parallel ohmic +resistance R. The diode formula is:

 
                 v/vt
@@ -94,6 +90,10 @@ continued to avoid overflow.
         Line(points=[-90, 0; 40, 0]), 
         Line(points=[40, 0; 90, 0]), 
         Line(points=[30, 40; 30, -40], style(color=3)), 
+        Text(
+          extent=[-98, -58; 102, -100], 
+          string="Vt=%Vt", 
+          style(color=0)), 
         Text(extent=[-100, 100; 100, 70], string="%name")), 
       Diagram(
         Polygon(points=[30, 0; -30, 40; -30, -40; 30, 0], style(
@@ -110,11 +110,12 @@ continued to avoid overflow.
         width=0.75, 
         height=0.63));
   equation 
-    //assert (R <> 0, "R must not be zero");
-    i = if (v/Vt > Maxexp) then Ids*(exp(Maxexp)*(1 + v/Vt - Maxexp) - 1) + v/
-      R else Ids*(exp(v/Vt) - 1) + v/R;
+    i = if (v/Vt > Maxexp) then Ids*(exp(Maxexp)*(1 + v/Vt - Maxexp) - 1) + 
+      v/R else Ids*(exp(v/Vt) - 1) + v/R;
   end Diode;
   model PMOS "Simple MOS Transistor" 
+// 6.12.2001 parameter RDS added, Clauss    
+
     annotation (
       Documentation(info="
 
@@ -124,8 +125,8 @@ FET. It differs slightly from the device used in the SPICE simulator.
 For more details please care for H. Spiro.
 

-The model does not consider capacitances. A small fixed drain-source resistance -is included (to avoid numerical difficulties). +The model does not consider capacitances. A high drain-source resistance RDS +is included to avoid numerical difficulties.

References: @@ -136,16 +137,16 @@ is included (to avoid numerical difficulties). Some typical parameter sets are:

-  W       L      Beta      Vt       K2       K5       DW         DL    
-  m       m      A/V^2     V        -        -        m          m    
+  W       L      Beta        Vt       K2       K5       DW         DL    
+  m       m      A/V^2       V        -        -        m          m    
 
-  50.e-6  8.e-6  .0085     -.15     .41      .839    -3.8e-6    -4.0e-6           
-  20.e-6  6.e-6  .0105    -1.0      .41      .839    -2.5e-6    -2.1e-6 
-  30.e-6  5.e-6  .0059     -.3      .98     1.01      0         -3.9e-6   
-  30.e-6  5.e-6  .0152     -.69     .104    1.1       -.8e-6     -.4e-6         
-  30.e-6  5.e-6  .0163     -.69     .104    1.1       -.8e-6     -.4e-6         
-  30.e-6  5.e-6  .0182     -.69     .086    1.06      -.1e-6     -.6e-6         
-  20.e-6  6.e-6  .0074    -1.       .4       .59      0          0           
+  50.e-6  8.e-6  .0085e-3   -.15     .41      .839    -3.8e-6    -4.0e-6           
+  20.e-6  6.e-6  .0105e-3  -1.0      .41      .839    -2.5e-6    -2.1e-6 
+  30.e-6  5.e-6  .0059e-3   -.3      .98     1.01      0         -3.9e-6   
+  30.e-6  5.e-6  .0152e-3   -.69     .104    1.1       -.8e-6     -.4e-6         
+  30.e-6  5.e-6  .0163e-3   -.69     .104    1.1       -.8e-6     -.4e-6         
+  30.e-6  5.e-6  .0182e-3   -.69     .086    1.06      -.1e-6     -.6e-6         
+  20.e-6  6.e-6  .0074e-3  -1.       .4       .59      0          0           
 
"), @@ -187,15 +188,16 @@ Some typical parameter sets are: Interfaces.Pin S "Source" annotation (extent=[90, -40; 110, -60]); Interfaces.Pin B "Bulk" annotation (extent=[90, -10; 110, 10]); - parameter SIunits.Length W=50.0e-6 "Width"; - parameter SIunits.Length L=8.0e-6 "Length"; - parameter SIunits.Transconductance Beta=0.0085 + parameter SIunits.Length W=20.0e-6 "Width"; + parameter SIunits.Length L=6.0e-6 "Length"; + parameter SIunits.Transconductance Beta=0.0105e-3 "Transconductance parameter"; - parameter SIunits.Voltage Vt=-0.15 "Zero bias threshold voltage"; + parameter SIunits.Voltage Vt=-1.0 "Zero bias threshold voltage"; parameter Real K2=0.41 "Bulk threshold parameter"; parameter Real K5=0.839 "Reduction of pinch-off region"; - parameter SIunits.Length dW=-3.8e-6 "Narrowing of channel"; - parameter SIunits.Length dL=-4.0e-6 "Shortening of channel"; + parameter SIunits.Length dW=-2.5e-6 "Narrowing of channel"; + parameter SIunits.Length dL=-2.1e-6 "Shortening of channel"; + parameter SIunits.Resistance RDS=1.e+7 "Drain-Source-Resistance"; protected Real v; Real uds; @@ -204,24 +206,26 @@ Some typical parameter sets are: Real ud; Real us; Real id; + Real gds; equation //assert (L + dL > 0, "Effective length must be positive"); //assert (W + dW > 0, "Effective width must be positive"); + gds = if (RDS < 1.e-20 and RDS > -1.e-20) then 1.e20 else 1/RDS; v = Beta*(W + dW)/(L + dL); ud = if (D.v > S.v) then S.v else D.v; us = if (D.v > S.v) then D.v else S.v; uds = ud - us; ubs = if (B.v < us) then 0 else B.v - us; ugst = (G.v - us - Vt + K2*ubs)*K5; - id = if (ugst >= 0) then v*uds*1.e-7 else if (ugst < uds) then -v*uds*( - ugst - uds/2 - 1.e-7) else -v*(ugst*ugst/2 - uds*1.e-7); + id = if (ugst >= 0) then v*uds*gds else if (ugst < uds) then -v*uds*( + ugst - uds/2 - gds) else -v*(ugst*ugst/2 - uds*gds); G.i = 0; D.i = if (D.v > S.v) then -id else id; S.i = if (D.v > S.v) then id else -id; B.i = 0; end PMOS; model NMOS "Simple MOS Transistor" - +// 6.12.2001 parameter RDS added, Clauss annotation ( Documentation(info=" @@ -231,32 +235,32 @@ FET. It differs slightly from the device used in the SPICE simulator. For more details please care for H. Spiro.

-The model does not consider capacitances. A small fixed drain-source resistance -is included (to avoid numerical difficulties). +The model does not consider capacitances. A high drain-source resistance RDS +is included to avoid numerical difficulties.

-  W       L      Beta      Vt       K2       K5       DW         DL    
-  m       m      A/V^2     V        -        -        m          m    
+  W       L      Beta        Vt       K2      K5       DW         DL    
+  m       m      A/V^2       V        -       -        m          m    
 
-  12.e-6  4.e-6  .062     -4.5      .24      .61     -1.2e-6     -.9e-6         depletion
-  60.e-6  3.e-6  .048       .1      .08      .68     -1.2e-6     -.9e-6         enhancement
-  12.e-6  4.e-6  .0625     -.8      .21      .78     -1.2e-6     -.9e-6         zero
-  50.e-6  8.e-6  .0299      .24    1.144     .7311   -5.4e-6    -4.e-6          
-  20.e-6  6.e-6  .041       .8     1.144     .7311   -2.5e-6    -1.5e-6         
-  30.e-6  9.e-6  .025     -4.       .861     .878    -3.4e-6    -1.74e-6        
-  30.e-6  5.e-6  .031       .6     1.5       .72      0         -3.9e-6         
-  50.e-6  6.e-6  .0414    -3.8      .34      .8      -1.6e-6    -2.e-6          depletion
-  50.e-6  5.e-6  .03        .37     .23      .86     -1.6e-6    -2.e-6          enhancement
-  50.e-6  6.e-6  .038      -.9      .23      .707    -1.6e-6    -2.e-6          zero
-  20.e-6  4.e-6  .06776     .5409   .065     .71      -.8e-6     -.2e-6         
-  20.e-6  4.e-6  .06505     .6209   .065     .71      -.8e-6     -.2e-6         
-  20.e-6  4.e-6  .05365     .6909   .03      .8       -.3e-6     -.2e-6        
-  20.e-6  4.e-6  .05365     .4909   .03      .8       -.3e-6     -.2e-6        
-  12.e-6  4.e-6  .023     -4.5      .29      .6       0          0              depletion
-  60.e-6  3.e-6  .022       .1      .11      .65      0          0              enhancement
-  12.e-6  4.e-6  .038      -.8      .33      .6       0          0              zero
-  20.e-6  6.e-6  .022       .8     1         .66      0          0            
+  12.e-6  4.e-6  .062e-3   -4.5      .24     .61     -1.2e-6     -.9e-6      depletion
+  60.e-6  3.e-6  .048e-3     .1      .08     .68     -1.2e-6     -.9e-6      enhancement
+  12.e-6  4.e-6  .0625e-3   -.8      .21     .78     -1.2e-6     -.9e-6      zero
+  50.e-6  8.e-6  .0299e-3    .24    1.144    .7311   -5.4e-6    -4.e-6          
+  20.e-6  6.e-6  .041e-3     .8     1.144    .7311   -2.5e-6    -1.5e-6         
+  30.e-6  9.e-6  .025e-3   -4.       .861    .878    -3.4e-6    -1.74e-6        
+  30.e-6  5.e-6  .031e-3     .6     1.5      .72      0         -3.9e-6         
+  50.e-6  6.e-6  .0414e-3  -3.8      .34     .8      -1.6e-6    -2.e-6       depletion
+  50.e-6  5.e-6  .03e-3      .37     .23     .86     -1.6e-6    -2.e-6       enhancement
+  50.e-6  6.e-6  .038e-3    -.9      .23     .707    -1.6e-6    -2.e-6       zero
+  20.e-6  4.e-6  .06776e-3   .5409   .065    .71      -.8e-6     -.2e-6      
+  20.e-6  4.e-6  .06505e-3   .6209   .065    .71      -.8e-6     -.2e-6         
+  20.e-6  4.e-6  .05365e-3   .6909   .03     .8       -.3e-6     -.2e-6        
+  20.e-6  4.e-6  .05365e-3   .4909   .03     .8       -.3e-6     -.2e-6        
+  12.e-6  4.e-6  .023e-3   -4.5      .29     .6       0          0           depletion
+  60.e-6  3.e-6  .022e-3     .1      .11     .65      0          0           enhancement
+  12.e-6  4.e-6  .038e-3    -.8      .33     .6       0          0           zero
+  20.e-6  6.e-6  .022e-3     .8     1        .66      0          0            
 

@@ -297,15 +301,15 @@ Muenchen Wien 1990. Interfaces.Pin G "Gate" annotation (extent=[-90, -40; -110, -60]); Interfaces.Pin S "Source" annotation (extent=[90, -40; 110, -60]); Interfaces.Pin B "Bulk" annotation (extent=[90, -10; 110, 10]); - parameter SIunits.Length W "Width"; - parameter SIunits.Length L "Length"; - parameter SIunits.Transconductance Beta=2.e-5 - "Transconductance parameter"; - parameter SIunits.Voltage Vt=0 "Zero bias threshold voltage"; - parameter Real K2=0 "Bulk threshold parameter"; - parameter Real K5=1 "Reduction of pinch-off region"; - parameter SIunits.Length dW=0 "narrowing of channel"; - parameter SIunits.Length dL=0 "shortening of channel"; + parameter SIunits.Length W=20.e-6 "Width"; + parameter SIunits.Length L=6.e-6 "Length"; + parameter SIunits.Transconductance Beta=0.041e-3 "Transconductance parameter"; + parameter SIunits.Voltage Vt=0.8 "Zero bias threshold voltage"; + parameter Real K2=1.144 "Bulk threshold parameter"; + parameter Real K5=0.7311 "Reduction of pinch-off region"; + parameter SIunits.Length dW=-2.5e-6 "narrowing of channel"; + parameter SIunits.Length dL=-1.5e-6 "shortening of channel"; + parameter SIunits.Resistance RDS=1.e+7 "Drain-Source-Resistance"; protected Real v; Real uds; @@ -314,17 +318,19 @@ Muenchen Wien 1990. Real ud; Real us; Real id; + Real gds; equation //assert (L + dL > 0, "Effective length must be positive"); //assert (W + dW > 0, "Effective width must be positive"); + gds = if (RDS < 1.e-20 and RDS > -1.e-20) then 1.e20 else 1/RDS; v = Beta*(W + dW)/(L + dL); ud = if (D.v < S.v) then S.v else D.v; us = if (D.v < S.v) then D.v else S.v; uds = ud - us; ubs = if (B.v > us) then 0 else B.v - us; ugst = (G.v - us - Vt + K2*ubs)*K5; - id = if (ugst <= 0) then v*uds*1.e-7 else if (ugst > uds) then v*uds*(ugst - - uds/2 + 1.e-7) else v*(ugst*ugst/2 + uds*1.e-7); + id = if (ugst <= 0) then v*uds*gds else if (ugst > uds) then v*uds*(ugst + - uds/2 + gds) else v*(ugst*ugst/2 + uds*gds); G.i = 0; D.i = if (D.v < S.v) then -id else id; S.i = if (D.v < S.v) then id else -id; @@ -334,23 +340,19 @@ Muenchen Wien 1990. model NPN "Simple BJT according to Ebers-Moll" parameter Real Bf=50 "Forward beta"; parameter Real Br=0.1 "Reverse beta"; - parameter SIunits.Current Is=1.e-16 - "Transport saturation current"; - parameter SIunits.InversePotential Vak=0.02 + parameter SIunits.Current Is=1.e-16 "Transport saturation current"; + parameter SIunits.InversePotential Vak=0.02 "Early voltage (inverse), 1/Volt"; parameter SIunits.Time Tauf=0.12e-9 "Ideal forward transit time"; parameter SIunits.Time Taur=5e-9 "Ideal reverse transit time"; - parameter SIunits.Capacitance Ccs=1e-12 - "Collector-substrat(ground) cap."; - parameter SIunits.Capacitance Cje=0.4e-12 + parameter SIunits.Capacitance Ccs=1e-12 "Collector-substrat(ground) cap."; + parameter SIunits.Capacitance Cje=0.4e-12 "Base-emitter zero bias depletion cap."; parameter SIunits.Capacitance Cjc=0.5e-12 "Base-coll. zero bias depletion cap."; - parameter SIunits.Voltage Phie=0.8 - "Base-emitter diffusion voltage"; + parameter SIunits.Voltage Phie=0.8 "Base-emitter diffusion voltage"; parameter Real Me=0.4 "Base-emitter gradation exponent"; - parameter SIunits.Voltage Phic=0.8 - "Base-collector diffusion voltage"; + parameter SIunits.Voltage Phic=0.8 "Base-collector diffusion voltage"; parameter Real Mc=0.333 "Base-collector gradation exponent"; parameter SIunits.Conductance Gbc=1e-15 "Base-collector conductance"; parameter SIunits.Conductance Gbe=1e-15 "Base-emitter conductance"; @@ -369,6 +371,13 @@ Muenchen Wien 1990. Real ExMax; Real Capcje; Real Capcjc; + function pow "Just a helper function for x^y" + input Real x; + input Real y; + output Real z; + algorithm + z:=x^y; + end pow; annotation ( Documentation(info=" @@ -393,12 +402,6 @@ Van Nostrand Reinhold, New York 1983 on page 317 ff.

-

-
Note: -
This model is not validated yet. It cannot be used with Dymola 4.0b because of -stability problems within the solver. -
-

"), Coordsys( @@ -442,17 +445,17 @@ stability problems within the solver. vbc = B.v - C.v; vbe = B.v - E.v; qbk = 1 - vbc*Vak; - - ibc = if (vbc/Vt < EMin) then Is*(ExMin*(vbc/Vt - EMin + 1) - 1) + vbc* - Gbc else if (vbc/Vt > EMax) then Is*(ExMax*(vbc/Vt - EMax + 1) - 1) + vbc - *Gbc else Is*(exp(vbc/Vt) - 1) + vbc*Gbc; - ibe = if (vbe/Vt < EMin) then Is*(ExMin*(vbe/Vt - EMin + 1) - 1) + vbe* - Gbe else if (vbe/Vt > EMax) then Is*(ExMax*(vbe/Vt - EMax + 1) - 1) + vbe - *Gbe else Is*(exp(vbe/Vt) - 1) + vbe*Gbe; - Capcjc = if (vbc/Phic > 0) then Cjc*(1 + Mc*vbc/Phic) else Cjc*pow(1 - - vbc/Phic, -Mc); - Capcje = if (vbe/Phie > 0) then Cje*(1 + Me*vbe/Phie) else Cje*pow(1 - - vbe/Phie, -Me); + + ibc = if (vbc/Vt < EMin) then Is*(ExMin*(vbc/Vt - EMin + 1) - 1) + vbc*Gbc + else if (vbc/Vt > EMax) then Is*(ExMax*(vbc/Vt - EMax + 1) - 1) + vbc* + Gbc else Is*(exp(vbc/Vt) - 1) + vbc*Gbc; + ibe = if (vbe/Vt < EMin) then Is*(ExMin*(vbe/Vt - EMin + 1) - 1) + vbe*Gbe + else if (vbe/Vt > EMax) then Is*(ExMax*(vbe/Vt - EMax + 1) - 1) + vbe* + Gbe else Is*(exp(vbe/Vt) - 1) + vbe*Gbe; + Capcjc = if (vbc/Phic > 0) then Cjc*(1 + Mc*vbc/Phic) else Cjc*pow(1 - vbc + /Phic, -Mc); + Capcje = if (vbe/Phie > 0) then Cje*(1 + Me*vbe/Phie) else Cje*pow(1 - vbe + /Phie, -Me); cbc = if (vbc/Vt < EMin) then Taur*Is/Vt*ExMin*(vbc/Vt - EMin + 1) + Capcjc else if (vbc/Vt > EMax) then Taur*Is/Vt*ExMax*(vbc/Vt - EMax + 1) + Capcjc else Taur*Is/Vt*exp(vbc/Vt) + Capcjc; @@ -467,23 +470,19 @@ stability problems within the solver. model PNP "Simple BJT according to Ebers-Moll" parameter Real Bf=50 "Forward beta"; parameter Real Br=0.1 "Reverse beta"; - parameter SIunits.Current Is=1.e-16 - "Transport saturation current"; - parameter SIunits.InversePotential Vak=0.02 + parameter SIunits.Current Is=1.e-16 "Transport saturation current"; + parameter SIunits.InversePotential Vak=0.02 "Early voltage (inverse), 1/Volt"; parameter SIunits.Time Tauf=0.12e-9 "Ideal forward transit time"; parameter SIunits.Time Taur=5e-9 "Ideal reverse transit time"; - parameter SIunits.Capacitance Ccs=1e-12 - "Collector-substrat(ground) cap."; - parameter SIunits.Capacitance Cje=0.4e-12 + parameter SIunits.Capacitance Ccs=1e-12 "Collector-substrat(ground) cap."; + parameter SIunits.Capacitance Cje=0.4e-12 "Base-emitter zero bias depletion cap."; parameter SIunits.Capacitance Cjc=0.5e-12 "Base-coll. zero bias depletion cap."; - parameter SIunits.Voltage Phie=0.8 - "Base-emitter diffusion voltage"; + parameter SIunits.Voltage Phie=0.8 "Base-emitter diffusion voltage"; parameter Real Me=0.4 "Base-emitter gradation exponent"; - parameter SIunits.Voltage Phic=0.8 - "Base-collector diffusion voltage"; + parameter SIunits.Voltage Phic=0.8 "Base-collector diffusion voltage"; parameter Real Mc=0.333 "Base-collector gradation exponent"; parameter SIunits.Conductance Gbc=1e-15 "Base-collector conductance"; parameter SIunits.Conductance Gbe=1e-15 "Base-emitter conductance"; @@ -502,6 +501,13 @@ stability problems within the solver. Real ExMax; Real Capcje; Real Capcjc; + function pow "Just a helper function for x^y" + input Real x; + input Real y; + output Real z; + algorithm + z:=x^y; + end pow; annotation ( Documentation(info=" @@ -525,12 +531,6 @@ Van Nostrand Reinhold, New York 1983 on page 317 ff.

-

-
Note: -
This model is not validated yet. It cannot be used with Dymola 4.0b because of -stability problems within the solver. -
-

"), Coordsys( @@ -569,27 +569,28 @@ stability problems within the solver. vbc = C.v - B.v; vbe = E.v - B.v; qbk = 1 - vbc*Vak; - - ibc = if (vbc/Vt < EMin) then Is*(ExMin*(vbc/Vt - EMin + 1) - 1) + vbc* - Gbc else if (vbc/Vt > EMax) then Is*(ExMax*(vbc/Vt - EMax + 1) - 1) + vbc - *Gbc else Is*(exp(vbc/Vt) - 1) + vbc*Gbc; - ibe = if (vbe/Vt < EMin) then Is*(ExMin*(vbe/Vt - EMin + 1) - 1) + vbe* - Gbe else if (vbe/Vt > EMax) then Is*(ExMax*(vbe/Vt - EMax + 1) - 1) + vbe - *Gbe else Is*(exp(vbe/Vt) - 1) + vbe*Gbe; + ibc = if (vbc/Vt < EMin) then Is*(ExMin*(vbc/Vt - EMin + 1) - 1) + vbc*Gbc + else if (vbc/Vt > EMax) then Is*(ExMax*(vbc/Vt - EMax + 1) - 1) + vbc* + Gbc else Is*(exp(vbc/Vt) - 1) + vbc*Gbc; + + ibe = if (vbe/Vt < EMin) then Is*(ExMin*(vbe/Vt - EMin + 1) - 1) + vbe*Gbe + else if (vbe/Vt > EMax) then Is*(ExMax*(vbe/Vt - EMax + 1) - 1) + vbe* + Gbe else Is*(exp(vbe/Vt) - 1) + vbe*Gbe; - Capcjc = if (vbc/Phic > 0) then Cjc*(1 + Mc*vbc/Phic) else Cjc*pow(1 - - vbc/Phic, -Mc); - Capcje = if (vbe/Phie > 0) then Cje*(1 + Me*vbe/Phie) else Cje*pow(1 - - vbe/Phie, -Me); + Capcjc = if (vbc/Phic > 0) then Cjc*(1 + Mc*vbc/Phic) else Cjc*pow(1 - vbc + /Phic, -Mc); + Capcje = if (vbe/Phie > 0) then Cje*(1 + Me*vbe/Phie) else Cje*pow(1 - vbe + /Phie, -Me); cbc = if (vbc/Vt < EMin) then Taur*Is/Vt*ExMin*(vbc/Vt - EMin + 1) + Capcjc else if (vbc/Vt > EMax) then Taur*Is/Vt*ExMax*(vbc/Vt - EMax + 1) + Capcjc else Taur*Is/Vt*exp(vbc/Vt) + Capcjc; cbe = if (vbe/Vt < EMin) then Tauf*Is/Vt*ExMin*(vbe/Vt - EMin + 1) + Capcje else if (vbe/Vt > EMax) then Tauf*Is/Vt*ExMax*(vbe/Vt - EMax + 1) + Capcje else Tauf*Is/Vt*exp(vbe/Vt) + Capcje; - C.i = -((ibe - ibc)*qbk - ibc/Br - cbc*der(vbc) + Ccs*der(C.v)); + C.i = -((ibe - ibc)*qbk - ibc/Br - cbc*der(vbc) - Ccs*der(C.v)); B.i = -(ibe/Bf + ibc/Br + cbe*der(vbe) + cbc*der(vbc)); - E.i = -B.i - C.i - Ccs*der(C.v); + E.i = -B.i - C.i + Ccs*der(C.v); end PNP; end Semiconductors; + diff --git a/Electrical/Analog/Sensors.mo b/Electrical/Analog/Sensors.mo index 8b3199b9ac..16bbcbff3d 100644 --- a/Electrical/Analog/Sensors.mo +++ b/Electrical/Analog/Sensors.mo @@ -1,12 +1,8 @@ -package Sensors +package Sensors + extends Modelica.Icons.Library; - package SIunits = Modelica.SIunits ; - + annotation ( - Coordsys( - extent=[0, 0; 400, 500], - grid=[1, 1], - component=[20, 20]), Window( x=0.03, y=0.04, @@ -14,8 +10,7 @@ package Sensors height=0.24, library=1, autolayout=1), - Documentation(info=" - + Documentation(info="

This package contains potential, voltage, and current sensors.

@@ -24,9 +19,9 @@ This package contains potential, voltage, and current sensors.
Main Authors:
-Christoph Clauß +Christoph Clauß <clauss@eas.iis.fhg.de>
- André Schneider + André Schneider <schneider@eas.iis.fhg.de>
Fraunhofer Institute for Integrated Circuits
Design Automation Department
@@ -42,86 +37,85 @@ $Id$
Copyright:
-Copyright (C) 1998-1999, Modelica Design Group and Fraunhofer-Gesellschaft.
+Copyright © 1998-2002, Modelica Association and Fraunhofer-Gesellschaft.
The Modelica package is free software; it can be redistributed and/or modified under the terms of the Modelica license, see the license conditions -and the accompanying disclaimer in the documentation of package +and the accompanying disclaimer in the documentation of package Modelica in file \"Modelica/package.mo\".

")); - - model PotentialSensor "Sensor to measure the potential" - extends Modelica.Electrical.Analog.Interfaces.AbsoluteSensor; - SIunits.ElectricPotential phi "Absolute voltage potential"; + + model PotentialSensor "Sensor to measure the potential" + extends Interfaces.AbsoluteSensor; + SI.ElectricPotential phi "Absolute voltage potential"; annotation ( - Diagram, Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Icon(Text( - extent=[-29, -11; 30, -70], - string="V", - style(color=0))), + extent=[-29, -11; 30, -70], + string="V", + style(color=0))), Window( - x=0.4, - y=0.32, - width=0.6, + x=0.4, + y=0.32, + width=0.6, height=0.6)); - equation + equation p.i = 0; phi = p.v; phi = outPort.signal[1]; end PotentialSensor; - - model VoltageSensor "Sensor to measure the voltage between two pins" - extends Modelica.Electrical.Analog.Interfaces.RelativeSensor; - SIunits.Voltage v "Voltage between pin p and n (= p.v - n.v)"; + + model VoltageSensor "Sensor to measure the voltage between two pins" + extends Interfaces.RelativeSensor; + SI.Voltage v "Voltage between pin p and n (= p.v - n.v)"; annotation ( Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Window( - x=0.28, - y=0.29, - width=0.6, - height=0.6), + x=0.28, + y=0.29, + width=0.6, + height=0.6), Icon(Text( - extent=[-29, -11; 30, -70], - string="V", + extent=[-29, -11; 30, -70], + string="V", style(color=0)))); - equation + equation p.i = 0; n.i = 0; v = p.v - n.v; v = outPort.signal[1]; end VoltageSensor; - - model CurrentSensor "Sensor to measure the current in a branch" - extends Modelica.Electrical.Analog.Interfaces.RelativeSensor; - SIunits.Current i "current in the branch from p to n"; + + model CurrentSensor "Sensor to measure the current in a branch" + extends Interfaces.RelativeSensor; + SI.Current i "current in the branch from p to n"; annotation ( Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Window( - x=0.23, - y=0.07, - width=0.6, - height=0.6), + x=0.23, + y=0.07, + width=0.6, + height=0.6), Icon(Text( - extent=[-29, -11; 30, -70], - string="A", + extent=[-29, -11; 30, -70], + string="A", style(color=0)))); - equation + equation p.v = n.v; p.i = i; n.i = -i; i = outPort.signal[1]; end CurrentSensor; - + end Sensors; diff --git a/Electrical/Analog/Sources.mo b/Electrical/Analog/Sources.mo index e88583045b..3d509a0d79 100644 --- a/Electrical/Analog/Sources.mo +++ b/Electrical/Analog/Sources.mo @@ -1,19 +1,15 @@ -package Sources +package Sources + extends Modelica.Icons.Library; + annotation ( - Coordsys( - extent=[0, 0; 400, 500], - grid=[1, 1], - component=[20, 20]), Window( x=0.03, y=0.04, width=0.50, height=0.60, library=1, - autolayout=1), - Documentation(info=" - + autolayout=1),Documentation(info="

This package contains time-dependend and controlled voltage and current sources.

@@ -22,9 +18,9 @@ This package contains time-dependend and controlled voltage and current sources.
Main Authors:
-Christoph Clauß +Christoph Clauß <clauss@eas.iis.fhg.de>
- André Schneider + André Schneider <schneider@eas.iis.fhg.de>
Fraunhofer Institute for Integrated Circuits
Design Automation Department
@@ -40,1015 +36,996 @@ $Id$
Copyright:
-Copyright (C) 1998-1999, Modelica Design Group and Fraunhofer-Gesellschaft.
+Copyright © 1998-2002, Modelica Association and Fraunhofer-Gesellschaft.
The Modelica package is free software; it can be redistributed and/or modified under the terms of the Modelica license, see the license conditions -and the accompanying disclaimer in the documentation of package +and the accompanying disclaimer in the documentation of package Modelica in file \"Modelica/package.mo\".

")); - - model SignalVoltage - "Generic voltage source using the input signal as source voltage" - extends Modelica.Electrical.Analog.Interfaces.OnePort; - + + model SignalVoltage + "Generic voltage source using the input signal as source voltage" + extends Interfaces.OnePort; + annotation ( Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Icon( - Ellipse(extent=[-50, 50; 50, -50], style(fillColor=7)), - Line(points=[-90, 0; -50, 0]), - Line(points=[50, 0; 90, 0]), - Line(points=[-50, 0; 50, 0]), - Text(extent=[-100, -120; 100, -80], string="%name")), + Ellipse(extent=[-50, 50; 50, -50], style(fillColor=7)), + Line(points=[-90, 0; -50, 0]), + Line(points=[50, 0; 90, 0]), + Line(points=[-50, 0; 50, 0]), + Text(extent=[-100, -120; 100, -80], string="%name")), Window( - x=0.36, - y=0.03, - width=0.62, + x=0.36, + y=0.03, + width=0.62, height=0.76)); - Modelica.Blocks.Interfaces.InPort inPort(final n=1) annotation (extent=[- - 20, 50; 20, 90], rotation=-90); - equation + Modelica.Blocks.Interfaces.InPort inPort(final n=1) annotation (extent=[-20, 50; 20, 90], rotation + =-90); + equation inPort.signal[1] = v; end SignalVoltage; - - model ConstantVoltage "Source for constant voltage" - parameter Modelica.SIunits.Voltage V=1 "Value of constant voltage"; - extends Modelica.Electrical.Analog.Interfaces.OnePort; + + model ConstantVoltage "Source for constant voltage" + parameter SI.Voltage V=1 "Value of constant voltage"; + extends Interfaces.OnePort; annotation ( Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Window( - x=0.33, - y=0.18, - width=0.6, - height=0.6), + x=0.33, + y=0.18, + width=0.6, + height=0.6), Icon( - Line(points=[-90, 0; -10, 0]), - Line(points=[-10, 60; -10, -60]), - Line(points=[0, 30; 0, -30]), - Line(points=[0, 0; 90, 0]), - Text(extent=[-100, -120; 100, -80], string="%name=%V")), + Line(points=[-90, 0; -10, 0]), + Line(points=[-10, 60; -10, -60]), + Line(points=[0, 30; 0, -30]), + Line(points=[0, 0; 90, 0]), + Text(extent=[-100, -120; 100, -80], string="%name=%V")), Diagram( - Line(points=[-90, 0; -10, 0]), - Line(points=[-10, 60; -10, -60]), - Line(points=[0, 30; 0, -30]), + Line(points=[-90, 0; -10, 0]), + Line(points=[-10, 60; -10, -60]), + Line(points=[0, 30; 0, -30]), Line(points=[0, 0; 90, 0]))); - equation + equation v = V; end ConstantVoltage; - - model StepVoltage "Step voltage source" - parameter Modelica.SIunits.Voltage V=1 "Height of step"; - extends Modelica.Electrical.Analog.Interfaces.VoltageSource(redeclare - Modelica.Blocks.Sources.Step signalSource(height={V})); + + model StepVoltage "Step voltage source" + parameter SI.Voltage V=1 "Height of step"; + extends Interfaces.VoltageSource(redeclare Modelica.Blocks.Sources.Step signalSource(height={V} + )); annotation ( - Icon(Line(points=[-70, -70; 0, -70; 0, 70; 69, 70], style(color=8))), + Icon(Line(points=[-70, -70; 0, -70; 0, 70; 69, 70], style(color=8))), Diagram( - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-80, 68; -80, -80], style(color=8)), - Line(points=[-80, -18; 0, -18; 0, 50; 80, 50], style(color=0, - thickness=2)), - Line(points=[-90, -70; 82, -70], style(color=8)), - Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style(color=8, - fillColor=8)), - Text( - extent=[70, -80; 94, -100], - string="time", - style(color=9)), - Text( - extent=[-21, -72; 25, -90], - string="startTime", - style(color=9)), - Line(points=[0, -17; 0, -71], style(color=8, pattern=2)), - Text( - extent=[-68, -36; -22, -54], - string="offset", - style(color=9)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-80, 68; -80, -80], style(color=8)), + Line(points=[-80, -18; 0, -18; 0, 50; 80, 50], style(color=0, thickness + =2)), + Line(points=[-90, -70; 82, -70], style(color=8)), + Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style(color=8, + fillColor=8)), + Text( + extent=[70, -80; 94, -100], + string="time", + style(color=9)), + Text( + extent=[-21, -72; 25, -90], + string="startTime", + style(color=9)), + Line(points=[0, -17; 0, -71], style(color=8, pattern=2)), + Text( + extent=[-68, -36; -22, -54], + string="offset", + style(color=9)), Line(points=[-13, 50; -13, -17], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), - Polygon(points=[2, 50; -19, 50; 2, 50], style(color=8, pattern=2)), - Polygon(points=[-13, -17; -16, -4; -10, -4; -13, -17; -13, -17], style - ( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + pattern=1, + thickness=1, + arrow=0)), + Polygon(points=[2, 50; -19, 50; 2, 50], style(color=8, pattern=2)), + Polygon(points=[-13, -17; -16, -4; -10, -4; -13, -17; -13, -17], style( + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[-13, 50; -16, 37; -9, 37; -13, 50], style( - color=8, - fillColor=8, - fillPattern=1)), - Text( - extent=[-68, 26; -22, 8], - string="V", - style(color=9)), - Polygon(points=[-13, -69; -16, -56; -10, -56; -13, -69; -13, -69], + color=8, + fillColor=8, + fillPattern=1)), + Text( + extent=[-68, 26; -22, 8], + string="V", + style(color=9)), + Polygon(points=[-13, -69; -16, -56; -10, -56; -13, -69; -13, -69], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Line(points=[-13, -18; -13, -70], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), + color=8, + pattern=1, + thickness=1, + arrow=0)), Polygon(points=[-13, -18; -16, -31; -9, -31; -13, -18], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Text( - extent=[-67, 93; -2, 67], - string="v = p.v - n.v", - style(color=9))), + extent=[-67, 93; -2, 67], + string="v = p.v - n.v", + style(color=9))), Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Window( - x=0.28, - y=0, - width=0.72, + x=0.28, + y=0, + width=0.72, height=0.73)); end StepVoltage; - - model RampVoltage "Ramp voltage source" - parameter Modelica.SIunits.Voltage V=1 "Height of ramp"; - parameter Modelica.SIunits.Time duration(min=Modelica.Constants.SMALL) = 2 - "Duration of ramp"; - extends Modelica.Electrical.Analog.Interfaces.VoltageSource(redeclare - Modelica.Blocks.Sources.Ramp signalSource(final height={V}, final - duration={duration})); + + model RampVoltage "Ramp voltage source" + parameter SI.Voltage V=1 "Height of ramp"; + parameter SI.Time duration(min=Modelica.Constants.small) = 2 "Duration of ramp"; + extends Interfaces.VoltageSource(redeclare Modelica.Blocks.Sources.Ramp signalSource(final + height={V}, final duration={duration})); annotation ( Diagram( - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-80, 68; -80, -80], style(color=8)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-80, 68; -80, -80], style(color=8)), Line(points=[-80, -20; -20, -20; 50, 50], style(color=0, thickness=2)) - , - Line(points=[-90, -70; 82, -70], style(color=8)), + , + Line(points=[-90, -70; 82, -70], style(color=8)), Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[-40, -20; -42, -30; -37, -30; -40, -20], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Line(points=[-40, -20; -40, -70], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), - Polygon(points=[-40, -70; -43, -60; -38, -60; -40, -70; -40, -70], + color=8, + pattern=1, + thickness=1, + arrow=0)), + Polygon(points=[-40, -70; -43, -60; -38, -60; -40, -70; -40, -70], style( - color=8, - fillColor=8, - fillPattern=1)), - Text( - extent=[-80, -33; -41, -49], - string="offset", - style(color=9)), - Text( - extent=[-40, -70; 6, -88], - string="startTime", - style(color=9)), - Text( - extent=[-67, 93; -2, 67], - string="v = p.v - n.v", - style(color=9)), - Text( - extent=[70, -80; 94, -100], - string="time", - style(color=9)), - Line(points=[-20, -20; -20, -70], style(color=8, pattern=2)), + color=8, + fillColor=8, + fillPattern=1)), + Text( + extent=[-80, -33; -41, -49], + string="offset", + style(color=9)), + Text( + extent=[-40, -70; 6, -88], + string="startTime", + style(color=9)), + Text( + extent=[-67, 93; -2, 67], + string="v = p.v - n.v", + style(color=9)), + Text( + extent=[70, -80; 94, -100], + string="time", + style(color=9)), + Line(points=[-20, -20; -20, -70], style(color=8, pattern=2)), Line(points=[-19, -20; 50, -20], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), - Line(points=[50, 50; 101, 50], style(color=0, thickness=2)), + color=8, + pattern=1, + thickness=1, + arrow=0)), + Line(points=[50, 50; 101, 50], style(color=0, thickness=2)), Line(points=[50, 50; 50, -20], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), + color=8, + pattern=1, + thickness=1, + arrow=0)), Polygon(points=[50, -20; 42, -18; 42, -22; 50, -20], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[-20, -20; -11, -18; -11, -22; -20, -20], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[50, 50; 48, 40; 53, 40; 50, 50], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[50, -20; 47, -10; 52, -10; 50, -20; 50, -20], style( - color=8, - fillColor=8, - fillPattern=1)), - Text( - extent=[53, 25; 82, 7], - string="V", - style(color=9)), - Text( - extent=[0, -17; 35, -37], - string="duration", - style(color=9))), - Icon(Line(points=[-80, -60; -50, -60; 50, 60; 80, 60], style(color=8))) - , + color=8, + fillColor=8, + fillPattern=1)), + Text( + extent=[53, 25; 82, 7], + string="V", + style(color=9)), + Text( + extent=[0, -17; 35, -37], + string="duration", + style(color=9))), + Icon(Line(points=[-80, -60; -50, -60; 50, 60; 80, 60], style(color=8))), Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Window( - x=0.29, - y=0.11, - width=0.6, + x=0.29, + y=0.11, + width=0.6, height=0.6)); end RampVoltage; - - model SineVoltage "Sine voltage source" - parameter Modelica.SIunits.Voltage V=1 "Amplitude of sine wave"; - parameter Modelica.SIunits.Angle phase=0 "Phase of sine wave"; - parameter Modelica.SIunits.Frequency freqHz=1 "Frequency of sine wave"; - extends Modelica.Electrical.Analog.Interfaces.VoltageSource(redeclare - Modelica.Blocks.Sources.Sine signalSource( - amplitude={V}, - freqHz={freqHz}, - phase={phase}, - offset={offset}, - startTime={startTime})); + + model SineVoltage "Sine voltage source" + parameter SI.Voltage V=1 "Amplitude of sine wave"; + parameter SI.Angle phase=0 "Phase of sine wave"; + parameter SI.Frequency freqHz=1 "Frequency of sine wave"; + extends Interfaces.VoltageSource(redeclare Modelica.Blocks.Sources.Sine signalSource( + amplitude={V}, + freqHz={freqHz}, + phase={phase})); annotation ( Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Window( - x=0.37, - y=0.06, - width=0.6, - height=0.6), - Icon(Line(points=[-70, 0; -60.2, 29.9; -53.8, 46.5; -48.2, 58.1; -43.3, - 65.2; -38.3, 69.2; -33.4, 69.8; -28.5, 67; -23.6, 61; -18.6, 52; + x=0.37, + y=0.06, + width=0.6, + height=0.6), + Icon(Line(points=[-70, 0; -60.2, 29.9; -53.8, 46.5; -48.2, 58.1; -43.3, + 65.2; -38.3, 69.2; -33.4, 69.8; -28.5, 67; -23.6, 61; -18.6, 52; -13, 38.6; -5.98, 18.6; 8.79, -26.9; 15.1, -44; 20.8, -56.2; 25.7 , -64; 30.6, -68.6; 35.5, -70; 40.5, -67.9; 45.4, -62.5; 50.3, - - 54.1; 55.9, -41.3; 63, -21.7; 70, 0], style(color=8))), + 54.1; 55.9, -41.3; 63, -21.7; 70, 0], style(color=8))), Diagram( - Line(points=[-80, -90; -80, 84], style(color=8)), - Polygon(points=[-80, 100; -86, 84; -74, 84; -80, 100], style(color=8, - fillColor=8)), - Line(points=[-99, -40; 85, -40], style(color=8)), - Polygon(points=[101, -40; 85, -34; 85, -46; 101, -40], style(color=8, - fillColor=8)), - Line(points=[-40, 0; -31.6, 34.2; -26.1, 53.1; -21.3, 66.4; -17.1, - 74.6; -12.9, 79.1; -8.64, 79.8; -4.42, 76.6; -0.201, 69.7; 4.02, - 59.4; 8.84, 44.1; 14.9, 21.2; 27.5, -30.8; 33, -50.2; 37.8, -64.2 - ; 42, -73.1; 46.2, -78.4; 50.5, -80; 54.7, -77.6; 58.9, -71.5; - 63.1, -61.9; 67.9, -47.2; 74, -24.8; 80, 0], style(color=0, - thickness=2)), - Line(points=[-41, -2; -80, -2], style(color=0, thickness=2)), - Text( - extent=[-106, -11; -60, -29], - string="offset", - style(color=9)), - Line(points=[-41, -2; -41, -40], style(color=8, pattern=2)), - Text( - extent=[-60, -43; -14, -61], - string="startTime", - style(color=9)), - Text( - extent=[84, -52; 108, -72], - string="time", - style(color=9)), - Line(points=[-9, 79; 43, 79], style(color=8, pattern=2)), - Line(points=[-42, -1; 50, 0], style(color=8, pattern=2)), + Line(points=[-80, -90; -80, 84], style(color=8)), + Polygon(points=[-80, 100; -86, 84; -74, 84; -80, 100], style(color=8, + fillColor=8)), + Line(points=[-99, -40; 85, -40], style(color=8)), + Polygon(points=[101, -40; 85, -34; 85, -46; 101, -40], style(color=8, + fillColor=8)), + Line(points=[-40, 0; -31.6, 34.2; -26.1, 53.1; -21.3, 66.4; -17.1, 74.6 + ; -12.9, 79.1; -8.64, 79.8; -4.42, 76.6; -0.201, 69.7; 4.02, 59.4 + ; 8.84, 44.1; 14.9, 21.2; 27.5, -30.8; 33, -50.2; 37.8, -64.2; 42 + , -73.1; 46.2, -78.4; 50.5, -80; 54.7, -77.6; 58.9, -71.5; 63.1, + -61.9; 67.9, -47.2; 74, -24.8; 80, 0], style(color=0, thickness=2 + )), + Line(points=[-41, -2; -80, -2], style(color=0, thickness=2)), + Text( + extent=[-106, -11; -60, -29], + string="offset", + style(color=9)), + Line(points=[-41, -2; -41, -40], style(color=8, pattern=2)), + Text( + extent=[-60, -43; -14, -61], + string="startTime", + style(color=9)), + Text( + extent=[84, -52; 108, -72], + string="time", + style(color=9)), + Line(points=[-9, 79; 43, 79], style(color=8, pattern=2)), + Line(points=[-42, -1; 50, 0], style(color=8, pattern=2)), Polygon(points=[33, 80; 30, 67; 37, 67; 33, 80], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Text( - extent=[37, 57; 83, 39], - string="V", - style(color=9)), + extent=[37, 57; 83, 39], + string="V", + style(color=9)), Polygon(points=[33, 1; 30, 14; 36, 14; 33, 1; 33, 1], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Line(points=[33, 79; 33, 0], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), + color=8, + pattern=1, + thickness=1, + arrow=0)), Text( - extent=[-69, 109; -4, 83], - string="v = p.v - n.v", + extent=[-69, 109; -4, 83], + string="v = p.v - n.v", style(color=9)))); end SineVoltage; - - model ExpSineVoltage "Exponentially damped sine voltage source" - parameter Modelica.SIunits.Voltage V=1 "Amplitude of sine wave"; - parameter Modelica.SIunits.Frequency freqHz=2 "Frequency of sine wave"; - parameter Modelica.SIunits.Angle phase=0 "Phase of sine wave"; - parameter Modelica.SIunits.Damping damping=1 - "Damping coefficient of sine wave"; - extends Modelica.Electrical.Analog.Interfaces.VoltageSource(redeclare - Modelica.Blocks.Sources.ExpSine signalSource( - amplitude={V}, - freqHz={freqHz}, - phase={phase}, - damping={damping}, - offset={offset}, - startTime={startTime})); + + model ExpSineVoltage "Exponentially damped sine voltage source" + parameter SI.Voltage V=1 "Amplitude of sine wave"; + parameter SI.Frequency freqHz=2 "Frequency of sine wave"; + parameter SI.Angle phase=0 "Phase of sine wave"; + parameter SI.Damping damping=1 "Damping coefficient of sine wave"; + extends Interfaces.VoltageSource(redeclare Modelica.Blocks.Sources.ExpSine signalSource( + amplitude={V}, + freqHz={freqHz}, + phase={phase}, + damping={damping})); annotation ( - Icon(Line(points=[-80, -14; -75.2, 18.3; -72, 36.3; -68.7, 50.5; -65.5, - 60.2; -62.3, 65.3; -59.1, 65.6; -55.9, 61.3; -52.7, 53.1; -48.6, + Icon(Line(points=[-80, -14; -75.2, 18.3; -72, 36.3; -68.7, 50.5; -65.5, + 60.2; -62.3, 65.3; -59.1, 65.6; -55.9, 61.3; -52.7, 53.1; -48.6, 38.2; -43, 11.8; -35, -27.9; -30.2, -47.7; -26.1, -59.9; -22.1, - - 67.2; -18.1, -69.3; -14.1, -66.5; -10.1, -59.3; -5.23, -46.1; - 8.44, -0.3; 13.3, 12.4; 18.1, 20.8; 22.1, 24; 26.9, 23.2; 31.8, + 67.2; -18.1, -69.3; -14.1, -66.5; -10.1, -59.3; -5.23, -46.1; + 8.44, -0.3; 13.3, 12.4; 18.1, 20.8; 22.1, 24; 26.9, 23.2; 31.8, 17.8; 38.2, 5.4; 51.1, -24.5; 57.5, -35.2; 63.1, -39.9; 68.7, - - 39.9; 75.2, -34.5; 80, -27.8], style(color=8))), + 39.9; 75.2, -34.5; 80, -27.8], style(color=8))), Diagram( - Line(points=[-80, -90; -80, 84], style(color=8)), - Polygon(points=[-80, 100; -86, 84; -74, 84; -80, 100], style(color=8, - fillColor=8)), - Line(points=[-99, -40; 85, -40], style(color=8)), - Polygon(points=[101, -40; 85, -34; 85, -46; 101, -40], style(color=8, - fillColor=8)), - Line(points=[-50, 0; -46.1, 28.2; -43.5, 44; -40.9, 56.4; -38.2, 64.9 - ; -35.6, 69.4; -33, 69.6; -30.4, 65.9; -27.8, 58.7; -24.5, 45.7; - -19.9, 22.5; -13.4, -12.2; -9.5, -29.5; -6.23, -40.1; -2.96, - - 46.5; 0.302, -48.4; 3.57, -45.9; 6.83, -39.6; 10.8, -28.1; 21.9, - 12; 25.8, 23.1; 29.7, 30.5; 33, 33.3; 36.9, 32.5; 40.8, 27.8; 46 - , 16.9; 56.5, -9.2; 61.7, -18.6; 66.3, -22.7; 70.9, -22.6; 76.1, - -18; 80, -12.1], style(color=0, thickness=2)), - Text( - extent=[-78, 1; -55, -19], - string="offset", - style(color=9)), - Text( - extent=[-72, -36; -26, -54], - string="startTime", - style(color=9)), - Text( - extent=[84, -52; 108, -72], - string="time", - style(color=9)), - Line(points=[-50, 0; 18, 0], style(color=8, pattern=2)), - Line(points=[-50, 0; -81, 0], style(color=0, thickness=2)), - Line(points=[-50, 77; -50, 0], style(color=8, pattern=2)), - Line(points=[18, -1; 18, 76], style(color=8, pattern=2)), - Line(points=[18, 73; -50, 73], style(color=8)), - Text( - extent=[-42, 88; 9, 74], - string="1/freqHz", - style(color=9)), + Line(points=[-80, -90; -80, 84], style(color=8)), + Polygon(points=[-80, 100; -86, 84; -74, 84; -80, 100], style(color=8, + fillColor=8)), + Line(points=[-99, -40; 85, -40], style(color=8)), + Polygon(points=[101, -40; 85, -34; 85, -46; 101, -40], style(color=8, + fillColor=8)), + Line(points=[-50, 0; -46.1, 28.2; -43.5, 44; -40.9, 56.4; -38.2, 64.9; + -35.6, 69.4; -33, 69.6; -30.4, 65.9; -27.8, 58.7; -24.5, 45.7; - + 19.9, 22.5; -13.4, -12.2; -9.5, -29.5; -6.23, -40.1; -2.96, -46.5 + ; 0.302, -48.4; 3.57, -45.9; 6.83, -39.6; 10.8, -28.1; 21.9, 12; + 25.8, 23.1; 29.7, 30.5; 33, 33.3; 36.9, 32.5; 40.8, 27.8; 46, + 16.9; 56.5, -9.2; 61.7, -18.6; 66.3, -22.7; 70.9, -22.6; 76.1, - + 18; 80, -12.1], style(color=0, thickness=2)), + Text( + extent=[-78, 1; -55, -19], + string="offset", + style(color=9)), + Text( + extent=[-72, -36; -26, -54], + string="startTime", + style(color=9)), + Text( + extent=[84, -52; 108, -72], + string="time", + style(color=9)), + Line(points=[-50, 0; 18, 0], style(color=8, pattern=2)), + Line(points=[-50, 0; -81, 0], style(color=0, thickness=2)), + Line(points=[-50, 77; -50, 0], style(color=8, pattern=2)), + Line(points=[18, -1; 18, 76], style(color=8, pattern=2)), + Line(points=[18, 73; -50, 73], style(color=8)), + Text( + extent=[-42, 88; 9, 74], + string="1/freqHz", + style(color=9)), Polygon(points=[-49, 73; -40, 75; -40, 71; -49, 73], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[18, 73; 10, 75; 10, 71; 18, 73], style( - color=8, - fillColor=8, - fillPattern=1)), - Line(points=[-50, -61; -19, -61], style(color=8)), + color=8, + fillColor=8, + fillPattern=1)), + Line(points=[-50, -61; -19, -61], style(color=8)), Polygon(points=[-18, -61; -26, -59; -26, -63; -18, -61], style( - color=8, - fillColor=8, - fillPattern=1)), - Text( - extent=[-51, -63; -27, -75], - string="t", - style(color=9)), - Text( - extent=[-82, -67; 108, -96], - string="V*exp(-damping*t)*sin(2*pi*freqHz*t+phase)", - style(color=9)), - Line(points=[-50, 0; -50, -40], style(color=8, pattern=2)), - Line(points=[-50, -54; -50, -72], style(color=8, pattern=2)), - Line(points=[18, -76; -1, -48], style(color=8, pattern=2)), - Text( - extent=[-77, 105; -38, 92], - string="v = p.v - n.v", - style(color=9))), + color=8, + fillColor=8, + fillPattern=1)), + Text( + extent=[-51, -63; -27, -75], + string="t", + style(color=9)), + Text( + extent=[-82, -67; 108, -96], + string="V*exp(-damping*t)*sin(2*pi*freqHz*t+phase)", + style(color=9)), + Line(points=[-50, 0; -50, -40], style(color=8, pattern=2)), + Line(points=[-50, -54; -50, -72], style(color=8, pattern=2)), + Line(points=[18, -76; -1, -48], style(color=8, pattern=2)), + Text( + extent=[-77, 105; -38, 92], + string="v = p.v - n.v", + style(color=9))), Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Window( - x=0.33, - y=0.06, - width=0.6, + x=0.33, + y=0.06, + width=0.6, height=0.75)); end ExpSineVoltage; - - model ExponentialsVoltage " Rising and falling exponential voltage source" + + model ExponentialsVoltage " Rising and falling exponential voltage source" parameter Real vMax=1 "Upper bound for rising edge"; - parameter Modelica.SIunits.Time riseTime(min=0) = 0.5 "Rise time"; - parameter Modelica.SIunits.Time riseTimeConst(min=Modelica.Constants.SMALL - ) = 0.1 "Rise time constant"; - parameter Modelica.SIunits.Time fallTimeConst(min=Modelica.Constants.SMALL - ) = riseTimeConst "Fall time constant"; - extends Modelica.Electrical.Analog.Interfaces.VoltageSource(redeclare - Modelica.Blocks.Sources.Exponentials signalSource( - outMax={vMax}, - riseTime={riseTime}, - riseTimeConst={riseTimeConst}, + parameter SI.Time riseTime(min=0) = 0.5 "Rise time"; + parameter SI.Time riseTimeConst(min=Modelica.Constants.small) = 0.1 + "Rise time constant"; + parameter SI.Time fallTimeConst(min=Modelica.Constants.small) = riseTimeConst + "Fall time constant"; + extends Interfaces.VoltageSource(redeclare Modelica.Blocks.Sources.Exponentials signalSource( + outMax={vMax}, + riseTime={riseTime}, + riseTimeConst={riseTimeConst}, fallTimeConst={fallTimeConst})); annotation ( Icon(Line(points=[-76, -59; -73.2, -44.3; -70.3, -31.1; -66.8, -16.6; - 63.3, -4; -59.7, 6.92; -55.5, 18.18; -51.3, 27.7; -46.3, 37; - 40.6, 45.5; -34.3, 53.1; -27.2, 59.6; -18.7, 65.3; -8.1, 70.2; -6 - , 71; -3.88, 58.5; -1.05, 43.7; 1.78, 30.8; 4.606, 19.45; 8.14, + , 71; -3.88, 58.5; -1.05, 43.7; 1.78, 30.8; 4.606, 19.45; 8.14, 7.3; 11.68, -3; 15.9, -13.2; 20.2, -21.6; 25.1, -29.5; 30.8, - 36.4; 37.1, -42.3; 44.9, -47.5; 54.8, -51.8; 64, -54.4], style( - color=8))), + color=8))), Diagram( - Line(points=[-100, -70; 84, -70], style(color=8)), - Polygon(points=[100, -70; 84, -64; 84, -76; 100, -70], style(color=8, - fillColor=8)), - Line(points=[-40, -30; -37.2, -15.3; -34.3, -2.1; -30.8, 12.4; -27.3, - 25; -23.7, 35.92; -19.5, 47.18; -15.3, 56.7; -10.3, 66; -4.6, - 74.5; 1.7, 82.1; 8.8, 88.6; 17.3, 94.3; 27.9, 99.2; 30, 100; + Line(points=[-100, -70; 84, -70], style(color=8)), + Polygon(points=[100, -70; 84, -64; 84, -76; 100, -70], style(color=8, + fillColor=8)), + Line(points=[-40, -30; -37.2, -15.3; -34.3, -2.1; -30.8, 12.4; -27.3, + 25; -23.7, 35.92; -19.5, 47.18; -15.3, 56.7; -10.3, 66; -4.6, + 74.5; 1.7, 82.1; 8.8, 88.6; 17.3, 94.3; 27.9, 99.2; 30, 100; 32.12, 87.5; 34.95, 72.7; 37.78, 59.8; 40.606, 48.45; 44.14, 36.3 ; 47.68, 26; 51.9, 15.8; 56.2, 7.4; 61.1, -0.5; 66.8, -7.4; 73.1 - , -13.3; 80.9, -18.5; 90.8, -22.8; 100, -25.4], style(color=0, - thickness=2)), - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-80, 68; -80, -80], style(color=8)), - Text( - extent=[-70, 91; -29, 71], - string="outPort", - style(color=9)), - Text( - extent=[-78, -43; -46, -56], - string="offset", - style(color=9)), - Polygon(points=[-40, -70; -43, -60; -38, -60; -40, -70; -40, -70], + , -13.3; 80.9, -18.5; 90.8, -22.8; 100, -25.4], style(color=0, + thickness=2)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-80, 68; -80, -80], style(color=8)), + Text( + extent=[-70, 91; -29, 71], + string="outPort", + style(color=9)), + Text( + extent=[-78, -43; -46, -56], + string="offset", + style(color=9)), + Polygon(points=[-40, -70; -43, -60; -38, -60; -40, -70; -40, -70], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Line(points=[-40, -29; -40, -60], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), + color=8, + pattern=1, + thickness=1, + arrow=0)), Polygon(points=[-40, -30; -42, -40; -37, -40; -40, -30], style( - color=8, - fillColor=8, - fillPattern=1)), - Line(points=[-39, -30; -80, -30], style(color=0, thickness=2)), - Text( - extent=[-59, -71; -13, -89], - string="startTime", - style(color=9)), + color=8, + fillColor=8, + fillPattern=1)), + Line(points=[-39, -30; -80, -30], style(color=0, thickness=2)), + Text( + extent=[-59, -71; -13, -89], + string="startTime", + style(color=9)), Polygon(points=[-41, -30; -32, -28; -32, -32; -41, -30], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Line(points=[-40, -30; 29, -30], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), + color=8, + pattern=1, + thickness=1, + arrow=0)), Polygon(points=[29, -30; 21, -28; 21, -32; 29, -30], style( - color=8, - fillColor=8, - fillPattern=1)), - Text( - extent=[-26, -12; 19, -28], - string="riseTime", - style(color=9)), - Text( - extent=[78, -76; 102, -96], - string="time", - style(color=9)), - Line(points=[-100, -70; 84, -70], style(color=8)), - Polygon(points=[100, -70; 84, -64; 84, -76; 100, -70], style(color=8, - fillColor=8)), - Line(points=[-40, -30; -37.2, -15.3; -34.3, -2.1; -30.8, 12.4; -27.3, - 25; -23.7, 35.92; -19.5, 47.18; -15.3, 56.7; -10.3, 66; -4.6, - 74.5; 1.7, 82.1; 8.8, 88.6; 17.3, 94.3; 27.9, 99.2; 30, 100; + color=8, + fillColor=8, + fillPattern=1)), + Text( + extent=[-26, -12; 19, -28], + string="riseTime", + style(color=9)), + Text( + extent=[78, -76; 102, -96], + string="time", + style(color=9)), + Line(points=[-100, -70; 84, -70], style(color=8)), + Polygon(points=[100, -70; 84, -64; 84, -76; 100, -70], style(color=8, + fillColor=8)), + Line(points=[-40, -30; -37.2, -15.3; -34.3, -2.1; -30.8, 12.4; -27.3, + 25; -23.7, 35.92; -19.5, 47.18; -15.3, 56.7; -10.3, 66; -4.6, + 74.5; 1.7, 82.1; 8.8, 88.6; 17.3, 94.3; 27.9, 99.2; 30, 100; 32.12, 87.5; 34.95, 72.7; 37.78, 59.8; 40.606, 48.45; 44.14, 36.3 ; 47.68, 26; 51.9, 15.8; 56.2, 7.4; 61.1, -0.5; 66.8, -7.4; 73.1 - , -13.3; 80.9, -18.5; 90.8, -22.8; 100, -25.4], style(color=0, - thickness=2)), - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-80, 68; -80, -80], style(color=8)), - Text( - extent=[-70, 91; -29, 71], - string="outPort", - style(color=9)), - Text( - extent=[-78, -43; -46, -56], - string="offset", - style(color=9)), - Polygon(points=[-40, -70; -43, -60; -38, -60; -40, -70; -40, -70], + , -13.3; 80.9, -18.5; 90.8, -22.8; 100, -25.4], style(color=0, + thickness=2)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-80, 68; -80, -80], style(color=8)), + Text( + extent=[-70, 91; -29, 71], + string="outPort", + style(color=9)), + Text( + extent=[-78, -43; -46, -56], + string="offset", + style(color=9)), + Polygon(points=[-40, -70; -43, -60; -38, -60; -40, -70; -40, -70], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Line(points=[-40, -29; -40, -60], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), + color=8, + pattern=1, + thickness=1, + arrow=0)), Polygon(points=[-40, -30; -42, -40; -37, -40; -40, -30], style( - color=8, - fillColor=8, - fillPattern=1)), - Line(points=[-39, -30; -80, -30], style(color=0, thickness=2)), - Text( - extent=[-59, -71; -13, -89], - string="startTime", - style(color=9)), + color=8, + fillColor=8, + fillPattern=1)), + Line(points=[-39, -30; -80, -30], style(color=0, thickness=2)), + Text( + extent=[-59, -71; -13, -89], + string="startTime", + style(color=9)), Polygon(points=[-41, -30; -32, -28; -32, -32; -41, -30], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Line(points=[-40, -30; 29, -30], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), + color=8, + pattern=1, + thickness=1, + arrow=0)), Polygon(points=[29, -30; 21, -28; 21, -32; 29, -30], style( - color=8, - fillColor=8, - fillPattern=1)), - Text( - extent=[-26, -12; 19, -28], - string="riseTime", - style(color=9)), - Text( - extent=[78, -76; 102, -96], - string="time", - style(color=9)), - Line(points=[30, 100; 30, -34], style(color=8, pattern=2))), + color=8, + fillColor=8, + fillPattern=1)), + Text( + extent=[-26, -12; 19, -28], + string="riseTime", + style(color=9)), + Text( + extent=[78, -76; 102, -96], + string="time", + style(color=9)), + Line(points=[30, 100; 30, -34], style(color=8, pattern=2))), Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Window( - x=0.11, - y=0.12, - width=0.78, + x=0.11, + y=0.12, + width=0.78, height=0.83)); end ExponentialsVoltage; - - model PulseVoltage "Pulse voltage source" - parameter Modelica.SIunits.Voltage V=1 "Amplitude of pulse"; + + model PulseVoltage "Pulse voltage source" + parameter SI.Voltage V=1 "Amplitude of pulse"; parameter Real width( - final min=Modelica.Constants.SMALL, + final min=Modelica.Constants.small, final max=100) = 50 "Width of pulse in % of period"; - parameter Modelica.SIunits.Time period(final min=Modelica.Constants.SMALL) - = 1 "Time for one period"; - extends Modelica.Electrical.Analog.Interfaces.VoltageSource(redeclare - Modelica.Blocks.Sources.Pulse signalSource( - amplitude={V}, - width={width}, + parameter SI.Time period(final min=Modelica.Constants.small) = 1 + "Time for one period"; + extends Interfaces.VoltageSource(redeclare Modelica.Blocks.Sources.Pulse signalSource( + amplitude={V}, + width={width}, period={period})); annotation ( - Icon(Line(points=[-70, -70; -40, -70; -40, 70; 0, 70; 0, -70; 40, -70; - 41, 70; 80, 70], style(color=8))), + Icon(Line(points=[-70, -70; -40, -70; -40, 70; 0, 70; 0, -70; 40, -70; 41 + , 70; 80, 70], style(color=8))), Diagram( - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-80, 68; -80, -80], style(color=8)), - Line(points=[-90, -70; 82, -70], style(color=8)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-80, 68; -80, -80], style(color=8)), + Line(points=[-90, -70; 82, -70], style(color=8)), Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[-34, 1; -37, -12; -30, -12; -34, 1], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Line(points=[-34, -1; -34, -70], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), - Polygon(points=[-33, -70; -36, -57; -30, -57; -33, -70; -33, -70], + color=8, + pattern=1, + thickness=1, + arrow=0)), + Polygon(points=[-33, -70; -36, -57; -30, -57; -33, -70; -33, -70], style( - color=8, - fillColor=8, - fillPattern=1)), - Text( - extent=[-78, -24; -35, -36], - string="offset", - style(color=9)), - Text( - extent=[-31, -69; 15, -87], - string="startTime", - style(color=9)), - Text( - extent=[70, -80; 94, -100], - string="time", - style(color=9)), - Line(points=[-10, 0; -10, -70], style(color=8, pattern=2)), - Line(points=[-80, 0; -20, 0; -21, 50; 21, 50; 20, -1; 41, 0; 40, 50; - 80, 51], style(color=0, thickness=2)), - Line(points=[-19, 88; -19, 49], style(color=8, pattern=2)), - Line(points=[21, 74; 21, 50], style(color=9, pattern=2)), - Line(points=[41, 88; 41, 50], style(color=8, pattern=2)), - Line(points=[-19, 83; 42, 83], style(color=8)), - Line(points=[-19, 69; 21, 69], style(color=8)), - Text( - extent=[-9, 97; 37, 85], - string="period", - style(color=9)), - Text( - extent=[-18, 81; 21, 69], - string="width", - style(color=9)), - Line(points=[-52, 50; -19, 50], style(color=8, pattern=2)), + color=8, + fillColor=8, + fillPattern=1)), + Text( + extent=[-78, -24; -35, -36], + string="offset", + style(color=9)), + Text( + extent=[-31, -69; 15, -87], + string="startTime", + style(color=9)), + Text( + extent=[70, -80; 94, -100], + string="time", + style(color=9)), + Line(points=[-10, 0; -10, -70], style(color=8, pattern=2)), + Line(points=[-80, 0; -20, 0; -21, 50; 21, 50; 20, -1; 41, 0; 40, 50; 80 + , 51], style(color=0, thickness=2)), + Line(points=[-19, 88; -19, 49], style(color=8, pattern=2)), + Line(points=[21, 74; 21, 50], style(color=9, pattern=2)), + Line(points=[41, 88; 41, 50], style(color=8, pattern=2)), + Line(points=[-19, 83; 42, 83], style(color=8)), + Line(points=[-19, 69; 21, 69], style(color=8)), + Text( + extent=[-9, 97; 37, 85], + string="period", + style(color=9)), + Text( + extent=[-18, 81; 21, 69], + string="width", + style(color=9)), + Line(points=[-52, 50; -19, 50], style(color=8, pattern=2)), Line(points=[-34, 50; -34, 1], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), - Text( - extent=[-78, 34; -37, 20], - string="V", - style(color=9)), + color=8, + pattern=1, + thickness=1, + arrow=0)), + Text( + extent=[-78, 34; -37, 20], + string="V", + style(color=9)), Polygon(points=[-34, 49; -37, 36; -30, 36; -34, 49], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[-34, 1; -37, 14; -31, 14; -34, 1; -34, 1], style( - color=8, - fillColor=8, - fillPattern=1)), - Line(points=[80, 51; 80, 0; 90, -1], style(color=0, thickness=2)), + color=8, + fillColor=8, + fillPattern=1)), + Line(points=[80, 51; 80, 0; 90, -1], style(color=0, thickness=2)), Polygon(points=[-19, 69; -10, 71; -10, 67; -19, 69], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[21, 69; 13, 71; 13, 67; 21, 69], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[-19, 83; -10, 85; -10, 81; -19, 83], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[41, 83; 33, 85; 33, 81; 41, 83], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Text( - extent=[-78, 103; -24, 89], - string="v = p.v - n.v", - style(color=9))), + extent=[-78, 103; -24, 89], + string="v = p.v - n.v", + style(color=9))), Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Window( - x=0.4, - y=0.23, - width=0.6, + x=0.4, + y=0.23, + width=0.6, height=0.6)); end PulseVoltage; - - model SawToothVoltage "Saw tooth voltage source" - parameter Modelica.SIunits.Voltage V=1 "Amplitude of saw tooth"; - parameter Modelica.SIunits.Time period=1 "Time for one period"; - extends Modelica.Electrical.Analog.Interfaces.VoltageSource(redeclare - Modelica.Blocks.Sources.SawTooth signalSource(amplitude={V}, period={ - period})); + + model SawToothVoltage "Saw tooth voltage source" + parameter SI.Voltage V=1 "Amplitude of saw tooth"; + parameter SI.Time period=1 "Time for one period"; + extends Interfaces.VoltageSource(redeclare Modelica.Blocks.Sources.SawTooth signalSource( + amplitude={V}, period={period})); annotation ( - Icon(Line(points=[-70, -71; -50, -71; 10, 70; 10, -71; 70, 70; 70, -71] - , style(color=8))), + Icon(Line(points=[-70, -71; -50, -71; 10, 70; 10, -71; 70, 70; 70, -71], + style(color=8))), Diagram( - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-80, 68; -80, -80], style(color=8)), - Line(points=[-90, -70; 82, -70], style(color=8)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-80, 68; -80, -80], style(color=8)), + Line(points=[-90, -70; 82, -70], style(color=8)), Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[-34, -19; -37, -32; -30, -32; -34, -19], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Line(points=[-34, -20; -34, -70], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), - Polygon(points=[-34, -70; -37, -57; -31, -57; -34, -70; -34, -70], + color=8, + pattern=1, + thickness=1, + arrow=0)), + Polygon(points=[-34, -70; -37, -57; -31, -57; -34, -70; -34, -70], style( - color=8, - fillColor=8, - fillPattern=1)), - Text( - extent=[-78, -24; -35, -36], - string="offset", - style(color=9)), - Text( - extent=[-31, -69; 15, -87], - string="startTime", - style(color=9)), - Text( - extent=[70, -80; 94, -100], - string="time", - style(color=9)), - Line(points=[-10, -20; -10, -70], style(color=8, pattern=2)), - Line(points=[-10, 88; -10, -20], style(color=8, pattern=2)), - Line(points=[30, 88; 30, 59], style(color=8, pattern=2)), - Line(points=[-10, 83; 30, 83], style(color=8)), - Text( - extent=[-12, 97; 34, 85], - string="period", - style(color=9)), - Line(points=[-44, 60; 30, 60], style(color=8, pattern=2)), + color=8, + fillColor=8, + fillPattern=1)), + Text( + extent=[-78, -24; -35, -36], + string="offset", + style(color=9)), + Text( + extent=[-31, -69; 15, -87], + string="startTime", + style(color=9)), + Text( + extent=[70, -80; 94, -100], + string="time", + style(color=9)), + Line(points=[-10, -20; -10, -70], style(color=8, pattern=2)), + Line(points=[-10, 88; -10, -20], style(color=8, pattern=2)), + Line(points=[30, 88; 30, 59], style(color=8, pattern=2)), + Line(points=[-10, 83; 30, 83], style(color=8)), + Text( + extent=[-12, 97; 34, 85], + string="period", + style(color=9)), + Line(points=[-44, 60; 30, 60], style(color=8, pattern=2)), Line(points=[-34, 47; -34, -7], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), - Text( - extent=[-78, 34; -37, 20], - string="V", - style(color=9)), + color=8, + pattern=1, + thickness=1, + arrow=0)), + Text( + extent=[-78, 34; -37, 20], + string="V", + style(color=9)), Polygon(points=[-34, 60; -37, 47; -30, 47; -34, 60], style( - color=8, - fillColor=8, - fillPattern=1)), - Polygon(points=[-34, -20; -37, -7; -31, -7; -34, -20; -34, -20], style - ( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), + Polygon(points=[-34, -20; -37, -7; -31, -7; -34, -20; -34, -20], style( + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[-10, 83; -1, 85; -1, 81; -10, 83], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[30, 83; 22, 85; 22, 81; 30, 83], style( - color=8, - fillColor=8, - fillPattern=1)), - Line(points=[-80, -20; -10, -20; 30, 60; 30, -20; 72, 60; 72, -20], - style(color=0, thickness=2)), - Text( - extent=[-77, 100; -27, 88], - string="v = p.v - n.v", - style(color=9))), + color=8, + fillColor=8, + fillPattern=1)), + Line(points=[-80, -20; -10, -20; 30, 60; 30, -20; 72, 60; 72, -20], + style(color=0, thickness=2)), + Text( + extent=[-77, 100; -27, 88], + string="v = p.v - n.v", + style(color=9))), Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Window( - x=0.37, - y=0.04, - width=0.6, + x=0.37, + y=0.04, + width=0.6, height=0.6)); end SawToothVoltage; - - model TrapezoidVoltage "Trapezoidal voltage source" - parameter Modelica.SIunits.Voltage V=1 "Amplitude of trapezoid"; - parameter SIunits.Time rising(final min=0) = 0 - "Rising duration of trapezoid"; - parameter SIunits.Time width(final min=0) = 0.5 - "Width duration of trapezoid"; - parameter SIunits.Time falling(final min=0) = 0 - "Falling duration of trapezoid"; - parameter SIunits.Time period(final min=Modelica.Constants.small) = 1 - "Time for one period"; - parameter Integer nperiod=-1 + + model TrapezoidVoltage "Trapezoidal voltage source" + parameter SI.Voltage V=1 "Amplitude of trapezoid"; + parameter SI.Time rising(final min=0) = 0 "Rising duration of trapezoid"; + parameter SI.Time width(final min=0) = 0.5 "Width duration of trapezoid"; + parameter SI.Time falling(final min=0) = 0 "Falling duration of trapezoid"; + parameter SI.Time period(final min=Modelica.Constants.small) = 1 + "Time for one period"; + parameter Integer nperiod=-1 "Number of periods (< 0 means infinite number of periods)"; - extends Modelica.Electrical.Analog.Interfaces.VoltageSource(redeclare - Modelica.Blocks.Sources.Trapezoid signalSource( - amplitude={V}, - rising={rising}, - width={width}, - falling={falling}, - period={period}, + extends Interfaces.VoltageSource(redeclare Modelica.Blocks.Sources.Trapezoid signalSource( + amplitude={V}, + rising={rising}, + width={width}, + falling={falling}, + period={period}, nperiod={nperiod})); annotation ( - Icon(Line(points=[-81, -70; -60, -70; -30, 70; 1, 70; 30, -70; 51, -70; - 80, 70], style(color=8))), + Icon(Line(points=[-81, -70; -60, -70; -30, 70; 1, 70; 30, -70; 51, -70; + 80, 70], style(color=8))), Diagram( - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-80, 68; -80, -80], style(color=8)), - Line(points=[-90, -70; 82, -70], style(color=8)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-80, 68; -80, -80], style(color=8)), + Line(points=[-90, -70; 82, -70], style(color=8)), Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[-45, -30; -47, -41; -43, -41; -45, -30], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Line(points=[-45, -31; -45, -70], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), - Polygon(points=[-45, -70; -47, -60; -43, -60; -45, -70; -45, -70], + color=8, + pattern=1, + thickness=1, + arrow=0)), + Polygon(points=[-45, -70; -47, -60; -43, -60; -45, -70; -45, -70], style( - color=8, - fillColor=8, - fillPattern=1)), - Text( - extent=[-86, -43; -43, -55], - string="offset", - style(color=9)), - Text( - extent=[-47, -69; -1, -87], - string="startTime", - style(color=9)), - Text( - extent=[70, -80; 94, -100], - string="time", - style(color=9)), - Line(points=[-30, 81; -30, -70], style(color=8, pattern=2)), - Line(points=[-10, 59; -10, 40], style(color=8, pattern=2)), - Line(points=[20, 59; 20, 39], style(color=9, pattern=2)), - Line(points=[40, 59; 40, -30], style(color=8, pattern=2)), - Line(points=[-29, 56; 40, 56], style(color=8)), - Text( - extent=[-8, 70; 21, 60], - string="width", - style(color=9)), - Line(points=[-42, 40; -10, 40], style(color=8, pattern=2)), + color=8, + fillColor=8, + fillPattern=1)), + Text( + extent=[-86, -43; -43, -55], + string="offset", + style(color=9)), + Text( + extent=[-47, -69; -1, -87], + string="startTime", + style(color=9)), + Text( + extent=[70, -80; 94, -100], + string="time", + style(color=9)), + Line(points=[-30, 81; -30, -70], style(color=8, pattern=2)), + Line(points=[-10, 59; -10, 40], style(color=8, pattern=2)), + Line(points=[20, 59; 20, 39], style(color=9, pattern=2)), + Line(points=[40, 59; 40, -30], style(color=8, pattern=2)), + Line(points=[-29, 56; 40, 56], style(color=8)), + Text( + extent=[-8, 70; 21, 60], + string="width", + style(color=9)), + Line(points=[-42, 40; -10, 40], style(color=8, pattern=2)), Line(points=[-39, 40; -39, -19], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), - Text( - extent=[-77, 14; -40, 0], - string="V", - style(color=9)), + color=8, + pattern=1, + thickness=1, + arrow=0)), + Text( + extent=[-77, 14; -40, 0], + string="V", + style(color=9)), Polygon(points=[-29, 56; -22, 58; -22, 54; -29, 56], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[-10, 56; -17, 58; -17, 54; -10, 56], style( - color=8, - fillColor=8, - fillPattern=1)), - Line(points=[-80, -30; -30, -30; -9, 46; 21, 46; 40, -30; 60, -30; 80 - , 46; 100, 46], style(color=0, thickness=2)), + color=8, + fillColor=8, + fillPattern=1)), + Line(points=[-80, -30; -30, -30; -9, 46; 21, 46; 40, -30; 60, -30; 80, + 46; 100, 46], style(color=0, thickness=2)), Polygon(points=[-39, 40; -41, 29; -37, 29; -39, 40], style( - color=8, - fillColor=8, - fillPattern=1)), - Polygon(points=[-39, -29; -41, -19; -37, -19; -39, -29; -39, -29], + color=8, + fillColor=8, + fillPattern=1)), + Polygon(points=[-39, -29; -41, -19; -37, -19; -39, -29; -39, -29], style( - color=8, - fillColor=8, - fillPattern=1)), - Line(points=[60, 81; 60, -30], style(color=8, pattern=2)), + color=8, + fillColor=8, + fillPattern=1)), + Line(points=[60, 81; 60, -30], style(color=8, pattern=2)), Polygon(points=[39, 56; 32, 58; 32, 54; 39, 56], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[20, 56; 27, 58; 27, 54; 20, 56], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[20, 56; 13, 58; 13, 54; 20, 56], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[-12, 56; -5, 58; -5, 54; -12, 56], style( - color=8, - fillColor=8, - fillPattern=1)), - Text( - extent=[-34, 70; -5, 60], - string="rising", - style(color=9)), - Text( - extent=[16, 70; 45, 60], - string="falling", - style(color=9)), - Text( - extent=[-77, 103; -23, 91], - string="v = p.v - n.v", - style(color=9)), - Line(points=[-20, 76; 61, 76], style(color=8)), + color=8, + fillColor=8, + fillPattern=1)), + Text( + extent=[-34, 70; -5, 60], + string="rising", + style(color=9)), + Text( + extent=[16, 70; 45, 60], + string="falling", + style(color=9)), + Text( + extent=[-77, 103; -23, 91], + string="v = p.v - n.v", + style(color=9)), + Line(points=[-20, 76; 61, 76], style(color=8)), Polygon(points=[-29, 76; -20, 78; -20, 74; -29, 76], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[61, 76; 53, 78; 53, 74; 61, 76], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Text( - extent=[-2, 86; 25, 77], - string="period", - style(color=9))), + extent=[-2, 86; 25, 77], + string="period", + style(color=9))), Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Window( - x=0.21, - y=0.22, - width=0.6, + x=0.21, + y=0.22, + width=0.6, height=0.63)); end TrapezoidVoltage; - - model TableVoltage "Voltage source by linear interpolation in a table" - parameter Real table[:, :]=[0, 0; 1, 1; 2, 4] + + model TableVoltage "Voltage source by linear interpolation in a table" + parameter Real table[:, :]=[0, 0; 1, 1; 2, 4] "Table matrix (time = first column, voltage = second column)"; - extends Modelica.Electrical.Analog.Interfaces.VoltageSource(redeclare - Modelica.Blocks.Sources.TimeTable signalSource(table=table)); + extends Interfaces.VoltageSource(redeclare Modelica.Blocks.Sources.TimeTable signalSource(table + =table)); annotation ( - Icon(Line(points=[-66, -36; -66, 84; 34, 84; 34, -36; -66, -36; -66, -6 - ; 34, -6; 34, 24; -66, 24; -66, 54; 34, 54; 34, 84; -16, 84; -16 - , -37], style(color=8))), + Icon(Line(points=[-66, -36; -66, 84; 34, 84; 34, -36; -66, -36; -66, -6; + 34, -6; 34, 24; -66, 24; -66, 54; 34, 54; 34, 84; -16, 84; -16, - + 37], style(color=8))), Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Window( - x=0.25, - y=0.01, - width=0.72, - height=0.86), + x=0.25, + y=0.01, + width=0.72, + height=0.86), Diagram( - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-80, 68; -80, -80], style(color=8)), - Line(points=[-90, -70; 82, -70], style(color=8)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-80, 68; -80, -80], style(color=8)), + Line(points=[-90, -70; 82, -70], style(color=8)), Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Rectangle(extent=[-20, 90; 30, -30], style( - color=7, - fillColor=8, - fillPattern=1)), - Line(points=[-20, -30; -20, 90; 80, 90; 80, -30; -20, -30; -20, 0; 80 - , 0; 80, 30; -20, 30; -20, 60; 80, 60; 80, 90; 30, 90; 30, -31], - style(color=0)), - Text( - extent=[-77, -42; -38, -58], - string="offset", - style(color=9)), + color=7, + fillColor=8, + fillPattern=1)), + Line(points=[-20, -30; -20, 90; 80, 90; 80, -30; -20, -30; -20, 0; 80, + 0; 80, 30; -20, 30; -20, 60; 80, 60; 80, 90; 30, 90; 30, -31], + style(color=0)), + Text( + extent=[-77, -42; -38, -58], + string="offset", + style(color=9)), Polygon(points=[-31, -30; -33, -40; -28, -40; -31, -30], style( - color=8, - fillColor=8, - fillPattern=1)), - Polygon(points=[-30, -70; -33, -60; -28, -60; -30, -70; -30, -70], + color=8, + fillColor=8, + fillPattern=1)), + Polygon(points=[-30, -70; -33, -60; -28, -60; -30, -70; -30, -70], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Line(points=[-31, -31; -31, -70], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), - Line(points=[-20, -20; -20, -70], style(color=8, pattern=2)), - Text( - extent=[-38, -70; 8, -88], - string="startTime", - style(color=9)), - Line(points=[-20, -30; -80, -30], style(color=8, pattern=2)), - Text( - extent=[66, -81; 91, -93], - string="time", - style(color=9)), - Text( - extent=[-15, 83; 24, 68], - string="time", - style(color=0)), - Text( - extent=[33, 83; 76, 67], - string="v", - style(color=0)), - Text( - extent=[-81, 98; -31, 85], - string="v = p.v - n.v", - style(color=9))), + color=8, + pattern=1, + thickness=1, + arrow=0)), + Line(points=[-20, -20; -20, -70], style(color=8, pattern=2)), + Text( + extent=[-38, -70; 8, -88], + string="startTime", + style(color=9)), + Line(points=[-20, -30; -80, -30], style(color=8, pattern=2)), + Text( + extent=[66, -81; 91, -93], + string="time", + style(color=9)), + Text( + extent=[-15, 83; 24, 68], + string="time", + style(color=0)), + Text( + extent=[33, 83; 76, 67], + string="v", + style(color=0)), + Text( + extent=[-81, 98; -31, 85], + string="v = p.v - n.v", + style(color=9))), Documentation(info="

This block generates a voltage source by linear interpolation in -a table. The time points and voltage values are stored in a matrix -table[i,j], where the first column table[:,1] contains the -time points and the second column contains the voltage to be interpolated. +a table. The time points and voltage values are stored in a matrix +table[i,j], where the first column table[:,1] contains the +time points and the second column contains the voltage to be interpolated. The table interpolation has the following proporties:

@@ -1056,17 +1033,17 @@ The table interpolation has the following proporties:
  • The time points need to be monotonically increasing.
  • Discontinuities are allowed, by providing the same time point twice in the table.
  • -
  • Values outside of the table range, are computed by +
  • Values outside of the table range, are computed by extrapolation through the last or first two points of the table.
  • If the table has only one row, no interpolation is performed and - the voltage value is just returned independantly of the + the voltage value is just returned independantly of the actual time instant, i.e., this is a constant voltage source.
  • Via parameters startTime and offset the curve defined by the table can be shifted both in time and in the voltage. -
  • The table is implemented in a numerically sound way by +
  • The table is implemented in a numerically sound way by generating time events at interval boundaries, - in order to not integrate over a discontinuous or not differentiable + in order to not integrate over a discontinuous or not differentiable points.
  • @@ -1089,940 +1066,918 @@ If, e.g., time = 1.0, the voltage v = 0.0 (before event), 1.0 (after event) e.g., time = 5.0, the voltage v = 23.0 (i.e. extrapolation).
    - + ")); end TableVoltage; - - model SignalCurrent - "Generic current source using the input signal as source current" - extends Modelica.Electrical.Analog.Interfaces.OnePort; - + + model SignalCurrent + "Generic current source using the input signal as source current" + extends Interfaces.OnePort; + annotation ( Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Icon( - Ellipse(extent=[-50, 50; 50, -50], style(fillColor=7)), - Line(points=[-90, 0; -50, 0]), - Line(points=[50, 0; 90, 0]), - Line(points=[0, -50; 0, 50]), - Text(extent=[-100, -120; 100, -80], string="%name")), + Ellipse(extent=[-50, 50; 50, -50], style(fillColor=7)), + Line(points=[-90, 0; -50, 0]), + Line(points=[50, 0; 90, 0]), + Line(points=[0, -50; 0, 50]), + Text(extent=[-100, -120; 100, -80], string="%name")), Window( - x=0.39, - y=0.19, - width=0.6, + x=0.39, + y=0.19, + width=0.6, height=0.6)); - Modelica.Blocks.Interfaces.InPort inPort(final n=1) annotation (extent=[- - 20, 51; 19, 90], rotation=-90); - equation + Modelica.Blocks.Interfaces.InPort inPort(final n=1) annotation (extent=[-20, 51; 19, 90], rotation + =-90); + equation i = inPort.signal[1]; end SignalCurrent; - - model ConstantCurrent "Source for constant current" - parameter Modelica.SIunits.Current I=1 "Value of constant current"; - extends Modelica.Electrical.Analog.Interfaces.OnePort; + + model ConstantCurrent "Source for constant current" + parameter SI.Current I=1 "Value of constant current"; + extends Interfaces.OnePort; annotation ( Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Icon( - Ellipse(extent=[-50, 50; 50, -50], style(color=3, fillColor=7)), - Line(points=[-90, 0; -50, 0]), - Line(points=[50, 0; 90, 0]), - Line(points=[0, -50; 0, 50]), - Text(extent=[-100, -120; 100, -80], string="%name=%I")), + Ellipse(extent=[-50, 50; 50, -50], style(color=3, fillColor=7)), + Line(points=[-90, 0; -50, 0]), + Line(points=[50, 0; 90, 0]), + Line(points=[0, -50; 0, 50]), + Text(extent=[-100, -120; 100, -80], string="%name=%I")), Window( - x=0.33, - y=0.24, - width=0.6, + x=0.33, + y=0.24, + width=0.6, height=0.6)); - equation + equation i = I; end ConstantCurrent; - - model StepCurrent "Step current source" - parameter Modelica.SIunits.Current I=1 "Height of step"; - extends Modelica.Electrical.Analog.Interfaces.CurrentSource(redeclare - Modelica.Blocks.Sources.Step signalSource(height={I})); + + model StepCurrent "Step current source" + parameter SI.Current I=1 "Height of step"; + extends Interfaces.CurrentSource(redeclare Modelica.Blocks.Sources.Step signalSource(height={I} + )); annotation ( Icon(Line(points=[-80, -70; -10, -70; -10, 70; 59, 70], style(color=8))) - , + , Diagram( - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-80, 68; -80, -80], style(color=8)), - Line(points=[-80, -18; 0, -18; 0, 50; 80, 50], style(color=0, - thickness=2)), - Line(points=[-90, -70; 82, -70], style(color=8)), - Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style(color=8, - fillColor=8)), - Text( - extent=[70, -80; 94, -100], - string="time", - style(color=9)), - Text( - extent=[-21, -72; 25, -90], - string="startTime", - style(color=9)), - Line(points=[0, -17; 0, -71], style(color=8, pattern=2)), - Text( - extent=[-68, -36; -22, -54], - string="offset", - style(color=9)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-80, 68; -80, -80], style(color=8)), + Line(points=[-80, -18; 0, -18; 0, 50; 80, 50], style(color=0, thickness + =2)), + Line(points=[-90, -70; 82, -70], style(color=8)), + Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style(color=8, + fillColor=8)), + Text( + extent=[70, -80; 94, -100], + string="time", + style(color=9)), + Text( + extent=[-21, -72; 25, -90], + string="startTime", + style(color=9)), + Line(points=[0, -17; 0, -71], style(color=8, pattern=2)), + Text( + extent=[-68, -36; -22, -54], + string="offset", + style(color=9)), Line(points=[-13, 50; -13, -17], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), - Polygon(points=[2, 50; -19, 50; 2, 50], style(color=8, pattern=2)), - Polygon(points=[-13, -17; -16, -4; -10, -4; -13, -17; -13, -17], style - ( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + pattern=1, + thickness=1, + arrow=0)), + Polygon(points=[2, 50; -19, 50; 2, 50], style(color=8, pattern=2)), + Polygon(points=[-13, -17; -16, -4; -10, -4; -13, -17; -13, -17], style( + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[-13, 50; -16, 37; -9, 37; -13, 50], style( - color=8, - fillColor=8, - fillPattern=1)), - Text( - extent=[-68, 26; -22, 8], - string="I", - style(color=9)), - Polygon(points=[-13, -69; -16, -56; -10, -56; -13, -69; -13, -69], + color=8, + fillColor=8, + fillPattern=1)), + Text( + extent=[-68, 26; -22, 8], + string="I", + style(color=9)), + Polygon(points=[-13, -69; -16, -56; -10, -56; -13, -69; -13, -69], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Line(points=[-13, -18; -13, -70], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), + color=8, + pattern=1, + thickness=1, + arrow=0)), Polygon(points=[-13, -18; -16, -31; -9, -31; -13, -18], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Text( - extent=[-73, 75; -53, 95], - string="i", - style(color=8))), + extent=[-73, 75; -53, 95], + string="i", + style(color=8))), Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Window( - x=0.28, - y=0, - width=0.72, + x=0.28, + y=0, + width=0.72, height=0.73)); end StepCurrent; - - model RampCurrent "Ramp current source" - parameter Modelica.SIunits.Current I=1 "Height of ramp"; - parameter Modelica.SIunits.Time duration(min=Modelica.Constants.SMALL) = 2 - "Duration of ramp"; - extends Modelica.Electrical.Analog.Interfaces.CurrentSource(redeclare - Modelica.Blocks.Sources.Ramp signalSource(final height={I}, final - duration={duration})); + + model RampCurrent "Ramp current source" + parameter SI.Current I=1 "Height of ramp"; + parameter SI.Time duration(min=Modelica.Constants.small) = 2 "Duration of ramp"; + extends Interfaces.CurrentSource(redeclare Modelica.Blocks.Sources.Ramp signalSource(final + height={I}, final duration={duration})); annotation ( Diagram( - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-80, 68; -80, -80], style(color=8)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-80, 68; -80, -80], style(color=8)), Line(points=[-80, -20; -20, -20; 50, 50], style(color=0, thickness=2)) - , - Line(points=[-90, -70; 82, -70], style(color=8)), + , + Line(points=[-90, -70; 82, -70], style(color=8)), Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[-40, -20; -42, -30; -37, -30; -40, -20], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Line(points=[-40, -20; -40, -70], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), - Polygon(points=[-40, -70; -43, -60; -38, -60; -40, -70; -40, -70], + color=8, + pattern=1, + thickness=1, + arrow=0)), + Polygon(points=[-40, -70; -43, -60; -38, -60; -40, -70; -40, -70], style( - color=8, - fillColor=8, - fillPattern=1)), - Text( - extent=[-80, -33; -41, -49], - string="offset", - style(color=9)), - Text( - extent=[-40, -70; 6, -88], - string="startTime", - style(color=9)), - Text( - extent=[70, -80; 94, -100], - string="time", - style(color=9)), - Line(points=[-20, -20; -20, -70], style(color=8, pattern=2)), + color=8, + fillColor=8, + fillPattern=1)), + Text( + extent=[-80, -33; -41, -49], + string="offset", + style(color=9)), + Text( + extent=[-40, -70; 6, -88], + string="startTime", + style(color=9)), + Text( + extent=[70, -80; 94, -100], + string="time", + style(color=9)), + Line(points=[-20, -20; -20, -70], style(color=8, pattern=2)), Line(points=[-19, -20; 50, -20], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), - Line(points=[50, 50; 101, 50], style(color=0, thickness=2)), + color=8, + pattern=1, + thickness=1, + arrow=0)), + Line(points=[50, 50; 101, 50], style(color=0, thickness=2)), Line(points=[50, 50; 50, -20], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), + color=8, + pattern=1, + thickness=1, + arrow=0)), Polygon(points=[50, -20; 42, -18; 42, -22; 50, -20], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[-20, -20; -11, -18; -11, -22; -20, -20], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[50, 50; 48, 40; 53, 40; 50, 50], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[50, -20; 47, -10; 52, -10; 50, -20; 50, -20], style( - color=8, - fillColor=8, - fillPattern=1)), - Text( - extent=[53, 25; 82, 7], - string="I", - style(color=9)), - Text( - extent=[0, -17; 35, -37], - string="duration", - style(color=9)), - Text( - extent=[-73, 75; -53, 95], - string="i", - style(color=8))), - Icon(Line(points=[-80, -60; -50, -60; 50, 60; 80, 60], style(color=8))) - , + color=8, + fillColor=8, + fillPattern=1)), + Text( + extent=[53, 25; 82, 7], + string="I", + style(color=9)), + Text( + extent=[0, -17; 35, -37], + string="duration", + style(color=9)), + Text( + extent=[-73, 75; -53, 95], + string="i", + style(color=8))), + Icon(Line(points=[-80, -60; -50, -60; 50, 60; 80, 60], style(color=8))), Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Window( - x=0.29, - y=0.11, - width=0.6, + x=0.29, + y=0.11, + width=0.6, height=0.6)); end RampCurrent; - - model SineCurrent "Sine current source" - parameter Modelica.SIunits.Current I=1 "Amplitude of sine wave"; - parameter Modelica.SIunits.Angle phase=0 "Phase of sine wave"; - parameter Modelica.SIunits.Frequency freqHz=1 "Frequency of sine wave"; - extends Modelica.Electrical.Analog.Interfaces.CurrentSource(redeclare - Modelica.Blocks.Sources.Sine signalSource( - amplitude={I}, - freqHz={freqHz}, - phase={phase}, - offset={offset}, - startTime={startTime})); + + model SineCurrent "Sine current source" + parameter SI.Current I=1 "Amplitude of sine wave"; + parameter SI.Angle phase=0 "Phase of sine wave"; + parameter SI.Frequency freqHz=1 "Frequency of sine wave"; + extends Interfaces.CurrentSource(redeclare Modelica.Blocks.Sources.Sine signalSource( + amplitude={I}, + freqHz={freqHz}, + phase={phase})); annotation ( Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Window( - x=0.37, - y=0.06, - width=0.6, - height=0.6), - Icon(Line(points=[-70, 0; -60.2, 29.9; -53.8, 46.5; -48.2, 58.1; -43.3, - 65.2; -38.3, 69.2; -33.4, 69.8; -28.5, 67; -23.6, 61; -18.6, 52; + x=0.37, + y=0.06, + width=0.6, + height=0.6), + Icon(Line(points=[-70, 0; -60.2, 29.9; -53.8, 46.5; -48.2, 58.1; -43.3, + 65.2; -38.3, 69.2; -33.4, 69.8; -28.5, 67; -23.6, 61; -18.6, 52; -13, 38.6; -5.98, 18.6; 8.79, -26.9; 15.1, -44; 20.8, -56.2; 25.7 , -64; 30.6, -68.6; 35.5, -70; 40.5, -67.9; 45.4, -62.5; 50.3, - - 54.1; 55.9, -41.3; 63, -21.7; 70, 0], style(color=8))), + 54.1; 55.9, -41.3; 63, -21.7; 70, 0], style(color=8))), Diagram( - Line(points=[-80, -90; -80, 84], style(color=8)), - Polygon(points=[-80, 100; -86, 84; -74, 84; -80, 100], style(color=8, - fillColor=8)), - Line(points=[-99, -40; 85, -40], style(color=8)), - Polygon(points=[101, -40; 85, -34; 85, -46; 101, -40], style(color=8, - fillColor=8)), - Line(points=[-40, 0; -31.6, 34.2; -26.1, 53.1; -21.3, 66.4; -17.1, - 74.6; -12.9, 79.1; -8.64, 79.8; -4.42, 76.6; -0.201, 69.7; 4.02, - 59.4; 8.84, 44.1; 14.9, 21.2; 27.5, -30.8; 33, -50.2; 37.8, -64.2 - ; 42, -73.1; 46.2, -78.4; 50.5, -80; 54.7, -77.6; 58.9, -71.5; - 63.1, -61.9; 67.9, -47.2; 74, -24.8; 80, 0], style(color=0, - thickness=2)), - Line(points=[-41, -2; -80, -2], style(color=0, thickness=2)), - Text( - extent=[-106, -11; -60, -29], - string="offset", - style(color=9)), - Line(points=[-41, -2; -41, -40], style(color=8, pattern=2)), - Text( - extent=[-60, -43; -14, -61], - string="startTime", - style(color=9)), - Text( - extent=[84, -52; 108, -72], - string="time", - style(color=9)), - Line(points=[-9, 79; 43, 79], style(color=8, pattern=2)), - Line(points=[-42, -1; 50, 0], style(color=8, pattern=2)), + Line(points=[-80, -90; -80, 84], style(color=8)), + Polygon(points=[-80, 100; -86, 84; -74, 84; -80, 100], style(color=8, + fillColor=8)), + Line(points=[-99, -40; 85, -40], style(color=8)), + Polygon(points=[101, -40; 85, -34; 85, -46; 101, -40], style(color=8, + fillColor=8)), + Line(points=[-40, 0; -31.6, 34.2; -26.1, 53.1; -21.3, 66.4; -17.1, 74.6 + ; -12.9, 79.1; -8.64, 79.8; -4.42, 76.6; -0.201, 69.7; 4.02, 59.4 + ; 8.84, 44.1; 14.9, 21.2; 27.5, -30.8; 33, -50.2; 37.8, -64.2; 42 + , -73.1; 46.2, -78.4; 50.5, -80; 54.7, -77.6; 58.9, -71.5; 63.1, + -61.9; 67.9, -47.2; 74, -24.8; 80, 0], style(color=0, thickness=2 + )), + Line(points=[-41, -2; -80, -2], style(color=0, thickness=2)), + Text( + extent=[-106, -11; -60, -29], + string="offset", + style(color=9)), + Line(points=[-41, -2; -41, -40], style(color=8, pattern=2)), + Text( + extent=[-60, -43; -14, -61], + string="startTime", + style(color=9)), + Text( + extent=[84, -52; 108, -72], + string="time", + style(color=9)), + Line(points=[-9, 79; 43, 79], style(color=8, pattern=2)), + Line(points=[-42, -1; 50, 0], style(color=8, pattern=2)), Polygon(points=[33, 80; 30, 67; 37, 67; 33, 80], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Text( - extent=[37, 57; 83, 39], - string="I", - style(color=9)), + extent=[37, 57; 83, 39], + string="I", + style(color=9)), Polygon(points=[33, 1; 30, 14; 36, 14; 33, 1; 33, 1], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Line(points=[33, 79; 33, 0], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), + color=8, + pattern=1, + thickness=1, + arrow=0)), Text( - extent=[-73, 82; -53, 102], - string="i", + extent=[-73, 82; -53, 102], + string="i", style(color=8)))); end SineCurrent; - - model ExpSineCurrent "Exponentially damped sine current source" + + model ExpSineCurrent "Exponentially damped sine current source" parameter Real I=1 "Amplitude of sine wave"; - parameter Modelica.SIunits.Frequency freqHz=2 "Frequency of sine wave"; - parameter Modelica.SIunits.Angle phase=0 "Phase of sine wave"; - parameter Modelica.SIunits.Damping damping=1 - "Damping coefficient of sine wave"; - extends Modelica.Electrical.Analog.Interfaces.CurrentSource(redeclare - Modelica.Blocks.Sources.ExpSine signalSource( - amplitude={I}, - freqHz={freqHz}, - phase={phase}, - damping={damping}, - offset={offset}, - startTime={startTime})); + parameter SI.Frequency freqHz=2 "Frequency of sine wave"; + parameter SI.Angle phase=0 "Phase of sine wave"; + parameter SI.Damping damping=1 "Damping coefficient of sine wave"; + extends Interfaces.CurrentSource(redeclare Modelica.Blocks.Sources.ExpSine signalSource( + amplitude={I}, + freqHz={freqHz}, + phase={phase}, + damping={damping})); annotation ( - Icon(Line(points=[-80, -14; -75.2, 18.3; -72, 36.3; -68.7, 50.5; -65.5, - 60.2; -62.3, 65.3; -59.1, 65.6; -55.9, 61.3; -52.7, 53.1; -48.6, + Icon(Line(points=[-80, -14; -75.2, 18.3; -72, 36.3; -68.7, 50.5; -65.5, + 60.2; -62.3, 65.3; -59.1, 65.6; -55.9, 61.3; -52.7, 53.1; -48.6, 38.2; -43, 11.8; -35, -27.9; -30.2, -47.7; -26.1, -59.9; -22.1, - - 67.2; -18.1, -69.3; -14.1, -66.5; -10.1, -59.3; -5.23, -46.1; - 8.44, -0.3; 13.3, 12.4; 18.1, 20.8; 22.1, 24; 26.9, 23.2; 31.8, + 67.2; -18.1, -69.3; -14.1, -66.5; -10.1, -59.3; -5.23, -46.1; + 8.44, -0.3; 13.3, 12.4; 18.1, 20.8; 22.1, 24; 26.9, 23.2; 31.8, 17.8; 38.2, 5.4; 51.1, -24.5; 57.5, -35.2; 63.1, -39.9; 68.7, - - 39.9; 75.2, -34.5; 80, -27.8], style(color=8))), + 39.9; 75.2, -34.5; 80, -27.8], style(color=8))), Diagram( - Line(points=[-80, -90; -80, 84], style(color=8)), - Polygon(points=[-80, 100; -86, 84; -74, 84; -80, 100], style(color=8, - fillColor=8)), - Line(points=[-99, -40; 85, -40], style(color=8)), - Polygon(points=[101, -40; 85, -34; 85, -46; 101, -40], style(color=8, - fillColor=8)), - Line(points=[-50, 0; -46.1, 28.2; -43.5, 44; -40.9, 56.4; -38.2, 64.9 - ; -35.6, 69.4; -33, 69.6; -30.4, 65.9; -27.8, 58.7; -24.5, 45.7; - -19.9, 22.5; -13.4, -12.2; -9.5, -29.5; -6.23, -40.1; -2.96, - - 46.5; 0.302, -48.4; 3.57, -45.9; 6.83, -39.6; 10.8, -28.1; 21.9, - 12; 25.8, 23.1; 29.7, 30.5; 33, 33.3; 36.9, 32.5; 40.8, 27.8; 46 - , 16.9; 56.5, -9.2; 61.7, -18.6; 66.3, -22.7; 70.9, -22.6; 76.1, - -18; 80, -12.1], style(color=0, thickness=2)), - Text( - extent=[-78, 1; -55, -19], - string="offset", - style(color=9)), - Text( - extent=[-72, -36; -26, -54], - string="startTime", - style(color=9)), - Text( - extent=[84, -52; 108, -72], - string="time", - style(color=9)), - Line(points=[-50, 0; 18, 0], style(color=8, pattern=2)), - Line(points=[-50, 0; -81, 0], style(color=0, thickness=2)), - Line(points=[-50, 77; -50, 0], style(color=8, pattern=2)), - Line(points=[18, -1; 18, 76], style(color=8, pattern=2)), - Line(points=[18, 73; -50, 73], style(color=8)), - Text( - extent=[-42, 88; 9, 74], - string="1/freqHz", - style(color=9)), + Line(points=[-80, -90; -80, 84], style(color=8)), + Polygon(points=[-80, 100; -86, 84; -74, 84; -80, 100], style(color=8, + fillColor=8)), + Line(points=[-99, -40; 85, -40], style(color=8)), + Polygon(points=[101, -40; 85, -34; 85, -46; 101, -40], style(color=8, + fillColor=8)), + Line(points=[-50, 0; -46.1, 28.2; -43.5, 44; -40.9, 56.4; -38.2, 64.9; + -35.6, 69.4; -33, 69.6; -30.4, 65.9; -27.8, 58.7; -24.5, 45.7; - + 19.9, 22.5; -13.4, -12.2; -9.5, -29.5; -6.23, -40.1; -2.96, -46.5 + ; 0.302, -48.4; 3.57, -45.9; 6.83, -39.6; 10.8, -28.1; 21.9, 12; + 25.8, 23.1; 29.7, 30.5; 33, 33.3; 36.9, 32.5; 40.8, 27.8; 46, + 16.9; 56.5, -9.2; 61.7, -18.6; 66.3, -22.7; 70.9, -22.6; 76.1, - + 18; 80, -12.1], style(color=0, thickness=2)), + Text( + extent=[-78, 1; -55, -19], + string="offset", + style(color=9)), + Text( + extent=[-72, -36; -26, -54], + string="startTime", + style(color=9)), + Text( + extent=[84, -52; 108, -72], + string="time", + style(color=9)), + Line(points=[-50, 0; 18, 0], style(color=8, pattern=2)), + Line(points=[-50, 0; -81, 0], style(color=0, thickness=2)), + Line(points=[-50, 77; -50, 0], style(color=8, pattern=2)), + Line(points=[18, -1; 18, 76], style(color=8, pattern=2)), + Line(points=[18, 73; -50, 73], style(color=8)), + Text( + extent=[-42, 88; 9, 74], + string="1/freqHz", + style(color=9)), Polygon(points=[-49, 73; -40, 75; -40, 71; -49, 73], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[18, 73; 10, 75; 10, 71; 18, 73], style( - color=8, - fillColor=8, - fillPattern=1)), - Line(points=[-50, -61; -19, -61], style(color=8)), + color=8, + fillColor=8, + fillPattern=1)), + Line(points=[-50, -61; -19, -61], style(color=8)), Polygon(points=[-18, -61; -26, -59; -26, -63; -18, -61], style( - color=8, - fillColor=8, - fillPattern=1)), - Text( - extent=[-51, -63; -27, -75], - string="t", - style(color=9)), - Text( - extent=[-82, -67; 108, -96], - string="I*exp(-damping*t)*sin(2*pi*freqHz*t+phase)", - style(color=9)), - Line(points=[-50, 0; -50, -40], style(color=8, pattern=2)), - Line(points=[-50, -54; -50, -72], style(color=8, pattern=2)), - Line(points=[18, -76; -1, -48], style(color=8, pattern=2)), - Text( - extent=[-74, 83; -54, 103], - string="i", - style(color=8))), + color=8, + fillColor=8, + fillPattern=1)), + Text( + extent=[-51, -63; -27, -75], + string="t", + style(color=9)), + Text( + extent=[-82, -67; 108, -96], + string="I*exp(-damping*t)*sin(2*pi*freqHz*t+phase)", + style(color=9)), + Line(points=[-50, 0; -50, -40], style(color=8, pattern=2)), + Line(points=[-50, -54; -50, -72], style(color=8, pattern=2)), + Line(points=[18, -76; -1, -48], style(color=8, pattern=2)), + Text( + extent=[-74, 83; -54, 103], + string="i", + style(color=8))), Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Window( - x=0.33, - y=0.06, - width=0.6, + x=0.33, + y=0.06, + width=0.6, height=0.75)); end ExpSineCurrent; - - model ExponentialsCurrent " Rising and falling exponential current source" + + model ExponentialsCurrent " Rising and falling exponential current source" parameter Real iMax=1 "Upper bound for rising edge"; - parameter Modelica.SIunits.Time riseTime(min=0) = 0.5 "Rise time"; - parameter Modelica.SIunits.Time riseTimeConst(min=Modelica.Constants.SMALL - ) = 0.1 "Rise time constant"; - parameter Modelica.SIunits.Time fallTimeConst(min=Modelica.Constants.SMALL - ) = riseTimeConst "Fall time constant"; - extends Modelica.Electrical.Analog.Interfaces.CurrentSource(redeclare - Modelica.Blocks.Sources.Exponentials signalSource( - outMax={iMax}, - riseTime={riseTime}, - riseTimeConst={riseTimeConst}, + parameter SI.Time riseTime(min=0) = 0.5 "Rise time"; + parameter SI.Time riseTimeConst(min=Modelica.Constants.small) = 0.1 + "Rise time constant"; + parameter SI.Time fallTimeConst(min=Modelica.Constants.small) = riseTimeConst + "Fall time constant"; + extends Interfaces.CurrentSource(redeclare Modelica.Blocks.Sources.Exponentials signalSource( + outMax={iMax}, + riseTime={riseTime}, + riseTimeConst={riseTimeConst}, fallTimeConst={fallTimeConst})); annotation ( Icon(Line(points=[-76, -59; -73.2, -44.3; -70.3, -31.1; -66.8, -16.6; - 63.3, -4; -59.7, 6.92; -55.5, 18.18; -51.3, 27.7; -46.3, 37; - 40.6, 45.5; -34.3, 53.1; -27.2, 59.6; -18.7, 65.3; -8.1, 70.2; -6 - , 71; -3.88, 58.5; -1.05, 43.7; 1.78, 30.8; 4.606, 19.45; 8.14, + , 71; -3.88, 58.5; -1.05, 43.7; 1.78, 30.8; 4.606, 19.45; 8.14, 7.3; 11.68, -3; 15.9, -13.2; 20.2, -21.6; 25.1, -29.5; 30.8, - 36.4; 37.1, -42.3; 44.9, -47.5; 54.8, -51.8; 64, -54.4], style( - color=8))), + color=8))), Diagram( - Line(points=[-100, -70; 84, -70], style(color=8)), - Polygon(points=[100, -70; 84, -64; 84, -76; 100, -70], style(color=8, - fillColor=8)), - Line(points=[-40, -30; -37.2, -15.3; -34.3, -2.1; -30.8, 12.4; -27.3, - 25; -23.7, 35.92; -19.5, 47.18; -15.3, 56.7; -10.3, 66; -4.6, - 74.5; 1.7, 82.1; 8.8, 88.6; 17.3, 94.3; 27.9, 99.2; 30, 100; + Line(points=[-100, -70; 84, -70], style(color=8)), + Polygon(points=[100, -70; 84, -64; 84, -76; 100, -70], style(color=8, + fillColor=8)), + Line(points=[-40, -30; -37.2, -15.3; -34.3, -2.1; -30.8, 12.4; -27.3, + 25; -23.7, 35.92; -19.5, 47.18; -15.3, 56.7; -10.3, 66; -4.6, + 74.5; 1.7, 82.1; 8.8, 88.6; 17.3, 94.3; 27.9, 99.2; 30, 100; 32.12, 87.5; 34.95, 72.7; 37.78, 59.8; 40.606, 48.45; 44.14, 36.3 ; 47.68, 26; 51.9, 15.8; 56.2, 7.4; 61.1, -0.5; 66.8, -7.4; 73.1 - , -13.3; 80.9, -18.5; 90.8, -22.8; 100, -25.4], style(color=0, - thickness=2)), - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-80, 68; -80, -80], style(color=8)), - Polygon(points=[-40, -70; -43, -60; -38, -60; -40, -70; -40, -70], + , -13.3; 80.9, -18.5; 90.8, -22.8; 100, -25.4], style(color=0, + thickness=2)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-80, 68; -80, -80], style(color=8)), + Polygon(points=[-40, -70; -43, -60; -38, -60; -40, -70; -40, -70], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Line(points=[-40, -29; -40, -60], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), + color=8, + pattern=1, + thickness=1, + arrow=0)), Polygon(points=[-40, -30; -42, -40; -37, -40; -40, -30], style( - color=8, - fillColor=8, - fillPattern=1)), - Line(points=[-39, -30; -80, -30], style(color=0, thickness=2)), - Text( - extent=[-59, -71; -13, -89], - string="startTime", - style(color=9)), + color=8, + fillColor=8, + fillPattern=1)), + Line(points=[-39, -30; -80, -30], style(color=0, thickness=2)), + Text( + extent=[-59, -71; -13, -89], + string="startTime", + style(color=9)), Polygon(points=[-41, -30; -32, -28; -32, -32; -41, -30], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Line(points=[-40, -30; 29, -30], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), + color=8, + pattern=1, + thickness=1, + arrow=0)), Polygon(points=[29, -30; 21, -28; 21, -32; 29, -30], style( - color=8, - fillColor=8, - fillPattern=1)), - Text( - extent=[-26, -12; 19, -28], - string="riseTime", - style(color=9)), - Line(points=[-39, -30; -80, -30], style(color=0, thickness=2)), - Line(points=[30, 100; 30, -34], style(color=8, pattern=2)), - Text( - extent=[-73, 75; -53, 95], - string="i", - style(color=8))), + color=8, + fillColor=8, + fillPattern=1)), + Text( + extent=[-26, -12; 19, -28], + string="riseTime", + style(color=9)), + Line(points=[-39, -30; -80, -30], style(color=0, thickness=2)), + Line(points=[30, 100; 30, -34], style(color=8, pattern=2)), + Text( + extent=[-73, 75; -53, 95], + string="i", + style(color=8))), Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Window( - x=0.11, - y=0.12, - width=0.78, + x=0.11, + y=0.12, + width=0.78, height=0.83)); end ExponentialsCurrent; - - model PulseCurrent "Pulse current source" - parameter Modelica.SIunits.Current I=1 "Amplitude of pulse"; + + model PulseCurrent "Pulse current source" + parameter SI.Current I=1 "Amplitude of pulse"; parameter Real width( - final min=Modelica.Constants.SMALL, + final min=Modelica.Constants.small, final max=100) = 50 "Width of pulse in % of period"; - parameter Modelica.SIunits.Time period(final min=Modelica.Constants.SMALL) - = 1 "Time for one period"; - extends Modelica.Electrical.Analog.Interfaces.CurrentSource(redeclare - Modelica.Blocks.Sources.Pulse signalSource( - amplitude={I}, - width={width}, + parameter SI.Time period(final min=Modelica.Constants.small) = 1 + "Time for one period"; + extends Interfaces.CurrentSource(redeclare Modelica.Blocks.Sources.Pulse signalSource( + amplitude={I}, + width={width}, period={period})); annotation ( - Icon(Line(points=[-70, -70; -40, -70; -40, 70; 0, 70; 0, -70; 40, -70; - 41, 70; 80, 70], style(color=8))), + Icon(Line(points=[-70, -70; -40, -70; -40, 70; 0, 70; 0, -70; 40, -70; 41 + , 70; 80, 70], style(color=8))), Diagram( - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-80, 68; -80, -80], style(color=8)), - Line(points=[-90, -70; 82, -70], style(color=8)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-80, 68; -80, -80], style(color=8)), + Line(points=[-90, -70; 82, -70], style(color=8)), Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[-34, 1; -37, -12; -30, -12; -34, 1], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Line(points=[-34, -1; -34, -70], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), - Polygon(points=[-33, -70; -36, -57; -30, -57; -33, -70; -33, -70], + color=8, + pattern=1, + thickness=1, + arrow=0)), + Polygon(points=[-33, -70; -36, -57; -30, -57; -33, -70; -33, -70], style( - color=8, - fillColor=8, - fillPattern=1)), - Text( - extent=[-78, -24; -35, -36], - string="offset", - style(color=9)), - Text( - extent=[-31, -69; 15, -87], - string="startTime", - style(color=9)), - Text( - extent=[70, -80; 94, -100], - string="time", - style(color=9)), - Line(points=[-10, 0; -10, -70], style(color=8, pattern=2)), - Line(points=[-80, 0; -20, 0; -21, 50; 21, 50; 20, -1; 41, 0; 40, 50; - 80, 51], style(color=0, thickness=2)), - Line(points=[-19, 88; -19, 49], style(color=8, pattern=2)), - Line(points=[21, 74; 21, 50], style(color=9, pattern=2)), - Line(points=[41, 88; 41, 50], style(color=8, pattern=2)), - Line(points=[-19, 83; 42, 83], style(color=8)), - Line(points=[-19, 69; 21, 69], style(color=8)), - Text( - extent=[-9, 97; 37, 85], - string="period", - style(color=9)), - Text( - extent=[-18, 81; 21, 69], - string="width", - style(color=9)), - Line(points=[-52, 50; -19, 50], style(color=8, pattern=2)), + color=8, + fillColor=8, + fillPattern=1)), + Text( + extent=[-78, -24; -35, -36], + string="offset", + style(color=9)), + Text( + extent=[-31, -69; 15, -87], + string="startTime", + style(color=9)), + Text( + extent=[70, -80; 94, -100], + string="time", + style(color=9)), + Line(points=[-10, 0; -10, -70], style(color=8, pattern=2)), + Line(points=[-80, 0; -20, 0; -21, 50; 21, 50; 20, -1; 41, 0; 40, 50; 80 + , 51], style(color=0, thickness=2)), + Line(points=[-19, 88; -19, 49], style(color=8, pattern=2)), + Line(points=[21, 74; 21, 50], style(color=9, pattern=2)), + Line(points=[41, 88; 41, 50], style(color=8, pattern=2)), + Line(points=[-19, 83; 42, 83], style(color=8)), + Line(points=[-19, 69; 21, 69], style(color=8)), + Text( + extent=[-9, 97; 37, 85], + string="period", + style(color=9)), + Text( + extent=[-18, 81; 21, 69], + string="width", + style(color=9)), + Line(points=[-52, 50; -19, 50], style(color=8, pattern=2)), Line(points=[-34, 50; -34, 1], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), - Text( - extent=[-78, 34; -37, 20], - string="I", - style(color=9)), + color=8, + pattern=1, + thickness=1, + arrow=0)), + Text( + extent=[-78, 34; -37, 20], + string="I", + style(color=9)), Polygon(points=[-34, 49; -37, 36; -30, 36; -34, 49], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[-34, 1; -37, 14; -31, 14; -34, 1; -34, 1], style( - color=8, - fillColor=8, - fillPattern=1)), - Line(points=[80, 51; 80, 0; 90, -1], style(color=0, thickness=2)), + color=8, + fillColor=8, + fillPattern=1)), + Line(points=[80, 51; 80, 0; 90, -1], style(color=0, thickness=2)), Polygon(points=[-19, 69; -10, 71; -10, 67; -19, 69], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[21, 69; 13, 71; 13, 67; 21, 69], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[-19, 83; -10, 85; -10, 81; -19, 83], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[41, 83; 33, 85; 33, 81; 41, 83], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Text( - extent=[-73, 75; -53, 95], - string="i", - style(color=8))), + extent=[-73, 75; -53, 95], + string="i", + style(color=8))), Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Window( - x=0.4, - y=0.23, - width=0.6, + x=0.4, + y=0.23, + width=0.6, height=0.6)); end PulseCurrent; - - model SawToothCurrent "Saw tooth current source" - parameter Modelica.SIunits.Current I=1 "Amplitude of saw tooth"; - parameter Modelica.SIunits.Time period=1 "Time for one period"; - extends Modelica.Electrical.Analog.Interfaces.CurrentSource(redeclare - Modelica.Blocks.Sources.SawTooth signalSource(amplitude={I}, period={ - period})); + + model SawToothCurrent "Saw tooth current source" + parameter SI.Current I=1 "Amplitude of saw tooth"; + parameter SI.Time period=1 "Time for one period"; + extends Interfaces.CurrentSource(redeclare Modelica.Blocks.Sources.SawTooth signalSource( + amplitude={I}, period={period})); annotation ( - Icon(Line(points=[-70, -71; -50, -71; 10, 70; 10, -71; 70, 70; 70, -71] - , style(color=8))), + Icon(Line(points=[-70, -71; -50, -71; 10, 70; 10, -71; 70, 70; 70, -71], + style(color=8))), Diagram( - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-80, 68; -80, -80], style(color=8)), - Line(points=[-90, -70; 82, -70], style(color=8)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-80, 68; -80, -80], style(color=8)), + Line(points=[-90, -70; 82, -70], style(color=8)), Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[-34, -19; -37, -32; -30, -32; -34, -19], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Line(points=[-34, -20; -34, -70], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), - Polygon(points=[-34, -70; -37, -57; -31, -57; -34, -70; -34, -70], + color=8, + pattern=1, + thickness=1, + arrow=0)), + Polygon(points=[-34, -70; -37, -57; -31, -57; -34, -70; -34, -70], style( - color=8, - fillColor=8, - fillPattern=1)), - Text( - extent=[-78, -24; -35, -36], - string="offset", - style(color=9)), - Text( - extent=[-31, -69; 15, -87], - string="startTime", - style(color=9)), - Text( - extent=[70, -80; 94, -100], - string="time", - style(color=9)), - Line(points=[-10, -20; -10, -70], style(color=8, pattern=2)), - Line(points=[-10, 88; -10, -20], style(color=8, pattern=2)), - Line(points=[30, 88; 30, 59], style(color=8, pattern=2)), - Line(points=[-10, 83; 30, 83], style(color=8)), - Text( - extent=[-12, 97; 34, 85], - string="period", - style(color=9)), - Line(points=[-44, 60; 30, 60], style(color=8, pattern=2)), + color=8, + fillColor=8, + fillPattern=1)), + Text( + extent=[-78, -24; -35, -36], + string="offset", + style(color=9)), + Text( + extent=[-31, -69; 15, -87], + string="startTime", + style(color=9)), + Text( + extent=[70, -80; 94, -100], + string="time", + style(color=9)), + Line(points=[-10, -20; -10, -70], style(color=8, pattern=2)), + Line(points=[-10, 88; -10, -20], style(color=8, pattern=2)), + Line(points=[30, 88; 30, 59], style(color=8, pattern=2)), + Line(points=[-10, 83; 30, 83], style(color=8)), + Text( + extent=[-12, 97; 34, 85], + string="period", + style(color=9)), + Line(points=[-44, 60; 30, 60], style(color=8, pattern=2)), Line(points=[-34, 47; -34, -7], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), - Text( - extent=[-78, 34; -37, 20], - string="I", - style(color=9)), + color=8, + pattern=1, + thickness=1, + arrow=0)), + Text( + extent=[-78, 34; -37, 20], + string="I", + style(color=9)), Polygon(points=[-34, 60; -37, 47; -30, 47; -34, 60], style( - color=8, - fillColor=8, - fillPattern=1)), - Polygon(points=[-34, -20; -37, -7; -31, -7; -34, -20; -34, -20], style - ( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), + Polygon(points=[-34, -20; -37, -7; -31, -7; -34, -20; -34, -20], style( + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[-10, 83; -1, 85; -1, 81; -10, 83], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[30, 83; 22, 85; 22, 81; 30, 83], style( - color=8, - fillColor=8, - fillPattern=1)), - Line(points=[-80, -20; -10, -20; 30, 60; 30, -20; 72, 60; 72, -20], - style(color=0, thickness=2)), - Text( - extent=[-73, 75; -53, 95], - string="i", - style(color=8))), + color=8, + fillColor=8, + fillPattern=1)), + Line(points=[-80, -20; -10, -20; 30, 60; 30, -20; 72, 60; 72, -20], + style(color=0, thickness=2)), + Text( + extent=[-73, 75; -53, 95], + string="i", + style(color=8))), Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Window( - x=0.37, - y=0.04, - width=0.6, + x=0.37, + y=0.04, + width=0.6, height=0.6)); end SawToothCurrent; - - model TrapezoidCurrent "Trapezoidal current source" - parameter Modelica.SIunits.Current I=1 "Amplitude of trapezoid"; - parameter Real rising( - final min=0, - final max=100) = 10 "Rising duration of trapezoid in % of period"; - parameter Real width( - final min=0, - final max=100) = 50 "Width of trapezoid in % of period"; - parameter Real falling( - final min=0, - final max=100) = 10 "Falling duration in % of period"; - parameter Modelica.SIunits.Time period(final min=Modelica.Constants.SMALL) - = 1 "Time for one period"; - parameter Integer nperiod=-1 + + model TrapezoidCurrent "Trapezoidal current source" + parameter SI.Current I=1 "Amplitude of trapezoid"; + parameter SI.Time rising(final min=0) = 0 "Rising duration of trapezoid"; + parameter SI.Time width(final min=0) = 0.5 "Width duration of trapezoid"; + parameter SI.Time falling(final min=0) = 0 "Falling duration of trapezoid"; + parameter SI.Time period(final min=Modelica.Constants.small) = 1 + "Time for one period"; + parameter Integer nperiod=-1 "Number of periods (< 0 means infinite number of periods)"; - extends Modelica.Electrical.Analog.Interfaces.CurrentSource(redeclare - Modelica.Blocks.Sources.Trapezoid signalSource( - amplitude={I}, - rising={rising}, - width={width}, - falling={falling}, - period={period}, + extends Interfaces.CurrentSource(redeclare Modelica.Blocks.Sources.Trapezoid signalSource( + amplitude={I}, + rising={rising}, + width={width}, + falling={falling}, + period={period}, nperiod={nperiod})); annotation ( - Icon(Line(points=[-81, -70; -60, -70; -30, 70; 1, 70; 30, -70; 51, -70; - 80, 70], style(color=8))), + Icon(Line(points=[-81, -70; -60, -70; -30, 70; 1, 70; 30, -70; 51, -70; + 80, 70], style(color=8))), Diagram( - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-80, 68; -80, -80], style(color=8)), - Line(points=[-90, -70; 82, -70], style(color=8)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-80, 68; -80, -80], style(color=8)), + Line(points=[-90, -70; 82, -70], style(color=8)), Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[-45, -30; -47, -41; -43, -41; -45, -30], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Line(points=[-45, -31; -45, -70], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), - Polygon(points=[-45, -70; -47, -60; -43, -60; -45, -70; -45, -70], + color=8, + pattern=1, + thickness=1, + arrow=0)), + Polygon(points=[-45, -70; -47, -60; -43, -60; -45, -70; -45, -70], style( - color=8, - fillColor=8, - fillPattern=1)), - Text( - extent=[-86, -43; -43, -55], - string="offset", - style(color=9)), - Text( - extent=[-47, -69; -1, -87], - string="startTime", - style(color=9)), - Text( - extent=[70, -80; 94, -100], - string="time", - style(color=9)), - Line(points=[-29, 79; -30, -70], style(color=8, pattern=2)), - Line(points=[-10, 59; -10, 40], style(color=8, pattern=2)), - Line(points=[20, 59; 20, 39], style(color=9, pattern=2)), - Line(points=[40, 59; 40, -30], style(color=8, pattern=2)), - Line(points=[-20, 75; 60, 75], style(color=8)), - Line(points=[-29, 56; 40, 56], style(color=8)), - Text( - extent=[-9, 88; 37, 76], - string="period", - style(color=9)), - Text( - extent=[-8, 70; 21, 60], - string="width", - style(color=9)), - Line(points=[-42, 40; -10, 40], style(color=8, pattern=2)), + color=8, + fillColor=8, + fillPattern=1)), + Text( + extent=[-86, -43; -43, -55], + string="offset", + style(color=9)), + Text( + extent=[-47, -69; -1, -87], + string="startTime", + style(color=9)), + Text( + extent=[70, -80; 94, -100], + string="time", + style(color=9)), + Line(points=[-29, 79; -30, -70], style(color=8, pattern=2)), + Line(points=[-10, 59; -10, 40], style(color=8, pattern=2)), + Line(points=[20, 59; 20, 39], style(color=9, pattern=2)), + Line(points=[40, 59; 40, -30], style(color=8, pattern=2)), + Line(points=[-20, 75; 60, 75], style(color=8)), + Line(points=[-29, 56; 40, 56], style(color=8)), + Text( + extent=[-9, 88; 37, 76], + string="period", + style(color=9)), + Text( + extent=[-8, 70; 21, 60], + string="width", + style(color=9)), + Line(points=[-42, 40; -10, 40], style(color=8, pattern=2)), Line(points=[-39, 40; -39, -19], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), - Text( - extent=[-77, 14; -40, 0], - string="I", - style(color=9)), + color=8, + pattern=1, + thickness=1, + arrow=0)), + Text( + extent=[-77, 14; -40, 0], + string="I", + style(color=9)), Polygon(points=[-29, 56; -22, 58; -22, 54; -29, 56], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[-10, 56; -17, 58; -17, 54; -10, 56], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[-29, 75; -20, 77; -20, 73; -29, 75], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[60, 75; 52, 77; 52, 73; 60, 75], style( - color=8, - fillColor=8, - fillPattern=1)), - Line(points=[-80, -30; -30, -30; -9, 46; 21, 46; 40, -30; 60, -30; 80 - , 46; 100, 46], style(color=0, thickness=2)), + color=8, + fillColor=8, + fillPattern=1)), + Line(points=[-80, -30; -30, -30; -9, 46; 21, 46; 40, -30; 60, -30; 80, + 46; 100, 46], style(color=0, thickness=2)), Polygon(points=[-39, 40; -41, 29; -37, 29; -39, 40], style( - color=8, - fillColor=8, - fillPattern=1)), - Polygon(points=[-39, -29; -41, -19; -37, -19; -39, -29; -39, -29], + color=8, + fillColor=8, + fillPattern=1)), + Polygon(points=[-39, -29; -41, -19; -37, -19; -39, -29; -39, -29], style( - color=8, - fillColor=8, - fillPattern=1)), - Line(points=[60, 80; 60, -30], style(color=8, pattern=2)), + color=8, + fillColor=8, + fillPattern=1)), + Line(points=[60, 80; 60, -30], style(color=8, pattern=2)), Polygon(points=[39, 56; 32, 58; 32, 54; 39, 56], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[20, 56; 27, 58; 27, 54; 20, 56], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[20, 56; 13, 58; 13, 54; 20, 56], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[-12, 56; -5, 58; -5, 54; -12, 56], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Text( - extent=[-34, 70; -5, 60], - string="rising", - style(color=9)), + extent=[-34, 70; -5, 60], + string="rising", + style(color=9)), Text( - extent=[16, 70; 45, 60], - string="falling", - style(color=9)), + extent=[16, 70; 45, 60], + string="falling", + style(color=9)), Text( - extent=[-73, 75; -53, 95], - string="i", - style(color=8))), + extent=[-73, 75; -53, 95], + string="i", + style(color=8))), Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Window( - x=0.19, - y=0.28, - width=0.6, + x=0.19, + y=0.28, + width=0.6, height=0.63)); end TrapezoidCurrent; - - model TableCurrent "Current source by linear interpolation in a table" - parameter Real table[:, :]=[0, 0; 1, 1; 2, 4] + + model TableCurrent "Current source by linear interpolation in a table" + parameter Real table[:, :]=[0, 0; 1, 1; 2, 4] "Table matrix (time = first column, current = second column)"; - extends Modelica.Electrical.Analog.Interfaces.CurrentSource(redeclare - Modelica.Blocks.Sources.TimeTable signalSource(table=table)); + extends Interfaces.CurrentSource(redeclare Modelica.Blocks.Sources.TimeTable signalSource(table + =table)); annotation ( - Icon(Line(points=[-66, -36; -66, 84; 34, 84; 34, -36; -66, -36; -66, -6 - ; 34, -6; 34, 24; -66, 24; -66, 54; 34, 54; 34, 84; -16, 84; -16 - , -37], style(color=8))), + Icon(Line(points=[-66, -36; -66, 84; 34, 84; 34, -36; -66, -36; -66, -6; + 34, -6; 34, 24; -66, 24; -66, 54; 34, 54; 34, 84; -16, 84; -16, - + 37], style(color=8))), Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Window( - x=0.25, - y=0.01, - width=0.72, - height=0.86), + x=0.25, + y=0.01, + width=0.72, + height=0.86), Diagram( - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-80, 68; -80, -80], style(color=8)), - Line(points=[-90, -70; 82, -70], style(color=8)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-80, 68; -80, -80], style(color=8)), + Line(points=[-90, -70; 82, -70], style(color=8)), Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Rectangle(extent=[-20, 90; 30, -30], style( - color=7, - fillColor=8, - fillPattern=1)), - Line(points=[-20, -30; -20, 90; 80, 90; 80, -30; -20, -30; -20, 0; 80 - , 0; 80, 30; -20, 30; -20, 60; 80, 60; 80, 90; 30, 90; 30, -31], - style(color=0)), - Text( - extent=[-77, -42; -38, -58], - string="offset", - style(color=9)), + color=7, + fillColor=8, + fillPattern=1)), + Line(points=[-20, -30; -20, 90; 80, 90; 80, -30; -20, -30; -20, 0; 80, + 0; 80, 30; -20, 30; -20, 60; 80, 60; 80, 90; 30, 90; 30, -31], + style(color=0)), + Text( + extent=[-77, -42; -38, -58], + string="offset", + style(color=9)), Polygon(points=[-31, -30; -33, -40; -28, -40; -31, -30], style( - color=8, - fillColor=8, - fillPattern=1)), - Polygon(points=[-30, -70; -33, -60; -28, -60; -30, -70; -30, -70], + color=8, + fillColor=8, + fillPattern=1)), + Polygon(points=[-30, -70; -33, -60; -28, -60; -30, -70; -30, -70], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Line(points=[-31, -31; -31, -70], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), - Line(points=[-20, -20; -20, -70], style(color=8, pattern=2)), - Text( - extent=[-38, -70; 8, -88], - string="startTime", - style(color=9)), - Line(points=[-20, -30; -80, -30], style(color=8, pattern=2)), - Text( - extent=[66, -81; 91, -93], - string="time", - style(color=9)), - Text( - extent=[-15, 83; 24, 68], - string="time", - style(color=0)), - Text( - extent=[33, 83; 76, 67], - string="v", - style(color=0)), - Text( - extent=[-73, 75; -53, 95], - string="i", - style(color=8))), + color=8, + pattern=1, + thickness=1, + arrow=0)), + Line(points=[-20, -20; -20, -70], style(color=8, pattern=2)), + Text( + extent=[-38, -70; 8, -88], + string="startTime", + style(color=9)), + Line(points=[-20, -30; -80, -30], style(color=8, pattern=2)), + Text( + extent=[66, -81; 91, -93], + string="time", + style(color=9)), + Text( + extent=[-15, 83; 24, 68], + string="time", + style(color=0)), + Text( + extent=[33, 83; 76, 67], + string="v", + style(color=0)), + Text( + extent=[-73, 75; -53, 95], + string="i", + style(color=8))), Documentation(info="

    This block generates a current source by linear interpolation in -a table. The time points and current values are stored in a matrix -table[i,j], where the first column table[:,1] contains the -time points and the second column contains the current to be interpolated. +a table. The time points and current values are stored in a matrix +table[i,j], where the first column table[:,1] contains the +time points and the second column contains the current to be interpolated. The table interpolation has the following proporties:

    @@ -2030,17 +1985,17 @@ The table interpolation has the following proporties:
  • The time points need to be monotonically increasing.
  • Discontinuities are allowed, by providing the same time point twice in the table.
  • -
  • Values outside of the table range, are computed by +
  • Values outside of the table range, are computed by extrapolation through the last or first two points of the table.
  • If the table has only one row, no interpolation is performed and - the current value is just returned independantly of the + the current value is just returned independantly of the actual time instant, i.e., this is a constant current source.
  • Via parameters startTime and offset the curve defined by the table can be shifted both in time and in the current. -
  • The table is implemented in a numerically sound way by +
  • The table is implemented in a numerically sound way by generating time events at interval boundaries, - in order to not integrate over a discontinuous or not differentiable + in order to not integrate over a discontinuous or not differentiable points.
  • @@ -2063,10 +2018,8 @@ If, e.g., time = 1.0, the current i = 0.0 (before event), 1.0 (after event) e.g., time = 5.0, the current i = 23.0 (i.e. extrapolation).
    - + ")); end TableCurrent; - -end Sources; - +end Sources; diff --git a/Electrical/Analog/package.mo b/Electrical/Analog/package.mo index a7653365cd..a4b290379a 100644 --- a/Electrical/Analog/package.mo +++ b/Electrical/Analog/package.mo @@ -1,20 +1,20 @@ package Analog "Library for analog electrical models" + + +import SI = Modelica.SIunits; + + extends Modelica.Icons.Library2; -annotation ( - Coordsys( - extent=[0, 0; 156, 401], - grid=[1, 1], - component=[20, 20]), - Window( - x=0.06, - y=0.07, + +annotation (Window( + x=0.05, + y=0.06, width=0.16, height=0.58, library=1, autolayout=1), - Documentation(info=" - + Documentation(info="

    This package contains packages for analog electrical components: