Synchronization between DAQ and Control Signals in a Control System

Status
Not open for further replies.

road_king

Newbie level 3
Joined
Feb 5, 2014
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
29
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!!
 

It's not quite clear what you mean with synchronizatio in this case?

You have a synchronous quadrature decoder logic that updates an absolute position at 40 MHz. And a time discrete controller. So the controller will sample the position at the begin of each control interval.

The only possible synchronization problem is to guarantee consistent position values if different clock domains are involved. You can e.g. implement a gray encoded counter or any other suitable domain crossing synchronization method.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…