Project Electrical Engineering and Information Technology


In the Project Electrical Engineering and Information Technology – MATLAB meets LEGO Mindstorms – the students are supposed to deepen the learning contents of the lecture “Mathematical Methods for Electrical Engineering” by controlling LEGO Mindstorms NXT robots under MATLAB and to directlyextend their application-related knowledge. The project is a mandatory course in the 1st semester of the Bachelor of Science degree program in Electrical Engineering, Information Technology and Computer Engineering and is carried out by all chairs of the Faculty of Electrical Engineering and Information Technology as part of a block course.

In addition to the assembly of LEGO Mindstorms NXT machines and robots, and the creation of independent creative designs, the mathematical methods of electrical engineering learned in the lecture and exercise are to be realized in MATLAB and applied in the form of programmed control sequences and behavior patterns of the robots. Bluetooth is used as a wireless communication channel between the PC and LEGO Mindstorms NXT robot, where access to the packet-based communication protocol of the Bluetooth interface is possible for deeper understanding.

In several experiments, the student learns how to control the sensors and motors of the Mindstorms NXT robots under MATLAB with the specially developed RWTH – Mindstorms NXT Toolbox. In addition to programming the control sequences, mathematical methods such as discrete integrators, sampling and edge detection of discrete signals, complex numbers, polynomial fitting and coordinate transformations are to be applied. In addition, more complex problems are to be solved independently by the student through skillful processing of digital measurement data, algorithm development, and subsequent robot control under MATLAB and through creative application-based LEGO Mindstorms designs. For example, a robot is to be programmed to behave as autonomously as possible within a given environment. The environment can be detected with various sensors, such as ultrasonic, sound, light and pressure sensors.

The experiments carried out in the project are divided into two categories: compulsory and optional experiments. Six compulsory experiments are carried out by each student independently of the respective supervising institute. In these, in addition to building LEGO robots, the functioning of the sensors and motors and the structure of the packet-based communication protocol of the Bluetooth interface are developed with the help of self-written MATLAB programs. The optional experiments present the student with more complex problems, building on the basic knowledge already acquired from the compulsory experiments. By the realization of own creative robot constructions, control algorithms and visualization methods under MATLAB given tasks are to be solved. In addition, both the motivated student and the project supervisor have the opportunity to expand the elective experiments with their own further application-related tasks. Overall, the total scope of the project experiments is thus structured as follows:

Compulsory experiments: Optional experiments:
  1. Robot building
  2. Bluetooth and touch sensor
  3. Sound sensor
  4. Motors
  5. Light sensor
  6. Ultrasonic sensor
  • Parkour robot
  • 2D-scanner
  • Robot arm

The experimental documentation, further information and announcements about the project can be found in the Moodle teaching and learning portal, which requires registration, at

Um die LEGO Robotern unter MATLAB über den drahtlosen Bluetooth-Kommunikationskanal anzusteuern, wurde die RWTH – Mindstorms NXT Toolbox für MATLAB entworfen und implementiert. Sie bietet neben High-Level Funktionen, die eine sehr einfache Ansteuerung der LEGO NXT Sensorik und Motoren ermöglicht, auch die direkt in MATLAB abgebildeten Steuerfunktionen des offengelegten LEGO Kommunikationsprotokolls.

To control the LEGO robots under MATLAB via the wireless Bluetooth communication channel, the RWTH – Mindstorms NXT Toolbox for MATLAB was designed and implemented. It provides high-level functions that allow very simple control of LEGO NXT sensors and motors, as well as the control functions of the exposed LEGO communication protocol mapped directly in MATLAB.

The Toolbox is licensed as OpenSource Software under the GNU GPL (GNU General Public License) and can be downloaded free of charge at      


In addition, the participation of the interested user in the further development of the RWTH – Mindstorms NXT Toolbox for MATLAB through active contributions is highly desired.


