Hello, In continuation of my question above, I have another question. I have managed to control the speed of the treadmill using a PID and StevO mentioned to me how the scaling from process variable(speed) to control signal (pwm) is done.
Now, I want to control the position of the robot at a fixed position on the treadmill. I want to use the first approach shown in picture below. Note that the labeling is for a quadcopter. I want to use the same approach but the labeling is different in my case. For me the input to Stabilize PID is desired robot positon on treadmill and actual robot position on treadmill.
The Rate PID is up and working. I want to use the Stabilize PID to make the robot hold a fixed position on the treadmill. I can measure the position of the robot using a distance sensor and find the error = desired distance - actual distance.
My problem is that the error is in terms of distance(meters) but the control signal needs to be speed that would be fed to the speed control. The speed controller would do its job.
To sum up, my question is that for the Stabilitze PID block, by using a process variable which is position (meters), how can I get a control signal that would be speed?, what kind of scaling should be done here?
Thank you.