The free piston engine (FPE) as an alternative to the conventional internal combustion engine (ICE), has great potential for efficiency improvement and emissions reduction. The advantages of the FPE arise from the fact that its piston motion is free from the mechanical constraint, and therefore offers an effective way of controlling the combustion processes in the engine. However, wide application of the FPE technology has not been realized because the challenge of the FPE lies on the same fact that the piston motion can be affected by the combustion and load as well. The objective of this research is to offer a robust and effective solution to the fundamental challenge of the FPE: piston motion control, which can be applied to any FPE architecture so that the wide spread of this technology can be realized. To achieve the objective, the research has been divided into three parts. First part of the research is to understand the FPE operation through modeling and stability analysis. A comprehensive model of a hydraulic FPE is built to study the characteristics of the engine operation. Additionally, to study the stability of the FPE operation in a systematic way, a novel stability analysis has been conducted based on a cycle-to-cycle model that describes the states that governs the FPE operation. Second part of the research is the design of an active piston motion control. To leverage the advantages of the FPE but maintaining a stable and robust engine operation at the same time, the idea of piston trajectory tracking is proposed for the first time. An active piston motion control regulates the piston to follow a prescribed trajectory throughout the engine cycles. Essentially, the controller is seamlessly coordinating between the forces acting on the piston in real time, to allow for the tracking of distinct reference trajectories. The uniqueness of the control is that it guarantees stable and reliable engine operation, and it also enables the design of distinct piston trajectories with respect to the operating conditions, so that engine operation can always be optimized. Because it acts as a crankshaft, but not mechanical, the active motion control is named the 'Virtual Crankshaft'. Precise motion control is critical in order to realize the unique advantages of the virtual crankshaft. Therefore, two feedforward control designs are proposed to assist the motion control and further improve the tracking performance. The virtual crankshaft is implemented on a hydraulic FPE, and the effectiveness of the control has been demonstrated by engine motoring tests. In this part of the research, the control of an alternative hydraulic FPE structure that utilizes digital hydraulic valves to reduce the production cost is investigated as well. The simulation results demonstrate the feasibility of such a design with the virtual crankshaft. The third part of the research is to demonstrate the effectiveness of the proposed control on the FPE for combustion tests. Unlike engine motoring where the forces from combustion chambers are smooth and repeatable, the combustion force is rapid and varies from cycle to cycle. Therefore, when switching from engine motoring to engine firing, a transient period after the combustion cycle, especially when a strong combustion occurs, prevents the continuous engine operation. The transient period exists due to the fact that the coordination between the hydraulic force and piston motion is interfered by the combustion force. Therefore, a transient control algorithm is developed to eliminate the transient period after the combustion cycle. Essentially, the transient control modifies the control signal to alter the hydraulic force, and restore the coordination with the combustion chamber, so that piston motion will be maintained. The advantage of the transient control lies on the fact that it retains the repetitive learning mechanism but can adjust intelligently to nonrepetitive disturbances such as motoring to firing transition, misfire and cycle-to-cycle combustion variations. The transient control is implemented on the hydraulic FPE for combustion tests, and its effectiveness has been demonstrated by various combustion scenarios. With the transient control, continuous firing tests are conducted. Detailed analysis of the combustion with various operating conditions is conducted to study the couplings between the combustion and piston motion.