A Java Based Interactive Control Design and Tuning Platform A Java Based Interactive Control Design and Tuning Platform Aaron Radke 7/9/3 Aaron Radke 7/9/3 Page 1
A Java Based Interactive Control Design and Tuning Platform Outline • Introduction • Software Structure – Structural Implementation – Data Flow Implementation • System Functionalities and Application – Differential Equation Solvers – Controller Design and Implementation – General Model • Summary and Future Aaron Radke 7/9/3 Page 2
Introduction Introduction Aaron Radke 7/9/3 Page 3
Introduction ⇒ Existing software tools Existing software tools • Matlab ⋄ Matlab is powerful Figure 1: Matlab ⋄ It is a controls standard ⋄ Simulink allows easy set up nonlinear systems • Shortcomings of Matlab ⋄ Simulink is great but tuning is tedious Aaron Radke 7/9/3 Page 4
Introduction ⇒ Existing software tools ⋄ Matlab has GUI but it takes a bit of programming to use ⋄ Matlab license issues ⋄ Version problems • SysQuake Figure 2: SysQuake ⋄ Free package with syntax similar to Matlab ⋄ Built around real time dragging Aaron Radke 7/9/3 Page 5
Introduction ⇒ Existing software tools Figure 3: SysQuake icon ⋄ Led to the first project with simplicity of NPID tuning Aaron Radke 7/9/3 Page 6
Introduction ⇒ Existing software tools Figure 4: SysQuake window Aaron Radke 7/9/3 Page 7
Introduction ⇒ Existing software tools • Shortcomings of SysQuake ⋄ Changing the system needed differential equation derivations Aaron Radke 7/9/3 Page 8
Introduction ⇒ Proposed approach Proposed approach • Problem formulation ⋄ Start new with difference equations ⋄ Real-time functionality • Software development strategy ⋄ Development language Figure 5: Java logo ⋄ Free ⋄ Accessible Aaron Radke 7/9/3 Page 9
Introduction ⇒ Proposed approach ⋄ Powerful framework ⋄ Structure Aaron Radke 7/9/3 Page 10
Introduction ⇒ Software requirements and specifications Software requirements and specifications • A real time, interactive, dynamic tuning environment for control systems. • Extensible framework • Simple construction of nonlinear systems • Cross-platform, web application deployment • Capability of presenting new control designs and algorithms • Useful and practical for implementation Aaron Radke 7/9/3 Page 11
Structural Implementation Structural Implementation Aaron Radke 7/9/3 Page 12
Structural Implementation ⇒ Focus on difference equations Focus on difference equations • Start with the core difference equation solver method • The GUI can be built later Aaron Radke 7/9/3 Page 13
Structural Implementation ⇒ Fundamental building blocks Fundamental building blocks • Object orientedness ⋄ Library of blocks • SimBlocks ⋄ SimSource ⋄ SimFunction ⋄ SimSink ⋄ Class inheritance structure diagrams Aaron Radke 7/9/3 Page 14
Structural Implementation ⇒ Fundamental building blocks implements Console SimSourceFactory SimContinuousProfile SimImageFactory SimDisturbance SimProfile SimADRC ADRC SimDoubleTriangle SimTrapezoidalProfile SimDTOCDiff GCADRC SimNoise SimAdd SimFunctionTest JApplet GeneralControlLoop SimBuffer SimNothing SimFunctionFactory SimGeneralClasicController SimNPIDwc SimpleLoop SimSource SimPolyProfile SimDiffEq SimNPID Sim1stOrder SimpleLoopNN SimFactory SimSourceSelector SimDTOC SimTest Sim2ndOrder SimDiff TestBlock SimInput SimStep SimFunctionSelector SimZtf SimStf SimFilter SimBlock SimFunction2Input SimTimeIndex SimGain SimDialogManager SimDoubleIntegrator SimPid SimFunctionXInput SimTrapezoid SimGFunc SimIntegrator SimImage SimFunction SimSaturation SimCheckBox SimSink SimStat SimParameters SimComboBox SimMultiply SimSubtract SimBase SimVariable SimDoubleArray SimComboBoxNumber SimZtfDirect VariableContainer SimNumber SimComboBoxString SimPtPlot SimString SimInteger SimStdout JLabel ScrollablePicture SimTextBox SimStaticNumber SimTextBoxOutput Figure 6: The class structure for the blocks (without implementation classes) Aaron Radke 7/9/3 Page 15
Structural Implementation ⇒ Fundamental building blocks SimVariable SimDoubleArray SimStaticNumber SimSubtract SimNumber SimInteger SimZtfDirect SimString SimAdd SimTextBox SimCheckBox SimComboBoxString SimComboBox SimComboBoxNumber SimDiff SimStf SimNPID SimNPIDwc SimDiffEq SimFunctionTest SimFunctionFactory Sim1stOrder SimGeneralClasicController SimFunctionSelector SimDoubleIntegrator SimZtf SimFunction SimGain SimIntegrator SimGFunc SimFilter SimSaturation Sim2ndOrder SimStat SimDTOC SimTest SimDialogManager SimADRC SimPid SimDTOCDiff SimPanelable SimContinuousProfile SimProfile SimSourceFactory SimTrapezoidalProfile SimPtPlot HasInput SimInput SimSink SimTextBoxOutput SimStdout SimSourceSelector SimStep SimTimeIndex SimTrapezoid SimSource SimDisturbance HasOutput SimDoubleTriangle SimNoise SimNothing SimPolyProfile SimImage SimBase SimBlock SimFunctionXInput Iterator VariableContainer SimFactory SimBuffer SimFunction2Input SimMultiply SimParameters ADRC GCADRC Simulatable GeneralControlLoop Scrollable JApplet SimpleLoop ScrollablePicture JLabel SimpleLoopNN TestBlock SimImageFactory implements Console Figure 7: The entire hierarchal class structure of the project Aaron Radke 7/9/3 Page 16
Structural Implementation ⇒ Fundamental building blocks • Class inheritance structure SimPid → SimStf → SimZtf → SimDiffEq → SimFunction → SimBlock → SimBase (1) Table 1: Example hierarchy path of a PID controller Class name provides SimBase simple title and description structures SimBlock the ability to interface with the rest of the simulation library Aaron Radke 7/9/3 Page 17
Structural Implementation ⇒ Fundamental building blocks SimFunction the functionality of inputs and outputs SimDiffEq the ability to create, display, and edit discrete difference equations SimZtf the ability to create, display, and edit z transfer functions and convert them to discrete difference equations SimStf the ability to create, display, and edit s transfer functions and convert them to z transfer functions Aaron Radke 7/9/3 Page 18
Structural Implementation ⇒ Fundamental building blocks SimPid the specific transfer function for proportional, integral and derivative control • Block interconnection • Small memory size • Block interconnection method Aaron Radke 7/9/3 Page 19
Structural Implementation ⇒ GUI development GUI development Aaron Radke 7/9/3 Page 20
Structural Implementation ⇒ GUI development Figure 8: Screen shot for the sample simtk applet GUI Aaron Radke 7/9/3 Page 21
Data Flow Implementation Data Flow Implementation Aaron Radke 7/9/3 Page 22
Data Flow Implementation ⇒ Developer’s viewpoint Developer’s viewpoint • Top-level managing class ⋄ Hierarchy ⋄ SimFactory ⋄ Containment structure of example applets Aaron Radke 7/9/3 Page 23
Data Flow Implementation ⇒ Developer’s viewpoint SimParameters SimFactory SimBuffer SimTextBoxOutput SimPanelable SimPtPlot Simulation SimImage SimTabBox SimGain SimBlock Simulatable SimStep Simple GeneralControlLoop SimSourceSelector SimNumber SimADRC SimFunction SimAdd SimSubtract SimGeneralClasicController SimFunctionFactory SimComboBoxString SimProfile SimFunctionSelector SimDiffEq SimSource SimFucntionSelector SimSink Figure 9: Simplified example containment of classes for the Gener- alControlLoop applet Aaron Radke 7/9/3 Page 24
Data Flow Implementation ⇒ Developer’s viewpoint • Setting up a simulation ⋄ Loading or instantiating blocks ⋄ Adding and connecting blocks ⋄ Simulating • Building blocks ⋄ Extend a block ⋄ Add adjustable variables ⋄ Override iteration definition • Developer’s documentation Aaron Radke 7/9/3 Page 25
Data Flow Implementation ⇒ User’s viewpoint User’s viewpoint • Nature of the system • Simulation accuracy • Globals Aaron Radke 7/9/3 Page 26
Comparison of Ode Solvers Comparison of Ode Solvers Aaron Radke 7/9/3 Page 27
Comparison of Ode Solvers ⇒ Simple example problem for comparisons Simple example problem for comparisons • Applet Source y ′ ( t ) = f ( t, y ( t )) (2) y ( t 0 ) = (3) y 0 Aaron Radke 7/9/3 Page 28
Comparison of Ode Solvers ⇒ Simple example problem for comparisons Figure 10: Comparison of ode solvers with 5 iterations Aaron Radke 7/9/3 Page 29
Comparison of Ode Solvers ⇒ Simple example problem for comparisons Figure 11: Comparison of ode solvers with 20 iterations Aaron Radke 7/9/3 Page 30
Comparison of Ode Solvers ⇒ Simple example problem for comparisons Figure 12: Comparison of ode solvers with 200 iterations Aaron Radke 7/9/3 Page 31
Comparison of Ode Solvers ⇒ Conclusion Conclusion • Ten-fold increase of Tustin over Simple Euler Aaron Radke 7/9/3 Page 32
Differential Equation Solver Engine Differential Equation Solver Engine Aaron Radke 7/9/3 Page 33
Recommend
More recommend