Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

There is a file containing motor data on Blackboard called 'motordatal.csv'. The first column has time data, while the second column has angular velocity data.

image text in transcribed

There is a file containing motor data on Blackboard called 'motordatal.csv'. The first column has time data, while the second column has angular velocity data. In the exercises below, you will be using algorithms to process this data. Your algorithms need to be able to automatically work for any motor data of a similar style. An alternate piece of motor data called, motordata2.csv' has been provided, so that you can check whether your code automatically works on data for a different test. You may assume that the step size (Delta t)for the time vector is constant in your solutions (if you wish). We would like you to answer Q2-Q4 using control structures (if statements, for loops, while loops). Inbuilt functions can be used to check your answers (eg. diff for Q3 and trapz for Q4), but should not be used in the solution algorithm. Write a code that will import the data from the .csv file into MATLAB, and create an angular velocity vs. time plot. In this experiment, the data collection software is turned on before the motor is switched on. This is why the angular velocity stays at zero to begin with. Write an algorithm that will automatically cut out the data collected before the motor was turned on. It should also reset the time so that it starts at 0. Use this data when solving the remaining questions. Angular acceleration is the derivative of angular velocity with respect to time. This can be approximated with central finite differences, which states that: alpha(t) = omega (t + Delta t) - omega (t - Delta t)/2 Delta t Write a for loop that is able to approximate the angular acceleration using central finite differences. Angular position is the integral of angular velocity with respect to time. This can be approximated with the trapezoid rule, which states that: theta (t_N) = sigma_i=2^N (1/2 (omega(t_1) + omega (t_i - Delta t)) times Delta t) Write a for loop that is able to approximate the angular position using the trapezoid rule. Create a subplot that displays your angular position from Q4 as the top plot, angular velocity from Q2 as the middle plot, and angular acceleration from Q3 as the bottom plot. There is a file containing motor data on Blackboard called 'motordatal.csv'. The first column has time data, while the second column has angular velocity data. In the exercises below, you will be using algorithms to process this data. Your algorithms need to be able to automatically work for any motor data of a similar style. An alternate piece of motor data called, motordata2.csv' has been provided, so that you can check whether your code automatically works on data for a different test. You may assume that the step size (Delta t)for the time vector is constant in your solutions (if you wish). We would like you to answer Q2-Q4 using control structures (if statements, for loops, while loops). Inbuilt functions can be used to check your answers (eg. diff for Q3 and trapz for Q4), but should not be used in the solution algorithm. Write a code that will import the data from the .csv file into MATLAB, and create an angular velocity vs. time plot. In this experiment, the data collection software is turned on before the motor is switched on. This is why the angular velocity stays at zero to begin with. Write an algorithm that will automatically cut out the data collected before the motor was turned on. It should also reset the time so that it starts at 0. Use this data when solving the remaining questions. Angular acceleration is the derivative of angular velocity with respect to time. This can be approximated with central finite differences, which states that: alpha(t) = omega (t + Delta t) - omega (t - Delta t)/2 Delta t Write a for loop that is able to approximate the angular acceleration using central finite differences. Angular position is the integral of angular velocity with respect to time. This can be approximated with the trapezoid rule, which states that: theta (t_N) = sigma_i=2^N (1/2 (omega(t_1) + omega (t_i - Delta t)) times Delta t) Write a for loop that is able to approximate the angular position using the trapezoid rule. Create a subplot that displays your angular position from Q4 as the top plot, angular velocity from Q2 as the middle plot, and angular acceleration from Q3 as the bottom plot

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases And Python Programming MySQL MongoDB OOP And Tkinter

Authors: R. PANNEERSELVAM

1st Edition

9357011331, 978-9357011334

More Books

Students also viewed these Databases questions