A feedback control architecture for bioelectronic devices with applications to wound healing