AS-74.3199 Wireless Automation
-
Upload
xaviera-vaughan -
Category
Documents
-
view
17 -
download
0
description
Transcript of AS-74.3199 Wireless Automation
![Page 1: AS-74.3199 Wireless Automation](https://reader035.fdocuments.us/reader035/viewer/2022062516/56812a59550346895d8db638/html5/thumbnails/1.jpg)
AS-74.3199 Wireless Automation
Implementing PIDPLUS for Halvari system
![Page 2: AS-74.3199 Wireless Automation](https://reader035.fdocuments.us/reader035/viewer/2022062516/56812a59550346895d8db638/html5/thumbnails/2.jpg)
The goal is to keep the ball and the cart in the middle.
Can be controlled by a manual joystick or a computer.
The position of the ball (angle φ) and of the cart (coordinate y) are measured and their derivatives calculated. Thus our system has four states from which a control variable (force F) can be derived.
In optimal control force is calculated as a linear combination of the states
Halvari – a ball balancing system
4321 KKyKyKF
![Page 3: AS-74.3199 Wireless Automation](https://reader035.fdocuments.us/reader035/viewer/2022062516/56812a59550346895d8db638/html5/thumbnails/3.jpg)
Halvari – a ball balancing system
Halvari can be described with two nonlinear differential equations
FrRmmMy )sincos)(()( 2
coscossin)cossinsin)(()( 22 FryMrmrgrRmr
r
rRJ
The constants used in the equations
kg 4Mkg 7.0m
23 kgm10175.0 J
m 5.0Rm 2.0r
sm 81.9 2g
Mass of the cart without the ball
Mass of the ball
Ball’s moment of inertia
Radius of the arch
Radius of rotation
Acceleration of gravity
![Page 4: AS-74.3199 Wireless Automation](https://reader035.fdocuments.us/reader035/viewer/2022062516/56812a59550346895d8db638/html5/thumbnails/4.jpg)
Halvari – a ball balancing system
The linearized form is derived by assuming that the angle φ is small. Thus we have the following assumptions:
FMmrJmMrR
mr
MmrJmMrR
mMmgr
)))((()))(((
)(2
2
2
2
FMmrJmM
Jmr
MmrJmM
grmy
2
2
2
22
)()(
sin
0sin 2 1cos
02
The linearized equations are
![Page 5: AS-74.3199 Wireless Automation](https://reader035.fdocuments.us/reader035/viewer/2022062516/56812a59550346895d8db638/html5/thumbnails/5.jpg)
Traditional PID PID controller consists of three terms: proportional,
integral and derivative.
The input of a PID controller is an error signal which is the difference between a reference signal and the measured output of the process:
dt
tdeTde
TteKtu
t
di
p
)()(
1)()(
0
)()()( tytyte r P
I
D
processΣ Σ+
-
yyr e u
![Page 6: AS-74.3199 Wireless Automation](https://reader035.fdocuments.us/reader035/viewer/2022062516/56812a59550346895d8db638/html5/thumbnails/6.jpg)
PIDPlus
In wireless automation loss of measurement and control data is common
Traditional PID doesn’t handle packet loss that well and gives a poor dynamic response
The solution is to replace PID’s integral part with a filter that takes packet loss into account PIDPlus
PIDPlus holds on to the last filter output until a new measurement is received and after that it calculates a new filter output from the last controller output and time elapsed since the last communication
![Page 7: AS-74.3199 Wireless Automation](https://reader035.fdocuments.us/reader035/viewer/2022062516/56812a59550346895d8db638/html5/thumbnails/7.jpg)
PIDPlus integral
The filter eguation:
)1)(( 111resetT
T
NNNN eFOFF
outputfilter NF
outputfilter last the1 NF
output controllerlast the1 NO
packages receivedbetween timeT
I
PTreset
Source:Addressing Control Applications Using Wireless Devices,Emerson Global Users Exchange
![Page 8: AS-74.3199 Wireless Automation](https://reader035.fdocuments.us/reader035/viewer/2022062516/56812a59550346895d8db638/html5/thumbnails/8.jpg)
PIDPlus derivative
The derivative term is described by the equation
Because the reference signal is 0 thereis a connection
A filter has to be added to the derivativeterm. The filter equation is
packagesbetween timeT
termderivative controllerDO
constant efilter timfT
(angle φ or place y)
T
eeKO NN
DD
1 errorcurrent Neerrorlast 1 Ne
outputfilter , Nfe
outputfilter last 1, Nfe
variablecontrolled Ny
NN ye
11,,
NN
fNf
f
fNf ee
TT
Te
TT
Te
![Page 9: AS-74.3199 Wireless Automation](https://reader035.fdocuments.us/reader035/viewer/2022062516/56812a59550346895d8db638/html5/thumbnails/9.jpg)
• N2 receives packet and uses external pins to relay information to N3• Range: [0,4095] Physical values: [0,2.5 V]• Measurements range: [1300, 1900] [0.79,1.15 V]
N1Joystic
kCH 12.
N2
• Joystick measurement and Joystick ON/OFF
N3DAC1
ON/OFF
• N3 calculates control speed and direction and sends packet to N4
CH 18.
N4
• N4 assigns external pins for speed and direction• Signals are amplified from 0-2.5 V to 0-5.0 V.
SYSTEMDIR
SPEED
Halvari: Joystick Control
![Page 10: AS-74.3199 Wireless Automation](https://reader035.fdocuments.us/reader035/viewer/2022062516/56812a59550346895d8db638/html5/thumbnails/10.jpg)
• N3.5 uses PIDplus algorithm to determine control• Sends control command to N4 and waits for ACK packet• If measurements from N3 not received, old control
values used
• N3 receives cart and ball position measurements from the system• If control switch is activated, PIDplus control used• Measurements are sent to N3.5
BALL POS.
CART POS.CH 16.
N4
• N4 assigns external pins for speed and direction• Signals are amplified from 0-2.5 V to 0-5.0 V.
SYSTEMDIR
SPEED
N3.5
CH 18.
ACKCH 18.
N3
Halvari: PIDplus controllerHalvari: PIDplus controller
![Page 11: AS-74.3199 Wireless Automation](https://reader035.fdocuments.us/reader035/viewer/2022062516/56812a59550346895d8db638/html5/thumbnails/11.jpg)
Some simulations
PIDPlus without any packet loss.
red = angle φblue = place ygreen = y’turquoise = φ’
![Page 12: AS-74.3199 Wireless Automation](https://reader035.fdocuments.us/reader035/viewer/2022062516/56812a59550346895d8db638/html5/thumbnails/12.jpg)
Some simulationsPIDPlus with somepacket loss.Sampling packet loss probability = 20%andActuator packet loss probability = 20%
red = angle φblue = place ygreen = y’turquoise = φ’
The longest timebetween updates is about 3 times thesampling time.
![Page 13: AS-74.3199 Wireless Automation](https://reader035.fdocuments.us/reader035/viewer/2022062516/56812a59550346895d8db638/html5/thumbnails/13.jpg)
Some simulationsPIDPlus with a lot ofpacket loss.Sampling packet loss probability = 40%andActuator packet loss probability = 40%
red = angle φblue = place ygreen = y’turquoise = φ’
Time between updatescan be even 9 times thesampling time.
![Page 14: AS-74.3199 Wireless Automation](https://reader035.fdocuments.us/reader035/viewer/2022062516/56812a59550346895d8db638/html5/thumbnails/14.jpg)
References
Addressing Control Applications Using Wireless Devices, Emerson Global Users Exchange, PowerPoint-show
![Page 15: AS-74.3199 Wireless Automation](https://reader035.fdocuments.us/reader035/viewer/2022062516/56812a59550346895d8db638/html5/thumbnails/15.jpg)
Ajankäyttö