Application Of Control Engineering Principles To The Calculation Of Pharmaceutical Drug Doses
Today, I was asked by an eminent cardiologist to give my opinion on this scientific paper in the Journal of the American Heart Association, which was entitled Personalized Antihypertensive Treatment Optimization With Smartphone‐Enabled Remote Precision Dosing of Amlodipine During the COVID‐19 Pandemic (PERSONAL‐CovidBP Trial).
This was the background to the study.
The objective of the PERSONAL‐CovidBP (Personalised Electronic Record Supported Optimisation When Alone for Patients With Hypertension: Pilot Study for Remote Medical Management of Hypertension During the COVID‐19 Pandemic) trial was to assess the efficacy and safety of smartphone‐enabled remote precision dosing of amlodipine to control blood pressure (BP) in participants with primary hypertension during the COVID‐19 pandemic.
These were the methods and the results.
This was an open‐label, remote, dose titration trial using daily home self‐monitoring of BP, drug dose, and side effects with linked smartphone app and telemonitoring. Participants aged ≥18 years with uncontrolled hypertension (5–7 day baseline mean ≥135 mm Hg systolic BP or ≥85 mm Hg diastolic BP) received personalized amlodipine dose titration using novel (1, 2, 3, 4, 6, 7, 8, 9 mg) and standard (5 and 10 mg) doses daily over 14 weeks. The primary outcome of the trial was mean change in systolic BP from baseline to end of treatment. A total of 205 participants were enrolled and mean BP fell from 142/87 (systolic BP/diastolic BP) to 131/81 mm Hg (a reduction of 11 (95% CI, 10–12)/7 (95% CI, 6–7) mm Hg, P<0.001). The majority of participants achieved BP control on novel doses (84%); of those participants, 35% were controlled by 1 mg daily. The majority (88%) controlled on novel doses had no peripheral edema. Adherence to BP recording and reported adherence to medication was 84% and 94%, respectively. Patient retention was 96% (196/205). Treatment was well tolerated with no withdrawals from adverse events.
These were the conclusions.
Personalized dose titration with amlodipine was safe, well tolerated, and efficacious in treating primary hypertension. The majority of participants achieved BP control on novel doses, and with personalization of dose there were no trial discontinuations due to drug intolerance. App‐assisted remote clinician dose titration may better balance BP control and adverse effects and help optimize long‐term care.
About Myself
I am a Graduate Control Engineer, who graduated from the University of Liverpool in 1968.
I then worked at ICI in Runcorn for eighteen months, before moving to ICI Plastics Division, because of the untimely death of my father-in-law.
One of my tasks at Welwyn, was to look at control algorithms for chemical plants. For this I often used a PACE 231-R analogue computer.
Note.
- These computers could solve up to a hundred simultaneous differential equations at one time.
- They were programmed by wiring the various amplifiers and potentiometers together to simulate the equations.
- There were only a few transistors in these powerful machines, as all electronics were thermionic valves.
- Two of these machines wired together, were used to calculate the trajectories of the Apollo missions.
They were the unsung heroes of bringing Jim Lovell and Apollo 13 home safely.
Determining Control Algorithms
In a typical problem, I would model the a section of a chemical plant and the control system around it.
This would then lead to recommendations, as to the design and operation of the plant, so that it performed as required.
It could be argued that the body of an animal, is a very complicated integrated chemical plant, with a sophisticated control system.
For instance, if sensors around the body, say you are slightly low on fluids, your brain determines you should have a drink.
Many control loops on a chemical plant are controlled by proportional–integral–derivative controllers, which are commonly known as three-term controllers.
This is the first two paragraphs of the Wikipedia entry for three-term controllers.
A proportional–integral–derivative controller (PID controller or three-term controller) is a control loop mechanism employing feedback that is widely used in industrial control systems and a variety of other applications requiring continuously modulated control. A PID controller continuously calculates an error value
PID systems automatically apply accurate and responsive correction to a control function. An everyday example is the cruise control on a car, where ascending a hill would lower speed if constant engine power were applied. The controller’s PID algorithm restores the measured speed to the desired speed with minimal delay and overshoot by increasing the power output of the engine in a controlled manner.
I wouldn’t be surprised that the app in the smartphone used in the PERSONAL‐CovidBP Trial contained a form of three-term controller.
These are some points about three-term control algorithms.
Changing Of External Factors
One that was the villain in a problem, I dealt with, also affects my body – the weather.
I was asked to look at the problem of a chemical reaction, that overheated in hot weather. But the plant operators solved it by better insulation and ventilation of the plant and the standard three-term controller adjusted itself automatically to the new conditions.
After my stroke, I am on Warfarin for life. I test my own INR with a Roche meter and I have noticed that atmospheric pressure affects my INR. I change my deose accordingly, using a simple algorithm, of my own design.
The More You Test The More Precise The Control
If you take the cruise control example used by Wikipedia, speed is monitored continuously, as I hope, it would be if you were driving yourself.
But obviously, in many systems, where you are using an input with discrete values to control a system, you can’t be as precise as the data you collect.
When my son was dying from pancreatic cancer, he was fitted with a morphine pump, that he could adjust himself to dull the immense pain he was enduring.
- His nerves and his brain ascertained the pain level.
- He then adjusted the morphine level.
- He could get very precise control of his pain, because he was measuring it continuously.
But he was only using simple one-term control (proportional).
Derivative Control Can Be Difficult To Get Right And Can Even Go Unstable
Derivative control is mainly to stop overshoot, but sometimes you will find that it can go unstable, so two-term(proportional+integral) controllers will be used.
How I Control My INR
As I said earlier, I am on Warfarin for life and test my INR with a Roche meter.
The NHS typically tests patients about once every six weeks, which in my opinion as a Control Engineer is too infrequent.
I usually test myself a couple of times a week.
But every so often, I evaluate what daily dose gives me an equilibrium INR level of 2.5.
For the last three years, I have found a dose of 3.75 mg keeps me more or less on 2.5.
- As Warfarin comes in 1, 3, 5 and 10 mg. tablets, I alternate 3.5 and 4 mg.
- Warfarin tablets are easily cut in half using a sharp knife.
- I record INR and dose in a spreadsheet.
I have been doing this now for over ten years.
Is This A Unique Property Of Warfarin?
In this time, I have had five medical procedures, where surgeons were worried, that as I was on Warfarin, I might bleed too much.
For the first, which was to remove a lump from my mouth, the private surgeon wanted to charge extra for an anaesthetist. In the end, I asked what INR he wanted and he said 2.1 should be OK!
- So I reduced the Warfarin level and tested every day.
- I judged it correctly and had an INR of 2.1 on the day of the operation.
- The operation went incredibly well and I went home on public transport.
- The lump turned out to be benign.
- I’ve not had another lump.
After the operation, I increased the Warfarin level and tested every day, until it regained a level of 2.5.
On analysing my doses through the date of the operation, I found that the total amount of Warfarin, I didn’t take to reduce my INR to 2.1, was the same as I took to bring it back up again to 2.5.
Is this a unique property of Warfarin?
Since then I’ve had two cataract operations performed in a private hospital, where the NHS paid. Interestingly, they wouldn’t trust my own INR readings, so I had to get my GP to take the measurement.
I’ve also had gallstones removed by endoscopy at the local Homerton NHS hospital.
- For cases like mine, the hospital hire in a surgeon from the posh Wellington private hospital for one day a week, who brings the specialist tools needed.
- I wrote about this in Goodbye To My Gallstones.
- As it was a more serious procedure, I reduced my INR to a requested 1.0.
Interestingly, I still have my gall bladder, but the surgeon put it on notice to behave.
Conclusion
I would totally agree with the conclusion given in the PERSONAL‐CovidBP Trial.
Personalized dose titration with amlodipine was safe, well tolerated, and efficacious in treating primary hypertension. The majority of participants achieved BP control on novel doses, and with personalization of dose there were no trial discontinuations due to drug intolerance. App‐assisted remote clinician dose titration may better balance BP control and adverse effects and help optimize long‐term care.
I would add some conclusions of my own.
- The app used in the PERSONAL‐CovidBP Trial, seems to have had a good algorithm.
- I suspect the app could also be Internet-based.
These are some general conclusions.
- If you are on Warfarin and have access to a Roche meter, it is possible to lower your INR to the value required by a surgeon for an operation or a procedure.
- Since starting to take Warfarin, I have had four operations or procedures, where others would have had anaesthetic or a sedative.
- In those four operations, I was able to go home on public transport. If I still drove a car, I could have driven home afterwards.
- Private hospitals like to use an anesthetist, as it pumps up the bill.
- Avoiding anaesthesia must save hospitals money.
Well designed apps, based on Control Engineering principles, that help the patient take the best dose of a drug will become more common.
Thoughts On Alstom At Derby
In the 1970s, I worked at ICI Plastics in Welwyn Garden City in a section called Computer Techniques.
We had a unique mandate from the Divisional Board, that allowed us to stick our nose into anybody’s business.
We certainly weren’t short of computing power, as in addition to the Division’s IBM 360 and dial-up services to GEISco, we had one of the handful of PACE 231R analogue computers in the UK.
Note.
- These machines didn’t use many semiconductors.
- These beasts could solve up to a hundred simultaneous differential equations and display the answers as graphs on the printers.
- Other UK companies and institutions with a PACE 231 R, included BMC, British Rail Research and Cambridge University.
- Two were linked together and these did the calculations for the Apollo flights.
- Their finest hour would surely have been to use their flexibility and power to bring home the stricken Apollo 13.
I got an interesting introduction to the industrial world in my three years at Welwyn.
One of our problems, was recruiting enough specialist engineers and programming staff.
So in the end, at one of our Monday morning meetings, we wrote our own advert for the Sunday Times.
We got all the staff we needed, but they weren’t the sort of recruits, you’d normally expect in the 1970s. Two were Indian and two were American, but all were recent immigrants. But they were certainly good enough to solve our problems.
I don’t think the Personnel Department were amused at our independent recruitment exercise.
I sometimes wonder if Bombardier (now Alstom) in Derby has a similar recruitment problem.
I am a Control Engineer and all these hybrid systems, that will power the transport of the future, be they trains, planes or automobiles, need lots of engineers with similar skills to myself and those of computer programmers. So do local companies; Rolls-Royce, JCB and Toyota, who probably have their own skill shortages in these areas, nick the best from Alstom.
It should be noted that in the railway press, it has been said that the Aventras from Derby were late because of software problems.
British Gas Joins Forces With Samsung To Help Customers Power Smarter Energy Use
The title of this post, is the same as that of this press release from Centrica.
This is the sub-heading.
British Gas and Samsung have today announced the exciting first step in a long-term venture – aimed at helping customers better manage their energy use and increase the adoption of low carbon heating technologies in homes across Britain.
These are the first two paragraphs.
The collaboration will see British Gas integrate with Samsung’s SmartThings app to help customers optimise their home appliances to use energy when the cost and demand are lower. This is now possible through the integration of SmartThings Energy and British Gas’ PeakSave demand flexibility scheme informing customers (by sending notifications via their smartphone, TV or other compatible devices) of the best times to use household appliances to save money.
The PeakSave scheme includes PeakSave Sundays, running every Sunday until the end of February with half-price electricity from 11am to 4pm for British Gas customers and PeakSave Winter events which encourages customers to move their electricity use out of peak times when there is high demand on Britain’s energy grid.
As a Graduate Control Engineer, I believe that this could make optimising your energy use much easier.
- It would surely be a lot easier to check usage on your phone rather than a smart meter, when you perhaps cook a ready meal, so that you can see if your microwave or traditional cooker is cheapest.
- Suppose you and everybody, who lives with you are out for supper and British Gas want to cut off your gas for a reward, you can make an appropriate decision.
- Hopefully, if you have the right controls, you’ll be able to switch lights and appliances off and on.
The possibilities are endless.
I shall certainly be looking at the reviews of this app.
There is a section in the press release called Scaling Up Low Carbon Heating Opportunities, where this is said.
The collaboration will also help support customers in their journey to decarbonising their homes by introducing smart technologies in a way that is simple and empowering. From early 2024, British Gas will include Samsung heat pumps in its offering to British households to support the UK’s commitment to reach net zero by 2050.
The venture will see specially trained British Gas surveyors and engineers working with consumers to explain the benefits of heat pumps and then conducting the installations on-site. Samsung will be supporting workforce training as part of their efforts to upskill the heating industry to ensure there are enough installers to service the expected growing demand.
British Gas also offers customers the chance to purchase heat pumps through flexible financing methods. This, combined with the recently increased UK Government Boiler Upgrade Scheme grant of £7,500, creates an attractive package of financing options to help people make the transition more affordable.
Various plumbers, who I would trust, have given me different views about heat pumps.
I suspect the Samsung’s SmartThings app might be able to simulate your energy usage with or without the heat pump, as it would know your energy use with your current boiler.
I was doing similar calculations for chemical plants in the early 1970s at ICI, using a PACE 231-R computer.
Consider.
- It may look rather old fashioned, but it could solve a hundred simultaneous differential equations in one go.
- Two similar computers linked together were the analogue half of NASA’s moon mission simulator.
- Without these wonderful machines, NASA would not have been able to re-calculate the dynamics of Apollo 13 and the mission would be remembered as a disaster, rather than the first space rescue.
The average current smart phone has more computing power than a PACE 231-R.
What’s In It For Samsung?
I have a Samsung television, but unfortunately it has a screen fault because of age. So if I had the Samsung app and liked it, I might buy another Samsung TV.
Similarly, the app might give me a financial reason to buy a Samsung heat pump.
Samsung will sell more equipment.
What’s In It For Centrica?
Centrica would appear to be a loser, as bills will fall and they could be paying customers to not use energy.
But they are surely hoping that their market share will increase and I’m sure Samsung will give them a commission.
What’s In It For The Consumer?
Hopefully, they’ll get lower energy bills.
But also they might get a lot of convenience controlling their appliances and heating.
Conclusion
Using energy is becoming a computer game with monetary rewards.
Is the deal between Centrica/British Gas and Samsung another deal that has been brought to fruition by the Korean President’s visit to the UK?
It looks like this is the third recent deal signed between UK and Korean companies, after these two.
- South Korea, UK Strenghten Offshore Wind Ties
- UK And South Korea Help Secure Millions For World’s Largest Monopile Factory
I suspect, there might be a few more deals, if Charles and Camilla really turned on the charm.
In Mersey Tidal Project And Where It Is Up To Now, I wrote about talks between Liverpool City Council and Korea Water about a tidal barrage of the Mersey. This project must surely be a possibility!
This is said in the Wikipedia entry for Korean Air under Fleet Plans.
At the Association of Asia Pacific Airlines Assembly in 2018, Korean Air announced that it was considering a new large widebody aircraft order to replace older Airbus A330, Boeing 747-400, Boeing 777-200ER and Boeing 777-300. Types under consideration for replacement of older widebody aircraft in the fleet include the Boeing 777X and Airbus A350 XWB. At the International Air Transport Association Annual General Meeting (IATA AGM) in Seoul, Chairman Walter Cho said Korean Air’s widebody order is imminent and it is considering an extra order of Airbus A220 Family including developing version, Airbus A220-500.
Note.
- Airbus A350 XWB have Welsh wings and Rolls-Royce engines.
- Airbus A220-500 are made in Canada with wings and composite parts from Belfast. Rolls-Royce may have a suitable engine.
Could a deal have something in it for the UK?
Although Korea has its own SMR program, I wonder, if there could be a link-up between Korean industry and Rolls-Royce over SMRs?
Apollo 13
Apollo 13 was the mission where the oxygen tank blew and they had to use the LEM (Lunar Excursion Module) to bring the astronauts home. It all came back to me after the program on BBC2 tonight.
What is not generally known is that the calculations were performed not on a digital computer, but on a PACE 231R analog computer, which was one of the greatest machines ever built. NASA had two slaved together as the analog half of a hybrid simulator of the Apollo mission. When Apollo 13 blew, they reprogrammed it to work out the trajectory that brought everyone home safely.
I used to work on a PACE 231R and know how easy it would have been with that machine to sort out all of the differential equations compared to the sort of digital machines we have today.
Without the analog machines, it may have been that Apollo 13 would have been more unlucky.

