Akshay AME 544 Lab Report

33
AME 544 Computer Control of Mechanical System Experiment Report Model 210 Rectilinear Plant Akshay Anand Nerurkar USC ID#8759392138 Group Members: Shi, Xiaotian: [email protected] Xu, Tianxiang: [email protected] Hong, Wenbin: [email protected] Yang, Ye: [email protected] Akshay, Nerurkar: [email protected] Instructor: Dr. Serkan Kalender

Transcript of Akshay AME 544 Lab Report

Page 1: Akshay AME 544 Lab Report

AME 544

Computer Control of Mechanical System

Experiment Report

Model 210 Rectilinear Plant

Akshay Anand Nerurkar

USC ID#8759392138

Group Members:

Shi, Xiaotian: [email protected]

Xu, Tianxiang: [email protected]

Hong, Wenbin: [email protected]

Yang, Ye: [email protected]

Akshay, Nerurkar: [email protected]

Instructor:

Dr. Serkan Kalender

Page 2: Akshay AME 544 Lab Report

AME 544 Experiment Report Akshay Anand Nerurkar

1

Table of Contents

(i) Abstractโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆ.1

(ii) Introductionโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆ...1

1. PD Control of Rigid Bodyโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆ..3

1.1 System Identificationโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆ.โ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆ.โ€ฆ.5

1.2 Designing a PV Controlโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆ..โ€ฆโ€ฆโ€ฆโ€ฆ.7

1.3 Effect of sampling period (Ts)โ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆ.โ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆ14

1.4 Effect of Integral Gainโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆ..โ€ฆโ€ฆโ€ฆ.16

1.5 Designing a Velocity and Acceleration feedforwardโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆ.20

2. Control of 2DOF Mechanical Drive Systemโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆ24

2.1 System Identification ............................................................................................................... 24

2.2 Design Notch Filter .................................................................................................................. 25

2.3 Simulation ............................................................................................................................... 32

2.4 Discussion & Conclusion.......................................................................................................... 32

Page 3: Akshay AME 544 Lab Report

AME 544 Experiment Report Akshay Anand Nerurkar

2

Due Day: 05/06/2016

Experiment Report

Date: May 6th, 2016

ABSTRACT

This report is based on two main experiments, PD control of rigid body and Two DOF plant

control. These two experiment use ECP software to control the Model 210 Rectilinear Plant. In

this report, the influence of different control methods, like the PD control, PID control and the

Notch Filter Design will be explored and discussed. Results will be based on step response, ramp

response, sine sweep response, cubic response and etc. And discussion and analysis will be based

on comparing the results from experiment and the simulations from MATLAB.

Introduction

The experiments were carried out with ECP using Model 210 Rectilinear Plant. It consists of

three part, system interface software, real-time Controller & I/O and electromechanical plant.

The experiments consist of two parts the first part is PD Control of Rigid Body, the second part

is 2 Degree of Freedom Plant Control. In the first part, it will identify the plant and compare step,

frequency, ramp, cubic and sinusoidal responses separately with different damping ratio and

sampling period, and use Simulink to get its simulation result. In the second part, it will identify

the system and compare step and frequency responses separately between a system with notch

filter and without, and also using Simulink to compare its experimental and simulation result.

Page 4: Akshay AME 544 Lab Report

AME 544 Experiment Report Akshay Anand Nerurkar

3

1 PD Control of Rigid Body

1.1 System Identification

In this experiment, the method to identify hardware gain ๐พโ„Ž๐‘ค of the plant is using open and

closed loop step response. Firstly, remove the spring and disconnect the damper; Secondly, use

first messed cart and encoder #1.

Open Loop Response

The algorithm of this method is shown as the block diagram in Figure 1.1.

Figure 1.1 Open Loop Step Response Diagram

In the diagram, K is the hardware gain that we need to get from the calculation.

Setup step input. Then amplitude is 0.5V. Time is 1000 msec. Thus input is U(s)=0.5/s.

Because the actual unit is counts rather than voltage, we have to change voltage into counts by

