We propose a "Floquet engineering" formalism to systematically design a periodic driving protocol in order to stroboscopically realize the desired system starting from a given static Hamiltonian. The formalism is applicable to interacting and noninteracting quantum systems which have an underlying closed Lie algebraic structure. Unlike previous attempts at Floquet engineering, our method produces the desired Floquet Hamiltonian at any driving frequency and is not restricted to the fast or slow driving regimes. The approach is based on Wei-Norman ansatz, which was originally proposed to construct a time-evolution operator for any arbitrary driving. Here, we apply this ansatz to the micromotion dynamics, defined within one period of the driving, and engineer the functional form and operators of the driving protocol by fixing the gauge of the micromotion. To illustrate our idea, we use a two-band system or the systems consisting of two sublattices as a testbed. Particularly, we focus on engineering the cross-stitched lattice model that has been a paradigmatic flat-band model.