Is it aerodynamic drag that flaps the grid fins open? Or is there a controlled mechanism for it? Pictures show the grid fins connect through a small link to something inside the rotating trunnion arm---anyone know what that's for?
They are hydraulics which initially used an open loop, using kerosene as the working fluid. Some of the initial landing attempt failures were because they ran out of fluid. Closed loop would keep the fluid in the system, open loop dumps it after it is used.
When they land, the hydraulics also retract the fins so you can see it is under active control.
This is basically the same system steering the fins, just in a different axis.
That linkage is connected to a small PFM module inside the rocket. Each fin has its own primary PFM module. Based on telemetry and some very good software programming, sensors on the rocket indicate the orientation and velocity of the returning rocket booster. All that is fed into an onboard computer that directs the PFM modules on how to actuate the grid fins independently. Hope this helps.