{"id":395,"date":"2019-04-06T02:48:18","date_gmt":"2019-04-06T02:48:18","guid":{"rendered":"http:\/\/mrsdprojects.ri.cmu.edu\/2018teamb\/?p=395"},"modified":"2019-12-13T16:57:48","modified_gmt":"2019-12-13T16:57:48","slug":"software-and-processing-subsystem","status":"publish","type":"post","link":"https:\/\/mrsdprojects.ri.cmu.edu\/2018teamb\/2019\/04\/06\/software-and-processing-subsystem\/","title":{"rendered":"Software and Processing Subsystem"},"content":{"rendered":"<p>The processing subsystem includes all algorithms within the system, including: signal filtering<br \/>\nand conditioning algorithms, prediction and calculation algorithms, and the control algorithm. It<br \/>\nwill take raw sensor data as an input into the subsystem and output torque values to the actuation<br \/>\nsubsystem.<\/p>\n<p><strong>20<sup>th<\/sup>January 2019<\/strong><\/p>\n<p>An Initial Git Repository was set up in order to facilitate version control and code updates.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>7<sup>st<\/sup>February 2019<\/strong><\/p>\n<p>Research Completed on on-board computers for the project. NVIDIA jetson was chosen.\u00a0Sparkfun Razor IMU 9 Dof was picked out, to be placed at knee to collect walking data.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>16<sup>th<\/sup>February 2019<\/strong><\/p>\n<p>Sparkfun IMU was interfaced with Arduino Uno (I2C protocol). FSR\u2019s were connected to analog port of Arduino. The IMU\u2019s firmware was modified to give roll, pitch, yaw and quaternion values along with accelerometer, gyroscope and magnetometer values. The FSR\u2019s data is intended to provide ground truth for the prediction model.<\/p>\n<p style=\"text-align: center\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-402\" src=\"http:\/\/mrsdprojects.ri.cmu.edu\/2018teamb\/wp-content\/uploads\/sites\/32\/2019\/04\/Picture1-300x168.png\" alt=\"\" width=\"587\" height=\"329\" srcset=\"https:\/\/mrsdprojects.ri.cmu.edu\/2018teamb\/wp-content\/uploads\/sites\/32\/2019\/04\/Picture1-300x168.png 300w, https:\/\/mrsdprojects.ri.cmu.edu\/2018teamb\/wp-content\/uploads\/sites\/32\/2019\/04\/Picture1.png 625w\" sizes=\"auto, (max-width: 587px) 100vw, 587px\" \/><\/p>\n<p style=\"text-align: center\"><u>Fig 1: FSR and IMU setup with Arduino<\/u><\/p>\n<p>&nbsp;<\/p>\n<p><strong>20<sup>th<\/sup>February 2019<\/strong><\/p>\n<p>Preliminary data collection was done with the setup for one of the team members. The values were read from the Serial monitor of the Arduino\u00a0 IDE through a python library. The data collected was then converted to a pandas Dataframe to do exploratory analysis.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-404 aligncenter\" src=\"http:\/\/mrsdprojects.ri.cmu.edu\/2018teamb\/wp-content\/uploads\/sites\/32\/2019\/04\/Picture2-300x166.png\" alt=\"\" width=\"706\" height=\"391\" srcset=\"https:\/\/mrsdprojects.ri.cmu.edu\/2018teamb\/wp-content\/uploads\/sites\/32\/2019\/04\/Picture2-300x166.png 300w, https:\/\/mrsdprojects.ri.cmu.edu\/2018teamb\/wp-content\/uploads\/sites\/32\/2019\/04\/Picture2-768x425.png 768w, https:\/\/mrsdprojects.ri.cmu.edu\/2018teamb\/wp-content\/uploads\/sites\/32\/2019\/04\/Picture2.png 974w\" sizes=\"auto, (max-width: 706px) 100vw, 706px\" \/><\/p>\n<p style=\"text-align: center\"><u>Fig 2: Accelerometer Values from IMU<\/u><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: center\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-406\" src=\"http:\/\/mrsdprojects.ri.cmu.edu\/2018teamb\/wp-content\/uploads\/sites\/32\/2019\/04\/Picture3-300x188.png\" alt=\"\" width=\"851\" height=\"534\" srcset=\"https:\/\/mrsdprojects.ri.cmu.edu\/2018teamb\/wp-content\/uploads\/sites\/32\/2019\/04\/Picture3-300x188.png 300w, https:\/\/mrsdprojects.ri.cmu.edu\/2018teamb\/wp-content\/uploads\/sites\/32\/2019\/04\/Picture3-768x481.png 768w, https:\/\/mrsdprojects.ri.cmu.edu\/2018teamb\/wp-content\/uploads\/sites\/32\/2019\/04\/Picture3.png 974w\" sizes=\"auto, (max-width: 851px) 100vw, 851px\" \/><\/p>\n<p style=\"text-align: center\"><u>Fig 3: Gyroscope Values from IMU<\/u><\/p>\n<p>&nbsp;<\/p>\n<p><strong>7<sup>st<\/sup>March 2019<\/strong><\/p>\n<p>Additional data was collected with the IMU on the brace fitted at the front and properly calibrated. The analog values from FSR were binned \u00a0and binarized them (as shown in the figure below), by noting the values from the start of a heel strike till a toe-off. A threshold of 400 was set and binarized the values at the heel and toe.<\/p>\n<p style=\"text-align: center\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-410\" src=\"http:\/\/mrsdprojects.ri.cmu.edu\/2018teamb\/wp-content\/uploads\/sites\/32\/2019\/04\/Picture4-300x173.png\" alt=\"\" width=\"794\" height=\"458\" srcset=\"https:\/\/mrsdprojects.ri.cmu.edu\/2018teamb\/wp-content\/uploads\/sites\/32\/2019\/04\/Picture4-300x173.png 300w, https:\/\/mrsdprojects.ri.cmu.edu\/2018teamb\/wp-content\/uploads\/sites\/32\/2019\/04\/Picture4-768x444.png 768w, https:\/\/mrsdprojects.ri.cmu.edu\/2018teamb\/wp-content\/uploads\/sites\/32\/2019\/04\/Picture4.png 952w\" sizes=\"auto, (max-width: 794px) 100vw, 794px\" \/><\/p>\n<p style=\"text-align: center\"><u>Fig 4: Binned FSR values<\/u><\/p>\n<p>&nbsp;<\/p>\n<p>In the above diagram, for the purpose of clarity, the values at stance have been assigned 500 and values at swing have been assigned 0. For the purpose of training a model, we assigned 1 to the values in swing and 0 to the values in stance. This is added as the last two values of the data frame. Then we implemented a vanilla logistic regression on the model and performed a 10-fold cross-validation.<\/p>\n<p>The cross-validation accuracy was about 95%<\/p>\n<p>Then we prepared a different dataset altogether (completely exclusive from the training data) and fit the trained model to that. We were able to obtain a accuracy of 81%.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: center\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-409\" src=\"http:\/\/mrsdprojects.ri.cmu.edu\/2018teamb\/wp-content\/uploads\/sites\/32\/2019\/04\/Picture5-300x225.png\" alt=\"\" width=\"688\" height=\"516\" srcset=\"https:\/\/mrsdprojects.ri.cmu.edu\/2018teamb\/wp-content\/uploads\/sites\/32\/2019\/04\/Picture5-300x225.png 300w, https:\/\/mrsdprojects.ri.cmu.edu\/2018teamb\/wp-content\/uploads\/sites\/32\/2019\/04\/Picture5-768x575.png 768w, https:\/\/mrsdprojects.ri.cmu.edu\/2018teamb\/wp-content\/uploads\/sites\/32\/2019\/04\/Picture5-285x214.png 285w, https:\/\/mrsdprojects.ri.cmu.edu\/2018teamb\/wp-content\/uploads\/sites\/32\/2019\/04\/Picture5.png 904w\" sizes=\"auto, (max-width: 688px) 100vw, 688px\" \/><\/p>\n<p style=\"text-align: center\"><span style=\"text-decoration: underline\">Fig 5: Test data vs Predicted Data<\/span><\/p>\n<p style=\"text-align: center\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-408\" src=\"http:\/\/mrsdprojects.ri.cmu.edu\/2018teamb\/wp-content\/uploads\/sites\/32\/2019\/04\/Picture6-300x225.png\" alt=\"\" width=\"640\" height=\"480\" srcset=\"https:\/\/mrsdprojects.ri.cmu.edu\/2018teamb\/wp-content\/uploads\/sites\/32\/2019\/04\/Picture6-300x225.png 300w, https:\/\/mrsdprojects.ri.cmu.edu\/2018teamb\/wp-content\/uploads\/sites\/32\/2019\/04\/Picture6-285x214.png 285w, https:\/\/mrsdprojects.ri.cmu.edu\/2018teamb\/wp-content\/uploads\/sites\/32\/2019\/04\/Picture6.png 593w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p style=\"text-align: center\"><u>Fig 6: ROC Curve for Logistic Regression<\/u><\/p>\n<p>&nbsp;<\/p>\n<p>Understandably so, the model provides the prediction at that specific data point or instant independent of previous values.<\/p>\n<p><strong>13<sup>th<\/sup>March 2019<\/strong><\/p>\n<p>Foot Placement:\u00a0For the Foot -placement section of the Processing Subsystem, we researched on the various models and chose the Linear Inverted Pendulum Model to calculate capture point.<\/p>\n<p><strong>22<sup>nd<\/sup>March 2019<\/strong><\/p>\n<p>A Preliminary \u00a0Software Architecture pipeline was drawn up with our initial understanding and flow of all the algorithms.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-407 aligncenter\" src=\"http:\/\/mrsdprojects.ri.cmu.edu\/2018teamb\/wp-content\/uploads\/sites\/32\/2019\/04\/Picture7-300x175.png\" alt=\"\" width=\"770\" height=\"449\" srcset=\"https:\/\/mrsdprojects.ri.cmu.edu\/2018teamb\/wp-content\/uploads\/sites\/32\/2019\/04\/Picture7-300x175.png 300w, https:\/\/mrsdprojects.ri.cmu.edu\/2018teamb\/wp-content\/uploads\/sites\/32\/2019\/04\/Picture7-768x448.png 768w, https:\/\/mrsdprojects.ri.cmu.edu\/2018teamb\/wp-content\/uploads\/sites\/32\/2019\/04\/Picture7.png 974w\" sizes=\"auto, (max-width: 770px) 100vw, 770px\" \/><\/p>\n<p style=\"text-align: center\"><span style=\"text-decoration: underline\">Fig7: Software Architecture<\/span><\/p>\n<p><strong>1<sup>st<\/sup>April<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>An initial ROS Environment was setup including the required packages for the YOST IMU and Razor IMU on Git.<\/p>\n<p>The Firmware on the Razor IMU was modified to read the FSR values. This is to remove the Arduino from the Pipeline and directly interface FSR to the IMU (SAMD21 Breakout Board) to the Jetson.<\/p>\n<p>The FSR and resistors (for the voltage divider circuit) were soldered to the perfboard, in order to collect data.<\/p>\n<p><strong>5th April<\/strong><\/p>\n<p><span style=\"font-weight: 400\">ROS Environment:<\/span><\/p>\n<p><span style=\"font-weight: 400\">The Figure below shows the ROS architecture currently implemented for the exoskeleton system. \u00a0The Razor IMUs ROS package allows for the linear acceleration, angular velocity, and roll, pitch, and yaw angles to be published. \u00a0For testing and validation purposes we also set them to publish the raw FSR values to determine ground truth of whether the leg is in stance or swing (The FSRs are directly connected to the IMU breakout boards). \u00a0This data is published to the \/<\/span><i><span style=\"font-weight: 400\">imuR <\/span><\/i><span style=\"font-weight: 400\">topic for the right leg and the \/<\/span><i><span style=\"font-weight: 400\">imuL<\/span><\/i><span style=\"font-weight: 400\"> topic for the left leg. \u00a0The <\/span><i><span style=\"font-weight: 400\">classification_model_node<\/span><\/i><span style=\"font-weight: 400\">, <\/span><i><span style=\"font-weight: 400\">COM_vel_cal_node<\/span><\/i><span style=\"font-weight: 400\"> and <\/span><i><span style=\"font-weight: 400\">hip_exo<\/span><\/i><span style=\"font-weight: 400\"> node all subscribe to this topic. \u00a0The <\/span><i><span style=\"font-weight: 400\">classification_model_node<\/span><\/i><span style=\"font-weight: 400\"> determines if each leg is in swing or stance and publishes this information to the \/<\/span><i><span style=\"font-weight: 400\">swingLegRight<\/span><\/i><span style=\"font-weight: 400\"> or \/<\/span><i><span style=\"font-weight: 400\">swingLegLeft<\/span><\/i><span style=\"font-weight: 400\"> topic for the right and left legs respectively. \u00a0The <\/span><i><span style=\"font-weight: 400\">COM_vel_cal_node<\/span><\/i><span style=\"font-weight: 400\"> and <\/span><i><span style=\"font-weight: 400\">hip_exo<\/span><\/i><span style=\"font-weight: 400\"> node subscribe to these topics. The <\/span><i><span style=\"font-weight: 400\">COM_vel_cal_node<\/span><\/i><span style=\"font-weight: 400\"> calculates the CoM velocity and publishes it to the \/<\/span><i><span style=\"font-weight: 400\">COM_vel<\/span><\/i><span style=\"font-weight: 400\"> topic. The <\/span><i><span style=\"font-weight: 400\">hip_exo<\/span><\/i><span style=\"font-weight: 400\"> node subscribes to this topic. Within the <\/span><i><span style=\"font-weight: 400\">hip_exo<\/span><\/i><span style=\"font-weight: 400\"> node, the capture point is calculated and then transformed into a desired hip angle for the leg in swing. The HFE \u00a0and HAA desired angles are published to the \/<\/span><i><span style=\"font-weight: 400\">desiredAngleR<\/span><\/i><span style=\"font-weight: 400\"> or \/<\/span><i><span style=\"font-weight: 400\">desiredAngleL<\/span><\/i><span style=\"font-weight: 400\"> topic, depending on which leg is in swing. \u00a0The motor controller node will subscribe to these topics so that it can actuate the motors at the hip joints appropriately. \u00a0<\/span><\/p>\n<p style=\"text-align: center\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-453\" src=\"http:\/\/mrsdprojects.ri.cmu.edu\/2018teamb\/wp-content\/uploads\/sites\/32\/2019\/04\/6-1-300x95.png\" alt=\"\" width=\"635\" height=\"201\" srcset=\"https:\/\/mrsdprojects.ri.cmu.edu\/2018teamb\/wp-content\/uploads\/sites\/32\/2019\/04\/6-1-300x95.png 300w, https:\/\/mrsdprojects.ri.cmu.edu\/2018teamb\/wp-content\/uploads\/sites\/32\/2019\/04\/6-1-768x242.png 768w, https:\/\/mrsdprojects.ri.cmu.edu\/2018teamb\/wp-content\/uploads\/sites\/32\/2019\/04\/6-1-1024x323.png 1024w, https:\/\/mrsdprojects.ri.cmu.edu\/2018teamb\/wp-content\/uploads\/sites\/32\/2019\/04\/6-1.png 1600w\" sizes=\"auto, (max-width: 635px) 100vw, 635px\" \/><\/p>\n<p style=\"text-align: center\"><span style=\"text-decoration: underline\">Fig 8: ROS Architecture<\/span><\/p>\n<p><strong>7th April<\/strong><\/p>\n<p><span style=\"font-weight: 400\">Logistic Regression and the Random Forest Classifiers are the two machine learning models were considered for swing leg detection. \u00a0The nine features from the IMU (linear acceleration in x,y,z, angular velocity in x,y,z and roll pitch and yaw) are normalized before being used as inputs to the models.<\/span><\/p>\n<p><span style=\"font-weight: 400\">The data was split into training and testing sets. The two models were trained on the normalized dataset of IMU values and the target class. The cost of false positives is quite high for the exoskeleton use case. A false positive is when the leg is in-stance but detected to be in-swing. This would lead to the stance leg being actuated further in the software pipeline, which is potentially dangerous to the user. <\/span><\/p>\n<p><span style=\"font-weight: 400\">The confusion matrices for both logistic regression (Table 1) and random forest (Table 2) are as following. We achieved 94% overall accuracy for logistic regression and 97% for random forests.<\/span><\/p>\n<p><span style=\"text-decoration: underline\">Table 1: Logistic Regression Confusion Matrix<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><b>Logistic Regression<\/b><\/td>\n<td><span style=\"font-weight: 400\">Predicted Leg in Stance<\/span><\/td>\n<td><span style=\"font-weight: 400\">Predicted Leg in Swing<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Actual Leg in Stance<\/span><\/td>\n<td><b>822 (TP)<\/b><\/td>\n<td><b>53 (FP)<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Actual Leg in Swing<\/span><\/td>\n<td><b>58 (FN)<\/b><\/td>\n<td><b>943 (TN)<\/b><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p><span style=\"text-decoration: underline\">Table 2: Random Forests Confusion Matrix<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><b>Random Forests<\/b><\/p>\n<p><span style=\"font-weight: 400\">(50 estimators)<\/span><\/td>\n<td><span style=\"font-weight: 400\">Predicted Leg in Stance<\/span><\/td>\n<td><span style=\"font-weight: 400\">Predicted Leg in Swing<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Actual Leg in Stance<\/span><\/td>\n<td><b>870 (TP)<\/b><\/td>\n<td><b>5 (FP)<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Actual Leg in Swing<\/span><\/td>\n<td><b>57 (FN)<\/b><\/td>\n<td><b>944 (TN)<\/b><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>It was concluded that the Random Forest Classifier with tuned hyperparameters provided the least number of false positives. Hence this classifier was used for the final system. \u00a0Precision and recall within the range of 93-99% were obtained for the final spring validation demonstration.<\/p>\n<p><span style=\"font-weight: 400\"> \u00a0\u00a0\u00a0The subsystem should be improved by the decreasing the algorithm processing time to 100ms. \u00a0It would also be beneficial to smooth the predictions by taking into account the temporal nature of the data and noting the change or transitions in IMU values from swing to stance.<\/span><\/p>\n<p><strong>10th April<\/strong><\/p>\n<p><span style=\"font-weight: 400\">CoM Velocity Calculation:<\/span><\/p>\n<p><span style=\"font-weight: 400\"> \u00a0\u00a0\u00a0The CoM velocity calculation subsystem takes the roll and pitch angles from the thigh IMUs as well as predicted swing leg as inputs, and calculates the human\u2019s center of mass velocity which is used for the prediction of the capture points. We use the stance leg as an inverted pendulum model as shown in Figure 18<\/span><span style=\"font-weight: 400\">. Using a series of inputs of IMU angles and time stamps, we calculate the angular velocity. With a fixed length of human\u2019s leg, we can calculate the linear velocity of the end the pendulum, which can be regarded as human\u2019s CoM velocity.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-454 \" src=\"http:\/\/mrsdprojects.ri.cmu.edu\/2018teamb\/wp-content\/uploads\/sites\/32\/2019\/04\/7-1-e1557285420405.png\" alt=\"\" width=\"265\" height=\"213\" \/><\/p>\n<p style=\"text-align: center\"><span style=\"text-decoration: underline\">Figure 18: Inverted Pendulum Model for CoM Velocity Calculation<\/span><\/p>\n<p><span style=\"font-weight: 400\">Since the CoM Velocity calculation depends heavily on the correct detections of the Swing Leg Classification Subsystem, we first tested with the ground truth swing and stance leg values obtained from the FSRs under the feet. We started with sampling the IMU angles continuously and used the differences of angles divided by the time intervals to get the angular velocity. However, since the time intervals for continuous sampling is too short, a small difference caused by noise will result in large calculated velocity. To mitigate the influence of noise, we improved the sampling intervals. Also, we use the average of the calculated velocities at 10 different samples as our output velocity to further mitigate abnormal values.<\/span><\/p>\n<p><strong>September 12 &#8211; Oct 1st ,2019<\/strong><\/p>\n<p>Time profiling of the software pipeline was done as shown in the. Figure below. The entire software pipeline was also revamped and three major packages were created: soteria sensing, Soteria controls and soteria motor control.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-584 aligncenter\" src=\"http:\/\/mrsdprojects.ri.cmu.edu\/2018teamb\/wp-content\/uploads\/sites\/32\/2019\/04\/Screen-Shot-2019-12-13-at-11.55.49-AM-300x200.png\" alt=\"\" width=\"530\" height=\"353\" srcset=\"https:\/\/mrsdprojects.ri.cmu.edu\/2018teamb\/wp-content\/uploads\/sites\/32\/2019\/04\/Screen-Shot-2019-12-13-at-11.55.49-AM-300x200.png 300w, https:\/\/mrsdprojects.ri.cmu.edu\/2018teamb\/wp-content\/uploads\/sites\/32\/2019\/04\/Screen-Shot-2019-12-13-at-11.55.49-AM-768x512.png 768w, https:\/\/mrsdprojects.ri.cmu.edu\/2018teamb\/wp-content\/uploads\/sites\/32\/2019\/04\/Screen-Shot-2019-12-13-at-11.55.49-AM-1024x683.png 1024w, https:\/\/mrsdprojects.ri.cmu.edu\/2018teamb\/wp-content\/uploads\/sites\/32\/2019\/04\/Screen-Shot-2019-12-13-at-11.55.49-AM-750x500.png 750w, https:\/\/mrsdprojects.ri.cmu.edu\/2018teamb\/wp-content\/uploads\/sites\/32\/2019\/04\/Screen-Shot-2019-12-13-at-11.55.49-AM.png 1430w\" sizes=\"auto, (max-width: 530px) 100vw, 530px\" \/><\/p>\n<p style=\"text-align: center\">Figure 19: time profile of pipeline<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-583 aligncenter\" src=\"http:\/\/mrsdprojects.ri.cmu.edu\/2018teamb\/wp-content\/uploads\/sites\/32\/2019\/04\/softpip-300x250.png\" alt=\"\" width=\"664\" height=\"553\" srcset=\"https:\/\/mrsdprojects.ri.cmu.edu\/2018teamb\/wp-content\/uploads\/sites\/32\/2019\/04\/softpip-300x250.png 300w, https:\/\/mrsdprojects.ri.cmu.edu\/2018teamb\/wp-content\/uploads\/sites\/32\/2019\/04\/softpip.png 716w\" sizes=\"auto, (max-width: 664px) 100vw, 664px\" \/><\/p>\n<p style=\"text-align: center\">Figure 20: software pipeline revamp<\/p>\n<p><b>September 28, 2019\u00a0<\/b><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400\">Came up with the winter dataset based trajectory planner concept. Sourced an excel version of the winter dataset and extracted the required columns for the trajectory planner.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><b>October 22, 2019<\/b><\/p>\n<p><span style=\"font-weight: 400\">Began implementation of the winter trajectory planner in MATLAB . Wrote code in MATLAB to read data from the excel (.csv) file and import it into MATLAB as array objects. Thresholded the ground reaction force column and plotted it alongside the HFE curve to identify the swing phase and stance phase. Figure 1 shows one complete gait cycle along with a thresholded GRF plot.<\/span><\/p>\n<p style=\"text-align: center\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-576 aligncenter\" src=\"http:\/\/mrsdprojects.ri.cmu.edu\/2018teamb\/wp-content\/uploads\/sites\/32\/2019\/04\/soft1-300x225.jpg\" alt=\"\" width=\"300\" height=\"225\" srcset=\"https:\/\/mrsdprojects.ri.cmu.edu\/2018teamb\/wp-content\/uploads\/sites\/32\/2019\/04\/soft1-300x225.jpg 300w, https:\/\/mrsdprojects.ri.cmu.edu\/2018teamb\/wp-content\/uploads\/sites\/32\/2019\/04\/soft1-285x214.jpg 285w, https:\/\/mrsdprojects.ri.cmu.edu\/2018teamb\/wp-content\/uploads\/sites\/32\/2019\/04\/soft1.jpg 700w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><br \/>\n<span style=\"font-weight: 400\">Figure 1: One complete HFE trajectory cycle with the thresholder GRF plot denoting swing and stance<\/span><\/p>\n<p><b>October 23, 2019<\/b><\/p>\n<p><span style=\"font-weight: 400\">Extracted the section of the trajectory over swing, and divided the datapoints by the last swing-phase datapoint so as to normalize the trajectory to end at unity. The normalized swing portion of the winter trajectory can be seen in figure 2 below:<\/span><\/p>\n<p style=\"text-align: center\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-577 aligncenter\" src=\"http:\/\/mrsdprojects.ri.cmu.edu\/2018teamb\/wp-content\/uploads\/sites\/32\/2019\/04\/soft2-300x225.jpg\" alt=\"\" width=\"300\" height=\"225\" srcset=\"https:\/\/mrsdprojects.ri.cmu.edu\/2018teamb\/wp-content\/uploads\/sites\/32\/2019\/04\/soft2-300x225.jpg 300w, https:\/\/mrsdprojects.ri.cmu.edu\/2018teamb\/wp-content\/uploads\/sites\/32\/2019\/04\/soft2-285x214.jpg 285w, https:\/\/mrsdprojects.ri.cmu.edu\/2018teamb\/wp-content\/uploads\/sites\/32\/2019\/04\/soft2.jpg 700w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><br \/>\n<span style=\"font-weight: 400\">Figure 2: Normalized swing portion of the winter trajectory<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><b>November 5, 2019<\/b><\/p>\n<p><span style=\"font-weight: 400\">Ported the normalized winter trajectory from MATLAB to the soteria_controls package in C++. Wrote code to obtain the desired landing angle and swing times from the helper functions. Wrote code to scale the trajectory along the y-axis to match the desired angles, and imported and used the cubic spline interpolation library to interpolate the trajectory in order to scale it by the estimated swing time along the x-axis.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400\">\u00a0<\/span><b>November 20, 2019<\/b><\/p>\n<p><span style=\"font-weight: 400\">Wrote alternative trajectory planner which only follows the rising portion of the curve to the desired hip angle instead of the complete rise and fall. Tested it on the user and determined it to be ill-suited to the problem. Implemented a phase shifter for the trajectory so that the trajectory can act earlier and actuate the leg linkage faster to minimize response time.<\/span><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The processing subsystem includes all algorithms within the system, including: signal filtering and conditioning algorithms, prediction and calculation algorithms, and the control algorithm. It will take raw sensor data as an input into the subsystem and output torque values to the actuation subsystem. 20thJanuary 2019 An Initial Git Repository was set up in order to <a href=\"https:\/\/mrsdprojects.ri.cmu.edu\/2018teamb\/2019\/04\/06\/software-and-processing-subsystem\/\" rel=\"nofollow\"><span class=\"sr-only\">Read more about Software and Processing Subsystem<\/span>[&hellip;]<\/a><\/p>\n","protected":false},"author":141,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[],"class_list":["post-395","post","type-post","status-publish","format-standard","hentry","category-processing-subsystem"],"_links":{"self":[{"href":"https:\/\/mrsdprojects.ri.cmu.edu\/2018teamb\/wp-json\/wp\/v2\/posts\/395","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mrsdprojects.ri.cmu.edu\/2018teamb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mrsdprojects.ri.cmu.edu\/2018teamb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mrsdprojects.ri.cmu.edu\/2018teamb\/wp-json\/wp\/v2\/users\/141"}],"replies":[{"embeddable":true,"href":"https:\/\/mrsdprojects.ri.cmu.edu\/2018teamb\/wp-json\/wp\/v2\/comments?post=395"}],"version-history":[{"count":22,"href":"https:\/\/mrsdprojects.ri.cmu.edu\/2018teamb\/wp-json\/wp\/v2\/posts\/395\/revisions"}],"predecessor-version":[{"id":585,"href":"https:\/\/mrsdprojects.ri.cmu.edu\/2018teamb\/wp-json\/wp\/v2\/posts\/395\/revisions\/585"}],"wp:attachment":[{"href":"https:\/\/mrsdprojects.ri.cmu.edu\/2018teamb\/wp-json\/wp\/v2\/media?parent=395"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mrsdprojects.ri.cmu.edu\/2018teamb\/wp-json\/wp\/v2\/categories?post=395"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mrsdprojects.ri.cmu.edu\/2018teamb\/wp-json\/wp\/v2\/tags?post=395"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}