You could try killing the power to your device. Assuming you are unable/unwilling to physically disconnect the device, you should run (as root):
iwconfig wlan0 txpower off. I would then wait 10-15 seconds to make sure whatever hardware issue has caused the problem has been stopped, then:
iwconfig wlan0 txpower auto.
Or, you can simply run rfkill and block/unblock your device. To do so, run
rfkill block wifi, followed by
rfkill unblock wifi. This second option should be faster, since you only need to wait 2-3 seconds between commands, as opposed to 10-15 seconds. In fact, on my machine, I don't need to wait at all, although I suspect this depends on your WiFi hardware. This option can also be done as a regular user, no root needed.
You can also restart NetworkManager. If you use systemctl as your init system (as is the case with newer versions of Ubuntu), you can use
systemctl restart NetworkManager. Otherwise, you can use
sudo initctl restart network-manager. If you don't know what init system you use, try both commands and see what works.