In practice, the graphical method is complicated and impractical for complex circuits. Another method of modelling a diode is called piecewise linear (PWL) modelling. In mathematics, this means taking a function and breaking it down into several linear segments. This method is used to approximate the diode characteristic curve as a series of linear segments. The real diode is modelled as 3 components in series: an ideal diode, a voltage source and a resistor.