Simulink: How to fix given error for a closed loop model w/ PID controller?

  • Engineering
  • Thread starter simphys
  • Start date
  • Tags
    Simulink
In summary, the conversation is about a problem with a simulink model and Matlab code. The error is caused by rapidly changing values and the solution could be to check the values of all components and variables, as well as adjusting the time step or error band. The speaker also asks for updates on the solution.
  • #1
simphys
322
45
Homework Statement
The question that is asked is basically to create a closed loop model with a PID controller. (if necessary more information on the picture)
The problem that I am encountering is an error which I don't understand and know how to fix?
Relevant Equations
not relevant
Could I get some input on how to fix this problem please? Thanks in advance!

The exercise for which I need the model.
Screenshot from 2023-06-07 17-26-12.png
Screenshot from 2023-06-07 17-25-52.png


The simulink model together + the error that needs to be fixed + Matlab code used:


Note: Gain 1 = 1/Ti
 

Attachments

  • Screenshot from 2023-06-07 17-33-21.png
    Screenshot from 2023-06-07 17-33-21.png
    26.5 KB · Views: 62
  • error.png
    error.png
    22.5 KB · Views: 71
  • matlab_code.png
    matlab_code.png
    5.3 KB · Views: 64
  • simulink_model.png
    simulink_model.png
    7.4 KB · Views: 64
Physics news on Phys.org
  • #2
I'm not an expert on this, but it looks like some of the equations it is solving are changing in value so fast that further calculations make no sense.

Please check the values of all the components/variables you have supplied. For instance maybe one is missing a minus sign or a decimal point. Another common problem is that an 'm' was entered instead of 'M' (or the other way around -- one means milli-, the other Mega-).

Then try changing the time step or error band, as the Error Msg. suggested.

Good Luck,
Tom

p.s. please keep us posted on what you find that works.
 

1. What is Simulink and how does it work?

Simulink is a graphical programming environment used for modeling, simulating, and analyzing dynamic systems. It allows users to build block diagrams, which represent the system components and their interactions, and simulate the behavior of the system over time.

2. What is a closed loop model and why is it important?

A closed loop model is a system in which the output is fed back and compared to the desired input in order to make adjustments. This is important because it allows for more precise control and regulation of the system's behavior, and can help to reduce errors and improve performance.

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

A PID (proportional-integral-derivative) controller is a type of control system used to regulate a process or system. It works by continuously calculating and adjusting the output based on three parameters: proportional (directly proportional to the error), integral (sum of past errors), and derivative (rate of change of the error).

4. What is the most common error encountered when using a PID controller in a closed loop model?

The most common error is an "integral windup" error, which occurs when the integral term becomes too large and causes the system to overshoot or oscillate. This can happen when there are sudden changes in the system or when the controller gains are not properly tuned.

5. How can I fix the "integral windup" error in my closed loop model with a PID controller?

There are a few ways to fix this error, including adjusting the controller gains, implementing anti-windup techniques, or using a different type of controller (such as a PI or PD controller). It is also important to carefully tune the controller gains to ensure stable and accurate performance.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
1
Views
816
  • Engineering and Comp Sci Homework Help
Replies
2
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
3
Views
805
Replies
5
Views
3K
  • Electrical Engineering
Replies
12
Views
2K
Replies
9
Views
2K
Replies
6
Views
972
Back
Top