1 / 17

Andreja Rojko andreja.rojko@uni-mb.si TARET PROJECT

Introduction to the first laboratory exercise Continuous neural network sliding mode controller DSP2 realization. Andreja Rojko andreja.rojko@uni-mb.si TARET PROJECT. OUTLINE. Overview Dynamic model of the experimental mechanism Simulation model of the experimental mechanism

asta
Download Presentation

Andreja Rojko andreja.rojko@uni-mb.si TARET PROJECT

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Introduction to the first laboratory exerciseContinuous neural network sliding mode controller DSP2 realization Andreja Rojko andreja.rojko@uni-mb.si TARET PROJECT

  2. OUTLINE • Overview • Dynamic model of the experimental mechanism • Simulation model of the experimental mechanism • Sin2 velocity profile – reference trajectory • PI position control • Controller algorithm – NN • Controller algorithm - C code • Controller algorithm - test • Complete simulation scheme • Experiment – C code, test on DSP2 • Experiment Andreja Rojko

  3. Dynamic model of the experimental mechanism • General dynamic model of mechanism: • Inertia: • Spring torque: Andreja Rojko

  4. Dynamic model of the experimental mechanism • Dynamic model of the experimental mechanism: • Gear ratio: Andreja Rojko

  5. Simulation model of the experimental mechanism Andreja Rojko

  6. Sin2 velocity profile – reference trajectory • For position and velocity control of mechanisms we need reference trajectory: desired position, desired velocity and desired acceleration. The reference trajectory is defined with the following data: • initial position( theta_initial), end position (theta_final) • maximum velocity (vmax) • maximum acceleration,(amax) Andreja Rojko

  7. Sin2 velocity profile – reference trajectory Andreja Rojko

  8. PI position control • PI position controller, PI current controller. • Set the parameters of PI position controller. • 'trial and error' procedure. Andreja Rojko

  9. Controller algorithm - NN • Neural netwok with two layers will be constructed for the use inCSMNN control algorithm. • Nonlinear threshold function will be used for the hidden layer, so that its outputwill have values between -1 and 1. • Linear threshold function will be used for the output layer. • Sketch the NN structure! Mark the lines with the names of variables. • For learning algorithm, the equations form E-book will be used. • Case study from e-book ‘direct drive robot’ -> rewrite into equations for our one axis experimental mechanism. • We will use different names because we cannot use Greek letters in C code...table of the preferable variables names and their sizes is in the instructions. Andreja Rojko

  10. Controller algorithm - C code • For programming the controller algorithm in C, we will use S-Function Builder block. • NN’s weights should be declared as global variables and initialized to small numbers between -1 and 1 (Example1). • Writing the C code: • Don’t try to write the whole algorithm at once! • First write and test the code for calculation of the output from NN. • Then add the learning algorithm for the output layer and then, when this is working, also for the hidden layer. • It is advisable to check some parts of the program (specially loops) in Matlab m-file! Andreja Rojko

  11. Controller algorithm - test Andreja Rojko

  12. Controller algorithm - test Andreja Rojko

  13. Complete simulation scheme Andreja Rojko

  14. Experiment – C code • Declaration and initialization of the global variables should be altered for C compiler on DSP2 board! • Reason: Matlab uses different C code compiler then it is used on DSP2 board. • First test, if algorithm’s C code is working on DSP2 (without mechanism). Andreja Rojko

  15. Experiment – test Andreja Rojko

  16. Experiment Andreja Rojko

  17. Conclusion • Read the instructions for each step carefully before you begin to work. • Between work write the report: explain each step, give the results, explain the results! • Required part: Experiment with PI position control, Simulation of the CSMNN control algorithm with the neural network, teleoperation by using PI position control. • Desired: Experiment with CSMNN (even if it is not working perfectly). • NOTE! In the experimental part don’t let the motor oscillating for too long, because it can be damaged! Andreja Rojko

More Related