Integration of OCP and SIMULINK

Slides:



Advertisements
Similar presentations
Threads, SMP, and Microkernels
Advertisements

IEEE Region 6 Student Paper Contest, Anaheim CA, September 17 th 1998 Chen-I Lim Arizona State University
The robot structure model design 2 Curse 5. Modeling: the robot AcTrMStTk V(t) T(t)  (t) q(t) x(t)
MotoHawk Training Model-Based Design of Embedded Systems.
SIMULINK Dr. Samir Al-Amer. SIMULINK SIMULINK is a power simulation program that comes with MATLAB Used to simulate wide range of dynamical systems To.
HossamTalaat - MATLAB Course - KSU - 21/1/24 1 IEEE Student Branch - College of Engineering - KSU Getting started with Simulink By Prof. Hossam Talaat.
1 I/O Management in Representative Operating Systems.
Simulink ® From Simulink® 7 Getting Started Guide.
Anne Mascarin DSP Marketing The MathWorks
W.Skulski Phobos Workshop April /2003 Firmware & software development Digital Pulse Processor DDC-8 (Universal Trigger Module) Wojtek Skulski University.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 10Slide 1 Architectural Design l Establishing the overall structure of a software system.
Khoros Yongqun He Dept. of Computer Science, Virginia Tech.
Processes and Threads Processes have two characteristics: – Resource ownership - process includes a virtual address space to hold the process image – Scheduling/execution.
November 21, 2005 Center for Hybrid and Embedded Software Systems Example To illustrate how changes in DB can be used to efficiently update a block diagram,
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 10Slide 1 Architectural Design l Establishing the overall structure of a software system.
240-Current Research Easily Extensible Systems, Octave, Input Formats, SOA.
Introduction to MATLAB for Engineers Third Edition William J. Palm III Chapter 10 Simulink PowerPoint to accompany Copyright © The McGraw-Hill Companies,
© ABB University - 1 Revision B E x t e n d e d A u t o m a t i o n S y s t e m x A Chapter 21 Function Designer Course T314.
SIMULINK-Tutorial 1 Class ECES-304 Presented by : Shubham Bhat.
Architecture View Models A model is a complete, simplified description of a system from a particular perspective or viewpoint. There is no single view.
Systems Realization Laboratory Compact Rescue Crawler ME /26/07 Jonathan Jobe Andrew Marshall Chris Weir.
Modeling of Power Converters using Matlab and Simulink
Week 04 Object Oriented Analysis and Designing. What is a model? A model is quicker and easier to build A model can be used in simulations, to learn more.
Simulink by Dr. Amin Danial Asham. References  MATLAB Help  Telemark University College - Department of Electrical Engineering, Information Technology.
Simulink  ? 1 Simulink  ( Simu lation and Link ) is an extension of Matlab Offers modeling, simulation, and analysis of dynamical systems; i.e., a system.
I/O Software CS 537 – Introduction to Operating Systems.
Introduction to UML and Rational Rose UML - Unified Modeling Language Rational Rose 98 - a GUI tool to systematically develop software through the following.
Introduction to OOAD and UML
Introduction to Operating Systems Concepts
Simulink Interface Layer (SIL)
OPERATING SYSTEM CONCEPT AND PRACTISE
Module 12: I/O Systems I/O hardware Application I/O Interface
Current Generation Hypervisor Type 1 Type 2.
State Space Representation
Data Flow Architecture
SOFTWARE DESIGN AND ARCHITECTURE
MatLab Programming By Kishan Kathiriya.
CORBA Alegria Baquero.
Chapter 2 Processes and Threads Today 2.1 Processes 2.2 Threads
J. Michael, M. Shing M. Miklaski, J. Babbitt Naval Postgraduate School
ECEN/MAE 3723 – Systems I MATLAB Lecture 2.
Part 3 Design What does design mean in different fields?
Welcome to MATLAB.
Introduction to Operating System (OS)
EIN 6133 Enterprise Engineering
WORKSHOP 3 GSE IMPORT.
Simulink Basics Reijo Vuohelainen
An Integrated, Multi-Layer Approach to Software-Enabled Control
Many-core Software Development Platforms
LOGIKA & PEMROGRAMAN KOMPUTER MATLAB & Simulink
Chapter 2: Operating-System Structures
Introduction to cosynthesis Rabi Mahapatra CSCE617
2P13 Week 2.
Threads, SMP, and Microkernels
Matlab as a Design Environment for Wireless ASIC Design
CORBA Alegria Baquero.
Chapter 2: The Linux System Part 1
MATLAB/SIMULINK Professor Walter W. Olson
Operating System Concepts
13: I/O Systems I/O hardwared Application I/O Interface
CS703 - Advanced Operating Systems
Simulink Support for VEX Cortex BEST Robotics Sandeep Hiremath
Analysis models and design models
Lecture 4- Threads, SMP, and Microkernels
State Space Analysis UNIT-V.
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Computer Networking A Top-Down Approach Featuring the Internet
<Your Team # > Your Team Name Here
Lecture Topics: 11/1 Hand back midterms
Module 12: I/O Systems I/O hardwared Application I/O Interface
Presentation transcript:

Integration of OCP and SIMULINK 7-8 August 2001 Gary Balas Raktim Bhattacharya, Praveen Vijayaraghavan, Yohannes Ketema Aerospace Engineering and Mechanics University of Minnesota balas@aem.umn.edu Andrew Packard Alpay Kaya, Zachary Jarvis-Wloszek, Mechanical Engineering UC Berkeley pack@me.berkeley.edu

