Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/VDM/VDMRT/ChessWayRT/   (Wiener Entwicklungsmethode ©)  Datei vom 13.4.2020 mit Größe 946 B image not shown  

Quelle  PD.vdmrt   Sprache: VDM

 
class PD is subclass of DTControl

instance variables

-- design parameters
protected k: real;
protected tauD: real;
protected beta: real;

-- variables
protected uD: real;
protected prev_err: real

operations

-- constructor for PD
public PD: real * real * real ==> PD
PD(k_, tauD_, beta_) ==
(
    k := k_;
 tauD := tauD_;
 beta := beta_;
 -- initial values
    uD := 0.0;
 prev_err := 0.0 
);

-- constructor for PD
public PD: real * real ==> PD
PD(k_, tauD_) ==
 PD(k_, tauD_, DEF_BETA);
    
-- default constructor for PD
public PD: () ==> PD
PD() ==
    PD(DEF_K, DEF_TAUD, DEF_BETA);

-- calculates output, based on the error
public Output: real ==> real
Output(err) == 
(
 dcl factor: real :=  1 / (sampletime + tauD * beta);
 uD := factor * (tauD * uD * beta + tauD * k * (err - prev_err) + sampletime * k * err);
 prev_err := err;
 return uD
);

values

-- defaults
DEF_K: real = 0.2;
DEF_TAUD: real = 1.0;
DEF_BETA: real = 0.1;

end PD

98%


¤ Dauer der Verarbeitung: 0.13 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung ist noch experimentell.