- The model your professor provided is the model that implements that second order nonlinear ODE. The input signal is tau, output signal is theta.
- In order for model to run, all variables used in the model need to be defined. So in MATLAB workspace you need to assign a value to J and to mgl. The values were probably provided in problem setup. Just define them in MATLAB, say (for example only):
Simulink help -- PID Control for a robot arm?
8 次查看(过去 30 天)
显示 更早的评论
<<
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/159466/image.png)
>>
I need to use Simulink to determine an approximate numerical solution to the equation of motion for a robotic arm (link to image below). The equation of motion for the system is J (\theta)'' = \tau - mgl cos (\theta). (An ordinary, 2nd order nonlinear differential equation.)
Assuming zero initial conditions and a small desired angle of the robot arm, verify the following rules of thumb for PID control for a step input. This should be for an original nonlinear model.
- for proportional control (Kp > 0, Kd = 0, Ki = 0), the solutions are oscillatory, and Kp increases the frequency of oscillation (which decrease the rise time and peak time), but decreases the mean steady state error. The settling time is finite (Hint: pick a starting value of Kp = 5)
- Add derivative control to the proportional controller (i.e., Kp > 0, Kd > 0, Ki = 0) and verify the following:
a) for small Kd, solutions are decaying oscillations
b) increasing Kd deceases settling time
c) increasing Kd to sufficiently large value eliminates oscillatory behavior; solution experimentally decays to final steady state value.
d) increasing Kp decreases the final steady state error
e) increasing Kp decreases rise time
(Hint: pick a starting value of Kd = 0.5)
I am really struggling with how to use Simulink, and especially how to do this in Simulink. Any tips/advice for a starting place to solve this problem would be GREATLY appreciated! Thank you so much, in advance. I would really, sincerely appreciate any and all help with this. Simulink was not gone over in class, and then suddenly we had an assignment entirely based on using Simulink. This is for a Differential Equations/Controls course.
Note that I also attached a screenshot of the .slx Simulink file that my professor sent out to help us with this nonlinear model (and also attached the .mdl version of the actual file). I'm not sure what to do with it however (when I run it, it says that "J is an undefined variable"). Thanks again!
0 个评论
回答(1 个)
Arkadiy Turevskiy
2014-3-26
I suggest you start with learning a little bit about Simulink.Best way to do this is watch a couple of videos: this one and this one .
Once you watch these videos, I think the homework will be pretty straightforward.
A couple of specific pointers to get you going:
J=1;
mgl=2;
After you do that, construct a closed loop system with PID Controller block as shown in the second video, and run simulations using PID gain values as prescribed in your homework.
It is pretty straightforward once you learn how Simulink works a little bit.
HTH.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!