kramann.info
© Guido Kramann

Login: Passwort:










Robuste Systemintegration
1 Grundlagen
..1.1 Newton
....1.1.1 LinearSchwinger
....1.1.2 Daempfung
....1.1.4 ODE
....1.1.5 Saaluebung
..1.2 NewtonEuler
....1.2.1 Traegheitsmomente
....1.2.2 Modellgleichungen
....1.2.3 Einfachpendel
..1.3 Scilab
....1.3.1 Erste_Schritte
....1.3.2 Skripte
....1.3.3 Funktionen
..1.4 Laplace
....1.4.1 Eigenwerte
....1.4.2 PT1
..1.5 Regleroptimierung
....1.5.1 Guetefunktion
....1.5.2 Heuristiken
....1.5.3 Scilab
..1.6 Einstellregeln
....1.6.1 Totzeit
....1.6.2 Methode1
....1.6.3 Methode2
....1.6.4 Scilab
..1.7 Zustandsregler
..1.8 Polvorgabe
..1.8 Polvorgabe_alt
..1.9 Beobachter
....1.9.1 Haengependel
..1.10 Daempfungsgrad
..1.11 Processing
....1.11.1 Installation
....1.11.2 Erste_Schritte
....1.11.3 Mechatronik
....1.11.4 Bibliotheken
....1.11.5 Uebung
....1.11.6 Snippets
......1.11.6.1 Dateioperationen
......1.11.6.2 Bilder
......1.11.6.3 GUI
......1.11.6.4 Text
......1.11.6.5 PDF
......1.11.6.8 Maus
......1.11.6.10 Zeit
......1.11.6.13 Animation
......1.11.6.15 Simulation
....1.11.7 Referenzen
..1.12 Breakout
2 Beispiel
3 Beispielloesung
4 Praxis
5 javasci
6 Fehlertoleranz1
7 Reglerentwurf
..7.1 Sprungantwort
..7.2 Messdaten
..7.3 Systemidentifikation
..7.4 Polvorgabe
..7.5 Beobachter
..7.6 Robuster_Entwurf
..7.7 SIL
8 Systementwicklung
9 Arduino
..9.1 Lauflicht
..9.2 Taster
..9.3 Sensor
..9.12 Motor_PWM1
..9.13 Motor_PWM2_seriell
..9.14 Motor_PWM3_analogWrite
..9.15 Scheduler
..9.20 AV
..9.21 Mikrofon
..9.22 Universal
....9.22.1 Laborplatine
....9.22.2 LED_Leiste
....9.22.3 Motortreiber
....9.22.4 Sensoreingaenge
....9.22.5 Taster
....9.22.6 Tests
....9.22.7 Mikrofon
....9.22.8 Lautsprecher
....9.22.9 Fahrgestell
..9.23 Zauberkiste
..9.24 OOP
....9.24.1 Uebungen
..9.25 AVneu
....9.25.1 Tests
..9.26 DA_Wandler
..9.27 CompBoard
....9.27.1 Tastenmatrix
....9.27.2 ASCIIDisplay
..9.28 CTC
..9.29 Tonerzeugung
10 EvoFuzzy
..10.1 Fuzzy
....10.1.1 Fuzzylogik
....10.1.2 FuzzyRegler
....10.1.3 Uebung9
....10.1.5 Softwareentwicklung
......10.1.5.1 AgileSoftwareentwicklung
......10.1.5.2 FuzzyRegler
......10.1.5.3 Uebung
....10.1.6 Umsetzung
......10.1.6.1 FuzzyRegler
......10.1.6.2 Simulation
......10.1.6.3 Optimierung
......10.1.6.4 Uebung
....10.1.7 Haengependel
......10.1.7.1 Haengependel
......10.1.7.2 Simulation
......10.1.7.3 FuzzyRegler
......10.1.7.4 Optimierer
......10.1.7.5 Genetisch
....10.1.8 Information
....10.1.9 Energie
..10.2 Optimierung
....10.2.1 Gradientenverfahren
....10.2.2 Heuristiken
....10.2.3 ModifizierteG
....10.2.4 optim
..10.3 Genalgorithmus
..10.4 NeuronaleNetze
....10.4.1 Neuron
....10.4.2 Backpropagation
....10.4.3 Umsetzung
....10.4.4 Winkelerkennung
..10.5 RiccatiRegler
11 Agentensysteme
12 Simulation
20 Massnahmen
21 Kalmanfilter
..21.1 Vorarbeit
..21.2 Minimalversion
..21.3 Beispiel
30 Dreirad
31 Gleiter
..31.1 Fehlertoleranz
80 Vorlesung_2014_10_01
81 Vorlesung_2014_10_08
82 Vorlesung_2014_10_15
83 Vorlesung_2014_10_22
84 Vorlesung_2014_10_29
kramann.info
© Guido Kramann

