4bar
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
4bar [2017/08/04 19:02] – [How to Analyze a 4 Bar Linkage with LEGOs, Solidworks, MATLAB, Gyroscope, and Accelerometer] rebeccacao | 4bar [2017/08/23 08:17] (current) – [Coding in NXC to Read Sensor Data] rebeccacao | ||
---|---|---|---|
Line 92: | Line 92: | ||
===== MATLAB Program ===== | ===== MATLAB Program ===== | ||
Please see [[4bMATLAB|this]] page. | Please see [[4bMATLAB|this]] page. | ||
+ | \\ | ||
+ | Please download the MATLAB model of the 4-bar mechanism [[https:// | ||
\\ | \\ | ||
This is divided so that the readers won't have to scroll up and down constantly due to the large amount of information on this page. | This is divided so that the readers won't have to scroll up and down constantly due to the large amount of information on this page. | ||
Line 98: | Line 100: | ||
===== Modeling in Solidworks ===== | ===== Modeling in Solidworks ===== | ||
Please see [[4bSW|this]] page. | Please see [[4bSW|this]] page. | ||
+ | \\ | ||
+ | Please download the Solidworks assembly [[https:// | ||
+ | \\ | ||
+ | Please download the excel file that contains all of the Solidworks data [[https:// | ||
\\ | \\ | ||
\\ | \\ | ||
Line 187: | Line 193: | ||
\\ | \\ | ||
--> | --> | ||
- | ====== Coding in NXC to Read Sensor Data ====== | + | ===== Coding in NXC to Read Sensor Data ===== |
+ | Please download the [[https:// | ||
+ | \\ | ||
First, the mechanism with the sensors are placed on a flat surface, a function is run, as seen from [[https:// | First, the mechanism with the sensors are placed on a flat surface, a function is run, as seen from [[https:// | ||
\\ | \\ | ||
Line 227: | Line 235: | ||
==== Sec 2: Realistic Motor Data ==== | ==== Sec 2: Realistic Motor Data ==== | ||
- | To ensure that the model in MATLAB matches the realistic model, | + | The results for measuring |
- | + | \\ | |
- | {{ : | + | \\ |
\\ | \\ | ||
- | As shown on the figure above, the steady state rotational speed of the NXT motor with the brick used for the experiment is roughly 89 RPM. | ||
- | |||
\\ | \\ | ||
==== Sec 3: Data Processing in MATLAB ==== | ==== Sec 3: Data Processing in MATLAB ==== | ||
Line 299: | Line 305: | ||
\\ | \\ | ||
\\ | \\ | ||
- | ==== Sec 5: MATLAB Program ==== | + | ==== Sec 4: MATLAB Program ==== |
+ | Please download the data and the filtering program for node " | ||
+ | \\ | ||
+ | Please download the data and the filtering program for node " | ||
+ | \\ | ||
First, I need to read data from a .csv file and store it in MATLAB. | First, I need to read data from a .csv file and store it in MATLAB. | ||
M = csvread(' | M = csvread(' | ||
Line 364: | Line 374: | ||
\\ | \\ | ||
\\ | \\ | ||
- | ==== Sec 4: Results from MATLAB | + | ==== Sec 5: Filtered Data ==== |
- | + | The resultant filtered | |
- | + | ||
- | ** For Node a1 ** | + | |
- | {{ : | + | |
- | \\ | + | |
- | {{ : | + | |
- | \\ | + | |
- | {{ : | + | |
- | \\ | + | |
- | {{ : | + | |
- | \\ | + | |
- | {{ : | + | |
- | \\ | + | |
- | \\ | + | |
- | ** For Node b1 ** | + | |
- | \\ | + | |
- | {{ : | + | |
- | \\ | + | |
- | {{ : | + | |
- | \\ | + | |
- | {{ : | + | |
- | \\ | + | |
- | {{ : | + | |
- | \\ | + | |
- | {{ : | + | |
- | \\ | + | |
- | \\ | + | |
- | \\ | + | |
- | \\ | + | |
- | ** Causes for Error ** | + | |
- | \\ | + | |
- | Hardware wise, the errors are caused by the oscillation of the sensors when the 4 bar linkage is moving to obtain data. The frictions in the pins will also prevent the experimental results to deviate from the theoretical results from MATLAB, where MATLAB is based purely on kinematics (which doesn' | + | |
- | Software wise, the errors are from the error propagation in rounding and smoothing of the data from the sensor. The sensor themselves have a lot of noise (especially accelerometer) and the gyroscope sensor is known to drift. Although all of these problems was corrected to a certain extend in the MATLAB | + | |
\\ | \\ | ||
\\ | \\ | ||
\\ | \\ | ||
\\ | \\ | ||
+ | |||
===== Final Words ===== | ===== Final Words ===== | ||
4bar.1501898559.txt.gz · Last modified: 2017/08/04 19:02 by rebeccacao