Control loops have the schematic form while (active) {wait for trigger; do something to a device;} and they are the building blocks of most realtime programs. Control loops in RTLinux can be just a few lines of code or can involve the synchronized performance of thousands of loops. People have used RTLinux for some of the most demanding real-time applications as well as for quick experiments. Whether you are developing a 100-microsecond duty cycle magnetic bearing controller [3], a jet engine control and hardware-in-loop simulation (as did Pratt & Whitney), or a simple robotic controller using a sound card as an improvised analog-to-digital (A/D) device (several Japanese universities), you need the same ingredients, the same principles, and a good understanding of the device or plant you are controlling.
This chapter covers basic control loop design and emphasizes issues of moving data and control information between the real-time loop and the outside world. We provide abbreviated treatment of scheduling and synchroniza- tion. Our experience is that pure priority scheduling1 satisfies 90% of all requirements and slot schedulers2 satisfy most of the rest. Both are built into RTLinux. Synchronization is not hard if a few basic rules are followed [8] and proper attention is paid to making the design robust. The RTLinux programming model is most effective when engineers can properly modularize their programs and reuse the powerful software found in Linux or BSD.
RTLinux is now a trademark of Wind River Systems.FSMLabs is a trademark of Finite State Machine Labs Inc.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
D.R. Butenhof. Programming with POSIX Threads. Addison-Wesley, Reading, MA, 1997.
Cort Dougan. Two-axis, real-time camera control. Dr. Dobbs Journal, October 2002.
Marty Humphrey, Edgar Hilton, and Paul Allaire. Experiences using RT-linux to implement a controller for a high speed magnetic bearing system. In IEEE Real Time Technology and Applications Symposium, pages 121-130, 1999.
Information Technology—Portable Operating Systems Interface (POSIX)—Part 1: System Application Program Interface (API)—Amendment 2: Threads Exten-sion [C Language]. IEEE Standard 1003.1c-1995, IEEE, New York, 1995. Also ISO/IEC 9945-1:1990b.
B.W. Kernighan and D.M. Ritchie. The C Programming Language. Prentice-Hall, Englewood Cliffs, NJ, 1988. 2nd edition.
OpenGroup. The Single UNIX Specification Version. http://www.unix.org/ version3/ieee_std.html Catalog number C046.
Matt Sherer and FSMLabs Technical Staff. Real-Time Programming in RTCore. FSMLabs, Socorro, NM, 2004. Versions with each release.
Victor Yodaiken. Temporal inventory and real-time sychronization in rtlinuxpro. Technical report, FSMLabs, Socorro, NM, April 2003.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2005 Birkhäuser Boston
About this chapter
Cite this chapter
Yodaiken, V., Sherer, M., Hilton, E. (2005). Control Loops in RTLinux. In: Hristu-Varsakelis, D., Levine, W.S. (eds) Handbook of Networked and Embedded Control Systems. Control Engineering. Birkhäuser Boston. https://doi.org/10.1007/0-8176-4404-0_20
Download citation
DOI: https://doi.org/10.1007/0-8176-4404-0_20
Publisher Name: Birkhäuser Boston
Print ISBN: 978-0-8176-3239-7
Online ISBN: 978-0-8176-4404-8
eBook Packages: EngineeringEngineering (R0)