Pain control in conscious patients was investigated using a push-button, demand-driven supply of drugs. A fuzzy logic patient-controlled analgesia (PCA) algorithm was compared with a conventional algorithm, for alfentanil administration in extracorporeal shock-wave lithotripsy. The conventional PCA algorithm used an initial dose of 0.25mg, a fixed infusion rate of 60 mg h(-1) and a fixed bolus size of 0.2 mg with a 1 min lockout. The fuzzy logic PCA algorithm used an initial dose of 0.25 mg, a changeable infusion rate and a bolus size of 0.1 or 0.05 mg. The infusion rate was adjusted according to a look-up table that accepted the button-pressing history over the last three lockout intervals. The look-up table was designed using fuzzy logic. The bolus size was adjusted according to the button-pressing history over the past two lockout intervals. Twelve patients were treated using conventional PCA, and thirteen were treated with PCA + fuzzy logic control (FLC). PCA + FLC patients consumed 45% less drug. Also, PCA + FLC patients had a mean delivery/demand ratio of 82%, compared with 60% in conventional PCA. When the pain intensity scale was analysed, PCA + FLC patients had acceptable pain intensity at 62%, compared with 44% in conventional PCA.