MM401 Lecture Slides (Set 1) Assignment 2 Two Parts 1. 2DOF mass-spring-damper system. Forced vibration. Phasor analysis using Excel 2. Modelling of DC electric motor using Simulink and Matlab....

1 answer below »
matlab assignment


MM401 Lecture Slides (Set 1) Assignment 2 Two Parts 1. 2DOF mass-spring-damper system. Forced vibration. Phasor analysis using Excel 2. Modelling of DC electric motor using Simulink and Matlab. Submission • Submit Simulink model and Matlab code (together in a zipped folder). • Submit Excel workbook. • Submit report as PDF file. Part 1 • Forced analysis of 2DOF system with • Two input sinusoidal forces with same frequencies but different phases • Damping • Modify Phasor Analysis workbook to analyse system. Part 1 Diagram shows system, where ?1 = 1 kN/m ?1 = 200 kg/s ?2 = 2 kN/m f1(t) Part 1 ? ?2 = 50 kg/s ?1 = 55 kg ?2 = 10 kg ?1= 4 sin(?? + 60°) N ?2 ? = 2sin ?? − 155° N • Adapt Phasor Analysis workbook (checking it carefully first) to: • Allow all model parameters to be entered and changed m 2 m 1 k 2 k 1 c 2 f 2 ( t ) c 1 Part 1 • For the parameters given, calculate and plot amplitudes and phases of the displacements of both masses against ? showing the frequency response clearly • For the parameters given, calculate and plot the amplitude of the force in spring ?2 against ?. Be careful! • Label all plots and include units. • In report: Part 1 • Draw FBDs • Write equations of motion • For specified parameter values, give mass, damping, and stiffness matrices (i.e. with numbers) • Specify clearly how you calculated the amplitude of the force in the spring. • Include plots Part 1 • In report: • You will analyse the difference the phasor analysis makes to the results. To do that, include equivalent plots for the situation where the two forces are in antiphase (i.e. where one force amplitude is negative), and where damping is zero. That system could be analysed without using phasor analysis. Compare the two sets of results. • From the results, discuss the conditions under which a phasor analysis of the system is required for accurate results (in a situation where you’re just looking for rough Part 1 estimates of the vibration amplitudes and the maximum spring force). Part 2 • Small brushed DC electric motor: • One current through rotating armature, ??, and one through stator coil, ?? Part 2 ?? = ?? Part 2 ?? = ??? where ? = ?? ?? . The value of ? depends on the coil dimensions. ? ?? is the magnetic flux. Motor properties: Part 2 ?? = 40Ω ?? = 5mH ? = 24gcm2 ? = 1× 10−6 Nms/rad Assume that ?? = 24 V giving ? = 0.058 N ∙ m/A. • Create state-variable Simulink model for the system Part 2 • The load torque is ?|?|?, where, for initial tests, ? = 1 × 10−6 N ∙ m ∙ s2. • For all tests, start model with system turned on at ? = 0, and run for 200 s • You will vary the motor speed in two ways: • By setting ?? equal to a constant value between 0 an 24V • Using Pulse Width Modulation (PWM). Part 2 • Use Pulse Generator block for PWM, with frequency of 490Hz (as supplied by Arduino) and amplitude of 24 V. Vary the pulse width from 0% to 100% • Measure the motor speed over time, and find the steady-state speed • Measure total heat generated in armature coil (i.e. 0200׬??2????). Part 2 • Test 1: • Use Matlab code to run model with constant armature voltage, and plot both steady-state speed and total heat generated against ?? for ?? from 0 to 24 V • Also, plot ?? and ? against ? for ?? = 12V and ?? = 24V (don’t need to do that with same code). Part 2 • Test 2: • Use Matlab code to run model with PWM, and plot both steady-state speed and total heat generated against pulse width for pulse width from 0 to 100% • Also, plot ?? and ? against ? for pulse width equalling 50% and equalling 100% (don’t need to do that with same code). Part 2 • Test 3: • Create a linearized incremental version of the model with constant ??, with the operating point at the steady-state speed • Plot ?? and ? against ? for ?? = 12V and ?? = 24V (don’t need to do that with same code). • Test 4: Part 2 • Change the nonlinear model with constant ?? by adding a PID controller block (with default settings) to control speed. Set desired ? to 100 rad/s. Note that ?? must be between 0 and 24V (you can use a Saturation block) • Plot ??, ?? and ? against ?. • Test 5: Part 2 • Change model so desired ? is reduced to 10 rad/s, and so that load changes over time with ? ? = 1 × 10−4 1 + sin ? N ∙ m ∙ s2 • Plot ??, ?? and ? against ?. • Your report should contain: • Images of the Simulink models and any Matlab code used Part 2 • The state variable equations for both the linearized and nonlinear models, and the derivation of formulas for the operating point parameters • Details of the time-stepping methods used and justification • A discussion of time stepping for the different tests • The requested results, with all plots properly labelled • A discussion of the results from the tests. Submission – Submit report as a PDF file. – Submit your Excel workbook
Answered Same DayMar 27, 2021

