From: mcgx Ying on 2 Jun 2010 22:33 Hi, I am modeling a robotic transmission with Simulink. All the custom blocks are written using MATLAB function. What the model does is to convert the line velocity and angular velocity of the robot to speed of wheels and torque on the wheels. However when the angular velocity equals to 0, the formula happens to have a 0/0 indeterminate form. By doing the limit on paper, another formula is obtained for this case. And the following if statement is added to Simulink: if angular_velocity == 0 output=formula2(input); else output=formula1(input); The glitch happens when the angular velocity crosses 0 (e.g. angular velocity goes from -1 to 1) I could see a very small spike in the output values. How could I remove the spike? Thank you.
|
Pages: 1 Prev: Augmented Reality in Matlab Next: Linking fuzzy logic toolbox and GUI/Simulink |