Hi Ralph,

I'd thought about reformulating the problem using velocity or acceleration 
control, then using a PID loop to control cart velocity/acceleration. But 
I'm not sure how to go about reformulating the equations of motion (to be 
fair, I haven't really given it much consideration, it was just a passing 
thought!). Maybe I'll give it a shot.

Re the incremental encoders, isn't there some way of attaching interrupts 
to the GPIOs on the BBB? Or what about high speed polling in the PRUs?



On Wednesday, September 14, 2016 at 10:30:04 PM UTC+1, Ralph Stirling wrote:
> Luke,
> We have done both single and twin inverted pendulums in our Feedback &
> Control classes.  Our apparatus (our design and fabrication) has a cart 
> driven
> by fishing line around a pulley on a high quality DC "basket weave" motor
> (Escap or Maxon).  These have zero cogging, with no steel in the rotor.  
> The
> state space control law uses encoder feedback from the motor (for cart 
> position)
> and each of the pendulums.
> I've wanted somebody to work on the system identification problem to 
> collect
> all the data to compute the parameters needed by the control law, but so 
> far
> we just used statically measured data or manufacturer's datasheets.
> The difficulty with using a BBB for this project is that it doesn't have 
> enough
> counters (or drivers for them) to handle three incremental encoders.  If 
> you
> used one of the FPGA SoC boards that have been discussed on this list 
> recently,
> you could implement encoder counters in the FPGA.  Our inverted pendulum
> setup uses a Digilent FPGA board, with a custom H-bridge and ethernet 
> connection
> to communicate with Octave running on a PC.  Octave does all the control
> calculations and just gets encoder readings from the FPGA board, and writes
> PWM values.
> I think your control law will be a lot simpler, and the rest of the system 
> too,
> if you use velocity control rather than torque control.  Then you only need
> to control your motor voltage (proportional to velocity) rather than motor
> current (proportional to torque).
> -- Ralph
> On Wednesday, September 14, 2016 at 9:20:11 AM UTC-7, Luke Steele wrote:
>> Hello,
>> I should probably explain that I'm a linux and BBB novice, and am 
>> currently experiencing a crazily steep learning curve. So please bear with 
>> me while I ask what are probably incredibly rudimentary questions...
>> I'm interested in doing some realtime control (servos, reading encoders 
>> etc) on my BBB rev C under Xenomai, and after some reading around it seemed 
>> like the simplest way to get started was using the pre-built machinekit 
>> images found here: 
>> http://elinux.org/Beagleboard:BeagleBoneBlack_Debian#BBW.2FBBB_.28All_Revs.29_Machinekit
>> So, having installed this image I can now ssh into the BBB from a Xubuntu 
>> install running under VMware on my PC.
>> I thought a good place to start would be blinking an LED. To that end 
>> I've compiled the C++ program here 
>> <http://inspire.logicsupply.com/2014/07/beaglebone-c-programming-example.html>,
>> which works (only) if I use sudo, i.e. sudo ./myprog. I've also tried 
>> turning them on and off at the command line as outlined on Derek 
>> Molloy's site 
>> <http://derekmolloy.ie/beaglebone-controlling-the-on-board-leds-using-c/>, 
>> but this doesn't work:
>> cd /sys/class/leds
>> cd beaglebone:green:usr0
>> echo none > trigger
>> -bash: trigger: Permission denied
>> sudo echo none > trigger doesn't work either...
>> What am I doing wrong?
>> Also more generally, is this approach of accessing LEDs and GPIOs through 
>> the file system the right way to go if I'm interested in doing things 
>> quickly? Intuitively it feels like it'd be slow - is there another way?
>> Incidentally this 
>> <https://hackaday.io/project/12827-double-pendulum-cart> is what I'm 
>> aiming to do eventually. 
>> Thanks for any help, it's appreciated!
>> Luke

website: http://www.machinekit.io blog: http://blog.machinekit.io github: 
You received this message because you are subscribed to the Google Groups 
"Machinekit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to machinekit+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.

Reply via email to