Answer To: MM401 Lecture Slides (Set 1) Assignment 2 Two Parts 1. 2DOF mass-spring-damper system. Forced...

Nihal answered on Apr 15 2021
162 Votes
dcmotor.slx
metadata/coreProperties.xml
model 2019-03-31T08:31:33Z HP HP 2019-03-31T09:15:06Z 1.2 R2016a
metadata/mwcoreProperties.xml
application/vnd.mathworks.simulink.model Simulink Model R2016a
metadata/mwcorePropertiesExtension.xml
9.0.0.339986
metadata/thumbnail.png
simulink/blockdiagram.xml


1
windows-1252
0.035000
on
off
UseLocalSettings
AllNumericTypes
UseLocalSettings
Overwrite
Run 1
120
PhysicalModelingChecksum;PhysicalModelingParameterChecksum;PhysicalModelingProducts
win64


1
[-7.0, -7.0, 1550.0, 848.0]

0
Left
50
50
8


0


1
SimulinkTopLevel
0
[1879.0, 888.0]
1.0
[346.78749963641167, -20.012502372264862]




716550663
3643968524
Simscape


UpdateHistoryNever
%
%
475942480
1.%


off
off
disabled
off
off
off
on
off
off
off
off
on
off
off
on
on
on
off
off
off
on
on
on
off
off
off
on
on
off
off
off


normal
5
1
10
10
0
none
off
MATLABWorkspace
accel.tlc
accel_default_tmf
make_rtw
off

dcmotor
0U

dcmotor


[]




off
on
manual
normal
1
any
1000
auto
0
0
rising
0
off
off
off
off
off
on
off
on
on


off
off



Ensure deterministic transfer (maximum delay)
Ensure data integrity only
Ensure deterministic transfer (minimum delay)
None
0

off


landscape
auto
usletter
inches
[0.500000, 0.500000, 0.500000, 0.500000]
1
off
off
200
white


black
white
off
normal
Arial
10
normal
normal
on
0
off


center
middle
black
white
off
Arial
10
normal
normal
off


Arial
9
normal
normal


off
on

opaque
off
none
default
autoscale


on
on
off
off
off
on
on
on



Sample based
Use simulation time
1
2
1
0
1
on


Simulink.scopes.TimeScopeBlockCfg
1
off



[-7, -7, 1543, 841]
on
[0.500000, 0.500000, 0.500000, 0.500000]
100
simulink-default.rpt
19

[0, 0, 0, 0, 0, 1, 1]
[736, 335, 764, 375]
9
270
on
8007000.1
fl_lib/Electrical/Electrical Sources/DC Voltage Source
DC Voltage Source

off
foundation.electrical.sources.dc_voltage
foundation.electrical.sources.dc_voltage
foundation.electrical.sources.dc_voltage
dc_voltage
dc_voltage
1
1
V
compiletime



[0, 0, 0, 0, 0, 1]
[740, 490, 760, 510]
16
270
on
8007000.1
fl_lib/Electrical/Electrical Elements/Electrical Reference
Electrical Reference

off
foundation.electrical.elements.reference
foundation.electrical.elements.reference
foundation.electrical.elements.reference
reference
reference
1



