Download presentation
Presentation is loading. Please wait.
Published byMervin Hunt Modified over 9 years ago
1
Upgrade to Real Time Linux Target: A MATLAB-Based Graphical Control Environment Thesis Defense by Hai Xu CLEMSON U N I V E R S I T Y Department of Electrical and Computer Engineering
2
Clemson University Controls & Mechatronics Presentation Overview Introduction Introduction Technical Approach: Technical Approach: Memory Allocation Shared Memory Pool Log Buffer RTLT Hardware Interface Hardware Client-Server Architecture in RTLT How does RTLT work with SIMULINK ? What’s new in the upgraded version of RTLT ? What’s new in the upgraded version of RTLT ? LMotor (GUI) LMotor (GUI) Conclusions Conclusions
3
Clemson University Controls & Mechatronics Introduction RTLT (Real-Time Linux Target) is a software package that gives the user the ability to implement a SIMULINK block diagram on a standard Intel PC in hard real-time. RTLT provides a Graphical Environment for the implementation and execution of control algorithms. RTLT combines the superior computation power of MATLAB engine with the block diagram capabilities of SIMULINK. RTLT has been successfully used in many control experiments at Clemson. LMotor is a Graphic User Interface (GUI) for RTLT. LMotor provides visual modeling capabilities to help users understand complex systems.
4
Clemson University Controls & Mechatronics Introduction (Cont’d) MATLAB is a software environment that allows a user to easily integrate computation and visualization tasks. SIMULINK is a software package for modeling, simulating, and analyzing dynamic systems in the MATLAB environment. Real-Time Workshop (RTW) is an automatic C language code generator for SIMULINK.
5
Clemson University Controls & Mechatronics Technical Approach Memory Allocation: Memory Allocation: Shared Memory Pool Log Buffer RTLT Hardware Interface RTLT Hardware Interface Hardware Client-Server Architecture in RTLT Hardware Client-Server Architecture in RTLT How does RTLT work with SIMULINK ? How does RTLT work with SIMULINK ?
6
Clemson University Controls & Mechatronics Shared Memory Pool Process 1 Process 2 Shared Memory Pool Read/Write Data What is Shared Memory? What is Shared Memory? 2 or more processes can access a single chunk of access a single chunk of memory. memory. Communication is achieved by reading and achieved by reading and writing to this block of writing to this block of memory. memory. Shared Memory is a fast, no-blocking Inter-Process no-blocking Inter-Process Communication (IPC) Communication (IPC) method. method.
7
Clemson University Controls & Mechatronics Shared Memory Pool (Cont’d) What is Shared Memory Pool? What is Shared Memory Pool? Shared Memory Pool is a block of physical memory that is reserved during boot up. Shared Memory Pool is allocated in Kernel space. Shared Memory Pool can be used in User space by using the Shared Memory Management APIs (Application Program Interface) of RTLT. RTLT uses a shared memory pool to facilitate the implementation of hardware client-server architecture. The maximum size of the Shared Memory Pool is 4 MB in Intel- The maximum size of the Shared Memory Pool is 4 MB in Intel- Pentium class machines and above. On earlier machines, it is 1 MB. Pentium class machines and above. On earlier machines, it is 1 MB.
8
Clemson University Controls & Mechatronics Log Buffer Why we have to use Log Buffer? Why we have to use Log Buffer? To save large amounts of data, Shared Memory Pool is not big enough. What is Log Buffer? What is Log Buffer? Created in the Kernel address space (controlled by Linux Kernel) and mapped to User space. The created log buffer is not in the Shared Memory Pool. At present, we can create only one log buffer in RTLT.
9
Clemson University Controls & Mechatronics Log Buffer (cont’d) How to use Log Buffer? How to use Log Buffer? The base address and the size of the log buffer are initialized in Kernel space and then mapped to the User space. Both Kernel and User processes can access the big "shared" log buffer. Shared Memory Pool Log Buffer User Space Kernel Space
10
Clemson University Controls & Mechatronics Hardware Client-Server Architecture in RTLT I/O Board Servers (Device Drivers): - read input data from I/O Board through A/D channels or digital lines, etc. Write the data to the Shared Memory Pool. - write output data from the Shared Memory Pool to the I/O Board. I/O Board Clients (Real-Time targets): - read input data from the Shared Memory Pool. - write the processed data to Shared Memory Pool.
11
Clemson University Controls & Mechatronics Hardware Client-Server Architecture in RTLT (Cont’d)
12
Clemson University Controls & Mechatronics Hardware Interface for RTLT Supported Inexpensive Motion Control Board: Supported Inexpensive Motion Control Board: - MultiQ2, MultiQ3, ServoToGo, PCL812, Pmac and AtiFT Supported Interfaces: Supported Interfaces: - A/D - D/A - Encoder - Digital I/O
13
Clemson University Controls & Mechatronics How does RTLT work with SIMULINK ? Create the Control Program with the SIMULINK block diagram and RTLT SIMULINK Library blocks:
14
Clemson University Controls & Mechatronics How does RTLT work with SIMULINK? (Cont’d) Digital To Analog Converter: Redirects the Input Signal to the Converter Block to the Specified D/A channelDigital To Analog Converter: Redirects the Input Signal to the Converter Block to the Specified D/A channel Analog To Digital Converter: Reads Input Signal from the A/D channelAnalog To Digital Converter: Reads Input Signal from the A/D channel Digital Output: Outputs TTL Level Signal to Specified Line (bit)Digital Output: Outputs TTL Level Signal to Specified Line (bit) Digital Input: Reads TTL Level Signal from Specified Line (bit)Digital Input: Reads TTL Level Signal from Specified Line (bit) Read Encoder: Reads the Quadrature Encoder Signal and Converts to a Number (Representing, for example, Angular Displacement of a Rotor)Read Encoder: Reads the Quadrature Encoder Signal and Converts to a Number (Representing, for example, Angular Displacement of a Rotor) Set Encoder: Allows User to Set the Encoder Reading to a Pre- Determined Value (Used to commutate, for example, SR, Stepper and BLDC motors)Set Encoder: Allows User to Set the Encoder Reading to a Pre- Determined Value (Used to commutate, for example, SR, Stepper and BLDC motors) Reset FT: The Reset FT block allows the user to reset the bias array of the ATI Force/Torque sensor system. (for ATI FT board only)Reset FT: The Reset FT block allows the user to reset the bias array of the ATI Force/Torque sensor system. (for ATI FT board only) Hardware Adapter: Special Block that Provides a Reference to a Particular I/O BoardHardware Adapter: Special Block that Provides a Reference to a Particular I/O Board
15
Clemson University Controls & Mechatronics How does RTLT work with SIMULINK? (Cont’d) A Control Program Example:
16
Clemson University Controls & Mechatronics How does RTLT work with SIMULINK? (Cont’d) Initialize Simulation Parameters:Initialize Simulation Parameters: I/O Board Simulation Parameters
17
Clemson University Controls & Mechatronics How does RTLT work with SIMULINK? (Cont’d) Build Real-Time Target and Execute:Build Real-Time Target and Execute: External Model Control Panel
18
Clemson University Controls & Mechatronics How does RTLT work with SIMULINK? (Cont’d) Some Optional Simulation Parameters:Some Optional Simulation Parameters:
19
Clemson University Controls & Mechatronics What’s new ? Newer stable Linux KernelNewer stable Linux Kernel –From version 2.2.13 to 2.2.18 Newer MATLABNewer MATLAB –From version 5.3 to 6.0 Newer RTLinuxNewer RTLinux –From version 2.0 to 3.0 Newer RedHat LinuxNewer RedHat Linux –From version 6.x to 7.0 LMotorLMotor
20
Clemson University Controls & Mechatronics LMotor What is LMotor ?What is LMotor ? LMotor is a Graphic User Interface (GUI) for RTLT LMotor features include : on-line parameter tuning without recompiling the MATLAB model allowing users to watch the Real-Time values of selected log variables monitoring of logged variables during control execution in the form of real-time plot windows superior real-time plotting capabilities in conjunction with MATLAB compatible data logging exporting logged data to MATLAB compatible data format (M-files).
21
Clemson University Controls & Mechatronics Conclusions Salient Features of the Real-Time Linux Target Utilizes the Computational Power of MATLAB Block Diagram- based Approach (SIMULINK) Online Data Plotting Online Parameter Tuning MATLAB Compatible Data Export (M- Files) Multiple I/O Boards Support Data Sharing Future Work Upgrade the RTLT to newer Linux Kernel and RTLinux. More I/O board drivers support Optimize the LMotor
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.