Questions from project participants, will be answered in the discussion forum of the project-specific Moodle learning and teaching portal at



  • “Teaching Practical Engineering for Freshman Students using the RWTH – Mindstorms NXT Toolbox for MATLAB”, Alexander Behrens, Linus Atorf and Til Aach, Matlab – Modelling, Programming and Simulations, InTech, Oct., pp.41-6-5, 2010, *invited paper* Read according chapter online or download the whole book.
  • MATLAB meets LEGO Mindstorms – hands-on Projekt für Erstsemester, Alexander Behrens, relatif – Campus-Magazin Aachen, no. 8, pp.16-17, November, 2009, (Download) or (relatif no. 8) MATLAB meets LEGO Mindstorms – hands-on Projekt für Erstsemester “I have often noticed that by symbolizing too much we make our language unfit for reality.” – Christian Morgenstern. Who has not shared this thought with Christian Morgenstern many times during a basic compulsory lecture? Especially the basic studies electrotechnical lectures deal at the beginning with …
  • MATLAB Meets LEGO Mindstorms – A Freshman Introduction Course Into Practical Engineering, A. Behrens, L. Atorf, R. Schwann, B. Neumann, R. Schnitzler, J. Ballé, T. Herold, A. Telle, T.G. Noll, K. Hameyer and T. Aach, IEEE Transactions on Education, vol. 53, no. 2, pp.306—317 2010, (BibTeX) (Download)Abstract In today’s teaching and learning approaches for first-semester students, practical courses more and more often complement traditional theoretical lectures. This practical element allows an early insight into the real world of engineering, augments student motivation, and enables students to acquire soft skills early. This paper describes a new freshman introduction course into practical engineering, which has been established within the Bachelor of Science curriculum of Electrical Engineering and Information Technology of RWTH Aachen University, Germany. The course is organized as an eight-day, full-time block laboratory for over 300 freshman students, who were supervised by more than 60 tutors from 23 institutes of the Electrical Engineering Department. Based on a threefold learning concept comprising mathematical methods, MATLAB programming, and practical engineering, the students were required to transfer mathematical basics to algorithms in MATLAB in order to control LEGO Mindstorms robots. Toward this end, a new toolbox, called the “RWTH-Mindstorms NXT Toolbox,” was developed, which enables the robots to be controlled remotely via MATLAB from a host computer. This paper describes how the laboratory course is organized and how it induces students to think as actual engineers would in solving real-world tasks with limited resources. Evaluation results show that the project improves the students’ MATLAB programming skills, enhances motivation, and enables a peer learning process.
  • First Steps into Practical Engineering for Freshman Students Using MATLAB and LEGO Mindstorms Robots, Alexander Behrens, Linus Atorf, Robert Schwann, Johannes Ballé, Thomas Herold, Aulis Telle, Acta Polytechnica: Journal of Advanced Engineering, vol. 48, no. 3, pp. 44–49, June, 2008,  (BibTeX) (Download)Abstract Besides lectures on basic theoretical topics, contemporary teaching and learning concepts for first semester students give more and more consideration to practically motivated courses. In this context, a new first-year introductory course in practical engineering has been established in the first semester curriculum of Electrical Engineering at RWTH Aachen University, Germany. Based on a threefold learning concept, programming skills in MATLAB are taught to 309 students within a full-time block course laboratory. The students are encouraged to transfer known mathematical basics to program algorithms and real-world applications performed by 100 LEGO Mindstorms robots. A new MATLAB toolbox and twofold project tasks have been developed for this purpose by a small team of supervisors. The students are supervised by over 60 tutors at 23 institutes, and are encouraged to create their own robotics applications. We describe how the laboratory motivates the students to act and think like engineers and to solve real-world issues with limited resources. The evaluation results show that the proposed practical course concept successfully boosts students’ motivation, advances their programming skills, and encourages the peer learning process.
  • Freshman Engineers Build MATLAB Powered LEGO Robots, Til Aach and Alexander Behrens, MATLAB Digest | Academic Edition, The MathWorks, vol. 2, no. 3, August, 2008, (BibTeX) (Download) Freshman Engineers Build MATLAB Powered LEGO Robots Students at RWTH Aachen University put math and signal processing theory into practice by using MATLAB and the LEGO MINDSTORMS NXT education kit to build and program robots—including one that reads Morse code and another that parks itself autonomously. …
  • Starting out as a Lego tinkerer , RWTHinsight Article 01/2008, (Download)“SOS” is what the Lego robot sends out in Morse code with a pen on the paper. Three short, three long and again three short black strokes. But instead of hectic activity in the face of the call for help, Martin Riedl and his three fellow students look at their self-built and programmed robot with great satisfaction:…