using the constant that 32768 counts correspondence to 10V. Therefore, the actual step input is:

R(s)= (0.5*32768/10)/s=1638.4/s.

The relationship between R(s) and Y(s) can be shown as the equation (1):

R(s) โˆ™๐พ

๐‘ 2 = ๐‘Œ(๐‘ ) (1)

The result of the experiment is shown in Figure 1.2 (a) and 1.2 (b). In the figure, we can find

that the curve in the position diagram is much clearer, thus we use the position diagram to

compute the hardware gain.

Page 5: Akshay AME 544 Lab Report

AME 544 Experiment Report Akshay Anand Nerurkar

4

Figure 1.2 (a) the plot of open loop step response with acceleration

Figure 1.2 (b) The plot of open loop step response with position

We use the Curve Fitting Tool (cftool) in MATLAB to fit the position diagram. By loading

the data from the position diagram and deviating the linear model, we got the slope of the

velocity. All the data is shown in the Figure 1.3.

Page 6: Akshay AME 544 Lab Report

AME 544 Experiment Report Akshay Anand Nerurkar

5

Figure 1.3 Fitting the curve in MATLAB

According to the result of curve fitting tool, we can get the slope. And we can get the

hardware gain by using the equation (2).

๐‘ฆ(๐‘ก)ฬ‡ = 2 ร— 0.5 ร— 0.5 ร— 3276.8 ร— ๐พ (2)

Thus,

K =๐‘ ๐‘™๐‘œ๐‘๐‘’

2 ร— 0.5 ร— 0.5 ร— 3276.8=

2 ร— 1.272 ร— 105

2 ร— 0.5 ร— 0.5 ร— 3276.8= 155.2734

Therefore, the hardware gain K is 155.27 with the method of open loop response.

A. Closed Loop Response

The algorithm of this method is shown as the block diagram in Figure 1.4.

Figure 1.4 Close Loop Step Response Diagram

According to the diagram aforementioned, we can easily get the transfer function:

Page 7: Akshay AME 544 Lab Report

AME 544 Experiment Report Akshay Anand Nerurkar

6

Solving this with the given value of transfer function we get,

G(s) =๐พ๐พ๐‘ƒ

๐‘ 2 + 32๐พ๐พ๐‘ƒ

According to the transfer function, we can find that the damping ratio =0, and the natural

frequency is

Solving this with the given value of transfer function we get,

๐‘ค๐‘› = โˆš32๐พ๐พ๐‘ƒ.

In the experiment, we got the closed loop step response diagram, to know the exact

amplitude of the diagram, we export the data from ECP and import the data into the MATLAB.

In Figure 1.5, we tested two time periods, and we exported the data from ECP, so that we

can import the data into MATLAB, to get the accurate amplitude and the time.

In Figure 1.6, after simulating the close loop response to the step input, we used MATLAB

to find the maximum amplitude, and the time period. So that we can get the hardware value.

Figure 1.5 Closed loop step response diagram

Page 8: Akshay AME 544 Lab Report

AME 544 Experiment Report Akshay Anand Nerurkar

7

Figure 1.6 Simulink the closed loop step response in MATLAB

And, after we found the peak of each time period, we got the natural frequency by using the

equation:

๐‘ค๐‘› =2๐œ‹

๐‘‡=

2๐œ‹

(1.496 โˆ’ 0.31)/2= 10.5955 ๐‘Ÿ๐‘Ž๐‘‘/๐‘ 

Calculate the natural the hardware gain:

K =๐‘ค๐‘›

2

32ร—๐พ๐‘=

10.59552

32โˆ—0.02=175.4165

B. Conclusion:

In this experiment, we used two different methods to get the hardware gain. Compared to

the open loop system, closed loop system is more stable and can also eliminate the influence of

disturbance. So the result from closed loop step response is more accurate.

So we decided to use the result from closed loop system. ๐พโ„Ž๐‘ค = 175.42

1.2 PV Control Design

The problem is to design a PV control with desired natural frequency of 4 Hz and damping

