Fix Version/s: None
Sprint:TSSW Sprint - Jun 8 - Jun 22, TSSW Sprint - Jun 22 - Jul 6
Team:Telescope and Site
The rotator Simulink model should be able to track multiple targets. The system will fail/ crash if there are targets that have different directions. In addition, sometimes, the simulation will fail even though all targets are in the same direction. This task will dig into the Simulink model to see how is fitting of multiple targets.
The following figure demonstrates the failure. The x-axis is the time in second and the y-axis is the value such as the rotation position in degree. There are two targets with positions of +1.5 and -1.5 degree. The simulation time is 30.1 seconds and the simulation crashes in the middle with zero-crossing error.
Add the UnitDelay to 'Load Velocity' in rotator_Plant_Model to fix the zero-crossing error. After this, the system stuck at time=9.844 second. It looks like there is the memory issues. If I just let the system stuck, the used memory will increase to 100 % from 50 %.
After the test, this is not the reason. The main problem is the algorithm of zero-crossing detection. Use the adaptive algorithm solve this issue and the simulation can finish without the problems of zero-crossing error or memory leak.
In the following figure, simulate two targets: (1) position=1.2 deg and velocity=0.01 deg/sec and (2) position=-1.5 deg and velocity=-0.01 deg/sec. The total simulation time is 20.1 sec and the Simulink will not crash or stuck in the process:
The problem we have now is that the following error will be triggered if the difference between the position command and position is bigger than a threshold. It looks like the position command is what we want. Therefore, I need to check the physical model of rotator. The ticket to solve this is
In the following figure, simulate two targets: (1) position=1.2 deg and velocity=0.01 deg/sec and (2) position=1.5 deg and velocity=-0.01 deg/sec. The total simulation time is 20.1 sec.
The reason we need to use the adaptive algorithm is that we have many back-and-forth change in Coulomb friction and gear-mesh coupling, like a ping-pong motion. This will result in the errors of non-adaptive algorithm such as the zero-crossing or memory leak. It is noted that the use of adaptive algorithm is just a quick-and-dirty solution. We need to fix the physical model in plant model to have a good simulation. The related discussion can follow here.
Please help to review the PR:
The simulation can run without the zero-detection error and memory leak now.
The follow-up task to fix the following error is
Reviewed the documents:
2016-06-01 LSST CDR - Control System Design and Analysis_1.pptx
2016-06-27 Response to FDR Action Items_revA.pptx