Phenomenological approach to structural phase transitions in trigonal double molybdates and tungstates