Login: Passwort:




Simulation bei Processing

(EN google-translate)

(PL google-translate)

Beispiel eines einfachen linearen gedämpften Schwingers mit Runge-Kutta-Verfahren integriert.

simulation.zip - Download des Sketchbook-Ordners
double dt = 0.1;
double  t = 0.0;

Integrator integrator;

double[] y;
double[] y0;
double[] y_alt;

void setup()
{
    size(800,600);  
    
    Modell modell = new Modell();
    y = new double[modell.anzahl];
    y0 = new double[] {1.0,0.0};
    y[0] = y0[0];
    y[1] = y0[1];
    y_alt = new double[modell.anzahl];
    integrator = new Integrator(modell);

    frameRate((int)(1.0/dt));
}

void draw()
{
    clear();
    fill(255,0,0);
    ellipse(width/2,height/2+(float)(100.0*y[0]),20,20);


    for(int i=0;i<y.length;i++)
        y_alt[i] = y[i];
  
    integrator.zeitschritt(y,y_alt,t,dt); //Ergebnis wird in y gelegt
  
  
    t+=dt;   
}

Code 0-1: simulation.pde

public class Modell
{
    double D = 0.1;
    double C = 1.0;
    double m = 1.0;
  
    public int anzahl = 2; //Anzahl der Gleichungen , ANPASSEN!
  
    void steigung(double[] f, double[] y,double t)
    {
        double x = y[0];
        double v = y[1];
 
        f[0] = v;
        f[1] = -(C/m)*x -(D/m)*v; 
    }  
}

Code 0-2: Modell.pde

public class Integrator
{
    int anzahl;
  
    double[] k1,k2,k3,k4;
    
    double[] yhilf;
  
    Modell modell;
  
    public Integrator(Modell modell)
    {
        this.modell = modell;
        anzahl = modell.anzahl;
        k1 = new double[anzahl];      
        k2 = new double[anzahl];      
        k3 = new double[anzahl];      
        k4 = new double[anzahl];
  
        yhilf = new double[anzahl];            
    }  
    
    public void zeitschritt(double[] y,double[] y_alt, double t, double dt)
    {
        modell.steigung(k1,y_alt,t);
        for(int i=0;i<anzahl;i++)
            yhilf[i] = y_alt[i] + 0.5*dt*k1[i];
            
        modell.steigung(k2,yhilf,t+0.5*dt);            
        for(int i=0;i<anzahl;i++)
            yhilf[i] = y_alt[i] + 0.5*dt*k2[i];

        modell.steigung(k3,yhilf,t+0.5*dt);            
        for(int i=0;i<anzahl;i++)
            yhilf[i] = y_alt[i] + dt*k3[i];

        modell.steigung(k4,yhilf,t+dt);

        for(int i=0;i<anzahl;i++)
            y[i] = y_alt[i] + (dt/6.0)*(k1[i]+2.0*k2[i]+2.0*k3[i]+k4[i]);        
     }
}

Code 0-3: Integrator.pde