When I wrote the PID routines, I went with raw I/O rather than a percentage based input. This means that The output is highly dependent on the values you input. This leave it up o the user to do any scaling or limiting of the value. Have you used PID in the past?
Regards,
Craig
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My system: 1.6 GHz AMD Turion64 X2, 4GB DDR2, 256MB ATI Radeon Graphics card, 15.4" Widescreen HD Screen
I have a duel boot of Ubuntu Linux and Windows Vista. Vista, because it came with the PC, Ubuntu because I like software that works.
"Failure is not an option -- it comes bundled with Windows."
Use The Best...
Linux for Servers
Mac for Graphics
Palm for Mobility
Windows for Solitaire
i have recently builded an analog PID for position control, currently im trying (never used a microcontroller)>·to set up a digital PID. The values of the output are quite big , and what im trying to do is use that output as a binary number between 0 and 255·, but the value is to great to fit on a 8 bit num, i made some scaling but the output seems unstable or jumps into greater numbers randomly,· i get awsome results using only the "P" values but once i start adding "I" to the equation or "d" the output sets off.
our input values are pot regulated voltages scaled·from 0 to 255 on the code.
what kind of method would·you·recommend to use the output as a binary scale ·0 to 255?
For one thing, have you tried lowering the gain? Also, for most applications, Derivative will do nothing but make the output unstable. Therefore, I would recommend commenting it out. The P and I values shouldn't be to hard to get a stable value out of. What I recommend doing, is to build the POT circuit and record the values at the turn extremities. Then, play with the Gain value until you get something reasonable. Then, you can scale the output to get the 8bit value your looking for.
Regards,
Craig
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My system: 1.6 GHz AMD Turion64 X2, 4GB DDR2, 256MB ATI Radeon Graphics card, 15.4" Widescreen HD Screen
I have a duel boot of Ubuntu Linux and Windows Vista. Vista, because it came with the PC, Ubuntu because I like software that works.
"Failure is not an option -- it comes bundled with Windows."
Use The Best...
Linux for Servers
Mac for Graphics
Palm for Mobility
Windows for Solitaire
Comments
Regards,
Craig
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My system: 1.6 GHz AMD Turion64 X2, 4GB DDR2, 256MB ATI Radeon Graphics card, 15.4" Widescreen HD Screen
I have a duel boot of Ubuntu Linux and Windows Vista. Vista, because it came with the PC, Ubuntu because I like software that works.
"Failure is not an option -- it comes bundled with Windows."
Use The Best...
Linux for Servers
Mac for Graphics
Palm for Mobility
Windows for Solitaire
i have recently builded an analog PID for position control, currently im trying (never used a microcontroller)>·to set up a digital PID. The values of the output are quite big , and what im trying to do is use that output as a binary number between 0 and 255·, but the value is to great to fit on a 8 bit num, i made some scaling but the output seems unstable or jumps into greater numbers randomly,· i get awsome results using only the "P" values but once i start adding "I" to the equation or "d" the output sets off.
our input values are pot regulated voltages scaled·from 0 to 255 on the code.
what kind of method would·you·recommend to use the output as a binary scale ·0 to 255?
your help is greatly apreciated
Tjboy
i am not mexican, i just enjoy burritos.
Regards,
Craig
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My system: 1.6 GHz AMD Turion64 X2, 4GB DDR2, 256MB ATI Radeon Graphics card, 15.4" Widescreen HD Screen
I have a duel boot of Ubuntu Linux and Windows Vista. Vista, because it came with the PC, Ubuntu because I like software that works.
"Failure is not an option -- it comes bundled with Windows."
Use The Best...
Linux for Servers
Mac for Graphics
Palm for Mobility
Windows for Solitaire