ratios of 0.4, 0.7 and 1with a sampling period of 0.002652 seconds.

A. Experiment Part

Firstly, we need to know the control law of this experiment. Figure 1.7 is the block diagram.

Page 9: Akshay AME 544 Lab Report

AME 544 Experiment Report Akshay Anand Nerurkar

8

Figure 1.7 PV Control

From the diagram, we can easily know the transfer function:

Solving with the appropriate value we get,

๐‘Œ(๐‘ )

๐‘…(๐‘ )=

32๐พ๐‘๐พ

๐‘ 2 + 32๐พ๐‘ฃ๐พ๐‘  + 32๐พ๐‘๐พ

Then,

2๐‘ค๐‘› = 32๐พ๐‘ฃ๐พ, ๐‘ค๐‘› = โˆš32๐พ๐พ๐‘ƒ

Since the hardware gain ๐พโ„Ž๐‘ค = 175.42, the natural frequency is 4Hz, ๐‘ค๐‘› = 8๐œ‹ rad/s, we can

easily get ๐พ๐‘ƒ= 0.1125.

To do the experiment, we need to know the ๐พ๐‘ฃ for the system, since ECP use BDM theory,

we can discrete the equation, and the sampling time is ๐‘‡๐‘  = 0.002652.

And the BDM equation is:

๐พ๐‘ฃ๐‘  = ๐พ๐‘ฃ1โˆ’๐‘งโˆ’1

๐‘‡๐‘ = ๐พ๐‘ฃ

โ€ฒ(1 โˆ’ ๐‘งโˆ’1), ๐พ๐‘ฃโ€ฒ =

๐พ๐‘ฃ

๐‘‡๐‘ 

After calculation, we got all the data as follows:

Table 1.1 Values of ๐พ๐‘‰

Damping Ratio ๐พ๐‘‰ ๐พ๐‘‰/๐‘‡๐‘ 

0.4 0.003582 1.350678

0.7 0.006268 2.363499

1 0.008955 3.376696

Page 10: Akshay AME 544 Lab Report

AME 544 Experiment Report Akshay Anand Nerurkar

9

1) Step Response

Figure 1.7(a) Close Loop Step with =0.4

Figure 1.7(b) Close Loop Step with =0.7

Page 11: Akshay AME 544 Lab Report

AME 544 Experiment Report Akshay Anand Nerurkar

10

Figure 1.7(c) Close Loop Step with =1

Result Discussion: (Step Response)

Comparing the response chart using different damping ratio, we can conclude a clear effect on its

characteristics such as rise time, peak time, overshoot, settling time and the period of oscillation.

With the increasing of damping ratio, theoretically, rise time will become longer, the overshoot

will become smaller, peak time will become later, settling time will become shorter and period of

oscillation will be reduced. The tendency of each characteristic is perfectly reflected in the

experimental response chart.

2) Sine Sweep Response

We tested the sin sweep response with close loop control system. The method is to use

different damping ratio to test the response to the sine sweep input. In this experiment, we tested

the response to the sine sweep input with =0.4, 0.7 and 1.

Page 12: Akshay AME 544 Lab Report

AME 544 Experiment Report Akshay Anand Nerurkar

11

Figure 1.8 (a) Close Loop Sine Sweep with =0.4

Figure 1.8 (b) Close Loop Sine Sweep with =0.7

Page 13: Akshay AME 544 Lab Report

AME 544 Experiment Report Akshay Anand Nerurkar

12

Figure 1.8 (c) Close Loop Sine Sweep with =1

Results conclusion: (Sine Sweep Response)

By comparing those response charts, we can find that the amplitude increases first and then

decrease while time increases when damping ratio is 0.4. When damping ratio is 0.7 and 1, the

amplitude decreases consistently as the frequency increases. As we can see from the chart,

The amplitude decreases faster as the frequency increase when damping ratio is 0.7, and the

amplitude drops faster in the low-frequency region when damping ratio is 1.

By comparing the shape and value of the actual response chart and the bode plot we get from

Matlab, we conclude that the experimental chart is same as the bode plot.