F-16 Flight Control with OCP Creating OCP components Version 1.0 Using SIM2OCP to create F-16 flight control components Suggestion for added OCP functionality Basic idea Advantages/Disadvantages Scope for improvement

Creating OCP Components: (Version 1.0)

Creating OCP Components (Version 1.0) Version 1.0 came with SIM2OCP tool Converts SIMULINK skeleton models to OCP components Easy to design OCP component skeletons Source code generated takes care of I/O interface Internal behavior still needs to be hand coded Code generates Visual C++ project file Very easy to build component data base library Generates C++ objects for signals and their I/O Also generates ProcessP1Main.cpp,…, ProcessPnMain.cpp Unclear how to link ProcessPnMain.cpp with main OCP component code

Creating OCP Components (Version 1.0: contd) SIMULINK process drives the simulation System synchronization is maintained by SIMULINK SIMULINK streams out control signal Gateway to OCP process is a SIMULINK mex file OCP component generates system derivative Inter-process communication handled by OCP signal manager Y(t) : To Integrator OCP Component in C++ F-16 Model I/O through OCP signal manager MATLAB/SIMULINK Flight Controller U(t) : From Controller

Creating OCP Components (Version 1.0: contd) OCP Component in C++ F-16 Model I/O through OCP signal manager Outer loop controller LPV longitudinal axis Vc , , p HTC Way-point Generator y x Integrator Sensor switch Classical lateral axis Joystick Inner loop controller Flight controller implemented in MATLAB/SIMULINK

Creating OCP Components (Version 1.0: contd) Currently SIMULINK synchronizes OCP components OCP components still restricted to pure C++ code Systems designed in SIMULINK require conversion to C++ By hand MATLAB code generator Server 3 Server 1

Using SIM2OCP to create F-16 flight control components …

Using SIM2OCP to create F-16 flight control components … Create SIMULINK diagram for signal flow

Creating OCP components (contd.) Start SIM2OCP …

Creating OCP components (contd.) Create vector signals and define their elements …

Creating OCP components (contd.) F16_States: signal of width 16

Creating OCP components (contd.) Connect components using signals created ….

Creating OCP components (contd.) Decompose SIMULINK subsystems into OCP processes …

Creating OCP components (contd.) Create software configuration states …

Creating OCP components (contd.) Click on Finish to generate ComponentInfo.txt

Creating OCP components (contd.) Generate code using perl genocp.pl ComponentInfo.txt Didn’t work the first time, had to call Brian.

Creating OCP components (contd.) Code generator generates Visual C++ project file / GNU makefile Code compiles without any problem Library ComponentDatabase_Debug.lib is created Code generator also generates main process code ProcessP1Main.cpp – F-16 Model ProcessP2Main.cpp – LPV Controller ProcessP3Main.cpp – Sensor Model Unresolved Issues … No information on how to compile ProcessP1Main.cpp, etc. Brian had to create Visual C++ project files for each of the processes Files had to be moved from one directory to another manually Path problems related to location of libraries and header files hampers auto-code generation of VC++ project files.

Creating OCP components (contd.) Unresolved Issues cont’d … How is the controller scheduled? How does the controller interact with other component in terms of time slices? Is the controller responsible for all its static/dynamic memory management, state information, etc? I.e. Can the controller request 100 GB of address space independently? Methods for testing the timing/memory footprint of the individual components? Bottom line … a lot has been done … though more work is needed to bring OCP within reach of control engineers

Suggestion for added OCP functionality

Suggestion for added OCP functionality Alternative approach to Component creation …

Suggestion for added OCP functionality Basically the same idea as SIMULINK, graph representing connections, algebraic relationships 1 2 3 4 5 1 2 3 4 5 get_param(…,…) can extract blocks and connectivity

Suggestion for added OCP functionality Component #3 Component #1 Component #2 MATLAB Engine MATLAB Engine MATLAB Engine Sequence defined by SIMULINK OCP Data transfer through DDE/ActiveX/Pipes Simulation Manager Scheduling graph and relationships MATLAB Engine MATLAB Engine Component #4 Component #5

Suggestion for added OCP functionality Library of C++ objects for systems in F-16 flight control example Easy to create OCP components from these objects The following C++ objects are available F-16 Model 12 state full nonlinear High and Low fidelity aerodynamic data Linear System Class Linear Parameter Varying System Class First Order Actuator Class Numerical Integration Class Runge-Kutta fourth order

Suggestion for added OCP functionality Alternative approach to MATLAB/OCP interaction Design sub-systems in SIMULINK Use MATLAB engine from C++ code to access SIMULINK ActiveX, Dynamic Data Exchange (Windows) Inter-process Communication based on pipes (Unix) MATLAB is accessed as a function call (currently a MATLAB process needs to be running) The synchronization that is currently being done by SIMULINK would then need to be done by the OCP OCP responsibility would be similar to the Giotto scheduler (UC Berkeley). Problem is Giotto is time triggered.

Suggestion for added OCP functionality Advantages: Easy to generalize OCP components Internal code can be MATLAB based. Full block support of SIMULINK can be utilized. Differs from RTW by taking advantage of full functionality of SIMULINK, perhaps at the expense of computation speed. Sub-system can be designed in SIMULINK More accessible to control practitioners OCP implementation details are totally transparent Less prone to programming errors Disadvantage: 10 times slower than equivalent C code Alternative : Use RTW

Scope for improvement of OCP

OCP Version 1.0 : Scope for improvement Easy to run examples Less CS flavored examples C++ language and template requires understanding of object oriented design. Make computer science background not essential More interaction between control engineers using OCP and Boeing OCP developers. Better commented examples More comments in the code to explain the inner workings