Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

Systems Modelling and Analysis  Assignment 2

Due:  22/09/2023 by 5:00:00 pm.  To be submitted individually using the online multiple choice/fill-in-the- blank system on Canvas and Gradescope.

InputFormat  :

Do not add + in front of positive numbers, e.g. 0.1 should be used not +0.1. If the answer is negative then use − in front,e.g., −0.1 is fine.

Add a zero before decimals,e.g., 0.1 should be used not .1

Do not use scientific 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  different  from assignment 1, so use the values in Figure 1 to finish 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

J2 θ(¨)2 + cθ(˙)2 + 3kr2 θ2 − kr2 θ 1 − 2kry = 0

m¨(y) + cp ˙(y) + 4ky 2krθ2krθ2  = 0

La ia + Raia + ke θ(˙)1  = v

Assume zero initial conditions when required.

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,  . The transfer function is of the form:

Y (s)      bmsm  + bm 1sm 1 + ··· + b1 s + b0

=

V (s)         sn + an 1sn 1 + ··· + a1 s + 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)      0.00125s5 + 0.0718s4 + 0.9555s3 + 6.716s2 + 24.43s + 29.59

=

V (s)              s5 + 57.77s4 + 782.3s3 + 5501s2  + 19685s + 24169

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 aunit step input v = 1(t) for 12 seconds.  Find the value of ia (t) when 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) =  .  For any complex poles p, find the numerical value of (Q6) Re(p) and (Q7) |p| .

[Canvas Input:  2 signed numbers - 5% tolerance allowed]