B. Simulink in MATLAB for the two responses

To understand the result better and to check the result of the experiment, we need to simulate

the step response and the sine sweep response in MATLAB. By comparing between the results

from experiments and the plot generated from MATLAB, we can know how the disturbance will

have influence on the results.

1) Step Response Simulation

We simulated the close loop control system with different damping ratio under the step

input in MATLAB. The results are shown as follows in Figure 1.9

Page 14: Akshay AME 544 Lab Report

AME 544 Experiment Report Akshay Anand Nerurkar

13

Figure 1.9 (b) Simulate the Close Loop Step with =0.7

Figure 1.9 (c) Simulate the Close Loop Step with =1

2) Sine Sweep Response Simulation

Since the sine sweep method is to get the bode diagram by experiment, when we simulate

the results in MATLAB, we can compare the results with bode diagram directly.

Page 15: Akshay AME 544 Lab Report

AME 544 Experiment Report Akshay Anand Nerurkar

14

Figure 1.10 (b) Simulate the Close Loop Sine Sweep with =0.7

Figure 1.10 (c) Simulate the Close Loop Sine Sweep with =1

1.3 Experiments based on different sampling time (Effect of sampling time)

In this part, we need to find out the influence of selecting different sampling times. Initial

settings: Step input with 1500 counts and dwell time is 2 seconds

Based on the former experiments, we also tried =0.4, 0.7 and 1 as the damping ratio during

the whole experiment, and we chose ๐‘‡๐‘  = 0.002652๐‘  as the reference. Chose some longer

sampling times 0.04420๐‘ , 0.0106 ๐‘Ž๐‘›๐‘‘ 0.0645๐‘  and one shorter sampling time 0.000884๐‘  to

see what would happen.

Page 16: Akshay AME 544 Lab Report

AME 544 Experiment Report Akshay Anand Nerurkar

15

Figure 1.11 (a) Close Loop step with ๐‘‡๐‘  = 0.000884๐‘ 

Figure 1.11 (a) Close Loop step with ๐‘‡๐‘  = 0.0106๐‘ 

Figure 1.11 (c) Close Loop step with ๐‘‡๐‘  = 0.04420๐‘ 

Page 17: Akshay AME 544 Lab Report

AME 544 Experiment Report Akshay Anand Nerurkar

16

Figure 1.11 (d) Close Loop step with ๐‘‡๐‘  = 0.0645๐‘ 

Conclusion and analysis

According to the figure Ts=0.0645๐‘ , we could conclude that with a longer sampling period, the

graph comes with a larger overshoot and more significant oscillations, which means it has

magnitude error. For the figure Ts=0.00084๐‘ , the overshoot is smaller and the oscillations are

less. Thus, comparing two diagrams, the plots with smaller sampling time have a more accurate

output than the diagram with longer sampling time. But when we run the system, it takes a

longer time to get the plot with smaller sampling time than the plot with a longer sampling time,

which means a system with too long sampling time will increase the unnecessary running time,

so we should take many factors into consideration to choose an appropriate sampling time.

1.4 Effect of Integral Gain

In this part, we need to find out the influence of adding integral gain into the system.

In the ECP software, the differential and integral algorithm were shown as follows:

D(๐‘งโˆ’1) = ๐พ๐‘‘(1 โˆ’ ๐‘งโˆ’1)

I(๐‘งโˆ’1) =๐พ๐‘–

(1 โˆ’ ๐‘งโˆ’1)

Our group chose =0.4, ๐‘‡๐‘  = 0.002652๐‘  as the initial settings, and we will apply the

integral gain ๐พ๐‘– = 0.25 ๐‘Ž๐‘›๐‘‘ 0.5 to step and ramp input to see the effect of integral gain.

After calculation, we got all the parameters in the discrete time domain as follows:

Page 18: Akshay AME 544 Lab Report

AME 544 Experiment Report Akshay Anand Nerurkar

17

TABLE 1.2 The determined parameters

Damping

Ratio

The

Sampling

