lunduniversity.lu.se

Denna sida på svenska This page in English

TrueTime Project

Project: State Feedback Control of a Simulated Ball & Beam Process Using TrueTime

TrueTime is a Matlab/Simulink-based simulator for real-time control systems developed at the Automatic Control department. It facilitates co-simulation of controller task execution in real-time kernels, network transmissions, and continuous plant dynamics.

In Simulink you should implement an animated model of the ball and beam process. The process should be controlled using a state feedback and observer controller. The state feedback and the observer should be implemented as tasks in the TrueTime CPU models. A TrueTime real-time network model should be used for communication between three nodes: a node that performs the sensing and actuation, a node that implements the state feedback, and a node that implements the observer.

Detailed Description of the Project

  1. Make sure that you have a suitable version of Matlab installed at your home computer (Mac: Matlab 2016a or later; Linux: Matlab 2012a or later; Windows 7 or 10: Matlab 2014a or later). The student version of Matlab can be downloaded from http://program.ddg.lth.se/en/matlab.php 
  2. Download and install TrueTime according to the README instructions in http://www.control.lth.se/research/tools-and-software/truetime/ 
  3. Make yourself familiar with the TrueTime manual
  4. Make sure that TrueTime works on your system. Do that by running one of the examples, e.g., the servo example found in \truetime-2.0\examples\servo . There are two versions of each example, a matlab version where all the task code is written in matlab and one C++ version where all the task code is written in C++. In this project you should only use the matlab version, i.e., go to \truetime-2.0\examples\servo\matlab\ Run the servo example by loading the servo.slx Simulink model and run the simulation. If you get reasonable plots in the oscilloscope then you know that TrueTime works as it should.
  5. The best way to get to know TrueTime is to work through the TrueTime Exercise (Ovn5). This used to be a part of the Real-Time Systems course. Download and unpack the .zip file. Go through the exercise manual (Exercise5.html) and do the exercise and answer the questions. The solutions are available in the .zip file.
  6. Now you are prepared to start the project.
  7. Start by implementing a continuous-time Simulink model of the ball and beam process according to the model found here.
  8. Next you should design an animation of the ball and beam process in Simulink. There are a lot of examples of how to do this in the Simulink documentation and on Google.
  9. Next step is to design a discrete-time state feedback controller for the ball and beam (not for the beam only). Do this using Simulink's ordinary discrete-time blocks. Assume initially that you can measure all states.
  10. When this works design an observer and combine this with the state feedback. Assume that only the ball position can be measured and that the rest of the states need to be estimated.
  11. Now it is time for you to start implementing this in TrueTime. Begin with the state feedback and implement this as a periodic task in a TrueTime CPU that is connected to the simulated process using the analog inputs and outputs. Once this works you continue with implementing the observer, possibly in the same task. Assume suitable execution times.
  12. Once this work you should translate this into a networked control solution. You can learn a lot by looking on the TrueTime networked example. Use one CPU that performs the sampling and actuation, one that implements the observer, and one that implements the state feedback. Use a wired or wireless TrueTime network for implementing the communication.
  13. When this work add a disturbance node that sends disturbance traffic on the network.
  14. Prepare a presentation and a report that contains the result of your work.
Page Manager: