How can I perform normalised correlation using Arduino

Please describe the object, and the "40 kHz signal" that is to be sent through the object: amplitude, total time, etc.