Digital hydraulics is a novel alternative to proportional or servovalve-controlled systems in fluid power engineering, providing hydraulic systems with high-energy efficiency, good controllability, and insensitivity to contamination. Switched inertance hydraulic converters (SIHCs) are new digital hydraulic devices that can adjust flow and pressure by digital switching instead of throttling the flow. In this paper, an efficient closed-loop control system is proposed for SIHCs subject to time-varying loading conditions in which the load pressure and/or flow varies with time. The control system is designed to operate SIHCs at optimized switching frequencies and ratios that maximize system efficiency when the load varies. With the proposed controller, the SIHC can effectively adapt to the time-varying load and has achieved up to 10% efficiency improvement and up to 65% pressure ripple reduction without affecting the system's dynamic responses, compared with using a nonoptimized controller. The work shows the feasibility and advantages of simultaneously controlling the switching ratio and switching frequency of SIHCs with a time-varying load. As time-varying loading conditions are commonly found in hydraulic applications, the research outcomes constitute an important aspect in the design and development of highly efficient SIHCs and their practical use in hydraulic machinery.