We report on real-time control of balloon inflation inside porcine arteries. In the first step, experiments were done in a coronary artery of an excised heart. In the second step, experiments were done in a beating heart setup providing conditions very close to in vivo conditions without the complications. A programmable syringe pump was used to inflate a compliant balloon in arteries, while intravascular optical coherence tomography (IVOCT) monitoring was performed. In a feedback loop, IVOCT images were processed to provide the balloon diameter values in real time to control the pump action in order to achieve a target diameter. In different experiments, various flow rates and target diameters were used. In the excised heart experiment, there was good convergence to target diameters resulting in a satisfactory balloon inflation control. In the beating heart experiment, there were oscillations in the diameter values due to cyclic arterial contractions. In these experiments, the control system maintained diameter averages satisfactorily close to predetermined target values. Real-time control of balloon inflation could not only provide a safer outcome for angioplasty procedures, but could also provide additional information for diagnostics since it implicitly provides information about the artery response to the inflation process.