In Introduction to Circuits and Signals II (EE 16B), my partner and I created a voice-controlled robot car. This cumulative project applies electrical and mathmatical signal processing with closed-loop feedback to create a responsive car.
The two motors controlling each wheel of the car do not spin at the same rates when a voltage is applied. To correct for this, linear regressions were found to model angular speed vs. voltage applied for each motor. Closed-loop feedback is applied to the estimated angular speeds by finding the difference in the distance travelled between the two wheels and adjusting the voltage of the wheels to counteract this difference. Turns are accomplished by decrementing the variable keeping track of the distance travelled by each wheel, making the system believe that wheel much "catch-up" to achieve straight-line movement.
Both electrical and mathematical signal processing are necessary to convert vocal commands to car instructions. When the microphone first detects sound, its signal is much too weak to be of use to our microcontroller. Furthermore, this signal was centered at 0 V, while the Ti-MSP microcontroller's analog pins had an input range of 0 - 3.3 V. The signal was amplified using a virtual ground to such that the input range would be completely filled with a normal volume voice. The signal was also pushed through a second-order low-pass filter to eliminate higher-frequency noise from the microphone data.
After collecting training data, principal component analysis (PCA) was used to determine a set of two basis vectors which most differentiated the four words we used: "Clinton", "George", "Obama", and "Trump". The orthogonal projections of the training data onto the subspace were then used to find centroids for a given word cluster using k-means clustering. The final command is thus determined by taking the amplified and filtered signal, finding its coordinates in the principal vector space, and finding the centroid closest to it that was also within a threshold.