CS代写 Systems Modelling and Analysis 􏱇 Assignment 2

Systems Modelling and Analysis 􏱇 Assignment 2
Due: 06/05/2022 by 11:00:00 pm. To be submitted individually using the online multiple choice/􏱈ll-in-the- blank system on Canvas.
Input Format:
Do not add + in front of positive numbers, e.g. 0.1 should be used not +0.1. If the answer is negative then

Copyright By PowCoder代写 加微信 powcoder

use − in front, e.g., −0.1 is 􏱈ne.
Add a zero before decimals, e.g., 0.1 should be used not .1
Do not use scienti􏱈c notation, e.g., 12400 should be used not 1.24e4.
Do not add units, e.g., 0.1 should be used not 0.1m.
If you do not follow these input format the answers will be marked wrong.
Assignment Background
This assignment is a continuation of Part 1 in Assignment 1. No material from Assignment 1 is required to complete this assignment.
The parameter values of the system are shown in Figure 1. Note: some parameters are di􏱋erent from assignment 1, so use the values in Figure 1 to 􏱈nish this assignment.
Figure 1: Numerical Values of Positioning System Pa- rameters
The equations of motion for the dartboard positioning system are:
J1θ ̈1 +cθ ̇1 +3kr2θ1 −kr2θ2 −2kry−ktia =0 J 2 θ ̈ 2 + c θ ̇ 2 + 3 k r 2 θ 2 − k r 2 θ 1 − 2 k r y = 0 my ̈+cpy ̇+4ky−2krθ1 −2krθ2 =0
Assume zero initial conditions when required.
L d i + R i + k θ ̇ = v a dt a a a e 1

Part 1: Dartboard Positioning System, Transfer Functions
Q1-2. V (s) = L {v(t)} is the voltage supplied to the DC motor, Y (s) = L {y(t)} is the position of the
dartboard in y-direction and Ia(s) = L{ia(t)} is the armature current. Using the equations of motion above, Y (s)
􏱈nd the transfer function V (s) . The transfer function is of the form:
Y(s) = bmsm +bm−1sm−1 +···+b1s+b0
V(s) sn +an−1sn−1 +···+a1s+a0 Find the numerical value of (Q1) a1 and (Q2) b1.
[Canvas Input: Two signed numbers – 5% tolerance allowed]
Q3. We will now focus on the circuit dynamics. Given that the transfer function GOL(s) = Ia(s) is V (s)
Ia(s) = 0.02s5 + 2.252s4 + 50.979s3 + 228.861s2 + 978.489s + 1982.984
V (s) s5 + 121.470s4 + 3312.635s3 + 13261.460s2 + 61419.683s + 115403.175
Find the order of the dynamics of the transfer function GOL(s). [Canvas Input: One integer]
Q4-5. Simulate the response of the system GOL(s) for a unit step input v = 1(t) for 12 seconds. Find the value of ia(t) when t is (Q4) 0 s and (Q5) 12 s.
[Canvas Input: Two signed numbers – 5% tolerance allowed] Note: Unit step input means v(0) = 1
Q6-7. Determine the poles of GOL(s) = Ia(s). For any complex poles p, 􏱈nd the numerical value of V (s)
(Q6) Re(p) and (Q7) |p|.
[Canvas Input: 2 signed numbers – 5% tolerance allowed]
Q8. Determine the stability of GOL(s) = Ia(s). Select the appropriate descipriton of its behaviour. V (s)
[Canvas Input: a multiple dropdown question]
Part 2: Dartboard Positioning System, Closed-Loop Control
We would like to be able to set the behaviour of ia(t) using a reference signal r(t), so we will implement
closed-loop control. After purchasing a current sensor, ia(t) can be measured quite accurately in real time.
We will use a controller C(s) = K such that the voltage supplied to the motor is V (s) = K (R(s)−Ia(s)), s−5 (s−5)
where R(s) is the Laplace transform of r(t). A block diagram for the new model is shown in Figure 2.
Figure 2: Block diagram for Part 2

