Hardware Optimization and Implementation of a 16-Channel Neural Tree Classifier for On-Chip Closed-Loop