Download presentation
Presentation is loading. Please wait.
Published byMyrtle Pierce Modified over 9 years ago
1
Introduction to the first laboratory exercise Continuous neural network sliding mode controller DSP2 realization Andreja Rojko andreja.rojko@uni-mb.si TARET PROJECT
2
Andreja Rojko1Beljak, February 2007 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
3
Andreja Rojko2Beljak, February 2007 Dynamic model of the experimental mechanism General dynamic model of mechanism: Inertia: Spring torque:
4
Andreja Rojko3Beljak, February 2007 Dynamic model of the experimental mechanism Dynamic model of the experimental mechanism: Gear ratio:
5
Andreja Rojko4Beljak, February 2007 Simulation model of the experimental mechanism
6
Andreja Rojko5Beljak, February 2007 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)
7
Andreja Rojko6Beljak, February 2007 Sin2 velocity profile – reference trajectory
8
Andreja Rojko7Beljak, February 2007 PI position control PI position controller, PI current controller. Set the parameters of PI position controller. 'trial and error' procedure.
9
Andreja Rojko8Beljak, February 2007 Controller algorithm - NN Neural netwok with two layers will be constructed for the use in CSMNN control algorithm. Nonlinear threshold function will be used for the hidden layer, so that its output will 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.instructions
10
Andreja Rojko9Beljak, February 2007 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!
11
Andreja Rojko10Beljak, February 2007 Controller algorithm - test
12
Andreja Rojko11Beljak, February 2007 Controller algorithm - test
13
Andreja Rojko12Beljak, February 2007 Complete simulation scheme
14
Andreja Rojko13Beljak, February 2007 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).
15
Andreja Rojko14Beljak, February 2007 Experiment – test
16
Andreja Rojko15Beljak, February 2007 Experiment
17
Andreja Rojko16Beljak, February 2007 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!
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.