[0, 0, 0, 0, 0, 1, 3]
[1140, 435, 1180, 475]
23
270
8007000.1
fl_lib/Mechanical/Mechanical Sensors/Ideal Rotational
Motion Sensor
Ideal Rotational
Motion Sensor

off
foundation.mechanical.sensors.angular_velocity
foundation.mechanical.sensors.angular_velocity
foundation.mechanical.sensors.angular_velocity
angular_velocity
angular_velocity
1
0
rad
compiletime



[0, 0, 0, 0, 0, 1, 1]
[800, 426, 840, 454]
15
8007000.1
fl_lib/Electrical/Electrical Elements/Inductor
Inductor

off
foundation.electrical.elements.inductor
foundation.electrical.elements.inductor
foundation.electrical.elements.inductor
inductor
inductor
1
5
mH
compiletime
0
Ohm
compiletime
1e-9
1/Ohm
compiletime
off
None
0
A
off
None
0
V
off
High
0
A



[0, 0, 0, 0, 0, 1]
[1055, 310, 1095, 350]
18
180
on
alternate
8007000.1
fl_lib/Mechanical/Rotational Elements/Inertia
Inertia

off
foundation.mechanical.rotational.inertia
foundation.mechanical.rotational.inertia
foundation.mechanical.rotational.inertia
inertia
inertia
1
24
g*cm^2
compiletime
off
High
0
rad/s
off
None
0
N*m



[0, 0, 0, 0, 0, 1]
[950, 475, 970, 495]
17
270
on
8007000.1
fl_lib/Mechanical/Rotational Elements/Mechanical
Rotational Reference
Mechanical
Rotational Reference

off
foundation.mechanical.rotational.reference
foundation.mechanical.rotational.reference
foundation.mechanical.rotational.reference
reference
reference
1



[0, 0, 0, 0, 0, 1]
[1370, 385, 1390, 405]
22
270
on
8007000.1
fl_lib/Mechanical/Translational
Elements/Mechanical
Translational
Reference
Mechanical
Translational
Reference

off
foundation.mechanical.translational.reference
foundation.mechanical.translational.reference
foundation.mechanical.translational.reference
reference
reference
1



[0, 1, 0, 0, 0, 1]
[1300, 485, 1330, 515]
6
1.1
nesl_utility/PS-Simulink
Converter
PS-Simulink
Converter

off
network_engine_domain
ps_output
input
output
off
[]
deg
off



[0, 1]
[1080, 319, 1110, 351]
25
Time based
10
5


[0, 0, 0, 0, 0, 1, 1]
[830, 266, 870, 294]
13
8007000.1
fl_lib/Electrical/Electrical Elements/Resistor
Resistor

off
foundation.electrical.elements.resistor
foundation.electrical.elements.resistor
foundation.electrical.elements.resistor
resistor
resistor
1
40
Ohm
compiletime
off
None
0
A
off
None
0
V



[0, 0, 0, 0, 0, 2, 2]
[900, 365, 980, 415]
14
270
on
8007000.1
fl_lib/Electrical/Electrical Elements/Rotational
Electromechanical
Converter
Rotational
Electromechanical
Converter

off
foundation.electrical.elements.rotational_converter
foundation.electrical.elements.rotational_converter
foundation.electrical.elements.rotational_converter
rotational_converter
rotational_converter
1
0.1
V/(rad/s)
compiletime
off
None
0
A
off
None
0
V
off
None
0
N*m
off
None
0
rad/s



[0, 0, 0, 0, 0, 1, 1]
[1081, 375, 1109, 415]
19
90
alternate
8007000.1
fl_lib/Mechanical/Rotational Elements/Rotational Damper
Rotational Damper

off
foundation.mechanical.rotational.damper
foundation.mechanical.rotational.damper
foundation.mechanical.rotational.damper
damper
damper
1
10e-6
N*m/(rad/s)
compiletime
off
None
0
rad/s
off
None
0
N*m



