I don't know the extent of purification you want, but the filtration then mixing of pure water followed by separation is helpful. Give enough time to separation
First filtration to separate solids present in the oil after washing with water to remove small amounts of salt. After treat with sodium methoxide in amounts suitable for obtaining biodiesel.
waste cooking oil contains various waste particles. first separate the larger particle by sieving through the micron size holes and then pour luke warm water to remove the salts and then separate it.
The links of the articles may be useful for your need.
The first, even being used for crude vegetable oil, can be applied to the residual oil. The second shows an example of biodiesel production using rapidly purified waste oil.
filter the used cooking oil first, then mix with distilled water in ratio 1:3 using a mixer. Then separate the mixture using a separating funnel. repeat the procedure 3 times to get a cleaner oil.
after the procedure you can proceed to biodiesel production
The major darwback of the waste cooking oil is its increased FFA content. Previous studies have evaluate the FFA level of the oil had a siginificant impact on biodiesel yield. If you intented to conduct direct transesterification, the FFA level should be less than 2%. However, as a pretreatment, you can do acid esterification which is reduced FFA levels. To do this, mix the Oil with Methanol (1:9 molar ratio) followed by Sulfuric acid 1% for 2 hours at 60°C with the agitation speed of 600rpm. After the reaction time was completed, let the mixture to settle down in a separatory funnel. After 24 hours, there are 2 layes. Take the bottom layer as the pretreated waste cooking oil for transesterification.
However, keep in mind, the acid esterification is ony necessary if you expect to do transesterification in the presence of a base catalyst.