Displacement detection in silicon nano-optoelectromechanical systems (NOEMS) for the development of artificial intelligence hardware