Q8.  Determine the stability of GOL (s) =  .  Select the appropriate description of its behaviour. [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 realtime. We will use a controller C(s) =  V (s) =  (R(s)−Ia (s)), 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 = 750, 1000, 2000, 3000, 4000, find the poles and the zeros of the closed-loop transfer function GCL (s) =  .

Ordering the poles as Re(p1 ) ≤ Re(p2 ) ≤ ...  and zeros as Re(z1 ) ≤ Re(z2 ) ≤ ...

(Q10-12) Find  Re(p3 )  for  K  =  750, 2000, 4000.    [Canvas  Input:   Three  signed  numbers  -  5%  tolerance allowed]

(Q13-15) Find  Re(z3 )  for  K  =  1000, 2000, 3000.   [Canvas  Input:   Three  signed  numbers  -  5%  tolerance allowed]

Q16. You are now given a specific value of the controller gain K. Perform a partial fraction expansion and match the coefficients to their corresponding poles

The partial fraction expansion is of the form

GCL (s) =  

where ki , pi  can be either complex numbers or real numbers.

Match the real part of the coefficient  (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 option.

Example: if GCL (s) =  +  +  + 

.  Re(p) = −1 pairsto Re(k) = 7.

.  Re(p) = 10 pairsto Re(k) = 9.

.  Re(p) = −45 pairsto Re(k) = 12

Q17.  For your given specific value of K, select the behaviour that describes the dynamics of the closed loop system GCL (s) =  .  [Canvas Input:  a multiple dropdown question]

Q18-22.  Simulate the behaviour of the system. Set the reference to ber(t) = 1(t) [m] (unit step). Plot ia (t)

andr(t) on the same axes for 10 seconds for each of the following controller gains K = 5000, 5500, 6000, 6500, 7000. Find the value of (ia (t) − r(t)) when is 10 s for K = 5000, 5500, 6000, 6500, 7000.  [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.  From this point on, assume that previous conclusions drawn from analysis do not apply. Also assume that the transfer function is

G(s) = Ve (s) = kesθ 1 (s) =                0.3571s4  + 17.95s3  + 127.5s2  + 142.3s + 494.5                .

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 

G(˜)(s) =  = 

Q23.   Before approximating the transfer function,  investigate how the parameters  (K,ωn ,ζ)  affect 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, find the maximum value of ˜(v)e (t).

[Canvas Input:  One signed numbers  - 5% tolerance allowed] -

Q24-26. Find the approximated system’s transfer function G(s).

G(-)(s) is of the form

G(-)(s) =  =  .

Find the numerical value of (Q24) K, (Q25) ωn  and (Q26) ζ .  [Canvas Input:  Three signed numbers - 5% tolerance allowed]

Hint: For e (t) (approximate system) and ve (t) (real system), we would like limt→∞ 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 e (t) to the step response of G(s) =   output ve (t) on the same axes.

Find the value of e (t) − ve (t) when is  (Q27)  0.7 s and  (Q28)  1 s.  [Canvas Input:  Two signed numbers - 5% tolerance allowed]

To improve the accuracy of the approximated response, now include the largest purely real zero.  The new

open-loop transfer function is

G(-)(s) = es(s)  = s2 a1s(s +)  a0 .

Construct a Simulink model (with v as input and ve  as output).  Only use gain, differentiator 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 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. 6. 7.

8.


1

s

1  

s2

1  

s3

1


9. 10. 11.

12.


1

a0

−a0

a1


13. 14. 15.

16.


a1

b0

−b0

b1


17.  −b1


Figure 3: Selection options for Q29

Part 4: Pendulum, Open- and Closed-Loop System Identification

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 fix on the end of the string/rod.  For this assignment we will assume the mass is blue, although any uniform colour will be sufficient.  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 different 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 different from the pendulum mass will be sufficient.

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 identification, 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. Try and have even lighting with reduced highlights and shadows.

.  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 specified in the descriptions below.  Crop any other recorded material, including walking to and from the camera.

.  Keep the markers fully 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) [Gradescope 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 defined in t.

px: a vector of the x-positions of the blue marker, at times defined 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 different 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  , mapping the input data to the output data. modelFlag: Indicates which transfer function to estimate:  0 for fitting GOL (s) , 1 for fitting C(s).

Another in-built MATLAB function that you will find 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 fit as a percentage between the response and the data, displayed in the legend. For this assignment, data will bean 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)

Q31.  First use ColourTracking() to find px (t) and x(t).   Shift both data sets so that the origin lies at xfinal .  Then use SystemID() with modelFlag=0 to find the open loop transfer function GOL (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 figure in Q43.  What is the order of the open loop system  GOL (s)?  [Gradescope Input: 1 integer]

Q32.  What is the real part of the dominant pole of the system GOL (s)?  [Gradescope 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 find 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) [Gradescope 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 difference 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.  [Gradescope 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.  [Gradescope Input:1 integer]

1.

2.

0

pxref

3.  x

4. px

6. px − pxref                     8. px − x

Figure 6: Selection options for Q34-Q35

9.

10.

x  pxref

pxref   x

Q36.   What  is the  reference  signal pxref (t)  for the  scenario  in Video  2?   [Gradescope  Input:  1 integer]

1.  0                          2.  1(t)                         3. pxfinal 1(t)            4.  δ(t)                      5.  xfinal 1(t)

Figure 7: Selection options for Q36

Q37. First use ColourTracking() to find px (t) and x(t). Shift both datasets so that the origin lies atxfinal. Then use SystemID() with modelFlag=1 to find 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 figure in Q43.  What is the order of the controller C(s)? [Gradescope Input:  1 integer]

Q38.  Simplify the block diagram in Figure 5 to find the closed-loop transfer function GCL (s) =

Ps(.  [Gradescope Input:  Multiple  Choice]

Q39. Using your specific GOL (s) and C(s) from Q31 and Q37, respectively, find GCL (s). Use the compare() function to compare the output of GCL (s) and the measured output data, you will submit the resulting figure 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)?  [Gradescope 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) [Gradescope Input:  Text]

Q42.  Upload your MATLAB script for Part 4.  Your script should print GOL (s), C(s), and GCL (s). (2 marks) [Gradescope Input: File  Upload]

Q43.   Upload one pdf including the comparison Figures from  Q31,  Q37 and  Q39.   (3 marks) [Gradescope Input:  File  Upload]

Q44.  Upload a jpeg image of your pendulum.  (1 mark) [Gradescope Input:  File  Upload]