This paper proposes a Logic-Based Traffic Flow Control algorithm (LB-TFC) for integrated control of Ramp Metering (RM) installations and Variable Speed Limits (VSLs) in order to reduce traffic jams created at bottlenecks. LB-TFC estimates, for each control time step, the number of vehicles that should be held back or released by the control measures (i.e. the VSLs and the RM rates) in order to avoid the capacity drop (maximizing the outflow of the bottleneck). Afterwards, based on the resulting estimated number of vehicles, the VSLs and/or the RM rates are increased or decreased in a pre-specified order. In order to avoid or reduce traffic breakdowns, the proposed controller (LB-TFC) anticipates the future evolution of the bottleneck density by using a feed-forward structure. As a result, the performance of the controller is very efficient and similar to the one obtained with an optimal controller while the implementation of the controller (with an almost instantaneous computation time) and the tuning of the parameters are easy. In the second part of this work, published in a separate paper (`Part 2: Simulation and Comparison'), LB-TFC is simulated, analyzed and compared for two freeways (one synthetic network and one stretch of the ring-road freeway SE-30 in Seville, Spain).