Lesson Seven:

Mathematical Implementation of
Pharmacokinetic Models


After going through the theoretical principles of pharmacokinetics (PK) in the previous lectures, we are now going to see how we can use mathematical tools to formalise those concepts into models. 

In this lesson, you will be taken through the process of building a compartmental PK model using differential equations.

To make the learning more intuitive, we are going to use the software Berkeley Madonna, which allows us to easily visualise and interpret compartmental models. 

In particular, we are going to write models for the pharmacokinetics (PK) of a drug with one and two compartments, how to import and display data and simulate variability between individuals. 

Learning objectives:

  • Formulate simple PK models with differential equations

  • Describe the process of developing, implementing and evaluating PK drug models using the Berkeley Madonna software program and tools

  • Evaluate in the context of presented examples

  • Run and use examples to create your own interactive simulations


Please note:

This site is in beta. If you see any issues with the layout or content, please let us know by contacting us.

-PMX Africa Team

Task 1:

1.1 Download a trial of the Berkeley Madonna software

You can click here to download the trial software.

a. When you follow the Berkeley madonna link above, you will find  2 sections; macintosh and windows. If your computer runs on Mac, download from the mac version and if you are a Windows user, download the windows version.
Note: This software version is a fully functional demo version that is available for free, but does not allow you to save the files. 

b. Please note that you need to install a 32-bit version of Java for Berkeley Madonna to work. Therefore, on this very Berkeley madonna website, when you scroll down, you will find Java installation instructions. Follow the correct links depending on whether you are a MAC or WINDOWS user. Instructions for Java installation are found on that same page. 

c. If you can not find the JAVA file, please download and Install JAVA software HERE

Task 2:
2.1 Please study the following sequential videos:

Please note that it is important that you watch and carefully listen to the videos since they have explanations that are not present in the presentation slides. If you want, you can download the slides used in the presentation here:


Presentation 1

Presentations 2-4

Additionally, you can review this video (and slides) for more explanation on how to implement compartmental PK models using differential equations.

Task 3:

3.1 Using Berkeley Madonna

The aim of this task is for you to use the Berkeley Madonna software to explore how changes in drug doses and pharmacokinetic parameters such as volume and clearance affect the concentration of a drug.

To attempt this exercise, you need the following:

  • You must have downloaded and installed the Berkeley Madonna software.

  • You should have watched the videos in Task 2 which will guide you through the software.

  • You should download the model files provided as indicated below.

3.2 Models provided

You have been provided with 2 models that are already coded and ready to use.

Please read the accompanying exercise documentation and download the two models:

For more reading material on how to use Berkeley Madonna for even more complex models, study the paper 'Visualization and Communication of Pharmacometric Models with Berkeley Madonna' by A. Krause and PJ. Lowe.


You can view a pre-recorded tutorial of this lesson here. [ Video ] [ Audio ]

Important note:

Having trouble with this lesson?

We suggest that you first review the lesson 9 coursework to help you better understand this topic and come back to this once you've understood the topics better.