### Create a StudySoup account

#### Be part of our community, it's free to join!

Already have a StudySoup account? Login here

# Dynamics of Mechanical Systems MAE 321

Syracuse

GPA 3.51

### View Full Document

## 95

## 0

## Popular in Course

## Popular in Engineering Mechanical & Aero

This 42 page Class Notes was uploaded by Vinnie Hansen V on Wednesday October 21, 2015. The Class Notes belongs to MAE 321 at Syracuse University taught by Staff in Fall. Since its upload, it has received 95 views. For similar materials see /class/225610/mae-321-syracuse-university in Engineering Mechanical & Aero at Syracuse University.

## Popular in Engineering Mechanical & Aero

## Reviews for Dynamics of Mechanical Systems

### What is Karma?

#### Karma is the currency of StudySoup.

#### You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 10/21/15

Matlab Review r 5 m A S jagW w 2 uquot 4 v P f r 9 4 z n 7 3 wry w 2 8 H m u H M Linear System Numerically integrate and plot the response of an underdamped system determined by m 100 kg k 1000 Nm and c 20 kgs subject to the initial conditions of X0 0 and v0 0 and the applied force Ft 306D t 1 Then plot the exact response Compare the plot of the exact solution to the numerical simulation Governing Equation mj at kx 30ltIgtt 1 x0 0 120 O Exact Solution F F xz J e w gtcoswdt t0 9 tzto 315 k Ian 2 6Vtan391 g 316 1 52 State Space Form De ne X1t x2t x40 x40 5oy m U D m m The matrix form 20 AM in where Numerical integration Euler method RungeKutta quotOd 23quot quot01945quot Euler Method in Am 1 Wm Wi Axti fUi At xti1 xti HQAZL ftiAt Coding step Clear memory De ne variables Calculate the solution Plot clearall close all clc nput m100 k1000 c20 wnsqrtkm zetac2sqrtkm wdwnsqrtl zetaquot2 he thetaatanzetasqrtl zetaA2 dt0001 ts20 A0l km cm fzeros2l xzeros2tsdtl Numerical for illtsdt f2l30stepfundti llm xilxiAxidtfldt End Calculatlon Analytica t0dtts xa30stepfuntlk 30stepfuntlexp zetawnt lcoswdt l thetaksqrtl zetaA2 Plot P0ttXl39r39 hold on plottxa xabe39times39 Plot ylabel39Displacementm39 title39Reviewl39 legend39Numerical solution3939Analytica solution39 D39s plammen m 006 005 004 003 002 Review Numerical solution Analytical solution 10 15 time3 RungeKutta Method quotode23quot or quotode45quot functions in Matlab More sophisticated than Euler Method Better choice for nonlinear system How to use ode functions in Matlab Syntax TY solverodefuntspany0 Solverode23 or ode45 This code with tspant0 tf integrates the system of differential equations x Ftx from time to to tf with initial conditions yO quotodefunquot is the function ftx How to use ode functions in Matlab Recall the matrix form of state space equa ons fem A270 fa Ftxodefun Step Create a function M le which de nes Ftx De ne time span and initial conditions Solve the problem Code Part 1 Function M le function frhstx m100 k1000 c20 t01 fx2kmx1 cmx230stepfunttOm Part 2 Main code clear all close all clc initial conditions and time span X0zeros21 ts0 20 solve txode4539rhs39tsx0 plottx1 x become a twocolumn matrix the rst column is displacementx1 the second column is velocityx2 dis plmmen m DU1 Linear problem Euler Analytich solution Rungekutta WV 1D time3 Nonlinear System Compute the response of the system in Figure 326p250 for the case that the damping is linear viscous and the spring is a nonlinear soft spring of the form kx kx k1x3 and the system is subject to a excitation of the form t1 15 and t2 2 Ft 1500CIgtt t1 CIgtt t2N and initial conditions of x0 001 m and v0 10 ms The system has a mass of 100 kg a damping coef cient of 30 kgs and a linear stiffness coef cient of 2000 Nm The value of k1 is taken to be 300 Nm3 Compute the solution and compare it to the linear solutionk1 0 Which system has the largest magnitude Governing Equation m at kx k1x3 1500ltIt t1ltDll2 x0001m v0 10ms State Space Form x1 x2 W iw lx10 x13t 1500M t1 ltIgtltt 5 m m m m Numerical Solution Euler method is not preferred in this case because the system is nonlinear RungeKutta Method Code Part 1 Function M le for Nonlinear case function fntx c30 m100 k2000 k1300 t115 t22 fx2cmx2kmx1k1mx1quot31500mstepfuntt1stepfuntt2 Part 2 Function M le for Linear casek10 0 function ftixi c30 m100 k2000 k10 t115 t22 fxi2cmxi2kmxi1k1mxi1A31500mstepfuntit1stepfuntit2 Part 3 Main code and plot clear all close all clc initial conditions and time span ts0 20 XO0011 solve txode4539nl39tsx0 tixiode4539l39tsx0 plottx1 hold on plottixi139r39 xlabel39times39 ylabel39Displacementm39 title39RungeKutta Method39 legend39Nonlinear3939Linear39 Dis planemen m D I D U1 1S RungeKuttaMethod I Noninear Linear I 1 U tim e3 I 12 Matlab General Info Ther mim and nfdovv isjwh eir e you type in Mom and whi enei 3M atlaib posits 39sbl u t39yio n s gunLes s tell if do caithe i rvwisey Th e39 qummand39 isto my lists all quotcommand xtypejd in tonthe i Gem m a n d windibwfin case yo u wa nt toaccess39fh m agam Note PIE ViTQu 39n1b1ererun39 by h ift iihgifh erup a39rrgw af ou le iGKLng iQFJ thisii V Trhje WQ39rEKSpaCie lisxts an variables yo uhave are d 39 Maitlam iaisine Jl as giving the n u mbero f byfesiiand tyfp g Another method iOT39TVi Wihfg c1u r r fmit39va ri ablies i st fo Etype re th39e eiomm a39md 39 wh d z in h e3 gamma n d Wi hfd ow M tlab R39Ievi ew pi For Help If you need additional help in Matlab at any time you can either click on the question mark at the top of the program or type xhelp function Where function can be whatever function Matlab has a help file for For example help plot Gives you info on how to use the plot function as well as making it look they way you want it to WNWD Basic Commands To set aliefte rto anumbervuseanequal siiign such as gtgtA 395 This will not only set A equal to the number 5 but will aIs wriiite it out for y1cgtiu lff39YQUrdo not gaveto 5er the output Ofa somzmiandrzr put a semicolcjm after it Matl bReyieV w P m j 39 r Gleam all in This usefullf yen items What me amusing W1quot Inserting comments You may dimesquotwant to use comments in yidurcofdevto remind yciu rS eilf Dr others what YOU Where tryin g fogdo This is done W ifh a39 For example A is the sampling fre111en3r M atiaiz R39eilileiiv pl Using the anion aperator You can create a single row or for that matter a single column using the ooinn operator For example if yOu wanted to mate a single row matrix with live numbers in it y0u could use the mmnd 115 Which would giva you the output 1 2 3 4 5 Notice that it automaticain goes by Integers if you wanted it to go from one to ve by 02 incramm you cauld Lisa the command 1 3125 Which would give the output 1121416182 etc and on till 5 if you wanted to set this equal to a variable such as A you would then ha able to access any number of the sequence you wanted using the commands aA1 1025 DBA3 Which would set your new vanable B to the third Instance of the row vector A giving an output of 814 mumw Creating a Thmmmnymysbmhnm m Hmmmmw LTuclulIamuoflllmmzmtndmm W41 albmummmuuwmmm wmsimn uolm mmhuofwhmm amenablmmafmm mmtmmum mmmmm Tomamkafmdamwmmmm s GO39mndmun39bordmnunb olwhmmi W mmm lhndhm plybummhhmmu dwmmwdm mmmmikbmwnunmnthMMWmeummW Mursz I 2 34 Mai Tammmw 11 ka EAWM mar1 341 A 12 134 w 13 24 Loading les There ans M0 main ways to laad files into Malian 1 Using the load mmand For example xload datum will load a file labeled datalm mm the workspace To use this maimed the le must Hither be in the currentdirectory listed atihe top ofthe program oryau canadd the path ofthe file sothat Mailab knows where to look for it This mc on is xAddmeD39 Using tha localiun of yam le in place of D 2 Using the Import Wizard found under FileImport Data This method allows you to see what itls you are importing The variable created in Ma ab will be cfthe same size as the original text or dat le so if you started wilh two columns in tha text file you would and up with a matrix of two columns in Mallabl WNWIii Plotting mawmwmmdmmuwmwpummmhmmmm mmmmmmmmvmmum MMmdyMMWWM mmmmmmmmmmm Exam HmMMdeMWmdmm mmmmmuwummmuxmm mnaszuanzuaaur rm WWMbaWMMIh lth IV Plotting Hyaumnthpbtvammnma mmuummx axis munmummmlmmuu Example 3N13527437421683141 titan121415182 2224261833231353 4m waxy Nob Traxamym mummbdmtrnmbnmbc Madawmgmwum caulk m mv 313 ElliIL If rsliuliu isliluli M I it aggfg au ill u 4 all 18 gina rials9 853 i5 In ltaiaitiiiIlui gnuo e jntlilt li uE ggggi quot 55 M les It is often easier to mate an external le wim the mode you want to run in it Instead of typing it into the cummand window quotyour code is long or if you want to be able in edit it easily you can create an m file calla this because les of this type have an m at the end MyCode m mat can be run in its entirety To mate an m la use File New M le which opens up anomer Mndow In this MMaw you can insert your code then saw it tn any location you want al anugh it is awaken tn save it into your current directory If saved in the current directory you can run all code In the m file by typing the name in the command window so if your le is named MyCodem you can run it Using pMyCode Anamer way in run your m le is to use the runquot loan atthe top of your mma panel luluam For loops You can create a loop in your program allowing you to run your code a speci ed number of times for a range of values using loops For axampla you can create an m la with the oode m5 n for I 1m forj 1n HliJ 1fill and and ThisoodewlllcraateaSby 7 matriXll wilhvalues depending on the mc on 11M Here I used two for loops toge mer although you can havoas many orasfowasyouwam Side note you can plot a matrix such as this to see the values using I39ve surf command as usuerH WNWI

### BOOM! Enjoy Your Free Notes!

We've added these Notes to your profile, click here to view them now.

### You're already Subscribed!

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

## Why people love StudySoup

#### "There's no way I would have passed my Organic Chemistry class this semester without the notes and study guides I got from StudySoup."

#### "I signed up to be an Elite Notetaker with 2 of my sorority sisters this semester. We just posted our notes weekly and were each making over $600 per month. I LOVE StudySoup!"

#### "There's no way I would have passed my Organic Chemistry class this semester without the notes and study guides I got from StudySoup."

#### "It's a great way for students to improve their educational experience and it seemed like a product that everybody wants, so all the people participating are winning."

### Refund Policy

#### STUDYSOUP CANCELLATION POLICY

All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email support@studysoup.com

#### STUDYSOUP REFUND POLICY

StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here: support@studysoup.com

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to support@studysoup.com

Satisfaction Guarantee: If you’re not satisfied with your subscription, you can contact us for further help. Contact must be made within 3 business days of your subscription purchase and your refund request will be subject for review.

Please Note: Refunds can never be provided more than 30 days after the initial purchase date regardless of your activity on the site.