[1]
[1370, 484, 1400, 516]
7
Simulink.scopes.TimeScopeBlockCfg('CurrentConfiguration', extmgr.ConfigurationSet(extmgr.Configuration('Core','General UI',true),extmgr.Configuration('Core','Source UI',true),extmgr.Configuration('Sources','WiredSimulink',true),extmgr.Configuration('Visuals','Time Domain',true,'SerializedDisplays',{struct('MinYLimReal','-0.01317','MaxYLimReal','0.1185','YLabelReal','','MinYLimMag','0.00000','MaxYLimMag','0.1185','LegendVisibility','off','XGrid',true,'YGrid',true,'PlotMagPhase',false,'AxesColor',[0 0 0],'AxesTickColor',[0.686274509803922 0.686274509803922 0.686274509803922],'ColorOrder',[1 1 0.0666666666666667;0.0745098039215686 0.623529411764706 1;1 0.411764705882353 0.16078431372549;0.392156862745098 0.831372549019608 0.0745098039215686;0.717647058823529 0.274509803921569 1;0.0588235294117647 1 1;1 0.0745098039215686 0.650980392156863],'Title','%','LinePropertiesCache',{{}},'UserDefinedChannelNames',{{}},'NumLines',1,'LineNames',{{'PS-Simulink Converter'}},'ShowContent',true,'Placement',1)},'DisplayPropertyDefaults',struct('MinYLimReal','-0.01317','MaxYLimReal','0.1185','YLabelReal','','MinYLimMag','0.00000','MaxYLimMag','0.1185','LegendVisibility','off','XGrid',true,'YGrid',true,'PlotMagPhase',false,'AxesColor',[0 0 0],'AxesTickColor',[0.686274509803922 0.686274509803922 0.686274509803922],'ColorOrder',[0.0745098039215686 0.623529411764706 1;1 0.411764705882353 0.16078431372549;1 1 0.0666666666666667;0.717647058823529 0.274509803921569 1;0.392156862745098 0.831372549019608 0.0745098039215686;0.0588235294117647 1 1;1 0.0745098039215686 0.650980392156863])),extmgr.Configuration('Tools','Plot Navigation',true),extmgr.Configuration('Tools','Measurements',true,'Version','2016a')),'Version','2016a','Position',[1 31.4 1536 758.4])


[0, 0, 0, 0, 0, 0, 1]
[580, 374, 625, 406]
4
1.1
nesl_utility/Solver
Configuration
Solver
Configuration

off
network_engine_domain
solver
input
generic
off
[]
[]
off
off
off
on
off
off
0.001
1e-06
1e-09
off
off
100
off
1
off
off
1e-09
off
NE_BACKWARD_EULER_ADVANCER
0.001
off
3
2
Sparse
1024
on
0.001



[0, 0, 0, 0, 0, 1, 1]
[1295, 351, 1335, 379]
21
8007000.1
fl_lib/Mechanical/Translational
Elements/Translational Spring
Translational Spring

off
foundation.mechanical.translational.spring
foundation.mechanical.translational.spring
foundation.mechanical.translational.spring
spring
spring
1
1000
N/m
compiletime
off
None
0
m/s
off
None
0
N
off
High
0
m



[0, 0, 0, 0, 0, 1, 1]
[1185, 345, 1225, 385]
20
8007000.1
fl_lib/Mechanical/Mechanisms/Wheel and Axle
Wheel and Axle

off
foundation.mechanical.mechanisms.wheel_axle
foundation.mechanical.mechanisms.wheel_axle
foundation.mechanical.mechanisms.wheel_axle
wheel_axle
wheel_axle
1
0.05
m
compiletime
1
1
compiletime
off
None
0
N*m
off
None
0
N



1
3#out:1
4#in:1


4
7#lconn:1
[-65, 0]
6#lconn:1


5
8#lconn:1
[0, -70]
7#rconn:1


6
9#lconn:1
[-35, 0]

10#lconn:1
[0, -35]


[0, -50]

1#rconn:1
[110, 0]


6#rconn:1




8
8#rconn:1
[0, 10]
9#rconn:1


15
11#lconn:1
[0, -19]

[1095, 435; 0, 6; -135, 0]

17#rconn:1
[-12, 0; 0, 15; -38, 0]


13#rconn:1
[0, 5]



8#rconn:2