Time ๐‘‡๐‘ 

The

Proportional

Gain ๐พ๐‘

The

Differential

Gain ๐พ๐‘‘

The Integral

Gain ๐พ๐‘–

Continuous 0.4 0.1125 0.003582 0.25/0.5

Discrete 0.4 0.002652 0.1125 1.35068 6.63e-4/

1.326e-3

A. Without Integral Gain

Figure 1.12 (a) Response to step input without ๐พ๐‘–

Page 19: Akshay AME 544 Lab Report

AME 544 Experiment Report Akshay Anand Nerurkar

18

Figure 1.12 (b) Response to ramp input without ๐พ๐‘–

B. Under Step Input

We tested the response under the step input with different integral gains, and the results are

as follows:

When ๐พ๐‘– = 0.25, the result is shown in Figure 1.13(a).

Figure 1.13 (a) Response to step input with ๐พ๐‘– = 0.25

When ๐พ๐‘– = 0.5, the result is shown in Figure 1.13(b)

Page 20: Akshay AME 544 Lab Report

AME 544 Experiment Report Akshay Anand Nerurkar

19

Figure 1.13 (b) Response to step input with ๐พ๐‘– = 0.5

C. Under Ramp Input

We tested the response under the ramp input with different integral gains, and the results are

as follows:

When ๐พ๐‘– = 0.25, the result is shown in Figure 1.14(a)

Figure 1.14 (a) Response to ramp input with ๐พ๐‘– = 0.25

When ๐พ๐‘– = 0.5, the result is shown in Figure 1.14(b)

Page 21: Akshay AME 544 Lab Report

AME 544 Experiment Report Akshay Anand Nerurkar

20

Figure 1.14 (b) Response to ramp input with ๐พ๐‘– = 0.5

Conclusion and analysis

Those diagrams above show, the integral gain can be used to help reduce error of the system.

From the diagrams with integral controller, the steady state of position plot of encode 1 is almost

identical to the plot of command position, which means the error of the system is almost reduced

to zero. And it also increase the oscillation of the system, which can observed from those plots

that the maximum overshoot is increased, which means integral gain will cause system become

unstable.

1.5 Effect of feedforward Gain

In this experiment, we need to find out the influence of feedforward gains under cubic

response and sinusoidal response. Firstly, we need to design a velocity and acceleration

Block diagram of the system with feed forward control

Page 22: Akshay AME 544 Lab Report

AME 544 Experiment Report Akshay Anand Nerurkar

21

Feedforward control law. And we need to choose some parameters like damping ratio ,

sampling time ๐‘‡๐‘  , proportional gain ๐พ๐‘ , differential gain ๐พ๐‘‘ and integral gain ๐พ๐‘–.

In the ECP software, the differential and integral algorithm were shown as follows:

D(๐‘งโˆ’1) = ๐พ๐‘‘(1 โˆ’ ๐‘งโˆ’1)

I(๐‘งโˆ’1) =๐พ๐‘–

(1 โˆ’ ๐‘งโˆ’1)

Also, from the labs aforementioned, the transfer function G(s):

G(s) =32๐พ

๐‘ 2 + 32๐พ๐พ๐‘‘๐‘ 

Feedforward control is a perfect tracking controller, to use this control law, we need to

know Gโˆ’1(s):

Gโˆ’1(s) =๐‘ 2 + 32๐พ๐พ๐‘‘๐‘ 

32๐พ=

1

32๐พ๐‘ 2 + ๐พ๐‘‘๐‘ 

Therefore, we can easily get the velocity feedforward gain and acceleration feedforward gain,

๐พ๐‘ฃ๐‘“๐‘“ = ๐พ๐‘‘

๐พ๐‘Ž๐‘“๐‘“ =1

32๐พ

In the ECP software, the feedforward control law is shown as follows:

Gโˆ’1(z) =๐พ0 + ๐พ1zโˆ’1 + โ‹ฏ + ๐พ6zโˆ’6

1 + ๐ฟ1zโˆ’1 + โ‹ฏ + ๐ฟ6zโˆ’6

