BlockComponents
This is the documentation for the BlockComponents library. Here you will find the documentation for the various definitions contained in BlockComponents.
Note that this documentation is automatically generated primarily from the doc strings and metadata associated with those definitions.
Types
Continuous.BlockInitMode- Initialization mode for continuous blocks (TransferFunction, StateSpace, etc.).Interfaces.BooleanSISO- Block has one Boolean input and one Boolean output signal.Interfaces.BooleanSignalSource- Base class for Boolean signal sources.Interfaces.IntegerSIBooleanSO- Block with an Integer input and a Boolean output signal.Interfaces.IntegerSO- Single Integer Output continuous control block.Interfaces.IntegerSignalSource- Base class for continuous Integer signal source.Interfaces.PartialBooleanComparison- Partial block with 2 Real input and 1 Boolean output signal.Interfaces.PartialBooleanSI- Partial block with 1 input Boolean signal.Interfaces.PartialBooleanSI2SO- Partial block with 2 input and 1 output Boolean signal.Interfaces.PartialBooleanSI3SO- Partial block with 3 input and 1 output Boolean signal.Interfaces.PartialBooleanSISO- Partial block with 1 input and 1 output Boolean signal.Interfaces.PartialBooleanSO- Partial block with 1 output Boolean signal.Interfaces.PartialBooleanSource- Partial source block with 1 output Boolean signal and an appropriate default icon.Interfaces.PartialBooleanThresholdComparison- Partial block to compare the Real input u with a threshold and provide the result as 1 Boolean output signal.Interfaces.PartialIntegerSISO- Partial block with an IntegerInput and an IntegerOutput signal.Interfaces.SI2BooleanSO- 2 Single Input / Boolean Single Output block.Interfaces.SI2SO- Partial component definition with two inputs and one output.Interfaces.SISO- Single input single output (SISO) base block, a partial component that defines the interface for blocks with one input and one output signal.Interfaces.SO- Standard output interface with a single real output connector.Interfaces.Signal- Base component for signal generators that output time-varying signals.Interfaces.SingleVariableController- Interface for single-variable continuous controllers with setpoint input, measurement input, and control output.Sources.ChirpLaw- This enum defines the available chirp typesTables.ExtrapolationType- Specifies the extrapolation method used for the 1D innterpolation when trying to access values outside of the given data.Tables.InterpolationDimension- Specifies the interpolation method for each dimension in 2D table interpolation (InterpolatedTable).Tables.InterpolationType- Specifies the interpolation method used for 1D interpolation in theInterpolationcomponent.
Components
Continuous.Derivative- Filtered derivative approximation with configurable time constant and gain.Continuous.FirstOrder- First-order filter with a single real pole and adjustable gain.Continuous.Integrator- Integrates the input signal with optional gain factor.Continuous.LimPID- PID controller with limited output, back calculation anti-windup compensation, setpoint weighting and feed-forwardContinuous.LimPIDExternalDerivative- PID controller with limited output, anti-windup, and an external derivative input.Continuous.Plant- Second-order linear system for testing control designs.Continuous.SecondOrder- Second-order filter with configurable gain, bandwidth, and damping ratio.Continuous.StateSpace- Linear state-space system with operating point support.Continuous.Tests.StateSpaceTest- Test component for StateSpace block demonstrating basic functionality.Continuous.TransferFunction- General linear SISO transfer function block.Logical.And- Logical 'and': y = u1 and u2.Logical.Greater- Output y is true, if input u1 is greater than input u2.Logical.GreaterEqual- Output y is true, if input u1 is greater or equal than input u2.Logical.GreaterEqualThreshold- Output y is true, if input u is greater or equal than threshold.Logical.GreaterThreshold- Output y is true, if input u is greater than threshold.Logical.Less- Output y is true, if input u1 is less than input u2.Logical.LessEqual- Output y is true, if input u1 is less or equal than input u2.Logical.LessEqualThreshold- Output y is true, if input u is less or equal than threshold.Logical.LessThreshold- Output y is true, if input u is less than threshold.Logical.LogicalSwitch- Logical Switch.Logical.Nand- Logical 'nand': y = not (u1 and u2).Logical.Nor- Logical 'nor': y = not (u1 or u2).Logical.Not- Logical 'not': y = not u.Logical.Or- Logical 'or': y = u1 or u2.Logical.Switch- Switch between two Real signals.Logical.Xor- Logical 'xor': y = u1 xor u2.Math.Abs- Outputs the absolute value of the input.Math.Acos- Outputs the arc cosine of the input.Math.Add- Weighted adder that outputs the sum of two scalar inputs with configurable gains.Math.Add3- Weighted summation block that adds three scalar inputs with configurable gains.Math.Asin- Outputs the arc sine of the input.Math.Atan- Outputs the arc tangent of the input.Math.Atan2- Outputs the four-quadrant arc tangent of the inputs.Math.BooleanToInteger- Convert Boolean to Integer signal.Math.BooleanToReal- Convert Boolean to Real signal.Math.ContinuousMean- Calculates the empirical expectation (mean) value of its input signal.Math.Cos- Outputs the cosine of the input.Math.Cosh- Outputs the hyperbolic cosine of the input.Math.Division- Divides first input by second input.Math.Exp- Outputs the exponential (base e) of the input.Math.Exponentiation- Outputs the input raised to a constant exponent.Math.Feedback- Computes the difference between a reference input and a feedback input.Math.Gain- Multiplies input signal by a constant gain factor.Math.IntegerToBoolean- Convert Integer to Boolean signal.Math.IntegerToReal- Convert Integer to Real signals.Math.LinearDependency- Outputs a linear combination of two input signals.Math.Ln- Outputs the natural logarithm (base e) of the input.Math.Log- Output the logarithm (default base e) of the input (input > 0 required).Math.Log10- Outputs the base-10 logarithm of the input.Math.Max- Passes through the largest of two input signals.Math.Min- Passes through the smallest of two input signals.Math.PolarToRectangular- Converts polar coordinates to rectangular coordinates.Math.Power- Outputs the power of a base raised to the input signal.Math.Product- Multiplies two input signals and outputs their product.Math.Pythagoras- Determine the hypotenuse or leg of a right triangle.Math.RealToBoolean- Convert Real to Boolean signal.Math.RealToInteger- Convert Real to Integer signal.Math.RectangularToPolar- Converts rectangular coordinates to polar coordinates.Math.ReverseCausality- Forces equality between two input signals by computing an implicit output.Math.Sign- Outputs the sign of the input.Math.Sin- Outputs the sine of the input.Math.Sinh- Outputs the hyperbolic sine of the input.Math.Sqrt- Outputs the square root of the input.Math.Tan- Outputs the tangent of the input.Math.Tanh- Outputs the hyperbolic tangent of the input.Math.WrapAngle- Wrap angle to interval ]-π, π] or [0, 2π[.Nonlinear.Limiter- Signal limiter that constrains input values between specified boundaries.Nonlinear.SlewRateLimiter- Limits the rate of change of a signal between specified rising and falling rates.Routing.RealPassThrough- Pass a Real signal through without modification.Routing.Terminator- Signal termination block that consumes input signals without further processing.Sources.Chirp- TheChirpblock generates a time-varying frequency sweep signal (chirp).Sources.Constant- Provides a constant output signal of value k.Sources.ContinuousClock- Generates a continuous time signal that starts counting from a specified time.Sources.Cosine- Generates a cosine wave with configurable parameters.Sources.CosineVariableFrequencyAndAmplitude- Cosine voltage source with variable frequency and amplitudeSources.ExpSine- Exponentially damped sine wave with configurable amplitude, frequency, and damping.Sources.Pulse- Single pulse generator with configurable amplitude, duration, and start time.Sources.Ramp- Generates a linearly increasing signal from an offset to a target value over a specified duration.Sources.Sine- Generates a sine wave signal with configurable parameters.Sources.SineVariableFrequencyAndAmplitude- Sine voltage source with adjustable frequency and amplitude through external signals.Sources.Square- Square wave generator that alternates between positive and negative values.Sources.Step- Generates a step signal that transitions fromoffsettoheight+offsetat the specified time.Sources.Triangular- Triangular waveform generator with configurable amplitude and frequency.Tables.Interpolation- Performs interpolation on input values using a specified dataset and interpolation method.Tables.ParameterizedInterpolation- Performs interpolation of values based on an input signal using externally defined parameters.Tables.ScalarInterpolation- Performs interpolation on input values using a specified dataset and interpolation method.Tables.Tests.ParameterizedInterpolationExtrapolation- Tests parameterized interpolation with extrapolation on a mass-spring-damper system.
Examples
Examples.Modulation- Demonstrates amplitude modulation (AM) and frequency modulation (FM) using the
Tests
Continuous.Tests.DerivativeIntegratorTerminator- Test component that demonstrates the chained behavior of differentiation and integration of a sine signal.Continuous.Tests.FirstOrder- Test fixture for evaluating first-order system response to constant input.Continuous.Tests.LimPID- Test bench for a limited PID controller connected to a plant model with step input.Continuous.Tests.LimPIDExternalDerivative- Test bench for the LimPIDExternalDerivative controller connected to a plant model.Continuous.Tests.SecondOrder- Second-order system test with constant input.Continuous.Tests.TransferFunction- Tests for TransferFunction block covering:Logical.Tests.LogicGates- Validation test for logic gate blocks: And, Or, Xor, Nand, Nor.Logical.Tests.Logical- Interconnected test of Logical blocks.Logical.Tests.LogicalValidation- Validation test for all Logical blocks with deterministic expected outputs.Logical.Tests.ZeroThresholds- MSL cross-validation: ModelicaTest.Blocks.ZeroThresholdsMath.Tests.Abs- Computes the absolute value of a constant input.Math.Tests.Acos- Computes the arc cosine of constant and time-varying inputs.Math.Tests.Add- Adds constant and time-varying inputs.Math.Tests.Add3- Test the functionality of the Add3 block by connecting constant and time-varying inputs.Math.Tests.Asin- Computes the arc sine of constant and time-varying inputs.Math.Tests.Atan- Computes the arc tangent of constant and time-varying inputs.Math.Tests.Atan2- Computes the four-quadrant arc tangent of constant and time-varying inputs.Math.Tests.BooleanToInteger- Converts constant and time-varying Boolean signals to Integer.Math.Tests.BooleanToReal- Converts constant and time-varying Boolean signals to Real.Math.Tests.ContinuousMean- Test for ContinuousMean block: mean of a constant and mean of a sine.Math.Tests.Cos- Computes the cosine of constant and time-varying inputs.Math.Tests.Cosh- Computes the hyperbolic cosine of constant and time-varying inputs.Math.Tests.Division- Division operation that divides a first input by a second input.Math.Tests.Exp- Computes the exponential of constant and time-varying inputs.Math.Tests.Exponentiation- Tests the Exponentiation block with multiple exponent values.Math.Tests.Feedback- Computes the difference between constant and time-varying input signals.Math.Tests.IntegerToBoolean- Converts constant and time-varying Integer signals to Boolean by threshold.Math.Tests.IntegerToReal- Converts constant and time-varying Integer signals back to Real.Math.Tests.LinearDependency- Computes a linear combination of constant and time-varying inputs.Math.Tests.Ln- Computes the natural logarithm of constant and time-varying inputs.Math.Tests.Log- Computes the natural logarithm of constant and time-varying inputs.Math.Tests.Log10- Computes the base-10 logarithm of constant and time-varying inputs.Math.Tests.Max- Computes the maximum of constant and time-varying inputs.Math.Tests.Min- Computes the minimum of constant and time-varying inputs.Math.Tests.PolarToRectangular- Converts constant and time-varying polar coordinates to rectangular.Math.Tests.Power- Computes a constant base raised to constant and time-varying input powers.Math.Tests.Product- Multiplies constant and time-varying values together.Math.Tests.Pythagoras- Test for Pythagoras block in both modes: hypotenuse calculation and leg calculation.Math.Tests.RealToBoolean- Converts constant and time-varying Real signals to Boolean by threshold.Math.Tests.RealToInteger- Rounds constant and time-varying Real inputs to the nearest Integer.Math.Tests.RectangularToPolar- Converts constant and time-varying rectangular coordinates to polar.Math.Tests.Sign- Computes the sign of constant and time-varying inputs.Math.Tests.Sin- Computes the sine of constant and time-varying inputs.Math.Tests.Sinh- Computes the hyperbolic sine of constant and time-varying inputs.Math.Tests.Sqrt- Computes the square root of constant and time-varying inputs.Math.Tests.Tan- Computes the tangent of constant and time-varying inputs.Math.Tests.Tanh- Computes the hyperbolic tangent of constant and time-varying inputs.Math.Tests.WrapAngle- Wraps constant and time-varying angles to the interval ]-π, π].Nonlinear.Tests.Limiter- Test harness for the Limiter component that constrains signals to specified bounds.Nonlinear.Tests.SlewRateLimiter- Test component that validates SlewRateLimiter behavior with a sinusoidal input.Sources.Tests.Chirp- Test component that verifies linear, quadratic, and exponential chirp signal generators.Sources.Tests.ContinuousClock- Test that evaluates a continuous clock signal integrated over time.Sources.Tests.Cosine- Tests the integration of a cosine signal with configurable parameters.Sources.Tests.CosineModes- Verifies all operating modes of the Cosine source against analytically known values.Sources.Tests.ExpSine- Test component that connects an exponentially damped sine wave to an integrator for validation.Sources.Tests.ExpSineModes- Verifies all operating modes of the ExpSine source against analytically known values.Sources.Tests.Pulse- Generates a pulse signal with configurable parameters and integrates it.Sources.Tests.Ramp- Test passing a ramp signal to an integrator for verification purposes.Sources.Tests.Sine- Test component that integrates a sine wave with specific parameters.Sources.Tests.SineModes- Verifies all operating modes of the Sine source against analytically known values.Sources.Tests.Square- Connects a square wave generator to an integrator to test integration of a periodic signal.Sources.Tests.Step- Test that validates step response behavior by connecting a step signal to a terminator.Sources.Tests.Triangular- A test component that integrates a triangular signal over time.Sources.Tests.VariableSinCos- Test component for sine and cosine generators with variable frequency and amplitude inputs.Tables.Tests.InterpolationExtrapolation- Tests interpolation with extrapolation by applying linear interpolation with constant extrapolation.Tables.Tests.InterpolationFile- Tests time-based interpolation using data from a CSV file.Tables.Tests.InterpolationJuliaHubDataset- Test time-dependent interpolation of JuliaHub dataset values.Tables.Tests.InterpolationTable- Tests interpolation by applying linear interpolation to a dataset of squares.Tables.Tests.ScalarInterpolationFile- Tests time-based interpolation using data from a CSV file.