---
title: "Analog computer model of the liver"
subject: "Simulation and Modeling"
chapter: 3
key: "semester_8/simulation_and_modeling:analog-computer-liver-model"
source: https://www.bctengineer.com/q/semester_8/simulation_and_modeling/analog-computer-liver-model
site: BCT Engineering
---

# Analog computer model of the liver

Simulation and Modeling · Chapter 3: Continuous system simulation

- Asked in: 2074 Magh, 2+8 marks; 2072 Ashwin, 4+6 marks; 2070 Magh, 4+6 marks; 2069 Bhadra (old course), 4+8 marks; 2070 Bhadra, 7 marks (asked 5 times)
- Video: [Analog Computer Model of Liver | Mathematical Model & Differential Equations](https://www.youtube.com/watch?v=STVwmytFlR8) — Engivault
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_8/simulation_and_modeling/analog-computer-liver-model
- Whole chapter: https://www.bctengineer.com/md/semester_8/simulation_and_modeling/chapter-3

## Question

What is an analog computer / analog method? Design the analog computer model of the liver and explain it (with necessary equations and figures; pros and cons of analog computer).

## Short answer

An analog computer uses voltage to represent variables and solves differential equations via integrators, summers, and potentiometers. The three-compartment liver model: dx1/dt = -k1 x1 + k2 x2, dx2/dt = k1 x1 - (k2+k3) x2, dx3/dt = k3 x2, implemented with interconnected integrators. Pros: parallel, fast, interactive; cons: limited accuracy (about 0.1%).

## Answer

#### Analog computer and analog method
An **analog computer** is a computing device that represents each variable by a continuously varying physical quantity (usually voltage) and solves equations by connecting electronic units that behave like the mathematical operations. The **analog method** solves a differential equation by building a circuit whose voltages obey the same equation (an analogue of the system) and recording the output.

The main units are:

| Unit | Function |
|---|---|
| Summer | Adds input voltages, output is the negative sum |
| Integrator | Integrates the sum of its inputs with respect to time, with sign inversion |
| Coefficient potentiometer | Multiplies a voltage by a constant between 0 and 1 |
| Inverter | Changes the sign of a voltage |
| Multiplier / function generator | Product of two variables, nonlinear functions |
| Recorder / scope | Displays the output against time |

#### Liver model
The liver removes substances from the blood and passes them into bile. A common test injects a small amount of a radioactive-tagged dye into the blood and measures how the amount in blood, in liver and in bile varies with time. The system is modelled by three compartments (a compartmental model):

- `x1(t)`: amount of tracer in the blood.
- `x2(t)`: amount of tracer in the liver.
- `x3(t)`: amount excreted into bile (and intestine).

Assumptions: each flow is proportional to the amount in the compartment it leaves (first-order kinetics); the compartments are well mixed; the tracer injected at t = 0 gives `x1(0) = X0`, `x2(0) = x3(0) = 0`.

```text
  Blood x1 --k1--> Liver x2 --k3--> Bile x3
           <--k2--
```

#### Equations
```text
dx1/dt = -k1 x1 + k2 x2
dx2/dt =  k1 x1 - (k2 + k3) x2
dx3/dt =  k3 x2
```
- k1: rate of uptake from blood by the liver.
- k2: rate of return from liver to blood.
- k3: rate of excretion from liver to bile.

The total `x1 + x2 + x3 = X0` stays constant (mass balance), which is a useful check on the model.

#### Analog computer model
Each integrator gives the output with sign inverted, so the integrator outputs are `-x1`, `-x2`, `-x3`. Coefficient potentiometers are set to k1, k2, k3, and inverters supply the positive signs where needed.

```text
 +x2 -[k2]--\
             +-->[Int 1]--> -x1
 -x1 -[k1]--/
 +x1 -[k1]--\
             +-->[Int 2]--> -x2
 -x2 -[k2+k3]/
 +x2 -[k3]---->[Int 3]--> -x3
```
(+x1 and +x2 are obtained from -x1 and -x2 by inverters.)

Connections:
1. Integrator 1 input = `-k1 x1 + k2 x2` (the first from the output `-x1` through pot k1, the second from `+x2` through pot k2). Output `-x1`; its initial condition is set to `-X0`.
2. Integrator 2 input = `k1 x1 - (k2 + k3) x2`. Output `-x2`; initial condition zero.
3. Integrator 3 input = `k3 x2`. Output `-x3`; initial condition zero.
4. Outputs are plotted on a recorder against time.

The recorded curves show `x1` falling, `x2` rising to a peak and then falling, and `x3` rising towards X0. The values of k1, k2, k3 are adjusted till the curves match clinical data, and a diseased liver is shown by a smaller k3.

#### Pros and cons of the analog computer
**Advantages of the analog computer**
- Operates in parallel, so the solution is fast, even real time.
- Continuous solution; no step size or numerical round-off error.
- Interactive: parameters can be changed by a knob and the result seen immediately.
- Shows the physical meaning of the equation; good for control studies.

**Disadvantages**
- Accuracy is limited (about 0.1 to 1 percent) by component tolerance, noise and drift.
- Amplitude scaling and time scaling are needed, and are tedious.
- The size of the problem is limited by the number of units available.
- Hard to implement nonlinearities, logical decisions and data storage.
- Re-patching for a new problem takes time; poor repeatability and documentation.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. How does the analog method solve a differential equation?
   A. By storing numbers in memory and stepping through time
   B. By building a circuit whose voltages obey the same equation and recording the output
   C. By guessing initial values
   D. By removing the derivative terms
   Answer: B. An analog computer uses continuous voltages and units like integrators and summers that behave like the mathematical operations. (Key point: Analog method)

2. In the liver model, which equation describes the tracer in the bile compartment x3?
   A. dx3/dt = k1 x1
   B. dx3/dt = -k3 x3
   C. dx3/dt = k3 x2
   D. dx3/dt = k2 x2 - k3 x3
   Answer: C. Excretion into bile is proportional to the amount in the liver: dx3/dt = k3 x2. (Key point: Liver equations)

3. What does the liver model state about totals and a diseased liver?
   A. x1 + x2 + x3 decreases; a diseased liver has a larger k3
   B. x1 alone stays constant; disease changes k1 only
   C. x1 + x2 + x3 = X0 stays constant; a diseased liver shows a smaller k3
   D. x2 stays constant; disease has no effect
   Answer: C. Mass balance keeps the total equal to X0, and reduced excretion (smaller k3) indicates a diseased liver. (Key point: Mass balance and disease)

4. Which is a disadvantage of analog computers?
   A. They are slow because they work serially
   B. They have round-off errors from step size
   C. They cannot be interactive
   D. Limited accuracy and the need for amplitude and time scaling
   Answer: D. Accuracy is limited (about 0.1 to 1 percent) by tolerance, noise and drift, and scaling is tedious. (Key point: Analog computer limits)

## Related in Simulation and Modeling

- [Significance of differential equations; liver model](https://www.bctengineer.com/question.md?key=semester_8%2Fsimulation_and_modeling%3Adiff-eq-significance-liver) — Simulation and Modeling, chapter 3
- [Continuous system simulation; analog computer example](https://www.bctengineer.com/question.md?key=semester_8%2Fsimulation_and_modeling%3Acontinuous-simulation-analog-example) — Simulation and Modeling, chapter 3

## Related in other subjects

- [Brushless excitation pros and cons](https://www.bctengineer.com/question.md?key=semester_8%2Fpower_plant_design%3Abrushless-pros-cons) — Power Plant Design, chapter 4
- [Static excitation pros and cons](https://www.bctengineer.com/question.md?key=semester_8%2Fpower_plant_design%3Astatic-excitation-pros-cons) — Power Plant Design, chapter 4
- [Distribution layouts, pros/cons, improvements](https://www.bctengineer.com/question.md?key=semester_5%2Fwater_supply_engineering%3Adistribution-layouts-improvements) — Water Supply Engineering, chapter 7, asked 4×
- [Phase shift method of SSB generation: pros and cons](https://www.bctengineer.com/question.md?key=semester_6%2Fcommunication_systems%3Assb-phase-shift-pros-cons) — Communication Systems, chapter 2, asked 2×