According to the BDM method,

s =1 โˆ’ zโˆ’1

๐‘‡๐‘ 

Then, we can get the perfect tracking control law Gโˆ’1(z)

Gโˆ’1(z) = (1

32๐พ๐‘‡๐‘ 2 +

๐พ๐‘‘

๐‘‡๐‘ )+(โˆ’

1

16๐พ๐‘‡๐‘ 2 โˆ’

๐พ๐‘‘

๐‘‡๐‘ ) zโˆ’1+

1

32๐พ๐‘‡๐‘ 2 zโˆ’2

And all the parameters needed in the feedforward control have been listed in table 1.3.

Table 1.3 The determined parameters in feedforward control

Page 23: Akshay AME 544 Lab Report

AME 544 Experiment Report Akshay Anand Nerurkar

22

The Damping Ratio The Sampling Time The proportional Gain The differential Gain

0.4 0.002652 0.1125 0.003582

๐พ0 ๐พ1 ๐พ2 The integral Gain

1.4179 1.485 0.0672 0.25/0.5

a. The response without feedforward control law

Figure 1.15 (a) Response to cubic input without feedforward

Figure 1.15 (b) Response to sinusoidal input without feedforward

Page 24: Akshay AME 544 Lab Report

AME 544 Experiment Report Akshay Anand Nerurkar

23

b. The response to cubic with feedforward control law

Figure 1.16 (a) Response to cubic with feedforward

Figure 1.16 (b) Response to cubic with feedforward & Ki=0.25

c. The response to sinusoidal with feedforward control law

Figure 1.17 (a) Response to sinusoidal with feedforward

Page 25: Akshay AME 544 Lab Report

AME 544 Experiment Report Akshay Anand Nerurkar

24

Figure 1.17 (b) Response to sinusoidal with feedforward & Ki=0.5

Conclusion and analysis

Those diagrams above shows that with the perfect tracking controller, the position plot of encode

1 is almost identical to the plot of command position, which means the following error is almost

reduced to zero, and the rise time is shorter than before.

2. Two DOF Plant Control

2.1 System Identification

Two DOF Plant is a system that require two independent coordinates to describe their

The equations of notion are given as:

๐‘€1๐‘ฅ1ฬˆ = ๐น โˆ’ ๐‘˜(๐‘ฅ1 โˆ’ ๐‘ฅ2) โˆ’ ๐‘(๏ฟฝฬ‡๏ฟฝ1 โˆ’ ๏ฟฝฬ‡๏ฟฝ2)

๐‘€2๏ฟฝฬˆ๏ฟฝ2 = ๐‘˜(๐‘ฅ1 โˆ’ ๐‘ฅ2) + ๐‘(๏ฟฝฬ‡๏ฟฝ1 โˆ’ ๏ฟฝฬ‡๏ฟฝ2)

Taking the Laplace Transform,

The transfer function from F to ๐‘ฅ1 is: (collocated-plant)

G1(s) =x1(s)

F(s)=

๐‘ 2+๐‘

๐‘€2๐‘ +

๐‘˜

๐‘€2

๐‘€1๐‘ 2(๐‘ 2+(1+๐‘€2๐‘€1

)(๐‘

๐‘€2๐‘ +

๐‘˜

๐‘€2))

= 1

๐ฝ1๐‘ 2

๐‘ 2+๐‘

๐‘€2๐‘ +

๐‘˜

๐‘€2

๐‘ 2+๐‘€1+๐‘€2๐‘€1๐‘€2

๐‘๐‘ +๐‘€1+๐‘€2๐‘€1๐‘€2

๐‘˜

And the transfer function from F to ๐‘ฅ2 ๐‘–๐‘  : (non-collocated plant)

G2(s) =x2(s)

F(s)=

1

๐‘€1๐‘ 2

๐‘๐‘  + ๐‘˜๐‘€2

๐‘ 2 +๐‘€1 + ๐‘€2

๐‘€1๐‘€2๐‘๐‘  +

๐‘€1 + ๐‘€2

