Hi Jane...welcome to the Forum!
It sounds like an idle fault if the revs have dropped down to a level where the transmission is juddering.
If this is the case, then maybe try some cleaning additive for the engine (Halfords sell many different types) and a good run may cure it.
If not, then a trip to a local BMW specialist for them to scan the engine control system to diagnose the fault.
I would try the cleaner first though
Regards. Trevor - Admin