Matlab Simulink-Using PID controls?

In summary, the conversation discusses using Simulink to determine an approximate numerical solution for the equation of motion of a robotic arm. The rules of thumb for PID control are also discussed, with a focus on proportional control and adding derivative control. Tips and advice for using Simulink are requested. Finally, a suggested iterative process for PID tuning is mentioned, including the use of the Ziegler-Nichols method.
  • #1
annas425
17
0
Matlab Simulink--Using PID controls?

I need to use Simulink to determine an approximate numerical solution to the equation of motion for a robotic arm (image below). The equation of motion for the system is J (\theta)'' = \tau - mgl cos (\theta). (An ordinary, 2nd order nonlinear differential equation.)

2883upy.jpg


Assuming zero initial conditions and a small desired angle of the robot arm, I need to verify the following rules of thumb for PID control for a step input.

- 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! I would really, sincerely appreciate any and all help with this! Thank you!

It's hard for me to give an "attempt at a solution" when I am completely lost :( I am not asking for the answer, I just want to know where to begin. Please please, understand. I understand the relationships between items (a) through (d), but I do not know how to even begin to use Simulink, or model this equation in Simulink. Thank you again in advance.

Here is a screenshot of a .slx Simulink file that my professor sent out in order to help us with the nonlinear model…I'm not sure what to do with it (when I run it, it says that "J is an undefined variable"):
29njdz6.png
 
Last edited:
Physics news on Phys.org
  • #2
For PID tuning the "rules of thumb" vary with the stiffness of the system being controlled!

For hydraulics you can start with all Proportional, but applied at a slow rate.
Then if you don't want to go past your objective (e.g., bang into stuff), you add Integral until the limits are honored.
Finally, you add Derivative (very small amounts) to get rid of the "ringing".

So it is an iterative process - it goes much faster if each iteration is a computer simulation!
 
  • #3

1. What is Matlab Simulink and how does it work?

Matlab Simulink is a graphical programming tool that allows users to model, simulate, and analyze dynamic systems. It uses a block diagram approach, where blocks represent different components of a system and their connections represent the flow of data or signals between them. Users can also use programming languages like MATLAB and C to customize their models.

2. What is a PID controller and how does it work?

A PID (Proportional-Integral-Derivative) controller is a control system that uses a combination of three control actions - proportional, integral, and derivative - to regulate a system's output based on its desired setpoint. The controller continuously calculates an error signal, which is the difference between the desired setpoint and the actual output, and adjusts the control actions to minimize this error and keep the system at the setpoint.

3. How do I implement PID controls in Matlab Simulink?

To implement PID controls in Matlab Simulink, you can use the PID Controller block from the Simulink library. This block allows you to specify the PID parameters, such as the proportional, integral, and derivative gains, and also the setpoint and input signals. You can also customize the block's settings to optimize the controller's performance.

4. What are the advantages of using PID controls in Matlab Simulink?

PID controls in Matlab Simulink offer several advantages, including:

  • Easy implementation: Simulink provides a user-friendly interface to design and implement PID controllers without the need for complex coding.
  • Flexible tuning: The PID parameters can be tuned and adjusted in real-time, allowing for quick and efficient optimization of the controller's performance.
  • Accurate simulation: Simulink's powerful simulation capabilities allow for accurate modeling and testing of complex systems with PID controls.
  • Real-time analysis: Simulink's real-time monitoring and visualization tools make it easy to analyze the performance of PID controls and make necessary adjustments.

5. Can I use PID controls for any type of system in Matlab Simulink?

Yes, PID controls can be used for a wide range of dynamic systems in Matlab Simulink. They are commonly used in industrial control applications, such as temperature and pressure control, but can also be applied to other systems like motor speed control, robotics, and more. However, it is important to note that the performance of the PID controller may vary depending on the specific system and its parameters, and may require tuning for optimal results.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
0
Views
787
  • Engineering and Comp Sci Homework Help
Replies
1
Views
816
  • Engineering and Comp Sci Homework Help
Replies
4
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
1K
  • Electrical Engineering
Replies
3
Views
804
  • Engineering and Comp Sci Homework Help
Replies
3
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
13
Views
2K
  • General Engineering
Replies
0
Views
692
  • Engineering and Comp Sci Homework Help
Replies
6
Views
1K
Back
Top