๐‘€1๐‘€2๐‘˜

And, transfer function from ๐‘Œ1 to ๐‘Œ2 is:

Page 26: Akshay AME 544 Lab Report

AME 544 Experiment Report Akshay Anand Nerurkar

25

๐‘Œ2

๐‘Œ1=

x2(s)

x1(s)=

(๐‘๐‘  + ๐‘˜)/M2

๐‘ 2 +๐‘

๐‘€2๐‘  +

๐‘˜๐‘€2

2.2 PD & Notch Filter Design

In this experiment, the problem is to find out the influence of notch filter on the response

under ramp input and sine sweep input.

To achieve a PD & Notch Filter Design, we can follow a classic block diagram of notch filter

design as follows:

Figure 2.1 The block diagram of notch filter design

a. Define Natural Frequency

1) Closed Loop Frequency

In the experiment, we got the sine sweep response, as we can see in the Figure 2.2,

comparing with the response curve, the command position curve is easier to find the ๐œ”๐‘›๐‘๐‘Ÿ.

Figure 2.2(a) Closed Loop Sine Sweep Diagram

Page 27: Akshay AME 544 Lab Report

AME 544 Experiment Report Akshay Anand Nerurkar

26

Figure 2.2(b) Closed Loop Sine Sweep Command Diagram

So we can know that:

๐œ”๐‘›๐‘ง๐‘Ÿ=3.62Hz ร— 2ฯ€ = 21.8 rad/s

๐œ”๐‘›๐‘๐‘Ÿ=5.55Hzร— 2ฯ€ = 34.8717 rad/s

๐‘

=๐œ”2 โˆ’ ๐œ”1

2๐œ”๐‘›๐‘๐‘Ÿ= 0.0618

๐‘ง

=๐œ”4 โˆ’ ๐œ”3

2๐œ”๐‘›๐‘ง๐‘Ÿ= 0.07011

๐œ”๐‘›๐‘ =๐œ”๐‘›๐‘๐‘Ÿ

โˆš1โˆ’2๐‘2

= 35.0057 rad/s

๐œ”๐‘›๐‘ง =๐œ”๐‘›๐‘ง๐‘Ÿ

โˆš1โˆ’2๐‘ง2

= 21.888 Rad/s

Then,

๐‘˜

๐‘€2 = ๐œ”๐‘›๐‘ง

2 = 21.9112 = 480.0919

๐‘€1 + ๐‘€2

๐‘€1๐‘€2๐‘˜ = ๐œ”๐‘›๐‘

2 = 35.00572 = 1225.399

๐‘

๐‘€2= 2

๐‘ง ๐œ”๐‘›๐‘ง = 3.0724

๐‘€1 + ๐‘€2

๐‘€1๐‘€2๐‘ = 2

๐‘ ๐œ”๐‘›๐‘ = 4.3267

Then, we can identify the plants:

Page 28: Akshay AME 544 Lab Report

AME 544 Experiment Report Akshay Anand Nerurkar

27

๐บ๐‘(๐‘ ) =๐‘ 2 + 3.0724๐‘  + 480.0919

๐‘ 2 + 4.3267๐‘  + 1225.399

G1(s) = ๐‘ 2+3.0724๐‘ +480.0919

๐‘ 4+4.3267๐‘ 3+1225.399๐‘ 2

๐‘Œ2

๐‘Œ1=

x2(s)

x1(s)=

3.0724๐‘  + 480.0919

๐‘ 2 + 3.0724๐‘  + 480.0919

2) Open Loop Step Response

In this way, we can easily get the diagram of open loop step response as shown in Figure 2.3

Figure 2.3 Open Loop Response

Page 29: Akshay AME 544 Lab Report

AME 544 Experiment Report Akshay Anand Nerurkar

28

Figure 2.4 Simulation of Open Loop Response in MATLAB

To get the natural frequency of this open loop response, we exported the data from ECP and

imported the data into MATLAB, after plot the diagram, we found the exact natural frequency

from the Figure 2.4. The natural frequency

