I'm trying some motorized animation, and am having problems hitting worldspace targets. I'm not sure if my problems are due to incorrect modeling of the system, incorrect control mechanisms, or incorrect expectations

A simple example case (in 2D): imagine two rigid bodies A,B connected by a joint/pin constraint. Let a,b be the absolute (i.e relative to the world frame) orientation of the respective bodies.
My goal is to control the system such that b = t, for some target angle t. (i.e I want to control B's absolute orientation to be t)
Attempt #1: add a motorized constraint C = b - t
This works correctly (b's orientation is driven to t), however it is unplausible since the constraint forces come from "nowhere".
Attempt #2: add a motorized constraint C = (b-a) - r
This constraint drives the "child" B's orientation to some target r relative to the "parent" A. Between simulation steps, the motor's controller sets r = t - a, i.e sets r to be the target value expressed in the parent's frame.
#2 produces plausible results (the forces moving B come from A), however they are unstable -- I suspect that since the controller runs outside of the simulation loop, it is always a bit late/slow and this leads to oscillations: when we step the simulation forward we arrive at a different value of a than what the controller used. (Hopefully this makes sense, I'm having a hard time finding a simple way to describe this)
Attempt #2b: supplement #2 with a constraint C = a - 0, i.e a "stabilizer" which attempts to keep A's orientation fixed. This works, but is unplausible since, as with #1, the constraint forces come from nowhere.
It seems like what's needed is to move the controller "inside" the simulation loop: C = (b-a) - (t-a). The problem with this is that it rearranges to C = b - t, so we're back at #1!
So, my problem seems to be: what is the correct way to drive the absolute state of B using only constraints on the state of B relative to A? Is this a valid, achievable goal, or is it impossible for some reason?
Since A and B have one relative degree of freedom, it seems sensible to assume that this can be controlled in order to fix B's orientation wrt the world.. but possibly I'm confused.
thanks,
Raigan
p.s - If you'd like to some very rough footage, we just put up a quick demo here: http://vimeo.com/5412152
(we're using a fake "stabilizer" constraint to keep the robot upright/balanced)