PID Tuning tool

Wow! I can read the ramp.mcd file. I have Mathcad V13. You must have an old version too. I like the way you placed the plots side by side but I like to use the second y axis.


What your are trying to do is similar to my work but I have a problem with the first formula. If I am reading it right you have ka and kv ( the velocity and acceleration feed forward ) in the feedback path ( denominator. Feed forwards aren't dependent on the feedback.


Also, where did V1,V2,V3 and V4 come from. That is not the way you generate a ramp a motion controller would use. My video shows a distinct acceleration, constant velocity and acceleration phase.


I sometimes combine the controller and plant transfer function to plot positions and velocities but the controller output is limited to +/- 10 volts so the PID should be executed and limited and then the control output applies to the system transfer function.


Let me know if you can access this
https://deltamotion.com/peter/Mathcad/CTM/
I was working through what is on the University of Michigan website
https://ctms.engin.umich.edu/CTMS/index.php?example=Introduction&section=ControlPID


I don't like Matlab for teaching. It provides answers without understanding. That is OK as long as you have Matlab to do all the "understanding" but when you are designing product, you can't include Matlab. The designer must understand what the Matlab is doing and write the code himself.
 
Wow! I can read the ramp.mcd file. I have Mathcad V13. You must have an old version too. I like the way you placed the plots side by side but I like to use the second y axis.

This option is not available in MathCAD 2001 (v.10).

What your are trying to do is similar to my work but I have a problem with the first formula. If I am reading it right you have ka and kv ( the velocity and acceleration feed forward ) in the feedback path ( denominator. Feed forwards aren't dependent on the feedback.

Inattention. You're right. Corrected.

Also, where did V1,V2,V3 and V4 come from.

From my imagination.

That is not the way you generate a ramp a motion controller would use. My video shows a distinct acceleration, constant velocity and acceleration phase.

I do understand what and why you use to generate target position curve.
BUT the goal of my MathCAD example was to show how slight changing of conditions can cover or discover flaw of model.
I used 4-th order lag instead algebraic target position function to get analytic response function, to reveal the causes of changes in the response of the system.


Let me know if you can access this

Yes I can access this, I can read pdf but xmcdz can’t.
 
I have Mathcad 13. I can export files in .mcd, xmcd, and xmcdz which we know you can't read. xmcd files are basically html files.

This is how we calculate the feed forwards gains.
https://deltamotion.com/peter/Mathcad/Mathcad - RMC75's Feed Forward Gains.pdf
You can see if we can estimate the model accurately there will be little to know error.

Here is an example of a simple motion for a motor. I simulate a disturbance between .45 an 0.55 seconds. If it weren't for the disturbance, the motion would be almost perfect.

Notice that at the bottom of page 2/12 I simulate modeling errors. I do this to test for robustness. I also like to test the response to disturbances and quantizing ( resolution ) errors although I don't see where I simulated a course resolution.

MaxK, you really should learn how to do simulations using systems of differential equations.

Notice that the poles zero plot has the closed loop poles on the negative real axis. This normally means the system is critically damped and able to achieve the fastest response/minimum error possible. It is only limited by the resolution of the feedback.

There is another thread about tuning a PID on a SLC500. It involves some hydraulics and pneumatics. These are inherently non-linear. I can model those easily but I had to use differential equations because they make it possible to simulate non-linear systems.
https://deltamotion.com/peter/Mathcad/Mathcad - Hydraulic Cylinder.pdf
BTW, I used this simulation as a starter for simulating the fuel injection for a diesel engine for the US department of energy.
You don't find this stuff in text books.
 
Here is an example of a simple motion for a motor. I simulate a disturbance between .45 an 0.55 seconds. If it weren't for the disturbance, the motion would be almost perfect.

Notice that at the bottom of page 2/12 I simulate modeling errors. I do this to test for robustness. I also like to test the response to disturbances and quantizing ( resolution ) errors although I don't see where I simulated a course resolution.

Suppose you didn't attach example
 
Same process, same response but different PID form
View attachment 63590

1. I suppose your PID-controller increases PV noise. If you can't suppress signal noise then why are you using D-term? (at least in this actual case)
2. Earlier I asked about the system disturbance response. I’ve attached curve of your system setpoint change and disturbance response “DU SP DR”
And as food for thought “Mx SP DR”

DU SP DR.png Mx SP DR.png
 
1. I suppose your pid-controller increases pv noise. If you can't suppress signal noise then why are you using d-term? (at least in this actual case)
2. Earlier i asked about the system disturbance response. I’ve attached curve of your system setpoint change and disturbance response “du sp dr”
and as food for thought “mx sp dr”

You can filter the CV if the noise is excessive.
SP response is just for a simple example.

Why does your CV go Negative?

Here is the disturbance response:
Disturbance.PNG
 
Some of the things that often get overlooked are:

The mode of the PID (Process Variable Tracking Enabled or Disabled)
The type of PID (Dependent vs Independent - which are equatable)
The scaling of PV (change of PV scale usually rescale of PID gains)

and

The form of PID (Velocity vs Positional - which are also equatable)
 
@#142 What is Process Variable Tracking? Don't you always know where the PV is from the feedback? I can't verify anything since you didn't provide the transfer function for the plant. What I see is that without PV tracking the response is much slower using the same controller gains but you don't make it clear as to why.


@#143 The dependent and independent responses should be the same. I am assuming the small difference is rounding errors.


@144 This doesn't make sense. The gains are much different.


@destination unknown. Without a better explanation you graphs are meaningless.


@MaxK, reduce system noise by using an observer. I have posted many video and PDFs on that in the past. Ditto what destination unknown said about filtering the CV. Your examples need for explanation too, Without an open loop transfer function I can't verify your results.



@destination unknown, what do you call process variable tracking?
 
#116 #125
Are you sure that is what destination unknown is using?


Please explain. Step by step
There are two ways.
#1 and preferred. Fix the wiring. I once was asked to control this
https://www.airporttech.tc.faa.gov/NAPTF
The wiring was poor. They had a 3 Hz filter to smooth out the noise but the filter was so low that it the feedback did not show what was really happening. I told the local engineer to redo the wiring. A few months later I came back. The low pass filters were gone and we could then see the positions of the wheels. Basically we could control the wheel position instead of the filter.



Use software/modeling. My estimated positions are better than the feed back positions on a sample to sample basis.

https://www.youtube.com/watch?v=7Gmrc-dj_uc&t=14s
 

Similar Topics

http://www.pas.com/tunewizard I've been using this a lot lately, used to cost $10k but now it is free (hoping you will pay for support or buy...
Replies
15
Views
10,925
Hello, I am attempting to tune a PID loop on a process. The process involves a valve with electronic actuator that has quite a high deadband...
Replies
10
Views
2,072
so i have 4 25gpm wells feeding a 1000gal tank (T-1), with an additional 15gpm from a decant tank for 3hrs every 12hrs. P1 and P2 both controlled...
Replies
154
Views
35,518
Hi everyone, yet another PID problem. I'm hoping I understand enough of the process I'm controlling that my request for help is reasonable. If a...
Replies
113
Views
27,611
I haven't had to tune a PID loop in a very long time. It's actually a PI loop for a pulse width modulation s.v. What was the name of that tuning...
Replies
16
Views
4,073
Back
Top Bottom