Page 1 of 1

Implementing a time-varying controller

Posted: Tue Sep 30, 2014 12:08 pm
by davidbarton
Hi,

I'm interested in implementing a PID (actually just PD) controller with a time-varying (periodic) control target, i.e., the set-point of the controller changes periodically. I've done this before with bare metal programming on a BeagleBone Black with an analogue interface board of my own design but I like the idea of using the RP since it is community supported rather than my own bespoke and rather naive I/O board. (I work in a university research lab and I'm quite keen to have hardware that people around the world can just pick up and try my ideas with.)

My requirements are (hopefully!) fairly modest
  • 10 kHz sample rate (5 kHz is OK)
  • periodic set point (I've previously described the set point by 5-10 Fourier coefficients); the fundamental frequency of the set-point is around 10-100 Hz depending on the application.
  • continuous operation
  • user adjustable parameters during continuous operation (e.g., change one of the Fourier coefficients as it is running)
When my RP arrives from RS, I'll have a look at the PID example but does anyone have any suggestions as to how I might implement the time-varying parts? (As I said, I've done it before on an ARM A8 processor but never on an FPGA.)

Thanks!