Sims.Lib
Examples using models from the Sims standard library (Sims.Lib).
Many of these are patterned after the examples in the Modelica Standard Library.
These are available in Sims.Examples.Lib. Here is an example of use:
using Sims
m = Sims.Examples.Lib.ChuaCircuit()
z = sim(m, 5000.0)
plot(z)
Blocks
PID_Controller
Sims.Examples.Lib.PID_Controller
— Function.Demonstrates the usage of a Continuous.LimPID controller
This is a simple drive train controlled by a PID controller:
The two blocks "kinematic_PTP" and "integrator" are used to generate the reference speed (= constant acceleration phase, constant speed phase, constant deceleration phase until inertia is at rest). To check whether the system starts in steady state, the reference speed is zero until time = 0.5 s and then follows the sketched trajectory. Note: the "kinematic_PTP" isn't used; that comment is based on the Modelica model.
The block "PI" is an instance of "LimPID" which is a PID controller where several practical important aspects, such as anti-windup-compensation has been added. In this case, the control block is used as PI controller.
The output of the controller is a torque that drives a motor inertia "inertia1". Via a compliant spring/damper component, the load inertia "inertia2" is attached. A constant external torque of 10 Nm is acting on the load inertia.
Electrical
CauerLowPassAnalog
Sims.Examples.Lib.CauerLowPassAnalog
— Function.Cauer low-pass filter with analog components
The example Cauer Filter is a low-pass-filter of the fifth order. It is realized using an analog network. The voltage source on n1
is the input voltage (step), and n4
is the filter output voltage. The pulse response is calculated.
CauerLowPassOPV
Sims.Examples.Lib.CauerLowPassOPV
— Function.Cauer low-pass filter with operational amplifiers
The example Cauer Filter is a low-pass-filter of the fifth order. It is realized using an analog network with op amps. The voltage source on n[1]
is the input voltage (step), and n[10]
is the filter output voltage. The pulse response is calculated.
CauerLowPassOPV2
Sims.Examples.Lib.CauerLowPassOPV2
— Function.Cauer low-pass filter with operational amplifiers (alternate implementation)
The example Cauer Filter is a low-pass-filter of the fifth order. It is realized using an analog network with op amps. The voltage source on n1
is the input voltage (step), and n10
is the filter output voltage. The pulse response is calculated.
CharacteristicIdealDiodes
Sims.Examples.Lib.CharacteristicIdealDiodes
— Function.Characteristic of ideal diodes
Three examples of ideal diodes are shown:
The totally ideal diode (Ideal) with all parameters to be zero
The nearly ideal diode with Ron=0.1 and Goff=0.1
The nearly ideal but displaced diode with Vknee=5 and Ron=0.1 and Goff=0.1.
The resistance and conductance are chosen untypically high since the slopes should be seen in the graphics. The voltage across the first diode is (s1 - n1). The current through the first diode is proportional to n1.
ChuaCircuit
Sims.Examples.Lib.ChuaCircuit
— Function.Chua's circuit
Chua's circuit is a 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.
To see the chaotic behaviour, plot n2 versus n3 (the two capacitor voltages).
HeatingResistor
Sims.Examples.Lib.HeatingResistor
— Function.Heating resistor
This is a very simple circuit consisting of a voltage source and a resistor. The loss power in the resistor is transported to the environment via its heatPort.
HeatingRectifier
Sims.Examples.Lib.HeatingRectifier
— Function.Heating rectifier
The heating rectifier shows a heat flow always if the electrical capacitor is loaded.
Rectifier
Sims.Examples.Lib.Rectifier
— Function.B6 diode bridge
The rectifier example shows a B6 diode bridge fed by a three phase sinusoidal voltage, loaded by a DC current. DC capacitors start at ideal no-load voltage, thus making easier initial transient.
ShowSaturatingInductor
Sims.Examples.Lib.ShowSaturatingInductor
— Function.Simple demo to show behaviour of SaturatingInductor component
This simple circuit uses the saturating inductor which has a changing inductivity.
LBL doc link | MapleSoft doc link
NOTE: CURRENTLY BROKEN
ShowVariableResistor
Sims.Examples.Lib.ShowVariableResistor
— Function.Simple demo of a VariableResistor model
It is a simple test circuit for the VariableResistor. The VariableResistor sould be compared with R2. isig1
and isig2
are current monitors
ControlledSwitchWithArc
Sims.Examples.Lib.ControlledSwitchWithArc
— Function.Comparison of controlled switch models both with and without arc
This example is to compare the behaviour of switch models with and without an electric arc taking into consideration.
a3 and b3 are proportional to the switch currents. The difference in the closing area shows that the simple arc model avoids the suddenly switching.
CharacteristicThyristors
Sims.Examples.Lib.CharacteristicThyristors
— Function.Characteristic of ideal thyristors
Two examples of thyristors are shown: the ideal thyristor and the ideal GTO thyristor with Vknee=5.
Heat transfer
TwoMasses
Sims.Examples.Lib.TwoMasses
— Function.Simple conduction demo
This example demonstrates the thermal response of two masses connected by a conducting element. The two masses have the same heat capacity but different initial temperatures (T1=100 [degC], T2= 0 [degC]). The mass with the higher temperature will cool off while the mass with the lower temperature heats up. They will each asymptotically approach the calculated temperature T_final_K (T_final_degC) that results from dividing the total initial energy in the system by the sum of the heat capacities of each element.
Motor
Sims.Examples.Lib.Motor
— Function.Power systems
RLModel
Sims.Examples.Lib.RLModel
— Function.Three-phase RL line model
See also sister models: PiModel and ModalModal.
WARNING: immature / possibly broken!
PiModel
Sims.Examples.Lib.PiModel
— Function.Three-phase Pi line model
See also sister models: RLModel and ModalModal.
WARNING: immature / possibly broken!
ModalModel
Sims.Examples.Lib.ModalModel
— Function.Three-phase modal line model
See also sister models: PiModel and RLModal.
WARNING: immature / possibly broken!
Rotational
First
Sims.Examples.Lib.First
— Function.First example: simple drive train
The drive train consists of a motor inertia which is driven by a sine-wave motor torque. Via a gearbox the rotational energy is transmitted to a load inertia. Elasticity in the gearbox is modeled by a spring element. A linear damper is used to model the damping in the gearbox bearing.
Note, that a force component (like the damper of this example) which is acting between a shaft and the housing has to be fixed in the housing on one side via component Fixed.