Q9. Find the order of the closed-loop system. [Canvas Input: One integer]
Q10-15. For each of the controller gains: K = 500, 1000, 2000, 3000, 4000, 􏱈nd the poles and the zeros of
the closed-loop transfer function GCL(s) = Ia(s). R(s)
Ordering the poles as Re(p1) ≤ Re(p2) ≤ . . . and zeros as Re(z1) ≤ Re(z2) ≤ . . . (Q10-12) Find Re(p3 ) for K = 500, 2000, 4000. [Canvas Input: Three signed
(Q13-15) Find Re(z3 ) for K = 1000, 2000, 3000. [Canvas Input: Three signed allowed]
Q16. You are now given a speci􏱈c value of the controller gain K. Perform a partial fraction expansion and match the coe􏱌cients to their corresponding poles
The partial fraction expansion is of the form
G C L ( s ) = 􏱍n k i i=1 s−pi
where ki,pi can be either complex numbers or real numbers.
Match the real part of the coe􏱌cient (i.e. Re(k)) to the corresponding real part of the pole
(i.e. Re(p)). [Canvas Input: Matching]
Note: Due to numerical error, if your poles/zeros do not exactly match the given options, choose the closest
Example: if GCL(s) = 7 + 9 + 12+22j + 12−22j then the correct answer is:
s+1 s+10 s+45+j s+45−j 􏰀 Re(p) = −1 pairs to Re(k) = 7.
􏰀 Re(p) = −10 pairs to Re(k) = 9. 􏰀 Re(p) = −45 pairs to Re(k) = 12
Q17. For your given speci􏱈c value of K, select the behaviour that describes the dynamics of the closed loop system GCL(s) = Ia(s) . [Canvas Input: a multiple dropdown question]
Q18-22. Simulate the behaviour of the system. Set the reference to be r(t) = 1(t) [m] (unit step). Plot ia(t)
and r(t) on the same axes for 10 seconds for each of the following controller gains K = 500, 1000, 2000, 3000, 4000. Find the value of (ia(t) − r(t)) when t is 10 s for K = 500, 1000, 2000, 3000, 4000. [Canvas Input: Six
signed numbers – 5% tolerance allowed]
Part 3: Dartboard Positioning System, Second-Order Approxima- tion
After analysing the armature current ia, we now analyse the back emf voltage ve. The back emf voltage is given by ve = keθ ̇1, and therefore the transfer function is
G(s) = Ve(s) = kesθ1(s) = 8.889s4 + 763.683s3 + 1818.413s2 + 12495.238s + 16253.968 . V (s) V (s) s5 + 121.470s4 + 3312.635s3 + 13261.460s2 + 61419.683s + 115403.175
We have spent a lot of time analysing the high-order system for the armature current ia, and would like to avoid going through this process again for the back emf voltage. Instead, a second-order system can be used
to approximate the transfer function V (s) . Let the approximated second-order transfer function be
G ̃ ( s ) = V ̃ e ( s ) = K ω n2
V(s) s2 +2ζωns+ωn2

Q23. Before approximating the transfer function, investigate how the parameters (K,ωn,ζ) a􏱋ect the maximum value of the step response of the second order system. You will be given a set of values for (K,ωn,ζ). For a unit step input, 􏱈nd the maximum value of v ̃e(t).
[Canvas Input: One signed numbers – 5% tolerance allowed]
Q24-26. Using dominant poles, 􏱈nd the approximated system’s tranfer function G􏱎(s). G􏱎(s) is of the form
V ̃ e ( s ) K ω n2
G􏱎 ( s ) = V ( s ) = s 2 + 2 ζ ω n s + ω n2 .
Find the numerical value of (Q24) K, (Q25) ωn and (Q26) ζ. [Canvas Input: Three signed numbers – 5% tolerance allowed]
Hint: For v􏱎e(t) (approximate system) and ve(t) (real system), we would like limt→∞ v􏱎e(t) − ve(t) = 0 where v(t) = 1(t) (i.e. a unit step input).
Q27-28. Compare the step response of G􏱎(s) with output v􏱎e(t) to the step response of G(s) = Ve(s) with V (s)
output ve(t) on the same axes.
Find the value of v􏱎e(t) − ve(t) when t is (Q27) 0.7 s and (Q28) 6 s. [Canvas Input: Two signed
numbers – 5% tolerance allowed]
To improve the accuracy of the approximated response, now include the zero with the largest real part. The new open-loop transfer function is
G􏱎 ( s ) = V ̃ e ( s ) = b 1 s + b 0 . V(s) s2 +a1s+a0
Construct a Simulink model (with v as input and ve as output). Only use gain, di􏱋erentiator and integrator blocks, in addition to summations. Use a step signal as an input if you wish to test your model.
Q29. Complete the block diagram diagram below corresponding to G􏱎(s) by matching the correct value in Figure 3 to terms (a),(b),(c),(d),(e),(f) and (g). [Canvas Input: 7 integers]
Hint: s cannot be placed at (e).
1. 0 2. s 3. s2 4. s3
5. 1s 9. −1 13. −a1 6. 1 10. a 14. b
s2 0 0 7. 1 11. −a 15. −b
s3 0 0 8. 1 12. a1 16. b1
Figure 3: Selection options for Q29

Part 4: Pendulum, Open- and Closed-Loop System Identi􏱈cation
Upload your answer to Part 4 in the Gradescope Assignment.
Each student will create their own pendulum out of items they choose. For this experiment, you will need:
1. A string or rod of length 20cm to 60cm.
2. A solid coloured mass to 􏱈x on the end of the string/rod. For this assignment we will assume the mass is blue, although any uniform colour will be su􏱌cient. If you are using a string, be sure the mass is heavy enough to keep the string taut. The mass and string/rod will be used to form the pendulum.
3. A di􏱋erent solid coloured label or object to place on the other end of the string/rod. For this assignment we will assume the mass is red, although any uniform colour di􏱋erent from the pendulum mass will be su􏱌cient.
4. A recording device (e.g. phone, computer).
You will record two videos. Figure 4 shows the layout of the pendulum required in the videos. The red object marks the top of the pendulum, where you will apply various inputs along the x-direction. The blue object marks the bottom of the pendulum, which will swing in response to the inputs. To help with colour identi􏱈cation, please adhere to the following guidelines:
􏰀 Keep the background of the video simple, a solid neutral colour (like white) if possible.
􏰀 The blue and red markers should be solid, uniform, vibrant colours. Avoid complex patterns that include multiple colours.
􏰀 If object detection is not working, try increasing the area of the markers.
􏰀 If colour tracking is taking more than a few minutes, try reducing the resolution of your video.
􏰀 The videos should include only the experiments speci􏱈ed in the descriptions below. Crop any other recorded material, including walking to and from the camera.
􏰀 Keep the markers in frame throughout the video.
Figure 4: Pendulum Colour Layout
Video 1, Open Loop Step Response: Hold the top of the pendulum. Be sure not to obscure the red and blue markers. Begin with the pendulum at rest. Apply a horizontal step input (roughly 20-30cm) in the x-direction and let the pendulum come to rest.

Q30. Upload Video 1, Open Loop Step Response. (1 mark) [Canvas Input: File Upload]
Two MATLAB functions are provided in the Assignment brief: ColourTracking() and SystemID().
[t, x, px, dt]=ColourTracking(vidObj)
vidObj: video object, returned from VideoReader(filename).
x: a vector of the x-positions of the red marker, at times de􏱈ned in t. px: a vector of the x-positions of the blue marker, at times de􏱈ned in t. dt: the size of time steps in t, or sampling period.
When running ColourTracking(), a window will appear with one frame from your video displayed. When prompted to click on your control, click the red marker at the top of the pendulum. For the plant, click the blue marker at the bottom of the pendulum. The objects detected based on your selections will then appear, an example shown below. If you are not happy with the detection, please try clicking at a di􏱋erent location on the markers, or re-recording the video with special consideration for the guidelines listed above.
When processing you may also see a warning ‘No blob detected’, which is raised if no objects are detected in a single video frame. If this occurs for many frames, please re-record your video with special consideration for the guidelines listed above.
[sys] = SystemID(dt, u, y, modelFlag) u: a vector of sampled input data.
y: a vector of sampled output data.
dt: the sampling period of the data.
sys: the estimated continuous time transfer function
modelFlag: Indicates which transfer function to estimate: 0 for 􏱈tting GOL(s) , 1 for 􏱈tting C(s).
Another in-built MATLAB function that you will 􏱈nd useful is compare(data, sys). This function takes
measured data and a model sys, and plots both the output data and the response of sys to the input data. It also reports a measure of 􏱈t as a percentage between the response and the data, displayed in the legend. For this assignment, data will be an iddata object, including input, output and sampling time, and sys will be a continuous time transfer function. For more detail, see the MATLAB documentation.
As an example, the following lines will process a video 􏱉kickball.mov􏱊, estimate a transfer function kickball_sys that maps from movement of a red marker to movement of a blue marker, and then compare the measured data and output from the estimated transfer function to assess the quality of the estimation.
>􏱏> vidObj = VideoReader(􏱉kickball.mov􏱊);
>􏱏> [t, red, blue, dt]=ColourTracking(vidObj); >􏱏> [kickball_sys] = SystemID(dt, red, blue, 0); >􏱏> data = iddata(blue’,red’,dt);
>􏱏> figure()
>􏱏> compare(data,kickball_sys)
, mapping the input data to the output data.

Q31. Use ColourTracking() and SystemID() with modelFlag=0 to 􏱈nd the open loop transfer function
GOL(s) = X(s) relating the movement of the top of the pendulum to the movement of the bottom of the
pendulum. Use the compare() function to compare the output of GOL(s) and the measured output data, you will submit the resulting 􏱈gure in Q43. What is the order of the open loop system GOL(s)? [Canvas Input: 1 integer]
Q32. What is the real part of the dominant pole of the system GOL(s)? [Canvas Input: One signed number]
Video 2, Closed Loop Response: Hold the top of the pendulum. Be sure not to obscure the red and blue markers. Begin with the pendulum at rest, this initial location of the bottom of the pendulum is px(0). Pick a location pxfinal roughly 20cm away from px(0) in the positive x-direction. You may 􏱈nd it helpful to mark this position with another object. Your goal this time is to apply an input x(t) such that the bottom of the pendulum px(t) comes to rest at pxfinal, in the shortest time possible. The input x(t) will come to rest at a location xfinal.
Q33. Upload Video 2, Closed Loop Response. (1 mark) [Canvas Input: File Upload]
Consider how you process information to achieve the goal in video 2. You measure the position of the bottom of the pendulum px with your eyes, and decide what signal to input into the open-loop system based on the di􏱋erence between the measured px(t) and the desired position. This is a real example of a negative feedback loop, shown in Figure 5, where you form the controller C(s).
Figure 5: Block Diagram for Part 4
Q34. What is the input to the controller C(s) in the closed-loop system? Choose from the options in Figure 6. [Canvas Input:1 integer]
Q35. What is the output from the controller C(s) in the closed-loop system? Choose from the options in Figure 6. [Canvas Input:1 integer]
1. 0 3. x 5. pxref −px 7. x−px 9. x−pxref 2. pxref 4. px 6. px −pxref 8. px −x 10. pxref −x
Figure 6: Selection options for Q34-Q35
Q36. What is the reference signal pxref (t) for the scenario in Video 2? [Canvas Input: 1 integer] 1. 0 2. 1(t) 3. pxfinal1(t) 4. δ(t) 5. xfinal1(t)
Figure 7: Selection options for Q36
Q37. Use ColourTracking() and SystemID() with modelFlag=1 to 􏱈nd the controller transfer function C(s). Use the compare() function to compare the output of C(s) and the measured output data, you will submit the resulting 􏱈gure in Q43. What is the order of the controller C(s)? [Canvas Input: 1 integer]

Q38. Simplify the block diagram in Figure 5 to 􏱈nd the closed-loop transfer function GCL(s) =
Px (s) Pxref (s)
Q39. Using your speci􏱈c GOL(s) and C(s) from Q31 and Q37, respectively, 􏱈nd GCL(s). Use the compare() function to compare the output of GCL(s) and the measured output data, you will submit the resulting 􏱈gure in Q43. What is the order of the closed-loop transfer function GCL(s)?
Q40. What is the real part of the dominant pole of the closed-loop system GCL(s)? [Canvas Input: One signed number]
Q41. How do the poles of the open loop transfer function compare to the poles of the closed loop transfer function? What does this tell you about the relative speed of the response for the two systems? (2 marks) [Canvas Input: Text]
Q42. Upload your MATLAB script for Part 4. Your script should print GOL(s), C(s), and GCL(s). (2 marks) [Canvas Input: File Upload]
Q43. Upload one pdf including the comparison Figures from Q31, Q37 and Q39. (3 marks) [Canvas Input: File Upload]
Q44. Upload a jpeg image of your pendulum. (1 mark) [Canvas Input: File Upload]
. [Canvas Input: Multiple Choice]

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com