18
12#lconn:1
[-80, 0; 0, 15]

[1095, 365; -77, 0; 0, -20; -58, 0]

[1126, 365; -31, 0]

14#lconn:1
[-44, 0]


17#lconn:1
[-34, 0; 0, -125]



13#lconn:1
[0, 5]



8#lconn:2



28
15#lconn:1
14#rconn:1


29
15#rconn:1
[30, 0]
16#lconn:1


37
3#lconn:1
[-11, 0; 0, -80]
17#rconn:3



simulink/configSet0.xml




0.0
10.0
1e-3
auto
auto
-1
5
auto
10*128*eps
1000
4
1
auto
auto
1
1e-3
Auto
off
off
ode23t
ode23t
auto
DisableAll
UseLocalSettings
Nonadaptive
TrustRegion
off
off
Fast
off
off
Unconstrained
Whenever possible


1
[t, u]
xFinal
xInitial
off
1000
off
off
off
off
Dataset
Dataset
on
off
on
on
off
on
off
streamout
on
off
xout
tout
yout
logsout
dsmout
RefineOutputTimes
[]
out
1
off
out.mat
[-inf, inf]



BooleansAsBitfields
PassReuseOutputArgsAs
PassReuseOutputArgsThreshold
ZeroExternalMemoryAtStartup
ZeroInternalMemoryAtStartup
OptimizeModelRefInitCode
NoFixptDivByZeroProtection
UseSpecifiedMinMax

on
on
on
Tunable
off
off
double
off
off
on
on
off
off
on
off
on
off
uint_T
on
64
Structure reference
12
128
on
5
off
off
Native Integer
on
on
off
off
off
on
off
inf
Inherit from target
on
off
off


error
none
none
none
none
UseLocalSettings
UseLocalSettings
UseLocalSettings
warning
warning
warning
warning
on
Simplified
error
off
off
UseLocalSettings
warning
warning
none
error
warning
warning
none
warning
error
error
error
none
warning
warning
none
warning
warning
error
error
none
warning
warning
none
none
none
none
none
none
error
EnableAllAsError
none
warning
warning
warning
none
error
none
warning
warning
UseLocalSettings
on
none
error
none
none
warning
warning
warning
error
none
warning
error
warning
ErrorLevel1
WarnAndRepair
none
warning
warning
error
none
warning
warning
warning
warning
warning
warning
warning
warning
error
warning
all
warning
on


8
16
32
32
64
32
64
64
Char
Float
Zero
LittleEndian
64
on
off
Intel->x86-64 (Windows64)
8
16
32
32
64
32
64
32
Char
None
on
off
Undefined
Unspecified
32
32
32
Specified
off
on
on
on


IfOutOfDateOrStructuralChange
on
error
off
on
None
Multi
Infer from blocks in model
on
off
on
off


on
on
on
off
on
sf_incremental_build
off



IncludeHyperlinkInReport
GenerateTraceInfo
GenerateTraceReport
GenerateTraceReportSl
GenerateTraceReportSf
GenerateTraceReportEml
PortableWordSizes
GenerateWebview
GenerateCodeMetricsReport
GenerateCodeReplacementReport
GenerateMissedCodeReplacementReport
GenerateErtSFunction
CreateSILPILBlock

grt.tlc
None

off
make_rtw
on
off
grt_default_tmf


off
off
on
off
off
off
off
off
off
off
Automatically locate an installed toolchain
Faster Builds
off
off
off
None
off
executionProfile
SummaryOnly
off
off
C
off
off
off
off
off
off
off
off
off
off
off

Off
1024



IgnoreCustomStorageClasses
IgnoreTestpoints
InsertBlockDesc
InsertPolySpaceComments
SFDataObjDesc
MATLABFcnDesc
SimulinkDataObjDesc
DefineNamingRule
SignalNamingRule
ParamNamingRule
InternalIdentifier
InlinedPrmAccess
CustomSymbolStr
CustomSymbolStrGlobalVar
CustomSymbolStrType
CustomSymbolStrField
CustomSymbolStrFcn
CustomSymbolStrFcnArg
CustomSymbolStrBlkIO
CustomSymbolStrTmpVar
CustomSymbolStrMacro
CustomSymbolStrUtil
ReqsInCode

