It is as if the library is presented for the use of people who are already fully familiar with PID.From a quick look at your documentation those matters also seem to be missing.It would be very useful if you could write a "walk-through" for a complete example from start to finish. What needs to be controlled, how you choose the sensors, how you build a program around all of that....R
...the first problem was that it has no explanation of what are the units in which the PID inputs and outputs need to be.
And second, what are circumstances in which the concept will or won't work.
A PID controller is nothing more than a transfer function, meaning that it has no units; the units of the output will be exactly the same units as the input. For motor control, I typically use volts since most dc motors are controlled by varying the voltage with PWM.
Depends on the overall control algorithm (which some people may refer to as a control loop). Typically, it will work only if you have a feedback loop, meaning you wouldn't use PID in open loop control.
To be more specific I assumed I could "bolt PID on" to control my small DC motor; develop and test it with no load on the motor (for convenience) and then install the motor in my model train and "it would just work". From what I know now that was a completely unrealistic expectation.
calculating an error in rpms, doing a conversion from rpms to volts (using something called the motor voltage constant Kv), and then input that error in volts to the PID controller.Well yes, because you are changing the "plant;" an unloaded motor and a motor attached to a model train are going to have different values for the inertia.
And I have no idea what is the Kv value for my motor - but I don't want this Thread to become a discussion about my specific project.
Interestingly I got my first satellite TV receiver a few days ago and the instruction manual suffers from the same sort of problem as the Arduino PID library. It gives instructions for doing X but does not explain why or when X is appropriate amd it gives no advice about how the typical user would use the device (how to find the channel you want etc). However a TV receiver is easier to figure out
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16