Coder Social home page Coder Social logo

dynamics's Introduction

Dynamics Library

Description

This library contains basic tools to work with dynamical systems. In particular, it contains dynamic controllers such as the PID Controller.

Fundamental concepts are:

  • Signal (ISignal): Provides a long real value output
  • Dynamic (IDynamic): Takes a long real value value and provides a long real value output
  • Dynamic controller (IDynamicController): Takes two long real values input and value and provides a long real value output

To get a PID controller, take a DynamicController and assign an instance of PID_Dynamic to the public field openDynamic. You also have to assign the public field elapsedTimeProvider of the PID_Dynamic. The easiest way would be to use a MeasuredTimeProvider. However if you know you will call the method Next cyclically, for better resource efficiency use a ConstantTimeProvider instead and set the public field seconds to the cycle time in seconds.

Install this package

Enter:

apax add @simatic-ax/dynamics

Namespace

Simatic.Ax.Dynamics;

Example

USING Simatic.Ax.Dynamics;

[...]

VAR_GLOBAL
    elapsedTimeProvider : MeasuredTimeProvider;
    dynamic : PID_Dynamic := (elapsedTimeProvider := elapsedTimeProvider);
    controller : DynamicController := (openDynamic := dynamic);
END_VAR

[...]

// Initialisation

dynamic.SetK(0.1);
dynamic.SetTISeconds(2.3);
dynamic.SetTDSeconds(4.5);

[...]

// Use

output := controller.Next(value, input);

Contribution

Thanks for your interest in contributing. Anybody is free to report bugs, unclear documentation, and other problems regarding this repository in the Issues section or, even better, is free to propose any changes to this repository using Merge Requests.

License and Legal information

Please read the Legal information

dynamics's People

Contributors

thkindler avatar jgsiemens avatar sjuergen avatar web-flow avatar simatic-ax-bot avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.