T= 2.922โˆ’1.186

6= 0.2893๐‘ 

๐œ”๐‘›๐‘ง =2๐œ‹

๐‘‡= 21.71608 ๐‘Ÿ๐‘Ž๐‘‘/๐‘ 

Since these two methods can get the same natural frequency, in this report, we donโ€™t further

the calculation part.

b. Notch Filter

Firstly, notch filter is a band-stop filter with a narrow stopband, which a filter that passes

most frequencies unaltered, but attenuates those in a specific range to very low levels.

To control this system, we need to design a controller with some zeros, which is near the

undesirable damped poles, to attenuate the effects of these poles.

To design notch filter, there are two parameters needed, one is the resonant frequency, ๐œ”๐‘Ÿ;

The other is the attenuation desired, ๐‘€๐‘Ž.

Then, we can design notch filter by considering the equations as follows:

Page 30: Akshay AME 544 Lab Report

AME 544 Experiment Report Akshay Anand Nerurkar

29

๐บ๐‘(๐‘ ) =๐‘ 2 + 2

๐‘ง๐œ”๐‘›๐‘ง๐‘  + ๐œ”๐‘›๐‘ง

2

๐‘ 2 + 2๐‘

๐œ”๐‘›๐‘๐‘  + ๐œ”๐‘›๐‘2

To realize the function of the notch filter, we still need to set some parameters:

1) Choosing ๐œ”๐‘›๐‘ง = ๐œ”๐‘›๐‘ = ๐œ”๐‘Ÿ;

2) Let |๐บ๐‘(๐‘—๐œ”๐‘Ÿ)| =๐‘ง

๐‘

= ๐‘€๐‘Ž.

In the ECP software, the notch filter control law is shown as follows:

๐บ๐‘(z) =๐‘0 + ๐‘1zโˆ’1 + โ‹ฏ + ๐‘4zโˆ’4

1 + ๐ท1zโˆ’1 + โ‹ฏ + ๐ท4zโˆ’4

After calculating based on the BDM, the sampling time is 0.004420s. we can easily get these

parameters:

Table 2.1 Parameters for notch filter

๐‘0 ๐‘1 ๐‘2 ๐ท1 ๐ท2

0.7924 -1.5619 0.7714 -1.7524 0.7724

2.3 Response to Ramp & Sine Sweep

In this experiment, we set some initial values like the proportional gain ๐พ๐‘ = 0.4, the

differential gain ๐พ๐‘‘=0.2, the sampling time ๐‘‡๐‘  = 0.004420 ๐‘ . Then, we executed the designed

PD controller with and without the notch filter, and we got diagrams as follows:

1) Under the ramp input

Page 31: Akshay AME 544 Lab Report

AME 544 Experiment Report Akshay Anand Nerurkar

30

Figure 2.2 (a) Ramp response without the notch filter

Figure 2.2 (b) Ramp response with the notch filter

2) Under the sine sweep input

Page 32: Akshay AME 544 Lab Report

AME 544 Experiment Report Akshay Anand Nerurkar

31

Figure 2.3 (a) Sine sweep response without the notch filter

Figure 2.3 (b) Sine sweep response with the notch filter

Conclusion and analysis:

In the non-ยญโ€collocated system, the free part is hard to control and will induce resonances and

oscillation, which will affect the stability of the system. From the first diagram, the system

Page 33: Akshay AME 544 Lab Report

AME 544 Experiment Report Akshay Anand Nerurkar

32

without notch has obvious resonance and oscillation. In The second diagram, after adding notch

filter, the resonance of the system was reduced magnificently. Thus, the conclusion can be

derived that, notch filter can help system reduce the oscillation and resonance that caused by free

non-ยญโ€collocated part, and increase the stability of the system.

2.3 Simulation

Conclusion and Analysis

Using comparing the plots above, the conclusion can be derived that, before using notch in this

theoretical system, the steady-ยญโ€state following error is large. After adding notch filter, the

resonance are decreased and the time of oscillation is reduced, which is corresponding the results

in the experiment.