Download presentation
Presentation is loading. Please wait.
Published byNoel Spencer Modified over 8 years ago
1
ESO Standard Telescope Axis Controller and Beckhoff-Simulink integration Nicola Di Lieto, Stefan Sandrock, Mario Kiekebusch
2
Instrument Control Systems Seminar, 20 th -24 th October 2014 n Status of telescope axis control at the ESO observatories n V-Model: methodology for systematic development of control systems n The ESO Standard Telescope Axis Controller (ESTAC) n Code generation and HIL testing n Beckhoff-Simulink integration and proof of concept Presentation Outline
3
Instrument Control Systems Seminar, 20 th -24 th October 2014 n Until 2011 all of the major telescopes at the ESO observatories in Chile were equipped with the same standard main axis controller (> 60 instances for azimuth, altitude/elevation, as well as adapter/rotator and instrument co-rotator axes) n This was developed in the 1990s with "traditional" methods (coded by hand) and used VMEbus crates, equipped with PowerPC CPU boards and dedicated digital and analog I/O cards to interface with the field hardware n For new ESO projects in the instruments and telescopes area, but also to upgrade existing systems, we aimed to provide a new standard solution with better performance and maintainability n Starting in 2011 we successfully introduced a model-based design workflow (V-Model) based on a “correct-by-construction” approach, which resulted in clear benefits including better testability, integrated simulation facility, reduction of coding errors and testing effort n We used Simulink, Stateflow, and Embedded Coder from Mathworks for design and implementation, and LabVIEW with NI hardware for hardware-in-the-loop testing, all of which are widely used in industry n The new ESO STandard Axis Telescope Controller (ESTAC) was standardized and is now in regular operation on all Auxiliary Telescopes since 2012, on UT1 (2013) and UT2 (2014). Upgrades of UT3, UT4 and VST are in progress and close to completion. Status of telescope axis control at the ESO observatories
4
Instrument Control Systems Seminar, 20 th -24 th October 2014 n Lifecycle process model for developing systems including both HW/SW n Particularly well suited to the development of digital control systems n The project is split into stages, which do not follow each other linearly n When the product from one phase is complete, it is verified n Only when the verification has succeeded the next phase begins n The process then moves onto a deeper level of detail n Iterations until all detail is worked out and project is completely implemented and verified n The ongoing verification intrinsic of this process builds confidence in the project n Problems are identified and corrected at the earliest opportunity in a tight feedback loop, thus reducing the cost and effort to fix them The V-Model System requirements Detailed design Implementation Integration, test and verification System verification and validation Operation and maintenance Verification System design
5
Instrument Control Systems Seminar, 20 th -24 th October 2014 n Automotive and aeronautic industries have increasingly and successfully relied on the simulation of mechatronic systems and control algorithms n By providing a common framework for design and communication across different engineering disciplines, this approach fits particularly well in the V-model n Model-based design: using a system-level model to generate an executable specification that describes unambiguously, in a mathematical form, the behavior of the system being developed n The system level model is used to design and simulate the control algorithms. This allows early testing to quickly find and eliminate any problems that may lead to incorrect operation of the controlled system n The continuous testing and verification lead to a so called correct-by-construction design where by the time it is implemented on the final hardware, the control system will require no major changes n Often the system to be controlled is not available until the latter stages of implementation; in these the so called Hardware-In-the-Loop (HIL) testing bridges the gap. n HIL testing involves implementing the plant model in a real time test system that emulates the behavior, inputs and outputs of the real plant. The HIL test system is then connected to the real control hardware, running the real control software; consistently with the V- model, this allows verification, early identification of any mistakes/problems and quick correction, thus reducing their impact on the cost and schedule Model based design
6
Instrument Control Systems Seminar, 20 th -24 th October 2014 V-Model for Axis Controller Design System requirements Detailed design Implementation Integration, test and verification System verification and validation Operation and maintenance Verification System design Derived from existing axis controller solution Identification of plant dynamics Development of data- driven high fidelity integrated simulation facility Code-generation (Matworks tools) and integration within existing system HIL tests in Garching On-site commissioning HIL tests and high fidelity simulation facility can significantly reduce the testing-on-site phase Performance Monitoring
7
Instrument Control Systems Seminar, 20 th -24 th October 2014 ESTAC executable specification – top level
8
Instrument Control Systems Seminar, 20 th -24 th October 2014 ESTAC Controller
9
Instrument Control Systems Seminar, 20 th -24 th October 2014 ESTAC Controller Position/velocity controllers n Nested PID structure n Feedforward term to ensure zero steady state error while following a ramp
10
Instrument Control Systems Seminar, 20 th -24 th October 2014 ESTAC Controller Internal path planners n Limit position, velocity, acceleration, jerk and torque to achievable and acceptable values n Avoid need for switching between different controllers “internal” set point always feasible
11
Instrument Control Systems Seminar, 20 th -24 th October 2014 ESTAC Controller Anti wind-up protection Reduces recovery time from saturation event Increases robustness Optional Observer Reduces lag of velocity estimate by processing torque command
12
Instrument Control Systems Seminar, 20 th -24 th October 2014 ESTAC Controller Last but by far not least: Log every signal flowing through the controller at loop rate Embedded signal generator allows injecting test signals in order to easily carry out precise performance measurement
13
Instrument Control Systems Seminar, 20 th -24 th October 2014 ESTAC design – State Machine
14
Instrument Control Systems Seminar, 20 th -24 th October 2014 Former solution – State Machine reverse engineered from existing code
15
Instrument Control Systems Seminar, 20 th -24 th October 2014 ESTAC simulation results
16
Instrument Control Systems Seminar, 20 th -24 th October 2014 ESTAC Code generation
17
Instrument Control Systems Seminar, 20 th -24 th October 2014 ESTAC - integration of auto-generated code into existing hand written code
18
Instrument Control Systems Seminar, 20 th -24 th October 2014 n Hardware-in-the-Loop (HIL) testing is a technique used for the development and testing of real time embedded control systems n The physical system to be controlled (a.k.a. plant under control) is replaced by a simulator running a mathematical representation (dynamic model) of the relevant dynamics. This has the following advantages Limitations imposed by the real plant on the scope of the testing are removed: tests are possible in otherwise difficult or dangerous conditions without harming people Commonly the plant is orders of magnitude more expensive than a HIL simulator. The risk of damaging the plant during tests is eliminated: problems are found on the simulator before they have even a chance to cause real – and expensive – damage Parallel development of control system and plant is possible and consequently the project schedule can be compressed Problems are found and can be addressed at an early stage in the development process, thus reducing cost and effort HIL testing
19
Instrument Control Systems Seminar, 20 th -24 th October 2014 n Based on National Instruments CompactRIO hardware n Programmed with LabView Realtime/FPGA modules n FPGA configured to calculate quadrature encoder signals (A/B/R) in real time (sampling interval 65 kHz) n Off the shelf CompactRIO modules + custom precision voltage/current converter interface to LCU n Reproduces the telescope dynamic behaviour n LCU thinks it is driving the real telescope, for example even encoder initialization can be tested Telescope axis HIL simulator
20
Instrument Control Systems Seminar, 20 th -24 th October 2014 HIL testing efforts pay off
21
Instrument Control Systems Seminar, 20 th -24 th October 2014 ESTAC performance comparison - AT AT1 with new software (left), AT2 with old software (right).
22
Instrument Control Systems Seminar, 20 th -24 th October 2014 ESTAC performance comparison - UT
23
Instrument Control Systems Seminar, 20 th -24 th October 2014 n Beckhoff TwinCAT is a Windows based implementation of the EtherCAT master providing deterministic cyclic access to field inputs and outputs as well as to variables in the traditional IEC 61131-3 PLC languages. n TwinCAT 3, launched in 2010 has been a major upgrade which includes the eXtended Automation Technlogy (XAT), supporting features such as high-level languages such as C/C++ and Simulink. n In the modular architecture of TwinCAT 3 all real-time components are encapsulated in modules which are managed by the run-time system. n TcCOM (TwinCAT COM) is the adaptation of COM (Component Object Model) to the automation technology, allowing modules implemented in different languages to interact seamlessly in the real-time context Beckhoff TwinCAT
24
Instrument Control Systems Seminar, 20 th -24 th October 2014 n Each TwinCAT module has a set of mandatory and optional attributes. The mandatory attributes are: description, state machine and a generic interface (ITComObject). The ITComObject interface is used to access basic information and status of the module like name, object ID, parameters and state n The module state machine controls the initialization, parameterization and creation of the connection to other modules TwinCAT Module
25
Instrument Control Systems Seminar, 20 th -24 th October 2014 n As already explained, the MathWorks Embedded Coder enables code generation from Simulink models. With the Embedded Coder plus the TwinCAT 3 Target for MatLab/Simulink (product code TE1400, available from Beckhoff) it is possible to generate C++ code encapsulated in a standard TwinCAT 3 module format. n The generation process delivers two outputs: C++ code generated by the Embedded Coder/TE1400 in the form of a Visual Studio C++ project and including all source code files, compiler and linker settings necessary to compile the module. Binary (object file) produced by the Microsoft C++ compiler. n The binary file can be added as TcCOM object to the TwinCAT project. Inputs, outputs and parameters of the TwinCAT module match the ones defined in the source Simulink model. It is even possible to display and navigate the block diagram including real time signal monitoring and parameter tuning at run-time. TwinCAT/Simulink Integration
26
Instrument Control Systems Seminar, 20 th -24 th October 2014 TwinCAT/Simulink – screenshot Model Inputs/Outputs Model parametersHierarchical tree viewOnline values
27
Instrument Control Systems Seminar, 20 th -24 th October 2014 n ESTAC application deployed on a Beckhoff Embedded PC. n Able to successfully control the HIL telescope simulator two different DC motors In both cases the CPU load remained well below 10% running at cycle time of 1 ms n These tests demonstrated the versatility and the potential of integrating C++ and Simulink application into the TwinCAT environment. The direct benefits are Re-use of existing and previously tested software components. Only minor modifications are required to adapt the code to the new platform. Simplification by using a well known programming language in our environment. Most of our developers are experienced C/C++ developers. Implementation of advanced applications requiring higher performance. Proof of concept
28
Instrument Control Systems Seminar, 20 th -24 th October 2014 n Sandrock, Di Lieto, Pettazzi, Erm, “Design and implementation of a general main axis controller for the ESO telescopes”, Proc. SPIE 8451 (2012). n Kiekebusch, Di Lieto, Sandrock, Popovic, Chiozzi: “MathWorks Simulink and C++ integration with the new VLT PLC-based standard development platform for instrument control systems”, Proc. SPIE 9152 (2014) n Kiekebusch et al. “PC based PLCs and Ethernet based fieldbus: the new standard platform for future VLT instrument control”, Proc. SPIE 9152 (2014) n Sandrock: “Standard Telescope Axis Controller, Requirements Specification” GEN-TRE-ESO-50000-5301, ESO internal document, (2011) n Di Lieto: “Standard Telescope Axis Controller, Control Algorithm Specification”, GEN-TRE-ESO-50000-5302, ESO internal document, (2011) References
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.