Third time operation-real-time control software design

Source: Internet
Author: User

1. Read the Notes

Based on the real-time operating system knowledge in this week's classroom, browse the following commercial and open-source real-time operating system website, write a text to the other students briefly describe the performance characteristics of a real-time operating system or the performance of the operating system comparison:

    • Vxworks:www.windriver.com/products/vxworks
    • QNX:www.qnx.com
    • Xenomai:xenomai.org
    • Intime:www.tenasys.com/tenasys-products/intime-rtos-family/overview-rtos
    • Sylixos:www.sylixos.com
    • Ucos:www.micrium.com

Uc/os II Introduction

The Uc/os II (Micro Control operation System) is a rom-based, removable, preemptive, real-time multitasking core that is highly portable and particularly suitable for microprocessors and controllers, is a real-time operating system (RTOS) that is comparable to the performance of many commercial operating systems. To provide the best porting performance, Uc/os II was developed to the greatest extent using the ANSI C language and has been ported to nearly 40 processor architectures, ranging from 8-bit to 64-bit CPUs (including DSP).

The Uc/os II can be simply considered as a multitasking scheduler, which improves and adds system services related to multitasking operating systems, such as semaphores, mailboxes, etc., on top of this task scheduler. Its main features are open source code, code structure is clear, concise, detailed comments, organized, good portability, can be cut, curable. The kernel is preemptive and can manage up to 60 tasks. Μc/Os, formerly known as Μc/os, was originally published in 1992 by American embedded systems expert Jean J.labrosse in the May and June editions of the journal Embedded Systems Programming, and the Μc/os source was posted on b b S of the magazine.

Μc/os and μc/Os are specifically designed for computer embedded applications, and most of the code is written in C. CPU hardware related parts are written in assembly language, the total volume of about 200 lines of assembly language is compressed to a minimum, in order to facilitate the migration to any other CPU. As long as the user has the standard ANSI C cross compiler, has the assembler, the connector and so on the software tool, may embed the μc/Os the person to the development product. μc/Os has the characteristics of high execution efficiency, small footprint, good real-time performance and scalability, and the minimum kernel can be compiled to 2KB.   The μc/OS has been ported to almost all well-known CPUs. Strictly speaking, Uc/os-ii is just a real-time operating system kernel, which contains only the basic functions of task scheduling, task management, time management, memory management and communication and synchronization between tasks. No additional services such as input/output management, file system, network, etc. are provided. However, due to the good scalability and open source of uc/os-ii, these non-essential functions can be implemented by the users themselves as needed.

The UC/OS-II goal is to implement a preemptive real-time kernel based on priority scheduling, and provide the most basic system services on top of this kernel, such as semaphore, mailbox, message queue, memory management, interrupt management, etc. Uc/os-ii is published as a source code, but does not mean that it is open source software. You can use it for teaching and private research, but if you use it for commercial purposes, you must obtain a commercial license through micrium. Peaceful. Although ucos-ii in the commercial use of the need to be authorized and the cost is a big number, but his open source after all led us into the core of the world.

2. This course needs to complete a team project, the main function is to achieve a two-axis robot motion control simulation, the main functions include:
    • User Interface task: Responsible for receiving requests from the user and sending the motion instructions to the trajectory interpolation task.

    • Trajectory interpolation task: Receive motion instruction, calculate the position and speed setpoint of each axis in real time.

    • Physics engine Interface: Based on the Ode Open source physics engine, create a two-axis manipulator and the environment of the physical model, with the trajectory interpolation task output of the axis position and speed SetPoint control the movement of the model, and the real-time state feedback to the trajectory interpolation task.

    • Graphical user interface: The above functions can be integrated into a GUI interface based on Qt.

1) Think about the development of which module you are best at or interested in, and write on your blog.

2) In addition to programming, you can contribute to a software project in a variety of forms, such as team management, requirements analysis, functional definition, algorithmic design, simulation analysis, software testing, document writing ..., quick reading Xin Zou Teacher's "Law of construction" first five chapters and Xin Zou Teacher's blog (http:// Www.cnblogs.com/xinz), write down your understanding of team collaboration development and the roles or tasks that you tend to assume in a control software project.

Imagine:

Graphical user interface on the user can choose a typical trajectory curve or NC files, such as the analysis of the interpolation task to send straight lines, arcs, spline trajectory command, interpolation task based on the speed and acceleration requirements of the real-time calculation of each axis speed and acceleration (transmission ratio and other parameters of their own settings), physical engine interface as a moving entity , in the form of simulation to the specified angle of information movement, and in the form of simulation of position information such as feedback to the interpolation task (because it is simulation, the direction of the data flow is only one-way, so there is no actual error, feedback is useless), while the real-time display of the given speed, location information.

specific functions of each module :

Graphical user interface: Users select the desired path, and send to the next layer (can use the network, etc.), real-time display of the processed path information, real-time display of the speed of each axis;

Trajectory interpolation task: Accept basic interpolation task information (line, arc, etc.), analytic to the speed and acceleration sent to the motor (specifically how to achieve also read);

Physical engine interface: equivalent to a mechanical entity, according to each axis position and speed information to achieve the corresponding movement (and position feedback to the interpolation task), the speed of each axis and other feedback to the graphical user interface;

functional decomposition of each module : Graphical user interface :

Display graphic images, etc.;

Read files (dxf, g instructions, etc.);

Achieve network communication between different modules (analog computer and servo device communication), customize their communication protocol (track type-line, arc; start point, direction), check;

Data storage and buffering (recipient interpolation task accepts data to be cached);

interpolation tasks :

Accept data and verify, cache;

Calculate the middle point (interpolation) according to the given movement starting point, end point, etc. (assuming that the numerical control device uses voltage pulses as the output increment of the interpolation point coordinates, that is, the stepper motor as the driving device, the calculation is the feed pulse, using the pulse increment interpolation algorithm, in particular, point-by-spot comparison method and digital integration method and also data sampling interpolation)

Sending the pulse data to the physical interface;

Physical Engine interface :

The pulse data is received, the joint angle is calculated and the joint moves to the specified position (KDE or OpenGL can be used);

Send their location information to the user interface (network communication, etc.), sent to the interpolation task (if it is a closed-loop servo system);

The following flowchart can be modeled:

Resources to refer to:

ODE: http://www.ode.org/

openrave : http://www.openrave.org/docs/latest_stable/

Open Robot Control software:http://www.orocos.org/

Kinematics and Dynamics LIBRARY:HTTP://WWW.OROCOS.ORG/KDL

Some other rescources in SourceForge about trajectory planning:https://sourceforge.net/directory/os:windows/?q=trajectory

eigen: http://eigen.tuxfamily.org/dox/GettingStarted.html

Third time operation-real-time control software design

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.