A systematic approach for the dynamical modelling of the unsteady flow over a flapping wing is developed, which is based on instantaneous velocity field data of the flow collected using particle image velocimetry (PIV) and computational fluid dynamics (CFD) simulations. The location and orientation of the airfoil is obtained by image processing and the airfoil is filled with proper velocity data. Proper orthogonal decomposition (POD) is applied to these post-processed images to compute POD modes and time coefficients, and a discrete-time state-space dynamical model is fit to the trajectories of the time coefficients using subspace system identification (N4SID). The procedure is verified using PIV and CFD data obtained from a pitching NACA0012 airfoil. The simulation results confirm that the dynamical model obtained from the method proposed can represent the flow dynamics with acceptable accuracy.