Hi fellows,
I am implementing a Control Systems in order to swing up and balance an Inverted Pendulum mounted on a cart using a SB-RIO board and LabVIEW to program the code.
In order to measure the angular position of the pendulum and the cart position over the cart I have 2 incremental quadrature encoders that I have to decode implementing a small logic into the FPGA of the SB-RIO board in order to count how many pulses those signals provide and then estimate the position and velocities.
To control the pendulum I have a small voltage controlled DC motor.
I would want to ask you if those 2 signals, (those that came from the encoders and the control signal) must be synchronized. To read the encoders I am using a rare approach in which I have a loop running extremely fast (40Mhz) reading the four digital lines and computing the counts. It like an emulation of an analog acquisition in order to avoid false positives or pulse loss.
But I think that the control signal is going to be computed at the control law sample rate.
Please will be appreciated if someone can shed some light into this subject, I am a newbie in those aspects. Thanks!!