off
on
Auto
on
off
off
31
off
off
off
off
off
off
off
off
off
1
$R$N$M
$N$R$M_T
$N$M
$R$N$M$F
rt$I$N$M
rtb_$N$M
$N$M
$R$N$M
$N$C
None
None
None
off
off
on
off
off
Shortened
Literals
off
off



IncludeMdlTerminateFcn
SuppressErrorStatus
ERTCustomFileBanners
GenerateSampleERTMain
GenerateTestInterfaces
ModelStepFunctionPrototypeControlCompliant
GenerateAllocFcn
PurelyIntegerCode
SupportComplex
SupportAbsoluteTime
SupportContinuousTime
SupportNonInlinedSFcns

ansi_tfl_table_tmw.mat

NOT IN USE
C89/C90 (ANSI)
None
Auto
System defined
256
2048
on
off
off
off
on
on
on
on
on
Use local settings
on
off
off
off
Auto
off
on
rt_
on
off
Nonreusable function
on
on
off
on
on
off
Nominal
Nominal
Simulink.SoftwareTarget.GRTCustomization
off
on
off
off
off
on
on
off
off
off
off
1000000
0
ext_comm
Level1
off
off
off
off
off
Error




Simulink Coverage Configuration Component
Simulink Coverage
off
EntireSystem
on
off
/
covdata
dw
off
on
on
on
on
on
covCumulativeData
off
on
slcov_output/$ModelName$
$ModelName$_cvdata
on
off
off
on
1e-05
0.01
off
0
0


HDL Coder custom configuration component
HDL Coder



0



Name

Simscape
Full
warning
warning
all
off
off
simlog
1
on
10000


Configuration
Solver
[ 308, 112, 1228, 752 ]

simulink/configSetInfo.xml

Configuration
simulink/graphicalInterface.xml

0
0

0
0
0
0
[Content_Types].xml

_rels/.rels

simulink/_rels/blockdiagram.xml.rels

simulink/_rels/configSetInfo.xml.rels

pid.slx
[Content_Types].xml

_rels/.rels

metadata/coreProperties.xml
Model 2019-04-03T08:48:05Z HP HP 2019-04-03T08:48:25Z 1.1 R2016a
metadata/mwcoreProperties.xml
application/vnd.mathworks.simulink.model Simulink Model R2016a
metadata/mwcorePropertiesExtension.xml
9.0.0.339986
metadata/thumbnail.png
simulink/_rels/blockdiagram.xml.rels

simulink/_rels/configSetInfo.xml.rels

simulink/blockdiagram.xml


1
windows-1252
0.035000
on
off
UseLocalSettings
AllNumericTypes
UseLocalSettings
Overwrite
Run 1
120
win64


1
[-7.0, -7.0, 1550.0, 848.0]

0
Left
50
50
9


0


1
SimulinkTopLevel
0
[1879.0, 888.0]
1.0
[0.0, 0.0]




UpdateHistoryNever
%
%
476200089
1.%


off
off
disabled
off
off
off
on
off
off
off
off
on
off
off
on
on
on
off
off
off
on
on
on
off
off
off
on
on
off
off
off


normal
5
1
10
10
0
none
off
MATLABWorkspace
accel.tlc
accel_default_tmf
make_rtw
off

pid
0U

pid


[]




off
on
manual
normal
1
any
1000
auto
0
0
rising
0
off
off
off
off
off
on
off
on
on


off
off



Ensure deterministic transfer (maximum delay)
Ensure data integrity only
Ensure deterministic transfer (minimum delay)
None
0

off


landscape
auto
usletter
inches
[0.500000, 0.500000, 0.500000, 0.500000]
1
off
off
200
white


black
white
off
normal
Helvetica
10
normal
normal
on
0
off


center
middle
black
white
off
Helvetica
10
normal
normal
off


Helvetica
9
normal
normal


off
on
opaque
off
none
default
autoscale


on
on
off
off
off
on
on
on



1
on
Sample based
[]
[]
Inherit:...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here