The method of deriving the Euler angle velocity for a given sequence is to transform each of the derivatives into the reference frame. Remember that an Euler angle sequence is made up of three successive rotations. In other words, the angular velocity needs one rotation, needs two and needs three.
Carrying out the matrix multiplication with being the Euler 123 sequence
and
gives us
Adding the vectors together yields
Of course, we also wish to have the Euler angle velocities in terms of the angular velocities which requires us to solve the linear equations for them. Using a program like Matlab makes it easy for us to get