DiscreteComponents
This is the documentation for the DiscreteComponents library. Here you will find the documentation for the various definitions contained in DiscreteComponents.
Note that this documentation is automatically generated primarily from the doc strings and metadata associated with those definitions.
Components
ClockPropagator- EXPERIMENTAL: a way to connect clocks of two signals but not their values.DummyDynamics- INTERNAL: Dummy dynamics to add some time dependent state, such that ModelingToolkit can understand that the problem is time dependent.Examples.AccumulatorGraphical- An accumulator built using block diagram components.Examples.AccumulatorSyntactic- An accumulator written using clock syntax directly.Examples.DirectDerivativeExamples.DirectIntegralExamples.IncreasingFrequencyCosineSourceExamples.IntegratorFEwInitialExamples.IntegratorFEwInitialSimplerExamples.IsNaNExamples.LessThanExamples.ResetValueTrackerExamples.SimpleDiscreteIntegratorExamples.SwitchExamples.TestZeroCrossingClock- Test component that validates the ZeroCrossingClock component.LastValue- Gets the last defined value ofuto place ony, on the clock ofy.NDelay- A delay block that delays its input byntimesteps.PeriodicClock- A periodic clock that ticks once everydttime units.PeriodicSampler- Sample a continuous signalyat a periodic intervaldt, creating a clocked signaly.SampleTimeSource- Outputs the time since the last sample on the clock that is connected toy.Sampler- Clock-agnostic sampler block.UnitDelay- A unit delay that outputs the input signal delayed by one sample (z@(-1)).UnitDifference- A unit difference block that computes y[n] = u[n] - u[n-1].ZeroCrossingClock- A zero-crossing clock that ticks once every time the input signal crosses zero.ZeroOrderHold- A zero-order hold operator that maps a clocked signaluto a continuous time signaly.
Analyses
Examples
Examples.AccumulatorDemo- Test harness that samples a sine wave and accumulates it using both accumulator types.Examples.IfLiftBug- This component shows some bugs in MTK's IfLifting pass.Examples.PowerHeptagonBug- This errors because Heptagon does not like the character^in a function name,Examples.ZOHBug- The output of the ZeroOrderHold block looks flat but it is actually not.
Tests
Examples.IntegratorFEwInitialTestExamples.TestClockPropagatorExamples.TestNDelay- Test component that validates the NDelay component.Examples.TestPeriodicClock- Test component that validates the PeriodicClock component.Examples.TestUnitDelay- Test component that validates the UnitDelay component.Examples.TestUnitDifference- Test component that validates the UnitDifference block by computing the discrete difference of a sine wave.