I am trying to estimate the torqie required to drive a lead screw. To do this, so far I 've been using a motion instead of the torque and then viewing the required torque to produce said motino throught the ppt. This doesn't seem to be the correct way though as the results I am getting seem completely off.
I 've found what the error was. As it turns out, the problem was that I was requesting the value in degrees (i.e. q = 3160d) which while was what I wanted, the D seemed to cause a problem. When I rewrote q as q = step(time,0,0,2,3160) the model worked fine.
I went with your method in the end and constructed my own PI controller. I do still have some issues however. There are still some "spikes" in the torque in order to maintain a constant angular velocity. I assume that this can be dealt with by using a D part to formulate a complete PID controller. However, when I tried creating the implicit differenital equation you suggested (VARVAL(e) - DIF(x2)) I get errors. I assume it has something to do with x2. Must I define x2 in some manner before inputting it to the implicit equation?
I 've found what the error was. As it turns out, the problem was that I was requesting the value in degrees (i.e. q = 3160d) which while was what I wanted, the D seemed to cause a problem. When I rewrote q as q = step(time,0,0,2,3160) the model worked fine.
I went with your method in the end and constructed my own PI controller. I do still have some issues however. There are still some "spikes" in the torque in order to maintain a constant angular velocity. I assume that this can be dealt with by using a D part to formulate a complete PID controller. However, when I tried creating the implicit differenital equation you suggested (VARVAL(e) - DIF(x2)) I get errors. I assume it has something to do with x2. Must I define x2 in some manner before inputting it to the implicit equation?